1#![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#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct CreateInstanceRequest {
45 pub parent: std::string::String,
48
49 pub instance_id: std::string::String,
53
54 pub instance: std::option::Option<crate::model::Instance>,
57
58 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
123#[non_exhaustive]
124pub struct GetInstanceRequest {
125 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 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#[derive(Clone, Default, PartialEq)]
152#[non_exhaustive]
153pub struct ListInstancesRequest {
154 pub parent: std::string::String,
157
158 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 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 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#[derive(Clone, Default, PartialEq)]
190#[non_exhaustive]
191pub struct ListInstancesResponse {
192 pub instances: std::vec::Vec<crate::model::Instance>,
194
195 pub failed_locations: std::vec::Vec<std::string::String>,
202
203 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 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 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 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#[derive(Clone, Default, PartialEq)]
251#[non_exhaustive]
252pub struct PartialUpdateInstanceRequest {
253 pub instance: std::option::Option<crate::model::Instance>,
255
256 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
313#[non_exhaustive]
314pub struct DeleteInstanceRequest {
315 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 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#[derive(Clone, Default, PartialEq)]
342#[non_exhaustive]
343pub struct CreateClusterRequest {
344 pub parent: std::string::String,
347
348 pub cluster_id: std::string::String,
352
353 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
404#[non_exhaustive]
405pub struct GetClusterRequest {
406 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 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#[derive(Clone, Default, PartialEq)]
433#[non_exhaustive]
434pub struct ListClustersRequest {
435 pub parent: std::string::String,
441
442 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 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 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#[derive(Clone, Default, PartialEq)]
474#[non_exhaustive]
475pub struct ListClustersResponse {
476 pub clusters: std::vec::Vec<crate::model::Cluster>,
478
479 pub failed_locations: std::vec::Vec<std::string::String>,
485
486 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 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 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 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#[derive(Clone, Default, PartialEq)]
534#[non_exhaustive]
535pub struct DeleteClusterRequest {
536 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 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#[derive(Clone, Default, PartialEq)]
563#[non_exhaustive]
564pub struct CreateInstanceMetadata {
565 pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
567
568 pub request_time: std::option::Option<wkt::Timestamp>,
570
571 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
645#[non_exhaustive]
646pub struct UpdateInstanceMetadata {
647 pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
649
650 pub request_time: std::option::Option<wkt::Timestamp>,
652
653 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
727#[non_exhaustive]
728pub struct CreateClusterMetadata {
729 pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
731
732 pub request_time: std::option::Option<wkt::Timestamp>,
734
735 pub finish_time: std::option::Option<wkt::Timestamp>,
737
738 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 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 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 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 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 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 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 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
832pub mod create_cluster_metadata {
834 #[allow(unused_imports)]
835 use super::*;
836
837 #[derive(Clone, Default, PartialEq)]
839 #[non_exhaustive]
840 pub struct TableProgress {
841 pub estimated_size_bytes: i64,
843
844 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 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 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 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 pub mod table_progress {
891 #[allow(unused_imports)]
892 use super::*;
893
894 #[derive(Clone, Debug, PartialEq)]
909 #[non_exhaustive]
910 pub enum State {
911 Unspecified,
912 Pending,
914 Copying,
916 Completed,
918 Cancelled,
922 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 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 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#[derive(Clone, Default, PartialEq)]
1047#[non_exhaustive]
1048pub struct UpdateClusterMetadata {
1049 pub original_request: std::option::Option<crate::model::Cluster>,
1051
1052 pub request_time: std::option::Option<wkt::Timestamp>,
1054
1055 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1129#[non_exhaustive]
1130pub struct PartialUpdateClusterMetadata {
1131 pub request_time: std::option::Option<wkt::Timestamp>,
1133
1134 pub finish_time: std::option::Option<wkt::Timestamp>,
1136
1137 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1211#[non_exhaustive]
1212pub struct PartialUpdateClusterRequest {
1213 pub cluster: std::option::Option<crate::model::Cluster>,
1216
1217 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1273#[non_exhaustive]
1274pub struct CreateAppProfileRequest {
1275 pub parent: std::string::String,
1278
1279 pub app_profile_id: std::string::String,
1283
1284 pub app_profile: std::option::Option<crate::model::AppProfile>,
1287
1288 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1344#[non_exhaustive]
1345pub struct GetAppProfileRequest {
1346 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 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#[derive(Clone, Default, PartialEq)]
1373#[non_exhaustive]
1374pub struct ListAppProfilesRequest {
1375 pub parent: std::string::String,
1381
1382 pub page_size: i32,
1392
1393 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 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 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 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#[derive(Clone, Default, PartialEq)]
1431#[non_exhaustive]
1432pub struct ListAppProfilesResponse {
1433 pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
1435
1436 pub next_page_token: std::string::String,
1440
1441 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 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 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 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#[derive(Clone, Default, PartialEq)]
1506#[non_exhaustive]
1507pub struct UpdateAppProfileRequest {
1508 pub app_profile: std::option::Option<crate::model::AppProfile>,
1510
1511 pub update_mask: std::option::Option<wkt::FieldMask>,
1514
1515 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1577#[non_exhaustive]
1578pub struct DeleteAppProfileRequest {
1579 pub name: std::string::String,
1583
1584 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 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 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#[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#[derive(Clone, Default, PartialEq)]
1635#[non_exhaustive]
1636pub struct ListHotTabletsRequest {
1637 pub parent: std::string::String,
1641
1642 pub start_time: std::option::Option<wkt::Timestamp>,
1649
1650 pub end_time: std::option::Option<wkt::Timestamp>,
1652
1653 pub page_size: i32,
1663
1664 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1738#[non_exhaustive]
1739pub struct ListHotTabletsResponse {
1740 pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
1746
1747 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 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 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#[derive(Clone, Default, PartialEq)]
1800#[non_exhaustive]
1801pub struct CreateLogicalViewRequest {
1802 pub parent: std::string::String,
1805
1806 pub logical_view_id: std::string::String,
1809
1810 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1860#[non_exhaustive]
1861pub struct CreateLogicalViewMetadata {
1862 pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
1865
1866 pub start_time: std::option::Option<wkt::Timestamp>,
1868
1869 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
1943#[non_exhaustive]
1944pub struct GetLogicalViewRequest {
1945 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 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#[derive(Clone, Default, PartialEq)]
1972#[non_exhaustive]
1973pub struct ListLogicalViewsRequest {
1974 pub parent: std::string::String,
1978
1979 pub page_size: i32,
1982
1983 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 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 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 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#[derive(Clone, Default, PartialEq)]
2025#[non_exhaustive]
2026pub struct ListLogicalViewsResponse {
2027 pub logical_views: std::vec::Vec<crate::model::LogicalView>,
2029
2030 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 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 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#[derive(Clone, Default, PartialEq)]
2082#[non_exhaustive]
2083pub struct UpdateLogicalViewRequest {
2084 pub logical_view: std::option::Option<crate::model::LogicalView>,
2090
2091 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
2147#[non_exhaustive]
2148pub struct UpdateLogicalViewMetadata {
2149 pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
2152
2153 pub start_time: std::option::Option<wkt::Timestamp>,
2155
2156 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
2230#[non_exhaustive]
2231pub struct DeleteLogicalViewRequest {
2232 pub name: std::string::String,
2236
2237 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 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 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#[derive(Clone, Default, PartialEq)]
2272#[non_exhaustive]
2273pub struct CreateMaterializedViewRequest {
2274 pub parent: std::string::String,
2277
2278 pub materialized_view_id: std::string::String,
2281
2282 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
2335#[non_exhaustive]
2336pub struct CreateMaterializedViewMetadata {
2337 pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
2340
2341 pub start_time: std::option::Option<wkt::Timestamp>,
2343
2344 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
2418#[non_exhaustive]
2419pub struct GetMaterializedViewRequest {
2420 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 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#[derive(Clone, Default, PartialEq)]
2448#[non_exhaustive]
2449pub struct ListMaterializedViewsRequest {
2450 pub parent: std::string::String,
2454
2455 pub page_size: i32,
2458
2459 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 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 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 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#[derive(Clone, Default, PartialEq)]
2501#[non_exhaustive]
2502pub struct ListMaterializedViewsResponse {
2503 pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
2505
2506 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 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 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#[derive(Clone, Default, PartialEq)]
2558#[non_exhaustive]
2559pub struct UpdateMaterializedViewRequest {
2560 pub materialized_view: std::option::Option<crate::model::MaterializedView>,
2566
2567 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
2623#[non_exhaustive]
2624pub struct UpdateMaterializedViewMetadata {
2625 pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
2628
2629 pub start_time: std::option::Option<wkt::Timestamp>,
2631
2632 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
2706#[non_exhaustive]
2707pub struct DeleteMaterializedViewRequest {
2708 pub name: std::string::String,
2712
2713 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 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 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#[derive(Clone, Default, PartialEq)]
2751#[non_exhaustive]
2752pub struct RestoreTableRequest {
2753 pub parent: std::string::String,
2756
2757 pub table_id: std::string::String,
2762
2763 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 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 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 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 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 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
2830pub mod restore_table_request {
2832 #[allow(unused_imports)]
2833 use super::*;
2834
2835 #[derive(Clone, Debug, PartialEq)]
2837 #[non_exhaustive]
2838 pub enum Source {
2839 Backup(std::string::String),
2842 }
2843}
2844
2845#[derive(Clone, Default, PartialEq)]
2850#[non_exhaustive]
2851pub struct RestoreTableMetadata {
2852 pub name: std::string::String,
2854
2855 pub source_type: crate::model::RestoreSourceType,
2857
2858 pub optimize_table_operation_name: std::string::String,
2870
2871 pub progress: std::option::Option<crate::model::OperationProgress>,
2877
2878 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 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 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 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 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 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 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 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 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
2984pub mod restore_table_metadata {
2986 #[allow(unused_imports)]
2987 use super::*;
2988
2989 #[derive(Clone, Debug, PartialEq)]
2995 #[non_exhaustive]
2996 pub enum SourceInfo {
2997 BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
2998 }
2999}
3000
3001#[derive(Clone, Default, PartialEq)]
3006#[non_exhaustive]
3007pub struct OptimizeRestoredTableMetadata {
3008 pub name: std::string::String,
3010
3011 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 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 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 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#[derive(Clone, Default, PartialEq)]
3058#[non_exhaustive]
3059pub struct CreateTableRequest {
3060 pub parent: std::string::String,
3063
3064 pub table_id: std::string::String,
3068
3069 pub table: std::option::Option<crate::model::Table>,
3071
3072 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 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 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 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 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 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
3146pub mod create_table_request {
3148 #[allow(unused_imports)]
3149 use super::*;
3150
3151 #[derive(Clone, Default, PartialEq)]
3153 #[non_exhaustive]
3154 pub struct Split {
3155 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 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#[derive(Clone, Default, PartialEq)]
3190#[non_exhaustive]
3191pub struct CreateTableFromSnapshotRequest {
3192 pub parent: std::string::String,
3195
3196 pub table_id: std::string::String,
3199
3200 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 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 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 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#[derive(Clone, Default, PartialEq)]
3244#[non_exhaustive]
3245pub struct DropRowRangeRequest {
3246 pub name: std::string::String,
3250
3251 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 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 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 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 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 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 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
3339pub mod drop_row_range_request {
3341 #[allow(unused_imports)]
3342 use super::*;
3343
3344 #[derive(Clone, Debug, PartialEq)]
3346 #[non_exhaustive]
3347 pub enum Target {
3348 RowKeyPrefix(::bytes::Bytes),
3351 DeleteAllDataFromTable(bool),
3353 }
3354}
3355
3356#[derive(Clone, Default, PartialEq)]
3361#[non_exhaustive]
3362pub struct ListTablesRequest {
3363 pub parent: std::string::String,
3366
3367 pub view: crate::model::table::View,
3370
3371 pub page_size: i32,
3381
3382 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
3429#[non_exhaustive]
3430pub struct ListTablesResponse {
3431 pub tables: std::vec::Vec<crate::model::Table>,
3433
3434 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 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 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#[derive(Clone, Default, PartialEq)]
3490#[non_exhaustive]
3491pub struct GetTableRequest {
3492 pub name: std::string::String,
3496
3497 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 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 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#[derive(Clone, Default, PartialEq)]
3533#[non_exhaustive]
3534pub struct UpdateTableRequest {
3535 pub table: std::option::Option<crate::model::Table>,
3538
3539 pub update_mask: std::option::Option<wkt::FieldMask>,
3553
3554 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
3619#[non_exhaustive]
3620pub struct UpdateTableMetadata {
3621 pub name: std::string::String,
3623
3624 pub start_time: std::option::Option<wkt::Timestamp>,
3626
3627 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
3692#[non_exhaustive]
3693pub struct DeleteTableRequest {
3694 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 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#[derive(Clone, Default, PartialEq)]
3725#[non_exhaustive]
3726pub struct UndeleteTableRequest {
3727 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 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#[derive(Clone, Default, PartialEq)]
3758#[non_exhaustive]
3759pub struct UndeleteTableMetadata {
3760 pub name: std::string::String,
3762
3763 pub start_time: std::option::Option<wkt::Timestamp>,
3765
3766 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
3831#[non_exhaustive]
3832pub struct ModifyColumnFamiliesRequest {
3833 pub name: std::string::String,
3837
3838 pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
3843
3844 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 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 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 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
3885pub mod modify_column_families_request {
3887 #[allow(unused_imports)]
3888 use super::*;
3889
3890 #[derive(Clone, Default, PartialEq)]
3892 #[non_exhaustive]
3893 pub struct Modification {
3894 pub id: std::string::String,
3896
3897 pub update_mask: std::option::Option<wkt::FieldMask>,
3901
3902 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 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 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 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 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 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 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 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 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 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 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 pub mod modification {
4046 #[allow(unused_imports)]
4047 use super::*;
4048
4049 #[derive(Clone, Debug, PartialEq)]
4051 #[non_exhaustive]
4052 pub enum Mod {
4053 Create(std::boxed::Box<crate::model::ColumnFamily>),
4056 Update(std::boxed::Box<crate::model::ColumnFamily>),
4059 Drop(bool),
4062 }
4063 }
4064}
4065
4066#[derive(Clone, Default, PartialEq)]
4071#[non_exhaustive]
4072pub struct GenerateConsistencyTokenRequest {
4073 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 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#[derive(Clone, Default, PartialEq)]
4104#[non_exhaustive]
4105pub struct GenerateConsistencyTokenResponse {
4106 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 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#[derive(Clone, Default, PartialEq)]
4138#[non_exhaustive]
4139pub struct CheckConsistencyRequest {
4140 pub name: std::string::String,
4144
4145 pub consistency_token: std::string::String,
4147
4148 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 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 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 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 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 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 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 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
4260pub mod check_consistency_request {
4262 #[allow(unused_imports)]
4263 use super::*;
4264
4265 #[derive(Clone, Debug, PartialEq)]
4268 #[non_exhaustive]
4269 pub enum Mode {
4270 StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
4274 DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
4278 }
4279}
4280
4281#[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#[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#[derive(Clone, Default, PartialEq)]
4326#[non_exhaustive]
4327pub struct CheckConsistencyResponse {
4328 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 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#[derive(Clone, Default, PartialEq)]
4363#[non_exhaustive]
4364pub struct SnapshotTableRequest {
4365 pub name: std::string::String,
4369
4370 pub cluster: std::string::String,
4374
4375 pub snapshot_id: std::string::String,
4380
4381 pub ttl: std::option::Option<wkt::Duration>,
4386
4387 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
4457#[non_exhaustive]
4458pub struct GetSnapshotRequest {
4459 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 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#[derive(Clone, Default, PartialEq)]
4495#[non_exhaustive]
4496pub struct ListSnapshotsRequest {
4497 pub parent: std::string::String,
4503
4504 pub page_size: i32,
4507
4508 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 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 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 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#[derive(Clone, Default, PartialEq)]
4554#[non_exhaustive]
4555pub struct ListSnapshotsResponse {
4556 pub snapshots: std::vec::Vec<crate::model::Snapshot>,
4558
4559 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 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 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#[derive(Clone, Default, PartialEq)]
4620#[non_exhaustive]
4621pub struct DeleteSnapshotRequest {
4622 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 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#[derive(Clone, Default, PartialEq)]
4655#[non_exhaustive]
4656pub struct SnapshotTableMetadata {
4657 pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
4659
4660 pub request_time: std::option::Option<wkt::Timestamp>,
4662
4663 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
4742#[non_exhaustive]
4743pub struct CreateTableFromSnapshotMetadata {
4744 pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
4747
4748 pub request_time: std::option::Option<wkt::Timestamp>,
4750
4751 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
4828#[non_exhaustive]
4829pub struct CreateBackupRequest {
4830 pub parent: std::string::String,
4834
4835 pub backup_id: std::string::String,
4842
4843 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
4896#[non_exhaustive]
4897pub struct CreateBackupMetadata {
4898 pub name: std::string::String,
4900
4901 pub source_table: std::string::String,
4903
4904 pub start_time: std::option::Option<wkt::Timestamp>,
4906
4907 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
4978#[non_exhaustive]
4979pub struct UpdateBackupRequest {
4980 pub backup: std::option::Option<crate::model::Backup>,
4986
4987 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5050#[non_exhaustive]
5051pub struct GetBackupRequest {
5052 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 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#[derive(Clone, Default, PartialEq)]
5083#[non_exhaustive]
5084pub struct DeleteBackupRequest {
5085 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 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#[derive(Clone, Default, PartialEq)]
5116#[non_exhaustive]
5117pub struct ListBackupsRequest {
5118 pub parent: std::string::String,
5123
5124 pub filter: std::string::String,
5158
5159 pub order_by: std::string::String,
5184
5185 pub page_size: i32,
5188
5189 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5249#[non_exhaustive]
5250pub struct ListBackupsResponse {
5251 pub backups: std::vec::Vec<crate::model::Backup>,
5253
5254 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 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 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#[derive(Clone, Default, PartialEq)]
5312#[non_exhaustive]
5313pub struct CopyBackupRequest {
5314 pub parent: std::string::String,
5318
5319 pub backup_id: std::string::String,
5326
5327 pub source_backup: std::string::String,
5335
5336 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5399#[non_exhaustive]
5400pub struct CopyBackupMetadata {
5401 pub name: std::string::String,
5405
5406 pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
5408
5409 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5478#[non_exhaustive]
5479pub struct CreateAuthorizedViewRequest {
5480 pub parent: std::string::String,
5484
5485 pub authorized_view_id: std::string::String,
5490
5491 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5544#[non_exhaustive]
5545pub struct CreateAuthorizedViewMetadata {
5546 pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
5549
5550 pub request_time: std::option::Option<wkt::Timestamp>,
5552
5553 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5630#[non_exhaustive]
5631pub struct ListAuthorizedViewsRequest {
5632 pub parent: std::string::String,
5636
5637 pub page_size: i32,
5647
5648 pub page_token: std::string::String,
5650
5651 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5702#[non_exhaustive]
5703pub struct ListAuthorizedViewsResponse {
5704 pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
5706
5707 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 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 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#[derive(Clone, Default, PartialEq)]
5763#[non_exhaustive]
5764pub struct GetAuthorizedViewRequest {
5765 pub name: std::string::String,
5769
5770 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 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 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#[derive(Clone, Default, PartialEq)]
5809#[non_exhaustive]
5810pub struct UpdateAuthorizedViewRequest {
5811 pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
5816
5817 pub update_mask: std::option::Option<wkt::FieldMask>,
5825
5826 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5892#[non_exhaustive]
5893pub struct UpdateAuthorizedViewMetadata {
5894 pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
5897
5898 pub request_time: std::option::Option<wkt::Timestamp>,
5900
5901 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
5978#[non_exhaustive]
5979pub struct DeleteAuthorizedViewRequest {
5980 pub name: std::string::String,
5984
5985 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 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 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#[derive(Clone, Default, PartialEq)]
6023#[non_exhaustive]
6024pub struct CreateSchemaBundleRequest {
6025 pub parent: std::string::String,
6029
6030 pub schema_bundle_id: std::string::String,
6033
6034 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
6090#[non_exhaustive]
6091pub struct CreateSchemaBundleMetadata {
6092 pub name: std::string::String,
6096
6097 pub start_time: std::option::Option<wkt::Timestamp>,
6099
6100 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
6165#[non_exhaustive]
6166pub struct UpdateSchemaBundleRequest {
6167 pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
6173
6174 pub update_mask: std::option::Option<wkt::FieldMask>,
6176
6177 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
6246#[non_exhaustive]
6247pub struct UpdateSchemaBundleMetadata {
6248 pub name: std::string::String,
6252
6253 pub start_time: std::option::Option<wkt::Timestamp>,
6255
6256 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
6321#[non_exhaustive]
6322pub struct GetSchemaBundleRequest {
6323 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 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#[derive(Clone, Default, PartialEq)]
6354#[non_exhaustive]
6355pub struct ListSchemaBundlesRequest {
6356 pub parent: std::string::String,
6360
6361 pub page_size: i32,
6365
6366 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 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 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 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#[derive(Clone, Default, PartialEq)]
6411#[non_exhaustive]
6412pub struct ListSchemaBundlesResponse {
6413 pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
6415
6416 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 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 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#[derive(Clone, Default, PartialEq)]
6471#[non_exhaustive]
6472pub struct DeleteSchemaBundleRequest {
6473 pub name: std::string::String,
6477
6478 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 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 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#[derive(Clone, Default, PartialEq)]
6513#[non_exhaustive]
6514pub struct OperationProgress {
6515 pub progress_percent: i32,
6518
6519 pub start_time: std::option::Option<wkt::Timestamp>,
6521
6522 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
6591#[non_exhaustive]
6592pub struct Instance {
6593 pub name: std::string::String,
6596
6597 pub display_name: std::string::String,
6601
6602 pub state: crate::model::instance::State,
6604
6605 pub r#type: crate::model::instance::Type,
6607
6608 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6620
6621 pub create_time: std::option::Option<wkt::Timestamp>,
6625
6626 pub satisfies_pzs: std::option::Option<bool>,
6628
6629 pub satisfies_pzi: std::option::Option<bool>,
6631
6632 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 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 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 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 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 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 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 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 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 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 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 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 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
6761pub mod instance {
6763 #[allow(unused_imports)]
6764 use super::*;
6765
6766 #[derive(Clone, Debug, PartialEq)]
6782 #[non_exhaustive]
6783 pub enum State {
6784 NotKnown,
6786 Ready,
6789 Creating,
6792 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 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 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 #[derive(Clone, Debug, PartialEq)]
6916 #[non_exhaustive]
6917 pub enum Type {
6918 Unspecified,
6922 Production,
6925 Development,
6928 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 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 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#[derive(Clone, Default, PartialEq)]
7039#[non_exhaustive]
7040pub struct AutoscalingTargets {
7041 pub cpu_utilization_percent: i32,
7046
7047 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 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 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#[derive(Clone, Default, PartialEq)]
7087#[non_exhaustive]
7088pub struct AutoscalingLimits {
7089 pub min_serve_nodes: i32,
7091
7092 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 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 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#[derive(Clone, Default, PartialEq)]
7129#[non_exhaustive]
7130pub struct Cluster {
7131 pub name: std::string::String,
7134
7135 pub location: std::string::String,
7140
7141 pub state: crate::model::cluster::State,
7143
7144 pub serve_nodes: i32,
7148
7149 pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
7151
7152 pub default_storage_type: crate::model::StorageType,
7155
7156 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 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 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 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 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 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 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 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 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 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 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 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
7279pub mod cluster {
7281 #[allow(unused_imports)]
7282 use super::*;
7283
7284 #[derive(Clone, Default, PartialEq)]
7286 #[non_exhaustive]
7287 pub struct ClusterAutoscalingConfig {
7288 pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
7290
7291 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 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 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 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 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 #[derive(Clone, Default, PartialEq)]
7347 #[non_exhaustive]
7348 pub struct ClusterConfig {
7349 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 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 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 #[derive(Clone, Default, PartialEq)]
7392 #[non_exhaustive]
7393 pub struct EncryptionConfig {
7394 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 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 #[derive(Clone, Debug, PartialEq)]
7446 #[non_exhaustive]
7447 pub enum State {
7448 NotKnown,
7450 Ready,
7452 Creating,
7456 Resizing,
7462 Disabled,
7465 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 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 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 #[derive(Clone, Debug, PartialEq)]
7600 #[non_exhaustive]
7601 pub enum NodeScalingFactor {
7602 Unspecified,
7604 NodeScalingFactor1X,
7606 NodeScalingFactor2X,
7610 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 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 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 ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
7723 }
7724}
7725
7726#[derive(Clone, Default, PartialEq)]
7729#[non_exhaustive]
7730pub struct AppProfile {
7731 pub name: std::string::String,
7734
7735 pub etag: std::string::String,
7744
7745 pub description: std::string::String,
7747
7748 pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
7751
7752 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 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 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 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 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 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 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 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 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 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 #[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 #[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 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 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 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 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
7974pub mod app_profile {
7976 #[allow(unused_imports)]
7977 use super::*;
7978
7979 #[derive(Clone, Default, PartialEq)]
7985 #[non_exhaustive]
7986 pub struct MultiClusterRoutingUseAny {
7987 pub cluster_ids: std::vec::Vec<std::string::String>,
7990
7991 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 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 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 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 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 pub mod multi_cluster_routing_use_any {
8088 #[allow(unused_imports)]
8089 use super::*;
8090
8091 #[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 #[derive(Clone, Debug, PartialEq)]
8127 #[non_exhaustive]
8128 pub enum Affinity {
8129 RowAffinity(
8132 std::boxed::Box<
8133 crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
8134 >,
8135 ),
8136 }
8137 }
8138
8139 #[derive(Clone, Default, PartialEq)]
8143 #[non_exhaustive]
8144 pub struct SingleClusterRouting {
8145 pub cluster_id: std::string::String,
8147
8148 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 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 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 #[derive(Clone, Default, PartialEq)]
8183 #[non_exhaustive]
8184 pub struct StandardIsolation {
8185 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 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 #[derive(Clone, Default, PartialEq)]
8218 #[non_exhaustive]
8219 pub struct DataBoostIsolationReadOnly {
8220 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 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 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 pub mod data_boost_isolation_read_only {
8264 #[allow(unused_imports)]
8265 use super::*;
8266
8267 #[derive(Clone, Debug, PartialEq)]
8285 #[non_exhaustive]
8286 pub enum ComputeBillingOwner {
8287 Unspecified,
8289 HostPays,
8292 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 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 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 #[derive(Clone, Debug, PartialEq)]
8418 #[non_exhaustive]
8419 pub enum Priority {
8420 Unspecified,
8422 Low,
8423 Medium,
8424 High,
8425 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 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 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 #[derive(Clone, Debug, PartialEq)]
8541 #[non_exhaustive]
8542 pub enum RoutingPolicy {
8543 MultiClusterRoutingUseAny(
8545 std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
8546 ),
8547 SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
8549 }
8550
8551 #[derive(Clone, Debug, PartialEq)]
8553 #[non_exhaustive]
8554 pub enum Isolation {
8555 #[deprecated]
8560 Priority(crate::model::app_profile::Priority),
8561 StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
8564 DataBoostIsolationReadOnly(
8567 std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
8568 ),
8569 }
8570}
8571
8572#[derive(Clone, Default, PartialEq)]
8578#[non_exhaustive]
8579pub struct HotTablet {
8580 pub name: std::string::String,
8583
8584 pub table_name: std::string::String,
8587
8588 pub start_time: std::option::Option<wkt::Timestamp>,
8590
8591 pub end_time: std::option::Option<wkt::Timestamp>,
8593
8594 pub start_key: std::string::String,
8596
8597 pub end_key: std::string::String,
8599
8600 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 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 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
8689#[non_exhaustive]
8690pub struct LogicalView {
8691 pub name: std::string::String,
8695
8696 pub query: std::string::String,
8698
8699 pub etag: std::string::String,
8704
8705 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
8749#[non_exhaustive]
8750pub struct MaterializedView {
8751 pub name: std::string::String,
8755
8756 pub query: std::string::String,
8758
8759 pub etag: std::string::String,
8764
8765 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
8809#[non_exhaustive]
8810pub struct RestoreInfo {
8811 pub source_type: crate::model::RestoreSourceType,
8813
8814 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 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 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 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 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
8880pub mod restore_info {
8882 #[allow(unused_imports)]
8883 use super::*;
8884
8885 #[derive(Clone, Debug, PartialEq)]
8887 #[non_exhaustive]
8888 pub enum SourceInfo {
8889 BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
8892 }
8893}
8894
8895#[derive(Clone, Default, PartialEq)]
8897#[non_exhaustive]
8898pub struct ChangeStreamConfig {
8899 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 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 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#[derive(Clone, Default, PartialEq)]
8942#[non_exhaustive]
8943pub struct Table {
8944 pub name: std::string::String,
8948
8949 pub cluster_states:
8955 std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
8956
8957 pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
8960
8961 pub granularity: crate::model::table::TimestampGranularity,
8966
8967 pub restore_info: std::option::Option<crate::model::RestoreInfo>,
8970
8971 pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
8975
8976 pub deletion_protection: bool,
8985
8986 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
9207pub mod table {
9209 #[allow(unused_imports)]
9210 use super::*;
9211
9212 #[derive(Clone, Default, PartialEq)]
9214 #[non_exhaustive]
9215 pub struct ClusterState {
9216 pub replication_state: crate::model::table::cluster_state::ReplicationState,
9218
9219 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 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 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 pub mod cluster_state {
9265 #[allow(unused_imports)]
9266 use super::*;
9267
9268 #[derive(Clone, Debug, PartialEq)]
9284 #[non_exhaustive]
9285 pub enum ReplicationState {
9286 StateNotKnown,
9288 Initializing,
9292 PlannedMaintenance,
9295 UnplannedMaintenance,
9298 Ready,
9302 ReadyOptimizing,
9306 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 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 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 #[derive(Clone, Default, PartialEq)]
9437 #[non_exhaustive]
9438 pub struct AutomatedBackupPolicy {
9439 pub retention_period: std::option::Option<wkt::Duration>,
9442
9443 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 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 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 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 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 #[derive(Clone, Debug, PartialEq)]
9515 #[non_exhaustive]
9516 pub enum TimestampGranularity {
9517 Unspecified,
9520 Millis,
9522 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 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 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 #[derive(Clone, Debug, PartialEq)]
9641 #[non_exhaustive]
9642 pub enum View {
9643 Unspecified,
9645 NameOnly,
9647 SchemaView,
9649 ReplicationView,
9652 EncryptionView,
9654 Full,
9656 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 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 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 AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
9785 }
9786}
9787
9788#[derive(Clone, Default, PartialEq)]
9792#[non_exhaustive]
9793pub struct AuthorizedView {
9794 pub name: std::string::String,
9798
9799 pub etag: std::string::String,
9803
9804 pub deletion_protection: bool,
9808
9809 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 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 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 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 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 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 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
9891pub mod authorized_view {
9893 #[allow(unused_imports)]
9894 use super::*;
9895
9896 #[derive(Clone, Default, PartialEq)]
9898 #[non_exhaustive]
9899 pub struct FamilySubsets {
9900 pub qualifiers: std::vec::Vec<::bytes::Bytes>,
9902
9903 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 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 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 #[derive(Clone, Default, PartialEq)]
9949 #[non_exhaustive]
9950 pub struct SubsetView {
9951 pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
9954
9955 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 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 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 #[derive(Clone, Debug, PartialEq)]
10016 #[non_exhaustive]
10017 pub enum ResponseView {
10018 Unspecified,
10020 NameOnly,
10022 Basic,
10025 Full,
10027 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 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 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 #[derive(Clone, Debug, PartialEq)]
10142 #[non_exhaustive]
10143 pub enum AuthorizedView {
10144 SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
10146 }
10147}
10148
10149#[derive(Clone, Default, PartialEq)]
10151#[non_exhaustive]
10152pub struct ColumnFamily {
10153 pub gc_rule: std::option::Option<crate::model::GcRule>,
10160
10161 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
10226#[non_exhaustive]
10227pub struct GcRule {
10228 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 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 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 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 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 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 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 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 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 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
10356pub mod gc_rule {
10358 #[allow(unused_imports)]
10359 use super::*;
10360
10361 #[derive(Clone, Default, PartialEq)]
10363 #[non_exhaustive]
10364 pub struct Intersection {
10365 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 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 #[derive(Clone, Default, PartialEq)]
10396 #[non_exhaustive]
10397 pub struct Union {
10398 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 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 #[derive(Clone, Debug, PartialEq)]
10429 #[non_exhaustive]
10430 pub enum Rule {
10431 MaxNumVersions(i32),
10433 MaxAge(std::boxed::Box<wkt::Duration>),
10437 Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
10439 Union(std::boxed::Box<crate::model::gc_rule::Union>),
10441 }
10442}
10443
10444#[derive(Clone, Default, PartialEq)]
10449#[non_exhaustive]
10450pub struct EncryptionInfo {
10451 pub encryption_type: crate::model::encryption_info::EncryptionType,
10453
10454 pub encryption_status: std::option::Option<rpc::model::Status>,
10458
10459 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 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 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 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 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
10513pub mod encryption_info {
10515 #[allow(unused_imports)]
10516 use super::*;
10517
10518 #[derive(Clone, Debug, PartialEq)]
10534 #[non_exhaustive]
10535 pub enum EncryptionType {
10536 Unspecified,
10538 GoogleDefaultEncryption,
10542 CustomerManagedEncryption,
10550 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 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 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#[derive(Clone, Default, PartialEq)]
10671#[non_exhaustive]
10672pub struct Snapshot {
10673 pub name: std::string::String,
10677
10678 pub source_table: std::option::Option<crate::model::Table>,
10680
10681 pub data_size_bytes: i64,
10686
10687 pub create_time: std::option::Option<wkt::Timestamp>,
10689
10690 pub delete_time: std::option::Option<wkt::Timestamp>,
10694
10695 pub state: crate::model::snapshot::State,
10697
10698 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 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 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 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 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 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 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 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 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 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 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
10794pub mod snapshot {
10796 #[allow(unused_imports)]
10797 use super::*;
10798
10799 #[derive(Clone, Debug, PartialEq)]
10815 #[non_exhaustive]
10816 pub enum State {
10817 NotKnown,
10819 Ready,
10821 Creating,
10825 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 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 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#[derive(Clone, Default, PartialEq)]
10936#[non_exhaustive]
10937pub struct Backup {
10938 pub name: std::string::String,
10949
10950 pub source_table: std::string::String,
10954
10955 pub source_backup: std::string::String,
10960
10961 pub expire_time: std::option::Option<wkt::Timestamp>,
10970
10971 pub start_time: std::option::Option<wkt::Timestamp>,
10979
10980 pub end_time: std::option::Option<wkt::Timestamp>,
10983
10984 pub size_bytes: i64,
10986
10987 pub state: crate::model::backup::State,
10989
10990 pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
10992
10993 pub backup_type: crate::model::backup::BackupType,
10995
10996 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
11151pub mod backup {
11153 #[allow(unused_imports)]
11154 use super::*;
11155
11156 #[derive(Clone, Debug, PartialEq)]
11172 #[non_exhaustive]
11173 pub enum State {
11174 Unspecified,
11176 Creating,
11179 Ready,
11181 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 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 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 #[derive(Clone, Debug, PartialEq)]
11305 #[non_exhaustive]
11306 pub enum BackupType {
11307 Unspecified,
11309 Standard,
11313 Hot,
11318 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 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 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#[derive(Clone, Default, PartialEq)]
11429#[non_exhaustive]
11430pub struct BackupInfo {
11431 pub backup: std::string::String,
11433
11434 pub start_time: std::option::Option<wkt::Timestamp>,
11437
11438 pub end_time: std::option::Option<wkt::Timestamp>,
11441
11442 pub source_table: std::string::String,
11444
11445 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 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 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 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 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 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 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 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#[derive(Clone, Default, PartialEq)]
11522#[non_exhaustive]
11523pub struct ProtoSchema {
11524 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 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#[derive(Clone, Default, PartialEq)]
11566#[non_exhaustive]
11567pub struct SchemaBundle {
11568 pub name: std::string::String,
11572
11573 pub etag: std::string::String,
11578
11579 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 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 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 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 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 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
11649pub mod schema_bundle {
11651 #[allow(unused_imports)]
11652 use super::*;
11653
11654 #[derive(Clone, Debug, PartialEq)]
11657 #[non_exhaustive]
11658 pub enum Type {
11659 ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
11661 }
11662}
11663
11664#[derive(Clone, Default, PartialEq)]
11687#[non_exhaustive]
11688pub struct Type {
11689 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
12075pub mod r#type {
12077 #[allow(unused_imports)]
12078 use super::*;
12079
12080 #[derive(Clone, Default, PartialEq)]
12083 #[non_exhaustive]
12084 pub struct Bytes {
12085 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 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 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 pub mod bytes {
12123 #[allow(unused_imports)]
12124 use super::*;
12125
12126 #[derive(Clone, Default, PartialEq)]
12128 #[non_exhaustive]
12129 pub struct Encoding {
12130 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 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 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 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 pub mod encoding {
12199 #[allow(unused_imports)]
12200 use super::*;
12201
12202 #[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 #[derive(Clone, Debug, PartialEq)]
12227 #[non_exhaustive]
12228 pub enum Encoding {
12229 Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
12231 }
12232 }
12233 }
12234
12235 #[derive(Clone, Default, PartialEq)]
12238 #[non_exhaustive]
12239 pub struct String {
12240 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 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 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 pub mod string {
12278 #[allow(unused_imports)]
12279 use super::*;
12280
12281 #[derive(Clone, Default, PartialEq)]
12283 #[non_exhaustive]
12284 pub struct Encoding {
12285 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 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 #[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 #[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 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 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 pub mod encoding {
12395 #[allow(unused_imports)]
12396 use super::*;
12397
12398 #[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 #[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 #[derive(Clone, Debug, PartialEq)]
12452 #[non_exhaustive]
12453 pub enum Encoding {
12454 #[deprecated]
12456 Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
12457 Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
12459 }
12460 }
12461 }
12462
12463 #[derive(Clone, Default, PartialEq)]
12466 #[non_exhaustive]
12467 pub struct Int64 {
12468 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 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 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 pub mod int_64 {
12506 #[allow(unused_imports)]
12507 use super::*;
12508
12509 #[derive(Clone, Default, PartialEq)]
12511 #[non_exhaustive]
12512 pub struct Encoding {
12513 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 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 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 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 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 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 pub mod encoding {
12621 #[allow(unused_imports)]
12622 use super::*;
12623
12624 #[derive(Clone, Default, PartialEq)]
12636 #[non_exhaustive]
12637 pub struct BigEndianBytes {
12638 #[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 #[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 #[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 #[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 #[derive(Clone, Debug, PartialEq)]
12703 #[non_exhaustive]
12704 pub enum Encoding {
12705 BigEndianBytes(
12707 std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
12708 ),
12709 OrderedCodeBytes(
12711 std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
12712 ),
12713 }
12714 }
12715 }
12716
12717 #[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 #[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 #[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 #[derive(Clone, Default, PartialEq)]
12780 #[non_exhaustive]
12781 pub struct Timestamp {
12782 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 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 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 pub mod timestamp {
12820 #[allow(unused_imports)]
12821 use super::*;
12822
12823 #[derive(Clone, Default, PartialEq)]
12825 #[non_exhaustive]
12826 pub struct Encoding {
12827 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 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 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 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 pub mod encoding {
12896 #[allow(unused_imports)]
12897 use super::*;
12898
12899 #[derive(Clone, Debug, PartialEq)]
12901 #[non_exhaustive]
12902 pub enum Encoding {
12903 UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
12910 }
12911 }
12912 }
12913
12914 #[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 #[derive(Clone, Default, PartialEq)]
12939 #[non_exhaustive]
12940 pub struct Struct {
12941 pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
12943
12944 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 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 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 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 pub mod r#struct {
12993 #[allow(unused_imports)]
12994 use super::*;
12995
12996 #[derive(Clone, Default, PartialEq)]
12998 #[non_exhaustive]
12999 pub struct Field {
13000 pub field_name: std::string::String,
13003
13004 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 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 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 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 #[derive(Clone, Default, PartialEq)]
13051 #[non_exhaustive]
13052 pub struct Encoding {
13053 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 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 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 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 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 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 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 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 pub mod encoding {
13197 #[allow(unused_imports)]
13198 use super::*;
13199
13200 #[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 #[derive(Clone, Default, PartialEq)]
13237 #[non_exhaustive]
13238 pub struct DelimitedBytes {
13239 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 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 #[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 #[derive(Clone, Debug, PartialEq)]
13327 #[non_exhaustive]
13328 pub enum Encoding {
13329 Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
13331 DelimitedBytes(
13333 std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
13334 ),
13335 OrderedCodeBytes(
13337 std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
13338 ),
13339 }
13340 }
13341 }
13342
13343 #[derive(Clone, Default, PartialEq)]
13346 #[non_exhaustive]
13347 pub struct Proto {
13348 pub schema_bundle_id: std::string::String,
13350
13351 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 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 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 #[derive(Clone, Default, PartialEq)]
13391 #[non_exhaustive]
13392 pub struct Enum {
13393 pub schema_bundle_id: std::string::String,
13395
13396 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 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 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 #[derive(Clone, Default, PartialEq)]
13433 #[non_exhaustive]
13434 pub struct Array {
13435 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 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 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 #[derive(Clone, Default, PartialEq)]
13479 #[non_exhaustive]
13480 pub struct Map {
13481 pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13484
13485 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 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 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 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 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 #[derive(Clone, Default, PartialEq)]
13545 #[non_exhaustive]
13546 pub struct Aggregate {
13547 pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13551
13552 pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
13556
13557 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 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 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 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 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 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 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 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 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 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 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 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 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 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 pub mod aggregate {
13755 #[allow(unused_imports)]
13756 use super::*;
13757
13758 #[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 #[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 #[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 #[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 #[derive(Clone, Debug, PartialEq)]
13848 #[non_exhaustive]
13849 pub enum Aggregator {
13850 Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
13852 HllppUniqueCount(
13854 std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
13855 ),
13856 Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
13858 Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
13860 }
13861 }
13862
13863 #[derive(Clone, Debug, PartialEq)]
13865 #[non_exhaustive]
13866 pub enum Kind {
13867 BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
13869 StringType(std::boxed::Box<crate::model::r#type::String>),
13871 Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
13873 Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
13875 Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
13877 BoolType(std::boxed::Box<crate::model::r#type::Bool>),
13879 TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
13881 DateType(std::boxed::Box<crate::model::r#type::Date>),
13883 AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
13885 StructType(std::boxed::Box<crate::model::r#type::Struct>),
13887 ArrayType(std::boxed::Box<crate::model::r#type::Array>),
13889 MapType(std::boxed::Box<crate::model::r#type::Map>),
13891 ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
13893 EnumType(std::boxed::Box<crate::model::r#type::Enum>),
13895 }
13896}
13897
13898#[derive(Clone, Debug, PartialEq)]
13914#[non_exhaustive]
13915pub enum StorageType {
13916 Unspecified,
13918 Ssd,
13920 Hdd,
13922 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 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 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#[derive(Clone, Debug, PartialEq)]
14046#[non_exhaustive]
14047pub enum RestoreSourceType {
14048 Unspecified,
14050 Backup,
14052 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 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 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}