Skip to main content

google_cloud_bigtable_admin_v2/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::bare_urls)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![allow(rustdoc::invalid_html_tags)]
20#![allow(rustdoc::redundant_explicit_links)]
21#![no_implicit_prelude]
22extern crate async_trait;
23extern crate bytes;
24extern crate gaxi;
25extern crate google_cloud_gax;
26extern crate google_cloud_iam_v1;
27extern crate google_cloud_longrunning;
28extern crate google_cloud_lro;
29extern crate google_cloud_rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tokio;
35extern crate tracing;
36extern crate wkt;
37
38mod debug;
39mod deserialize;
40mod serialize;
41
42/// Request message for BigtableInstanceAdmin.CreateInstance.
43#[derive(Clone, Default, PartialEq)]
44#[non_exhaustive]
45pub struct CreateInstanceRequest {
46    /// Required. The unique name of the project in which to create the new
47    /// instance. Values are of the form `projects/{project}`.
48    pub parent: std::string::String,
49
50    /// Required. The ID to be used when referring to the new instance within its
51    /// project, e.g., just `myinstance` rather than
52    /// `projects/myproject/instances/myinstance`.
53    pub instance_id: std::string::String,
54
55    /// Required. The instance to create.
56    /// Fields marked `OutputOnly` must be left blank.
57    pub instance: std::option::Option<crate::model::Instance>,
58
59    /// Required. The clusters to be created within the instance, mapped by desired
60    /// cluster ID, e.g., just `mycluster` rather than
61    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
62    /// Fields marked `OutputOnly` must be left blank.
63    pub clusters: std::collections::HashMap<std::string::String, crate::model::Cluster>,
64
65    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
66}
67
68impl CreateInstanceRequest {
69    /// Creates a new default instance.
70    pub fn new() -> Self {
71        std::default::Default::default()
72    }
73
74    /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
75    ///
76    /// # Example
77    /// ```ignore,no_run
78    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
79    /// let x = CreateInstanceRequest::new().set_parent("example");
80    /// ```
81    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
82        self.parent = v.into();
83        self
84    }
85
86    /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
87    ///
88    /// # Example
89    /// ```ignore,no_run
90    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
91    /// let x = CreateInstanceRequest::new().set_instance_id("example");
92    /// ```
93    pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
94        self.instance_id = v.into();
95        self
96    }
97
98    /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
99    ///
100    /// # Example
101    /// ```ignore,no_run
102    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
103    /// use google_cloud_bigtable_admin_v2::model::Instance;
104    /// let x = CreateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
105    /// ```
106    pub fn set_instance<T>(mut self, v: T) -> Self
107    where
108        T: std::convert::Into<crate::model::Instance>,
109    {
110        self.instance = std::option::Option::Some(v.into());
111        self
112    }
113
114    /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
115    ///
116    /// # Example
117    /// ```ignore,no_run
118    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
119    /// use google_cloud_bigtable_admin_v2::model::Instance;
120    /// let x = CreateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
121    /// let x = CreateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
122    /// ```
123    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
124    where
125        T: std::convert::Into<crate::model::Instance>,
126    {
127        self.instance = v.map(|x| x.into());
128        self
129    }
130
131    /// Sets the value of [clusters][crate::model::CreateInstanceRequest::clusters].
132    ///
133    /// # Example
134    /// ```ignore,no_run
135    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
136    /// use google_cloud_bigtable_admin_v2::model::Cluster;
137    /// let x = CreateInstanceRequest::new().set_clusters([
138    ///     ("key0", Cluster::default()/* use setters */),
139    ///     ("key1", Cluster::default()/* use (different) setters */),
140    /// ]);
141    /// ```
142    pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
143    where
144        T: std::iter::IntoIterator<Item = (K, V)>,
145        K: std::convert::Into<std::string::String>,
146        V: std::convert::Into<crate::model::Cluster>,
147    {
148        use std::iter::Iterator;
149        self.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
150        self
151    }
152}
153
154impl wkt::message::Message for CreateInstanceRequest {
155    fn typename() -> &'static str {
156        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceRequest"
157    }
158}
159
160/// Request message for BigtableInstanceAdmin.GetInstance.
161#[derive(Clone, Default, PartialEq)]
162#[non_exhaustive]
163pub struct GetInstanceRequest {
164    /// Required. The unique name of the requested instance. Values are of the form
165    /// `projects/{project}/instances/{instance}`.
166    pub name: std::string::String,
167
168    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
169}
170
171impl GetInstanceRequest {
172    /// Creates a new default instance.
173    pub fn new() -> Self {
174        std::default::Default::default()
175    }
176
177    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
178    ///
179    /// # Example
180    /// ```ignore,no_run
181    /// # use google_cloud_bigtable_admin_v2::model::GetInstanceRequest;
182    /// # let project_id = "project_id";
183    /// # let instance_id = "instance_id";
184    /// let x = GetInstanceRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
185    /// ```
186    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
187        self.name = v.into();
188        self
189    }
190}
191
192impl wkt::message::Message for GetInstanceRequest {
193    fn typename() -> &'static str {
194        "type.googleapis.com/google.bigtable.admin.v2.GetInstanceRequest"
195    }
196}
197
198/// Request message for BigtableInstanceAdmin.ListInstances.
199#[derive(Clone, Default, PartialEq)]
200#[non_exhaustive]
201pub struct ListInstancesRequest {
202    /// Required. The unique name of the project for which a list of instances is
203    /// requested. Values are of the form `projects/{project}`.
204    pub parent: std::string::String,
205
206    /// DEPRECATED: This field is unused and ignored.
207    pub page_token: std::string::String,
208
209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
210}
211
212impl ListInstancesRequest {
213    /// Creates a new default instance.
214    pub fn new() -> Self {
215        std::default::Default::default()
216    }
217
218    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
219    ///
220    /// # Example
221    /// ```ignore,no_run
222    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
223    /// let x = ListInstancesRequest::new().set_parent("example");
224    /// ```
225    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
226        self.parent = v.into();
227        self
228    }
229
230    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
231    ///
232    /// # Example
233    /// ```ignore,no_run
234    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
235    /// let x = ListInstancesRequest::new().set_page_token("example");
236    /// ```
237    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
238        self.page_token = v.into();
239        self
240    }
241}
242
243impl wkt::message::Message for ListInstancesRequest {
244    fn typename() -> &'static str {
245        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesRequest"
246    }
247}
248
249/// Response message for BigtableInstanceAdmin.ListInstances.
250#[derive(Clone, Default, PartialEq)]
251#[non_exhaustive]
252pub struct ListInstancesResponse {
253    /// The list of requested instances.
254    pub instances: std::vec::Vec<crate::model::Instance>,
255
256    /// Locations from which Instance information could not be retrieved,
257    /// due to an outage or some other transient condition.
258    /// Instances whose Clusters are all in one of the failed locations
259    /// may be missing from `instances`, and Instances with at least one
260    /// Cluster in a failed location may only have partial information returned.
261    /// Values are of the form `projects/<project>/locations/<zone_id>`
262    pub failed_locations: std::vec::Vec<std::string::String>,
263
264    /// DEPRECATED: This field is unused and ignored.
265    pub next_page_token: std::string::String,
266
267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
268}
269
270impl ListInstancesResponse {
271    /// Creates a new default instance.
272    pub fn new() -> Self {
273        std::default::Default::default()
274    }
275
276    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
277    ///
278    /// # Example
279    /// ```ignore,no_run
280    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
281    /// use google_cloud_bigtable_admin_v2::model::Instance;
282    /// let x = ListInstancesResponse::new()
283    ///     .set_instances([
284    ///         Instance::default()/* use setters */,
285    ///         Instance::default()/* use (different) setters */,
286    ///     ]);
287    /// ```
288    pub fn set_instances<T, V>(mut self, v: T) -> Self
289    where
290        T: std::iter::IntoIterator<Item = V>,
291        V: std::convert::Into<crate::model::Instance>,
292    {
293        use std::iter::Iterator;
294        self.instances = v.into_iter().map(|i| i.into()).collect();
295        self
296    }
297
298    /// Sets the value of [failed_locations][crate::model::ListInstancesResponse::failed_locations].
299    ///
300    /// # Example
301    /// ```ignore,no_run
302    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
303    /// let x = ListInstancesResponse::new().set_failed_locations(["a", "b", "c"]);
304    /// ```
305    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
306    where
307        T: std::iter::IntoIterator<Item = V>,
308        V: std::convert::Into<std::string::String>,
309    {
310        use std::iter::Iterator;
311        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
312        self
313    }
314
315    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
316    ///
317    /// # Example
318    /// ```ignore,no_run
319    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
320    /// let x = ListInstancesResponse::new().set_next_page_token("example");
321    /// ```
322    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
323        self.next_page_token = v.into();
324        self
325    }
326}
327
328impl wkt::message::Message for ListInstancesResponse {
329    fn typename() -> &'static str {
330        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesResponse"
331    }
332}
333
334/// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
335#[derive(Clone, Default, PartialEq)]
336#[non_exhaustive]
337pub struct PartialUpdateInstanceRequest {
338    /// Required. The Instance which will (partially) replace the current value.
339    pub instance: std::option::Option<crate::model::Instance>,
340
341    /// Required. The subset of Instance fields which should be replaced.
342    /// Must be explicitly set.
343    pub update_mask: std::option::Option<wkt::FieldMask>,
344
345    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
346}
347
348impl PartialUpdateInstanceRequest {
349    /// Creates a new default instance.
350    pub fn new() -> Self {
351        std::default::Default::default()
352    }
353
354    /// Sets the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
355    ///
356    /// # Example
357    /// ```ignore,no_run
358    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
359    /// use google_cloud_bigtable_admin_v2::model::Instance;
360    /// let x = PartialUpdateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
361    /// ```
362    pub fn set_instance<T>(mut self, v: T) -> Self
363    where
364        T: std::convert::Into<crate::model::Instance>,
365    {
366        self.instance = std::option::Option::Some(v.into());
367        self
368    }
369
370    /// Sets or clears the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
371    ///
372    /// # Example
373    /// ```ignore,no_run
374    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
375    /// use google_cloud_bigtable_admin_v2::model::Instance;
376    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
377    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
378    /// ```
379    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
380    where
381        T: std::convert::Into<crate::model::Instance>,
382    {
383        self.instance = v.map(|x| x.into());
384        self
385    }
386
387    /// Sets the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
388    ///
389    /// # Example
390    /// ```ignore,no_run
391    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
392    /// use wkt::FieldMask;
393    /// let x = PartialUpdateInstanceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
394    /// ```
395    pub fn set_update_mask<T>(mut self, v: T) -> Self
396    where
397        T: std::convert::Into<wkt::FieldMask>,
398    {
399        self.update_mask = std::option::Option::Some(v.into());
400        self
401    }
402
403    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
404    ///
405    /// # Example
406    /// ```ignore,no_run
407    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
408    /// use wkt::FieldMask;
409    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
410    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
411    /// ```
412    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
413    where
414        T: std::convert::Into<wkt::FieldMask>,
415    {
416        self.update_mask = v.map(|x| x.into());
417        self
418    }
419}
420
421impl wkt::message::Message for PartialUpdateInstanceRequest {
422    fn typename() -> &'static str {
423        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateInstanceRequest"
424    }
425}
426
427/// Request message for BigtableInstanceAdmin.DeleteInstance.
428#[derive(Clone, Default, PartialEq)]
429#[non_exhaustive]
430pub struct DeleteInstanceRequest {
431    /// Required. The unique name of the instance to be deleted.
432    /// Values are of the form `projects/{project}/instances/{instance}`.
433    pub name: std::string::String,
434
435    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
436}
437
438impl DeleteInstanceRequest {
439    /// Creates a new default instance.
440    pub fn new() -> Self {
441        std::default::Default::default()
442    }
443
444    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
445    ///
446    /// # Example
447    /// ```ignore,no_run
448    /// # use google_cloud_bigtable_admin_v2::model::DeleteInstanceRequest;
449    /// # let project_id = "project_id";
450    /// # let instance_id = "instance_id";
451    /// let x = DeleteInstanceRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
452    /// ```
453    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
454        self.name = v.into();
455        self
456    }
457}
458
459impl wkt::message::Message for DeleteInstanceRequest {
460    fn typename() -> &'static str {
461        "type.googleapis.com/google.bigtable.admin.v2.DeleteInstanceRequest"
462    }
463}
464
465/// Request message for BigtableInstanceAdmin.CreateCluster.
466#[derive(Clone, Default, PartialEq)]
467#[non_exhaustive]
468pub struct CreateClusterRequest {
469    /// Required. The unique name of the instance in which to create the new
470    /// cluster. Values are of the form `projects/{project}/instances/{instance}`.
471    pub parent: std::string::String,
472
473    /// Required. The ID to be used when referring to the new cluster within its
474    /// instance, e.g., just `mycluster` rather than
475    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
476    pub cluster_id: std::string::String,
477
478    /// Required. The cluster to be created.
479    /// Fields marked `OutputOnly` must be left blank.
480    pub cluster: std::option::Option<crate::model::Cluster>,
481
482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
483}
484
485impl CreateClusterRequest {
486    /// Creates a new default instance.
487    pub fn new() -> Self {
488        std::default::Default::default()
489    }
490
491    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
492    ///
493    /// # Example
494    /// ```ignore,no_run
495    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
496    /// # let project_id = "project_id";
497    /// # let instance_id = "instance_id";
498    /// let x = CreateClusterRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
499    /// ```
500    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
501        self.parent = v.into();
502        self
503    }
504
505    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
506    ///
507    /// # Example
508    /// ```ignore,no_run
509    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
510    /// let x = CreateClusterRequest::new().set_cluster_id("example");
511    /// ```
512    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
513        self.cluster_id = v.into();
514        self
515    }
516
517    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
518    ///
519    /// # Example
520    /// ```ignore,no_run
521    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
522    /// use google_cloud_bigtable_admin_v2::model::Cluster;
523    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
524    /// ```
525    pub fn set_cluster<T>(mut self, v: T) -> Self
526    where
527        T: std::convert::Into<crate::model::Cluster>,
528    {
529        self.cluster = std::option::Option::Some(v.into());
530        self
531    }
532
533    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
534    ///
535    /// # Example
536    /// ```ignore,no_run
537    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
538    /// use google_cloud_bigtable_admin_v2::model::Cluster;
539    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
540    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
541    /// ```
542    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
543    where
544        T: std::convert::Into<crate::model::Cluster>,
545    {
546        self.cluster = v.map(|x| x.into());
547        self
548    }
549}
550
551impl wkt::message::Message for CreateClusterRequest {
552    fn typename() -> &'static str {
553        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterRequest"
554    }
555}
556
557/// Request message for BigtableInstanceAdmin.GetCluster.
558#[derive(Clone, Default, PartialEq)]
559#[non_exhaustive]
560pub struct GetClusterRequest {
561    /// Required. The unique name of the requested cluster. Values are of the form
562    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
563    pub name: std::string::String,
564
565    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
566}
567
568impl GetClusterRequest {
569    /// Creates a new default instance.
570    pub fn new() -> Self {
571        std::default::Default::default()
572    }
573
574    /// Sets the value of [name][crate::model::GetClusterRequest::name].
575    ///
576    /// # Example
577    /// ```ignore,no_run
578    /// # use google_cloud_bigtable_admin_v2::model::GetClusterRequest;
579    /// # let project_id = "project_id";
580    /// # let instance_id = "instance_id";
581    /// # let cluster_id = "cluster_id";
582    /// let x = GetClusterRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
583    /// ```
584    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
585        self.name = v.into();
586        self
587    }
588}
589
590impl wkt::message::Message for GetClusterRequest {
591    fn typename() -> &'static str {
592        "type.googleapis.com/google.bigtable.admin.v2.GetClusterRequest"
593    }
594}
595
596/// Request message for BigtableInstanceAdmin.ListClusters.
597#[derive(Clone, Default, PartialEq)]
598#[non_exhaustive]
599pub struct ListClustersRequest {
600    /// Required. The unique name of the instance for which a list of clusters is
601    /// requested. Values are of the form
602    /// `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
603    /// Clusters for all Instances in a project, e.g.,
604    /// `projects/myproject/instances/-`.
605    pub parent: std::string::String,
606
607    /// DEPRECATED: This field is unused and ignored.
608    pub page_token: std::string::String,
609
610    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
611}
612
613impl ListClustersRequest {
614    /// Creates a new default instance.
615    pub fn new() -> Self {
616        std::default::Default::default()
617    }
618
619    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
620    ///
621    /// # Example
622    /// ```ignore,no_run
623    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
624    /// # let project_id = "project_id";
625    /// # let instance_id = "instance_id";
626    /// let x = ListClustersRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
627    /// ```
628    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
629        self.parent = v.into();
630        self
631    }
632
633    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
634    ///
635    /// # Example
636    /// ```ignore,no_run
637    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
638    /// let x = ListClustersRequest::new().set_page_token("example");
639    /// ```
640    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
641        self.page_token = v.into();
642        self
643    }
644}
645
646impl wkt::message::Message for ListClustersRequest {
647    fn typename() -> &'static str {
648        "type.googleapis.com/google.bigtable.admin.v2.ListClustersRequest"
649    }
650}
651
652/// Response message for BigtableInstanceAdmin.ListClusters.
653#[derive(Clone, Default, PartialEq)]
654#[non_exhaustive]
655pub struct ListClustersResponse {
656    /// The list of requested clusters.
657    pub clusters: std::vec::Vec<crate::model::Cluster>,
658
659    /// Locations from which Cluster information could not be retrieved,
660    /// due to an outage or some other transient condition.
661    /// Clusters from these locations may be missing from `clusters`,
662    /// or may only have partial information returned.
663    /// Values are of the form `projects/<project>/locations/<zone_id>`
664    pub failed_locations: std::vec::Vec<std::string::String>,
665
666    /// DEPRECATED: This field is unused and ignored.
667    pub next_page_token: std::string::String,
668
669    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
670}
671
672impl ListClustersResponse {
673    /// Creates a new default instance.
674    pub fn new() -> Self {
675        std::default::Default::default()
676    }
677
678    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
679    ///
680    /// # Example
681    /// ```ignore,no_run
682    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
683    /// use google_cloud_bigtable_admin_v2::model::Cluster;
684    /// let x = ListClustersResponse::new()
685    ///     .set_clusters([
686    ///         Cluster::default()/* use setters */,
687    ///         Cluster::default()/* use (different) setters */,
688    ///     ]);
689    /// ```
690    pub fn set_clusters<T, V>(mut self, v: T) -> Self
691    where
692        T: std::iter::IntoIterator<Item = V>,
693        V: std::convert::Into<crate::model::Cluster>,
694    {
695        use std::iter::Iterator;
696        self.clusters = v.into_iter().map(|i| i.into()).collect();
697        self
698    }
699
700    /// Sets the value of [failed_locations][crate::model::ListClustersResponse::failed_locations].
701    ///
702    /// # Example
703    /// ```ignore,no_run
704    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
705    /// let x = ListClustersResponse::new().set_failed_locations(["a", "b", "c"]);
706    /// ```
707    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
708    where
709        T: std::iter::IntoIterator<Item = V>,
710        V: std::convert::Into<std::string::String>,
711    {
712        use std::iter::Iterator;
713        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
714        self
715    }
716
717    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
718    ///
719    /// # Example
720    /// ```ignore,no_run
721    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
722    /// let x = ListClustersResponse::new().set_next_page_token("example");
723    /// ```
724    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
725        self.next_page_token = v.into();
726        self
727    }
728}
729
730impl wkt::message::Message for ListClustersResponse {
731    fn typename() -> &'static str {
732        "type.googleapis.com/google.bigtable.admin.v2.ListClustersResponse"
733    }
734}
735
736/// Request message for BigtableInstanceAdmin.DeleteCluster.
737#[derive(Clone, Default, PartialEq)]
738#[non_exhaustive]
739pub struct DeleteClusterRequest {
740    /// Required. The unique name of the cluster to be deleted. Values are of the
741    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
742    pub name: std::string::String,
743
744    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
745}
746
747impl DeleteClusterRequest {
748    /// Creates a new default instance.
749    pub fn new() -> Self {
750        std::default::Default::default()
751    }
752
753    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
754    ///
755    /// # Example
756    /// ```ignore,no_run
757    /// # use google_cloud_bigtable_admin_v2::model::DeleteClusterRequest;
758    /// # let project_id = "project_id";
759    /// # let instance_id = "instance_id";
760    /// # let cluster_id = "cluster_id";
761    /// let x = DeleteClusterRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
762    /// ```
763    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
764        self.name = v.into();
765        self
766    }
767}
768
769impl wkt::message::Message for DeleteClusterRequest {
770    fn typename() -> &'static str {
771        "type.googleapis.com/google.bigtable.admin.v2.DeleteClusterRequest"
772    }
773}
774
775/// The metadata for the Operation returned by CreateInstance.
776#[derive(Clone, Default, PartialEq)]
777#[non_exhaustive]
778pub struct CreateInstanceMetadata {
779    /// The request that prompted the initiation of this CreateInstance operation.
780    pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
781
782    /// The time at which the original request was received.
783    pub request_time: std::option::Option<wkt::Timestamp>,
784
785    /// The time at which the operation failed or was completed successfully.
786    pub finish_time: std::option::Option<wkt::Timestamp>,
787
788    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
789}
790
791impl CreateInstanceMetadata {
792    /// Creates a new default instance.
793    pub fn new() -> Self {
794        std::default::Default::default()
795    }
796
797    /// Sets the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
798    ///
799    /// # Example
800    /// ```ignore,no_run
801    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
802    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
803    /// let x = CreateInstanceMetadata::new().set_original_request(CreateInstanceRequest::default()/* use setters */);
804    /// ```
805    pub fn set_original_request<T>(mut self, v: T) -> Self
806    where
807        T: std::convert::Into<crate::model::CreateInstanceRequest>,
808    {
809        self.original_request = std::option::Option::Some(v.into());
810        self
811    }
812
813    /// Sets or clears the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
814    ///
815    /// # Example
816    /// ```ignore,no_run
817    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
818    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
819    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(Some(CreateInstanceRequest::default()/* use setters */));
820    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(None::<CreateInstanceRequest>);
821    /// ```
822    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
823    where
824        T: std::convert::Into<crate::model::CreateInstanceRequest>,
825    {
826        self.original_request = v.map(|x| x.into());
827        self
828    }
829
830    /// Sets the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
831    ///
832    /// # Example
833    /// ```ignore,no_run
834    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
835    /// use wkt::Timestamp;
836    /// let x = CreateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
837    /// ```
838    pub fn set_request_time<T>(mut self, v: T) -> Self
839    where
840        T: std::convert::Into<wkt::Timestamp>,
841    {
842        self.request_time = std::option::Option::Some(v.into());
843        self
844    }
845
846    /// Sets or clears the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
847    ///
848    /// # Example
849    /// ```ignore,no_run
850    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
851    /// use wkt::Timestamp;
852    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
853    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
854    /// ```
855    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
856    where
857        T: std::convert::Into<wkt::Timestamp>,
858    {
859        self.request_time = v.map(|x| x.into());
860        self
861    }
862
863    /// Sets the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
864    ///
865    /// # Example
866    /// ```ignore,no_run
867    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
868    /// use wkt::Timestamp;
869    /// let x = CreateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
870    /// ```
871    pub fn set_finish_time<T>(mut self, v: T) -> Self
872    where
873        T: std::convert::Into<wkt::Timestamp>,
874    {
875        self.finish_time = std::option::Option::Some(v.into());
876        self
877    }
878
879    /// Sets or clears the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
880    ///
881    /// # Example
882    /// ```ignore,no_run
883    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
884    /// use wkt::Timestamp;
885    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
886    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
887    /// ```
888    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
889    where
890        T: std::convert::Into<wkt::Timestamp>,
891    {
892        self.finish_time = v.map(|x| x.into());
893        self
894    }
895}
896
897impl wkt::message::Message for CreateInstanceMetadata {
898    fn typename() -> &'static str {
899        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceMetadata"
900    }
901}
902
903/// The metadata for the Operation returned by UpdateInstance.
904#[derive(Clone, Default, PartialEq)]
905#[non_exhaustive]
906pub struct UpdateInstanceMetadata {
907    /// The request that prompted the initiation of this UpdateInstance operation.
908    pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
909
910    /// The time at which the original request was received.
911    pub request_time: std::option::Option<wkt::Timestamp>,
912
913    /// The time at which the operation failed or was completed successfully.
914    pub finish_time: std::option::Option<wkt::Timestamp>,
915
916    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
917}
918
919impl UpdateInstanceMetadata {
920    /// Creates a new default instance.
921    pub fn new() -> Self {
922        std::default::Default::default()
923    }
924
925    /// Sets the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
926    ///
927    /// # Example
928    /// ```ignore,no_run
929    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
930    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
931    /// let x = UpdateInstanceMetadata::new().set_original_request(PartialUpdateInstanceRequest::default()/* use setters */);
932    /// ```
933    pub fn set_original_request<T>(mut self, v: T) -> Self
934    where
935        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
936    {
937        self.original_request = std::option::Option::Some(v.into());
938        self
939    }
940
941    /// Sets or clears the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
942    ///
943    /// # Example
944    /// ```ignore,no_run
945    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
946    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
947    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(Some(PartialUpdateInstanceRequest::default()/* use setters */));
948    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(None::<PartialUpdateInstanceRequest>);
949    /// ```
950    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
951    where
952        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
953    {
954        self.original_request = v.map(|x| x.into());
955        self
956    }
957
958    /// Sets the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
959    ///
960    /// # Example
961    /// ```ignore,no_run
962    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
963    /// use wkt::Timestamp;
964    /// let x = UpdateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
965    /// ```
966    pub fn set_request_time<T>(mut self, v: T) -> Self
967    where
968        T: std::convert::Into<wkt::Timestamp>,
969    {
970        self.request_time = std::option::Option::Some(v.into());
971        self
972    }
973
974    /// Sets or clears the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
975    ///
976    /// # Example
977    /// ```ignore,no_run
978    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
979    /// use wkt::Timestamp;
980    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
981    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
982    /// ```
983    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
984    where
985        T: std::convert::Into<wkt::Timestamp>,
986    {
987        self.request_time = v.map(|x| x.into());
988        self
989    }
990
991    /// Sets the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
992    ///
993    /// # Example
994    /// ```ignore,no_run
995    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
996    /// use wkt::Timestamp;
997    /// let x = UpdateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
998    /// ```
999    pub fn set_finish_time<T>(mut self, v: T) -> Self
1000    where
1001        T: std::convert::Into<wkt::Timestamp>,
1002    {
1003        self.finish_time = std::option::Option::Some(v.into());
1004        self
1005    }
1006
1007    /// Sets or clears the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
1008    ///
1009    /// # Example
1010    /// ```ignore,no_run
1011    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
1012    /// use wkt::Timestamp;
1013    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1014    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1015    /// ```
1016    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1017    where
1018        T: std::convert::Into<wkt::Timestamp>,
1019    {
1020        self.finish_time = v.map(|x| x.into());
1021        self
1022    }
1023}
1024
1025impl wkt::message::Message for UpdateInstanceMetadata {
1026    fn typename() -> &'static str {
1027        "type.googleapis.com/google.bigtable.admin.v2.UpdateInstanceMetadata"
1028    }
1029}
1030
1031/// The metadata for the Operation returned by CreateCluster.
1032#[derive(Clone, Default, PartialEq)]
1033#[non_exhaustive]
1034pub struct CreateClusterMetadata {
1035    /// The request that prompted the initiation of this CreateCluster operation.
1036    pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
1037
1038    /// The time at which the original request was received.
1039    pub request_time: std::option::Option<wkt::Timestamp>,
1040
1041    /// The time at which the operation failed or was completed successfully.
1042    pub finish_time: std::option::Option<wkt::Timestamp>,
1043
1044    /// Keys: the full `name` of each table that existed in the instance when
1045    /// CreateCluster was first called, i.e.
1046    /// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
1047    /// to the instance by a later API call will be created in the new cluster by
1048    /// that API call, not this one.
1049    ///
1050    /// Values: information on how much of a table's data has been copied to the
1051    /// newly-created cluster so far.
1052    pub tables: std::collections::HashMap<
1053        std::string::String,
1054        crate::model::create_cluster_metadata::TableProgress,
1055    >,
1056
1057    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1058}
1059
1060impl CreateClusterMetadata {
1061    /// Creates a new default instance.
1062    pub fn new() -> Self {
1063        std::default::Default::default()
1064    }
1065
1066    /// Sets the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1067    ///
1068    /// # Example
1069    /// ```ignore,no_run
1070    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1071    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1072    /// let x = CreateClusterMetadata::new().set_original_request(CreateClusterRequest::default()/* use setters */);
1073    /// ```
1074    pub fn set_original_request<T>(mut self, v: T) -> Self
1075    where
1076        T: std::convert::Into<crate::model::CreateClusterRequest>,
1077    {
1078        self.original_request = std::option::Option::Some(v.into());
1079        self
1080    }
1081
1082    /// Sets or clears the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1083    ///
1084    /// # Example
1085    /// ```ignore,no_run
1086    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1087    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1088    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(Some(CreateClusterRequest::default()/* use setters */));
1089    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(None::<CreateClusterRequest>);
1090    /// ```
1091    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1092    where
1093        T: std::convert::Into<crate::model::CreateClusterRequest>,
1094    {
1095        self.original_request = v.map(|x| x.into());
1096        self
1097    }
1098
1099    /// Sets the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1100    ///
1101    /// # Example
1102    /// ```ignore,no_run
1103    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1104    /// use wkt::Timestamp;
1105    /// let x = CreateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1106    /// ```
1107    pub fn set_request_time<T>(mut self, v: T) -> Self
1108    where
1109        T: std::convert::Into<wkt::Timestamp>,
1110    {
1111        self.request_time = std::option::Option::Some(v.into());
1112        self
1113    }
1114
1115    /// Sets or clears the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1116    ///
1117    /// # Example
1118    /// ```ignore,no_run
1119    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1120    /// use wkt::Timestamp;
1121    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1122    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1123    /// ```
1124    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1125    where
1126        T: std::convert::Into<wkt::Timestamp>,
1127    {
1128        self.request_time = v.map(|x| x.into());
1129        self
1130    }
1131
1132    /// Sets the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1133    ///
1134    /// # Example
1135    /// ```ignore,no_run
1136    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1137    /// use wkt::Timestamp;
1138    /// let x = CreateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1139    /// ```
1140    pub fn set_finish_time<T>(mut self, v: T) -> Self
1141    where
1142        T: std::convert::Into<wkt::Timestamp>,
1143    {
1144        self.finish_time = std::option::Option::Some(v.into());
1145        self
1146    }
1147
1148    /// Sets or clears the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1149    ///
1150    /// # Example
1151    /// ```ignore,no_run
1152    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1153    /// use wkt::Timestamp;
1154    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1155    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1156    /// ```
1157    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1158    where
1159        T: std::convert::Into<wkt::Timestamp>,
1160    {
1161        self.finish_time = v.map(|x| x.into());
1162        self
1163    }
1164
1165    /// Sets the value of [tables][crate::model::CreateClusterMetadata::tables].
1166    ///
1167    /// # Example
1168    /// ```ignore,no_run
1169    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1170    /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1171    /// let x = CreateClusterMetadata::new().set_tables([
1172    ///     ("key0", TableProgress::default()/* use setters */),
1173    ///     ("key1", TableProgress::default()/* use (different) setters */),
1174    /// ]);
1175    /// ```
1176    pub fn set_tables<T, K, V>(mut self, v: T) -> Self
1177    where
1178        T: std::iter::IntoIterator<Item = (K, V)>,
1179        K: std::convert::Into<std::string::String>,
1180        V: std::convert::Into<crate::model::create_cluster_metadata::TableProgress>,
1181    {
1182        use std::iter::Iterator;
1183        self.tables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1184        self
1185    }
1186}
1187
1188impl wkt::message::Message for CreateClusterMetadata {
1189    fn typename() -> &'static str {
1190        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata"
1191    }
1192}
1193
1194/// Defines additional types related to [CreateClusterMetadata].
1195pub mod create_cluster_metadata {
1196    #[allow(unused_imports)]
1197    use super::*;
1198
1199    /// Progress info for copying a table's data to the new cluster.
1200    #[derive(Clone, Default, PartialEq)]
1201    #[non_exhaustive]
1202    pub struct TableProgress {
1203        /// Estimate of the size of the table to be copied.
1204        pub estimated_size_bytes: i64,
1205
1206        /// Estimate of the number of bytes copied so far for this table.
1207        /// This will eventually reach 'estimated_size_bytes' unless the table copy
1208        /// is CANCELLED.
1209        pub estimated_copied_bytes: i64,
1210
1211        #[allow(missing_docs)]
1212        pub state: crate::model::create_cluster_metadata::table_progress::State,
1213
1214        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1215    }
1216
1217    impl TableProgress {
1218        /// Creates a new default instance.
1219        pub fn new() -> Self {
1220            std::default::Default::default()
1221        }
1222
1223        /// Sets the value of [estimated_size_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_size_bytes].
1224        ///
1225        /// # Example
1226        /// ```ignore,no_run
1227        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1228        /// let x = TableProgress::new().set_estimated_size_bytes(42);
1229        /// ```
1230        pub fn set_estimated_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1231            self.estimated_size_bytes = v.into();
1232            self
1233        }
1234
1235        /// Sets the value of [estimated_copied_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_copied_bytes].
1236        ///
1237        /// # Example
1238        /// ```ignore,no_run
1239        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1240        /// let x = TableProgress::new().set_estimated_copied_bytes(42);
1241        /// ```
1242        pub fn set_estimated_copied_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1243            self.estimated_copied_bytes = v.into();
1244            self
1245        }
1246
1247        /// Sets the value of [state][crate::model::create_cluster_metadata::TableProgress::state].
1248        ///
1249        /// # Example
1250        /// ```ignore,no_run
1251        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1252        /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::table_progress::State;
1253        /// let x0 = TableProgress::new().set_state(State::Pending);
1254        /// let x1 = TableProgress::new().set_state(State::Copying);
1255        /// let x2 = TableProgress::new().set_state(State::Completed);
1256        /// ```
1257        pub fn set_state<
1258            T: std::convert::Into<crate::model::create_cluster_metadata::table_progress::State>,
1259        >(
1260            mut self,
1261            v: T,
1262        ) -> Self {
1263            self.state = v.into();
1264            self
1265        }
1266    }
1267
1268    impl wkt::message::Message for TableProgress {
1269        fn typename() -> &'static str {
1270            "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"
1271        }
1272    }
1273
1274    /// Defines additional types related to [TableProgress].
1275    pub mod table_progress {
1276        #[allow(unused_imports)]
1277        use super::*;
1278
1279        /// Enum for [State].
1280        ///
1281        /// # Working with unknown values
1282        ///
1283        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1284        /// additional enum variants at any time. Adding new variants is not considered
1285        /// a breaking change. Applications should write their code in anticipation of:
1286        ///
1287        /// - New values appearing in future releases of the client library, **and**
1288        /// - New values received dynamically, without application changes.
1289        ///
1290        /// Please consult the [Working with enums] section in the user guide for some
1291        /// guidelines.
1292        ///
1293        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1294        #[derive(Clone, Debug, PartialEq)]
1295        #[non_exhaustive]
1296        pub enum State {
1297            #[allow(missing_docs)]
1298            Unspecified,
1299            /// The table has not yet begun copying to the new cluster.
1300            Pending,
1301            /// The table is actively being copied to the new cluster.
1302            Copying,
1303            /// The table has been fully copied to the new cluster.
1304            Completed,
1305            /// The table was deleted before it finished copying to the new cluster.
1306            /// Note that tables deleted after completion will stay marked as
1307            /// COMPLETED, not CANCELLED.
1308            Cancelled,
1309            /// If set, the enum was initialized with an unknown value.
1310            ///
1311            /// Applications can examine the value using [State::value] or
1312            /// [State::name].
1313            UnknownValue(state::UnknownValue),
1314        }
1315
1316        #[doc(hidden)]
1317        pub mod state {
1318            #[allow(unused_imports)]
1319            use super::*;
1320            #[derive(Clone, Debug, PartialEq)]
1321            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1322        }
1323
1324        impl State {
1325            /// Gets the enum value.
1326            ///
1327            /// Returns `None` if the enum contains an unknown value deserialized from
1328            /// the string representation of enums.
1329            pub fn value(&self) -> std::option::Option<i32> {
1330                match self {
1331                    Self::Unspecified => std::option::Option::Some(0),
1332                    Self::Pending => std::option::Option::Some(1),
1333                    Self::Copying => std::option::Option::Some(2),
1334                    Self::Completed => std::option::Option::Some(3),
1335                    Self::Cancelled => std::option::Option::Some(4),
1336                    Self::UnknownValue(u) => u.0.value(),
1337                }
1338            }
1339
1340            /// Gets the enum value as a string.
1341            ///
1342            /// Returns `None` if the enum contains an unknown value deserialized from
1343            /// the integer representation of enums.
1344            pub fn name(&self) -> std::option::Option<&str> {
1345                match self {
1346                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1347                    Self::Pending => std::option::Option::Some("PENDING"),
1348                    Self::Copying => std::option::Option::Some("COPYING"),
1349                    Self::Completed => std::option::Option::Some("COMPLETED"),
1350                    Self::Cancelled => std::option::Option::Some("CANCELLED"),
1351                    Self::UnknownValue(u) => u.0.name(),
1352                }
1353            }
1354        }
1355
1356        impl std::default::Default for State {
1357            fn default() -> Self {
1358                use std::convert::From;
1359                Self::from(0)
1360            }
1361        }
1362
1363        impl std::fmt::Display for State {
1364            fn fmt(
1365                &self,
1366                f: &mut std::fmt::Formatter<'_>,
1367            ) -> std::result::Result<(), std::fmt::Error> {
1368                wkt::internal::display_enum(f, self.name(), self.value())
1369            }
1370        }
1371
1372        impl std::convert::From<i32> for State {
1373            fn from(value: i32) -> Self {
1374                match value {
1375                    0 => Self::Unspecified,
1376                    1 => Self::Pending,
1377                    2 => Self::Copying,
1378                    3 => Self::Completed,
1379                    4 => Self::Cancelled,
1380                    _ => Self::UnknownValue(state::UnknownValue(
1381                        wkt::internal::UnknownEnumValue::Integer(value),
1382                    )),
1383                }
1384            }
1385        }
1386
1387        impl std::convert::From<&str> for State {
1388            fn from(value: &str) -> Self {
1389                use std::string::ToString;
1390                match value {
1391                    "STATE_UNSPECIFIED" => Self::Unspecified,
1392                    "PENDING" => Self::Pending,
1393                    "COPYING" => Self::Copying,
1394                    "COMPLETED" => Self::Completed,
1395                    "CANCELLED" => Self::Cancelled,
1396                    _ => Self::UnknownValue(state::UnknownValue(
1397                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1398                    )),
1399                }
1400            }
1401        }
1402
1403        impl serde::ser::Serialize for State {
1404            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1405            where
1406                S: serde::Serializer,
1407            {
1408                match self {
1409                    Self::Unspecified => serializer.serialize_i32(0),
1410                    Self::Pending => serializer.serialize_i32(1),
1411                    Self::Copying => serializer.serialize_i32(2),
1412                    Self::Completed => serializer.serialize_i32(3),
1413                    Self::Cancelled => serializer.serialize_i32(4),
1414                    Self::UnknownValue(u) => u.0.serialize(serializer),
1415                }
1416            }
1417        }
1418
1419        impl<'de> serde::de::Deserialize<'de> for State {
1420            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1421            where
1422                D: serde::Deserializer<'de>,
1423            {
1424                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1425                    ".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State",
1426                ))
1427            }
1428        }
1429    }
1430}
1431
1432/// The metadata for the Operation returned by UpdateCluster.
1433#[derive(Clone, Default, PartialEq)]
1434#[non_exhaustive]
1435pub struct UpdateClusterMetadata {
1436    /// The request that prompted the initiation of this UpdateCluster operation.
1437    pub original_request: std::option::Option<crate::model::Cluster>,
1438
1439    /// The time at which the original request was received.
1440    pub request_time: std::option::Option<wkt::Timestamp>,
1441
1442    /// The time at which the operation failed or was completed successfully.
1443    pub finish_time: std::option::Option<wkt::Timestamp>,
1444
1445    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1446}
1447
1448impl UpdateClusterMetadata {
1449    /// Creates a new default instance.
1450    pub fn new() -> Self {
1451        std::default::Default::default()
1452    }
1453
1454    /// Sets the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1455    ///
1456    /// # Example
1457    /// ```ignore,no_run
1458    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1459    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1460    /// let x = UpdateClusterMetadata::new().set_original_request(Cluster::default()/* use setters */);
1461    /// ```
1462    pub fn set_original_request<T>(mut self, v: T) -> Self
1463    where
1464        T: std::convert::Into<crate::model::Cluster>,
1465    {
1466        self.original_request = std::option::Option::Some(v.into());
1467        self
1468    }
1469
1470    /// Sets or clears the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1471    ///
1472    /// # Example
1473    /// ```ignore,no_run
1474    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1475    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1476    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(Some(Cluster::default()/* use setters */));
1477    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(None::<Cluster>);
1478    /// ```
1479    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1480    where
1481        T: std::convert::Into<crate::model::Cluster>,
1482    {
1483        self.original_request = v.map(|x| x.into());
1484        self
1485    }
1486
1487    /// Sets the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1488    ///
1489    /// # Example
1490    /// ```ignore,no_run
1491    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1492    /// use wkt::Timestamp;
1493    /// let x = UpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1494    /// ```
1495    pub fn set_request_time<T>(mut self, v: T) -> Self
1496    where
1497        T: std::convert::Into<wkt::Timestamp>,
1498    {
1499        self.request_time = std::option::Option::Some(v.into());
1500        self
1501    }
1502
1503    /// Sets or clears the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1504    ///
1505    /// # Example
1506    /// ```ignore,no_run
1507    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1508    /// use wkt::Timestamp;
1509    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1510    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1511    /// ```
1512    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1513    where
1514        T: std::convert::Into<wkt::Timestamp>,
1515    {
1516        self.request_time = v.map(|x| x.into());
1517        self
1518    }
1519
1520    /// Sets the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1521    ///
1522    /// # Example
1523    /// ```ignore,no_run
1524    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1525    /// use wkt::Timestamp;
1526    /// let x = UpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1527    /// ```
1528    pub fn set_finish_time<T>(mut self, v: T) -> Self
1529    where
1530        T: std::convert::Into<wkt::Timestamp>,
1531    {
1532        self.finish_time = std::option::Option::Some(v.into());
1533        self
1534    }
1535
1536    /// Sets or clears the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1537    ///
1538    /// # Example
1539    /// ```ignore,no_run
1540    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1541    /// use wkt::Timestamp;
1542    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1543    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1544    /// ```
1545    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1546    where
1547        T: std::convert::Into<wkt::Timestamp>,
1548    {
1549        self.finish_time = v.map(|x| x.into());
1550        self
1551    }
1552}
1553
1554impl wkt::message::Message for UpdateClusterMetadata {
1555    fn typename() -> &'static str {
1556        "type.googleapis.com/google.bigtable.admin.v2.UpdateClusterMetadata"
1557    }
1558}
1559
1560/// The metadata for the Operation returned by PartialUpdateCluster.
1561#[derive(Clone, Default, PartialEq)]
1562#[non_exhaustive]
1563pub struct PartialUpdateClusterMetadata {
1564    /// The time at which the original request was received.
1565    pub request_time: std::option::Option<wkt::Timestamp>,
1566
1567    /// The time at which the operation failed or was completed successfully.
1568    pub finish_time: std::option::Option<wkt::Timestamp>,
1569
1570    /// The original request for PartialUpdateCluster.
1571    pub original_request: std::option::Option<crate::model::PartialUpdateClusterRequest>,
1572
1573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1574}
1575
1576impl PartialUpdateClusterMetadata {
1577    /// Creates a new default instance.
1578    pub fn new() -> Self {
1579        std::default::Default::default()
1580    }
1581
1582    /// Sets the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1583    ///
1584    /// # Example
1585    /// ```ignore,no_run
1586    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1587    /// use wkt::Timestamp;
1588    /// let x = PartialUpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1589    /// ```
1590    pub fn set_request_time<T>(mut self, v: T) -> Self
1591    where
1592        T: std::convert::Into<wkt::Timestamp>,
1593    {
1594        self.request_time = std::option::Option::Some(v.into());
1595        self
1596    }
1597
1598    /// Sets or clears the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1599    ///
1600    /// # Example
1601    /// ```ignore,no_run
1602    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1603    /// use wkt::Timestamp;
1604    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1605    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1606    /// ```
1607    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1608    where
1609        T: std::convert::Into<wkt::Timestamp>,
1610    {
1611        self.request_time = v.map(|x| x.into());
1612        self
1613    }
1614
1615    /// Sets the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1616    ///
1617    /// # Example
1618    /// ```ignore,no_run
1619    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1620    /// use wkt::Timestamp;
1621    /// let x = PartialUpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1622    /// ```
1623    pub fn set_finish_time<T>(mut self, v: T) -> Self
1624    where
1625        T: std::convert::Into<wkt::Timestamp>,
1626    {
1627        self.finish_time = std::option::Option::Some(v.into());
1628        self
1629    }
1630
1631    /// Sets or clears the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1632    ///
1633    /// # Example
1634    /// ```ignore,no_run
1635    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1636    /// use wkt::Timestamp;
1637    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1638    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1639    /// ```
1640    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1641    where
1642        T: std::convert::Into<wkt::Timestamp>,
1643    {
1644        self.finish_time = v.map(|x| x.into());
1645        self
1646    }
1647
1648    /// Sets the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1649    ///
1650    /// # Example
1651    /// ```ignore,no_run
1652    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1653    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1654    /// let x = PartialUpdateClusterMetadata::new().set_original_request(PartialUpdateClusterRequest::default()/* use setters */);
1655    /// ```
1656    pub fn set_original_request<T>(mut self, v: T) -> Self
1657    where
1658        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1659    {
1660        self.original_request = std::option::Option::Some(v.into());
1661        self
1662    }
1663
1664    /// Sets or clears the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1665    ///
1666    /// # Example
1667    /// ```ignore,no_run
1668    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1669    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1670    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(Some(PartialUpdateClusterRequest::default()/* use setters */));
1671    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(None::<PartialUpdateClusterRequest>);
1672    /// ```
1673    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1674    where
1675        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1676    {
1677        self.original_request = v.map(|x| x.into());
1678        self
1679    }
1680}
1681
1682impl wkt::message::Message for PartialUpdateClusterMetadata {
1683    fn typename() -> &'static str {
1684        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterMetadata"
1685    }
1686}
1687
1688/// Request message for BigtableInstanceAdmin.PartialUpdateCluster.
1689#[derive(Clone, Default, PartialEq)]
1690#[non_exhaustive]
1691pub struct PartialUpdateClusterRequest {
1692    /// Required. The Cluster which contains the partial updates to be applied,
1693    /// subject to the update_mask.
1694    pub cluster: std::option::Option<crate::model::Cluster>,
1695
1696    /// Required. The subset of Cluster fields which should be replaced.
1697    pub update_mask: std::option::Option<wkt::FieldMask>,
1698
1699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1700}
1701
1702impl PartialUpdateClusterRequest {
1703    /// Creates a new default instance.
1704    pub fn new() -> Self {
1705        std::default::Default::default()
1706    }
1707
1708    /// Sets the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1709    ///
1710    /// # Example
1711    /// ```ignore,no_run
1712    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1713    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1714    /// let x = PartialUpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1715    /// ```
1716    pub fn set_cluster<T>(mut self, v: T) -> Self
1717    where
1718        T: std::convert::Into<crate::model::Cluster>,
1719    {
1720        self.cluster = std::option::Option::Some(v.into());
1721        self
1722    }
1723
1724    /// Sets or clears the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1725    ///
1726    /// # Example
1727    /// ```ignore,no_run
1728    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1729    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1730    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1731    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1732    /// ```
1733    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1734    where
1735        T: std::convert::Into<crate::model::Cluster>,
1736    {
1737        self.cluster = v.map(|x| x.into());
1738        self
1739    }
1740
1741    /// Sets the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1742    ///
1743    /// # Example
1744    /// ```ignore,no_run
1745    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1746    /// use wkt::FieldMask;
1747    /// let x = PartialUpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1748    /// ```
1749    pub fn set_update_mask<T>(mut self, v: T) -> Self
1750    where
1751        T: std::convert::Into<wkt::FieldMask>,
1752    {
1753        self.update_mask = std::option::Option::Some(v.into());
1754        self
1755    }
1756
1757    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1758    ///
1759    /// # Example
1760    /// ```ignore,no_run
1761    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1762    /// use wkt::FieldMask;
1763    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1764    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1765    /// ```
1766    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1767    where
1768        T: std::convert::Into<wkt::FieldMask>,
1769    {
1770        self.update_mask = v.map(|x| x.into());
1771        self
1772    }
1773}
1774
1775impl wkt::message::Message for PartialUpdateClusterRequest {
1776    fn typename() -> &'static str {
1777        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterRequest"
1778    }
1779}
1780
1781/// Request message for BigtableInstanceAdmin.UpdateMemoryLayer.
1782#[derive(Clone, Default, PartialEq)]
1783#[non_exhaustive]
1784pub struct UpdateMemoryLayerRequest {
1785    /// Required. The memory layer to update.
1786    ///
1787    /// The memory layer's `name` format is as follows:
1788    /// `projects/{project}/instances/{instance}/clusters/{cluster}/memoryLayer`.
1789    pub memory_layer: std::option::Option<crate::model::MemoryLayer>,
1790
1791    /// Optional. The list of fields to update.
1792    pub update_mask: std::option::Option<wkt::FieldMask>,
1793
1794    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1795}
1796
1797impl UpdateMemoryLayerRequest {
1798    /// Creates a new default instance.
1799    pub fn new() -> Self {
1800        std::default::Default::default()
1801    }
1802
1803    /// Sets the value of [memory_layer][crate::model::UpdateMemoryLayerRequest::memory_layer].
1804    ///
1805    /// # Example
1806    /// ```ignore,no_run
1807    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerRequest;
1808    /// use google_cloud_bigtable_admin_v2::model::MemoryLayer;
1809    /// let x = UpdateMemoryLayerRequest::new().set_memory_layer(MemoryLayer::default()/* use setters */);
1810    /// ```
1811    pub fn set_memory_layer<T>(mut self, v: T) -> Self
1812    where
1813        T: std::convert::Into<crate::model::MemoryLayer>,
1814    {
1815        self.memory_layer = std::option::Option::Some(v.into());
1816        self
1817    }
1818
1819    /// Sets or clears the value of [memory_layer][crate::model::UpdateMemoryLayerRequest::memory_layer].
1820    ///
1821    /// # Example
1822    /// ```ignore,no_run
1823    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerRequest;
1824    /// use google_cloud_bigtable_admin_v2::model::MemoryLayer;
1825    /// let x = UpdateMemoryLayerRequest::new().set_or_clear_memory_layer(Some(MemoryLayer::default()/* use setters */));
1826    /// let x = UpdateMemoryLayerRequest::new().set_or_clear_memory_layer(None::<MemoryLayer>);
1827    /// ```
1828    pub fn set_or_clear_memory_layer<T>(mut self, v: std::option::Option<T>) -> Self
1829    where
1830        T: std::convert::Into<crate::model::MemoryLayer>,
1831    {
1832        self.memory_layer = v.map(|x| x.into());
1833        self
1834    }
1835
1836    /// Sets the value of [update_mask][crate::model::UpdateMemoryLayerRequest::update_mask].
1837    ///
1838    /// # Example
1839    /// ```ignore,no_run
1840    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerRequest;
1841    /// use wkt::FieldMask;
1842    /// let x = UpdateMemoryLayerRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1843    /// ```
1844    pub fn set_update_mask<T>(mut self, v: T) -> Self
1845    where
1846        T: std::convert::Into<wkt::FieldMask>,
1847    {
1848        self.update_mask = std::option::Option::Some(v.into());
1849        self
1850    }
1851
1852    /// Sets or clears the value of [update_mask][crate::model::UpdateMemoryLayerRequest::update_mask].
1853    ///
1854    /// # Example
1855    /// ```ignore,no_run
1856    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerRequest;
1857    /// use wkt::FieldMask;
1858    /// let x = UpdateMemoryLayerRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1859    /// let x = UpdateMemoryLayerRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1860    /// ```
1861    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1862    where
1863        T: std::convert::Into<wkt::FieldMask>,
1864    {
1865        self.update_mask = v.map(|x| x.into());
1866        self
1867    }
1868}
1869
1870impl wkt::message::Message for UpdateMemoryLayerRequest {
1871    fn typename() -> &'static str {
1872        "type.googleapis.com/google.bigtable.admin.v2.UpdateMemoryLayerRequest"
1873    }
1874}
1875
1876/// The metadata for the Operation returned by UpdateMemoryLayer.
1877#[derive(Clone, Default, PartialEq)]
1878#[non_exhaustive]
1879pub struct UpdateMemoryLayerMetadata {
1880    /// The request that prompted the initiation of this UpdateMemoryLayer
1881    /// operation.
1882    pub original_request: std::option::Option<crate::model::UpdateMemoryLayerRequest>,
1883
1884    /// The time at which the original request was received.
1885    pub request_time: std::option::Option<wkt::Timestamp>,
1886
1887    /// The time at which the operation failed or was completed successfully.
1888    pub finish_time: std::option::Option<wkt::Timestamp>,
1889
1890    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1891}
1892
1893impl UpdateMemoryLayerMetadata {
1894    /// Creates a new default instance.
1895    pub fn new() -> Self {
1896        std::default::Default::default()
1897    }
1898
1899    /// Sets the value of [original_request][crate::model::UpdateMemoryLayerMetadata::original_request].
1900    ///
1901    /// # Example
1902    /// ```ignore,no_run
1903    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerMetadata;
1904    /// use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerRequest;
1905    /// let x = UpdateMemoryLayerMetadata::new().set_original_request(UpdateMemoryLayerRequest::default()/* use setters */);
1906    /// ```
1907    pub fn set_original_request<T>(mut self, v: T) -> Self
1908    where
1909        T: std::convert::Into<crate::model::UpdateMemoryLayerRequest>,
1910    {
1911        self.original_request = std::option::Option::Some(v.into());
1912        self
1913    }
1914
1915    /// Sets or clears the value of [original_request][crate::model::UpdateMemoryLayerMetadata::original_request].
1916    ///
1917    /// # Example
1918    /// ```ignore,no_run
1919    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerMetadata;
1920    /// use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerRequest;
1921    /// let x = UpdateMemoryLayerMetadata::new().set_or_clear_original_request(Some(UpdateMemoryLayerRequest::default()/* use setters */));
1922    /// let x = UpdateMemoryLayerMetadata::new().set_or_clear_original_request(None::<UpdateMemoryLayerRequest>);
1923    /// ```
1924    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1925    where
1926        T: std::convert::Into<crate::model::UpdateMemoryLayerRequest>,
1927    {
1928        self.original_request = v.map(|x| x.into());
1929        self
1930    }
1931
1932    /// Sets the value of [request_time][crate::model::UpdateMemoryLayerMetadata::request_time].
1933    ///
1934    /// # Example
1935    /// ```ignore,no_run
1936    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerMetadata;
1937    /// use wkt::Timestamp;
1938    /// let x = UpdateMemoryLayerMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1939    /// ```
1940    pub fn set_request_time<T>(mut self, v: T) -> Self
1941    where
1942        T: std::convert::Into<wkt::Timestamp>,
1943    {
1944        self.request_time = std::option::Option::Some(v.into());
1945        self
1946    }
1947
1948    /// Sets or clears the value of [request_time][crate::model::UpdateMemoryLayerMetadata::request_time].
1949    ///
1950    /// # Example
1951    /// ```ignore,no_run
1952    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerMetadata;
1953    /// use wkt::Timestamp;
1954    /// let x = UpdateMemoryLayerMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1955    /// let x = UpdateMemoryLayerMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1956    /// ```
1957    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1958    where
1959        T: std::convert::Into<wkt::Timestamp>,
1960    {
1961        self.request_time = v.map(|x| x.into());
1962        self
1963    }
1964
1965    /// Sets the value of [finish_time][crate::model::UpdateMemoryLayerMetadata::finish_time].
1966    ///
1967    /// # Example
1968    /// ```ignore,no_run
1969    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerMetadata;
1970    /// use wkt::Timestamp;
1971    /// let x = UpdateMemoryLayerMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1972    /// ```
1973    pub fn set_finish_time<T>(mut self, v: T) -> Self
1974    where
1975        T: std::convert::Into<wkt::Timestamp>,
1976    {
1977        self.finish_time = std::option::Option::Some(v.into());
1978        self
1979    }
1980
1981    /// Sets or clears the value of [finish_time][crate::model::UpdateMemoryLayerMetadata::finish_time].
1982    ///
1983    /// # Example
1984    /// ```ignore,no_run
1985    /// # use google_cloud_bigtable_admin_v2::model::UpdateMemoryLayerMetadata;
1986    /// use wkt::Timestamp;
1987    /// let x = UpdateMemoryLayerMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1988    /// let x = UpdateMemoryLayerMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1989    /// ```
1990    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1991    where
1992        T: std::convert::Into<wkt::Timestamp>,
1993    {
1994        self.finish_time = v.map(|x| x.into());
1995        self
1996    }
1997}
1998
1999impl wkt::message::Message for UpdateMemoryLayerMetadata {
2000    fn typename() -> &'static str {
2001        "type.googleapis.com/google.bigtable.admin.v2.UpdateMemoryLayerMetadata"
2002    }
2003}
2004
2005/// Request message for BigtableInstanceAdmin.ListMemoryLayers.
2006#[derive(Clone, Default, PartialEq)]
2007#[non_exhaustive]
2008pub struct ListMemoryLayersRequest {
2009    /// Required. The unique name of the cluster for which a list of memory layers
2010    /// is requested. Values are of the form
2011    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
2012    /// Use `{cluster} = '-'` to list MemoryLayers for all Clusters in an instance,
2013    /// e.g., `projects/myproject/instances/myinstance/clusters/-`.
2014    pub parent: std::string::String,
2015
2016    /// Optional. The maximum number of memory layers to return. The service may
2017    /// return fewer than this value.
2018    pub page_size: i32,
2019
2020    /// Optional. A page token, received from a previous `ListMemoryLayers` call.
2021    /// Provide this to retrieve the subsequent page.
2022    ///
2023    /// When paginating, all other parameters provided to `ListMemoryLayers`
2024    /// must match the call that provided the page token.
2025    pub page_token: std::string::String,
2026
2027    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2028}
2029
2030impl ListMemoryLayersRequest {
2031    /// Creates a new default instance.
2032    pub fn new() -> Self {
2033        std::default::Default::default()
2034    }
2035
2036    /// Sets the value of [parent][crate::model::ListMemoryLayersRequest::parent].
2037    ///
2038    /// # Example
2039    /// ```ignore,no_run
2040    /// # use google_cloud_bigtable_admin_v2::model::ListMemoryLayersRequest;
2041    /// # let project_id = "project_id";
2042    /// # let instance_id = "instance_id";
2043    /// # let cluster_id = "cluster_id";
2044    /// let x = ListMemoryLayersRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
2045    /// ```
2046    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2047        self.parent = v.into();
2048        self
2049    }
2050
2051    /// Sets the value of [page_size][crate::model::ListMemoryLayersRequest::page_size].
2052    ///
2053    /// # Example
2054    /// ```ignore,no_run
2055    /// # use google_cloud_bigtable_admin_v2::model::ListMemoryLayersRequest;
2056    /// let x = ListMemoryLayersRequest::new().set_page_size(42);
2057    /// ```
2058    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2059        self.page_size = v.into();
2060        self
2061    }
2062
2063    /// Sets the value of [page_token][crate::model::ListMemoryLayersRequest::page_token].
2064    ///
2065    /// # Example
2066    /// ```ignore,no_run
2067    /// # use google_cloud_bigtable_admin_v2::model::ListMemoryLayersRequest;
2068    /// let x = ListMemoryLayersRequest::new().set_page_token("example");
2069    /// ```
2070    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2071        self.page_token = v.into();
2072        self
2073    }
2074}
2075
2076impl wkt::message::Message for ListMemoryLayersRequest {
2077    fn typename() -> &'static str {
2078        "type.googleapis.com/google.bigtable.admin.v2.ListMemoryLayersRequest"
2079    }
2080}
2081
2082/// Response message for BigtableInstanceAdmin.ListMemoryLayers.
2083#[derive(Clone, Default, PartialEq)]
2084#[non_exhaustive]
2085pub struct ListMemoryLayersResponse {
2086    /// The list of requested memory layers.
2087    pub memory_layers: std::vec::Vec<crate::model::MemoryLayer>,
2088
2089    /// Locations from which MemoryLayer information could not be retrieved,
2090    /// due to an outage or some other transient condition.
2091    /// MemoryLayers from these locations may be missing from `memory_layers`,
2092    /// or may only have partial information returned.
2093    /// Values are of the form `projects/<project>/locations/<zone_id>`
2094    pub failed_locations: std::vec::Vec<std::string::String>,
2095
2096    /// A token, which can be sent as `page_token` to retrieve the next page.
2097    /// If this field is omitted, there are no subsequent pages.
2098    pub next_page_token: std::string::String,
2099
2100    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2101}
2102
2103impl ListMemoryLayersResponse {
2104    /// Creates a new default instance.
2105    pub fn new() -> Self {
2106        std::default::Default::default()
2107    }
2108
2109    /// Sets the value of [memory_layers][crate::model::ListMemoryLayersResponse::memory_layers].
2110    ///
2111    /// # Example
2112    /// ```ignore,no_run
2113    /// # use google_cloud_bigtable_admin_v2::model::ListMemoryLayersResponse;
2114    /// use google_cloud_bigtable_admin_v2::model::MemoryLayer;
2115    /// let x = ListMemoryLayersResponse::new()
2116    ///     .set_memory_layers([
2117    ///         MemoryLayer::default()/* use setters */,
2118    ///         MemoryLayer::default()/* use (different) setters */,
2119    ///     ]);
2120    /// ```
2121    pub fn set_memory_layers<T, V>(mut self, v: T) -> Self
2122    where
2123        T: std::iter::IntoIterator<Item = V>,
2124        V: std::convert::Into<crate::model::MemoryLayer>,
2125    {
2126        use std::iter::Iterator;
2127        self.memory_layers = v.into_iter().map(|i| i.into()).collect();
2128        self
2129    }
2130
2131    /// Sets the value of [failed_locations][crate::model::ListMemoryLayersResponse::failed_locations].
2132    ///
2133    /// # Example
2134    /// ```ignore,no_run
2135    /// # use google_cloud_bigtable_admin_v2::model::ListMemoryLayersResponse;
2136    /// let x = ListMemoryLayersResponse::new().set_failed_locations(["a", "b", "c"]);
2137    /// ```
2138    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
2139    where
2140        T: std::iter::IntoIterator<Item = V>,
2141        V: std::convert::Into<std::string::String>,
2142    {
2143        use std::iter::Iterator;
2144        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
2145        self
2146    }
2147
2148    /// Sets the value of [next_page_token][crate::model::ListMemoryLayersResponse::next_page_token].
2149    ///
2150    /// # Example
2151    /// ```ignore,no_run
2152    /// # use google_cloud_bigtable_admin_v2::model::ListMemoryLayersResponse;
2153    /// let x = ListMemoryLayersResponse::new().set_next_page_token("example");
2154    /// ```
2155    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2156        self.next_page_token = v.into();
2157        self
2158    }
2159}
2160
2161impl wkt::message::Message for ListMemoryLayersResponse {
2162    fn typename() -> &'static str {
2163        "type.googleapis.com/google.bigtable.admin.v2.ListMemoryLayersResponse"
2164    }
2165}
2166
2167#[doc(hidden)]
2168impl google_cloud_gax::paginator::internal::PageableResponse for ListMemoryLayersResponse {
2169    type PageItem = crate::model::MemoryLayer;
2170
2171    fn items(self) -> std::vec::Vec<Self::PageItem> {
2172        self.memory_layers
2173    }
2174
2175    fn next_page_token(&self) -> std::string::String {
2176        use std::clone::Clone;
2177        self.next_page_token.clone()
2178    }
2179}
2180
2181/// Request message for BigtableInstanceAdmin.GetMemoryLayer.
2182#[derive(Clone, Default, PartialEq)]
2183#[non_exhaustive]
2184pub struct GetMemoryLayerRequest {
2185    /// Required. The unique name of the requested cluster's memory layer. Values
2186    /// are of the form
2187    /// `projects/{project}/instances/{instance}/clusters/{cluster}/memoryLayer`.
2188    pub name: std::string::String,
2189
2190    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2191}
2192
2193impl GetMemoryLayerRequest {
2194    /// Creates a new default instance.
2195    pub fn new() -> Self {
2196        std::default::Default::default()
2197    }
2198
2199    /// Sets the value of [name][crate::model::GetMemoryLayerRequest::name].
2200    ///
2201    /// # Example
2202    /// ```ignore,no_run
2203    /// # use google_cloud_bigtable_admin_v2::model::GetMemoryLayerRequest;
2204    /// # let project_id = "project_id";
2205    /// # let instance_id = "instance_id";
2206    /// # let cluster_id = "cluster_id";
2207    /// let x = GetMemoryLayerRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/memoryLayer"));
2208    /// ```
2209    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2210        self.name = v.into();
2211        self
2212    }
2213}
2214
2215impl wkt::message::Message for GetMemoryLayerRequest {
2216    fn typename() -> &'static str {
2217        "type.googleapis.com/google.bigtable.admin.v2.GetMemoryLayerRequest"
2218    }
2219}
2220
2221/// Request message for BigtableInstanceAdmin.CreateAppProfile.
2222#[derive(Clone, Default, PartialEq)]
2223#[non_exhaustive]
2224pub struct CreateAppProfileRequest {
2225    /// Required. The unique name of the instance in which to create the new app
2226    /// profile. Values are of the form `projects/{project}/instances/{instance}`.
2227    pub parent: std::string::String,
2228
2229    /// Required. The ID to be used when referring to the new app profile within
2230    /// its instance, e.g., just `myprofile` rather than
2231    /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
2232    pub app_profile_id: std::string::String,
2233
2234    /// Required. The app profile to be created.
2235    /// Fields marked `OutputOnly` will be ignored.
2236    pub app_profile: std::option::Option<crate::model::AppProfile>,
2237
2238    /// If true, ignore safety checks when creating the app profile.
2239    pub ignore_warnings: bool,
2240
2241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2242}
2243
2244impl CreateAppProfileRequest {
2245    /// Creates a new default instance.
2246    pub fn new() -> Self {
2247        std::default::Default::default()
2248    }
2249
2250    /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
2251    ///
2252    /// # Example
2253    /// ```ignore,no_run
2254    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
2255    /// # let project_id = "project_id";
2256    /// # let instance_id = "instance_id";
2257    /// let x = CreateAppProfileRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
2258    /// ```
2259    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2260        self.parent = v.into();
2261        self
2262    }
2263
2264    /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
2265    ///
2266    /// # Example
2267    /// ```ignore,no_run
2268    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
2269    /// let x = CreateAppProfileRequest::new().set_app_profile_id("example");
2270    /// ```
2271    pub fn set_app_profile_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2272        self.app_profile_id = v.into();
2273        self
2274    }
2275
2276    /// Sets the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
2277    ///
2278    /// # Example
2279    /// ```ignore,no_run
2280    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
2281    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2282    /// let x = CreateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
2283    /// ```
2284    pub fn set_app_profile<T>(mut self, v: T) -> Self
2285    where
2286        T: std::convert::Into<crate::model::AppProfile>,
2287    {
2288        self.app_profile = std::option::Option::Some(v.into());
2289        self
2290    }
2291
2292    /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
2293    ///
2294    /// # Example
2295    /// ```ignore,no_run
2296    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
2297    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2298    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
2299    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
2300    /// ```
2301    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2302    where
2303        T: std::convert::Into<crate::model::AppProfile>,
2304    {
2305        self.app_profile = v.map(|x| x.into());
2306        self
2307    }
2308
2309    /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
2310    ///
2311    /// # Example
2312    /// ```ignore,no_run
2313    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
2314    /// let x = CreateAppProfileRequest::new().set_ignore_warnings(true);
2315    /// ```
2316    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2317        self.ignore_warnings = v.into();
2318        self
2319    }
2320}
2321
2322impl wkt::message::Message for CreateAppProfileRequest {
2323    fn typename() -> &'static str {
2324        "type.googleapis.com/google.bigtable.admin.v2.CreateAppProfileRequest"
2325    }
2326}
2327
2328/// Request message for BigtableInstanceAdmin.GetAppProfile.
2329#[derive(Clone, Default, PartialEq)]
2330#[non_exhaustive]
2331pub struct GetAppProfileRequest {
2332    /// Required. The unique name of the requested app profile. Values are of the
2333    /// form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
2334    pub name: std::string::String,
2335
2336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2337}
2338
2339impl GetAppProfileRequest {
2340    /// Creates a new default instance.
2341    pub fn new() -> Self {
2342        std::default::Default::default()
2343    }
2344
2345    /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
2346    ///
2347    /// # Example
2348    /// ```ignore,no_run
2349    /// # use google_cloud_bigtable_admin_v2::model::GetAppProfileRequest;
2350    /// # let project_id = "project_id";
2351    /// # let instance_id = "instance_id";
2352    /// # let app_profile_id = "app_profile_id";
2353    /// let x = GetAppProfileRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
2354    /// ```
2355    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2356        self.name = v.into();
2357        self
2358    }
2359}
2360
2361impl wkt::message::Message for GetAppProfileRequest {
2362    fn typename() -> &'static str {
2363        "type.googleapis.com/google.bigtable.admin.v2.GetAppProfileRequest"
2364    }
2365}
2366
2367/// Request message for BigtableInstanceAdmin.ListAppProfiles.
2368#[derive(Clone, Default, PartialEq)]
2369#[non_exhaustive]
2370pub struct ListAppProfilesRequest {
2371    /// Required. The unique name of the instance for which a list of app profiles
2372    /// is requested. Values are of the form
2373    /// `projects/{project}/instances/{instance}`.
2374    /// Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
2375    /// e.g., `projects/myproject/instances/-`.
2376    pub parent: std::string::String,
2377
2378    /// Maximum number of results per page.
2379    ///
2380    /// A page_size of zero lets the server choose the number of items to return.
2381    /// A page_size which is strictly positive will return at most that many items.
2382    /// A negative page_size will cause an error.
2383    ///
2384    /// Following the first request, subsequent paginated calls are not required
2385    /// to pass a page_size. If a page_size is set in subsequent calls, it must
2386    /// match the page_size given in the first request.
2387    pub page_size: i32,
2388
2389    /// The value of `next_page_token` returned by a previous call.
2390    pub page_token: std::string::String,
2391
2392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2393}
2394
2395impl ListAppProfilesRequest {
2396    /// Creates a new default instance.
2397    pub fn new() -> Self {
2398        std::default::Default::default()
2399    }
2400
2401    /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
2402    ///
2403    /// # Example
2404    /// ```ignore,no_run
2405    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
2406    /// # let project_id = "project_id";
2407    /// # let instance_id = "instance_id";
2408    /// let x = ListAppProfilesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
2409    /// ```
2410    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2411        self.parent = v.into();
2412        self
2413    }
2414
2415    /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
2416    ///
2417    /// # Example
2418    /// ```ignore,no_run
2419    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
2420    /// let x = ListAppProfilesRequest::new().set_page_size(42);
2421    /// ```
2422    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2423        self.page_size = v.into();
2424        self
2425    }
2426
2427    /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
2428    ///
2429    /// # Example
2430    /// ```ignore,no_run
2431    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
2432    /// let x = ListAppProfilesRequest::new().set_page_token("example");
2433    /// ```
2434    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2435        self.page_token = v.into();
2436        self
2437    }
2438}
2439
2440impl wkt::message::Message for ListAppProfilesRequest {
2441    fn typename() -> &'static str {
2442        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesRequest"
2443    }
2444}
2445
2446/// Response message for BigtableInstanceAdmin.ListAppProfiles.
2447#[derive(Clone, Default, PartialEq)]
2448#[non_exhaustive]
2449pub struct ListAppProfilesResponse {
2450    /// The list of requested app profiles.
2451    pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
2452
2453    /// Set if not all app profiles could be returned in a single response.
2454    /// Pass this value to `page_token` in another request to get the next
2455    /// page of results.
2456    pub next_page_token: std::string::String,
2457
2458    /// Locations from which AppProfile information could not be retrieved,
2459    /// due to an outage or some other transient condition.
2460    /// AppProfiles from these locations may be missing from `app_profiles`.
2461    /// Values are of the form `projects/<project>/locations/<zone_id>`
2462    pub failed_locations: std::vec::Vec<std::string::String>,
2463
2464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2465}
2466
2467impl ListAppProfilesResponse {
2468    /// Creates a new default instance.
2469    pub fn new() -> Self {
2470        std::default::Default::default()
2471    }
2472
2473    /// Sets the value of [app_profiles][crate::model::ListAppProfilesResponse::app_profiles].
2474    ///
2475    /// # Example
2476    /// ```ignore,no_run
2477    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2478    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2479    /// let x = ListAppProfilesResponse::new()
2480    ///     .set_app_profiles([
2481    ///         AppProfile::default()/* use setters */,
2482    ///         AppProfile::default()/* use (different) setters */,
2483    ///     ]);
2484    /// ```
2485    pub fn set_app_profiles<T, V>(mut self, v: T) -> Self
2486    where
2487        T: std::iter::IntoIterator<Item = V>,
2488        V: std::convert::Into<crate::model::AppProfile>,
2489    {
2490        use std::iter::Iterator;
2491        self.app_profiles = v.into_iter().map(|i| i.into()).collect();
2492        self
2493    }
2494
2495    /// Sets the value of [next_page_token][crate::model::ListAppProfilesResponse::next_page_token].
2496    ///
2497    /// # Example
2498    /// ```ignore,no_run
2499    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2500    /// let x = ListAppProfilesResponse::new().set_next_page_token("example");
2501    /// ```
2502    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2503        self.next_page_token = v.into();
2504        self
2505    }
2506
2507    /// Sets the value of [failed_locations][crate::model::ListAppProfilesResponse::failed_locations].
2508    ///
2509    /// # Example
2510    /// ```ignore,no_run
2511    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2512    /// let x = ListAppProfilesResponse::new().set_failed_locations(["a", "b", "c"]);
2513    /// ```
2514    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
2515    where
2516        T: std::iter::IntoIterator<Item = V>,
2517        V: std::convert::Into<std::string::String>,
2518    {
2519        use std::iter::Iterator;
2520        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
2521        self
2522    }
2523}
2524
2525impl wkt::message::Message for ListAppProfilesResponse {
2526    fn typename() -> &'static str {
2527        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesResponse"
2528    }
2529}
2530
2531#[doc(hidden)]
2532impl google_cloud_gax::paginator::internal::PageableResponse for ListAppProfilesResponse {
2533    type PageItem = crate::model::AppProfile;
2534
2535    fn items(self) -> std::vec::Vec<Self::PageItem> {
2536        self.app_profiles
2537    }
2538
2539    fn next_page_token(&self) -> std::string::String {
2540        use std::clone::Clone;
2541        self.next_page_token.clone()
2542    }
2543}
2544
2545/// Request message for BigtableInstanceAdmin.UpdateAppProfile.
2546#[derive(Clone, Default, PartialEq)]
2547#[non_exhaustive]
2548pub struct UpdateAppProfileRequest {
2549    /// Required. The app profile which will (partially) replace the current value.
2550    pub app_profile: std::option::Option<crate::model::AppProfile>,
2551
2552    /// Required. The subset of app profile fields which should be replaced.
2553    /// If unset, all fields will be replaced.
2554    pub update_mask: std::option::Option<wkt::FieldMask>,
2555
2556    /// If true, ignore safety checks when updating the app profile.
2557    pub ignore_warnings: bool,
2558
2559    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2560}
2561
2562impl UpdateAppProfileRequest {
2563    /// Creates a new default instance.
2564    pub fn new() -> Self {
2565        std::default::Default::default()
2566    }
2567
2568    /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2569    ///
2570    /// # Example
2571    /// ```ignore,no_run
2572    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2573    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2574    /// let x = UpdateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
2575    /// ```
2576    pub fn set_app_profile<T>(mut self, v: T) -> Self
2577    where
2578        T: std::convert::Into<crate::model::AppProfile>,
2579    {
2580        self.app_profile = std::option::Option::Some(v.into());
2581        self
2582    }
2583
2584    /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2585    ///
2586    /// # Example
2587    /// ```ignore,no_run
2588    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2589    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2590    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
2591    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
2592    /// ```
2593    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2594    where
2595        T: std::convert::Into<crate::model::AppProfile>,
2596    {
2597        self.app_profile = v.map(|x| x.into());
2598        self
2599    }
2600
2601    /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2602    ///
2603    /// # Example
2604    /// ```ignore,no_run
2605    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2606    /// use wkt::FieldMask;
2607    /// let x = UpdateAppProfileRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2608    /// ```
2609    pub fn set_update_mask<T>(mut self, v: T) -> Self
2610    where
2611        T: std::convert::Into<wkt::FieldMask>,
2612    {
2613        self.update_mask = std::option::Option::Some(v.into());
2614        self
2615    }
2616
2617    /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2618    ///
2619    /// # Example
2620    /// ```ignore,no_run
2621    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2622    /// use wkt::FieldMask;
2623    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2624    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2625    /// ```
2626    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2627    where
2628        T: std::convert::Into<wkt::FieldMask>,
2629    {
2630        self.update_mask = v.map(|x| x.into());
2631        self
2632    }
2633
2634    /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
2635    ///
2636    /// # Example
2637    /// ```ignore,no_run
2638    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2639    /// let x = UpdateAppProfileRequest::new().set_ignore_warnings(true);
2640    /// ```
2641    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2642        self.ignore_warnings = v.into();
2643        self
2644    }
2645}
2646
2647impl wkt::message::Message for UpdateAppProfileRequest {
2648    fn typename() -> &'static str {
2649        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileRequest"
2650    }
2651}
2652
2653/// Request message for BigtableInstanceAdmin.DeleteAppProfile.
2654#[derive(Clone, Default, PartialEq)]
2655#[non_exhaustive]
2656pub struct DeleteAppProfileRequest {
2657    /// Required. The unique name of the app profile to be deleted. Values are of
2658    /// the form
2659    /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
2660    pub name: std::string::String,
2661
2662    /// Required. If true, ignore safety checks when deleting the app profile.
2663    pub ignore_warnings: bool,
2664
2665    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2666}
2667
2668impl DeleteAppProfileRequest {
2669    /// Creates a new default instance.
2670    pub fn new() -> Self {
2671        std::default::Default::default()
2672    }
2673
2674    /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
2675    ///
2676    /// # Example
2677    /// ```ignore,no_run
2678    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2679    /// # let project_id = "project_id";
2680    /// # let instance_id = "instance_id";
2681    /// # let app_profile_id = "app_profile_id";
2682    /// let x = DeleteAppProfileRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
2683    /// ```
2684    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2685        self.name = v.into();
2686        self
2687    }
2688
2689    /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
2690    ///
2691    /// # Example
2692    /// ```ignore,no_run
2693    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2694    /// let x = DeleteAppProfileRequest::new().set_ignore_warnings(true);
2695    /// ```
2696    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2697        self.ignore_warnings = v.into();
2698        self
2699    }
2700}
2701
2702impl wkt::message::Message for DeleteAppProfileRequest {
2703    fn typename() -> &'static str {
2704        "type.googleapis.com/google.bigtable.admin.v2.DeleteAppProfileRequest"
2705    }
2706}
2707
2708/// The metadata for the Operation returned by UpdateAppProfile.
2709#[derive(Clone, Default, PartialEq)]
2710#[non_exhaustive]
2711pub struct UpdateAppProfileMetadata {
2712    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2713}
2714
2715impl UpdateAppProfileMetadata {
2716    /// Creates a new default instance.
2717    pub fn new() -> Self {
2718        std::default::Default::default()
2719    }
2720}
2721
2722impl wkt::message::Message for UpdateAppProfileMetadata {
2723    fn typename() -> &'static str {
2724        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileMetadata"
2725    }
2726}
2727
2728/// Request message for BigtableInstanceAdmin.ListHotTablets.
2729#[derive(Clone, Default, PartialEq)]
2730#[non_exhaustive]
2731pub struct ListHotTabletsRequest {
2732    /// Required. The cluster name to list hot tablets.
2733    /// Value is in the following form:
2734    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
2735    pub parent: std::string::String,
2736
2737    /// The start time to list hot tablets. The hot tablets in the response will
2738    /// have start times between the requested start time and end time. Start time
2739    /// defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2740    /// it is unset. The start time should be less than the end time, and the
2741    /// maximum allowed time range between start time and end time is 48 hours.
2742    /// Start time and end time should have values between Now and Now - 14 days.
2743    pub start_time: std::option::Option<wkt::Timestamp>,
2744
2745    /// The end time to list hot tablets.
2746    pub end_time: std::option::Option<wkt::Timestamp>,
2747
2748    /// Maximum number of results per page.
2749    ///
2750    /// A page_size that is empty or zero lets the server choose the number of
2751    /// items to return. A page_size which is strictly positive will return at most
2752    /// that many items. A negative page_size will cause an error.
2753    ///
2754    /// Following the first request, subsequent paginated calls do not need a
2755    /// page_size field. If a page_size is set in subsequent calls, it must match
2756    /// the page_size given in the first request.
2757    pub page_size: i32,
2758
2759    /// The value of `next_page_token` returned by a previous call.
2760    pub page_token: std::string::String,
2761
2762    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2763}
2764
2765impl ListHotTabletsRequest {
2766    /// Creates a new default instance.
2767    pub fn new() -> Self {
2768        std::default::Default::default()
2769    }
2770
2771    /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
2772    ///
2773    /// # Example
2774    /// ```ignore,no_run
2775    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2776    /// # let project_id = "project_id";
2777    /// # let instance_id = "instance_id";
2778    /// # let cluster_id = "cluster_id";
2779    /// let x = ListHotTabletsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
2780    /// ```
2781    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2782        self.parent = v.into();
2783        self
2784    }
2785
2786    /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2787    ///
2788    /// # Example
2789    /// ```ignore,no_run
2790    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2791    /// use wkt::Timestamp;
2792    /// let x = ListHotTabletsRequest::new().set_start_time(Timestamp::default()/* use setters */);
2793    /// ```
2794    pub fn set_start_time<T>(mut self, v: T) -> Self
2795    where
2796        T: std::convert::Into<wkt::Timestamp>,
2797    {
2798        self.start_time = std::option::Option::Some(v.into());
2799        self
2800    }
2801
2802    /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2803    ///
2804    /// # Example
2805    /// ```ignore,no_run
2806    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2807    /// use wkt::Timestamp;
2808    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2809    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(None::<Timestamp>);
2810    /// ```
2811    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2812    where
2813        T: std::convert::Into<wkt::Timestamp>,
2814    {
2815        self.start_time = v.map(|x| x.into());
2816        self
2817    }
2818
2819    /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2820    ///
2821    /// # Example
2822    /// ```ignore,no_run
2823    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2824    /// use wkt::Timestamp;
2825    /// let x = ListHotTabletsRequest::new().set_end_time(Timestamp::default()/* use setters */);
2826    /// ```
2827    pub fn set_end_time<T>(mut self, v: T) -> Self
2828    where
2829        T: std::convert::Into<wkt::Timestamp>,
2830    {
2831        self.end_time = std::option::Option::Some(v.into());
2832        self
2833    }
2834
2835    /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2836    ///
2837    /// # Example
2838    /// ```ignore,no_run
2839    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2840    /// use wkt::Timestamp;
2841    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2842    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(None::<Timestamp>);
2843    /// ```
2844    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2845    where
2846        T: std::convert::Into<wkt::Timestamp>,
2847    {
2848        self.end_time = v.map(|x| x.into());
2849        self
2850    }
2851
2852    /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
2853    ///
2854    /// # Example
2855    /// ```ignore,no_run
2856    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2857    /// let x = ListHotTabletsRequest::new().set_page_size(42);
2858    /// ```
2859    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2860        self.page_size = v.into();
2861        self
2862    }
2863
2864    /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
2865    ///
2866    /// # Example
2867    /// ```ignore,no_run
2868    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2869    /// let x = ListHotTabletsRequest::new().set_page_token("example");
2870    /// ```
2871    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2872        self.page_token = v.into();
2873        self
2874    }
2875}
2876
2877impl wkt::message::Message for ListHotTabletsRequest {
2878    fn typename() -> &'static str {
2879        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsRequest"
2880    }
2881}
2882
2883/// Response message for BigtableInstanceAdmin.ListHotTablets.
2884#[derive(Clone, Default, PartialEq)]
2885#[non_exhaustive]
2886pub struct ListHotTabletsResponse {
2887    /// List of hot tablets in the tables of the requested cluster that fall
2888    /// within the requested time range. Hot tablets are ordered by node cpu usage
2889    /// percent. If there are multiple hot tablets that correspond to the same
2890    /// tablet within a 15-minute interval, only the hot tablet with the highest
2891    /// node cpu usage will be included in the response.
2892    pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
2893
2894    /// Set if not all hot tablets could be returned in a single response.
2895    /// Pass this value to `page_token` in another request to get the next
2896    /// page of results.
2897    pub next_page_token: std::string::String,
2898
2899    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2900}
2901
2902impl ListHotTabletsResponse {
2903    /// Creates a new default instance.
2904    pub fn new() -> Self {
2905        std::default::Default::default()
2906    }
2907
2908    /// Sets the value of [hot_tablets][crate::model::ListHotTabletsResponse::hot_tablets].
2909    ///
2910    /// # Example
2911    /// ```ignore,no_run
2912    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2913    /// use google_cloud_bigtable_admin_v2::model::HotTablet;
2914    /// let x = ListHotTabletsResponse::new()
2915    ///     .set_hot_tablets([
2916    ///         HotTablet::default()/* use setters */,
2917    ///         HotTablet::default()/* use (different) setters */,
2918    ///     ]);
2919    /// ```
2920    pub fn set_hot_tablets<T, V>(mut self, v: T) -> Self
2921    where
2922        T: std::iter::IntoIterator<Item = V>,
2923        V: std::convert::Into<crate::model::HotTablet>,
2924    {
2925        use std::iter::Iterator;
2926        self.hot_tablets = v.into_iter().map(|i| i.into()).collect();
2927        self
2928    }
2929
2930    /// Sets the value of [next_page_token][crate::model::ListHotTabletsResponse::next_page_token].
2931    ///
2932    /// # Example
2933    /// ```ignore,no_run
2934    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2935    /// let x = ListHotTabletsResponse::new().set_next_page_token("example");
2936    /// ```
2937    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2938        self.next_page_token = v.into();
2939        self
2940    }
2941}
2942
2943impl wkt::message::Message for ListHotTabletsResponse {
2944    fn typename() -> &'static str {
2945        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsResponse"
2946    }
2947}
2948
2949#[doc(hidden)]
2950impl google_cloud_gax::paginator::internal::PageableResponse for ListHotTabletsResponse {
2951    type PageItem = crate::model::HotTablet;
2952
2953    fn items(self) -> std::vec::Vec<Self::PageItem> {
2954        self.hot_tablets
2955    }
2956
2957    fn next_page_token(&self) -> std::string::String {
2958        use std::clone::Clone;
2959        self.next_page_token.clone()
2960    }
2961}
2962
2963/// Request message for BigtableInstanceAdmin.CreateLogicalView.
2964#[derive(Clone, Default, PartialEq)]
2965#[non_exhaustive]
2966pub struct CreateLogicalViewRequest {
2967    /// Required. The parent instance where this logical view will be created.
2968    /// Format: `projects/{project}/instances/{instance}`.
2969    pub parent: std::string::String,
2970
2971    /// Required. The ID to use for the logical view, which will become the final
2972    /// component of the logical view's resource name.
2973    pub logical_view_id: std::string::String,
2974
2975    /// Required. The logical view to create.
2976    pub logical_view: std::option::Option<crate::model::LogicalView>,
2977
2978    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2979}
2980
2981impl CreateLogicalViewRequest {
2982    /// Creates a new default instance.
2983    pub fn new() -> Self {
2984        std::default::Default::default()
2985    }
2986
2987    /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
2988    ///
2989    /// # Example
2990    /// ```ignore,no_run
2991    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2992    /// # let project_id = "project_id";
2993    /// # let instance_id = "instance_id";
2994    /// let x = CreateLogicalViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
2995    /// ```
2996    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2997        self.parent = v.into();
2998        self
2999    }
3000
3001    /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
3002    ///
3003    /// # Example
3004    /// ```ignore,no_run
3005    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
3006    /// let x = CreateLogicalViewRequest::new().set_logical_view_id("example");
3007    /// ```
3008    pub fn set_logical_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3009        self.logical_view_id = v.into();
3010        self
3011    }
3012
3013    /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
3014    ///
3015    /// # Example
3016    /// ```ignore,no_run
3017    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
3018    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
3019    /// let x = CreateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
3020    /// ```
3021    pub fn set_logical_view<T>(mut self, v: T) -> Self
3022    where
3023        T: std::convert::Into<crate::model::LogicalView>,
3024    {
3025        self.logical_view = std::option::Option::Some(v.into());
3026        self
3027    }
3028
3029    /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
3030    ///
3031    /// # Example
3032    /// ```ignore,no_run
3033    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
3034    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
3035    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
3036    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
3037    /// ```
3038    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
3039    where
3040        T: std::convert::Into<crate::model::LogicalView>,
3041    {
3042        self.logical_view = v.map(|x| x.into());
3043        self
3044    }
3045}
3046
3047impl wkt::message::Message for CreateLogicalViewRequest {
3048    fn typename() -> &'static str {
3049        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewRequest"
3050    }
3051}
3052
3053/// The metadata for the Operation returned by CreateLogicalView.
3054#[derive(Clone, Default, PartialEq)]
3055#[non_exhaustive]
3056pub struct CreateLogicalViewMetadata {
3057    /// The request that prompted the initiation of this CreateLogicalView
3058    /// operation.
3059    pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
3060
3061    /// The time at which this operation started.
3062    pub start_time: std::option::Option<wkt::Timestamp>,
3063
3064    /// If set, the time at which this operation finished or was canceled.
3065    pub end_time: std::option::Option<wkt::Timestamp>,
3066
3067    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3068}
3069
3070impl CreateLogicalViewMetadata {
3071    /// Creates a new default instance.
3072    pub fn new() -> Self {
3073        std::default::Default::default()
3074    }
3075
3076    /// Sets the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
3077    ///
3078    /// # Example
3079    /// ```ignore,no_run
3080    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
3081    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
3082    /// let x = CreateLogicalViewMetadata::new().set_original_request(CreateLogicalViewRequest::default()/* use setters */);
3083    /// ```
3084    pub fn set_original_request<T>(mut self, v: T) -> Self
3085    where
3086        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
3087    {
3088        self.original_request = std::option::Option::Some(v.into());
3089        self
3090    }
3091
3092    /// Sets or clears the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
3093    ///
3094    /// # Example
3095    /// ```ignore,no_run
3096    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
3097    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
3098    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(Some(CreateLogicalViewRequest::default()/* use setters */));
3099    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(None::<CreateLogicalViewRequest>);
3100    /// ```
3101    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3102    where
3103        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
3104    {
3105        self.original_request = v.map(|x| x.into());
3106        self
3107    }
3108
3109    /// Sets the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
3110    ///
3111    /// # Example
3112    /// ```ignore,no_run
3113    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
3114    /// use wkt::Timestamp;
3115    /// let x = CreateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3116    /// ```
3117    pub fn set_start_time<T>(mut self, v: T) -> Self
3118    where
3119        T: std::convert::Into<wkt::Timestamp>,
3120    {
3121        self.start_time = std::option::Option::Some(v.into());
3122        self
3123    }
3124
3125    /// Sets or clears the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
3126    ///
3127    /// # Example
3128    /// ```ignore,no_run
3129    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
3130    /// use wkt::Timestamp;
3131    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3132    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3133    /// ```
3134    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3135    where
3136        T: std::convert::Into<wkt::Timestamp>,
3137    {
3138        self.start_time = v.map(|x| x.into());
3139        self
3140    }
3141
3142    /// Sets the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
3143    ///
3144    /// # Example
3145    /// ```ignore,no_run
3146    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
3147    /// use wkt::Timestamp;
3148    /// let x = CreateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3149    /// ```
3150    pub fn set_end_time<T>(mut self, v: T) -> Self
3151    where
3152        T: std::convert::Into<wkt::Timestamp>,
3153    {
3154        self.end_time = std::option::Option::Some(v.into());
3155        self
3156    }
3157
3158    /// Sets or clears the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
3159    ///
3160    /// # Example
3161    /// ```ignore,no_run
3162    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
3163    /// use wkt::Timestamp;
3164    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3165    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3166    /// ```
3167    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3168    where
3169        T: std::convert::Into<wkt::Timestamp>,
3170    {
3171        self.end_time = v.map(|x| x.into());
3172        self
3173    }
3174}
3175
3176impl wkt::message::Message for CreateLogicalViewMetadata {
3177    fn typename() -> &'static str {
3178        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewMetadata"
3179    }
3180}
3181
3182/// Request message for BigtableInstanceAdmin.GetLogicalView.
3183#[derive(Clone, Default, PartialEq)]
3184#[non_exhaustive]
3185pub struct GetLogicalViewRequest {
3186    /// Required. The unique name of the requested logical view. Values are of the
3187    /// form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3188    pub name: std::string::String,
3189
3190    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3191}
3192
3193impl GetLogicalViewRequest {
3194    /// Creates a new default instance.
3195    pub fn new() -> Self {
3196        std::default::Default::default()
3197    }
3198
3199    /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
3200    ///
3201    /// # Example
3202    /// ```ignore,no_run
3203    /// # use google_cloud_bigtable_admin_v2::model::GetLogicalViewRequest;
3204    /// # let project_id = "project_id";
3205    /// # let instance_id = "instance_id";
3206    /// # let logical_view_id = "logical_view_id";
3207    /// let x = GetLogicalViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
3208    /// ```
3209    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3210        self.name = v.into();
3211        self
3212    }
3213}
3214
3215impl wkt::message::Message for GetLogicalViewRequest {
3216    fn typename() -> &'static str {
3217        "type.googleapis.com/google.bigtable.admin.v2.GetLogicalViewRequest"
3218    }
3219}
3220
3221/// Request message for BigtableInstanceAdmin.ListLogicalViews.
3222#[derive(Clone, Default, PartialEq)]
3223#[non_exhaustive]
3224pub struct ListLogicalViewsRequest {
3225    /// Required. The unique name of the instance for which the list of logical
3226    /// views is requested. Values are of the form
3227    /// `projects/{project}/instances/{instance}`.
3228    pub parent: std::string::String,
3229
3230    /// Optional. The maximum number of logical views to return. The service may
3231    /// return fewer than this value
3232    pub page_size: i32,
3233
3234    /// Optional. A page token, received from a previous `ListLogicalViews` call.
3235    /// Provide this to retrieve the subsequent page.
3236    ///
3237    /// When paginating, all other parameters provided to `ListLogicalViews` must
3238    /// match the call that provided the page token.
3239    pub page_token: std::string::String,
3240
3241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3242}
3243
3244impl ListLogicalViewsRequest {
3245    /// Creates a new default instance.
3246    pub fn new() -> Self {
3247        std::default::Default::default()
3248    }
3249
3250    /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
3251    ///
3252    /// # Example
3253    /// ```ignore,no_run
3254    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
3255    /// # let project_id = "project_id";
3256    /// # let instance_id = "instance_id";
3257    /// let x = ListLogicalViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3258    /// ```
3259    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3260        self.parent = v.into();
3261        self
3262    }
3263
3264    /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
3265    ///
3266    /// # Example
3267    /// ```ignore,no_run
3268    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
3269    /// let x = ListLogicalViewsRequest::new().set_page_size(42);
3270    /// ```
3271    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3272        self.page_size = v.into();
3273        self
3274    }
3275
3276    /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
3277    ///
3278    /// # Example
3279    /// ```ignore,no_run
3280    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
3281    /// let x = ListLogicalViewsRequest::new().set_page_token("example");
3282    /// ```
3283    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3284        self.page_token = v.into();
3285        self
3286    }
3287}
3288
3289impl wkt::message::Message for ListLogicalViewsRequest {
3290    fn typename() -> &'static str {
3291        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsRequest"
3292    }
3293}
3294
3295/// Response message for BigtableInstanceAdmin.ListLogicalViews.
3296#[derive(Clone, Default, PartialEq)]
3297#[non_exhaustive]
3298pub struct ListLogicalViewsResponse {
3299    /// The list of requested logical views.
3300    pub logical_views: std::vec::Vec<crate::model::LogicalView>,
3301
3302    /// A token, which can be sent as `page_token` to retrieve the next page.
3303    /// If this field is omitted, there are no subsequent pages.
3304    pub next_page_token: std::string::String,
3305
3306    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3307}
3308
3309impl ListLogicalViewsResponse {
3310    /// Creates a new default instance.
3311    pub fn new() -> Self {
3312        std::default::Default::default()
3313    }
3314
3315    /// Sets the value of [logical_views][crate::model::ListLogicalViewsResponse::logical_views].
3316    ///
3317    /// # Example
3318    /// ```ignore,no_run
3319    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
3320    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
3321    /// let x = ListLogicalViewsResponse::new()
3322    ///     .set_logical_views([
3323    ///         LogicalView::default()/* use setters */,
3324    ///         LogicalView::default()/* use (different) setters */,
3325    ///     ]);
3326    /// ```
3327    pub fn set_logical_views<T, V>(mut self, v: T) -> Self
3328    where
3329        T: std::iter::IntoIterator<Item = V>,
3330        V: std::convert::Into<crate::model::LogicalView>,
3331    {
3332        use std::iter::Iterator;
3333        self.logical_views = v.into_iter().map(|i| i.into()).collect();
3334        self
3335    }
3336
3337    /// Sets the value of [next_page_token][crate::model::ListLogicalViewsResponse::next_page_token].
3338    ///
3339    /// # Example
3340    /// ```ignore,no_run
3341    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
3342    /// let x = ListLogicalViewsResponse::new().set_next_page_token("example");
3343    /// ```
3344    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3345        self.next_page_token = v.into();
3346        self
3347    }
3348}
3349
3350impl wkt::message::Message for ListLogicalViewsResponse {
3351    fn typename() -> &'static str {
3352        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsResponse"
3353    }
3354}
3355
3356#[doc(hidden)]
3357impl google_cloud_gax::paginator::internal::PageableResponse for ListLogicalViewsResponse {
3358    type PageItem = crate::model::LogicalView;
3359
3360    fn items(self) -> std::vec::Vec<Self::PageItem> {
3361        self.logical_views
3362    }
3363
3364    fn next_page_token(&self) -> std::string::String {
3365        use std::clone::Clone;
3366        self.next_page_token.clone()
3367    }
3368}
3369
3370/// Request message for BigtableInstanceAdmin.UpdateLogicalView.
3371#[derive(Clone, Default, PartialEq)]
3372#[non_exhaustive]
3373pub struct UpdateLogicalViewRequest {
3374    /// Required. The logical view to update.
3375    ///
3376    /// The logical view's `name` field is used to identify the view to update.
3377    /// Format:
3378    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3379    pub logical_view: std::option::Option<crate::model::LogicalView>,
3380
3381    /// Optional. The list of fields to update.
3382    pub update_mask: std::option::Option<wkt::FieldMask>,
3383
3384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3385}
3386
3387impl UpdateLogicalViewRequest {
3388    /// Creates a new default instance.
3389    pub fn new() -> Self {
3390        std::default::Default::default()
3391    }
3392
3393    /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
3394    ///
3395    /// # Example
3396    /// ```ignore,no_run
3397    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3398    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
3399    /// let x = UpdateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
3400    /// ```
3401    pub fn set_logical_view<T>(mut self, v: T) -> Self
3402    where
3403        T: std::convert::Into<crate::model::LogicalView>,
3404    {
3405        self.logical_view = std::option::Option::Some(v.into());
3406        self
3407    }
3408
3409    /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
3410    ///
3411    /// # Example
3412    /// ```ignore,no_run
3413    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3414    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
3415    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
3416    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
3417    /// ```
3418    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
3419    where
3420        T: std::convert::Into<crate::model::LogicalView>,
3421    {
3422        self.logical_view = v.map(|x| x.into());
3423        self
3424    }
3425
3426    /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
3427    ///
3428    /// # Example
3429    /// ```ignore,no_run
3430    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3431    /// use wkt::FieldMask;
3432    /// let x = UpdateLogicalViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3433    /// ```
3434    pub fn set_update_mask<T>(mut self, v: T) -> Self
3435    where
3436        T: std::convert::Into<wkt::FieldMask>,
3437    {
3438        self.update_mask = std::option::Option::Some(v.into());
3439        self
3440    }
3441
3442    /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
3443    ///
3444    /// # Example
3445    /// ```ignore,no_run
3446    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3447    /// use wkt::FieldMask;
3448    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3449    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3450    /// ```
3451    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3452    where
3453        T: std::convert::Into<wkt::FieldMask>,
3454    {
3455        self.update_mask = v.map(|x| x.into());
3456        self
3457    }
3458}
3459
3460impl wkt::message::Message for UpdateLogicalViewRequest {
3461    fn typename() -> &'static str {
3462        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewRequest"
3463    }
3464}
3465
3466/// The metadata for the Operation returned by UpdateLogicalView.
3467#[derive(Clone, Default, PartialEq)]
3468#[non_exhaustive]
3469pub struct UpdateLogicalViewMetadata {
3470    /// The request that prompted the initiation of this UpdateLogicalView
3471    /// operation.
3472    pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
3473
3474    /// The time at which this operation was started.
3475    pub start_time: std::option::Option<wkt::Timestamp>,
3476
3477    /// If set, the time at which this operation finished or was canceled.
3478    pub end_time: std::option::Option<wkt::Timestamp>,
3479
3480    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3481}
3482
3483impl UpdateLogicalViewMetadata {
3484    /// Creates a new default instance.
3485    pub fn new() -> Self {
3486        std::default::Default::default()
3487    }
3488
3489    /// Sets the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3490    ///
3491    /// # Example
3492    /// ```ignore,no_run
3493    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3494    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3495    /// let x = UpdateLogicalViewMetadata::new().set_original_request(UpdateLogicalViewRequest::default()/* use setters */);
3496    /// ```
3497    pub fn set_original_request<T>(mut self, v: T) -> Self
3498    where
3499        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3500    {
3501        self.original_request = std::option::Option::Some(v.into());
3502        self
3503    }
3504
3505    /// Sets or clears the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3506    ///
3507    /// # Example
3508    /// ```ignore,no_run
3509    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3510    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3511    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(Some(UpdateLogicalViewRequest::default()/* use setters */));
3512    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(None::<UpdateLogicalViewRequest>);
3513    /// ```
3514    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3515    where
3516        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3517    {
3518        self.original_request = v.map(|x| x.into());
3519        self
3520    }
3521
3522    /// Sets the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3523    ///
3524    /// # Example
3525    /// ```ignore,no_run
3526    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3527    /// use wkt::Timestamp;
3528    /// let x = UpdateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3529    /// ```
3530    pub fn set_start_time<T>(mut self, v: T) -> Self
3531    where
3532        T: std::convert::Into<wkt::Timestamp>,
3533    {
3534        self.start_time = std::option::Option::Some(v.into());
3535        self
3536    }
3537
3538    /// Sets or clears the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3539    ///
3540    /// # Example
3541    /// ```ignore,no_run
3542    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3543    /// use wkt::Timestamp;
3544    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3545    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3546    /// ```
3547    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3548    where
3549        T: std::convert::Into<wkt::Timestamp>,
3550    {
3551        self.start_time = v.map(|x| x.into());
3552        self
3553    }
3554
3555    /// Sets the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3556    ///
3557    /// # Example
3558    /// ```ignore,no_run
3559    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3560    /// use wkt::Timestamp;
3561    /// let x = UpdateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3562    /// ```
3563    pub fn set_end_time<T>(mut self, v: T) -> Self
3564    where
3565        T: std::convert::Into<wkt::Timestamp>,
3566    {
3567        self.end_time = std::option::Option::Some(v.into());
3568        self
3569    }
3570
3571    /// Sets or clears the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3572    ///
3573    /// # Example
3574    /// ```ignore,no_run
3575    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3576    /// use wkt::Timestamp;
3577    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3578    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3579    /// ```
3580    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3581    where
3582        T: std::convert::Into<wkt::Timestamp>,
3583    {
3584        self.end_time = v.map(|x| x.into());
3585        self
3586    }
3587}
3588
3589impl wkt::message::Message for UpdateLogicalViewMetadata {
3590    fn typename() -> &'static str {
3591        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewMetadata"
3592    }
3593}
3594
3595/// Request message for BigtableInstanceAdmin.DeleteLogicalView.
3596#[derive(Clone, Default, PartialEq)]
3597#[non_exhaustive]
3598pub struct DeleteLogicalViewRequest {
3599    /// Required. The unique name of the logical view to be deleted.
3600    /// Format:
3601    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3602    pub name: std::string::String,
3603
3604    /// Optional. The current etag of the logical view.
3605    /// If an etag is provided and does not match the current etag of the
3606    /// logical view, deletion will be blocked and an ABORTED error will be
3607    /// returned.
3608    pub etag: std::string::String,
3609
3610    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3611}
3612
3613impl DeleteLogicalViewRequest {
3614    /// Creates a new default instance.
3615    pub fn new() -> Self {
3616        std::default::Default::default()
3617    }
3618
3619    /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
3620    ///
3621    /// # Example
3622    /// ```ignore,no_run
3623    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3624    /// # let project_id = "project_id";
3625    /// # let instance_id = "instance_id";
3626    /// # let logical_view_id = "logical_view_id";
3627    /// let x = DeleteLogicalViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
3628    /// ```
3629    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3630        self.name = v.into();
3631        self
3632    }
3633
3634    /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
3635    ///
3636    /// # Example
3637    /// ```ignore,no_run
3638    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3639    /// let x = DeleteLogicalViewRequest::new().set_etag("example");
3640    /// ```
3641    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3642        self.etag = v.into();
3643        self
3644    }
3645}
3646
3647impl wkt::message::Message for DeleteLogicalViewRequest {
3648    fn typename() -> &'static str {
3649        "type.googleapis.com/google.bigtable.admin.v2.DeleteLogicalViewRequest"
3650    }
3651}
3652
3653/// Request message for BigtableInstanceAdmin.CreateMaterializedView.
3654#[derive(Clone, Default, PartialEq)]
3655#[non_exhaustive]
3656pub struct CreateMaterializedViewRequest {
3657    /// Required. The parent instance where this materialized view will be created.
3658    /// Format: `projects/{project}/instances/{instance}`.
3659    pub parent: std::string::String,
3660
3661    /// Required. The ID to use for the materialized view, which will become the
3662    /// final component of the materialized view's resource name.
3663    pub materialized_view_id: std::string::String,
3664
3665    /// Required. The materialized view to create.
3666    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3667
3668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3669}
3670
3671impl CreateMaterializedViewRequest {
3672    /// Creates a new default instance.
3673    pub fn new() -> Self {
3674        std::default::Default::default()
3675    }
3676
3677    /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
3678    ///
3679    /// # Example
3680    /// ```ignore,no_run
3681    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3682    /// # let project_id = "project_id";
3683    /// # let instance_id = "instance_id";
3684    /// let x = CreateMaterializedViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3685    /// ```
3686    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3687        self.parent = v.into();
3688        self
3689    }
3690
3691    /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
3692    ///
3693    /// # Example
3694    /// ```ignore,no_run
3695    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3696    /// let x = CreateMaterializedViewRequest::new().set_materialized_view_id("example");
3697    /// ```
3698    pub fn set_materialized_view_id<T: std::convert::Into<std::string::String>>(
3699        mut self,
3700        v: T,
3701    ) -> Self {
3702        self.materialized_view_id = v.into();
3703        self
3704    }
3705
3706    /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3707    ///
3708    /// # Example
3709    /// ```ignore,no_run
3710    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3711    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3712    /// let x = CreateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3713    /// ```
3714    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3715    where
3716        T: std::convert::Into<crate::model::MaterializedView>,
3717    {
3718        self.materialized_view = std::option::Option::Some(v.into());
3719        self
3720    }
3721
3722    /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3723    ///
3724    /// # Example
3725    /// ```ignore,no_run
3726    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3727    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3728    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3729    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3730    /// ```
3731    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3732    where
3733        T: std::convert::Into<crate::model::MaterializedView>,
3734    {
3735        self.materialized_view = v.map(|x| x.into());
3736        self
3737    }
3738}
3739
3740impl wkt::message::Message for CreateMaterializedViewRequest {
3741    fn typename() -> &'static str {
3742        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewRequest"
3743    }
3744}
3745
3746/// The metadata for the Operation returned by CreateMaterializedView.
3747#[derive(Clone, Default, PartialEq)]
3748#[non_exhaustive]
3749pub struct CreateMaterializedViewMetadata {
3750    /// The request that prompted the initiation of this CreateMaterializedView
3751    /// operation.
3752    pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
3753
3754    /// The time at which this operation started.
3755    pub start_time: std::option::Option<wkt::Timestamp>,
3756
3757    /// If set, the time at which this operation finished or was canceled.
3758    pub end_time: std::option::Option<wkt::Timestamp>,
3759
3760    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3761}
3762
3763impl CreateMaterializedViewMetadata {
3764    /// Creates a new default instance.
3765    pub fn new() -> Self {
3766        std::default::Default::default()
3767    }
3768
3769    /// Sets the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3770    ///
3771    /// # Example
3772    /// ```ignore,no_run
3773    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3774    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3775    /// let x = CreateMaterializedViewMetadata::new().set_original_request(CreateMaterializedViewRequest::default()/* use setters */);
3776    /// ```
3777    pub fn set_original_request<T>(mut self, v: T) -> Self
3778    where
3779        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3780    {
3781        self.original_request = std::option::Option::Some(v.into());
3782        self
3783    }
3784
3785    /// Sets or clears the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3786    ///
3787    /// # Example
3788    /// ```ignore,no_run
3789    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3790    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3791    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(Some(CreateMaterializedViewRequest::default()/* use setters */));
3792    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(None::<CreateMaterializedViewRequest>);
3793    /// ```
3794    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3795    where
3796        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3797    {
3798        self.original_request = v.map(|x| x.into());
3799        self
3800    }
3801
3802    /// Sets the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3803    ///
3804    /// # Example
3805    /// ```ignore,no_run
3806    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3807    /// use wkt::Timestamp;
3808    /// let x = CreateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3809    /// ```
3810    pub fn set_start_time<T>(mut self, v: T) -> Self
3811    where
3812        T: std::convert::Into<wkt::Timestamp>,
3813    {
3814        self.start_time = std::option::Option::Some(v.into());
3815        self
3816    }
3817
3818    /// Sets or clears the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3819    ///
3820    /// # Example
3821    /// ```ignore,no_run
3822    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3823    /// use wkt::Timestamp;
3824    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3825    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3826    /// ```
3827    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3828    where
3829        T: std::convert::Into<wkt::Timestamp>,
3830    {
3831        self.start_time = v.map(|x| x.into());
3832        self
3833    }
3834
3835    /// Sets the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3836    ///
3837    /// # Example
3838    /// ```ignore,no_run
3839    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3840    /// use wkt::Timestamp;
3841    /// let x = CreateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3842    /// ```
3843    pub fn set_end_time<T>(mut self, v: T) -> Self
3844    where
3845        T: std::convert::Into<wkt::Timestamp>,
3846    {
3847        self.end_time = std::option::Option::Some(v.into());
3848        self
3849    }
3850
3851    /// Sets or clears the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3852    ///
3853    /// # Example
3854    /// ```ignore,no_run
3855    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3856    /// use wkt::Timestamp;
3857    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3858    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3859    /// ```
3860    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3861    where
3862        T: std::convert::Into<wkt::Timestamp>,
3863    {
3864        self.end_time = v.map(|x| x.into());
3865        self
3866    }
3867}
3868
3869impl wkt::message::Message for CreateMaterializedViewMetadata {
3870    fn typename() -> &'static str {
3871        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewMetadata"
3872    }
3873}
3874
3875/// Request message for BigtableInstanceAdmin.GetMaterializedView.
3876#[derive(Clone, Default, PartialEq)]
3877#[non_exhaustive]
3878pub struct GetMaterializedViewRequest {
3879    /// Required. The unique name of the requested materialized view. Values are of
3880    /// the form
3881    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3882    pub name: std::string::String,
3883
3884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3885}
3886
3887impl GetMaterializedViewRequest {
3888    /// Creates a new default instance.
3889    pub fn new() -> Self {
3890        std::default::Default::default()
3891    }
3892
3893    /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
3894    ///
3895    /// # Example
3896    /// ```ignore,no_run
3897    /// # use google_cloud_bigtable_admin_v2::model::GetMaterializedViewRequest;
3898    /// # let project_id = "project_id";
3899    /// # let instance_id = "instance_id";
3900    /// # let materialized_view_id = "materialized_view_id";
3901    /// let x = GetMaterializedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
3902    /// ```
3903    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3904        self.name = v.into();
3905        self
3906    }
3907}
3908
3909impl wkt::message::Message for GetMaterializedViewRequest {
3910    fn typename() -> &'static str {
3911        "type.googleapis.com/google.bigtable.admin.v2.GetMaterializedViewRequest"
3912    }
3913}
3914
3915/// Request message for BigtableInstanceAdmin.ListMaterializedViews.
3916#[derive(Clone, Default, PartialEq)]
3917#[non_exhaustive]
3918pub struct ListMaterializedViewsRequest {
3919    /// Required. The unique name of the instance for which the list of
3920    /// materialized views is requested. Values are of the form
3921    /// `projects/{project}/instances/{instance}`.
3922    pub parent: std::string::String,
3923
3924    /// Optional. The maximum number of materialized views to return. The service
3925    /// may return fewer than this value
3926    pub page_size: i32,
3927
3928    /// Optional. A page token, received from a previous `ListMaterializedViews`
3929    /// call. Provide this to retrieve the subsequent page.
3930    ///
3931    /// When paginating, all other parameters provided to `ListMaterializedViews`
3932    /// must match the call that provided the page token.
3933    pub page_token: std::string::String,
3934
3935    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3936}
3937
3938impl ListMaterializedViewsRequest {
3939    /// Creates a new default instance.
3940    pub fn new() -> Self {
3941        std::default::Default::default()
3942    }
3943
3944    /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
3945    ///
3946    /// # Example
3947    /// ```ignore,no_run
3948    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3949    /// # let project_id = "project_id";
3950    /// # let instance_id = "instance_id";
3951    /// let x = ListMaterializedViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3952    /// ```
3953    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3954        self.parent = v.into();
3955        self
3956    }
3957
3958    /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
3959    ///
3960    /// # Example
3961    /// ```ignore,no_run
3962    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3963    /// let x = ListMaterializedViewsRequest::new().set_page_size(42);
3964    /// ```
3965    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3966        self.page_size = v.into();
3967        self
3968    }
3969
3970    /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
3971    ///
3972    /// # Example
3973    /// ```ignore,no_run
3974    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3975    /// let x = ListMaterializedViewsRequest::new().set_page_token("example");
3976    /// ```
3977    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3978        self.page_token = v.into();
3979        self
3980    }
3981}
3982
3983impl wkt::message::Message for ListMaterializedViewsRequest {
3984    fn typename() -> &'static str {
3985        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsRequest"
3986    }
3987}
3988
3989/// Response message for BigtableInstanceAdmin.ListMaterializedViews.
3990#[derive(Clone, Default, PartialEq)]
3991#[non_exhaustive]
3992pub struct ListMaterializedViewsResponse {
3993    /// The list of requested materialized views.
3994    pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
3995
3996    /// A token, which can be sent as `page_token` to retrieve the next page.
3997    /// If this field is omitted, there are no subsequent pages.
3998    pub next_page_token: std::string::String,
3999
4000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4001}
4002
4003impl ListMaterializedViewsResponse {
4004    /// Creates a new default instance.
4005    pub fn new() -> Self {
4006        std::default::Default::default()
4007    }
4008
4009    /// Sets the value of [materialized_views][crate::model::ListMaterializedViewsResponse::materialized_views].
4010    ///
4011    /// # Example
4012    /// ```ignore,no_run
4013    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
4014    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
4015    /// let x = ListMaterializedViewsResponse::new()
4016    ///     .set_materialized_views([
4017    ///         MaterializedView::default()/* use setters */,
4018    ///         MaterializedView::default()/* use (different) setters */,
4019    ///     ]);
4020    /// ```
4021    pub fn set_materialized_views<T, V>(mut self, v: T) -> Self
4022    where
4023        T: std::iter::IntoIterator<Item = V>,
4024        V: std::convert::Into<crate::model::MaterializedView>,
4025    {
4026        use std::iter::Iterator;
4027        self.materialized_views = v.into_iter().map(|i| i.into()).collect();
4028        self
4029    }
4030
4031    /// Sets the value of [next_page_token][crate::model::ListMaterializedViewsResponse::next_page_token].
4032    ///
4033    /// # Example
4034    /// ```ignore,no_run
4035    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
4036    /// let x = ListMaterializedViewsResponse::new().set_next_page_token("example");
4037    /// ```
4038    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4039        self.next_page_token = v.into();
4040        self
4041    }
4042}
4043
4044impl wkt::message::Message for ListMaterializedViewsResponse {
4045    fn typename() -> &'static str {
4046        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsResponse"
4047    }
4048}
4049
4050#[doc(hidden)]
4051impl google_cloud_gax::paginator::internal::PageableResponse for ListMaterializedViewsResponse {
4052    type PageItem = crate::model::MaterializedView;
4053
4054    fn items(self) -> std::vec::Vec<Self::PageItem> {
4055        self.materialized_views
4056    }
4057
4058    fn next_page_token(&self) -> std::string::String {
4059        use std::clone::Clone;
4060        self.next_page_token.clone()
4061    }
4062}
4063
4064/// Request message for BigtableInstanceAdmin.UpdateMaterializedView.
4065#[derive(Clone, Default, PartialEq)]
4066#[non_exhaustive]
4067pub struct UpdateMaterializedViewRequest {
4068    /// Required. The materialized view to update.
4069    ///
4070    /// The materialized view's `name` field is used to identify the view to
4071    /// update. Format:
4072    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
4073    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
4074
4075    /// Optional. The list of fields to update.
4076    pub update_mask: std::option::Option<wkt::FieldMask>,
4077
4078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4079}
4080
4081impl UpdateMaterializedViewRequest {
4082    /// Creates a new default instance.
4083    pub fn new() -> Self {
4084        std::default::Default::default()
4085    }
4086
4087    /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
4088    ///
4089    /// # Example
4090    /// ```ignore,no_run
4091    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
4092    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
4093    /// let x = UpdateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
4094    /// ```
4095    pub fn set_materialized_view<T>(mut self, v: T) -> Self
4096    where
4097        T: std::convert::Into<crate::model::MaterializedView>,
4098    {
4099        self.materialized_view = std::option::Option::Some(v.into());
4100        self
4101    }
4102
4103    /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
4104    ///
4105    /// # Example
4106    /// ```ignore,no_run
4107    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
4108    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
4109    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
4110    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
4111    /// ```
4112    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
4113    where
4114        T: std::convert::Into<crate::model::MaterializedView>,
4115    {
4116        self.materialized_view = v.map(|x| x.into());
4117        self
4118    }
4119
4120    /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
4121    ///
4122    /// # Example
4123    /// ```ignore,no_run
4124    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
4125    /// use wkt::FieldMask;
4126    /// let x = UpdateMaterializedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4127    /// ```
4128    pub fn set_update_mask<T>(mut self, v: T) -> Self
4129    where
4130        T: std::convert::Into<wkt::FieldMask>,
4131    {
4132        self.update_mask = std::option::Option::Some(v.into());
4133        self
4134    }
4135
4136    /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
4137    ///
4138    /// # Example
4139    /// ```ignore,no_run
4140    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
4141    /// use wkt::FieldMask;
4142    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4143    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4144    /// ```
4145    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4146    where
4147        T: std::convert::Into<wkt::FieldMask>,
4148    {
4149        self.update_mask = v.map(|x| x.into());
4150        self
4151    }
4152}
4153
4154impl wkt::message::Message for UpdateMaterializedViewRequest {
4155    fn typename() -> &'static str {
4156        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewRequest"
4157    }
4158}
4159
4160/// The metadata for the Operation returned by UpdateMaterializedView.
4161#[derive(Clone, Default, PartialEq)]
4162#[non_exhaustive]
4163pub struct UpdateMaterializedViewMetadata {
4164    /// The request that prompted the initiation of this UpdateMaterializedView
4165    /// operation.
4166    pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
4167
4168    /// The time at which this operation was started.
4169    pub start_time: std::option::Option<wkt::Timestamp>,
4170
4171    /// If set, the time at which this operation finished or was canceled.
4172    pub end_time: std::option::Option<wkt::Timestamp>,
4173
4174    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4175}
4176
4177impl UpdateMaterializedViewMetadata {
4178    /// Creates a new default instance.
4179    pub fn new() -> Self {
4180        std::default::Default::default()
4181    }
4182
4183    /// Sets the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
4184    ///
4185    /// # Example
4186    /// ```ignore,no_run
4187    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
4188    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
4189    /// let x = UpdateMaterializedViewMetadata::new().set_original_request(UpdateMaterializedViewRequest::default()/* use setters */);
4190    /// ```
4191    pub fn set_original_request<T>(mut self, v: T) -> Self
4192    where
4193        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
4194    {
4195        self.original_request = std::option::Option::Some(v.into());
4196        self
4197    }
4198
4199    /// Sets or clears the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
4200    ///
4201    /// # Example
4202    /// ```ignore,no_run
4203    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
4204    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
4205    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(Some(UpdateMaterializedViewRequest::default()/* use setters */));
4206    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(None::<UpdateMaterializedViewRequest>);
4207    /// ```
4208    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
4209    where
4210        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
4211    {
4212        self.original_request = v.map(|x| x.into());
4213        self
4214    }
4215
4216    /// Sets the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
4217    ///
4218    /// # Example
4219    /// ```ignore,no_run
4220    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
4221    /// use wkt::Timestamp;
4222    /// let x = UpdateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
4223    /// ```
4224    pub fn set_start_time<T>(mut self, v: T) -> Self
4225    where
4226        T: std::convert::Into<wkt::Timestamp>,
4227    {
4228        self.start_time = std::option::Option::Some(v.into());
4229        self
4230    }
4231
4232    /// Sets or clears the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
4233    ///
4234    /// # Example
4235    /// ```ignore,no_run
4236    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
4237    /// use wkt::Timestamp;
4238    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
4239    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
4240    /// ```
4241    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
4242    where
4243        T: std::convert::Into<wkt::Timestamp>,
4244    {
4245        self.start_time = v.map(|x| x.into());
4246        self
4247    }
4248
4249    /// Sets the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
4250    ///
4251    /// # Example
4252    /// ```ignore,no_run
4253    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
4254    /// use wkt::Timestamp;
4255    /// let x = UpdateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
4256    /// ```
4257    pub fn set_end_time<T>(mut self, v: T) -> Self
4258    where
4259        T: std::convert::Into<wkt::Timestamp>,
4260    {
4261        self.end_time = std::option::Option::Some(v.into());
4262        self
4263    }
4264
4265    /// Sets or clears the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
4266    ///
4267    /// # Example
4268    /// ```ignore,no_run
4269    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
4270    /// use wkt::Timestamp;
4271    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
4272    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
4273    /// ```
4274    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
4275    where
4276        T: std::convert::Into<wkt::Timestamp>,
4277    {
4278        self.end_time = v.map(|x| x.into());
4279        self
4280    }
4281}
4282
4283impl wkt::message::Message for UpdateMaterializedViewMetadata {
4284    fn typename() -> &'static str {
4285        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"
4286    }
4287}
4288
4289/// Request message for BigtableInstanceAdmin.DeleteMaterializedView.
4290#[derive(Clone, Default, PartialEq)]
4291#[non_exhaustive]
4292pub struct DeleteMaterializedViewRequest {
4293    /// Required. The unique name of the materialized view to be deleted.
4294    /// Format:
4295    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
4296    pub name: std::string::String,
4297
4298    /// Optional. The current etag of the materialized view.
4299    /// If an etag is provided and does not match the current etag of the
4300    /// materialized view, deletion will be blocked and an ABORTED error will be
4301    /// returned.
4302    pub etag: std::string::String,
4303
4304    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4305}
4306
4307impl DeleteMaterializedViewRequest {
4308    /// Creates a new default instance.
4309    pub fn new() -> Self {
4310        std::default::Default::default()
4311    }
4312
4313    /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
4314    ///
4315    /// # Example
4316    /// ```ignore,no_run
4317    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
4318    /// # let project_id = "project_id";
4319    /// # let instance_id = "instance_id";
4320    /// # let materialized_view_id = "materialized_view_id";
4321    /// let x = DeleteMaterializedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
4322    /// ```
4323    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4324        self.name = v.into();
4325        self
4326    }
4327
4328    /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
4329    ///
4330    /// # Example
4331    /// ```ignore,no_run
4332    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
4333    /// let x = DeleteMaterializedViewRequest::new().set_etag("example");
4334    /// ```
4335    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4336        self.etag = v.into();
4337        self
4338    }
4339}
4340
4341impl wkt::message::Message for DeleteMaterializedViewRequest {
4342    fn typename() -> &'static str {
4343        "type.googleapis.com/google.bigtable.admin.v2.DeleteMaterializedViewRequest"
4344    }
4345}
4346
4347/// The request for
4348/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
4349///
4350/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4351#[derive(Clone, Default, PartialEq)]
4352#[non_exhaustive]
4353pub struct RestoreTableRequest {
4354    /// Required. The name of the instance in which to create the restored
4355    /// table. Values are of the form `projects/<project>/instances/<instance>`.
4356    pub parent: std::string::String,
4357
4358    /// Required. The id of the table to create and restore to. This
4359    /// table must not already exist. The `table_id` appended to
4360    /// `parent` forms the full table name of the form
4361    /// `projects/<project>/instances/<instance>/tables/<table_id>`.
4362    pub table_id: std::string::String,
4363
4364    /// Required. The source from which to restore.
4365    pub source: std::option::Option<crate::model::restore_table_request::Source>,
4366
4367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4368}
4369
4370impl RestoreTableRequest {
4371    /// Creates a new default instance.
4372    pub fn new() -> Self {
4373        std::default::Default::default()
4374    }
4375
4376    /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
4377    ///
4378    /// # Example
4379    /// ```ignore,no_run
4380    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
4381    /// # let project_id = "project_id";
4382    /// # let instance_id = "instance_id";
4383    /// let x = RestoreTableRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4384    /// ```
4385    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4386        self.parent = v.into();
4387        self
4388    }
4389
4390    /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
4391    ///
4392    /// # Example
4393    /// ```ignore,no_run
4394    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
4395    /// let x = RestoreTableRequest::new().set_table_id("example");
4396    /// ```
4397    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4398        self.table_id = v.into();
4399        self
4400    }
4401
4402    /// Sets the value of [source][crate::model::RestoreTableRequest::source].
4403    ///
4404    /// Note that all the setters affecting `source` are mutually
4405    /// exclusive.
4406    ///
4407    /// # Example
4408    /// ```ignore,no_run
4409    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
4410    /// use google_cloud_bigtable_admin_v2::model::restore_table_request::Source;
4411    /// let x = RestoreTableRequest::new().set_source(Some(Source::Backup("example".to_string())));
4412    /// ```
4413    pub fn set_source<
4414        T: std::convert::Into<std::option::Option<crate::model::restore_table_request::Source>>,
4415    >(
4416        mut self,
4417        v: T,
4418    ) -> Self {
4419        self.source = v.into();
4420        self
4421    }
4422
4423    /// The value of [source][crate::model::RestoreTableRequest::source]
4424    /// if it holds a `Backup`, `None` if the field is not set or
4425    /// holds a different branch.
4426    pub fn backup(&self) -> std::option::Option<&std::string::String> {
4427        #[allow(unreachable_patterns)]
4428        self.source.as_ref().and_then(|v| match v {
4429            crate::model::restore_table_request::Source::Backup(v) => std::option::Option::Some(v),
4430            _ => std::option::Option::None,
4431        })
4432    }
4433
4434    /// Sets the value of [source][crate::model::RestoreTableRequest::source]
4435    /// to hold a `Backup`.
4436    ///
4437    /// Note that all the setters affecting `source` are
4438    /// mutually exclusive.
4439    ///
4440    /// # Example
4441    /// ```ignore,no_run
4442    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
4443    /// # let project_id = "project_id";
4444    /// # let instance_id = "instance_id";
4445    /// # let cluster_id = "cluster_id";
4446    /// # let backup_id = "backup_id";
4447    /// let x = RestoreTableRequest::new().set_backup(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
4448    /// assert!(x.backup().is_some());
4449    /// ```
4450    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4451        self.source = std::option::Option::Some(
4452            crate::model::restore_table_request::Source::Backup(v.into()),
4453        );
4454        self
4455    }
4456}
4457
4458impl wkt::message::Message for RestoreTableRequest {
4459    fn typename() -> &'static str {
4460        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableRequest"
4461    }
4462}
4463
4464/// Defines additional types related to [RestoreTableRequest].
4465pub mod restore_table_request {
4466    #[allow(unused_imports)]
4467    use super::*;
4468
4469    /// Required. The source from which to restore.
4470    #[derive(Clone, Debug, PartialEq)]
4471    #[non_exhaustive]
4472    pub enum Source {
4473        /// Name of the backup from which to restore.  Values are of the form
4474        /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
4475        Backup(std::string::String),
4476    }
4477}
4478
4479/// Metadata type for the long-running operation returned by
4480/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
4481///
4482/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4483#[derive(Clone, Default, PartialEq)]
4484#[non_exhaustive]
4485pub struct RestoreTableMetadata {
4486    /// Name of the table being created and restored to.
4487    pub name: std::string::String,
4488
4489    /// The type of the restore source.
4490    pub source_type: crate::model::RestoreSourceType,
4491
4492    /// If exists, the name of the long-running operation that will be used to
4493    /// track the post-restore optimization process to optimize the performance of
4494    /// the restored table. The metadata type of the long-running operation is
4495    /// [OptimizeRestoreTableMetadata][]. The response type is
4496    /// [Empty][google.protobuf.Empty]. This long-running operation may be
4497    /// automatically created by the system if applicable after the
4498    /// RestoreTable long-running operation completes successfully. This operation
4499    /// may not be created if the table is already optimized or the restore was
4500    /// not successful.
4501    pub optimize_table_operation_name: std::string::String,
4502
4503    /// The progress of the
4504    /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
4505    /// operation.
4506    ///
4507    /// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4508    pub progress: std::option::Option<crate::model::OperationProgress>,
4509
4510    /// Information about the source used to restore the table, as specified by
4511    /// `source` in
4512    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4513    ///
4514    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4515    pub source_info: std::option::Option<crate::model::restore_table_metadata::SourceInfo>,
4516
4517    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4518}
4519
4520impl RestoreTableMetadata {
4521    /// Creates a new default instance.
4522    pub fn new() -> Self {
4523        std::default::Default::default()
4524    }
4525
4526    /// Sets the value of [name][crate::model::RestoreTableMetadata::name].
4527    ///
4528    /// # Example
4529    /// ```ignore,no_run
4530    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4531    /// let x = RestoreTableMetadata::new().set_name("example");
4532    /// ```
4533    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4534        self.name = v.into();
4535        self
4536    }
4537
4538    /// Sets the value of [source_type][crate::model::RestoreTableMetadata::source_type].
4539    ///
4540    /// # Example
4541    /// ```ignore,no_run
4542    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4543    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
4544    /// let x0 = RestoreTableMetadata::new().set_source_type(RestoreSourceType::Backup);
4545    /// ```
4546    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
4547        mut self,
4548        v: T,
4549    ) -> Self {
4550        self.source_type = v.into();
4551        self
4552    }
4553
4554    /// Sets the value of [optimize_table_operation_name][crate::model::RestoreTableMetadata::optimize_table_operation_name].
4555    ///
4556    /// # Example
4557    /// ```ignore,no_run
4558    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4559    /// let x = RestoreTableMetadata::new().set_optimize_table_operation_name("example");
4560    /// ```
4561    pub fn set_optimize_table_operation_name<T: std::convert::Into<std::string::String>>(
4562        mut self,
4563        v: T,
4564    ) -> Self {
4565        self.optimize_table_operation_name = v.into();
4566        self
4567    }
4568
4569    /// Sets the value of [progress][crate::model::RestoreTableMetadata::progress].
4570    ///
4571    /// # Example
4572    /// ```ignore,no_run
4573    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4574    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4575    /// let x = RestoreTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4576    /// ```
4577    pub fn set_progress<T>(mut self, v: T) -> Self
4578    where
4579        T: std::convert::Into<crate::model::OperationProgress>,
4580    {
4581        self.progress = std::option::Option::Some(v.into());
4582        self
4583    }
4584
4585    /// Sets or clears the value of [progress][crate::model::RestoreTableMetadata::progress].
4586    ///
4587    /// # Example
4588    /// ```ignore,no_run
4589    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4590    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4591    /// let x = RestoreTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4592    /// let x = RestoreTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4593    /// ```
4594    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4595    where
4596        T: std::convert::Into<crate::model::OperationProgress>,
4597    {
4598        self.progress = v.map(|x| x.into());
4599        self
4600    }
4601
4602    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info].
4603    ///
4604    /// Note that all the setters affecting `source_info` are mutually
4605    /// exclusive.
4606    ///
4607    /// # Example
4608    /// ```ignore,no_run
4609    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4610    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4611    /// let x = RestoreTableMetadata::new().set_source_info(Some(
4612    ///     google_cloud_bigtable_admin_v2::model::restore_table_metadata::SourceInfo::BackupInfo(BackupInfo::default().into())));
4613    /// ```
4614    pub fn set_source_info<
4615        T: std::convert::Into<std::option::Option<crate::model::restore_table_metadata::SourceInfo>>,
4616    >(
4617        mut self,
4618        v: T,
4619    ) -> Self {
4620        self.source_info = v.into();
4621        self
4622    }
4623
4624    /// The value of [source_info][crate::model::RestoreTableMetadata::source_info]
4625    /// if it holds a `BackupInfo`, `None` if the field is not set or
4626    /// holds a different branch.
4627    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
4628        #[allow(unreachable_patterns)]
4629        self.source_info.as_ref().and_then(|v| match v {
4630            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v) => {
4631                std::option::Option::Some(v)
4632            }
4633            _ => std::option::Option::None,
4634        })
4635    }
4636
4637    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info]
4638    /// to hold a `BackupInfo`.
4639    ///
4640    /// Note that all the setters affecting `source_info` are
4641    /// mutually exclusive.
4642    ///
4643    /// # Example
4644    /// ```ignore,no_run
4645    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4646    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4647    /// let x = RestoreTableMetadata::new().set_backup_info(BackupInfo::default()/* use setters */);
4648    /// assert!(x.backup_info().is_some());
4649    /// ```
4650    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
4651        mut self,
4652        v: T,
4653    ) -> Self {
4654        self.source_info = std::option::Option::Some(
4655            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v.into()),
4656        );
4657        self
4658    }
4659}
4660
4661impl wkt::message::Message for RestoreTableMetadata {
4662    fn typename() -> &'static str {
4663        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableMetadata"
4664    }
4665}
4666
4667/// Defines additional types related to [RestoreTableMetadata].
4668pub mod restore_table_metadata {
4669    #[allow(unused_imports)]
4670    use super::*;
4671
4672    /// Information about the source used to restore the table, as specified by
4673    /// `source` in
4674    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4675    ///
4676    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4677    #[derive(Clone, Debug, PartialEq)]
4678    #[non_exhaustive]
4679    pub enum SourceInfo {
4680        #[allow(missing_docs)]
4681        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
4682    }
4683}
4684
4685/// Metadata type for the long-running operation used to track the progress
4686/// of optimizations performed on a newly restored table. This long-running
4687/// operation is automatically created by the system after the successful
4688/// completion of a table restore, and cannot be cancelled.
4689#[derive(Clone, Default, PartialEq)]
4690#[non_exhaustive]
4691pub struct OptimizeRestoredTableMetadata {
4692    /// Name of the restored table being optimized.
4693    pub name: std::string::String,
4694
4695    /// The progress of the post-restore optimizations.
4696    pub progress: std::option::Option<crate::model::OperationProgress>,
4697
4698    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4699}
4700
4701impl OptimizeRestoredTableMetadata {
4702    /// Creates a new default instance.
4703    pub fn new() -> Self {
4704        std::default::Default::default()
4705    }
4706
4707    /// Sets the value of [name][crate::model::OptimizeRestoredTableMetadata::name].
4708    ///
4709    /// # Example
4710    /// ```ignore,no_run
4711    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4712    /// let x = OptimizeRestoredTableMetadata::new().set_name("example");
4713    /// ```
4714    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4715        self.name = v.into();
4716        self
4717    }
4718
4719    /// Sets the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4720    ///
4721    /// # Example
4722    /// ```ignore,no_run
4723    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4724    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4725    /// let x = OptimizeRestoredTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4726    /// ```
4727    pub fn set_progress<T>(mut self, v: T) -> Self
4728    where
4729        T: std::convert::Into<crate::model::OperationProgress>,
4730    {
4731        self.progress = std::option::Option::Some(v.into());
4732        self
4733    }
4734
4735    /// Sets or clears the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4736    ///
4737    /// # Example
4738    /// ```ignore,no_run
4739    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4740    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4741    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4742    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4743    /// ```
4744    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4745    where
4746        T: std::convert::Into<crate::model::OperationProgress>,
4747    {
4748        self.progress = v.map(|x| x.into());
4749        self
4750    }
4751}
4752
4753impl wkt::message::Message for OptimizeRestoredTableMetadata {
4754    fn typename() -> &'static str {
4755        "type.googleapis.com/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"
4756    }
4757}
4758
4759/// Request message for
4760/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
4761///
4762/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]: crate::client::BigtableTableAdmin::create_table
4763#[derive(Clone, Default, PartialEq)]
4764#[non_exhaustive]
4765pub struct CreateTableRequest {
4766    /// Required. The unique name of the instance in which to create the table.
4767    /// Values are of the form `projects/{project}/instances/{instance}`.
4768    pub parent: std::string::String,
4769
4770    /// Required. The name by which the new table should be referred to within the
4771    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4772    /// Maximum 50 characters.
4773    pub table_id: std::string::String,
4774
4775    /// Required. The Table to create.
4776    pub table: std::option::Option<crate::model::Table>,
4777
4778    /// The optional list of row keys that will be used to initially split the
4779    /// table into several tablets (tablets are similar to HBase regions).
4780    /// Given two split keys, `s1` and `s2`, three tablets will be created,
4781    /// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
4782    ///
4783    /// Example:
4784    ///
4785    /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
4786    ///   `"other", "zz"]`
4787    /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
4788    /// * Key assignment:
4789    ///   - Tablet 1 `[, apple)                => {"a"}.`
4790    ///   - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
4791    ///   - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
4792    ///   - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
4793    ///   - Tablet 5 `[other, )                => {"other", "zz"}.`
4794    pub initial_splits: std::vec::Vec<crate::model::create_table_request::Split>,
4795
4796    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4797}
4798
4799impl CreateTableRequest {
4800    /// Creates a new default instance.
4801    pub fn new() -> Self {
4802        std::default::Default::default()
4803    }
4804
4805    /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
4806    ///
4807    /// # Example
4808    /// ```ignore,no_run
4809    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4810    /// # let project_id = "project_id";
4811    /// # let instance_id = "instance_id";
4812    /// let x = CreateTableRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4813    /// ```
4814    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4815        self.parent = v.into();
4816        self
4817    }
4818
4819    /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
4820    ///
4821    /// # Example
4822    /// ```ignore,no_run
4823    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4824    /// let x = CreateTableRequest::new().set_table_id("example");
4825    /// ```
4826    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4827        self.table_id = v.into();
4828        self
4829    }
4830
4831    /// Sets the value of [table][crate::model::CreateTableRequest::table].
4832    ///
4833    /// # Example
4834    /// ```ignore,no_run
4835    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4836    /// use google_cloud_bigtable_admin_v2::model::Table;
4837    /// let x = CreateTableRequest::new().set_table(Table::default()/* use setters */);
4838    /// ```
4839    pub fn set_table<T>(mut self, v: T) -> Self
4840    where
4841        T: std::convert::Into<crate::model::Table>,
4842    {
4843        self.table = std::option::Option::Some(v.into());
4844        self
4845    }
4846
4847    /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
4848    ///
4849    /// # Example
4850    /// ```ignore,no_run
4851    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4852    /// use google_cloud_bigtable_admin_v2::model::Table;
4853    /// let x = CreateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4854    /// let x = CreateTableRequest::new().set_or_clear_table(None::<Table>);
4855    /// ```
4856    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4857    where
4858        T: std::convert::Into<crate::model::Table>,
4859    {
4860        self.table = v.map(|x| x.into());
4861        self
4862    }
4863
4864    /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
4865    ///
4866    /// # Example
4867    /// ```ignore,no_run
4868    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4869    /// use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4870    /// let x = CreateTableRequest::new()
4871    ///     .set_initial_splits([
4872    ///         Split::default()/* use setters */,
4873    ///         Split::default()/* use (different) setters */,
4874    ///     ]);
4875    /// ```
4876    pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4877    where
4878        T: std::iter::IntoIterator<Item = V>,
4879        V: std::convert::Into<crate::model::create_table_request::Split>,
4880    {
4881        use std::iter::Iterator;
4882        self.initial_splits = v.into_iter().map(|i| i.into()).collect();
4883        self
4884    }
4885}
4886
4887impl wkt::message::Message for CreateTableRequest {
4888    fn typename() -> &'static str {
4889        "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest"
4890    }
4891}
4892
4893/// Defines additional types related to [CreateTableRequest].
4894pub mod create_table_request {
4895    #[allow(unused_imports)]
4896    use super::*;
4897
4898    /// An initial split point for a newly created table.
4899    #[derive(Clone, Default, PartialEq)]
4900    #[non_exhaustive]
4901    pub struct Split {
4902        /// Row key to use as an initial tablet boundary.
4903        pub key: ::bytes::Bytes,
4904
4905        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4906    }
4907
4908    impl Split {
4909        /// Creates a new default instance.
4910        pub fn new() -> Self {
4911            std::default::Default::default()
4912        }
4913
4914        /// Sets the value of [key][crate::model::create_table_request::Split::key].
4915        ///
4916        /// # Example
4917        /// ```ignore,no_run
4918        /// # use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4919        /// let x = Split::new().set_key(bytes::Bytes::from_static(b"example"));
4920        /// ```
4921        pub fn set_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4922            self.key = v.into();
4923            self
4924        }
4925    }
4926
4927    impl wkt::message::Message for Split {
4928        fn typename() -> &'static str {
4929            "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest.Split"
4930        }
4931    }
4932}
4933
4934/// Request message for
4935/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
4936///
4937/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4938/// feature is not currently available to most Cloud Bigtable customers. This
4939/// feature might be changed in backward-incompatible ways and is not recommended
4940/// for production use. It is not subject to any SLA or deprecation policy.
4941///
4942/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]: crate::client::BigtableTableAdmin::create_table_from_snapshot
4943#[derive(Clone, Default, PartialEq)]
4944#[non_exhaustive]
4945pub struct CreateTableFromSnapshotRequest {
4946    /// Required. The unique name of the instance in which to create the table.
4947    /// Values are of the form `projects/{project}/instances/{instance}`.
4948    pub parent: std::string::String,
4949
4950    /// Required. The name by which the new table should be referred to within the
4951    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4952    pub table_id: std::string::String,
4953
4954    /// Required. The unique name of the snapshot from which to restore the table.
4955    /// The snapshot and the table must be in the same instance. Values are of the
4956    /// form
4957    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4958    pub source_snapshot: std::string::String,
4959
4960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4961}
4962
4963impl CreateTableFromSnapshotRequest {
4964    /// Creates a new default instance.
4965    pub fn new() -> Self {
4966        std::default::Default::default()
4967    }
4968
4969    /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
4970    ///
4971    /// # Example
4972    /// ```ignore,no_run
4973    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4974    /// # let project_id = "project_id";
4975    /// # let instance_id = "instance_id";
4976    /// let x = CreateTableFromSnapshotRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4977    /// ```
4978    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4979        self.parent = v.into();
4980        self
4981    }
4982
4983    /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
4984    ///
4985    /// # Example
4986    /// ```ignore,no_run
4987    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4988    /// let x = CreateTableFromSnapshotRequest::new().set_table_id("example");
4989    /// ```
4990    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4991        self.table_id = v.into();
4992        self
4993    }
4994
4995    /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
4996    ///
4997    /// # Example
4998    /// ```ignore,no_run
4999    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
5000    /// # let project_id = "project_id";
5001    /// # let instance_id = "instance_id";
5002    /// # let cluster_id = "cluster_id";
5003    /// # let snapshot_id = "snapshot_id";
5004    /// let x = CreateTableFromSnapshotRequest::new().set_source_snapshot(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
5005    /// ```
5006    pub fn set_source_snapshot<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5007        self.source_snapshot = v.into();
5008        self
5009    }
5010}
5011
5012impl wkt::message::Message for CreateTableFromSnapshotRequest {
5013    fn typename() -> &'static str {
5014        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"
5015    }
5016}
5017
5018/// Request message for
5019/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
5020///
5021/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]: crate::client::BigtableTableAdmin::drop_row_range
5022#[derive(Clone, Default, PartialEq)]
5023#[non_exhaustive]
5024pub struct DropRowRangeRequest {
5025    /// Required. The unique name of the table on which to drop a range of rows.
5026    /// Values are of the form
5027    /// `projects/{project}/instances/{instance}/tables/{table}`.
5028    pub name: std::string::String,
5029
5030    /// Delete all rows or by prefix.
5031    pub target: std::option::Option<crate::model::drop_row_range_request::Target>,
5032
5033    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5034}
5035
5036impl DropRowRangeRequest {
5037    /// Creates a new default instance.
5038    pub fn new() -> Self {
5039        std::default::Default::default()
5040    }
5041
5042    /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
5043    ///
5044    /// # Example
5045    /// ```ignore,no_run
5046    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
5047    /// # let project_id = "project_id";
5048    /// # let instance_id = "instance_id";
5049    /// # let table_id = "table_id";
5050    /// let x = DropRowRangeRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5051    /// ```
5052    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5053        self.name = v.into();
5054        self
5055    }
5056
5057    /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
5058    ///
5059    /// Note that all the setters affecting `target` are mutually
5060    /// exclusive.
5061    ///
5062    /// # Example
5063    /// ```ignore,no_run
5064    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
5065    /// use google_cloud_bigtable_admin_v2::model::drop_row_range_request::Target;
5066    /// let x = DropRowRangeRequest::new().set_target(Some(Target::RowKeyPrefix(bytes::Bytes::from_static(b"example"))));
5067    /// ```
5068    pub fn set_target<
5069        T: std::convert::Into<std::option::Option<crate::model::drop_row_range_request::Target>>,
5070    >(
5071        mut self,
5072        v: T,
5073    ) -> Self {
5074        self.target = v.into();
5075        self
5076    }
5077
5078    /// The value of [target][crate::model::DropRowRangeRequest::target]
5079    /// if it holds a `RowKeyPrefix`, `None` if the field is not set or
5080    /// holds a different branch.
5081    pub fn row_key_prefix(&self) -> std::option::Option<&::bytes::Bytes> {
5082        #[allow(unreachable_patterns)]
5083        self.target.as_ref().and_then(|v| match v {
5084            crate::model::drop_row_range_request::Target::RowKeyPrefix(v) => {
5085                std::option::Option::Some(v)
5086            }
5087            _ => std::option::Option::None,
5088        })
5089    }
5090
5091    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
5092    /// to hold a `RowKeyPrefix`.
5093    ///
5094    /// Note that all the setters affecting `target` are
5095    /// mutually exclusive.
5096    ///
5097    /// # Example
5098    /// ```ignore,no_run
5099    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
5100    /// let x = DropRowRangeRequest::new().set_row_key_prefix(bytes::Bytes::from_static(b"example"));
5101    /// assert!(x.row_key_prefix().is_some());
5102    /// assert!(x.delete_all_data_from_table().is_none());
5103    /// ```
5104    pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5105        self.target = std::option::Option::Some(
5106            crate::model::drop_row_range_request::Target::RowKeyPrefix(v.into()),
5107        );
5108        self
5109    }
5110
5111    /// The value of [target][crate::model::DropRowRangeRequest::target]
5112    /// if it holds a `DeleteAllDataFromTable`, `None` if the field is not set or
5113    /// holds a different branch.
5114    pub fn delete_all_data_from_table(&self) -> std::option::Option<&bool> {
5115        #[allow(unreachable_patterns)]
5116        self.target.as_ref().and_then(|v| match v {
5117            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v) => {
5118                std::option::Option::Some(v)
5119            }
5120            _ => std::option::Option::None,
5121        })
5122    }
5123
5124    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
5125    /// to hold a `DeleteAllDataFromTable`.
5126    ///
5127    /// Note that all the setters affecting `target` are
5128    /// mutually exclusive.
5129    ///
5130    /// # Example
5131    /// ```ignore,no_run
5132    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
5133    /// let x = DropRowRangeRequest::new().set_delete_all_data_from_table(true);
5134    /// assert!(x.delete_all_data_from_table().is_some());
5135    /// assert!(x.row_key_prefix().is_none());
5136    /// ```
5137    pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5138        self.target = std::option::Option::Some(
5139            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v.into()),
5140        );
5141        self
5142    }
5143}
5144
5145impl wkt::message::Message for DropRowRangeRequest {
5146    fn typename() -> &'static str {
5147        "type.googleapis.com/google.bigtable.admin.v2.DropRowRangeRequest"
5148    }
5149}
5150
5151/// Defines additional types related to [DropRowRangeRequest].
5152pub mod drop_row_range_request {
5153    #[allow(unused_imports)]
5154    use super::*;
5155
5156    /// Delete all rows or by prefix.
5157    #[derive(Clone, Debug, PartialEq)]
5158    #[non_exhaustive]
5159    pub enum Target {
5160        /// Delete all rows that start with this row key prefix. Prefix cannot be
5161        /// zero length.
5162        RowKeyPrefix(::bytes::Bytes),
5163        /// Delete all rows in the table. Setting this to false is a no-op.
5164        DeleteAllDataFromTable(bool),
5165    }
5166}
5167
5168/// Request message for
5169/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
5170///
5171/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
5172#[derive(Clone, Default, PartialEq)]
5173#[non_exhaustive]
5174pub struct ListTablesRequest {
5175    /// Required. The unique name of the instance for which tables should be
5176    /// listed. Values are of the form `projects/{project}/instances/{instance}`.
5177    pub parent: std::string::String,
5178
5179    /// The view to be applied to the returned tables' fields.
5180    /// NAME_ONLY view (default) and REPLICATION_VIEW are supported.
5181    pub view: crate::model::table::View,
5182
5183    /// Maximum number of results per page.
5184    ///
5185    /// A page_size of zero lets the server choose the number of items to return.
5186    /// A page_size which is strictly positive will return at most that many items.
5187    /// A negative page_size will cause an error.
5188    ///
5189    /// Following the first request, subsequent paginated calls are not required
5190    /// to pass a page_size. If a page_size is set in subsequent calls, it must
5191    /// match the page_size given in the first request.
5192    pub page_size: i32,
5193
5194    /// The value of `next_page_token` returned by a previous call.
5195    pub page_token: std::string::String,
5196
5197    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5198}
5199
5200impl ListTablesRequest {
5201    /// Creates a new default instance.
5202    pub fn new() -> Self {
5203        std::default::Default::default()
5204    }
5205
5206    /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
5207    ///
5208    /// # Example
5209    /// ```ignore,no_run
5210    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
5211    /// # let project_id = "project_id";
5212    /// # let instance_id = "instance_id";
5213    /// let x = ListTablesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
5214    /// ```
5215    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5216        self.parent = v.into();
5217        self
5218    }
5219
5220    /// Sets the value of [view][crate::model::ListTablesRequest::view].
5221    ///
5222    /// # Example
5223    /// ```ignore,no_run
5224    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
5225    /// use google_cloud_bigtable_admin_v2::model::table::View;
5226    /// let x0 = ListTablesRequest::new().set_view(View::NameOnly);
5227    /// let x1 = ListTablesRequest::new().set_view(View::SchemaView);
5228    /// let x2 = ListTablesRequest::new().set_view(View::ReplicationView);
5229    /// ```
5230    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
5231        self.view = v.into();
5232        self
5233    }
5234
5235    /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
5236    ///
5237    /// # Example
5238    /// ```ignore,no_run
5239    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
5240    /// let x = ListTablesRequest::new().set_page_size(42);
5241    /// ```
5242    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5243        self.page_size = v.into();
5244        self
5245    }
5246
5247    /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
5248    ///
5249    /// # Example
5250    /// ```ignore,no_run
5251    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
5252    /// let x = ListTablesRequest::new().set_page_token("example");
5253    /// ```
5254    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5255        self.page_token = v.into();
5256        self
5257    }
5258}
5259
5260impl wkt::message::Message for ListTablesRequest {
5261    fn typename() -> &'static str {
5262        "type.googleapis.com/google.bigtable.admin.v2.ListTablesRequest"
5263    }
5264}
5265
5266/// Response message for
5267/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
5268///
5269/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
5270#[derive(Clone, Default, PartialEq)]
5271#[non_exhaustive]
5272pub struct ListTablesResponse {
5273    /// The tables present in the requested instance.
5274    pub tables: std::vec::Vec<crate::model::Table>,
5275
5276    /// Set if not all tables could be returned in a single response.
5277    /// Pass this value to `page_token` in another request to get the next
5278    /// page of results.
5279    pub next_page_token: std::string::String,
5280
5281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5282}
5283
5284impl ListTablesResponse {
5285    /// Creates a new default instance.
5286    pub fn new() -> Self {
5287        std::default::Default::default()
5288    }
5289
5290    /// Sets the value of [tables][crate::model::ListTablesResponse::tables].
5291    ///
5292    /// # Example
5293    /// ```ignore,no_run
5294    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
5295    /// use google_cloud_bigtable_admin_v2::model::Table;
5296    /// let x = ListTablesResponse::new()
5297    ///     .set_tables([
5298    ///         Table::default()/* use setters */,
5299    ///         Table::default()/* use (different) setters */,
5300    ///     ]);
5301    /// ```
5302    pub fn set_tables<T, V>(mut self, v: T) -> Self
5303    where
5304        T: std::iter::IntoIterator<Item = V>,
5305        V: std::convert::Into<crate::model::Table>,
5306    {
5307        use std::iter::Iterator;
5308        self.tables = v.into_iter().map(|i| i.into()).collect();
5309        self
5310    }
5311
5312    /// Sets the value of [next_page_token][crate::model::ListTablesResponse::next_page_token].
5313    ///
5314    /// # Example
5315    /// ```ignore,no_run
5316    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
5317    /// let x = ListTablesResponse::new().set_next_page_token("example");
5318    /// ```
5319    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5320        self.next_page_token = v.into();
5321        self
5322    }
5323}
5324
5325impl wkt::message::Message for ListTablesResponse {
5326    fn typename() -> &'static str {
5327        "type.googleapis.com/google.bigtable.admin.v2.ListTablesResponse"
5328    }
5329}
5330
5331#[doc(hidden)]
5332impl google_cloud_gax::paginator::internal::PageableResponse for ListTablesResponse {
5333    type PageItem = crate::model::Table;
5334
5335    fn items(self) -> std::vec::Vec<Self::PageItem> {
5336        self.tables
5337    }
5338
5339    fn next_page_token(&self) -> std::string::String {
5340        use std::clone::Clone;
5341        self.next_page_token.clone()
5342    }
5343}
5344
5345/// Request message for
5346/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
5347///
5348/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable]: crate::client::BigtableTableAdmin::get_table
5349#[derive(Clone, Default, PartialEq)]
5350#[non_exhaustive]
5351pub struct GetTableRequest {
5352    /// Required. The unique name of the requested table.
5353    /// Values are of the form
5354    /// `projects/{project}/instances/{instance}/tables/{table}`.
5355    pub name: std::string::String,
5356
5357    /// The view to be applied to the returned table's fields.
5358    /// Defaults to `SCHEMA_VIEW` if unspecified.
5359    pub view: crate::model::table::View,
5360
5361    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5362}
5363
5364impl GetTableRequest {
5365    /// Creates a new default instance.
5366    pub fn new() -> Self {
5367        std::default::Default::default()
5368    }
5369
5370    /// Sets the value of [name][crate::model::GetTableRequest::name].
5371    ///
5372    /// # Example
5373    /// ```ignore,no_run
5374    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
5375    /// # let project_id = "project_id";
5376    /// # let instance_id = "instance_id";
5377    /// # let table_id = "table_id";
5378    /// let x = GetTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5379    /// ```
5380    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5381        self.name = v.into();
5382        self
5383    }
5384
5385    /// Sets the value of [view][crate::model::GetTableRequest::view].
5386    ///
5387    /// # Example
5388    /// ```ignore,no_run
5389    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
5390    /// use google_cloud_bigtable_admin_v2::model::table::View;
5391    /// let x0 = GetTableRequest::new().set_view(View::NameOnly);
5392    /// let x1 = GetTableRequest::new().set_view(View::SchemaView);
5393    /// let x2 = GetTableRequest::new().set_view(View::ReplicationView);
5394    /// ```
5395    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
5396        self.view = v.into();
5397        self
5398    }
5399}
5400
5401impl wkt::message::Message for GetTableRequest {
5402    fn typename() -> &'static str {
5403        "type.googleapis.com/google.bigtable.admin.v2.GetTableRequest"
5404    }
5405}
5406
5407/// The request for
5408/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
5409///
5410/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
5411#[derive(Clone, Default, PartialEq)]
5412#[non_exhaustive]
5413pub struct UpdateTableRequest {
5414    /// Required. The table to update.
5415    /// The table's `name` field is used to identify the table to update.
5416    pub table: std::option::Option<crate::model::Table>,
5417
5418    /// Required. The list of fields to update.
5419    /// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
5420    /// field should be updated. This mask is relative to the `table` field, not to
5421    /// the request message. The wildcard (*) path is currently not supported.
5422    /// Currently UpdateTable is only supported for the following fields:
5423    ///
5424    /// * `change_stream_config`
5425    /// * `change_stream_config.retention_period`
5426    /// * `deletion_protection`
5427    /// * `row_key_schema`
5428    ///
5429    /// If `column_families` is set in `update_mask`, it will return an
5430    /// UNIMPLEMENTED error.
5431    pub update_mask: std::option::Option<wkt::FieldMask>,
5432
5433    /// Optional. If true, ignore safety checks when updating the table.
5434    pub ignore_warnings: bool,
5435
5436    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5437}
5438
5439impl UpdateTableRequest {
5440    /// Creates a new default instance.
5441    pub fn new() -> Self {
5442        std::default::Default::default()
5443    }
5444
5445    /// Sets the value of [table][crate::model::UpdateTableRequest::table].
5446    ///
5447    /// # Example
5448    /// ```ignore,no_run
5449    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5450    /// use google_cloud_bigtable_admin_v2::model::Table;
5451    /// let x = UpdateTableRequest::new().set_table(Table::default()/* use setters */);
5452    /// ```
5453    pub fn set_table<T>(mut self, v: T) -> Self
5454    where
5455        T: std::convert::Into<crate::model::Table>,
5456    {
5457        self.table = std::option::Option::Some(v.into());
5458        self
5459    }
5460
5461    /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
5462    ///
5463    /// # Example
5464    /// ```ignore,no_run
5465    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5466    /// use google_cloud_bigtable_admin_v2::model::Table;
5467    /// let x = UpdateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
5468    /// let x = UpdateTableRequest::new().set_or_clear_table(None::<Table>);
5469    /// ```
5470    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
5471    where
5472        T: std::convert::Into<crate::model::Table>,
5473    {
5474        self.table = v.map(|x| x.into());
5475        self
5476    }
5477
5478    /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
5479    ///
5480    /// # Example
5481    /// ```ignore,no_run
5482    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5483    /// use wkt::FieldMask;
5484    /// let x = UpdateTableRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5485    /// ```
5486    pub fn set_update_mask<T>(mut self, v: T) -> Self
5487    where
5488        T: std::convert::Into<wkt::FieldMask>,
5489    {
5490        self.update_mask = std::option::Option::Some(v.into());
5491        self
5492    }
5493
5494    /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
5495    ///
5496    /// # Example
5497    /// ```ignore,no_run
5498    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5499    /// use wkt::FieldMask;
5500    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5501    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5502    /// ```
5503    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5504    where
5505        T: std::convert::Into<wkt::FieldMask>,
5506    {
5507        self.update_mask = v.map(|x| x.into());
5508        self
5509    }
5510
5511    /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
5512    ///
5513    /// # Example
5514    /// ```ignore,no_run
5515    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5516    /// let x = UpdateTableRequest::new().set_ignore_warnings(true);
5517    /// ```
5518    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5519        self.ignore_warnings = v.into();
5520        self
5521    }
5522}
5523
5524impl wkt::message::Message for UpdateTableRequest {
5525    fn typename() -> &'static str {
5526        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableRequest"
5527    }
5528}
5529
5530/// Metadata type for the operation returned by
5531/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
5532///
5533/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
5534#[derive(Clone, Default, PartialEq)]
5535#[non_exhaustive]
5536pub struct UpdateTableMetadata {
5537    /// The name of the table being updated.
5538    pub name: std::string::String,
5539
5540    /// The time at which this operation started.
5541    pub start_time: std::option::Option<wkt::Timestamp>,
5542
5543    /// If set, the time at which this operation finished or was canceled.
5544    pub end_time: std::option::Option<wkt::Timestamp>,
5545
5546    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5547}
5548
5549impl UpdateTableMetadata {
5550    /// Creates a new default instance.
5551    pub fn new() -> Self {
5552        std::default::Default::default()
5553    }
5554
5555    /// Sets the value of [name][crate::model::UpdateTableMetadata::name].
5556    ///
5557    /// # Example
5558    /// ```ignore,no_run
5559    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5560    /// let x = UpdateTableMetadata::new().set_name("example");
5561    /// ```
5562    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5563        self.name = v.into();
5564        self
5565    }
5566
5567    /// Sets the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5568    ///
5569    /// # Example
5570    /// ```ignore,no_run
5571    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5572    /// use wkt::Timestamp;
5573    /// let x = UpdateTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5574    /// ```
5575    pub fn set_start_time<T>(mut self, v: T) -> Self
5576    where
5577        T: std::convert::Into<wkt::Timestamp>,
5578    {
5579        self.start_time = std::option::Option::Some(v.into());
5580        self
5581    }
5582
5583    /// Sets or clears the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5584    ///
5585    /// # Example
5586    /// ```ignore,no_run
5587    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5588    /// use wkt::Timestamp;
5589    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5590    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5591    /// ```
5592    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5593    where
5594        T: std::convert::Into<wkt::Timestamp>,
5595    {
5596        self.start_time = v.map(|x| x.into());
5597        self
5598    }
5599
5600    /// Sets the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5601    ///
5602    /// # Example
5603    /// ```ignore,no_run
5604    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5605    /// use wkt::Timestamp;
5606    /// let x = UpdateTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5607    /// ```
5608    pub fn set_end_time<T>(mut self, v: T) -> Self
5609    where
5610        T: std::convert::Into<wkt::Timestamp>,
5611    {
5612        self.end_time = std::option::Option::Some(v.into());
5613        self
5614    }
5615
5616    /// Sets or clears the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5617    ///
5618    /// # Example
5619    /// ```ignore,no_run
5620    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5621    /// use wkt::Timestamp;
5622    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5623    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5624    /// ```
5625    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5626    where
5627        T: std::convert::Into<wkt::Timestamp>,
5628    {
5629        self.end_time = v.map(|x| x.into());
5630        self
5631    }
5632}
5633
5634impl wkt::message::Message for UpdateTableMetadata {
5635    fn typename() -> &'static str {
5636        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableMetadata"
5637    }
5638}
5639
5640/// Request message for
5641/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
5642///
5643/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]: crate::client::BigtableTableAdmin::delete_table
5644#[derive(Clone, Default, PartialEq)]
5645#[non_exhaustive]
5646pub struct DeleteTableRequest {
5647    /// Required. The unique name of the table to be deleted.
5648    /// Values are of the form
5649    /// `projects/{project}/instances/{instance}/tables/{table}`.
5650    pub name: std::string::String,
5651
5652    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5653}
5654
5655impl DeleteTableRequest {
5656    /// Creates a new default instance.
5657    pub fn new() -> Self {
5658        std::default::Default::default()
5659    }
5660
5661    /// Sets the value of [name][crate::model::DeleteTableRequest::name].
5662    ///
5663    /// # Example
5664    /// ```ignore,no_run
5665    /// # use google_cloud_bigtable_admin_v2::model::DeleteTableRequest;
5666    /// # let project_id = "project_id";
5667    /// # let instance_id = "instance_id";
5668    /// # let table_id = "table_id";
5669    /// let x = DeleteTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5670    /// ```
5671    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5672        self.name = v.into();
5673        self
5674    }
5675}
5676
5677impl wkt::message::Message for DeleteTableRequest {
5678    fn typename() -> &'static str {
5679        "type.googleapis.com/google.bigtable.admin.v2.DeleteTableRequest"
5680    }
5681}
5682
5683/// Request message for
5684/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
5685///
5686/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5687#[derive(Clone, Default, PartialEq)]
5688#[non_exhaustive]
5689pub struct UndeleteTableRequest {
5690    /// Required. The unique name of the table to be restored.
5691    /// Values are of the form
5692    /// `projects/{project}/instances/{instance}/tables/{table}`.
5693    pub name: std::string::String,
5694
5695    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5696}
5697
5698impl UndeleteTableRequest {
5699    /// Creates a new default instance.
5700    pub fn new() -> Self {
5701        std::default::Default::default()
5702    }
5703
5704    /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
5705    ///
5706    /// # Example
5707    /// ```ignore,no_run
5708    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableRequest;
5709    /// # let project_id = "project_id";
5710    /// # let instance_id = "instance_id";
5711    /// # let table_id = "table_id";
5712    /// let x = UndeleteTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5713    /// ```
5714    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5715        self.name = v.into();
5716        self
5717    }
5718}
5719
5720impl wkt::message::Message for UndeleteTableRequest {
5721    fn typename() -> &'static str {
5722        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableRequest"
5723    }
5724}
5725
5726/// Metadata type for the operation returned by
5727/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
5728///
5729/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5730#[derive(Clone, Default, PartialEq)]
5731#[non_exhaustive]
5732pub struct UndeleteTableMetadata {
5733    /// The name of the table being restored.
5734    pub name: std::string::String,
5735
5736    /// The time at which this operation started.
5737    pub start_time: std::option::Option<wkt::Timestamp>,
5738
5739    /// If set, the time at which this operation finished or was cancelled.
5740    pub end_time: std::option::Option<wkt::Timestamp>,
5741
5742    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5743}
5744
5745impl UndeleteTableMetadata {
5746    /// Creates a new default instance.
5747    pub fn new() -> Self {
5748        std::default::Default::default()
5749    }
5750
5751    /// Sets the value of [name][crate::model::UndeleteTableMetadata::name].
5752    ///
5753    /// # Example
5754    /// ```ignore,no_run
5755    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5756    /// let x = UndeleteTableMetadata::new().set_name("example");
5757    /// ```
5758    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5759        self.name = v.into();
5760        self
5761    }
5762
5763    /// Sets the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5764    ///
5765    /// # Example
5766    /// ```ignore,no_run
5767    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5768    /// use wkt::Timestamp;
5769    /// let x = UndeleteTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5770    /// ```
5771    pub fn set_start_time<T>(mut self, v: T) -> Self
5772    where
5773        T: std::convert::Into<wkt::Timestamp>,
5774    {
5775        self.start_time = std::option::Option::Some(v.into());
5776        self
5777    }
5778
5779    /// Sets or clears the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5780    ///
5781    /// # Example
5782    /// ```ignore,no_run
5783    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5784    /// use wkt::Timestamp;
5785    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5786    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5787    /// ```
5788    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5789    where
5790        T: std::convert::Into<wkt::Timestamp>,
5791    {
5792        self.start_time = v.map(|x| x.into());
5793        self
5794    }
5795
5796    /// Sets the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5797    ///
5798    /// # Example
5799    /// ```ignore,no_run
5800    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5801    /// use wkt::Timestamp;
5802    /// let x = UndeleteTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5803    /// ```
5804    pub fn set_end_time<T>(mut self, v: T) -> Self
5805    where
5806        T: std::convert::Into<wkt::Timestamp>,
5807    {
5808        self.end_time = std::option::Option::Some(v.into());
5809        self
5810    }
5811
5812    /// Sets or clears the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5813    ///
5814    /// # Example
5815    /// ```ignore,no_run
5816    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5817    /// use wkt::Timestamp;
5818    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5819    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5820    /// ```
5821    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5822    where
5823        T: std::convert::Into<wkt::Timestamp>,
5824    {
5825        self.end_time = v.map(|x| x.into());
5826        self
5827    }
5828}
5829
5830impl wkt::message::Message for UndeleteTableMetadata {
5831    fn typename() -> &'static str {
5832        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableMetadata"
5833    }
5834}
5835
5836/// Request message for
5837/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
5838///
5839/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]: crate::client::BigtableTableAdmin::modify_column_families
5840#[derive(Clone, Default, PartialEq)]
5841#[non_exhaustive]
5842pub struct ModifyColumnFamiliesRequest {
5843    /// Required. The unique name of the table whose families should be modified.
5844    /// Values are of the form
5845    /// `projects/{project}/instances/{instance}/tables/{table}`.
5846    pub name: std::string::String,
5847
5848    /// Required. Modifications to be atomically applied to the specified table's
5849    /// families. Entries are applied in order, meaning that earlier modifications
5850    /// can be masked by later ones (in the case of repeated updates to the same
5851    /// family, for example).
5852    pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
5853
5854    /// Optional. If true, ignore safety checks when modifying the column families.
5855    pub ignore_warnings: bool,
5856
5857    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5858}
5859
5860impl ModifyColumnFamiliesRequest {
5861    /// Creates a new default instance.
5862    pub fn new() -> Self {
5863        std::default::Default::default()
5864    }
5865
5866    /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
5867    ///
5868    /// # Example
5869    /// ```ignore,no_run
5870    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5871    /// # let project_id = "project_id";
5872    /// # let instance_id = "instance_id";
5873    /// # let table_id = "table_id";
5874    /// let x = ModifyColumnFamiliesRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5875    /// ```
5876    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5877        self.name = v.into();
5878        self
5879    }
5880
5881    /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
5882    ///
5883    /// # Example
5884    /// ```ignore,no_run
5885    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5886    /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5887    /// let x = ModifyColumnFamiliesRequest::new()
5888    ///     .set_modifications([
5889    ///         Modification::default()/* use setters */,
5890    ///         Modification::default()/* use (different) setters */,
5891    ///     ]);
5892    /// ```
5893    pub fn set_modifications<T, V>(mut self, v: T) -> Self
5894    where
5895        T: std::iter::IntoIterator<Item = V>,
5896        V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5897    {
5898        use std::iter::Iterator;
5899        self.modifications = v.into_iter().map(|i| i.into()).collect();
5900        self
5901    }
5902
5903    /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
5904    ///
5905    /// # Example
5906    /// ```ignore,no_run
5907    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5908    /// let x = ModifyColumnFamiliesRequest::new().set_ignore_warnings(true);
5909    /// ```
5910    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5911        self.ignore_warnings = v.into();
5912        self
5913    }
5914}
5915
5916impl wkt::message::Message for ModifyColumnFamiliesRequest {
5917    fn typename() -> &'static str {
5918        "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"
5919    }
5920}
5921
5922/// Defines additional types related to [ModifyColumnFamiliesRequest].
5923pub mod modify_column_families_request {
5924    #[allow(unused_imports)]
5925    use super::*;
5926
5927    /// A create, update, or delete of a particular column family.
5928    #[derive(Clone, Default, PartialEq)]
5929    #[non_exhaustive]
5930    pub struct Modification {
5931        /// The ID of the column family to be modified.
5932        pub id: std::string::String,
5933
5934        /// Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
5935        /// mod should be updated, ignored for other modification types. If unset or
5936        /// empty, we treat it as updating `gc_rule` to be backward compatible.
5937        pub update_mask: std::option::Option<wkt::FieldMask>,
5938
5939        /// Column family modifications.
5940        pub r#mod:
5941            std::option::Option<crate::model::modify_column_families_request::modification::Mod>,
5942
5943        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5944    }
5945
5946    impl Modification {
5947        /// Creates a new default instance.
5948        pub fn new() -> Self {
5949            std::default::Default::default()
5950        }
5951
5952        /// Sets the value of [id][crate::model::modify_column_families_request::Modification::id].
5953        ///
5954        /// # Example
5955        /// ```ignore,no_run
5956        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5957        /// let x = Modification::new().set_id("example");
5958        /// ```
5959        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5960            self.id = v.into();
5961            self
5962        }
5963
5964        /// Sets the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5965        ///
5966        /// # Example
5967        /// ```ignore,no_run
5968        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5969        /// use wkt::FieldMask;
5970        /// let x = Modification::new().set_update_mask(FieldMask::default()/* use setters */);
5971        /// ```
5972        pub fn set_update_mask<T>(mut self, v: T) -> Self
5973        where
5974            T: std::convert::Into<wkt::FieldMask>,
5975        {
5976            self.update_mask = std::option::Option::Some(v.into());
5977            self
5978        }
5979
5980        /// Sets or clears the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5981        ///
5982        /// # Example
5983        /// ```ignore,no_run
5984        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5985        /// use wkt::FieldMask;
5986        /// let x = Modification::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5987        /// let x = Modification::new().set_or_clear_update_mask(None::<FieldMask>);
5988        /// ```
5989        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5990        where
5991            T: std::convert::Into<wkt::FieldMask>,
5992        {
5993            self.update_mask = v.map(|x| x.into());
5994            self
5995        }
5996
5997        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::mod].
5998        ///
5999        /// Note that all the setters affecting `r#mod` are mutually
6000        /// exclusive.
6001        ///
6002        /// # Example
6003        /// ```ignore,no_run
6004        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
6005        /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::modification::Mod;
6006        /// let x = Modification::new().set_mod(Some(Mod::Drop(true)));
6007        /// ```
6008        pub fn set_mod<
6009            T: std::convert::Into<
6010                    std::option::Option<
6011                        crate::model::modify_column_families_request::modification::Mod,
6012                    >,
6013                >,
6014        >(
6015            mut self,
6016            v: T,
6017        ) -> Self {
6018            self.r#mod = v.into();
6019            self
6020        }
6021
6022        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
6023        /// if it holds a `Create`, `None` if the field is not set or
6024        /// holds a different branch.
6025        pub fn create(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
6026            #[allow(unreachable_patterns)]
6027            self.r#mod.as_ref().and_then(|v| match v {
6028                crate::model::modify_column_families_request::modification::Mod::Create(v) => {
6029                    std::option::Option::Some(v)
6030                }
6031                _ => std::option::Option::None,
6032            })
6033        }
6034
6035        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
6036        /// to hold a `Create`.
6037        ///
6038        /// Note that all the setters affecting `r#mod` are
6039        /// mutually exclusive.
6040        ///
6041        /// # Example
6042        /// ```ignore,no_run
6043        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
6044        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
6045        /// let x = Modification::new().set_create(ColumnFamily::default()/* use setters */);
6046        /// assert!(x.create().is_some());
6047        /// assert!(x.update().is_none());
6048        /// assert!(x.drop().is_none());
6049        /// ```
6050        pub fn set_create<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
6051            mut self,
6052            v: T,
6053        ) -> Self {
6054            self.r#mod = std::option::Option::Some(
6055                crate::model::modify_column_families_request::modification::Mod::Create(v.into()),
6056            );
6057            self
6058        }
6059
6060        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
6061        /// if it holds a `Update`, `None` if the field is not set or
6062        /// holds a different branch.
6063        pub fn update(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
6064            #[allow(unreachable_patterns)]
6065            self.r#mod.as_ref().and_then(|v| match v {
6066                crate::model::modify_column_families_request::modification::Mod::Update(v) => {
6067                    std::option::Option::Some(v)
6068                }
6069                _ => std::option::Option::None,
6070            })
6071        }
6072
6073        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
6074        /// to hold a `Update`.
6075        ///
6076        /// Note that all the setters affecting `r#mod` are
6077        /// mutually exclusive.
6078        ///
6079        /// # Example
6080        /// ```ignore,no_run
6081        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
6082        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
6083        /// let x = Modification::new().set_update(ColumnFamily::default()/* use setters */);
6084        /// assert!(x.update().is_some());
6085        /// assert!(x.create().is_none());
6086        /// assert!(x.drop().is_none());
6087        /// ```
6088        pub fn set_update<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
6089            mut self,
6090            v: T,
6091        ) -> Self {
6092            self.r#mod = std::option::Option::Some(
6093                crate::model::modify_column_families_request::modification::Mod::Update(v.into()),
6094            );
6095            self
6096        }
6097
6098        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
6099        /// if it holds a `Drop`, `None` if the field is not set or
6100        /// holds a different branch.
6101        pub fn drop(&self) -> std::option::Option<&bool> {
6102            #[allow(unreachable_patterns)]
6103            self.r#mod.as_ref().and_then(|v| match v {
6104                crate::model::modify_column_families_request::modification::Mod::Drop(v) => {
6105                    std::option::Option::Some(v)
6106                }
6107                _ => std::option::Option::None,
6108            })
6109        }
6110
6111        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
6112        /// to hold a `Drop`.
6113        ///
6114        /// Note that all the setters affecting `r#mod` are
6115        /// mutually exclusive.
6116        ///
6117        /// # Example
6118        /// ```ignore,no_run
6119        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
6120        /// let x = Modification::new().set_drop(true);
6121        /// assert!(x.drop().is_some());
6122        /// assert!(x.create().is_none());
6123        /// assert!(x.update().is_none());
6124        /// ```
6125        pub fn set_drop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6126            self.r#mod = std::option::Option::Some(
6127                crate::model::modify_column_families_request::modification::Mod::Drop(v.into()),
6128            );
6129            self
6130        }
6131    }
6132
6133    impl wkt::message::Message for Modification {
6134        fn typename() -> &'static str {
6135            "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"
6136        }
6137    }
6138
6139    /// Defines additional types related to [Modification].
6140    pub mod modification {
6141        #[allow(unused_imports)]
6142        use super::*;
6143
6144        /// Column family modifications.
6145        #[derive(Clone, Debug, PartialEq)]
6146        #[non_exhaustive]
6147        pub enum Mod {
6148            /// Create a new column family with the specified schema, or fail if
6149            /// one already exists with the given ID.
6150            Create(std::boxed::Box<crate::model::ColumnFamily>),
6151            /// Update an existing column family to the specified schema, or fail
6152            /// if no column family exists with the given ID.
6153            Update(std::boxed::Box<crate::model::ColumnFamily>),
6154            /// Drop (delete) the column family with the given ID, or fail if no such
6155            /// family exists.
6156            Drop(bool),
6157        }
6158    }
6159}
6160
6161/// Request message for
6162/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
6163///
6164/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
6165#[derive(Clone, Default, PartialEq)]
6166#[non_exhaustive]
6167pub struct GenerateConsistencyTokenRequest {
6168    /// Required. The unique name of the Table for which to create a consistency
6169    /// token. Values are of the form
6170    /// `projects/{project}/instances/{instance}/tables/{table}`.
6171    pub name: std::string::String,
6172
6173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6174}
6175
6176impl GenerateConsistencyTokenRequest {
6177    /// Creates a new default instance.
6178    pub fn new() -> Self {
6179        std::default::Default::default()
6180    }
6181
6182    /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
6183    ///
6184    /// # Example
6185    /// ```ignore,no_run
6186    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenRequest;
6187    /// # let project_id = "project_id";
6188    /// # let instance_id = "instance_id";
6189    /// # let table_id = "table_id";
6190    /// let x = GenerateConsistencyTokenRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
6191    /// ```
6192    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6193        self.name = v.into();
6194        self
6195    }
6196}
6197
6198impl wkt::message::Message for GenerateConsistencyTokenRequest {
6199    fn typename() -> &'static str {
6200        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"
6201    }
6202}
6203
6204/// Response message for
6205/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
6206///
6207/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
6208#[derive(Clone, Default, PartialEq)]
6209#[non_exhaustive]
6210pub struct GenerateConsistencyTokenResponse {
6211    /// The generated consistency token.
6212    pub consistency_token: std::string::String,
6213
6214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6215}
6216
6217impl GenerateConsistencyTokenResponse {
6218    /// Creates a new default instance.
6219    pub fn new() -> Self {
6220        std::default::Default::default()
6221    }
6222
6223    /// Sets the value of [consistency_token][crate::model::GenerateConsistencyTokenResponse::consistency_token].
6224    ///
6225    /// # Example
6226    /// ```ignore,no_run
6227    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenResponse;
6228    /// let x = GenerateConsistencyTokenResponse::new().set_consistency_token("example");
6229    /// ```
6230    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
6231        mut self,
6232        v: T,
6233    ) -> Self {
6234        self.consistency_token = v.into();
6235        self
6236    }
6237}
6238
6239impl wkt::message::Message for GenerateConsistencyTokenResponse {
6240    fn typename() -> &'static str {
6241        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"
6242    }
6243}
6244
6245/// Request message for
6246/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
6247///
6248/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
6249#[derive(Clone, Default, PartialEq)]
6250#[non_exhaustive]
6251pub struct CheckConsistencyRequest {
6252    /// Required. The unique name of the Table for which to check replication
6253    /// consistency. Values are of the form
6254    /// `projects/{project}/instances/{instance}/tables/{table}`.
6255    pub name: std::string::String,
6256
6257    /// Required. The token created using GenerateConsistencyToken for the Table.
6258    pub consistency_token: std::string::String,
6259
6260    /// Which type of read needs to consistently observe which type of write?
6261    /// Default: `standard_read_remote_writes`
6262    pub mode: std::option::Option<crate::model::check_consistency_request::Mode>,
6263
6264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6265}
6266
6267impl CheckConsistencyRequest {
6268    /// Creates a new default instance.
6269    pub fn new() -> Self {
6270        std::default::Default::default()
6271    }
6272
6273    /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
6274    ///
6275    /// # Example
6276    /// ```ignore,no_run
6277    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
6278    /// # let project_id = "project_id";
6279    /// # let instance_id = "instance_id";
6280    /// # let table_id = "table_id";
6281    /// let x = CheckConsistencyRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
6282    /// ```
6283    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6284        self.name = v.into();
6285        self
6286    }
6287
6288    /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
6289    ///
6290    /// # Example
6291    /// ```ignore,no_run
6292    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
6293    /// let x = CheckConsistencyRequest::new().set_consistency_token("example");
6294    /// ```
6295    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
6296        mut self,
6297        v: T,
6298    ) -> Self {
6299        self.consistency_token = v.into();
6300        self
6301    }
6302
6303    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
6304    ///
6305    /// Note that all the setters affecting `mode` are mutually
6306    /// exclusive.
6307    ///
6308    /// # Example
6309    /// ```ignore,no_run
6310    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
6311    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
6312    /// let x = CheckConsistencyRequest::new().set_mode(Some(
6313    ///     google_cloud_bigtable_admin_v2::model::check_consistency_request::Mode::StandardReadRemoteWrites(StandardReadRemoteWrites::default().into())));
6314    /// ```
6315    pub fn set_mode<
6316        T: std::convert::Into<std::option::Option<crate::model::check_consistency_request::Mode>>,
6317    >(
6318        mut self,
6319        v: T,
6320    ) -> Self {
6321        self.mode = v.into();
6322        self
6323    }
6324
6325    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
6326    /// if it holds a `StandardReadRemoteWrites`, `None` if the field is not set or
6327    /// holds a different branch.
6328    pub fn standard_read_remote_writes(
6329        &self,
6330    ) -> std::option::Option<&std::boxed::Box<crate::model::StandardReadRemoteWrites>> {
6331        #[allow(unreachable_patterns)]
6332        self.mode.as_ref().and_then(|v| match v {
6333            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v) => {
6334                std::option::Option::Some(v)
6335            }
6336            _ => std::option::Option::None,
6337        })
6338    }
6339
6340    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
6341    /// to hold a `StandardReadRemoteWrites`.
6342    ///
6343    /// Note that all the setters affecting `mode` are
6344    /// mutually exclusive.
6345    ///
6346    /// # Example
6347    /// ```ignore,no_run
6348    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
6349    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
6350    /// let x = CheckConsistencyRequest::new().set_standard_read_remote_writes(StandardReadRemoteWrites::default()/* use setters */);
6351    /// assert!(x.standard_read_remote_writes().is_some());
6352    /// assert!(x.data_boost_read_local_writes().is_none());
6353    /// ```
6354    pub fn set_standard_read_remote_writes<
6355        T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
6356    >(
6357        mut self,
6358        v: T,
6359    ) -> Self {
6360        self.mode = std::option::Option::Some(
6361            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v.into()),
6362        );
6363        self
6364    }
6365
6366    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
6367    /// if it holds a `DataBoostReadLocalWrites`, `None` if the field is not set or
6368    /// holds a different branch.
6369    pub fn data_boost_read_local_writes(
6370        &self,
6371    ) -> std::option::Option<&std::boxed::Box<crate::model::DataBoostReadLocalWrites>> {
6372        #[allow(unreachable_patterns)]
6373        self.mode.as_ref().and_then(|v| match v {
6374            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v) => {
6375                std::option::Option::Some(v)
6376            }
6377            _ => std::option::Option::None,
6378        })
6379    }
6380
6381    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
6382    /// to hold a `DataBoostReadLocalWrites`.
6383    ///
6384    /// Note that all the setters affecting `mode` are
6385    /// mutually exclusive.
6386    ///
6387    /// # Example
6388    /// ```ignore,no_run
6389    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
6390    /// use google_cloud_bigtable_admin_v2::model::DataBoostReadLocalWrites;
6391    /// let x = CheckConsistencyRequest::new().set_data_boost_read_local_writes(DataBoostReadLocalWrites::default()/* use setters */);
6392    /// assert!(x.data_boost_read_local_writes().is_some());
6393    /// assert!(x.standard_read_remote_writes().is_none());
6394    /// ```
6395    pub fn set_data_boost_read_local_writes<
6396        T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
6397    >(
6398        mut self,
6399        v: T,
6400    ) -> Self {
6401        self.mode = std::option::Option::Some(
6402            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v.into()),
6403        );
6404        self
6405    }
6406}
6407
6408impl wkt::message::Message for CheckConsistencyRequest {
6409    fn typename() -> &'static str {
6410        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyRequest"
6411    }
6412}
6413
6414/// Defines additional types related to [CheckConsistencyRequest].
6415pub mod check_consistency_request {
6416    #[allow(unused_imports)]
6417    use super::*;
6418
6419    /// Which type of read needs to consistently observe which type of write?
6420    /// Default: `standard_read_remote_writes`
6421    #[derive(Clone, Debug, PartialEq)]
6422    #[non_exhaustive]
6423    pub enum Mode {
6424        /// Checks that reads using an app profile with `StandardIsolation` can
6425        /// see all writes committed before the token was created, even if the
6426        /// read and write target different clusters.
6427        StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
6428        /// Checks that reads using an app profile with `DataBoostIsolationReadOnly`
6429        /// can see all writes committed before the token was created, but only if
6430        /// the read and write target the same cluster.
6431        DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
6432    }
6433}
6434
6435/// Checks that all writes before the consistency token was generated are
6436/// replicated in every cluster and readable.
6437#[derive(Clone, Default, PartialEq)]
6438#[non_exhaustive]
6439pub struct StandardReadRemoteWrites {
6440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6441}
6442
6443impl StandardReadRemoteWrites {
6444    /// Creates a new default instance.
6445    pub fn new() -> Self {
6446        std::default::Default::default()
6447    }
6448}
6449
6450impl wkt::message::Message for StandardReadRemoteWrites {
6451    fn typename() -> &'static str {
6452        "type.googleapis.com/google.bigtable.admin.v2.StandardReadRemoteWrites"
6453    }
6454}
6455
6456/// Checks that all writes before the consistency token was generated in the same
6457/// cluster are readable by Databoost.
6458#[derive(Clone, Default, PartialEq)]
6459#[non_exhaustive]
6460pub struct DataBoostReadLocalWrites {
6461    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6462}
6463
6464impl DataBoostReadLocalWrites {
6465    /// Creates a new default instance.
6466    pub fn new() -> Self {
6467        std::default::Default::default()
6468    }
6469}
6470
6471impl wkt::message::Message for DataBoostReadLocalWrites {
6472    fn typename() -> &'static str {
6473        "type.googleapis.com/google.bigtable.admin.v2.DataBoostReadLocalWrites"
6474    }
6475}
6476
6477/// Response message for
6478/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
6479///
6480/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
6481#[derive(Clone, Default, PartialEq)]
6482#[non_exhaustive]
6483pub struct CheckConsistencyResponse {
6484    /// True only if the token is consistent. A token is consistent if replication
6485    /// has caught up with the restrictions specified in the request.
6486    pub consistent: bool,
6487
6488    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6489}
6490
6491impl CheckConsistencyResponse {
6492    /// Creates a new default instance.
6493    pub fn new() -> Self {
6494        std::default::Default::default()
6495    }
6496
6497    /// Sets the value of [consistent][crate::model::CheckConsistencyResponse::consistent].
6498    ///
6499    /// # Example
6500    /// ```ignore,no_run
6501    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyResponse;
6502    /// let x = CheckConsistencyResponse::new().set_consistent(true);
6503    /// ```
6504    pub fn set_consistent<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6505        self.consistent = v.into();
6506        self
6507    }
6508}
6509
6510impl wkt::message::Message for CheckConsistencyResponse {
6511    fn typename() -> &'static str {
6512        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyResponse"
6513    }
6514}
6515
6516/// Request message for
6517/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
6518///
6519/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6520/// feature is not currently available to most Cloud Bigtable customers. This
6521/// feature might be changed in backward-incompatible ways and is not recommended
6522/// for production use. It is not subject to any SLA or deprecation policy.
6523///
6524/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]: crate::client::BigtableTableAdmin::snapshot_table
6525#[derive(Clone, Default, PartialEq)]
6526#[non_exhaustive]
6527pub struct SnapshotTableRequest {
6528    /// Required. The unique name of the table to have the snapshot taken.
6529    /// Values are of the form
6530    /// `projects/{project}/instances/{instance}/tables/{table}`.
6531    pub name: std::string::String,
6532
6533    /// Required. The name of the cluster where the snapshot will be created in.
6534    /// Values are of the form
6535    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6536    pub cluster: std::string::String,
6537
6538    /// Required. The ID by which the new snapshot should be referred to within the
6539    /// parent cluster, e.g., `mysnapshot` of the form:
6540    /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
6541    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
6542    pub snapshot_id: std::string::String,
6543
6544    /// The amount of time that the new snapshot can stay active after it is
6545    /// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
6546    /// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
6547    /// specified, the default value of 24 hours will be used.
6548    pub ttl: std::option::Option<wkt::Duration>,
6549
6550    /// Description of the snapshot.
6551    pub description: std::string::String,
6552
6553    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6554}
6555
6556impl SnapshotTableRequest {
6557    /// Creates a new default instance.
6558    pub fn new() -> Self {
6559        std::default::Default::default()
6560    }
6561
6562    /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
6563    ///
6564    /// # Example
6565    /// ```ignore,no_run
6566    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6567    /// # let project_id = "project_id";
6568    /// # let instance_id = "instance_id";
6569    /// # let table_id = "table_id";
6570    /// let x = SnapshotTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
6571    /// ```
6572    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6573        self.name = v.into();
6574        self
6575    }
6576
6577    /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
6578    ///
6579    /// # Example
6580    /// ```ignore,no_run
6581    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6582    /// # let project_id = "project_id";
6583    /// # let instance_id = "instance_id";
6584    /// # let cluster_id = "cluster_id";
6585    /// let x = SnapshotTableRequest::new().set_cluster(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6586    /// ```
6587    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6588        self.cluster = v.into();
6589        self
6590    }
6591
6592    /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
6593    ///
6594    /// # Example
6595    /// ```ignore,no_run
6596    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6597    /// let x = SnapshotTableRequest::new().set_snapshot_id("example");
6598    /// ```
6599    pub fn set_snapshot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6600        self.snapshot_id = v.into();
6601        self
6602    }
6603
6604    /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6605    ///
6606    /// # Example
6607    /// ```ignore,no_run
6608    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6609    /// use wkt::Duration;
6610    /// let x = SnapshotTableRequest::new().set_ttl(Duration::default()/* use setters */);
6611    /// ```
6612    pub fn set_ttl<T>(mut self, v: T) -> Self
6613    where
6614        T: std::convert::Into<wkt::Duration>,
6615    {
6616        self.ttl = std::option::Option::Some(v.into());
6617        self
6618    }
6619
6620    /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6621    ///
6622    /// # Example
6623    /// ```ignore,no_run
6624    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6625    /// use wkt::Duration;
6626    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(Some(Duration::default()/* use setters */));
6627    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(None::<Duration>);
6628    /// ```
6629    pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
6630    where
6631        T: std::convert::Into<wkt::Duration>,
6632    {
6633        self.ttl = v.map(|x| x.into());
6634        self
6635    }
6636
6637    /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
6638    ///
6639    /// # Example
6640    /// ```ignore,no_run
6641    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6642    /// let x = SnapshotTableRequest::new().set_description("example");
6643    /// ```
6644    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6645        self.description = v.into();
6646        self
6647    }
6648}
6649
6650impl wkt::message::Message for SnapshotTableRequest {
6651    fn typename() -> &'static str {
6652        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableRequest"
6653    }
6654}
6655
6656/// Request message for
6657/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
6658///
6659/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6660/// feature is not currently available to most Cloud Bigtable customers. This
6661/// feature might be changed in backward-incompatible ways and is not recommended
6662/// for production use. It is not subject to any SLA or deprecation policy.
6663///
6664/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]: crate::client::BigtableTableAdmin::get_snapshot
6665#[derive(Clone, Default, PartialEq)]
6666#[non_exhaustive]
6667pub struct GetSnapshotRequest {
6668    /// Required. The unique name of the requested snapshot.
6669    /// Values are of the form
6670    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6671    pub name: std::string::String,
6672
6673    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6674}
6675
6676impl GetSnapshotRequest {
6677    /// Creates a new default instance.
6678    pub fn new() -> Self {
6679        std::default::Default::default()
6680    }
6681
6682    /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
6683    ///
6684    /// # Example
6685    /// ```ignore,no_run
6686    /// # use google_cloud_bigtable_admin_v2::model::GetSnapshotRequest;
6687    /// # let project_id = "project_id";
6688    /// # let instance_id = "instance_id";
6689    /// # let cluster_id = "cluster_id";
6690    /// # let snapshot_id = "snapshot_id";
6691    /// let x = GetSnapshotRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
6692    /// ```
6693    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6694        self.name = v.into();
6695        self
6696    }
6697}
6698
6699impl wkt::message::Message for GetSnapshotRequest {
6700    fn typename() -> &'static str {
6701        "type.googleapis.com/google.bigtable.admin.v2.GetSnapshotRequest"
6702    }
6703}
6704
6705/// Request message for
6706/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6707///
6708/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6709/// feature is not currently available to most Cloud Bigtable customers. This
6710/// feature might be changed in backward-incompatible ways and is not recommended
6711/// for production use. It is not subject to any SLA or deprecation policy.
6712///
6713/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6714#[derive(Clone, Default, PartialEq)]
6715#[non_exhaustive]
6716pub struct ListSnapshotsRequest {
6717    /// Required. The unique name of the cluster for which snapshots should be
6718    /// listed. Values are of the form
6719    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6720    /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
6721    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6722    pub parent: std::string::String,
6723
6724    /// The maximum number of snapshots to return per page.
6725    /// CURRENTLY UNIMPLEMENTED AND IGNORED.
6726    pub page_size: i32,
6727
6728    /// The value of `next_page_token` returned by a previous call.
6729    pub page_token: std::string::String,
6730
6731    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6732}
6733
6734impl ListSnapshotsRequest {
6735    /// Creates a new default instance.
6736    pub fn new() -> Self {
6737        std::default::Default::default()
6738    }
6739
6740    /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
6741    ///
6742    /// # Example
6743    /// ```ignore,no_run
6744    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6745    /// # let project_id = "project_id";
6746    /// # let instance_id = "instance_id";
6747    /// # let cluster_id = "cluster_id";
6748    /// let x = ListSnapshotsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6749    /// ```
6750    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6751        self.parent = v.into();
6752        self
6753    }
6754
6755    /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
6756    ///
6757    /// # Example
6758    /// ```ignore,no_run
6759    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6760    /// let x = ListSnapshotsRequest::new().set_page_size(42);
6761    /// ```
6762    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6763        self.page_size = v.into();
6764        self
6765    }
6766
6767    /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
6768    ///
6769    /// # Example
6770    /// ```ignore,no_run
6771    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6772    /// let x = ListSnapshotsRequest::new().set_page_token("example");
6773    /// ```
6774    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6775        self.page_token = v.into();
6776        self
6777    }
6778}
6779
6780impl wkt::message::Message for ListSnapshotsRequest {
6781    fn typename() -> &'static str {
6782        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsRequest"
6783    }
6784}
6785
6786/// Response message for
6787/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6788///
6789/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6790/// feature is not currently available to most Cloud Bigtable customers. This
6791/// feature might be changed in backward-incompatible ways and is not recommended
6792/// for production use. It is not subject to any SLA or deprecation policy.
6793///
6794/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6795#[derive(Clone, Default, PartialEq)]
6796#[non_exhaustive]
6797pub struct ListSnapshotsResponse {
6798    /// The snapshots present in the requested cluster.
6799    pub snapshots: std::vec::Vec<crate::model::Snapshot>,
6800
6801    /// Set if not all snapshots could be returned in a single response.
6802    /// Pass this value to `page_token` in another request to get the next
6803    /// page of results.
6804    pub next_page_token: std::string::String,
6805
6806    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6807}
6808
6809impl ListSnapshotsResponse {
6810    /// Creates a new default instance.
6811    pub fn new() -> Self {
6812        std::default::Default::default()
6813    }
6814
6815    /// Sets the value of [snapshots][crate::model::ListSnapshotsResponse::snapshots].
6816    ///
6817    /// # Example
6818    /// ```ignore,no_run
6819    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6820    /// use google_cloud_bigtable_admin_v2::model::Snapshot;
6821    /// let x = ListSnapshotsResponse::new()
6822    ///     .set_snapshots([
6823    ///         Snapshot::default()/* use setters */,
6824    ///         Snapshot::default()/* use (different) setters */,
6825    ///     ]);
6826    /// ```
6827    pub fn set_snapshots<T, V>(mut self, v: T) -> Self
6828    where
6829        T: std::iter::IntoIterator<Item = V>,
6830        V: std::convert::Into<crate::model::Snapshot>,
6831    {
6832        use std::iter::Iterator;
6833        self.snapshots = v.into_iter().map(|i| i.into()).collect();
6834        self
6835    }
6836
6837    /// Sets the value of [next_page_token][crate::model::ListSnapshotsResponse::next_page_token].
6838    ///
6839    /// # Example
6840    /// ```ignore,no_run
6841    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6842    /// let x = ListSnapshotsResponse::new().set_next_page_token("example");
6843    /// ```
6844    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6845        self.next_page_token = v.into();
6846        self
6847    }
6848}
6849
6850impl wkt::message::Message for ListSnapshotsResponse {
6851    fn typename() -> &'static str {
6852        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsResponse"
6853    }
6854}
6855
6856#[doc(hidden)]
6857impl google_cloud_gax::paginator::internal::PageableResponse for ListSnapshotsResponse {
6858    type PageItem = crate::model::Snapshot;
6859
6860    fn items(self) -> std::vec::Vec<Self::PageItem> {
6861        self.snapshots
6862    }
6863
6864    fn next_page_token(&self) -> std::string::String {
6865        use std::clone::Clone;
6866        self.next_page_token.clone()
6867    }
6868}
6869
6870/// Request message for
6871/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
6872///
6873/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6874/// feature is not currently available to most Cloud Bigtable customers. This
6875/// feature might be changed in backward-incompatible ways and is not recommended
6876/// for production use. It is not subject to any SLA or deprecation policy.
6877///
6878/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]: crate::client::BigtableTableAdmin::delete_snapshot
6879#[derive(Clone, Default, PartialEq)]
6880#[non_exhaustive]
6881pub struct DeleteSnapshotRequest {
6882    /// Required. The unique name of the snapshot to be deleted.
6883    /// Values are of the form
6884    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6885    pub name: std::string::String,
6886
6887    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6888}
6889
6890impl DeleteSnapshotRequest {
6891    /// Creates a new default instance.
6892    pub fn new() -> Self {
6893        std::default::Default::default()
6894    }
6895
6896    /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
6897    ///
6898    /// # Example
6899    /// ```ignore,no_run
6900    /// # use google_cloud_bigtable_admin_v2::model::DeleteSnapshotRequest;
6901    /// # let project_id = "project_id";
6902    /// # let instance_id = "instance_id";
6903    /// # let cluster_id = "cluster_id";
6904    /// # let snapshot_id = "snapshot_id";
6905    /// let x = DeleteSnapshotRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
6906    /// ```
6907    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6908        self.name = v.into();
6909        self
6910    }
6911}
6912
6913impl wkt::message::Message for DeleteSnapshotRequest {
6914    fn typename() -> &'static str {
6915        "type.googleapis.com/google.bigtable.admin.v2.DeleteSnapshotRequest"
6916    }
6917}
6918
6919/// The metadata for the Operation returned by SnapshotTable.
6920///
6921/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6922/// feature is not currently available to most Cloud Bigtable customers. This
6923/// feature might be changed in backward-incompatible ways and is not recommended
6924/// for production use. It is not subject to any SLA or deprecation policy.
6925#[derive(Clone, Default, PartialEq)]
6926#[non_exhaustive]
6927pub struct SnapshotTableMetadata {
6928    /// The request that prompted the initiation of this SnapshotTable operation.
6929    pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
6930
6931    /// The time at which the original request was received.
6932    pub request_time: std::option::Option<wkt::Timestamp>,
6933
6934    /// The time at which the operation failed or was completed successfully.
6935    pub finish_time: std::option::Option<wkt::Timestamp>,
6936
6937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6938}
6939
6940impl SnapshotTableMetadata {
6941    /// Creates a new default instance.
6942    pub fn new() -> Self {
6943        std::default::Default::default()
6944    }
6945
6946    /// Sets the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6947    ///
6948    /// # Example
6949    /// ```ignore,no_run
6950    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6951    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6952    /// let x = SnapshotTableMetadata::new().set_original_request(SnapshotTableRequest::default()/* use setters */);
6953    /// ```
6954    pub fn set_original_request<T>(mut self, v: T) -> Self
6955    where
6956        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6957    {
6958        self.original_request = std::option::Option::Some(v.into());
6959        self
6960    }
6961
6962    /// Sets or clears the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6963    ///
6964    /// # Example
6965    /// ```ignore,no_run
6966    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6967    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6968    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(Some(SnapshotTableRequest::default()/* use setters */));
6969    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(None::<SnapshotTableRequest>);
6970    /// ```
6971    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6972    where
6973        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6974    {
6975        self.original_request = v.map(|x| x.into());
6976        self
6977    }
6978
6979    /// Sets the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6980    ///
6981    /// # Example
6982    /// ```ignore,no_run
6983    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6984    /// use wkt::Timestamp;
6985    /// let x = SnapshotTableMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6986    /// ```
6987    pub fn set_request_time<T>(mut self, v: T) -> Self
6988    where
6989        T: std::convert::Into<wkt::Timestamp>,
6990    {
6991        self.request_time = std::option::Option::Some(v.into());
6992        self
6993    }
6994
6995    /// Sets or clears the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6996    ///
6997    /// # Example
6998    /// ```ignore,no_run
6999    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
7000    /// use wkt::Timestamp;
7001    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
7002    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(None::<Timestamp>);
7003    /// ```
7004    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7005    where
7006        T: std::convert::Into<wkt::Timestamp>,
7007    {
7008        self.request_time = v.map(|x| x.into());
7009        self
7010    }
7011
7012    /// Sets the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
7013    ///
7014    /// # Example
7015    /// ```ignore,no_run
7016    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
7017    /// use wkt::Timestamp;
7018    /// let x = SnapshotTableMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
7019    /// ```
7020    pub fn set_finish_time<T>(mut self, v: T) -> Self
7021    where
7022        T: std::convert::Into<wkt::Timestamp>,
7023    {
7024        self.finish_time = std::option::Option::Some(v.into());
7025        self
7026    }
7027
7028    /// Sets or clears the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
7029    ///
7030    /// # Example
7031    /// ```ignore,no_run
7032    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
7033    /// use wkt::Timestamp;
7034    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
7035    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
7036    /// ```
7037    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
7038    where
7039        T: std::convert::Into<wkt::Timestamp>,
7040    {
7041        self.finish_time = v.map(|x| x.into());
7042        self
7043    }
7044}
7045
7046impl wkt::message::Message for SnapshotTableMetadata {
7047    fn typename() -> &'static str {
7048        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableMetadata"
7049    }
7050}
7051
7052/// The metadata for the Operation returned by CreateTableFromSnapshot.
7053///
7054/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
7055/// feature is not currently available to most Cloud Bigtable customers. This
7056/// feature might be changed in backward-incompatible ways and is not recommended
7057/// for production use. It is not subject to any SLA or deprecation policy.
7058#[derive(Clone, Default, PartialEq)]
7059#[non_exhaustive]
7060pub struct CreateTableFromSnapshotMetadata {
7061    /// The request that prompted the initiation of this CreateTableFromSnapshot
7062    /// operation.
7063    pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
7064
7065    /// The time at which the original request was received.
7066    pub request_time: std::option::Option<wkt::Timestamp>,
7067
7068    /// The time at which the operation failed or was completed successfully.
7069    pub finish_time: std::option::Option<wkt::Timestamp>,
7070
7071    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7072}
7073
7074impl CreateTableFromSnapshotMetadata {
7075    /// Creates a new default instance.
7076    pub fn new() -> Self {
7077        std::default::Default::default()
7078    }
7079
7080    /// Sets the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
7081    ///
7082    /// # Example
7083    /// ```ignore,no_run
7084    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
7085    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
7086    /// let x = CreateTableFromSnapshotMetadata::new().set_original_request(CreateTableFromSnapshotRequest::default()/* use setters */);
7087    /// ```
7088    pub fn set_original_request<T>(mut self, v: T) -> Self
7089    where
7090        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
7091    {
7092        self.original_request = std::option::Option::Some(v.into());
7093        self
7094    }
7095
7096    /// Sets or clears the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
7097    ///
7098    /// # Example
7099    /// ```ignore,no_run
7100    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
7101    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
7102    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(Some(CreateTableFromSnapshotRequest::default()/* use setters */));
7103    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(None::<CreateTableFromSnapshotRequest>);
7104    /// ```
7105    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
7106    where
7107        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
7108    {
7109        self.original_request = v.map(|x| x.into());
7110        self
7111    }
7112
7113    /// Sets the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
7114    ///
7115    /// # Example
7116    /// ```ignore,no_run
7117    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
7118    /// use wkt::Timestamp;
7119    /// let x = CreateTableFromSnapshotMetadata::new().set_request_time(Timestamp::default()/* use setters */);
7120    /// ```
7121    pub fn set_request_time<T>(mut self, v: T) -> Self
7122    where
7123        T: std::convert::Into<wkt::Timestamp>,
7124    {
7125        self.request_time = std::option::Option::Some(v.into());
7126        self
7127    }
7128
7129    /// Sets or clears the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
7130    ///
7131    /// # Example
7132    /// ```ignore,no_run
7133    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
7134    /// use wkt::Timestamp;
7135    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
7136    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(None::<Timestamp>);
7137    /// ```
7138    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7139    where
7140        T: std::convert::Into<wkt::Timestamp>,
7141    {
7142        self.request_time = v.map(|x| x.into());
7143        self
7144    }
7145
7146    /// Sets the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
7147    ///
7148    /// # Example
7149    /// ```ignore,no_run
7150    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
7151    /// use wkt::Timestamp;
7152    /// let x = CreateTableFromSnapshotMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
7153    /// ```
7154    pub fn set_finish_time<T>(mut self, v: T) -> Self
7155    where
7156        T: std::convert::Into<wkt::Timestamp>,
7157    {
7158        self.finish_time = std::option::Option::Some(v.into());
7159        self
7160    }
7161
7162    /// Sets or clears the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
7163    ///
7164    /// # Example
7165    /// ```ignore,no_run
7166    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
7167    /// use wkt::Timestamp;
7168    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
7169    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
7170    /// ```
7171    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
7172    where
7173        T: std::convert::Into<wkt::Timestamp>,
7174    {
7175        self.finish_time = v.map(|x| x.into());
7176        self
7177    }
7178}
7179
7180impl wkt::message::Message for CreateTableFromSnapshotMetadata {
7181    fn typename() -> &'static str {
7182        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"
7183    }
7184}
7185
7186/// The request for
7187/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
7188///
7189/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
7190#[derive(Clone, Default, PartialEq)]
7191#[non_exhaustive]
7192pub struct CreateBackupRequest {
7193    /// Required. This must be one of the clusters in the instance in which this
7194    /// table is located. The backup will be stored in this cluster. Values are
7195    /// of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
7196    pub parent: std::string::String,
7197
7198    /// Required. The id of the backup to be created. The `backup_id` along with
7199    /// the parent `parent` are combined as {parent}/backups/{backup_id} to create
7200    /// the full backup name, of the form:
7201    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
7202    /// This string must be between 1 and 50 characters in length and match the
7203    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
7204    pub backup_id: std::string::String,
7205
7206    /// Required. The backup to create.
7207    pub backup: std::option::Option<crate::model::Backup>,
7208
7209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7210}
7211
7212impl CreateBackupRequest {
7213    /// Creates a new default instance.
7214    pub fn new() -> Self {
7215        std::default::Default::default()
7216    }
7217
7218    /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
7219    ///
7220    /// # Example
7221    /// ```ignore,no_run
7222    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
7223    /// # let project_id = "project_id";
7224    /// # let instance_id = "instance_id";
7225    /// # let cluster_id = "cluster_id";
7226    /// let x = CreateBackupRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
7227    /// ```
7228    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7229        self.parent = v.into();
7230        self
7231    }
7232
7233    /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
7234    ///
7235    /// # Example
7236    /// ```ignore,no_run
7237    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
7238    /// let x = CreateBackupRequest::new().set_backup_id("example");
7239    /// ```
7240    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7241        self.backup_id = v.into();
7242        self
7243    }
7244
7245    /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
7246    ///
7247    /// # Example
7248    /// ```ignore,no_run
7249    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
7250    /// use google_cloud_bigtable_admin_v2::model::Backup;
7251    /// let x = CreateBackupRequest::new().set_backup(Backup::default()/* use setters */);
7252    /// ```
7253    pub fn set_backup<T>(mut self, v: T) -> Self
7254    where
7255        T: std::convert::Into<crate::model::Backup>,
7256    {
7257        self.backup = std::option::Option::Some(v.into());
7258        self
7259    }
7260
7261    /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
7262    ///
7263    /// # Example
7264    /// ```ignore,no_run
7265    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
7266    /// use google_cloud_bigtable_admin_v2::model::Backup;
7267    /// let x = CreateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
7268    /// let x = CreateBackupRequest::new().set_or_clear_backup(None::<Backup>);
7269    /// ```
7270    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
7271    where
7272        T: std::convert::Into<crate::model::Backup>,
7273    {
7274        self.backup = v.map(|x| x.into());
7275        self
7276    }
7277}
7278
7279impl wkt::message::Message for CreateBackupRequest {
7280    fn typename() -> &'static str {
7281        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupRequest"
7282    }
7283}
7284
7285/// Metadata type for the operation returned by
7286/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
7287///
7288/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
7289#[derive(Clone, Default, PartialEq)]
7290#[non_exhaustive]
7291pub struct CreateBackupMetadata {
7292    /// The name of the backup being created.
7293    pub name: std::string::String,
7294
7295    /// The name of the table the backup is created from.
7296    pub source_table: std::string::String,
7297
7298    /// The time at which this operation started.
7299    pub start_time: std::option::Option<wkt::Timestamp>,
7300
7301    /// If set, the time at which this operation finished or was cancelled.
7302    pub end_time: std::option::Option<wkt::Timestamp>,
7303
7304    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7305}
7306
7307impl CreateBackupMetadata {
7308    /// Creates a new default instance.
7309    pub fn new() -> Self {
7310        std::default::Default::default()
7311    }
7312
7313    /// Sets the value of [name][crate::model::CreateBackupMetadata::name].
7314    ///
7315    /// # Example
7316    /// ```ignore,no_run
7317    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
7318    /// let x = CreateBackupMetadata::new().set_name("example");
7319    /// ```
7320    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7321        self.name = v.into();
7322        self
7323    }
7324
7325    /// Sets the value of [source_table][crate::model::CreateBackupMetadata::source_table].
7326    ///
7327    /// # Example
7328    /// ```ignore,no_run
7329    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
7330    /// let x = CreateBackupMetadata::new().set_source_table("example");
7331    /// ```
7332    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7333        self.source_table = v.into();
7334        self
7335    }
7336
7337    /// Sets the value of [start_time][crate::model::CreateBackupMetadata::start_time].
7338    ///
7339    /// # Example
7340    /// ```ignore,no_run
7341    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
7342    /// use wkt::Timestamp;
7343    /// let x = CreateBackupMetadata::new().set_start_time(Timestamp::default()/* use setters */);
7344    /// ```
7345    pub fn set_start_time<T>(mut self, v: T) -> Self
7346    where
7347        T: std::convert::Into<wkt::Timestamp>,
7348    {
7349        self.start_time = std::option::Option::Some(v.into());
7350        self
7351    }
7352
7353    /// Sets or clears the value of [start_time][crate::model::CreateBackupMetadata::start_time].
7354    ///
7355    /// # Example
7356    /// ```ignore,no_run
7357    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
7358    /// use wkt::Timestamp;
7359    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
7360    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(None::<Timestamp>);
7361    /// ```
7362    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
7363    where
7364        T: std::convert::Into<wkt::Timestamp>,
7365    {
7366        self.start_time = v.map(|x| x.into());
7367        self
7368    }
7369
7370    /// Sets the value of [end_time][crate::model::CreateBackupMetadata::end_time].
7371    ///
7372    /// # Example
7373    /// ```ignore,no_run
7374    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
7375    /// use wkt::Timestamp;
7376    /// let x = CreateBackupMetadata::new().set_end_time(Timestamp::default()/* use setters */);
7377    /// ```
7378    pub fn set_end_time<T>(mut self, v: T) -> Self
7379    where
7380        T: std::convert::Into<wkt::Timestamp>,
7381    {
7382        self.end_time = std::option::Option::Some(v.into());
7383        self
7384    }
7385
7386    /// Sets or clears the value of [end_time][crate::model::CreateBackupMetadata::end_time].
7387    ///
7388    /// # Example
7389    /// ```ignore,no_run
7390    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
7391    /// use wkt::Timestamp;
7392    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
7393    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(None::<Timestamp>);
7394    /// ```
7395    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
7396    where
7397        T: std::convert::Into<wkt::Timestamp>,
7398    {
7399        self.end_time = v.map(|x| x.into());
7400        self
7401    }
7402}
7403
7404impl wkt::message::Message for CreateBackupMetadata {
7405    fn typename() -> &'static str {
7406        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupMetadata"
7407    }
7408}
7409
7410/// The request for
7411/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
7412///
7413/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]: crate::client::BigtableTableAdmin::update_backup
7414#[derive(Clone, Default, PartialEq)]
7415#[non_exhaustive]
7416pub struct UpdateBackupRequest {
7417    /// Required. The backup to update. `backup.name`, and the fields to be updated
7418    /// as specified by `update_mask` are required. Other fields are ignored.
7419    /// Update is only supported for the following fields:
7420    ///
7421    /// * `backup.expire_time`.
7422    pub backup: std::option::Option<crate::model::Backup>,
7423
7424    /// Required. A mask specifying which fields (e.g. `expire_time`) in the
7425    /// Backup resource should be updated. This mask is relative to the Backup
7426    /// resource, not to the request message. The field mask must always be
7427    /// specified; this prevents any future fields from being erased accidentally
7428    /// by clients that do not know about them.
7429    pub update_mask: std::option::Option<wkt::FieldMask>,
7430
7431    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7432}
7433
7434impl UpdateBackupRequest {
7435    /// Creates a new default instance.
7436    pub fn new() -> Self {
7437        std::default::Default::default()
7438    }
7439
7440    /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
7441    ///
7442    /// # Example
7443    /// ```ignore,no_run
7444    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7445    /// use google_cloud_bigtable_admin_v2::model::Backup;
7446    /// let x = UpdateBackupRequest::new().set_backup(Backup::default()/* use setters */);
7447    /// ```
7448    pub fn set_backup<T>(mut self, v: T) -> Self
7449    where
7450        T: std::convert::Into<crate::model::Backup>,
7451    {
7452        self.backup = std::option::Option::Some(v.into());
7453        self
7454    }
7455
7456    /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
7457    ///
7458    /// # Example
7459    /// ```ignore,no_run
7460    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7461    /// use google_cloud_bigtable_admin_v2::model::Backup;
7462    /// let x = UpdateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
7463    /// let x = UpdateBackupRequest::new().set_or_clear_backup(None::<Backup>);
7464    /// ```
7465    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
7466    where
7467        T: std::convert::Into<crate::model::Backup>,
7468    {
7469        self.backup = v.map(|x| x.into());
7470        self
7471    }
7472
7473    /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
7474    ///
7475    /// # Example
7476    /// ```ignore,no_run
7477    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7478    /// use wkt::FieldMask;
7479    /// let x = UpdateBackupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7480    /// ```
7481    pub fn set_update_mask<T>(mut self, v: T) -> Self
7482    where
7483        T: std::convert::Into<wkt::FieldMask>,
7484    {
7485        self.update_mask = std::option::Option::Some(v.into());
7486        self
7487    }
7488
7489    /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
7490    ///
7491    /// # Example
7492    /// ```ignore,no_run
7493    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7494    /// use wkt::FieldMask;
7495    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7496    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7497    /// ```
7498    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7499    where
7500        T: std::convert::Into<wkt::FieldMask>,
7501    {
7502        self.update_mask = v.map(|x| x.into());
7503        self
7504    }
7505}
7506
7507impl wkt::message::Message for UpdateBackupRequest {
7508    fn typename() -> &'static str {
7509        "type.googleapis.com/google.bigtable.admin.v2.UpdateBackupRequest"
7510    }
7511}
7512
7513/// The request for
7514/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
7515///
7516/// [google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]: crate::client::BigtableTableAdmin::get_backup
7517#[derive(Clone, Default, PartialEq)]
7518#[non_exhaustive]
7519pub struct GetBackupRequest {
7520    /// Required. Name of the backup.
7521    /// Values are of the form
7522    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
7523    pub name: std::string::String,
7524
7525    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7526}
7527
7528impl GetBackupRequest {
7529    /// Creates a new default instance.
7530    pub fn new() -> Self {
7531        std::default::Default::default()
7532    }
7533
7534    /// Sets the value of [name][crate::model::GetBackupRequest::name].
7535    ///
7536    /// # Example
7537    /// ```ignore,no_run
7538    /// # use google_cloud_bigtable_admin_v2::model::GetBackupRequest;
7539    /// # let project_id = "project_id";
7540    /// # let instance_id = "instance_id";
7541    /// # let cluster_id = "cluster_id";
7542    /// # let backup_id = "backup_id";
7543    /// let x = GetBackupRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7544    /// ```
7545    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7546        self.name = v.into();
7547        self
7548    }
7549}
7550
7551impl wkt::message::Message for GetBackupRequest {
7552    fn typename() -> &'static str {
7553        "type.googleapis.com/google.bigtable.admin.v2.GetBackupRequest"
7554    }
7555}
7556
7557/// The request for
7558/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
7559///
7560/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]: crate::client::BigtableTableAdmin::delete_backup
7561#[derive(Clone, Default, PartialEq)]
7562#[non_exhaustive]
7563pub struct DeleteBackupRequest {
7564    /// Required. Name of the backup to delete.
7565    /// Values are of the form
7566    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
7567    pub name: std::string::String,
7568
7569    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7570}
7571
7572impl DeleteBackupRequest {
7573    /// Creates a new default instance.
7574    pub fn new() -> Self {
7575        std::default::Default::default()
7576    }
7577
7578    /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
7579    ///
7580    /// # Example
7581    /// ```ignore,no_run
7582    /// # use google_cloud_bigtable_admin_v2::model::DeleteBackupRequest;
7583    /// # let project_id = "project_id";
7584    /// # let instance_id = "instance_id";
7585    /// # let cluster_id = "cluster_id";
7586    /// # let backup_id = "backup_id";
7587    /// let x = DeleteBackupRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7588    /// ```
7589    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7590        self.name = v.into();
7591        self
7592    }
7593}
7594
7595impl wkt::message::Message for DeleteBackupRequest {
7596    fn typename() -> &'static str {
7597        "type.googleapis.com/google.bigtable.admin.v2.DeleteBackupRequest"
7598    }
7599}
7600
7601/// The request for
7602/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7603///
7604/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7605#[derive(Clone, Default, PartialEq)]
7606#[non_exhaustive]
7607pub struct ListBackupsRequest {
7608    /// Required. The cluster to list backups from.  Values are of the
7609    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
7610    /// Use `{cluster} = '-'` to list backups for all clusters in an instance,
7611    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
7612    pub parent: std::string::String,
7613
7614    /// A filter expression that filters backups listed in the response.
7615    /// The expression must specify the field name, a comparison operator,
7616    /// and the value that you want to use for filtering. The value must be a
7617    /// string, a number, or a boolean. The comparison operator must be
7618    /// <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
7619    /// roughly synonymous with equality. Filter rules are case insensitive.
7620    ///
7621    /// The fields eligible for filtering are:
7622    ///
7623    /// * `name`
7624    /// * `source_table`
7625    /// * `state`
7626    /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7627    /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7628    /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7629    /// * `size_bytes`
7630    ///
7631    /// To filter on multiple expressions, provide each separate expression within
7632    /// parentheses. By default, each expression is an AND expression. However,
7633    /// you can include AND, OR, and NOT expressions explicitly.
7634    ///
7635    /// Some examples of using filters are:
7636    ///
7637    /// * `name:"exact"` --> The backup's name is the string "exact".
7638    /// * `name:howl` --> The backup's name contains the string "howl".
7639    /// * `source_table:prod`
7640    ///   --> The source_table's name contains the string "prod".
7641    /// * `state:CREATING` --> The backup is pending creation.
7642    /// * `state:READY` --> The backup is fully created and ready for use.
7643    /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
7644    ///   --> The backup name contains the string "howl" and start_time
7645    ///   of the backup is before 2018-03-28T14:50:00Z.
7646    /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
7647    pub filter: std::string::String,
7648
7649    /// An expression for specifying the sort order of the results of the request.
7650    /// The string value should specify one or more fields in
7651    /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
7652    /// <https://aip.dev/132#ordering>.
7653    ///
7654    /// Fields supported are:
7655    ///
7656    /// * name
7657    /// * source_table
7658    /// * expire_time
7659    /// * start_time
7660    /// * end_time
7661    /// * size_bytes
7662    /// * state
7663    ///
7664    /// For example, "start_time". The default sorting order is ascending.
7665    /// To specify descending order for the field, a suffix " desc" should
7666    /// be appended to the field name. For example, "start_time desc".
7667    /// Redundant space characters in the syntax are insigificant.
7668    ///
7669    /// If order_by is empty, results will be sorted by `start_time` in descending
7670    /// order starting from the most recently created backup.
7671    ///
7672    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
7673    pub order_by: std::string::String,
7674
7675    /// Number of backups to be returned in the response. If 0 or
7676    /// less, defaults to the server's maximum allowed page size.
7677    pub page_size: i32,
7678
7679    /// If non-empty, `page_token` should contain a
7680    /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
7681    /// from a previous
7682    /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
7683    /// same `parent` and with the same `filter`.
7684    ///
7685    /// [google.bigtable.admin.v2.ListBackupsResponse]: crate::model::ListBackupsResponse
7686    /// [google.bigtable.admin.v2.ListBackupsResponse.next_page_token]: crate::model::ListBackupsResponse::next_page_token
7687    pub page_token: std::string::String,
7688
7689    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7690}
7691
7692impl ListBackupsRequest {
7693    /// Creates a new default instance.
7694    pub fn new() -> Self {
7695        std::default::Default::default()
7696    }
7697
7698    /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
7699    ///
7700    /// # Example
7701    /// ```ignore,no_run
7702    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7703    /// # let project_id = "project_id";
7704    /// # let instance_id = "instance_id";
7705    /// # let cluster_id = "cluster_id";
7706    /// let x = ListBackupsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
7707    /// ```
7708    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7709        self.parent = v.into();
7710        self
7711    }
7712
7713    /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
7714    ///
7715    /// # Example
7716    /// ```ignore,no_run
7717    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7718    /// let x = ListBackupsRequest::new().set_filter("example");
7719    /// ```
7720    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7721        self.filter = v.into();
7722        self
7723    }
7724
7725    /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
7726    ///
7727    /// # Example
7728    /// ```ignore,no_run
7729    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7730    /// let x = ListBackupsRequest::new().set_order_by("example");
7731    /// ```
7732    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7733        self.order_by = v.into();
7734        self
7735    }
7736
7737    /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
7738    ///
7739    /// # Example
7740    /// ```ignore,no_run
7741    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7742    /// let x = ListBackupsRequest::new().set_page_size(42);
7743    /// ```
7744    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7745        self.page_size = v.into();
7746        self
7747    }
7748
7749    /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
7750    ///
7751    /// # Example
7752    /// ```ignore,no_run
7753    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7754    /// let x = ListBackupsRequest::new().set_page_token("example");
7755    /// ```
7756    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7757        self.page_token = v.into();
7758        self
7759    }
7760}
7761
7762impl wkt::message::Message for ListBackupsRequest {
7763    fn typename() -> &'static str {
7764        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsRequest"
7765    }
7766}
7767
7768/// The response for
7769/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7770///
7771/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7772#[derive(Clone, Default, PartialEq)]
7773#[non_exhaustive]
7774pub struct ListBackupsResponse {
7775    /// The list of matching backups.
7776    pub backups: std::vec::Vec<crate::model::Backup>,
7777
7778    /// `next_page_token` can be sent in a subsequent
7779    /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
7780    /// to fetch more of the matching backups.
7781    ///
7782    /// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7783    pub next_page_token: std::string::String,
7784
7785    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7786}
7787
7788impl ListBackupsResponse {
7789    /// Creates a new default instance.
7790    pub fn new() -> Self {
7791        std::default::Default::default()
7792    }
7793
7794    /// Sets the value of [backups][crate::model::ListBackupsResponse::backups].
7795    ///
7796    /// # Example
7797    /// ```ignore,no_run
7798    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7799    /// use google_cloud_bigtable_admin_v2::model::Backup;
7800    /// let x = ListBackupsResponse::new()
7801    ///     .set_backups([
7802    ///         Backup::default()/* use setters */,
7803    ///         Backup::default()/* use (different) setters */,
7804    ///     ]);
7805    /// ```
7806    pub fn set_backups<T, V>(mut self, v: T) -> Self
7807    where
7808        T: std::iter::IntoIterator<Item = V>,
7809        V: std::convert::Into<crate::model::Backup>,
7810    {
7811        use std::iter::Iterator;
7812        self.backups = v.into_iter().map(|i| i.into()).collect();
7813        self
7814    }
7815
7816    /// Sets the value of [next_page_token][crate::model::ListBackupsResponse::next_page_token].
7817    ///
7818    /// # Example
7819    /// ```ignore,no_run
7820    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7821    /// let x = ListBackupsResponse::new().set_next_page_token("example");
7822    /// ```
7823    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7824        self.next_page_token = v.into();
7825        self
7826    }
7827}
7828
7829impl wkt::message::Message for ListBackupsResponse {
7830    fn typename() -> &'static str {
7831        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsResponse"
7832    }
7833}
7834
7835#[doc(hidden)]
7836impl google_cloud_gax::paginator::internal::PageableResponse for ListBackupsResponse {
7837    type PageItem = crate::model::Backup;
7838
7839    fn items(self) -> std::vec::Vec<Self::PageItem> {
7840        self.backups
7841    }
7842
7843    fn next_page_token(&self) -> std::string::String {
7844        use std::clone::Clone;
7845        self.next_page_token.clone()
7846    }
7847}
7848
7849/// The request for
7850/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7851///
7852/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7853#[derive(Clone, Default, PartialEq)]
7854#[non_exhaustive]
7855pub struct CopyBackupRequest {
7856    /// Required. The name of the destination cluster that will contain the backup
7857    /// copy. The cluster must already exist. Values are of the form:
7858    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
7859    pub parent: std::string::String,
7860
7861    /// Required. The id of the new backup. The `backup_id` along with `parent`
7862    /// are combined as {parent}/backups/{backup_id} to create the full backup
7863    /// name, of the form:
7864    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
7865    /// This string must be between 1 and 50 characters in length and match the
7866    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
7867    pub backup_id: std::string::String,
7868
7869    /// Required. The source backup to be copied from.
7870    /// The source backup needs to be in READY state for it to be copied.
7871    /// Copying a copied backup is not allowed.
7872    /// Once CopyBackup is in progress, the source backup cannot be deleted or
7873    /// cleaned up on expiration until CopyBackup is finished.
7874    /// Values are of the form:
7875    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7876    pub source_backup: std::string::String,
7877
7878    /// Required. Required. The expiration time of the copied backup with
7879    /// microsecond granularity that must be at least 6 hours and at most 30 days
7880    /// from the time the request is received. Once the `expire_time` has
7881    /// passed, Cloud Bigtable will delete the backup and free the resources used
7882    /// by the backup.
7883    pub expire_time: std::option::Option<wkt::Timestamp>,
7884
7885    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7886}
7887
7888impl CopyBackupRequest {
7889    /// Creates a new default instance.
7890    pub fn new() -> Self {
7891        std::default::Default::default()
7892    }
7893
7894    /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
7895    ///
7896    /// # Example
7897    /// ```ignore,no_run
7898    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7899    /// # let project_id = "project_id";
7900    /// # let instance_id = "instance_id";
7901    /// # let cluster_id = "cluster_id";
7902    /// let x = CopyBackupRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
7903    /// ```
7904    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7905        self.parent = v.into();
7906        self
7907    }
7908
7909    /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
7910    ///
7911    /// # Example
7912    /// ```ignore,no_run
7913    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7914    /// let x = CopyBackupRequest::new().set_backup_id("example");
7915    /// ```
7916    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7917        self.backup_id = v.into();
7918        self
7919    }
7920
7921    /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
7922    ///
7923    /// # Example
7924    /// ```ignore,no_run
7925    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7926    /// # let project_id = "project_id";
7927    /// # let instance_id = "instance_id";
7928    /// # let cluster_id = "cluster_id";
7929    /// # let backup_id = "backup_id";
7930    /// let x = CopyBackupRequest::new().set_source_backup(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7931    /// ```
7932    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7933        self.source_backup = v.into();
7934        self
7935    }
7936
7937    /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7938    ///
7939    /// # Example
7940    /// ```ignore,no_run
7941    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7942    /// use wkt::Timestamp;
7943    /// let x = CopyBackupRequest::new().set_expire_time(Timestamp::default()/* use setters */);
7944    /// ```
7945    pub fn set_expire_time<T>(mut self, v: T) -> Self
7946    where
7947        T: std::convert::Into<wkt::Timestamp>,
7948    {
7949        self.expire_time = std::option::Option::Some(v.into());
7950        self
7951    }
7952
7953    /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7954    ///
7955    /// # Example
7956    /// ```ignore,no_run
7957    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7958    /// use wkt::Timestamp;
7959    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
7960    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(None::<Timestamp>);
7961    /// ```
7962    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
7963    where
7964        T: std::convert::Into<wkt::Timestamp>,
7965    {
7966        self.expire_time = v.map(|x| x.into());
7967        self
7968    }
7969}
7970
7971impl wkt::message::Message for CopyBackupRequest {
7972    fn typename() -> &'static str {
7973        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupRequest"
7974    }
7975}
7976
7977/// Metadata type for the google.longrunning.Operation returned by
7978/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7979///
7980/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7981#[derive(Clone, Default, PartialEq)]
7982#[non_exhaustive]
7983pub struct CopyBackupMetadata {
7984    /// The name of the backup being created through the copy operation.
7985    /// Values are of the form
7986    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7987    pub name: std::string::String,
7988
7989    /// Information about the source backup that is being copied from.
7990    pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
7991
7992    /// The progress of the
7993    /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
7994    /// operation.
7995    ///
7996    /// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7997    pub progress: std::option::Option<crate::model::OperationProgress>,
7998
7999    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8000}
8001
8002impl CopyBackupMetadata {
8003    /// Creates a new default instance.
8004    pub fn new() -> Self {
8005        std::default::Default::default()
8006    }
8007
8008    /// Sets the value of [name][crate::model::CopyBackupMetadata::name].
8009    ///
8010    /// # Example
8011    /// ```ignore,no_run
8012    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
8013    /// # let project_id = "project_id";
8014    /// # let instance_id = "instance_id";
8015    /// # let cluster_id = "cluster_id";
8016    /// # let backup_id = "backup_id";
8017    /// let x = CopyBackupMetadata::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
8018    /// ```
8019    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8020        self.name = v.into();
8021        self
8022    }
8023
8024    /// Sets the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
8025    ///
8026    /// # Example
8027    /// ```ignore,no_run
8028    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
8029    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
8030    /// let x = CopyBackupMetadata::new().set_source_backup_info(BackupInfo::default()/* use setters */);
8031    /// ```
8032    pub fn set_source_backup_info<T>(mut self, v: T) -> Self
8033    where
8034        T: std::convert::Into<crate::model::BackupInfo>,
8035    {
8036        self.source_backup_info = std::option::Option::Some(v.into());
8037        self
8038    }
8039
8040    /// Sets or clears the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
8041    ///
8042    /// # Example
8043    /// ```ignore,no_run
8044    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
8045    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
8046    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(Some(BackupInfo::default()/* use setters */));
8047    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(None::<BackupInfo>);
8048    /// ```
8049    pub fn set_or_clear_source_backup_info<T>(mut self, v: std::option::Option<T>) -> Self
8050    where
8051        T: std::convert::Into<crate::model::BackupInfo>,
8052    {
8053        self.source_backup_info = v.map(|x| x.into());
8054        self
8055    }
8056
8057    /// Sets the value of [progress][crate::model::CopyBackupMetadata::progress].
8058    ///
8059    /// # Example
8060    /// ```ignore,no_run
8061    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
8062    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
8063    /// let x = CopyBackupMetadata::new().set_progress(OperationProgress::default()/* use setters */);
8064    /// ```
8065    pub fn set_progress<T>(mut self, v: T) -> Self
8066    where
8067        T: std::convert::Into<crate::model::OperationProgress>,
8068    {
8069        self.progress = std::option::Option::Some(v.into());
8070        self
8071    }
8072
8073    /// Sets or clears the value of [progress][crate::model::CopyBackupMetadata::progress].
8074    ///
8075    /// # Example
8076    /// ```ignore,no_run
8077    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
8078    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
8079    /// let x = CopyBackupMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
8080    /// let x = CopyBackupMetadata::new().set_or_clear_progress(None::<OperationProgress>);
8081    /// ```
8082    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
8083    where
8084        T: std::convert::Into<crate::model::OperationProgress>,
8085    {
8086        self.progress = v.map(|x| x.into());
8087        self
8088    }
8089}
8090
8091impl wkt::message::Message for CopyBackupMetadata {
8092    fn typename() -> &'static str {
8093        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupMetadata"
8094    }
8095}
8096
8097/// The request for
8098/// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
8099///
8100/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]: crate::client::BigtableTableAdmin::create_authorized_view
8101#[derive(Clone, Default, PartialEq)]
8102#[non_exhaustive]
8103pub struct CreateAuthorizedViewRequest {
8104    /// Required. This is the name of the table the AuthorizedView belongs to.
8105    /// Values are of the form
8106    /// `projects/{project}/instances/{instance}/tables/{table}`.
8107    pub parent: std::string::String,
8108
8109    /// Required. The id of the AuthorizedView to create. This AuthorizedView must
8110    /// not already exist. The `authorized_view_id` appended to `parent` forms the
8111    /// full AuthorizedView name of the form
8112    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
8113    pub authorized_view_id: std::string::String,
8114
8115    /// Required. The AuthorizedView to create.
8116    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
8117
8118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8119}
8120
8121impl CreateAuthorizedViewRequest {
8122    /// Creates a new default instance.
8123    pub fn new() -> Self {
8124        std::default::Default::default()
8125    }
8126
8127    /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
8128    ///
8129    /// # Example
8130    /// ```ignore,no_run
8131    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
8132    /// # let project_id = "project_id";
8133    /// # let instance_id = "instance_id";
8134    /// # let table_id = "table_id";
8135    /// let x = CreateAuthorizedViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
8136    /// ```
8137    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8138        self.parent = v.into();
8139        self
8140    }
8141
8142    /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
8143    ///
8144    /// # Example
8145    /// ```ignore,no_run
8146    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
8147    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view_id("example");
8148    /// ```
8149    pub fn set_authorized_view_id<T: std::convert::Into<std::string::String>>(
8150        mut self,
8151        v: T,
8152    ) -> Self {
8153        self.authorized_view_id = v.into();
8154        self
8155    }
8156
8157    /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
8158    ///
8159    /// # Example
8160    /// ```ignore,no_run
8161    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
8162    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8163    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
8164    /// ```
8165    pub fn set_authorized_view<T>(mut self, v: T) -> Self
8166    where
8167        T: std::convert::Into<crate::model::AuthorizedView>,
8168    {
8169        self.authorized_view = std::option::Option::Some(v.into());
8170        self
8171    }
8172
8173    /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
8174    ///
8175    /// # Example
8176    /// ```ignore,no_run
8177    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
8178    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8179    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
8180    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
8181    /// ```
8182    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
8183    where
8184        T: std::convert::Into<crate::model::AuthorizedView>,
8185    {
8186        self.authorized_view = v.map(|x| x.into());
8187        self
8188    }
8189}
8190
8191impl wkt::message::Message for CreateAuthorizedViewRequest {
8192    fn typename() -> &'static str {
8193        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewRequest"
8194    }
8195}
8196
8197/// The metadata for the Operation returned by CreateAuthorizedView.
8198#[derive(Clone, Default, PartialEq)]
8199#[non_exhaustive]
8200pub struct CreateAuthorizedViewMetadata {
8201    /// The request that prompted the initiation of this CreateAuthorizedView
8202    /// operation.
8203    pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
8204
8205    /// The time at which the original request was received.
8206    pub request_time: std::option::Option<wkt::Timestamp>,
8207
8208    /// The time at which the operation failed or was completed successfully.
8209    pub finish_time: std::option::Option<wkt::Timestamp>,
8210
8211    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8212}
8213
8214impl CreateAuthorizedViewMetadata {
8215    /// Creates a new default instance.
8216    pub fn new() -> Self {
8217        std::default::Default::default()
8218    }
8219
8220    /// Sets the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
8221    ///
8222    /// # Example
8223    /// ```ignore,no_run
8224    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
8225    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
8226    /// let x = CreateAuthorizedViewMetadata::new().set_original_request(CreateAuthorizedViewRequest::default()/* use setters */);
8227    /// ```
8228    pub fn set_original_request<T>(mut self, v: T) -> Self
8229    where
8230        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
8231    {
8232        self.original_request = std::option::Option::Some(v.into());
8233        self
8234    }
8235
8236    /// Sets or clears the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
8237    ///
8238    /// # Example
8239    /// ```ignore,no_run
8240    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
8241    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
8242    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(CreateAuthorizedViewRequest::default()/* use setters */));
8243    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<CreateAuthorizedViewRequest>);
8244    /// ```
8245    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
8246    where
8247        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
8248    {
8249        self.original_request = v.map(|x| x.into());
8250        self
8251    }
8252
8253    /// Sets the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
8254    ///
8255    /// # Example
8256    /// ```ignore,no_run
8257    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
8258    /// use wkt::Timestamp;
8259    /// let x = CreateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
8260    /// ```
8261    pub fn set_request_time<T>(mut self, v: T) -> Self
8262    where
8263        T: std::convert::Into<wkt::Timestamp>,
8264    {
8265        self.request_time = std::option::Option::Some(v.into());
8266        self
8267    }
8268
8269    /// Sets or clears the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
8270    ///
8271    /// # Example
8272    /// ```ignore,no_run
8273    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
8274    /// use wkt::Timestamp;
8275    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
8276    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
8277    /// ```
8278    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
8279    where
8280        T: std::convert::Into<wkt::Timestamp>,
8281    {
8282        self.request_time = v.map(|x| x.into());
8283        self
8284    }
8285
8286    /// Sets the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
8287    ///
8288    /// # Example
8289    /// ```ignore,no_run
8290    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
8291    /// use wkt::Timestamp;
8292    /// let x = CreateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
8293    /// ```
8294    pub fn set_finish_time<T>(mut self, v: T) -> Self
8295    where
8296        T: std::convert::Into<wkt::Timestamp>,
8297    {
8298        self.finish_time = std::option::Option::Some(v.into());
8299        self
8300    }
8301
8302    /// Sets or clears the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
8303    ///
8304    /// # Example
8305    /// ```ignore,no_run
8306    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
8307    /// use wkt::Timestamp;
8308    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
8309    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
8310    /// ```
8311    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
8312    where
8313        T: std::convert::Into<wkt::Timestamp>,
8314    {
8315        self.finish_time = v.map(|x| x.into());
8316        self
8317    }
8318}
8319
8320impl wkt::message::Message for CreateAuthorizedViewMetadata {
8321    fn typename() -> &'static str {
8322        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"
8323    }
8324}
8325
8326/// Request message for
8327/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
8328///
8329/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
8330#[derive(Clone, Default, PartialEq)]
8331#[non_exhaustive]
8332pub struct ListAuthorizedViewsRequest {
8333    /// Required. The unique name of the table for which AuthorizedViews should be
8334    /// listed. Values are of the form
8335    /// `projects/{project}/instances/{instance}/tables/{table}`.
8336    pub parent: std::string::String,
8337
8338    /// Optional. Maximum number of results per page.
8339    ///
8340    /// A page_size of zero lets the server choose the number of items to return.
8341    /// A page_size which is strictly positive will return at most that many items.
8342    /// A negative page_size will cause an error.
8343    ///
8344    /// Following the first request, subsequent paginated calls are not required
8345    /// to pass a page_size. If a page_size is set in subsequent calls, it must
8346    /// match the page_size given in the first request.
8347    pub page_size: i32,
8348
8349    /// Optional. The value of `next_page_token` returned by a previous call.
8350    pub page_token: std::string::String,
8351
8352    /// Optional. The resource_view to be applied to the returned AuthorizedViews'
8353    /// fields. Default to NAME_ONLY.
8354    pub view: crate::model::authorized_view::ResponseView,
8355
8356    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8357}
8358
8359impl ListAuthorizedViewsRequest {
8360    /// Creates a new default instance.
8361    pub fn new() -> Self {
8362        std::default::Default::default()
8363    }
8364
8365    /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
8366    ///
8367    /// # Example
8368    /// ```ignore,no_run
8369    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
8370    /// # let project_id = "project_id";
8371    /// # let instance_id = "instance_id";
8372    /// # let table_id = "table_id";
8373    /// let x = ListAuthorizedViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
8374    /// ```
8375    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8376        self.parent = v.into();
8377        self
8378    }
8379
8380    /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
8381    ///
8382    /// # Example
8383    /// ```ignore,no_run
8384    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
8385    /// let x = ListAuthorizedViewsRequest::new().set_page_size(42);
8386    /// ```
8387    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8388        self.page_size = v.into();
8389        self
8390    }
8391
8392    /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
8393    ///
8394    /// # Example
8395    /// ```ignore,no_run
8396    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
8397    /// let x = ListAuthorizedViewsRequest::new().set_page_token("example");
8398    /// ```
8399    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8400        self.page_token = v.into();
8401        self
8402    }
8403
8404    /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
8405    ///
8406    /// # Example
8407    /// ```ignore,no_run
8408    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
8409    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
8410    /// let x0 = ListAuthorizedViewsRequest::new().set_view(ResponseView::NameOnly);
8411    /// let x1 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Basic);
8412    /// let x2 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Full);
8413    /// ```
8414    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
8415        mut self,
8416        v: T,
8417    ) -> Self {
8418        self.view = v.into();
8419        self
8420    }
8421}
8422
8423impl wkt::message::Message for ListAuthorizedViewsRequest {
8424    fn typename() -> &'static str {
8425        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsRequest"
8426    }
8427}
8428
8429/// Response message for
8430/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
8431///
8432/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
8433#[derive(Clone, Default, PartialEq)]
8434#[non_exhaustive]
8435pub struct ListAuthorizedViewsResponse {
8436    /// The AuthorizedViews present in the requested table.
8437    pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
8438
8439    /// Set if not all tables could be returned in a single response.
8440    /// Pass this value to `page_token` in another request to get the next
8441    /// page of results.
8442    pub next_page_token: std::string::String,
8443
8444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8445}
8446
8447impl ListAuthorizedViewsResponse {
8448    /// Creates a new default instance.
8449    pub fn new() -> Self {
8450        std::default::Default::default()
8451    }
8452
8453    /// Sets the value of [authorized_views][crate::model::ListAuthorizedViewsResponse::authorized_views].
8454    ///
8455    /// # Example
8456    /// ```ignore,no_run
8457    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
8458    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8459    /// let x = ListAuthorizedViewsResponse::new()
8460    ///     .set_authorized_views([
8461    ///         AuthorizedView::default()/* use setters */,
8462    ///         AuthorizedView::default()/* use (different) setters */,
8463    ///     ]);
8464    /// ```
8465    pub fn set_authorized_views<T, V>(mut self, v: T) -> Self
8466    where
8467        T: std::iter::IntoIterator<Item = V>,
8468        V: std::convert::Into<crate::model::AuthorizedView>,
8469    {
8470        use std::iter::Iterator;
8471        self.authorized_views = v.into_iter().map(|i| i.into()).collect();
8472        self
8473    }
8474
8475    /// Sets the value of [next_page_token][crate::model::ListAuthorizedViewsResponse::next_page_token].
8476    ///
8477    /// # Example
8478    /// ```ignore,no_run
8479    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
8480    /// let x = ListAuthorizedViewsResponse::new().set_next_page_token("example");
8481    /// ```
8482    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8483        self.next_page_token = v.into();
8484        self
8485    }
8486}
8487
8488impl wkt::message::Message for ListAuthorizedViewsResponse {
8489    fn typename() -> &'static str {
8490        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsResponse"
8491    }
8492}
8493
8494#[doc(hidden)]
8495impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedViewsResponse {
8496    type PageItem = crate::model::AuthorizedView;
8497
8498    fn items(self) -> std::vec::Vec<Self::PageItem> {
8499        self.authorized_views
8500    }
8501
8502    fn next_page_token(&self) -> std::string::String {
8503        use std::clone::Clone;
8504        self.next_page_token.clone()
8505    }
8506}
8507
8508/// Request message for
8509/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
8510///
8511/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]: crate::client::BigtableTableAdmin::get_authorized_view
8512#[derive(Clone, Default, PartialEq)]
8513#[non_exhaustive]
8514pub struct GetAuthorizedViewRequest {
8515    /// Required. The unique name of the requested AuthorizedView.
8516    /// Values are of the form
8517    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8518    pub name: std::string::String,
8519
8520    /// Optional. The resource_view to be applied to the returned AuthorizedView's
8521    /// fields. Default to BASIC.
8522    pub view: crate::model::authorized_view::ResponseView,
8523
8524    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8525}
8526
8527impl GetAuthorizedViewRequest {
8528    /// Creates a new default instance.
8529    pub fn new() -> Self {
8530        std::default::Default::default()
8531    }
8532
8533    /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
8534    ///
8535    /// # Example
8536    /// ```ignore,no_run
8537    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
8538    /// # let project_id = "project_id";
8539    /// # let instance_id = "instance_id";
8540    /// # let table_id = "table_id";
8541    /// # let authorized_view_id = "authorized_view_id";
8542    /// let x = GetAuthorizedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
8543    /// ```
8544    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8545        self.name = v.into();
8546        self
8547    }
8548
8549    /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
8550    ///
8551    /// # Example
8552    /// ```ignore,no_run
8553    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
8554    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
8555    /// let x0 = GetAuthorizedViewRequest::new().set_view(ResponseView::NameOnly);
8556    /// let x1 = GetAuthorizedViewRequest::new().set_view(ResponseView::Basic);
8557    /// let x2 = GetAuthorizedViewRequest::new().set_view(ResponseView::Full);
8558    /// ```
8559    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
8560        mut self,
8561        v: T,
8562    ) -> Self {
8563        self.view = v.into();
8564        self
8565    }
8566}
8567
8568impl wkt::message::Message for GetAuthorizedViewRequest {
8569    fn typename() -> &'static str {
8570        "type.googleapis.com/google.bigtable.admin.v2.GetAuthorizedViewRequest"
8571    }
8572}
8573
8574/// The request for
8575/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8576///
8577/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8578#[derive(Clone, Default, PartialEq)]
8579#[non_exhaustive]
8580pub struct UpdateAuthorizedViewRequest {
8581    /// Required. The AuthorizedView to update. The `name` in `authorized_view` is
8582    /// used to identify the AuthorizedView. AuthorizedView name must in this
8583    /// format:
8584    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8585    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
8586
8587    /// Optional. The list of fields to update.
8588    /// A mask specifying which fields in the AuthorizedView resource should be
8589    /// updated. This mask is relative to the AuthorizedView resource, not to the
8590    /// request message. A field will be overwritten if it is in the mask. If
8591    /// empty, all fields set in the request will be overwritten. A special value
8592    /// `*` means to overwrite all fields (including fields not set in the
8593    /// request).
8594    pub update_mask: std::option::Option<wkt::FieldMask>,
8595
8596    /// Optional. If true, ignore the safety checks when updating the
8597    /// AuthorizedView.
8598    pub ignore_warnings: bool,
8599
8600    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8601}
8602
8603impl UpdateAuthorizedViewRequest {
8604    /// Creates a new default instance.
8605    pub fn new() -> Self {
8606        std::default::Default::default()
8607    }
8608
8609    /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8610    ///
8611    /// # Example
8612    /// ```ignore,no_run
8613    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8614    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8615    /// let x = UpdateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
8616    /// ```
8617    pub fn set_authorized_view<T>(mut self, v: T) -> Self
8618    where
8619        T: std::convert::Into<crate::model::AuthorizedView>,
8620    {
8621        self.authorized_view = std::option::Option::Some(v.into());
8622        self
8623    }
8624
8625    /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8626    ///
8627    /// # Example
8628    /// ```ignore,no_run
8629    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8630    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8631    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
8632    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
8633    /// ```
8634    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
8635    where
8636        T: std::convert::Into<crate::model::AuthorizedView>,
8637    {
8638        self.authorized_view = v.map(|x| x.into());
8639        self
8640    }
8641
8642    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8643    ///
8644    /// # Example
8645    /// ```ignore,no_run
8646    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8647    /// use wkt::FieldMask;
8648    /// let x = UpdateAuthorizedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8649    /// ```
8650    pub fn set_update_mask<T>(mut self, v: T) -> Self
8651    where
8652        T: std::convert::Into<wkt::FieldMask>,
8653    {
8654        self.update_mask = std::option::Option::Some(v.into());
8655        self
8656    }
8657
8658    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8659    ///
8660    /// # Example
8661    /// ```ignore,no_run
8662    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8663    /// use wkt::FieldMask;
8664    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8665    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8666    /// ```
8667    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8668    where
8669        T: std::convert::Into<wkt::FieldMask>,
8670    {
8671        self.update_mask = v.map(|x| x.into());
8672        self
8673    }
8674
8675    /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
8676    ///
8677    /// # Example
8678    /// ```ignore,no_run
8679    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8680    /// let x = UpdateAuthorizedViewRequest::new().set_ignore_warnings(true);
8681    /// ```
8682    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8683        self.ignore_warnings = v.into();
8684        self
8685    }
8686}
8687
8688impl wkt::message::Message for UpdateAuthorizedViewRequest {
8689    fn typename() -> &'static str {
8690        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"
8691    }
8692}
8693
8694/// Metadata for the google.longrunning.Operation returned by
8695/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8696///
8697/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8698#[derive(Clone, Default, PartialEq)]
8699#[non_exhaustive]
8700pub struct UpdateAuthorizedViewMetadata {
8701    /// The request that prompted the initiation of this UpdateAuthorizedView
8702    /// operation.
8703    pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
8704
8705    /// The time at which the original request was received.
8706    pub request_time: std::option::Option<wkt::Timestamp>,
8707
8708    /// The time at which the operation failed or was completed successfully.
8709    pub finish_time: std::option::Option<wkt::Timestamp>,
8710
8711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8712}
8713
8714impl UpdateAuthorizedViewMetadata {
8715    /// Creates a new default instance.
8716    pub fn new() -> Self {
8717        std::default::Default::default()
8718    }
8719
8720    /// Sets the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8721    ///
8722    /// # Example
8723    /// ```ignore,no_run
8724    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8725    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8726    /// let x = UpdateAuthorizedViewMetadata::new().set_original_request(UpdateAuthorizedViewRequest::default()/* use setters */);
8727    /// ```
8728    pub fn set_original_request<T>(mut self, v: T) -> Self
8729    where
8730        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8731    {
8732        self.original_request = std::option::Option::Some(v.into());
8733        self
8734    }
8735
8736    /// Sets or clears the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8737    ///
8738    /// # Example
8739    /// ```ignore,no_run
8740    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8741    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8742    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(UpdateAuthorizedViewRequest::default()/* use setters */));
8743    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<UpdateAuthorizedViewRequest>);
8744    /// ```
8745    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
8746    where
8747        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8748    {
8749        self.original_request = v.map(|x| x.into());
8750        self
8751    }
8752
8753    /// Sets the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8754    ///
8755    /// # Example
8756    /// ```ignore,no_run
8757    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8758    /// use wkt::Timestamp;
8759    /// let x = UpdateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
8760    /// ```
8761    pub fn set_request_time<T>(mut self, v: T) -> Self
8762    where
8763        T: std::convert::Into<wkt::Timestamp>,
8764    {
8765        self.request_time = std::option::Option::Some(v.into());
8766        self
8767    }
8768
8769    /// Sets or clears the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8770    ///
8771    /// # Example
8772    /// ```ignore,no_run
8773    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8774    /// use wkt::Timestamp;
8775    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
8776    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
8777    /// ```
8778    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
8779    where
8780        T: std::convert::Into<wkt::Timestamp>,
8781    {
8782        self.request_time = v.map(|x| x.into());
8783        self
8784    }
8785
8786    /// Sets the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8787    ///
8788    /// # Example
8789    /// ```ignore,no_run
8790    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8791    /// use wkt::Timestamp;
8792    /// let x = UpdateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
8793    /// ```
8794    pub fn set_finish_time<T>(mut self, v: T) -> Self
8795    where
8796        T: std::convert::Into<wkt::Timestamp>,
8797    {
8798        self.finish_time = std::option::Option::Some(v.into());
8799        self
8800    }
8801
8802    /// Sets or clears the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8803    ///
8804    /// # Example
8805    /// ```ignore,no_run
8806    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8807    /// use wkt::Timestamp;
8808    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
8809    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
8810    /// ```
8811    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
8812    where
8813        T: std::convert::Into<wkt::Timestamp>,
8814    {
8815        self.finish_time = v.map(|x| x.into());
8816        self
8817    }
8818}
8819
8820impl wkt::message::Message for UpdateAuthorizedViewMetadata {
8821    fn typename() -> &'static str {
8822        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"
8823    }
8824}
8825
8826/// Request message for
8827/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
8828///
8829/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]: crate::client::BigtableTableAdmin::delete_authorized_view
8830#[derive(Clone, Default, PartialEq)]
8831#[non_exhaustive]
8832pub struct DeleteAuthorizedViewRequest {
8833    /// Required. The unique name of the AuthorizedView to be deleted.
8834    /// Values are of the form
8835    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8836    pub name: std::string::String,
8837
8838    /// Optional. The current etag of the AuthorizedView.
8839    /// If an etag is provided and does not match the current etag of the
8840    /// AuthorizedView, deletion will be blocked and an ABORTED error will be
8841    /// returned.
8842    pub etag: std::string::String,
8843
8844    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8845}
8846
8847impl DeleteAuthorizedViewRequest {
8848    /// Creates a new default instance.
8849    pub fn new() -> Self {
8850        std::default::Default::default()
8851    }
8852
8853    /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
8854    ///
8855    /// # Example
8856    /// ```ignore,no_run
8857    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8858    /// # let project_id = "project_id";
8859    /// # let instance_id = "instance_id";
8860    /// # let table_id = "table_id";
8861    /// # let authorized_view_id = "authorized_view_id";
8862    /// let x = DeleteAuthorizedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
8863    /// ```
8864    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8865        self.name = v.into();
8866        self
8867    }
8868
8869    /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
8870    ///
8871    /// # Example
8872    /// ```ignore,no_run
8873    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8874    /// let x = DeleteAuthorizedViewRequest::new().set_etag("example");
8875    /// ```
8876    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8877        self.etag = v.into();
8878        self
8879    }
8880}
8881
8882impl wkt::message::Message for DeleteAuthorizedViewRequest {
8883    fn typename() -> &'static str {
8884        "type.googleapis.com/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"
8885    }
8886}
8887
8888/// The request for
8889/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8890///
8891/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8892#[derive(Clone, Default, PartialEq)]
8893#[non_exhaustive]
8894pub struct CreateSchemaBundleRequest {
8895    /// Required. The parent resource where this schema bundle will be created.
8896    /// Values are of the form
8897    /// `projects/{project}/instances/{instance}/tables/{table}`.
8898    pub parent: std::string::String,
8899
8900    /// Required. The unique ID to use for the schema bundle, which will become the
8901    /// final component of the schema bundle's resource name.
8902    pub schema_bundle_id: std::string::String,
8903
8904    /// Required. The schema bundle to create.
8905    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8906
8907    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8908}
8909
8910impl CreateSchemaBundleRequest {
8911    /// Creates a new default instance.
8912    pub fn new() -> Self {
8913        std::default::Default::default()
8914    }
8915
8916    /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
8917    ///
8918    /// # Example
8919    /// ```ignore,no_run
8920    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8921    /// # let project_id = "project_id";
8922    /// # let instance_id = "instance_id";
8923    /// # let table_id = "table_id";
8924    /// let x = CreateSchemaBundleRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
8925    /// ```
8926    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8927        self.parent = v.into();
8928        self
8929    }
8930
8931    /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
8932    ///
8933    /// # Example
8934    /// ```ignore,no_run
8935    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8936    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle_id("example");
8937    /// ```
8938    pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
8939        mut self,
8940        v: T,
8941    ) -> Self {
8942        self.schema_bundle_id = v.into();
8943        self
8944    }
8945
8946    /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8947    ///
8948    /// # Example
8949    /// ```ignore,no_run
8950    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8951    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8952    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8953    /// ```
8954    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8955    where
8956        T: std::convert::Into<crate::model::SchemaBundle>,
8957    {
8958        self.schema_bundle = std::option::Option::Some(v.into());
8959        self
8960    }
8961
8962    /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8963    ///
8964    /// # Example
8965    /// ```ignore,no_run
8966    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8967    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8968    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8969    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8970    /// ```
8971    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8972    where
8973        T: std::convert::Into<crate::model::SchemaBundle>,
8974    {
8975        self.schema_bundle = v.map(|x| x.into());
8976        self
8977    }
8978}
8979
8980impl wkt::message::Message for CreateSchemaBundleRequest {
8981    fn typename() -> &'static str {
8982        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleRequest"
8983    }
8984}
8985
8986/// The metadata for the Operation returned by
8987/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8988///
8989/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8990#[derive(Clone, Default, PartialEq)]
8991#[non_exhaustive]
8992pub struct CreateSchemaBundleMetadata {
8993    /// The unique name identifying this schema bundle.
8994    /// Values are of the form
8995    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8996    pub name: std::string::String,
8997
8998    /// The time at which this operation started.
8999    pub start_time: std::option::Option<wkt::Timestamp>,
9000
9001    /// If set, the time at which this operation finished or was canceled.
9002    pub end_time: std::option::Option<wkt::Timestamp>,
9003
9004    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9005}
9006
9007impl CreateSchemaBundleMetadata {
9008    /// Creates a new default instance.
9009    pub fn new() -> Self {
9010        std::default::Default::default()
9011    }
9012
9013    /// Sets the value of [name][crate::model::CreateSchemaBundleMetadata::name].
9014    ///
9015    /// # Example
9016    /// ```ignore,no_run
9017    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
9018    /// let x = CreateSchemaBundleMetadata::new().set_name("example");
9019    /// ```
9020    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9021        self.name = v.into();
9022        self
9023    }
9024
9025    /// Sets the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
9026    ///
9027    /// # Example
9028    /// ```ignore,no_run
9029    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
9030    /// use wkt::Timestamp;
9031    /// let x = CreateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
9032    /// ```
9033    pub fn set_start_time<T>(mut self, v: T) -> Self
9034    where
9035        T: std::convert::Into<wkt::Timestamp>,
9036    {
9037        self.start_time = std::option::Option::Some(v.into());
9038        self
9039    }
9040
9041    /// Sets or clears the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
9042    ///
9043    /// # Example
9044    /// ```ignore,no_run
9045    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
9046    /// use wkt::Timestamp;
9047    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
9048    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
9049    /// ```
9050    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
9051    where
9052        T: std::convert::Into<wkt::Timestamp>,
9053    {
9054        self.start_time = v.map(|x| x.into());
9055        self
9056    }
9057
9058    /// Sets the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
9059    ///
9060    /// # Example
9061    /// ```ignore,no_run
9062    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
9063    /// use wkt::Timestamp;
9064    /// let x = CreateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
9065    /// ```
9066    pub fn set_end_time<T>(mut self, v: T) -> Self
9067    where
9068        T: std::convert::Into<wkt::Timestamp>,
9069    {
9070        self.end_time = std::option::Option::Some(v.into());
9071        self
9072    }
9073
9074    /// Sets or clears the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
9075    ///
9076    /// # Example
9077    /// ```ignore,no_run
9078    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
9079    /// use wkt::Timestamp;
9080    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9081    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
9082    /// ```
9083    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9084    where
9085        T: std::convert::Into<wkt::Timestamp>,
9086    {
9087        self.end_time = v.map(|x| x.into());
9088        self
9089    }
9090}
9091
9092impl wkt::message::Message for CreateSchemaBundleMetadata {
9093    fn typename() -> &'static str {
9094        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleMetadata"
9095    }
9096}
9097
9098/// The request for
9099/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
9100///
9101/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
9102#[derive(Clone, Default, PartialEq)]
9103#[non_exhaustive]
9104pub struct UpdateSchemaBundleRequest {
9105    /// Required. The schema bundle to update.
9106    ///
9107    /// The schema bundle's `name` field is used to identify the schema bundle to
9108    /// update. Values are of the form
9109    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
9110    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
9111
9112    /// Optional. The list of fields to update.
9113    pub update_mask: std::option::Option<wkt::FieldMask>,
9114
9115    /// Optional. If set, ignore the safety checks when updating the Schema Bundle.
9116    /// The safety checks are:
9117    ///
9118    /// - The new Schema Bundle is backwards compatible with the existing Schema
9119    ///   Bundle.
9120    pub ignore_warnings: bool,
9121
9122    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9123}
9124
9125impl UpdateSchemaBundleRequest {
9126    /// Creates a new default instance.
9127    pub fn new() -> Self {
9128        std::default::Default::default()
9129    }
9130
9131    /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
9132    ///
9133    /// # Example
9134    /// ```ignore,no_run
9135    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
9136    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
9137    /// let x = UpdateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
9138    /// ```
9139    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
9140    where
9141        T: std::convert::Into<crate::model::SchemaBundle>,
9142    {
9143        self.schema_bundle = std::option::Option::Some(v.into());
9144        self
9145    }
9146
9147    /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
9148    ///
9149    /// # Example
9150    /// ```ignore,no_run
9151    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
9152    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
9153    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
9154    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
9155    /// ```
9156    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
9157    where
9158        T: std::convert::Into<crate::model::SchemaBundle>,
9159    {
9160        self.schema_bundle = v.map(|x| x.into());
9161        self
9162    }
9163
9164    /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
9165    ///
9166    /// # Example
9167    /// ```ignore,no_run
9168    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
9169    /// use wkt::FieldMask;
9170    /// let x = UpdateSchemaBundleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
9171    /// ```
9172    pub fn set_update_mask<T>(mut self, v: T) -> Self
9173    where
9174        T: std::convert::Into<wkt::FieldMask>,
9175    {
9176        self.update_mask = std::option::Option::Some(v.into());
9177        self
9178    }
9179
9180    /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
9181    ///
9182    /// # Example
9183    /// ```ignore,no_run
9184    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
9185    /// use wkt::FieldMask;
9186    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
9187    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
9188    /// ```
9189    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9190    where
9191        T: std::convert::Into<wkt::FieldMask>,
9192    {
9193        self.update_mask = v.map(|x| x.into());
9194        self
9195    }
9196
9197    /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
9198    ///
9199    /// # Example
9200    /// ```ignore,no_run
9201    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
9202    /// let x = UpdateSchemaBundleRequest::new().set_ignore_warnings(true);
9203    /// ```
9204    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9205        self.ignore_warnings = v.into();
9206        self
9207    }
9208}
9209
9210impl wkt::message::Message for UpdateSchemaBundleRequest {
9211    fn typename() -> &'static str {
9212        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleRequest"
9213    }
9214}
9215
9216/// The metadata for the Operation returned by
9217/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
9218///
9219/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
9220#[derive(Clone, Default, PartialEq)]
9221#[non_exhaustive]
9222pub struct UpdateSchemaBundleMetadata {
9223    /// The unique name identifying this schema bundle.
9224    /// Values are of the form
9225    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
9226    pub name: std::string::String,
9227
9228    /// The time at which this operation started.
9229    pub start_time: std::option::Option<wkt::Timestamp>,
9230
9231    /// If set, the time at which this operation finished or was canceled.
9232    pub end_time: std::option::Option<wkt::Timestamp>,
9233
9234    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9235}
9236
9237impl UpdateSchemaBundleMetadata {
9238    /// Creates a new default instance.
9239    pub fn new() -> Self {
9240        std::default::Default::default()
9241    }
9242
9243    /// Sets the value of [name][crate::model::UpdateSchemaBundleMetadata::name].
9244    ///
9245    /// # Example
9246    /// ```ignore,no_run
9247    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
9248    /// let x = UpdateSchemaBundleMetadata::new().set_name("example");
9249    /// ```
9250    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9251        self.name = v.into();
9252        self
9253    }
9254
9255    /// Sets the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
9256    ///
9257    /// # Example
9258    /// ```ignore,no_run
9259    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
9260    /// use wkt::Timestamp;
9261    /// let x = UpdateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
9262    /// ```
9263    pub fn set_start_time<T>(mut self, v: T) -> Self
9264    where
9265        T: std::convert::Into<wkt::Timestamp>,
9266    {
9267        self.start_time = std::option::Option::Some(v.into());
9268        self
9269    }
9270
9271    /// Sets or clears the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
9272    ///
9273    /// # Example
9274    /// ```ignore,no_run
9275    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
9276    /// use wkt::Timestamp;
9277    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
9278    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
9279    /// ```
9280    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
9281    where
9282        T: std::convert::Into<wkt::Timestamp>,
9283    {
9284        self.start_time = v.map(|x| x.into());
9285        self
9286    }
9287
9288    /// Sets the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
9289    ///
9290    /// # Example
9291    /// ```ignore,no_run
9292    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
9293    /// use wkt::Timestamp;
9294    /// let x = UpdateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
9295    /// ```
9296    pub fn set_end_time<T>(mut self, v: T) -> Self
9297    where
9298        T: std::convert::Into<wkt::Timestamp>,
9299    {
9300        self.end_time = std::option::Option::Some(v.into());
9301        self
9302    }
9303
9304    /// Sets or clears the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
9305    ///
9306    /// # Example
9307    /// ```ignore,no_run
9308    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
9309    /// use wkt::Timestamp;
9310    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9311    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
9312    /// ```
9313    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9314    where
9315        T: std::convert::Into<wkt::Timestamp>,
9316    {
9317        self.end_time = v.map(|x| x.into());
9318        self
9319    }
9320}
9321
9322impl wkt::message::Message for UpdateSchemaBundleMetadata {
9323    fn typename() -> &'static str {
9324        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"
9325    }
9326}
9327
9328/// The request for
9329/// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
9330///
9331/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]: crate::client::BigtableTableAdmin::get_schema_bundle
9332#[derive(Clone, Default, PartialEq)]
9333#[non_exhaustive]
9334pub struct GetSchemaBundleRequest {
9335    /// Required. The unique name of the schema bundle to retrieve.
9336    /// Values are of the form
9337    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
9338    pub name: std::string::String,
9339
9340    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9341}
9342
9343impl GetSchemaBundleRequest {
9344    /// Creates a new default instance.
9345    pub fn new() -> Self {
9346        std::default::Default::default()
9347    }
9348
9349    /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
9350    ///
9351    /// # Example
9352    /// ```ignore,no_run
9353    /// # use google_cloud_bigtable_admin_v2::model::GetSchemaBundleRequest;
9354    /// # let project_id = "project_id";
9355    /// # let instance_id = "instance_id";
9356    /// # let table_id = "table_id";
9357    /// # let schema_bundle_id = "schema_bundle_id";
9358    /// let x = GetSchemaBundleRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
9359    /// ```
9360    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9361        self.name = v.into();
9362        self
9363    }
9364}
9365
9366impl wkt::message::Message for GetSchemaBundleRequest {
9367    fn typename() -> &'static str {
9368        "type.googleapis.com/google.bigtable.admin.v2.GetSchemaBundleRequest"
9369    }
9370}
9371
9372/// The request for
9373/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
9374///
9375/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
9376#[derive(Clone, Default, PartialEq)]
9377#[non_exhaustive]
9378pub struct ListSchemaBundlesRequest {
9379    /// Required. The parent, which owns this collection of schema bundles.
9380    /// Values are of the form
9381    /// `projects/{project}/instances/{instance}/tables/{table}`.
9382    pub parent: std::string::String,
9383
9384    /// The maximum number of schema bundles to return. If the value is positive,
9385    /// the server may return at most this value. If unspecified, the server will
9386    /// return the maximum allowed page size.
9387    pub page_size: i32,
9388
9389    /// A page token, received from a previous `ListSchemaBundles` call.
9390    /// Provide this to retrieve the subsequent page.
9391    ///
9392    /// When paginating, all other parameters provided to `ListSchemaBundles` must
9393    /// match the call that provided the page token.
9394    pub page_token: std::string::String,
9395
9396    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9397}
9398
9399impl ListSchemaBundlesRequest {
9400    /// Creates a new default instance.
9401    pub fn new() -> Self {
9402        std::default::Default::default()
9403    }
9404
9405    /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
9406    ///
9407    /// # Example
9408    /// ```ignore,no_run
9409    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
9410    /// # let project_id = "project_id";
9411    /// # let instance_id = "instance_id";
9412    /// # let table_id = "table_id";
9413    /// let x = ListSchemaBundlesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
9414    /// ```
9415    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9416        self.parent = v.into();
9417        self
9418    }
9419
9420    /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
9421    ///
9422    /// # Example
9423    /// ```ignore,no_run
9424    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
9425    /// let x = ListSchemaBundlesRequest::new().set_page_size(42);
9426    /// ```
9427    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9428        self.page_size = v.into();
9429        self
9430    }
9431
9432    /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
9433    ///
9434    /// # Example
9435    /// ```ignore,no_run
9436    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
9437    /// let x = ListSchemaBundlesRequest::new().set_page_token("example");
9438    /// ```
9439    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9440        self.page_token = v.into();
9441        self
9442    }
9443}
9444
9445impl wkt::message::Message for ListSchemaBundlesRequest {
9446    fn typename() -> &'static str {
9447        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesRequest"
9448    }
9449}
9450
9451/// The response for
9452/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
9453///
9454/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
9455#[derive(Clone, Default, PartialEq)]
9456#[non_exhaustive]
9457pub struct ListSchemaBundlesResponse {
9458    /// The schema bundles from the specified table.
9459    pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
9460
9461    /// A token, which can be sent as `page_token` to retrieve the next page.
9462    /// If this field is omitted, there are no subsequent pages.
9463    pub next_page_token: std::string::String,
9464
9465    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9466}
9467
9468impl ListSchemaBundlesResponse {
9469    /// Creates a new default instance.
9470    pub fn new() -> Self {
9471        std::default::Default::default()
9472    }
9473
9474    /// Sets the value of [schema_bundles][crate::model::ListSchemaBundlesResponse::schema_bundles].
9475    ///
9476    /// # Example
9477    /// ```ignore,no_run
9478    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
9479    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
9480    /// let x = ListSchemaBundlesResponse::new()
9481    ///     .set_schema_bundles([
9482    ///         SchemaBundle::default()/* use setters */,
9483    ///         SchemaBundle::default()/* use (different) setters */,
9484    ///     ]);
9485    /// ```
9486    pub fn set_schema_bundles<T, V>(mut self, v: T) -> Self
9487    where
9488        T: std::iter::IntoIterator<Item = V>,
9489        V: std::convert::Into<crate::model::SchemaBundle>,
9490    {
9491        use std::iter::Iterator;
9492        self.schema_bundles = v.into_iter().map(|i| i.into()).collect();
9493        self
9494    }
9495
9496    /// Sets the value of [next_page_token][crate::model::ListSchemaBundlesResponse::next_page_token].
9497    ///
9498    /// # Example
9499    /// ```ignore,no_run
9500    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
9501    /// let x = ListSchemaBundlesResponse::new().set_next_page_token("example");
9502    /// ```
9503    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9504        self.next_page_token = v.into();
9505        self
9506    }
9507}
9508
9509impl wkt::message::Message for ListSchemaBundlesResponse {
9510    fn typename() -> &'static str {
9511        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesResponse"
9512    }
9513}
9514
9515#[doc(hidden)]
9516impl google_cloud_gax::paginator::internal::PageableResponse for ListSchemaBundlesResponse {
9517    type PageItem = crate::model::SchemaBundle;
9518
9519    fn items(self) -> std::vec::Vec<Self::PageItem> {
9520        self.schema_bundles
9521    }
9522
9523    fn next_page_token(&self) -> std::string::String {
9524        use std::clone::Clone;
9525        self.next_page_token.clone()
9526    }
9527}
9528
9529/// The request for
9530/// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
9531///
9532/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]: crate::client::BigtableTableAdmin::delete_schema_bundle
9533#[derive(Clone, Default, PartialEq)]
9534#[non_exhaustive]
9535pub struct DeleteSchemaBundleRequest {
9536    /// Required. The unique name of the schema bundle to delete.
9537    /// Values are of the form
9538    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
9539    pub name: std::string::String,
9540
9541    /// Optional. The etag of the schema bundle.
9542    /// If this is provided, it must match the server's etag. The server
9543    /// returns an ABORTED error on a mismatched etag.
9544    pub etag: std::string::String,
9545
9546    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9547}
9548
9549impl DeleteSchemaBundleRequest {
9550    /// Creates a new default instance.
9551    pub fn new() -> Self {
9552        std::default::Default::default()
9553    }
9554
9555    /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
9556    ///
9557    /// # Example
9558    /// ```ignore,no_run
9559    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
9560    /// # let project_id = "project_id";
9561    /// # let instance_id = "instance_id";
9562    /// # let table_id = "table_id";
9563    /// # let schema_bundle_id = "schema_bundle_id";
9564    /// let x = DeleteSchemaBundleRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
9565    /// ```
9566    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9567        self.name = v.into();
9568        self
9569    }
9570
9571    /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
9572    ///
9573    /// # Example
9574    /// ```ignore,no_run
9575    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
9576    /// let x = DeleteSchemaBundleRequest::new().set_etag("example");
9577    /// ```
9578    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9579        self.etag = v.into();
9580        self
9581    }
9582}
9583
9584impl wkt::message::Message for DeleteSchemaBundleRequest {
9585    fn typename() -> &'static str {
9586        "type.googleapis.com/google.bigtable.admin.v2.DeleteSchemaBundleRequest"
9587    }
9588}
9589
9590/// Encapsulates progress related information for a Cloud Bigtable long
9591/// running operation.
9592#[derive(Clone, Default, PartialEq)]
9593#[non_exhaustive]
9594pub struct OperationProgress {
9595    /// Percent completion of the operation.
9596    /// Values are between 0 and 100 inclusive.
9597    pub progress_percent: i32,
9598
9599    /// Time the request was received.
9600    pub start_time: std::option::Option<wkt::Timestamp>,
9601
9602    /// If set, the time at which this operation failed or was completed
9603    /// successfully.
9604    pub end_time: std::option::Option<wkt::Timestamp>,
9605
9606    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9607}
9608
9609impl OperationProgress {
9610    /// Creates a new default instance.
9611    pub fn new() -> Self {
9612        std::default::Default::default()
9613    }
9614
9615    /// Sets the value of [progress_percent][crate::model::OperationProgress::progress_percent].
9616    ///
9617    /// # Example
9618    /// ```ignore,no_run
9619    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9620    /// let x = OperationProgress::new().set_progress_percent(42);
9621    /// ```
9622    pub fn set_progress_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9623        self.progress_percent = v.into();
9624        self
9625    }
9626
9627    /// Sets the value of [start_time][crate::model::OperationProgress::start_time].
9628    ///
9629    /// # Example
9630    /// ```ignore,no_run
9631    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9632    /// use wkt::Timestamp;
9633    /// let x = OperationProgress::new().set_start_time(Timestamp::default()/* use setters */);
9634    /// ```
9635    pub fn set_start_time<T>(mut self, v: T) -> Self
9636    where
9637        T: std::convert::Into<wkt::Timestamp>,
9638    {
9639        self.start_time = std::option::Option::Some(v.into());
9640        self
9641    }
9642
9643    /// Sets or clears the value of [start_time][crate::model::OperationProgress::start_time].
9644    ///
9645    /// # Example
9646    /// ```ignore,no_run
9647    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9648    /// use wkt::Timestamp;
9649    /// let x = OperationProgress::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
9650    /// let x = OperationProgress::new().set_or_clear_start_time(None::<Timestamp>);
9651    /// ```
9652    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
9653    where
9654        T: std::convert::Into<wkt::Timestamp>,
9655    {
9656        self.start_time = v.map(|x| x.into());
9657        self
9658    }
9659
9660    /// Sets the value of [end_time][crate::model::OperationProgress::end_time].
9661    ///
9662    /// # Example
9663    /// ```ignore,no_run
9664    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9665    /// use wkt::Timestamp;
9666    /// let x = OperationProgress::new().set_end_time(Timestamp::default()/* use setters */);
9667    /// ```
9668    pub fn set_end_time<T>(mut self, v: T) -> Self
9669    where
9670        T: std::convert::Into<wkt::Timestamp>,
9671    {
9672        self.end_time = std::option::Option::Some(v.into());
9673        self
9674    }
9675
9676    /// Sets or clears the value of [end_time][crate::model::OperationProgress::end_time].
9677    ///
9678    /// # Example
9679    /// ```ignore,no_run
9680    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9681    /// use wkt::Timestamp;
9682    /// let x = OperationProgress::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9683    /// let x = OperationProgress::new().set_or_clear_end_time(None::<Timestamp>);
9684    /// ```
9685    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9686    where
9687        T: std::convert::Into<wkt::Timestamp>,
9688    {
9689        self.end_time = v.map(|x| x.into());
9690        self
9691    }
9692}
9693
9694impl wkt::message::Message for OperationProgress {
9695    fn typename() -> &'static str {
9696        "type.googleapis.com/google.bigtable.admin.v2.OperationProgress"
9697    }
9698}
9699
9700/// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
9701/// the resources that serve them.
9702/// All tables in an instance are served from all
9703/// [Clusters][google.bigtable.admin.v2.Cluster] in the instance.
9704///
9705/// [google.bigtable.admin.v2.Cluster]: crate::model::Cluster
9706/// [google.bigtable.admin.v2.Table]: crate::model::Table
9707#[derive(Clone, Default, PartialEq)]
9708#[non_exhaustive]
9709pub struct Instance {
9710    /// The unique name of the instance. Values are of the form
9711    /// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
9712    pub name: std::string::String,
9713
9714    /// Required. The descriptive name for this instance as it appears in UIs.
9715    /// Can be changed at any time, but should be kept globally unique
9716    /// to avoid confusion.
9717    pub display_name: std::string::String,
9718
9719    /// Output only. The current state of the instance.
9720    pub state: crate::model::instance::State,
9721
9722    /// The type of the instance. Defaults to `PRODUCTION`.
9723    pub r#type: crate::model::instance::Type,
9724
9725    /// Optional. The edition of the instance. See
9726    /// [Edition][google.bigtable.admin.v2.Instance.Edition] for details.
9727    ///
9728    /// [google.bigtable.admin.v2.Instance.Edition]: crate::model::instance::Edition
9729    pub edition: crate::model::instance::Edition,
9730
9731    /// Labels are a flexible and lightweight mechanism for organizing cloud
9732    /// resources into groups that reflect a customer's organizational needs and
9733    /// deployment strategies. They can be used to filter resources and aggregate
9734    /// metrics.
9735    ///
9736    /// * Label keys must be between 1 and 63 characters long and must conform to
9737    ///   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
9738    /// * Label values must be between 0 and 63 characters long and must conform to
9739    ///   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
9740    /// * No more than 64 labels can be associated with a given resource.
9741    /// * Keys and values must both be under 128 bytes.
9742    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9743
9744    /// Output only. A commit timestamp representing when this Instance was
9745    /// created. For instances created before this field was added (August 2021),
9746    /// this value is `seconds: 0, nanos: 1`.
9747    pub create_time: std::option::Option<wkt::Timestamp>,
9748
9749    /// Output only. Reserved for future use.
9750    pub satisfies_pzs: std::option::Option<bool>,
9751
9752    /// Output only. Reserved for future use.
9753    pub satisfies_pzi: std::option::Option<bool>,
9754
9755    /// Optional. Input only. Immutable. Tag keys/values directly bound to this
9756    /// resource. For example:
9757    ///
9758    /// - "123/environment": "production",
9759    /// - "123/costCenter": "marketing"
9760    ///
9761    /// Tags and Labels (above) are both used to bind metadata to resources, with
9762    /// different use-cases. See
9763    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview> for an
9764    /// in-depth overview on the difference between tags and labels.
9765    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
9766
9767    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9768}
9769
9770impl Instance {
9771    /// Creates a new default instance.
9772    pub fn new() -> Self {
9773        std::default::Default::default()
9774    }
9775
9776    /// Sets the value of [name][crate::model::Instance::name].
9777    ///
9778    /// # Example
9779    /// ```ignore,no_run
9780    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9781    /// # let project_id = "project_id";
9782    /// # let instance_id = "instance_id";
9783    /// let x = Instance::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
9784    /// ```
9785    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9786        self.name = v.into();
9787        self
9788    }
9789
9790    /// Sets the value of [display_name][crate::model::Instance::display_name].
9791    ///
9792    /// # Example
9793    /// ```ignore,no_run
9794    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9795    /// let x = Instance::new().set_display_name("example");
9796    /// ```
9797    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9798        self.display_name = v.into();
9799        self
9800    }
9801
9802    /// Sets the value of [state][crate::model::Instance::state].
9803    ///
9804    /// # Example
9805    /// ```ignore,no_run
9806    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9807    /// use google_cloud_bigtable_admin_v2::model::instance::State;
9808    /// let x0 = Instance::new().set_state(State::Ready);
9809    /// let x1 = Instance::new().set_state(State::Creating);
9810    /// ```
9811    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
9812        self.state = v.into();
9813        self
9814    }
9815
9816    /// Sets the value of [r#type][crate::model::Instance::type].
9817    ///
9818    /// # Example
9819    /// ```ignore,no_run
9820    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9821    /// use google_cloud_bigtable_admin_v2::model::instance::Type;
9822    /// let x0 = Instance::new().set_type(Type::Production);
9823    /// let x1 = Instance::new().set_type(Type::Development);
9824    /// ```
9825    pub fn set_type<T: std::convert::Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
9826        self.r#type = v.into();
9827        self
9828    }
9829
9830    /// Sets the value of [edition][crate::model::Instance::edition].
9831    ///
9832    /// # Example
9833    /// ```ignore,no_run
9834    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9835    /// use google_cloud_bigtable_admin_v2::model::instance::Edition;
9836    /// let x0 = Instance::new().set_edition(Edition::Enterprise);
9837    /// let x1 = Instance::new().set_edition(Edition::EnterprisePlus);
9838    /// ```
9839    pub fn set_edition<T: std::convert::Into<crate::model::instance::Edition>>(
9840        mut self,
9841        v: T,
9842    ) -> Self {
9843        self.edition = v.into();
9844        self
9845    }
9846
9847    /// Sets the value of [labels][crate::model::Instance::labels].
9848    ///
9849    /// # Example
9850    /// ```ignore,no_run
9851    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9852    /// let x = Instance::new().set_labels([
9853    ///     ("key0", "abc"),
9854    ///     ("key1", "xyz"),
9855    /// ]);
9856    /// ```
9857    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9858    where
9859        T: std::iter::IntoIterator<Item = (K, V)>,
9860        K: std::convert::Into<std::string::String>,
9861        V: std::convert::Into<std::string::String>,
9862    {
9863        use std::iter::Iterator;
9864        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9865        self
9866    }
9867
9868    /// Sets the value of [create_time][crate::model::Instance::create_time].
9869    ///
9870    /// # Example
9871    /// ```ignore,no_run
9872    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9873    /// use wkt::Timestamp;
9874    /// let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);
9875    /// ```
9876    pub fn set_create_time<T>(mut self, v: T) -> Self
9877    where
9878        T: std::convert::Into<wkt::Timestamp>,
9879    {
9880        self.create_time = std::option::Option::Some(v.into());
9881        self
9882    }
9883
9884    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
9885    ///
9886    /// # Example
9887    /// ```ignore,no_run
9888    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9889    /// use wkt::Timestamp;
9890    /// let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9891    /// let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
9892    /// ```
9893    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9894    where
9895        T: std::convert::Into<wkt::Timestamp>,
9896    {
9897        self.create_time = v.map(|x| x.into());
9898        self
9899    }
9900
9901    /// Sets the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9902    ///
9903    /// # Example
9904    /// ```ignore,no_run
9905    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9906    /// let x = Instance::new().set_satisfies_pzs(true);
9907    /// ```
9908    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9909    where
9910        T: std::convert::Into<bool>,
9911    {
9912        self.satisfies_pzs = std::option::Option::Some(v.into());
9913        self
9914    }
9915
9916    /// Sets or clears the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9917    ///
9918    /// # Example
9919    /// ```ignore,no_run
9920    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9921    /// let x = Instance::new().set_or_clear_satisfies_pzs(Some(false));
9922    /// let x = Instance::new().set_or_clear_satisfies_pzs(None::<bool>);
9923    /// ```
9924    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9925    where
9926        T: std::convert::Into<bool>,
9927    {
9928        self.satisfies_pzs = v.map(|x| x.into());
9929        self
9930    }
9931
9932    /// Sets the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9933    ///
9934    /// # Example
9935    /// ```ignore,no_run
9936    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9937    /// let x = Instance::new().set_satisfies_pzi(true);
9938    /// ```
9939    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9940    where
9941        T: std::convert::Into<bool>,
9942    {
9943        self.satisfies_pzi = std::option::Option::Some(v.into());
9944        self
9945    }
9946
9947    /// Sets or clears the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9948    ///
9949    /// # Example
9950    /// ```ignore,no_run
9951    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9952    /// let x = Instance::new().set_or_clear_satisfies_pzi(Some(false));
9953    /// let x = Instance::new().set_or_clear_satisfies_pzi(None::<bool>);
9954    /// ```
9955    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9956    where
9957        T: std::convert::Into<bool>,
9958    {
9959        self.satisfies_pzi = v.map(|x| x.into());
9960        self
9961    }
9962
9963    /// Sets the value of [tags][crate::model::Instance::tags].
9964    ///
9965    /// # Example
9966    /// ```ignore,no_run
9967    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9968    /// let x = Instance::new().set_tags([
9969    ///     ("key0", "abc"),
9970    ///     ("key1", "xyz"),
9971    /// ]);
9972    /// ```
9973    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
9974    where
9975        T: std::iter::IntoIterator<Item = (K, V)>,
9976        K: std::convert::Into<std::string::String>,
9977        V: std::convert::Into<std::string::String>,
9978    {
9979        use std::iter::Iterator;
9980        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9981        self
9982    }
9983}
9984
9985impl wkt::message::Message for Instance {
9986    fn typename() -> &'static str {
9987        "type.googleapis.com/google.bigtable.admin.v2.Instance"
9988    }
9989}
9990
9991/// Defines additional types related to [Instance].
9992pub mod instance {
9993    #[allow(unused_imports)]
9994    use super::*;
9995
9996    /// Possible states of an instance.
9997    ///
9998    /// # Working with unknown values
9999    ///
10000    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10001    /// additional enum variants at any time. Adding new variants is not considered
10002    /// a breaking change. Applications should write their code in anticipation of:
10003    ///
10004    /// - New values appearing in future releases of the client library, **and**
10005    /// - New values received dynamically, without application changes.
10006    ///
10007    /// Please consult the [Working with enums] section in the user guide for some
10008    /// guidelines.
10009    ///
10010    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10011    #[derive(Clone, Debug, PartialEq)]
10012    #[non_exhaustive]
10013    pub enum State {
10014        /// The state of the instance could not be determined.
10015        NotKnown,
10016        /// The instance has been successfully created and can serve requests
10017        /// to its tables.
10018        Ready,
10019        /// The instance is currently being created, and may be destroyed
10020        /// if the creation process encounters an error.
10021        Creating,
10022        /// If set, the enum was initialized with an unknown value.
10023        ///
10024        /// Applications can examine the value using [State::value] or
10025        /// [State::name].
10026        UnknownValue(state::UnknownValue),
10027    }
10028
10029    #[doc(hidden)]
10030    pub mod state {
10031        #[allow(unused_imports)]
10032        use super::*;
10033        #[derive(Clone, Debug, PartialEq)]
10034        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10035    }
10036
10037    impl State {
10038        /// Gets the enum value.
10039        ///
10040        /// Returns `None` if the enum contains an unknown value deserialized from
10041        /// the string representation of enums.
10042        pub fn value(&self) -> std::option::Option<i32> {
10043            match self {
10044                Self::NotKnown => std::option::Option::Some(0),
10045                Self::Ready => std::option::Option::Some(1),
10046                Self::Creating => std::option::Option::Some(2),
10047                Self::UnknownValue(u) => u.0.value(),
10048            }
10049        }
10050
10051        /// Gets the enum value as a string.
10052        ///
10053        /// Returns `None` if the enum contains an unknown value deserialized from
10054        /// the integer representation of enums.
10055        pub fn name(&self) -> std::option::Option<&str> {
10056            match self {
10057                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
10058                Self::Ready => std::option::Option::Some("READY"),
10059                Self::Creating => std::option::Option::Some("CREATING"),
10060                Self::UnknownValue(u) => u.0.name(),
10061            }
10062        }
10063    }
10064
10065    impl std::default::Default for State {
10066        fn default() -> Self {
10067            use std::convert::From;
10068            Self::from(0)
10069        }
10070    }
10071
10072    impl std::fmt::Display for State {
10073        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10074            wkt::internal::display_enum(f, self.name(), self.value())
10075        }
10076    }
10077
10078    impl std::convert::From<i32> for State {
10079        fn from(value: i32) -> Self {
10080            match value {
10081                0 => Self::NotKnown,
10082                1 => Self::Ready,
10083                2 => Self::Creating,
10084                _ => Self::UnknownValue(state::UnknownValue(
10085                    wkt::internal::UnknownEnumValue::Integer(value),
10086                )),
10087            }
10088        }
10089    }
10090
10091    impl std::convert::From<&str> for State {
10092        fn from(value: &str) -> Self {
10093            use std::string::ToString;
10094            match value {
10095                "STATE_NOT_KNOWN" => Self::NotKnown,
10096                "READY" => Self::Ready,
10097                "CREATING" => Self::Creating,
10098                _ => Self::UnknownValue(state::UnknownValue(
10099                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10100                )),
10101            }
10102        }
10103    }
10104
10105    impl serde::ser::Serialize for State {
10106        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10107        where
10108            S: serde::Serializer,
10109        {
10110            match self {
10111                Self::NotKnown => serializer.serialize_i32(0),
10112                Self::Ready => serializer.serialize_i32(1),
10113                Self::Creating => serializer.serialize_i32(2),
10114                Self::UnknownValue(u) => u.0.serialize(serializer),
10115            }
10116        }
10117    }
10118
10119    impl<'de> serde::de::Deserialize<'de> for State {
10120        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10121        where
10122            D: serde::Deserializer<'de>,
10123        {
10124            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10125                ".google.bigtable.admin.v2.Instance.State",
10126            ))
10127        }
10128    }
10129
10130    /// The type of the instance.
10131    ///
10132    /// # Working with unknown values
10133    ///
10134    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10135    /// additional enum variants at any time. Adding new variants is not considered
10136    /// a breaking change. Applications should write their code in anticipation of:
10137    ///
10138    /// - New values appearing in future releases of the client library, **and**
10139    /// - New values received dynamically, without application changes.
10140    ///
10141    /// Please consult the [Working with enums] section in the user guide for some
10142    /// guidelines.
10143    ///
10144    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10145    #[derive(Clone, Debug, PartialEq)]
10146    #[non_exhaustive]
10147    pub enum Type {
10148        /// The type of the instance is unspecified. If set when creating an
10149        /// instance, a `PRODUCTION` instance will be created. If set when updating
10150        /// an instance, the type will be left unchanged.
10151        Unspecified,
10152        /// An instance meant for production use. `serve_nodes` must be set
10153        /// on the cluster.
10154        Production,
10155        /// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
10156        /// a higher minimum node count than DEVELOPMENT.
10157        Development,
10158        /// If set, the enum was initialized with an unknown value.
10159        ///
10160        /// Applications can examine the value using [Type::value] or
10161        /// [Type::name].
10162        UnknownValue(r#type::UnknownValue),
10163    }
10164
10165    #[doc(hidden)]
10166    pub mod r#type {
10167        #[allow(unused_imports)]
10168        use super::*;
10169        #[derive(Clone, Debug, PartialEq)]
10170        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10171    }
10172
10173    impl Type {
10174        /// Gets the enum value.
10175        ///
10176        /// Returns `None` if the enum contains an unknown value deserialized from
10177        /// the string representation of enums.
10178        pub fn value(&self) -> std::option::Option<i32> {
10179            match self {
10180                Self::Unspecified => std::option::Option::Some(0),
10181                Self::Production => std::option::Option::Some(1),
10182                Self::Development => std::option::Option::Some(2),
10183                Self::UnknownValue(u) => u.0.value(),
10184            }
10185        }
10186
10187        /// Gets the enum value as a string.
10188        ///
10189        /// Returns `None` if the enum contains an unknown value deserialized from
10190        /// the integer representation of enums.
10191        pub fn name(&self) -> std::option::Option<&str> {
10192            match self {
10193                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
10194                Self::Production => std::option::Option::Some("PRODUCTION"),
10195                Self::Development => std::option::Option::Some("DEVELOPMENT"),
10196                Self::UnknownValue(u) => u.0.name(),
10197            }
10198        }
10199    }
10200
10201    impl std::default::Default for Type {
10202        fn default() -> Self {
10203            use std::convert::From;
10204            Self::from(0)
10205        }
10206    }
10207
10208    impl std::fmt::Display for Type {
10209        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10210            wkt::internal::display_enum(f, self.name(), self.value())
10211        }
10212    }
10213
10214    impl std::convert::From<i32> for Type {
10215        fn from(value: i32) -> Self {
10216            match value {
10217                0 => Self::Unspecified,
10218                1 => Self::Production,
10219                2 => Self::Development,
10220                _ => Self::UnknownValue(r#type::UnknownValue(
10221                    wkt::internal::UnknownEnumValue::Integer(value),
10222                )),
10223            }
10224        }
10225    }
10226
10227    impl std::convert::From<&str> for Type {
10228        fn from(value: &str) -> Self {
10229            use std::string::ToString;
10230            match value {
10231                "TYPE_UNSPECIFIED" => Self::Unspecified,
10232                "PRODUCTION" => Self::Production,
10233                "DEVELOPMENT" => Self::Development,
10234                _ => Self::UnknownValue(r#type::UnknownValue(
10235                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10236                )),
10237            }
10238        }
10239    }
10240
10241    impl serde::ser::Serialize for Type {
10242        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10243        where
10244            S: serde::Serializer,
10245        {
10246            match self {
10247                Self::Unspecified => serializer.serialize_i32(0),
10248                Self::Production => serializer.serialize_i32(1),
10249                Self::Development => serializer.serialize_i32(2),
10250                Self::UnknownValue(u) => u.0.serialize(serializer),
10251            }
10252        }
10253    }
10254
10255    impl<'de> serde::de::Deserialize<'de> for Type {
10256        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10257        where
10258            D: serde::Deserializer<'de>,
10259        {
10260            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
10261                ".google.bigtable.admin.v2.Instance.Type",
10262            ))
10263        }
10264    }
10265
10266    /// Possible editions of an instance.
10267    ///
10268    /// An edition is a specific tier of Cloud Bigtable. Each edition is tailored
10269    /// to different customer needs. Higher tiers offer more features and better
10270    /// performance.
10271    ///
10272    /// # Working with unknown values
10273    ///
10274    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10275    /// additional enum variants at any time. Adding new variants is not considered
10276    /// a breaking change. Applications should write their code in anticipation of:
10277    ///
10278    /// - New values appearing in future releases of the client library, **and**
10279    /// - New values received dynamically, without application changes.
10280    ///
10281    /// Please consult the [Working with enums] section in the user guide for some
10282    /// guidelines.
10283    ///
10284    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10285    #[derive(Clone, Debug, PartialEq)]
10286    #[non_exhaustive]
10287    pub enum Edition {
10288        /// The edition is unspecified. This is treated as `ENTERPRISE`.
10289        Unspecified,
10290        /// The Enterprise edition. This is the default offering that is designed to
10291        /// meet the needs of most enterprise workloads.
10292        Enterprise,
10293        /// The Enterprise Plus edition. This is a premium tier that is designed for
10294        /// demanding, multi-tenant workloads requiring the highest levels of
10295        /// performance, scale, and global availability.
10296        ///
10297        /// The nodes in the Enterprise Plus tier come at a higher cost than the
10298        /// Enterprise tier. Any Enterprise Plus features must be disabled before
10299        /// downgrading to Enterprise.
10300        EnterprisePlus,
10301        /// If set, the enum was initialized with an unknown value.
10302        ///
10303        /// Applications can examine the value using [Edition::value] or
10304        /// [Edition::name].
10305        UnknownValue(edition::UnknownValue),
10306    }
10307
10308    #[doc(hidden)]
10309    pub mod edition {
10310        #[allow(unused_imports)]
10311        use super::*;
10312        #[derive(Clone, Debug, PartialEq)]
10313        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10314    }
10315
10316    impl Edition {
10317        /// Gets the enum value.
10318        ///
10319        /// Returns `None` if the enum contains an unknown value deserialized from
10320        /// the string representation of enums.
10321        pub fn value(&self) -> std::option::Option<i32> {
10322            match self {
10323                Self::Unspecified => std::option::Option::Some(0),
10324                Self::Enterprise => std::option::Option::Some(1),
10325                Self::EnterprisePlus => std::option::Option::Some(2),
10326                Self::UnknownValue(u) => u.0.value(),
10327            }
10328        }
10329
10330        /// Gets the enum value as a string.
10331        ///
10332        /// Returns `None` if the enum contains an unknown value deserialized from
10333        /// the integer representation of enums.
10334        pub fn name(&self) -> std::option::Option<&str> {
10335            match self {
10336                Self::Unspecified => std::option::Option::Some("EDITION_UNSPECIFIED"),
10337                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
10338                Self::EnterprisePlus => std::option::Option::Some("ENTERPRISE_PLUS"),
10339                Self::UnknownValue(u) => u.0.name(),
10340            }
10341        }
10342    }
10343
10344    impl std::default::Default for Edition {
10345        fn default() -> Self {
10346            use std::convert::From;
10347            Self::from(0)
10348        }
10349    }
10350
10351    impl std::fmt::Display for Edition {
10352        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10353            wkt::internal::display_enum(f, self.name(), self.value())
10354        }
10355    }
10356
10357    impl std::convert::From<i32> for Edition {
10358        fn from(value: i32) -> Self {
10359            match value {
10360                0 => Self::Unspecified,
10361                1 => Self::Enterprise,
10362                2 => Self::EnterprisePlus,
10363                _ => Self::UnknownValue(edition::UnknownValue(
10364                    wkt::internal::UnknownEnumValue::Integer(value),
10365                )),
10366            }
10367        }
10368    }
10369
10370    impl std::convert::From<&str> for Edition {
10371        fn from(value: &str) -> Self {
10372            use std::string::ToString;
10373            match value {
10374                "EDITION_UNSPECIFIED" => Self::Unspecified,
10375                "ENTERPRISE" => Self::Enterprise,
10376                "ENTERPRISE_PLUS" => Self::EnterprisePlus,
10377                _ => Self::UnknownValue(edition::UnknownValue(
10378                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10379                )),
10380            }
10381        }
10382    }
10383
10384    impl serde::ser::Serialize for Edition {
10385        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10386        where
10387            S: serde::Serializer,
10388        {
10389            match self {
10390                Self::Unspecified => serializer.serialize_i32(0),
10391                Self::Enterprise => serializer.serialize_i32(1),
10392                Self::EnterprisePlus => serializer.serialize_i32(2),
10393                Self::UnknownValue(u) => u.0.serialize(serializer),
10394            }
10395        }
10396    }
10397
10398    impl<'de> serde::de::Deserialize<'de> for Edition {
10399        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10400        where
10401            D: serde::Deserializer<'de>,
10402        {
10403            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Edition>::new(
10404                ".google.bigtable.admin.v2.Instance.Edition",
10405            ))
10406        }
10407    }
10408}
10409
10410/// The Autoscaling targets for a Cluster. These determine the recommended nodes.
10411#[derive(Clone, Default, PartialEq)]
10412#[non_exhaustive]
10413pub struct AutoscalingTargets {
10414    /// The cpu utilization that the Autoscaler should be trying to achieve.
10415    /// This number is on a scale from 0 (no utilization) to
10416    /// 100 (total utilization), and is limited between 10 and 80, otherwise it
10417    /// will return INVALID_ARGUMENT error.
10418    pub cpu_utilization_percent: i32,
10419
10420    /// The storage utilization that the Autoscaler should be trying to achieve.
10421    /// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
10422    /// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
10423    /// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
10424    /// it will be treated as if it were set to the default value: 2560 for SSD,
10425    /// 8192 for HDD.
10426    pub storage_utilization_gib_per_node: i32,
10427
10428    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10429}
10430
10431impl AutoscalingTargets {
10432    /// Creates a new default instance.
10433    pub fn new() -> Self {
10434        std::default::Default::default()
10435    }
10436
10437    /// Sets the value of [cpu_utilization_percent][crate::model::AutoscalingTargets::cpu_utilization_percent].
10438    ///
10439    /// # Example
10440    /// ```ignore,no_run
10441    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10442    /// let x = AutoscalingTargets::new().set_cpu_utilization_percent(42);
10443    /// ```
10444    pub fn set_cpu_utilization_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10445        self.cpu_utilization_percent = v.into();
10446        self
10447    }
10448
10449    /// Sets the value of [storage_utilization_gib_per_node][crate::model::AutoscalingTargets::storage_utilization_gib_per_node].
10450    ///
10451    /// # Example
10452    /// ```ignore,no_run
10453    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10454    /// let x = AutoscalingTargets::new().set_storage_utilization_gib_per_node(42);
10455    /// ```
10456    pub fn set_storage_utilization_gib_per_node<T: std::convert::Into<i32>>(
10457        mut self,
10458        v: T,
10459    ) -> Self {
10460        self.storage_utilization_gib_per_node = v.into();
10461        self
10462    }
10463}
10464
10465impl wkt::message::Message for AutoscalingTargets {
10466    fn typename() -> &'static str {
10467        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingTargets"
10468    }
10469}
10470
10471/// Limits for the number of nodes a Cluster can autoscale up/down to.
10472#[derive(Clone, Default, PartialEq)]
10473#[non_exhaustive]
10474pub struct AutoscalingLimits {
10475    /// Required. Minimum number of nodes to scale down to.
10476    pub min_serve_nodes: i32,
10477
10478    /// Required. Maximum number of nodes to scale up to.
10479    pub max_serve_nodes: i32,
10480
10481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10482}
10483
10484impl AutoscalingLimits {
10485    /// Creates a new default instance.
10486    pub fn new() -> Self {
10487        std::default::Default::default()
10488    }
10489
10490    /// Sets the value of [min_serve_nodes][crate::model::AutoscalingLimits::min_serve_nodes].
10491    ///
10492    /// # Example
10493    /// ```ignore,no_run
10494    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10495    /// let x = AutoscalingLimits::new().set_min_serve_nodes(42);
10496    /// ```
10497    pub fn set_min_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10498        self.min_serve_nodes = v.into();
10499        self
10500    }
10501
10502    /// Sets the value of [max_serve_nodes][crate::model::AutoscalingLimits::max_serve_nodes].
10503    ///
10504    /// # Example
10505    /// ```ignore,no_run
10506    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10507    /// let x = AutoscalingLimits::new().set_max_serve_nodes(42);
10508    /// ```
10509    pub fn set_max_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10510        self.max_serve_nodes = v.into();
10511        self
10512    }
10513}
10514
10515impl wkt::message::Message for AutoscalingLimits {
10516    fn typename() -> &'static str {
10517        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingLimits"
10518    }
10519}
10520
10521/// A resizable group of nodes in a particular cloud location, capable
10522/// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
10523/// [Instance][google.bigtable.admin.v2.Instance].
10524///
10525/// [google.bigtable.admin.v2.Instance]: crate::model::Instance
10526/// [google.bigtable.admin.v2.Table]: crate::model::Table
10527#[derive(Clone, Default, PartialEq)]
10528#[non_exhaustive]
10529pub struct Cluster {
10530    /// The unique name of the cluster. Values are of the form
10531    /// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
10532    pub name: std::string::String,
10533
10534    /// Immutable. The location where this cluster's nodes and storage reside. For
10535    /// best performance, clients should be located as close as possible to this
10536    /// cluster. Currently only zones are supported, so values should be of the
10537    /// form `projects/{project}/locations/{zone}`.
10538    pub location: std::string::String,
10539
10540    /// Output only. The current state of the cluster.
10541    pub state: crate::model::cluster::State,
10542
10543    /// The number of nodes in the cluster. If no value is set,
10544    /// Cloud Bigtable automatically allocates nodes based on your data footprint
10545    /// and optimized for 50% storage utilization.
10546    pub serve_nodes: i32,
10547
10548    /// Immutable. The node scaling factor of this cluster.
10549    pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
10550
10551    /// Immutable. The type of storage used by this cluster to serve its
10552    /// parent instance's tables, unless explicitly overridden.
10553    pub default_storage_type: crate::model::StorageType,
10554
10555    /// Immutable. The encryption configuration for CMEK-protected clusters.
10556    pub encryption_config: std::option::Option<crate::model::cluster::EncryptionConfig>,
10557
10558    #[allow(missing_docs)]
10559    pub config: std::option::Option<crate::model::cluster::Config>,
10560
10561    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10562}
10563
10564impl Cluster {
10565    /// Creates a new default instance.
10566    pub fn new() -> Self {
10567        std::default::Default::default()
10568    }
10569
10570    /// Sets the value of [name][crate::model::Cluster::name].
10571    ///
10572    /// # Example
10573    /// ```ignore,no_run
10574    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10575    /// # let project_id = "project_id";
10576    /// # let instance_id = "instance_id";
10577    /// # let cluster_id = "cluster_id";
10578    /// let x = Cluster::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
10579    /// ```
10580    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10581        self.name = v.into();
10582        self
10583    }
10584
10585    /// Sets the value of [location][crate::model::Cluster::location].
10586    ///
10587    /// # Example
10588    /// ```ignore,no_run
10589    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10590    /// let x = Cluster::new().set_location("example");
10591    /// ```
10592    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10593        self.location = v.into();
10594        self
10595    }
10596
10597    /// Sets the value of [state][crate::model::Cluster::state].
10598    ///
10599    /// # Example
10600    /// ```ignore,no_run
10601    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10602    /// use google_cloud_bigtable_admin_v2::model::cluster::State;
10603    /// let x0 = Cluster::new().set_state(State::Ready);
10604    /// let x1 = Cluster::new().set_state(State::Creating);
10605    /// let x2 = Cluster::new().set_state(State::Resizing);
10606    /// ```
10607    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
10608        self.state = v.into();
10609        self
10610    }
10611
10612    /// Sets the value of [serve_nodes][crate::model::Cluster::serve_nodes].
10613    ///
10614    /// # Example
10615    /// ```ignore,no_run
10616    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10617    /// let x = Cluster::new().set_serve_nodes(42);
10618    /// ```
10619    pub fn set_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10620        self.serve_nodes = v.into();
10621        self
10622    }
10623
10624    /// Sets the value of [node_scaling_factor][crate::model::Cluster::node_scaling_factor].
10625    ///
10626    /// # Example
10627    /// ```ignore,no_run
10628    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10629    /// use google_cloud_bigtable_admin_v2::model::cluster::NodeScalingFactor;
10630    /// let x0 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor1X);
10631    /// let x1 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor2X);
10632    /// ```
10633    pub fn set_node_scaling_factor<
10634        T: std::convert::Into<crate::model::cluster::NodeScalingFactor>,
10635    >(
10636        mut self,
10637        v: T,
10638    ) -> Self {
10639        self.node_scaling_factor = v.into();
10640        self
10641    }
10642
10643    /// Sets the value of [default_storage_type][crate::model::Cluster::default_storage_type].
10644    ///
10645    /// # Example
10646    /// ```ignore,no_run
10647    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10648    /// use google_cloud_bigtable_admin_v2::model::StorageType;
10649    /// let x0 = Cluster::new().set_default_storage_type(StorageType::Ssd);
10650    /// let x1 = Cluster::new().set_default_storage_type(StorageType::Hdd);
10651    /// ```
10652    pub fn set_default_storage_type<T: std::convert::Into<crate::model::StorageType>>(
10653        mut self,
10654        v: T,
10655    ) -> Self {
10656        self.default_storage_type = v.into();
10657        self
10658    }
10659
10660    /// Sets the value of [encryption_config][crate::model::Cluster::encryption_config].
10661    ///
10662    /// # Example
10663    /// ```ignore,no_run
10664    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10665    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10666    /// let x = Cluster::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
10667    /// ```
10668    pub fn set_encryption_config<T>(mut self, v: T) -> Self
10669    where
10670        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10671    {
10672        self.encryption_config = std::option::Option::Some(v.into());
10673        self
10674    }
10675
10676    /// Sets or clears the value of [encryption_config][crate::model::Cluster::encryption_config].
10677    ///
10678    /// # Example
10679    /// ```ignore,no_run
10680    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10681    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10682    /// let x = Cluster::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
10683    /// let x = Cluster::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
10684    /// ```
10685    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
10686    where
10687        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10688    {
10689        self.encryption_config = v.map(|x| x.into());
10690        self
10691    }
10692
10693    /// Sets the value of [config][crate::model::Cluster::config].
10694    ///
10695    /// Note that all the setters affecting `config` are mutually
10696    /// exclusive.
10697    ///
10698    /// # Example
10699    /// ```ignore,no_run
10700    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10701    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10702    /// let x = Cluster::new().set_config(Some(
10703    ///     google_cloud_bigtable_admin_v2::model::cluster::Config::ClusterConfig(ClusterConfig::default().into())));
10704    /// ```
10705    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::cluster::Config>>>(
10706        mut self,
10707        v: T,
10708    ) -> Self {
10709        self.config = v.into();
10710        self
10711    }
10712
10713    /// The value of [config][crate::model::Cluster::config]
10714    /// if it holds a `ClusterConfig`, `None` if the field is not set or
10715    /// holds a different branch.
10716    pub fn cluster_config(
10717        &self,
10718    ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::ClusterConfig>> {
10719        #[allow(unreachable_patterns)]
10720        self.config.as_ref().and_then(|v| match v {
10721            crate::model::cluster::Config::ClusterConfig(v) => std::option::Option::Some(v),
10722            _ => std::option::Option::None,
10723        })
10724    }
10725
10726    /// Sets the value of [config][crate::model::Cluster::config]
10727    /// to hold a `ClusterConfig`.
10728    ///
10729    /// Note that all the setters affecting `config` are
10730    /// mutually exclusive.
10731    ///
10732    /// # Example
10733    /// ```ignore,no_run
10734    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10735    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10736    /// let x = Cluster::new().set_cluster_config(ClusterConfig::default()/* use setters */);
10737    /// assert!(x.cluster_config().is_some());
10738    /// ```
10739    pub fn set_cluster_config<
10740        T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
10741    >(
10742        mut self,
10743        v: T,
10744    ) -> Self {
10745        self.config =
10746            std::option::Option::Some(crate::model::cluster::Config::ClusterConfig(v.into()));
10747        self
10748    }
10749}
10750
10751impl wkt::message::Message for Cluster {
10752    fn typename() -> &'static str {
10753        "type.googleapis.com/google.bigtable.admin.v2.Cluster"
10754    }
10755}
10756
10757/// Defines additional types related to [Cluster].
10758pub mod cluster {
10759    #[allow(unused_imports)]
10760    use super::*;
10761
10762    /// Autoscaling config for a cluster.
10763    #[derive(Clone, Default, PartialEq)]
10764    #[non_exhaustive]
10765    pub struct ClusterAutoscalingConfig {
10766        /// Required. Autoscaling limits for this cluster.
10767        pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
10768
10769        /// Required. Autoscaling targets for this cluster.
10770        pub autoscaling_targets: std::option::Option<crate::model::AutoscalingTargets>,
10771
10772        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10773    }
10774
10775    impl ClusterAutoscalingConfig {
10776        /// Creates a new default instance.
10777        pub fn new() -> Self {
10778            std::default::Default::default()
10779        }
10780
10781        /// Sets the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10782        ///
10783        /// # Example
10784        /// ```ignore,no_run
10785        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10786        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10787        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_limits(AutoscalingLimits::default()/* use setters */);
10788        /// ```
10789        pub fn set_autoscaling_limits<T>(mut self, v: T) -> Self
10790        where
10791            T: std::convert::Into<crate::model::AutoscalingLimits>,
10792        {
10793            self.autoscaling_limits = std::option::Option::Some(v.into());
10794            self
10795        }
10796
10797        /// Sets or clears the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10798        ///
10799        /// # Example
10800        /// ```ignore,no_run
10801        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10802        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10803        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(Some(AutoscalingLimits::default()/* use setters */));
10804        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(None::<AutoscalingLimits>);
10805        /// ```
10806        pub fn set_or_clear_autoscaling_limits<T>(mut self, v: std::option::Option<T>) -> Self
10807        where
10808            T: std::convert::Into<crate::model::AutoscalingLimits>,
10809        {
10810            self.autoscaling_limits = v.map(|x| x.into());
10811            self
10812        }
10813
10814        /// Sets the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10815        ///
10816        /// # Example
10817        /// ```ignore,no_run
10818        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10819        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10820        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_targets(AutoscalingTargets::default()/* use setters */);
10821        /// ```
10822        pub fn set_autoscaling_targets<T>(mut self, v: T) -> Self
10823        where
10824            T: std::convert::Into<crate::model::AutoscalingTargets>,
10825        {
10826            self.autoscaling_targets = std::option::Option::Some(v.into());
10827            self
10828        }
10829
10830        /// Sets or clears the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10831        ///
10832        /// # Example
10833        /// ```ignore,no_run
10834        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10835        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10836        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(Some(AutoscalingTargets::default()/* use setters */));
10837        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(None::<AutoscalingTargets>);
10838        /// ```
10839        pub fn set_or_clear_autoscaling_targets<T>(mut self, v: std::option::Option<T>) -> Self
10840        where
10841            T: std::convert::Into<crate::model::AutoscalingTargets>,
10842        {
10843            self.autoscaling_targets = v.map(|x| x.into());
10844            self
10845        }
10846    }
10847
10848    impl wkt::message::Message for ClusterAutoscalingConfig {
10849        fn typename() -> &'static str {
10850            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
10851        }
10852    }
10853
10854    /// Configuration for a cluster.
10855    #[derive(Clone, Default, PartialEq)]
10856    #[non_exhaustive]
10857    pub struct ClusterConfig {
10858        /// Autoscaling configuration for this cluster.
10859        pub cluster_autoscaling_config:
10860            std::option::Option<crate::model::cluster::ClusterAutoscalingConfig>,
10861
10862        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10863    }
10864
10865    impl ClusterConfig {
10866        /// Creates a new default instance.
10867        pub fn new() -> Self {
10868            std::default::Default::default()
10869        }
10870
10871        /// Sets the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10872        ///
10873        /// # Example
10874        /// ```ignore,no_run
10875        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10876        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10877        /// let x = ClusterConfig::new().set_cluster_autoscaling_config(ClusterAutoscalingConfig::default()/* use setters */);
10878        /// ```
10879        pub fn set_cluster_autoscaling_config<T>(mut self, v: T) -> Self
10880        where
10881            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10882        {
10883            self.cluster_autoscaling_config = std::option::Option::Some(v.into());
10884            self
10885        }
10886
10887        /// Sets or clears the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10888        ///
10889        /// # Example
10890        /// ```ignore,no_run
10891        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10892        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10893        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(Some(ClusterAutoscalingConfig::default()/* use setters */));
10894        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(None::<ClusterAutoscalingConfig>);
10895        /// ```
10896        pub fn set_or_clear_cluster_autoscaling_config<T>(
10897            mut self,
10898            v: std::option::Option<T>,
10899        ) -> Self
10900        where
10901            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10902        {
10903            self.cluster_autoscaling_config = v.map(|x| x.into());
10904            self
10905        }
10906    }
10907
10908    impl wkt::message::Message for ClusterConfig {
10909        fn typename() -> &'static str {
10910            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterConfig"
10911        }
10912    }
10913
10914    /// Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
10915    /// cluster.
10916    #[derive(Clone, Default, PartialEq)]
10917    #[non_exhaustive]
10918    pub struct EncryptionConfig {
10919        /// Describes the Cloud KMS encryption key that will be used to protect the
10920        /// destination Bigtable cluster. The requirements for this key are:
10921        ///
10922        /// 1. The Cloud Bigtable service account associated with the project that
10923        ///    contains this cluster must be granted the
10924        ///    `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
10925        /// 1. Only regional keys can be used and the region of the CMEK key must
10926        ///    match the region of the cluster.
10927        ///    Values are of the form
10928        ///    `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
10929        pub kms_key_name: std::string::String,
10930
10931        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10932    }
10933
10934    impl EncryptionConfig {
10935        /// Creates a new default instance.
10936        pub fn new() -> Self {
10937            std::default::Default::default()
10938        }
10939
10940        /// Sets the value of [kms_key_name][crate::model::cluster::EncryptionConfig::kms_key_name].
10941        ///
10942        /// # Example
10943        /// ```ignore,no_run
10944        /// # use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10945        /// let x = EncryptionConfig::new().set_kms_key_name("example");
10946        /// ```
10947        pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
10948            mut self,
10949            v: T,
10950        ) -> Self {
10951            self.kms_key_name = v.into();
10952            self
10953        }
10954    }
10955
10956    impl wkt::message::Message for EncryptionConfig {
10957        fn typename() -> &'static str {
10958            "type.googleapis.com/google.bigtable.admin.v2.Cluster.EncryptionConfig"
10959        }
10960    }
10961
10962    /// Possible states of a cluster.
10963    ///
10964    /// # Working with unknown values
10965    ///
10966    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10967    /// additional enum variants at any time. Adding new variants is not considered
10968    /// a breaking change. Applications should write their code in anticipation of:
10969    ///
10970    /// - New values appearing in future releases of the client library, **and**
10971    /// - New values received dynamically, without application changes.
10972    ///
10973    /// Please consult the [Working with enums] section in the user guide for some
10974    /// guidelines.
10975    ///
10976    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10977    #[derive(Clone, Debug, PartialEq)]
10978    #[non_exhaustive]
10979    pub enum State {
10980        /// The state of the cluster could not be determined.
10981        NotKnown,
10982        /// The cluster has been successfully created and is ready to serve requests.
10983        Ready,
10984        /// The cluster is currently being created, and may be destroyed
10985        /// if the creation process encounters an error.
10986        /// A cluster may not be able to serve requests while being created.
10987        Creating,
10988        /// The cluster is currently being resized, and may revert to its previous
10989        /// node count if the process encounters an error.
10990        /// A cluster is still capable of serving requests while being resized,
10991        /// but may exhibit performance as if its number of allocated nodes is
10992        /// between the starting and requested states.
10993        Resizing,
10994        /// The cluster has no backing nodes. The data (tables) still
10995        /// exist, but no operations can be performed on the cluster.
10996        Disabled,
10997        /// If set, the enum was initialized with an unknown value.
10998        ///
10999        /// Applications can examine the value using [State::value] or
11000        /// [State::name].
11001        UnknownValue(state::UnknownValue),
11002    }
11003
11004    #[doc(hidden)]
11005    pub mod state {
11006        #[allow(unused_imports)]
11007        use super::*;
11008        #[derive(Clone, Debug, PartialEq)]
11009        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11010    }
11011
11012    impl State {
11013        /// Gets the enum value.
11014        ///
11015        /// Returns `None` if the enum contains an unknown value deserialized from
11016        /// the string representation of enums.
11017        pub fn value(&self) -> std::option::Option<i32> {
11018            match self {
11019                Self::NotKnown => std::option::Option::Some(0),
11020                Self::Ready => std::option::Option::Some(1),
11021                Self::Creating => std::option::Option::Some(2),
11022                Self::Resizing => std::option::Option::Some(3),
11023                Self::Disabled => std::option::Option::Some(4),
11024                Self::UnknownValue(u) => u.0.value(),
11025            }
11026        }
11027
11028        /// Gets the enum value as a string.
11029        ///
11030        /// Returns `None` if the enum contains an unknown value deserialized from
11031        /// the integer representation of enums.
11032        pub fn name(&self) -> std::option::Option<&str> {
11033            match self {
11034                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
11035                Self::Ready => std::option::Option::Some("READY"),
11036                Self::Creating => std::option::Option::Some("CREATING"),
11037                Self::Resizing => std::option::Option::Some("RESIZING"),
11038                Self::Disabled => std::option::Option::Some("DISABLED"),
11039                Self::UnknownValue(u) => u.0.name(),
11040            }
11041        }
11042    }
11043
11044    impl std::default::Default for State {
11045        fn default() -> Self {
11046            use std::convert::From;
11047            Self::from(0)
11048        }
11049    }
11050
11051    impl std::fmt::Display for State {
11052        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11053            wkt::internal::display_enum(f, self.name(), self.value())
11054        }
11055    }
11056
11057    impl std::convert::From<i32> for State {
11058        fn from(value: i32) -> Self {
11059            match value {
11060                0 => Self::NotKnown,
11061                1 => Self::Ready,
11062                2 => Self::Creating,
11063                3 => Self::Resizing,
11064                4 => Self::Disabled,
11065                _ => Self::UnknownValue(state::UnknownValue(
11066                    wkt::internal::UnknownEnumValue::Integer(value),
11067                )),
11068            }
11069        }
11070    }
11071
11072    impl std::convert::From<&str> for State {
11073        fn from(value: &str) -> Self {
11074            use std::string::ToString;
11075            match value {
11076                "STATE_NOT_KNOWN" => Self::NotKnown,
11077                "READY" => Self::Ready,
11078                "CREATING" => Self::Creating,
11079                "RESIZING" => Self::Resizing,
11080                "DISABLED" => Self::Disabled,
11081                _ => Self::UnknownValue(state::UnknownValue(
11082                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11083                )),
11084            }
11085        }
11086    }
11087
11088    impl serde::ser::Serialize for State {
11089        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11090        where
11091            S: serde::Serializer,
11092        {
11093            match self {
11094                Self::NotKnown => serializer.serialize_i32(0),
11095                Self::Ready => serializer.serialize_i32(1),
11096                Self::Creating => serializer.serialize_i32(2),
11097                Self::Resizing => serializer.serialize_i32(3),
11098                Self::Disabled => serializer.serialize_i32(4),
11099                Self::UnknownValue(u) => u.0.serialize(serializer),
11100            }
11101        }
11102    }
11103
11104    impl<'de> serde::de::Deserialize<'de> for State {
11105        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11106        where
11107            D: serde::Deserializer<'de>,
11108        {
11109            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11110                ".google.bigtable.admin.v2.Cluster.State",
11111            ))
11112        }
11113    }
11114
11115    /// Possible node scaling factors of the clusters. Node scaling delivers better
11116    /// latency and more throughput by removing node boundaries.
11117    ///
11118    /// # Working with unknown values
11119    ///
11120    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11121    /// additional enum variants at any time. Adding new variants is not considered
11122    /// a breaking change. Applications should write their code in anticipation of:
11123    ///
11124    /// - New values appearing in future releases of the client library, **and**
11125    /// - New values received dynamically, without application changes.
11126    ///
11127    /// Please consult the [Working with enums] section in the user guide for some
11128    /// guidelines.
11129    ///
11130    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11131    #[derive(Clone, Debug, PartialEq)]
11132    #[non_exhaustive]
11133    pub enum NodeScalingFactor {
11134        /// No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
11135        Unspecified,
11136        /// The cluster is running with a scaling factor of 1.
11137        NodeScalingFactor1X,
11138        /// The cluster is running with a scaling factor of 2.
11139        /// All node count values must be in increments of 2 with this scaling factor
11140        /// enabled, otherwise an INVALID_ARGUMENT error will be returned.
11141        NodeScalingFactor2X,
11142        /// If set, the enum was initialized with an unknown value.
11143        ///
11144        /// Applications can examine the value using [NodeScalingFactor::value] or
11145        /// [NodeScalingFactor::name].
11146        UnknownValue(node_scaling_factor::UnknownValue),
11147    }
11148
11149    #[doc(hidden)]
11150    pub mod node_scaling_factor {
11151        #[allow(unused_imports)]
11152        use super::*;
11153        #[derive(Clone, Debug, PartialEq)]
11154        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11155    }
11156
11157    impl NodeScalingFactor {
11158        /// Gets the enum value.
11159        ///
11160        /// Returns `None` if the enum contains an unknown value deserialized from
11161        /// the string representation of enums.
11162        pub fn value(&self) -> std::option::Option<i32> {
11163            match self {
11164                Self::Unspecified => std::option::Option::Some(0),
11165                Self::NodeScalingFactor1X => std::option::Option::Some(1),
11166                Self::NodeScalingFactor2X => std::option::Option::Some(2),
11167                Self::UnknownValue(u) => u.0.value(),
11168            }
11169        }
11170
11171        /// Gets the enum value as a string.
11172        ///
11173        /// Returns `None` if the enum contains an unknown value deserialized from
11174        /// the integer representation of enums.
11175        pub fn name(&self) -> std::option::Option<&str> {
11176            match self {
11177                Self::Unspecified => std::option::Option::Some("NODE_SCALING_FACTOR_UNSPECIFIED"),
11178                Self::NodeScalingFactor1X => std::option::Option::Some("NODE_SCALING_FACTOR_1X"),
11179                Self::NodeScalingFactor2X => std::option::Option::Some("NODE_SCALING_FACTOR_2X"),
11180                Self::UnknownValue(u) => u.0.name(),
11181            }
11182        }
11183    }
11184
11185    impl std::default::Default for NodeScalingFactor {
11186        fn default() -> Self {
11187            use std::convert::From;
11188            Self::from(0)
11189        }
11190    }
11191
11192    impl std::fmt::Display for NodeScalingFactor {
11193        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11194            wkt::internal::display_enum(f, self.name(), self.value())
11195        }
11196    }
11197
11198    impl std::convert::From<i32> for NodeScalingFactor {
11199        fn from(value: i32) -> Self {
11200            match value {
11201                0 => Self::Unspecified,
11202                1 => Self::NodeScalingFactor1X,
11203                2 => Self::NodeScalingFactor2X,
11204                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
11205                    wkt::internal::UnknownEnumValue::Integer(value),
11206                )),
11207            }
11208        }
11209    }
11210
11211    impl std::convert::From<&str> for NodeScalingFactor {
11212        fn from(value: &str) -> Self {
11213            use std::string::ToString;
11214            match value {
11215                "NODE_SCALING_FACTOR_UNSPECIFIED" => Self::Unspecified,
11216                "NODE_SCALING_FACTOR_1X" => Self::NodeScalingFactor1X,
11217                "NODE_SCALING_FACTOR_2X" => Self::NodeScalingFactor2X,
11218                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
11219                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11220                )),
11221            }
11222        }
11223    }
11224
11225    impl serde::ser::Serialize for NodeScalingFactor {
11226        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11227        where
11228            S: serde::Serializer,
11229        {
11230            match self {
11231                Self::Unspecified => serializer.serialize_i32(0),
11232                Self::NodeScalingFactor1X => serializer.serialize_i32(1),
11233                Self::NodeScalingFactor2X => serializer.serialize_i32(2),
11234                Self::UnknownValue(u) => u.0.serialize(serializer),
11235            }
11236        }
11237    }
11238
11239    impl<'de> serde::de::Deserialize<'de> for NodeScalingFactor {
11240        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11241        where
11242            D: serde::Deserializer<'de>,
11243        {
11244            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeScalingFactor>::new(
11245                ".google.bigtable.admin.v2.Cluster.NodeScalingFactor",
11246            ))
11247        }
11248    }
11249
11250    #[allow(missing_docs)]
11251    #[derive(Clone, Debug, PartialEq)]
11252    #[non_exhaustive]
11253    pub enum Config {
11254        /// Configuration for this cluster.
11255        ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
11256    }
11257}
11258
11259/// The memory layer of a cluster. A memory layer serves reads from
11260/// memory without hitting the backing persistent data store.
11261#[derive(Clone, Default, PartialEq)]
11262#[non_exhaustive]
11263pub struct MemoryLayer {
11264    /// Identifier. Name of the memory layer. This is always:
11265    /// "projects/{project}/instances/{instance}/clusters/{cluster}/memoryLayer".
11266    pub name: std::string::String,
11267
11268    /// The configuration of this memory layer. Set an empty `memory_config` to
11269    /// enable the memory layer. Unset this to disable the memory layer.
11270    pub memory_config: std::option::Option<crate::model::memory_layer::MemoryConfig>,
11271
11272    /// Optional. The etag for this memory layer.
11273    /// This may be sent on update requests to ensure that the client has an
11274    /// up-to-date value before proceeding. The server returns an ABORTED error on
11275    /// a mismatched etag.
11276    pub etag: std::string::String,
11277
11278    /// Output only. The current state of the memory layer.
11279    pub state: crate::model::memory_layer::State,
11280
11281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11282}
11283
11284impl MemoryLayer {
11285    /// Creates a new default instance.
11286    pub fn new() -> Self {
11287        std::default::Default::default()
11288    }
11289
11290    /// Sets the value of [name][crate::model::MemoryLayer::name].
11291    ///
11292    /// # Example
11293    /// ```ignore,no_run
11294    /// # use google_cloud_bigtable_admin_v2::model::MemoryLayer;
11295    /// # let project_id = "project_id";
11296    /// # let instance_id = "instance_id";
11297    /// # let cluster_id = "cluster_id";
11298    /// let x = MemoryLayer::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/memoryLayer"));
11299    /// ```
11300    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11301        self.name = v.into();
11302        self
11303    }
11304
11305    /// Sets the value of [memory_config][crate::model::MemoryLayer::memory_config].
11306    ///
11307    /// # Example
11308    /// ```ignore,no_run
11309    /// # use google_cloud_bigtable_admin_v2::model::MemoryLayer;
11310    /// use google_cloud_bigtable_admin_v2::model::memory_layer::MemoryConfig;
11311    /// let x = MemoryLayer::new().set_memory_config(MemoryConfig::default()/* use setters */);
11312    /// ```
11313    pub fn set_memory_config<T>(mut self, v: T) -> Self
11314    where
11315        T: std::convert::Into<crate::model::memory_layer::MemoryConfig>,
11316    {
11317        self.memory_config = std::option::Option::Some(v.into());
11318        self
11319    }
11320
11321    /// Sets or clears the value of [memory_config][crate::model::MemoryLayer::memory_config].
11322    ///
11323    /// # Example
11324    /// ```ignore,no_run
11325    /// # use google_cloud_bigtable_admin_v2::model::MemoryLayer;
11326    /// use google_cloud_bigtable_admin_v2::model::memory_layer::MemoryConfig;
11327    /// let x = MemoryLayer::new().set_or_clear_memory_config(Some(MemoryConfig::default()/* use setters */));
11328    /// let x = MemoryLayer::new().set_or_clear_memory_config(None::<MemoryConfig>);
11329    /// ```
11330    pub fn set_or_clear_memory_config<T>(mut self, v: std::option::Option<T>) -> Self
11331    where
11332        T: std::convert::Into<crate::model::memory_layer::MemoryConfig>,
11333    {
11334        self.memory_config = v.map(|x| x.into());
11335        self
11336    }
11337
11338    /// Sets the value of [etag][crate::model::MemoryLayer::etag].
11339    ///
11340    /// # Example
11341    /// ```ignore,no_run
11342    /// # use google_cloud_bigtable_admin_v2::model::MemoryLayer;
11343    /// let x = MemoryLayer::new().set_etag("example");
11344    /// ```
11345    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11346        self.etag = v.into();
11347        self
11348    }
11349
11350    /// Sets the value of [state][crate::model::MemoryLayer::state].
11351    ///
11352    /// # Example
11353    /// ```ignore,no_run
11354    /// # use google_cloud_bigtable_admin_v2::model::MemoryLayer;
11355    /// use google_cloud_bigtable_admin_v2::model::memory_layer::State;
11356    /// let x0 = MemoryLayer::new().set_state(State::Ready);
11357    /// let x1 = MemoryLayer::new().set_state(State::Enabling);
11358    /// let x2 = MemoryLayer::new().set_state(State::Resizing);
11359    /// ```
11360    pub fn set_state<T: std::convert::Into<crate::model::memory_layer::State>>(
11361        mut self,
11362        v: T,
11363    ) -> Self {
11364        self.state = v.into();
11365        self
11366    }
11367}
11368
11369impl wkt::message::Message for MemoryLayer {
11370    fn typename() -> &'static str {
11371        "type.googleapis.com/google.bigtable.admin.v2.MemoryLayer"
11372    }
11373}
11374
11375/// Defines additional types related to [MemoryLayer].
11376pub mod memory_layer {
11377    #[allow(unused_imports)]
11378    use super::*;
11379
11380    /// Configuration of a memory layer.
11381    #[derive(Clone, Default, PartialEq)]
11382    #[non_exhaustive]
11383    pub struct MemoryConfig {
11384        /// Output only. Reporting the current size of the memory layer in GiB.
11385        pub storage_size_gib: i32,
11386
11387        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11388    }
11389
11390    impl MemoryConfig {
11391        /// Creates a new default instance.
11392        pub fn new() -> Self {
11393            std::default::Default::default()
11394        }
11395
11396        /// Sets the value of [storage_size_gib][crate::model::memory_layer::MemoryConfig::storage_size_gib].
11397        ///
11398        /// # Example
11399        /// ```ignore,no_run
11400        /// # use google_cloud_bigtable_admin_v2::model::memory_layer::MemoryConfig;
11401        /// let x = MemoryConfig::new().set_storage_size_gib(42);
11402        /// ```
11403        pub fn set_storage_size_gib<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11404            self.storage_size_gib = v.into();
11405            self
11406        }
11407    }
11408
11409    impl wkt::message::Message for MemoryConfig {
11410        fn typename() -> &'static str {
11411            "type.googleapis.com/google.bigtable.admin.v2.MemoryLayer.MemoryConfig"
11412        }
11413    }
11414
11415    /// Possible states of a memory layer.
11416    ///
11417    /// # Working with unknown values
11418    ///
11419    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11420    /// additional enum variants at any time. Adding new variants is not considered
11421    /// a breaking change. Applications should write their code in anticipation of:
11422    ///
11423    /// - New values appearing in future releases of the client library, **and**
11424    /// - New values received dynamically, without application changes.
11425    ///
11426    /// Please consult the [Working with enums] section in the user guide for some
11427    /// guidelines.
11428    ///
11429    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11430    #[derive(Clone, Debug, PartialEq)]
11431    #[non_exhaustive]
11432    pub enum State {
11433        /// The state of the memory layer could not be determined.
11434        NotKnown,
11435        /// The memory layer has been successfully enabled and is ready to serve
11436        /// requests.
11437        Ready,
11438        /// The memory layer is currently being enabled, and may be disabled
11439        /// if the enablement process encounters an error. A cluster may not be able
11440        /// to serve requests from the memory layer while being enabled.
11441        Enabling,
11442        /// The memory layer is currently being resized, and may revert to its
11443        /// previous storage size if the process encounters an error. The memory
11444        /// layer is still capable of serving requests while being resized, but may
11445        /// exhibit performance as if its number of allocated nodes is between the
11446        /// starting and requested states.
11447        Resizing,
11448        /// The memory layer is disabled. The default state for a cluster without a
11449        /// memory layer.
11450        Disabled,
11451        /// If set, the enum was initialized with an unknown value.
11452        ///
11453        /// Applications can examine the value using [State::value] or
11454        /// [State::name].
11455        UnknownValue(state::UnknownValue),
11456    }
11457
11458    #[doc(hidden)]
11459    pub mod state {
11460        #[allow(unused_imports)]
11461        use super::*;
11462        #[derive(Clone, Debug, PartialEq)]
11463        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11464    }
11465
11466    impl State {
11467        /// Gets the enum value.
11468        ///
11469        /// Returns `None` if the enum contains an unknown value deserialized from
11470        /// the string representation of enums.
11471        pub fn value(&self) -> std::option::Option<i32> {
11472            match self {
11473                Self::NotKnown => std::option::Option::Some(0),
11474                Self::Ready => std::option::Option::Some(1),
11475                Self::Enabling => std::option::Option::Some(2),
11476                Self::Resizing => std::option::Option::Some(3),
11477                Self::Disabled => std::option::Option::Some(4),
11478                Self::UnknownValue(u) => u.0.value(),
11479            }
11480        }
11481
11482        /// Gets the enum value as a string.
11483        ///
11484        /// Returns `None` if the enum contains an unknown value deserialized from
11485        /// the integer representation of enums.
11486        pub fn name(&self) -> std::option::Option<&str> {
11487            match self {
11488                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
11489                Self::Ready => std::option::Option::Some("READY"),
11490                Self::Enabling => std::option::Option::Some("ENABLING"),
11491                Self::Resizing => std::option::Option::Some("RESIZING"),
11492                Self::Disabled => std::option::Option::Some("DISABLED"),
11493                Self::UnknownValue(u) => u.0.name(),
11494            }
11495        }
11496    }
11497
11498    impl std::default::Default for State {
11499        fn default() -> Self {
11500            use std::convert::From;
11501            Self::from(0)
11502        }
11503    }
11504
11505    impl std::fmt::Display for State {
11506        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11507            wkt::internal::display_enum(f, self.name(), self.value())
11508        }
11509    }
11510
11511    impl std::convert::From<i32> for State {
11512        fn from(value: i32) -> Self {
11513            match value {
11514                0 => Self::NotKnown,
11515                1 => Self::Ready,
11516                2 => Self::Enabling,
11517                3 => Self::Resizing,
11518                4 => Self::Disabled,
11519                _ => Self::UnknownValue(state::UnknownValue(
11520                    wkt::internal::UnknownEnumValue::Integer(value),
11521                )),
11522            }
11523        }
11524    }
11525
11526    impl std::convert::From<&str> for State {
11527        fn from(value: &str) -> Self {
11528            use std::string::ToString;
11529            match value {
11530                "STATE_NOT_KNOWN" => Self::NotKnown,
11531                "READY" => Self::Ready,
11532                "ENABLING" => Self::Enabling,
11533                "RESIZING" => Self::Resizing,
11534                "DISABLED" => Self::Disabled,
11535                _ => Self::UnknownValue(state::UnknownValue(
11536                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11537                )),
11538            }
11539        }
11540    }
11541
11542    impl serde::ser::Serialize for State {
11543        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11544        where
11545            S: serde::Serializer,
11546        {
11547            match self {
11548                Self::NotKnown => serializer.serialize_i32(0),
11549                Self::Ready => serializer.serialize_i32(1),
11550                Self::Enabling => serializer.serialize_i32(2),
11551                Self::Resizing => serializer.serialize_i32(3),
11552                Self::Disabled => serializer.serialize_i32(4),
11553                Self::UnknownValue(u) => u.0.serialize(serializer),
11554            }
11555        }
11556    }
11557
11558    impl<'de> serde::de::Deserialize<'de> for State {
11559        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11560        where
11561            D: serde::Deserializer<'de>,
11562        {
11563            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11564                ".google.bigtable.admin.v2.MemoryLayer.State",
11565            ))
11566        }
11567    }
11568}
11569
11570/// A configuration object describing how Cloud Bigtable should treat traffic
11571/// from a particular end user application.
11572#[derive(Clone, Default, PartialEq)]
11573#[non_exhaustive]
11574pub struct AppProfile {
11575    /// The unique name of the app profile. Values are of the form
11576    /// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11577    pub name: std::string::String,
11578
11579    /// Strongly validated etag for optimistic concurrency control. Preserve the
11580    /// value returned from `GetAppProfile` when calling `UpdateAppProfile` to
11581    /// fail the request if there has been a modification in the mean time. The
11582    /// `update_mask` of the request need not include `etag` for this protection
11583    /// to apply.
11584    /// See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
11585    /// [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
11586    /// details.
11587    pub etag: std::string::String,
11588
11589    /// Long form description of the use case for this AppProfile.
11590    pub description: std::string::String,
11591
11592    /// The routing policy for all read/write requests that use this app profile.
11593    /// A value must be explicitly set.
11594    pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
11595
11596    /// Options for isolating this app profile's traffic from other use cases.
11597    pub isolation: std::option::Option<crate::model::app_profile::Isolation>,
11598
11599    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11600}
11601
11602impl AppProfile {
11603    /// Creates a new default instance.
11604    pub fn new() -> Self {
11605        std::default::Default::default()
11606    }
11607
11608    /// Sets the value of [name][crate::model::AppProfile::name].
11609    ///
11610    /// # Example
11611    /// ```ignore,no_run
11612    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11613    /// # let project_id = "project_id";
11614    /// # let instance_id = "instance_id";
11615    /// # let app_profile_id = "app_profile_id";
11616    /// let x = AppProfile::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
11617    /// ```
11618    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11619        self.name = v.into();
11620        self
11621    }
11622
11623    /// Sets the value of [etag][crate::model::AppProfile::etag].
11624    ///
11625    /// # Example
11626    /// ```ignore,no_run
11627    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11628    /// let x = AppProfile::new().set_etag("example");
11629    /// ```
11630    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11631        self.etag = v.into();
11632        self
11633    }
11634
11635    /// Sets the value of [description][crate::model::AppProfile::description].
11636    ///
11637    /// # Example
11638    /// ```ignore,no_run
11639    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11640    /// let x = AppProfile::new().set_description("example");
11641    /// ```
11642    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11643        self.description = v.into();
11644        self
11645    }
11646
11647    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy].
11648    ///
11649    /// Note that all the setters affecting `routing_policy` are mutually
11650    /// exclusive.
11651    ///
11652    /// # Example
11653    /// ```ignore,no_run
11654    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11655    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11656    /// let x = AppProfile::new().set_routing_policy(Some(
11657    ///     google_cloud_bigtable_admin_v2::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(MultiClusterRoutingUseAny::default().into())));
11658    /// ```
11659    pub fn set_routing_policy<
11660        T: std::convert::Into<std::option::Option<crate::model::app_profile::RoutingPolicy>>,
11661    >(
11662        mut self,
11663        v: T,
11664    ) -> Self {
11665        self.routing_policy = v.into();
11666        self
11667    }
11668
11669    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
11670    /// if it holds a `MultiClusterRoutingUseAny`, `None` if the field is not set or
11671    /// holds a different branch.
11672    pub fn multi_cluster_routing_use_any(
11673        &self,
11674    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>
11675    {
11676        #[allow(unreachable_patterns)]
11677        self.routing_policy.as_ref().and_then(|v| match v {
11678            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v) => {
11679                std::option::Option::Some(v)
11680            }
11681            _ => std::option::Option::None,
11682        })
11683    }
11684
11685    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
11686    /// to hold a `MultiClusterRoutingUseAny`.
11687    ///
11688    /// Note that all the setters affecting `routing_policy` are
11689    /// mutually exclusive.
11690    ///
11691    /// # Example
11692    /// ```ignore,no_run
11693    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11694    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11695    /// let x = AppProfile::new().set_multi_cluster_routing_use_any(MultiClusterRoutingUseAny::default()/* use setters */);
11696    /// assert!(x.multi_cluster_routing_use_any().is_some());
11697    /// assert!(x.single_cluster_routing().is_none());
11698    /// ```
11699    pub fn set_multi_cluster_routing_use_any<
11700        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>,
11701    >(
11702        mut self,
11703        v: T,
11704    ) -> Self {
11705        self.routing_policy = std::option::Option::Some(
11706            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v.into()),
11707        );
11708        self
11709    }
11710
11711    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
11712    /// if it holds a `SingleClusterRouting`, `None` if the field is not set or
11713    /// holds a different branch.
11714    pub fn single_cluster_routing(
11715        &self,
11716    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>
11717    {
11718        #[allow(unreachable_patterns)]
11719        self.routing_policy.as_ref().and_then(|v| match v {
11720            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v) => {
11721                std::option::Option::Some(v)
11722            }
11723            _ => std::option::Option::None,
11724        })
11725    }
11726
11727    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
11728    /// to hold a `SingleClusterRouting`.
11729    ///
11730    /// Note that all the setters affecting `routing_policy` are
11731    /// mutually exclusive.
11732    ///
11733    /// # Example
11734    /// ```ignore,no_run
11735    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11736    /// use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
11737    /// let x = AppProfile::new().set_single_cluster_routing(SingleClusterRouting::default()/* use setters */);
11738    /// assert!(x.single_cluster_routing().is_some());
11739    /// assert!(x.multi_cluster_routing_use_any().is_none());
11740    /// ```
11741    pub fn set_single_cluster_routing<
11742        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>,
11743    >(
11744        mut self,
11745        v: T,
11746    ) -> Self {
11747        self.routing_policy = std::option::Option::Some(
11748            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v.into()),
11749        );
11750        self
11751    }
11752
11753    /// Sets the value of [isolation][crate::model::AppProfile::isolation].
11754    ///
11755    /// Note that all the setters affecting `isolation` are mutually
11756    /// exclusive.
11757    ///
11758    /// # Example
11759    /// ```ignore,no_run
11760    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11761    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11762    /// let x = AppProfile::new().set_isolation(Some(
11763    ///     google_cloud_bigtable_admin_v2::model::app_profile::Isolation::StandardIsolation(StandardIsolation::default().into())));
11764    /// ```
11765    pub fn set_isolation<
11766        T: std::convert::Into<std::option::Option<crate::model::app_profile::Isolation>>,
11767    >(
11768        mut self,
11769        v: T,
11770    ) -> Self {
11771        self.isolation = v.into();
11772        self
11773    }
11774
11775    /// The value of [isolation][crate::model::AppProfile::isolation]
11776    /// if it holds a `Priority`, `None` if the field is not set or
11777    /// holds a different branch.
11778    #[deprecated]
11779    pub fn priority(&self) -> std::option::Option<&crate::model::app_profile::Priority> {
11780        #[allow(unreachable_patterns)]
11781        self.isolation.as_ref().and_then(|v| match v {
11782            crate::model::app_profile::Isolation::Priority(v) => std::option::Option::Some(v),
11783            _ => std::option::Option::None,
11784        })
11785    }
11786
11787    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11788    /// to hold a `Priority`.
11789    ///
11790    /// Note that all the setters affecting `isolation` are
11791    /// mutually exclusive.
11792    ///
11793    /// # Example
11794    /// ```ignore,no_run
11795    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11796    /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
11797    /// let x0 = AppProfile::new().set_priority(Priority::Low);
11798    /// let x1 = AppProfile::new().set_priority(Priority::Medium);
11799    /// let x2 = AppProfile::new().set_priority(Priority::High);
11800    /// assert!(x0.priority().is_some());
11801    /// assert!(x0.standard_isolation().is_none());
11802    /// assert!(x0.data_boost_isolation_read_only().is_none());
11803    /// assert!(x1.priority().is_some());
11804    /// assert!(x1.standard_isolation().is_none());
11805    /// assert!(x1.data_boost_isolation_read_only().is_none());
11806    /// assert!(x2.priority().is_some());
11807    /// assert!(x2.standard_isolation().is_none());
11808    /// assert!(x2.data_boost_isolation_read_only().is_none());
11809    /// ```
11810    #[deprecated]
11811    pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
11812        mut self,
11813        v: T,
11814    ) -> Self {
11815        self.isolation =
11816            std::option::Option::Some(crate::model::app_profile::Isolation::Priority(v.into()));
11817        self
11818    }
11819
11820    /// The value of [isolation][crate::model::AppProfile::isolation]
11821    /// if it holds a `StandardIsolation`, `None` if the field is not set or
11822    /// holds a different branch.
11823    pub fn standard_isolation(
11824        &self,
11825    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::StandardIsolation>> {
11826        #[allow(unreachable_patterns)]
11827        self.isolation.as_ref().and_then(|v| match v {
11828            crate::model::app_profile::Isolation::StandardIsolation(v) => {
11829                std::option::Option::Some(v)
11830            }
11831            _ => std::option::Option::None,
11832        })
11833    }
11834
11835    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11836    /// to hold a `StandardIsolation`.
11837    ///
11838    /// Note that all the setters affecting `isolation` are
11839    /// mutually exclusive.
11840    ///
11841    /// # Example
11842    /// ```ignore,no_run
11843    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11844    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11845    /// let x = AppProfile::new().set_standard_isolation(StandardIsolation::default()/* use setters */);
11846    /// assert!(x.standard_isolation().is_some());
11847    /// assert!(x.priority().is_none());
11848    /// assert!(x.data_boost_isolation_read_only().is_none());
11849    /// ```
11850    pub fn set_standard_isolation<
11851        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::StandardIsolation>>,
11852    >(
11853        mut self,
11854        v: T,
11855    ) -> Self {
11856        self.isolation = std::option::Option::Some(
11857            crate::model::app_profile::Isolation::StandardIsolation(v.into()),
11858        );
11859        self
11860    }
11861
11862    /// The value of [isolation][crate::model::AppProfile::isolation]
11863    /// if it holds a `DataBoostIsolationReadOnly`, `None` if the field is not set or
11864    /// holds a different branch.
11865    pub fn data_boost_isolation_read_only(
11866        &self,
11867    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>
11868    {
11869        #[allow(unreachable_patterns)]
11870        self.isolation.as_ref().and_then(|v| match v {
11871            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v) => {
11872                std::option::Option::Some(v)
11873            }
11874            _ => std::option::Option::None,
11875        })
11876    }
11877
11878    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11879    /// to hold a `DataBoostIsolationReadOnly`.
11880    ///
11881    /// Note that all the setters affecting `isolation` are
11882    /// mutually exclusive.
11883    ///
11884    /// # Example
11885    /// ```ignore,no_run
11886    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11887    /// use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11888    /// let x = AppProfile::new().set_data_boost_isolation_read_only(DataBoostIsolationReadOnly::default()/* use setters */);
11889    /// assert!(x.data_boost_isolation_read_only().is_some());
11890    /// assert!(x.priority().is_none());
11891    /// assert!(x.standard_isolation().is_none());
11892    /// ```
11893    pub fn set_data_boost_isolation_read_only<
11894        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>,
11895    >(
11896        mut self,
11897        v: T,
11898    ) -> Self {
11899        self.isolation = std::option::Option::Some(
11900            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v.into()),
11901        );
11902        self
11903    }
11904}
11905
11906impl wkt::message::Message for AppProfile {
11907    fn typename() -> &'static str {
11908        "type.googleapis.com/google.bigtable.admin.v2.AppProfile"
11909    }
11910}
11911
11912/// Defines additional types related to [AppProfile].
11913pub mod app_profile {
11914    #[allow(unused_imports)]
11915    use super::*;
11916
11917    /// Read/write requests are routed to the nearest cluster in the instance, and
11918    /// will fail over to the nearest cluster that is available in the event of
11919    /// transient errors or delays. Clusters in a region are considered
11920    /// equidistant. Choosing this option sacrifices read-your-writes consistency
11921    /// to improve availability.
11922    #[derive(Clone, Default, PartialEq)]
11923    #[non_exhaustive]
11924    pub struct MultiClusterRoutingUseAny {
11925        /// The set of clusters to route to. The order is ignored; clusters will be
11926        /// tried in order of distance. If left empty, all clusters are eligible.
11927        pub cluster_ids: std::vec::Vec<std::string::String>,
11928
11929        /// Possible algorithms for routing affinity. If enabled, Bigtable will
11930        /// route between equidistant clusters in a deterministic order rather than
11931        /// choosing randomly.
11932        ///
11933        /// This mechanism gives read-your-writes consistency for *most* requests
11934        /// under *most* circumstances, without sacrificing availability. Consistency
11935        /// is *not* guaranteed, as requests might still fail over between clusters
11936        /// in the event of errors or latency.
11937        pub affinity:
11938            std::option::Option<crate::model::app_profile::multi_cluster_routing_use_any::Affinity>,
11939
11940        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11941    }
11942
11943    impl MultiClusterRoutingUseAny {
11944        /// Creates a new default instance.
11945        pub fn new() -> Self {
11946            std::default::Default::default()
11947        }
11948
11949        /// Sets the value of [cluster_ids][crate::model::app_profile::MultiClusterRoutingUseAny::cluster_ids].
11950        ///
11951        /// # Example
11952        /// ```ignore,no_run
11953        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11954        /// let x = MultiClusterRoutingUseAny::new().set_cluster_ids(["a", "b", "c"]);
11955        /// ```
11956        pub fn set_cluster_ids<T, V>(mut self, v: T) -> Self
11957        where
11958            T: std::iter::IntoIterator<Item = V>,
11959            V: std::convert::Into<std::string::String>,
11960        {
11961            use std::iter::Iterator;
11962            self.cluster_ids = v.into_iter().map(|i| i.into()).collect();
11963            self
11964        }
11965
11966        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity].
11967        ///
11968        /// Note that all the setters affecting `affinity` are mutually
11969        /// exclusive.
11970        ///
11971        /// # Example
11972        /// ```ignore,no_run
11973        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11974        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
11975        /// let x = MultiClusterRoutingUseAny::new().set_affinity(Some(
11976        ///     google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(RowAffinity::default().into())));
11977        /// ```
11978        pub fn set_affinity<
11979            T: std::convert::Into<
11980                    std::option::Option<
11981                        crate::model::app_profile::multi_cluster_routing_use_any::Affinity,
11982                    >,
11983                >,
11984        >(
11985            mut self,
11986            v: T,
11987        ) -> Self {
11988            self.affinity = v.into();
11989            self
11990        }
11991
11992        /// The value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
11993        /// if it holds a `RowAffinity`, `None` if the field is not set or
11994        /// holds a different branch.
11995        pub fn row_affinity(
11996            &self,
11997        ) -> std::option::Option<
11998            &std::boxed::Box<crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity>,
11999        > {
12000            #[allow(unreachable_patterns)]
12001            self.affinity.as_ref().and_then(|v| match v {
12002                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
12003                    v,
12004                ) => std::option::Option::Some(v),
12005                _ => std::option::Option::None,
12006            })
12007        }
12008
12009        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
12010        /// to hold a `RowAffinity`.
12011        ///
12012        /// Note that all the setters affecting `affinity` are
12013        /// mutually exclusive.
12014        ///
12015        /// # Example
12016        /// ```ignore,no_run
12017        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
12018        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
12019        /// let x = MultiClusterRoutingUseAny::new().set_row_affinity(RowAffinity::default()/* use setters */);
12020        /// assert!(x.row_affinity().is_some());
12021        /// ```
12022        pub fn set_row_affinity<
12023            T: std::convert::Into<
12024                    std::boxed::Box<
12025                        crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
12026                    >,
12027                >,
12028        >(
12029            mut self,
12030            v: T,
12031        ) -> Self {
12032            self.affinity = std::option::Option::Some(
12033                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
12034                    v.into(),
12035                ),
12036            );
12037            self
12038        }
12039    }
12040
12041    impl wkt::message::Message for MultiClusterRoutingUseAny {
12042        fn typename() -> &'static str {
12043            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"
12044        }
12045    }
12046
12047    /// Defines additional types related to [MultiClusterRoutingUseAny].
12048    pub mod multi_cluster_routing_use_any {
12049        #[allow(unused_imports)]
12050        use super::*;
12051
12052        /// If enabled, Bigtable will route the request based on the row key of the
12053        /// request, rather than randomly. Instead, each row key will be assigned
12054        /// to a cluster, and will stick to that cluster. If clusters are added or
12055        /// removed, then this may affect which row keys stick to which clusters.
12056        /// To avoid this, users can use a cluster group to specify which clusters
12057        /// are to be used. In this case, new clusters that are not a part of the
12058        /// cluster group will not be routed to, and routing will be unaffected by
12059        /// the new cluster. Moreover, clusters specified in the cluster group cannot
12060        /// be deleted unless removed from the cluster group.
12061        #[derive(Clone, Default, PartialEq)]
12062        #[non_exhaustive]
12063        pub struct RowAffinity {
12064            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12065        }
12066
12067        impl RowAffinity {
12068            /// Creates a new default instance.
12069            pub fn new() -> Self {
12070                std::default::Default::default()
12071            }
12072        }
12073
12074        impl wkt::message::Message for RowAffinity {
12075            fn typename() -> &'static str {
12076                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"
12077            }
12078        }
12079
12080        /// Possible algorithms for routing affinity. If enabled, Bigtable will
12081        /// route between equidistant clusters in a deterministic order rather than
12082        /// choosing randomly.
12083        ///
12084        /// This mechanism gives read-your-writes consistency for *most* requests
12085        /// under *most* circumstances, without sacrificing availability. Consistency
12086        /// is *not* guaranteed, as requests might still fail over between clusters
12087        /// in the event of errors or latency.
12088        #[derive(Clone, Debug, PartialEq)]
12089        #[non_exhaustive]
12090        pub enum Affinity {
12091            /// Row affinity sticky routing based on the row key of the request.
12092            /// Requests that span multiple rows are routed non-deterministically.
12093            RowAffinity(
12094                std::boxed::Box<
12095                    crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
12096                >,
12097            ),
12098        }
12099    }
12100
12101    /// Unconditionally routes all read/write requests to a specific cluster.
12102    /// This option preserves read-your-writes consistency but does not improve
12103    /// availability.
12104    #[derive(Clone, Default, PartialEq)]
12105    #[non_exhaustive]
12106    pub struct SingleClusterRouting {
12107        /// The cluster to which read/write requests should be routed.
12108        pub cluster_id: std::string::String,
12109
12110        /// Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
12111        /// allowed by this app profile. It is unsafe to send these requests to
12112        /// the same table/row/column in multiple clusters.
12113        pub allow_transactional_writes: bool,
12114
12115        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12116    }
12117
12118    impl SingleClusterRouting {
12119        /// Creates a new default instance.
12120        pub fn new() -> Self {
12121            std::default::Default::default()
12122        }
12123
12124        /// Sets the value of [cluster_id][crate::model::app_profile::SingleClusterRouting::cluster_id].
12125        ///
12126        /// # Example
12127        /// ```ignore,no_run
12128        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
12129        /// let x = SingleClusterRouting::new().set_cluster_id("example");
12130        /// ```
12131        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12132            self.cluster_id = v.into();
12133            self
12134        }
12135
12136        /// Sets the value of [allow_transactional_writes][crate::model::app_profile::SingleClusterRouting::allow_transactional_writes].
12137        ///
12138        /// # Example
12139        /// ```ignore,no_run
12140        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
12141        /// let x = SingleClusterRouting::new().set_allow_transactional_writes(true);
12142        /// ```
12143        pub fn set_allow_transactional_writes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12144            self.allow_transactional_writes = v.into();
12145            self
12146        }
12147    }
12148
12149    impl wkt::message::Message for SingleClusterRouting {
12150        fn typename() -> &'static str {
12151            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"
12152        }
12153    }
12154
12155    /// Standard options for isolating this app profile's traffic from other use
12156    /// cases.
12157    #[derive(Clone, Default, PartialEq)]
12158    #[non_exhaustive]
12159    pub struct StandardIsolation {
12160        /// The priority of requests sent using this app profile.
12161        pub priority: crate::model::app_profile::Priority,
12162
12163        /// Optional. The memory config to use for requests sent using this app
12164        /// profile.
12165        pub memory_config:
12166            std::option::Option<crate::model::app_profile::standard_isolation::MemoryConfig>,
12167
12168        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12169    }
12170
12171    impl StandardIsolation {
12172        /// Creates a new default instance.
12173        pub fn new() -> Self {
12174            std::default::Default::default()
12175        }
12176
12177        /// Sets the value of [priority][crate::model::app_profile::StandardIsolation::priority].
12178        ///
12179        /// # Example
12180        /// ```ignore,no_run
12181        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
12182        /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
12183        /// let x0 = StandardIsolation::new().set_priority(Priority::Low);
12184        /// let x1 = StandardIsolation::new().set_priority(Priority::Medium);
12185        /// let x2 = StandardIsolation::new().set_priority(Priority::High);
12186        /// ```
12187        pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
12188            mut self,
12189            v: T,
12190        ) -> Self {
12191            self.priority = v.into();
12192            self
12193        }
12194
12195        /// Sets the value of [memory_config][crate::model::app_profile::StandardIsolation::memory_config].
12196        ///
12197        /// # Example
12198        /// ```ignore,no_run
12199        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
12200        /// use google_cloud_bigtable_admin_v2::model::app_profile::standard_isolation::MemoryConfig;
12201        /// let x = StandardIsolation::new().set_memory_config(MemoryConfig::default()/* use setters */);
12202        /// ```
12203        pub fn set_memory_config<T>(mut self, v: T) -> Self
12204        where
12205            T: std::convert::Into<crate::model::app_profile::standard_isolation::MemoryConfig>,
12206        {
12207            self.memory_config = std::option::Option::Some(v.into());
12208            self
12209        }
12210
12211        /// Sets or clears the value of [memory_config][crate::model::app_profile::StandardIsolation::memory_config].
12212        ///
12213        /// # Example
12214        /// ```ignore,no_run
12215        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
12216        /// use google_cloud_bigtable_admin_v2::model::app_profile::standard_isolation::MemoryConfig;
12217        /// let x = StandardIsolation::new().set_or_clear_memory_config(Some(MemoryConfig::default()/* use setters */));
12218        /// let x = StandardIsolation::new().set_or_clear_memory_config(None::<MemoryConfig>);
12219        /// ```
12220        pub fn set_or_clear_memory_config<T>(mut self, v: std::option::Option<T>) -> Self
12221        where
12222            T: std::convert::Into<crate::model::app_profile::standard_isolation::MemoryConfig>,
12223        {
12224            self.memory_config = v.map(|x| x.into());
12225            self
12226        }
12227    }
12228
12229    impl wkt::message::Message for StandardIsolation {
12230        fn typename() -> &'static str {
12231            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation"
12232        }
12233    }
12234
12235    /// Defines additional types related to [StandardIsolation].
12236    pub mod standard_isolation {
12237        #[allow(unused_imports)]
12238        use super::*;
12239
12240        /// If set, eligible single-row requests (currently limited to ReadRows)
12241        /// using this app profile will be routed to the memory layer. All eligible
12242        /// writes populate the memory layer. MemoryConfig can only be set if the
12243        /// AppProfile uses single cluster routing and the configured cluster has a
12244        /// memory layer enabled.
12245        #[derive(Clone, Default, PartialEq)]
12246        #[non_exhaustive]
12247        pub struct MemoryConfig {
12248            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12249        }
12250
12251        impl MemoryConfig {
12252            /// Creates a new default instance.
12253            pub fn new() -> Self {
12254                std::default::Default::default()
12255            }
12256        }
12257
12258        impl wkt::message::Message for MemoryConfig {
12259            fn typename() -> &'static str {
12260                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation.MemoryConfig"
12261            }
12262        }
12263    }
12264
12265    /// Data Boost is a serverless compute capability that lets you run
12266    /// high-throughput read jobs and queries on your Bigtable data, without
12267    /// impacting the performance of the clusters that handle your application
12268    /// traffic. Data Boost supports read-only use cases with single-cluster
12269    /// routing.
12270    #[derive(Clone, Default, PartialEq)]
12271    #[non_exhaustive]
12272    pub struct DataBoostIsolationReadOnly {
12273        /// The Compute Billing Owner for this Data Boost App Profile.
12274        pub compute_billing_owner: std::option::Option<
12275            crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
12276        >,
12277
12278        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12279    }
12280
12281    impl DataBoostIsolationReadOnly {
12282        /// Creates a new default instance.
12283        pub fn new() -> Self {
12284            std::default::Default::default()
12285        }
12286
12287        /// Sets the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
12288        ///
12289        /// # Example
12290        /// ```ignore,no_run
12291        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
12292        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
12293        /// let x0 = DataBoostIsolationReadOnly::new().set_compute_billing_owner(ComputeBillingOwner::HostPays);
12294        /// ```
12295        pub fn set_compute_billing_owner<T>(mut self, v: T) -> Self
12296        where
12297            T: std::convert::Into<
12298                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
12299                >,
12300        {
12301            self.compute_billing_owner = std::option::Option::Some(v.into());
12302            self
12303        }
12304
12305        /// Sets or clears the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
12306        ///
12307        /// # Example
12308        /// ```ignore,no_run
12309        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
12310        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
12311        /// let x0 = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(Some(ComputeBillingOwner::HostPays));
12312        /// let x_none = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(None::<ComputeBillingOwner>);
12313        /// ```
12314        pub fn set_or_clear_compute_billing_owner<T>(mut self, v: std::option::Option<T>) -> Self
12315        where
12316            T: std::convert::Into<
12317                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
12318                >,
12319        {
12320            self.compute_billing_owner = v.map(|x| x.into());
12321            self
12322        }
12323    }
12324
12325    impl wkt::message::Message for DataBoostIsolationReadOnly {
12326        fn typename() -> &'static str {
12327            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"
12328        }
12329    }
12330
12331    /// Defines additional types related to [DataBoostIsolationReadOnly].
12332    pub mod data_boost_isolation_read_only {
12333        #[allow(unused_imports)]
12334        use super::*;
12335
12336        /// Compute Billing Owner specifies how usage should be accounted when using
12337        /// Data Boost. Compute Billing Owner also configures which Cloud Project is
12338        /// charged for relevant quota.
12339        ///
12340        /// # Working with unknown values
12341        ///
12342        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12343        /// additional enum variants at any time. Adding new variants is not considered
12344        /// a breaking change. Applications should write their code in anticipation of:
12345        ///
12346        /// - New values appearing in future releases of the client library, **and**
12347        /// - New values received dynamically, without application changes.
12348        ///
12349        /// Please consult the [Working with enums] section in the user guide for some
12350        /// guidelines.
12351        ///
12352        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12353        #[derive(Clone, Debug, PartialEq)]
12354        #[non_exhaustive]
12355        pub enum ComputeBillingOwner {
12356            /// Unspecified value.
12357            Unspecified,
12358            /// The host Cloud Project containing the targeted Bigtable Instance /
12359            /// Table pays for compute.
12360            HostPays,
12361            /// If set, the enum was initialized with an unknown value.
12362            ///
12363            /// Applications can examine the value using [ComputeBillingOwner::value] or
12364            /// [ComputeBillingOwner::name].
12365            UnknownValue(compute_billing_owner::UnknownValue),
12366        }
12367
12368        #[doc(hidden)]
12369        pub mod compute_billing_owner {
12370            #[allow(unused_imports)]
12371            use super::*;
12372            #[derive(Clone, Debug, PartialEq)]
12373            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12374        }
12375
12376        impl ComputeBillingOwner {
12377            /// Gets the enum value.
12378            ///
12379            /// Returns `None` if the enum contains an unknown value deserialized from
12380            /// the string representation of enums.
12381            pub fn value(&self) -> std::option::Option<i32> {
12382                match self {
12383                    Self::Unspecified => std::option::Option::Some(0),
12384                    Self::HostPays => std::option::Option::Some(1),
12385                    Self::UnknownValue(u) => u.0.value(),
12386                }
12387            }
12388
12389            /// Gets the enum value as a string.
12390            ///
12391            /// Returns `None` if the enum contains an unknown value deserialized from
12392            /// the integer representation of enums.
12393            pub fn name(&self) -> std::option::Option<&str> {
12394                match self {
12395                    Self::Unspecified => {
12396                        std::option::Option::Some("COMPUTE_BILLING_OWNER_UNSPECIFIED")
12397                    }
12398                    Self::HostPays => std::option::Option::Some("HOST_PAYS"),
12399                    Self::UnknownValue(u) => u.0.name(),
12400                }
12401            }
12402        }
12403
12404        impl std::default::Default for ComputeBillingOwner {
12405            fn default() -> Self {
12406                use std::convert::From;
12407                Self::from(0)
12408            }
12409        }
12410
12411        impl std::fmt::Display for ComputeBillingOwner {
12412            fn fmt(
12413                &self,
12414                f: &mut std::fmt::Formatter<'_>,
12415            ) -> std::result::Result<(), std::fmt::Error> {
12416                wkt::internal::display_enum(f, self.name(), self.value())
12417            }
12418        }
12419
12420        impl std::convert::From<i32> for ComputeBillingOwner {
12421            fn from(value: i32) -> Self {
12422                match value {
12423                    0 => Self::Unspecified,
12424                    1 => Self::HostPays,
12425                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
12426                        wkt::internal::UnknownEnumValue::Integer(value),
12427                    )),
12428                }
12429            }
12430        }
12431
12432        impl std::convert::From<&str> for ComputeBillingOwner {
12433            fn from(value: &str) -> Self {
12434                use std::string::ToString;
12435                match value {
12436                    "COMPUTE_BILLING_OWNER_UNSPECIFIED" => Self::Unspecified,
12437                    "HOST_PAYS" => Self::HostPays,
12438                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
12439                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12440                    )),
12441                }
12442            }
12443        }
12444
12445        impl serde::ser::Serialize for ComputeBillingOwner {
12446            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12447            where
12448                S: serde::Serializer,
12449            {
12450                match self {
12451                    Self::Unspecified => serializer.serialize_i32(0),
12452                    Self::HostPays => serializer.serialize_i32(1),
12453                    Self::UnknownValue(u) => u.0.serialize(serializer),
12454                }
12455            }
12456        }
12457
12458        impl<'de> serde::de::Deserialize<'de> for ComputeBillingOwner {
12459            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12460            where
12461                D: serde::Deserializer<'de>,
12462            {
12463                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeBillingOwner>::new(
12464                    ".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner"))
12465            }
12466        }
12467    }
12468
12469    /// Possible priorities for an app profile. Note that higher priority writes
12470    /// can sometimes queue behind lower priority writes to the same tablet, as
12471    /// writes must be strictly sequenced in the durability log.
12472    ///
12473    /// # Working with unknown values
12474    ///
12475    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12476    /// additional enum variants at any time. Adding new variants is not considered
12477    /// a breaking change. Applications should write their code in anticipation of:
12478    ///
12479    /// - New values appearing in future releases of the client library, **and**
12480    /// - New values received dynamically, without application changes.
12481    ///
12482    /// Please consult the [Working with enums] section in the user guide for some
12483    /// guidelines.
12484    ///
12485    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12486    #[derive(Clone, Debug, PartialEq)]
12487    #[non_exhaustive]
12488    pub enum Priority {
12489        /// Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation.
12490        Unspecified,
12491        #[allow(missing_docs)]
12492        Low,
12493        #[allow(missing_docs)]
12494        Medium,
12495        #[allow(missing_docs)]
12496        High,
12497        /// If set, the enum was initialized with an unknown value.
12498        ///
12499        /// Applications can examine the value using [Priority::value] or
12500        /// [Priority::name].
12501        UnknownValue(priority::UnknownValue),
12502    }
12503
12504    #[doc(hidden)]
12505    pub mod priority {
12506        #[allow(unused_imports)]
12507        use super::*;
12508        #[derive(Clone, Debug, PartialEq)]
12509        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12510    }
12511
12512    impl Priority {
12513        /// Gets the enum value.
12514        ///
12515        /// Returns `None` if the enum contains an unknown value deserialized from
12516        /// the string representation of enums.
12517        pub fn value(&self) -> std::option::Option<i32> {
12518            match self {
12519                Self::Unspecified => std::option::Option::Some(0),
12520                Self::Low => std::option::Option::Some(1),
12521                Self::Medium => std::option::Option::Some(2),
12522                Self::High => std::option::Option::Some(3),
12523                Self::UnknownValue(u) => u.0.value(),
12524            }
12525        }
12526
12527        /// Gets the enum value as a string.
12528        ///
12529        /// Returns `None` if the enum contains an unknown value deserialized from
12530        /// the integer representation of enums.
12531        pub fn name(&self) -> std::option::Option<&str> {
12532            match self {
12533                Self::Unspecified => std::option::Option::Some("PRIORITY_UNSPECIFIED"),
12534                Self::Low => std::option::Option::Some("PRIORITY_LOW"),
12535                Self::Medium => std::option::Option::Some("PRIORITY_MEDIUM"),
12536                Self::High => std::option::Option::Some("PRIORITY_HIGH"),
12537                Self::UnknownValue(u) => u.0.name(),
12538            }
12539        }
12540    }
12541
12542    impl std::default::Default for Priority {
12543        fn default() -> Self {
12544            use std::convert::From;
12545            Self::from(0)
12546        }
12547    }
12548
12549    impl std::fmt::Display for Priority {
12550        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12551            wkt::internal::display_enum(f, self.name(), self.value())
12552        }
12553    }
12554
12555    impl std::convert::From<i32> for Priority {
12556        fn from(value: i32) -> Self {
12557            match value {
12558                0 => Self::Unspecified,
12559                1 => Self::Low,
12560                2 => Self::Medium,
12561                3 => Self::High,
12562                _ => Self::UnknownValue(priority::UnknownValue(
12563                    wkt::internal::UnknownEnumValue::Integer(value),
12564                )),
12565            }
12566        }
12567    }
12568
12569    impl std::convert::From<&str> for Priority {
12570        fn from(value: &str) -> Self {
12571            use std::string::ToString;
12572            match value {
12573                "PRIORITY_UNSPECIFIED" => Self::Unspecified,
12574                "PRIORITY_LOW" => Self::Low,
12575                "PRIORITY_MEDIUM" => Self::Medium,
12576                "PRIORITY_HIGH" => Self::High,
12577                _ => Self::UnknownValue(priority::UnknownValue(
12578                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12579                )),
12580            }
12581        }
12582    }
12583
12584    impl serde::ser::Serialize for Priority {
12585        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12586        where
12587            S: serde::Serializer,
12588        {
12589            match self {
12590                Self::Unspecified => serializer.serialize_i32(0),
12591                Self::Low => serializer.serialize_i32(1),
12592                Self::Medium => serializer.serialize_i32(2),
12593                Self::High => serializer.serialize_i32(3),
12594                Self::UnknownValue(u) => u.0.serialize(serializer),
12595            }
12596        }
12597    }
12598
12599    impl<'de> serde::de::Deserialize<'de> for Priority {
12600        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12601        where
12602            D: serde::Deserializer<'de>,
12603        {
12604            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Priority>::new(
12605                ".google.bigtable.admin.v2.AppProfile.Priority",
12606            ))
12607        }
12608    }
12609
12610    /// The routing policy for all read/write requests that use this app profile.
12611    /// A value must be explicitly set.
12612    #[derive(Clone, Debug, PartialEq)]
12613    #[non_exhaustive]
12614    pub enum RoutingPolicy {
12615        /// Use a multi-cluster routing policy.
12616        MultiClusterRoutingUseAny(
12617            std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
12618        ),
12619        /// Use a single-cluster routing policy.
12620        SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
12621    }
12622
12623    /// Options for isolating this app profile's traffic from other use cases.
12624    #[derive(Clone, Debug, PartialEq)]
12625    #[non_exhaustive]
12626    pub enum Isolation {
12627        /// This field has been deprecated in favor of `standard_isolation.priority`.
12628        /// If you set this field, `standard_isolation.priority` will be set instead.
12629        ///
12630        /// The priority of requests sent using this app profile.
12631        #[deprecated]
12632        Priority(crate::model::app_profile::Priority),
12633        /// The standard options used for isolating this app profile's traffic from
12634        /// other use cases.
12635        StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
12636        /// Specifies that this app profile is intended for read-only usage via the
12637        /// Data Boost feature.
12638        DataBoostIsolationReadOnly(
12639            std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
12640        ),
12641    }
12642}
12643
12644/// A tablet is a defined by a start and end key and is explained in
12645/// <https://cloud.google.com/bigtable/docs/overview#architecture> and
12646/// <https://cloud.google.com/bigtable/docs/performance#optimization>.
12647/// A Hot tablet is a tablet that exhibits high average cpu usage during the time
12648/// interval from start time to end time.
12649#[derive(Clone, Default, PartialEq)]
12650#[non_exhaustive]
12651pub struct HotTablet {
12652    /// The unique name of the hot tablet. Values are of the form
12653    /// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
12654    pub name: std::string::String,
12655
12656    /// Name of the table that contains the tablet. Values are of the form
12657    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
12658    pub table_name: std::string::String,
12659
12660    /// Output only. The start time of the hot tablet.
12661    pub start_time: std::option::Option<wkt::Timestamp>,
12662
12663    /// Output only. The end time of the hot tablet.
12664    pub end_time: std::option::Option<wkt::Timestamp>,
12665
12666    /// Tablet Start Key (inclusive).
12667    pub start_key: std::string::String,
12668
12669    /// Tablet End Key (inclusive).
12670    pub end_key: std::string::String,
12671
12672    /// Output only. The average CPU usage spent by a node on this tablet over the
12673    /// start_time to end_time time range. The percentage is the amount of CPU used
12674    /// by the node to serve the tablet, from 0% (tablet was not interacted with)
12675    /// to 100% (the node spent all cycles serving the hot tablet).
12676    pub node_cpu_usage_percent: f32,
12677
12678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12679}
12680
12681impl HotTablet {
12682    /// Creates a new default instance.
12683    pub fn new() -> Self {
12684        std::default::Default::default()
12685    }
12686
12687    /// Sets the value of [name][crate::model::HotTablet::name].
12688    ///
12689    /// # Example
12690    /// ```ignore,no_run
12691    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12692    /// # let project_id = "project_id";
12693    /// # let instance_id = "instance_id";
12694    /// # let cluster_id = "cluster_id";
12695    /// # let hot_tablet_id = "hot_tablet_id";
12696    /// let x = HotTablet::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/hotTablets/{hot_tablet_id}"));
12697    /// ```
12698    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12699        self.name = v.into();
12700        self
12701    }
12702
12703    /// Sets the value of [table_name][crate::model::HotTablet::table_name].
12704    ///
12705    /// # Example
12706    /// ```ignore,no_run
12707    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12708    /// # let project_id = "project_id";
12709    /// # let instance_id = "instance_id";
12710    /// # let table_id = "table_id";
12711    /// let x = HotTablet::new().set_table_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
12712    /// ```
12713    pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12714        self.table_name = v.into();
12715        self
12716    }
12717
12718    /// Sets the value of [start_time][crate::model::HotTablet::start_time].
12719    ///
12720    /// # Example
12721    /// ```ignore,no_run
12722    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12723    /// use wkt::Timestamp;
12724    /// let x = HotTablet::new().set_start_time(Timestamp::default()/* use setters */);
12725    /// ```
12726    pub fn set_start_time<T>(mut self, v: T) -> Self
12727    where
12728        T: std::convert::Into<wkt::Timestamp>,
12729    {
12730        self.start_time = std::option::Option::Some(v.into());
12731        self
12732    }
12733
12734    /// Sets or clears the value of [start_time][crate::model::HotTablet::start_time].
12735    ///
12736    /// # Example
12737    /// ```ignore,no_run
12738    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12739    /// use wkt::Timestamp;
12740    /// let x = HotTablet::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
12741    /// let x = HotTablet::new().set_or_clear_start_time(None::<Timestamp>);
12742    /// ```
12743    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
12744    where
12745        T: std::convert::Into<wkt::Timestamp>,
12746    {
12747        self.start_time = v.map(|x| x.into());
12748        self
12749    }
12750
12751    /// Sets the value of [end_time][crate::model::HotTablet::end_time].
12752    ///
12753    /// # Example
12754    /// ```ignore,no_run
12755    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12756    /// use wkt::Timestamp;
12757    /// let x = HotTablet::new().set_end_time(Timestamp::default()/* use setters */);
12758    /// ```
12759    pub fn set_end_time<T>(mut self, v: T) -> Self
12760    where
12761        T: std::convert::Into<wkt::Timestamp>,
12762    {
12763        self.end_time = std::option::Option::Some(v.into());
12764        self
12765    }
12766
12767    /// Sets or clears the value of [end_time][crate::model::HotTablet::end_time].
12768    ///
12769    /// # Example
12770    /// ```ignore,no_run
12771    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12772    /// use wkt::Timestamp;
12773    /// let x = HotTablet::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
12774    /// let x = HotTablet::new().set_or_clear_end_time(None::<Timestamp>);
12775    /// ```
12776    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
12777    where
12778        T: std::convert::Into<wkt::Timestamp>,
12779    {
12780        self.end_time = v.map(|x| x.into());
12781        self
12782    }
12783
12784    /// Sets the value of [start_key][crate::model::HotTablet::start_key].
12785    ///
12786    /// # Example
12787    /// ```ignore,no_run
12788    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12789    /// let x = HotTablet::new().set_start_key("example");
12790    /// ```
12791    pub fn set_start_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12792        self.start_key = v.into();
12793        self
12794    }
12795
12796    /// Sets the value of [end_key][crate::model::HotTablet::end_key].
12797    ///
12798    /// # Example
12799    /// ```ignore,no_run
12800    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12801    /// let x = HotTablet::new().set_end_key("example");
12802    /// ```
12803    pub fn set_end_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12804        self.end_key = v.into();
12805        self
12806    }
12807
12808    /// Sets the value of [node_cpu_usage_percent][crate::model::HotTablet::node_cpu_usage_percent].
12809    ///
12810    /// # Example
12811    /// ```ignore,no_run
12812    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
12813    /// let x = HotTablet::new().set_node_cpu_usage_percent(42.0);
12814    /// ```
12815    pub fn set_node_cpu_usage_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12816        self.node_cpu_usage_percent = v.into();
12817        self
12818    }
12819}
12820
12821impl wkt::message::Message for HotTablet {
12822    fn typename() -> &'static str {
12823        "type.googleapis.com/google.bigtable.admin.v2.HotTablet"
12824    }
12825}
12826
12827/// A SQL logical view object that can be referenced in SQL queries.
12828#[derive(Clone, Default, PartialEq)]
12829#[non_exhaustive]
12830pub struct LogicalView {
12831    /// Identifier. The unique name of the logical view.
12832    /// Format:
12833    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
12834    pub name: std::string::String,
12835
12836    /// Required. The logical view's select query.
12837    pub query: std::string::String,
12838
12839    /// Optional. The etag for this logical view.
12840    /// This may be sent on update requests to ensure that the client has an
12841    /// up-to-date value before proceeding. The server returns an ABORTED error on
12842    /// a mismatched etag.
12843    pub etag: std::string::String,
12844
12845    /// Optional. Set to true to make the LogicalView protected against deletion.
12846    pub deletion_protection: bool,
12847
12848    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12849}
12850
12851impl LogicalView {
12852    /// Creates a new default instance.
12853    pub fn new() -> Self {
12854        std::default::Default::default()
12855    }
12856
12857    /// Sets the value of [name][crate::model::LogicalView::name].
12858    ///
12859    /// # Example
12860    /// ```ignore,no_run
12861    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12862    /// # let project_id = "project_id";
12863    /// # let instance_id = "instance_id";
12864    /// # let logical_view_id = "logical_view_id";
12865    /// let x = LogicalView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
12866    /// ```
12867    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12868        self.name = v.into();
12869        self
12870    }
12871
12872    /// Sets the value of [query][crate::model::LogicalView::query].
12873    ///
12874    /// # Example
12875    /// ```ignore,no_run
12876    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12877    /// let x = LogicalView::new().set_query("example");
12878    /// ```
12879    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12880        self.query = v.into();
12881        self
12882    }
12883
12884    /// Sets the value of [etag][crate::model::LogicalView::etag].
12885    ///
12886    /// # Example
12887    /// ```ignore,no_run
12888    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12889    /// let x = LogicalView::new().set_etag("example");
12890    /// ```
12891    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12892        self.etag = v.into();
12893        self
12894    }
12895
12896    /// Sets the value of [deletion_protection][crate::model::LogicalView::deletion_protection].
12897    ///
12898    /// # Example
12899    /// ```ignore,no_run
12900    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12901    /// let x = LogicalView::new().set_deletion_protection(true);
12902    /// ```
12903    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12904        self.deletion_protection = v.into();
12905        self
12906    }
12907}
12908
12909impl wkt::message::Message for LogicalView {
12910    fn typename() -> &'static str {
12911        "type.googleapis.com/google.bigtable.admin.v2.LogicalView"
12912    }
12913}
12914
12915/// A materialized view object that can be referenced in SQL queries.
12916#[derive(Clone, Default, PartialEq)]
12917#[non_exhaustive]
12918pub struct MaterializedView {
12919    /// Identifier. The unique name of the materialized view.
12920    /// Format:
12921    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
12922    pub name: std::string::String,
12923
12924    /// Required. Immutable. The materialized view's select query.
12925    pub query: std::string::String,
12926
12927    /// Optional. The etag for this materialized view.
12928    /// This may be sent on update requests to ensure that the client has an
12929    /// up-to-date value before proceeding. The server returns an ABORTED error on
12930    /// a mismatched etag.
12931    pub etag: std::string::String,
12932
12933    /// Set to true to make the MaterializedView protected against deletion.
12934    pub deletion_protection: bool,
12935
12936    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12937}
12938
12939impl MaterializedView {
12940    /// Creates a new default instance.
12941    pub fn new() -> Self {
12942        std::default::Default::default()
12943    }
12944
12945    /// Sets the value of [name][crate::model::MaterializedView::name].
12946    ///
12947    /// # Example
12948    /// ```ignore,no_run
12949    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12950    /// # let project_id = "project_id";
12951    /// # let instance_id = "instance_id";
12952    /// # let materialized_view_id = "materialized_view_id";
12953    /// let x = MaterializedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
12954    /// ```
12955    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12956        self.name = v.into();
12957        self
12958    }
12959
12960    /// Sets the value of [query][crate::model::MaterializedView::query].
12961    ///
12962    /// # Example
12963    /// ```ignore,no_run
12964    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12965    /// let x = MaterializedView::new().set_query("example");
12966    /// ```
12967    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12968        self.query = v.into();
12969        self
12970    }
12971
12972    /// Sets the value of [etag][crate::model::MaterializedView::etag].
12973    ///
12974    /// # Example
12975    /// ```ignore,no_run
12976    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12977    /// let x = MaterializedView::new().set_etag("example");
12978    /// ```
12979    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12980        self.etag = v.into();
12981        self
12982    }
12983
12984    /// Sets the value of [deletion_protection][crate::model::MaterializedView::deletion_protection].
12985    ///
12986    /// # Example
12987    /// ```ignore,no_run
12988    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12989    /// let x = MaterializedView::new().set_deletion_protection(true);
12990    /// ```
12991    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12992        self.deletion_protection = v.into();
12993        self
12994    }
12995}
12996
12997impl wkt::message::Message for MaterializedView {
12998    fn typename() -> &'static str {
12999        "type.googleapis.com/google.bigtable.admin.v2.MaterializedView"
13000    }
13001}
13002
13003/// Information about a table restore.
13004#[derive(Clone, Default, PartialEq)]
13005#[non_exhaustive]
13006pub struct RestoreInfo {
13007    /// The type of the restore source.
13008    pub source_type: crate::model::RestoreSourceType,
13009
13010    /// Information about the source used to restore the table.
13011    pub source_info: std::option::Option<crate::model::restore_info::SourceInfo>,
13012
13013    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13014}
13015
13016impl RestoreInfo {
13017    /// Creates a new default instance.
13018    pub fn new() -> Self {
13019        std::default::Default::default()
13020    }
13021
13022    /// Sets the value of [source_type][crate::model::RestoreInfo::source_type].
13023    ///
13024    /// # Example
13025    /// ```ignore,no_run
13026    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
13027    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
13028    /// let x0 = RestoreInfo::new().set_source_type(RestoreSourceType::Backup);
13029    /// ```
13030    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
13031        mut self,
13032        v: T,
13033    ) -> Self {
13034        self.source_type = v.into();
13035        self
13036    }
13037
13038    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info].
13039    ///
13040    /// Note that all the setters affecting `source_info` are mutually
13041    /// exclusive.
13042    ///
13043    /// # Example
13044    /// ```ignore,no_run
13045    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
13046    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
13047    /// let x = RestoreInfo::new().set_source_info(Some(
13048    ///     google_cloud_bigtable_admin_v2::model::restore_info::SourceInfo::BackupInfo(BackupInfo::default().into())));
13049    /// ```
13050    pub fn set_source_info<
13051        T: std::convert::Into<std::option::Option<crate::model::restore_info::SourceInfo>>,
13052    >(
13053        mut self,
13054        v: T,
13055    ) -> Self {
13056        self.source_info = v.into();
13057        self
13058    }
13059
13060    /// The value of [source_info][crate::model::RestoreInfo::source_info]
13061    /// if it holds a `BackupInfo`, `None` if the field is not set or
13062    /// holds a different branch.
13063    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
13064        #[allow(unreachable_patterns)]
13065        self.source_info.as_ref().and_then(|v| match v {
13066            crate::model::restore_info::SourceInfo::BackupInfo(v) => std::option::Option::Some(v),
13067            _ => std::option::Option::None,
13068        })
13069    }
13070
13071    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info]
13072    /// to hold a `BackupInfo`.
13073    ///
13074    /// Note that all the setters affecting `source_info` are
13075    /// mutually exclusive.
13076    ///
13077    /// # Example
13078    /// ```ignore,no_run
13079    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
13080    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
13081    /// let x = RestoreInfo::new().set_backup_info(BackupInfo::default()/* use setters */);
13082    /// assert!(x.backup_info().is_some());
13083    /// ```
13084    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
13085        mut self,
13086        v: T,
13087    ) -> Self {
13088        self.source_info =
13089            std::option::Option::Some(crate::model::restore_info::SourceInfo::BackupInfo(v.into()));
13090        self
13091    }
13092}
13093
13094impl wkt::message::Message for RestoreInfo {
13095    fn typename() -> &'static str {
13096        "type.googleapis.com/google.bigtable.admin.v2.RestoreInfo"
13097    }
13098}
13099
13100/// Defines additional types related to [RestoreInfo].
13101pub mod restore_info {
13102    #[allow(unused_imports)]
13103    use super::*;
13104
13105    /// Information about the source used to restore the table.
13106    #[derive(Clone, Debug, PartialEq)]
13107    #[non_exhaustive]
13108    pub enum SourceInfo {
13109        /// Information about the backup used to restore the table. The backup
13110        /// may no longer exist.
13111        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
13112    }
13113}
13114
13115/// Change stream configuration.
13116#[derive(Clone, Default, PartialEq)]
13117#[non_exhaustive]
13118pub struct ChangeStreamConfig {
13119    /// How long the change stream should be retained. Change stream data older
13120    /// than the retention period will not be returned when reading the change
13121    /// stream from the table.
13122    /// Values must be at least 1 day and at most 7 days, and will be truncated to
13123    /// microsecond granularity.
13124    pub retention_period: std::option::Option<wkt::Duration>,
13125
13126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13127}
13128
13129impl ChangeStreamConfig {
13130    /// Creates a new default instance.
13131    pub fn new() -> Self {
13132        std::default::Default::default()
13133    }
13134
13135    /// Sets the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
13136    ///
13137    /// # Example
13138    /// ```ignore,no_run
13139    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
13140    /// use wkt::Duration;
13141    /// let x = ChangeStreamConfig::new().set_retention_period(Duration::default()/* use setters */);
13142    /// ```
13143    pub fn set_retention_period<T>(mut self, v: T) -> Self
13144    where
13145        T: std::convert::Into<wkt::Duration>,
13146    {
13147        self.retention_period = std::option::Option::Some(v.into());
13148        self
13149    }
13150
13151    /// Sets or clears the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
13152    ///
13153    /// # Example
13154    /// ```ignore,no_run
13155    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
13156    /// use wkt::Duration;
13157    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
13158    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(None::<Duration>);
13159    /// ```
13160    pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
13161    where
13162        T: std::convert::Into<wkt::Duration>,
13163    {
13164        self.retention_period = v.map(|x| x.into());
13165        self
13166    }
13167}
13168
13169impl wkt::message::Message for ChangeStreamConfig {
13170    fn typename() -> &'static str {
13171        "type.googleapis.com/google.bigtable.admin.v2.ChangeStreamConfig"
13172    }
13173}
13174
13175/// A collection of user data indexed by row, column, and timestamp.
13176/// Each table is served using the resources of its parent cluster.
13177#[derive(Clone, Default, PartialEq)]
13178#[non_exhaustive]
13179pub struct Table {
13180    /// The unique name of the table. Values are of the form
13181    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
13182    /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
13183    pub name: std::string::String,
13184
13185    /// Output only. Map from cluster ID to per-cluster table state.
13186    /// If it could not be determined whether or not the table has data in a
13187    /// particular cluster (for example, if its zone is unavailable), then
13188    /// there will be an entry for the cluster with UNKNOWN `replication_status`.
13189    /// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
13190    pub cluster_states:
13191        std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
13192
13193    /// The column families configured for this table, mapped by column family ID.
13194    /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
13195    pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
13196
13197    /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
13198    /// in this table. Timestamps not matching the granularity will be rejected. If
13199    /// unspecified at creation time, the value will be set to `MILLIS`. Views:
13200    /// `SCHEMA_VIEW`, `FULL`.
13201    pub granularity: crate::model::table::TimestampGranularity,
13202
13203    /// Output only. If this table was restored from another data source (e.g. a
13204    /// backup), this field will be populated with information about the restore.
13205    pub restore_info: std::option::Option<crate::model::RestoreInfo>,
13206
13207    /// If specified, enable the change stream on this table.
13208    /// Otherwise, the change stream is disabled and the change stream is not
13209    /// retained.
13210    pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
13211
13212    /// Set to true to make the table protected against data loss. i.e. deleting
13213    /// the following resources through Admin APIs are prohibited:
13214    ///
13215    /// * The table.
13216    /// * The column families in the table.
13217    /// * The instance containing the table.
13218    ///
13219    /// Note one can still delete the data stored in the table through Data APIs.
13220    pub deletion_protection: bool,
13221
13222    /// Output only. The effective automated backup policy applied to the table.
13223    /// This represents the policy actually in effect, which may be a
13224    /// system-default policy if the user has not explicitly configured one.
13225    /// Views: `SCHEMA_VIEW`, `FULL`.
13226    pub effective_automated_backup_policy:
13227        std::option::Option<crate::model::table::AutomatedBackupPolicy>,
13228
13229    /// Rules to specify what data is stored in each storage tier.
13230    /// Different tiers store data differently, providing different trade-offs
13231    /// between cost and performance. Different parts of a table can be stored
13232    /// separately on different tiers.
13233    /// If a config is specified, tiered storage is enabled for this table.
13234    /// Otherwise, tiered storage is disabled.
13235    /// Only SSD instances can configure tiered storage.
13236    pub tiered_storage_config: std::option::Option<crate::model::TieredStorageConfig>,
13237
13238    /// The row key schema for this table. The schema is used to decode the raw row
13239    /// key bytes into a structured format. The order of field declarations in this
13240    /// schema is important, as it reflects how the raw row key bytes are
13241    /// structured. Currently, this only affects how the key is read via a
13242    /// GoogleSQL query from the ExecuteQuery API.
13243    ///
13244    /// For a SQL query, the _key column is still read as raw bytes. But queries
13245    /// can reference the key fields by name, which will be decoded from _key using
13246    /// provided type and encoding. Queries that reference key fields will fail if
13247    /// they encounter an invalid row key.
13248    ///
13249    /// For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
13250    /// following schema:
13251    /// {
13252    /// fields {
13253    /// field_name: "id"
13254    /// type { string { encoding: utf8_bytes {} } }
13255    /// }
13256    /// fields {
13257    /// field_name: "date"
13258    /// type { string { encoding: utf8_bytes {} } }
13259    /// }
13260    /// fields {
13261    /// field_name: "product_code"
13262    /// type { int64 { encoding: big_endian_bytes {} } }
13263    /// }
13264    /// encoding { delimited_bytes { delimiter: "#" } }
13265    /// }
13266    ///
13267    /// The decoded key parts would be:
13268    /// id = "some_id", date = "2024-04-30", product_code = 1245427
13269    /// The query "SELECT _key, product_code FROM table" will return two columns:
13270    /// /------------------------------------------------------\
13271    /// |              _key                     | product_code |
13272    /// | --------------------------------------|--------------|
13273    /// | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
13274    /// \------------------------------------------------------/
13275    ///
13276    /// The schema has the following invariants:
13277    /// (1) The decoded field values are order-preserved. For read, the field
13278    /// values will be decoded in sorted mode from the raw bytes.
13279    /// (2) Every field in the schema must specify a non-empty name.
13280    /// (3) Every field must specify a type with an associated encoding. The type
13281    /// is limited to scalar types only: Array, Map, Aggregate, and Struct are not
13282    /// allowed.
13283    /// (4) The field names must not collide with existing column family
13284    /// names and reserved keywords "_key" and "_timestamp".
13285    ///
13286    /// The following update operations are allowed for row_key_schema:
13287    ///
13288    /// - Update from an empty schema to a new schema.
13289    /// - Remove the existing schema. This operation requires setting the
13290    ///   `ignore_warnings` flag to `true`, since it might be a backward
13291    ///   incompatible change. Without the flag, the update request will fail with
13292    ///   an INVALID_ARGUMENT error.
13293    ///   Any other row key schema update operation (e.g. update existing schema
13294    ///   columns names or types) is currently unsupported.
13295    pub row_key_schema: std::option::Option<crate::model::r#type::Struct>,
13296
13297    #[allow(missing_docs)]
13298    pub automated_backup_config: std::option::Option<crate::model::table::AutomatedBackupConfig>,
13299
13300    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13301}
13302
13303impl Table {
13304    /// Creates a new default instance.
13305    pub fn new() -> Self {
13306        std::default::Default::default()
13307    }
13308
13309    /// Sets the value of [name][crate::model::Table::name].
13310    ///
13311    /// # Example
13312    /// ```ignore,no_run
13313    /// # use google_cloud_bigtable_admin_v2::model::Table;
13314    /// # let project_id = "project_id";
13315    /// # let instance_id = "instance_id";
13316    /// # let table_id = "table_id";
13317    /// let x = Table::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
13318    /// ```
13319    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13320        self.name = v.into();
13321        self
13322    }
13323
13324    /// Sets the value of [cluster_states][crate::model::Table::cluster_states].
13325    ///
13326    /// # Example
13327    /// ```ignore,no_run
13328    /// # use google_cloud_bigtable_admin_v2::model::Table;
13329    /// use google_cloud_bigtable_admin_v2::model::table::ClusterState;
13330    /// let x = Table::new().set_cluster_states([
13331    ///     ("key0", ClusterState::default()/* use setters */),
13332    ///     ("key1", ClusterState::default()/* use (different) setters */),
13333    /// ]);
13334    /// ```
13335    pub fn set_cluster_states<T, K, V>(mut self, v: T) -> Self
13336    where
13337        T: std::iter::IntoIterator<Item = (K, V)>,
13338        K: std::convert::Into<std::string::String>,
13339        V: std::convert::Into<crate::model::table::ClusterState>,
13340    {
13341        use std::iter::Iterator;
13342        self.cluster_states = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13343        self
13344    }
13345
13346    /// Sets the value of [column_families][crate::model::Table::column_families].
13347    ///
13348    /// # Example
13349    /// ```ignore,no_run
13350    /// # use google_cloud_bigtable_admin_v2::model::Table;
13351    /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13352    /// let x = Table::new().set_column_families([
13353    ///     ("key0", ColumnFamily::default()/* use setters */),
13354    ///     ("key1", ColumnFamily::default()/* use (different) setters */),
13355    /// ]);
13356    /// ```
13357    pub fn set_column_families<T, K, V>(mut self, v: T) -> Self
13358    where
13359        T: std::iter::IntoIterator<Item = (K, V)>,
13360        K: std::convert::Into<std::string::String>,
13361        V: std::convert::Into<crate::model::ColumnFamily>,
13362    {
13363        use std::iter::Iterator;
13364        self.column_families = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13365        self
13366    }
13367
13368    /// Sets the value of [granularity][crate::model::Table::granularity].
13369    ///
13370    /// # Example
13371    /// ```ignore,no_run
13372    /// # use google_cloud_bigtable_admin_v2::model::Table;
13373    /// use google_cloud_bigtable_admin_v2::model::table::TimestampGranularity;
13374    /// let x0 = Table::new().set_granularity(TimestampGranularity::Millis);
13375    /// let x1 = Table::new().set_granularity(TimestampGranularity::Micros);
13376    /// ```
13377    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
13378        mut self,
13379        v: T,
13380    ) -> Self {
13381        self.granularity = v.into();
13382        self
13383    }
13384
13385    /// Sets the value of [restore_info][crate::model::Table::restore_info].
13386    ///
13387    /// # Example
13388    /// ```ignore,no_run
13389    /// # use google_cloud_bigtable_admin_v2::model::Table;
13390    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
13391    /// let x = Table::new().set_restore_info(RestoreInfo::default()/* use setters */);
13392    /// ```
13393    pub fn set_restore_info<T>(mut self, v: T) -> Self
13394    where
13395        T: std::convert::Into<crate::model::RestoreInfo>,
13396    {
13397        self.restore_info = std::option::Option::Some(v.into());
13398        self
13399    }
13400
13401    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
13402    ///
13403    /// # Example
13404    /// ```ignore,no_run
13405    /// # use google_cloud_bigtable_admin_v2::model::Table;
13406    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
13407    /// let x = Table::new().set_or_clear_restore_info(Some(RestoreInfo::default()/* use setters */));
13408    /// let x = Table::new().set_or_clear_restore_info(None::<RestoreInfo>);
13409    /// ```
13410    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
13411    where
13412        T: std::convert::Into<crate::model::RestoreInfo>,
13413    {
13414        self.restore_info = v.map(|x| x.into());
13415        self
13416    }
13417
13418    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
13419    ///
13420    /// # Example
13421    /// ```ignore,no_run
13422    /// # use google_cloud_bigtable_admin_v2::model::Table;
13423    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
13424    /// let x = Table::new().set_change_stream_config(ChangeStreamConfig::default()/* use setters */);
13425    /// ```
13426    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
13427    where
13428        T: std::convert::Into<crate::model::ChangeStreamConfig>,
13429    {
13430        self.change_stream_config = std::option::Option::Some(v.into());
13431        self
13432    }
13433
13434    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
13435    ///
13436    /// # Example
13437    /// ```ignore,no_run
13438    /// # use google_cloud_bigtable_admin_v2::model::Table;
13439    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
13440    /// let x = Table::new().set_or_clear_change_stream_config(Some(ChangeStreamConfig::default()/* use setters */));
13441    /// let x = Table::new().set_or_clear_change_stream_config(None::<ChangeStreamConfig>);
13442    /// ```
13443    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
13444    where
13445        T: std::convert::Into<crate::model::ChangeStreamConfig>,
13446    {
13447        self.change_stream_config = v.map(|x| x.into());
13448        self
13449    }
13450
13451    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
13452    ///
13453    /// # Example
13454    /// ```ignore,no_run
13455    /// # use google_cloud_bigtable_admin_v2::model::Table;
13456    /// let x = Table::new().set_deletion_protection(true);
13457    /// ```
13458    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13459        self.deletion_protection = v.into();
13460        self
13461    }
13462
13463    /// Sets the value of [effective_automated_backup_policy][crate::model::Table::effective_automated_backup_policy].
13464    ///
13465    /// # Example
13466    /// ```ignore,no_run
13467    /// # use google_cloud_bigtable_admin_v2::model::Table;
13468    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13469    /// let x = Table::new().set_effective_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
13470    /// ```
13471    pub fn set_effective_automated_backup_policy<T>(mut self, v: T) -> Self
13472    where
13473        T: std::convert::Into<crate::model::table::AutomatedBackupPolicy>,
13474    {
13475        self.effective_automated_backup_policy = std::option::Option::Some(v.into());
13476        self
13477    }
13478
13479    /// Sets or clears the value of [effective_automated_backup_policy][crate::model::Table::effective_automated_backup_policy].
13480    ///
13481    /// # Example
13482    /// ```ignore,no_run
13483    /// # use google_cloud_bigtable_admin_v2::model::Table;
13484    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13485    /// let x = Table::new().set_or_clear_effective_automated_backup_policy(Some(AutomatedBackupPolicy::default()/* use setters */));
13486    /// let x = Table::new().set_or_clear_effective_automated_backup_policy(None::<AutomatedBackupPolicy>);
13487    /// ```
13488    pub fn set_or_clear_effective_automated_backup_policy<T>(
13489        mut self,
13490        v: std::option::Option<T>,
13491    ) -> Self
13492    where
13493        T: std::convert::Into<crate::model::table::AutomatedBackupPolicy>,
13494    {
13495        self.effective_automated_backup_policy = v.map(|x| x.into());
13496        self
13497    }
13498
13499    /// Sets the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
13500    ///
13501    /// # Example
13502    /// ```ignore,no_run
13503    /// # use google_cloud_bigtable_admin_v2::model::Table;
13504    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
13505    /// let x = Table::new().set_tiered_storage_config(TieredStorageConfig::default()/* use setters */);
13506    /// ```
13507    pub fn set_tiered_storage_config<T>(mut self, v: T) -> Self
13508    where
13509        T: std::convert::Into<crate::model::TieredStorageConfig>,
13510    {
13511        self.tiered_storage_config = std::option::Option::Some(v.into());
13512        self
13513    }
13514
13515    /// Sets or clears the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
13516    ///
13517    /// # Example
13518    /// ```ignore,no_run
13519    /// # use google_cloud_bigtable_admin_v2::model::Table;
13520    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
13521    /// let x = Table::new().set_or_clear_tiered_storage_config(Some(TieredStorageConfig::default()/* use setters */));
13522    /// let x = Table::new().set_or_clear_tiered_storage_config(None::<TieredStorageConfig>);
13523    /// ```
13524    pub fn set_or_clear_tiered_storage_config<T>(mut self, v: std::option::Option<T>) -> Self
13525    where
13526        T: std::convert::Into<crate::model::TieredStorageConfig>,
13527    {
13528        self.tiered_storage_config = v.map(|x| x.into());
13529        self
13530    }
13531
13532    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
13533    ///
13534    /// # Example
13535    /// ```ignore,no_run
13536    /// # use google_cloud_bigtable_admin_v2::model::Table;
13537    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
13538    /// let x = Table::new().set_row_key_schema(Struct::default()/* use setters */);
13539    /// ```
13540    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
13541    where
13542        T: std::convert::Into<crate::model::r#type::Struct>,
13543    {
13544        self.row_key_schema = std::option::Option::Some(v.into());
13545        self
13546    }
13547
13548    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
13549    ///
13550    /// # Example
13551    /// ```ignore,no_run
13552    /// # use google_cloud_bigtable_admin_v2::model::Table;
13553    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
13554    /// let x = Table::new().set_or_clear_row_key_schema(Some(Struct::default()/* use setters */));
13555    /// let x = Table::new().set_or_clear_row_key_schema(None::<Struct>);
13556    /// ```
13557    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
13558    where
13559        T: std::convert::Into<crate::model::r#type::Struct>,
13560    {
13561        self.row_key_schema = v.map(|x| x.into());
13562        self
13563    }
13564
13565    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
13566    ///
13567    /// Note that all the setters affecting `automated_backup_config` are mutually
13568    /// exclusive.
13569    ///
13570    /// # Example
13571    /// ```ignore,no_run
13572    /// # use google_cloud_bigtable_admin_v2::model::Table;
13573    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13574    /// let x = Table::new().set_automated_backup_config(Some(
13575    ///     google_cloud_bigtable_admin_v2::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(AutomatedBackupPolicy::default().into())));
13576    /// ```
13577    pub fn set_automated_backup_config<
13578        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
13579    >(
13580        mut self,
13581        v: T,
13582    ) -> Self {
13583        self.automated_backup_config = v.into();
13584        self
13585    }
13586
13587    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
13588    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
13589    /// holds a different branch.
13590    pub fn automated_backup_policy(
13591        &self,
13592    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
13593        #[allow(unreachable_patterns)]
13594        self.automated_backup_config.as_ref().and_then(|v| match v {
13595            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
13596                std::option::Option::Some(v)
13597            }
13598            _ => std::option::Option::None,
13599        })
13600    }
13601
13602    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
13603    /// to hold a `AutomatedBackupPolicy`.
13604    ///
13605    /// Note that all the setters affecting `automated_backup_config` are
13606    /// mutually exclusive.
13607    ///
13608    /// # Example
13609    /// ```ignore,no_run
13610    /// # use google_cloud_bigtable_admin_v2::model::Table;
13611    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13612    /// let x = Table::new().set_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
13613    /// assert!(x.automated_backup_policy().is_some());
13614    /// ```
13615    pub fn set_automated_backup_policy<
13616        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
13617    >(
13618        mut self,
13619        v: T,
13620    ) -> Self {
13621        self.automated_backup_config = std::option::Option::Some(
13622            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
13623        );
13624        self
13625    }
13626}
13627
13628impl wkt::message::Message for Table {
13629    fn typename() -> &'static str {
13630        "type.googleapis.com/google.bigtable.admin.v2.Table"
13631    }
13632}
13633
13634/// Defines additional types related to [Table].
13635pub mod table {
13636    #[allow(unused_imports)]
13637    use super::*;
13638
13639    /// The state of a table's data in a particular cluster.
13640    #[derive(Clone, Default, PartialEq)]
13641    #[non_exhaustive]
13642    pub struct ClusterState {
13643        /// Output only. The state of replication for the table in this cluster.
13644        pub replication_state: crate::model::table::cluster_state::ReplicationState,
13645
13646        /// Output only. The encryption information for the table in this cluster.
13647        /// If the encryption key protecting this resource is customer managed, then
13648        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
13649        /// The primary version of the key and its status will be reflected here when
13650        /// changes propagate from Cloud KMS.
13651        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
13652
13653        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13654    }
13655
13656    impl ClusterState {
13657        /// Creates a new default instance.
13658        pub fn new() -> Self {
13659            std::default::Default::default()
13660        }
13661
13662        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
13663        ///
13664        /// # Example
13665        /// ```ignore,no_run
13666        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
13667        /// use google_cloud_bigtable_admin_v2::model::table::cluster_state::ReplicationState;
13668        /// let x0 = ClusterState::new().set_replication_state(ReplicationState::Initializing);
13669        /// let x1 = ClusterState::new().set_replication_state(ReplicationState::PlannedMaintenance);
13670        /// let x2 = ClusterState::new().set_replication_state(ReplicationState::UnplannedMaintenance);
13671        /// ```
13672        pub fn set_replication_state<
13673            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
13674        >(
13675            mut self,
13676            v: T,
13677        ) -> Self {
13678            self.replication_state = v.into();
13679            self
13680        }
13681
13682        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
13683        ///
13684        /// # Example
13685        /// ```ignore,no_run
13686        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
13687        /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13688        /// let x = ClusterState::new()
13689        ///     .set_encryption_info([
13690        ///         EncryptionInfo::default()/* use setters */,
13691        ///         EncryptionInfo::default()/* use (different) setters */,
13692        ///     ]);
13693        /// ```
13694        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
13695        where
13696            T: std::iter::IntoIterator<Item = V>,
13697            V: std::convert::Into<crate::model::EncryptionInfo>,
13698        {
13699            use std::iter::Iterator;
13700            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
13701            self
13702        }
13703    }
13704
13705    impl wkt::message::Message for ClusterState {
13706        fn typename() -> &'static str {
13707            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
13708        }
13709    }
13710
13711    /// Defines additional types related to [ClusterState].
13712    pub mod cluster_state {
13713        #[allow(unused_imports)]
13714        use super::*;
13715
13716        /// Table replication states.
13717        ///
13718        /// # Working with unknown values
13719        ///
13720        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13721        /// additional enum variants at any time. Adding new variants is not considered
13722        /// a breaking change. Applications should write their code in anticipation of:
13723        ///
13724        /// - New values appearing in future releases of the client library, **and**
13725        /// - New values received dynamically, without application changes.
13726        ///
13727        /// Please consult the [Working with enums] section in the user guide for some
13728        /// guidelines.
13729        ///
13730        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13731        #[derive(Clone, Debug, PartialEq)]
13732        #[non_exhaustive]
13733        pub enum ReplicationState {
13734            /// The replication state of the table is unknown in this cluster.
13735            StateNotKnown,
13736            /// The cluster was recently created, and the table must finish copying
13737            /// over pre-existing data from other clusters before it can begin
13738            /// receiving live replication updates and serving Data API requests.
13739            Initializing,
13740            /// The table is temporarily unable to serve Data API requests from this
13741            /// cluster due to planned internal maintenance.
13742            PlannedMaintenance,
13743            /// The table is temporarily unable to serve Data API requests from this
13744            /// cluster due to unplanned or emergency maintenance.
13745            UnplannedMaintenance,
13746            /// The table can serve Data API requests from this cluster. Depending on
13747            /// replication delay, reads may not immediately reflect the state of the
13748            /// table in other clusters.
13749            Ready,
13750            /// The table is fully created and ready for use after a restore, and is
13751            /// being optimized for performance. When optimizations are complete, the
13752            /// table will transition to `READY` state.
13753            ReadyOptimizing,
13754            /// If set, the enum was initialized with an unknown value.
13755            ///
13756            /// Applications can examine the value using [ReplicationState::value] or
13757            /// [ReplicationState::name].
13758            UnknownValue(replication_state::UnknownValue),
13759        }
13760
13761        #[doc(hidden)]
13762        pub mod replication_state {
13763            #[allow(unused_imports)]
13764            use super::*;
13765            #[derive(Clone, Debug, PartialEq)]
13766            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13767        }
13768
13769        impl ReplicationState {
13770            /// Gets the enum value.
13771            ///
13772            /// Returns `None` if the enum contains an unknown value deserialized from
13773            /// the string representation of enums.
13774            pub fn value(&self) -> std::option::Option<i32> {
13775                match self {
13776                    Self::StateNotKnown => std::option::Option::Some(0),
13777                    Self::Initializing => std::option::Option::Some(1),
13778                    Self::PlannedMaintenance => std::option::Option::Some(2),
13779                    Self::UnplannedMaintenance => std::option::Option::Some(3),
13780                    Self::Ready => std::option::Option::Some(4),
13781                    Self::ReadyOptimizing => std::option::Option::Some(5),
13782                    Self::UnknownValue(u) => u.0.value(),
13783                }
13784            }
13785
13786            /// Gets the enum value as a string.
13787            ///
13788            /// Returns `None` if the enum contains an unknown value deserialized from
13789            /// the integer representation of enums.
13790            pub fn name(&self) -> std::option::Option<&str> {
13791                match self {
13792                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
13793                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
13794                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
13795                    Self::UnplannedMaintenance => {
13796                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
13797                    }
13798                    Self::Ready => std::option::Option::Some("READY"),
13799                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
13800                    Self::UnknownValue(u) => u.0.name(),
13801                }
13802            }
13803        }
13804
13805        impl std::default::Default for ReplicationState {
13806            fn default() -> Self {
13807                use std::convert::From;
13808                Self::from(0)
13809            }
13810        }
13811
13812        impl std::fmt::Display for ReplicationState {
13813            fn fmt(
13814                &self,
13815                f: &mut std::fmt::Formatter<'_>,
13816            ) -> std::result::Result<(), std::fmt::Error> {
13817                wkt::internal::display_enum(f, self.name(), self.value())
13818            }
13819        }
13820
13821        impl std::convert::From<i32> for ReplicationState {
13822            fn from(value: i32) -> Self {
13823                match value {
13824                    0 => Self::StateNotKnown,
13825                    1 => Self::Initializing,
13826                    2 => Self::PlannedMaintenance,
13827                    3 => Self::UnplannedMaintenance,
13828                    4 => Self::Ready,
13829                    5 => Self::ReadyOptimizing,
13830                    _ => Self::UnknownValue(replication_state::UnknownValue(
13831                        wkt::internal::UnknownEnumValue::Integer(value),
13832                    )),
13833                }
13834            }
13835        }
13836
13837        impl std::convert::From<&str> for ReplicationState {
13838            fn from(value: &str) -> Self {
13839                use std::string::ToString;
13840                match value {
13841                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
13842                    "INITIALIZING" => Self::Initializing,
13843                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
13844                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
13845                    "READY" => Self::Ready,
13846                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
13847                    _ => Self::UnknownValue(replication_state::UnknownValue(
13848                        wkt::internal::UnknownEnumValue::String(value.to_string()),
13849                    )),
13850                }
13851            }
13852        }
13853
13854        impl serde::ser::Serialize for ReplicationState {
13855            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13856            where
13857                S: serde::Serializer,
13858            {
13859                match self {
13860                    Self::StateNotKnown => serializer.serialize_i32(0),
13861                    Self::Initializing => serializer.serialize_i32(1),
13862                    Self::PlannedMaintenance => serializer.serialize_i32(2),
13863                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
13864                    Self::Ready => serializer.serialize_i32(4),
13865                    Self::ReadyOptimizing => serializer.serialize_i32(5),
13866                    Self::UnknownValue(u) => u.0.serialize(serializer),
13867                }
13868            }
13869        }
13870
13871        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
13872            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13873            where
13874                D: serde::Deserializer<'de>,
13875            {
13876                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
13877                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
13878                ))
13879            }
13880        }
13881    }
13882
13883    /// Defines an automated backup policy for a table
13884    #[derive(Clone, Default, PartialEq)]
13885    #[non_exhaustive]
13886    pub struct AutomatedBackupPolicy {
13887        /// Required. How long the automated backups should be retained. Values must
13888        /// be at least 3 days and at most 90 days.
13889        pub retention_period: std::option::Option<wkt::Duration>,
13890
13891        /// How frequently automated backups should occur. The only supported value
13892        /// at this time is 24 hours. An undefined frequency is treated as 24 hours.
13893        pub frequency: std::option::Option<wkt::Duration>,
13894
13895        /// Optional. A list of Cloud Bigtable zones where automated backups are
13896        /// allowed to be created. If empty, automated backups will be created in all
13897        /// zones of the instance. Locations are in the format
13898        /// `projects/{project}/locations/{zone}`.
13899        /// This field can only set for tables in Enterprise Plus instances.
13900        pub locations: std::vec::Vec<std::string::String>,
13901
13902        /// Optional. The amount of time that the automated backups remain hot.
13903        /// If specified, the backups created by this policy are `HOT` backups.
13904        /// If not specified, the backups are `STANDARD` backups.
13905        ///
13906        /// The value must be at least 24 hours and at most 10 days, and can't
13907        /// exceed the policy's `retention_period`.
13908        ///
13909        /// Only SSD instances support `HOT` automated backups.
13910        pub keep_hot_duration: std::option::Option<wkt::Duration>,
13911
13912        /// Optional. If `true`, automated backups are explicitly disabled on this
13913        /// table. This allows users to opt out of default enablement.
13914        pub disabled: bool,
13915
13916        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13917    }
13918
13919    impl AutomatedBackupPolicy {
13920        /// Creates a new default instance.
13921        pub fn new() -> Self {
13922            std::default::Default::default()
13923        }
13924
13925        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13926        ///
13927        /// # Example
13928        /// ```ignore,no_run
13929        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13930        /// use wkt::Duration;
13931        /// let x = AutomatedBackupPolicy::new().set_retention_period(Duration::default()/* use setters */);
13932        /// ```
13933        pub fn set_retention_period<T>(mut self, v: T) -> Self
13934        where
13935            T: std::convert::Into<wkt::Duration>,
13936        {
13937            self.retention_period = std::option::Option::Some(v.into());
13938            self
13939        }
13940
13941        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13942        ///
13943        /// # Example
13944        /// ```ignore,no_run
13945        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13946        /// use wkt::Duration;
13947        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
13948        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(None::<Duration>);
13949        /// ```
13950        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
13951        where
13952            T: std::convert::Into<wkt::Duration>,
13953        {
13954            self.retention_period = v.map(|x| x.into());
13955            self
13956        }
13957
13958        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13959        ///
13960        /// # Example
13961        /// ```ignore,no_run
13962        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13963        /// use wkt::Duration;
13964        /// let x = AutomatedBackupPolicy::new().set_frequency(Duration::default()/* use setters */);
13965        /// ```
13966        pub fn set_frequency<T>(mut self, v: T) -> Self
13967        where
13968            T: std::convert::Into<wkt::Duration>,
13969        {
13970            self.frequency = std::option::Option::Some(v.into());
13971            self
13972        }
13973
13974        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13975        ///
13976        /// # Example
13977        /// ```ignore,no_run
13978        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13979        /// use wkt::Duration;
13980        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(Some(Duration::default()/* use setters */));
13981        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(None::<Duration>);
13982        /// ```
13983        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
13984        where
13985            T: std::convert::Into<wkt::Duration>,
13986        {
13987            self.frequency = v.map(|x| x.into());
13988            self
13989        }
13990
13991        /// Sets the value of [locations][crate::model::table::AutomatedBackupPolicy::locations].
13992        ///
13993        /// # Example
13994        /// ```ignore,no_run
13995        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13996        /// let x = AutomatedBackupPolicy::new().set_locations(["a", "b", "c"]);
13997        /// ```
13998        pub fn set_locations<T, V>(mut self, v: T) -> Self
13999        where
14000            T: std::iter::IntoIterator<Item = V>,
14001            V: std::convert::Into<std::string::String>,
14002        {
14003            use std::iter::Iterator;
14004            self.locations = v.into_iter().map(|i| i.into()).collect();
14005            self
14006        }
14007
14008        /// Sets the value of [keep_hot_duration][crate::model::table::AutomatedBackupPolicy::keep_hot_duration].
14009        ///
14010        /// # Example
14011        /// ```ignore,no_run
14012        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
14013        /// use wkt::Duration;
14014        /// let x = AutomatedBackupPolicy::new().set_keep_hot_duration(Duration::default()/* use setters */);
14015        /// ```
14016        pub fn set_keep_hot_duration<T>(mut self, v: T) -> Self
14017        where
14018            T: std::convert::Into<wkt::Duration>,
14019        {
14020            self.keep_hot_duration = std::option::Option::Some(v.into());
14021            self
14022        }
14023
14024        /// Sets or clears the value of [keep_hot_duration][crate::model::table::AutomatedBackupPolicy::keep_hot_duration].
14025        ///
14026        /// # Example
14027        /// ```ignore,no_run
14028        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
14029        /// use wkt::Duration;
14030        /// let x = AutomatedBackupPolicy::new().set_or_clear_keep_hot_duration(Some(Duration::default()/* use setters */));
14031        /// let x = AutomatedBackupPolicy::new().set_or_clear_keep_hot_duration(None::<Duration>);
14032        /// ```
14033        pub fn set_or_clear_keep_hot_duration<T>(mut self, v: std::option::Option<T>) -> Self
14034        where
14035            T: std::convert::Into<wkt::Duration>,
14036        {
14037            self.keep_hot_duration = v.map(|x| x.into());
14038            self
14039        }
14040
14041        /// Sets the value of [disabled][crate::model::table::AutomatedBackupPolicy::disabled].
14042        ///
14043        /// # Example
14044        /// ```ignore,no_run
14045        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
14046        /// let x = AutomatedBackupPolicy::new().set_disabled(true);
14047        /// ```
14048        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14049            self.disabled = v.into();
14050            self
14051        }
14052    }
14053
14054    impl wkt::message::Message for AutomatedBackupPolicy {
14055        fn typename() -> &'static str {
14056            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
14057        }
14058    }
14059
14060    /// Possible timestamp granularities to use when keeping multiple versions
14061    /// of data in a table.
14062    ///
14063    /// # Working with unknown values
14064    ///
14065    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14066    /// additional enum variants at any time. Adding new variants is not considered
14067    /// a breaking change. Applications should write their code in anticipation of:
14068    ///
14069    /// - New values appearing in future releases of the client library, **and**
14070    /// - New values received dynamically, without application changes.
14071    ///
14072    /// Please consult the [Working with enums] section in the user guide for some
14073    /// guidelines.
14074    ///
14075    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14076    #[derive(Clone, Debug, PartialEq)]
14077    #[non_exhaustive]
14078    pub enum TimestampGranularity {
14079        /// The user did not specify a granularity. Should not be returned.
14080        /// When specified during table creation, MILLIS will be used.
14081        Unspecified,
14082        /// The table keeps data versioned at a granularity of 1ms.
14083        Millis,
14084        /// The table keeps data versioned at a granularity of 1us.
14085        Micros,
14086        /// If set, the enum was initialized with an unknown value.
14087        ///
14088        /// Applications can examine the value using [TimestampGranularity::value] or
14089        /// [TimestampGranularity::name].
14090        UnknownValue(timestamp_granularity::UnknownValue),
14091    }
14092
14093    #[doc(hidden)]
14094    pub mod timestamp_granularity {
14095        #[allow(unused_imports)]
14096        use super::*;
14097        #[derive(Clone, Debug, PartialEq)]
14098        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14099    }
14100
14101    impl TimestampGranularity {
14102        /// Gets the enum value.
14103        ///
14104        /// Returns `None` if the enum contains an unknown value deserialized from
14105        /// the string representation of enums.
14106        pub fn value(&self) -> std::option::Option<i32> {
14107            match self {
14108                Self::Unspecified => std::option::Option::Some(0),
14109                Self::Millis => std::option::Option::Some(1),
14110                Self::Micros => std::option::Option::Some(2),
14111                Self::UnknownValue(u) => u.0.value(),
14112            }
14113        }
14114
14115        /// Gets the enum value as a string.
14116        ///
14117        /// Returns `None` if the enum contains an unknown value deserialized from
14118        /// the integer representation of enums.
14119        pub fn name(&self) -> std::option::Option<&str> {
14120            match self {
14121                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
14122                Self::Millis => std::option::Option::Some("MILLIS"),
14123                Self::Micros => std::option::Option::Some("MICROS"),
14124                Self::UnknownValue(u) => u.0.name(),
14125            }
14126        }
14127    }
14128
14129    impl std::default::Default for TimestampGranularity {
14130        fn default() -> Self {
14131            use std::convert::From;
14132            Self::from(0)
14133        }
14134    }
14135
14136    impl std::fmt::Display for TimestampGranularity {
14137        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14138            wkt::internal::display_enum(f, self.name(), self.value())
14139        }
14140    }
14141
14142    impl std::convert::From<i32> for TimestampGranularity {
14143        fn from(value: i32) -> Self {
14144            match value {
14145                0 => Self::Unspecified,
14146                1 => Self::Millis,
14147                2 => Self::Micros,
14148                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
14149                    wkt::internal::UnknownEnumValue::Integer(value),
14150                )),
14151            }
14152        }
14153    }
14154
14155    impl std::convert::From<&str> for TimestampGranularity {
14156        fn from(value: &str) -> Self {
14157            use std::string::ToString;
14158            match value {
14159                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
14160                "MILLIS" => Self::Millis,
14161                "MICROS" => Self::Micros,
14162                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
14163                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14164                )),
14165            }
14166        }
14167    }
14168
14169    impl serde::ser::Serialize for TimestampGranularity {
14170        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14171        where
14172            S: serde::Serializer,
14173        {
14174            match self {
14175                Self::Unspecified => serializer.serialize_i32(0),
14176                Self::Millis => serializer.serialize_i32(1),
14177                Self::Micros => serializer.serialize_i32(2),
14178                Self::UnknownValue(u) => u.0.serialize(serializer),
14179            }
14180        }
14181    }
14182
14183    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
14184        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14185        where
14186            D: serde::Deserializer<'de>,
14187        {
14188            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
14189                ".google.bigtable.admin.v2.Table.TimestampGranularity",
14190            ))
14191        }
14192    }
14193
14194    /// Defines a view over a table's fields.
14195    ///
14196    /// # Working with unknown values
14197    ///
14198    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14199    /// additional enum variants at any time. Adding new variants is not considered
14200    /// a breaking change. Applications should write their code in anticipation of:
14201    ///
14202    /// - New values appearing in future releases of the client library, **and**
14203    /// - New values received dynamically, without application changes.
14204    ///
14205    /// Please consult the [Working with enums] section in the user guide for some
14206    /// guidelines.
14207    ///
14208    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14209    #[derive(Clone, Debug, PartialEq)]
14210    #[non_exhaustive]
14211    pub enum View {
14212        /// Uses the default view for each method as documented in its request.
14213        Unspecified,
14214        /// Only populates `name`.
14215        NameOnly,
14216        /// Only populates `name` and fields related to the table's schema.
14217        SchemaView,
14218        /// Only populates `name` and fields related to the table's replication
14219        /// state.
14220        ReplicationView,
14221        /// Only populates `name` and fields related to the table's encryption state.
14222        EncryptionView,
14223        /// Populates all fields.
14224        Full,
14225        /// If set, the enum was initialized with an unknown value.
14226        ///
14227        /// Applications can examine the value using [View::value] or
14228        /// [View::name].
14229        UnknownValue(view::UnknownValue),
14230    }
14231
14232    #[doc(hidden)]
14233    pub mod view {
14234        #[allow(unused_imports)]
14235        use super::*;
14236        #[derive(Clone, Debug, PartialEq)]
14237        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14238    }
14239
14240    impl View {
14241        /// Gets the enum value.
14242        ///
14243        /// Returns `None` if the enum contains an unknown value deserialized from
14244        /// the string representation of enums.
14245        pub fn value(&self) -> std::option::Option<i32> {
14246            match self {
14247                Self::Unspecified => std::option::Option::Some(0),
14248                Self::NameOnly => std::option::Option::Some(1),
14249                Self::SchemaView => std::option::Option::Some(2),
14250                Self::ReplicationView => std::option::Option::Some(3),
14251                Self::EncryptionView => std::option::Option::Some(5),
14252                Self::Full => std::option::Option::Some(4),
14253                Self::UnknownValue(u) => u.0.value(),
14254            }
14255        }
14256
14257        /// Gets the enum value as a string.
14258        ///
14259        /// Returns `None` if the enum contains an unknown value deserialized from
14260        /// the integer representation of enums.
14261        pub fn name(&self) -> std::option::Option<&str> {
14262            match self {
14263                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
14264                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
14265                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
14266                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
14267                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
14268                Self::Full => std::option::Option::Some("FULL"),
14269                Self::UnknownValue(u) => u.0.name(),
14270            }
14271        }
14272    }
14273
14274    impl std::default::Default for View {
14275        fn default() -> Self {
14276            use std::convert::From;
14277            Self::from(0)
14278        }
14279    }
14280
14281    impl std::fmt::Display for View {
14282        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14283            wkt::internal::display_enum(f, self.name(), self.value())
14284        }
14285    }
14286
14287    impl std::convert::From<i32> for View {
14288        fn from(value: i32) -> Self {
14289            match value {
14290                0 => Self::Unspecified,
14291                1 => Self::NameOnly,
14292                2 => Self::SchemaView,
14293                3 => Self::ReplicationView,
14294                4 => Self::Full,
14295                5 => Self::EncryptionView,
14296                _ => Self::UnknownValue(view::UnknownValue(
14297                    wkt::internal::UnknownEnumValue::Integer(value),
14298                )),
14299            }
14300        }
14301    }
14302
14303    impl std::convert::From<&str> for View {
14304        fn from(value: &str) -> Self {
14305            use std::string::ToString;
14306            match value {
14307                "VIEW_UNSPECIFIED" => Self::Unspecified,
14308                "NAME_ONLY" => Self::NameOnly,
14309                "SCHEMA_VIEW" => Self::SchemaView,
14310                "REPLICATION_VIEW" => Self::ReplicationView,
14311                "ENCRYPTION_VIEW" => Self::EncryptionView,
14312                "FULL" => Self::Full,
14313                _ => Self::UnknownValue(view::UnknownValue(
14314                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14315                )),
14316            }
14317        }
14318    }
14319
14320    impl serde::ser::Serialize for View {
14321        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14322        where
14323            S: serde::Serializer,
14324        {
14325            match self {
14326                Self::Unspecified => serializer.serialize_i32(0),
14327                Self::NameOnly => serializer.serialize_i32(1),
14328                Self::SchemaView => serializer.serialize_i32(2),
14329                Self::ReplicationView => serializer.serialize_i32(3),
14330                Self::EncryptionView => serializer.serialize_i32(5),
14331                Self::Full => serializer.serialize_i32(4),
14332                Self::UnknownValue(u) => u.0.serialize(serializer),
14333            }
14334        }
14335    }
14336
14337    impl<'de> serde::de::Deserialize<'de> for View {
14338        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14339        where
14340            D: serde::Deserializer<'de>,
14341        {
14342            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
14343                ".google.bigtable.admin.v2.Table.View",
14344            ))
14345        }
14346    }
14347
14348    #[allow(missing_docs)]
14349    #[derive(Clone, Debug, PartialEq)]
14350    #[non_exhaustive]
14351    pub enum AutomatedBackupConfig {
14352        /// If specified, automated backups are enabled for this table.
14353        /// Otherwise, automated backups are disabled.
14354        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
14355    }
14356}
14357
14358/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
14359/// can configure access to each Authorized View independently from the table and
14360/// use the existing Data APIs to access the subset of data.
14361#[derive(Clone, Default, PartialEq)]
14362#[non_exhaustive]
14363pub struct AuthorizedView {
14364    /// Identifier. The name of this AuthorizedView.
14365    /// Values are of the form
14366    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
14367    pub name: std::string::String,
14368
14369    /// The etag for this AuthorizedView.
14370    /// If this is provided on update, it must match the server's etag. The server
14371    /// returns ABORTED error on a mismatched etag.
14372    pub etag: std::string::String,
14373
14374    /// Set to true to make the AuthorizedView protected against deletion.
14375    /// The parent Table and containing Instance cannot be deleted if an
14376    /// AuthorizedView has this bit set.
14377    pub deletion_protection: bool,
14378
14379    /// The type of this AuthorizedView.
14380    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
14381
14382    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14383}
14384
14385impl AuthorizedView {
14386    /// Creates a new default instance.
14387    pub fn new() -> Self {
14388        std::default::Default::default()
14389    }
14390
14391    /// Sets the value of [name][crate::model::AuthorizedView::name].
14392    ///
14393    /// # Example
14394    /// ```ignore,no_run
14395    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
14396    /// # let project_id = "project_id";
14397    /// # let instance_id = "instance_id";
14398    /// # let table_id = "table_id";
14399    /// # let authorized_view_id = "authorized_view_id";
14400    /// let x = AuthorizedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
14401    /// ```
14402    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14403        self.name = v.into();
14404        self
14405    }
14406
14407    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
14408    ///
14409    /// # Example
14410    /// ```ignore,no_run
14411    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
14412    /// let x = AuthorizedView::new().set_etag("example");
14413    /// ```
14414    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14415        self.etag = v.into();
14416        self
14417    }
14418
14419    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
14420    ///
14421    /// # Example
14422    /// ```ignore,no_run
14423    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
14424    /// let x = AuthorizedView::new().set_deletion_protection(true);
14425    /// ```
14426    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14427        self.deletion_protection = v.into();
14428        self
14429    }
14430
14431    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
14432    ///
14433    /// Note that all the setters affecting `authorized_view` are mutually
14434    /// exclusive.
14435    ///
14436    /// # Example
14437    /// ```ignore,no_run
14438    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
14439    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
14440    /// let x = AuthorizedView::new().set_authorized_view(Some(
14441    ///     google_cloud_bigtable_admin_v2::model::authorized_view::AuthorizedView::SubsetView(SubsetView::default().into())));
14442    /// ```
14443    pub fn set_authorized_view<
14444        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
14445    >(
14446        mut self,
14447        v: T,
14448    ) -> Self {
14449        self.authorized_view = v.into();
14450        self
14451    }
14452
14453    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
14454    /// if it holds a `SubsetView`, `None` if the field is not set or
14455    /// holds a different branch.
14456    pub fn subset_view(
14457        &self,
14458    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
14459        #[allow(unreachable_patterns)]
14460        self.authorized_view.as_ref().and_then(|v| match v {
14461            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
14462                std::option::Option::Some(v)
14463            }
14464            _ => std::option::Option::None,
14465        })
14466    }
14467
14468    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
14469    /// to hold a `SubsetView`.
14470    ///
14471    /// Note that all the setters affecting `authorized_view` are
14472    /// mutually exclusive.
14473    ///
14474    /// # Example
14475    /// ```ignore,no_run
14476    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
14477    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
14478    /// let x = AuthorizedView::new().set_subset_view(SubsetView::default()/* use setters */);
14479    /// assert!(x.subset_view().is_some());
14480    /// ```
14481    pub fn set_subset_view<
14482        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
14483    >(
14484        mut self,
14485        v: T,
14486    ) -> Self {
14487        self.authorized_view = std::option::Option::Some(
14488            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
14489        );
14490        self
14491    }
14492}
14493
14494impl wkt::message::Message for AuthorizedView {
14495    fn typename() -> &'static str {
14496        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
14497    }
14498}
14499
14500/// Defines additional types related to [AuthorizedView].
14501pub mod authorized_view {
14502    #[allow(unused_imports)]
14503    use super::*;
14504
14505    /// Subsets of a column family that are included in this AuthorizedView.
14506    #[derive(Clone, Default, PartialEq)]
14507    #[non_exhaustive]
14508    pub struct FamilySubsets {
14509        /// Individual exact column qualifiers to be included in the AuthorizedView.
14510        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
14511
14512        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
14513        /// qualifier starting with one of these prefixes is included in the
14514        /// AuthorizedView. To provide access to all qualifiers, include the empty
14515        /// string as a prefix
14516        /// ("").
14517        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
14518
14519        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14520    }
14521
14522    impl FamilySubsets {
14523        /// Creates a new default instance.
14524        pub fn new() -> Self {
14525            std::default::Default::default()
14526        }
14527
14528        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
14529        ///
14530        /// # Example
14531        /// ```ignore,no_run
14532        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
14533        /// let b1 = bytes::Bytes::from_static(b"abc");
14534        /// let b2 = bytes::Bytes::from_static(b"xyz");
14535        /// let x = FamilySubsets::new().set_qualifiers([b1, b2]);
14536        /// ```
14537        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
14538        where
14539            T: std::iter::IntoIterator<Item = V>,
14540            V: std::convert::Into<::bytes::Bytes>,
14541        {
14542            use std::iter::Iterator;
14543            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
14544            self
14545        }
14546
14547        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
14548        ///
14549        /// # Example
14550        /// ```ignore,no_run
14551        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
14552        /// let b1 = bytes::Bytes::from_static(b"abc");
14553        /// let b2 = bytes::Bytes::from_static(b"xyz");
14554        /// let x = FamilySubsets::new().set_qualifier_prefixes([b1, b2]);
14555        /// ```
14556        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
14557        where
14558            T: std::iter::IntoIterator<Item = V>,
14559            V: std::convert::Into<::bytes::Bytes>,
14560        {
14561            use std::iter::Iterator;
14562            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
14563            self
14564        }
14565    }
14566
14567    impl wkt::message::Message for FamilySubsets {
14568        fn typename() -> &'static str {
14569            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
14570        }
14571    }
14572
14573    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
14574    #[derive(Clone, Default, PartialEq)]
14575    #[non_exhaustive]
14576    pub struct SubsetView {
14577        /// Row prefixes to be included in the AuthorizedView.
14578        /// To provide access to all rows, include the empty string as a prefix ("").
14579        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
14580
14581        /// Map from column family name to the columns in this family to be included
14582        /// in the AuthorizedView.
14583        pub family_subsets: std::collections::HashMap<
14584            std::string::String,
14585            crate::model::authorized_view::FamilySubsets,
14586        >,
14587
14588        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14589    }
14590
14591    impl SubsetView {
14592        /// Creates a new default instance.
14593        pub fn new() -> Self {
14594            std::default::Default::default()
14595        }
14596
14597        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
14598        ///
14599        /// # Example
14600        /// ```ignore,no_run
14601        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
14602        /// let b1 = bytes::Bytes::from_static(b"abc");
14603        /// let b2 = bytes::Bytes::from_static(b"xyz");
14604        /// let x = SubsetView::new().set_row_prefixes([b1, b2]);
14605        /// ```
14606        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
14607        where
14608            T: std::iter::IntoIterator<Item = V>,
14609            V: std::convert::Into<::bytes::Bytes>,
14610        {
14611            use std::iter::Iterator;
14612            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
14613            self
14614        }
14615
14616        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
14617        ///
14618        /// # Example
14619        /// ```ignore,no_run
14620        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
14621        /// use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
14622        /// let x = SubsetView::new().set_family_subsets([
14623        ///     ("key0", FamilySubsets::default()/* use setters */),
14624        ///     ("key1", FamilySubsets::default()/* use (different) setters */),
14625        /// ]);
14626        /// ```
14627        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
14628        where
14629            T: std::iter::IntoIterator<Item = (K, V)>,
14630            K: std::convert::Into<std::string::String>,
14631            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
14632        {
14633            use std::iter::Iterator;
14634            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14635            self
14636        }
14637    }
14638
14639    impl wkt::message::Message for SubsetView {
14640        fn typename() -> &'static str {
14641            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
14642        }
14643    }
14644
14645    /// Defines a subset of an AuthorizedView's fields.
14646    ///
14647    /// # Working with unknown values
14648    ///
14649    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14650    /// additional enum variants at any time. Adding new variants is not considered
14651    /// a breaking change. Applications should write their code in anticipation of:
14652    ///
14653    /// - New values appearing in future releases of the client library, **and**
14654    /// - New values received dynamically, without application changes.
14655    ///
14656    /// Please consult the [Working with enums] section in the user guide for some
14657    /// guidelines.
14658    ///
14659    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14660    #[derive(Clone, Debug, PartialEq)]
14661    #[non_exhaustive]
14662    pub enum ResponseView {
14663        /// Uses the default view for each method as documented in the request.
14664        Unspecified,
14665        /// Only populates `name`.
14666        NameOnly,
14667        /// Only populates the AuthorizedView's basic metadata. This includes:
14668        /// name, deletion_protection, etag.
14669        Basic,
14670        /// Populates every fields.
14671        Full,
14672        /// If set, the enum was initialized with an unknown value.
14673        ///
14674        /// Applications can examine the value using [ResponseView::value] or
14675        /// [ResponseView::name].
14676        UnknownValue(response_view::UnknownValue),
14677    }
14678
14679    #[doc(hidden)]
14680    pub mod response_view {
14681        #[allow(unused_imports)]
14682        use super::*;
14683        #[derive(Clone, Debug, PartialEq)]
14684        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14685    }
14686
14687    impl ResponseView {
14688        /// Gets the enum value.
14689        ///
14690        /// Returns `None` if the enum contains an unknown value deserialized from
14691        /// the string representation of enums.
14692        pub fn value(&self) -> std::option::Option<i32> {
14693            match self {
14694                Self::Unspecified => std::option::Option::Some(0),
14695                Self::NameOnly => std::option::Option::Some(1),
14696                Self::Basic => std::option::Option::Some(2),
14697                Self::Full => std::option::Option::Some(3),
14698                Self::UnknownValue(u) => u.0.value(),
14699            }
14700        }
14701
14702        /// Gets the enum value as a string.
14703        ///
14704        /// Returns `None` if the enum contains an unknown value deserialized from
14705        /// the integer representation of enums.
14706        pub fn name(&self) -> std::option::Option<&str> {
14707            match self {
14708                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
14709                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
14710                Self::Basic => std::option::Option::Some("BASIC"),
14711                Self::Full => std::option::Option::Some("FULL"),
14712                Self::UnknownValue(u) => u.0.name(),
14713            }
14714        }
14715    }
14716
14717    impl std::default::Default for ResponseView {
14718        fn default() -> Self {
14719            use std::convert::From;
14720            Self::from(0)
14721        }
14722    }
14723
14724    impl std::fmt::Display for ResponseView {
14725        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14726            wkt::internal::display_enum(f, self.name(), self.value())
14727        }
14728    }
14729
14730    impl std::convert::From<i32> for ResponseView {
14731        fn from(value: i32) -> Self {
14732            match value {
14733                0 => Self::Unspecified,
14734                1 => Self::NameOnly,
14735                2 => Self::Basic,
14736                3 => Self::Full,
14737                _ => Self::UnknownValue(response_view::UnknownValue(
14738                    wkt::internal::UnknownEnumValue::Integer(value),
14739                )),
14740            }
14741        }
14742    }
14743
14744    impl std::convert::From<&str> for ResponseView {
14745        fn from(value: &str) -> Self {
14746            use std::string::ToString;
14747            match value {
14748                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
14749                "NAME_ONLY" => Self::NameOnly,
14750                "BASIC" => Self::Basic,
14751                "FULL" => Self::Full,
14752                _ => Self::UnknownValue(response_view::UnknownValue(
14753                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14754                )),
14755            }
14756        }
14757    }
14758
14759    impl serde::ser::Serialize for ResponseView {
14760        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14761        where
14762            S: serde::Serializer,
14763        {
14764            match self {
14765                Self::Unspecified => serializer.serialize_i32(0),
14766                Self::NameOnly => serializer.serialize_i32(1),
14767                Self::Basic => serializer.serialize_i32(2),
14768                Self::Full => serializer.serialize_i32(3),
14769                Self::UnknownValue(u) => u.0.serialize(serializer),
14770            }
14771        }
14772    }
14773
14774    impl<'de> serde::de::Deserialize<'de> for ResponseView {
14775        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14776        where
14777            D: serde::Deserializer<'de>,
14778        {
14779            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
14780                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
14781            ))
14782        }
14783    }
14784
14785    /// The type of this AuthorizedView.
14786    #[derive(Clone, Debug, PartialEq)]
14787    #[non_exhaustive]
14788    pub enum AuthorizedView {
14789        /// An AuthorizedView permitting access to an explicit subset of a Table.
14790        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
14791    }
14792}
14793
14794/// A set of columns within a table which share a common configuration.
14795#[derive(Clone, Default, PartialEq)]
14796#[non_exhaustive]
14797pub struct ColumnFamily {
14798    /// Garbage collection rule specified as a protobuf.
14799    /// Must serialize to at most 500 bytes.
14800    ///
14801    /// NOTE: Garbage collection executes opportunistically in the background, and
14802    /// so it's possible for reads to return a cell even if it matches the active
14803    /// GC expression for its family.
14804    pub gc_rule: std::option::Option<crate::model::GcRule>,
14805
14806    /// The type of data stored in each of this family's cell values, including its
14807    /// full encoding. If omitted, the family only serves raw untyped bytes.
14808    ///
14809    /// For now, only the `Aggregate` type is supported.
14810    ///
14811    /// `Aggregate` can only be set at family creation and is immutable afterwards.
14812    ///
14813    /// If `value_type` is `Aggregate`, written data must be compatible with:
14814    ///
14815    /// * `value_type.input_type` for `AddInput` mutations
14816    pub value_type: std::option::Option<crate::model::Type>,
14817
14818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14819}
14820
14821impl ColumnFamily {
14822    /// Creates a new default instance.
14823    pub fn new() -> Self {
14824        std::default::Default::default()
14825    }
14826
14827    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
14828    ///
14829    /// # Example
14830    /// ```ignore,no_run
14831    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
14832    /// use google_cloud_bigtable_admin_v2::model::GcRule;
14833    /// let x = ColumnFamily::new().set_gc_rule(GcRule::default()/* use setters */);
14834    /// ```
14835    pub fn set_gc_rule<T>(mut self, v: T) -> Self
14836    where
14837        T: std::convert::Into<crate::model::GcRule>,
14838    {
14839        self.gc_rule = std::option::Option::Some(v.into());
14840        self
14841    }
14842
14843    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
14844    ///
14845    /// # Example
14846    /// ```ignore,no_run
14847    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
14848    /// use google_cloud_bigtable_admin_v2::model::GcRule;
14849    /// let x = ColumnFamily::new().set_or_clear_gc_rule(Some(GcRule::default()/* use setters */));
14850    /// let x = ColumnFamily::new().set_or_clear_gc_rule(None::<GcRule>);
14851    /// ```
14852    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
14853    where
14854        T: std::convert::Into<crate::model::GcRule>,
14855    {
14856        self.gc_rule = v.map(|x| x.into());
14857        self
14858    }
14859
14860    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
14861    ///
14862    /// # Example
14863    /// ```ignore,no_run
14864    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
14865    /// use google_cloud_bigtable_admin_v2::model::Type;
14866    /// let x = ColumnFamily::new().set_value_type(Type::default()/* use setters */);
14867    /// ```
14868    pub fn set_value_type<T>(mut self, v: T) -> Self
14869    where
14870        T: std::convert::Into<crate::model::Type>,
14871    {
14872        self.value_type = std::option::Option::Some(v.into());
14873        self
14874    }
14875
14876    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
14877    ///
14878    /// # Example
14879    /// ```ignore,no_run
14880    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
14881    /// use google_cloud_bigtable_admin_v2::model::Type;
14882    /// let x = ColumnFamily::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
14883    /// let x = ColumnFamily::new().set_or_clear_value_type(None::<Type>);
14884    /// ```
14885    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
14886    where
14887        T: std::convert::Into<crate::model::Type>,
14888    {
14889        self.value_type = v.map(|x| x.into());
14890        self
14891    }
14892}
14893
14894impl wkt::message::Message for ColumnFamily {
14895    fn typename() -> &'static str {
14896        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
14897    }
14898}
14899
14900/// Rule for determining which cells to delete during garbage collection.
14901#[derive(Clone, Default, PartialEq)]
14902#[non_exhaustive]
14903pub struct GcRule {
14904    /// Garbage collection rules.
14905    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
14906
14907    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14908}
14909
14910impl GcRule {
14911    /// Creates a new default instance.
14912    pub fn new() -> Self {
14913        std::default::Default::default()
14914    }
14915
14916    /// Sets the value of [rule][crate::model::GcRule::rule].
14917    ///
14918    /// Note that all the setters affecting `rule` are mutually
14919    /// exclusive.
14920    ///
14921    /// # Example
14922    /// ```ignore,no_run
14923    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14924    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Rule;
14925    /// let x = GcRule::new().set_rule(Some(Rule::MaxNumVersions(42)));
14926    /// ```
14927    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
14928        mut self,
14929        v: T,
14930    ) -> Self {
14931        self.rule = v.into();
14932        self
14933    }
14934
14935    /// The value of [rule][crate::model::GcRule::rule]
14936    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
14937    /// holds a different branch.
14938    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
14939        #[allow(unreachable_patterns)]
14940        self.rule.as_ref().and_then(|v| match v {
14941            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
14942            _ => std::option::Option::None,
14943        })
14944    }
14945
14946    /// Sets the value of [rule][crate::model::GcRule::rule]
14947    /// to hold a `MaxNumVersions`.
14948    ///
14949    /// Note that all the setters affecting `rule` are
14950    /// mutually exclusive.
14951    ///
14952    /// # Example
14953    /// ```ignore,no_run
14954    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14955    /// let x = GcRule::new().set_max_num_versions(42);
14956    /// assert!(x.max_num_versions().is_some());
14957    /// assert!(x.max_age().is_none());
14958    /// assert!(x.intersection().is_none());
14959    /// assert!(x.union().is_none());
14960    /// ```
14961    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14962        self.rule =
14963            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
14964        self
14965    }
14966
14967    /// The value of [rule][crate::model::GcRule::rule]
14968    /// if it holds a `MaxAge`, `None` if the field is not set or
14969    /// holds a different branch.
14970    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
14971        #[allow(unreachable_patterns)]
14972        self.rule.as_ref().and_then(|v| match v {
14973            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
14974            _ => std::option::Option::None,
14975        })
14976    }
14977
14978    /// Sets the value of [rule][crate::model::GcRule::rule]
14979    /// to hold a `MaxAge`.
14980    ///
14981    /// Note that all the setters affecting `rule` are
14982    /// mutually exclusive.
14983    ///
14984    /// # Example
14985    /// ```ignore,no_run
14986    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14987    /// use wkt::Duration;
14988    /// let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
14989    /// assert!(x.max_age().is_some());
14990    /// assert!(x.max_num_versions().is_none());
14991    /// assert!(x.intersection().is_none());
14992    /// assert!(x.union().is_none());
14993    /// ```
14994    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
14995        mut self,
14996        v: T,
14997    ) -> Self {
14998        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
14999        self
15000    }
15001
15002    /// The value of [rule][crate::model::GcRule::rule]
15003    /// if it holds a `Intersection`, `None` if the field is not set or
15004    /// holds a different branch.
15005    pub fn intersection(
15006        &self,
15007    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
15008        #[allow(unreachable_patterns)]
15009        self.rule.as_ref().and_then(|v| match v {
15010            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
15011            _ => std::option::Option::None,
15012        })
15013    }
15014
15015    /// Sets the value of [rule][crate::model::GcRule::rule]
15016    /// to hold a `Intersection`.
15017    ///
15018    /// Note that all the setters affecting `rule` are
15019    /// mutually exclusive.
15020    ///
15021    /// # Example
15022    /// ```ignore,no_run
15023    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
15024    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
15025    /// let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
15026    /// assert!(x.intersection().is_some());
15027    /// assert!(x.max_num_versions().is_none());
15028    /// assert!(x.max_age().is_none());
15029    /// assert!(x.union().is_none());
15030    /// ```
15031    pub fn set_intersection<
15032        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
15033    >(
15034        mut self,
15035        v: T,
15036    ) -> Self {
15037        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
15038        self
15039    }
15040
15041    /// The value of [rule][crate::model::GcRule::rule]
15042    /// if it holds a `Union`, `None` if the field is not set or
15043    /// holds a different branch.
15044    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
15045        #[allow(unreachable_patterns)]
15046        self.rule.as_ref().and_then(|v| match v {
15047            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
15048            _ => std::option::Option::None,
15049        })
15050    }
15051
15052    /// Sets the value of [rule][crate::model::GcRule::rule]
15053    /// to hold a `Union`.
15054    ///
15055    /// Note that all the setters affecting `rule` are
15056    /// mutually exclusive.
15057    ///
15058    /// # Example
15059    /// ```ignore,no_run
15060    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
15061    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
15062    /// let x = GcRule::new().set_union(Union::default()/* use setters */);
15063    /// assert!(x.union().is_some());
15064    /// assert!(x.max_num_versions().is_none());
15065    /// assert!(x.max_age().is_none());
15066    /// assert!(x.intersection().is_none());
15067    /// ```
15068    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
15069        mut self,
15070        v: T,
15071    ) -> Self {
15072        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
15073        self
15074    }
15075}
15076
15077impl wkt::message::Message for GcRule {
15078    fn typename() -> &'static str {
15079        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
15080    }
15081}
15082
15083/// Defines additional types related to [GcRule].
15084pub mod gc_rule {
15085    #[allow(unused_imports)]
15086    use super::*;
15087
15088    /// A GcRule which deletes cells matching all of the given rules.
15089    #[derive(Clone, Default, PartialEq)]
15090    #[non_exhaustive]
15091    pub struct Intersection {
15092        /// Only delete cells which would be deleted by every element of `rules`.
15093        pub rules: std::vec::Vec<crate::model::GcRule>,
15094
15095        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15096    }
15097
15098    impl Intersection {
15099        /// Creates a new default instance.
15100        pub fn new() -> Self {
15101            std::default::Default::default()
15102        }
15103
15104        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
15105        ///
15106        /// # Example
15107        /// ```ignore,no_run
15108        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
15109        /// use google_cloud_bigtable_admin_v2::model::GcRule;
15110        /// let x = Intersection::new()
15111        ///     .set_rules([
15112        ///         GcRule::default()/* use setters */,
15113        ///         GcRule::default()/* use (different) setters */,
15114        ///     ]);
15115        /// ```
15116        pub fn set_rules<T, V>(mut self, v: T) -> Self
15117        where
15118            T: std::iter::IntoIterator<Item = V>,
15119            V: std::convert::Into<crate::model::GcRule>,
15120        {
15121            use std::iter::Iterator;
15122            self.rules = v.into_iter().map(|i| i.into()).collect();
15123            self
15124        }
15125    }
15126
15127    impl wkt::message::Message for Intersection {
15128        fn typename() -> &'static str {
15129            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
15130        }
15131    }
15132
15133    /// A GcRule which deletes cells matching any of the given rules.
15134    #[derive(Clone, Default, PartialEq)]
15135    #[non_exhaustive]
15136    pub struct Union {
15137        /// Delete cells which would be deleted by any element of `rules`.
15138        pub rules: std::vec::Vec<crate::model::GcRule>,
15139
15140        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15141    }
15142
15143    impl Union {
15144        /// Creates a new default instance.
15145        pub fn new() -> Self {
15146            std::default::Default::default()
15147        }
15148
15149        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
15150        ///
15151        /// # Example
15152        /// ```ignore,no_run
15153        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
15154        /// use google_cloud_bigtable_admin_v2::model::GcRule;
15155        /// let x = Union::new()
15156        ///     .set_rules([
15157        ///         GcRule::default()/* use setters */,
15158        ///         GcRule::default()/* use (different) setters */,
15159        ///     ]);
15160        /// ```
15161        pub fn set_rules<T, V>(mut self, v: T) -> Self
15162        where
15163            T: std::iter::IntoIterator<Item = V>,
15164            V: std::convert::Into<crate::model::GcRule>,
15165        {
15166            use std::iter::Iterator;
15167            self.rules = v.into_iter().map(|i| i.into()).collect();
15168            self
15169        }
15170    }
15171
15172    impl wkt::message::Message for Union {
15173        fn typename() -> &'static str {
15174            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
15175        }
15176    }
15177
15178    /// Garbage collection rules.
15179    #[derive(Clone, Debug, PartialEq)]
15180    #[non_exhaustive]
15181    pub enum Rule {
15182        /// Delete all cells in a column except the most recent N.
15183        MaxNumVersions(i32),
15184        /// Delete cells in a column older than the given age.
15185        /// Values must be at least one millisecond, and will be truncated to
15186        /// microsecond granularity.
15187        MaxAge(std::boxed::Box<wkt::Duration>),
15188        /// Delete cells that would be deleted by every nested rule.
15189        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
15190        /// Delete cells that would be deleted by any nested rule.
15191        Union(std::boxed::Box<crate::model::gc_rule::Union>),
15192    }
15193}
15194
15195/// Encryption information for a given resource.
15196/// If this resource is protected with customer managed encryption, the in-use
15197/// Cloud Key Management Service (Cloud KMS) key version is specified along with
15198/// its status.
15199#[derive(Clone, Default, PartialEq)]
15200#[non_exhaustive]
15201pub struct EncryptionInfo {
15202    /// Output only. The type of encryption used to protect this resource.
15203    pub encryption_type: crate::model::encryption_info::EncryptionType,
15204
15205    /// Output only. The status of encrypt/decrypt calls on underlying data for
15206    /// this resource. Regardless of status, the existing data is always encrypted
15207    /// at rest.
15208    pub encryption_status: std::option::Option<google_cloud_rpc::model::Status>,
15209
15210    /// Output only. The version of the Cloud KMS key specified in the parent
15211    /// cluster that is in use for the data underlying this table.
15212    pub kms_key_version: std::string::String,
15213
15214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15215}
15216
15217impl EncryptionInfo {
15218    /// Creates a new default instance.
15219    pub fn new() -> Self {
15220        std::default::Default::default()
15221    }
15222
15223    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
15224    ///
15225    /// # Example
15226    /// ```ignore,no_run
15227    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15228    /// use google_cloud_bigtable_admin_v2::model::encryption_info::EncryptionType;
15229    /// let x0 = EncryptionInfo::new().set_encryption_type(EncryptionType::GoogleDefaultEncryption);
15230    /// let x1 = EncryptionInfo::new().set_encryption_type(EncryptionType::CustomerManagedEncryption);
15231    /// ```
15232    pub fn set_encryption_type<
15233        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
15234    >(
15235        mut self,
15236        v: T,
15237    ) -> Self {
15238        self.encryption_type = v.into();
15239        self
15240    }
15241
15242    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
15243    ///
15244    /// # Example
15245    /// ```ignore,no_run
15246    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15247    /// use google_cloud_rpc::model::Status;
15248    /// let x = EncryptionInfo::new().set_encryption_status(Status::default()/* use setters */);
15249    /// ```
15250    pub fn set_encryption_status<T>(mut self, v: T) -> Self
15251    where
15252        T: std::convert::Into<google_cloud_rpc::model::Status>,
15253    {
15254        self.encryption_status = std::option::Option::Some(v.into());
15255        self
15256    }
15257
15258    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
15259    ///
15260    /// # Example
15261    /// ```ignore,no_run
15262    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15263    /// use google_cloud_rpc::model::Status;
15264    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(Some(Status::default()/* use setters */));
15265    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(None::<Status>);
15266    /// ```
15267    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
15268    where
15269        T: std::convert::Into<google_cloud_rpc::model::Status>,
15270    {
15271        self.encryption_status = v.map(|x| x.into());
15272        self
15273    }
15274
15275    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
15276    ///
15277    /// # Example
15278    /// ```ignore,no_run
15279    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15280    /// let x = EncryptionInfo::new().set_kms_key_version("example");
15281    /// ```
15282    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15283        self.kms_key_version = v.into();
15284        self
15285    }
15286}
15287
15288impl wkt::message::Message for EncryptionInfo {
15289    fn typename() -> &'static str {
15290        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
15291    }
15292}
15293
15294/// Defines additional types related to [EncryptionInfo].
15295pub mod encryption_info {
15296    #[allow(unused_imports)]
15297    use super::*;
15298
15299    /// Possible encryption types for a resource.
15300    ///
15301    /// # Working with unknown values
15302    ///
15303    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15304    /// additional enum variants at any time. Adding new variants is not considered
15305    /// a breaking change. Applications should write their code in anticipation of:
15306    ///
15307    /// - New values appearing in future releases of the client library, **and**
15308    /// - New values received dynamically, without application changes.
15309    ///
15310    /// Please consult the [Working with enums] section in the user guide for some
15311    /// guidelines.
15312    ///
15313    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15314    #[derive(Clone, Debug, PartialEq)]
15315    #[non_exhaustive]
15316    pub enum EncryptionType {
15317        /// Encryption type was not specified, though data at rest remains encrypted.
15318        Unspecified,
15319        /// The data backing this resource is encrypted at rest with a key that is
15320        /// fully managed by Google. No key version or status will be populated.
15321        /// This is the default state.
15322        GoogleDefaultEncryption,
15323        /// The data backing this resource is encrypted at rest with a key that is
15324        /// managed by the customer.
15325        /// The in-use version of the key and its status are populated for
15326        /// CMEK-protected tables.
15327        /// CMEK-protected backups are pinned to the key version that was in use at
15328        /// the time the backup was taken. This key version is populated but its
15329        /// status is not tracked and is reported as `UNKNOWN`.
15330        CustomerManagedEncryption,
15331        /// If set, the enum was initialized with an unknown value.
15332        ///
15333        /// Applications can examine the value using [EncryptionType::value] or
15334        /// [EncryptionType::name].
15335        UnknownValue(encryption_type::UnknownValue),
15336    }
15337
15338    #[doc(hidden)]
15339    pub mod encryption_type {
15340        #[allow(unused_imports)]
15341        use super::*;
15342        #[derive(Clone, Debug, PartialEq)]
15343        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15344    }
15345
15346    impl EncryptionType {
15347        /// Gets the enum value.
15348        ///
15349        /// Returns `None` if the enum contains an unknown value deserialized from
15350        /// the string representation of enums.
15351        pub fn value(&self) -> std::option::Option<i32> {
15352            match self {
15353                Self::Unspecified => std::option::Option::Some(0),
15354                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
15355                Self::CustomerManagedEncryption => std::option::Option::Some(2),
15356                Self::UnknownValue(u) => u.0.value(),
15357            }
15358        }
15359
15360        /// Gets the enum value as a string.
15361        ///
15362        /// Returns `None` if the enum contains an unknown value deserialized from
15363        /// the integer representation of enums.
15364        pub fn name(&self) -> std::option::Option<&str> {
15365            match self {
15366                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
15367                Self::GoogleDefaultEncryption => {
15368                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
15369                }
15370                Self::CustomerManagedEncryption => {
15371                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
15372                }
15373                Self::UnknownValue(u) => u.0.name(),
15374            }
15375        }
15376    }
15377
15378    impl std::default::Default for EncryptionType {
15379        fn default() -> Self {
15380            use std::convert::From;
15381            Self::from(0)
15382        }
15383    }
15384
15385    impl std::fmt::Display for EncryptionType {
15386        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15387            wkt::internal::display_enum(f, self.name(), self.value())
15388        }
15389    }
15390
15391    impl std::convert::From<i32> for EncryptionType {
15392        fn from(value: i32) -> Self {
15393            match value {
15394                0 => Self::Unspecified,
15395                1 => Self::GoogleDefaultEncryption,
15396                2 => Self::CustomerManagedEncryption,
15397                _ => Self::UnknownValue(encryption_type::UnknownValue(
15398                    wkt::internal::UnknownEnumValue::Integer(value),
15399                )),
15400            }
15401        }
15402    }
15403
15404    impl std::convert::From<&str> for EncryptionType {
15405        fn from(value: &str) -> Self {
15406            use std::string::ToString;
15407            match value {
15408                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
15409                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
15410                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
15411                _ => Self::UnknownValue(encryption_type::UnknownValue(
15412                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15413                )),
15414            }
15415        }
15416    }
15417
15418    impl serde::ser::Serialize for EncryptionType {
15419        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15420        where
15421            S: serde::Serializer,
15422        {
15423            match self {
15424                Self::Unspecified => serializer.serialize_i32(0),
15425                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
15426                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
15427                Self::UnknownValue(u) => u.0.serialize(serializer),
15428            }
15429        }
15430    }
15431
15432    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
15433        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15434        where
15435            D: serde::Deserializer<'de>,
15436        {
15437            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
15438                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
15439            ))
15440        }
15441    }
15442}
15443
15444/// A snapshot of a table at a particular time. A snapshot can be used as a
15445/// checkpoint for data restoration or a data source for a new table.
15446///
15447/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
15448/// feature is not currently available to most Cloud Bigtable customers. This
15449/// feature might be changed in backward-incompatible ways and is not recommended
15450/// for production use. It is not subject to any SLA or deprecation policy.
15451#[derive(Clone, Default, PartialEq)]
15452#[non_exhaustive]
15453pub struct Snapshot {
15454    /// The unique name of the snapshot.
15455    /// Values are of the form
15456    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
15457    pub name: std::string::String,
15458
15459    /// Output only. The source table at the time the snapshot was taken.
15460    pub source_table: std::option::Option<crate::model::Table>,
15461
15462    /// Output only. The size of the data in the source table at the time the
15463    /// snapshot was taken. In some cases, this value may be computed
15464    /// asynchronously via a background process and a placeholder of 0 will be used
15465    /// in the meantime.
15466    pub data_size_bytes: i64,
15467
15468    /// Output only. The time when the snapshot is created.
15469    pub create_time: std::option::Option<wkt::Timestamp>,
15470
15471    /// The time when the snapshot will be deleted. The maximum amount of time a
15472    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
15473    /// the default maximum of 365 days will be used.
15474    pub delete_time: std::option::Option<wkt::Timestamp>,
15475
15476    /// Output only. The current state of the snapshot.
15477    pub state: crate::model::snapshot::State,
15478
15479    /// Description of the snapshot.
15480    pub description: std::string::String,
15481
15482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15483}
15484
15485impl Snapshot {
15486    /// Creates a new default instance.
15487    pub fn new() -> Self {
15488        std::default::Default::default()
15489    }
15490
15491    /// Sets the value of [name][crate::model::Snapshot::name].
15492    ///
15493    /// # Example
15494    /// ```ignore,no_run
15495    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15496    /// # let project_id = "project_id";
15497    /// # let instance_id = "instance_id";
15498    /// # let cluster_id = "cluster_id";
15499    /// # let snapshot_id = "snapshot_id";
15500    /// let x = Snapshot::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
15501    /// ```
15502    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15503        self.name = v.into();
15504        self
15505    }
15506
15507    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
15508    ///
15509    /// # Example
15510    /// ```ignore,no_run
15511    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15512    /// use google_cloud_bigtable_admin_v2::model::Table;
15513    /// let x = Snapshot::new().set_source_table(Table::default()/* use setters */);
15514    /// ```
15515    pub fn set_source_table<T>(mut self, v: T) -> Self
15516    where
15517        T: std::convert::Into<crate::model::Table>,
15518    {
15519        self.source_table = std::option::Option::Some(v.into());
15520        self
15521    }
15522
15523    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
15524    ///
15525    /// # Example
15526    /// ```ignore,no_run
15527    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15528    /// use google_cloud_bigtable_admin_v2::model::Table;
15529    /// let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
15530    /// let x = Snapshot::new().set_or_clear_source_table(None::<Table>);
15531    /// ```
15532    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
15533    where
15534        T: std::convert::Into<crate::model::Table>,
15535    {
15536        self.source_table = v.map(|x| x.into());
15537        self
15538    }
15539
15540    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
15541    ///
15542    /// # Example
15543    /// ```ignore,no_run
15544    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15545    /// let x = Snapshot::new().set_data_size_bytes(42);
15546    /// ```
15547    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15548        self.data_size_bytes = v.into();
15549        self
15550    }
15551
15552    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
15553    ///
15554    /// # Example
15555    /// ```ignore,no_run
15556    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15557    /// use wkt::Timestamp;
15558    /// let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);
15559    /// ```
15560    pub fn set_create_time<T>(mut self, v: T) -> Self
15561    where
15562        T: std::convert::Into<wkt::Timestamp>,
15563    {
15564        self.create_time = std::option::Option::Some(v.into());
15565        self
15566    }
15567
15568    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
15569    ///
15570    /// # Example
15571    /// ```ignore,no_run
15572    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15573    /// use wkt::Timestamp;
15574    /// let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
15575    /// let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);
15576    /// ```
15577    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15578    where
15579        T: std::convert::Into<wkt::Timestamp>,
15580    {
15581        self.create_time = v.map(|x| x.into());
15582        self
15583    }
15584
15585    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
15586    ///
15587    /// # Example
15588    /// ```ignore,no_run
15589    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15590    /// use wkt::Timestamp;
15591    /// let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);
15592    /// ```
15593    pub fn set_delete_time<T>(mut self, v: T) -> Self
15594    where
15595        T: std::convert::Into<wkt::Timestamp>,
15596    {
15597        self.delete_time = std::option::Option::Some(v.into());
15598        self
15599    }
15600
15601    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
15602    ///
15603    /// # Example
15604    /// ```ignore,no_run
15605    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15606    /// use wkt::Timestamp;
15607    /// let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
15608    /// let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);
15609    /// ```
15610    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
15611    where
15612        T: std::convert::Into<wkt::Timestamp>,
15613    {
15614        self.delete_time = v.map(|x| x.into());
15615        self
15616    }
15617
15618    /// Sets the value of [state][crate::model::Snapshot::state].
15619    ///
15620    /// # Example
15621    /// ```ignore,no_run
15622    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15623    /// use google_cloud_bigtable_admin_v2::model::snapshot::State;
15624    /// let x0 = Snapshot::new().set_state(State::Ready);
15625    /// let x1 = Snapshot::new().set_state(State::Creating);
15626    /// ```
15627    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
15628        self.state = v.into();
15629        self
15630    }
15631
15632    /// Sets the value of [description][crate::model::Snapshot::description].
15633    ///
15634    /// # Example
15635    /// ```ignore,no_run
15636    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
15637    /// let x = Snapshot::new().set_description("example");
15638    /// ```
15639    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15640        self.description = v.into();
15641        self
15642    }
15643}
15644
15645impl wkt::message::Message for Snapshot {
15646    fn typename() -> &'static str {
15647        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
15648    }
15649}
15650
15651/// Defines additional types related to [Snapshot].
15652pub mod snapshot {
15653    #[allow(unused_imports)]
15654    use super::*;
15655
15656    /// Possible states of a snapshot.
15657    ///
15658    /// # Working with unknown values
15659    ///
15660    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15661    /// additional enum variants at any time. Adding new variants is not considered
15662    /// a breaking change. Applications should write their code in anticipation of:
15663    ///
15664    /// - New values appearing in future releases of the client library, **and**
15665    /// - New values received dynamically, without application changes.
15666    ///
15667    /// Please consult the [Working with enums] section in the user guide for some
15668    /// guidelines.
15669    ///
15670    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15671    #[derive(Clone, Debug, PartialEq)]
15672    #[non_exhaustive]
15673    pub enum State {
15674        /// The state of the snapshot could not be determined.
15675        NotKnown,
15676        /// The snapshot has been successfully created and can serve all requests.
15677        Ready,
15678        /// The snapshot is currently being created, and may be destroyed if the
15679        /// creation process encounters an error. A snapshot may not be restored to a
15680        /// table while it is being created.
15681        Creating,
15682        /// If set, the enum was initialized with an unknown value.
15683        ///
15684        /// Applications can examine the value using [State::value] or
15685        /// [State::name].
15686        UnknownValue(state::UnknownValue),
15687    }
15688
15689    #[doc(hidden)]
15690    pub mod state {
15691        #[allow(unused_imports)]
15692        use super::*;
15693        #[derive(Clone, Debug, PartialEq)]
15694        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15695    }
15696
15697    impl State {
15698        /// Gets the enum value.
15699        ///
15700        /// Returns `None` if the enum contains an unknown value deserialized from
15701        /// the string representation of enums.
15702        pub fn value(&self) -> std::option::Option<i32> {
15703            match self {
15704                Self::NotKnown => std::option::Option::Some(0),
15705                Self::Ready => std::option::Option::Some(1),
15706                Self::Creating => std::option::Option::Some(2),
15707                Self::UnknownValue(u) => u.0.value(),
15708            }
15709        }
15710
15711        /// Gets the enum value as a string.
15712        ///
15713        /// Returns `None` if the enum contains an unknown value deserialized from
15714        /// the integer representation of enums.
15715        pub fn name(&self) -> std::option::Option<&str> {
15716            match self {
15717                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
15718                Self::Ready => std::option::Option::Some("READY"),
15719                Self::Creating => std::option::Option::Some("CREATING"),
15720                Self::UnknownValue(u) => u.0.name(),
15721            }
15722        }
15723    }
15724
15725    impl std::default::Default for State {
15726        fn default() -> Self {
15727            use std::convert::From;
15728            Self::from(0)
15729        }
15730    }
15731
15732    impl std::fmt::Display for State {
15733        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15734            wkt::internal::display_enum(f, self.name(), self.value())
15735        }
15736    }
15737
15738    impl std::convert::From<i32> for State {
15739        fn from(value: i32) -> Self {
15740            match value {
15741                0 => Self::NotKnown,
15742                1 => Self::Ready,
15743                2 => Self::Creating,
15744                _ => Self::UnknownValue(state::UnknownValue(
15745                    wkt::internal::UnknownEnumValue::Integer(value),
15746                )),
15747            }
15748        }
15749    }
15750
15751    impl std::convert::From<&str> for State {
15752        fn from(value: &str) -> Self {
15753            use std::string::ToString;
15754            match value {
15755                "STATE_NOT_KNOWN" => Self::NotKnown,
15756                "READY" => Self::Ready,
15757                "CREATING" => Self::Creating,
15758                _ => Self::UnknownValue(state::UnknownValue(
15759                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15760                )),
15761            }
15762        }
15763    }
15764
15765    impl serde::ser::Serialize for State {
15766        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15767        where
15768            S: serde::Serializer,
15769        {
15770            match self {
15771                Self::NotKnown => serializer.serialize_i32(0),
15772                Self::Ready => serializer.serialize_i32(1),
15773                Self::Creating => serializer.serialize_i32(2),
15774                Self::UnknownValue(u) => u.0.serialize(serializer),
15775            }
15776        }
15777    }
15778
15779    impl<'de> serde::de::Deserialize<'de> for State {
15780        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15781        where
15782            D: serde::Deserializer<'de>,
15783        {
15784            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15785                ".google.bigtable.admin.v2.Snapshot.State",
15786            ))
15787        }
15788    }
15789}
15790
15791/// A backup of a Cloud Bigtable table.
15792#[derive(Clone, Default, PartialEq)]
15793#[non_exhaustive]
15794pub struct Backup {
15795    /// A globally unique identifier for the backup which cannot be
15796    /// changed. Values are of the form
15797    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
15798    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
15799    /// The final segment of the name must be between 1 and 50 characters
15800    /// in length.
15801    ///
15802    /// The backup is stored in the cluster identified by the prefix of the backup
15803    /// name of the form
15804    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
15805    pub name: std::string::String,
15806
15807    /// Required. Immutable. Name of the table from which this backup was created.
15808    /// This needs to be in the same instance as the backup. Values are of the form
15809    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
15810    pub source_table: std::string::String,
15811
15812    /// Output only. Name of the backup from which this backup was copied. If a
15813    /// backup is not created by copying a backup, this field will be empty. Values
15814    /// are of the form:
15815    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
15816    pub source_backup: std::string::String,
15817
15818    /// Required. The expiration time of the backup.
15819    /// When creating a backup or updating its `expire_time`, the value must be
15820    /// greater than the backup creation time by:
15821    ///
15822    /// - At least 6 hours
15823    /// - At most 90 days
15824    ///
15825    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
15826    pub expire_time: std::option::Option<wkt::Timestamp>,
15827
15828    /// Output only. `start_time` is the time that the backup was started
15829    /// (i.e. approximately the time the
15830    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
15831    /// request is received).  The row data in this backup will be no older than
15832    /// this timestamp.
15833    ///
15834    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
15835    pub start_time: std::option::Option<wkt::Timestamp>,
15836
15837    /// Output only. `end_time` is the time that the backup was finished. The row
15838    /// data in the backup will be no newer than this timestamp.
15839    pub end_time: std::option::Option<wkt::Timestamp>,
15840
15841    /// Output only. Size of the backup in bytes.
15842    pub size_bytes: i64,
15843
15844    /// Output only. The current state of the backup.
15845    pub state: crate::model::backup::State,
15846
15847    /// Output only. The encryption information for the backup.
15848    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
15849
15850    /// Indicates the backup type of the backup.
15851    pub backup_type: crate::model::backup::BackupType,
15852
15853    /// The time at which the hot backup will be converted to a standard backup.
15854    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
15855    /// hot backup to a standard backup. This value must be greater than the backup
15856    /// creation time by:
15857    ///
15858    /// - At least 24 hours
15859    ///
15860    /// This field only applies for hot backups. When creating or updating a
15861    /// standard backup, attempting to set this field will fail the request.
15862    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
15863
15864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15865}
15866
15867impl Backup {
15868    /// Creates a new default instance.
15869    pub fn new() -> Self {
15870        std::default::Default::default()
15871    }
15872
15873    /// Sets the value of [name][crate::model::Backup::name].
15874    ///
15875    /// # Example
15876    /// ```ignore,no_run
15877    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15878    /// # let project_id = "project_id";
15879    /// # let instance_id = "instance_id";
15880    /// # let cluster_id = "cluster_id";
15881    /// # let backup_id = "backup_id";
15882    /// let x = Backup::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
15883    /// ```
15884    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15885        self.name = v.into();
15886        self
15887    }
15888
15889    /// Sets the value of [source_table][crate::model::Backup::source_table].
15890    ///
15891    /// # Example
15892    /// ```ignore,no_run
15893    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15894    /// let x = Backup::new().set_source_table("example");
15895    /// ```
15896    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15897        self.source_table = v.into();
15898        self
15899    }
15900
15901    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
15902    ///
15903    /// # Example
15904    /// ```ignore,no_run
15905    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15906    /// let x = Backup::new().set_source_backup("example");
15907    /// ```
15908    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15909        self.source_backup = v.into();
15910        self
15911    }
15912
15913    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
15914    ///
15915    /// # Example
15916    /// ```ignore,no_run
15917    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15918    /// use wkt::Timestamp;
15919    /// let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);
15920    /// ```
15921    pub fn set_expire_time<T>(mut self, v: T) -> Self
15922    where
15923        T: std::convert::Into<wkt::Timestamp>,
15924    {
15925        self.expire_time = std::option::Option::Some(v.into());
15926        self
15927    }
15928
15929    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
15930    ///
15931    /// # Example
15932    /// ```ignore,no_run
15933    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15934    /// use wkt::Timestamp;
15935    /// let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
15936    /// let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);
15937    /// ```
15938    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
15939    where
15940        T: std::convert::Into<wkt::Timestamp>,
15941    {
15942        self.expire_time = v.map(|x| x.into());
15943        self
15944    }
15945
15946    /// Sets the value of [start_time][crate::model::Backup::start_time].
15947    ///
15948    /// # Example
15949    /// ```ignore,no_run
15950    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15951    /// use wkt::Timestamp;
15952    /// let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);
15953    /// ```
15954    pub fn set_start_time<T>(mut self, v: T) -> Self
15955    where
15956        T: std::convert::Into<wkt::Timestamp>,
15957    {
15958        self.start_time = std::option::Option::Some(v.into());
15959        self
15960    }
15961
15962    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
15963    ///
15964    /// # Example
15965    /// ```ignore,no_run
15966    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15967    /// use wkt::Timestamp;
15968    /// let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15969    /// let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);
15970    /// ```
15971    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15972    where
15973        T: std::convert::Into<wkt::Timestamp>,
15974    {
15975        self.start_time = v.map(|x| x.into());
15976        self
15977    }
15978
15979    /// Sets the value of [end_time][crate::model::Backup::end_time].
15980    ///
15981    /// # Example
15982    /// ```ignore,no_run
15983    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15984    /// use wkt::Timestamp;
15985    /// let x = Backup::new().set_end_time(Timestamp::default()/* use setters */);
15986    /// ```
15987    pub fn set_end_time<T>(mut self, v: T) -> Self
15988    where
15989        T: std::convert::Into<wkt::Timestamp>,
15990    {
15991        self.end_time = std::option::Option::Some(v.into());
15992        self
15993    }
15994
15995    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
15996    ///
15997    /// # Example
15998    /// ```ignore,no_run
15999    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16000    /// use wkt::Timestamp;
16001    /// let x = Backup::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
16002    /// let x = Backup::new().set_or_clear_end_time(None::<Timestamp>);
16003    /// ```
16004    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
16005    where
16006        T: std::convert::Into<wkt::Timestamp>,
16007    {
16008        self.end_time = v.map(|x| x.into());
16009        self
16010    }
16011
16012    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
16013    ///
16014    /// # Example
16015    /// ```ignore,no_run
16016    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16017    /// let x = Backup::new().set_size_bytes(42);
16018    /// ```
16019    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
16020        self.size_bytes = v.into();
16021        self
16022    }
16023
16024    /// Sets the value of [state][crate::model::Backup::state].
16025    ///
16026    /// # Example
16027    /// ```ignore,no_run
16028    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16029    /// use google_cloud_bigtable_admin_v2::model::backup::State;
16030    /// let x0 = Backup::new().set_state(State::Creating);
16031    /// let x1 = Backup::new().set_state(State::Ready);
16032    /// ```
16033    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
16034        self.state = v.into();
16035        self
16036    }
16037
16038    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
16039    ///
16040    /// # Example
16041    /// ```ignore,no_run
16042    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16043    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
16044    /// let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
16045    /// ```
16046    pub fn set_encryption_info<T>(mut self, v: T) -> Self
16047    where
16048        T: std::convert::Into<crate::model::EncryptionInfo>,
16049    {
16050        self.encryption_info = std::option::Option::Some(v.into());
16051        self
16052    }
16053
16054    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
16055    ///
16056    /// # Example
16057    /// ```ignore,no_run
16058    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16059    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
16060    /// let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
16061    /// let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
16062    /// ```
16063    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
16064    where
16065        T: std::convert::Into<crate::model::EncryptionInfo>,
16066    {
16067        self.encryption_info = v.map(|x| x.into());
16068        self
16069    }
16070
16071    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
16072    ///
16073    /// # Example
16074    /// ```ignore,no_run
16075    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16076    /// use google_cloud_bigtable_admin_v2::model::backup::BackupType;
16077    /// let x0 = Backup::new().set_backup_type(BackupType::Standard);
16078    /// let x1 = Backup::new().set_backup_type(BackupType::Hot);
16079    /// ```
16080    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
16081        mut self,
16082        v: T,
16083    ) -> Self {
16084        self.backup_type = v.into();
16085        self
16086    }
16087
16088    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
16089    ///
16090    /// # Example
16091    /// ```ignore,no_run
16092    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16093    /// use wkt::Timestamp;
16094    /// let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);
16095    /// ```
16096    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
16097    where
16098        T: std::convert::Into<wkt::Timestamp>,
16099    {
16100        self.hot_to_standard_time = std::option::Option::Some(v.into());
16101        self
16102    }
16103
16104    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
16105    ///
16106    /// # Example
16107    /// ```ignore,no_run
16108    /// # use google_cloud_bigtable_admin_v2::model::Backup;
16109    /// use wkt::Timestamp;
16110    /// let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
16111    /// let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);
16112    /// ```
16113    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
16114    where
16115        T: std::convert::Into<wkt::Timestamp>,
16116    {
16117        self.hot_to_standard_time = v.map(|x| x.into());
16118        self
16119    }
16120}
16121
16122impl wkt::message::Message for Backup {
16123    fn typename() -> &'static str {
16124        "type.googleapis.com/google.bigtable.admin.v2.Backup"
16125    }
16126}
16127
16128/// Defines additional types related to [Backup].
16129pub mod backup {
16130    #[allow(unused_imports)]
16131    use super::*;
16132
16133    /// Indicates the current state of the backup.
16134    ///
16135    /// # Working with unknown values
16136    ///
16137    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16138    /// additional enum variants at any time. Adding new variants is not considered
16139    /// a breaking change. Applications should write their code in anticipation of:
16140    ///
16141    /// - New values appearing in future releases of the client library, **and**
16142    /// - New values received dynamically, without application changes.
16143    ///
16144    /// Please consult the [Working with enums] section in the user guide for some
16145    /// guidelines.
16146    ///
16147    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16148    #[derive(Clone, Debug, PartialEq)]
16149    #[non_exhaustive]
16150    pub enum State {
16151        /// Not specified.
16152        Unspecified,
16153        /// The pending backup is still being created. Operations on the
16154        /// backup may fail with `FAILED_PRECONDITION` in this state.
16155        Creating,
16156        /// The backup is complete and ready for use.
16157        Ready,
16158        /// If set, the enum was initialized with an unknown value.
16159        ///
16160        /// Applications can examine the value using [State::value] or
16161        /// [State::name].
16162        UnknownValue(state::UnknownValue),
16163    }
16164
16165    #[doc(hidden)]
16166    pub mod state {
16167        #[allow(unused_imports)]
16168        use super::*;
16169        #[derive(Clone, Debug, PartialEq)]
16170        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16171    }
16172
16173    impl State {
16174        /// Gets the enum value.
16175        ///
16176        /// Returns `None` if the enum contains an unknown value deserialized from
16177        /// the string representation of enums.
16178        pub fn value(&self) -> std::option::Option<i32> {
16179            match self {
16180                Self::Unspecified => std::option::Option::Some(0),
16181                Self::Creating => std::option::Option::Some(1),
16182                Self::Ready => std::option::Option::Some(2),
16183                Self::UnknownValue(u) => u.0.value(),
16184            }
16185        }
16186
16187        /// Gets the enum value as a string.
16188        ///
16189        /// Returns `None` if the enum contains an unknown value deserialized from
16190        /// the integer representation of enums.
16191        pub fn name(&self) -> std::option::Option<&str> {
16192            match self {
16193                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16194                Self::Creating => std::option::Option::Some("CREATING"),
16195                Self::Ready => std::option::Option::Some("READY"),
16196                Self::UnknownValue(u) => u.0.name(),
16197            }
16198        }
16199    }
16200
16201    impl std::default::Default for State {
16202        fn default() -> Self {
16203            use std::convert::From;
16204            Self::from(0)
16205        }
16206    }
16207
16208    impl std::fmt::Display for State {
16209        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16210            wkt::internal::display_enum(f, self.name(), self.value())
16211        }
16212    }
16213
16214    impl std::convert::From<i32> for State {
16215        fn from(value: i32) -> Self {
16216            match value {
16217                0 => Self::Unspecified,
16218                1 => Self::Creating,
16219                2 => Self::Ready,
16220                _ => Self::UnknownValue(state::UnknownValue(
16221                    wkt::internal::UnknownEnumValue::Integer(value),
16222                )),
16223            }
16224        }
16225    }
16226
16227    impl std::convert::From<&str> for State {
16228        fn from(value: &str) -> Self {
16229            use std::string::ToString;
16230            match value {
16231                "STATE_UNSPECIFIED" => Self::Unspecified,
16232                "CREATING" => Self::Creating,
16233                "READY" => Self::Ready,
16234                _ => Self::UnknownValue(state::UnknownValue(
16235                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16236                )),
16237            }
16238        }
16239    }
16240
16241    impl serde::ser::Serialize for State {
16242        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16243        where
16244            S: serde::Serializer,
16245        {
16246            match self {
16247                Self::Unspecified => serializer.serialize_i32(0),
16248                Self::Creating => serializer.serialize_i32(1),
16249                Self::Ready => serializer.serialize_i32(2),
16250                Self::UnknownValue(u) => u.0.serialize(serializer),
16251            }
16252        }
16253    }
16254
16255    impl<'de> serde::de::Deserialize<'de> for State {
16256        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16257        where
16258            D: serde::Deserializer<'de>,
16259        {
16260            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16261                ".google.bigtable.admin.v2.Backup.State",
16262            ))
16263        }
16264    }
16265
16266    /// The type of the backup.
16267    ///
16268    /// # Working with unknown values
16269    ///
16270    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16271    /// additional enum variants at any time. Adding new variants is not considered
16272    /// a breaking change. Applications should write their code in anticipation of:
16273    ///
16274    /// - New values appearing in future releases of the client library, **and**
16275    /// - New values received dynamically, without application changes.
16276    ///
16277    /// Please consult the [Working with enums] section in the user guide for some
16278    /// guidelines.
16279    ///
16280    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16281    #[derive(Clone, Debug, PartialEq)]
16282    #[non_exhaustive]
16283    pub enum BackupType {
16284        /// Not specified.
16285        Unspecified,
16286        /// The default type for Cloud Bigtable managed backups. Supported for
16287        /// backups created in both HDD and SSD instances. Requires optimization when
16288        /// restored to a table in an SSD instance.
16289        Standard,
16290        /// A backup type with faster restore to SSD performance. Only supported for
16291        /// backups created in SSD instances. A new SSD table restored from a hot
16292        /// backup reaches production performance more quickly than a standard
16293        /// backup.
16294        Hot,
16295        /// If set, the enum was initialized with an unknown value.
16296        ///
16297        /// Applications can examine the value using [BackupType::value] or
16298        /// [BackupType::name].
16299        UnknownValue(backup_type::UnknownValue),
16300    }
16301
16302    #[doc(hidden)]
16303    pub mod backup_type {
16304        #[allow(unused_imports)]
16305        use super::*;
16306        #[derive(Clone, Debug, PartialEq)]
16307        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16308    }
16309
16310    impl BackupType {
16311        /// Gets the enum value.
16312        ///
16313        /// Returns `None` if the enum contains an unknown value deserialized from
16314        /// the string representation of enums.
16315        pub fn value(&self) -> std::option::Option<i32> {
16316            match self {
16317                Self::Unspecified => std::option::Option::Some(0),
16318                Self::Standard => std::option::Option::Some(1),
16319                Self::Hot => std::option::Option::Some(2),
16320                Self::UnknownValue(u) => u.0.value(),
16321            }
16322        }
16323
16324        /// Gets the enum value as a string.
16325        ///
16326        /// Returns `None` if the enum contains an unknown value deserialized from
16327        /// the integer representation of enums.
16328        pub fn name(&self) -> std::option::Option<&str> {
16329            match self {
16330                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
16331                Self::Standard => std::option::Option::Some("STANDARD"),
16332                Self::Hot => std::option::Option::Some("HOT"),
16333                Self::UnknownValue(u) => u.0.name(),
16334            }
16335        }
16336    }
16337
16338    impl std::default::Default for BackupType {
16339        fn default() -> Self {
16340            use std::convert::From;
16341            Self::from(0)
16342        }
16343    }
16344
16345    impl std::fmt::Display for BackupType {
16346        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16347            wkt::internal::display_enum(f, self.name(), self.value())
16348        }
16349    }
16350
16351    impl std::convert::From<i32> for BackupType {
16352        fn from(value: i32) -> Self {
16353            match value {
16354                0 => Self::Unspecified,
16355                1 => Self::Standard,
16356                2 => Self::Hot,
16357                _ => Self::UnknownValue(backup_type::UnknownValue(
16358                    wkt::internal::UnknownEnumValue::Integer(value),
16359                )),
16360            }
16361        }
16362    }
16363
16364    impl std::convert::From<&str> for BackupType {
16365        fn from(value: &str) -> Self {
16366            use std::string::ToString;
16367            match value {
16368                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
16369                "STANDARD" => Self::Standard,
16370                "HOT" => Self::Hot,
16371                _ => Self::UnknownValue(backup_type::UnknownValue(
16372                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16373                )),
16374            }
16375        }
16376    }
16377
16378    impl serde::ser::Serialize for BackupType {
16379        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16380        where
16381            S: serde::Serializer,
16382        {
16383            match self {
16384                Self::Unspecified => serializer.serialize_i32(0),
16385                Self::Standard => serializer.serialize_i32(1),
16386                Self::Hot => serializer.serialize_i32(2),
16387                Self::UnknownValue(u) => u.0.serialize(serializer),
16388            }
16389        }
16390    }
16391
16392    impl<'de> serde::de::Deserialize<'de> for BackupType {
16393        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16394        where
16395            D: serde::Deserializer<'de>,
16396        {
16397            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
16398                ".google.bigtable.admin.v2.Backup.BackupType",
16399            ))
16400        }
16401    }
16402}
16403
16404/// Information about a backup.
16405#[derive(Clone, Default, PartialEq)]
16406#[non_exhaustive]
16407pub struct BackupInfo {
16408    /// Output only. Name of the backup.
16409    pub backup: std::string::String,
16410
16411    /// Output only. The time that the backup was started. Row data in the backup
16412    /// will be no older than this timestamp.
16413    pub start_time: std::option::Option<wkt::Timestamp>,
16414
16415    /// Output only. This time that the backup was finished. Row data in the
16416    /// backup will be no newer than this timestamp.
16417    pub end_time: std::option::Option<wkt::Timestamp>,
16418
16419    /// Output only. Name of the table the backup was created from.
16420    pub source_table: std::string::String,
16421
16422    /// Output only. Name of the backup from which this backup was copied. If a
16423    /// backup is not created by copying a backup, this field will be empty. Values
16424    /// are of the form:
16425    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
16426    pub source_backup: std::string::String,
16427
16428    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16429}
16430
16431impl BackupInfo {
16432    /// Creates a new default instance.
16433    pub fn new() -> Self {
16434        std::default::Default::default()
16435    }
16436
16437    /// Sets the value of [backup][crate::model::BackupInfo::backup].
16438    ///
16439    /// # Example
16440    /// ```ignore,no_run
16441    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
16442    /// let x = BackupInfo::new().set_backup("example");
16443    /// ```
16444    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16445        self.backup = v.into();
16446        self
16447    }
16448
16449    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
16450    ///
16451    /// # Example
16452    /// ```ignore,no_run
16453    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
16454    /// use wkt::Timestamp;
16455    /// let x = BackupInfo::new().set_start_time(Timestamp::default()/* use setters */);
16456    /// ```
16457    pub fn set_start_time<T>(mut self, v: T) -> Self
16458    where
16459        T: std::convert::Into<wkt::Timestamp>,
16460    {
16461        self.start_time = std::option::Option::Some(v.into());
16462        self
16463    }
16464
16465    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
16466    ///
16467    /// # Example
16468    /// ```ignore,no_run
16469    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
16470    /// use wkt::Timestamp;
16471    /// let x = BackupInfo::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
16472    /// let x = BackupInfo::new().set_or_clear_start_time(None::<Timestamp>);
16473    /// ```
16474    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
16475    where
16476        T: std::convert::Into<wkt::Timestamp>,
16477    {
16478        self.start_time = v.map(|x| x.into());
16479        self
16480    }
16481
16482    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
16483    ///
16484    /// # Example
16485    /// ```ignore,no_run
16486    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
16487    /// use wkt::Timestamp;
16488    /// let x = BackupInfo::new().set_end_time(Timestamp::default()/* use setters */);
16489    /// ```
16490    pub fn set_end_time<T>(mut self, v: T) -> Self
16491    where
16492        T: std::convert::Into<wkt::Timestamp>,
16493    {
16494        self.end_time = std::option::Option::Some(v.into());
16495        self
16496    }
16497
16498    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
16499    ///
16500    /// # Example
16501    /// ```ignore,no_run
16502    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
16503    /// use wkt::Timestamp;
16504    /// let x = BackupInfo::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
16505    /// let x = BackupInfo::new().set_or_clear_end_time(None::<Timestamp>);
16506    /// ```
16507    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
16508    where
16509        T: std::convert::Into<wkt::Timestamp>,
16510    {
16511        self.end_time = v.map(|x| x.into());
16512        self
16513    }
16514
16515    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
16516    ///
16517    /// # Example
16518    /// ```ignore,no_run
16519    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
16520    /// let x = BackupInfo::new().set_source_table("example");
16521    /// ```
16522    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16523        self.source_table = v.into();
16524        self
16525    }
16526
16527    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
16528    ///
16529    /// # Example
16530    /// ```ignore,no_run
16531    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
16532    /// let x = BackupInfo::new().set_source_backup("example");
16533    /// ```
16534    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16535        self.source_backup = v.into();
16536        self
16537    }
16538}
16539
16540impl wkt::message::Message for BackupInfo {
16541    fn typename() -> &'static str {
16542        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
16543    }
16544}
16545
16546/// Config for tiered storage.
16547/// A valid config must have a valid TieredStorageRule. Otherwise the whole
16548/// TieredStorageConfig must be unset.
16549/// By default all data is stored in the SSD tier (only SSD instances can
16550/// configure tiered storage).
16551#[derive(Clone, Default, PartialEq)]
16552#[non_exhaustive]
16553pub struct TieredStorageConfig {
16554    /// Rule to specify what data is stored in the infrequent access(IA) tier.
16555    /// The IA tier allows storing more data per node with reduced performance.
16556    pub infrequent_access: std::option::Option<crate::model::TieredStorageRule>,
16557
16558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16559}
16560
16561impl TieredStorageConfig {
16562    /// Creates a new default instance.
16563    pub fn new() -> Self {
16564        std::default::Default::default()
16565    }
16566
16567    /// Sets the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
16568    ///
16569    /// # Example
16570    /// ```ignore,no_run
16571    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
16572    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
16573    /// let x = TieredStorageConfig::new().set_infrequent_access(TieredStorageRule::default()/* use setters */);
16574    /// ```
16575    pub fn set_infrequent_access<T>(mut self, v: T) -> Self
16576    where
16577        T: std::convert::Into<crate::model::TieredStorageRule>,
16578    {
16579        self.infrequent_access = std::option::Option::Some(v.into());
16580        self
16581    }
16582
16583    /// Sets or clears the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
16584    ///
16585    /// # Example
16586    /// ```ignore,no_run
16587    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
16588    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
16589    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(Some(TieredStorageRule::default()/* use setters */));
16590    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(None::<TieredStorageRule>);
16591    /// ```
16592    pub fn set_or_clear_infrequent_access<T>(mut self, v: std::option::Option<T>) -> Self
16593    where
16594        T: std::convert::Into<crate::model::TieredStorageRule>,
16595    {
16596        self.infrequent_access = v.map(|x| x.into());
16597        self
16598    }
16599}
16600
16601impl wkt::message::Message for TieredStorageConfig {
16602    fn typename() -> &'static str {
16603        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageConfig"
16604    }
16605}
16606
16607/// Rule to specify what data is stored in a storage tier.
16608#[derive(Clone, Default, PartialEq)]
16609#[non_exhaustive]
16610pub struct TieredStorageRule {
16611    /// Rules to specify what data is stored in this tier.
16612    pub rule: std::option::Option<crate::model::tiered_storage_rule::Rule>,
16613
16614    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16615}
16616
16617impl TieredStorageRule {
16618    /// Creates a new default instance.
16619    pub fn new() -> Self {
16620        std::default::Default::default()
16621    }
16622
16623    /// Sets the value of [rule][crate::model::TieredStorageRule::rule].
16624    ///
16625    /// Note that all the setters affecting `rule` are mutually
16626    /// exclusive.
16627    ///
16628    /// # Example
16629    /// ```ignore,no_run
16630    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
16631    /// use wkt::Duration;
16632    /// let x = TieredStorageRule::new().set_rule(Some(
16633    ///     google_cloud_bigtable_admin_v2::model::tiered_storage_rule::Rule::IncludeIfOlderThan(Duration::default().into())));
16634    /// ```
16635    pub fn set_rule<
16636        T: std::convert::Into<std::option::Option<crate::model::tiered_storage_rule::Rule>>,
16637    >(
16638        mut self,
16639        v: T,
16640    ) -> Self {
16641        self.rule = v.into();
16642        self
16643    }
16644
16645    /// The value of [rule][crate::model::TieredStorageRule::rule]
16646    /// if it holds a `IncludeIfOlderThan`, `None` if the field is not set or
16647    /// holds a different branch.
16648    pub fn include_if_older_than(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
16649        #[allow(unreachable_patterns)]
16650        self.rule.as_ref().and_then(|v| match v {
16651            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v) => {
16652                std::option::Option::Some(v)
16653            }
16654            _ => std::option::Option::None,
16655        })
16656    }
16657
16658    /// Sets the value of [rule][crate::model::TieredStorageRule::rule]
16659    /// to hold a `IncludeIfOlderThan`.
16660    ///
16661    /// Note that all the setters affecting `rule` are
16662    /// mutually exclusive.
16663    ///
16664    /// # Example
16665    /// ```ignore,no_run
16666    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
16667    /// use wkt::Duration;
16668    /// let x = TieredStorageRule::new().set_include_if_older_than(Duration::default()/* use setters */);
16669    /// assert!(x.include_if_older_than().is_some());
16670    /// ```
16671    pub fn set_include_if_older_than<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
16672        mut self,
16673        v: T,
16674    ) -> Self {
16675        self.rule = std::option::Option::Some(
16676            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v.into()),
16677        );
16678        self
16679    }
16680}
16681
16682impl wkt::message::Message for TieredStorageRule {
16683    fn typename() -> &'static str {
16684        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageRule"
16685    }
16686}
16687
16688/// Defines additional types related to [TieredStorageRule].
16689pub mod tiered_storage_rule {
16690    #[allow(unused_imports)]
16691    use super::*;
16692
16693    /// Rules to specify what data is stored in this tier.
16694    #[derive(Clone, Debug, PartialEq)]
16695    #[non_exhaustive]
16696    pub enum Rule {
16697        /// Include cells older than the given age.
16698        /// For the infrequent access tier, this value must be at least 30 days.
16699        IncludeIfOlderThan(std::boxed::Box<wkt::Duration>),
16700    }
16701}
16702
16703/// Represents a collection of protobuf schemas.
16704#[derive(Clone, Default, PartialEq)]
16705#[non_exhaustive]
16706pub struct ProtoSchema {
16707    /// Required. Contains a protobuf-serialized
16708    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
16709    /// which could include multiple proto files.
16710    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
16711    /// run `protoc` with
16712    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
16713    /// for moon/shot/app.proto, run
16714    ///
16715    /// ```norust
16716    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
16717    ///          --include_imports \
16718    ///          --descriptor_set_out=descriptors.pb \
16719    ///          moon/shot/app.proto
16720    /// ```
16721    ///
16722    /// For more details, see protobuffer [self
16723    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
16724    pub proto_descriptors: ::bytes::Bytes,
16725
16726    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16727}
16728
16729impl ProtoSchema {
16730    /// Creates a new default instance.
16731    pub fn new() -> Self {
16732        std::default::Default::default()
16733    }
16734
16735    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
16736    ///
16737    /// # Example
16738    /// ```ignore,no_run
16739    /// # use google_cloud_bigtable_admin_v2::model::ProtoSchema;
16740    /// let x = ProtoSchema::new().set_proto_descriptors(bytes::Bytes::from_static(b"example"));
16741    /// ```
16742    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
16743        self.proto_descriptors = v.into();
16744        self
16745    }
16746}
16747
16748impl wkt::message::Message for ProtoSchema {
16749    fn typename() -> &'static str {
16750        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
16751    }
16752}
16753
16754/// Represents a collection of Avro schemas.
16755#[derive(Clone, Default, PartialEq)]
16756#[non_exhaustive]
16757pub struct AvroSchema {
16758    /// Required. The Avro schemas in JSON format.
16759    /// Each element must be the content of a valid, self-contained Avro schema
16760    /// file (.avsc), as described in <https://avro.apache.org/docs/1.8.1/spec.html>.
16761    /// Use repeated elements to include multiple Avro schema files in a single
16762    /// bundle.
16763    pub json_schemas: std::vec::Vec<std::string::String>,
16764
16765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16766}
16767
16768impl AvroSchema {
16769    /// Creates a new default instance.
16770    pub fn new() -> Self {
16771        std::default::Default::default()
16772    }
16773
16774    /// Sets the value of [json_schemas][crate::model::AvroSchema::json_schemas].
16775    ///
16776    /// # Example
16777    /// ```ignore,no_run
16778    /// # use google_cloud_bigtable_admin_v2::model::AvroSchema;
16779    /// let x = AvroSchema::new().set_json_schemas(["a", "b", "c"]);
16780    /// ```
16781    pub fn set_json_schemas<T, V>(mut self, v: T) -> Self
16782    where
16783        T: std::iter::IntoIterator<Item = V>,
16784        V: std::convert::Into<std::string::String>,
16785    {
16786        use std::iter::Iterator;
16787        self.json_schemas = v.into_iter().map(|i| i.into()).collect();
16788        self
16789    }
16790}
16791
16792impl wkt::message::Message for AvroSchema {
16793    fn typename() -> &'static str {
16794        "type.googleapis.com/google.bigtable.admin.v2.AvroSchema"
16795    }
16796}
16797
16798/// A named collection of related schemas.
16799#[derive(Clone, Default, PartialEq)]
16800#[non_exhaustive]
16801pub struct SchemaBundle {
16802    /// Identifier. The unique name identifying this schema bundle.
16803    /// Values are of the form
16804    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
16805    pub name: std::string::String,
16806
16807    /// Optional. The etag for this schema bundle.
16808    /// This may be sent on update and delete requests to ensure the
16809    /// client has an up-to-date value before proceeding. The server
16810    /// returns an ABORTED error on a mismatched etag.
16811    pub etag: std::string::String,
16812
16813    /// The type of this schema bundle. The oneof case cannot change after
16814    /// creation.
16815    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
16816
16817    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16818}
16819
16820impl SchemaBundle {
16821    /// Creates a new default instance.
16822    pub fn new() -> Self {
16823        std::default::Default::default()
16824    }
16825
16826    /// Sets the value of [name][crate::model::SchemaBundle::name].
16827    ///
16828    /// # Example
16829    /// ```ignore,no_run
16830    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
16831    /// # let project_id = "project_id";
16832    /// # let instance_id = "instance_id";
16833    /// # let table_id = "table_id";
16834    /// # let schema_bundle_id = "schema_bundle_id";
16835    /// let x = SchemaBundle::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
16836    /// ```
16837    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16838        self.name = v.into();
16839        self
16840    }
16841
16842    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
16843    ///
16844    /// # Example
16845    /// ```ignore,no_run
16846    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
16847    /// let x = SchemaBundle::new().set_etag("example");
16848    /// ```
16849    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16850        self.etag = v.into();
16851        self
16852    }
16853
16854    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
16855    ///
16856    /// Note that all the setters affecting `r#type` are mutually
16857    /// exclusive.
16858    ///
16859    /// # Example
16860    /// ```ignore,no_run
16861    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
16862    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
16863    /// let x = SchemaBundle::new().set_type(Some(
16864    ///     google_cloud_bigtable_admin_v2::model::schema_bundle::Type::ProtoSchema(ProtoSchema::default().into())));
16865    /// ```
16866    pub fn set_type<
16867        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
16868    >(
16869        mut self,
16870        v: T,
16871    ) -> Self {
16872        self.r#type = v.into();
16873        self
16874    }
16875
16876    /// The value of [r#type][crate::model::SchemaBundle::r#type]
16877    /// if it holds a `ProtoSchema`, `None` if the field is not set or
16878    /// holds a different branch.
16879    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
16880        #[allow(unreachable_patterns)]
16881        self.r#type.as_ref().and_then(|v| match v {
16882            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
16883            _ => std::option::Option::None,
16884        })
16885    }
16886
16887    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
16888    /// to hold a `ProtoSchema`.
16889    ///
16890    /// Note that all the setters affecting `r#type` are
16891    /// mutually exclusive.
16892    ///
16893    /// # Example
16894    /// ```ignore,no_run
16895    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
16896    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
16897    /// let x = SchemaBundle::new().set_proto_schema(ProtoSchema::default()/* use setters */);
16898    /// assert!(x.proto_schema().is_some());
16899    /// assert!(x.avro_schema().is_none());
16900    /// ```
16901    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
16902        mut self,
16903        v: T,
16904    ) -> Self {
16905        self.r#type =
16906            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
16907        self
16908    }
16909
16910    /// The value of [r#type][crate::model::SchemaBundle::r#type]
16911    /// if it holds a `AvroSchema`, `None` if the field is not set or
16912    /// holds a different branch.
16913    pub fn avro_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::AvroSchema>> {
16914        #[allow(unreachable_patterns)]
16915        self.r#type.as_ref().and_then(|v| match v {
16916            crate::model::schema_bundle::Type::AvroSchema(v) => std::option::Option::Some(v),
16917            _ => std::option::Option::None,
16918        })
16919    }
16920
16921    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
16922    /// to hold a `AvroSchema`.
16923    ///
16924    /// Note that all the setters affecting `r#type` are
16925    /// mutually exclusive.
16926    ///
16927    /// # Example
16928    /// ```ignore,no_run
16929    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
16930    /// use google_cloud_bigtable_admin_v2::model::AvroSchema;
16931    /// let x = SchemaBundle::new().set_avro_schema(AvroSchema::default()/* use setters */);
16932    /// assert!(x.avro_schema().is_some());
16933    /// assert!(x.proto_schema().is_none());
16934    /// ```
16935    pub fn set_avro_schema<T: std::convert::Into<std::boxed::Box<crate::model::AvroSchema>>>(
16936        mut self,
16937        v: T,
16938    ) -> Self {
16939        self.r#type =
16940            std::option::Option::Some(crate::model::schema_bundle::Type::AvroSchema(v.into()));
16941        self
16942    }
16943}
16944
16945impl wkt::message::Message for SchemaBundle {
16946    fn typename() -> &'static str {
16947        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
16948    }
16949}
16950
16951/// Defines additional types related to [SchemaBundle].
16952pub mod schema_bundle {
16953    #[allow(unused_imports)]
16954    use super::*;
16955
16956    /// The type of this schema bundle. The oneof case cannot change after
16957    /// creation.
16958    #[derive(Clone, Debug, PartialEq)]
16959    #[non_exhaustive]
16960    pub enum Type {
16961        /// Schema for Protobufs.
16962        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
16963        /// Optional. Schema for Avros.
16964        AvroSchema(std::boxed::Box<crate::model::AvroSchema>),
16965    }
16966}
16967
16968/// `Type` represents the type of data that is written to, read from, or stored
16969/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
16970/// familiarity and consistency across products and features.
16971///
16972/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
16973/// an `Encoding` which describes how to convert to or from the underlying data.
16974///
16975/// Each encoding can operate in one of two modes:
16976///
16977/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
16978///   if and only if `X <= Y`. This is useful anywhere sort order is important,
16979///   for example when encoding keys.
16980/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
16981///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
16982///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
16983///   are valid encodings of the same JSON value.
16984///
16985/// The API clearly documents which mode is used wherever an encoding can be
16986/// configured. Each encoding also documents which values are supported in which
16987/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
16988/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
16989/// `STRING("-00001") > STRING("00001")`.
16990#[derive(Clone, Default, PartialEq)]
16991#[non_exhaustive]
16992pub struct Type {
16993    /// The kind of type that this represents.
16994    pub kind: std::option::Option<crate::model::r#type::Kind>,
16995
16996    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16997}
16998
16999impl Type {
17000    /// Creates a new default instance.
17001    pub fn new() -> Self {
17002        std::default::Default::default()
17003    }
17004
17005    /// Sets the value of [kind][crate::model::Type::kind].
17006    ///
17007    /// Note that all the setters affecting `kind` are mutually
17008    /// exclusive.
17009    ///
17010    /// # Example
17011    /// ```ignore,no_run
17012    /// # use google_cloud_bigtable_admin_v2::model::Type;
17013    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17014    /// let x = Type::new().set_kind(Some(
17015    ///     google_cloud_bigtable_admin_v2::model::r#type::Kind::BytesType(Bytes::default().into())));
17016    /// ```
17017    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
17018        mut self,
17019        v: T,
17020    ) -> Self {
17021        self.kind = v.into();
17022        self
17023    }
17024
17025    /// The value of [kind][crate::model::Type::kind]
17026    /// if it holds a `BytesType`, `None` if the field is not set or
17027    /// holds a different branch.
17028    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
17029        #[allow(unreachable_patterns)]
17030        self.kind.as_ref().and_then(|v| match v {
17031            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
17032            _ => std::option::Option::None,
17033        })
17034    }
17035
17036    /// Sets the value of [kind][crate::model::Type::kind]
17037    /// to hold a `BytesType`.
17038    ///
17039    /// Note that all the setters affecting `kind` are
17040    /// mutually exclusive.
17041    ///
17042    /// # Example
17043    /// ```ignore,no_run
17044    /// # use google_cloud_bigtable_admin_v2::model::Type;
17045    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17046    /// let x = Type::new().set_bytes_type(Bytes::default()/* use setters */);
17047    /// assert!(x.bytes_type().is_some());
17048    /// assert!(x.string_type().is_none());
17049    /// assert!(x.int64_type().is_none());
17050    /// assert!(x.float32_type().is_none());
17051    /// assert!(x.float64_type().is_none());
17052    /// assert!(x.bool_type().is_none());
17053    /// assert!(x.timestamp_type().is_none());
17054    /// assert!(x.date_type().is_none());
17055    /// assert!(x.aggregate_type().is_none());
17056    /// assert!(x.struct_type().is_none());
17057    /// assert!(x.array_type().is_none());
17058    /// assert!(x.map_type().is_none());
17059    /// assert!(x.proto_type().is_none());
17060    /// assert!(x.enum_type().is_none());
17061    /// ```
17062    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
17063        mut self,
17064        v: T,
17065    ) -> Self {
17066        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
17067        self
17068    }
17069
17070    /// The value of [kind][crate::model::Type::kind]
17071    /// if it holds a `StringType`, `None` if the field is not set or
17072    /// holds a different branch.
17073    pub fn string_type(
17074        &self,
17075    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
17076        #[allow(unreachable_patterns)]
17077        self.kind.as_ref().and_then(|v| match v {
17078            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
17079            _ => std::option::Option::None,
17080        })
17081    }
17082
17083    /// Sets the value of [kind][crate::model::Type::kind]
17084    /// to hold a `StringType`.
17085    ///
17086    /// Note that all the setters affecting `kind` are
17087    /// mutually exclusive.
17088    ///
17089    /// # Example
17090    /// ```ignore,no_run
17091    /// # use google_cloud_bigtable_admin_v2::model::Type;
17092    /// use google_cloud_bigtable_admin_v2::model::r#type::String;
17093    /// let x = Type::new().set_string_type(String::default()/* use setters */);
17094    /// assert!(x.string_type().is_some());
17095    /// assert!(x.bytes_type().is_none());
17096    /// assert!(x.int64_type().is_none());
17097    /// assert!(x.float32_type().is_none());
17098    /// assert!(x.float64_type().is_none());
17099    /// assert!(x.bool_type().is_none());
17100    /// assert!(x.timestamp_type().is_none());
17101    /// assert!(x.date_type().is_none());
17102    /// assert!(x.aggregate_type().is_none());
17103    /// assert!(x.struct_type().is_none());
17104    /// assert!(x.array_type().is_none());
17105    /// assert!(x.map_type().is_none());
17106    /// assert!(x.proto_type().is_none());
17107    /// assert!(x.enum_type().is_none());
17108    /// ```
17109    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
17110        mut self,
17111        v: T,
17112    ) -> Self {
17113        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
17114        self
17115    }
17116
17117    /// The value of [kind][crate::model::Type::kind]
17118    /// if it holds a `Int64Type`, `None` if the field is not set or
17119    /// holds a different branch.
17120    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
17121        #[allow(unreachable_patterns)]
17122        self.kind.as_ref().and_then(|v| match v {
17123            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
17124            _ => std::option::Option::None,
17125        })
17126    }
17127
17128    /// Sets the value of [kind][crate::model::Type::kind]
17129    /// to hold a `Int64Type`.
17130    ///
17131    /// Note that all the setters affecting `kind` are
17132    /// mutually exclusive.
17133    ///
17134    /// # Example
17135    /// ```ignore,no_run
17136    /// # use google_cloud_bigtable_admin_v2::model::Type;
17137    /// use google_cloud_bigtable_admin_v2::model::r#type::Int64;
17138    /// let x = Type::new().set_int64_type(Int64::default()/* use setters */);
17139    /// assert!(x.int64_type().is_some());
17140    /// assert!(x.bytes_type().is_none());
17141    /// assert!(x.string_type().is_none());
17142    /// assert!(x.float32_type().is_none());
17143    /// assert!(x.float64_type().is_none());
17144    /// assert!(x.bool_type().is_none());
17145    /// assert!(x.timestamp_type().is_none());
17146    /// assert!(x.date_type().is_none());
17147    /// assert!(x.aggregate_type().is_none());
17148    /// assert!(x.struct_type().is_none());
17149    /// assert!(x.array_type().is_none());
17150    /// assert!(x.map_type().is_none());
17151    /// assert!(x.proto_type().is_none());
17152    /// assert!(x.enum_type().is_none());
17153    /// ```
17154    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
17155        mut self,
17156        v: T,
17157    ) -> Self {
17158        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
17159        self
17160    }
17161
17162    /// The value of [kind][crate::model::Type::kind]
17163    /// if it holds a `Float32Type`, `None` if the field is not set or
17164    /// holds a different branch.
17165    pub fn float32_type(
17166        &self,
17167    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
17168        #[allow(unreachable_patterns)]
17169        self.kind.as_ref().and_then(|v| match v {
17170            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
17171            _ => std::option::Option::None,
17172        })
17173    }
17174
17175    /// Sets the value of [kind][crate::model::Type::kind]
17176    /// to hold a `Float32Type`.
17177    ///
17178    /// Note that all the setters affecting `kind` are
17179    /// mutually exclusive.
17180    ///
17181    /// # Example
17182    /// ```ignore,no_run
17183    /// # use google_cloud_bigtable_admin_v2::model::Type;
17184    /// use google_cloud_bigtable_admin_v2::model::r#type::Float32;
17185    /// let x = Type::new().set_float32_type(Float32::default()/* use setters */);
17186    /// assert!(x.float32_type().is_some());
17187    /// assert!(x.bytes_type().is_none());
17188    /// assert!(x.string_type().is_none());
17189    /// assert!(x.int64_type().is_none());
17190    /// assert!(x.float64_type().is_none());
17191    /// assert!(x.bool_type().is_none());
17192    /// assert!(x.timestamp_type().is_none());
17193    /// assert!(x.date_type().is_none());
17194    /// assert!(x.aggregate_type().is_none());
17195    /// assert!(x.struct_type().is_none());
17196    /// assert!(x.array_type().is_none());
17197    /// assert!(x.map_type().is_none());
17198    /// assert!(x.proto_type().is_none());
17199    /// assert!(x.enum_type().is_none());
17200    /// ```
17201    pub fn set_float32_type<
17202        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
17203    >(
17204        mut self,
17205        v: T,
17206    ) -> Self {
17207        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
17208        self
17209    }
17210
17211    /// The value of [kind][crate::model::Type::kind]
17212    /// if it holds a `Float64Type`, `None` if the field is not set or
17213    /// holds a different branch.
17214    pub fn float64_type(
17215        &self,
17216    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
17217        #[allow(unreachable_patterns)]
17218        self.kind.as_ref().and_then(|v| match v {
17219            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
17220            _ => std::option::Option::None,
17221        })
17222    }
17223
17224    /// Sets the value of [kind][crate::model::Type::kind]
17225    /// to hold a `Float64Type`.
17226    ///
17227    /// Note that all the setters affecting `kind` are
17228    /// mutually exclusive.
17229    ///
17230    /// # Example
17231    /// ```ignore,no_run
17232    /// # use google_cloud_bigtable_admin_v2::model::Type;
17233    /// use google_cloud_bigtable_admin_v2::model::r#type::Float64;
17234    /// let x = Type::new().set_float64_type(Float64::default()/* use setters */);
17235    /// assert!(x.float64_type().is_some());
17236    /// assert!(x.bytes_type().is_none());
17237    /// assert!(x.string_type().is_none());
17238    /// assert!(x.int64_type().is_none());
17239    /// assert!(x.float32_type().is_none());
17240    /// assert!(x.bool_type().is_none());
17241    /// assert!(x.timestamp_type().is_none());
17242    /// assert!(x.date_type().is_none());
17243    /// assert!(x.aggregate_type().is_none());
17244    /// assert!(x.struct_type().is_none());
17245    /// assert!(x.array_type().is_none());
17246    /// assert!(x.map_type().is_none());
17247    /// assert!(x.proto_type().is_none());
17248    /// assert!(x.enum_type().is_none());
17249    /// ```
17250    pub fn set_float64_type<
17251        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
17252    >(
17253        mut self,
17254        v: T,
17255    ) -> Self {
17256        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
17257        self
17258    }
17259
17260    /// The value of [kind][crate::model::Type::kind]
17261    /// if it holds a `BoolType`, `None` if the field is not set or
17262    /// holds a different branch.
17263    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
17264        #[allow(unreachable_patterns)]
17265        self.kind.as_ref().and_then(|v| match v {
17266            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
17267            _ => std::option::Option::None,
17268        })
17269    }
17270
17271    /// Sets the value of [kind][crate::model::Type::kind]
17272    /// to hold a `BoolType`.
17273    ///
17274    /// Note that all the setters affecting `kind` are
17275    /// mutually exclusive.
17276    ///
17277    /// # Example
17278    /// ```ignore,no_run
17279    /// # use google_cloud_bigtable_admin_v2::model::Type;
17280    /// use google_cloud_bigtable_admin_v2::model::r#type::Bool;
17281    /// let x = Type::new().set_bool_type(Bool::default()/* use setters */);
17282    /// assert!(x.bool_type().is_some());
17283    /// assert!(x.bytes_type().is_none());
17284    /// assert!(x.string_type().is_none());
17285    /// assert!(x.int64_type().is_none());
17286    /// assert!(x.float32_type().is_none());
17287    /// assert!(x.float64_type().is_none());
17288    /// assert!(x.timestamp_type().is_none());
17289    /// assert!(x.date_type().is_none());
17290    /// assert!(x.aggregate_type().is_none());
17291    /// assert!(x.struct_type().is_none());
17292    /// assert!(x.array_type().is_none());
17293    /// assert!(x.map_type().is_none());
17294    /// assert!(x.proto_type().is_none());
17295    /// assert!(x.enum_type().is_none());
17296    /// ```
17297    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
17298        mut self,
17299        v: T,
17300    ) -> Self {
17301        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
17302        self
17303    }
17304
17305    /// The value of [kind][crate::model::Type::kind]
17306    /// if it holds a `TimestampType`, `None` if the field is not set or
17307    /// holds a different branch.
17308    pub fn timestamp_type(
17309        &self,
17310    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
17311        #[allow(unreachable_patterns)]
17312        self.kind.as_ref().and_then(|v| match v {
17313            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
17314            _ => std::option::Option::None,
17315        })
17316    }
17317
17318    /// Sets the value of [kind][crate::model::Type::kind]
17319    /// to hold a `TimestampType`.
17320    ///
17321    /// Note that all the setters affecting `kind` are
17322    /// mutually exclusive.
17323    ///
17324    /// # Example
17325    /// ```ignore,no_run
17326    /// # use google_cloud_bigtable_admin_v2::model::Type;
17327    /// use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17328    /// let x = Type::new().set_timestamp_type(Timestamp::default()/* use setters */);
17329    /// assert!(x.timestamp_type().is_some());
17330    /// assert!(x.bytes_type().is_none());
17331    /// assert!(x.string_type().is_none());
17332    /// assert!(x.int64_type().is_none());
17333    /// assert!(x.float32_type().is_none());
17334    /// assert!(x.float64_type().is_none());
17335    /// assert!(x.bool_type().is_none());
17336    /// assert!(x.date_type().is_none());
17337    /// assert!(x.aggregate_type().is_none());
17338    /// assert!(x.struct_type().is_none());
17339    /// assert!(x.array_type().is_none());
17340    /// assert!(x.map_type().is_none());
17341    /// assert!(x.proto_type().is_none());
17342    /// assert!(x.enum_type().is_none());
17343    /// ```
17344    pub fn set_timestamp_type<
17345        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
17346    >(
17347        mut self,
17348        v: T,
17349    ) -> Self {
17350        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
17351        self
17352    }
17353
17354    /// The value of [kind][crate::model::Type::kind]
17355    /// if it holds a `DateType`, `None` if the field is not set or
17356    /// holds a different branch.
17357    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
17358        #[allow(unreachable_patterns)]
17359        self.kind.as_ref().and_then(|v| match v {
17360            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
17361            _ => std::option::Option::None,
17362        })
17363    }
17364
17365    /// Sets the value of [kind][crate::model::Type::kind]
17366    /// to hold a `DateType`.
17367    ///
17368    /// Note that all the setters affecting `kind` are
17369    /// mutually exclusive.
17370    ///
17371    /// # Example
17372    /// ```ignore,no_run
17373    /// # use google_cloud_bigtable_admin_v2::model::Type;
17374    /// use google_cloud_bigtable_admin_v2::model::r#type::Date;
17375    /// let x = Type::new().set_date_type(Date::default()/* use setters */);
17376    /// assert!(x.date_type().is_some());
17377    /// assert!(x.bytes_type().is_none());
17378    /// assert!(x.string_type().is_none());
17379    /// assert!(x.int64_type().is_none());
17380    /// assert!(x.float32_type().is_none());
17381    /// assert!(x.float64_type().is_none());
17382    /// assert!(x.bool_type().is_none());
17383    /// assert!(x.timestamp_type().is_none());
17384    /// assert!(x.aggregate_type().is_none());
17385    /// assert!(x.struct_type().is_none());
17386    /// assert!(x.array_type().is_none());
17387    /// assert!(x.map_type().is_none());
17388    /// assert!(x.proto_type().is_none());
17389    /// assert!(x.enum_type().is_none());
17390    /// ```
17391    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
17392        mut self,
17393        v: T,
17394    ) -> Self {
17395        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
17396        self
17397    }
17398
17399    /// The value of [kind][crate::model::Type::kind]
17400    /// if it holds a `AggregateType`, `None` if the field is not set or
17401    /// holds a different branch.
17402    pub fn aggregate_type(
17403        &self,
17404    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
17405        #[allow(unreachable_patterns)]
17406        self.kind.as_ref().and_then(|v| match v {
17407            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
17408            _ => std::option::Option::None,
17409        })
17410    }
17411
17412    /// Sets the value of [kind][crate::model::Type::kind]
17413    /// to hold a `AggregateType`.
17414    ///
17415    /// Note that all the setters affecting `kind` are
17416    /// mutually exclusive.
17417    ///
17418    /// # Example
17419    /// ```ignore,no_run
17420    /// # use google_cloud_bigtable_admin_v2::model::Type;
17421    /// use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17422    /// let x = Type::new().set_aggregate_type(Aggregate::default()/* use setters */);
17423    /// assert!(x.aggregate_type().is_some());
17424    /// assert!(x.bytes_type().is_none());
17425    /// assert!(x.string_type().is_none());
17426    /// assert!(x.int64_type().is_none());
17427    /// assert!(x.float32_type().is_none());
17428    /// assert!(x.float64_type().is_none());
17429    /// assert!(x.bool_type().is_none());
17430    /// assert!(x.timestamp_type().is_none());
17431    /// assert!(x.date_type().is_none());
17432    /// assert!(x.struct_type().is_none());
17433    /// assert!(x.array_type().is_none());
17434    /// assert!(x.map_type().is_none());
17435    /// assert!(x.proto_type().is_none());
17436    /// assert!(x.enum_type().is_none());
17437    /// ```
17438    pub fn set_aggregate_type<
17439        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
17440    >(
17441        mut self,
17442        v: T,
17443    ) -> Self {
17444        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
17445        self
17446    }
17447
17448    /// The value of [kind][crate::model::Type::kind]
17449    /// if it holds a `StructType`, `None` if the field is not set or
17450    /// holds a different branch.
17451    pub fn struct_type(
17452        &self,
17453    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
17454        #[allow(unreachable_patterns)]
17455        self.kind.as_ref().and_then(|v| match v {
17456            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
17457            _ => std::option::Option::None,
17458        })
17459    }
17460
17461    /// Sets the value of [kind][crate::model::Type::kind]
17462    /// to hold a `StructType`.
17463    ///
17464    /// Note that all the setters affecting `kind` are
17465    /// mutually exclusive.
17466    ///
17467    /// # Example
17468    /// ```ignore,no_run
17469    /// # use google_cloud_bigtable_admin_v2::model::Type;
17470    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17471    /// let x = Type::new().set_struct_type(Struct::default()/* use setters */);
17472    /// assert!(x.struct_type().is_some());
17473    /// assert!(x.bytes_type().is_none());
17474    /// assert!(x.string_type().is_none());
17475    /// assert!(x.int64_type().is_none());
17476    /// assert!(x.float32_type().is_none());
17477    /// assert!(x.float64_type().is_none());
17478    /// assert!(x.bool_type().is_none());
17479    /// assert!(x.timestamp_type().is_none());
17480    /// assert!(x.date_type().is_none());
17481    /// assert!(x.aggregate_type().is_none());
17482    /// assert!(x.array_type().is_none());
17483    /// assert!(x.map_type().is_none());
17484    /// assert!(x.proto_type().is_none());
17485    /// assert!(x.enum_type().is_none());
17486    /// ```
17487    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
17488        mut self,
17489        v: T,
17490    ) -> Self {
17491        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
17492        self
17493    }
17494
17495    /// The value of [kind][crate::model::Type::kind]
17496    /// if it holds a `ArrayType`, `None` if the field is not set or
17497    /// holds a different branch.
17498    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
17499        #[allow(unreachable_patterns)]
17500        self.kind.as_ref().and_then(|v| match v {
17501            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
17502            _ => std::option::Option::None,
17503        })
17504    }
17505
17506    /// Sets the value of [kind][crate::model::Type::kind]
17507    /// to hold a `ArrayType`.
17508    ///
17509    /// Note that all the setters affecting `kind` are
17510    /// mutually exclusive.
17511    ///
17512    /// # Example
17513    /// ```ignore,no_run
17514    /// # use google_cloud_bigtable_admin_v2::model::Type;
17515    /// use google_cloud_bigtable_admin_v2::model::r#type::Array;
17516    /// let x = Type::new().set_array_type(Array::default()/* use setters */);
17517    /// assert!(x.array_type().is_some());
17518    /// assert!(x.bytes_type().is_none());
17519    /// assert!(x.string_type().is_none());
17520    /// assert!(x.int64_type().is_none());
17521    /// assert!(x.float32_type().is_none());
17522    /// assert!(x.float64_type().is_none());
17523    /// assert!(x.bool_type().is_none());
17524    /// assert!(x.timestamp_type().is_none());
17525    /// assert!(x.date_type().is_none());
17526    /// assert!(x.aggregate_type().is_none());
17527    /// assert!(x.struct_type().is_none());
17528    /// assert!(x.map_type().is_none());
17529    /// assert!(x.proto_type().is_none());
17530    /// assert!(x.enum_type().is_none());
17531    /// ```
17532    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
17533        mut self,
17534        v: T,
17535    ) -> Self {
17536        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
17537        self
17538    }
17539
17540    /// The value of [kind][crate::model::Type::kind]
17541    /// if it holds a `MapType`, `None` if the field is not set or
17542    /// holds a different branch.
17543    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
17544        #[allow(unreachable_patterns)]
17545        self.kind.as_ref().and_then(|v| match v {
17546            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
17547            _ => std::option::Option::None,
17548        })
17549    }
17550
17551    /// Sets the value of [kind][crate::model::Type::kind]
17552    /// to hold a `MapType`.
17553    ///
17554    /// Note that all the setters affecting `kind` are
17555    /// mutually exclusive.
17556    ///
17557    /// # Example
17558    /// ```ignore,no_run
17559    /// # use google_cloud_bigtable_admin_v2::model::Type;
17560    /// use google_cloud_bigtable_admin_v2::model::r#type::Map;
17561    /// let x = Type::new().set_map_type(Map::default()/* use setters */);
17562    /// assert!(x.map_type().is_some());
17563    /// assert!(x.bytes_type().is_none());
17564    /// assert!(x.string_type().is_none());
17565    /// assert!(x.int64_type().is_none());
17566    /// assert!(x.float32_type().is_none());
17567    /// assert!(x.float64_type().is_none());
17568    /// assert!(x.bool_type().is_none());
17569    /// assert!(x.timestamp_type().is_none());
17570    /// assert!(x.date_type().is_none());
17571    /// assert!(x.aggregate_type().is_none());
17572    /// assert!(x.struct_type().is_none());
17573    /// assert!(x.array_type().is_none());
17574    /// assert!(x.proto_type().is_none());
17575    /// assert!(x.enum_type().is_none());
17576    /// ```
17577    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
17578        mut self,
17579        v: T,
17580    ) -> Self {
17581        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
17582        self
17583    }
17584
17585    /// The value of [kind][crate::model::Type::kind]
17586    /// if it holds a `ProtoType`, `None` if the field is not set or
17587    /// holds a different branch.
17588    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
17589        #[allow(unreachable_patterns)]
17590        self.kind.as_ref().and_then(|v| match v {
17591            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
17592            _ => std::option::Option::None,
17593        })
17594    }
17595
17596    /// Sets the value of [kind][crate::model::Type::kind]
17597    /// to hold a `ProtoType`.
17598    ///
17599    /// Note that all the setters affecting `kind` are
17600    /// mutually exclusive.
17601    ///
17602    /// # Example
17603    /// ```ignore,no_run
17604    /// # use google_cloud_bigtable_admin_v2::model::Type;
17605    /// use google_cloud_bigtable_admin_v2::model::r#type::Proto;
17606    /// let x = Type::new().set_proto_type(Proto::default()/* use setters */);
17607    /// assert!(x.proto_type().is_some());
17608    /// assert!(x.bytes_type().is_none());
17609    /// assert!(x.string_type().is_none());
17610    /// assert!(x.int64_type().is_none());
17611    /// assert!(x.float32_type().is_none());
17612    /// assert!(x.float64_type().is_none());
17613    /// assert!(x.bool_type().is_none());
17614    /// assert!(x.timestamp_type().is_none());
17615    /// assert!(x.date_type().is_none());
17616    /// assert!(x.aggregate_type().is_none());
17617    /// assert!(x.struct_type().is_none());
17618    /// assert!(x.array_type().is_none());
17619    /// assert!(x.map_type().is_none());
17620    /// assert!(x.enum_type().is_none());
17621    /// ```
17622    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
17623        mut self,
17624        v: T,
17625    ) -> Self {
17626        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
17627        self
17628    }
17629
17630    /// The value of [kind][crate::model::Type::kind]
17631    /// if it holds a `EnumType`, `None` if the field is not set or
17632    /// holds a different branch.
17633    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
17634        #[allow(unreachable_patterns)]
17635        self.kind.as_ref().and_then(|v| match v {
17636            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
17637            _ => std::option::Option::None,
17638        })
17639    }
17640
17641    /// Sets the value of [kind][crate::model::Type::kind]
17642    /// to hold a `EnumType`.
17643    ///
17644    /// Note that all the setters affecting `kind` are
17645    /// mutually exclusive.
17646    ///
17647    /// # Example
17648    /// ```ignore,no_run
17649    /// # use google_cloud_bigtable_admin_v2::model::Type;
17650    /// use google_cloud_bigtable_admin_v2::model::r#type::Enum;
17651    /// let x = Type::new().set_enum_type(Enum::default()/* use setters */);
17652    /// assert!(x.enum_type().is_some());
17653    /// assert!(x.bytes_type().is_none());
17654    /// assert!(x.string_type().is_none());
17655    /// assert!(x.int64_type().is_none());
17656    /// assert!(x.float32_type().is_none());
17657    /// assert!(x.float64_type().is_none());
17658    /// assert!(x.bool_type().is_none());
17659    /// assert!(x.timestamp_type().is_none());
17660    /// assert!(x.date_type().is_none());
17661    /// assert!(x.aggregate_type().is_none());
17662    /// assert!(x.struct_type().is_none());
17663    /// assert!(x.array_type().is_none());
17664    /// assert!(x.map_type().is_none());
17665    /// assert!(x.proto_type().is_none());
17666    /// ```
17667    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
17668        mut self,
17669        v: T,
17670    ) -> Self {
17671        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
17672        self
17673    }
17674}
17675
17676impl wkt::message::Message for Type {
17677    fn typename() -> &'static str {
17678        "type.googleapis.com/google.bigtable.admin.v2.Type"
17679    }
17680}
17681
17682/// Defines additional types related to [Type].
17683pub mod r#type {
17684    #[allow(unused_imports)]
17685    use super::*;
17686
17687    /// Bytes
17688    /// Values of type `Bytes` are stored in `Value.bytes_value`.
17689    #[derive(Clone, Default, PartialEq)]
17690    #[non_exhaustive]
17691    pub struct Bytes {
17692        /// The encoding to use when converting to or from lower level types.
17693        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
17694
17695        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17696    }
17697
17698    impl Bytes {
17699        /// Creates a new default instance.
17700        pub fn new() -> Self {
17701            std::default::Default::default()
17702        }
17703
17704        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
17705        ///
17706        /// # Example
17707        /// ```ignore,no_run
17708        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17709        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
17710        /// let x = Bytes::new().set_encoding(Encoding::default()/* use setters */);
17711        /// ```
17712        pub fn set_encoding<T>(mut self, v: T) -> Self
17713        where
17714            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
17715        {
17716            self.encoding = std::option::Option::Some(v.into());
17717            self
17718        }
17719
17720        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
17721        ///
17722        /// # Example
17723        /// ```ignore,no_run
17724        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17725        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
17726        /// let x = Bytes::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17727        /// let x = Bytes::new().set_or_clear_encoding(None::<Encoding>);
17728        /// ```
17729        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17730        where
17731            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
17732        {
17733            self.encoding = v.map(|x| x.into());
17734            self
17735        }
17736    }
17737
17738    impl wkt::message::Message for Bytes {
17739        fn typename() -> &'static str {
17740            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
17741        }
17742    }
17743
17744    /// Defines additional types related to [Bytes].
17745    pub mod bytes {
17746        #[allow(unused_imports)]
17747        use super::*;
17748
17749        /// Rules used to convert to or from lower level types.
17750        #[derive(Clone, Default, PartialEq)]
17751        #[non_exhaustive]
17752        pub struct Encoding {
17753            /// Which encoding to use.
17754            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
17755
17756            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17757        }
17758
17759        impl Encoding {
17760            /// Creates a new default instance.
17761            pub fn new() -> Self {
17762                std::default::Default::default()
17763            }
17764
17765            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
17766            ///
17767            /// Note that all the setters affecting `encoding` are mutually
17768            /// exclusive.
17769            ///
17770            /// # Example
17771            /// ```ignore,no_run
17772            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
17773            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
17774            /// let x = Encoding::new().set_encoding(Some(
17775            ///     google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Encoding::Raw(Raw::default().into())));
17776            /// ```
17777            pub fn set_encoding<
17778                T: std::convert::Into<
17779                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
17780                    >,
17781            >(
17782                mut self,
17783                v: T,
17784            ) -> Self {
17785                self.encoding = v.into();
17786                self
17787            }
17788
17789            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
17790            /// if it holds a `Raw`, `None` if the field is not set or
17791            /// holds a different branch.
17792            pub fn raw(
17793                &self,
17794            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
17795            {
17796                #[allow(unreachable_patterns)]
17797                self.encoding.as_ref().and_then(|v| match v {
17798                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
17799                        std::option::Option::Some(v)
17800                    }
17801                    _ => std::option::Option::None,
17802                })
17803            }
17804
17805            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
17806            /// to hold a `Raw`.
17807            ///
17808            /// Note that all the setters affecting `encoding` are
17809            /// mutually exclusive.
17810            ///
17811            /// # Example
17812            /// ```ignore,no_run
17813            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
17814            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
17815            /// let x = Encoding::new().set_raw(Raw::default()/* use setters */);
17816            /// assert!(x.raw().is_some());
17817            /// ```
17818            pub fn set_raw<
17819                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
17820            >(
17821                mut self,
17822                v: T,
17823            ) -> Self {
17824                self.encoding = std::option::Option::Some(
17825                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
17826                );
17827                self
17828            }
17829        }
17830
17831        impl wkt::message::Message for Encoding {
17832            fn typename() -> &'static str {
17833                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
17834            }
17835        }
17836
17837        /// Defines additional types related to [Encoding].
17838        pub mod encoding {
17839            #[allow(unused_imports)]
17840            use super::*;
17841
17842            /// Leaves the value as-is.
17843            ///
17844            /// Sorted mode: all values are supported.
17845            ///
17846            /// Distinct mode: all values are supported.
17847            #[derive(Clone, Default, PartialEq)]
17848            #[non_exhaustive]
17849            pub struct Raw {
17850                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17851            }
17852
17853            impl Raw {
17854                /// Creates a new default instance.
17855                pub fn new() -> Self {
17856                    std::default::Default::default()
17857                }
17858            }
17859
17860            impl wkt::message::Message for Raw {
17861                fn typename() -> &'static str {
17862                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
17863                }
17864            }
17865
17866            /// Which encoding to use.
17867            #[derive(Clone, Debug, PartialEq)]
17868            #[non_exhaustive]
17869            pub enum Encoding {
17870                /// Use `Raw` encoding.
17871                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
17872            }
17873        }
17874    }
17875
17876    /// String
17877    /// Values of type `String` are stored in `Value.string_value`.
17878    #[derive(Clone, Default, PartialEq)]
17879    #[non_exhaustive]
17880    pub struct String {
17881        /// The encoding to use when converting to or from lower level types.
17882        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
17883
17884        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17885    }
17886
17887    impl String {
17888        /// Creates a new default instance.
17889        pub fn new() -> Self {
17890            std::default::Default::default()
17891        }
17892
17893        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
17894        ///
17895        /// # Example
17896        /// ```ignore,no_run
17897        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
17898        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
17899        /// let x = String::new().set_encoding(Encoding::default()/* use setters */);
17900        /// ```
17901        pub fn set_encoding<T>(mut self, v: T) -> Self
17902        where
17903            T: std::convert::Into<crate::model::r#type::string::Encoding>,
17904        {
17905            self.encoding = std::option::Option::Some(v.into());
17906            self
17907        }
17908
17909        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
17910        ///
17911        /// # Example
17912        /// ```ignore,no_run
17913        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
17914        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
17915        /// let x = String::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17916        /// let x = String::new().set_or_clear_encoding(None::<Encoding>);
17917        /// ```
17918        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17919        where
17920            T: std::convert::Into<crate::model::r#type::string::Encoding>,
17921        {
17922            self.encoding = v.map(|x| x.into());
17923            self
17924        }
17925    }
17926
17927    impl wkt::message::Message for String {
17928        fn typename() -> &'static str {
17929            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
17930        }
17931    }
17932
17933    /// Defines additional types related to [String].
17934    pub mod string {
17935        #[allow(unused_imports)]
17936        use super::*;
17937
17938        /// Rules used to convert to or from lower level types.
17939        #[derive(Clone, Default, PartialEq)]
17940        #[non_exhaustive]
17941        pub struct Encoding {
17942            /// Which encoding to use.
17943            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
17944
17945            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17946        }
17947
17948        impl Encoding {
17949            /// Creates a new default instance.
17950            pub fn new() -> Self {
17951                std::default::Default::default()
17952            }
17953
17954            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
17955            ///
17956            /// Note that all the setters affecting `encoding` are mutually
17957            /// exclusive.
17958            ///
17959            /// # Example
17960            /// ```ignore,no_run
17961            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
17962            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
17963            /// let x = Encoding::new().set_encoding(Some(
17964            ///     google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Encoding::Utf8Bytes(Utf8Bytes::default().into())));
17965            /// ```
17966            pub fn set_encoding<
17967                T: std::convert::Into<
17968                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
17969                    >,
17970            >(
17971                mut self,
17972                v: T,
17973            ) -> Self {
17974                self.encoding = v.into();
17975                self
17976            }
17977
17978            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
17979            /// if it holds a `Utf8Raw`, `None` if the field is not set or
17980            /// holds a different branch.
17981            #[deprecated]
17982            pub fn utf8_raw(
17983                &self,
17984            ) -> std::option::Option<
17985                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
17986            > {
17987                #[allow(unreachable_patterns)]
17988                self.encoding.as_ref().and_then(|v| match v {
17989                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
17990                        std::option::Option::Some(v)
17991                    }
17992                    _ => std::option::Option::None,
17993                })
17994            }
17995
17996            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
17997            /// to hold a `Utf8Raw`.
17998            ///
17999            /// Note that all the setters affecting `encoding` are
18000            /// mutually exclusive.
18001            ///
18002            /// # Example
18003            /// ```ignore,no_run
18004            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
18005            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Raw;
18006            /// let x = Encoding::new().set_utf8_raw(Utf8Raw::default()/* use setters */);
18007            /// assert!(x.utf8_raw().is_some());
18008            /// assert!(x.utf8_bytes().is_none());
18009            /// ```
18010            #[deprecated]
18011            pub fn set_utf8_raw<
18012                T: std::convert::Into<
18013                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
18014                    >,
18015            >(
18016                mut self,
18017                v: T,
18018            ) -> Self {
18019                self.encoding = std::option::Option::Some(
18020                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
18021                );
18022                self
18023            }
18024
18025            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
18026            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
18027            /// holds a different branch.
18028            pub fn utf8_bytes(
18029                &self,
18030            ) -> std::option::Option<
18031                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
18032            > {
18033                #[allow(unreachable_patterns)]
18034                self.encoding.as_ref().and_then(|v| match v {
18035                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
18036                        std::option::Option::Some(v)
18037                    }
18038                    _ => std::option::Option::None,
18039                })
18040            }
18041
18042            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
18043            /// to hold a `Utf8Bytes`.
18044            ///
18045            /// Note that all the setters affecting `encoding` are
18046            /// mutually exclusive.
18047            ///
18048            /// # Example
18049            /// ```ignore,no_run
18050            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
18051            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
18052            /// let x = Encoding::new().set_utf8_bytes(Utf8Bytes::default()/* use setters */);
18053            /// assert!(x.utf8_bytes().is_some());
18054            /// assert!(x.utf8_raw().is_none());
18055            /// ```
18056            pub fn set_utf8_bytes<
18057                T: std::convert::Into<
18058                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
18059                    >,
18060            >(
18061                mut self,
18062                v: T,
18063            ) -> Self {
18064                self.encoding = std::option::Option::Some(
18065                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
18066                );
18067                self
18068            }
18069        }
18070
18071        impl wkt::message::Message for Encoding {
18072            fn typename() -> &'static str {
18073                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
18074            }
18075        }
18076
18077        /// Defines additional types related to [Encoding].
18078        pub mod encoding {
18079            #[allow(unused_imports)]
18080            use super::*;
18081
18082            /// Deprecated: prefer the equivalent `Utf8Bytes`.
18083            #[derive(Clone, Default, PartialEq)]
18084            #[non_exhaustive]
18085            #[deprecated]
18086            pub struct Utf8Raw {
18087                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18088            }
18089
18090            impl Utf8Raw {
18091                /// Creates a new default instance.
18092                pub fn new() -> Self {
18093                    std::default::Default::default()
18094                }
18095            }
18096
18097            impl wkt::message::Message for Utf8Raw {
18098                fn typename() -> &'static str {
18099                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
18100                }
18101            }
18102
18103            /// UTF-8 encoding.
18104            ///
18105            /// Sorted mode:
18106            ///
18107            /// - All values are supported.
18108            /// - Code point order is preserved.
18109            ///
18110            /// Distinct mode: all values are supported.
18111            ///
18112            /// Compatible with:
18113            ///
18114            /// - BigQuery `TEXT` encoding
18115            /// - HBase `Bytes.toBytes`
18116            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
18117            #[derive(Clone, Default, PartialEq)]
18118            #[non_exhaustive]
18119            pub struct Utf8Bytes {
18120                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18121            }
18122
18123            impl Utf8Bytes {
18124                /// Creates a new default instance.
18125                pub fn new() -> Self {
18126                    std::default::Default::default()
18127                }
18128            }
18129
18130            impl wkt::message::Message for Utf8Bytes {
18131                fn typename() -> &'static str {
18132                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
18133                }
18134            }
18135
18136            /// Which encoding to use.
18137            #[derive(Clone, Debug, PartialEq)]
18138            #[non_exhaustive]
18139            pub enum Encoding {
18140                /// Deprecated: if set, converts to an empty `utf8_bytes`.
18141                #[deprecated]
18142                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
18143                /// Use `Utf8Bytes` encoding.
18144                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
18145            }
18146        }
18147    }
18148
18149    /// Int64
18150    /// Values of type `Int64` are stored in `Value.int_value`.
18151    #[derive(Clone, Default, PartialEq)]
18152    #[non_exhaustive]
18153    pub struct Int64 {
18154        /// The encoding to use when converting to or from lower level types.
18155        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
18156
18157        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18158    }
18159
18160    impl Int64 {
18161        /// Creates a new default instance.
18162        pub fn new() -> Self {
18163            std::default::Default::default()
18164        }
18165
18166        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
18167        ///
18168        /// # Example
18169        /// ```ignore,no_run
18170        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
18171        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
18172        /// let x = Int64::new().set_encoding(Encoding::default()/* use setters */);
18173        /// ```
18174        pub fn set_encoding<T>(mut self, v: T) -> Self
18175        where
18176            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
18177        {
18178            self.encoding = std::option::Option::Some(v.into());
18179            self
18180        }
18181
18182        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
18183        ///
18184        /// # Example
18185        /// ```ignore,no_run
18186        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
18187        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
18188        /// let x = Int64::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
18189        /// let x = Int64::new().set_or_clear_encoding(None::<Encoding>);
18190        /// ```
18191        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
18192        where
18193            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
18194        {
18195            self.encoding = v.map(|x| x.into());
18196            self
18197        }
18198    }
18199
18200    impl wkt::message::Message for Int64 {
18201        fn typename() -> &'static str {
18202            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
18203        }
18204    }
18205
18206    /// Defines additional types related to [Int64].
18207    pub mod int_64 {
18208        #[allow(unused_imports)]
18209        use super::*;
18210
18211        /// Rules used to convert to or from lower level types.
18212        #[derive(Clone, Default, PartialEq)]
18213        #[non_exhaustive]
18214        pub struct Encoding {
18215            /// Which encoding to use.
18216            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
18217
18218            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18219        }
18220
18221        impl Encoding {
18222            /// Creates a new default instance.
18223            pub fn new() -> Self {
18224                std::default::Default::default()
18225            }
18226
18227            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
18228            ///
18229            /// Note that all the setters affecting `encoding` are mutually
18230            /// exclusive.
18231            ///
18232            /// # Example
18233            /// ```ignore,no_run
18234            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
18235            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
18236            /// let x = Encoding::new().set_encoding(Some(
18237            ///     google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::Encoding::BigEndianBytes(BigEndianBytes::default().into())));
18238            /// ```
18239            pub fn set_encoding<
18240                T: std::convert::Into<
18241                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
18242                    >,
18243            >(
18244                mut self,
18245                v: T,
18246            ) -> Self {
18247                self.encoding = v.into();
18248                self
18249            }
18250
18251            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
18252            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
18253            /// holds a different branch.
18254            pub fn big_endian_bytes(
18255                &self,
18256            ) -> std::option::Option<
18257                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
18258            > {
18259                #[allow(unreachable_patterns)]
18260                self.encoding.as_ref().and_then(|v| match v {
18261                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
18262                        std::option::Option::Some(v)
18263                    }
18264                    _ => std::option::Option::None,
18265                })
18266            }
18267
18268            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
18269            /// to hold a `BigEndianBytes`.
18270            ///
18271            /// Note that all the setters affecting `encoding` are
18272            /// mutually exclusive.
18273            ///
18274            /// # Example
18275            /// ```ignore,no_run
18276            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
18277            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
18278            /// let x = Encoding::new().set_big_endian_bytes(BigEndianBytes::default()/* use setters */);
18279            /// assert!(x.big_endian_bytes().is_some());
18280            /// assert!(x.ordered_code_bytes().is_none());
18281            /// ```
18282            pub fn set_big_endian_bytes<
18283                T: std::convert::Into<
18284                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
18285                    >,
18286            >(
18287                mut self,
18288                v: T,
18289            ) -> Self {
18290                self.encoding = std::option::Option::Some(
18291                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
18292                );
18293                self
18294            }
18295
18296            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
18297            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
18298            /// holds a different branch.
18299            pub fn ordered_code_bytes(
18300                &self,
18301            ) -> std::option::Option<
18302                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
18303            > {
18304                #[allow(unreachable_patterns)]
18305                self.encoding.as_ref().and_then(|v| match v {
18306                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
18307                        std::option::Option::Some(v)
18308                    }
18309                    _ => std::option::Option::None,
18310                })
18311            }
18312
18313            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
18314            /// to hold a `OrderedCodeBytes`.
18315            ///
18316            /// Note that all the setters affecting `encoding` are
18317            /// mutually exclusive.
18318            ///
18319            /// # Example
18320            /// ```ignore,no_run
18321            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
18322            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::OrderedCodeBytes;
18323            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
18324            /// assert!(x.ordered_code_bytes().is_some());
18325            /// assert!(x.big_endian_bytes().is_none());
18326            /// ```
18327            pub fn set_ordered_code_bytes<
18328                T: std::convert::Into<
18329                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
18330                    >,
18331            >(
18332                mut self,
18333                v: T,
18334            ) -> Self {
18335                self.encoding = std::option::Option::Some(
18336                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
18337                );
18338                self
18339            }
18340        }
18341
18342        impl wkt::message::Message for Encoding {
18343            fn typename() -> &'static str {
18344                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
18345            }
18346        }
18347
18348        /// Defines additional types related to [Encoding].
18349        pub mod encoding {
18350            #[allow(unused_imports)]
18351            use super::*;
18352
18353            /// Encodes the value as an 8-byte big-endian two's complement value.
18354            ///
18355            /// Sorted mode: non-negative values are supported.
18356            ///
18357            /// Distinct mode: all values are supported.
18358            ///
18359            /// Compatible with:
18360            ///
18361            /// - BigQuery `BINARY` encoding
18362            /// - HBase `Bytes.toBytes`
18363            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
18364            #[derive(Clone, Default, PartialEq)]
18365            #[non_exhaustive]
18366            pub struct BigEndianBytes {
18367                /// Deprecated: ignored if set.
18368                #[deprecated]
18369                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
18370
18371                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18372            }
18373
18374            impl BigEndianBytes {
18375                /// Creates a new default instance.
18376                pub fn new() -> Self {
18377                    std::default::Default::default()
18378                }
18379
18380                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
18381                ///
18382                /// # Example
18383                /// ```ignore,no_run
18384                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
18385                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
18386                /// let x = BigEndianBytes::new().set_bytes_type(Bytes::default()/* use setters */);
18387                /// ```
18388                #[deprecated]
18389                pub fn set_bytes_type<T>(mut self, v: T) -> Self
18390                where
18391                    T: std::convert::Into<crate::model::r#type::Bytes>,
18392                {
18393                    self.bytes_type = std::option::Option::Some(v.into());
18394                    self
18395                }
18396
18397                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
18398                ///
18399                /// # Example
18400                /// ```ignore,no_run
18401                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
18402                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
18403                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(Some(Bytes::default()/* use setters */));
18404                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(None::<Bytes>);
18405                /// ```
18406                #[deprecated]
18407                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
18408                where
18409                    T: std::convert::Into<crate::model::r#type::Bytes>,
18410                {
18411                    self.bytes_type = v.map(|x| x.into());
18412                    self
18413                }
18414            }
18415
18416            impl wkt::message::Message for BigEndianBytes {
18417                fn typename() -> &'static str {
18418                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
18419                }
18420            }
18421
18422            /// Encodes the value in a variable length binary format of up to 10 bytes.
18423            /// Values that are closer to zero use fewer bytes.
18424            ///
18425            /// Sorted mode: all values are supported.
18426            ///
18427            /// Distinct mode: all values are supported.
18428            #[derive(Clone, Default, PartialEq)]
18429            #[non_exhaustive]
18430            pub struct OrderedCodeBytes {
18431                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18432            }
18433
18434            impl OrderedCodeBytes {
18435                /// Creates a new default instance.
18436                pub fn new() -> Self {
18437                    std::default::Default::default()
18438                }
18439            }
18440
18441            impl wkt::message::Message for OrderedCodeBytes {
18442                fn typename() -> &'static str {
18443                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
18444                }
18445            }
18446
18447            /// Which encoding to use.
18448            #[derive(Clone, Debug, PartialEq)]
18449            #[non_exhaustive]
18450            pub enum Encoding {
18451                /// Use `BigEndianBytes` encoding.
18452                BigEndianBytes(
18453                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
18454                ),
18455                /// Use `OrderedCodeBytes` encoding.
18456                OrderedCodeBytes(
18457                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
18458                ),
18459            }
18460        }
18461    }
18462
18463    /// bool
18464    /// Values of type `Bool` are stored in `Value.bool_value`.
18465    #[derive(Clone, Default, PartialEq)]
18466    #[non_exhaustive]
18467    pub struct Bool {
18468        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18469    }
18470
18471    impl Bool {
18472        /// Creates a new default instance.
18473        pub fn new() -> Self {
18474            std::default::Default::default()
18475        }
18476    }
18477
18478    impl wkt::message::Message for Bool {
18479        fn typename() -> &'static str {
18480            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
18481        }
18482    }
18483
18484    /// Float32
18485    /// Values of type `Float32` are stored in `Value.float_value`.
18486    #[derive(Clone, Default, PartialEq)]
18487    #[non_exhaustive]
18488    pub struct Float32 {
18489        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18490    }
18491
18492    impl Float32 {
18493        /// Creates a new default instance.
18494        pub fn new() -> Self {
18495            std::default::Default::default()
18496        }
18497    }
18498
18499    impl wkt::message::Message for Float32 {
18500        fn typename() -> &'static str {
18501            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
18502        }
18503    }
18504
18505    /// Float64
18506    /// Values of type `Float64` are stored in `Value.float_value`.
18507    #[derive(Clone, Default, PartialEq)]
18508    #[non_exhaustive]
18509    pub struct Float64 {
18510        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18511    }
18512
18513    impl Float64 {
18514        /// Creates a new default instance.
18515        pub fn new() -> Self {
18516            std::default::Default::default()
18517        }
18518    }
18519
18520    impl wkt::message::Message for Float64 {
18521        fn typename() -> &'static str {
18522            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
18523        }
18524    }
18525
18526    /// Timestamp
18527    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
18528    #[derive(Clone, Default, PartialEq)]
18529    #[non_exhaustive]
18530    pub struct Timestamp {
18531        /// The encoding to use when converting to or from lower level types.
18532        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
18533
18534        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18535    }
18536
18537    impl Timestamp {
18538        /// Creates a new default instance.
18539        pub fn new() -> Self {
18540            std::default::Default::default()
18541        }
18542
18543        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
18544        ///
18545        /// # Example
18546        /// ```ignore,no_run
18547        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
18548        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
18549        /// let x = Timestamp::new().set_encoding(Encoding::default()/* use setters */);
18550        /// ```
18551        pub fn set_encoding<T>(mut self, v: T) -> Self
18552        where
18553            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
18554        {
18555            self.encoding = std::option::Option::Some(v.into());
18556            self
18557        }
18558
18559        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
18560        ///
18561        /// # Example
18562        /// ```ignore,no_run
18563        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
18564        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
18565        /// let x = Timestamp::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
18566        /// let x = Timestamp::new().set_or_clear_encoding(None::<Encoding>);
18567        /// ```
18568        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
18569        where
18570            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
18571        {
18572            self.encoding = v.map(|x| x.into());
18573            self
18574        }
18575    }
18576
18577    impl wkt::message::Message for Timestamp {
18578        fn typename() -> &'static str {
18579            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
18580        }
18581    }
18582
18583    /// Defines additional types related to [Timestamp].
18584    pub mod timestamp {
18585        #[allow(unused_imports)]
18586        use super::*;
18587
18588        /// Rules used to convert to or from lower level types.
18589        #[derive(Clone, Default, PartialEq)]
18590        #[non_exhaustive]
18591        pub struct Encoding {
18592            /// Which encoding to use.
18593            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
18594
18595            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18596        }
18597
18598        impl Encoding {
18599            /// Creates a new default instance.
18600            pub fn new() -> Self {
18601                std::default::Default::default()
18602            }
18603
18604            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
18605            ///
18606            /// Note that all the setters affecting `encoding` are mutually
18607            /// exclusive.
18608            ///
18609            /// # Example
18610            /// ```ignore,no_run
18611            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
18612            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
18613            /// let x = Encoding::new().set_encoding(Some(
18614            ///     google_cloud_bigtable_admin_v2::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(UnixMicrosInt64::default().into())));
18615            /// ```
18616            pub fn set_encoding<
18617                T: std::convert::Into<
18618                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
18619                    >,
18620            >(
18621                mut self,
18622                v: T,
18623            ) -> Self {
18624                self.encoding = v.into();
18625                self
18626            }
18627
18628            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
18629            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
18630            /// holds a different branch.
18631            pub fn unix_micros_int64(
18632                &self,
18633            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
18634            {
18635                #[allow(unreachable_patterns)]
18636                self.encoding.as_ref().and_then(|v| match v {
18637                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
18638                        std::option::Option::Some(v)
18639                    }
18640                    _ => std::option::Option::None,
18641                })
18642            }
18643
18644            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
18645            /// to hold a `UnixMicrosInt64`.
18646            ///
18647            /// Note that all the setters affecting `encoding` are
18648            /// mutually exclusive.
18649            ///
18650            /// # Example
18651            /// ```ignore,no_run
18652            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
18653            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
18654            /// let x = Encoding::new().set_unix_micros_int64(UnixMicrosInt64::default()/* use setters */);
18655            /// assert!(x.unix_micros_int64().is_some());
18656            /// ```
18657            pub fn set_unix_micros_int64<
18658                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
18659            >(
18660                mut self,
18661                v: T,
18662            ) -> Self {
18663                self.encoding = std::option::Option::Some(
18664                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
18665                );
18666                self
18667            }
18668        }
18669
18670        impl wkt::message::Message for Encoding {
18671            fn typename() -> &'static str {
18672                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
18673            }
18674        }
18675
18676        /// Defines additional types related to [Encoding].
18677        pub mod encoding {
18678            #[allow(unused_imports)]
18679            use super::*;
18680
18681            /// Which encoding to use.
18682            #[derive(Clone, Debug, PartialEq)]
18683            #[non_exhaustive]
18684            pub enum Encoding {
18685                /// Encodes the number of microseconds since the Unix epoch using the
18686                /// given `Int64` encoding. Values must be microsecond-aligned.
18687                ///
18688                /// Compatible with:
18689                ///
18690                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
18691                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
18692            }
18693        }
18694    }
18695
18696    /// Date
18697    /// Values of type `Date` are stored in `Value.date_value`.
18698    #[derive(Clone, Default, PartialEq)]
18699    #[non_exhaustive]
18700    pub struct Date {
18701        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18702    }
18703
18704    impl Date {
18705        /// Creates a new default instance.
18706        pub fn new() -> Self {
18707            std::default::Default::default()
18708        }
18709    }
18710
18711    impl wkt::message::Message for Date {
18712        fn typename() -> &'static str {
18713            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
18714        }
18715    }
18716
18717    /// A structured data value, consisting of fields which map to dynamically
18718    /// typed values.
18719    /// Values of type `Struct` are stored in `Value.array_value` where entries are
18720    /// in the same order and number as `field_types`.
18721    #[derive(Clone, Default, PartialEq)]
18722    #[non_exhaustive]
18723    pub struct Struct {
18724        /// The names and types of the fields in this struct.
18725        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
18726
18727        /// The encoding to use when converting to or from lower level types.
18728        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
18729
18730        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18731    }
18732
18733    impl Struct {
18734        /// Creates a new default instance.
18735        pub fn new() -> Self {
18736            std::default::Default::default()
18737        }
18738
18739        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
18740        ///
18741        /// # Example
18742        /// ```ignore,no_run
18743        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
18744        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
18745        /// let x = Struct::new()
18746        ///     .set_fields([
18747        ///         Field::default()/* use setters */,
18748        ///         Field::default()/* use (different) setters */,
18749        ///     ]);
18750        /// ```
18751        pub fn set_fields<T, V>(mut self, v: T) -> Self
18752        where
18753            T: std::iter::IntoIterator<Item = V>,
18754            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
18755        {
18756            use std::iter::Iterator;
18757            self.fields = v.into_iter().map(|i| i.into()).collect();
18758            self
18759        }
18760
18761        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
18762        ///
18763        /// # Example
18764        /// ```ignore,no_run
18765        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
18766        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18767        /// let x = Struct::new().set_encoding(Encoding::default()/* use setters */);
18768        /// ```
18769        pub fn set_encoding<T>(mut self, v: T) -> Self
18770        where
18771            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
18772        {
18773            self.encoding = std::option::Option::Some(v.into());
18774            self
18775        }
18776
18777        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
18778        ///
18779        /// # Example
18780        /// ```ignore,no_run
18781        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
18782        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18783        /// let x = Struct::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
18784        /// let x = Struct::new().set_or_clear_encoding(None::<Encoding>);
18785        /// ```
18786        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
18787        where
18788            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
18789        {
18790            self.encoding = v.map(|x| x.into());
18791            self
18792        }
18793    }
18794
18795    impl wkt::message::Message for Struct {
18796        fn typename() -> &'static str {
18797            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
18798        }
18799    }
18800
18801    /// Defines additional types related to [Struct].
18802    pub mod r#struct {
18803        #[allow(unused_imports)]
18804        use super::*;
18805
18806        /// A struct field and its type.
18807        #[derive(Clone, Default, PartialEq)]
18808        #[non_exhaustive]
18809        pub struct Field {
18810            /// The field name (optional). Fields without a `field_name` are considered
18811            /// anonymous and cannot be referenced by name.
18812            pub field_name: std::string::String,
18813
18814            /// The type of values in this field.
18815            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18816
18817            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18818        }
18819
18820        impl Field {
18821            /// Creates a new default instance.
18822            pub fn new() -> Self {
18823                std::default::Default::default()
18824            }
18825
18826            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
18827            ///
18828            /// # Example
18829            /// ```ignore,no_run
18830            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
18831            /// let x = Field::new().set_field_name("example");
18832            /// ```
18833            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
18834                mut self,
18835                v: T,
18836            ) -> Self {
18837                self.field_name = v.into();
18838                self
18839            }
18840
18841            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
18842            ///
18843            /// # Example
18844            /// ```ignore,no_run
18845            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
18846            /// use google_cloud_bigtable_admin_v2::model::Type;
18847            /// let x = Field::new().set_type(Type::default()/* use setters */);
18848            /// ```
18849            pub fn set_type<T>(mut self, v: T) -> Self
18850            where
18851                T: std::convert::Into<crate::model::Type>,
18852            {
18853                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18854                self
18855            }
18856
18857            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
18858            ///
18859            /// # Example
18860            /// ```ignore,no_run
18861            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
18862            /// use google_cloud_bigtable_admin_v2::model::Type;
18863            /// let x = Field::new().set_or_clear_type(Some(Type::default()/* use setters */));
18864            /// let x = Field::new().set_or_clear_type(None::<Type>);
18865            /// ```
18866            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
18867            where
18868                T: std::convert::Into<crate::model::Type>,
18869            {
18870                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
18871                self
18872            }
18873        }
18874
18875        impl wkt::message::Message for Field {
18876            fn typename() -> &'static str {
18877                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
18878            }
18879        }
18880
18881        /// Rules used to convert to or from lower level types.
18882        #[derive(Clone, Default, PartialEq)]
18883        #[non_exhaustive]
18884        pub struct Encoding {
18885            /// Which encoding to use.
18886            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
18887
18888            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18889        }
18890
18891        impl Encoding {
18892            /// Creates a new default instance.
18893            pub fn new() -> Self {
18894                std::default::Default::default()
18895            }
18896
18897            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
18898            ///
18899            /// Note that all the setters affecting `encoding` are mutually
18900            /// exclusive.
18901            ///
18902            /// # Example
18903            /// ```ignore,no_run
18904            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18905            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
18906            /// let x = Encoding::new().set_encoding(Some(
18907            ///     google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Encoding::Singleton(Singleton::default().into())));
18908            /// ```
18909            pub fn set_encoding<
18910                T: std::convert::Into<
18911                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
18912                    >,
18913            >(
18914                mut self,
18915                v: T,
18916            ) -> Self {
18917                self.encoding = v.into();
18918                self
18919            }
18920
18921            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18922            /// if it holds a `Singleton`, `None` if the field is not set or
18923            /// holds a different branch.
18924            pub fn singleton(
18925                &self,
18926            ) -> std::option::Option<
18927                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
18928            > {
18929                #[allow(unreachable_patterns)]
18930                self.encoding.as_ref().and_then(|v| match v {
18931                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
18932                        std::option::Option::Some(v)
18933                    }
18934                    _ => std::option::Option::None,
18935                })
18936            }
18937
18938            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18939            /// to hold a `Singleton`.
18940            ///
18941            /// Note that all the setters affecting `encoding` are
18942            /// mutually exclusive.
18943            ///
18944            /// # Example
18945            /// ```ignore,no_run
18946            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18947            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
18948            /// let x = Encoding::new().set_singleton(Singleton::default()/* use setters */);
18949            /// assert!(x.singleton().is_some());
18950            /// assert!(x.delimited_bytes().is_none());
18951            /// assert!(x.ordered_code_bytes().is_none());
18952            /// ```
18953            pub fn set_singleton<
18954                T: std::convert::Into<
18955                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
18956                    >,
18957            >(
18958                mut self,
18959                v: T,
18960            ) -> Self {
18961                self.encoding = std::option::Option::Some(
18962                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
18963                );
18964                self
18965            }
18966
18967            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18968            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
18969            /// holds a different branch.
18970            pub fn delimited_bytes(
18971                &self,
18972            ) -> std::option::Option<
18973                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
18974            > {
18975                #[allow(unreachable_patterns)]
18976                self.encoding.as_ref().and_then(|v| match v {
18977                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
18978                        std::option::Option::Some(v)
18979                    }
18980                    _ => std::option::Option::None,
18981                })
18982            }
18983
18984            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18985            /// to hold a `DelimitedBytes`.
18986            ///
18987            /// Note that all the setters affecting `encoding` are
18988            /// mutually exclusive.
18989            ///
18990            /// # Example
18991            /// ```ignore,no_run
18992            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18993            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
18994            /// let x = Encoding::new().set_delimited_bytes(DelimitedBytes::default()/* use setters */);
18995            /// assert!(x.delimited_bytes().is_some());
18996            /// assert!(x.singleton().is_none());
18997            /// assert!(x.ordered_code_bytes().is_none());
18998            /// ```
18999            pub fn set_delimited_bytes<
19000                T: std::convert::Into<
19001                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
19002                    >,
19003            >(
19004                mut self,
19005                v: T,
19006            ) -> Self {
19007                self.encoding = std::option::Option::Some(
19008                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
19009                );
19010                self
19011            }
19012
19013            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
19014            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
19015            /// holds a different branch.
19016            pub fn ordered_code_bytes(
19017                &self,
19018            ) -> std::option::Option<
19019                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
19020            > {
19021                #[allow(unreachable_patterns)]
19022                self.encoding.as_ref().and_then(|v| match v {
19023                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
19024                        std::option::Option::Some(v)
19025                    }
19026                    _ => std::option::Option::None,
19027                })
19028            }
19029
19030            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
19031            /// to hold a `OrderedCodeBytes`.
19032            ///
19033            /// Note that all the setters affecting `encoding` are
19034            /// mutually exclusive.
19035            ///
19036            /// # Example
19037            /// ```ignore,no_run
19038            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
19039            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::OrderedCodeBytes;
19040            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
19041            /// assert!(x.ordered_code_bytes().is_some());
19042            /// assert!(x.singleton().is_none());
19043            /// assert!(x.delimited_bytes().is_none());
19044            /// ```
19045            pub fn set_ordered_code_bytes<
19046                T: std::convert::Into<
19047                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
19048                    >,
19049            >(
19050                mut self,
19051                v: T,
19052            ) -> Self {
19053                self.encoding = std::option::Option::Some(
19054                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
19055                );
19056                self
19057            }
19058        }
19059
19060        impl wkt::message::Message for Encoding {
19061            fn typename() -> &'static str {
19062                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
19063            }
19064        }
19065
19066        /// Defines additional types related to [Encoding].
19067        pub mod encoding {
19068            #[allow(unused_imports)]
19069            use super::*;
19070
19071            /// Uses the encoding of `fields[0].type` as-is.
19072            /// Only valid if `fields.size == 1`.
19073            #[derive(Clone, Default, PartialEq)]
19074            #[non_exhaustive]
19075            pub struct Singleton {
19076                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19077            }
19078
19079            impl Singleton {
19080                /// Creates a new default instance.
19081                pub fn new() -> Self {
19082                    std::default::Default::default()
19083                }
19084            }
19085
19086            impl wkt::message::Message for Singleton {
19087                fn typename() -> &'static str {
19088                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
19089                }
19090            }
19091
19092            /// Fields are encoded independently and concatenated with a configurable
19093            /// `delimiter` in between.
19094            ///
19095            /// A struct with no fields defined is encoded as a single `delimiter`.
19096            ///
19097            /// Sorted mode:
19098            ///
19099            /// - Fields are encoded in sorted mode.
19100            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
19101            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
19102            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
19103            ///
19104            /// Distinct mode:
19105            ///
19106            /// - Fields are encoded in distinct mode.
19107            /// - Encoded field values must not contain `delimiter[0]`.
19108            #[derive(Clone, Default, PartialEq)]
19109            #[non_exhaustive]
19110            pub struct DelimitedBytes {
19111                /// Byte sequence used to delimit concatenated fields. The delimiter must
19112                /// contain at least 1 character and at most 50 characters.
19113                pub delimiter: ::bytes::Bytes,
19114
19115                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19116            }
19117
19118            impl DelimitedBytes {
19119                /// Creates a new default instance.
19120                pub fn new() -> Self {
19121                    std::default::Default::default()
19122                }
19123
19124                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
19125                ///
19126                /// # Example
19127                /// ```ignore,no_run
19128                /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
19129                /// let x = DelimitedBytes::new().set_delimiter(bytes::Bytes::from_static(b"example"));
19130                /// ```
19131                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
19132                    mut self,
19133                    v: T,
19134                ) -> Self {
19135                    self.delimiter = v.into();
19136                    self
19137                }
19138            }
19139
19140            impl wkt::message::Message for DelimitedBytes {
19141                fn typename() -> &'static str {
19142                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
19143                }
19144            }
19145
19146            /// Fields are encoded independently and concatenated with the fixed byte
19147            /// pair {0x00, 0x01} in between.
19148            ///
19149            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
19150            /// pair {0x00, 0xFF}.
19151            ///
19152            /// Fields that encode to the empty string "" have special handling:
19153            ///
19154            /// - If *every* field encodes to "", or if the STRUCT has no fields
19155            ///   defined, then the STRUCT is encoded as the fixed byte pair
19156            ///   {0x00, 0x00}.
19157            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
19158            ///   omitting any trailing empty fields. Any empty fields that aren't
19159            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
19160            ///
19161            /// Examples:
19162            ///
19163            /// - STRUCT()             -> "\00\00"
19164            /// - STRUCT("")           -> "\00\00"
19165            /// - STRUCT("", "")       -> "\00\00"
19166            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
19167            /// - STRUCT("A", "")      -> "A"
19168            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
19169            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
19170            ///
19171            /// Since null bytes are always escaped, this encoding can cause size
19172            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
19173            /// produce many such bytes.
19174            ///
19175            /// Sorted mode:
19176            ///
19177            /// - Fields are encoded in sorted mode.
19178            /// - All values supported by the field encodings are allowed
19179            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
19180            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
19181            ///
19182            /// Distinct mode:
19183            ///
19184            /// - Fields are encoded in distinct mode.
19185            /// - All values supported by the field encodings are allowed.
19186            #[derive(Clone, Default, PartialEq)]
19187            #[non_exhaustive]
19188            pub struct OrderedCodeBytes {
19189                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19190            }
19191
19192            impl OrderedCodeBytes {
19193                /// Creates a new default instance.
19194                pub fn new() -> Self {
19195                    std::default::Default::default()
19196                }
19197            }
19198
19199            impl wkt::message::Message for OrderedCodeBytes {
19200                fn typename() -> &'static str {
19201                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
19202                }
19203            }
19204
19205            /// Which encoding to use.
19206            #[derive(Clone, Debug, PartialEq)]
19207            #[non_exhaustive]
19208            pub enum Encoding {
19209                /// Use `Singleton` encoding.
19210                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
19211                /// Use `DelimitedBytes` encoding.
19212                DelimitedBytes(
19213                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
19214                ),
19215                /// User `OrderedCodeBytes` encoding.
19216                OrderedCodeBytes(
19217                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
19218                ),
19219            }
19220        }
19221    }
19222
19223    /// A protobuf message type.
19224    /// Values of type `Proto` are stored in `Value.bytes_value`.
19225    #[derive(Clone, Default, PartialEq)]
19226    #[non_exhaustive]
19227    pub struct Proto {
19228        /// The ID of the schema bundle that this proto is defined in.
19229        pub schema_bundle_id: std::string::String,
19230
19231        /// The fully qualified name of the protobuf message, including package. In
19232        /// the format of "foo.bar.Message".
19233        pub message_name: std::string::String,
19234
19235        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19236    }
19237
19238    impl Proto {
19239        /// Creates a new default instance.
19240        pub fn new() -> Self {
19241            std::default::Default::default()
19242        }
19243
19244        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
19245        ///
19246        /// # Example
19247        /// ```ignore,no_run
19248        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
19249        /// let x = Proto::new().set_schema_bundle_id("example");
19250        /// ```
19251        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
19252            mut self,
19253            v: T,
19254        ) -> Self {
19255            self.schema_bundle_id = v.into();
19256            self
19257        }
19258
19259        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
19260        ///
19261        /// # Example
19262        /// ```ignore,no_run
19263        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
19264        /// let x = Proto::new().set_message_name("example");
19265        /// ```
19266        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
19267            mut self,
19268            v: T,
19269        ) -> Self {
19270            self.message_name = v.into();
19271            self
19272        }
19273    }
19274
19275    impl wkt::message::Message for Proto {
19276        fn typename() -> &'static str {
19277            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
19278        }
19279    }
19280
19281    /// A protobuf enum type.
19282    /// Values of type `Enum` are stored in `Value.int_value`.
19283    #[derive(Clone, Default, PartialEq)]
19284    #[non_exhaustive]
19285    pub struct Enum {
19286        /// The ID of the schema bundle that this enum is defined in.
19287        pub schema_bundle_id: std::string::String,
19288
19289        /// The fully qualified name of the protobuf enum message, including package.
19290        /// In the format of "foo.bar.EnumMessage".
19291        pub enum_name: std::string::String,
19292
19293        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19294    }
19295
19296    impl Enum {
19297        /// Creates a new default instance.
19298        pub fn new() -> Self {
19299            std::default::Default::default()
19300        }
19301
19302        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
19303        ///
19304        /// # Example
19305        /// ```ignore,no_run
19306        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
19307        /// let x = Enum::new().set_schema_bundle_id("example");
19308        /// ```
19309        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
19310            mut self,
19311            v: T,
19312        ) -> Self {
19313            self.schema_bundle_id = v.into();
19314            self
19315        }
19316
19317        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
19318        ///
19319        /// # Example
19320        /// ```ignore,no_run
19321        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
19322        /// let x = Enum::new().set_enum_name("example");
19323        /// ```
19324        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19325            self.enum_name = v.into();
19326            self
19327        }
19328    }
19329
19330    impl wkt::message::Message for Enum {
19331        fn typename() -> &'static str {
19332            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
19333        }
19334    }
19335
19336    /// An ordered list of elements of a given type.
19337    /// Values of type `Array` are stored in `Value.array_value`.
19338    #[derive(Clone, Default, PartialEq)]
19339    #[non_exhaustive]
19340    pub struct Array {
19341        /// The type of the elements in the array. This must not be `Array`.
19342        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
19343
19344        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19345    }
19346
19347    impl Array {
19348        /// Creates a new default instance.
19349        pub fn new() -> Self {
19350            std::default::Default::default()
19351        }
19352
19353        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
19354        ///
19355        /// # Example
19356        /// ```ignore,no_run
19357        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
19358        /// use google_cloud_bigtable_admin_v2::model::Type;
19359        /// let x = Array::new().set_element_type(Type::default()/* use setters */);
19360        /// ```
19361        pub fn set_element_type<T>(mut self, v: T) -> Self
19362        where
19363            T: std::convert::Into<crate::model::Type>,
19364        {
19365            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
19366            self
19367        }
19368
19369        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
19370        ///
19371        /// # Example
19372        /// ```ignore,no_run
19373        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
19374        /// use google_cloud_bigtable_admin_v2::model::Type;
19375        /// let x = Array::new().set_or_clear_element_type(Some(Type::default()/* use setters */));
19376        /// let x = Array::new().set_or_clear_element_type(None::<Type>);
19377        /// ```
19378        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
19379        where
19380            T: std::convert::Into<crate::model::Type>,
19381        {
19382            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
19383            self
19384        }
19385    }
19386
19387    impl wkt::message::Message for Array {
19388        fn typename() -> &'static str {
19389            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
19390        }
19391    }
19392
19393    /// A mapping of keys to values of a given type.
19394    /// Values of type `Map` are stored in a `Value.array_value` where each entry
19395    /// is another `Value.array_value` with two elements (the key and the value,
19396    /// in that order).
19397    /// Normally encoded Map values won't have repeated keys, however, clients are
19398    /// expected to handle the case in which they do. If the same key appears
19399    /// multiple times, the _last_ value takes precedence.
19400    #[derive(Clone, Default, PartialEq)]
19401    #[non_exhaustive]
19402    pub struct Map {
19403        /// The type of a map key.
19404        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
19405        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
19406
19407        /// The type of the values in a map.
19408        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
19409
19410        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19411    }
19412
19413    impl Map {
19414        /// Creates a new default instance.
19415        pub fn new() -> Self {
19416            std::default::Default::default()
19417        }
19418
19419        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
19420        ///
19421        /// # Example
19422        /// ```ignore,no_run
19423        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
19424        /// use google_cloud_bigtable_admin_v2::model::Type;
19425        /// let x = Map::new().set_key_type(Type::default()/* use setters */);
19426        /// ```
19427        pub fn set_key_type<T>(mut self, v: T) -> Self
19428        where
19429            T: std::convert::Into<crate::model::Type>,
19430        {
19431            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
19432            self
19433        }
19434
19435        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
19436        ///
19437        /// # Example
19438        /// ```ignore,no_run
19439        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
19440        /// use google_cloud_bigtable_admin_v2::model::Type;
19441        /// let x = Map::new().set_or_clear_key_type(Some(Type::default()/* use setters */));
19442        /// let x = Map::new().set_or_clear_key_type(None::<Type>);
19443        /// ```
19444        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
19445        where
19446            T: std::convert::Into<crate::model::Type>,
19447        {
19448            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
19449            self
19450        }
19451
19452        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
19453        ///
19454        /// # Example
19455        /// ```ignore,no_run
19456        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
19457        /// use google_cloud_bigtable_admin_v2::model::Type;
19458        /// let x = Map::new().set_value_type(Type::default()/* use setters */);
19459        /// ```
19460        pub fn set_value_type<T>(mut self, v: T) -> Self
19461        where
19462            T: std::convert::Into<crate::model::Type>,
19463        {
19464            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
19465            self
19466        }
19467
19468        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
19469        ///
19470        /// # Example
19471        /// ```ignore,no_run
19472        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
19473        /// use google_cloud_bigtable_admin_v2::model::Type;
19474        /// let x = Map::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
19475        /// let x = Map::new().set_or_clear_value_type(None::<Type>);
19476        /// ```
19477        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
19478        where
19479            T: std::convert::Into<crate::model::Type>,
19480        {
19481            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
19482            self
19483        }
19484    }
19485
19486    impl wkt::message::Message for Map {
19487        fn typename() -> &'static str {
19488            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
19489        }
19490    }
19491
19492    /// A value that combines incremental updates into a summarized value.
19493    ///
19494    /// Data is never directly written or read using type `Aggregate`. Writes will
19495    /// provide either the `input_type` or `state_type`, and reads will always
19496    /// return the `state_type` .
19497    #[derive(Clone, Default, PartialEq)]
19498    #[non_exhaustive]
19499    pub struct Aggregate {
19500        /// Type of the inputs that are accumulated by this `Aggregate`, which must
19501        /// specify a full encoding.
19502        /// Use `AddInput` mutations to accumulate new inputs.
19503        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
19504
19505        /// Output only. Type that holds the internal accumulator state for the
19506        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
19507        /// chosen, and will always specify a full encoding.
19508        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
19509
19510        /// Which aggregator function to use. The configured types must match.
19511        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
19512
19513        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19514    }
19515
19516    impl Aggregate {
19517        /// Creates a new default instance.
19518        pub fn new() -> Self {
19519            std::default::Default::default()
19520        }
19521
19522        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
19523        ///
19524        /// # Example
19525        /// ```ignore,no_run
19526        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19527        /// use google_cloud_bigtable_admin_v2::model::Type;
19528        /// let x = Aggregate::new().set_input_type(Type::default()/* use setters */);
19529        /// ```
19530        pub fn set_input_type<T>(mut self, v: T) -> Self
19531        where
19532            T: std::convert::Into<crate::model::Type>,
19533        {
19534            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
19535            self
19536        }
19537
19538        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
19539        ///
19540        /// # Example
19541        /// ```ignore,no_run
19542        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19543        /// use google_cloud_bigtable_admin_v2::model::Type;
19544        /// let x = Aggregate::new().set_or_clear_input_type(Some(Type::default()/* use setters */));
19545        /// let x = Aggregate::new().set_or_clear_input_type(None::<Type>);
19546        /// ```
19547        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
19548        where
19549            T: std::convert::Into<crate::model::Type>,
19550        {
19551            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
19552            self
19553        }
19554
19555        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
19556        ///
19557        /// # Example
19558        /// ```ignore,no_run
19559        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19560        /// use google_cloud_bigtable_admin_v2::model::Type;
19561        /// let x = Aggregate::new().set_state_type(Type::default()/* use setters */);
19562        /// ```
19563        pub fn set_state_type<T>(mut self, v: T) -> Self
19564        where
19565            T: std::convert::Into<crate::model::Type>,
19566        {
19567            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
19568            self
19569        }
19570
19571        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
19572        ///
19573        /// # Example
19574        /// ```ignore,no_run
19575        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19576        /// use google_cloud_bigtable_admin_v2::model::Type;
19577        /// let x = Aggregate::new().set_or_clear_state_type(Some(Type::default()/* use setters */));
19578        /// let x = Aggregate::new().set_or_clear_state_type(None::<Type>);
19579        /// ```
19580        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
19581        where
19582            T: std::convert::Into<crate::model::Type>,
19583        {
19584            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
19585            self
19586        }
19587
19588        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
19589        ///
19590        /// Note that all the setters affecting `aggregator` are mutually
19591        /// exclusive.
19592        ///
19593        /// # Example
19594        /// ```ignore,no_run
19595        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19596        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
19597        /// let x = Aggregate::new().set_aggregator(Some(
19598        ///     google_cloud_bigtable_admin_v2::model::r#type::aggregate::Aggregator::Sum(Sum::default().into())));
19599        /// ```
19600        pub fn set_aggregator<
19601            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
19602        >(
19603            mut self,
19604            v: T,
19605        ) -> Self {
19606            self.aggregator = v.into();
19607            self
19608        }
19609
19610        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19611        /// if it holds a `Sum`, `None` if the field is not set or
19612        /// holds a different branch.
19613        pub fn sum(
19614            &self,
19615        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
19616            #[allow(unreachable_patterns)]
19617            self.aggregator.as_ref().and_then(|v| match v {
19618                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
19619                _ => std::option::Option::None,
19620            })
19621        }
19622
19623        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19624        /// to hold a `Sum`.
19625        ///
19626        /// Note that all the setters affecting `aggregator` are
19627        /// mutually exclusive.
19628        ///
19629        /// # Example
19630        /// ```ignore,no_run
19631        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19632        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
19633        /// let x = Aggregate::new().set_sum(Sum::default()/* use setters */);
19634        /// assert!(x.sum().is_some());
19635        /// assert!(x.hllpp_unique_count().is_none());
19636        /// assert!(x.max().is_none());
19637        /// assert!(x.min().is_none());
19638        /// ```
19639        pub fn set_sum<
19640            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
19641        >(
19642            mut self,
19643            v: T,
19644        ) -> Self {
19645            self.aggregator = std::option::Option::Some(
19646                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
19647            );
19648            self
19649        }
19650
19651        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19652        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
19653        /// holds a different branch.
19654        pub fn hllpp_unique_count(
19655            &self,
19656        ) -> std::option::Option<
19657            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
19658        > {
19659            #[allow(unreachable_patterns)]
19660            self.aggregator.as_ref().and_then(|v| match v {
19661                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
19662                    std::option::Option::Some(v)
19663                }
19664                _ => std::option::Option::None,
19665            })
19666        }
19667
19668        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19669        /// to hold a `HllppUniqueCount`.
19670        ///
19671        /// Note that all the setters affecting `aggregator` are
19672        /// mutually exclusive.
19673        ///
19674        /// # Example
19675        /// ```ignore,no_run
19676        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19677        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount;
19678        /// let x = Aggregate::new().set_hllpp_unique_count(HyperLogLogPlusPlusUniqueCount::default()/* use setters */);
19679        /// assert!(x.hllpp_unique_count().is_some());
19680        /// assert!(x.sum().is_none());
19681        /// assert!(x.max().is_none());
19682        /// assert!(x.min().is_none());
19683        /// ```
19684        pub fn set_hllpp_unique_count<
19685            T: std::convert::Into<
19686                    std::boxed::Box<
19687                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
19688                    >,
19689                >,
19690        >(
19691            mut self,
19692            v: T,
19693        ) -> Self {
19694            self.aggregator = std::option::Option::Some(
19695                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
19696            );
19697            self
19698        }
19699
19700        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19701        /// if it holds a `Max`, `None` if the field is not set or
19702        /// holds a different branch.
19703        pub fn max(
19704            &self,
19705        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
19706            #[allow(unreachable_patterns)]
19707            self.aggregator.as_ref().and_then(|v| match v {
19708                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
19709                _ => std::option::Option::None,
19710            })
19711        }
19712
19713        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19714        /// to hold a `Max`.
19715        ///
19716        /// Note that all the setters affecting `aggregator` are
19717        /// mutually exclusive.
19718        ///
19719        /// # Example
19720        /// ```ignore,no_run
19721        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19722        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Max;
19723        /// let x = Aggregate::new().set_max(Max::default()/* use setters */);
19724        /// assert!(x.max().is_some());
19725        /// assert!(x.sum().is_none());
19726        /// assert!(x.hllpp_unique_count().is_none());
19727        /// assert!(x.min().is_none());
19728        /// ```
19729        pub fn set_max<
19730            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
19731        >(
19732            mut self,
19733            v: T,
19734        ) -> Self {
19735            self.aggregator = std::option::Option::Some(
19736                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
19737            );
19738            self
19739        }
19740
19741        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19742        /// if it holds a `Min`, `None` if the field is not set or
19743        /// holds a different branch.
19744        pub fn min(
19745            &self,
19746        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
19747            #[allow(unreachable_patterns)]
19748            self.aggregator.as_ref().and_then(|v| match v {
19749                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
19750                _ => std::option::Option::None,
19751            })
19752        }
19753
19754        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
19755        /// to hold a `Min`.
19756        ///
19757        /// Note that all the setters affecting `aggregator` are
19758        /// mutually exclusive.
19759        ///
19760        /// # Example
19761        /// ```ignore,no_run
19762        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
19763        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Min;
19764        /// let x = Aggregate::new().set_min(Min::default()/* use setters */);
19765        /// assert!(x.min().is_some());
19766        /// assert!(x.sum().is_none());
19767        /// assert!(x.hllpp_unique_count().is_none());
19768        /// assert!(x.max().is_none());
19769        /// ```
19770        pub fn set_min<
19771            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
19772        >(
19773            mut self,
19774            v: T,
19775        ) -> Self {
19776            self.aggregator = std::option::Option::Some(
19777                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
19778            );
19779            self
19780        }
19781    }
19782
19783    impl wkt::message::Message for Aggregate {
19784        fn typename() -> &'static str {
19785            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
19786        }
19787    }
19788
19789    /// Defines additional types related to [Aggregate].
19790    pub mod aggregate {
19791        #[allow(unused_imports)]
19792        use super::*;
19793
19794        /// Computes the sum of the input values.
19795        /// Allowed input: `Int64`
19796        /// State: same as input
19797        #[derive(Clone, Default, PartialEq)]
19798        #[non_exhaustive]
19799        pub struct Sum {
19800            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19801        }
19802
19803        impl Sum {
19804            /// Creates a new default instance.
19805            pub fn new() -> Self {
19806                std::default::Default::default()
19807            }
19808        }
19809
19810        impl wkt::message::Message for Sum {
19811            fn typename() -> &'static str {
19812                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
19813            }
19814        }
19815
19816        /// Computes the max of the input values.
19817        /// Allowed input: `Int64`
19818        /// State: same as input
19819        #[derive(Clone, Default, PartialEq)]
19820        #[non_exhaustive]
19821        pub struct Max {
19822            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19823        }
19824
19825        impl Max {
19826            /// Creates a new default instance.
19827            pub fn new() -> Self {
19828                std::default::Default::default()
19829            }
19830        }
19831
19832        impl wkt::message::Message for Max {
19833            fn typename() -> &'static str {
19834                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
19835            }
19836        }
19837
19838        /// Computes the min of the input values.
19839        /// Allowed input: `Int64`
19840        /// State: same as input
19841        #[derive(Clone, Default, PartialEq)]
19842        #[non_exhaustive]
19843        pub struct Min {
19844            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19845        }
19846
19847        impl Min {
19848            /// Creates a new default instance.
19849            pub fn new() -> Self {
19850                std::default::Default::default()
19851            }
19852        }
19853
19854        impl wkt::message::Message for Min {
19855            fn typename() -> &'static str {
19856                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
19857            }
19858        }
19859
19860        /// Computes an approximate unique count over the input values. When using
19861        /// raw data as input, be careful to use a consistent encoding. Otherwise
19862        /// the same value encoded differently could count more than once, or two
19863        /// distinct values could count as identical.
19864        /// Input: Any, or omit for Raw
19865        /// State: TBD
19866        /// Special state conversions: `Int64` (the unique count estimate)
19867        #[derive(Clone, Default, PartialEq)]
19868        #[non_exhaustive]
19869        pub struct HyperLogLogPlusPlusUniqueCount {
19870            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19871        }
19872
19873        impl HyperLogLogPlusPlusUniqueCount {
19874            /// Creates a new default instance.
19875            pub fn new() -> Self {
19876                std::default::Default::default()
19877            }
19878        }
19879
19880        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
19881            fn typename() -> &'static str {
19882                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
19883            }
19884        }
19885
19886        /// Which aggregator function to use. The configured types must match.
19887        #[derive(Clone, Debug, PartialEq)]
19888        #[non_exhaustive]
19889        pub enum Aggregator {
19890            /// Sum aggregator.
19891            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
19892            /// HyperLogLogPlusPlusUniqueCount aggregator.
19893            HllppUniqueCount(
19894                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
19895            ),
19896            /// Max aggregator.
19897            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
19898            /// Min aggregator.
19899            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
19900        }
19901    }
19902
19903    /// The kind of type that this represents.
19904    #[derive(Clone, Debug, PartialEq)]
19905    #[non_exhaustive]
19906    pub enum Kind {
19907        /// Bytes
19908        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
19909        /// String
19910        StringType(std::boxed::Box<crate::model::r#type::String>),
19911        /// Int64
19912        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
19913        /// Float32
19914        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
19915        /// Float64
19916        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
19917        /// Bool
19918        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
19919        /// Timestamp
19920        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
19921        /// Date
19922        DateType(std::boxed::Box<crate::model::r#type::Date>),
19923        /// Aggregate
19924        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
19925        /// Struct
19926        StructType(std::boxed::Box<crate::model::r#type::Struct>),
19927        /// Array
19928        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
19929        /// Map
19930        MapType(std::boxed::Box<crate::model::r#type::Map>),
19931        /// Proto
19932        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
19933        /// Enum
19934        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
19935    }
19936}
19937
19938/// Storage media types for persisting Bigtable data.
19939///
19940/// # Working with unknown values
19941///
19942/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19943/// additional enum variants at any time. Adding new variants is not considered
19944/// a breaking change. Applications should write their code in anticipation of:
19945///
19946/// - New values appearing in future releases of the client library, **and**
19947/// - New values received dynamically, without application changes.
19948///
19949/// Please consult the [Working with enums] section in the user guide for some
19950/// guidelines.
19951///
19952/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
19953#[derive(Clone, Debug, PartialEq)]
19954#[non_exhaustive]
19955pub enum StorageType {
19956    /// The user did not specify a storage type.
19957    Unspecified,
19958    /// Flash (SSD) storage should be used.
19959    Ssd,
19960    /// Magnetic drive (HDD) storage should be used.
19961    Hdd,
19962    /// If set, the enum was initialized with an unknown value.
19963    ///
19964    /// Applications can examine the value using [StorageType::value] or
19965    /// [StorageType::name].
19966    UnknownValue(storage_type::UnknownValue),
19967}
19968
19969#[doc(hidden)]
19970pub mod storage_type {
19971    #[allow(unused_imports)]
19972    use super::*;
19973    #[derive(Clone, Debug, PartialEq)]
19974    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19975}
19976
19977impl StorageType {
19978    /// Gets the enum value.
19979    ///
19980    /// Returns `None` if the enum contains an unknown value deserialized from
19981    /// the string representation of enums.
19982    pub fn value(&self) -> std::option::Option<i32> {
19983        match self {
19984            Self::Unspecified => std::option::Option::Some(0),
19985            Self::Ssd => std::option::Option::Some(1),
19986            Self::Hdd => std::option::Option::Some(2),
19987            Self::UnknownValue(u) => u.0.value(),
19988        }
19989    }
19990
19991    /// Gets the enum value as a string.
19992    ///
19993    /// Returns `None` if the enum contains an unknown value deserialized from
19994    /// the integer representation of enums.
19995    pub fn name(&self) -> std::option::Option<&str> {
19996        match self {
19997            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
19998            Self::Ssd => std::option::Option::Some("SSD"),
19999            Self::Hdd => std::option::Option::Some("HDD"),
20000            Self::UnknownValue(u) => u.0.name(),
20001        }
20002    }
20003}
20004
20005impl std::default::Default for StorageType {
20006    fn default() -> Self {
20007        use std::convert::From;
20008        Self::from(0)
20009    }
20010}
20011
20012impl std::fmt::Display for StorageType {
20013    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20014        wkt::internal::display_enum(f, self.name(), self.value())
20015    }
20016}
20017
20018impl std::convert::From<i32> for StorageType {
20019    fn from(value: i32) -> Self {
20020        match value {
20021            0 => Self::Unspecified,
20022            1 => Self::Ssd,
20023            2 => Self::Hdd,
20024            _ => Self::UnknownValue(storage_type::UnknownValue(
20025                wkt::internal::UnknownEnumValue::Integer(value),
20026            )),
20027        }
20028    }
20029}
20030
20031impl std::convert::From<&str> for StorageType {
20032    fn from(value: &str) -> Self {
20033        use std::string::ToString;
20034        match value {
20035            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
20036            "SSD" => Self::Ssd,
20037            "HDD" => Self::Hdd,
20038            _ => Self::UnknownValue(storage_type::UnknownValue(
20039                wkt::internal::UnknownEnumValue::String(value.to_string()),
20040            )),
20041        }
20042    }
20043}
20044
20045impl serde::ser::Serialize for StorageType {
20046    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20047    where
20048        S: serde::Serializer,
20049    {
20050        match self {
20051            Self::Unspecified => serializer.serialize_i32(0),
20052            Self::Ssd => serializer.serialize_i32(1),
20053            Self::Hdd => serializer.serialize_i32(2),
20054            Self::UnknownValue(u) => u.0.serialize(serializer),
20055        }
20056    }
20057}
20058
20059impl<'de> serde::de::Deserialize<'de> for StorageType {
20060    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20061    where
20062        D: serde::Deserializer<'de>,
20063    {
20064        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
20065            ".google.bigtable.admin.v2.StorageType",
20066        ))
20067    }
20068}
20069
20070/// Indicates the type of the restore source.
20071///
20072/// # Working with unknown values
20073///
20074/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
20075/// additional enum variants at any time. Adding new variants is not considered
20076/// a breaking change. Applications should write their code in anticipation of:
20077///
20078/// - New values appearing in future releases of the client library, **and**
20079/// - New values received dynamically, without application changes.
20080///
20081/// Please consult the [Working with enums] section in the user guide for some
20082/// guidelines.
20083///
20084/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
20085#[derive(Clone, Debug, PartialEq)]
20086#[non_exhaustive]
20087pub enum RestoreSourceType {
20088    /// No restore associated.
20089    Unspecified,
20090    /// A backup was used as the source of the restore.
20091    Backup,
20092    /// If set, the enum was initialized with an unknown value.
20093    ///
20094    /// Applications can examine the value using [RestoreSourceType::value] or
20095    /// [RestoreSourceType::name].
20096    UnknownValue(restore_source_type::UnknownValue),
20097}
20098
20099#[doc(hidden)]
20100pub mod restore_source_type {
20101    #[allow(unused_imports)]
20102    use super::*;
20103    #[derive(Clone, Debug, PartialEq)]
20104    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20105}
20106
20107impl RestoreSourceType {
20108    /// Gets the enum value.
20109    ///
20110    /// Returns `None` if the enum contains an unknown value deserialized from
20111    /// the string representation of enums.
20112    pub fn value(&self) -> std::option::Option<i32> {
20113        match self {
20114            Self::Unspecified => std::option::Option::Some(0),
20115            Self::Backup => std::option::Option::Some(1),
20116            Self::UnknownValue(u) => u.0.value(),
20117        }
20118    }
20119
20120    /// Gets the enum value as a string.
20121    ///
20122    /// Returns `None` if the enum contains an unknown value deserialized from
20123    /// the integer representation of enums.
20124    pub fn name(&self) -> std::option::Option<&str> {
20125        match self {
20126            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
20127            Self::Backup => std::option::Option::Some("BACKUP"),
20128            Self::UnknownValue(u) => u.0.name(),
20129        }
20130    }
20131}
20132
20133impl std::default::Default for RestoreSourceType {
20134    fn default() -> Self {
20135        use std::convert::From;
20136        Self::from(0)
20137    }
20138}
20139
20140impl std::fmt::Display for RestoreSourceType {
20141    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20142        wkt::internal::display_enum(f, self.name(), self.value())
20143    }
20144}
20145
20146impl std::convert::From<i32> for RestoreSourceType {
20147    fn from(value: i32) -> Self {
20148        match value {
20149            0 => Self::Unspecified,
20150            1 => Self::Backup,
20151            _ => Self::UnknownValue(restore_source_type::UnknownValue(
20152                wkt::internal::UnknownEnumValue::Integer(value),
20153            )),
20154        }
20155    }
20156}
20157
20158impl std::convert::From<&str> for RestoreSourceType {
20159    fn from(value: &str) -> Self {
20160        use std::string::ToString;
20161        match value {
20162            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
20163            "BACKUP" => Self::Backup,
20164            _ => Self::UnknownValue(restore_source_type::UnknownValue(
20165                wkt::internal::UnknownEnumValue::String(value.to_string()),
20166            )),
20167        }
20168    }
20169}
20170
20171impl serde::ser::Serialize for RestoreSourceType {
20172    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20173    where
20174        S: serde::Serializer,
20175    {
20176        match self {
20177            Self::Unspecified => serializer.serialize_i32(0),
20178            Self::Backup => serializer.serialize_i32(1),
20179            Self::UnknownValue(u) => u.0.serialize(serializer),
20180        }
20181    }
20182}
20183
20184impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
20185    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20186    where
20187        D: serde::Deserializer<'de>,
20188    {
20189        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
20190            ".google.bigtable.admin.v2.RestoreSourceType",
20191        ))
20192    }
20193}