google_cloud_bigtable_admin_v2/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// Request message for BigtableInstanceAdmin.CreateInstance.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct CreateInstanceRequest {
45    /// Required. The unique name of the project in which to create the new
46    /// instance. Values are of the form `projects/{project}`.
47    pub parent: std::string::String,
48
49    /// Required. The ID to be used when referring to the new instance within its
50    /// project, e.g., just `myinstance` rather than
51    /// `projects/myproject/instances/myinstance`.
52    pub instance_id: std::string::String,
53
54    /// Required. The instance to create.
55    /// Fields marked `OutputOnly` must be left blank.
56    pub instance: std::option::Option<crate::model::Instance>,
57
58    /// Required. The clusters to be created within the instance, mapped by desired
59    /// cluster ID, e.g., just `mycluster` rather than
60    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
61    /// Fields marked `OutputOnly` must be left blank.
62    pub clusters: std::collections::HashMap<std::string::String, crate::model::Cluster>,
63
64    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65}
66
67impl CreateInstanceRequest {
68    pub fn new() -> Self {
69        std::default::Default::default()
70    }
71
72    /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
73    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
74        self.parent = v.into();
75        self
76    }
77
78    /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
79    pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80        self.instance_id = v.into();
81        self
82    }
83
84    /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
85    pub fn set_instance<T>(mut self, v: T) -> Self
86    where
87        T: std::convert::Into<crate::model::Instance>,
88    {
89        self.instance = std::option::Option::Some(v.into());
90        self
91    }
92
93    /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
94    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
95    where
96        T: std::convert::Into<crate::model::Instance>,
97    {
98        self.instance = v.map(|x| x.into());
99        self
100    }
101
102    /// Sets the value of [clusters][crate::model::CreateInstanceRequest::clusters].
103    pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
104    where
105        T: std::iter::IntoIterator<Item = (K, V)>,
106        K: std::convert::Into<std::string::String>,
107        V: std::convert::Into<crate::model::Cluster>,
108    {
109        use std::iter::Iterator;
110        self.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
111        self
112    }
113}
114
115impl wkt::message::Message for CreateInstanceRequest {
116    fn typename() -> &'static str {
117        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceRequest"
118    }
119}
120
121/// Request message for BigtableInstanceAdmin.GetInstance.
122#[derive(Clone, Default, PartialEq)]
123#[non_exhaustive]
124pub struct GetInstanceRequest {
125    /// Required. The unique name of the requested instance. Values are of the form
126    /// `projects/{project}/instances/{instance}`.
127    pub name: std::string::String,
128
129    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
130}
131
132impl GetInstanceRequest {
133    pub fn new() -> Self {
134        std::default::Default::default()
135    }
136
137    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
138    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
139        self.name = v.into();
140        self
141    }
142}
143
144impl wkt::message::Message for GetInstanceRequest {
145    fn typename() -> &'static str {
146        "type.googleapis.com/google.bigtable.admin.v2.GetInstanceRequest"
147    }
148}
149
150/// Request message for BigtableInstanceAdmin.ListInstances.
151#[derive(Clone, Default, PartialEq)]
152#[non_exhaustive]
153pub struct ListInstancesRequest {
154    /// Required. The unique name of the project for which a list of instances is
155    /// requested. Values are of the form `projects/{project}`.
156    pub parent: std::string::String,
157
158    /// DEPRECATED: This field is unused and ignored.
159    pub page_token: std::string::String,
160
161    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
162}
163
164impl ListInstancesRequest {
165    pub fn new() -> Self {
166        std::default::Default::default()
167    }
168
169    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
170    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
171        self.parent = v.into();
172        self
173    }
174
175    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
176    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
177        self.page_token = v.into();
178        self
179    }
180}
181
182impl wkt::message::Message for ListInstancesRequest {
183    fn typename() -> &'static str {
184        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesRequest"
185    }
186}
187
188/// Response message for BigtableInstanceAdmin.ListInstances.
189#[derive(Clone, Default, PartialEq)]
190#[non_exhaustive]
191pub struct ListInstancesResponse {
192    /// The list of requested instances.
193    pub instances: std::vec::Vec<crate::model::Instance>,
194
195    /// Locations from which Instance information could not be retrieved,
196    /// due to an outage or some other transient condition.
197    /// Instances whose Clusters are all in one of the failed locations
198    /// may be missing from `instances`, and Instances with at least one
199    /// Cluster in a failed location may only have partial information returned.
200    /// Values are of the form `projects/<project>/locations/<zone_id>`
201    pub failed_locations: std::vec::Vec<std::string::String>,
202
203    /// DEPRECATED: This field is unused and ignored.
204    pub next_page_token: std::string::String,
205
206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
207}
208
209impl ListInstancesResponse {
210    pub fn new() -> Self {
211        std::default::Default::default()
212    }
213
214    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
215    pub fn set_instances<T, V>(mut self, v: T) -> Self
216    where
217        T: std::iter::IntoIterator<Item = V>,
218        V: std::convert::Into<crate::model::Instance>,
219    {
220        use std::iter::Iterator;
221        self.instances = v.into_iter().map(|i| i.into()).collect();
222        self
223    }
224
225    /// Sets the value of [failed_locations][crate::model::ListInstancesResponse::failed_locations].
226    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
227    where
228        T: std::iter::IntoIterator<Item = V>,
229        V: std::convert::Into<std::string::String>,
230    {
231        use std::iter::Iterator;
232        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
233        self
234    }
235
236    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
237    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
238        self.next_page_token = v.into();
239        self
240    }
241}
242
243impl wkt::message::Message for ListInstancesResponse {
244    fn typename() -> &'static str {
245        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesResponse"
246    }
247}
248
249/// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
250#[derive(Clone, Default, PartialEq)]
251#[non_exhaustive]
252pub struct PartialUpdateInstanceRequest {
253    /// Required. The Instance which will (partially) replace the current value.
254    pub instance: std::option::Option<crate::model::Instance>,
255
256    /// Required. The subset of Instance fields which should be replaced.
257    /// Must be explicitly set.
258    pub update_mask: std::option::Option<wkt::FieldMask>,
259
260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
261}
262
263impl PartialUpdateInstanceRequest {
264    pub fn new() -> Self {
265        std::default::Default::default()
266    }
267
268    /// Sets the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
269    pub fn set_instance<T>(mut self, v: T) -> Self
270    where
271        T: std::convert::Into<crate::model::Instance>,
272    {
273        self.instance = std::option::Option::Some(v.into());
274        self
275    }
276
277    /// Sets or clears the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
278    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
279    where
280        T: std::convert::Into<crate::model::Instance>,
281    {
282        self.instance = v.map(|x| x.into());
283        self
284    }
285
286    /// Sets the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
287    pub fn set_update_mask<T>(mut self, v: T) -> Self
288    where
289        T: std::convert::Into<wkt::FieldMask>,
290    {
291        self.update_mask = std::option::Option::Some(v.into());
292        self
293    }
294
295    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
296    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
297    where
298        T: std::convert::Into<wkt::FieldMask>,
299    {
300        self.update_mask = v.map(|x| x.into());
301        self
302    }
303}
304
305impl wkt::message::Message for PartialUpdateInstanceRequest {
306    fn typename() -> &'static str {
307        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateInstanceRequest"
308    }
309}
310
311/// Request message for BigtableInstanceAdmin.DeleteInstance.
312#[derive(Clone, Default, PartialEq)]
313#[non_exhaustive]
314pub struct DeleteInstanceRequest {
315    /// Required. The unique name of the instance to be deleted.
316    /// Values are of the form `projects/{project}/instances/{instance}`.
317    pub name: std::string::String,
318
319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
320}
321
322impl DeleteInstanceRequest {
323    pub fn new() -> Self {
324        std::default::Default::default()
325    }
326
327    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
328    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
329        self.name = v.into();
330        self
331    }
332}
333
334impl wkt::message::Message for DeleteInstanceRequest {
335    fn typename() -> &'static str {
336        "type.googleapis.com/google.bigtable.admin.v2.DeleteInstanceRequest"
337    }
338}
339
340/// Request message for BigtableInstanceAdmin.CreateCluster.
341#[derive(Clone, Default, PartialEq)]
342#[non_exhaustive]
343pub struct CreateClusterRequest {
344    /// Required. The unique name of the instance in which to create the new
345    /// cluster. Values are of the form `projects/{project}/instances/{instance}`.
346    pub parent: std::string::String,
347
348    /// Required. The ID to be used when referring to the new cluster within its
349    /// instance, e.g., just `mycluster` rather than
350    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
351    pub cluster_id: std::string::String,
352
353    /// Required. The cluster to be created.
354    /// Fields marked `OutputOnly` must be left blank.
355    pub cluster: std::option::Option<crate::model::Cluster>,
356
357    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
358}
359
360impl CreateClusterRequest {
361    pub fn new() -> Self {
362        std::default::Default::default()
363    }
364
365    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
366    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
367        self.parent = v.into();
368        self
369    }
370
371    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
372    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
373        self.cluster_id = v.into();
374        self
375    }
376
377    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
378    pub fn set_cluster<T>(mut self, v: T) -> Self
379    where
380        T: std::convert::Into<crate::model::Cluster>,
381    {
382        self.cluster = std::option::Option::Some(v.into());
383        self
384    }
385
386    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
387    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
388    where
389        T: std::convert::Into<crate::model::Cluster>,
390    {
391        self.cluster = v.map(|x| x.into());
392        self
393    }
394}
395
396impl wkt::message::Message for CreateClusterRequest {
397    fn typename() -> &'static str {
398        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterRequest"
399    }
400}
401
402/// Request message for BigtableInstanceAdmin.GetCluster.
403#[derive(Clone, Default, PartialEq)]
404#[non_exhaustive]
405pub struct GetClusterRequest {
406    /// Required. The unique name of the requested cluster. Values are of the form
407    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
408    pub name: std::string::String,
409
410    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
411}
412
413impl GetClusterRequest {
414    pub fn new() -> Self {
415        std::default::Default::default()
416    }
417
418    /// Sets the value of [name][crate::model::GetClusterRequest::name].
419    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
420        self.name = v.into();
421        self
422    }
423}
424
425impl wkt::message::Message for GetClusterRequest {
426    fn typename() -> &'static str {
427        "type.googleapis.com/google.bigtable.admin.v2.GetClusterRequest"
428    }
429}
430
431/// Request message for BigtableInstanceAdmin.ListClusters.
432#[derive(Clone, Default, PartialEq)]
433#[non_exhaustive]
434pub struct ListClustersRequest {
435    /// Required. The unique name of the instance for which a list of clusters is
436    /// requested. Values are of the form
437    /// `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
438    /// Clusters for all Instances in a project, e.g.,
439    /// `projects/myproject/instances/-`.
440    pub parent: std::string::String,
441
442    /// DEPRECATED: This field is unused and ignored.
443    pub page_token: std::string::String,
444
445    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
446}
447
448impl ListClustersRequest {
449    pub fn new() -> Self {
450        std::default::Default::default()
451    }
452
453    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
454    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
455        self.parent = v.into();
456        self
457    }
458
459    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
460    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
461        self.page_token = v.into();
462        self
463    }
464}
465
466impl wkt::message::Message for ListClustersRequest {
467    fn typename() -> &'static str {
468        "type.googleapis.com/google.bigtable.admin.v2.ListClustersRequest"
469    }
470}
471
472/// Response message for BigtableInstanceAdmin.ListClusters.
473#[derive(Clone, Default, PartialEq)]
474#[non_exhaustive]
475pub struct ListClustersResponse {
476    /// The list of requested clusters.
477    pub clusters: std::vec::Vec<crate::model::Cluster>,
478
479    /// Locations from which Cluster information could not be retrieved,
480    /// due to an outage or some other transient condition.
481    /// Clusters from these locations may be missing from `clusters`,
482    /// or may only have partial information returned.
483    /// Values are of the form `projects/<project>/locations/<zone_id>`
484    pub failed_locations: std::vec::Vec<std::string::String>,
485
486    /// DEPRECATED: This field is unused and ignored.
487    pub next_page_token: std::string::String,
488
489    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
490}
491
492impl ListClustersResponse {
493    pub fn new() -> Self {
494        std::default::Default::default()
495    }
496
497    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
498    pub fn set_clusters<T, V>(mut self, v: T) -> Self
499    where
500        T: std::iter::IntoIterator<Item = V>,
501        V: std::convert::Into<crate::model::Cluster>,
502    {
503        use std::iter::Iterator;
504        self.clusters = v.into_iter().map(|i| i.into()).collect();
505        self
506    }
507
508    /// Sets the value of [failed_locations][crate::model::ListClustersResponse::failed_locations].
509    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
510    where
511        T: std::iter::IntoIterator<Item = V>,
512        V: std::convert::Into<std::string::String>,
513    {
514        use std::iter::Iterator;
515        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
516        self
517    }
518
519    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
520    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
521        self.next_page_token = v.into();
522        self
523    }
524}
525
526impl wkt::message::Message for ListClustersResponse {
527    fn typename() -> &'static str {
528        "type.googleapis.com/google.bigtable.admin.v2.ListClustersResponse"
529    }
530}
531
532/// Request message for BigtableInstanceAdmin.DeleteCluster.
533#[derive(Clone, Default, PartialEq)]
534#[non_exhaustive]
535pub struct DeleteClusterRequest {
536    /// Required. The unique name of the cluster to be deleted. Values are of the
537    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
538    pub name: std::string::String,
539
540    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
541}
542
543impl DeleteClusterRequest {
544    pub fn new() -> Self {
545        std::default::Default::default()
546    }
547
548    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
549    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
550        self.name = v.into();
551        self
552    }
553}
554
555impl wkt::message::Message for DeleteClusterRequest {
556    fn typename() -> &'static str {
557        "type.googleapis.com/google.bigtable.admin.v2.DeleteClusterRequest"
558    }
559}
560
561/// The metadata for the Operation returned by CreateInstance.
562#[derive(Clone, Default, PartialEq)]
563#[non_exhaustive]
564pub struct CreateInstanceMetadata {
565    /// The request that prompted the initiation of this CreateInstance operation.
566    pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
567
568    /// The time at which the original request was received.
569    pub request_time: std::option::Option<wkt::Timestamp>,
570
571    /// The time at which the operation failed or was completed successfully.
572    pub finish_time: std::option::Option<wkt::Timestamp>,
573
574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
575}
576
577impl CreateInstanceMetadata {
578    pub fn new() -> Self {
579        std::default::Default::default()
580    }
581
582    /// Sets the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
583    pub fn set_original_request<T>(mut self, v: T) -> Self
584    where
585        T: std::convert::Into<crate::model::CreateInstanceRequest>,
586    {
587        self.original_request = std::option::Option::Some(v.into());
588        self
589    }
590
591    /// Sets or clears the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
592    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
593    where
594        T: std::convert::Into<crate::model::CreateInstanceRequest>,
595    {
596        self.original_request = v.map(|x| x.into());
597        self
598    }
599
600    /// Sets the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
601    pub fn set_request_time<T>(mut self, v: T) -> Self
602    where
603        T: std::convert::Into<wkt::Timestamp>,
604    {
605        self.request_time = std::option::Option::Some(v.into());
606        self
607    }
608
609    /// Sets or clears the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
610    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
611    where
612        T: std::convert::Into<wkt::Timestamp>,
613    {
614        self.request_time = v.map(|x| x.into());
615        self
616    }
617
618    /// Sets the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
619    pub fn set_finish_time<T>(mut self, v: T) -> Self
620    where
621        T: std::convert::Into<wkt::Timestamp>,
622    {
623        self.finish_time = std::option::Option::Some(v.into());
624        self
625    }
626
627    /// Sets or clears the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
628    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
629    where
630        T: std::convert::Into<wkt::Timestamp>,
631    {
632        self.finish_time = v.map(|x| x.into());
633        self
634    }
635}
636
637impl wkt::message::Message for CreateInstanceMetadata {
638    fn typename() -> &'static str {
639        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceMetadata"
640    }
641}
642
643/// The metadata for the Operation returned by UpdateInstance.
644#[derive(Clone, Default, PartialEq)]
645#[non_exhaustive]
646pub struct UpdateInstanceMetadata {
647    /// The request that prompted the initiation of this UpdateInstance operation.
648    pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
649
650    /// The time at which the original request was received.
651    pub request_time: std::option::Option<wkt::Timestamp>,
652
653    /// The time at which the operation failed or was completed successfully.
654    pub finish_time: std::option::Option<wkt::Timestamp>,
655
656    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
657}
658
659impl UpdateInstanceMetadata {
660    pub fn new() -> Self {
661        std::default::Default::default()
662    }
663
664    /// Sets the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
665    pub fn set_original_request<T>(mut self, v: T) -> Self
666    where
667        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
668    {
669        self.original_request = std::option::Option::Some(v.into());
670        self
671    }
672
673    /// Sets or clears the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
674    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
675    where
676        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
677    {
678        self.original_request = v.map(|x| x.into());
679        self
680    }
681
682    /// Sets the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
683    pub fn set_request_time<T>(mut self, v: T) -> Self
684    where
685        T: std::convert::Into<wkt::Timestamp>,
686    {
687        self.request_time = std::option::Option::Some(v.into());
688        self
689    }
690
691    /// Sets or clears the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
692    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
693    where
694        T: std::convert::Into<wkt::Timestamp>,
695    {
696        self.request_time = v.map(|x| x.into());
697        self
698    }
699
700    /// Sets the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
701    pub fn set_finish_time<T>(mut self, v: T) -> Self
702    where
703        T: std::convert::Into<wkt::Timestamp>,
704    {
705        self.finish_time = std::option::Option::Some(v.into());
706        self
707    }
708
709    /// Sets or clears the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
710    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
711    where
712        T: std::convert::Into<wkt::Timestamp>,
713    {
714        self.finish_time = v.map(|x| x.into());
715        self
716    }
717}
718
719impl wkt::message::Message for UpdateInstanceMetadata {
720    fn typename() -> &'static str {
721        "type.googleapis.com/google.bigtable.admin.v2.UpdateInstanceMetadata"
722    }
723}
724
725/// The metadata for the Operation returned by CreateCluster.
726#[derive(Clone, Default, PartialEq)]
727#[non_exhaustive]
728pub struct CreateClusterMetadata {
729    /// The request that prompted the initiation of this CreateCluster operation.
730    pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
731
732    /// The time at which the original request was received.
733    pub request_time: std::option::Option<wkt::Timestamp>,
734
735    /// The time at which the operation failed or was completed successfully.
736    pub finish_time: std::option::Option<wkt::Timestamp>,
737
738    /// Keys: the full `name` of each table that existed in the instance when
739    /// CreateCluster was first called, i.e.
740    /// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
741    /// to the instance by a later API call will be created in the new cluster by
742    /// that API call, not this one.
743    ///
744    /// Values: information on how much of a table's data has been copied to the
745    /// newly-created cluster so far.
746    pub tables: std::collections::HashMap<
747        std::string::String,
748        crate::model::create_cluster_metadata::TableProgress,
749    >,
750
751    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
752}
753
754impl CreateClusterMetadata {
755    pub fn new() -> Self {
756        std::default::Default::default()
757    }
758
759    /// Sets the value of [original_request][crate::model::CreateClusterMetadata::original_request].
760    pub fn set_original_request<T>(mut self, v: T) -> Self
761    where
762        T: std::convert::Into<crate::model::CreateClusterRequest>,
763    {
764        self.original_request = std::option::Option::Some(v.into());
765        self
766    }
767
768    /// Sets or clears the value of [original_request][crate::model::CreateClusterMetadata::original_request].
769    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
770    where
771        T: std::convert::Into<crate::model::CreateClusterRequest>,
772    {
773        self.original_request = v.map(|x| x.into());
774        self
775    }
776
777    /// Sets the value of [request_time][crate::model::CreateClusterMetadata::request_time].
778    pub fn set_request_time<T>(mut self, v: T) -> Self
779    where
780        T: std::convert::Into<wkt::Timestamp>,
781    {
782        self.request_time = std::option::Option::Some(v.into());
783        self
784    }
785
786    /// Sets or clears the value of [request_time][crate::model::CreateClusterMetadata::request_time].
787    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
788    where
789        T: std::convert::Into<wkt::Timestamp>,
790    {
791        self.request_time = v.map(|x| x.into());
792        self
793    }
794
795    /// Sets the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
796    pub fn set_finish_time<T>(mut self, v: T) -> Self
797    where
798        T: std::convert::Into<wkt::Timestamp>,
799    {
800        self.finish_time = std::option::Option::Some(v.into());
801        self
802    }
803
804    /// Sets or clears the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
805    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
806    where
807        T: std::convert::Into<wkt::Timestamp>,
808    {
809        self.finish_time = v.map(|x| x.into());
810        self
811    }
812
813    /// Sets the value of [tables][crate::model::CreateClusterMetadata::tables].
814    pub fn set_tables<T, K, V>(mut self, v: T) -> Self
815    where
816        T: std::iter::IntoIterator<Item = (K, V)>,
817        K: std::convert::Into<std::string::String>,
818        V: std::convert::Into<crate::model::create_cluster_metadata::TableProgress>,
819    {
820        use std::iter::Iterator;
821        self.tables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
822        self
823    }
824}
825
826impl wkt::message::Message for CreateClusterMetadata {
827    fn typename() -> &'static str {
828        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata"
829    }
830}
831
832/// Defines additional types related to [CreateClusterMetadata].
833pub mod create_cluster_metadata {
834    #[allow(unused_imports)]
835    use super::*;
836
837    /// Progress info for copying a table's data to the new cluster.
838    #[derive(Clone, Default, PartialEq)]
839    #[non_exhaustive]
840    pub struct TableProgress {
841        /// Estimate of the size of the table to be copied.
842        pub estimated_size_bytes: i64,
843
844        /// Estimate of the number of bytes copied so far for this table.
845        /// This will eventually reach 'estimated_size_bytes' unless the table copy
846        /// is CANCELLED.
847        pub estimated_copied_bytes: i64,
848
849        pub state: crate::model::create_cluster_metadata::table_progress::State,
850
851        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
852    }
853
854    impl TableProgress {
855        pub fn new() -> Self {
856            std::default::Default::default()
857        }
858
859        /// Sets the value of [estimated_size_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_size_bytes].
860        pub fn set_estimated_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
861            self.estimated_size_bytes = v.into();
862            self
863        }
864
865        /// Sets the value of [estimated_copied_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_copied_bytes].
866        pub fn set_estimated_copied_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
867            self.estimated_copied_bytes = v.into();
868            self
869        }
870
871        /// Sets the value of [state][crate::model::create_cluster_metadata::TableProgress::state].
872        pub fn set_state<
873            T: std::convert::Into<crate::model::create_cluster_metadata::table_progress::State>,
874        >(
875            mut self,
876            v: T,
877        ) -> Self {
878            self.state = v.into();
879            self
880        }
881    }
882
883    impl wkt::message::Message for TableProgress {
884        fn typename() -> &'static str {
885            "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"
886        }
887    }
888
889    /// Defines additional types related to [TableProgress].
890    pub mod table_progress {
891        #[allow(unused_imports)]
892        use super::*;
893
894        ///
895        /// # Working with unknown values
896        ///
897        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
898        /// additional enum variants at any time. Adding new variants is not considered
899        /// a breaking change. Applications should write their code in anticipation of:
900        ///
901        /// - New values appearing in future releases of the client library, **and**
902        /// - New values received dynamically, without application changes.
903        ///
904        /// Please consult the [Working with enums] section in the user guide for some
905        /// guidelines.
906        ///
907        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
908        #[derive(Clone, Debug, PartialEq)]
909        #[non_exhaustive]
910        pub enum State {
911            Unspecified,
912            /// The table has not yet begun copying to the new cluster.
913            Pending,
914            /// The table is actively being copied to the new cluster.
915            Copying,
916            /// The table has been fully copied to the new cluster.
917            Completed,
918            /// The table was deleted before it finished copying to the new cluster.
919            /// Note that tables deleted after completion will stay marked as
920            /// COMPLETED, not CANCELLED.
921            Cancelled,
922            /// If set, the enum was initialized with an unknown value.
923            ///
924            /// Applications can examine the value using [State::value] or
925            /// [State::name].
926            UnknownValue(state::UnknownValue),
927        }
928
929        #[doc(hidden)]
930        pub mod state {
931            #[allow(unused_imports)]
932            use super::*;
933            #[derive(Clone, Debug, PartialEq)]
934            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
935        }
936
937        impl State {
938            /// Gets the enum value.
939            ///
940            /// Returns `None` if the enum contains an unknown value deserialized from
941            /// the string representation of enums.
942            pub fn value(&self) -> std::option::Option<i32> {
943                match self {
944                    Self::Unspecified => std::option::Option::Some(0),
945                    Self::Pending => std::option::Option::Some(1),
946                    Self::Copying => std::option::Option::Some(2),
947                    Self::Completed => std::option::Option::Some(3),
948                    Self::Cancelled => std::option::Option::Some(4),
949                    Self::UnknownValue(u) => u.0.value(),
950                }
951            }
952
953            /// Gets the enum value as a string.
954            ///
955            /// Returns `None` if the enum contains an unknown value deserialized from
956            /// the integer representation of enums.
957            pub fn name(&self) -> std::option::Option<&str> {
958                match self {
959                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
960                    Self::Pending => std::option::Option::Some("PENDING"),
961                    Self::Copying => std::option::Option::Some("COPYING"),
962                    Self::Completed => std::option::Option::Some("COMPLETED"),
963                    Self::Cancelled => std::option::Option::Some("CANCELLED"),
964                    Self::UnknownValue(u) => u.0.name(),
965                }
966            }
967        }
968
969        impl std::default::Default for State {
970            fn default() -> Self {
971                use std::convert::From;
972                Self::from(0)
973            }
974        }
975
976        impl std::fmt::Display for State {
977            fn fmt(
978                &self,
979                f: &mut std::fmt::Formatter<'_>,
980            ) -> std::result::Result<(), std::fmt::Error> {
981                wkt::internal::display_enum(f, self.name(), self.value())
982            }
983        }
984
985        impl std::convert::From<i32> for State {
986            fn from(value: i32) -> Self {
987                match value {
988                    0 => Self::Unspecified,
989                    1 => Self::Pending,
990                    2 => Self::Copying,
991                    3 => Self::Completed,
992                    4 => Self::Cancelled,
993                    _ => Self::UnknownValue(state::UnknownValue(
994                        wkt::internal::UnknownEnumValue::Integer(value),
995                    )),
996                }
997            }
998        }
999
1000        impl std::convert::From<&str> for State {
1001            fn from(value: &str) -> Self {
1002                use std::string::ToString;
1003                match value {
1004                    "STATE_UNSPECIFIED" => Self::Unspecified,
1005                    "PENDING" => Self::Pending,
1006                    "COPYING" => Self::Copying,
1007                    "COMPLETED" => Self::Completed,
1008                    "CANCELLED" => Self::Cancelled,
1009                    _ => Self::UnknownValue(state::UnknownValue(
1010                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1011                    )),
1012                }
1013            }
1014        }
1015
1016        impl serde::ser::Serialize for State {
1017            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1018            where
1019                S: serde::Serializer,
1020            {
1021                match self {
1022                    Self::Unspecified => serializer.serialize_i32(0),
1023                    Self::Pending => serializer.serialize_i32(1),
1024                    Self::Copying => serializer.serialize_i32(2),
1025                    Self::Completed => serializer.serialize_i32(3),
1026                    Self::Cancelled => serializer.serialize_i32(4),
1027                    Self::UnknownValue(u) => u.0.serialize(serializer),
1028                }
1029            }
1030        }
1031
1032        impl<'de> serde::de::Deserialize<'de> for State {
1033            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1034            where
1035                D: serde::Deserializer<'de>,
1036            {
1037                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1038                    ".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State",
1039                ))
1040            }
1041        }
1042    }
1043}
1044
1045/// The metadata for the Operation returned by UpdateCluster.
1046#[derive(Clone, Default, PartialEq)]
1047#[non_exhaustive]
1048pub struct UpdateClusterMetadata {
1049    /// The request that prompted the initiation of this UpdateCluster operation.
1050    pub original_request: std::option::Option<crate::model::Cluster>,
1051
1052    /// The time at which the original request was received.
1053    pub request_time: std::option::Option<wkt::Timestamp>,
1054
1055    /// The time at which the operation failed or was completed successfully.
1056    pub finish_time: std::option::Option<wkt::Timestamp>,
1057
1058    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1059}
1060
1061impl UpdateClusterMetadata {
1062    pub fn new() -> Self {
1063        std::default::Default::default()
1064    }
1065
1066    /// Sets the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1067    pub fn set_original_request<T>(mut self, v: T) -> Self
1068    where
1069        T: std::convert::Into<crate::model::Cluster>,
1070    {
1071        self.original_request = std::option::Option::Some(v.into());
1072        self
1073    }
1074
1075    /// Sets or clears the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1076    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1077    where
1078        T: std::convert::Into<crate::model::Cluster>,
1079    {
1080        self.original_request = v.map(|x| x.into());
1081        self
1082    }
1083
1084    /// Sets the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1085    pub fn set_request_time<T>(mut self, v: T) -> Self
1086    where
1087        T: std::convert::Into<wkt::Timestamp>,
1088    {
1089        self.request_time = std::option::Option::Some(v.into());
1090        self
1091    }
1092
1093    /// Sets or clears the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1094    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1095    where
1096        T: std::convert::Into<wkt::Timestamp>,
1097    {
1098        self.request_time = v.map(|x| x.into());
1099        self
1100    }
1101
1102    /// Sets the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1103    pub fn set_finish_time<T>(mut self, v: T) -> Self
1104    where
1105        T: std::convert::Into<wkt::Timestamp>,
1106    {
1107        self.finish_time = std::option::Option::Some(v.into());
1108        self
1109    }
1110
1111    /// Sets or clears the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1112    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1113    where
1114        T: std::convert::Into<wkt::Timestamp>,
1115    {
1116        self.finish_time = v.map(|x| x.into());
1117        self
1118    }
1119}
1120
1121impl wkt::message::Message for UpdateClusterMetadata {
1122    fn typename() -> &'static str {
1123        "type.googleapis.com/google.bigtable.admin.v2.UpdateClusterMetadata"
1124    }
1125}
1126
1127/// The metadata for the Operation returned by PartialUpdateCluster.
1128#[derive(Clone, Default, PartialEq)]
1129#[non_exhaustive]
1130pub struct PartialUpdateClusterMetadata {
1131    /// The time at which the original request was received.
1132    pub request_time: std::option::Option<wkt::Timestamp>,
1133
1134    /// The time at which the operation failed or was completed successfully.
1135    pub finish_time: std::option::Option<wkt::Timestamp>,
1136
1137    /// The original request for PartialUpdateCluster.
1138    pub original_request: std::option::Option<crate::model::PartialUpdateClusterRequest>,
1139
1140    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1141}
1142
1143impl PartialUpdateClusterMetadata {
1144    pub fn new() -> Self {
1145        std::default::Default::default()
1146    }
1147
1148    /// Sets the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1149    pub fn set_request_time<T>(mut self, v: T) -> Self
1150    where
1151        T: std::convert::Into<wkt::Timestamp>,
1152    {
1153        self.request_time = std::option::Option::Some(v.into());
1154        self
1155    }
1156
1157    /// Sets or clears the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1158    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1159    where
1160        T: std::convert::Into<wkt::Timestamp>,
1161    {
1162        self.request_time = v.map(|x| x.into());
1163        self
1164    }
1165
1166    /// Sets the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1167    pub fn set_finish_time<T>(mut self, v: T) -> Self
1168    where
1169        T: std::convert::Into<wkt::Timestamp>,
1170    {
1171        self.finish_time = std::option::Option::Some(v.into());
1172        self
1173    }
1174
1175    /// Sets or clears the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1176    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1177    where
1178        T: std::convert::Into<wkt::Timestamp>,
1179    {
1180        self.finish_time = v.map(|x| x.into());
1181        self
1182    }
1183
1184    /// Sets the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1185    pub fn set_original_request<T>(mut self, v: T) -> Self
1186    where
1187        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1188    {
1189        self.original_request = std::option::Option::Some(v.into());
1190        self
1191    }
1192
1193    /// Sets or clears the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1194    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1195    where
1196        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1197    {
1198        self.original_request = v.map(|x| x.into());
1199        self
1200    }
1201}
1202
1203impl wkt::message::Message for PartialUpdateClusterMetadata {
1204    fn typename() -> &'static str {
1205        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterMetadata"
1206    }
1207}
1208
1209/// Request message for BigtableInstanceAdmin.PartialUpdateCluster.
1210#[derive(Clone, Default, PartialEq)]
1211#[non_exhaustive]
1212pub struct PartialUpdateClusterRequest {
1213    /// Required. The Cluster which contains the partial updates to be applied,
1214    /// subject to the update_mask.
1215    pub cluster: std::option::Option<crate::model::Cluster>,
1216
1217    /// Required. The subset of Cluster fields which should be replaced.
1218    pub update_mask: std::option::Option<wkt::FieldMask>,
1219
1220    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1221}
1222
1223impl PartialUpdateClusterRequest {
1224    pub fn new() -> Self {
1225        std::default::Default::default()
1226    }
1227
1228    /// Sets the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1229    pub fn set_cluster<T>(mut self, v: T) -> Self
1230    where
1231        T: std::convert::Into<crate::model::Cluster>,
1232    {
1233        self.cluster = std::option::Option::Some(v.into());
1234        self
1235    }
1236
1237    /// Sets or clears the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1238    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1239    where
1240        T: std::convert::Into<crate::model::Cluster>,
1241    {
1242        self.cluster = v.map(|x| x.into());
1243        self
1244    }
1245
1246    /// Sets the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1247    pub fn set_update_mask<T>(mut self, v: T) -> Self
1248    where
1249        T: std::convert::Into<wkt::FieldMask>,
1250    {
1251        self.update_mask = std::option::Option::Some(v.into());
1252        self
1253    }
1254
1255    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1256    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1257    where
1258        T: std::convert::Into<wkt::FieldMask>,
1259    {
1260        self.update_mask = v.map(|x| x.into());
1261        self
1262    }
1263}
1264
1265impl wkt::message::Message for PartialUpdateClusterRequest {
1266    fn typename() -> &'static str {
1267        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterRequest"
1268    }
1269}
1270
1271/// Request message for BigtableInstanceAdmin.CreateAppProfile.
1272#[derive(Clone, Default, PartialEq)]
1273#[non_exhaustive]
1274pub struct CreateAppProfileRequest {
1275    /// Required. The unique name of the instance in which to create the new app
1276    /// profile. Values are of the form `projects/{project}/instances/{instance}`.
1277    pub parent: std::string::String,
1278
1279    /// Required. The ID to be used when referring to the new app profile within
1280    /// its instance, e.g., just `myprofile` rather than
1281    /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
1282    pub app_profile_id: std::string::String,
1283
1284    /// Required. The app profile to be created.
1285    /// Fields marked `OutputOnly` will be ignored.
1286    pub app_profile: std::option::Option<crate::model::AppProfile>,
1287
1288    /// If true, ignore safety checks when creating the app profile.
1289    pub ignore_warnings: bool,
1290
1291    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1292}
1293
1294impl CreateAppProfileRequest {
1295    pub fn new() -> Self {
1296        std::default::Default::default()
1297    }
1298
1299    /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
1300    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1301        self.parent = v.into();
1302        self
1303    }
1304
1305    /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
1306    pub fn set_app_profile_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1307        self.app_profile_id = v.into();
1308        self
1309    }
1310
1311    /// Sets the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1312    pub fn set_app_profile<T>(mut self, v: T) -> Self
1313    where
1314        T: std::convert::Into<crate::model::AppProfile>,
1315    {
1316        self.app_profile = std::option::Option::Some(v.into());
1317        self
1318    }
1319
1320    /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1321    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1322    where
1323        T: std::convert::Into<crate::model::AppProfile>,
1324    {
1325        self.app_profile = v.map(|x| x.into());
1326        self
1327    }
1328
1329    /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
1330    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1331        self.ignore_warnings = v.into();
1332        self
1333    }
1334}
1335
1336impl wkt::message::Message for CreateAppProfileRequest {
1337    fn typename() -> &'static str {
1338        "type.googleapis.com/google.bigtable.admin.v2.CreateAppProfileRequest"
1339    }
1340}
1341
1342/// Request message for BigtableInstanceAdmin.GetAppProfile.
1343#[derive(Clone, Default, PartialEq)]
1344#[non_exhaustive]
1345pub struct GetAppProfileRequest {
1346    /// Required. The unique name of the requested app profile. Values are of the
1347    /// form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
1348    pub name: std::string::String,
1349
1350    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1351}
1352
1353impl GetAppProfileRequest {
1354    pub fn new() -> Self {
1355        std::default::Default::default()
1356    }
1357
1358    /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
1359    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1360        self.name = v.into();
1361        self
1362    }
1363}
1364
1365impl wkt::message::Message for GetAppProfileRequest {
1366    fn typename() -> &'static str {
1367        "type.googleapis.com/google.bigtable.admin.v2.GetAppProfileRequest"
1368    }
1369}
1370
1371/// Request message for BigtableInstanceAdmin.ListAppProfiles.
1372#[derive(Clone, Default, PartialEq)]
1373#[non_exhaustive]
1374pub struct ListAppProfilesRequest {
1375    /// Required. The unique name of the instance for which a list of app profiles
1376    /// is requested. Values are of the form
1377    /// `projects/{project}/instances/{instance}`.
1378    /// Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
1379    /// e.g., `projects/myproject/instances/-`.
1380    pub parent: std::string::String,
1381
1382    /// Maximum number of results per page.
1383    ///
1384    /// A page_size of zero lets the server choose the number of items to return.
1385    /// A page_size which is strictly positive will return at most that many items.
1386    /// A negative page_size will cause an error.
1387    ///
1388    /// Following the first request, subsequent paginated calls are not required
1389    /// to pass a page_size. If a page_size is set in subsequent calls, it must
1390    /// match the page_size given in the first request.
1391    pub page_size: i32,
1392
1393    /// The value of `next_page_token` returned by a previous call.
1394    pub page_token: std::string::String,
1395
1396    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1397}
1398
1399impl ListAppProfilesRequest {
1400    pub fn new() -> Self {
1401        std::default::Default::default()
1402    }
1403
1404    /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
1405    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1406        self.parent = v.into();
1407        self
1408    }
1409
1410    /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
1411    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1412        self.page_size = v.into();
1413        self
1414    }
1415
1416    /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
1417    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1418        self.page_token = v.into();
1419        self
1420    }
1421}
1422
1423impl wkt::message::Message for ListAppProfilesRequest {
1424    fn typename() -> &'static str {
1425        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesRequest"
1426    }
1427}
1428
1429/// Response message for BigtableInstanceAdmin.ListAppProfiles.
1430#[derive(Clone, Default, PartialEq)]
1431#[non_exhaustive]
1432pub struct ListAppProfilesResponse {
1433    /// The list of requested app profiles.
1434    pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
1435
1436    /// Set if not all app profiles could be returned in a single response.
1437    /// Pass this value to `page_token` in another request to get the next
1438    /// page of results.
1439    pub next_page_token: std::string::String,
1440
1441    /// Locations from which AppProfile information could not be retrieved,
1442    /// due to an outage or some other transient condition.
1443    /// AppProfiles from these locations may be missing from `app_profiles`.
1444    /// Values are of the form `projects/<project>/locations/<zone_id>`
1445    pub failed_locations: std::vec::Vec<std::string::String>,
1446
1447    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1448}
1449
1450impl ListAppProfilesResponse {
1451    pub fn new() -> Self {
1452        std::default::Default::default()
1453    }
1454
1455    /// Sets the value of [app_profiles][crate::model::ListAppProfilesResponse::app_profiles].
1456    pub fn set_app_profiles<T, V>(mut self, v: T) -> Self
1457    where
1458        T: std::iter::IntoIterator<Item = V>,
1459        V: std::convert::Into<crate::model::AppProfile>,
1460    {
1461        use std::iter::Iterator;
1462        self.app_profiles = v.into_iter().map(|i| i.into()).collect();
1463        self
1464    }
1465
1466    /// Sets the value of [next_page_token][crate::model::ListAppProfilesResponse::next_page_token].
1467    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1468        self.next_page_token = v.into();
1469        self
1470    }
1471
1472    /// Sets the value of [failed_locations][crate::model::ListAppProfilesResponse::failed_locations].
1473    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
1474    where
1475        T: std::iter::IntoIterator<Item = V>,
1476        V: std::convert::Into<std::string::String>,
1477    {
1478        use std::iter::Iterator;
1479        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
1480        self
1481    }
1482}
1483
1484impl wkt::message::Message for ListAppProfilesResponse {
1485    fn typename() -> &'static str {
1486        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesResponse"
1487    }
1488}
1489
1490#[doc(hidden)]
1491impl gax::paginator::internal::PageableResponse for ListAppProfilesResponse {
1492    type PageItem = crate::model::AppProfile;
1493
1494    fn items(self) -> std::vec::Vec<Self::PageItem> {
1495        self.app_profiles
1496    }
1497
1498    fn next_page_token(&self) -> std::string::String {
1499        use std::clone::Clone;
1500        self.next_page_token.clone()
1501    }
1502}
1503
1504/// Request message for BigtableInstanceAdmin.UpdateAppProfile.
1505#[derive(Clone, Default, PartialEq)]
1506#[non_exhaustive]
1507pub struct UpdateAppProfileRequest {
1508    /// Required. The app profile which will (partially) replace the current value.
1509    pub app_profile: std::option::Option<crate::model::AppProfile>,
1510
1511    /// Required. The subset of app profile fields which should be replaced.
1512    /// If unset, all fields will be replaced.
1513    pub update_mask: std::option::Option<wkt::FieldMask>,
1514
1515    /// If true, ignore safety checks when updating the app profile.
1516    pub ignore_warnings: bool,
1517
1518    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1519}
1520
1521impl UpdateAppProfileRequest {
1522    pub fn new() -> Self {
1523        std::default::Default::default()
1524    }
1525
1526    /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
1527    pub fn set_app_profile<T>(mut self, v: T) -> Self
1528    where
1529        T: std::convert::Into<crate::model::AppProfile>,
1530    {
1531        self.app_profile = std::option::Option::Some(v.into());
1532        self
1533    }
1534
1535    /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
1536    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1537    where
1538        T: std::convert::Into<crate::model::AppProfile>,
1539    {
1540        self.app_profile = v.map(|x| x.into());
1541        self
1542    }
1543
1544    /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
1545    pub fn set_update_mask<T>(mut self, v: T) -> Self
1546    where
1547        T: std::convert::Into<wkt::FieldMask>,
1548    {
1549        self.update_mask = std::option::Option::Some(v.into());
1550        self
1551    }
1552
1553    /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
1554    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1555    where
1556        T: std::convert::Into<wkt::FieldMask>,
1557    {
1558        self.update_mask = v.map(|x| x.into());
1559        self
1560    }
1561
1562    /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
1563    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1564        self.ignore_warnings = v.into();
1565        self
1566    }
1567}
1568
1569impl wkt::message::Message for UpdateAppProfileRequest {
1570    fn typename() -> &'static str {
1571        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileRequest"
1572    }
1573}
1574
1575/// Request message for BigtableInstanceAdmin.DeleteAppProfile.
1576#[derive(Clone, Default, PartialEq)]
1577#[non_exhaustive]
1578pub struct DeleteAppProfileRequest {
1579    /// Required. The unique name of the app profile to be deleted. Values are of
1580    /// the form
1581    /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
1582    pub name: std::string::String,
1583
1584    /// Required. If true, ignore safety checks when deleting the app profile.
1585    pub ignore_warnings: bool,
1586
1587    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1588}
1589
1590impl DeleteAppProfileRequest {
1591    pub fn new() -> Self {
1592        std::default::Default::default()
1593    }
1594
1595    /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
1596    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1597        self.name = v.into();
1598        self
1599    }
1600
1601    /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
1602    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1603        self.ignore_warnings = v.into();
1604        self
1605    }
1606}
1607
1608impl wkt::message::Message for DeleteAppProfileRequest {
1609    fn typename() -> &'static str {
1610        "type.googleapis.com/google.bigtable.admin.v2.DeleteAppProfileRequest"
1611    }
1612}
1613
1614/// The metadata for the Operation returned by UpdateAppProfile.
1615#[derive(Clone, Default, PartialEq)]
1616#[non_exhaustive]
1617pub struct UpdateAppProfileMetadata {
1618    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1619}
1620
1621impl UpdateAppProfileMetadata {
1622    pub fn new() -> Self {
1623        std::default::Default::default()
1624    }
1625}
1626
1627impl wkt::message::Message for UpdateAppProfileMetadata {
1628    fn typename() -> &'static str {
1629        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileMetadata"
1630    }
1631}
1632
1633/// Request message for BigtableInstanceAdmin.ListHotTablets.
1634#[derive(Clone, Default, PartialEq)]
1635#[non_exhaustive]
1636pub struct ListHotTabletsRequest {
1637    /// Required. The cluster name to list hot tablets.
1638    /// Value is in the following form:
1639    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
1640    pub parent: std::string::String,
1641
1642    /// The start time to list hot tablets. The hot tablets in the response will
1643    /// have start times between the requested start time and end time. Start time
1644    /// defaults to Now if it is unset, and end time defaults to Now - 24 hours if
1645    /// it is unset. The start time should be less than the end time, and the
1646    /// maximum allowed time range between start time and end time is 48 hours.
1647    /// Start time and end time should have values between Now and Now - 14 days.
1648    pub start_time: std::option::Option<wkt::Timestamp>,
1649
1650    /// The end time to list hot tablets.
1651    pub end_time: std::option::Option<wkt::Timestamp>,
1652
1653    /// Maximum number of results per page.
1654    ///
1655    /// A page_size that is empty or zero lets the server choose the number of
1656    /// items to return. A page_size which is strictly positive will return at most
1657    /// that many items. A negative page_size will cause an error.
1658    ///
1659    /// Following the first request, subsequent paginated calls do not need a
1660    /// page_size field. If a page_size is set in subsequent calls, it must match
1661    /// the page_size given in the first request.
1662    pub page_size: i32,
1663
1664    /// The value of `next_page_token` returned by a previous call.
1665    pub page_token: std::string::String,
1666
1667    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1668}
1669
1670impl ListHotTabletsRequest {
1671    pub fn new() -> Self {
1672        std::default::Default::default()
1673    }
1674
1675    /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
1676    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1677        self.parent = v.into();
1678        self
1679    }
1680
1681    /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
1682    pub fn set_start_time<T>(mut self, v: T) -> Self
1683    where
1684        T: std::convert::Into<wkt::Timestamp>,
1685    {
1686        self.start_time = std::option::Option::Some(v.into());
1687        self
1688    }
1689
1690    /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
1691    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
1692    where
1693        T: std::convert::Into<wkt::Timestamp>,
1694    {
1695        self.start_time = v.map(|x| x.into());
1696        self
1697    }
1698
1699    /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
1700    pub fn set_end_time<T>(mut self, v: T) -> Self
1701    where
1702        T: std::convert::Into<wkt::Timestamp>,
1703    {
1704        self.end_time = std::option::Option::Some(v.into());
1705        self
1706    }
1707
1708    /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
1709    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
1710    where
1711        T: std::convert::Into<wkt::Timestamp>,
1712    {
1713        self.end_time = v.map(|x| x.into());
1714        self
1715    }
1716
1717    /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
1718    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1719        self.page_size = v.into();
1720        self
1721    }
1722
1723    /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
1724    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1725        self.page_token = v.into();
1726        self
1727    }
1728}
1729
1730impl wkt::message::Message for ListHotTabletsRequest {
1731    fn typename() -> &'static str {
1732        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsRequest"
1733    }
1734}
1735
1736/// Response message for BigtableInstanceAdmin.ListHotTablets.
1737#[derive(Clone, Default, PartialEq)]
1738#[non_exhaustive]
1739pub struct ListHotTabletsResponse {
1740    /// List of hot tablets in the tables of the requested cluster that fall
1741    /// within the requested time range. Hot tablets are ordered by node cpu usage
1742    /// percent. If there are multiple hot tablets that correspond to the same
1743    /// tablet within a 15-minute interval, only the hot tablet with the highest
1744    /// node cpu usage will be included in the response.
1745    pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
1746
1747    /// Set if not all hot tablets could be returned in a single response.
1748    /// Pass this value to `page_token` in another request to get the next
1749    /// page of results.
1750    pub next_page_token: std::string::String,
1751
1752    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1753}
1754
1755impl ListHotTabletsResponse {
1756    pub fn new() -> Self {
1757        std::default::Default::default()
1758    }
1759
1760    /// Sets the value of [hot_tablets][crate::model::ListHotTabletsResponse::hot_tablets].
1761    pub fn set_hot_tablets<T, V>(mut self, v: T) -> Self
1762    where
1763        T: std::iter::IntoIterator<Item = V>,
1764        V: std::convert::Into<crate::model::HotTablet>,
1765    {
1766        use std::iter::Iterator;
1767        self.hot_tablets = v.into_iter().map(|i| i.into()).collect();
1768        self
1769    }
1770
1771    /// Sets the value of [next_page_token][crate::model::ListHotTabletsResponse::next_page_token].
1772    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1773        self.next_page_token = v.into();
1774        self
1775    }
1776}
1777
1778impl wkt::message::Message for ListHotTabletsResponse {
1779    fn typename() -> &'static str {
1780        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsResponse"
1781    }
1782}
1783
1784#[doc(hidden)]
1785impl gax::paginator::internal::PageableResponse for ListHotTabletsResponse {
1786    type PageItem = crate::model::HotTablet;
1787
1788    fn items(self) -> std::vec::Vec<Self::PageItem> {
1789        self.hot_tablets
1790    }
1791
1792    fn next_page_token(&self) -> std::string::String {
1793        use std::clone::Clone;
1794        self.next_page_token.clone()
1795    }
1796}
1797
1798/// Request message for BigtableInstanceAdmin.CreateLogicalView.
1799#[derive(Clone, Default, PartialEq)]
1800#[non_exhaustive]
1801pub struct CreateLogicalViewRequest {
1802    /// Required. The parent instance where this logical view will be created.
1803    /// Format: `projects/{project}/instances/{instance}`.
1804    pub parent: std::string::String,
1805
1806    /// Required. The ID to use for the logical view, which will become the final
1807    /// component of the logical view's resource name.
1808    pub logical_view_id: std::string::String,
1809
1810    /// Required. The logical view to create.
1811    pub logical_view: std::option::Option<crate::model::LogicalView>,
1812
1813    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1814}
1815
1816impl CreateLogicalViewRequest {
1817    pub fn new() -> Self {
1818        std::default::Default::default()
1819    }
1820
1821    /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
1822    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1823        self.parent = v.into();
1824        self
1825    }
1826
1827    /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
1828    pub fn set_logical_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1829        self.logical_view_id = v.into();
1830        self
1831    }
1832
1833    /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
1834    pub fn set_logical_view<T>(mut self, v: T) -> Self
1835    where
1836        T: std::convert::Into<crate::model::LogicalView>,
1837    {
1838        self.logical_view = std::option::Option::Some(v.into());
1839        self
1840    }
1841
1842    /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
1843    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
1844    where
1845        T: std::convert::Into<crate::model::LogicalView>,
1846    {
1847        self.logical_view = v.map(|x| x.into());
1848        self
1849    }
1850}
1851
1852impl wkt::message::Message for CreateLogicalViewRequest {
1853    fn typename() -> &'static str {
1854        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewRequest"
1855    }
1856}
1857
1858/// The metadata for the Operation returned by CreateLogicalView.
1859#[derive(Clone, Default, PartialEq)]
1860#[non_exhaustive]
1861pub struct CreateLogicalViewMetadata {
1862    /// The request that prompted the initiation of this CreateLogicalView
1863    /// operation.
1864    pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
1865
1866    /// The time at which this operation started.
1867    pub start_time: std::option::Option<wkt::Timestamp>,
1868
1869    /// If set, the time at which this operation finished or was canceled.
1870    pub end_time: std::option::Option<wkt::Timestamp>,
1871
1872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1873}
1874
1875impl CreateLogicalViewMetadata {
1876    pub fn new() -> Self {
1877        std::default::Default::default()
1878    }
1879
1880    /// Sets the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
1881    pub fn set_original_request<T>(mut self, v: T) -> Self
1882    where
1883        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
1884    {
1885        self.original_request = std::option::Option::Some(v.into());
1886        self
1887    }
1888
1889    /// Sets or clears the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
1890    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1891    where
1892        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
1893    {
1894        self.original_request = v.map(|x| x.into());
1895        self
1896    }
1897
1898    /// Sets the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
1899    pub fn set_start_time<T>(mut self, v: T) -> Self
1900    where
1901        T: std::convert::Into<wkt::Timestamp>,
1902    {
1903        self.start_time = std::option::Option::Some(v.into());
1904        self
1905    }
1906
1907    /// Sets or clears the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
1908    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
1909    where
1910        T: std::convert::Into<wkt::Timestamp>,
1911    {
1912        self.start_time = v.map(|x| x.into());
1913        self
1914    }
1915
1916    /// Sets the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
1917    pub fn set_end_time<T>(mut self, v: T) -> Self
1918    where
1919        T: std::convert::Into<wkt::Timestamp>,
1920    {
1921        self.end_time = std::option::Option::Some(v.into());
1922        self
1923    }
1924
1925    /// Sets or clears the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
1926    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
1927    where
1928        T: std::convert::Into<wkt::Timestamp>,
1929    {
1930        self.end_time = v.map(|x| x.into());
1931        self
1932    }
1933}
1934
1935impl wkt::message::Message for CreateLogicalViewMetadata {
1936    fn typename() -> &'static str {
1937        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewMetadata"
1938    }
1939}
1940
1941/// Request message for BigtableInstanceAdmin.GetLogicalView.
1942#[derive(Clone, Default, PartialEq)]
1943#[non_exhaustive]
1944pub struct GetLogicalViewRequest {
1945    /// Required. The unique name of the requested logical view. Values are of the
1946    /// form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
1947    pub name: std::string::String,
1948
1949    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1950}
1951
1952impl GetLogicalViewRequest {
1953    pub fn new() -> Self {
1954        std::default::Default::default()
1955    }
1956
1957    /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
1958    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1959        self.name = v.into();
1960        self
1961    }
1962}
1963
1964impl wkt::message::Message for GetLogicalViewRequest {
1965    fn typename() -> &'static str {
1966        "type.googleapis.com/google.bigtable.admin.v2.GetLogicalViewRequest"
1967    }
1968}
1969
1970/// Request message for BigtableInstanceAdmin.ListLogicalViews.
1971#[derive(Clone, Default, PartialEq)]
1972#[non_exhaustive]
1973pub struct ListLogicalViewsRequest {
1974    /// Required. The unique name of the instance for which the list of logical
1975    /// views is requested. Values are of the form
1976    /// `projects/{project}/instances/{instance}`.
1977    pub parent: std::string::String,
1978
1979    /// Optional. The maximum number of logical views to return. The service may
1980    /// return fewer than this value
1981    pub page_size: i32,
1982
1983    /// Optional. A page token, received from a previous `ListLogicalViews` call.
1984    /// Provide this to retrieve the subsequent page.
1985    ///
1986    /// When paginating, all other parameters provided to `ListLogicalViews` must
1987    /// match the call that provided the page token.
1988    pub page_token: std::string::String,
1989
1990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1991}
1992
1993impl ListLogicalViewsRequest {
1994    pub fn new() -> Self {
1995        std::default::Default::default()
1996    }
1997
1998    /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
1999    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2000        self.parent = v.into();
2001        self
2002    }
2003
2004    /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
2005    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2006        self.page_size = v.into();
2007        self
2008    }
2009
2010    /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
2011    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2012        self.page_token = v.into();
2013        self
2014    }
2015}
2016
2017impl wkt::message::Message for ListLogicalViewsRequest {
2018    fn typename() -> &'static str {
2019        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsRequest"
2020    }
2021}
2022
2023/// Response message for BigtableInstanceAdmin.ListLogicalViews.
2024#[derive(Clone, Default, PartialEq)]
2025#[non_exhaustive]
2026pub struct ListLogicalViewsResponse {
2027    /// The list of requested logical views.
2028    pub logical_views: std::vec::Vec<crate::model::LogicalView>,
2029
2030    /// A token, which can be sent as `page_token` to retrieve the next page.
2031    /// If this field is omitted, there are no subsequent pages.
2032    pub next_page_token: std::string::String,
2033
2034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2035}
2036
2037impl ListLogicalViewsResponse {
2038    pub fn new() -> Self {
2039        std::default::Default::default()
2040    }
2041
2042    /// Sets the value of [logical_views][crate::model::ListLogicalViewsResponse::logical_views].
2043    pub fn set_logical_views<T, V>(mut self, v: T) -> Self
2044    where
2045        T: std::iter::IntoIterator<Item = V>,
2046        V: std::convert::Into<crate::model::LogicalView>,
2047    {
2048        use std::iter::Iterator;
2049        self.logical_views = v.into_iter().map(|i| i.into()).collect();
2050        self
2051    }
2052
2053    /// Sets the value of [next_page_token][crate::model::ListLogicalViewsResponse::next_page_token].
2054    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2055        self.next_page_token = v.into();
2056        self
2057    }
2058}
2059
2060impl wkt::message::Message for ListLogicalViewsResponse {
2061    fn typename() -> &'static str {
2062        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsResponse"
2063    }
2064}
2065
2066#[doc(hidden)]
2067impl gax::paginator::internal::PageableResponse for ListLogicalViewsResponse {
2068    type PageItem = crate::model::LogicalView;
2069
2070    fn items(self) -> std::vec::Vec<Self::PageItem> {
2071        self.logical_views
2072    }
2073
2074    fn next_page_token(&self) -> std::string::String {
2075        use std::clone::Clone;
2076        self.next_page_token.clone()
2077    }
2078}
2079
2080/// Request message for BigtableInstanceAdmin.UpdateLogicalView.
2081#[derive(Clone, Default, PartialEq)]
2082#[non_exhaustive]
2083pub struct UpdateLogicalViewRequest {
2084    /// Required. The logical view to update.
2085    ///
2086    /// The logical view's `name` field is used to identify the view to update.
2087    /// Format:
2088    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2089    pub logical_view: std::option::Option<crate::model::LogicalView>,
2090
2091    /// Optional. The list of fields to update.
2092    pub update_mask: std::option::Option<wkt::FieldMask>,
2093
2094    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2095}
2096
2097impl UpdateLogicalViewRequest {
2098    pub fn new() -> Self {
2099        std::default::Default::default()
2100    }
2101
2102    /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2103    pub fn set_logical_view<T>(mut self, v: T) -> Self
2104    where
2105        T: std::convert::Into<crate::model::LogicalView>,
2106    {
2107        self.logical_view = std::option::Option::Some(v.into());
2108        self
2109    }
2110
2111    /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2112    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2113    where
2114        T: std::convert::Into<crate::model::LogicalView>,
2115    {
2116        self.logical_view = v.map(|x| x.into());
2117        self
2118    }
2119
2120    /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2121    pub fn set_update_mask<T>(mut self, v: T) -> Self
2122    where
2123        T: std::convert::Into<wkt::FieldMask>,
2124    {
2125        self.update_mask = std::option::Option::Some(v.into());
2126        self
2127    }
2128
2129    /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2130    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2131    where
2132        T: std::convert::Into<wkt::FieldMask>,
2133    {
2134        self.update_mask = v.map(|x| x.into());
2135        self
2136    }
2137}
2138
2139impl wkt::message::Message for UpdateLogicalViewRequest {
2140    fn typename() -> &'static str {
2141        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewRequest"
2142    }
2143}
2144
2145/// The metadata for the Operation returned by UpdateLogicalView.
2146#[derive(Clone, Default, PartialEq)]
2147#[non_exhaustive]
2148pub struct UpdateLogicalViewMetadata {
2149    /// The request that prompted the initiation of this UpdateLogicalView
2150    /// operation.
2151    pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
2152
2153    /// The time at which this operation was started.
2154    pub start_time: std::option::Option<wkt::Timestamp>,
2155
2156    /// If set, the time at which this operation finished or was canceled.
2157    pub end_time: std::option::Option<wkt::Timestamp>,
2158
2159    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2160}
2161
2162impl UpdateLogicalViewMetadata {
2163    pub fn new() -> Self {
2164        std::default::Default::default()
2165    }
2166
2167    /// Sets the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
2168    pub fn set_original_request<T>(mut self, v: T) -> Self
2169    where
2170        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
2171    {
2172        self.original_request = std::option::Option::Some(v.into());
2173        self
2174    }
2175
2176    /// Sets or clears the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
2177    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2178    where
2179        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
2180    {
2181        self.original_request = v.map(|x| x.into());
2182        self
2183    }
2184
2185    /// Sets the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
2186    pub fn set_start_time<T>(mut self, v: T) -> Self
2187    where
2188        T: std::convert::Into<wkt::Timestamp>,
2189    {
2190        self.start_time = std::option::Option::Some(v.into());
2191        self
2192    }
2193
2194    /// Sets or clears the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
2195    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2196    where
2197        T: std::convert::Into<wkt::Timestamp>,
2198    {
2199        self.start_time = v.map(|x| x.into());
2200        self
2201    }
2202
2203    /// Sets the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
2204    pub fn set_end_time<T>(mut self, v: T) -> Self
2205    where
2206        T: std::convert::Into<wkt::Timestamp>,
2207    {
2208        self.end_time = std::option::Option::Some(v.into());
2209        self
2210    }
2211
2212    /// Sets or clears the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
2213    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2214    where
2215        T: std::convert::Into<wkt::Timestamp>,
2216    {
2217        self.end_time = v.map(|x| x.into());
2218        self
2219    }
2220}
2221
2222impl wkt::message::Message for UpdateLogicalViewMetadata {
2223    fn typename() -> &'static str {
2224        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewMetadata"
2225    }
2226}
2227
2228/// Request message for BigtableInstanceAdmin.DeleteLogicalView.
2229#[derive(Clone, Default, PartialEq)]
2230#[non_exhaustive]
2231pub struct DeleteLogicalViewRequest {
2232    /// Required. The unique name of the logical view to be deleted.
2233    /// Format:
2234    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2235    pub name: std::string::String,
2236
2237    /// Optional. The current etag of the logical view.
2238    /// If an etag is provided and does not match the current etag of the
2239    /// logical view, deletion will be blocked and an ABORTED error will be
2240    /// returned.
2241    pub etag: std::string::String,
2242
2243    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2244}
2245
2246impl DeleteLogicalViewRequest {
2247    pub fn new() -> Self {
2248        std::default::Default::default()
2249    }
2250
2251    /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
2252    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2253        self.name = v.into();
2254        self
2255    }
2256
2257    /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
2258    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2259        self.etag = v.into();
2260        self
2261    }
2262}
2263
2264impl wkt::message::Message for DeleteLogicalViewRequest {
2265    fn typename() -> &'static str {
2266        "type.googleapis.com/google.bigtable.admin.v2.DeleteLogicalViewRequest"
2267    }
2268}
2269
2270/// Request message for BigtableInstanceAdmin.CreateMaterializedView.
2271#[derive(Clone, Default, PartialEq)]
2272#[non_exhaustive]
2273pub struct CreateMaterializedViewRequest {
2274    /// Required. The parent instance where this materialized view will be created.
2275    /// Format: `projects/{project}/instances/{instance}`.
2276    pub parent: std::string::String,
2277
2278    /// Required. The ID to use for the materialized view, which will become the
2279    /// final component of the materialized view's resource name.
2280    pub materialized_view_id: std::string::String,
2281
2282    /// Required. The materialized view to create.
2283    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
2284
2285    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2286}
2287
2288impl CreateMaterializedViewRequest {
2289    pub fn new() -> Self {
2290        std::default::Default::default()
2291    }
2292
2293    /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
2294    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2295        self.parent = v.into();
2296        self
2297    }
2298
2299    /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
2300    pub fn set_materialized_view_id<T: std::convert::Into<std::string::String>>(
2301        mut self,
2302        v: T,
2303    ) -> Self {
2304        self.materialized_view_id = v.into();
2305        self
2306    }
2307
2308    /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
2309    pub fn set_materialized_view<T>(mut self, v: T) -> Self
2310    where
2311        T: std::convert::Into<crate::model::MaterializedView>,
2312    {
2313        self.materialized_view = std::option::Option::Some(v.into());
2314        self
2315    }
2316
2317    /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
2318    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
2319    where
2320        T: std::convert::Into<crate::model::MaterializedView>,
2321    {
2322        self.materialized_view = v.map(|x| x.into());
2323        self
2324    }
2325}
2326
2327impl wkt::message::Message for CreateMaterializedViewRequest {
2328    fn typename() -> &'static str {
2329        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewRequest"
2330    }
2331}
2332
2333/// The metadata for the Operation returned by CreateMaterializedView.
2334#[derive(Clone, Default, PartialEq)]
2335#[non_exhaustive]
2336pub struct CreateMaterializedViewMetadata {
2337    /// The request that prompted the initiation of this CreateMaterializedView
2338    /// operation.
2339    pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
2340
2341    /// The time at which this operation started.
2342    pub start_time: std::option::Option<wkt::Timestamp>,
2343
2344    /// If set, the time at which this operation finished or was canceled.
2345    pub end_time: std::option::Option<wkt::Timestamp>,
2346
2347    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2348}
2349
2350impl CreateMaterializedViewMetadata {
2351    pub fn new() -> Self {
2352        std::default::Default::default()
2353    }
2354
2355    /// Sets the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
2356    pub fn set_original_request<T>(mut self, v: T) -> Self
2357    where
2358        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
2359    {
2360        self.original_request = std::option::Option::Some(v.into());
2361        self
2362    }
2363
2364    /// Sets or clears the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
2365    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2366    where
2367        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
2368    {
2369        self.original_request = v.map(|x| x.into());
2370        self
2371    }
2372
2373    /// Sets the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
2374    pub fn set_start_time<T>(mut self, v: T) -> Self
2375    where
2376        T: std::convert::Into<wkt::Timestamp>,
2377    {
2378        self.start_time = std::option::Option::Some(v.into());
2379        self
2380    }
2381
2382    /// Sets or clears the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
2383    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2384    where
2385        T: std::convert::Into<wkt::Timestamp>,
2386    {
2387        self.start_time = v.map(|x| x.into());
2388        self
2389    }
2390
2391    /// Sets the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
2392    pub fn set_end_time<T>(mut self, v: T) -> Self
2393    where
2394        T: std::convert::Into<wkt::Timestamp>,
2395    {
2396        self.end_time = std::option::Option::Some(v.into());
2397        self
2398    }
2399
2400    /// Sets or clears the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
2401    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2402    where
2403        T: std::convert::Into<wkt::Timestamp>,
2404    {
2405        self.end_time = v.map(|x| x.into());
2406        self
2407    }
2408}
2409
2410impl wkt::message::Message for CreateMaterializedViewMetadata {
2411    fn typename() -> &'static str {
2412        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewMetadata"
2413    }
2414}
2415
2416/// Request message for BigtableInstanceAdmin.GetMaterializedView.
2417#[derive(Clone, Default, PartialEq)]
2418#[non_exhaustive]
2419pub struct GetMaterializedViewRequest {
2420    /// Required. The unique name of the requested materialized view. Values are of
2421    /// the form
2422    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
2423    pub name: std::string::String,
2424
2425    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2426}
2427
2428impl GetMaterializedViewRequest {
2429    pub fn new() -> Self {
2430        std::default::Default::default()
2431    }
2432
2433    /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
2434    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2435        self.name = v.into();
2436        self
2437    }
2438}
2439
2440impl wkt::message::Message for GetMaterializedViewRequest {
2441    fn typename() -> &'static str {
2442        "type.googleapis.com/google.bigtable.admin.v2.GetMaterializedViewRequest"
2443    }
2444}
2445
2446/// Request message for BigtableInstanceAdmin.ListMaterializedViews.
2447#[derive(Clone, Default, PartialEq)]
2448#[non_exhaustive]
2449pub struct ListMaterializedViewsRequest {
2450    /// Required. The unique name of the instance for which the list of
2451    /// materialized views is requested. Values are of the form
2452    /// `projects/{project}/instances/{instance}`.
2453    pub parent: std::string::String,
2454
2455    /// Optional. The maximum number of materialized views to return. The service
2456    /// may return fewer than this value
2457    pub page_size: i32,
2458
2459    /// Optional. A page token, received from a previous `ListMaterializedViews`
2460    /// call. Provide this to retrieve the subsequent page.
2461    ///
2462    /// When paginating, all other parameters provided to `ListMaterializedViews`
2463    /// must match the call that provided the page token.
2464    pub page_token: std::string::String,
2465
2466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2467}
2468
2469impl ListMaterializedViewsRequest {
2470    pub fn new() -> Self {
2471        std::default::Default::default()
2472    }
2473
2474    /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
2475    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2476        self.parent = v.into();
2477        self
2478    }
2479
2480    /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
2481    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2482        self.page_size = v.into();
2483        self
2484    }
2485
2486    /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
2487    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2488        self.page_token = v.into();
2489        self
2490    }
2491}
2492
2493impl wkt::message::Message for ListMaterializedViewsRequest {
2494    fn typename() -> &'static str {
2495        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsRequest"
2496    }
2497}
2498
2499/// Response message for BigtableInstanceAdmin.ListMaterializedViews.
2500#[derive(Clone, Default, PartialEq)]
2501#[non_exhaustive]
2502pub struct ListMaterializedViewsResponse {
2503    /// The list of requested materialized views.
2504    pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
2505
2506    /// A token, which can be sent as `page_token` to retrieve the next page.
2507    /// If this field is omitted, there are no subsequent pages.
2508    pub next_page_token: std::string::String,
2509
2510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2511}
2512
2513impl ListMaterializedViewsResponse {
2514    pub fn new() -> Self {
2515        std::default::Default::default()
2516    }
2517
2518    /// Sets the value of [materialized_views][crate::model::ListMaterializedViewsResponse::materialized_views].
2519    pub fn set_materialized_views<T, V>(mut self, v: T) -> Self
2520    where
2521        T: std::iter::IntoIterator<Item = V>,
2522        V: std::convert::Into<crate::model::MaterializedView>,
2523    {
2524        use std::iter::Iterator;
2525        self.materialized_views = v.into_iter().map(|i| i.into()).collect();
2526        self
2527    }
2528
2529    /// Sets the value of [next_page_token][crate::model::ListMaterializedViewsResponse::next_page_token].
2530    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2531        self.next_page_token = v.into();
2532        self
2533    }
2534}
2535
2536impl wkt::message::Message for ListMaterializedViewsResponse {
2537    fn typename() -> &'static str {
2538        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsResponse"
2539    }
2540}
2541
2542#[doc(hidden)]
2543impl gax::paginator::internal::PageableResponse for ListMaterializedViewsResponse {
2544    type PageItem = crate::model::MaterializedView;
2545
2546    fn items(self) -> std::vec::Vec<Self::PageItem> {
2547        self.materialized_views
2548    }
2549
2550    fn next_page_token(&self) -> std::string::String {
2551        use std::clone::Clone;
2552        self.next_page_token.clone()
2553    }
2554}
2555
2556/// Request message for BigtableInstanceAdmin.UpdateMaterializedView.
2557#[derive(Clone, Default, PartialEq)]
2558#[non_exhaustive]
2559pub struct UpdateMaterializedViewRequest {
2560    /// Required. The materialized view to update.
2561    ///
2562    /// The materialized view's `name` field is used to identify the view to
2563    /// update. Format:
2564    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
2565    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
2566
2567    /// Optional. The list of fields to update.
2568    pub update_mask: std::option::Option<wkt::FieldMask>,
2569
2570    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2571}
2572
2573impl UpdateMaterializedViewRequest {
2574    pub fn new() -> Self {
2575        std::default::Default::default()
2576    }
2577
2578    /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
2579    pub fn set_materialized_view<T>(mut self, v: T) -> Self
2580    where
2581        T: std::convert::Into<crate::model::MaterializedView>,
2582    {
2583        self.materialized_view = std::option::Option::Some(v.into());
2584        self
2585    }
2586
2587    /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
2588    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
2589    where
2590        T: std::convert::Into<crate::model::MaterializedView>,
2591    {
2592        self.materialized_view = v.map(|x| x.into());
2593        self
2594    }
2595
2596    /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
2597    pub fn set_update_mask<T>(mut self, v: T) -> Self
2598    where
2599        T: std::convert::Into<wkt::FieldMask>,
2600    {
2601        self.update_mask = std::option::Option::Some(v.into());
2602        self
2603    }
2604
2605    /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
2606    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2607    where
2608        T: std::convert::Into<wkt::FieldMask>,
2609    {
2610        self.update_mask = v.map(|x| x.into());
2611        self
2612    }
2613}
2614
2615impl wkt::message::Message for UpdateMaterializedViewRequest {
2616    fn typename() -> &'static str {
2617        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewRequest"
2618    }
2619}
2620
2621/// The metadata for the Operation returned by UpdateMaterializedView.
2622#[derive(Clone, Default, PartialEq)]
2623#[non_exhaustive]
2624pub struct UpdateMaterializedViewMetadata {
2625    /// The request that prompted the initiation of this UpdateMaterializedView
2626    /// operation.
2627    pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
2628
2629    /// The time at which this operation was started.
2630    pub start_time: std::option::Option<wkt::Timestamp>,
2631
2632    /// If set, the time at which this operation finished or was canceled.
2633    pub end_time: std::option::Option<wkt::Timestamp>,
2634
2635    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2636}
2637
2638impl UpdateMaterializedViewMetadata {
2639    pub fn new() -> Self {
2640        std::default::Default::default()
2641    }
2642
2643    /// Sets the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
2644    pub fn set_original_request<T>(mut self, v: T) -> Self
2645    where
2646        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
2647    {
2648        self.original_request = std::option::Option::Some(v.into());
2649        self
2650    }
2651
2652    /// Sets or clears the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
2653    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2654    where
2655        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
2656    {
2657        self.original_request = v.map(|x| x.into());
2658        self
2659    }
2660
2661    /// Sets the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
2662    pub fn set_start_time<T>(mut self, v: T) -> Self
2663    where
2664        T: std::convert::Into<wkt::Timestamp>,
2665    {
2666        self.start_time = std::option::Option::Some(v.into());
2667        self
2668    }
2669
2670    /// Sets or clears the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
2671    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2672    where
2673        T: std::convert::Into<wkt::Timestamp>,
2674    {
2675        self.start_time = v.map(|x| x.into());
2676        self
2677    }
2678
2679    /// Sets the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
2680    pub fn set_end_time<T>(mut self, v: T) -> Self
2681    where
2682        T: std::convert::Into<wkt::Timestamp>,
2683    {
2684        self.end_time = std::option::Option::Some(v.into());
2685        self
2686    }
2687
2688    /// Sets or clears the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
2689    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2690    where
2691        T: std::convert::Into<wkt::Timestamp>,
2692    {
2693        self.end_time = v.map(|x| x.into());
2694        self
2695    }
2696}
2697
2698impl wkt::message::Message for UpdateMaterializedViewMetadata {
2699    fn typename() -> &'static str {
2700        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"
2701    }
2702}
2703
2704/// Request message for BigtableInstanceAdmin.DeleteMaterializedView.
2705#[derive(Clone, Default, PartialEq)]
2706#[non_exhaustive]
2707pub struct DeleteMaterializedViewRequest {
2708    /// Required. The unique name of the materialized view to be deleted.
2709    /// Format:
2710    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
2711    pub name: std::string::String,
2712
2713    /// Optional. The current etag of the materialized view.
2714    /// If an etag is provided and does not match the current etag of the
2715    /// materialized view, deletion will be blocked and an ABORTED error will be
2716    /// returned.
2717    pub etag: std::string::String,
2718
2719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2720}
2721
2722impl DeleteMaterializedViewRequest {
2723    pub fn new() -> Self {
2724        std::default::Default::default()
2725    }
2726
2727    /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
2728    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2729        self.name = v.into();
2730        self
2731    }
2732
2733    /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
2734    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2735        self.etag = v.into();
2736        self
2737    }
2738}
2739
2740impl wkt::message::Message for DeleteMaterializedViewRequest {
2741    fn typename() -> &'static str {
2742        "type.googleapis.com/google.bigtable.admin.v2.DeleteMaterializedViewRequest"
2743    }
2744}
2745
2746/// The request for
2747/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
2748///
2749/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
2750#[derive(Clone, Default, PartialEq)]
2751#[non_exhaustive]
2752pub struct RestoreTableRequest {
2753    /// Required. The name of the instance in which to create the restored
2754    /// table. Values are of the form `projects/<project>/instances/<instance>`.
2755    pub parent: std::string::String,
2756
2757    /// Required. The id of the table to create and restore to. This
2758    /// table must not already exist. The `table_id` appended to
2759    /// `parent` forms the full table name of the form
2760    /// `projects/<project>/instances/<instance>/tables/<table_id>`.
2761    pub table_id: std::string::String,
2762
2763    /// Required. The source from which to restore.
2764    pub source: std::option::Option<crate::model::restore_table_request::Source>,
2765
2766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2767}
2768
2769impl RestoreTableRequest {
2770    pub fn new() -> Self {
2771        std::default::Default::default()
2772    }
2773
2774    /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
2775    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2776        self.parent = v.into();
2777        self
2778    }
2779
2780    /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
2781    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2782        self.table_id = v.into();
2783        self
2784    }
2785
2786    /// Sets the value of [source][crate::model::RestoreTableRequest::source].
2787    ///
2788    /// Note that all the setters affecting `source` are mutually
2789    /// exclusive.
2790    pub fn set_source<
2791        T: std::convert::Into<std::option::Option<crate::model::restore_table_request::Source>>,
2792    >(
2793        mut self,
2794        v: T,
2795    ) -> Self {
2796        self.source = v.into();
2797        self
2798    }
2799
2800    /// The value of [source][crate::model::RestoreTableRequest::source]
2801    /// if it holds a `Backup`, `None` if the field is not set or
2802    /// holds a different branch.
2803    pub fn backup(&self) -> std::option::Option<&std::string::String> {
2804        #[allow(unreachable_patterns)]
2805        self.source.as_ref().and_then(|v| match v {
2806            crate::model::restore_table_request::Source::Backup(v) => std::option::Option::Some(v),
2807            _ => std::option::Option::None,
2808        })
2809    }
2810
2811    /// Sets the value of [source][crate::model::RestoreTableRequest::source]
2812    /// to hold a `Backup`.
2813    ///
2814    /// Note that all the setters affecting `source` are
2815    /// mutually exclusive.
2816    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2817        self.source = std::option::Option::Some(
2818            crate::model::restore_table_request::Source::Backup(v.into()),
2819        );
2820        self
2821    }
2822}
2823
2824impl wkt::message::Message for RestoreTableRequest {
2825    fn typename() -> &'static str {
2826        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableRequest"
2827    }
2828}
2829
2830/// Defines additional types related to [RestoreTableRequest].
2831pub mod restore_table_request {
2832    #[allow(unused_imports)]
2833    use super::*;
2834
2835    /// Required. The source from which to restore.
2836    #[derive(Clone, Debug, PartialEq)]
2837    #[non_exhaustive]
2838    pub enum Source {
2839        /// Name of the backup from which to restore.  Values are of the form
2840        /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
2841        Backup(std::string::String),
2842    }
2843}
2844
2845/// Metadata type for the long-running operation returned by
2846/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
2847///
2848/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
2849#[derive(Clone, Default, PartialEq)]
2850#[non_exhaustive]
2851pub struct RestoreTableMetadata {
2852    /// Name of the table being created and restored to.
2853    pub name: std::string::String,
2854
2855    /// The type of the restore source.
2856    pub source_type: crate::model::RestoreSourceType,
2857
2858    /// If exists, the name of the long-running operation that will be used to
2859    /// track the post-restore optimization process to optimize the performance of
2860    /// the restored table. The metadata type of the long-running operation is
2861    /// [OptimizeRestoreTableMetadata][]. The response type is
2862    /// [Empty][google.protobuf.Empty]. This long-running operation may be
2863    /// automatically created by the system if applicable after the
2864    /// RestoreTable long-running operation completes successfully. This operation
2865    /// may not be created if the table is already optimized or the restore was
2866    /// not successful.
2867    ///
2868    /// [google.protobuf.Empty]: wkt::Empty
2869    pub optimize_table_operation_name: std::string::String,
2870
2871    /// The progress of the
2872    /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
2873    /// operation.
2874    ///
2875    /// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
2876    pub progress: std::option::Option<crate::model::OperationProgress>,
2877
2878    /// Information about the source used to restore the table, as specified by
2879    /// `source` in
2880    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
2881    ///
2882    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
2883    pub source_info: std::option::Option<crate::model::restore_table_metadata::SourceInfo>,
2884
2885    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2886}
2887
2888impl RestoreTableMetadata {
2889    pub fn new() -> Self {
2890        std::default::Default::default()
2891    }
2892
2893    /// Sets the value of [name][crate::model::RestoreTableMetadata::name].
2894    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2895        self.name = v.into();
2896        self
2897    }
2898
2899    /// Sets the value of [source_type][crate::model::RestoreTableMetadata::source_type].
2900    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
2901        mut self,
2902        v: T,
2903    ) -> Self {
2904        self.source_type = v.into();
2905        self
2906    }
2907
2908    /// Sets the value of [optimize_table_operation_name][crate::model::RestoreTableMetadata::optimize_table_operation_name].
2909    pub fn set_optimize_table_operation_name<T: std::convert::Into<std::string::String>>(
2910        mut self,
2911        v: T,
2912    ) -> Self {
2913        self.optimize_table_operation_name = v.into();
2914        self
2915    }
2916
2917    /// Sets the value of [progress][crate::model::RestoreTableMetadata::progress].
2918    pub fn set_progress<T>(mut self, v: T) -> Self
2919    where
2920        T: std::convert::Into<crate::model::OperationProgress>,
2921    {
2922        self.progress = std::option::Option::Some(v.into());
2923        self
2924    }
2925
2926    /// Sets or clears the value of [progress][crate::model::RestoreTableMetadata::progress].
2927    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
2928    where
2929        T: std::convert::Into<crate::model::OperationProgress>,
2930    {
2931        self.progress = v.map(|x| x.into());
2932        self
2933    }
2934
2935    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info].
2936    ///
2937    /// Note that all the setters affecting `source_info` are mutually
2938    /// exclusive.
2939    pub fn set_source_info<
2940        T: std::convert::Into<std::option::Option<crate::model::restore_table_metadata::SourceInfo>>,
2941    >(
2942        mut self,
2943        v: T,
2944    ) -> Self {
2945        self.source_info = v.into();
2946        self
2947    }
2948
2949    /// The value of [source_info][crate::model::RestoreTableMetadata::source_info]
2950    /// if it holds a `BackupInfo`, `None` if the field is not set or
2951    /// holds a different branch.
2952    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
2953        #[allow(unreachable_patterns)]
2954        self.source_info.as_ref().and_then(|v| match v {
2955            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v) => {
2956                std::option::Option::Some(v)
2957            }
2958            _ => std::option::Option::None,
2959        })
2960    }
2961
2962    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info]
2963    /// to hold a `BackupInfo`.
2964    ///
2965    /// Note that all the setters affecting `source_info` are
2966    /// mutually exclusive.
2967    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
2968        mut self,
2969        v: T,
2970    ) -> Self {
2971        self.source_info = std::option::Option::Some(
2972            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v.into()),
2973        );
2974        self
2975    }
2976}
2977
2978impl wkt::message::Message for RestoreTableMetadata {
2979    fn typename() -> &'static str {
2980        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableMetadata"
2981    }
2982}
2983
2984/// Defines additional types related to [RestoreTableMetadata].
2985pub mod restore_table_metadata {
2986    #[allow(unused_imports)]
2987    use super::*;
2988
2989    /// Information about the source used to restore the table, as specified by
2990    /// `source` in
2991    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
2992    ///
2993    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
2994    #[derive(Clone, Debug, PartialEq)]
2995    #[non_exhaustive]
2996    pub enum SourceInfo {
2997        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
2998    }
2999}
3000
3001/// Metadata type for the long-running operation used to track the progress
3002/// of optimizations performed on a newly restored table. This long-running
3003/// operation is automatically created by the system after the successful
3004/// completion of a table restore, and cannot be cancelled.
3005#[derive(Clone, Default, PartialEq)]
3006#[non_exhaustive]
3007pub struct OptimizeRestoredTableMetadata {
3008    /// Name of the restored table being optimized.
3009    pub name: std::string::String,
3010
3011    /// The progress of the post-restore optimizations.
3012    pub progress: std::option::Option<crate::model::OperationProgress>,
3013
3014    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3015}
3016
3017impl OptimizeRestoredTableMetadata {
3018    pub fn new() -> Self {
3019        std::default::Default::default()
3020    }
3021
3022    /// Sets the value of [name][crate::model::OptimizeRestoredTableMetadata::name].
3023    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3024        self.name = v.into();
3025        self
3026    }
3027
3028    /// Sets the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
3029    pub fn set_progress<T>(mut self, v: T) -> Self
3030    where
3031        T: std::convert::Into<crate::model::OperationProgress>,
3032    {
3033        self.progress = std::option::Option::Some(v.into());
3034        self
3035    }
3036
3037    /// Sets or clears the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
3038    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
3039    where
3040        T: std::convert::Into<crate::model::OperationProgress>,
3041    {
3042        self.progress = v.map(|x| x.into());
3043        self
3044    }
3045}
3046
3047impl wkt::message::Message for OptimizeRestoredTableMetadata {
3048    fn typename() -> &'static str {
3049        "type.googleapis.com/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"
3050    }
3051}
3052
3053/// Request message for
3054/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
3055///
3056/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]: crate::client::BigtableTableAdmin::create_table
3057#[derive(Clone, Default, PartialEq)]
3058#[non_exhaustive]
3059pub struct CreateTableRequest {
3060    /// Required. The unique name of the instance in which to create the table.
3061    /// Values are of the form `projects/{project}/instances/{instance}`.
3062    pub parent: std::string::String,
3063
3064    /// Required. The name by which the new table should be referred to within the
3065    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
3066    /// Maximum 50 characters.
3067    pub table_id: std::string::String,
3068
3069    /// Required. The Table to create.
3070    pub table: std::option::Option<crate::model::Table>,
3071
3072    /// The optional list of row keys that will be used to initially split the
3073    /// table into several tablets (tablets are similar to HBase regions).
3074    /// Given two split keys, `s1` and `s2`, three tablets will be created,
3075    /// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
3076    ///
3077    /// Example:
3078    ///
3079    /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
3080    ///   `"other", "zz"]`
3081    /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
3082    /// * Key assignment:
3083    ///   - Tablet 1 `[, apple)                => {"a"}.`
3084    ///   - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
3085    ///   - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
3086    ///   - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
3087    ///   - Tablet 5 `[other, )                => {"other", "zz"}.`
3088    pub initial_splits: std::vec::Vec<crate::model::create_table_request::Split>,
3089
3090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3091}
3092
3093impl CreateTableRequest {
3094    pub fn new() -> Self {
3095        std::default::Default::default()
3096    }
3097
3098    /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
3099    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3100        self.parent = v.into();
3101        self
3102    }
3103
3104    /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
3105    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3106        self.table_id = v.into();
3107        self
3108    }
3109
3110    /// Sets the value of [table][crate::model::CreateTableRequest::table].
3111    pub fn set_table<T>(mut self, v: T) -> Self
3112    where
3113        T: std::convert::Into<crate::model::Table>,
3114    {
3115        self.table = std::option::Option::Some(v.into());
3116        self
3117    }
3118
3119    /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
3120    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
3121    where
3122        T: std::convert::Into<crate::model::Table>,
3123    {
3124        self.table = v.map(|x| x.into());
3125        self
3126    }
3127
3128    /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
3129    pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
3130    where
3131        T: std::iter::IntoIterator<Item = V>,
3132        V: std::convert::Into<crate::model::create_table_request::Split>,
3133    {
3134        use std::iter::Iterator;
3135        self.initial_splits = v.into_iter().map(|i| i.into()).collect();
3136        self
3137    }
3138}
3139
3140impl wkt::message::Message for CreateTableRequest {
3141    fn typename() -> &'static str {
3142        "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest"
3143    }
3144}
3145
3146/// Defines additional types related to [CreateTableRequest].
3147pub mod create_table_request {
3148    #[allow(unused_imports)]
3149    use super::*;
3150
3151    /// An initial split point for a newly created table.
3152    #[derive(Clone, Default, PartialEq)]
3153    #[non_exhaustive]
3154    pub struct Split {
3155        /// Row key to use as an initial tablet boundary.
3156        pub key: ::bytes::Bytes,
3157
3158        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3159    }
3160
3161    impl Split {
3162        pub fn new() -> Self {
3163            std::default::Default::default()
3164        }
3165
3166        /// Sets the value of [key][crate::model::create_table_request::Split::key].
3167        pub fn set_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3168            self.key = v.into();
3169            self
3170        }
3171    }
3172
3173    impl wkt::message::Message for Split {
3174        fn typename() -> &'static str {
3175            "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest.Split"
3176        }
3177    }
3178}
3179
3180/// Request message for
3181/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
3182///
3183/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
3184/// feature is not currently available to most Cloud Bigtable customers. This
3185/// feature might be changed in backward-incompatible ways and is not recommended
3186/// for production use. It is not subject to any SLA or deprecation policy.
3187///
3188/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]: crate::client::BigtableTableAdmin::create_table_from_snapshot
3189#[derive(Clone, Default, PartialEq)]
3190#[non_exhaustive]
3191pub struct CreateTableFromSnapshotRequest {
3192    /// Required. The unique name of the instance in which to create the table.
3193    /// Values are of the form `projects/{project}/instances/{instance}`.
3194    pub parent: std::string::String,
3195
3196    /// Required. The name by which the new table should be referred to within the
3197    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
3198    pub table_id: std::string::String,
3199
3200    /// Required. The unique name of the snapshot from which to restore the table.
3201    /// The snapshot and the table must be in the same instance. Values are of the
3202    /// form
3203    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
3204    pub source_snapshot: std::string::String,
3205
3206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3207}
3208
3209impl CreateTableFromSnapshotRequest {
3210    pub fn new() -> Self {
3211        std::default::Default::default()
3212    }
3213
3214    /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
3215    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3216        self.parent = v.into();
3217        self
3218    }
3219
3220    /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
3221    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3222        self.table_id = v.into();
3223        self
3224    }
3225
3226    /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
3227    pub fn set_source_snapshot<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3228        self.source_snapshot = v.into();
3229        self
3230    }
3231}
3232
3233impl wkt::message::Message for CreateTableFromSnapshotRequest {
3234    fn typename() -> &'static str {
3235        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"
3236    }
3237}
3238
3239/// Request message for
3240/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
3241///
3242/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]: crate::client::BigtableTableAdmin::drop_row_range
3243#[derive(Clone, Default, PartialEq)]
3244#[non_exhaustive]
3245pub struct DropRowRangeRequest {
3246    /// Required. The unique name of the table on which to drop a range of rows.
3247    /// Values are of the form
3248    /// `projects/{project}/instances/{instance}/tables/{table}`.
3249    pub name: std::string::String,
3250
3251    /// Delete all rows or by prefix.
3252    pub target: std::option::Option<crate::model::drop_row_range_request::Target>,
3253
3254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3255}
3256
3257impl DropRowRangeRequest {
3258    pub fn new() -> Self {
3259        std::default::Default::default()
3260    }
3261
3262    /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
3263    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3264        self.name = v.into();
3265        self
3266    }
3267
3268    /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
3269    ///
3270    /// Note that all the setters affecting `target` are mutually
3271    /// exclusive.
3272    pub fn set_target<
3273        T: std::convert::Into<std::option::Option<crate::model::drop_row_range_request::Target>>,
3274    >(
3275        mut self,
3276        v: T,
3277    ) -> Self {
3278        self.target = v.into();
3279        self
3280    }
3281
3282    /// The value of [target][crate::model::DropRowRangeRequest::target]
3283    /// if it holds a `RowKeyPrefix`, `None` if the field is not set or
3284    /// holds a different branch.
3285    pub fn row_key_prefix(&self) -> std::option::Option<&::bytes::Bytes> {
3286        #[allow(unreachable_patterns)]
3287        self.target.as_ref().and_then(|v| match v {
3288            crate::model::drop_row_range_request::Target::RowKeyPrefix(v) => {
3289                std::option::Option::Some(v)
3290            }
3291            _ => std::option::Option::None,
3292        })
3293    }
3294
3295    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
3296    /// to hold a `RowKeyPrefix`.
3297    ///
3298    /// Note that all the setters affecting `target` are
3299    /// mutually exclusive.
3300    pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3301        self.target = std::option::Option::Some(
3302            crate::model::drop_row_range_request::Target::RowKeyPrefix(v.into()),
3303        );
3304        self
3305    }
3306
3307    /// The value of [target][crate::model::DropRowRangeRequest::target]
3308    /// if it holds a `DeleteAllDataFromTable`, `None` if the field is not set or
3309    /// holds a different branch.
3310    pub fn delete_all_data_from_table(&self) -> std::option::Option<&bool> {
3311        #[allow(unreachable_patterns)]
3312        self.target.as_ref().and_then(|v| match v {
3313            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v) => {
3314                std::option::Option::Some(v)
3315            }
3316            _ => std::option::Option::None,
3317        })
3318    }
3319
3320    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
3321    /// to hold a `DeleteAllDataFromTable`.
3322    ///
3323    /// Note that all the setters affecting `target` are
3324    /// mutually exclusive.
3325    pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3326        self.target = std::option::Option::Some(
3327            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v.into()),
3328        );
3329        self
3330    }
3331}
3332
3333impl wkt::message::Message for DropRowRangeRequest {
3334    fn typename() -> &'static str {
3335        "type.googleapis.com/google.bigtable.admin.v2.DropRowRangeRequest"
3336    }
3337}
3338
3339/// Defines additional types related to [DropRowRangeRequest].
3340pub mod drop_row_range_request {
3341    #[allow(unused_imports)]
3342    use super::*;
3343
3344    /// Delete all rows or by prefix.
3345    #[derive(Clone, Debug, PartialEq)]
3346    #[non_exhaustive]
3347    pub enum Target {
3348        /// Delete all rows that start with this row key prefix. Prefix cannot be
3349        /// zero length.
3350        RowKeyPrefix(::bytes::Bytes),
3351        /// Delete all rows in the table. Setting this to false is a no-op.
3352        DeleteAllDataFromTable(bool),
3353    }
3354}
3355
3356/// Request message for
3357/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
3358///
3359/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
3360#[derive(Clone, Default, PartialEq)]
3361#[non_exhaustive]
3362pub struct ListTablesRequest {
3363    /// Required. The unique name of the instance for which tables should be
3364    /// listed. Values are of the form `projects/{project}/instances/{instance}`.
3365    pub parent: std::string::String,
3366
3367    /// The view to be applied to the returned tables' fields.
3368    /// NAME_ONLY view (default) and REPLICATION_VIEW are supported.
3369    pub view: crate::model::table::View,
3370
3371    /// Maximum number of results per page.
3372    ///
3373    /// A page_size of zero lets the server choose the number of items to return.
3374    /// A page_size which is strictly positive will return at most that many items.
3375    /// A negative page_size will cause an error.
3376    ///
3377    /// Following the first request, subsequent paginated calls are not required
3378    /// to pass a page_size. If a page_size is set in subsequent calls, it must
3379    /// match the page_size given in the first request.
3380    pub page_size: i32,
3381
3382    /// The value of `next_page_token` returned by a previous call.
3383    pub page_token: std::string::String,
3384
3385    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3386}
3387
3388impl ListTablesRequest {
3389    pub fn new() -> Self {
3390        std::default::Default::default()
3391    }
3392
3393    /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
3394    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3395        self.parent = v.into();
3396        self
3397    }
3398
3399    /// Sets the value of [view][crate::model::ListTablesRequest::view].
3400    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
3401        self.view = v.into();
3402        self
3403    }
3404
3405    /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
3406    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3407        self.page_size = v.into();
3408        self
3409    }
3410
3411    /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
3412    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3413        self.page_token = v.into();
3414        self
3415    }
3416}
3417
3418impl wkt::message::Message for ListTablesRequest {
3419    fn typename() -> &'static str {
3420        "type.googleapis.com/google.bigtable.admin.v2.ListTablesRequest"
3421    }
3422}
3423
3424/// Response message for
3425/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
3426///
3427/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
3428#[derive(Clone, Default, PartialEq)]
3429#[non_exhaustive]
3430pub struct ListTablesResponse {
3431    /// The tables present in the requested instance.
3432    pub tables: std::vec::Vec<crate::model::Table>,
3433
3434    /// Set if not all tables could be returned in a single response.
3435    /// Pass this value to `page_token` in another request to get the next
3436    /// page of results.
3437    pub next_page_token: std::string::String,
3438
3439    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3440}
3441
3442impl ListTablesResponse {
3443    pub fn new() -> Self {
3444        std::default::Default::default()
3445    }
3446
3447    /// Sets the value of [tables][crate::model::ListTablesResponse::tables].
3448    pub fn set_tables<T, V>(mut self, v: T) -> Self
3449    where
3450        T: std::iter::IntoIterator<Item = V>,
3451        V: std::convert::Into<crate::model::Table>,
3452    {
3453        use std::iter::Iterator;
3454        self.tables = v.into_iter().map(|i| i.into()).collect();
3455        self
3456    }
3457
3458    /// Sets the value of [next_page_token][crate::model::ListTablesResponse::next_page_token].
3459    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3460        self.next_page_token = v.into();
3461        self
3462    }
3463}
3464
3465impl wkt::message::Message for ListTablesResponse {
3466    fn typename() -> &'static str {
3467        "type.googleapis.com/google.bigtable.admin.v2.ListTablesResponse"
3468    }
3469}
3470
3471#[doc(hidden)]
3472impl gax::paginator::internal::PageableResponse for ListTablesResponse {
3473    type PageItem = crate::model::Table;
3474
3475    fn items(self) -> std::vec::Vec<Self::PageItem> {
3476        self.tables
3477    }
3478
3479    fn next_page_token(&self) -> std::string::String {
3480        use std::clone::Clone;
3481        self.next_page_token.clone()
3482    }
3483}
3484
3485/// Request message for
3486/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
3487///
3488/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable]: crate::client::BigtableTableAdmin::get_table
3489#[derive(Clone, Default, PartialEq)]
3490#[non_exhaustive]
3491pub struct GetTableRequest {
3492    /// Required. The unique name of the requested table.
3493    /// Values are of the form
3494    /// `projects/{project}/instances/{instance}/tables/{table}`.
3495    pub name: std::string::String,
3496
3497    /// The view to be applied to the returned table's fields.
3498    /// Defaults to `SCHEMA_VIEW` if unspecified.
3499    pub view: crate::model::table::View,
3500
3501    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3502}
3503
3504impl GetTableRequest {
3505    pub fn new() -> Self {
3506        std::default::Default::default()
3507    }
3508
3509    /// Sets the value of [name][crate::model::GetTableRequest::name].
3510    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3511        self.name = v.into();
3512        self
3513    }
3514
3515    /// Sets the value of [view][crate::model::GetTableRequest::view].
3516    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
3517        self.view = v.into();
3518        self
3519    }
3520}
3521
3522impl wkt::message::Message for GetTableRequest {
3523    fn typename() -> &'static str {
3524        "type.googleapis.com/google.bigtable.admin.v2.GetTableRequest"
3525    }
3526}
3527
3528/// The request for
3529/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
3530///
3531/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
3532#[derive(Clone, Default, PartialEq)]
3533#[non_exhaustive]
3534pub struct UpdateTableRequest {
3535    /// Required. The table to update.
3536    /// The table's `name` field is used to identify the table to update.
3537    pub table: std::option::Option<crate::model::Table>,
3538
3539    /// Required. The list of fields to update.
3540    /// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
3541    /// field should be updated. This mask is relative to the `table` field, not to
3542    /// the request message. The wildcard (*) path is currently not supported.
3543    /// Currently UpdateTable is only supported for the following fields:
3544    ///
3545    /// * `change_stream_config`
3546    /// * `change_stream_config.retention_period`
3547    /// * `deletion_protection`
3548    /// * `row_key_schema`
3549    ///
3550    /// If `column_families` is set in `update_mask`, it will return an
3551    /// UNIMPLEMENTED error.
3552    pub update_mask: std::option::Option<wkt::FieldMask>,
3553
3554    /// Optional. If true, ignore safety checks when updating the table.
3555    pub ignore_warnings: bool,
3556
3557    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3558}
3559
3560impl UpdateTableRequest {
3561    pub fn new() -> Self {
3562        std::default::Default::default()
3563    }
3564
3565    /// Sets the value of [table][crate::model::UpdateTableRequest::table].
3566    pub fn set_table<T>(mut self, v: T) -> Self
3567    where
3568        T: std::convert::Into<crate::model::Table>,
3569    {
3570        self.table = std::option::Option::Some(v.into());
3571        self
3572    }
3573
3574    /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
3575    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
3576    where
3577        T: std::convert::Into<crate::model::Table>,
3578    {
3579        self.table = v.map(|x| x.into());
3580        self
3581    }
3582
3583    /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
3584    pub fn set_update_mask<T>(mut self, v: T) -> Self
3585    where
3586        T: std::convert::Into<wkt::FieldMask>,
3587    {
3588        self.update_mask = std::option::Option::Some(v.into());
3589        self
3590    }
3591
3592    /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
3593    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3594    where
3595        T: std::convert::Into<wkt::FieldMask>,
3596    {
3597        self.update_mask = v.map(|x| x.into());
3598        self
3599    }
3600
3601    /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
3602    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3603        self.ignore_warnings = v.into();
3604        self
3605    }
3606}
3607
3608impl wkt::message::Message for UpdateTableRequest {
3609    fn typename() -> &'static str {
3610        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableRequest"
3611    }
3612}
3613
3614/// Metadata type for the operation returned by
3615/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
3616///
3617/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
3618#[derive(Clone, Default, PartialEq)]
3619#[non_exhaustive]
3620pub struct UpdateTableMetadata {
3621    /// The name of the table being updated.
3622    pub name: std::string::String,
3623
3624    /// The time at which this operation started.
3625    pub start_time: std::option::Option<wkt::Timestamp>,
3626
3627    /// If set, the time at which this operation finished or was canceled.
3628    pub end_time: std::option::Option<wkt::Timestamp>,
3629
3630    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3631}
3632
3633impl UpdateTableMetadata {
3634    pub fn new() -> Self {
3635        std::default::Default::default()
3636    }
3637
3638    /// Sets the value of [name][crate::model::UpdateTableMetadata::name].
3639    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3640        self.name = v.into();
3641        self
3642    }
3643
3644    /// Sets the value of [start_time][crate::model::UpdateTableMetadata::start_time].
3645    pub fn set_start_time<T>(mut self, v: T) -> Self
3646    where
3647        T: std::convert::Into<wkt::Timestamp>,
3648    {
3649        self.start_time = std::option::Option::Some(v.into());
3650        self
3651    }
3652
3653    /// Sets or clears the value of [start_time][crate::model::UpdateTableMetadata::start_time].
3654    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3655    where
3656        T: std::convert::Into<wkt::Timestamp>,
3657    {
3658        self.start_time = v.map(|x| x.into());
3659        self
3660    }
3661
3662    /// Sets the value of [end_time][crate::model::UpdateTableMetadata::end_time].
3663    pub fn set_end_time<T>(mut self, v: T) -> Self
3664    where
3665        T: std::convert::Into<wkt::Timestamp>,
3666    {
3667        self.end_time = std::option::Option::Some(v.into());
3668        self
3669    }
3670
3671    /// Sets or clears the value of [end_time][crate::model::UpdateTableMetadata::end_time].
3672    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3673    where
3674        T: std::convert::Into<wkt::Timestamp>,
3675    {
3676        self.end_time = v.map(|x| x.into());
3677        self
3678    }
3679}
3680
3681impl wkt::message::Message for UpdateTableMetadata {
3682    fn typename() -> &'static str {
3683        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableMetadata"
3684    }
3685}
3686
3687/// Request message for
3688/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
3689///
3690/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]: crate::client::BigtableTableAdmin::delete_table
3691#[derive(Clone, Default, PartialEq)]
3692#[non_exhaustive]
3693pub struct DeleteTableRequest {
3694    /// Required. The unique name of the table to be deleted.
3695    /// Values are of the form
3696    /// `projects/{project}/instances/{instance}/tables/{table}`.
3697    pub name: std::string::String,
3698
3699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3700}
3701
3702impl DeleteTableRequest {
3703    pub fn new() -> Self {
3704        std::default::Default::default()
3705    }
3706
3707    /// Sets the value of [name][crate::model::DeleteTableRequest::name].
3708    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3709        self.name = v.into();
3710        self
3711    }
3712}
3713
3714impl wkt::message::Message for DeleteTableRequest {
3715    fn typename() -> &'static str {
3716        "type.googleapis.com/google.bigtable.admin.v2.DeleteTableRequest"
3717    }
3718}
3719
3720/// Request message for
3721/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
3722///
3723/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
3724#[derive(Clone, Default, PartialEq)]
3725#[non_exhaustive]
3726pub struct UndeleteTableRequest {
3727    /// Required. The unique name of the table to be restored.
3728    /// Values are of the form
3729    /// `projects/{project}/instances/{instance}/tables/{table}`.
3730    pub name: std::string::String,
3731
3732    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3733}
3734
3735impl UndeleteTableRequest {
3736    pub fn new() -> Self {
3737        std::default::Default::default()
3738    }
3739
3740    /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
3741    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3742        self.name = v.into();
3743        self
3744    }
3745}
3746
3747impl wkt::message::Message for UndeleteTableRequest {
3748    fn typename() -> &'static str {
3749        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableRequest"
3750    }
3751}
3752
3753/// Metadata type for the operation returned by
3754/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
3755///
3756/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
3757#[derive(Clone, Default, PartialEq)]
3758#[non_exhaustive]
3759pub struct UndeleteTableMetadata {
3760    /// The name of the table being restored.
3761    pub name: std::string::String,
3762
3763    /// The time at which this operation started.
3764    pub start_time: std::option::Option<wkt::Timestamp>,
3765
3766    /// If set, the time at which this operation finished or was cancelled.
3767    pub end_time: std::option::Option<wkt::Timestamp>,
3768
3769    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3770}
3771
3772impl UndeleteTableMetadata {
3773    pub fn new() -> Self {
3774        std::default::Default::default()
3775    }
3776
3777    /// Sets the value of [name][crate::model::UndeleteTableMetadata::name].
3778    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3779        self.name = v.into();
3780        self
3781    }
3782
3783    /// Sets the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
3784    pub fn set_start_time<T>(mut self, v: T) -> Self
3785    where
3786        T: std::convert::Into<wkt::Timestamp>,
3787    {
3788        self.start_time = std::option::Option::Some(v.into());
3789        self
3790    }
3791
3792    /// Sets or clears the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
3793    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3794    where
3795        T: std::convert::Into<wkt::Timestamp>,
3796    {
3797        self.start_time = v.map(|x| x.into());
3798        self
3799    }
3800
3801    /// Sets the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
3802    pub fn set_end_time<T>(mut self, v: T) -> Self
3803    where
3804        T: std::convert::Into<wkt::Timestamp>,
3805    {
3806        self.end_time = std::option::Option::Some(v.into());
3807        self
3808    }
3809
3810    /// Sets or clears the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
3811    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3812    where
3813        T: std::convert::Into<wkt::Timestamp>,
3814    {
3815        self.end_time = v.map(|x| x.into());
3816        self
3817    }
3818}
3819
3820impl wkt::message::Message for UndeleteTableMetadata {
3821    fn typename() -> &'static str {
3822        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableMetadata"
3823    }
3824}
3825
3826/// Request message for
3827/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
3828///
3829/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]: crate::client::BigtableTableAdmin::modify_column_families
3830#[derive(Clone, Default, PartialEq)]
3831#[non_exhaustive]
3832pub struct ModifyColumnFamiliesRequest {
3833    /// Required. The unique name of the table whose families should be modified.
3834    /// Values are of the form
3835    /// `projects/{project}/instances/{instance}/tables/{table}`.
3836    pub name: std::string::String,
3837
3838    /// Required. Modifications to be atomically applied to the specified table's
3839    /// families. Entries are applied in order, meaning that earlier modifications
3840    /// can be masked by later ones (in the case of repeated updates to the same
3841    /// family, for example).
3842    pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
3843
3844    /// Optional. If true, ignore safety checks when modifying the column families.
3845    pub ignore_warnings: bool,
3846
3847    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3848}
3849
3850impl ModifyColumnFamiliesRequest {
3851    pub fn new() -> Self {
3852        std::default::Default::default()
3853    }
3854
3855    /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
3856    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3857        self.name = v.into();
3858        self
3859    }
3860
3861    /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
3862    pub fn set_modifications<T, V>(mut self, v: T) -> Self
3863    where
3864        T: std::iter::IntoIterator<Item = V>,
3865        V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
3866    {
3867        use std::iter::Iterator;
3868        self.modifications = v.into_iter().map(|i| i.into()).collect();
3869        self
3870    }
3871
3872    /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
3873    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3874        self.ignore_warnings = v.into();
3875        self
3876    }
3877}
3878
3879impl wkt::message::Message for ModifyColumnFamiliesRequest {
3880    fn typename() -> &'static str {
3881        "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"
3882    }
3883}
3884
3885/// Defines additional types related to [ModifyColumnFamiliesRequest].
3886pub mod modify_column_families_request {
3887    #[allow(unused_imports)]
3888    use super::*;
3889
3890    /// A create, update, or delete of a particular column family.
3891    #[derive(Clone, Default, PartialEq)]
3892    #[non_exhaustive]
3893    pub struct Modification {
3894        /// The ID of the column family to be modified.
3895        pub id: std::string::String,
3896
3897        /// Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
3898        /// mod should be updated, ignored for other modification types. If unset or
3899        /// empty, we treat it as updating `gc_rule` to be backward compatible.
3900        pub update_mask: std::option::Option<wkt::FieldMask>,
3901
3902        /// Column family modifications.
3903        pub r#mod:
3904            std::option::Option<crate::model::modify_column_families_request::modification::Mod>,
3905
3906        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3907    }
3908
3909    impl Modification {
3910        pub fn new() -> Self {
3911            std::default::Default::default()
3912        }
3913
3914        /// Sets the value of [id][crate::model::modify_column_families_request::Modification::id].
3915        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3916            self.id = v.into();
3917            self
3918        }
3919
3920        /// Sets the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
3921        pub fn set_update_mask<T>(mut self, v: T) -> Self
3922        where
3923            T: std::convert::Into<wkt::FieldMask>,
3924        {
3925            self.update_mask = std::option::Option::Some(v.into());
3926            self
3927        }
3928
3929        /// Sets or clears the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
3930        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3931        where
3932            T: std::convert::Into<wkt::FieldMask>,
3933        {
3934            self.update_mask = v.map(|x| x.into());
3935            self
3936        }
3937
3938        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::mod].
3939        ///
3940        /// Note that all the setters affecting `r#mod` are mutually
3941        /// exclusive.
3942        pub fn set_mod<
3943            T: std::convert::Into<
3944                    std::option::Option<
3945                        crate::model::modify_column_families_request::modification::Mod,
3946                    >,
3947                >,
3948        >(
3949            mut self,
3950            v: T,
3951        ) -> Self {
3952            self.r#mod = v.into();
3953            self
3954        }
3955
3956        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
3957        /// if it holds a `Create`, `None` if the field is not set or
3958        /// holds a different branch.
3959        pub fn create(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
3960            #[allow(unreachable_patterns)]
3961            self.r#mod.as_ref().and_then(|v| match v {
3962                crate::model::modify_column_families_request::modification::Mod::Create(v) => {
3963                    std::option::Option::Some(v)
3964                }
3965                _ => std::option::Option::None,
3966            })
3967        }
3968
3969        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
3970        /// to hold a `Create`.
3971        ///
3972        /// Note that all the setters affecting `r#mod` are
3973        /// mutually exclusive.
3974        pub fn set_create<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
3975            mut self,
3976            v: T,
3977        ) -> Self {
3978            self.r#mod = std::option::Option::Some(
3979                crate::model::modify_column_families_request::modification::Mod::Create(v.into()),
3980            );
3981            self
3982        }
3983
3984        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
3985        /// if it holds a `Update`, `None` if the field is not set or
3986        /// holds a different branch.
3987        pub fn update(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
3988            #[allow(unreachable_patterns)]
3989            self.r#mod.as_ref().and_then(|v| match v {
3990                crate::model::modify_column_families_request::modification::Mod::Update(v) => {
3991                    std::option::Option::Some(v)
3992                }
3993                _ => std::option::Option::None,
3994            })
3995        }
3996
3997        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
3998        /// to hold a `Update`.
3999        ///
4000        /// Note that all the setters affecting `r#mod` are
4001        /// mutually exclusive.
4002        pub fn set_update<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
4003            mut self,
4004            v: T,
4005        ) -> Self {
4006            self.r#mod = std::option::Option::Some(
4007                crate::model::modify_column_families_request::modification::Mod::Update(v.into()),
4008            );
4009            self
4010        }
4011
4012        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
4013        /// if it holds a `Drop`, `None` if the field is not set or
4014        /// holds a different branch.
4015        pub fn drop(&self) -> std::option::Option<&bool> {
4016            #[allow(unreachable_patterns)]
4017            self.r#mod.as_ref().and_then(|v| match v {
4018                crate::model::modify_column_families_request::modification::Mod::Drop(v) => {
4019                    std::option::Option::Some(v)
4020                }
4021                _ => std::option::Option::None,
4022            })
4023        }
4024
4025        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
4026        /// to hold a `Drop`.
4027        ///
4028        /// Note that all the setters affecting `r#mod` are
4029        /// mutually exclusive.
4030        pub fn set_drop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4031            self.r#mod = std::option::Option::Some(
4032                crate::model::modify_column_families_request::modification::Mod::Drop(v.into()),
4033            );
4034            self
4035        }
4036    }
4037
4038    impl wkt::message::Message for Modification {
4039        fn typename() -> &'static str {
4040            "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"
4041        }
4042    }
4043
4044    /// Defines additional types related to [Modification].
4045    pub mod modification {
4046        #[allow(unused_imports)]
4047        use super::*;
4048
4049        /// Column family modifications.
4050        #[derive(Clone, Debug, PartialEq)]
4051        #[non_exhaustive]
4052        pub enum Mod {
4053            /// Create a new column family with the specified schema, or fail if
4054            /// one already exists with the given ID.
4055            Create(std::boxed::Box<crate::model::ColumnFamily>),
4056            /// Update an existing column family to the specified schema, or fail
4057            /// if no column family exists with the given ID.
4058            Update(std::boxed::Box<crate::model::ColumnFamily>),
4059            /// Drop (delete) the column family with the given ID, or fail if no such
4060            /// family exists.
4061            Drop(bool),
4062        }
4063    }
4064}
4065
4066/// Request message for
4067/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
4068///
4069/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
4070#[derive(Clone, Default, PartialEq)]
4071#[non_exhaustive]
4072pub struct GenerateConsistencyTokenRequest {
4073    /// Required. The unique name of the Table for which to create a consistency
4074    /// token. Values are of the form
4075    /// `projects/{project}/instances/{instance}/tables/{table}`.
4076    pub name: std::string::String,
4077
4078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4079}
4080
4081impl GenerateConsistencyTokenRequest {
4082    pub fn new() -> Self {
4083        std::default::Default::default()
4084    }
4085
4086    /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
4087    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4088        self.name = v.into();
4089        self
4090    }
4091}
4092
4093impl wkt::message::Message for GenerateConsistencyTokenRequest {
4094    fn typename() -> &'static str {
4095        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"
4096    }
4097}
4098
4099/// Response message for
4100/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
4101///
4102/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
4103#[derive(Clone, Default, PartialEq)]
4104#[non_exhaustive]
4105pub struct GenerateConsistencyTokenResponse {
4106    /// The generated consistency token.
4107    pub consistency_token: std::string::String,
4108
4109    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4110}
4111
4112impl GenerateConsistencyTokenResponse {
4113    pub fn new() -> Self {
4114        std::default::Default::default()
4115    }
4116
4117    /// Sets the value of [consistency_token][crate::model::GenerateConsistencyTokenResponse::consistency_token].
4118    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
4119        mut self,
4120        v: T,
4121    ) -> Self {
4122        self.consistency_token = v.into();
4123        self
4124    }
4125}
4126
4127impl wkt::message::Message for GenerateConsistencyTokenResponse {
4128    fn typename() -> &'static str {
4129        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"
4130    }
4131}
4132
4133/// Request message for
4134/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
4135///
4136/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
4137#[derive(Clone, Default, PartialEq)]
4138#[non_exhaustive]
4139pub struct CheckConsistencyRequest {
4140    /// Required. The unique name of the Table for which to check replication
4141    /// consistency. Values are of the form
4142    /// `projects/{project}/instances/{instance}/tables/{table}`.
4143    pub name: std::string::String,
4144
4145    /// Required. The token created using GenerateConsistencyToken for the Table.
4146    pub consistency_token: std::string::String,
4147
4148    /// Which type of read needs to consistently observe which type of write?
4149    /// Default: `standard_read_remote_writes`
4150    pub mode: std::option::Option<crate::model::check_consistency_request::Mode>,
4151
4152    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4153}
4154
4155impl CheckConsistencyRequest {
4156    pub fn new() -> Self {
4157        std::default::Default::default()
4158    }
4159
4160    /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
4161    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4162        self.name = v.into();
4163        self
4164    }
4165
4166    /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
4167    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
4168        mut self,
4169        v: T,
4170    ) -> Self {
4171        self.consistency_token = v.into();
4172        self
4173    }
4174
4175    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
4176    ///
4177    /// Note that all the setters affecting `mode` are mutually
4178    /// exclusive.
4179    pub fn set_mode<
4180        T: std::convert::Into<std::option::Option<crate::model::check_consistency_request::Mode>>,
4181    >(
4182        mut self,
4183        v: T,
4184    ) -> Self {
4185        self.mode = v.into();
4186        self
4187    }
4188
4189    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
4190    /// if it holds a `StandardReadRemoteWrites`, `None` if the field is not set or
4191    /// holds a different branch.
4192    pub fn standard_read_remote_writes(
4193        &self,
4194    ) -> std::option::Option<&std::boxed::Box<crate::model::StandardReadRemoteWrites>> {
4195        #[allow(unreachable_patterns)]
4196        self.mode.as_ref().and_then(|v| match v {
4197            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v) => {
4198                std::option::Option::Some(v)
4199            }
4200            _ => std::option::Option::None,
4201        })
4202    }
4203
4204    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
4205    /// to hold a `StandardReadRemoteWrites`.
4206    ///
4207    /// Note that all the setters affecting `mode` are
4208    /// mutually exclusive.
4209    pub fn set_standard_read_remote_writes<
4210        T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
4211    >(
4212        mut self,
4213        v: T,
4214    ) -> Self {
4215        self.mode = std::option::Option::Some(
4216            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v.into()),
4217        );
4218        self
4219    }
4220
4221    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
4222    /// if it holds a `DataBoostReadLocalWrites`, `None` if the field is not set or
4223    /// holds a different branch.
4224    pub fn data_boost_read_local_writes(
4225        &self,
4226    ) -> std::option::Option<&std::boxed::Box<crate::model::DataBoostReadLocalWrites>> {
4227        #[allow(unreachable_patterns)]
4228        self.mode.as_ref().and_then(|v| match v {
4229            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v) => {
4230                std::option::Option::Some(v)
4231            }
4232            _ => std::option::Option::None,
4233        })
4234    }
4235
4236    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
4237    /// to hold a `DataBoostReadLocalWrites`.
4238    ///
4239    /// Note that all the setters affecting `mode` are
4240    /// mutually exclusive.
4241    pub fn set_data_boost_read_local_writes<
4242        T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
4243    >(
4244        mut self,
4245        v: T,
4246    ) -> Self {
4247        self.mode = std::option::Option::Some(
4248            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v.into()),
4249        );
4250        self
4251    }
4252}
4253
4254impl wkt::message::Message for CheckConsistencyRequest {
4255    fn typename() -> &'static str {
4256        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyRequest"
4257    }
4258}
4259
4260/// Defines additional types related to [CheckConsistencyRequest].
4261pub mod check_consistency_request {
4262    #[allow(unused_imports)]
4263    use super::*;
4264
4265    /// Which type of read needs to consistently observe which type of write?
4266    /// Default: `standard_read_remote_writes`
4267    #[derive(Clone, Debug, PartialEq)]
4268    #[non_exhaustive]
4269    pub enum Mode {
4270        /// Checks that reads using an app profile with `StandardIsolation` can
4271        /// see all writes committed before the token was created, even if the
4272        /// read and write target different clusters.
4273        StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
4274        /// Checks that reads using an app profile with `DataBoostIsolationReadOnly`
4275        /// can see all writes committed before the token was created, but only if
4276        /// the read and write target the same cluster.
4277        DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
4278    }
4279}
4280
4281/// Checks that all writes before the consistency token was generated are
4282/// replicated in every cluster and readable.
4283#[derive(Clone, Default, PartialEq)]
4284#[non_exhaustive]
4285pub struct StandardReadRemoteWrites {
4286    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4287}
4288
4289impl StandardReadRemoteWrites {
4290    pub fn new() -> Self {
4291        std::default::Default::default()
4292    }
4293}
4294
4295impl wkt::message::Message for StandardReadRemoteWrites {
4296    fn typename() -> &'static str {
4297        "type.googleapis.com/google.bigtable.admin.v2.StandardReadRemoteWrites"
4298    }
4299}
4300
4301/// Checks that all writes before the consistency token was generated in the same
4302/// cluster are readable by Databoost.
4303#[derive(Clone, Default, PartialEq)]
4304#[non_exhaustive]
4305pub struct DataBoostReadLocalWrites {
4306    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4307}
4308
4309impl DataBoostReadLocalWrites {
4310    pub fn new() -> Self {
4311        std::default::Default::default()
4312    }
4313}
4314
4315impl wkt::message::Message for DataBoostReadLocalWrites {
4316    fn typename() -> &'static str {
4317        "type.googleapis.com/google.bigtable.admin.v2.DataBoostReadLocalWrites"
4318    }
4319}
4320
4321/// Response message for
4322/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
4323///
4324/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
4325#[derive(Clone, Default, PartialEq)]
4326#[non_exhaustive]
4327pub struct CheckConsistencyResponse {
4328    /// True only if the token is consistent. A token is consistent if replication
4329    /// has caught up with the restrictions specified in the request.
4330    pub consistent: bool,
4331
4332    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4333}
4334
4335impl CheckConsistencyResponse {
4336    pub fn new() -> Self {
4337        std::default::Default::default()
4338    }
4339
4340    /// Sets the value of [consistent][crate::model::CheckConsistencyResponse::consistent].
4341    pub fn set_consistent<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4342        self.consistent = v.into();
4343        self
4344    }
4345}
4346
4347impl wkt::message::Message for CheckConsistencyResponse {
4348    fn typename() -> &'static str {
4349        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyResponse"
4350    }
4351}
4352
4353/// Request message for
4354/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
4355///
4356/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4357/// feature is not currently available to most Cloud Bigtable customers. This
4358/// feature might be changed in backward-incompatible ways and is not recommended
4359/// for production use. It is not subject to any SLA or deprecation policy.
4360///
4361/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]: crate::client::BigtableTableAdmin::snapshot_table
4362#[derive(Clone, Default, PartialEq)]
4363#[non_exhaustive]
4364pub struct SnapshotTableRequest {
4365    /// Required. The unique name of the table to have the snapshot taken.
4366    /// Values are of the form
4367    /// `projects/{project}/instances/{instance}/tables/{table}`.
4368    pub name: std::string::String,
4369
4370    /// Required. The name of the cluster where the snapshot will be created in.
4371    /// Values are of the form
4372    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
4373    pub cluster: std::string::String,
4374
4375    /// Required. The ID by which the new snapshot should be referred to within the
4376    /// parent cluster, e.g., `mysnapshot` of the form:
4377    /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
4378    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
4379    pub snapshot_id: std::string::String,
4380
4381    /// The amount of time that the new snapshot can stay active after it is
4382    /// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
4383    /// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
4384    /// specified, the default value of 24 hours will be used.
4385    pub ttl: std::option::Option<wkt::Duration>,
4386
4387    /// Description of the snapshot.
4388    pub description: std::string::String,
4389
4390    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4391}
4392
4393impl SnapshotTableRequest {
4394    pub fn new() -> Self {
4395        std::default::Default::default()
4396    }
4397
4398    /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
4399    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4400        self.name = v.into();
4401        self
4402    }
4403
4404    /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
4405    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4406        self.cluster = v.into();
4407        self
4408    }
4409
4410    /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
4411    pub fn set_snapshot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4412        self.snapshot_id = v.into();
4413        self
4414    }
4415
4416    /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
4417    pub fn set_ttl<T>(mut self, v: T) -> Self
4418    where
4419        T: std::convert::Into<wkt::Duration>,
4420    {
4421        self.ttl = std::option::Option::Some(v.into());
4422        self
4423    }
4424
4425    /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
4426    pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
4427    where
4428        T: std::convert::Into<wkt::Duration>,
4429    {
4430        self.ttl = v.map(|x| x.into());
4431        self
4432    }
4433
4434    /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
4435    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4436        self.description = v.into();
4437        self
4438    }
4439}
4440
4441impl wkt::message::Message for SnapshotTableRequest {
4442    fn typename() -> &'static str {
4443        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableRequest"
4444    }
4445}
4446
4447/// Request message for
4448/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
4449///
4450/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4451/// feature is not currently available to most Cloud Bigtable customers. This
4452/// feature might be changed in backward-incompatible ways and is not recommended
4453/// for production use. It is not subject to any SLA or deprecation policy.
4454///
4455/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]: crate::client::BigtableTableAdmin::get_snapshot
4456#[derive(Clone, Default, PartialEq)]
4457#[non_exhaustive]
4458pub struct GetSnapshotRequest {
4459    /// Required. The unique name of the requested snapshot.
4460    /// Values are of the form
4461    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4462    pub name: std::string::String,
4463
4464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4465}
4466
4467impl GetSnapshotRequest {
4468    pub fn new() -> Self {
4469        std::default::Default::default()
4470    }
4471
4472    /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
4473    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4474        self.name = v.into();
4475        self
4476    }
4477}
4478
4479impl wkt::message::Message for GetSnapshotRequest {
4480    fn typename() -> &'static str {
4481        "type.googleapis.com/google.bigtable.admin.v2.GetSnapshotRequest"
4482    }
4483}
4484
4485/// Request message for
4486/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
4487///
4488/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4489/// feature is not currently available to most Cloud Bigtable customers. This
4490/// feature might be changed in backward-incompatible ways and is not recommended
4491/// for production use. It is not subject to any SLA or deprecation policy.
4492///
4493/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
4494#[derive(Clone, Default, PartialEq)]
4495#[non_exhaustive]
4496pub struct ListSnapshotsRequest {
4497    /// Required. The unique name of the cluster for which snapshots should be
4498    /// listed. Values are of the form
4499    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
4500    /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
4501    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
4502    pub parent: std::string::String,
4503
4504    /// The maximum number of snapshots to return per page.
4505    /// CURRENTLY UNIMPLEMENTED AND IGNORED.
4506    pub page_size: i32,
4507
4508    /// The value of `next_page_token` returned by a previous call.
4509    pub page_token: std::string::String,
4510
4511    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4512}
4513
4514impl ListSnapshotsRequest {
4515    pub fn new() -> Self {
4516        std::default::Default::default()
4517    }
4518
4519    /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
4520    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4521        self.parent = v.into();
4522        self
4523    }
4524
4525    /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
4526    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4527        self.page_size = v.into();
4528        self
4529    }
4530
4531    /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
4532    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4533        self.page_token = v.into();
4534        self
4535    }
4536}
4537
4538impl wkt::message::Message for ListSnapshotsRequest {
4539    fn typename() -> &'static str {
4540        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsRequest"
4541    }
4542}
4543
4544/// Response message for
4545/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
4546///
4547/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4548/// feature is not currently available to most Cloud Bigtable customers. This
4549/// feature might be changed in backward-incompatible ways and is not recommended
4550/// for production use. It is not subject to any SLA or deprecation policy.
4551///
4552/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
4553#[derive(Clone, Default, PartialEq)]
4554#[non_exhaustive]
4555pub struct ListSnapshotsResponse {
4556    /// The snapshots present in the requested cluster.
4557    pub snapshots: std::vec::Vec<crate::model::Snapshot>,
4558
4559    /// Set if not all snapshots could be returned in a single response.
4560    /// Pass this value to `page_token` in another request to get the next
4561    /// page of results.
4562    pub next_page_token: std::string::String,
4563
4564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4565}
4566
4567impl ListSnapshotsResponse {
4568    pub fn new() -> Self {
4569        std::default::Default::default()
4570    }
4571
4572    /// Sets the value of [snapshots][crate::model::ListSnapshotsResponse::snapshots].
4573    pub fn set_snapshots<T, V>(mut self, v: T) -> Self
4574    where
4575        T: std::iter::IntoIterator<Item = V>,
4576        V: std::convert::Into<crate::model::Snapshot>,
4577    {
4578        use std::iter::Iterator;
4579        self.snapshots = v.into_iter().map(|i| i.into()).collect();
4580        self
4581    }
4582
4583    /// Sets the value of [next_page_token][crate::model::ListSnapshotsResponse::next_page_token].
4584    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4585        self.next_page_token = v.into();
4586        self
4587    }
4588}
4589
4590impl wkt::message::Message for ListSnapshotsResponse {
4591    fn typename() -> &'static str {
4592        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsResponse"
4593    }
4594}
4595
4596#[doc(hidden)]
4597impl gax::paginator::internal::PageableResponse for ListSnapshotsResponse {
4598    type PageItem = crate::model::Snapshot;
4599
4600    fn items(self) -> std::vec::Vec<Self::PageItem> {
4601        self.snapshots
4602    }
4603
4604    fn next_page_token(&self) -> std::string::String {
4605        use std::clone::Clone;
4606        self.next_page_token.clone()
4607    }
4608}
4609
4610/// Request message for
4611/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
4612///
4613/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4614/// feature is not currently available to most Cloud Bigtable customers. This
4615/// feature might be changed in backward-incompatible ways and is not recommended
4616/// for production use. It is not subject to any SLA or deprecation policy.
4617///
4618/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]: crate::client::BigtableTableAdmin::delete_snapshot
4619#[derive(Clone, Default, PartialEq)]
4620#[non_exhaustive]
4621pub struct DeleteSnapshotRequest {
4622    /// Required. The unique name of the snapshot to be deleted.
4623    /// Values are of the form
4624    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4625    pub name: std::string::String,
4626
4627    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4628}
4629
4630impl DeleteSnapshotRequest {
4631    pub fn new() -> Self {
4632        std::default::Default::default()
4633    }
4634
4635    /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
4636    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4637        self.name = v.into();
4638        self
4639    }
4640}
4641
4642impl wkt::message::Message for DeleteSnapshotRequest {
4643    fn typename() -> &'static str {
4644        "type.googleapis.com/google.bigtable.admin.v2.DeleteSnapshotRequest"
4645    }
4646}
4647
4648/// The metadata for the Operation returned by SnapshotTable.
4649///
4650/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4651/// feature is not currently available to most Cloud Bigtable customers. This
4652/// feature might be changed in backward-incompatible ways and is not recommended
4653/// for production use. It is not subject to any SLA or deprecation policy.
4654#[derive(Clone, Default, PartialEq)]
4655#[non_exhaustive]
4656pub struct SnapshotTableMetadata {
4657    /// The request that prompted the initiation of this SnapshotTable operation.
4658    pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
4659
4660    /// The time at which the original request was received.
4661    pub request_time: std::option::Option<wkt::Timestamp>,
4662
4663    /// The time at which the operation failed or was completed successfully.
4664    pub finish_time: std::option::Option<wkt::Timestamp>,
4665
4666    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4667}
4668
4669impl SnapshotTableMetadata {
4670    pub fn new() -> Self {
4671        std::default::Default::default()
4672    }
4673
4674    /// Sets the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
4675    pub fn set_original_request<T>(mut self, v: T) -> Self
4676    where
4677        T: std::convert::Into<crate::model::SnapshotTableRequest>,
4678    {
4679        self.original_request = std::option::Option::Some(v.into());
4680        self
4681    }
4682
4683    /// Sets or clears the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
4684    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
4685    where
4686        T: std::convert::Into<crate::model::SnapshotTableRequest>,
4687    {
4688        self.original_request = v.map(|x| x.into());
4689        self
4690    }
4691
4692    /// Sets the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
4693    pub fn set_request_time<T>(mut self, v: T) -> Self
4694    where
4695        T: std::convert::Into<wkt::Timestamp>,
4696    {
4697        self.request_time = std::option::Option::Some(v.into());
4698        self
4699    }
4700
4701    /// Sets or clears the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
4702    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
4703    where
4704        T: std::convert::Into<wkt::Timestamp>,
4705    {
4706        self.request_time = v.map(|x| x.into());
4707        self
4708    }
4709
4710    /// Sets the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
4711    pub fn set_finish_time<T>(mut self, v: T) -> Self
4712    where
4713        T: std::convert::Into<wkt::Timestamp>,
4714    {
4715        self.finish_time = std::option::Option::Some(v.into());
4716        self
4717    }
4718
4719    /// Sets or clears the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
4720    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
4721    where
4722        T: std::convert::Into<wkt::Timestamp>,
4723    {
4724        self.finish_time = v.map(|x| x.into());
4725        self
4726    }
4727}
4728
4729impl wkt::message::Message for SnapshotTableMetadata {
4730    fn typename() -> &'static str {
4731        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableMetadata"
4732    }
4733}
4734
4735/// The metadata for the Operation returned by CreateTableFromSnapshot.
4736///
4737/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4738/// feature is not currently available to most Cloud Bigtable customers. This
4739/// feature might be changed in backward-incompatible ways and is not recommended
4740/// for production use. It is not subject to any SLA or deprecation policy.
4741#[derive(Clone, Default, PartialEq)]
4742#[non_exhaustive]
4743pub struct CreateTableFromSnapshotMetadata {
4744    /// The request that prompted the initiation of this CreateTableFromSnapshot
4745    /// operation.
4746    pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
4747
4748    /// The time at which the original request was received.
4749    pub request_time: std::option::Option<wkt::Timestamp>,
4750
4751    /// The time at which the operation failed or was completed successfully.
4752    pub finish_time: std::option::Option<wkt::Timestamp>,
4753
4754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4755}
4756
4757impl CreateTableFromSnapshotMetadata {
4758    pub fn new() -> Self {
4759        std::default::Default::default()
4760    }
4761
4762    /// Sets the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
4763    pub fn set_original_request<T>(mut self, v: T) -> Self
4764    where
4765        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
4766    {
4767        self.original_request = std::option::Option::Some(v.into());
4768        self
4769    }
4770
4771    /// Sets or clears the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
4772    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
4773    where
4774        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
4775    {
4776        self.original_request = v.map(|x| x.into());
4777        self
4778    }
4779
4780    /// Sets the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
4781    pub fn set_request_time<T>(mut self, v: T) -> Self
4782    where
4783        T: std::convert::Into<wkt::Timestamp>,
4784    {
4785        self.request_time = std::option::Option::Some(v.into());
4786        self
4787    }
4788
4789    /// Sets or clears the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
4790    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
4791    where
4792        T: std::convert::Into<wkt::Timestamp>,
4793    {
4794        self.request_time = v.map(|x| x.into());
4795        self
4796    }
4797
4798    /// Sets the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
4799    pub fn set_finish_time<T>(mut self, v: T) -> Self
4800    where
4801        T: std::convert::Into<wkt::Timestamp>,
4802    {
4803        self.finish_time = std::option::Option::Some(v.into());
4804        self
4805    }
4806
4807    /// Sets or clears the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
4808    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
4809    where
4810        T: std::convert::Into<wkt::Timestamp>,
4811    {
4812        self.finish_time = v.map(|x| x.into());
4813        self
4814    }
4815}
4816
4817impl wkt::message::Message for CreateTableFromSnapshotMetadata {
4818    fn typename() -> &'static str {
4819        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"
4820    }
4821}
4822
4823/// The request for
4824/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
4825///
4826/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
4827#[derive(Clone, Default, PartialEq)]
4828#[non_exhaustive]
4829pub struct CreateBackupRequest {
4830    /// Required. This must be one of the clusters in the instance in which this
4831    /// table is located. The backup will be stored in this cluster. Values are
4832    /// of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
4833    pub parent: std::string::String,
4834
4835    /// Required. The id of the backup to be created. The `backup_id` along with
4836    /// the parent `parent` are combined as {parent}/backups/{backup_id} to create
4837    /// the full backup name, of the form:
4838    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
4839    /// This string must be between 1 and 50 characters in length and match the
4840    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
4841    pub backup_id: std::string::String,
4842
4843    /// Required. The backup to create.
4844    pub backup: std::option::Option<crate::model::Backup>,
4845
4846    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4847}
4848
4849impl CreateBackupRequest {
4850    pub fn new() -> Self {
4851        std::default::Default::default()
4852    }
4853
4854    /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
4855    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4856        self.parent = v.into();
4857        self
4858    }
4859
4860    /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
4861    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4862        self.backup_id = v.into();
4863        self
4864    }
4865
4866    /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
4867    pub fn set_backup<T>(mut self, v: T) -> Self
4868    where
4869        T: std::convert::Into<crate::model::Backup>,
4870    {
4871        self.backup = std::option::Option::Some(v.into());
4872        self
4873    }
4874
4875    /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
4876    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
4877    where
4878        T: std::convert::Into<crate::model::Backup>,
4879    {
4880        self.backup = v.map(|x| x.into());
4881        self
4882    }
4883}
4884
4885impl wkt::message::Message for CreateBackupRequest {
4886    fn typename() -> &'static str {
4887        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupRequest"
4888    }
4889}
4890
4891/// Metadata type for the operation returned by
4892/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
4893///
4894/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
4895#[derive(Clone, Default, PartialEq)]
4896#[non_exhaustive]
4897pub struct CreateBackupMetadata {
4898    /// The name of the backup being created.
4899    pub name: std::string::String,
4900
4901    /// The name of the table the backup is created from.
4902    pub source_table: std::string::String,
4903
4904    /// The time at which this operation started.
4905    pub start_time: std::option::Option<wkt::Timestamp>,
4906
4907    /// If set, the time at which this operation finished or was cancelled.
4908    pub end_time: std::option::Option<wkt::Timestamp>,
4909
4910    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4911}
4912
4913impl CreateBackupMetadata {
4914    pub fn new() -> Self {
4915        std::default::Default::default()
4916    }
4917
4918    /// Sets the value of [name][crate::model::CreateBackupMetadata::name].
4919    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4920        self.name = v.into();
4921        self
4922    }
4923
4924    /// Sets the value of [source_table][crate::model::CreateBackupMetadata::source_table].
4925    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4926        self.source_table = v.into();
4927        self
4928    }
4929
4930    /// Sets the value of [start_time][crate::model::CreateBackupMetadata::start_time].
4931    pub fn set_start_time<T>(mut self, v: T) -> Self
4932    where
4933        T: std::convert::Into<wkt::Timestamp>,
4934    {
4935        self.start_time = std::option::Option::Some(v.into());
4936        self
4937    }
4938
4939    /// Sets or clears the value of [start_time][crate::model::CreateBackupMetadata::start_time].
4940    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
4941    where
4942        T: std::convert::Into<wkt::Timestamp>,
4943    {
4944        self.start_time = v.map(|x| x.into());
4945        self
4946    }
4947
4948    /// Sets the value of [end_time][crate::model::CreateBackupMetadata::end_time].
4949    pub fn set_end_time<T>(mut self, v: T) -> Self
4950    where
4951        T: std::convert::Into<wkt::Timestamp>,
4952    {
4953        self.end_time = std::option::Option::Some(v.into());
4954        self
4955    }
4956
4957    /// Sets or clears the value of [end_time][crate::model::CreateBackupMetadata::end_time].
4958    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
4959    where
4960        T: std::convert::Into<wkt::Timestamp>,
4961    {
4962        self.end_time = v.map(|x| x.into());
4963        self
4964    }
4965}
4966
4967impl wkt::message::Message for CreateBackupMetadata {
4968    fn typename() -> &'static str {
4969        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupMetadata"
4970    }
4971}
4972
4973/// The request for
4974/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
4975///
4976/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]: crate::client::BigtableTableAdmin::update_backup
4977#[derive(Clone, Default, PartialEq)]
4978#[non_exhaustive]
4979pub struct UpdateBackupRequest {
4980    /// Required. The backup to update. `backup.name`, and the fields to be updated
4981    /// as specified by `update_mask` are required. Other fields are ignored.
4982    /// Update is only supported for the following fields:
4983    ///
4984    /// * `backup.expire_time`.
4985    pub backup: std::option::Option<crate::model::Backup>,
4986
4987    /// Required. A mask specifying which fields (e.g. `expire_time`) in the
4988    /// Backup resource should be updated. This mask is relative to the Backup
4989    /// resource, not to the request message. The field mask must always be
4990    /// specified; this prevents any future fields from being erased accidentally
4991    /// by clients that do not know about them.
4992    pub update_mask: std::option::Option<wkt::FieldMask>,
4993
4994    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4995}
4996
4997impl UpdateBackupRequest {
4998    pub fn new() -> Self {
4999        std::default::Default::default()
5000    }
5001
5002    /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
5003    pub fn set_backup<T>(mut self, v: T) -> Self
5004    where
5005        T: std::convert::Into<crate::model::Backup>,
5006    {
5007        self.backup = std::option::Option::Some(v.into());
5008        self
5009    }
5010
5011    /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
5012    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5013    where
5014        T: std::convert::Into<crate::model::Backup>,
5015    {
5016        self.backup = v.map(|x| x.into());
5017        self
5018    }
5019
5020    /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
5021    pub fn set_update_mask<T>(mut self, v: T) -> Self
5022    where
5023        T: std::convert::Into<wkt::FieldMask>,
5024    {
5025        self.update_mask = std::option::Option::Some(v.into());
5026        self
5027    }
5028
5029    /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
5030    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5031    where
5032        T: std::convert::Into<wkt::FieldMask>,
5033    {
5034        self.update_mask = v.map(|x| x.into());
5035        self
5036    }
5037}
5038
5039impl wkt::message::Message for UpdateBackupRequest {
5040    fn typename() -> &'static str {
5041        "type.googleapis.com/google.bigtable.admin.v2.UpdateBackupRequest"
5042    }
5043}
5044
5045/// The request for
5046/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
5047///
5048/// [google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]: crate::client::BigtableTableAdmin::get_backup
5049#[derive(Clone, Default, PartialEq)]
5050#[non_exhaustive]
5051pub struct GetBackupRequest {
5052    /// Required. Name of the backup.
5053    /// Values are of the form
5054    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
5055    pub name: std::string::String,
5056
5057    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5058}
5059
5060impl GetBackupRequest {
5061    pub fn new() -> Self {
5062        std::default::Default::default()
5063    }
5064
5065    /// Sets the value of [name][crate::model::GetBackupRequest::name].
5066    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5067        self.name = v.into();
5068        self
5069    }
5070}
5071
5072impl wkt::message::Message for GetBackupRequest {
5073    fn typename() -> &'static str {
5074        "type.googleapis.com/google.bigtable.admin.v2.GetBackupRequest"
5075    }
5076}
5077
5078/// The request for
5079/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
5080///
5081/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]: crate::client::BigtableTableAdmin::delete_backup
5082#[derive(Clone, Default, PartialEq)]
5083#[non_exhaustive]
5084pub struct DeleteBackupRequest {
5085    /// Required. Name of the backup to delete.
5086    /// Values are of the form
5087    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
5088    pub name: std::string::String,
5089
5090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5091}
5092
5093impl DeleteBackupRequest {
5094    pub fn new() -> Self {
5095        std::default::Default::default()
5096    }
5097
5098    /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
5099    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5100        self.name = v.into();
5101        self
5102    }
5103}
5104
5105impl wkt::message::Message for DeleteBackupRequest {
5106    fn typename() -> &'static str {
5107        "type.googleapis.com/google.bigtable.admin.v2.DeleteBackupRequest"
5108    }
5109}
5110
5111/// The request for
5112/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
5113///
5114/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
5115#[derive(Clone, Default, PartialEq)]
5116#[non_exhaustive]
5117pub struct ListBackupsRequest {
5118    /// Required. The cluster to list backups from.  Values are of the
5119    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
5120    /// Use `{cluster} = '-'` to list backups for all clusters in an instance,
5121    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
5122    pub parent: std::string::String,
5123
5124    /// A filter expression that filters backups listed in the response.
5125    /// The expression must specify the field name, a comparison operator,
5126    /// and the value that you want to use for filtering. The value must be a
5127    /// string, a number, or a boolean. The comparison operator must be
5128    /// <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
5129    /// roughly synonymous with equality. Filter rules are case insensitive.
5130    ///
5131    /// The fields eligible for filtering are:
5132    ///
5133    /// * `name`
5134    /// * `source_table`
5135    /// * `state`
5136    /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
5137    /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
5138    /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
5139    /// * `size_bytes`
5140    ///
5141    /// To filter on multiple expressions, provide each separate expression within
5142    /// parentheses. By default, each expression is an AND expression. However,
5143    /// you can include AND, OR, and NOT expressions explicitly.
5144    ///
5145    /// Some examples of using filters are:
5146    ///
5147    /// * `name:"exact"` --> The backup's name is the string "exact".
5148    /// * `name:howl` --> The backup's name contains the string "howl".
5149    /// * `source_table:prod`
5150    ///   --> The source_table's name contains the string "prod".
5151    /// * `state:CREATING` --> The backup is pending creation.
5152    /// * `state:READY` --> The backup is fully created and ready for use.
5153    /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
5154    ///   --> The backup name contains the string "howl" and start_time
5155    ///   of the backup is before 2018-03-28T14:50:00Z.
5156    /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
5157    pub filter: std::string::String,
5158
5159    /// An expression for specifying the sort order of the results of the request.
5160    /// The string value should specify one or more fields in
5161    /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
5162    /// <https://aip.dev/132#ordering>.
5163    ///
5164    /// Fields supported are:
5165    ///
5166    /// * name
5167    /// * source_table
5168    /// * expire_time
5169    /// * start_time
5170    /// * end_time
5171    /// * size_bytes
5172    /// * state
5173    ///
5174    /// For example, "start_time". The default sorting order is ascending.
5175    /// To specify descending order for the field, a suffix " desc" should
5176    /// be appended to the field name. For example, "start_time desc".
5177    /// Redundant space characters in the syntax are insigificant.
5178    ///
5179    /// If order_by is empty, results will be sorted by `start_time` in descending
5180    /// order starting from the most recently created backup.
5181    ///
5182    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
5183    pub order_by: std::string::String,
5184
5185    /// Number of backups to be returned in the response. If 0 or
5186    /// less, defaults to the server's maximum allowed page size.
5187    pub page_size: i32,
5188
5189    /// If non-empty, `page_token` should contain a
5190    /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
5191    /// from a previous
5192    /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
5193    /// same `parent` and with the same `filter`.
5194    ///
5195    /// [google.bigtable.admin.v2.ListBackupsResponse]: crate::model::ListBackupsResponse
5196    /// [google.bigtable.admin.v2.ListBackupsResponse.next_page_token]: crate::model::ListBackupsResponse::next_page_token
5197    pub page_token: std::string::String,
5198
5199    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5200}
5201
5202impl ListBackupsRequest {
5203    pub fn new() -> Self {
5204        std::default::Default::default()
5205    }
5206
5207    /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
5208    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5209        self.parent = v.into();
5210        self
5211    }
5212
5213    /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
5214    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5215        self.filter = v.into();
5216        self
5217    }
5218
5219    /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
5220    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5221        self.order_by = v.into();
5222        self
5223    }
5224
5225    /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
5226    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5227        self.page_size = v.into();
5228        self
5229    }
5230
5231    /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
5232    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5233        self.page_token = v.into();
5234        self
5235    }
5236}
5237
5238impl wkt::message::Message for ListBackupsRequest {
5239    fn typename() -> &'static str {
5240        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsRequest"
5241    }
5242}
5243
5244/// The response for
5245/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
5246///
5247/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
5248#[derive(Clone, Default, PartialEq)]
5249#[non_exhaustive]
5250pub struct ListBackupsResponse {
5251    /// The list of matching backups.
5252    pub backups: std::vec::Vec<crate::model::Backup>,
5253
5254    /// `next_page_token` can be sent in a subsequent
5255    /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
5256    /// to fetch more of the matching backups.
5257    ///
5258    /// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
5259    pub next_page_token: std::string::String,
5260
5261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5262}
5263
5264impl ListBackupsResponse {
5265    pub fn new() -> Self {
5266        std::default::Default::default()
5267    }
5268
5269    /// Sets the value of [backups][crate::model::ListBackupsResponse::backups].
5270    pub fn set_backups<T, V>(mut self, v: T) -> Self
5271    where
5272        T: std::iter::IntoIterator<Item = V>,
5273        V: std::convert::Into<crate::model::Backup>,
5274    {
5275        use std::iter::Iterator;
5276        self.backups = v.into_iter().map(|i| i.into()).collect();
5277        self
5278    }
5279
5280    /// Sets the value of [next_page_token][crate::model::ListBackupsResponse::next_page_token].
5281    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5282        self.next_page_token = v.into();
5283        self
5284    }
5285}
5286
5287impl wkt::message::Message for ListBackupsResponse {
5288    fn typename() -> &'static str {
5289        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsResponse"
5290    }
5291}
5292
5293#[doc(hidden)]
5294impl gax::paginator::internal::PageableResponse for ListBackupsResponse {
5295    type PageItem = crate::model::Backup;
5296
5297    fn items(self) -> std::vec::Vec<Self::PageItem> {
5298        self.backups
5299    }
5300
5301    fn next_page_token(&self) -> std::string::String {
5302        use std::clone::Clone;
5303        self.next_page_token.clone()
5304    }
5305}
5306
5307/// The request for
5308/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
5309///
5310/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
5311#[derive(Clone, Default, PartialEq)]
5312#[non_exhaustive]
5313pub struct CopyBackupRequest {
5314    /// Required. The name of the destination cluster that will contain the backup
5315    /// copy. The cluster must already exist. Values are of the form:
5316    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
5317    pub parent: std::string::String,
5318
5319    /// Required. The id of the new backup. The `backup_id` along with `parent`
5320    /// are combined as {parent}/backups/{backup_id} to create the full backup
5321    /// name, of the form:
5322    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
5323    /// This string must be between 1 and 50 characters in length and match the
5324    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
5325    pub backup_id: std::string::String,
5326
5327    /// Required. The source backup to be copied from.
5328    /// The source backup needs to be in READY state for it to be copied.
5329    /// Copying a copied backup is not allowed.
5330    /// Once CopyBackup is in progress, the source backup cannot be deleted or
5331    /// cleaned up on expiration until CopyBackup is finished.
5332    /// Values are of the form:
5333    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
5334    pub source_backup: std::string::String,
5335
5336    /// Required. Required. The expiration time of the copied backup with
5337    /// microsecond granularity that must be at least 6 hours and at most 30 days
5338    /// from the time the request is received. Once the `expire_time` has
5339    /// passed, Cloud Bigtable will delete the backup and free the resources used
5340    /// by the backup.
5341    pub expire_time: std::option::Option<wkt::Timestamp>,
5342
5343    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5344}
5345
5346impl CopyBackupRequest {
5347    pub fn new() -> Self {
5348        std::default::Default::default()
5349    }
5350
5351    /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
5352    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5353        self.parent = v.into();
5354        self
5355    }
5356
5357    /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
5358    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5359        self.backup_id = v.into();
5360        self
5361    }
5362
5363    /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
5364    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5365        self.source_backup = v.into();
5366        self
5367    }
5368
5369    /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
5370    pub fn set_expire_time<T>(mut self, v: T) -> Self
5371    where
5372        T: std::convert::Into<wkt::Timestamp>,
5373    {
5374        self.expire_time = std::option::Option::Some(v.into());
5375        self
5376    }
5377
5378    /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
5379    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
5380    where
5381        T: std::convert::Into<wkt::Timestamp>,
5382    {
5383        self.expire_time = v.map(|x| x.into());
5384        self
5385    }
5386}
5387
5388impl wkt::message::Message for CopyBackupRequest {
5389    fn typename() -> &'static str {
5390        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupRequest"
5391    }
5392}
5393
5394/// Metadata type for the google.longrunning.Operation returned by
5395/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
5396///
5397/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
5398#[derive(Clone, Default, PartialEq)]
5399#[non_exhaustive]
5400pub struct CopyBackupMetadata {
5401    /// The name of the backup being created through the copy operation.
5402    /// Values are of the form
5403    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
5404    pub name: std::string::String,
5405
5406    /// Information about the source backup that is being copied from.
5407    pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
5408
5409    /// The progress of the
5410    /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
5411    /// operation.
5412    ///
5413    /// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
5414    pub progress: std::option::Option<crate::model::OperationProgress>,
5415
5416    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5417}
5418
5419impl CopyBackupMetadata {
5420    pub fn new() -> Self {
5421        std::default::Default::default()
5422    }
5423
5424    /// Sets the value of [name][crate::model::CopyBackupMetadata::name].
5425    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5426        self.name = v.into();
5427        self
5428    }
5429
5430    /// Sets the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
5431    pub fn set_source_backup_info<T>(mut self, v: T) -> Self
5432    where
5433        T: std::convert::Into<crate::model::BackupInfo>,
5434    {
5435        self.source_backup_info = std::option::Option::Some(v.into());
5436        self
5437    }
5438
5439    /// Sets or clears the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
5440    pub fn set_or_clear_source_backup_info<T>(mut self, v: std::option::Option<T>) -> Self
5441    where
5442        T: std::convert::Into<crate::model::BackupInfo>,
5443    {
5444        self.source_backup_info = v.map(|x| x.into());
5445        self
5446    }
5447
5448    /// Sets the value of [progress][crate::model::CopyBackupMetadata::progress].
5449    pub fn set_progress<T>(mut self, v: T) -> Self
5450    where
5451        T: std::convert::Into<crate::model::OperationProgress>,
5452    {
5453        self.progress = std::option::Option::Some(v.into());
5454        self
5455    }
5456
5457    /// Sets or clears the value of [progress][crate::model::CopyBackupMetadata::progress].
5458    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
5459    where
5460        T: std::convert::Into<crate::model::OperationProgress>,
5461    {
5462        self.progress = v.map(|x| x.into());
5463        self
5464    }
5465}
5466
5467impl wkt::message::Message for CopyBackupMetadata {
5468    fn typename() -> &'static str {
5469        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupMetadata"
5470    }
5471}
5472
5473/// The request for
5474/// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
5475///
5476/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]: crate::client::BigtableTableAdmin::create_authorized_view
5477#[derive(Clone, Default, PartialEq)]
5478#[non_exhaustive]
5479pub struct CreateAuthorizedViewRequest {
5480    /// Required. This is the name of the table the AuthorizedView belongs to.
5481    /// Values are of the form
5482    /// `projects/{project}/instances/{instance}/tables/{table}`.
5483    pub parent: std::string::String,
5484
5485    /// Required. The id of the AuthorizedView to create. This AuthorizedView must
5486    /// not already exist. The `authorized_view_id` appended to `parent` forms the
5487    /// full AuthorizedView name of the form
5488    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
5489    pub authorized_view_id: std::string::String,
5490
5491    /// Required. The AuthorizedView to create.
5492    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
5493
5494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5495}
5496
5497impl CreateAuthorizedViewRequest {
5498    pub fn new() -> Self {
5499        std::default::Default::default()
5500    }
5501
5502    /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
5503    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5504        self.parent = v.into();
5505        self
5506    }
5507
5508    /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
5509    pub fn set_authorized_view_id<T: std::convert::Into<std::string::String>>(
5510        mut self,
5511        v: T,
5512    ) -> Self {
5513        self.authorized_view_id = v.into();
5514        self
5515    }
5516
5517    /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
5518    pub fn set_authorized_view<T>(mut self, v: T) -> Self
5519    where
5520        T: std::convert::Into<crate::model::AuthorizedView>,
5521    {
5522        self.authorized_view = std::option::Option::Some(v.into());
5523        self
5524    }
5525
5526    /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
5527    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
5528    where
5529        T: std::convert::Into<crate::model::AuthorizedView>,
5530    {
5531        self.authorized_view = v.map(|x| x.into());
5532        self
5533    }
5534}
5535
5536impl wkt::message::Message for CreateAuthorizedViewRequest {
5537    fn typename() -> &'static str {
5538        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewRequest"
5539    }
5540}
5541
5542/// The metadata for the Operation returned by CreateAuthorizedView.
5543#[derive(Clone, Default, PartialEq)]
5544#[non_exhaustive]
5545pub struct CreateAuthorizedViewMetadata {
5546    /// The request that prompted the initiation of this CreateAuthorizedView
5547    /// operation.
5548    pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
5549
5550    /// The time at which the original request was received.
5551    pub request_time: std::option::Option<wkt::Timestamp>,
5552
5553    /// The time at which the operation failed or was completed successfully.
5554    pub finish_time: std::option::Option<wkt::Timestamp>,
5555
5556    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5557}
5558
5559impl CreateAuthorizedViewMetadata {
5560    pub fn new() -> Self {
5561        std::default::Default::default()
5562    }
5563
5564    /// Sets the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
5565    pub fn set_original_request<T>(mut self, v: T) -> Self
5566    where
5567        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
5568    {
5569        self.original_request = std::option::Option::Some(v.into());
5570        self
5571    }
5572
5573    /// Sets or clears the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
5574    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
5575    where
5576        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
5577    {
5578        self.original_request = v.map(|x| x.into());
5579        self
5580    }
5581
5582    /// Sets the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
5583    pub fn set_request_time<T>(mut self, v: T) -> Self
5584    where
5585        T: std::convert::Into<wkt::Timestamp>,
5586    {
5587        self.request_time = std::option::Option::Some(v.into());
5588        self
5589    }
5590
5591    /// Sets or clears the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
5592    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
5593    where
5594        T: std::convert::Into<wkt::Timestamp>,
5595    {
5596        self.request_time = v.map(|x| x.into());
5597        self
5598    }
5599
5600    /// Sets the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
5601    pub fn set_finish_time<T>(mut self, v: T) -> Self
5602    where
5603        T: std::convert::Into<wkt::Timestamp>,
5604    {
5605        self.finish_time = std::option::Option::Some(v.into());
5606        self
5607    }
5608
5609    /// Sets or clears the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
5610    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
5611    where
5612        T: std::convert::Into<wkt::Timestamp>,
5613    {
5614        self.finish_time = v.map(|x| x.into());
5615        self
5616    }
5617}
5618
5619impl wkt::message::Message for CreateAuthorizedViewMetadata {
5620    fn typename() -> &'static str {
5621        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"
5622    }
5623}
5624
5625/// Request message for
5626/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
5627///
5628/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
5629#[derive(Clone, Default, PartialEq)]
5630#[non_exhaustive]
5631pub struct ListAuthorizedViewsRequest {
5632    /// Required. The unique name of the table for which AuthorizedViews should be
5633    /// listed. Values are of the form
5634    /// `projects/{project}/instances/{instance}/tables/{table}`.
5635    pub parent: std::string::String,
5636
5637    /// Optional. Maximum number of results per page.
5638    ///
5639    /// A page_size of zero lets the server choose the number of items to return.
5640    /// A page_size which is strictly positive will return at most that many items.
5641    /// A negative page_size will cause an error.
5642    ///
5643    /// Following the first request, subsequent paginated calls are not required
5644    /// to pass a page_size. If a page_size is set in subsequent calls, it must
5645    /// match the page_size given in the first request.
5646    pub page_size: i32,
5647
5648    /// Optional. The value of `next_page_token` returned by a previous call.
5649    pub page_token: std::string::String,
5650
5651    /// Optional. The resource_view to be applied to the returned AuthorizedViews'
5652    /// fields. Default to NAME_ONLY.
5653    pub view: crate::model::authorized_view::ResponseView,
5654
5655    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5656}
5657
5658impl ListAuthorizedViewsRequest {
5659    pub fn new() -> Self {
5660        std::default::Default::default()
5661    }
5662
5663    /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
5664    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5665        self.parent = v.into();
5666        self
5667    }
5668
5669    /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
5670    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5671        self.page_size = v.into();
5672        self
5673    }
5674
5675    /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
5676    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5677        self.page_token = v.into();
5678        self
5679    }
5680
5681    /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
5682    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
5683        mut self,
5684        v: T,
5685    ) -> Self {
5686        self.view = v.into();
5687        self
5688    }
5689}
5690
5691impl wkt::message::Message for ListAuthorizedViewsRequest {
5692    fn typename() -> &'static str {
5693        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsRequest"
5694    }
5695}
5696
5697/// Response message for
5698/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
5699///
5700/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
5701#[derive(Clone, Default, PartialEq)]
5702#[non_exhaustive]
5703pub struct ListAuthorizedViewsResponse {
5704    /// The AuthorizedViews present in the requested table.
5705    pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
5706
5707    /// Set if not all tables could be returned in a single response.
5708    /// Pass this value to `page_token` in another request to get the next
5709    /// page of results.
5710    pub next_page_token: std::string::String,
5711
5712    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5713}
5714
5715impl ListAuthorizedViewsResponse {
5716    pub fn new() -> Self {
5717        std::default::Default::default()
5718    }
5719
5720    /// Sets the value of [authorized_views][crate::model::ListAuthorizedViewsResponse::authorized_views].
5721    pub fn set_authorized_views<T, V>(mut self, v: T) -> Self
5722    where
5723        T: std::iter::IntoIterator<Item = V>,
5724        V: std::convert::Into<crate::model::AuthorizedView>,
5725    {
5726        use std::iter::Iterator;
5727        self.authorized_views = v.into_iter().map(|i| i.into()).collect();
5728        self
5729    }
5730
5731    /// Sets the value of [next_page_token][crate::model::ListAuthorizedViewsResponse::next_page_token].
5732    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5733        self.next_page_token = v.into();
5734        self
5735    }
5736}
5737
5738impl wkt::message::Message for ListAuthorizedViewsResponse {
5739    fn typename() -> &'static str {
5740        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsResponse"
5741    }
5742}
5743
5744#[doc(hidden)]
5745impl gax::paginator::internal::PageableResponse for ListAuthorizedViewsResponse {
5746    type PageItem = crate::model::AuthorizedView;
5747
5748    fn items(self) -> std::vec::Vec<Self::PageItem> {
5749        self.authorized_views
5750    }
5751
5752    fn next_page_token(&self) -> std::string::String {
5753        use std::clone::Clone;
5754        self.next_page_token.clone()
5755    }
5756}
5757
5758/// Request message for
5759/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
5760///
5761/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]: crate::client::BigtableTableAdmin::get_authorized_view
5762#[derive(Clone, Default, PartialEq)]
5763#[non_exhaustive]
5764pub struct GetAuthorizedViewRequest {
5765    /// Required. The unique name of the requested AuthorizedView.
5766    /// Values are of the form
5767    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
5768    pub name: std::string::String,
5769
5770    /// Optional. The resource_view to be applied to the returned AuthorizedView's
5771    /// fields. Default to BASIC.
5772    pub view: crate::model::authorized_view::ResponseView,
5773
5774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5775}
5776
5777impl GetAuthorizedViewRequest {
5778    pub fn new() -> Self {
5779        std::default::Default::default()
5780    }
5781
5782    /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
5783    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5784        self.name = v.into();
5785        self
5786    }
5787
5788    /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
5789    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
5790        mut self,
5791        v: T,
5792    ) -> Self {
5793        self.view = v.into();
5794        self
5795    }
5796}
5797
5798impl wkt::message::Message for GetAuthorizedViewRequest {
5799    fn typename() -> &'static str {
5800        "type.googleapis.com/google.bigtable.admin.v2.GetAuthorizedViewRequest"
5801    }
5802}
5803
5804/// The request for
5805/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
5806///
5807/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
5808#[derive(Clone, Default, PartialEq)]
5809#[non_exhaustive]
5810pub struct UpdateAuthorizedViewRequest {
5811    /// Required. The AuthorizedView to update. The `name` in `authorized_view` is
5812    /// used to identify the AuthorizedView. AuthorizedView name must in this
5813    /// format:
5814    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
5815    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
5816
5817    /// Optional. The list of fields to update.
5818    /// A mask specifying which fields in the AuthorizedView resource should be
5819    /// updated. This mask is relative to the AuthorizedView resource, not to the
5820    /// request message. A field will be overwritten if it is in the mask. If
5821    /// empty, all fields set in the request will be overwritten. A special value
5822    /// `*` means to overwrite all fields (including fields not set in the
5823    /// request).
5824    pub update_mask: std::option::Option<wkt::FieldMask>,
5825
5826    /// Optional. If true, ignore the safety checks when updating the
5827    /// AuthorizedView.
5828    pub ignore_warnings: bool,
5829
5830    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5831}
5832
5833impl UpdateAuthorizedViewRequest {
5834    pub fn new() -> Self {
5835        std::default::Default::default()
5836    }
5837
5838    /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
5839    pub fn set_authorized_view<T>(mut self, v: T) -> Self
5840    where
5841        T: std::convert::Into<crate::model::AuthorizedView>,
5842    {
5843        self.authorized_view = std::option::Option::Some(v.into());
5844        self
5845    }
5846
5847    /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
5848    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
5849    where
5850        T: std::convert::Into<crate::model::AuthorizedView>,
5851    {
5852        self.authorized_view = v.map(|x| x.into());
5853        self
5854    }
5855
5856    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
5857    pub fn set_update_mask<T>(mut self, v: T) -> Self
5858    where
5859        T: std::convert::Into<wkt::FieldMask>,
5860    {
5861        self.update_mask = std::option::Option::Some(v.into());
5862        self
5863    }
5864
5865    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
5866    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5867    where
5868        T: std::convert::Into<wkt::FieldMask>,
5869    {
5870        self.update_mask = v.map(|x| x.into());
5871        self
5872    }
5873
5874    /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
5875    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5876        self.ignore_warnings = v.into();
5877        self
5878    }
5879}
5880
5881impl wkt::message::Message for UpdateAuthorizedViewRequest {
5882    fn typename() -> &'static str {
5883        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"
5884    }
5885}
5886
5887/// Metadata for the google.longrunning.Operation returned by
5888/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
5889///
5890/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
5891#[derive(Clone, Default, PartialEq)]
5892#[non_exhaustive]
5893pub struct UpdateAuthorizedViewMetadata {
5894    /// The request that prompted the initiation of this UpdateAuthorizedView
5895    /// operation.
5896    pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
5897
5898    /// The time at which the original request was received.
5899    pub request_time: std::option::Option<wkt::Timestamp>,
5900
5901    /// The time at which the operation failed or was completed successfully.
5902    pub finish_time: std::option::Option<wkt::Timestamp>,
5903
5904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5905}
5906
5907impl UpdateAuthorizedViewMetadata {
5908    pub fn new() -> Self {
5909        std::default::Default::default()
5910    }
5911
5912    /// Sets the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
5913    pub fn set_original_request<T>(mut self, v: T) -> Self
5914    where
5915        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
5916    {
5917        self.original_request = std::option::Option::Some(v.into());
5918        self
5919    }
5920
5921    /// Sets or clears the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
5922    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
5923    where
5924        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
5925    {
5926        self.original_request = v.map(|x| x.into());
5927        self
5928    }
5929
5930    /// Sets the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
5931    pub fn set_request_time<T>(mut self, v: T) -> Self
5932    where
5933        T: std::convert::Into<wkt::Timestamp>,
5934    {
5935        self.request_time = std::option::Option::Some(v.into());
5936        self
5937    }
5938
5939    /// Sets or clears the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
5940    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
5941    where
5942        T: std::convert::Into<wkt::Timestamp>,
5943    {
5944        self.request_time = v.map(|x| x.into());
5945        self
5946    }
5947
5948    /// Sets the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
5949    pub fn set_finish_time<T>(mut self, v: T) -> Self
5950    where
5951        T: std::convert::Into<wkt::Timestamp>,
5952    {
5953        self.finish_time = std::option::Option::Some(v.into());
5954        self
5955    }
5956
5957    /// Sets or clears the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
5958    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
5959    where
5960        T: std::convert::Into<wkt::Timestamp>,
5961    {
5962        self.finish_time = v.map(|x| x.into());
5963        self
5964    }
5965}
5966
5967impl wkt::message::Message for UpdateAuthorizedViewMetadata {
5968    fn typename() -> &'static str {
5969        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"
5970    }
5971}
5972
5973/// Request message for
5974/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
5975///
5976/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]: crate::client::BigtableTableAdmin::delete_authorized_view
5977#[derive(Clone, Default, PartialEq)]
5978#[non_exhaustive]
5979pub struct DeleteAuthorizedViewRequest {
5980    /// Required. The unique name of the AuthorizedView to be deleted.
5981    /// Values are of the form
5982    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
5983    pub name: std::string::String,
5984
5985    /// Optional. The current etag of the AuthorizedView.
5986    /// If an etag is provided and does not match the current etag of the
5987    /// AuthorizedView, deletion will be blocked and an ABORTED error will be
5988    /// returned.
5989    pub etag: std::string::String,
5990
5991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5992}
5993
5994impl DeleteAuthorizedViewRequest {
5995    pub fn new() -> Self {
5996        std::default::Default::default()
5997    }
5998
5999    /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
6000    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6001        self.name = v.into();
6002        self
6003    }
6004
6005    /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
6006    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6007        self.etag = v.into();
6008        self
6009    }
6010}
6011
6012impl wkt::message::Message for DeleteAuthorizedViewRequest {
6013    fn typename() -> &'static str {
6014        "type.googleapis.com/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"
6015    }
6016}
6017
6018/// The request for
6019/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
6020///
6021/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
6022#[derive(Clone, Default, PartialEq)]
6023#[non_exhaustive]
6024pub struct CreateSchemaBundleRequest {
6025    /// Required. The parent resource where this schema bundle will be created.
6026    /// Values are of the form
6027    /// `projects/{project}/instances/{instance}/tables/{table}`.
6028    pub parent: std::string::String,
6029
6030    /// Required. The unique ID to use for the schema bundle, which will become the
6031    /// final component of the schema bundle's resource name.
6032    pub schema_bundle_id: std::string::String,
6033
6034    /// Required. The schema bundle to create.
6035    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
6036
6037    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6038}
6039
6040impl CreateSchemaBundleRequest {
6041    pub fn new() -> Self {
6042        std::default::Default::default()
6043    }
6044
6045    /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
6046    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6047        self.parent = v.into();
6048        self
6049    }
6050
6051    /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
6052    pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
6053        mut self,
6054        v: T,
6055    ) -> Self {
6056        self.schema_bundle_id = v.into();
6057        self
6058    }
6059
6060    /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
6061    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
6062    where
6063        T: std::convert::Into<crate::model::SchemaBundle>,
6064    {
6065        self.schema_bundle = std::option::Option::Some(v.into());
6066        self
6067    }
6068
6069    /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
6070    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
6071    where
6072        T: std::convert::Into<crate::model::SchemaBundle>,
6073    {
6074        self.schema_bundle = v.map(|x| x.into());
6075        self
6076    }
6077}
6078
6079impl wkt::message::Message for CreateSchemaBundleRequest {
6080    fn typename() -> &'static str {
6081        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleRequest"
6082    }
6083}
6084
6085/// The metadata for the Operation returned by
6086/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
6087///
6088/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
6089#[derive(Clone, Default, PartialEq)]
6090#[non_exhaustive]
6091pub struct CreateSchemaBundleMetadata {
6092    /// The unique name identifying this schema bundle.
6093    /// Values are of the form
6094    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
6095    pub name: std::string::String,
6096
6097    /// The time at which this operation started.
6098    pub start_time: std::option::Option<wkt::Timestamp>,
6099
6100    /// If set, the time at which this operation finished or was canceled.
6101    pub end_time: std::option::Option<wkt::Timestamp>,
6102
6103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6104}
6105
6106impl CreateSchemaBundleMetadata {
6107    pub fn new() -> Self {
6108        std::default::Default::default()
6109    }
6110
6111    /// Sets the value of [name][crate::model::CreateSchemaBundleMetadata::name].
6112    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6113        self.name = v.into();
6114        self
6115    }
6116
6117    /// Sets the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
6118    pub fn set_start_time<T>(mut self, v: T) -> Self
6119    where
6120        T: std::convert::Into<wkt::Timestamp>,
6121    {
6122        self.start_time = std::option::Option::Some(v.into());
6123        self
6124    }
6125
6126    /// Sets or clears the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
6127    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6128    where
6129        T: std::convert::Into<wkt::Timestamp>,
6130    {
6131        self.start_time = v.map(|x| x.into());
6132        self
6133    }
6134
6135    /// Sets the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
6136    pub fn set_end_time<T>(mut self, v: T) -> Self
6137    where
6138        T: std::convert::Into<wkt::Timestamp>,
6139    {
6140        self.end_time = std::option::Option::Some(v.into());
6141        self
6142    }
6143
6144    /// Sets or clears the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
6145    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6146    where
6147        T: std::convert::Into<wkt::Timestamp>,
6148    {
6149        self.end_time = v.map(|x| x.into());
6150        self
6151    }
6152}
6153
6154impl wkt::message::Message for CreateSchemaBundleMetadata {
6155    fn typename() -> &'static str {
6156        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleMetadata"
6157    }
6158}
6159
6160/// The request for
6161/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
6162///
6163/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
6164#[derive(Clone, Default, PartialEq)]
6165#[non_exhaustive]
6166pub struct UpdateSchemaBundleRequest {
6167    /// Required. The schema bundle to update.
6168    ///
6169    /// The schema bundle's `name` field is used to identify the schema bundle to
6170    /// update. Values are of the form
6171    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
6172    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
6173
6174    /// Optional. The list of fields to update.
6175    pub update_mask: std::option::Option<wkt::FieldMask>,
6176
6177    /// Optional. If set, ignore the safety checks when updating the Schema Bundle.
6178    /// The safety checks are:
6179    ///
6180    /// - The new Schema Bundle is backwards compatible with the existing Schema
6181    ///   Bundle.
6182    pub ignore_warnings: bool,
6183
6184    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6185}
6186
6187impl UpdateSchemaBundleRequest {
6188    pub fn new() -> Self {
6189        std::default::Default::default()
6190    }
6191
6192    /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
6193    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
6194    where
6195        T: std::convert::Into<crate::model::SchemaBundle>,
6196    {
6197        self.schema_bundle = std::option::Option::Some(v.into());
6198        self
6199    }
6200
6201    /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
6202    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
6203    where
6204        T: std::convert::Into<crate::model::SchemaBundle>,
6205    {
6206        self.schema_bundle = v.map(|x| x.into());
6207        self
6208    }
6209
6210    /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
6211    pub fn set_update_mask<T>(mut self, v: T) -> Self
6212    where
6213        T: std::convert::Into<wkt::FieldMask>,
6214    {
6215        self.update_mask = std::option::Option::Some(v.into());
6216        self
6217    }
6218
6219    /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
6220    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6221    where
6222        T: std::convert::Into<wkt::FieldMask>,
6223    {
6224        self.update_mask = v.map(|x| x.into());
6225        self
6226    }
6227
6228    /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
6229    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6230        self.ignore_warnings = v.into();
6231        self
6232    }
6233}
6234
6235impl wkt::message::Message for UpdateSchemaBundleRequest {
6236    fn typename() -> &'static str {
6237        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleRequest"
6238    }
6239}
6240
6241/// The metadata for the Operation returned by
6242/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
6243///
6244/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
6245#[derive(Clone, Default, PartialEq)]
6246#[non_exhaustive]
6247pub struct UpdateSchemaBundleMetadata {
6248    /// The unique name identifying this schema bundle.
6249    /// Values are of the form
6250    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
6251    pub name: std::string::String,
6252
6253    /// The time at which this operation started.
6254    pub start_time: std::option::Option<wkt::Timestamp>,
6255
6256    /// If set, the time at which this operation finished or was canceled.
6257    pub end_time: std::option::Option<wkt::Timestamp>,
6258
6259    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6260}
6261
6262impl UpdateSchemaBundleMetadata {
6263    pub fn new() -> Self {
6264        std::default::Default::default()
6265    }
6266
6267    /// Sets the value of [name][crate::model::UpdateSchemaBundleMetadata::name].
6268    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6269        self.name = v.into();
6270        self
6271    }
6272
6273    /// Sets the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
6274    pub fn set_start_time<T>(mut self, v: T) -> Self
6275    where
6276        T: std::convert::Into<wkt::Timestamp>,
6277    {
6278        self.start_time = std::option::Option::Some(v.into());
6279        self
6280    }
6281
6282    /// Sets or clears the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
6283    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6284    where
6285        T: std::convert::Into<wkt::Timestamp>,
6286    {
6287        self.start_time = v.map(|x| x.into());
6288        self
6289    }
6290
6291    /// Sets the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
6292    pub fn set_end_time<T>(mut self, v: T) -> Self
6293    where
6294        T: std::convert::Into<wkt::Timestamp>,
6295    {
6296        self.end_time = std::option::Option::Some(v.into());
6297        self
6298    }
6299
6300    /// Sets or clears the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
6301    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6302    where
6303        T: std::convert::Into<wkt::Timestamp>,
6304    {
6305        self.end_time = v.map(|x| x.into());
6306        self
6307    }
6308}
6309
6310impl wkt::message::Message for UpdateSchemaBundleMetadata {
6311    fn typename() -> &'static str {
6312        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"
6313    }
6314}
6315
6316/// The request for
6317/// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
6318///
6319/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]: crate::client::BigtableTableAdmin::get_schema_bundle
6320#[derive(Clone, Default, PartialEq)]
6321#[non_exhaustive]
6322pub struct GetSchemaBundleRequest {
6323    /// Required. The unique name of the schema bundle to retrieve.
6324    /// Values are of the form
6325    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
6326    pub name: std::string::String,
6327
6328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6329}
6330
6331impl GetSchemaBundleRequest {
6332    pub fn new() -> Self {
6333        std::default::Default::default()
6334    }
6335
6336    /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
6337    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6338        self.name = v.into();
6339        self
6340    }
6341}
6342
6343impl wkt::message::Message for GetSchemaBundleRequest {
6344    fn typename() -> &'static str {
6345        "type.googleapis.com/google.bigtable.admin.v2.GetSchemaBundleRequest"
6346    }
6347}
6348
6349/// The request for
6350/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
6351///
6352/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
6353#[derive(Clone, Default, PartialEq)]
6354#[non_exhaustive]
6355pub struct ListSchemaBundlesRequest {
6356    /// Required. The parent, which owns this collection of schema bundles.
6357    /// Values are of the form
6358    /// `projects/{project}/instances/{instance}/tables/{table}`.
6359    pub parent: std::string::String,
6360
6361    /// The maximum number of schema bundles to return. If the value is positive,
6362    /// the server may return at most this value. If unspecified, the server will
6363    /// return the maximum allowed page size.
6364    pub page_size: i32,
6365
6366    /// A page token, received from a previous `ListSchemaBundles` call.
6367    /// Provide this to retrieve the subsequent page.
6368    ///
6369    /// When paginating, all other parameters provided to `ListSchemaBundles` must
6370    /// match the call that provided the page token.
6371    pub page_token: std::string::String,
6372
6373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6374}
6375
6376impl ListSchemaBundlesRequest {
6377    pub fn new() -> Self {
6378        std::default::Default::default()
6379    }
6380
6381    /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
6382    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6383        self.parent = v.into();
6384        self
6385    }
6386
6387    /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
6388    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6389        self.page_size = v.into();
6390        self
6391    }
6392
6393    /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
6394    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6395        self.page_token = v.into();
6396        self
6397    }
6398}
6399
6400impl wkt::message::Message for ListSchemaBundlesRequest {
6401    fn typename() -> &'static str {
6402        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesRequest"
6403    }
6404}
6405
6406/// The response for
6407/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
6408///
6409/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
6410#[derive(Clone, Default, PartialEq)]
6411#[non_exhaustive]
6412pub struct ListSchemaBundlesResponse {
6413    /// The schema bundles from the specified table.
6414    pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
6415
6416    /// A token, which can be sent as `page_token` to retrieve the next page.
6417    /// If this field is omitted, there are no subsequent pages.
6418    pub next_page_token: std::string::String,
6419
6420    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6421}
6422
6423impl ListSchemaBundlesResponse {
6424    pub fn new() -> Self {
6425        std::default::Default::default()
6426    }
6427
6428    /// Sets the value of [schema_bundles][crate::model::ListSchemaBundlesResponse::schema_bundles].
6429    pub fn set_schema_bundles<T, V>(mut self, v: T) -> Self
6430    where
6431        T: std::iter::IntoIterator<Item = V>,
6432        V: std::convert::Into<crate::model::SchemaBundle>,
6433    {
6434        use std::iter::Iterator;
6435        self.schema_bundles = v.into_iter().map(|i| i.into()).collect();
6436        self
6437    }
6438
6439    /// Sets the value of [next_page_token][crate::model::ListSchemaBundlesResponse::next_page_token].
6440    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6441        self.next_page_token = v.into();
6442        self
6443    }
6444}
6445
6446impl wkt::message::Message for ListSchemaBundlesResponse {
6447    fn typename() -> &'static str {
6448        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesResponse"
6449    }
6450}
6451
6452#[doc(hidden)]
6453impl gax::paginator::internal::PageableResponse for ListSchemaBundlesResponse {
6454    type PageItem = crate::model::SchemaBundle;
6455
6456    fn items(self) -> std::vec::Vec<Self::PageItem> {
6457        self.schema_bundles
6458    }
6459
6460    fn next_page_token(&self) -> std::string::String {
6461        use std::clone::Clone;
6462        self.next_page_token.clone()
6463    }
6464}
6465
6466/// The request for
6467/// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
6468///
6469/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]: crate::client::BigtableTableAdmin::delete_schema_bundle
6470#[derive(Clone, Default, PartialEq)]
6471#[non_exhaustive]
6472pub struct DeleteSchemaBundleRequest {
6473    /// Required. The unique name of the schema bundle to delete.
6474    /// Values are of the form
6475    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
6476    pub name: std::string::String,
6477
6478    /// Optional. The etag of the schema bundle.
6479    /// If this is provided, it must match the server's etag. The server
6480    /// returns an ABORTED error on a mismatched etag.
6481    pub etag: std::string::String,
6482
6483    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6484}
6485
6486impl DeleteSchemaBundleRequest {
6487    pub fn new() -> Self {
6488        std::default::Default::default()
6489    }
6490
6491    /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
6492    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6493        self.name = v.into();
6494        self
6495    }
6496
6497    /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
6498    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6499        self.etag = v.into();
6500        self
6501    }
6502}
6503
6504impl wkt::message::Message for DeleteSchemaBundleRequest {
6505    fn typename() -> &'static str {
6506        "type.googleapis.com/google.bigtable.admin.v2.DeleteSchemaBundleRequest"
6507    }
6508}
6509
6510/// Encapsulates progress related information for a Cloud Bigtable long
6511/// running operation.
6512#[derive(Clone, Default, PartialEq)]
6513#[non_exhaustive]
6514pub struct OperationProgress {
6515    /// Percent completion of the operation.
6516    /// Values are between 0 and 100 inclusive.
6517    pub progress_percent: i32,
6518
6519    /// Time the request was received.
6520    pub start_time: std::option::Option<wkt::Timestamp>,
6521
6522    /// If set, the time at which this operation failed or was completed
6523    /// successfully.
6524    pub end_time: std::option::Option<wkt::Timestamp>,
6525
6526    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6527}
6528
6529impl OperationProgress {
6530    pub fn new() -> Self {
6531        std::default::Default::default()
6532    }
6533
6534    /// Sets the value of [progress_percent][crate::model::OperationProgress::progress_percent].
6535    pub fn set_progress_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6536        self.progress_percent = v.into();
6537        self
6538    }
6539
6540    /// Sets the value of [start_time][crate::model::OperationProgress::start_time].
6541    pub fn set_start_time<T>(mut self, v: T) -> Self
6542    where
6543        T: std::convert::Into<wkt::Timestamp>,
6544    {
6545        self.start_time = std::option::Option::Some(v.into());
6546        self
6547    }
6548
6549    /// Sets or clears the value of [start_time][crate::model::OperationProgress::start_time].
6550    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6551    where
6552        T: std::convert::Into<wkt::Timestamp>,
6553    {
6554        self.start_time = v.map(|x| x.into());
6555        self
6556    }
6557
6558    /// Sets the value of [end_time][crate::model::OperationProgress::end_time].
6559    pub fn set_end_time<T>(mut self, v: T) -> Self
6560    where
6561        T: std::convert::Into<wkt::Timestamp>,
6562    {
6563        self.end_time = std::option::Option::Some(v.into());
6564        self
6565    }
6566
6567    /// Sets or clears the value of [end_time][crate::model::OperationProgress::end_time].
6568    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6569    where
6570        T: std::convert::Into<wkt::Timestamp>,
6571    {
6572        self.end_time = v.map(|x| x.into());
6573        self
6574    }
6575}
6576
6577impl wkt::message::Message for OperationProgress {
6578    fn typename() -> &'static str {
6579        "type.googleapis.com/google.bigtable.admin.v2.OperationProgress"
6580    }
6581}
6582
6583/// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
6584/// the resources that serve them.
6585/// All tables in an instance are served from all
6586/// [Clusters][google.bigtable.admin.v2.Cluster] in the instance.
6587///
6588/// [google.bigtable.admin.v2.Cluster]: crate::model::Cluster
6589/// [google.bigtable.admin.v2.Table]: crate::model::Table
6590#[derive(Clone, Default, PartialEq)]
6591#[non_exhaustive]
6592pub struct Instance {
6593    /// The unique name of the instance. Values are of the form
6594    /// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
6595    pub name: std::string::String,
6596
6597    /// Required. The descriptive name for this instance as it appears in UIs.
6598    /// Can be changed at any time, but should be kept globally unique
6599    /// to avoid confusion.
6600    pub display_name: std::string::String,
6601
6602    /// Output only. The current state of the instance.
6603    pub state: crate::model::instance::State,
6604
6605    /// The type of the instance. Defaults to `PRODUCTION`.
6606    pub r#type: crate::model::instance::Type,
6607
6608    /// Labels are a flexible and lightweight mechanism for organizing cloud
6609    /// resources into groups that reflect a customer's organizational needs and
6610    /// deployment strategies. They can be used to filter resources and aggregate
6611    /// metrics.
6612    ///
6613    /// * Label keys must be between 1 and 63 characters long and must conform to
6614    ///   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
6615    /// * Label values must be between 0 and 63 characters long and must conform to
6616    ///   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
6617    /// * No more than 64 labels can be associated with a given resource.
6618    /// * Keys and values must both be under 128 bytes.
6619    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6620
6621    /// Output only. A commit timestamp representing when this Instance was
6622    /// created. For instances created before this field was added (August 2021),
6623    /// this value is `seconds: 0, nanos: 1`.
6624    pub create_time: std::option::Option<wkt::Timestamp>,
6625
6626    /// Output only. Reserved for future use.
6627    pub satisfies_pzs: std::option::Option<bool>,
6628
6629    /// Output only. Reserved for future use.
6630    pub satisfies_pzi: std::option::Option<bool>,
6631
6632    /// Optional. Input only. Immutable. Tag keys/values directly bound to this
6633    /// resource. For example:
6634    ///
6635    /// - "123/environment": "production",
6636    /// - "123/costCenter": "marketing"
6637    ///
6638    /// Tags and Labels (above) are both used to bind metadata to resources, with
6639    /// different use-cases. See
6640    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview> for an
6641    /// in-depth overview on the difference between tags and labels.
6642    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
6643
6644    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6645}
6646
6647impl Instance {
6648    pub fn new() -> Self {
6649        std::default::Default::default()
6650    }
6651
6652    /// Sets the value of [name][crate::model::Instance::name].
6653    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6654        self.name = v.into();
6655        self
6656    }
6657
6658    /// Sets the value of [display_name][crate::model::Instance::display_name].
6659    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6660        self.display_name = v.into();
6661        self
6662    }
6663
6664    /// Sets the value of [state][crate::model::Instance::state].
6665    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
6666        self.state = v.into();
6667        self
6668    }
6669
6670    /// Sets the value of [r#type][crate::model::Instance::type].
6671    pub fn set_type<T: std::convert::Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
6672        self.r#type = v.into();
6673        self
6674    }
6675
6676    /// Sets the value of [labels][crate::model::Instance::labels].
6677    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6678    where
6679        T: std::iter::IntoIterator<Item = (K, V)>,
6680        K: std::convert::Into<std::string::String>,
6681        V: std::convert::Into<std::string::String>,
6682    {
6683        use std::iter::Iterator;
6684        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6685        self
6686    }
6687
6688    /// Sets the value of [create_time][crate::model::Instance::create_time].
6689    pub fn set_create_time<T>(mut self, v: T) -> Self
6690    where
6691        T: std::convert::Into<wkt::Timestamp>,
6692    {
6693        self.create_time = std::option::Option::Some(v.into());
6694        self
6695    }
6696
6697    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
6698    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6699    where
6700        T: std::convert::Into<wkt::Timestamp>,
6701    {
6702        self.create_time = v.map(|x| x.into());
6703        self
6704    }
6705
6706    /// Sets the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
6707    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
6708    where
6709        T: std::convert::Into<bool>,
6710    {
6711        self.satisfies_pzs = std::option::Option::Some(v.into());
6712        self
6713    }
6714
6715    /// Sets or clears the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
6716    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
6717    where
6718        T: std::convert::Into<bool>,
6719    {
6720        self.satisfies_pzs = v.map(|x| x.into());
6721        self
6722    }
6723
6724    /// Sets the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
6725    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
6726    where
6727        T: std::convert::Into<bool>,
6728    {
6729        self.satisfies_pzi = std::option::Option::Some(v.into());
6730        self
6731    }
6732
6733    /// Sets or clears the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
6734    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
6735    where
6736        T: std::convert::Into<bool>,
6737    {
6738        self.satisfies_pzi = v.map(|x| x.into());
6739        self
6740    }
6741
6742    /// Sets the value of [tags][crate::model::Instance::tags].
6743    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
6744    where
6745        T: std::iter::IntoIterator<Item = (K, V)>,
6746        K: std::convert::Into<std::string::String>,
6747        V: std::convert::Into<std::string::String>,
6748    {
6749        use std::iter::Iterator;
6750        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6751        self
6752    }
6753}
6754
6755impl wkt::message::Message for Instance {
6756    fn typename() -> &'static str {
6757        "type.googleapis.com/google.bigtable.admin.v2.Instance"
6758    }
6759}
6760
6761/// Defines additional types related to [Instance].
6762pub mod instance {
6763    #[allow(unused_imports)]
6764    use super::*;
6765
6766    /// Possible states of an instance.
6767    ///
6768    /// # Working with unknown values
6769    ///
6770    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6771    /// additional enum variants at any time. Adding new variants is not considered
6772    /// a breaking change. Applications should write their code in anticipation of:
6773    ///
6774    /// - New values appearing in future releases of the client library, **and**
6775    /// - New values received dynamically, without application changes.
6776    ///
6777    /// Please consult the [Working with enums] section in the user guide for some
6778    /// guidelines.
6779    ///
6780    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6781    #[derive(Clone, Debug, PartialEq)]
6782    #[non_exhaustive]
6783    pub enum State {
6784        /// The state of the instance could not be determined.
6785        NotKnown,
6786        /// The instance has been successfully created and can serve requests
6787        /// to its tables.
6788        Ready,
6789        /// The instance is currently being created, and may be destroyed
6790        /// if the creation process encounters an error.
6791        Creating,
6792        /// If set, the enum was initialized with an unknown value.
6793        ///
6794        /// Applications can examine the value using [State::value] or
6795        /// [State::name].
6796        UnknownValue(state::UnknownValue),
6797    }
6798
6799    #[doc(hidden)]
6800    pub mod state {
6801        #[allow(unused_imports)]
6802        use super::*;
6803        #[derive(Clone, Debug, PartialEq)]
6804        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6805    }
6806
6807    impl State {
6808        /// Gets the enum value.
6809        ///
6810        /// Returns `None` if the enum contains an unknown value deserialized from
6811        /// the string representation of enums.
6812        pub fn value(&self) -> std::option::Option<i32> {
6813            match self {
6814                Self::NotKnown => std::option::Option::Some(0),
6815                Self::Ready => std::option::Option::Some(1),
6816                Self::Creating => std::option::Option::Some(2),
6817                Self::UnknownValue(u) => u.0.value(),
6818            }
6819        }
6820
6821        /// Gets the enum value as a string.
6822        ///
6823        /// Returns `None` if the enum contains an unknown value deserialized from
6824        /// the integer representation of enums.
6825        pub fn name(&self) -> std::option::Option<&str> {
6826            match self {
6827                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
6828                Self::Ready => std::option::Option::Some("READY"),
6829                Self::Creating => std::option::Option::Some("CREATING"),
6830                Self::UnknownValue(u) => u.0.name(),
6831            }
6832        }
6833    }
6834
6835    impl std::default::Default for State {
6836        fn default() -> Self {
6837            use std::convert::From;
6838            Self::from(0)
6839        }
6840    }
6841
6842    impl std::fmt::Display for State {
6843        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6844            wkt::internal::display_enum(f, self.name(), self.value())
6845        }
6846    }
6847
6848    impl std::convert::From<i32> for State {
6849        fn from(value: i32) -> Self {
6850            match value {
6851                0 => Self::NotKnown,
6852                1 => Self::Ready,
6853                2 => Self::Creating,
6854                _ => Self::UnknownValue(state::UnknownValue(
6855                    wkt::internal::UnknownEnumValue::Integer(value),
6856                )),
6857            }
6858        }
6859    }
6860
6861    impl std::convert::From<&str> for State {
6862        fn from(value: &str) -> Self {
6863            use std::string::ToString;
6864            match value {
6865                "STATE_NOT_KNOWN" => Self::NotKnown,
6866                "READY" => Self::Ready,
6867                "CREATING" => Self::Creating,
6868                _ => Self::UnknownValue(state::UnknownValue(
6869                    wkt::internal::UnknownEnumValue::String(value.to_string()),
6870                )),
6871            }
6872        }
6873    }
6874
6875    impl serde::ser::Serialize for State {
6876        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6877        where
6878            S: serde::Serializer,
6879        {
6880            match self {
6881                Self::NotKnown => serializer.serialize_i32(0),
6882                Self::Ready => serializer.serialize_i32(1),
6883                Self::Creating => serializer.serialize_i32(2),
6884                Self::UnknownValue(u) => u.0.serialize(serializer),
6885            }
6886        }
6887    }
6888
6889    impl<'de> serde::de::Deserialize<'de> for State {
6890        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6891        where
6892            D: serde::Deserializer<'de>,
6893        {
6894            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
6895                ".google.bigtable.admin.v2.Instance.State",
6896            ))
6897        }
6898    }
6899
6900    /// The type of the instance.
6901    ///
6902    /// # Working with unknown values
6903    ///
6904    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6905    /// additional enum variants at any time. Adding new variants is not considered
6906    /// a breaking change. Applications should write their code in anticipation of:
6907    ///
6908    /// - New values appearing in future releases of the client library, **and**
6909    /// - New values received dynamically, without application changes.
6910    ///
6911    /// Please consult the [Working with enums] section in the user guide for some
6912    /// guidelines.
6913    ///
6914    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6915    #[derive(Clone, Debug, PartialEq)]
6916    #[non_exhaustive]
6917    pub enum Type {
6918        /// The type of the instance is unspecified. If set when creating an
6919        /// instance, a `PRODUCTION` instance will be created. If set when updating
6920        /// an instance, the type will be left unchanged.
6921        Unspecified,
6922        /// An instance meant for production use. `serve_nodes` must be set
6923        /// on the cluster.
6924        Production,
6925        /// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
6926        /// a higher minimum node count than DEVELOPMENT.
6927        Development,
6928        /// If set, the enum was initialized with an unknown value.
6929        ///
6930        /// Applications can examine the value using [Type::value] or
6931        /// [Type::name].
6932        UnknownValue(r#type::UnknownValue),
6933    }
6934
6935    #[doc(hidden)]
6936    pub mod r#type {
6937        #[allow(unused_imports)]
6938        use super::*;
6939        #[derive(Clone, Debug, PartialEq)]
6940        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6941    }
6942
6943    impl Type {
6944        /// Gets the enum value.
6945        ///
6946        /// Returns `None` if the enum contains an unknown value deserialized from
6947        /// the string representation of enums.
6948        pub fn value(&self) -> std::option::Option<i32> {
6949            match self {
6950                Self::Unspecified => std::option::Option::Some(0),
6951                Self::Production => std::option::Option::Some(1),
6952                Self::Development => std::option::Option::Some(2),
6953                Self::UnknownValue(u) => u.0.value(),
6954            }
6955        }
6956
6957        /// Gets the enum value as a string.
6958        ///
6959        /// Returns `None` if the enum contains an unknown value deserialized from
6960        /// the integer representation of enums.
6961        pub fn name(&self) -> std::option::Option<&str> {
6962            match self {
6963                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
6964                Self::Production => std::option::Option::Some("PRODUCTION"),
6965                Self::Development => std::option::Option::Some("DEVELOPMENT"),
6966                Self::UnknownValue(u) => u.0.name(),
6967            }
6968        }
6969    }
6970
6971    impl std::default::Default for Type {
6972        fn default() -> Self {
6973            use std::convert::From;
6974            Self::from(0)
6975        }
6976    }
6977
6978    impl std::fmt::Display for Type {
6979        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6980            wkt::internal::display_enum(f, self.name(), self.value())
6981        }
6982    }
6983
6984    impl std::convert::From<i32> for Type {
6985        fn from(value: i32) -> Self {
6986            match value {
6987                0 => Self::Unspecified,
6988                1 => Self::Production,
6989                2 => Self::Development,
6990                _ => Self::UnknownValue(r#type::UnknownValue(
6991                    wkt::internal::UnknownEnumValue::Integer(value),
6992                )),
6993            }
6994        }
6995    }
6996
6997    impl std::convert::From<&str> for Type {
6998        fn from(value: &str) -> Self {
6999            use std::string::ToString;
7000            match value {
7001                "TYPE_UNSPECIFIED" => Self::Unspecified,
7002                "PRODUCTION" => Self::Production,
7003                "DEVELOPMENT" => Self::Development,
7004                _ => Self::UnknownValue(r#type::UnknownValue(
7005                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7006                )),
7007            }
7008        }
7009    }
7010
7011    impl serde::ser::Serialize for Type {
7012        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7013        where
7014            S: serde::Serializer,
7015        {
7016            match self {
7017                Self::Unspecified => serializer.serialize_i32(0),
7018                Self::Production => serializer.serialize_i32(1),
7019                Self::Development => serializer.serialize_i32(2),
7020                Self::UnknownValue(u) => u.0.serialize(serializer),
7021            }
7022        }
7023    }
7024
7025    impl<'de> serde::de::Deserialize<'de> for Type {
7026        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7027        where
7028            D: serde::Deserializer<'de>,
7029        {
7030            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
7031                ".google.bigtable.admin.v2.Instance.Type",
7032            ))
7033        }
7034    }
7035}
7036
7037/// The Autoscaling targets for a Cluster. These determine the recommended nodes.
7038#[derive(Clone, Default, PartialEq)]
7039#[non_exhaustive]
7040pub struct AutoscalingTargets {
7041    /// The cpu utilization that the Autoscaler should be trying to achieve.
7042    /// This number is on a scale from 0 (no utilization) to
7043    /// 100 (total utilization), and is limited between 10 and 80, otherwise it
7044    /// will return INVALID_ARGUMENT error.
7045    pub cpu_utilization_percent: i32,
7046
7047    /// The storage utilization that the Autoscaler should be trying to achieve.
7048    /// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
7049    /// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
7050    /// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
7051    /// it will be treated as if it were set to the default value: 2560 for SSD,
7052    /// 8192 for HDD.
7053    pub storage_utilization_gib_per_node: i32,
7054
7055    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7056}
7057
7058impl AutoscalingTargets {
7059    pub fn new() -> Self {
7060        std::default::Default::default()
7061    }
7062
7063    /// Sets the value of [cpu_utilization_percent][crate::model::AutoscalingTargets::cpu_utilization_percent].
7064    pub fn set_cpu_utilization_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7065        self.cpu_utilization_percent = v.into();
7066        self
7067    }
7068
7069    /// Sets the value of [storage_utilization_gib_per_node][crate::model::AutoscalingTargets::storage_utilization_gib_per_node].
7070    pub fn set_storage_utilization_gib_per_node<T: std::convert::Into<i32>>(
7071        mut self,
7072        v: T,
7073    ) -> Self {
7074        self.storage_utilization_gib_per_node = v.into();
7075        self
7076    }
7077}
7078
7079impl wkt::message::Message for AutoscalingTargets {
7080    fn typename() -> &'static str {
7081        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingTargets"
7082    }
7083}
7084
7085/// Limits for the number of nodes a Cluster can autoscale up/down to.
7086#[derive(Clone, Default, PartialEq)]
7087#[non_exhaustive]
7088pub struct AutoscalingLimits {
7089    /// Required. Minimum number of nodes to scale down to.
7090    pub min_serve_nodes: i32,
7091
7092    /// Required. Maximum number of nodes to scale up to.
7093    pub max_serve_nodes: i32,
7094
7095    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7096}
7097
7098impl AutoscalingLimits {
7099    pub fn new() -> Self {
7100        std::default::Default::default()
7101    }
7102
7103    /// Sets the value of [min_serve_nodes][crate::model::AutoscalingLimits::min_serve_nodes].
7104    pub fn set_min_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7105        self.min_serve_nodes = v.into();
7106        self
7107    }
7108
7109    /// Sets the value of [max_serve_nodes][crate::model::AutoscalingLimits::max_serve_nodes].
7110    pub fn set_max_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7111        self.max_serve_nodes = v.into();
7112        self
7113    }
7114}
7115
7116impl wkt::message::Message for AutoscalingLimits {
7117    fn typename() -> &'static str {
7118        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingLimits"
7119    }
7120}
7121
7122/// A resizable group of nodes in a particular cloud location, capable
7123/// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
7124/// [Instance][google.bigtable.admin.v2.Instance].
7125///
7126/// [google.bigtable.admin.v2.Instance]: crate::model::Instance
7127/// [google.bigtable.admin.v2.Table]: crate::model::Table
7128#[derive(Clone, Default, PartialEq)]
7129#[non_exhaustive]
7130pub struct Cluster {
7131    /// The unique name of the cluster. Values are of the form
7132    /// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
7133    pub name: std::string::String,
7134
7135    /// Immutable. The location where this cluster's nodes and storage reside. For
7136    /// best performance, clients should be located as close as possible to this
7137    /// cluster. Currently only zones are supported, so values should be of the
7138    /// form `projects/{project}/locations/{zone}`.
7139    pub location: std::string::String,
7140
7141    /// Output only. The current state of the cluster.
7142    pub state: crate::model::cluster::State,
7143
7144    /// The number of nodes in the cluster. If no value is set,
7145    /// Cloud Bigtable automatically allocates nodes based on your data footprint
7146    /// and optimized for 50% storage utilization.
7147    pub serve_nodes: i32,
7148
7149    /// Immutable. The node scaling factor of this cluster.
7150    pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
7151
7152    /// Immutable. The type of storage used by this cluster to serve its
7153    /// parent instance's tables, unless explicitly overridden.
7154    pub default_storage_type: crate::model::StorageType,
7155
7156    /// Immutable. The encryption configuration for CMEK-protected clusters.
7157    pub encryption_config: std::option::Option<crate::model::cluster::EncryptionConfig>,
7158
7159    pub config: std::option::Option<crate::model::cluster::Config>,
7160
7161    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7162}
7163
7164impl Cluster {
7165    pub fn new() -> Self {
7166        std::default::Default::default()
7167    }
7168
7169    /// Sets the value of [name][crate::model::Cluster::name].
7170    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7171        self.name = v.into();
7172        self
7173    }
7174
7175    /// Sets the value of [location][crate::model::Cluster::location].
7176    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7177        self.location = v.into();
7178        self
7179    }
7180
7181    /// Sets the value of [state][crate::model::Cluster::state].
7182    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
7183        self.state = v.into();
7184        self
7185    }
7186
7187    /// Sets the value of [serve_nodes][crate::model::Cluster::serve_nodes].
7188    pub fn set_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7189        self.serve_nodes = v.into();
7190        self
7191    }
7192
7193    /// Sets the value of [node_scaling_factor][crate::model::Cluster::node_scaling_factor].
7194    pub fn set_node_scaling_factor<
7195        T: std::convert::Into<crate::model::cluster::NodeScalingFactor>,
7196    >(
7197        mut self,
7198        v: T,
7199    ) -> Self {
7200        self.node_scaling_factor = v.into();
7201        self
7202    }
7203
7204    /// Sets the value of [default_storage_type][crate::model::Cluster::default_storage_type].
7205    pub fn set_default_storage_type<T: std::convert::Into<crate::model::StorageType>>(
7206        mut self,
7207        v: T,
7208    ) -> Self {
7209        self.default_storage_type = v.into();
7210        self
7211    }
7212
7213    /// Sets the value of [encryption_config][crate::model::Cluster::encryption_config].
7214    pub fn set_encryption_config<T>(mut self, v: T) -> Self
7215    where
7216        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
7217    {
7218        self.encryption_config = std::option::Option::Some(v.into());
7219        self
7220    }
7221
7222    /// Sets or clears the value of [encryption_config][crate::model::Cluster::encryption_config].
7223    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7224    where
7225        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
7226    {
7227        self.encryption_config = v.map(|x| x.into());
7228        self
7229    }
7230
7231    /// Sets the value of [config][crate::model::Cluster::config].
7232    ///
7233    /// Note that all the setters affecting `config` are mutually
7234    /// exclusive.
7235    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::cluster::Config>>>(
7236        mut self,
7237        v: T,
7238    ) -> Self {
7239        self.config = v.into();
7240        self
7241    }
7242
7243    /// The value of [config][crate::model::Cluster::config]
7244    /// if it holds a `ClusterConfig`, `None` if the field is not set or
7245    /// holds a different branch.
7246    pub fn cluster_config(
7247        &self,
7248    ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::ClusterConfig>> {
7249        #[allow(unreachable_patterns)]
7250        self.config.as_ref().and_then(|v| match v {
7251            crate::model::cluster::Config::ClusterConfig(v) => std::option::Option::Some(v),
7252            _ => std::option::Option::None,
7253        })
7254    }
7255
7256    /// Sets the value of [config][crate::model::Cluster::config]
7257    /// to hold a `ClusterConfig`.
7258    ///
7259    /// Note that all the setters affecting `config` are
7260    /// mutually exclusive.
7261    pub fn set_cluster_config<
7262        T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
7263    >(
7264        mut self,
7265        v: T,
7266    ) -> Self {
7267        self.config =
7268            std::option::Option::Some(crate::model::cluster::Config::ClusterConfig(v.into()));
7269        self
7270    }
7271}
7272
7273impl wkt::message::Message for Cluster {
7274    fn typename() -> &'static str {
7275        "type.googleapis.com/google.bigtable.admin.v2.Cluster"
7276    }
7277}
7278
7279/// Defines additional types related to [Cluster].
7280pub mod cluster {
7281    #[allow(unused_imports)]
7282    use super::*;
7283
7284    /// Autoscaling config for a cluster.
7285    #[derive(Clone, Default, PartialEq)]
7286    #[non_exhaustive]
7287    pub struct ClusterAutoscalingConfig {
7288        /// Required. Autoscaling limits for this cluster.
7289        pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
7290
7291        /// Required. Autoscaling targets for this cluster.
7292        pub autoscaling_targets: std::option::Option<crate::model::AutoscalingTargets>,
7293
7294        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7295    }
7296
7297    impl ClusterAutoscalingConfig {
7298        pub fn new() -> Self {
7299            std::default::Default::default()
7300        }
7301
7302        /// Sets the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
7303        pub fn set_autoscaling_limits<T>(mut self, v: T) -> Self
7304        where
7305            T: std::convert::Into<crate::model::AutoscalingLimits>,
7306        {
7307            self.autoscaling_limits = std::option::Option::Some(v.into());
7308            self
7309        }
7310
7311        /// Sets or clears the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
7312        pub fn set_or_clear_autoscaling_limits<T>(mut self, v: std::option::Option<T>) -> Self
7313        where
7314            T: std::convert::Into<crate::model::AutoscalingLimits>,
7315        {
7316            self.autoscaling_limits = v.map(|x| x.into());
7317            self
7318        }
7319
7320        /// Sets the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
7321        pub fn set_autoscaling_targets<T>(mut self, v: T) -> Self
7322        where
7323            T: std::convert::Into<crate::model::AutoscalingTargets>,
7324        {
7325            self.autoscaling_targets = std::option::Option::Some(v.into());
7326            self
7327        }
7328
7329        /// Sets or clears the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
7330        pub fn set_or_clear_autoscaling_targets<T>(mut self, v: std::option::Option<T>) -> Self
7331        where
7332            T: std::convert::Into<crate::model::AutoscalingTargets>,
7333        {
7334            self.autoscaling_targets = v.map(|x| x.into());
7335            self
7336        }
7337    }
7338
7339    impl wkt::message::Message for ClusterAutoscalingConfig {
7340        fn typename() -> &'static str {
7341            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
7342        }
7343    }
7344
7345    /// Configuration for a cluster.
7346    #[derive(Clone, Default, PartialEq)]
7347    #[non_exhaustive]
7348    pub struct ClusterConfig {
7349        /// Autoscaling configuration for this cluster.
7350        pub cluster_autoscaling_config:
7351            std::option::Option<crate::model::cluster::ClusterAutoscalingConfig>,
7352
7353        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7354    }
7355
7356    impl ClusterConfig {
7357        pub fn new() -> Self {
7358            std::default::Default::default()
7359        }
7360
7361        /// Sets the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
7362        pub fn set_cluster_autoscaling_config<T>(mut self, v: T) -> Self
7363        where
7364            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
7365        {
7366            self.cluster_autoscaling_config = std::option::Option::Some(v.into());
7367            self
7368        }
7369
7370        /// Sets or clears the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
7371        pub fn set_or_clear_cluster_autoscaling_config<T>(
7372            mut self,
7373            v: std::option::Option<T>,
7374        ) -> Self
7375        where
7376            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
7377        {
7378            self.cluster_autoscaling_config = v.map(|x| x.into());
7379            self
7380        }
7381    }
7382
7383    impl wkt::message::Message for ClusterConfig {
7384        fn typename() -> &'static str {
7385            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterConfig"
7386        }
7387    }
7388
7389    /// Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
7390    /// cluster.
7391    #[derive(Clone, Default, PartialEq)]
7392    #[non_exhaustive]
7393    pub struct EncryptionConfig {
7394        /// Describes the Cloud KMS encryption key that will be used to protect the
7395        /// destination Bigtable cluster. The requirements for this key are:
7396        ///
7397        /// 1. The Cloud Bigtable service account associated with the project that
7398        ///    contains this cluster must be granted the
7399        ///    `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
7400        /// 1. Only regional keys can be used and the region of the CMEK key must
7401        ///    match the region of the cluster.
7402        ///    Values are of the form
7403        ///    `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
7404        pub kms_key_name: std::string::String,
7405
7406        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7407    }
7408
7409    impl EncryptionConfig {
7410        pub fn new() -> Self {
7411            std::default::Default::default()
7412        }
7413
7414        /// Sets the value of [kms_key_name][crate::model::cluster::EncryptionConfig::kms_key_name].
7415        pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
7416            mut self,
7417            v: T,
7418        ) -> Self {
7419            self.kms_key_name = v.into();
7420            self
7421        }
7422    }
7423
7424    impl wkt::message::Message for EncryptionConfig {
7425        fn typename() -> &'static str {
7426            "type.googleapis.com/google.bigtable.admin.v2.Cluster.EncryptionConfig"
7427        }
7428    }
7429
7430    /// Possible states of a cluster.
7431    ///
7432    /// # Working with unknown values
7433    ///
7434    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7435    /// additional enum variants at any time. Adding new variants is not considered
7436    /// a breaking change. Applications should write their code in anticipation of:
7437    ///
7438    /// - New values appearing in future releases of the client library, **and**
7439    /// - New values received dynamically, without application changes.
7440    ///
7441    /// Please consult the [Working with enums] section in the user guide for some
7442    /// guidelines.
7443    ///
7444    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7445    #[derive(Clone, Debug, PartialEq)]
7446    #[non_exhaustive]
7447    pub enum State {
7448        /// The state of the cluster could not be determined.
7449        NotKnown,
7450        /// The cluster has been successfully created and is ready to serve requests.
7451        Ready,
7452        /// The cluster is currently being created, and may be destroyed
7453        /// if the creation process encounters an error.
7454        /// A cluster may not be able to serve requests while being created.
7455        Creating,
7456        /// The cluster is currently being resized, and may revert to its previous
7457        /// node count if the process encounters an error.
7458        /// A cluster is still capable of serving requests while being resized,
7459        /// but may exhibit performance as if its number of allocated nodes is
7460        /// between the starting and requested states.
7461        Resizing,
7462        /// The cluster has no backing nodes. The data (tables) still
7463        /// exist, but no operations can be performed on the cluster.
7464        Disabled,
7465        /// If set, the enum was initialized with an unknown value.
7466        ///
7467        /// Applications can examine the value using [State::value] or
7468        /// [State::name].
7469        UnknownValue(state::UnknownValue),
7470    }
7471
7472    #[doc(hidden)]
7473    pub mod state {
7474        #[allow(unused_imports)]
7475        use super::*;
7476        #[derive(Clone, Debug, PartialEq)]
7477        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7478    }
7479
7480    impl State {
7481        /// Gets the enum value.
7482        ///
7483        /// Returns `None` if the enum contains an unknown value deserialized from
7484        /// the string representation of enums.
7485        pub fn value(&self) -> std::option::Option<i32> {
7486            match self {
7487                Self::NotKnown => std::option::Option::Some(0),
7488                Self::Ready => std::option::Option::Some(1),
7489                Self::Creating => std::option::Option::Some(2),
7490                Self::Resizing => std::option::Option::Some(3),
7491                Self::Disabled => std::option::Option::Some(4),
7492                Self::UnknownValue(u) => u.0.value(),
7493            }
7494        }
7495
7496        /// Gets the enum value as a string.
7497        ///
7498        /// Returns `None` if the enum contains an unknown value deserialized from
7499        /// the integer representation of enums.
7500        pub fn name(&self) -> std::option::Option<&str> {
7501            match self {
7502                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
7503                Self::Ready => std::option::Option::Some("READY"),
7504                Self::Creating => std::option::Option::Some("CREATING"),
7505                Self::Resizing => std::option::Option::Some("RESIZING"),
7506                Self::Disabled => std::option::Option::Some("DISABLED"),
7507                Self::UnknownValue(u) => u.0.name(),
7508            }
7509        }
7510    }
7511
7512    impl std::default::Default for State {
7513        fn default() -> Self {
7514            use std::convert::From;
7515            Self::from(0)
7516        }
7517    }
7518
7519    impl std::fmt::Display for State {
7520        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7521            wkt::internal::display_enum(f, self.name(), self.value())
7522        }
7523    }
7524
7525    impl std::convert::From<i32> for State {
7526        fn from(value: i32) -> Self {
7527            match value {
7528                0 => Self::NotKnown,
7529                1 => Self::Ready,
7530                2 => Self::Creating,
7531                3 => Self::Resizing,
7532                4 => Self::Disabled,
7533                _ => Self::UnknownValue(state::UnknownValue(
7534                    wkt::internal::UnknownEnumValue::Integer(value),
7535                )),
7536            }
7537        }
7538    }
7539
7540    impl std::convert::From<&str> for State {
7541        fn from(value: &str) -> Self {
7542            use std::string::ToString;
7543            match value {
7544                "STATE_NOT_KNOWN" => Self::NotKnown,
7545                "READY" => Self::Ready,
7546                "CREATING" => Self::Creating,
7547                "RESIZING" => Self::Resizing,
7548                "DISABLED" => Self::Disabled,
7549                _ => Self::UnknownValue(state::UnknownValue(
7550                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7551                )),
7552            }
7553        }
7554    }
7555
7556    impl serde::ser::Serialize for State {
7557        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7558        where
7559            S: serde::Serializer,
7560        {
7561            match self {
7562                Self::NotKnown => serializer.serialize_i32(0),
7563                Self::Ready => serializer.serialize_i32(1),
7564                Self::Creating => serializer.serialize_i32(2),
7565                Self::Resizing => serializer.serialize_i32(3),
7566                Self::Disabled => serializer.serialize_i32(4),
7567                Self::UnknownValue(u) => u.0.serialize(serializer),
7568            }
7569        }
7570    }
7571
7572    impl<'de> serde::de::Deserialize<'de> for State {
7573        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7574        where
7575            D: serde::Deserializer<'de>,
7576        {
7577            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7578                ".google.bigtable.admin.v2.Cluster.State",
7579            ))
7580        }
7581    }
7582
7583    /// Possible node scaling factors of the clusters. Node scaling delivers better
7584    /// latency and more throughput by removing node boundaries.
7585    ///
7586    /// # Working with unknown values
7587    ///
7588    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7589    /// additional enum variants at any time. Adding new variants is not considered
7590    /// a breaking change. Applications should write their code in anticipation of:
7591    ///
7592    /// - New values appearing in future releases of the client library, **and**
7593    /// - New values received dynamically, without application changes.
7594    ///
7595    /// Please consult the [Working with enums] section in the user guide for some
7596    /// guidelines.
7597    ///
7598    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7599    #[derive(Clone, Debug, PartialEq)]
7600    #[non_exhaustive]
7601    pub enum NodeScalingFactor {
7602        /// No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
7603        Unspecified,
7604        /// The cluster is running with a scaling factor of 1.
7605        NodeScalingFactor1X,
7606        /// The cluster is running with a scaling factor of 2.
7607        /// All node count values must be in increments of 2 with this scaling factor
7608        /// enabled, otherwise an INVALID_ARGUMENT error will be returned.
7609        NodeScalingFactor2X,
7610        /// If set, the enum was initialized with an unknown value.
7611        ///
7612        /// Applications can examine the value using [NodeScalingFactor::value] or
7613        /// [NodeScalingFactor::name].
7614        UnknownValue(node_scaling_factor::UnknownValue),
7615    }
7616
7617    #[doc(hidden)]
7618    pub mod node_scaling_factor {
7619        #[allow(unused_imports)]
7620        use super::*;
7621        #[derive(Clone, Debug, PartialEq)]
7622        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7623    }
7624
7625    impl NodeScalingFactor {
7626        /// Gets the enum value.
7627        ///
7628        /// Returns `None` if the enum contains an unknown value deserialized from
7629        /// the string representation of enums.
7630        pub fn value(&self) -> std::option::Option<i32> {
7631            match self {
7632                Self::Unspecified => std::option::Option::Some(0),
7633                Self::NodeScalingFactor1X => std::option::Option::Some(1),
7634                Self::NodeScalingFactor2X => std::option::Option::Some(2),
7635                Self::UnknownValue(u) => u.0.value(),
7636            }
7637        }
7638
7639        /// Gets the enum value as a string.
7640        ///
7641        /// Returns `None` if the enum contains an unknown value deserialized from
7642        /// the integer representation of enums.
7643        pub fn name(&self) -> std::option::Option<&str> {
7644            match self {
7645                Self::Unspecified => std::option::Option::Some("NODE_SCALING_FACTOR_UNSPECIFIED"),
7646                Self::NodeScalingFactor1X => std::option::Option::Some("NODE_SCALING_FACTOR_1X"),
7647                Self::NodeScalingFactor2X => std::option::Option::Some("NODE_SCALING_FACTOR_2X"),
7648                Self::UnknownValue(u) => u.0.name(),
7649            }
7650        }
7651    }
7652
7653    impl std::default::Default for NodeScalingFactor {
7654        fn default() -> Self {
7655            use std::convert::From;
7656            Self::from(0)
7657        }
7658    }
7659
7660    impl std::fmt::Display for NodeScalingFactor {
7661        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7662            wkt::internal::display_enum(f, self.name(), self.value())
7663        }
7664    }
7665
7666    impl std::convert::From<i32> for NodeScalingFactor {
7667        fn from(value: i32) -> Self {
7668            match value {
7669                0 => Self::Unspecified,
7670                1 => Self::NodeScalingFactor1X,
7671                2 => Self::NodeScalingFactor2X,
7672                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
7673                    wkt::internal::UnknownEnumValue::Integer(value),
7674                )),
7675            }
7676        }
7677    }
7678
7679    impl std::convert::From<&str> for NodeScalingFactor {
7680        fn from(value: &str) -> Self {
7681            use std::string::ToString;
7682            match value {
7683                "NODE_SCALING_FACTOR_UNSPECIFIED" => Self::Unspecified,
7684                "NODE_SCALING_FACTOR_1X" => Self::NodeScalingFactor1X,
7685                "NODE_SCALING_FACTOR_2X" => Self::NodeScalingFactor2X,
7686                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
7687                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7688                )),
7689            }
7690        }
7691    }
7692
7693    impl serde::ser::Serialize for NodeScalingFactor {
7694        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7695        where
7696            S: serde::Serializer,
7697        {
7698            match self {
7699                Self::Unspecified => serializer.serialize_i32(0),
7700                Self::NodeScalingFactor1X => serializer.serialize_i32(1),
7701                Self::NodeScalingFactor2X => serializer.serialize_i32(2),
7702                Self::UnknownValue(u) => u.0.serialize(serializer),
7703            }
7704        }
7705    }
7706
7707    impl<'de> serde::de::Deserialize<'de> for NodeScalingFactor {
7708        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7709        where
7710            D: serde::Deserializer<'de>,
7711        {
7712            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeScalingFactor>::new(
7713                ".google.bigtable.admin.v2.Cluster.NodeScalingFactor",
7714            ))
7715        }
7716    }
7717
7718    #[derive(Clone, Debug, PartialEq)]
7719    #[non_exhaustive]
7720    pub enum Config {
7721        /// Configuration for this cluster.
7722        ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
7723    }
7724}
7725
7726/// A configuration object describing how Cloud Bigtable should treat traffic
7727/// from a particular end user application.
7728#[derive(Clone, Default, PartialEq)]
7729#[non_exhaustive]
7730pub struct AppProfile {
7731    /// The unique name of the app profile. Values are of the form
7732    /// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
7733    pub name: std::string::String,
7734
7735    /// Strongly validated etag for optimistic concurrency control. Preserve the
7736    /// value returned from `GetAppProfile` when calling `UpdateAppProfile` to
7737    /// fail the request if there has been a modification in the mean time. The
7738    /// `update_mask` of the request need not include `etag` for this protection
7739    /// to apply.
7740    /// See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
7741    /// [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
7742    /// details.
7743    pub etag: std::string::String,
7744
7745    /// Long form description of the use case for this AppProfile.
7746    pub description: std::string::String,
7747
7748    /// The routing policy for all read/write requests that use this app profile.
7749    /// A value must be explicitly set.
7750    pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
7751
7752    /// Options for isolating this app profile's traffic from other use cases.
7753    pub isolation: std::option::Option<crate::model::app_profile::Isolation>,
7754
7755    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7756}
7757
7758impl AppProfile {
7759    pub fn new() -> Self {
7760        std::default::Default::default()
7761    }
7762
7763    /// Sets the value of [name][crate::model::AppProfile::name].
7764    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7765        self.name = v.into();
7766        self
7767    }
7768
7769    /// Sets the value of [etag][crate::model::AppProfile::etag].
7770    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7771        self.etag = v.into();
7772        self
7773    }
7774
7775    /// Sets the value of [description][crate::model::AppProfile::description].
7776    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7777        self.description = v.into();
7778        self
7779    }
7780
7781    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy].
7782    ///
7783    /// Note that all the setters affecting `routing_policy` are mutually
7784    /// exclusive.
7785    pub fn set_routing_policy<
7786        T: std::convert::Into<std::option::Option<crate::model::app_profile::RoutingPolicy>>,
7787    >(
7788        mut self,
7789        v: T,
7790    ) -> Self {
7791        self.routing_policy = v.into();
7792        self
7793    }
7794
7795    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
7796    /// if it holds a `MultiClusterRoutingUseAny`, `None` if the field is not set or
7797    /// holds a different branch.
7798    pub fn multi_cluster_routing_use_any(
7799        &self,
7800    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>
7801    {
7802        #[allow(unreachable_patterns)]
7803        self.routing_policy.as_ref().and_then(|v| match v {
7804            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v) => {
7805                std::option::Option::Some(v)
7806            }
7807            _ => std::option::Option::None,
7808        })
7809    }
7810
7811    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
7812    /// to hold a `MultiClusterRoutingUseAny`.
7813    ///
7814    /// Note that all the setters affecting `routing_policy` are
7815    /// mutually exclusive.
7816    pub fn set_multi_cluster_routing_use_any<
7817        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>,
7818    >(
7819        mut self,
7820        v: T,
7821    ) -> Self {
7822        self.routing_policy = std::option::Option::Some(
7823            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v.into()),
7824        );
7825        self
7826    }
7827
7828    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
7829    /// if it holds a `SingleClusterRouting`, `None` if the field is not set or
7830    /// holds a different branch.
7831    pub fn single_cluster_routing(
7832        &self,
7833    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>
7834    {
7835        #[allow(unreachable_patterns)]
7836        self.routing_policy.as_ref().and_then(|v| match v {
7837            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v) => {
7838                std::option::Option::Some(v)
7839            }
7840            _ => std::option::Option::None,
7841        })
7842    }
7843
7844    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
7845    /// to hold a `SingleClusterRouting`.
7846    ///
7847    /// Note that all the setters affecting `routing_policy` are
7848    /// mutually exclusive.
7849    pub fn set_single_cluster_routing<
7850        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>,
7851    >(
7852        mut self,
7853        v: T,
7854    ) -> Self {
7855        self.routing_policy = std::option::Option::Some(
7856            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v.into()),
7857        );
7858        self
7859    }
7860
7861    /// Sets the value of [isolation][crate::model::AppProfile::isolation].
7862    ///
7863    /// Note that all the setters affecting `isolation` are mutually
7864    /// exclusive.
7865    pub fn set_isolation<
7866        T: std::convert::Into<std::option::Option<crate::model::app_profile::Isolation>>,
7867    >(
7868        mut self,
7869        v: T,
7870    ) -> Self {
7871        self.isolation = v.into();
7872        self
7873    }
7874
7875    /// The value of [isolation][crate::model::AppProfile::isolation]
7876    /// if it holds a `Priority`, `None` if the field is not set or
7877    /// holds a different branch.
7878    #[deprecated]
7879    pub fn priority(&self) -> std::option::Option<&crate::model::app_profile::Priority> {
7880        #[allow(unreachable_patterns)]
7881        self.isolation.as_ref().and_then(|v| match v {
7882            crate::model::app_profile::Isolation::Priority(v) => std::option::Option::Some(v),
7883            _ => std::option::Option::None,
7884        })
7885    }
7886
7887    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
7888    /// to hold a `Priority`.
7889    ///
7890    /// Note that all the setters affecting `isolation` are
7891    /// mutually exclusive.
7892    #[deprecated]
7893    pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
7894        mut self,
7895        v: T,
7896    ) -> Self {
7897        self.isolation =
7898            std::option::Option::Some(crate::model::app_profile::Isolation::Priority(v.into()));
7899        self
7900    }
7901
7902    /// The value of [isolation][crate::model::AppProfile::isolation]
7903    /// if it holds a `StandardIsolation`, `None` if the field is not set or
7904    /// holds a different branch.
7905    pub fn standard_isolation(
7906        &self,
7907    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::StandardIsolation>> {
7908        #[allow(unreachable_patterns)]
7909        self.isolation.as_ref().and_then(|v| match v {
7910            crate::model::app_profile::Isolation::StandardIsolation(v) => {
7911                std::option::Option::Some(v)
7912            }
7913            _ => std::option::Option::None,
7914        })
7915    }
7916
7917    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
7918    /// to hold a `StandardIsolation`.
7919    ///
7920    /// Note that all the setters affecting `isolation` are
7921    /// mutually exclusive.
7922    pub fn set_standard_isolation<
7923        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::StandardIsolation>>,
7924    >(
7925        mut self,
7926        v: T,
7927    ) -> Self {
7928        self.isolation = std::option::Option::Some(
7929            crate::model::app_profile::Isolation::StandardIsolation(v.into()),
7930        );
7931        self
7932    }
7933
7934    /// The value of [isolation][crate::model::AppProfile::isolation]
7935    /// if it holds a `DataBoostIsolationReadOnly`, `None` if the field is not set or
7936    /// holds a different branch.
7937    pub fn data_boost_isolation_read_only(
7938        &self,
7939    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>
7940    {
7941        #[allow(unreachable_patterns)]
7942        self.isolation.as_ref().and_then(|v| match v {
7943            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v) => {
7944                std::option::Option::Some(v)
7945            }
7946            _ => std::option::Option::None,
7947        })
7948    }
7949
7950    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
7951    /// to hold a `DataBoostIsolationReadOnly`.
7952    ///
7953    /// Note that all the setters affecting `isolation` are
7954    /// mutually exclusive.
7955    pub fn set_data_boost_isolation_read_only<
7956        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>,
7957    >(
7958        mut self,
7959        v: T,
7960    ) -> Self {
7961        self.isolation = std::option::Option::Some(
7962            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v.into()),
7963        );
7964        self
7965    }
7966}
7967
7968impl wkt::message::Message for AppProfile {
7969    fn typename() -> &'static str {
7970        "type.googleapis.com/google.bigtable.admin.v2.AppProfile"
7971    }
7972}
7973
7974/// Defines additional types related to [AppProfile].
7975pub mod app_profile {
7976    #[allow(unused_imports)]
7977    use super::*;
7978
7979    /// Read/write requests are routed to the nearest cluster in the instance, and
7980    /// will fail over to the nearest cluster that is available in the event of
7981    /// transient errors or delays. Clusters in a region are considered
7982    /// equidistant. Choosing this option sacrifices read-your-writes consistency
7983    /// to improve availability.
7984    #[derive(Clone, Default, PartialEq)]
7985    #[non_exhaustive]
7986    pub struct MultiClusterRoutingUseAny {
7987        /// The set of clusters to route to. The order is ignored; clusters will be
7988        /// tried in order of distance. If left empty, all clusters are eligible.
7989        pub cluster_ids: std::vec::Vec<std::string::String>,
7990
7991        /// Possible algorithms for routing affinity. If enabled, Bigtable will
7992        /// route between equidistant clusters in a deterministic order rather than
7993        /// choosing randomly.
7994        ///
7995        /// This mechanism gives read-your-writes consistency for *most* requests
7996        /// under *most* circumstances, without sacrificing availability. Consistency
7997        /// is *not* guaranteed, as requests might still fail over between clusters
7998        /// in the event of errors or latency.
7999        pub affinity:
8000            std::option::Option<crate::model::app_profile::multi_cluster_routing_use_any::Affinity>,
8001
8002        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8003    }
8004
8005    impl MultiClusterRoutingUseAny {
8006        pub fn new() -> Self {
8007            std::default::Default::default()
8008        }
8009
8010        /// Sets the value of [cluster_ids][crate::model::app_profile::MultiClusterRoutingUseAny::cluster_ids].
8011        pub fn set_cluster_ids<T, V>(mut self, v: T) -> Self
8012        where
8013            T: std::iter::IntoIterator<Item = V>,
8014            V: std::convert::Into<std::string::String>,
8015        {
8016            use std::iter::Iterator;
8017            self.cluster_ids = v.into_iter().map(|i| i.into()).collect();
8018            self
8019        }
8020
8021        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity].
8022        ///
8023        /// Note that all the setters affecting `affinity` are mutually
8024        /// exclusive.
8025        pub fn set_affinity<
8026            T: std::convert::Into<
8027                    std::option::Option<
8028                        crate::model::app_profile::multi_cluster_routing_use_any::Affinity,
8029                    >,
8030                >,
8031        >(
8032            mut self,
8033            v: T,
8034        ) -> Self {
8035            self.affinity = v.into();
8036            self
8037        }
8038
8039        /// The value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
8040        /// if it holds a `RowAffinity`, `None` if the field is not set or
8041        /// holds a different branch.
8042        pub fn row_affinity(
8043            &self,
8044        ) -> std::option::Option<
8045            &std::boxed::Box<crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity>,
8046        > {
8047            #[allow(unreachable_patterns)]
8048            self.affinity.as_ref().and_then(|v| match v {
8049                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
8050                    v,
8051                ) => std::option::Option::Some(v),
8052                _ => std::option::Option::None,
8053            })
8054        }
8055
8056        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
8057        /// to hold a `RowAffinity`.
8058        ///
8059        /// Note that all the setters affecting `affinity` are
8060        /// mutually exclusive.
8061        pub fn set_row_affinity<
8062            T: std::convert::Into<
8063                    std::boxed::Box<
8064                        crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
8065                    >,
8066                >,
8067        >(
8068            mut self,
8069            v: T,
8070        ) -> Self {
8071            self.affinity = std::option::Option::Some(
8072                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
8073                    v.into(),
8074                ),
8075            );
8076            self
8077        }
8078    }
8079
8080    impl wkt::message::Message for MultiClusterRoutingUseAny {
8081        fn typename() -> &'static str {
8082            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"
8083        }
8084    }
8085
8086    /// Defines additional types related to [MultiClusterRoutingUseAny].
8087    pub mod multi_cluster_routing_use_any {
8088        #[allow(unused_imports)]
8089        use super::*;
8090
8091        /// If enabled, Bigtable will route the request based on the row key of the
8092        /// request, rather than randomly. Instead, each row key will be assigned
8093        /// to a cluster, and will stick to that cluster. If clusters are added or
8094        /// removed, then this may affect which row keys stick to which clusters.
8095        /// To avoid this, users can use a cluster group to specify which clusters
8096        /// are to be used. In this case, new clusters that are not a part of the
8097        /// cluster group will not be routed to, and routing will be unaffected by
8098        /// the new cluster. Moreover, clusters specified in the cluster group cannot
8099        /// be deleted unless removed from the cluster group.
8100        #[derive(Clone, Default, PartialEq)]
8101        #[non_exhaustive]
8102        pub struct RowAffinity {
8103            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8104        }
8105
8106        impl RowAffinity {
8107            pub fn new() -> Self {
8108                std::default::Default::default()
8109            }
8110        }
8111
8112        impl wkt::message::Message for RowAffinity {
8113            fn typename() -> &'static str {
8114                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"
8115            }
8116        }
8117
8118        /// Possible algorithms for routing affinity. If enabled, Bigtable will
8119        /// route between equidistant clusters in a deterministic order rather than
8120        /// choosing randomly.
8121        ///
8122        /// This mechanism gives read-your-writes consistency for *most* requests
8123        /// under *most* circumstances, without sacrificing availability. Consistency
8124        /// is *not* guaranteed, as requests might still fail over between clusters
8125        /// in the event of errors or latency.
8126        #[derive(Clone, Debug, PartialEq)]
8127        #[non_exhaustive]
8128        pub enum Affinity {
8129            /// Row affinity sticky routing based on the row key of the request.
8130            /// Requests that span multiple rows are routed non-deterministically.
8131            RowAffinity(
8132                std::boxed::Box<
8133                    crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
8134                >,
8135            ),
8136        }
8137    }
8138
8139    /// Unconditionally routes all read/write requests to a specific cluster.
8140    /// This option preserves read-your-writes consistency but does not improve
8141    /// availability.
8142    #[derive(Clone, Default, PartialEq)]
8143    #[non_exhaustive]
8144    pub struct SingleClusterRouting {
8145        /// The cluster to which read/write requests should be routed.
8146        pub cluster_id: std::string::String,
8147
8148        /// Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
8149        /// allowed by this app profile. It is unsafe to send these requests to
8150        /// the same table/row/column in multiple clusters.
8151        pub allow_transactional_writes: bool,
8152
8153        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8154    }
8155
8156    impl SingleClusterRouting {
8157        pub fn new() -> Self {
8158            std::default::Default::default()
8159        }
8160
8161        /// Sets the value of [cluster_id][crate::model::app_profile::SingleClusterRouting::cluster_id].
8162        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8163            self.cluster_id = v.into();
8164            self
8165        }
8166
8167        /// Sets the value of [allow_transactional_writes][crate::model::app_profile::SingleClusterRouting::allow_transactional_writes].
8168        pub fn set_allow_transactional_writes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8169            self.allow_transactional_writes = v.into();
8170            self
8171        }
8172    }
8173
8174    impl wkt::message::Message for SingleClusterRouting {
8175        fn typename() -> &'static str {
8176            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"
8177        }
8178    }
8179
8180    /// Standard options for isolating this app profile's traffic from other use
8181    /// cases.
8182    #[derive(Clone, Default, PartialEq)]
8183    #[non_exhaustive]
8184    pub struct StandardIsolation {
8185        /// The priority of requests sent using this app profile.
8186        pub priority: crate::model::app_profile::Priority,
8187
8188        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8189    }
8190
8191    impl StandardIsolation {
8192        pub fn new() -> Self {
8193            std::default::Default::default()
8194        }
8195
8196        /// Sets the value of [priority][crate::model::app_profile::StandardIsolation::priority].
8197        pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
8198            mut self,
8199            v: T,
8200        ) -> Self {
8201            self.priority = v.into();
8202            self
8203        }
8204    }
8205
8206    impl wkt::message::Message for StandardIsolation {
8207        fn typename() -> &'static str {
8208            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation"
8209        }
8210    }
8211
8212    /// Data Boost is a serverless compute capability that lets you run
8213    /// high-throughput read jobs and queries on your Bigtable data, without
8214    /// impacting the performance of the clusters that handle your application
8215    /// traffic. Data Boost supports read-only use cases with single-cluster
8216    /// routing.
8217    #[derive(Clone, Default, PartialEq)]
8218    #[non_exhaustive]
8219    pub struct DataBoostIsolationReadOnly {
8220        /// The Compute Billing Owner for this Data Boost App Profile.
8221        pub compute_billing_owner: std::option::Option<
8222            crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
8223        >,
8224
8225        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8226    }
8227
8228    impl DataBoostIsolationReadOnly {
8229        pub fn new() -> Self {
8230            std::default::Default::default()
8231        }
8232
8233        /// Sets the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
8234        pub fn set_compute_billing_owner<T>(mut self, v: T) -> Self
8235        where
8236            T: std::convert::Into<
8237                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
8238                >,
8239        {
8240            self.compute_billing_owner = std::option::Option::Some(v.into());
8241            self
8242        }
8243
8244        /// Sets or clears the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
8245        pub fn set_or_clear_compute_billing_owner<T>(mut self, v: std::option::Option<T>) -> Self
8246        where
8247            T: std::convert::Into<
8248                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
8249                >,
8250        {
8251            self.compute_billing_owner = v.map(|x| x.into());
8252            self
8253        }
8254    }
8255
8256    impl wkt::message::Message for DataBoostIsolationReadOnly {
8257        fn typename() -> &'static str {
8258            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"
8259        }
8260    }
8261
8262    /// Defines additional types related to [DataBoostIsolationReadOnly].
8263    pub mod data_boost_isolation_read_only {
8264        #[allow(unused_imports)]
8265        use super::*;
8266
8267        /// Compute Billing Owner specifies how usage should be accounted when using
8268        /// Data Boost. Compute Billing Owner also configures which Cloud Project is
8269        /// charged for relevant quota.
8270        ///
8271        /// # Working with unknown values
8272        ///
8273        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8274        /// additional enum variants at any time. Adding new variants is not considered
8275        /// a breaking change. Applications should write their code in anticipation of:
8276        ///
8277        /// - New values appearing in future releases of the client library, **and**
8278        /// - New values received dynamically, without application changes.
8279        ///
8280        /// Please consult the [Working with enums] section in the user guide for some
8281        /// guidelines.
8282        ///
8283        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8284        #[derive(Clone, Debug, PartialEq)]
8285        #[non_exhaustive]
8286        pub enum ComputeBillingOwner {
8287            /// Unspecified value.
8288            Unspecified,
8289            /// The host Cloud Project containing the targeted Bigtable Instance /
8290            /// Table pays for compute.
8291            HostPays,
8292            /// If set, the enum was initialized with an unknown value.
8293            ///
8294            /// Applications can examine the value using [ComputeBillingOwner::value] or
8295            /// [ComputeBillingOwner::name].
8296            UnknownValue(compute_billing_owner::UnknownValue),
8297        }
8298
8299        #[doc(hidden)]
8300        pub mod compute_billing_owner {
8301            #[allow(unused_imports)]
8302            use super::*;
8303            #[derive(Clone, Debug, PartialEq)]
8304            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8305        }
8306
8307        impl ComputeBillingOwner {
8308            /// Gets the enum value.
8309            ///
8310            /// Returns `None` if the enum contains an unknown value deserialized from
8311            /// the string representation of enums.
8312            pub fn value(&self) -> std::option::Option<i32> {
8313                match self {
8314                    Self::Unspecified => std::option::Option::Some(0),
8315                    Self::HostPays => std::option::Option::Some(1),
8316                    Self::UnknownValue(u) => u.0.value(),
8317                }
8318            }
8319
8320            /// Gets the enum value as a string.
8321            ///
8322            /// Returns `None` if the enum contains an unknown value deserialized from
8323            /// the integer representation of enums.
8324            pub fn name(&self) -> std::option::Option<&str> {
8325                match self {
8326                    Self::Unspecified => {
8327                        std::option::Option::Some("COMPUTE_BILLING_OWNER_UNSPECIFIED")
8328                    }
8329                    Self::HostPays => std::option::Option::Some("HOST_PAYS"),
8330                    Self::UnknownValue(u) => u.0.name(),
8331                }
8332            }
8333        }
8334
8335        impl std::default::Default for ComputeBillingOwner {
8336            fn default() -> Self {
8337                use std::convert::From;
8338                Self::from(0)
8339            }
8340        }
8341
8342        impl std::fmt::Display for ComputeBillingOwner {
8343            fn fmt(
8344                &self,
8345                f: &mut std::fmt::Formatter<'_>,
8346            ) -> std::result::Result<(), std::fmt::Error> {
8347                wkt::internal::display_enum(f, self.name(), self.value())
8348            }
8349        }
8350
8351        impl std::convert::From<i32> for ComputeBillingOwner {
8352            fn from(value: i32) -> Self {
8353                match value {
8354                    0 => Self::Unspecified,
8355                    1 => Self::HostPays,
8356                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
8357                        wkt::internal::UnknownEnumValue::Integer(value),
8358                    )),
8359                }
8360            }
8361        }
8362
8363        impl std::convert::From<&str> for ComputeBillingOwner {
8364            fn from(value: &str) -> Self {
8365                use std::string::ToString;
8366                match value {
8367                    "COMPUTE_BILLING_OWNER_UNSPECIFIED" => Self::Unspecified,
8368                    "HOST_PAYS" => Self::HostPays,
8369                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
8370                        wkt::internal::UnknownEnumValue::String(value.to_string()),
8371                    )),
8372                }
8373            }
8374        }
8375
8376        impl serde::ser::Serialize for ComputeBillingOwner {
8377            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8378            where
8379                S: serde::Serializer,
8380            {
8381                match self {
8382                    Self::Unspecified => serializer.serialize_i32(0),
8383                    Self::HostPays => serializer.serialize_i32(1),
8384                    Self::UnknownValue(u) => u.0.serialize(serializer),
8385                }
8386            }
8387        }
8388
8389        impl<'de> serde::de::Deserialize<'de> for ComputeBillingOwner {
8390            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8391            where
8392                D: serde::Deserializer<'de>,
8393            {
8394                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeBillingOwner>::new(
8395                    ".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner"))
8396            }
8397        }
8398    }
8399
8400    /// Possible priorities for an app profile. Note that higher priority writes
8401    /// can sometimes queue behind lower priority writes to the same tablet, as
8402    /// writes must be strictly sequenced in the durability log.
8403    ///
8404    /// # Working with unknown values
8405    ///
8406    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8407    /// additional enum variants at any time. Adding new variants is not considered
8408    /// a breaking change. Applications should write their code in anticipation of:
8409    ///
8410    /// - New values appearing in future releases of the client library, **and**
8411    /// - New values received dynamically, without application changes.
8412    ///
8413    /// Please consult the [Working with enums] section in the user guide for some
8414    /// guidelines.
8415    ///
8416    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8417    #[derive(Clone, Debug, PartialEq)]
8418    #[non_exhaustive]
8419    pub enum Priority {
8420        /// Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation.
8421        Unspecified,
8422        Low,
8423        Medium,
8424        High,
8425        /// If set, the enum was initialized with an unknown value.
8426        ///
8427        /// Applications can examine the value using [Priority::value] or
8428        /// [Priority::name].
8429        UnknownValue(priority::UnknownValue),
8430    }
8431
8432    #[doc(hidden)]
8433    pub mod priority {
8434        #[allow(unused_imports)]
8435        use super::*;
8436        #[derive(Clone, Debug, PartialEq)]
8437        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8438    }
8439
8440    impl Priority {
8441        /// Gets the enum value.
8442        ///
8443        /// Returns `None` if the enum contains an unknown value deserialized from
8444        /// the string representation of enums.
8445        pub fn value(&self) -> std::option::Option<i32> {
8446            match self {
8447                Self::Unspecified => std::option::Option::Some(0),
8448                Self::Low => std::option::Option::Some(1),
8449                Self::Medium => std::option::Option::Some(2),
8450                Self::High => std::option::Option::Some(3),
8451                Self::UnknownValue(u) => u.0.value(),
8452            }
8453        }
8454
8455        /// Gets the enum value as a string.
8456        ///
8457        /// Returns `None` if the enum contains an unknown value deserialized from
8458        /// the integer representation of enums.
8459        pub fn name(&self) -> std::option::Option<&str> {
8460            match self {
8461                Self::Unspecified => std::option::Option::Some("PRIORITY_UNSPECIFIED"),
8462                Self::Low => std::option::Option::Some("PRIORITY_LOW"),
8463                Self::Medium => std::option::Option::Some("PRIORITY_MEDIUM"),
8464                Self::High => std::option::Option::Some("PRIORITY_HIGH"),
8465                Self::UnknownValue(u) => u.0.name(),
8466            }
8467        }
8468    }
8469
8470    impl std::default::Default for Priority {
8471        fn default() -> Self {
8472            use std::convert::From;
8473            Self::from(0)
8474        }
8475    }
8476
8477    impl std::fmt::Display for Priority {
8478        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8479            wkt::internal::display_enum(f, self.name(), self.value())
8480        }
8481    }
8482
8483    impl std::convert::From<i32> for Priority {
8484        fn from(value: i32) -> Self {
8485            match value {
8486                0 => Self::Unspecified,
8487                1 => Self::Low,
8488                2 => Self::Medium,
8489                3 => Self::High,
8490                _ => Self::UnknownValue(priority::UnknownValue(
8491                    wkt::internal::UnknownEnumValue::Integer(value),
8492                )),
8493            }
8494        }
8495    }
8496
8497    impl std::convert::From<&str> for Priority {
8498        fn from(value: &str) -> Self {
8499            use std::string::ToString;
8500            match value {
8501                "PRIORITY_UNSPECIFIED" => Self::Unspecified,
8502                "PRIORITY_LOW" => Self::Low,
8503                "PRIORITY_MEDIUM" => Self::Medium,
8504                "PRIORITY_HIGH" => Self::High,
8505                _ => Self::UnknownValue(priority::UnknownValue(
8506                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8507                )),
8508            }
8509        }
8510    }
8511
8512    impl serde::ser::Serialize for Priority {
8513        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8514        where
8515            S: serde::Serializer,
8516        {
8517            match self {
8518                Self::Unspecified => serializer.serialize_i32(0),
8519                Self::Low => serializer.serialize_i32(1),
8520                Self::Medium => serializer.serialize_i32(2),
8521                Self::High => serializer.serialize_i32(3),
8522                Self::UnknownValue(u) => u.0.serialize(serializer),
8523            }
8524        }
8525    }
8526
8527    impl<'de> serde::de::Deserialize<'de> for Priority {
8528        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8529        where
8530            D: serde::Deserializer<'de>,
8531        {
8532            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Priority>::new(
8533                ".google.bigtable.admin.v2.AppProfile.Priority",
8534            ))
8535        }
8536    }
8537
8538    /// The routing policy for all read/write requests that use this app profile.
8539    /// A value must be explicitly set.
8540    #[derive(Clone, Debug, PartialEq)]
8541    #[non_exhaustive]
8542    pub enum RoutingPolicy {
8543        /// Use a multi-cluster routing policy.
8544        MultiClusterRoutingUseAny(
8545            std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
8546        ),
8547        /// Use a single-cluster routing policy.
8548        SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
8549    }
8550
8551    /// Options for isolating this app profile's traffic from other use cases.
8552    #[derive(Clone, Debug, PartialEq)]
8553    #[non_exhaustive]
8554    pub enum Isolation {
8555        /// This field has been deprecated in favor of `standard_isolation.priority`.
8556        /// If you set this field, `standard_isolation.priority` will be set instead.
8557        ///
8558        /// The priority of requests sent using this app profile.
8559        #[deprecated]
8560        Priority(crate::model::app_profile::Priority),
8561        /// The standard options used for isolating this app profile's traffic from
8562        /// other use cases.
8563        StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
8564        /// Specifies that this app profile is intended for read-only usage via the
8565        /// Data Boost feature.
8566        DataBoostIsolationReadOnly(
8567            std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
8568        ),
8569    }
8570}
8571
8572/// A tablet is a defined by a start and end key and is explained in
8573/// <https://cloud.google.com/bigtable/docs/overview#architecture> and
8574/// <https://cloud.google.com/bigtable/docs/performance#optimization>.
8575/// A Hot tablet is a tablet that exhibits high average cpu usage during the time
8576/// interval from start time to end time.
8577#[derive(Clone, Default, PartialEq)]
8578#[non_exhaustive]
8579pub struct HotTablet {
8580    /// The unique name of the hot tablet. Values are of the form
8581    /// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
8582    pub name: std::string::String,
8583
8584    /// Name of the table that contains the tablet. Values are of the form
8585    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
8586    pub table_name: std::string::String,
8587
8588    /// Output only. The start time of the hot tablet.
8589    pub start_time: std::option::Option<wkt::Timestamp>,
8590
8591    /// Output only. The end time of the hot tablet.
8592    pub end_time: std::option::Option<wkt::Timestamp>,
8593
8594    /// Tablet Start Key (inclusive).
8595    pub start_key: std::string::String,
8596
8597    /// Tablet End Key (inclusive).
8598    pub end_key: std::string::String,
8599
8600    /// Output only. The average CPU usage spent by a node on this tablet over the
8601    /// start_time to end_time time range. The percentage is the amount of CPU used
8602    /// by the node to serve the tablet, from 0% (tablet was not interacted with)
8603    /// to 100% (the node spent all cycles serving the hot tablet).
8604    pub node_cpu_usage_percent: f32,
8605
8606    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8607}
8608
8609impl HotTablet {
8610    pub fn new() -> Self {
8611        std::default::Default::default()
8612    }
8613
8614    /// Sets the value of [name][crate::model::HotTablet::name].
8615    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8616        self.name = v.into();
8617        self
8618    }
8619
8620    /// Sets the value of [table_name][crate::model::HotTablet::table_name].
8621    pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8622        self.table_name = v.into();
8623        self
8624    }
8625
8626    /// Sets the value of [start_time][crate::model::HotTablet::start_time].
8627    pub fn set_start_time<T>(mut self, v: T) -> Self
8628    where
8629        T: std::convert::Into<wkt::Timestamp>,
8630    {
8631        self.start_time = std::option::Option::Some(v.into());
8632        self
8633    }
8634
8635    /// Sets or clears the value of [start_time][crate::model::HotTablet::start_time].
8636    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8637    where
8638        T: std::convert::Into<wkt::Timestamp>,
8639    {
8640        self.start_time = v.map(|x| x.into());
8641        self
8642    }
8643
8644    /// Sets the value of [end_time][crate::model::HotTablet::end_time].
8645    pub fn set_end_time<T>(mut self, v: T) -> Self
8646    where
8647        T: std::convert::Into<wkt::Timestamp>,
8648    {
8649        self.end_time = std::option::Option::Some(v.into());
8650        self
8651    }
8652
8653    /// Sets or clears the value of [end_time][crate::model::HotTablet::end_time].
8654    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8655    where
8656        T: std::convert::Into<wkt::Timestamp>,
8657    {
8658        self.end_time = v.map(|x| x.into());
8659        self
8660    }
8661
8662    /// Sets the value of [start_key][crate::model::HotTablet::start_key].
8663    pub fn set_start_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8664        self.start_key = v.into();
8665        self
8666    }
8667
8668    /// Sets the value of [end_key][crate::model::HotTablet::end_key].
8669    pub fn set_end_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8670        self.end_key = v.into();
8671        self
8672    }
8673
8674    /// Sets the value of [node_cpu_usage_percent][crate::model::HotTablet::node_cpu_usage_percent].
8675    pub fn set_node_cpu_usage_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
8676        self.node_cpu_usage_percent = v.into();
8677        self
8678    }
8679}
8680
8681impl wkt::message::Message for HotTablet {
8682    fn typename() -> &'static str {
8683        "type.googleapis.com/google.bigtable.admin.v2.HotTablet"
8684    }
8685}
8686
8687/// A SQL logical view object that can be referenced in SQL queries.
8688#[derive(Clone, Default, PartialEq)]
8689#[non_exhaustive]
8690pub struct LogicalView {
8691    /// Identifier. The unique name of the logical view.
8692    /// Format:
8693    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
8694    pub name: std::string::String,
8695
8696    /// Required. The logical view's select query.
8697    pub query: std::string::String,
8698
8699    /// Optional. The etag for this logical view.
8700    /// This may be sent on update requests to ensure that the client has an
8701    /// up-to-date value before proceeding. The server returns an ABORTED error on
8702    /// a mismatched etag.
8703    pub etag: std::string::String,
8704
8705    /// Optional. Set to true to make the LogicalView protected against deletion.
8706    pub deletion_protection: bool,
8707
8708    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8709}
8710
8711impl LogicalView {
8712    pub fn new() -> Self {
8713        std::default::Default::default()
8714    }
8715
8716    /// Sets the value of [name][crate::model::LogicalView::name].
8717    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8718        self.name = v.into();
8719        self
8720    }
8721
8722    /// Sets the value of [query][crate::model::LogicalView::query].
8723    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8724        self.query = v.into();
8725        self
8726    }
8727
8728    /// Sets the value of [etag][crate::model::LogicalView::etag].
8729    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8730        self.etag = v.into();
8731        self
8732    }
8733
8734    /// Sets the value of [deletion_protection][crate::model::LogicalView::deletion_protection].
8735    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8736        self.deletion_protection = v.into();
8737        self
8738    }
8739}
8740
8741impl wkt::message::Message for LogicalView {
8742    fn typename() -> &'static str {
8743        "type.googleapis.com/google.bigtable.admin.v2.LogicalView"
8744    }
8745}
8746
8747/// A materialized view object that can be referenced in SQL queries.
8748#[derive(Clone, Default, PartialEq)]
8749#[non_exhaustive]
8750pub struct MaterializedView {
8751    /// Identifier. The unique name of the materialized view.
8752    /// Format:
8753    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
8754    pub name: std::string::String,
8755
8756    /// Required. Immutable. The materialized view's select query.
8757    pub query: std::string::String,
8758
8759    /// Optional. The etag for this materialized view.
8760    /// This may be sent on update requests to ensure that the client has an
8761    /// up-to-date value before proceeding. The server returns an ABORTED error on
8762    /// a mismatched etag.
8763    pub etag: std::string::String,
8764
8765    /// Set to true to make the MaterializedView protected against deletion.
8766    pub deletion_protection: bool,
8767
8768    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8769}
8770
8771impl MaterializedView {
8772    pub fn new() -> Self {
8773        std::default::Default::default()
8774    }
8775
8776    /// Sets the value of [name][crate::model::MaterializedView::name].
8777    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8778        self.name = v.into();
8779        self
8780    }
8781
8782    /// Sets the value of [query][crate::model::MaterializedView::query].
8783    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8784        self.query = v.into();
8785        self
8786    }
8787
8788    /// Sets the value of [etag][crate::model::MaterializedView::etag].
8789    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8790        self.etag = v.into();
8791        self
8792    }
8793
8794    /// Sets the value of [deletion_protection][crate::model::MaterializedView::deletion_protection].
8795    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8796        self.deletion_protection = v.into();
8797        self
8798    }
8799}
8800
8801impl wkt::message::Message for MaterializedView {
8802    fn typename() -> &'static str {
8803        "type.googleapis.com/google.bigtable.admin.v2.MaterializedView"
8804    }
8805}
8806
8807/// Information about a table restore.
8808#[derive(Clone, Default, PartialEq)]
8809#[non_exhaustive]
8810pub struct RestoreInfo {
8811    /// The type of the restore source.
8812    pub source_type: crate::model::RestoreSourceType,
8813
8814    /// Information about the source used to restore the table.
8815    pub source_info: std::option::Option<crate::model::restore_info::SourceInfo>,
8816
8817    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8818}
8819
8820impl RestoreInfo {
8821    pub fn new() -> Self {
8822        std::default::Default::default()
8823    }
8824
8825    /// Sets the value of [source_type][crate::model::RestoreInfo::source_type].
8826    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
8827        mut self,
8828        v: T,
8829    ) -> Self {
8830        self.source_type = v.into();
8831        self
8832    }
8833
8834    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info].
8835    ///
8836    /// Note that all the setters affecting `source_info` are mutually
8837    /// exclusive.
8838    pub fn set_source_info<
8839        T: std::convert::Into<std::option::Option<crate::model::restore_info::SourceInfo>>,
8840    >(
8841        mut self,
8842        v: T,
8843    ) -> Self {
8844        self.source_info = v.into();
8845        self
8846    }
8847
8848    /// The value of [source_info][crate::model::RestoreInfo::source_info]
8849    /// if it holds a `BackupInfo`, `None` if the field is not set or
8850    /// holds a different branch.
8851    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
8852        #[allow(unreachable_patterns)]
8853        self.source_info.as_ref().and_then(|v| match v {
8854            crate::model::restore_info::SourceInfo::BackupInfo(v) => std::option::Option::Some(v),
8855            _ => std::option::Option::None,
8856        })
8857    }
8858
8859    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info]
8860    /// to hold a `BackupInfo`.
8861    ///
8862    /// Note that all the setters affecting `source_info` are
8863    /// mutually exclusive.
8864    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
8865        mut self,
8866        v: T,
8867    ) -> Self {
8868        self.source_info =
8869            std::option::Option::Some(crate::model::restore_info::SourceInfo::BackupInfo(v.into()));
8870        self
8871    }
8872}
8873
8874impl wkt::message::Message for RestoreInfo {
8875    fn typename() -> &'static str {
8876        "type.googleapis.com/google.bigtable.admin.v2.RestoreInfo"
8877    }
8878}
8879
8880/// Defines additional types related to [RestoreInfo].
8881pub mod restore_info {
8882    #[allow(unused_imports)]
8883    use super::*;
8884
8885    /// Information about the source used to restore the table.
8886    #[derive(Clone, Debug, PartialEq)]
8887    #[non_exhaustive]
8888    pub enum SourceInfo {
8889        /// Information about the backup used to restore the table. The backup
8890        /// may no longer exist.
8891        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
8892    }
8893}
8894
8895/// Change stream configuration.
8896#[derive(Clone, Default, PartialEq)]
8897#[non_exhaustive]
8898pub struct ChangeStreamConfig {
8899    /// How long the change stream should be retained. Change stream data older
8900    /// than the retention period will not be returned when reading the change
8901    /// stream from the table.
8902    /// Values must be at least 1 day and at most 7 days, and will be truncated to
8903    /// microsecond granularity.
8904    pub retention_period: std::option::Option<wkt::Duration>,
8905
8906    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8907}
8908
8909impl ChangeStreamConfig {
8910    pub fn new() -> Self {
8911        std::default::Default::default()
8912    }
8913
8914    /// Sets the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
8915    pub fn set_retention_period<T>(mut self, v: T) -> Self
8916    where
8917        T: std::convert::Into<wkt::Duration>,
8918    {
8919        self.retention_period = std::option::Option::Some(v.into());
8920        self
8921    }
8922
8923    /// Sets or clears the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
8924    pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
8925    where
8926        T: std::convert::Into<wkt::Duration>,
8927    {
8928        self.retention_period = v.map(|x| x.into());
8929        self
8930    }
8931}
8932
8933impl wkt::message::Message for ChangeStreamConfig {
8934    fn typename() -> &'static str {
8935        "type.googleapis.com/google.bigtable.admin.v2.ChangeStreamConfig"
8936    }
8937}
8938
8939/// A collection of user data indexed by row, column, and timestamp.
8940/// Each table is served using the resources of its parent cluster.
8941#[derive(Clone, Default, PartialEq)]
8942#[non_exhaustive]
8943pub struct Table {
8944    /// The unique name of the table. Values are of the form
8945    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
8946    /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
8947    pub name: std::string::String,
8948
8949    /// Output only. Map from cluster ID to per-cluster table state.
8950    /// If it could not be determined whether or not the table has data in a
8951    /// particular cluster (for example, if its zone is unavailable), then
8952    /// there will be an entry for the cluster with UNKNOWN `replication_status`.
8953    /// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
8954    pub cluster_states:
8955        std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
8956
8957    /// The column families configured for this table, mapped by column family ID.
8958    /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
8959    pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
8960
8961    /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
8962    /// in this table. Timestamps not matching the granularity will be rejected. If
8963    /// unspecified at creation time, the value will be set to `MILLIS`. Views:
8964    /// `SCHEMA_VIEW`, `FULL`.
8965    pub granularity: crate::model::table::TimestampGranularity,
8966
8967    /// Output only. If this table was restored from another data source (e.g. a
8968    /// backup), this field will be populated with information about the restore.
8969    pub restore_info: std::option::Option<crate::model::RestoreInfo>,
8970
8971    /// If specified, enable the change stream on this table.
8972    /// Otherwise, the change stream is disabled and the change stream is not
8973    /// retained.
8974    pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
8975
8976    /// Set to true to make the table protected against data loss. i.e. deleting
8977    /// the following resources through Admin APIs are prohibited:
8978    ///
8979    /// * The table.
8980    /// * The column families in the table.
8981    /// * The instance containing the table.
8982    ///
8983    /// Note one can still delete the data stored in the table through Data APIs.
8984    pub deletion_protection: bool,
8985
8986    /// The row key schema for this table. The schema is used to decode the raw row
8987    /// key bytes into a structured format. The order of field declarations in this
8988    /// schema is important, as it reflects how the raw row key bytes are
8989    /// structured. Currently, this only affects how the key is read via a
8990    /// GoogleSQL query from the ExecuteQuery API.
8991    ///
8992    /// For a SQL query, the _key column is still read as raw bytes. But queries
8993    /// can reference the key fields by name, which will be decoded from _key using
8994    /// provided type and encoding. Queries that reference key fields will fail if
8995    /// they encounter an invalid row key.
8996    ///
8997    /// For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
8998    /// following schema:
8999    /// {
9000    /// fields {
9001    /// field_name: "id"
9002    /// type { string { encoding: utf8_bytes {} } }
9003    /// }
9004    /// fields {
9005    /// field_name: "date"
9006    /// type { string { encoding: utf8_bytes {} } }
9007    /// }
9008    /// fields {
9009    /// field_name: "product_code"
9010    /// type { int64 { encoding: big_endian_bytes {} } }
9011    /// }
9012    /// encoding { delimited_bytes { delimiter: "#" } }
9013    /// }
9014    ///
9015    /// The decoded key parts would be:
9016    /// id = "some_id", date = "2024-04-30", product_code = 1245427
9017    /// The query "SELECT _key, product_code FROM table" will return two columns:
9018    /// /------------------------------------------------------\
9019    /// |              _key                     | product_code |
9020    /// | --------------------------------------|--------------|
9021    /// | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
9022    /// \------------------------------------------------------/
9023    ///
9024    /// The schema has the following invariants:
9025    /// (1) The decoded field values are order-preserved. For read, the field
9026    /// values will be decoded in sorted mode from the raw bytes.
9027    /// (2) Every field in the schema must specify a non-empty name.
9028    /// (3) Every field must specify a type with an associated encoding. The type
9029    /// is limited to scalar types only: Array, Map, Aggregate, and Struct are not
9030    /// allowed.
9031    /// (4) The field names must not collide with existing column family
9032    /// names and reserved keywords "_key" and "_timestamp".
9033    ///
9034    /// The following update operations are allowed for row_key_schema:
9035    ///
9036    /// - Update from an empty schema to a new schema.
9037    /// - Remove the existing schema. This operation requires setting the
9038    ///   `ignore_warnings` flag to `true`, since it might be a backward
9039    ///   incompatible change. Without the flag, the update request will fail with
9040    ///   an INVALID_ARGUMENT error.
9041    ///   Any other row key schema update operation (e.g. update existing schema
9042    ///   columns names or types) is currently unsupported.
9043    pub row_key_schema: std::option::Option<crate::model::r#type::Struct>,
9044
9045    pub automated_backup_config: std::option::Option<crate::model::table::AutomatedBackupConfig>,
9046
9047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9048}
9049
9050impl Table {
9051    pub fn new() -> Self {
9052        std::default::Default::default()
9053    }
9054
9055    /// Sets the value of [name][crate::model::Table::name].
9056    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9057        self.name = v.into();
9058        self
9059    }
9060
9061    /// Sets the value of [cluster_states][crate::model::Table::cluster_states].
9062    pub fn set_cluster_states<T, K, V>(mut self, v: T) -> Self
9063    where
9064        T: std::iter::IntoIterator<Item = (K, V)>,
9065        K: std::convert::Into<std::string::String>,
9066        V: std::convert::Into<crate::model::table::ClusterState>,
9067    {
9068        use std::iter::Iterator;
9069        self.cluster_states = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9070        self
9071    }
9072
9073    /// Sets the value of [column_families][crate::model::Table::column_families].
9074    pub fn set_column_families<T, K, V>(mut self, v: T) -> Self
9075    where
9076        T: std::iter::IntoIterator<Item = (K, V)>,
9077        K: std::convert::Into<std::string::String>,
9078        V: std::convert::Into<crate::model::ColumnFamily>,
9079    {
9080        use std::iter::Iterator;
9081        self.column_families = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9082        self
9083    }
9084
9085    /// Sets the value of [granularity][crate::model::Table::granularity].
9086    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
9087        mut self,
9088        v: T,
9089    ) -> Self {
9090        self.granularity = v.into();
9091        self
9092    }
9093
9094    /// Sets the value of [restore_info][crate::model::Table::restore_info].
9095    pub fn set_restore_info<T>(mut self, v: T) -> Self
9096    where
9097        T: std::convert::Into<crate::model::RestoreInfo>,
9098    {
9099        self.restore_info = std::option::Option::Some(v.into());
9100        self
9101    }
9102
9103    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
9104    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
9105    where
9106        T: std::convert::Into<crate::model::RestoreInfo>,
9107    {
9108        self.restore_info = v.map(|x| x.into());
9109        self
9110    }
9111
9112    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
9113    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
9114    where
9115        T: std::convert::Into<crate::model::ChangeStreamConfig>,
9116    {
9117        self.change_stream_config = std::option::Option::Some(v.into());
9118        self
9119    }
9120
9121    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
9122    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
9123    where
9124        T: std::convert::Into<crate::model::ChangeStreamConfig>,
9125    {
9126        self.change_stream_config = v.map(|x| x.into());
9127        self
9128    }
9129
9130    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
9131    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9132        self.deletion_protection = v.into();
9133        self
9134    }
9135
9136    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
9137    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
9138    where
9139        T: std::convert::Into<crate::model::r#type::Struct>,
9140    {
9141        self.row_key_schema = std::option::Option::Some(v.into());
9142        self
9143    }
9144
9145    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
9146    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
9147    where
9148        T: std::convert::Into<crate::model::r#type::Struct>,
9149    {
9150        self.row_key_schema = v.map(|x| x.into());
9151        self
9152    }
9153
9154    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
9155    ///
9156    /// Note that all the setters affecting `automated_backup_config` are mutually
9157    /// exclusive.
9158    pub fn set_automated_backup_config<
9159        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
9160    >(
9161        mut self,
9162        v: T,
9163    ) -> Self {
9164        self.automated_backup_config = v.into();
9165        self
9166    }
9167
9168    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
9169    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
9170    /// holds a different branch.
9171    pub fn automated_backup_policy(
9172        &self,
9173    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
9174        #[allow(unreachable_patterns)]
9175        self.automated_backup_config.as_ref().and_then(|v| match v {
9176            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
9177                std::option::Option::Some(v)
9178            }
9179            _ => std::option::Option::None,
9180        })
9181    }
9182
9183    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
9184    /// to hold a `AutomatedBackupPolicy`.
9185    ///
9186    /// Note that all the setters affecting `automated_backup_config` are
9187    /// mutually exclusive.
9188    pub fn set_automated_backup_policy<
9189        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
9190    >(
9191        mut self,
9192        v: T,
9193    ) -> Self {
9194        self.automated_backup_config = std::option::Option::Some(
9195            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
9196        );
9197        self
9198    }
9199}
9200
9201impl wkt::message::Message for Table {
9202    fn typename() -> &'static str {
9203        "type.googleapis.com/google.bigtable.admin.v2.Table"
9204    }
9205}
9206
9207/// Defines additional types related to [Table].
9208pub mod table {
9209    #[allow(unused_imports)]
9210    use super::*;
9211
9212    /// The state of a table's data in a particular cluster.
9213    #[derive(Clone, Default, PartialEq)]
9214    #[non_exhaustive]
9215    pub struct ClusterState {
9216        /// Output only. The state of replication for the table in this cluster.
9217        pub replication_state: crate::model::table::cluster_state::ReplicationState,
9218
9219        /// Output only. The encryption information for the table in this cluster.
9220        /// If the encryption key protecting this resource is customer managed, then
9221        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
9222        /// The primary version of the key and its status will be reflected here when
9223        /// changes propagate from Cloud KMS.
9224        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
9225
9226        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9227    }
9228
9229    impl ClusterState {
9230        pub fn new() -> Self {
9231            std::default::Default::default()
9232        }
9233
9234        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
9235        pub fn set_replication_state<
9236            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
9237        >(
9238            mut self,
9239            v: T,
9240        ) -> Self {
9241            self.replication_state = v.into();
9242            self
9243        }
9244
9245        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
9246        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
9247        where
9248            T: std::iter::IntoIterator<Item = V>,
9249            V: std::convert::Into<crate::model::EncryptionInfo>,
9250        {
9251            use std::iter::Iterator;
9252            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
9253            self
9254        }
9255    }
9256
9257    impl wkt::message::Message for ClusterState {
9258        fn typename() -> &'static str {
9259            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
9260        }
9261    }
9262
9263    /// Defines additional types related to [ClusterState].
9264    pub mod cluster_state {
9265        #[allow(unused_imports)]
9266        use super::*;
9267
9268        /// Table replication states.
9269        ///
9270        /// # Working with unknown values
9271        ///
9272        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9273        /// additional enum variants at any time. Adding new variants is not considered
9274        /// a breaking change. Applications should write their code in anticipation of:
9275        ///
9276        /// - New values appearing in future releases of the client library, **and**
9277        /// - New values received dynamically, without application changes.
9278        ///
9279        /// Please consult the [Working with enums] section in the user guide for some
9280        /// guidelines.
9281        ///
9282        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9283        #[derive(Clone, Debug, PartialEq)]
9284        #[non_exhaustive]
9285        pub enum ReplicationState {
9286            /// The replication state of the table is unknown in this cluster.
9287            StateNotKnown,
9288            /// The cluster was recently created, and the table must finish copying
9289            /// over pre-existing data from other clusters before it can begin
9290            /// receiving live replication updates and serving Data API requests.
9291            Initializing,
9292            /// The table is temporarily unable to serve Data API requests from this
9293            /// cluster due to planned internal maintenance.
9294            PlannedMaintenance,
9295            /// The table is temporarily unable to serve Data API requests from this
9296            /// cluster due to unplanned or emergency maintenance.
9297            UnplannedMaintenance,
9298            /// The table can serve Data API requests from this cluster. Depending on
9299            /// replication delay, reads may not immediately reflect the state of the
9300            /// table in other clusters.
9301            Ready,
9302            /// The table is fully created and ready for use after a restore, and is
9303            /// being optimized for performance. When optimizations are complete, the
9304            /// table will transition to `READY` state.
9305            ReadyOptimizing,
9306            /// If set, the enum was initialized with an unknown value.
9307            ///
9308            /// Applications can examine the value using [ReplicationState::value] or
9309            /// [ReplicationState::name].
9310            UnknownValue(replication_state::UnknownValue),
9311        }
9312
9313        #[doc(hidden)]
9314        pub mod replication_state {
9315            #[allow(unused_imports)]
9316            use super::*;
9317            #[derive(Clone, Debug, PartialEq)]
9318            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9319        }
9320
9321        impl ReplicationState {
9322            /// Gets the enum value.
9323            ///
9324            /// Returns `None` if the enum contains an unknown value deserialized from
9325            /// the string representation of enums.
9326            pub fn value(&self) -> std::option::Option<i32> {
9327                match self {
9328                    Self::StateNotKnown => std::option::Option::Some(0),
9329                    Self::Initializing => std::option::Option::Some(1),
9330                    Self::PlannedMaintenance => std::option::Option::Some(2),
9331                    Self::UnplannedMaintenance => std::option::Option::Some(3),
9332                    Self::Ready => std::option::Option::Some(4),
9333                    Self::ReadyOptimizing => std::option::Option::Some(5),
9334                    Self::UnknownValue(u) => u.0.value(),
9335                }
9336            }
9337
9338            /// Gets the enum value as a string.
9339            ///
9340            /// Returns `None` if the enum contains an unknown value deserialized from
9341            /// the integer representation of enums.
9342            pub fn name(&self) -> std::option::Option<&str> {
9343                match self {
9344                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
9345                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
9346                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
9347                    Self::UnplannedMaintenance => {
9348                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
9349                    }
9350                    Self::Ready => std::option::Option::Some("READY"),
9351                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
9352                    Self::UnknownValue(u) => u.0.name(),
9353                }
9354            }
9355        }
9356
9357        impl std::default::Default for ReplicationState {
9358            fn default() -> Self {
9359                use std::convert::From;
9360                Self::from(0)
9361            }
9362        }
9363
9364        impl std::fmt::Display for ReplicationState {
9365            fn fmt(
9366                &self,
9367                f: &mut std::fmt::Formatter<'_>,
9368            ) -> std::result::Result<(), std::fmt::Error> {
9369                wkt::internal::display_enum(f, self.name(), self.value())
9370            }
9371        }
9372
9373        impl std::convert::From<i32> for ReplicationState {
9374            fn from(value: i32) -> Self {
9375                match value {
9376                    0 => Self::StateNotKnown,
9377                    1 => Self::Initializing,
9378                    2 => Self::PlannedMaintenance,
9379                    3 => Self::UnplannedMaintenance,
9380                    4 => Self::Ready,
9381                    5 => Self::ReadyOptimizing,
9382                    _ => Self::UnknownValue(replication_state::UnknownValue(
9383                        wkt::internal::UnknownEnumValue::Integer(value),
9384                    )),
9385                }
9386            }
9387        }
9388
9389        impl std::convert::From<&str> for ReplicationState {
9390            fn from(value: &str) -> Self {
9391                use std::string::ToString;
9392                match value {
9393                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
9394                    "INITIALIZING" => Self::Initializing,
9395                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
9396                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
9397                    "READY" => Self::Ready,
9398                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
9399                    _ => Self::UnknownValue(replication_state::UnknownValue(
9400                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9401                    )),
9402                }
9403            }
9404        }
9405
9406        impl serde::ser::Serialize for ReplicationState {
9407            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9408            where
9409                S: serde::Serializer,
9410            {
9411                match self {
9412                    Self::StateNotKnown => serializer.serialize_i32(0),
9413                    Self::Initializing => serializer.serialize_i32(1),
9414                    Self::PlannedMaintenance => serializer.serialize_i32(2),
9415                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
9416                    Self::Ready => serializer.serialize_i32(4),
9417                    Self::ReadyOptimizing => serializer.serialize_i32(5),
9418                    Self::UnknownValue(u) => u.0.serialize(serializer),
9419                }
9420            }
9421        }
9422
9423        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
9424            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9425            where
9426                D: serde::Deserializer<'de>,
9427            {
9428                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
9429                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
9430                ))
9431            }
9432        }
9433    }
9434
9435    /// Defines an automated backup policy for a table
9436    #[derive(Clone, Default, PartialEq)]
9437    #[non_exhaustive]
9438    pub struct AutomatedBackupPolicy {
9439        /// Required. How long the automated backups should be retained. The only
9440        /// supported value at this time is 3 days.
9441        pub retention_period: std::option::Option<wkt::Duration>,
9442
9443        /// Required. How frequently automated backups should occur. The only
9444        /// supported value at this time is 24 hours.
9445        pub frequency: std::option::Option<wkt::Duration>,
9446
9447        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9448    }
9449
9450    impl AutomatedBackupPolicy {
9451        pub fn new() -> Self {
9452            std::default::Default::default()
9453        }
9454
9455        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
9456        pub fn set_retention_period<T>(mut self, v: T) -> Self
9457        where
9458            T: std::convert::Into<wkt::Duration>,
9459        {
9460            self.retention_period = std::option::Option::Some(v.into());
9461            self
9462        }
9463
9464        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
9465        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
9466        where
9467            T: std::convert::Into<wkt::Duration>,
9468        {
9469            self.retention_period = v.map(|x| x.into());
9470            self
9471        }
9472
9473        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
9474        pub fn set_frequency<T>(mut self, v: T) -> Self
9475        where
9476            T: std::convert::Into<wkt::Duration>,
9477        {
9478            self.frequency = std::option::Option::Some(v.into());
9479            self
9480        }
9481
9482        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
9483        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
9484        where
9485            T: std::convert::Into<wkt::Duration>,
9486        {
9487            self.frequency = v.map(|x| x.into());
9488            self
9489        }
9490    }
9491
9492    impl wkt::message::Message for AutomatedBackupPolicy {
9493        fn typename() -> &'static str {
9494            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
9495        }
9496    }
9497
9498    /// Possible timestamp granularities to use when keeping multiple versions
9499    /// of data in a table.
9500    ///
9501    /// # Working with unknown values
9502    ///
9503    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9504    /// additional enum variants at any time. Adding new variants is not considered
9505    /// a breaking change. Applications should write their code in anticipation of:
9506    ///
9507    /// - New values appearing in future releases of the client library, **and**
9508    /// - New values received dynamically, without application changes.
9509    ///
9510    /// Please consult the [Working with enums] section in the user guide for some
9511    /// guidelines.
9512    ///
9513    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9514    #[derive(Clone, Debug, PartialEq)]
9515    #[non_exhaustive]
9516    pub enum TimestampGranularity {
9517        /// The user did not specify a granularity. Should not be returned.
9518        /// When specified during table creation, MILLIS will be used.
9519        Unspecified,
9520        /// The table keeps data versioned at a granularity of 1ms.
9521        Millis,
9522        /// If set, the enum was initialized with an unknown value.
9523        ///
9524        /// Applications can examine the value using [TimestampGranularity::value] or
9525        /// [TimestampGranularity::name].
9526        UnknownValue(timestamp_granularity::UnknownValue),
9527    }
9528
9529    #[doc(hidden)]
9530    pub mod timestamp_granularity {
9531        #[allow(unused_imports)]
9532        use super::*;
9533        #[derive(Clone, Debug, PartialEq)]
9534        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9535    }
9536
9537    impl TimestampGranularity {
9538        /// Gets the enum value.
9539        ///
9540        /// Returns `None` if the enum contains an unknown value deserialized from
9541        /// the string representation of enums.
9542        pub fn value(&self) -> std::option::Option<i32> {
9543            match self {
9544                Self::Unspecified => std::option::Option::Some(0),
9545                Self::Millis => std::option::Option::Some(1),
9546                Self::UnknownValue(u) => u.0.value(),
9547            }
9548        }
9549
9550        /// Gets the enum value as a string.
9551        ///
9552        /// Returns `None` if the enum contains an unknown value deserialized from
9553        /// the integer representation of enums.
9554        pub fn name(&self) -> std::option::Option<&str> {
9555            match self {
9556                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
9557                Self::Millis => std::option::Option::Some("MILLIS"),
9558                Self::UnknownValue(u) => u.0.name(),
9559            }
9560        }
9561    }
9562
9563    impl std::default::Default for TimestampGranularity {
9564        fn default() -> Self {
9565            use std::convert::From;
9566            Self::from(0)
9567        }
9568    }
9569
9570    impl std::fmt::Display for TimestampGranularity {
9571        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9572            wkt::internal::display_enum(f, self.name(), self.value())
9573        }
9574    }
9575
9576    impl std::convert::From<i32> for TimestampGranularity {
9577        fn from(value: i32) -> Self {
9578            match value {
9579                0 => Self::Unspecified,
9580                1 => Self::Millis,
9581                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
9582                    wkt::internal::UnknownEnumValue::Integer(value),
9583                )),
9584            }
9585        }
9586    }
9587
9588    impl std::convert::From<&str> for TimestampGranularity {
9589        fn from(value: &str) -> Self {
9590            use std::string::ToString;
9591            match value {
9592                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
9593                "MILLIS" => Self::Millis,
9594                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
9595                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9596                )),
9597            }
9598        }
9599    }
9600
9601    impl serde::ser::Serialize for TimestampGranularity {
9602        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9603        where
9604            S: serde::Serializer,
9605        {
9606            match self {
9607                Self::Unspecified => serializer.serialize_i32(0),
9608                Self::Millis => serializer.serialize_i32(1),
9609                Self::UnknownValue(u) => u.0.serialize(serializer),
9610            }
9611        }
9612    }
9613
9614    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
9615        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9616        where
9617            D: serde::Deserializer<'de>,
9618        {
9619            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
9620                ".google.bigtable.admin.v2.Table.TimestampGranularity",
9621            ))
9622        }
9623    }
9624
9625    /// Defines a view over a table's fields.
9626    ///
9627    /// # Working with unknown values
9628    ///
9629    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9630    /// additional enum variants at any time. Adding new variants is not considered
9631    /// a breaking change. Applications should write their code in anticipation of:
9632    ///
9633    /// - New values appearing in future releases of the client library, **and**
9634    /// - New values received dynamically, without application changes.
9635    ///
9636    /// Please consult the [Working with enums] section in the user guide for some
9637    /// guidelines.
9638    ///
9639    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9640    #[derive(Clone, Debug, PartialEq)]
9641    #[non_exhaustive]
9642    pub enum View {
9643        /// Uses the default view for each method as documented in its request.
9644        Unspecified,
9645        /// Only populates `name`.
9646        NameOnly,
9647        /// Only populates `name` and fields related to the table's schema.
9648        SchemaView,
9649        /// Only populates `name` and fields related to the table's replication
9650        /// state.
9651        ReplicationView,
9652        /// Only populates `name` and fields related to the table's encryption state.
9653        EncryptionView,
9654        /// Populates all fields.
9655        Full,
9656        /// If set, the enum was initialized with an unknown value.
9657        ///
9658        /// Applications can examine the value using [View::value] or
9659        /// [View::name].
9660        UnknownValue(view::UnknownValue),
9661    }
9662
9663    #[doc(hidden)]
9664    pub mod view {
9665        #[allow(unused_imports)]
9666        use super::*;
9667        #[derive(Clone, Debug, PartialEq)]
9668        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9669    }
9670
9671    impl View {
9672        /// Gets the enum value.
9673        ///
9674        /// Returns `None` if the enum contains an unknown value deserialized from
9675        /// the string representation of enums.
9676        pub fn value(&self) -> std::option::Option<i32> {
9677            match self {
9678                Self::Unspecified => std::option::Option::Some(0),
9679                Self::NameOnly => std::option::Option::Some(1),
9680                Self::SchemaView => std::option::Option::Some(2),
9681                Self::ReplicationView => std::option::Option::Some(3),
9682                Self::EncryptionView => std::option::Option::Some(5),
9683                Self::Full => std::option::Option::Some(4),
9684                Self::UnknownValue(u) => u.0.value(),
9685            }
9686        }
9687
9688        /// Gets the enum value as a string.
9689        ///
9690        /// Returns `None` if the enum contains an unknown value deserialized from
9691        /// the integer representation of enums.
9692        pub fn name(&self) -> std::option::Option<&str> {
9693            match self {
9694                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
9695                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
9696                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
9697                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
9698                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
9699                Self::Full => std::option::Option::Some("FULL"),
9700                Self::UnknownValue(u) => u.0.name(),
9701            }
9702        }
9703    }
9704
9705    impl std::default::Default for View {
9706        fn default() -> Self {
9707            use std::convert::From;
9708            Self::from(0)
9709        }
9710    }
9711
9712    impl std::fmt::Display for View {
9713        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9714            wkt::internal::display_enum(f, self.name(), self.value())
9715        }
9716    }
9717
9718    impl std::convert::From<i32> for View {
9719        fn from(value: i32) -> Self {
9720            match value {
9721                0 => Self::Unspecified,
9722                1 => Self::NameOnly,
9723                2 => Self::SchemaView,
9724                3 => Self::ReplicationView,
9725                4 => Self::Full,
9726                5 => Self::EncryptionView,
9727                _ => Self::UnknownValue(view::UnknownValue(
9728                    wkt::internal::UnknownEnumValue::Integer(value),
9729                )),
9730            }
9731        }
9732    }
9733
9734    impl std::convert::From<&str> for View {
9735        fn from(value: &str) -> Self {
9736            use std::string::ToString;
9737            match value {
9738                "VIEW_UNSPECIFIED" => Self::Unspecified,
9739                "NAME_ONLY" => Self::NameOnly,
9740                "SCHEMA_VIEW" => Self::SchemaView,
9741                "REPLICATION_VIEW" => Self::ReplicationView,
9742                "ENCRYPTION_VIEW" => Self::EncryptionView,
9743                "FULL" => Self::Full,
9744                _ => Self::UnknownValue(view::UnknownValue(
9745                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9746                )),
9747            }
9748        }
9749    }
9750
9751    impl serde::ser::Serialize for View {
9752        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9753        where
9754            S: serde::Serializer,
9755        {
9756            match self {
9757                Self::Unspecified => serializer.serialize_i32(0),
9758                Self::NameOnly => serializer.serialize_i32(1),
9759                Self::SchemaView => serializer.serialize_i32(2),
9760                Self::ReplicationView => serializer.serialize_i32(3),
9761                Self::EncryptionView => serializer.serialize_i32(5),
9762                Self::Full => serializer.serialize_i32(4),
9763                Self::UnknownValue(u) => u.0.serialize(serializer),
9764            }
9765        }
9766    }
9767
9768    impl<'de> serde::de::Deserialize<'de> for View {
9769        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9770        where
9771            D: serde::Deserializer<'de>,
9772        {
9773            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
9774                ".google.bigtable.admin.v2.Table.View",
9775            ))
9776        }
9777    }
9778
9779    #[derive(Clone, Debug, PartialEq)]
9780    #[non_exhaustive]
9781    pub enum AutomatedBackupConfig {
9782        /// If specified, automated backups are enabled for this table.
9783        /// Otherwise, automated backups are disabled.
9784        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
9785    }
9786}
9787
9788/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
9789/// can configure access to each Authorized View independently from the table and
9790/// use the existing Data APIs to access the subset of data.
9791#[derive(Clone, Default, PartialEq)]
9792#[non_exhaustive]
9793pub struct AuthorizedView {
9794    /// Identifier. The name of this AuthorizedView.
9795    /// Values are of the form
9796    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
9797    pub name: std::string::String,
9798
9799    /// The etag for this AuthorizedView.
9800    /// If this is provided on update, it must match the server's etag. The server
9801    /// returns ABORTED error on a mismatched etag.
9802    pub etag: std::string::String,
9803
9804    /// Set to true to make the AuthorizedView protected against deletion.
9805    /// The parent Table and containing Instance cannot be deleted if an
9806    /// AuthorizedView has this bit set.
9807    pub deletion_protection: bool,
9808
9809    /// The type of this AuthorizedView.
9810    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
9811
9812    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9813}
9814
9815impl AuthorizedView {
9816    pub fn new() -> Self {
9817        std::default::Default::default()
9818    }
9819
9820    /// Sets the value of [name][crate::model::AuthorizedView::name].
9821    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9822        self.name = v.into();
9823        self
9824    }
9825
9826    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
9827    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9828        self.etag = v.into();
9829        self
9830    }
9831
9832    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
9833    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9834        self.deletion_protection = v.into();
9835        self
9836    }
9837
9838    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
9839    ///
9840    /// Note that all the setters affecting `authorized_view` are mutually
9841    /// exclusive.
9842    pub fn set_authorized_view<
9843        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
9844    >(
9845        mut self,
9846        v: T,
9847    ) -> Self {
9848        self.authorized_view = v.into();
9849        self
9850    }
9851
9852    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
9853    /// if it holds a `SubsetView`, `None` if the field is not set or
9854    /// holds a different branch.
9855    pub fn subset_view(
9856        &self,
9857    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
9858        #[allow(unreachable_patterns)]
9859        self.authorized_view.as_ref().and_then(|v| match v {
9860            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
9861                std::option::Option::Some(v)
9862            }
9863            _ => std::option::Option::None,
9864        })
9865    }
9866
9867    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
9868    /// to hold a `SubsetView`.
9869    ///
9870    /// Note that all the setters affecting `authorized_view` are
9871    /// mutually exclusive.
9872    pub fn set_subset_view<
9873        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
9874    >(
9875        mut self,
9876        v: T,
9877    ) -> Self {
9878        self.authorized_view = std::option::Option::Some(
9879            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
9880        );
9881        self
9882    }
9883}
9884
9885impl wkt::message::Message for AuthorizedView {
9886    fn typename() -> &'static str {
9887        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
9888    }
9889}
9890
9891/// Defines additional types related to [AuthorizedView].
9892pub mod authorized_view {
9893    #[allow(unused_imports)]
9894    use super::*;
9895
9896    /// Subsets of a column family that are included in this AuthorizedView.
9897    #[derive(Clone, Default, PartialEq)]
9898    #[non_exhaustive]
9899    pub struct FamilySubsets {
9900        /// Individual exact column qualifiers to be included in the AuthorizedView.
9901        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
9902
9903        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
9904        /// qualifier starting with one of these prefixes is included in the
9905        /// AuthorizedView. To provide access to all qualifiers, include the empty
9906        /// string as a prefix
9907        /// ("").
9908        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
9909
9910        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9911    }
9912
9913    impl FamilySubsets {
9914        pub fn new() -> Self {
9915            std::default::Default::default()
9916        }
9917
9918        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
9919        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
9920        where
9921            T: std::iter::IntoIterator<Item = V>,
9922            V: std::convert::Into<::bytes::Bytes>,
9923        {
9924            use std::iter::Iterator;
9925            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
9926            self
9927        }
9928
9929        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
9930        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
9931        where
9932            T: std::iter::IntoIterator<Item = V>,
9933            V: std::convert::Into<::bytes::Bytes>,
9934        {
9935            use std::iter::Iterator;
9936            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
9937            self
9938        }
9939    }
9940
9941    impl wkt::message::Message for FamilySubsets {
9942        fn typename() -> &'static str {
9943            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
9944        }
9945    }
9946
9947    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
9948    #[derive(Clone, Default, PartialEq)]
9949    #[non_exhaustive]
9950    pub struct SubsetView {
9951        /// Row prefixes to be included in the AuthorizedView.
9952        /// To provide access to all rows, include the empty string as a prefix ("").
9953        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
9954
9955        /// Map from column family name to the columns in this family to be included
9956        /// in the AuthorizedView.
9957        pub family_subsets: std::collections::HashMap<
9958            std::string::String,
9959            crate::model::authorized_view::FamilySubsets,
9960        >,
9961
9962        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9963    }
9964
9965    impl SubsetView {
9966        pub fn new() -> Self {
9967            std::default::Default::default()
9968        }
9969
9970        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
9971        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
9972        where
9973            T: std::iter::IntoIterator<Item = V>,
9974            V: std::convert::Into<::bytes::Bytes>,
9975        {
9976            use std::iter::Iterator;
9977            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
9978            self
9979        }
9980
9981        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
9982        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
9983        where
9984            T: std::iter::IntoIterator<Item = (K, V)>,
9985            K: std::convert::Into<std::string::String>,
9986            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
9987        {
9988            use std::iter::Iterator;
9989            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9990            self
9991        }
9992    }
9993
9994    impl wkt::message::Message for SubsetView {
9995        fn typename() -> &'static str {
9996            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
9997        }
9998    }
9999
10000    /// Defines a subset of an AuthorizedView's fields.
10001    ///
10002    /// # Working with unknown values
10003    ///
10004    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10005    /// additional enum variants at any time. Adding new variants is not considered
10006    /// a breaking change. Applications should write their code in anticipation of:
10007    ///
10008    /// - New values appearing in future releases of the client library, **and**
10009    /// - New values received dynamically, without application changes.
10010    ///
10011    /// Please consult the [Working with enums] section in the user guide for some
10012    /// guidelines.
10013    ///
10014    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10015    #[derive(Clone, Debug, PartialEq)]
10016    #[non_exhaustive]
10017    pub enum ResponseView {
10018        /// Uses the default view for each method as documented in the request.
10019        Unspecified,
10020        /// Only populates `name`.
10021        NameOnly,
10022        /// Only populates the AuthorizedView's basic metadata. This includes:
10023        /// name, deletion_protection, etag.
10024        Basic,
10025        /// Populates every fields.
10026        Full,
10027        /// If set, the enum was initialized with an unknown value.
10028        ///
10029        /// Applications can examine the value using [ResponseView::value] or
10030        /// [ResponseView::name].
10031        UnknownValue(response_view::UnknownValue),
10032    }
10033
10034    #[doc(hidden)]
10035    pub mod response_view {
10036        #[allow(unused_imports)]
10037        use super::*;
10038        #[derive(Clone, Debug, PartialEq)]
10039        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10040    }
10041
10042    impl ResponseView {
10043        /// Gets the enum value.
10044        ///
10045        /// Returns `None` if the enum contains an unknown value deserialized from
10046        /// the string representation of enums.
10047        pub fn value(&self) -> std::option::Option<i32> {
10048            match self {
10049                Self::Unspecified => std::option::Option::Some(0),
10050                Self::NameOnly => std::option::Option::Some(1),
10051                Self::Basic => std::option::Option::Some(2),
10052                Self::Full => std::option::Option::Some(3),
10053                Self::UnknownValue(u) => u.0.value(),
10054            }
10055        }
10056
10057        /// Gets the enum value as a string.
10058        ///
10059        /// Returns `None` if the enum contains an unknown value deserialized from
10060        /// the integer representation of enums.
10061        pub fn name(&self) -> std::option::Option<&str> {
10062            match self {
10063                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
10064                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
10065                Self::Basic => std::option::Option::Some("BASIC"),
10066                Self::Full => std::option::Option::Some("FULL"),
10067                Self::UnknownValue(u) => u.0.name(),
10068            }
10069        }
10070    }
10071
10072    impl std::default::Default for ResponseView {
10073        fn default() -> Self {
10074            use std::convert::From;
10075            Self::from(0)
10076        }
10077    }
10078
10079    impl std::fmt::Display for ResponseView {
10080        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10081            wkt::internal::display_enum(f, self.name(), self.value())
10082        }
10083    }
10084
10085    impl std::convert::From<i32> for ResponseView {
10086        fn from(value: i32) -> Self {
10087            match value {
10088                0 => Self::Unspecified,
10089                1 => Self::NameOnly,
10090                2 => Self::Basic,
10091                3 => Self::Full,
10092                _ => Self::UnknownValue(response_view::UnknownValue(
10093                    wkt::internal::UnknownEnumValue::Integer(value),
10094                )),
10095            }
10096        }
10097    }
10098
10099    impl std::convert::From<&str> for ResponseView {
10100        fn from(value: &str) -> Self {
10101            use std::string::ToString;
10102            match value {
10103                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
10104                "NAME_ONLY" => Self::NameOnly,
10105                "BASIC" => Self::Basic,
10106                "FULL" => Self::Full,
10107                _ => Self::UnknownValue(response_view::UnknownValue(
10108                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10109                )),
10110            }
10111        }
10112    }
10113
10114    impl serde::ser::Serialize for ResponseView {
10115        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10116        where
10117            S: serde::Serializer,
10118        {
10119            match self {
10120                Self::Unspecified => serializer.serialize_i32(0),
10121                Self::NameOnly => serializer.serialize_i32(1),
10122                Self::Basic => serializer.serialize_i32(2),
10123                Self::Full => serializer.serialize_i32(3),
10124                Self::UnknownValue(u) => u.0.serialize(serializer),
10125            }
10126        }
10127    }
10128
10129    impl<'de> serde::de::Deserialize<'de> for ResponseView {
10130        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10131        where
10132            D: serde::Deserializer<'de>,
10133        {
10134            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
10135                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
10136            ))
10137        }
10138    }
10139
10140    /// The type of this AuthorizedView.
10141    #[derive(Clone, Debug, PartialEq)]
10142    #[non_exhaustive]
10143    pub enum AuthorizedView {
10144        /// An AuthorizedView permitting access to an explicit subset of a Table.
10145        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
10146    }
10147}
10148
10149/// A set of columns within a table which share a common configuration.
10150#[derive(Clone, Default, PartialEq)]
10151#[non_exhaustive]
10152pub struct ColumnFamily {
10153    /// Garbage collection rule specified as a protobuf.
10154    /// Must serialize to at most 500 bytes.
10155    ///
10156    /// NOTE: Garbage collection executes opportunistically in the background, and
10157    /// so it's possible for reads to return a cell even if it matches the active
10158    /// GC expression for its family.
10159    pub gc_rule: std::option::Option<crate::model::GcRule>,
10160
10161    /// The type of data stored in each of this family's cell values, including its
10162    /// full encoding. If omitted, the family only serves raw untyped bytes.
10163    ///
10164    /// For now, only the `Aggregate` type is supported.
10165    ///
10166    /// `Aggregate` can only be set at family creation and is immutable afterwards.
10167    ///
10168    /// If `value_type` is `Aggregate`, written data must be compatible with:
10169    ///
10170    /// * `value_type.input_type` for `AddInput` mutations
10171    pub value_type: std::option::Option<crate::model::Type>,
10172
10173    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10174}
10175
10176impl ColumnFamily {
10177    pub fn new() -> Self {
10178        std::default::Default::default()
10179    }
10180
10181    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
10182    pub fn set_gc_rule<T>(mut self, v: T) -> Self
10183    where
10184        T: std::convert::Into<crate::model::GcRule>,
10185    {
10186        self.gc_rule = std::option::Option::Some(v.into());
10187        self
10188    }
10189
10190    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
10191    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
10192    where
10193        T: std::convert::Into<crate::model::GcRule>,
10194    {
10195        self.gc_rule = v.map(|x| x.into());
10196        self
10197    }
10198
10199    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
10200    pub fn set_value_type<T>(mut self, v: T) -> Self
10201    where
10202        T: std::convert::Into<crate::model::Type>,
10203    {
10204        self.value_type = std::option::Option::Some(v.into());
10205        self
10206    }
10207
10208    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
10209    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
10210    where
10211        T: std::convert::Into<crate::model::Type>,
10212    {
10213        self.value_type = v.map(|x| x.into());
10214        self
10215    }
10216}
10217
10218impl wkt::message::Message for ColumnFamily {
10219    fn typename() -> &'static str {
10220        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
10221    }
10222}
10223
10224/// Rule for determining which cells to delete during garbage collection.
10225#[derive(Clone, Default, PartialEq)]
10226#[non_exhaustive]
10227pub struct GcRule {
10228    /// Garbage collection rules.
10229    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
10230
10231    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10232}
10233
10234impl GcRule {
10235    pub fn new() -> Self {
10236        std::default::Default::default()
10237    }
10238
10239    /// Sets the value of [rule][crate::model::GcRule::rule].
10240    ///
10241    /// Note that all the setters affecting `rule` are mutually
10242    /// exclusive.
10243    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
10244        mut self,
10245        v: T,
10246    ) -> Self {
10247        self.rule = v.into();
10248        self
10249    }
10250
10251    /// The value of [rule][crate::model::GcRule::rule]
10252    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
10253    /// holds a different branch.
10254    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
10255        #[allow(unreachable_patterns)]
10256        self.rule.as_ref().and_then(|v| match v {
10257            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
10258            _ => std::option::Option::None,
10259        })
10260    }
10261
10262    /// Sets the value of [rule][crate::model::GcRule::rule]
10263    /// to hold a `MaxNumVersions`.
10264    ///
10265    /// Note that all the setters affecting `rule` are
10266    /// mutually exclusive.
10267    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10268        self.rule =
10269            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
10270        self
10271    }
10272
10273    /// The value of [rule][crate::model::GcRule::rule]
10274    /// if it holds a `MaxAge`, `None` if the field is not set or
10275    /// holds a different branch.
10276    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
10277        #[allow(unreachable_patterns)]
10278        self.rule.as_ref().and_then(|v| match v {
10279            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
10280            _ => std::option::Option::None,
10281        })
10282    }
10283
10284    /// Sets the value of [rule][crate::model::GcRule::rule]
10285    /// to hold a `MaxAge`.
10286    ///
10287    /// Note that all the setters affecting `rule` are
10288    /// mutually exclusive.
10289    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
10290        mut self,
10291        v: T,
10292    ) -> Self {
10293        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
10294        self
10295    }
10296
10297    /// The value of [rule][crate::model::GcRule::rule]
10298    /// if it holds a `Intersection`, `None` if the field is not set or
10299    /// holds a different branch.
10300    pub fn intersection(
10301        &self,
10302    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
10303        #[allow(unreachable_patterns)]
10304        self.rule.as_ref().and_then(|v| match v {
10305            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
10306            _ => std::option::Option::None,
10307        })
10308    }
10309
10310    /// Sets the value of [rule][crate::model::GcRule::rule]
10311    /// to hold a `Intersection`.
10312    ///
10313    /// Note that all the setters affecting `rule` are
10314    /// mutually exclusive.
10315    pub fn set_intersection<
10316        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
10317    >(
10318        mut self,
10319        v: T,
10320    ) -> Self {
10321        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
10322        self
10323    }
10324
10325    /// The value of [rule][crate::model::GcRule::rule]
10326    /// if it holds a `Union`, `None` if the field is not set or
10327    /// holds a different branch.
10328    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
10329        #[allow(unreachable_patterns)]
10330        self.rule.as_ref().and_then(|v| match v {
10331            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
10332            _ => std::option::Option::None,
10333        })
10334    }
10335
10336    /// Sets the value of [rule][crate::model::GcRule::rule]
10337    /// to hold a `Union`.
10338    ///
10339    /// Note that all the setters affecting `rule` are
10340    /// mutually exclusive.
10341    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
10342        mut self,
10343        v: T,
10344    ) -> Self {
10345        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
10346        self
10347    }
10348}
10349
10350impl wkt::message::Message for GcRule {
10351    fn typename() -> &'static str {
10352        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
10353    }
10354}
10355
10356/// Defines additional types related to [GcRule].
10357pub mod gc_rule {
10358    #[allow(unused_imports)]
10359    use super::*;
10360
10361    /// A GcRule which deletes cells matching all of the given rules.
10362    #[derive(Clone, Default, PartialEq)]
10363    #[non_exhaustive]
10364    pub struct Intersection {
10365        /// Only delete cells which would be deleted by every element of `rules`.
10366        pub rules: std::vec::Vec<crate::model::GcRule>,
10367
10368        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10369    }
10370
10371    impl Intersection {
10372        pub fn new() -> Self {
10373            std::default::Default::default()
10374        }
10375
10376        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
10377        pub fn set_rules<T, V>(mut self, v: T) -> Self
10378        where
10379            T: std::iter::IntoIterator<Item = V>,
10380            V: std::convert::Into<crate::model::GcRule>,
10381        {
10382            use std::iter::Iterator;
10383            self.rules = v.into_iter().map(|i| i.into()).collect();
10384            self
10385        }
10386    }
10387
10388    impl wkt::message::Message for Intersection {
10389        fn typename() -> &'static str {
10390            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
10391        }
10392    }
10393
10394    /// A GcRule which deletes cells matching any of the given rules.
10395    #[derive(Clone, Default, PartialEq)]
10396    #[non_exhaustive]
10397    pub struct Union {
10398        /// Delete cells which would be deleted by any element of `rules`.
10399        pub rules: std::vec::Vec<crate::model::GcRule>,
10400
10401        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10402    }
10403
10404    impl Union {
10405        pub fn new() -> Self {
10406            std::default::Default::default()
10407        }
10408
10409        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
10410        pub fn set_rules<T, V>(mut self, v: T) -> Self
10411        where
10412            T: std::iter::IntoIterator<Item = V>,
10413            V: std::convert::Into<crate::model::GcRule>,
10414        {
10415            use std::iter::Iterator;
10416            self.rules = v.into_iter().map(|i| i.into()).collect();
10417            self
10418        }
10419    }
10420
10421    impl wkt::message::Message for Union {
10422        fn typename() -> &'static str {
10423            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
10424        }
10425    }
10426
10427    /// Garbage collection rules.
10428    #[derive(Clone, Debug, PartialEq)]
10429    #[non_exhaustive]
10430    pub enum Rule {
10431        /// Delete all cells in a column except the most recent N.
10432        MaxNumVersions(i32),
10433        /// Delete cells in a column older than the given age.
10434        /// Values must be at least one millisecond, and will be truncated to
10435        /// microsecond granularity.
10436        MaxAge(std::boxed::Box<wkt::Duration>),
10437        /// Delete cells that would be deleted by every nested rule.
10438        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
10439        /// Delete cells that would be deleted by any nested rule.
10440        Union(std::boxed::Box<crate::model::gc_rule::Union>),
10441    }
10442}
10443
10444/// Encryption information for a given resource.
10445/// If this resource is protected with customer managed encryption, the in-use
10446/// Cloud Key Management Service (Cloud KMS) key version is specified along with
10447/// its status.
10448#[derive(Clone, Default, PartialEq)]
10449#[non_exhaustive]
10450pub struct EncryptionInfo {
10451    /// Output only. The type of encryption used to protect this resource.
10452    pub encryption_type: crate::model::encryption_info::EncryptionType,
10453
10454    /// Output only. The status of encrypt/decrypt calls on underlying data for
10455    /// this resource. Regardless of status, the existing data is always encrypted
10456    /// at rest.
10457    pub encryption_status: std::option::Option<rpc::model::Status>,
10458
10459    /// Output only. The version of the Cloud KMS key specified in the parent
10460    /// cluster that is in use for the data underlying this table.
10461    pub kms_key_version: std::string::String,
10462
10463    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10464}
10465
10466impl EncryptionInfo {
10467    pub fn new() -> Self {
10468        std::default::Default::default()
10469    }
10470
10471    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
10472    pub fn set_encryption_type<
10473        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
10474    >(
10475        mut self,
10476        v: T,
10477    ) -> Self {
10478        self.encryption_type = v.into();
10479        self
10480    }
10481
10482    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
10483    pub fn set_encryption_status<T>(mut self, v: T) -> Self
10484    where
10485        T: std::convert::Into<rpc::model::Status>,
10486    {
10487        self.encryption_status = std::option::Option::Some(v.into());
10488        self
10489    }
10490
10491    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
10492    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
10493    where
10494        T: std::convert::Into<rpc::model::Status>,
10495    {
10496        self.encryption_status = v.map(|x| x.into());
10497        self
10498    }
10499
10500    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
10501    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10502        self.kms_key_version = v.into();
10503        self
10504    }
10505}
10506
10507impl wkt::message::Message for EncryptionInfo {
10508    fn typename() -> &'static str {
10509        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
10510    }
10511}
10512
10513/// Defines additional types related to [EncryptionInfo].
10514pub mod encryption_info {
10515    #[allow(unused_imports)]
10516    use super::*;
10517
10518    /// Possible encryption types for a resource.
10519    ///
10520    /// # Working with unknown values
10521    ///
10522    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10523    /// additional enum variants at any time. Adding new variants is not considered
10524    /// a breaking change. Applications should write their code in anticipation of:
10525    ///
10526    /// - New values appearing in future releases of the client library, **and**
10527    /// - New values received dynamically, without application changes.
10528    ///
10529    /// Please consult the [Working with enums] section in the user guide for some
10530    /// guidelines.
10531    ///
10532    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10533    #[derive(Clone, Debug, PartialEq)]
10534    #[non_exhaustive]
10535    pub enum EncryptionType {
10536        /// Encryption type was not specified, though data at rest remains encrypted.
10537        Unspecified,
10538        /// The data backing this resource is encrypted at rest with a key that is
10539        /// fully managed by Google. No key version or status will be populated.
10540        /// This is the default state.
10541        GoogleDefaultEncryption,
10542        /// The data backing this resource is encrypted at rest with a key that is
10543        /// managed by the customer.
10544        /// The in-use version of the key and its status are populated for
10545        /// CMEK-protected tables.
10546        /// CMEK-protected backups are pinned to the key version that was in use at
10547        /// the time the backup was taken. This key version is populated but its
10548        /// status is not tracked and is reported as `UNKNOWN`.
10549        CustomerManagedEncryption,
10550        /// If set, the enum was initialized with an unknown value.
10551        ///
10552        /// Applications can examine the value using [EncryptionType::value] or
10553        /// [EncryptionType::name].
10554        UnknownValue(encryption_type::UnknownValue),
10555    }
10556
10557    #[doc(hidden)]
10558    pub mod encryption_type {
10559        #[allow(unused_imports)]
10560        use super::*;
10561        #[derive(Clone, Debug, PartialEq)]
10562        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10563    }
10564
10565    impl EncryptionType {
10566        /// Gets the enum value.
10567        ///
10568        /// Returns `None` if the enum contains an unknown value deserialized from
10569        /// the string representation of enums.
10570        pub fn value(&self) -> std::option::Option<i32> {
10571            match self {
10572                Self::Unspecified => std::option::Option::Some(0),
10573                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
10574                Self::CustomerManagedEncryption => std::option::Option::Some(2),
10575                Self::UnknownValue(u) => u.0.value(),
10576            }
10577        }
10578
10579        /// Gets the enum value as a string.
10580        ///
10581        /// Returns `None` if the enum contains an unknown value deserialized from
10582        /// the integer representation of enums.
10583        pub fn name(&self) -> std::option::Option<&str> {
10584            match self {
10585                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
10586                Self::GoogleDefaultEncryption => {
10587                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
10588                }
10589                Self::CustomerManagedEncryption => {
10590                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
10591                }
10592                Self::UnknownValue(u) => u.0.name(),
10593            }
10594        }
10595    }
10596
10597    impl std::default::Default for EncryptionType {
10598        fn default() -> Self {
10599            use std::convert::From;
10600            Self::from(0)
10601        }
10602    }
10603
10604    impl std::fmt::Display for EncryptionType {
10605        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10606            wkt::internal::display_enum(f, self.name(), self.value())
10607        }
10608    }
10609
10610    impl std::convert::From<i32> for EncryptionType {
10611        fn from(value: i32) -> Self {
10612            match value {
10613                0 => Self::Unspecified,
10614                1 => Self::GoogleDefaultEncryption,
10615                2 => Self::CustomerManagedEncryption,
10616                _ => Self::UnknownValue(encryption_type::UnknownValue(
10617                    wkt::internal::UnknownEnumValue::Integer(value),
10618                )),
10619            }
10620        }
10621    }
10622
10623    impl std::convert::From<&str> for EncryptionType {
10624        fn from(value: &str) -> Self {
10625            use std::string::ToString;
10626            match value {
10627                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
10628                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
10629                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
10630                _ => Self::UnknownValue(encryption_type::UnknownValue(
10631                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10632                )),
10633            }
10634        }
10635    }
10636
10637    impl serde::ser::Serialize for EncryptionType {
10638        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10639        where
10640            S: serde::Serializer,
10641        {
10642            match self {
10643                Self::Unspecified => serializer.serialize_i32(0),
10644                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
10645                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
10646                Self::UnknownValue(u) => u.0.serialize(serializer),
10647            }
10648        }
10649    }
10650
10651    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
10652        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10653        where
10654            D: serde::Deserializer<'de>,
10655        {
10656            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
10657                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
10658            ))
10659        }
10660    }
10661}
10662
10663/// A snapshot of a table at a particular time. A snapshot can be used as a
10664/// checkpoint for data restoration or a data source for a new table.
10665///
10666/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
10667/// feature is not currently available to most Cloud Bigtable customers. This
10668/// feature might be changed in backward-incompatible ways and is not recommended
10669/// for production use. It is not subject to any SLA or deprecation policy.
10670#[derive(Clone, Default, PartialEq)]
10671#[non_exhaustive]
10672pub struct Snapshot {
10673    /// The unique name of the snapshot.
10674    /// Values are of the form
10675    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
10676    pub name: std::string::String,
10677
10678    /// Output only. The source table at the time the snapshot was taken.
10679    pub source_table: std::option::Option<crate::model::Table>,
10680
10681    /// Output only. The size of the data in the source table at the time the
10682    /// snapshot was taken. In some cases, this value may be computed
10683    /// asynchronously via a background process and a placeholder of 0 will be used
10684    /// in the meantime.
10685    pub data_size_bytes: i64,
10686
10687    /// Output only. The time when the snapshot is created.
10688    pub create_time: std::option::Option<wkt::Timestamp>,
10689
10690    /// The time when the snapshot will be deleted. The maximum amount of time a
10691    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
10692    /// the default maximum of 365 days will be used.
10693    pub delete_time: std::option::Option<wkt::Timestamp>,
10694
10695    /// Output only. The current state of the snapshot.
10696    pub state: crate::model::snapshot::State,
10697
10698    /// Description of the snapshot.
10699    pub description: std::string::String,
10700
10701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10702}
10703
10704impl Snapshot {
10705    pub fn new() -> Self {
10706        std::default::Default::default()
10707    }
10708
10709    /// Sets the value of [name][crate::model::Snapshot::name].
10710    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10711        self.name = v.into();
10712        self
10713    }
10714
10715    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
10716    pub fn set_source_table<T>(mut self, v: T) -> Self
10717    where
10718        T: std::convert::Into<crate::model::Table>,
10719    {
10720        self.source_table = std::option::Option::Some(v.into());
10721        self
10722    }
10723
10724    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
10725    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
10726    where
10727        T: std::convert::Into<crate::model::Table>,
10728    {
10729        self.source_table = v.map(|x| x.into());
10730        self
10731    }
10732
10733    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
10734    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10735        self.data_size_bytes = v.into();
10736        self
10737    }
10738
10739    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
10740    pub fn set_create_time<T>(mut self, v: T) -> Self
10741    where
10742        T: std::convert::Into<wkt::Timestamp>,
10743    {
10744        self.create_time = std::option::Option::Some(v.into());
10745        self
10746    }
10747
10748    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
10749    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10750    where
10751        T: std::convert::Into<wkt::Timestamp>,
10752    {
10753        self.create_time = v.map(|x| x.into());
10754        self
10755    }
10756
10757    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
10758    pub fn set_delete_time<T>(mut self, v: T) -> Self
10759    where
10760        T: std::convert::Into<wkt::Timestamp>,
10761    {
10762        self.delete_time = std::option::Option::Some(v.into());
10763        self
10764    }
10765
10766    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
10767    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
10768    where
10769        T: std::convert::Into<wkt::Timestamp>,
10770    {
10771        self.delete_time = v.map(|x| x.into());
10772        self
10773    }
10774
10775    /// Sets the value of [state][crate::model::Snapshot::state].
10776    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
10777        self.state = v.into();
10778        self
10779    }
10780
10781    /// Sets the value of [description][crate::model::Snapshot::description].
10782    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10783        self.description = v.into();
10784        self
10785    }
10786}
10787
10788impl wkt::message::Message for Snapshot {
10789    fn typename() -> &'static str {
10790        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
10791    }
10792}
10793
10794/// Defines additional types related to [Snapshot].
10795pub mod snapshot {
10796    #[allow(unused_imports)]
10797    use super::*;
10798
10799    /// Possible states of a snapshot.
10800    ///
10801    /// # Working with unknown values
10802    ///
10803    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10804    /// additional enum variants at any time. Adding new variants is not considered
10805    /// a breaking change. Applications should write their code in anticipation of:
10806    ///
10807    /// - New values appearing in future releases of the client library, **and**
10808    /// - New values received dynamically, without application changes.
10809    ///
10810    /// Please consult the [Working with enums] section in the user guide for some
10811    /// guidelines.
10812    ///
10813    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10814    #[derive(Clone, Debug, PartialEq)]
10815    #[non_exhaustive]
10816    pub enum State {
10817        /// The state of the snapshot could not be determined.
10818        NotKnown,
10819        /// The snapshot has been successfully created and can serve all requests.
10820        Ready,
10821        /// The snapshot is currently being created, and may be destroyed if the
10822        /// creation process encounters an error. A snapshot may not be restored to a
10823        /// table while it is being created.
10824        Creating,
10825        /// If set, the enum was initialized with an unknown value.
10826        ///
10827        /// Applications can examine the value using [State::value] or
10828        /// [State::name].
10829        UnknownValue(state::UnknownValue),
10830    }
10831
10832    #[doc(hidden)]
10833    pub mod state {
10834        #[allow(unused_imports)]
10835        use super::*;
10836        #[derive(Clone, Debug, PartialEq)]
10837        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10838    }
10839
10840    impl State {
10841        /// Gets the enum value.
10842        ///
10843        /// Returns `None` if the enum contains an unknown value deserialized from
10844        /// the string representation of enums.
10845        pub fn value(&self) -> std::option::Option<i32> {
10846            match self {
10847                Self::NotKnown => std::option::Option::Some(0),
10848                Self::Ready => std::option::Option::Some(1),
10849                Self::Creating => std::option::Option::Some(2),
10850                Self::UnknownValue(u) => u.0.value(),
10851            }
10852        }
10853
10854        /// Gets the enum value as a string.
10855        ///
10856        /// Returns `None` if the enum contains an unknown value deserialized from
10857        /// the integer representation of enums.
10858        pub fn name(&self) -> std::option::Option<&str> {
10859            match self {
10860                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
10861                Self::Ready => std::option::Option::Some("READY"),
10862                Self::Creating => std::option::Option::Some("CREATING"),
10863                Self::UnknownValue(u) => u.0.name(),
10864            }
10865        }
10866    }
10867
10868    impl std::default::Default for State {
10869        fn default() -> Self {
10870            use std::convert::From;
10871            Self::from(0)
10872        }
10873    }
10874
10875    impl std::fmt::Display for State {
10876        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10877            wkt::internal::display_enum(f, self.name(), self.value())
10878        }
10879    }
10880
10881    impl std::convert::From<i32> for State {
10882        fn from(value: i32) -> Self {
10883            match value {
10884                0 => Self::NotKnown,
10885                1 => Self::Ready,
10886                2 => Self::Creating,
10887                _ => Self::UnknownValue(state::UnknownValue(
10888                    wkt::internal::UnknownEnumValue::Integer(value),
10889                )),
10890            }
10891        }
10892    }
10893
10894    impl std::convert::From<&str> for State {
10895        fn from(value: &str) -> Self {
10896            use std::string::ToString;
10897            match value {
10898                "STATE_NOT_KNOWN" => Self::NotKnown,
10899                "READY" => Self::Ready,
10900                "CREATING" => Self::Creating,
10901                _ => Self::UnknownValue(state::UnknownValue(
10902                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10903                )),
10904            }
10905        }
10906    }
10907
10908    impl serde::ser::Serialize for State {
10909        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10910        where
10911            S: serde::Serializer,
10912        {
10913            match self {
10914                Self::NotKnown => serializer.serialize_i32(0),
10915                Self::Ready => serializer.serialize_i32(1),
10916                Self::Creating => serializer.serialize_i32(2),
10917                Self::UnknownValue(u) => u.0.serialize(serializer),
10918            }
10919        }
10920    }
10921
10922    impl<'de> serde::de::Deserialize<'de> for State {
10923        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10924        where
10925            D: serde::Deserializer<'de>,
10926        {
10927            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10928                ".google.bigtable.admin.v2.Snapshot.State",
10929            ))
10930        }
10931    }
10932}
10933
10934/// A backup of a Cloud Bigtable table.
10935#[derive(Clone, Default, PartialEq)]
10936#[non_exhaustive]
10937pub struct Backup {
10938    /// A globally unique identifier for the backup which cannot be
10939    /// changed. Values are of the form
10940    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
10941    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
10942    /// The final segment of the name must be between 1 and 50 characters
10943    /// in length.
10944    ///
10945    /// The backup is stored in the cluster identified by the prefix of the backup
10946    /// name of the form
10947    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
10948    pub name: std::string::String,
10949
10950    /// Required. Immutable. Name of the table from which this backup was created.
10951    /// This needs to be in the same instance as the backup. Values are of the form
10952    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
10953    pub source_table: std::string::String,
10954
10955    /// Output only. Name of the backup from which this backup was copied. If a
10956    /// backup is not created by copying a backup, this field will be empty. Values
10957    /// are of the form:
10958    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
10959    pub source_backup: std::string::String,
10960
10961    /// Required. The expiration time of the backup.
10962    /// When creating a backup or updating its `expire_time`, the value must be
10963    /// greater than the backup creation time by:
10964    ///
10965    /// - At least 6 hours
10966    /// - At most 90 days
10967    ///
10968    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
10969    pub expire_time: std::option::Option<wkt::Timestamp>,
10970
10971    /// Output only. `start_time` is the time that the backup was started
10972    /// (i.e. approximately the time the
10973    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
10974    /// request is received).  The row data in this backup will be no older than
10975    /// this timestamp.
10976    ///
10977    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
10978    pub start_time: std::option::Option<wkt::Timestamp>,
10979
10980    /// Output only. `end_time` is the time that the backup was finished. The row
10981    /// data in the backup will be no newer than this timestamp.
10982    pub end_time: std::option::Option<wkt::Timestamp>,
10983
10984    /// Output only. Size of the backup in bytes.
10985    pub size_bytes: i64,
10986
10987    /// Output only. The current state of the backup.
10988    pub state: crate::model::backup::State,
10989
10990    /// Output only. The encryption information for the backup.
10991    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
10992
10993    /// Indicates the backup type of the backup.
10994    pub backup_type: crate::model::backup::BackupType,
10995
10996    /// The time at which the hot backup will be converted to a standard backup.
10997    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
10998    /// hot backup to a standard backup. This value must be greater than the backup
10999    /// creation time by:
11000    ///
11001    /// - At least 24 hours
11002    ///
11003    /// This field only applies for hot backups. When creating or updating a
11004    /// standard backup, attempting to set this field will fail the request.
11005    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
11006
11007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11008}
11009
11010impl Backup {
11011    pub fn new() -> Self {
11012        std::default::Default::default()
11013    }
11014
11015    /// Sets the value of [name][crate::model::Backup::name].
11016    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11017        self.name = v.into();
11018        self
11019    }
11020
11021    /// Sets the value of [source_table][crate::model::Backup::source_table].
11022    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11023        self.source_table = v.into();
11024        self
11025    }
11026
11027    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
11028    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11029        self.source_backup = v.into();
11030        self
11031    }
11032
11033    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
11034    pub fn set_expire_time<T>(mut self, v: T) -> Self
11035    where
11036        T: std::convert::Into<wkt::Timestamp>,
11037    {
11038        self.expire_time = std::option::Option::Some(v.into());
11039        self
11040    }
11041
11042    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
11043    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
11044    where
11045        T: std::convert::Into<wkt::Timestamp>,
11046    {
11047        self.expire_time = v.map(|x| x.into());
11048        self
11049    }
11050
11051    /// Sets the value of [start_time][crate::model::Backup::start_time].
11052    pub fn set_start_time<T>(mut self, v: T) -> Self
11053    where
11054        T: std::convert::Into<wkt::Timestamp>,
11055    {
11056        self.start_time = std::option::Option::Some(v.into());
11057        self
11058    }
11059
11060    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
11061    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11062    where
11063        T: std::convert::Into<wkt::Timestamp>,
11064    {
11065        self.start_time = v.map(|x| x.into());
11066        self
11067    }
11068
11069    /// Sets the value of [end_time][crate::model::Backup::end_time].
11070    pub fn set_end_time<T>(mut self, v: T) -> Self
11071    where
11072        T: std::convert::Into<wkt::Timestamp>,
11073    {
11074        self.end_time = std::option::Option::Some(v.into());
11075        self
11076    }
11077
11078    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
11079    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11080    where
11081        T: std::convert::Into<wkt::Timestamp>,
11082    {
11083        self.end_time = v.map(|x| x.into());
11084        self
11085    }
11086
11087    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
11088    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11089        self.size_bytes = v.into();
11090        self
11091    }
11092
11093    /// Sets the value of [state][crate::model::Backup::state].
11094    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
11095        self.state = v.into();
11096        self
11097    }
11098
11099    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
11100    pub fn set_encryption_info<T>(mut self, v: T) -> Self
11101    where
11102        T: std::convert::Into<crate::model::EncryptionInfo>,
11103    {
11104        self.encryption_info = std::option::Option::Some(v.into());
11105        self
11106    }
11107
11108    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
11109    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
11110    where
11111        T: std::convert::Into<crate::model::EncryptionInfo>,
11112    {
11113        self.encryption_info = v.map(|x| x.into());
11114        self
11115    }
11116
11117    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
11118    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
11119        mut self,
11120        v: T,
11121    ) -> Self {
11122        self.backup_type = v.into();
11123        self
11124    }
11125
11126    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
11127    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
11128    where
11129        T: std::convert::Into<wkt::Timestamp>,
11130    {
11131        self.hot_to_standard_time = std::option::Option::Some(v.into());
11132        self
11133    }
11134
11135    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
11136    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
11137    where
11138        T: std::convert::Into<wkt::Timestamp>,
11139    {
11140        self.hot_to_standard_time = v.map(|x| x.into());
11141        self
11142    }
11143}
11144
11145impl wkt::message::Message for Backup {
11146    fn typename() -> &'static str {
11147        "type.googleapis.com/google.bigtable.admin.v2.Backup"
11148    }
11149}
11150
11151/// Defines additional types related to [Backup].
11152pub mod backup {
11153    #[allow(unused_imports)]
11154    use super::*;
11155
11156    /// Indicates the current state of the backup.
11157    ///
11158    /// # Working with unknown values
11159    ///
11160    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11161    /// additional enum variants at any time. Adding new variants is not considered
11162    /// a breaking change. Applications should write their code in anticipation of:
11163    ///
11164    /// - New values appearing in future releases of the client library, **and**
11165    /// - New values received dynamically, without application changes.
11166    ///
11167    /// Please consult the [Working with enums] section in the user guide for some
11168    /// guidelines.
11169    ///
11170    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11171    #[derive(Clone, Debug, PartialEq)]
11172    #[non_exhaustive]
11173    pub enum State {
11174        /// Not specified.
11175        Unspecified,
11176        /// The pending backup is still being created. Operations on the
11177        /// backup may fail with `FAILED_PRECONDITION` in this state.
11178        Creating,
11179        /// The backup is complete and ready for use.
11180        Ready,
11181        /// If set, the enum was initialized with an unknown value.
11182        ///
11183        /// Applications can examine the value using [State::value] or
11184        /// [State::name].
11185        UnknownValue(state::UnknownValue),
11186    }
11187
11188    #[doc(hidden)]
11189    pub mod state {
11190        #[allow(unused_imports)]
11191        use super::*;
11192        #[derive(Clone, Debug, PartialEq)]
11193        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11194    }
11195
11196    impl State {
11197        /// Gets the enum value.
11198        ///
11199        /// Returns `None` if the enum contains an unknown value deserialized from
11200        /// the string representation of enums.
11201        pub fn value(&self) -> std::option::Option<i32> {
11202            match self {
11203                Self::Unspecified => std::option::Option::Some(0),
11204                Self::Creating => std::option::Option::Some(1),
11205                Self::Ready => std::option::Option::Some(2),
11206                Self::UnknownValue(u) => u.0.value(),
11207            }
11208        }
11209
11210        /// Gets the enum value as a string.
11211        ///
11212        /// Returns `None` if the enum contains an unknown value deserialized from
11213        /// the integer representation of enums.
11214        pub fn name(&self) -> std::option::Option<&str> {
11215            match self {
11216                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11217                Self::Creating => std::option::Option::Some("CREATING"),
11218                Self::Ready => std::option::Option::Some("READY"),
11219                Self::UnknownValue(u) => u.0.name(),
11220            }
11221        }
11222    }
11223
11224    impl std::default::Default for State {
11225        fn default() -> Self {
11226            use std::convert::From;
11227            Self::from(0)
11228        }
11229    }
11230
11231    impl std::fmt::Display for State {
11232        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11233            wkt::internal::display_enum(f, self.name(), self.value())
11234        }
11235    }
11236
11237    impl std::convert::From<i32> for State {
11238        fn from(value: i32) -> Self {
11239            match value {
11240                0 => Self::Unspecified,
11241                1 => Self::Creating,
11242                2 => Self::Ready,
11243                _ => Self::UnknownValue(state::UnknownValue(
11244                    wkt::internal::UnknownEnumValue::Integer(value),
11245                )),
11246            }
11247        }
11248    }
11249
11250    impl std::convert::From<&str> for State {
11251        fn from(value: &str) -> Self {
11252            use std::string::ToString;
11253            match value {
11254                "STATE_UNSPECIFIED" => Self::Unspecified,
11255                "CREATING" => Self::Creating,
11256                "READY" => Self::Ready,
11257                _ => Self::UnknownValue(state::UnknownValue(
11258                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11259                )),
11260            }
11261        }
11262    }
11263
11264    impl serde::ser::Serialize for State {
11265        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11266        where
11267            S: serde::Serializer,
11268        {
11269            match self {
11270                Self::Unspecified => serializer.serialize_i32(0),
11271                Self::Creating => serializer.serialize_i32(1),
11272                Self::Ready => serializer.serialize_i32(2),
11273                Self::UnknownValue(u) => u.0.serialize(serializer),
11274            }
11275        }
11276    }
11277
11278    impl<'de> serde::de::Deserialize<'de> for State {
11279        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11280        where
11281            D: serde::Deserializer<'de>,
11282        {
11283            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11284                ".google.bigtable.admin.v2.Backup.State",
11285            ))
11286        }
11287    }
11288
11289    /// The type of the backup.
11290    ///
11291    /// # Working with unknown values
11292    ///
11293    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11294    /// additional enum variants at any time. Adding new variants is not considered
11295    /// a breaking change. Applications should write their code in anticipation of:
11296    ///
11297    /// - New values appearing in future releases of the client library, **and**
11298    /// - New values received dynamically, without application changes.
11299    ///
11300    /// Please consult the [Working with enums] section in the user guide for some
11301    /// guidelines.
11302    ///
11303    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11304    #[derive(Clone, Debug, PartialEq)]
11305    #[non_exhaustive]
11306    pub enum BackupType {
11307        /// Not specified.
11308        Unspecified,
11309        /// The default type for Cloud Bigtable managed backups. Supported for
11310        /// backups created in both HDD and SSD instances. Requires optimization when
11311        /// restored to a table in an SSD instance.
11312        Standard,
11313        /// A backup type with faster restore to SSD performance. Only supported for
11314        /// backups created in SSD instances. A new SSD table restored from a hot
11315        /// backup reaches production performance more quickly than a standard
11316        /// backup.
11317        Hot,
11318        /// If set, the enum was initialized with an unknown value.
11319        ///
11320        /// Applications can examine the value using [BackupType::value] or
11321        /// [BackupType::name].
11322        UnknownValue(backup_type::UnknownValue),
11323    }
11324
11325    #[doc(hidden)]
11326    pub mod backup_type {
11327        #[allow(unused_imports)]
11328        use super::*;
11329        #[derive(Clone, Debug, PartialEq)]
11330        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11331    }
11332
11333    impl BackupType {
11334        /// Gets the enum value.
11335        ///
11336        /// Returns `None` if the enum contains an unknown value deserialized from
11337        /// the string representation of enums.
11338        pub fn value(&self) -> std::option::Option<i32> {
11339            match self {
11340                Self::Unspecified => std::option::Option::Some(0),
11341                Self::Standard => std::option::Option::Some(1),
11342                Self::Hot => std::option::Option::Some(2),
11343                Self::UnknownValue(u) => u.0.value(),
11344            }
11345        }
11346
11347        /// Gets the enum value as a string.
11348        ///
11349        /// Returns `None` if the enum contains an unknown value deserialized from
11350        /// the integer representation of enums.
11351        pub fn name(&self) -> std::option::Option<&str> {
11352            match self {
11353                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
11354                Self::Standard => std::option::Option::Some("STANDARD"),
11355                Self::Hot => std::option::Option::Some("HOT"),
11356                Self::UnknownValue(u) => u.0.name(),
11357            }
11358        }
11359    }
11360
11361    impl std::default::Default for BackupType {
11362        fn default() -> Self {
11363            use std::convert::From;
11364            Self::from(0)
11365        }
11366    }
11367
11368    impl std::fmt::Display for BackupType {
11369        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11370            wkt::internal::display_enum(f, self.name(), self.value())
11371        }
11372    }
11373
11374    impl std::convert::From<i32> for BackupType {
11375        fn from(value: i32) -> Self {
11376            match value {
11377                0 => Self::Unspecified,
11378                1 => Self::Standard,
11379                2 => Self::Hot,
11380                _ => Self::UnknownValue(backup_type::UnknownValue(
11381                    wkt::internal::UnknownEnumValue::Integer(value),
11382                )),
11383            }
11384        }
11385    }
11386
11387    impl std::convert::From<&str> for BackupType {
11388        fn from(value: &str) -> Self {
11389            use std::string::ToString;
11390            match value {
11391                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
11392                "STANDARD" => Self::Standard,
11393                "HOT" => Self::Hot,
11394                _ => Self::UnknownValue(backup_type::UnknownValue(
11395                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11396                )),
11397            }
11398        }
11399    }
11400
11401    impl serde::ser::Serialize for BackupType {
11402        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11403        where
11404            S: serde::Serializer,
11405        {
11406            match self {
11407                Self::Unspecified => serializer.serialize_i32(0),
11408                Self::Standard => serializer.serialize_i32(1),
11409                Self::Hot => serializer.serialize_i32(2),
11410                Self::UnknownValue(u) => u.0.serialize(serializer),
11411            }
11412        }
11413    }
11414
11415    impl<'de> serde::de::Deserialize<'de> for BackupType {
11416        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11417        where
11418            D: serde::Deserializer<'de>,
11419        {
11420            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
11421                ".google.bigtable.admin.v2.Backup.BackupType",
11422            ))
11423        }
11424    }
11425}
11426
11427/// Information about a backup.
11428#[derive(Clone, Default, PartialEq)]
11429#[non_exhaustive]
11430pub struct BackupInfo {
11431    /// Output only. Name of the backup.
11432    pub backup: std::string::String,
11433
11434    /// Output only. The time that the backup was started. Row data in the backup
11435    /// will be no older than this timestamp.
11436    pub start_time: std::option::Option<wkt::Timestamp>,
11437
11438    /// Output only. This time that the backup was finished. Row data in the
11439    /// backup will be no newer than this timestamp.
11440    pub end_time: std::option::Option<wkt::Timestamp>,
11441
11442    /// Output only. Name of the table the backup was created from.
11443    pub source_table: std::string::String,
11444
11445    /// Output only. Name of the backup from which this backup was copied. If a
11446    /// backup is not created by copying a backup, this field will be empty. Values
11447    /// are of the form:
11448    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
11449    pub source_backup: std::string::String,
11450
11451    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11452}
11453
11454impl BackupInfo {
11455    pub fn new() -> Self {
11456        std::default::Default::default()
11457    }
11458
11459    /// Sets the value of [backup][crate::model::BackupInfo::backup].
11460    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11461        self.backup = v.into();
11462        self
11463    }
11464
11465    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
11466    pub fn set_start_time<T>(mut self, v: T) -> Self
11467    where
11468        T: std::convert::Into<wkt::Timestamp>,
11469    {
11470        self.start_time = std::option::Option::Some(v.into());
11471        self
11472    }
11473
11474    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
11475    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11476    where
11477        T: std::convert::Into<wkt::Timestamp>,
11478    {
11479        self.start_time = v.map(|x| x.into());
11480        self
11481    }
11482
11483    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
11484    pub fn set_end_time<T>(mut self, v: T) -> Self
11485    where
11486        T: std::convert::Into<wkt::Timestamp>,
11487    {
11488        self.end_time = std::option::Option::Some(v.into());
11489        self
11490    }
11491
11492    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
11493    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11494    where
11495        T: std::convert::Into<wkt::Timestamp>,
11496    {
11497        self.end_time = v.map(|x| x.into());
11498        self
11499    }
11500
11501    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
11502    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11503        self.source_table = v.into();
11504        self
11505    }
11506
11507    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
11508    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11509        self.source_backup = v.into();
11510        self
11511    }
11512}
11513
11514impl wkt::message::Message for BackupInfo {
11515    fn typename() -> &'static str {
11516        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
11517    }
11518}
11519
11520/// Represents a protobuf schema.
11521#[derive(Clone, Default, PartialEq)]
11522#[non_exhaustive]
11523pub struct ProtoSchema {
11524    /// Required. Contains a protobuf-serialized
11525    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
11526    /// which could include multiple proto files.
11527    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
11528    /// run `protoc` with
11529    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
11530    /// for moon/shot/app.proto, run
11531    ///
11532    /// ```norust
11533    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
11534    ///          --include_imports \
11535    ///          --descriptor_set_out=descriptors.pb \
11536    ///          moon/shot/app.proto
11537    /// ```
11538    ///
11539    /// For more details, see protobuffer [self
11540    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
11541    pub proto_descriptors: ::bytes::Bytes,
11542
11543    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11544}
11545
11546impl ProtoSchema {
11547    pub fn new() -> Self {
11548        std::default::Default::default()
11549    }
11550
11551    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
11552    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
11553        self.proto_descriptors = v.into();
11554        self
11555    }
11556}
11557
11558impl wkt::message::Message for ProtoSchema {
11559    fn typename() -> &'static str {
11560        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
11561    }
11562}
11563
11564/// A named collection of related schemas.
11565#[derive(Clone, Default, PartialEq)]
11566#[non_exhaustive]
11567pub struct SchemaBundle {
11568    /// Identifier. The unique name identifying this schema bundle.
11569    /// Values are of the form
11570    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
11571    pub name: std::string::String,
11572
11573    /// Optional. The etag for this schema bundle.
11574    /// This may be sent on update and delete requests to ensure the
11575    /// client has an up-to-date value before proceeding. The server
11576    /// returns an ABORTED error on a mismatched etag.
11577    pub etag: std::string::String,
11578
11579    /// The type of this schema bundle. The oneof case cannot change after
11580    /// creation.
11581    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
11582
11583    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11584}
11585
11586impl SchemaBundle {
11587    pub fn new() -> Self {
11588        std::default::Default::default()
11589    }
11590
11591    /// Sets the value of [name][crate::model::SchemaBundle::name].
11592    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11593        self.name = v.into();
11594        self
11595    }
11596
11597    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
11598    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11599        self.etag = v.into();
11600        self
11601    }
11602
11603    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
11604    ///
11605    /// Note that all the setters affecting `r#type` are mutually
11606    /// exclusive.
11607    pub fn set_type<
11608        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
11609    >(
11610        mut self,
11611        v: T,
11612    ) -> Self {
11613        self.r#type = v.into();
11614        self
11615    }
11616
11617    /// The value of [r#type][crate::model::SchemaBundle::r#type]
11618    /// if it holds a `ProtoSchema`, `None` if the field is not set or
11619    /// holds a different branch.
11620    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
11621        #[allow(unreachable_patterns)]
11622        self.r#type.as_ref().and_then(|v| match v {
11623            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
11624            _ => std::option::Option::None,
11625        })
11626    }
11627
11628    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
11629    /// to hold a `ProtoSchema`.
11630    ///
11631    /// Note that all the setters affecting `r#type` are
11632    /// mutually exclusive.
11633    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
11634        mut self,
11635        v: T,
11636    ) -> Self {
11637        self.r#type =
11638            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
11639        self
11640    }
11641}
11642
11643impl wkt::message::Message for SchemaBundle {
11644    fn typename() -> &'static str {
11645        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
11646    }
11647}
11648
11649/// Defines additional types related to [SchemaBundle].
11650pub mod schema_bundle {
11651    #[allow(unused_imports)]
11652    use super::*;
11653
11654    /// The type of this schema bundle. The oneof case cannot change after
11655    /// creation.
11656    #[derive(Clone, Debug, PartialEq)]
11657    #[non_exhaustive]
11658    pub enum Type {
11659        /// Schema for Protobufs.
11660        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
11661    }
11662}
11663
11664/// `Type` represents the type of data that is written to, read from, or stored
11665/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
11666/// familiarity and consistency across products and features.
11667///
11668/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
11669/// an `Encoding` which describes how to convert to or from the underlying data.
11670///
11671/// Each encoding can operate in one of two modes:
11672///
11673/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
11674///   if and only if `X <= Y`. This is useful anywhere sort order is important,
11675///   for example when encoding keys.
11676/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
11677///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
11678///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
11679///   are valid encodings of the same JSON value.
11680///
11681/// The API clearly documents which mode is used wherever an encoding can be
11682/// configured. Each encoding also documents which values are supported in which
11683/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
11684/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
11685/// `STRING("-00001") > STRING("00001")`.
11686#[derive(Clone, Default, PartialEq)]
11687#[non_exhaustive]
11688pub struct Type {
11689    /// The kind of type that this represents.
11690    pub kind: std::option::Option<crate::model::r#type::Kind>,
11691
11692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11693}
11694
11695impl Type {
11696    pub fn new() -> Self {
11697        std::default::Default::default()
11698    }
11699
11700    /// Sets the value of [kind][crate::model::Type::kind].
11701    ///
11702    /// Note that all the setters affecting `kind` are mutually
11703    /// exclusive.
11704    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
11705        mut self,
11706        v: T,
11707    ) -> Self {
11708        self.kind = v.into();
11709        self
11710    }
11711
11712    /// The value of [kind][crate::model::Type::kind]
11713    /// if it holds a `BytesType`, `None` if the field is not set or
11714    /// holds a different branch.
11715    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
11716        #[allow(unreachable_patterns)]
11717        self.kind.as_ref().and_then(|v| match v {
11718            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
11719            _ => std::option::Option::None,
11720        })
11721    }
11722
11723    /// Sets the value of [kind][crate::model::Type::kind]
11724    /// to hold a `BytesType`.
11725    ///
11726    /// Note that all the setters affecting `kind` are
11727    /// mutually exclusive.
11728    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
11729        mut self,
11730        v: T,
11731    ) -> Self {
11732        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
11733        self
11734    }
11735
11736    /// The value of [kind][crate::model::Type::kind]
11737    /// if it holds a `StringType`, `None` if the field is not set or
11738    /// holds a different branch.
11739    pub fn string_type(
11740        &self,
11741    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
11742        #[allow(unreachable_patterns)]
11743        self.kind.as_ref().and_then(|v| match v {
11744            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
11745            _ => std::option::Option::None,
11746        })
11747    }
11748
11749    /// Sets the value of [kind][crate::model::Type::kind]
11750    /// to hold a `StringType`.
11751    ///
11752    /// Note that all the setters affecting `kind` are
11753    /// mutually exclusive.
11754    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
11755        mut self,
11756        v: T,
11757    ) -> Self {
11758        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
11759        self
11760    }
11761
11762    /// The value of [kind][crate::model::Type::kind]
11763    /// if it holds a `Int64Type`, `None` if the field is not set or
11764    /// holds a different branch.
11765    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
11766        #[allow(unreachable_patterns)]
11767        self.kind.as_ref().and_then(|v| match v {
11768            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
11769            _ => std::option::Option::None,
11770        })
11771    }
11772
11773    /// Sets the value of [kind][crate::model::Type::kind]
11774    /// to hold a `Int64Type`.
11775    ///
11776    /// Note that all the setters affecting `kind` are
11777    /// mutually exclusive.
11778    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
11779        mut self,
11780        v: T,
11781    ) -> Self {
11782        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
11783        self
11784    }
11785
11786    /// The value of [kind][crate::model::Type::kind]
11787    /// if it holds a `Float32Type`, `None` if the field is not set or
11788    /// holds a different branch.
11789    pub fn float32_type(
11790        &self,
11791    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
11792        #[allow(unreachable_patterns)]
11793        self.kind.as_ref().and_then(|v| match v {
11794            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
11795            _ => std::option::Option::None,
11796        })
11797    }
11798
11799    /// Sets the value of [kind][crate::model::Type::kind]
11800    /// to hold a `Float32Type`.
11801    ///
11802    /// Note that all the setters affecting `kind` are
11803    /// mutually exclusive.
11804    pub fn set_float32_type<
11805        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
11806    >(
11807        mut self,
11808        v: T,
11809    ) -> Self {
11810        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
11811        self
11812    }
11813
11814    /// The value of [kind][crate::model::Type::kind]
11815    /// if it holds a `Float64Type`, `None` if the field is not set or
11816    /// holds a different branch.
11817    pub fn float64_type(
11818        &self,
11819    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
11820        #[allow(unreachable_patterns)]
11821        self.kind.as_ref().and_then(|v| match v {
11822            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
11823            _ => std::option::Option::None,
11824        })
11825    }
11826
11827    /// Sets the value of [kind][crate::model::Type::kind]
11828    /// to hold a `Float64Type`.
11829    ///
11830    /// Note that all the setters affecting `kind` are
11831    /// mutually exclusive.
11832    pub fn set_float64_type<
11833        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
11834    >(
11835        mut self,
11836        v: T,
11837    ) -> Self {
11838        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
11839        self
11840    }
11841
11842    /// The value of [kind][crate::model::Type::kind]
11843    /// if it holds a `BoolType`, `None` if the field is not set or
11844    /// holds a different branch.
11845    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
11846        #[allow(unreachable_patterns)]
11847        self.kind.as_ref().and_then(|v| match v {
11848            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
11849            _ => std::option::Option::None,
11850        })
11851    }
11852
11853    /// Sets the value of [kind][crate::model::Type::kind]
11854    /// to hold a `BoolType`.
11855    ///
11856    /// Note that all the setters affecting `kind` are
11857    /// mutually exclusive.
11858    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
11859        mut self,
11860        v: T,
11861    ) -> Self {
11862        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
11863        self
11864    }
11865
11866    /// The value of [kind][crate::model::Type::kind]
11867    /// if it holds a `TimestampType`, `None` if the field is not set or
11868    /// holds a different branch.
11869    pub fn timestamp_type(
11870        &self,
11871    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
11872        #[allow(unreachable_patterns)]
11873        self.kind.as_ref().and_then(|v| match v {
11874            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
11875            _ => std::option::Option::None,
11876        })
11877    }
11878
11879    /// Sets the value of [kind][crate::model::Type::kind]
11880    /// to hold a `TimestampType`.
11881    ///
11882    /// Note that all the setters affecting `kind` are
11883    /// mutually exclusive.
11884    pub fn set_timestamp_type<
11885        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
11886    >(
11887        mut self,
11888        v: T,
11889    ) -> Self {
11890        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
11891        self
11892    }
11893
11894    /// The value of [kind][crate::model::Type::kind]
11895    /// if it holds a `DateType`, `None` if the field is not set or
11896    /// holds a different branch.
11897    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
11898        #[allow(unreachable_patterns)]
11899        self.kind.as_ref().and_then(|v| match v {
11900            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
11901            _ => std::option::Option::None,
11902        })
11903    }
11904
11905    /// Sets the value of [kind][crate::model::Type::kind]
11906    /// to hold a `DateType`.
11907    ///
11908    /// Note that all the setters affecting `kind` are
11909    /// mutually exclusive.
11910    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
11911        mut self,
11912        v: T,
11913    ) -> Self {
11914        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
11915        self
11916    }
11917
11918    /// The value of [kind][crate::model::Type::kind]
11919    /// if it holds a `AggregateType`, `None` if the field is not set or
11920    /// holds a different branch.
11921    pub fn aggregate_type(
11922        &self,
11923    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
11924        #[allow(unreachable_patterns)]
11925        self.kind.as_ref().and_then(|v| match v {
11926            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
11927            _ => std::option::Option::None,
11928        })
11929    }
11930
11931    /// Sets the value of [kind][crate::model::Type::kind]
11932    /// to hold a `AggregateType`.
11933    ///
11934    /// Note that all the setters affecting `kind` are
11935    /// mutually exclusive.
11936    pub fn set_aggregate_type<
11937        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
11938    >(
11939        mut self,
11940        v: T,
11941    ) -> Self {
11942        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
11943        self
11944    }
11945
11946    /// The value of [kind][crate::model::Type::kind]
11947    /// if it holds a `StructType`, `None` if the field is not set or
11948    /// holds a different branch.
11949    pub fn struct_type(
11950        &self,
11951    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
11952        #[allow(unreachable_patterns)]
11953        self.kind.as_ref().and_then(|v| match v {
11954            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
11955            _ => std::option::Option::None,
11956        })
11957    }
11958
11959    /// Sets the value of [kind][crate::model::Type::kind]
11960    /// to hold a `StructType`.
11961    ///
11962    /// Note that all the setters affecting `kind` are
11963    /// mutually exclusive.
11964    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
11965        mut self,
11966        v: T,
11967    ) -> Self {
11968        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
11969        self
11970    }
11971
11972    /// The value of [kind][crate::model::Type::kind]
11973    /// if it holds a `ArrayType`, `None` if the field is not set or
11974    /// holds a different branch.
11975    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
11976        #[allow(unreachable_patterns)]
11977        self.kind.as_ref().and_then(|v| match v {
11978            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
11979            _ => std::option::Option::None,
11980        })
11981    }
11982
11983    /// Sets the value of [kind][crate::model::Type::kind]
11984    /// to hold a `ArrayType`.
11985    ///
11986    /// Note that all the setters affecting `kind` are
11987    /// mutually exclusive.
11988    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
11989        mut self,
11990        v: T,
11991    ) -> Self {
11992        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
11993        self
11994    }
11995
11996    /// The value of [kind][crate::model::Type::kind]
11997    /// if it holds a `MapType`, `None` if the field is not set or
11998    /// holds a different branch.
11999    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
12000        #[allow(unreachable_patterns)]
12001        self.kind.as_ref().and_then(|v| match v {
12002            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
12003            _ => std::option::Option::None,
12004        })
12005    }
12006
12007    /// Sets the value of [kind][crate::model::Type::kind]
12008    /// to hold a `MapType`.
12009    ///
12010    /// Note that all the setters affecting `kind` are
12011    /// mutually exclusive.
12012    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
12013        mut self,
12014        v: T,
12015    ) -> Self {
12016        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
12017        self
12018    }
12019
12020    /// The value of [kind][crate::model::Type::kind]
12021    /// if it holds a `ProtoType`, `None` if the field is not set or
12022    /// holds a different branch.
12023    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
12024        #[allow(unreachable_patterns)]
12025        self.kind.as_ref().and_then(|v| match v {
12026            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
12027            _ => std::option::Option::None,
12028        })
12029    }
12030
12031    /// Sets the value of [kind][crate::model::Type::kind]
12032    /// to hold a `ProtoType`.
12033    ///
12034    /// Note that all the setters affecting `kind` are
12035    /// mutually exclusive.
12036    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
12037        mut self,
12038        v: T,
12039    ) -> Self {
12040        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
12041        self
12042    }
12043
12044    /// The value of [kind][crate::model::Type::kind]
12045    /// if it holds a `EnumType`, `None` if the field is not set or
12046    /// holds a different branch.
12047    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
12048        #[allow(unreachable_patterns)]
12049        self.kind.as_ref().and_then(|v| match v {
12050            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
12051            _ => std::option::Option::None,
12052        })
12053    }
12054
12055    /// Sets the value of [kind][crate::model::Type::kind]
12056    /// to hold a `EnumType`.
12057    ///
12058    /// Note that all the setters affecting `kind` are
12059    /// mutually exclusive.
12060    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
12061        mut self,
12062        v: T,
12063    ) -> Self {
12064        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
12065        self
12066    }
12067}
12068
12069impl wkt::message::Message for Type {
12070    fn typename() -> &'static str {
12071        "type.googleapis.com/google.bigtable.admin.v2.Type"
12072    }
12073}
12074
12075/// Defines additional types related to [Type].
12076pub mod r#type {
12077    #[allow(unused_imports)]
12078    use super::*;
12079
12080    /// Bytes
12081    /// Values of type `Bytes` are stored in `Value.bytes_value`.
12082    #[derive(Clone, Default, PartialEq)]
12083    #[non_exhaustive]
12084    pub struct Bytes {
12085        /// The encoding to use when converting to or from lower level types.
12086        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
12087
12088        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12089    }
12090
12091    impl Bytes {
12092        pub fn new() -> Self {
12093            std::default::Default::default()
12094        }
12095
12096        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
12097        pub fn set_encoding<T>(mut self, v: T) -> Self
12098        where
12099            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
12100        {
12101            self.encoding = std::option::Option::Some(v.into());
12102            self
12103        }
12104
12105        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
12106        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
12107        where
12108            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
12109        {
12110            self.encoding = v.map(|x| x.into());
12111            self
12112        }
12113    }
12114
12115    impl wkt::message::Message for Bytes {
12116        fn typename() -> &'static str {
12117            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
12118        }
12119    }
12120
12121    /// Defines additional types related to [Bytes].
12122    pub mod bytes {
12123        #[allow(unused_imports)]
12124        use super::*;
12125
12126        /// Rules used to convert to or from lower level types.
12127        #[derive(Clone, Default, PartialEq)]
12128        #[non_exhaustive]
12129        pub struct Encoding {
12130            /// Which encoding to use.
12131            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
12132
12133            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12134        }
12135
12136        impl Encoding {
12137            pub fn new() -> Self {
12138                std::default::Default::default()
12139            }
12140
12141            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
12142            ///
12143            /// Note that all the setters affecting `encoding` are mutually
12144            /// exclusive.
12145            pub fn set_encoding<
12146                T: std::convert::Into<
12147                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
12148                    >,
12149            >(
12150                mut self,
12151                v: T,
12152            ) -> Self {
12153                self.encoding = v.into();
12154                self
12155            }
12156
12157            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
12158            /// if it holds a `Raw`, `None` if the field is not set or
12159            /// holds a different branch.
12160            pub fn raw(
12161                &self,
12162            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
12163            {
12164                #[allow(unreachable_patterns)]
12165                self.encoding.as_ref().and_then(|v| match v {
12166                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
12167                        std::option::Option::Some(v)
12168                    }
12169                    _ => std::option::Option::None,
12170                })
12171            }
12172
12173            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
12174            /// to hold a `Raw`.
12175            ///
12176            /// Note that all the setters affecting `encoding` are
12177            /// mutually exclusive.
12178            pub fn set_raw<
12179                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
12180            >(
12181                mut self,
12182                v: T,
12183            ) -> Self {
12184                self.encoding = std::option::Option::Some(
12185                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
12186                );
12187                self
12188            }
12189        }
12190
12191        impl wkt::message::Message for Encoding {
12192            fn typename() -> &'static str {
12193                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
12194            }
12195        }
12196
12197        /// Defines additional types related to [Encoding].
12198        pub mod encoding {
12199            #[allow(unused_imports)]
12200            use super::*;
12201
12202            /// Leaves the value as-is.
12203            ///
12204            /// Sorted mode: all values are supported.
12205            ///
12206            /// Distinct mode: all values are supported.
12207            #[derive(Clone, Default, PartialEq)]
12208            #[non_exhaustive]
12209            pub struct Raw {
12210                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12211            }
12212
12213            impl Raw {
12214                pub fn new() -> Self {
12215                    std::default::Default::default()
12216                }
12217            }
12218
12219            impl wkt::message::Message for Raw {
12220                fn typename() -> &'static str {
12221                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
12222                }
12223            }
12224
12225            /// Which encoding to use.
12226            #[derive(Clone, Debug, PartialEq)]
12227            #[non_exhaustive]
12228            pub enum Encoding {
12229                /// Use `Raw` encoding.
12230                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
12231            }
12232        }
12233    }
12234
12235    /// String
12236    /// Values of type `String` are stored in `Value.string_value`.
12237    #[derive(Clone, Default, PartialEq)]
12238    #[non_exhaustive]
12239    pub struct String {
12240        /// The encoding to use when converting to or from lower level types.
12241        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
12242
12243        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12244    }
12245
12246    impl String {
12247        pub fn new() -> Self {
12248            std::default::Default::default()
12249        }
12250
12251        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
12252        pub fn set_encoding<T>(mut self, v: T) -> Self
12253        where
12254            T: std::convert::Into<crate::model::r#type::string::Encoding>,
12255        {
12256            self.encoding = std::option::Option::Some(v.into());
12257            self
12258        }
12259
12260        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
12261        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
12262        where
12263            T: std::convert::Into<crate::model::r#type::string::Encoding>,
12264        {
12265            self.encoding = v.map(|x| x.into());
12266            self
12267        }
12268    }
12269
12270    impl wkt::message::Message for String {
12271        fn typename() -> &'static str {
12272            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
12273        }
12274    }
12275
12276    /// Defines additional types related to [String].
12277    pub mod string {
12278        #[allow(unused_imports)]
12279        use super::*;
12280
12281        /// Rules used to convert to or from lower level types.
12282        #[derive(Clone, Default, PartialEq)]
12283        #[non_exhaustive]
12284        pub struct Encoding {
12285            /// Which encoding to use.
12286            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
12287
12288            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12289        }
12290
12291        impl Encoding {
12292            pub fn new() -> Self {
12293                std::default::Default::default()
12294            }
12295
12296            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
12297            ///
12298            /// Note that all the setters affecting `encoding` are mutually
12299            /// exclusive.
12300            pub fn set_encoding<
12301                T: std::convert::Into<
12302                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
12303                    >,
12304            >(
12305                mut self,
12306                v: T,
12307            ) -> Self {
12308                self.encoding = v.into();
12309                self
12310            }
12311
12312            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
12313            /// if it holds a `Utf8Raw`, `None` if the field is not set or
12314            /// holds a different branch.
12315            #[deprecated]
12316            pub fn utf8_raw(
12317                &self,
12318            ) -> std::option::Option<
12319                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
12320            > {
12321                #[allow(unreachable_patterns)]
12322                self.encoding.as_ref().and_then(|v| match v {
12323                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
12324                        std::option::Option::Some(v)
12325                    }
12326                    _ => std::option::Option::None,
12327                })
12328            }
12329
12330            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
12331            /// to hold a `Utf8Raw`.
12332            ///
12333            /// Note that all the setters affecting `encoding` are
12334            /// mutually exclusive.
12335            #[deprecated]
12336            pub fn set_utf8_raw<
12337                T: std::convert::Into<
12338                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
12339                    >,
12340            >(
12341                mut self,
12342                v: T,
12343            ) -> Self {
12344                self.encoding = std::option::Option::Some(
12345                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
12346                );
12347                self
12348            }
12349
12350            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
12351            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
12352            /// holds a different branch.
12353            pub fn utf8_bytes(
12354                &self,
12355            ) -> std::option::Option<
12356                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
12357            > {
12358                #[allow(unreachable_patterns)]
12359                self.encoding.as_ref().and_then(|v| match v {
12360                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
12361                        std::option::Option::Some(v)
12362                    }
12363                    _ => std::option::Option::None,
12364                })
12365            }
12366
12367            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
12368            /// to hold a `Utf8Bytes`.
12369            ///
12370            /// Note that all the setters affecting `encoding` are
12371            /// mutually exclusive.
12372            pub fn set_utf8_bytes<
12373                T: std::convert::Into<
12374                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
12375                    >,
12376            >(
12377                mut self,
12378                v: T,
12379            ) -> Self {
12380                self.encoding = std::option::Option::Some(
12381                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
12382                );
12383                self
12384            }
12385        }
12386
12387        impl wkt::message::Message for Encoding {
12388            fn typename() -> &'static str {
12389                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
12390            }
12391        }
12392
12393        /// Defines additional types related to [Encoding].
12394        pub mod encoding {
12395            #[allow(unused_imports)]
12396            use super::*;
12397
12398            /// Deprecated: prefer the equivalent `Utf8Bytes`.
12399            #[derive(Clone, Default, PartialEq)]
12400            #[non_exhaustive]
12401            #[deprecated]
12402            pub struct Utf8Raw {
12403                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12404            }
12405
12406            impl Utf8Raw {
12407                pub fn new() -> Self {
12408                    std::default::Default::default()
12409                }
12410            }
12411
12412            impl wkt::message::Message for Utf8Raw {
12413                fn typename() -> &'static str {
12414                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
12415                }
12416            }
12417
12418            /// UTF-8 encoding.
12419            ///
12420            /// Sorted mode:
12421            ///
12422            /// - All values are supported.
12423            /// - Code point order is preserved.
12424            ///
12425            /// Distinct mode: all values are supported.
12426            ///
12427            /// Compatible with:
12428            ///
12429            /// - BigQuery `TEXT` encoding
12430            /// - HBase `Bytes.toBytes`
12431            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
12432            #[derive(Clone, Default, PartialEq)]
12433            #[non_exhaustive]
12434            pub struct Utf8Bytes {
12435                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12436            }
12437
12438            impl Utf8Bytes {
12439                pub fn new() -> Self {
12440                    std::default::Default::default()
12441                }
12442            }
12443
12444            impl wkt::message::Message for Utf8Bytes {
12445                fn typename() -> &'static str {
12446                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
12447                }
12448            }
12449
12450            /// Which encoding to use.
12451            #[derive(Clone, Debug, PartialEq)]
12452            #[non_exhaustive]
12453            pub enum Encoding {
12454                /// Deprecated: if set, converts to an empty `utf8_bytes`.
12455                #[deprecated]
12456                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
12457                /// Use `Utf8Bytes` encoding.
12458                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
12459            }
12460        }
12461    }
12462
12463    /// Int64
12464    /// Values of type `Int64` are stored in `Value.int_value`.
12465    #[derive(Clone, Default, PartialEq)]
12466    #[non_exhaustive]
12467    pub struct Int64 {
12468        /// The encoding to use when converting to or from lower level types.
12469        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
12470
12471        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12472    }
12473
12474    impl Int64 {
12475        pub fn new() -> Self {
12476            std::default::Default::default()
12477        }
12478
12479        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
12480        pub fn set_encoding<T>(mut self, v: T) -> Self
12481        where
12482            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
12483        {
12484            self.encoding = std::option::Option::Some(v.into());
12485            self
12486        }
12487
12488        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
12489        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
12490        where
12491            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
12492        {
12493            self.encoding = v.map(|x| x.into());
12494            self
12495        }
12496    }
12497
12498    impl wkt::message::Message for Int64 {
12499        fn typename() -> &'static str {
12500            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
12501        }
12502    }
12503
12504    /// Defines additional types related to [Int64].
12505    pub mod int_64 {
12506        #[allow(unused_imports)]
12507        use super::*;
12508
12509        /// Rules used to convert to or from lower level types.
12510        #[derive(Clone, Default, PartialEq)]
12511        #[non_exhaustive]
12512        pub struct Encoding {
12513            /// Which encoding to use.
12514            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
12515
12516            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12517        }
12518
12519        impl Encoding {
12520            pub fn new() -> Self {
12521                std::default::Default::default()
12522            }
12523
12524            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
12525            ///
12526            /// Note that all the setters affecting `encoding` are mutually
12527            /// exclusive.
12528            pub fn set_encoding<
12529                T: std::convert::Into<
12530                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
12531                    >,
12532            >(
12533                mut self,
12534                v: T,
12535            ) -> Self {
12536                self.encoding = v.into();
12537                self
12538            }
12539
12540            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
12541            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
12542            /// holds a different branch.
12543            pub fn big_endian_bytes(
12544                &self,
12545            ) -> std::option::Option<
12546                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
12547            > {
12548                #[allow(unreachable_patterns)]
12549                self.encoding.as_ref().and_then(|v| match v {
12550                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
12551                        std::option::Option::Some(v)
12552                    }
12553                    _ => std::option::Option::None,
12554                })
12555            }
12556
12557            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
12558            /// to hold a `BigEndianBytes`.
12559            ///
12560            /// Note that all the setters affecting `encoding` are
12561            /// mutually exclusive.
12562            pub fn set_big_endian_bytes<
12563                T: std::convert::Into<
12564                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
12565                    >,
12566            >(
12567                mut self,
12568                v: T,
12569            ) -> Self {
12570                self.encoding = std::option::Option::Some(
12571                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
12572                );
12573                self
12574            }
12575
12576            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
12577            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
12578            /// holds a different branch.
12579            pub fn ordered_code_bytes(
12580                &self,
12581            ) -> std::option::Option<
12582                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
12583            > {
12584                #[allow(unreachable_patterns)]
12585                self.encoding.as_ref().and_then(|v| match v {
12586                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
12587                        std::option::Option::Some(v)
12588                    }
12589                    _ => std::option::Option::None,
12590                })
12591            }
12592
12593            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
12594            /// to hold a `OrderedCodeBytes`.
12595            ///
12596            /// Note that all the setters affecting `encoding` are
12597            /// mutually exclusive.
12598            pub fn set_ordered_code_bytes<
12599                T: std::convert::Into<
12600                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
12601                    >,
12602            >(
12603                mut self,
12604                v: T,
12605            ) -> Self {
12606                self.encoding = std::option::Option::Some(
12607                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
12608                );
12609                self
12610            }
12611        }
12612
12613        impl wkt::message::Message for Encoding {
12614            fn typename() -> &'static str {
12615                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
12616            }
12617        }
12618
12619        /// Defines additional types related to [Encoding].
12620        pub mod encoding {
12621            #[allow(unused_imports)]
12622            use super::*;
12623
12624            /// Encodes the value as an 8-byte big-endian two's complement value.
12625            ///
12626            /// Sorted mode: non-negative values are supported.
12627            ///
12628            /// Distinct mode: all values are supported.
12629            ///
12630            /// Compatible with:
12631            ///
12632            /// - BigQuery `BINARY` encoding
12633            /// - HBase `Bytes.toBytes`
12634            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
12635            #[derive(Clone, Default, PartialEq)]
12636            #[non_exhaustive]
12637            pub struct BigEndianBytes {
12638                /// Deprecated: ignored if set.
12639                #[deprecated]
12640                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
12641
12642                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12643            }
12644
12645            impl BigEndianBytes {
12646                pub fn new() -> Self {
12647                    std::default::Default::default()
12648                }
12649
12650                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
12651                #[deprecated]
12652                pub fn set_bytes_type<T>(mut self, v: T) -> Self
12653                where
12654                    T: std::convert::Into<crate::model::r#type::Bytes>,
12655                {
12656                    self.bytes_type = std::option::Option::Some(v.into());
12657                    self
12658                }
12659
12660                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
12661                #[deprecated]
12662                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
12663                where
12664                    T: std::convert::Into<crate::model::r#type::Bytes>,
12665                {
12666                    self.bytes_type = v.map(|x| x.into());
12667                    self
12668                }
12669            }
12670
12671            impl wkt::message::Message for BigEndianBytes {
12672                fn typename() -> &'static str {
12673                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
12674                }
12675            }
12676
12677            /// Encodes the value in a variable length binary format of up to 10 bytes.
12678            /// Values that are closer to zero use fewer bytes.
12679            ///
12680            /// Sorted mode: all values are supported.
12681            ///
12682            /// Distinct mode: all values are supported.
12683            #[derive(Clone, Default, PartialEq)]
12684            #[non_exhaustive]
12685            pub struct OrderedCodeBytes {
12686                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12687            }
12688
12689            impl OrderedCodeBytes {
12690                pub fn new() -> Self {
12691                    std::default::Default::default()
12692                }
12693            }
12694
12695            impl wkt::message::Message for OrderedCodeBytes {
12696                fn typename() -> &'static str {
12697                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
12698                }
12699            }
12700
12701            /// Which encoding to use.
12702            #[derive(Clone, Debug, PartialEq)]
12703            #[non_exhaustive]
12704            pub enum Encoding {
12705                /// Use `BigEndianBytes` encoding.
12706                BigEndianBytes(
12707                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
12708                ),
12709                /// Use `OrderedCodeBytes` encoding.
12710                OrderedCodeBytes(
12711                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
12712                ),
12713            }
12714        }
12715    }
12716
12717    /// bool
12718    /// Values of type `Bool` are stored in `Value.bool_value`.
12719    #[derive(Clone, Default, PartialEq)]
12720    #[non_exhaustive]
12721    pub struct Bool {
12722        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12723    }
12724
12725    impl Bool {
12726        pub fn new() -> Self {
12727            std::default::Default::default()
12728        }
12729    }
12730
12731    impl wkt::message::Message for Bool {
12732        fn typename() -> &'static str {
12733            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
12734        }
12735    }
12736
12737    /// Float32
12738    /// Values of type `Float32` are stored in `Value.float_value`.
12739    #[derive(Clone, Default, PartialEq)]
12740    #[non_exhaustive]
12741    pub struct Float32 {
12742        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12743    }
12744
12745    impl Float32 {
12746        pub fn new() -> Self {
12747            std::default::Default::default()
12748        }
12749    }
12750
12751    impl wkt::message::Message for Float32 {
12752        fn typename() -> &'static str {
12753            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
12754        }
12755    }
12756
12757    /// Float64
12758    /// Values of type `Float64` are stored in `Value.float_value`.
12759    #[derive(Clone, Default, PartialEq)]
12760    #[non_exhaustive]
12761    pub struct Float64 {
12762        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12763    }
12764
12765    impl Float64 {
12766        pub fn new() -> Self {
12767            std::default::Default::default()
12768        }
12769    }
12770
12771    impl wkt::message::Message for Float64 {
12772        fn typename() -> &'static str {
12773            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
12774        }
12775    }
12776
12777    /// Timestamp
12778    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
12779    #[derive(Clone, Default, PartialEq)]
12780    #[non_exhaustive]
12781    pub struct Timestamp {
12782        /// The encoding to use when converting to or from lower level types.
12783        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
12784
12785        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12786    }
12787
12788    impl Timestamp {
12789        pub fn new() -> Self {
12790            std::default::Default::default()
12791        }
12792
12793        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
12794        pub fn set_encoding<T>(mut self, v: T) -> Self
12795        where
12796            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
12797        {
12798            self.encoding = std::option::Option::Some(v.into());
12799            self
12800        }
12801
12802        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
12803        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
12804        where
12805            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
12806        {
12807            self.encoding = v.map(|x| x.into());
12808            self
12809        }
12810    }
12811
12812    impl wkt::message::Message for Timestamp {
12813        fn typename() -> &'static str {
12814            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
12815        }
12816    }
12817
12818    /// Defines additional types related to [Timestamp].
12819    pub mod timestamp {
12820        #[allow(unused_imports)]
12821        use super::*;
12822
12823        /// Rules used to convert to or from lower level types.
12824        #[derive(Clone, Default, PartialEq)]
12825        #[non_exhaustive]
12826        pub struct Encoding {
12827            /// Which encoding to use.
12828            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
12829
12830            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12831        }
12832
12833        impl Encoding {
12834            pub fn new() -> Self {
12835                std::default::Default::default()
12836            }
12837
12838            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
12839            ///
12840            /// Note that all the setters affecting `encoding` are mutually
12841            /// exclusive.
12842            pub fn set_encoding<
12843                T: std::convert::Into<
12844                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
12845                    >,
12846            >(
12847                mut self,
12848                v: T,
12849            ) -> Self {
12850                self.encoding = v.into();
12851                self
12852            }
12853
12854            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
12855            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
12856            /// holds a different branch.
12857            pub fn unix_micros_int64(
12858                &self,
12859            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
12860            {
12861                #[allow(unreachable_patterns)]
12862                self.encoding.as_ref().and_then(|v| match v {
12863                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
12864                        std::option::Option::Some(v)
12865                    }
12866                    _ => std::option::Option::None,
12867                })
12868            }
12869
12870            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
12871            /// to hold a `UnixMicrosInt64`.
12872            ///
12873            /// Note that all the setters affecting `encoding` are
12874            /// mutually exclusive.
12875            pub fn set_unix_micros_int64<
12876                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
12877            >(
12878                mut self,
12879                v: T,
12880            ) -> Self {
12881                self.encoding = std::option::Option::Some(
12882                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
12883                );
12884                self
12885            }
12886        }
12887
12888        impl wkt::message::Message for Encoding {
12889            fn typename() -> &'static str {
12890                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
12891            }
12892        }
12893
12894        /// Defines additional types related to [Encoding].
12895        pub mod encoding {
12896            #[allow(unused_imports)]
12897            use super::*;
12898
12899            /// Which encoding to use.
12900            #[derive(Clone, Debug, PartialEq)]
12901            #[non_exhaustive]
12902            pub enum Encoding {
12903                /// Encodes the number of microseconds since the Unix epoch using the
12904                /// given `Int64` encoding. Values must be microsecond-aligned.
12905                ///
12906                /// Compatible with:
12907                ///
12908                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
12909                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
12910            }
12911        }
12912    }
12913
12914    /// Date
12915    /// Values of type `Date` are stored in `Value.date_value`.
12916    #[derive(Clone, Default, PartialEq)]
12917    #[non_exhaustive]
12918    pub struct Date {
12919        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12920    }
12921
12922    impl Date {
12923        pub fn new() -> Self {
12924            std::default::Default::default()
12925        }
12926    }
12927
12928    impl wkt::message::Message for Date {
12929        fn typename() -> &'static str {
12930            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
12931        }
12932    }
12933
12934    /// A structured data value, consisting of fields which map to dynamically
12935    /// typed values.
12936    /// Values of type `Struct` are stored in `Value.array_value` where entries are
12937    /// in the same order and number as `field_types`.
12938    #[derive(Clone, Default, PartialEq)]
12939    #[non_exhaustive]
12940    pub struct Struct {
12941        /// The names and types of the fields in this struct.
12942        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
12943
12944        /// The encoding to use when converting to or from lower level types.
12945        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
12946
12947        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12948    }
12949
12950    impl Struct {
12951        pub fn new() -> Self {
12952            std::default::Default::default()
12953        }
12954
12955        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
12956        pub fn set_fields<T, V>(mut self, v: T) -> Self
12957        where
12958            T: std::iter::IntoIterator<Item = V>,
12959            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
12960        {
12961            use std::iter::Iterator;
12962            self.fields = v.into_iter().map(|i| i.into()).collect();
12963            self
12964        }
12965
12966        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
12967        pub fn set_encoding<T>(mut self, v: T) -> Self
12968        where
12969            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
12970        {
12971            self.encoding = std::option::Option::Some(v.into());
12972            self
12973        }
12974
12975        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
12976        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
12977        where
12978            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
12979        {
12980            self.encoding = v.map(|x| x.into());
12981            self
12982        }
12983    }
12984
12985    impl wkt::message::Message for Struct {
12986        fn typename() -> &'static str {
12987            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
12988        }
12989    }
12990
12991    /// Defines additional types related to [Struct].
12992    pub mod r#struct {
12993        #[allow(unused_imports)]
12994        use super::*;
12995
12996        /// A struct field and its type.
12997        #[derive(Clone, Default, PartialEq)]
12998        #[non_exhaustive]
12999        pub struct Field {
13000            /// The field name (optional). Fields without a `field_name` are considered
13001            /// anonymous and cannot be referenced by name.
13002            pub field_name: std::string::String,
13003
13004            /// The type of values in this field.
13005            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13006
13007            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13008        }
13009
13010        impl Field {
13011            pub fn new() -> Self {
13012                std::default::Default::default()
13013            }
13014
13015            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
13016            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
13017                mut self,
13018                v: T,
13019            ) -> Self {
13020                self.field_name = v.into();
13021                self
13022            }
13023
13024            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
13025            pub fn set_type<T>(mut self, v: T) -> Self
13026            where
13027                T: std::convert::Into<crate::model::Type>,
13028            {
13029                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
13030                self
13031            }
13032
13033            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
13034            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
13035            where
13036                T: std::convert::Into<crate::model::Type>,
13037            {
13038                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
13039                self
13040            }
13041        }
13042
13043        impl wkt::message::Message for Field {
13044            fn typename() -> &'static str {
13045                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
13046            }
13047        }
13048
13049        /// Rules used to convert to or from lower level types.
13050        #[derive(Clone, Default, PartialEq)]
13051        #[non_exhaustive]
13052        pub struct Encoding {
13053            /// Which encoding to use.
13054            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
13055
13056            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13057        }
13058
13059        impl Encoding {
13060            pub fn new() -> Self {
13061                std::default::Default::default()
13062            }
13063
13064            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
13065            ///
13066            /// Note that all the setters affecting `encoding` are mutually
13067            /// exclusive.
13068            pub fn set_encoding<
13069                T: std::convert::Into<
13070                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
13071                    >,
13072            >(
13073                mut self,
13074                v: T,
13075            ) -> Self {
13076                self.encoding = v.into();
13077                self
13078            }
13079
13080            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
13081            /// if it holds a `Singleton`, `None` if the field is not set or
13082            /// holds a different branch.
13083            pub fn singleton(
13084                &self,
13085            ) -> std::option::Option<
13086                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
13087            > {
13088                #[allow(unreachable_patterns)]
13089                self.encoding.as_ref().and_then(|v| match v {
13090                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
13091                        std::option::Option::Some(v)
13092                    }
13093                    _ => std::option::Option::None,
13094                })
13095            }
13096
13097            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
13098            /// to hold a `Singleton`.
13099            ///
13100            /// Note that all the setters affecting `encoding` are
13101            /// mutually exclusive.
13102            pub fn set_singleton<
13103                T: std::convert::Into<
13104                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
13105                    >,
13106            >(
13107                mut self,
13108                v: T,
13109            ) -> Self {
13110                self.encoding = std::option::Option::Some(
13111                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
13112                );
13113                self
13114            }
13115
13116            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
13117            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
13118            /// holds a different branch.
13119            pub fn delimited_bytes(
13120                &self,
13121            ) -> std::option::Option<
13122                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
13123            > {
13124                #[allow(unreachable_patterns)]
13125                self.encoding.as_ref().and_then(|v| match v {
13126                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
13127                        std::option::Option::Some(v)
13128                    }
13129                    _ => std::option::Option::None,
13130                })
13131            }
13132
13133            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
13134            /// to hold a `DelimitedBytes`.
13135            ///
13136            /// Note that all the setters affecting `encoding` are
13137            /// mutually exclusive.
13138            pub fn set_delimited_bytes<
13139                T: std::convert::Into<
13140                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
13141                    >,
13142            >(
13143                mut self,
13144                v: T,
13145            ) -> Self {
13146                self.encoding = std::option::Option::Some(
13147                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
13148                );
13149                self
13150            }
13151
13152            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
13153            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
13154            /// holds a different branch.
13155            pub fn ordered_code_bytes(
13156                &self,
13157            ) -> std::option::Option<
13158                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
13159            > {
13160                #[allow(unreachable_patterns)]
13161                self.encoding.as_ref().and_then(|v| match v {
13162                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
13163                        std::option::Option::Some(v)
13164                    }
13165                    _ => std::option::Option::None,
13166                })
13167            }
13168
13169            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
13170            /// to hold a `OrderedCodeBytes`.
13171            ///
13172            /// Note that all the setters affecting `encoding` are
13173            /// mutually exclusive.
13174            pub fn set_ordered_code_bytes<
13175                T: std::convert::Into<
13176                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
13177                    >,
13178            >(
13179                mut self,
13180                v: T,
13181            ) -> Self {
13182                self.encoding = std::option::Option::Some(
13183                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
13184                );
13185                self
13186            }
13187        }
13188
13189        impl wkt::message::Message for Encoding {
13190            fn typename() -> &'static str {
13191                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
13192            }
13193        }
13194
13195        /// Defines additional types related to [Encoding].
13196        pub mod encoding {
13197            #[allow(unused_imports)]
13198            use super::*;
13199
13200            /// Uses the encoding of `fields[0].type` as-is.
13201            /// Only valid if `fields.size == 1`.
13202            #[derive(Clone, Default, PartialEq)]
13203            #[non_exhaustive]
13204            pub struct Singleton {
13205                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13206            }
13207
13208            impl Singleton {
13209                pub fn new() -> Self {
13210                    std::default::Default::default()
13211                }
13212            }
13213
13214            impl wkt::message::Message for Singleton {
13215                fn typename() -> &'static str {
13216                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
13217                }
13218            }
13219
13220            /// Fields are encoded independently and concatenated with a configurable
13221            /// `delimiter` in between.
13222            ///
13223            /// A struct with no fields defined is encoded as a single `delimiter`.
13224            ///
13225            /// Sorted mode:
13226            ///
13227            /// - Fields are encoded in sorted mode.
13228            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
13229            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
13230            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
13231            ///
13232            /// Distinct mode:
13233            ///
13234            /// - Fields are encoded in distinct mode.
13235            /// - Encoded field values must not contain `delimiter[0]`.
13236            #[derive(Clone, Default, PartialEq)]
13237            #[non_exhaustive]
13238            pub struct DelimitedBytes {
13239                /// Byte sequence used to delimit concatenated fields. The delimiter must
13240                /// contain at least 1 character and at most 50 characters.
13241                pub delimiter: ::bytes::Bytes,
13242
13243                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13244            }
13245
13246            impl DelimitedBytes {
13247                pub fn new() -> Self {
13248                    std::default::Default::default()
13249                }
13250
13251                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
13252                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
13253                    mut self,
13254                    v: T,
13255                ) -> Self {
13256                    self.delimiter = v.into();
13257                    self
13258                }
13259            }
13260
13261            impl wkt::message::Message for DelimitedBytes {
13262                fn typename() -> &'static str {
13263                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
13264                }
13265            }
13266
13267            /// Fields are encoded independently and concatenated with the fixed byte
13268            /// pair {0x00, 0x01} in between.
13269            ///
13270            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
13271            /// pair {0x00, 0xFF}.
13272            ///
13273            /// Fields that encode to the empty string "" have special handling:
13274            ///
13275            /// - If *every* field encodes to "", or if the STRUCT has no fields
13276            ///   defined, then the STRUCT is encoded as the fixed byte pair
13277            ///   {0x00, 0x00}.
13278            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
13279            ///   omitting any trailing empty fields. Any empty fields that aren't
13280            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
13281            ///
13282            /// Examples:
13283            ///
13284            /// - STRUCT()             -> "\00\00"
13285            /// - STRUCT("")           -> "\00\00"
13286            /// - STRUCT("", "")       -> "\00\00"
13287            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
13288            /// - STRUCT("A", "")      -> "A"
13289            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
13290            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
13291            ///
13292            /// Since null bytes are always escaped, this encoding can cause size
13293            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
13294            /// produce many such bytes.
13295            ///
13296            /// Sorted mode:
13297            ///
13298            /// - Fields are encoded in sorted mode.
13299            /// - All values supported by the field encodings are allowed
13300            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
13301            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
13302            ///
13303            /// Distinct mode:
13304            ///
13305            /// - Fields are encoded in distinct mode.
13306            /// - All values supported by the field encodings are allowed.
13307            #[derive(Clone, Default, PartialEq)]
13308            #[non_exhaustive]
13309            pub struct OrderedCodeBytes {
13310                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13311            }
13312
13313            impl OrderedCodeBytes {
13314                pub fn new() -> Self {
13315                    std::default::Default::default()
13316                }
13317            }
13318
13319            impl wkt::message::Message for OrderedCodeBytes {
13320                fn typename() -> &'static str {
13321                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
13322                }
13323            }
13324
13325            /// Which encoding to use.
13326            #[derive(Clone, Debug, PartialEq)]
13327            #[non_exhaustive]
13328            pub enum Encoding {
13329                /// Use `Singleton` encoding.
13330                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
13331                /// Use `DelimitedBytes` encoding.
13332                DelimitedBytes(
13333                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
13334                ),
13335                /// User `OrderedCodeBytes` encoding.
13336                OrderedCodeBytes(
13337                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
13338                ),
13339            }
13340        }
13341    }
13342
13343    /// A protobuf message type.
13344    /// Values of type `Proto` are stored in `Value.bytes_value`.
13345    #[derive(Clone, Default, PartialEq)]
13346    #[non_exhaustive]
13347    pub struct Proto {
13348        /// The ID of the schema bundle that this proto is defined in.
13349        pub schema_bundle_id: std::string::String,
13350
13351        /// The fully qualified name of the protobuf message, including package. In
13352        /// the format of "foo.bar.Message".
13353        pub message_name: std::string::String,
13354
13355        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13356    }
13357
13358    impl Proto {
13359        pub fn new() -> Self {
13360            std::default::Default::default()
13361        }
13362
13363        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
13364        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
13365            mut self,
13366            v: T,
13367        ) -> Self {
13368            self.schema_bundle_id = v.into();
13369            self
13370        }
13371
13372        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
13373        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
13374            mut self,
13375            v: T,
13376        ) -> Self {
13377            self.message_name = v.into();
13378            self
13379        }
13380    }
13381
13382    impl wkt::message::Message for Proto {
13383        fn typename() -> &'static str {
13384            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
13385        }
13386    }
13387
13388    /// A protobuf enum type.
13389    /// Values of type `Enum` are stored in `Value.int_value`.
13390    #[derive(Clone, Default, PartialEq)]
13391    #[non_exhaustive]
13392    pub struct Enum {
13393        /// The ID of the schema bundle that this enum is defined in.
13394        pub schema_bundle_id: std::string::String,
13395
13396        /// The fully qualified name of the protobuf enum message, including package.
13397        /// In the format of "foo.bar.EnumMessage".
13398        pub enum_name: std::string::String,
13399
13400        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13401    }
13402
13403    impl Enum {
13404        pub fn new() -> Self {
13405            std::default::Default::default()
13406        }
13407
13408        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
13409        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
13410            mut self,
13411            v: T,
13412        ) -> Self {
13413            self.schema_bundle_id = v.into();
13414            self
13415        }
13416
13417        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
13418        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13419            self.enum_name = v.into();
13420            self
13421        }
13422    }
13423
13424    impl wkt::message::Message for Enum {
13425        fn typename() -> &'static str {
13426            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
13427        }
13428    }
13429
13430    /// An ordered list of elements of a given type.
13431    /// Values of type `Array` are stored in `Value.array_value`.
13432    #[derive(Clone, Default, PartialEq)]
13433    #[non_exhaustive]
13434    pub struct Array {
13435        /// The type of the elements in the array. This must not be `Array`.
13436        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13437
13438        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13439    }
13440
13441    impl Array {
13442        pub fn new() -> Self {
13443            std::default::Default::default()
13444        }
13445
13446        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
13447        pub fn set_element_type<T>(mut self, v: T) -> Self
13448        where
13449            T: std::convert::Into<crate::model::Type>,
13450        {
13451            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
13452            self
13453        }
13454
13455        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
13456        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
13457        where
13458            T: std::convert::Into<crate::model::Type>,
13459        {
13460            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
13461            self
13462        }
13463    }
13464
13465    impl wkt::message::Message for Array {
13466        fn typename() -> &'static str {
13467            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
13468        }
13469    }
13470
13471    /// A mapping of keys to values of a given type.
13472    /// Values of type `Map` are stored in a `Value.array_value` where each entry
13473    /// is another `Value.array_value` with two elements (the key and the value,
13474    /// in that order).
13475    /// Normally encoded Map values won't have repeated keys, however, clients are
13476    /// expected to handle the case in which they do. If the same key appears
13477    /// multiple times, the _last_ value takes precedence.
13478    #[derive(Clone, Default, PartialEq)]
13479    #[non_exhaustive]
13480    pub struct Map {
13481        /// The type of a map key.
13482        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
13483        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13484
13485        /// The type of the values in a map.
13486        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13487
13488        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13489    }
13490
13491    impl Map {
13492        pub fn new() -> Self {
13493            std::default::Default::default()
13494        }
13495
13496        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
13497        pub fn set_key_type<T>(mut self, v: T) -> Self
13498        where
13499            T: std::convert::Into<crate::model::Type>,
13500        {
13501            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
13502            self
13503        }
13504
13505        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
13506        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
13507        where
13508            T: std::convert::Into<crate::model::Type>,
13509        {
13510            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
13511            self
13512        }
13513
13514        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
13515        pub fn set_value_type<T>(mut self, v: T) -> Self
13516        where
13517            T: std::convert::Into<crate::model::Type>,
13518        {
13519            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
13520            self
13521        }
13522
13523        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
13524        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
13525        where
13526            T: std::convert::Into<crate::model::Type>,
13527        {
13528            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
13529            self
13530        }
13531    }
13532
13533    impl wkt::message::Message for Map {
13534        fn typename() -> &'static str {
13535            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
13536        }
13537    }
13538
13539    /// A value that combines incremental updates into a summarized value.
13540    ///
13541    /// Data is never directly written or read using type `Aggregate`. Writes will
13542    /// provide either the `input_type` or `state_type`, and reads will always
13543    /// return the `state_type` .
13544    #[derive(Clone, Default, PartialEq)]
13545    #[non_exhaustive]
13546    pub struct Aggregate {
13547        /// Type of the inputs that are accumulated by this `Aggregate`, which must
13548        /// specify a full encoding.
13549        /// Use `AddInput` mutations to accumulate new inputs.
13550        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13551
13552        /// Output only. Type that holds the internal accumulator state for the
13553        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
13554        /// chosen, and will always specify a full encoding.
13555        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13556
13557        /// Which aggregator function to use. The configured types must match.
13558        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
13559
13560        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13561    }
13562
13563    impl Aggregate {
13564        pub fn new() -> Self {
13565            std::default::Default::default()
13566        }
13567
13568        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
13569        pub fn set_input_type<T>(mut self, v: T) -> Self
13570        where
13571            T: std::convert::Into<crate::model::Type>,
13572        {
13573            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
13574            self
13575        }
13576
13577        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
13578        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
13579        where
13580            T: std::convert::Into<crate::model::Type>,
13581        {
13582            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
13583            self
13584        }
13585
13586        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
13587        pub fn set_state_type<T>(mut self, v: T) -> Self
13588        where
13589            T: std::convert::Into<crate::model::Type>,
13590        {
13591            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
13592            self
13593        }
13594
13595        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
13596        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
13597        where
13598            T: std::convert::Into<crate::model::Type>,
13599        {
13600            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
13601            self
13602        }
13603
13604        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
13605        ///
13606        /// Note that all the setters affecting `aggregator` are mutually
13607        /// exclusive.
13608        pub fn set_aggregator<
13609            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
13610        >(
13611            mut self,
13612            v: T,
13613        ) -> Self {
13614            self.aggregator = v.into();
13615            self
13616        }
13617
13618        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13619        /// if it holds a `Sum`, `None` if the field is not set or
13620        /// holds a different branch.
13621        pub fn sum(
13622            &self,
13623        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
13624            #[allow(unreachable_patterns)]
13625            self.aggregator.as_ref().and_then(|v| match v {
13626                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
13627                _ => std::option::Option::None,
13628            })
13629        }
13630
13631        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13632        /// to hold a `Sum`.
13633        ///
13634        /// Note that all the setters affecting `aggregator` are
13635        /// mutually exclusive.
13636        pub fn set_sum<
13637            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
13638        >(
13639            mut self,
13640            v: T,
13641        ) -> Self {
13642            self.aggregator = std::option::Option::Some(
13643                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
13644            );
13645            self
13646        }
13647
13648        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13649        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
13650        /// holds a different branch.
13651        pub fn hllpp_unique_count(
13652            &self,
13653        ) -> std::option::Option<
13654            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
13655        > {
13656            #[allow(unreachable_patterns)]
13657            self.aggregator.as_ref().and_then(|v| match v {
13658                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
13659                    std::option::Option::Some(v)
13660                }
13661                _ => std::option::Option::None,
13662            })
13663        }
13664
13665        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13666        /// to hold a `HllppUniqueCount`.
13667        ///
13668        /// Note that all the setters affecting `aggregator` are
13669        /// mutually exclusive.
13670        pub fn set_hllpp_unique_count<
13671            T: std::convert::Into<
13672                    std::boxed::Box<
13673                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
13674                    >,
13675                >,
13676        >(
13677            mut self,
13678            v: T,
13679        ) -> Self {
13680            self.aggregator = std::option::Option::Some(
13681                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
13682            );
13683            self
13684        }
13685
13686        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13687        /// if it holds a `Max`, `None` if the field is not set or
13688        /// holds a different branch.
13689        pub fn max(
13690            &self,
13691        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
13692            #[allow(unreachable_patterns)]
13693            self.aggregator.as_ref().and_then(|v| match v {
13694                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
13695                _ => std::option::Option::None,
13696            })
13697        }
13698
13699        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13700        /// to hold a `Max`.
13701        ///
13702        /// Note that all the setters affecting `aggregator` are
13703        /// mutually exclusive.
13704        pub fn set_max<
13705            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
13706        >(
13707            mut self,
13708            v: T,
13709        ) -> Self {
13710            self.aggregator = std::option::Option::Some(
13711                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
13712            );
13713            self
13714        }
13715
13716        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13717        /// if it holds a `Min`, `None` if the field is not set or
13718        /// holds a different branch.
13719        pub fn min(
13720            &self,
13721        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
13722            #[allow(unreachable_patterns)]
13723            self.aggregator.as_ref().and_then(|v| match v {
13724                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
13725                _ => std::option::Option::None,
13726            })
13727        }
13728
13729        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
13730        /// to hold a `Min`.
13731        ///
13732        /// Note that all the setters affecting `aggregator` are
13733        /// mutually exclusive.
13734        pub fn set_min<
13735            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
13736        >(
13737            mut self,
13738            v: T,
13739        ) -> Self {
13740            self.aggregator = std::option::Option::Some(
13741                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
13742            );
13743            self
13744        }
13745    }
13746
13747    impl wkt::message::Message for Aggregate {
13748        fn typename() -> &'static str {
13749            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
13750        }
13751    }
13752
13753    /// Defines additional types related to [Aggregate].
13754    pub mod aggregate {
13755        #[allow(unused_imports)]
13756        use super::*;
13757
13758        /// Computes the sum of the input values.
13759        /// Allowed input: `Int64`
13760        /// State: same as input
13761        #[derive(Clone, Default, PartialEq)]
13762        #[non_exhaustive]
13763        pub struct Sum {
13764            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13765        }
13766
13767        impl Sum {
13768            pub fn new() -> Self {
13769                std::default::Default::default()
13770            }
13771        }
13772
13773        impl wkt::message::Message for Sum {
13774            fn typename() -> &'static str {
13775                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
13776            }
13777        }
13778
13779        /// Computes the max of the input values.
13780        /// Allowed input: `Int64`
13781        /// State: same as input
13782        #[derive(Clone, Default, PartialEq)]
13783        #[non_exhaustive]
13784        pub struct Max {
13785            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13786        }
13787
13788        impl Max {
13789            pub fn new() -> Self {
13790                std::default::Default::default()
13791            }
13792        }
13793
13794        impl wkt::message::Message for Max {
13795            fn typename() -> &'static str {
13796                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
13797            }
13798        }
13799
13800        /// Computes the min of the input values.
13801        /// Allowed input: `Int64`
13802        /// State: same as input
13803        #[derive(Clone, Default, PartialEq)]
13804        #[non_exhaustive]
13805        pub struct Min {
13806            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13807        }
13808
13809        impl Min {
13810            pub fn new() -> Self {
13811                std::default::Default::default()
13812            }
13813        }
13814
13815        impl wkt::message::Message for Min {
13816            fn typename() -> &'static str {
13817                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
13818            }
13819        }
13820
13821        /// Computes an approximate unique count over the input values. When using
13822        /// raw data as input, be careful to use a consistent encoding. Otherwise
13823        /// the same value encoded differently could count more than once, or two
13824        /// distinct values could count as identical.
13825        /// Input: Any, or omit for Raw
13826        /// State: TBD
13827        /// Special state conversions: `Int64` (the unique count estimate)
13828        #[derive(Clone, Default, PartialEq)]
13829        #[non_exhaustive]
13830        pub struct HyperLogLogPlusPlusUniqueCount {
13831            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13832        }
13833
13834        impl HyperLogLogPlusPlusUniqueCount {
13835            pub fn new() -> Self {
13836                std::default::Default::default()
13837            }
13838        }
13839
13840        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
13841            fn typename() -> &'static str {
13842                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
13843            }
13844        }
13845
13846        /// Which aggregator function to use. The configured types must match.
13847        #[derive(Clone, Debug, PartialEq)]
13848        #[non_exhaustive]
13849        pub enum Aggregator {
13850            /// Sum aggregator.
13851            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
13852            /// HyperLogLogPlusPlusUniqueCount aggregator.
13853            HllppUniqueCount(
13854                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
13855            ),
13856            /// Max aggregator.
13857            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
13858            /// Min aggregator.
13859            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
13860        }
13861    }
13862
13863    /// The kind of type that this represents.
13864    #[derive(Clone, Debug, PartialEq)]
13865    #[non_exhaustive]
13866    pub enum Kind {
13867        /// Bytes
13868        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
13869        /// String
13870        StringType(std::boxed::Box<crate::model::r#type::String>),
13871        /// Int64
13872        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
13873        /// Float32
13874        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
13875        /// Float64
13876        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
13877        /// Bool
13878        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
13879        /// Timestamp
13880        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
13881        /// Date
13882        DateType(std::boxed::Box<crate::model::r#type::Date>),
13883        /// Aggregate
13884        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
13885        /// Struct
13886        StructType(std::boxed::Box<crate::model::r#type::Struct>),
13887        /// Array
13888        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
13889        /// Map
13890        MapType(std::boxed::Box<crate::model::r#type::Map>),
13891        /// Proto
13892        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
13893        /// Enum
13894        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
13895    }
13896}
13897
13898/// Storage media types for persisting Bigtable data.
13899///
13900/// # Working with unknown values
13901///
13902/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13903/// additional enum variants at any time. Adding new variants is not considered
13904/// a breaking change. Applications should write their code in anticipation of:
13905///
13906/// - New values appearing in future releases of the client library, **and**
13907/// - New values received dynamically, without application changes.
13908///
13909/// Please consult the [Working with enums] section in the user guide for some
13910/// guidelines.
13911///
13912/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13913#[derive(Clone, Debug, PartialEq)]
13914#[non_exhaustive]
13915pub enum StorageType {
13916    /// The user did not specify a storage type.
13917    Unspecified,
13918    /// Flash (SSD) storage should be used.
13919    Ssd,
13920    /// Magnetic drive (HDD) storage should be used.
13921    Hdd,
13922    /// If set, the enum was initialized with an unknown value.
13923    ///
13924    /// Applications can examine the value using [StorageType::value] or
13925    /// [StorageType::name].
13926    UnknownValue(storage_type::UnknownValue),
13927}
13928
13929#[doc(hidden)]
13930pub mod storage_type {
13931    #[allow(unused_imports)]
13932    use super::*;
13933    #[derive(Clone, Debug, PartialEq)]
13934    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13935}
13936
13937impl StorageType {
13938    /// Gets the enum value.
13939    ///
13940    /// Returns `None` if the enum contains an unknown value deserialized from
13941    /// the string representation of enums.
13942    pub fn value(&self) -> std::option::Option<i32> {
13943        match self {
13944            Self::Unspecified => std::option::Option::Some(0),
13945            Self::Ssd => std::option::Option::Some(1),
13946            Self::Hdd => std::option::Option::Some(2),
13947            Self::UnknownValue(u) => u.0.value(),
13948        }
13949    }
13950
13951    /// Gets the enum value as a string.
13952    ///
13953    /// Returns `None` if the enum contains an unknown value deserialized from
13954    /// the integer representation of enums.
13955    pub fn name(&self) -> std::option::Option<&str> {
13956        match self {
13957            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
13958            Self::Ssd => std::option::Option::Some("SSD"),
13959            Self::Hdd => std::option::Option::Some("HDD"),
13960            Self::UnknownValue(u) => u.0.name(),
13961        }
13962    }
13963}
13964
13965impl std::default::Default for StorageType {
13966    fn default() -> Self {
13967        use std::convert::From;
13968        Self::from(0)
13969    }
13970}
13971
13972impl std::fmt::Display for StorageType {
13973    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13974        wkt::internal::display_enum(f, self.name(), self.value())
13975    }
13976}
13977
13978impl std::convert::From<i32> for StorageType {
13979    fn from(value: i32) -> Self {
13980        match value {
13981            0 => Self::Unspecified,
13982            1 => Self::Ssd,
13983            2 => Self::Hdd,
13984            _ => Self::UnknownValue(storage_type::UnknownValue(
13985                wkt::internal::UnknownEnumValue::Integer(value),
13986            )),
13987        }
13988    }
13989}
13990
13991impl std::convert::From<&str> for StorageType {
13992    fn from(value: &str) -> Self {
13993        use std::string::ToString;
13994        match value {
13995            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
13996            "SSD" => Self::Ssd,
13997            "HDD" => Self::Hdd,
13998            _ => Self::UnknownValue(storage_type::UnknownValue(
13999                wkt::internal::UnknownEnumValue::String(value.to_string()),
14000            )),
14001        }
14002    }
14003}
14004
14005impl serde::ser::Serialize for StorageType {
14006    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14007    where
14008        S: serde::Serializer,
14009    {
14010        match self {
14011            Self::Unspecified => serializer.serialize_i32(0),
14012            Self::Ssd => serializer.serialize_i32(1),
14013            Self::Hdd => serializer.serialize_i32(2),
14014            Self::UnknownValue(u) => u.0.serialize(serializer),
14015        }
14016    }
14017}
14018
14019impl<'de> serde::de::Deserialize<'de> for StorageType {
14020    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14021    where
14022        D: serde::Deserializer<'de>,
14023    {
14024        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
14025            ".google.bigtable.admin.v2.StorageType",
14026        ))
14027    }
14028}
14029
14030/// Indicates the type of the restore source.
14031///
14032/// # Working with unknown values
14033///
14034/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14035/// additional enum variants at any time. Adding new variants is not considered
14036/// a breaking change. Applications should write their code in anticipation of:
14037///
14038/// - New values appearing in future releases of the client library, **and**
14039/// - New values received dynamically, without application changes.
14040///
14041/// Please consult the [Working with enums] section in the user guide for some
14042/// guidelines.
14043///
14044/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14045#[derive(Clone, Debug, PartialEq)]
14046#[non_exhaustive]
14047pub enum RestoreSourceType {
14048    /// No restore associated.
14049    Unspecified,
14050    /// A backup was used as the source of the restore.
14051    Backup,
14052    /// If set, the enum was initialized with an unknown value.
14053    ///
14054    /// Applications can examine the value using [RestoreSourceType::value] or
14055    /// [RestoreSourceType::name].
14056    UnknownValue(restore_source_type::UnknownValue),
14057}
14058
14059#[doc(hidden)]
14060pub mod restore_source_type {
14061    #[allow(unused_imports)]
14062    use super::*;
14063    #[derive(Clone, Debug, PartialEq)]
14064    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14065}
14066
14067impl RestoreSourceType {
14068    /// Gets the enum value.
14069    ///
14070    /// Returns `None` if the enum contains an unknown value deserialized from
14071    /// the string representation of enums.
14072    pub fn value(&self) -> std::option::Option<i32> {
14073        match self {
14074            Self::Unspecified => std::option::Option::Some(0),
14075            Self::Backup => std::option::Option::Some(1),
14076            Self::UnknownValue(u) => u.0.value(),
14077        }
14078    }
14079
14080    /// Gets the enum value as a string.
14081    ///
14082    /// Returns `None` if the enum contains an unknown value deserialized from
14083    /// the integer representation of enums.
14084    pub fn name(&self) -> std::option::Option<&str> {
14085        match self {
14086            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
14087            Self::Backup => std::option::Option::Some("BACKUP"),
14088            Self::UnknownValue(u) => u.0.name(),
14089        }
14090    }
14091}
14092
14093impl std::default::Default for RestoreSourceType {
14094    fn default() -> Self {
14095        use std::convert::From;
14096        Self::from(0)
14097    }
14098}
14099
14100impl std::fmt::Display for RestoreSourceType {
14101    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14102        wkt::internal::display_enum(f, self.name(), self.value())
14103    }
14104}
14105
14106impl std::convert::From<i32> for RestoreSourceType {
14107    fn from(value: i32) -> Self {
14108        match value {
14109            0 => Self::Unspecified,
14110            1 => Self::Backup,
14111            _ => Self::UnknownValue(restore_source_type::UnknownValue(
14112                wkt::internal::UnknownEnumValue::Integer(value),
14113            )),
14114        }
14115    }
14116}
14117
14118impl std::convert::From<&str> for RestoreSourceType {
14119    fn from(value: &str) -> Self {
14120        use std::string::ToString;
14121        match value {
14122            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
14123            "BACKUP" => Self::Backup,
14124            _ => Self::UnknownValue(restore_source_type::UnknownValue(
14125                wkt::internal::UnknownEnumValue::String(value.to_string()),
14126            )),
14127        }
14128    }
14129}
14130
14131impl serde::ser::Serialize for RestoreSourceType {
14132    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14133    where
14134        S: serde::Serializer,
14135    {
14136        match self {
14137            Self::Unspecified => serializer.serialize_i32(0),
14138            Self::Backup => serializer.serialize_i32(1),
14139            Self::UnknownValue(u) => u.0.serialize(serializer),
14140        }
14141    }
14142}
14143
14144impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
14145    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14146    where
14147        D: serde::Deserializer<'de>,
14148    {
14149        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
14150            ".google.bigtable.admin.v2.RestoreSourceType",
14151        ))
14152    }
14153}