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 location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
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)]
44#[non_exhaustive]
45pub struct Environment {
46 pub name: std::string::String,
49
50 pub display_name: std::string::String,
52
53 pub uid: std::string::String,
57
58 pub create_time: std::option::Option<wkt::Timestamp>,
60
61 pub update_time: std::option::Option<wkt::Timestamp>,
63
64 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
66
67 pub description: std::string::String,
69
70 pub state: crate::model::State,
72
73 pub infrastructure_spec: std::option::Option<crate::model::environment::InfrastructureSpec>,
75
76 pub session_spec: std::option::Option<crate::model::environment::SessionSpec>,
78
79 pub session_status: std::option::Option<crate::model::environment::SessionStatus>,
81
82 pub endpoints: std::option::Option<crate::model::environment::Endpoints>,
85
86 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
87}
88
89impl Environment {
90 pub fn new() -> Self {
91 std::default::Default::default()
92 }
93
94 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
96 self.name = v.into();
97 self
98 }
99
100 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
102 self.display_name = v.into();
103 self
104 }
105
106 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
108 self.uid = v.into();
109 self
110 }
111
112 pub fn set_create_time<T>(mut self, v: T) -> Self
114 where
115 T: std::convert::Into<wkt::Timestamp>,
116 {
117 self.create_time = std::option::Option::Some(v.into());
118 self
119 }
120
121 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
123 where
124 T: std::convert::Into<wkt::Timestamp>,
125 {
126 self.create_time = v.map(|x| x.into());
127 self
128 }
129
130 pub fn set_update_time<T>(mut self, v: T) -> Self
132 where
133 T: std::convert::Into<wkt::Timestamp>,
134 {
135 self.update_time = std::option::Option::Some(v.into());
136 self
137 }
138
139 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
141 where
142 T: std::convert::Into<wkt::Timestamp>,
143 {
144 self.update_time = v.map(|x| x.into());
145 self
146 }
147
148 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
150 where
151 T: std::iter::IntoIterator<Item = (K, V)>,
152 K: std::convert::Into<std::string::String>,
153 V: std::convert::Into<std::string::String>,
154 {
155 use std::iter::Iterator;
156 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
157 self
158 }
159
160 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
162 self.description = v.into();
163 self
164 }
165
166 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
168 self.state = v.into();
169 self
170 }
171
172 pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
174 where
175 T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
176 {
177 self.infrastructure_spec = std::option::Option::Some(v.into());
178 self
179 }
180
181 pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
183 where
184 T: std::convert::Into<crate::model::environment::InfrastructureSpec>,
185 {
186 self.infrastructure_spec = v.map(|x| x.into());
187 self
188 }
189
190 pub fn set_session_spec<T>(mut self, v: T) -> Self
192 where
193 T: std::convert::Into<crate::model::environment::SessionSpec>,
194 {
195 self.session_spec = std::option::Option::Some(v.into());
196 self
197 }
198
199 pub fn set_or_clear_session_spec<T>(mut self, v: std::option::Option<T>) -> Self
201 where
202 T: std::convert::Into<crate::model::environment::SessionSpec>,
203 {
204 self.session_spec = v.map(|x| x.into());
205 self
206 }
207
208 pub fn set_session_status<T>(mut self, v: T) -> Self
210 where
211 T: std::convert::Into<crate::model::environment::SessionStatus>,
212 {
213 self.session_status = std::option::Option::Some(v.into());
214 self
215 }
216
217 pub fn set_or_clear_session_status<T>(mut self, v: std::option::Option<T>) -> Self
219 where
220 T: std::convert::Into<crate::model::environment::SessionStatus>,
221 {
222 self.session_status = v.map(|x| x.into());
223 self
224 }
225
226 pub fn set_endpoints<T>(mut self, v: T) -> Self
228 where
229 T: std::convert::Into<crate::model::environment::Endpoints>,
230 {
231 self.endpoints = std::option::Option::Some(v.into());
232 self
233 }
234
235 pub fn set_or_clear_endpoints<T>(mut self, v: std::option::Option<T>) -> Self
237 where
238 T: std::convert::Into<crate::model::environment::Endpoints>,
239 {
240 self.endpoints = v.map(|x| x.into());
241 self
242 }
243}
244
245impl wkt::message::Message for Environment {
246 fn typename() -> &'static str {
247 "type.googleapis.com/google.cloud.dataplex.v1.Environment"
248 }
249}
250
251pub mod environment {
253 #[allow(unused_imports)]
254 use super::*;
255
256 #[derive(Clone, Default, PartialEq)]
258 #[non_exhaustive]
259 pub struct InfrastructureSpec {
260 pub resources:
262 std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
263
264 pub runtime: std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
266
267 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
268 }
269
270 impl InfrastructureSpec {
271 pub fn new() -> Self {
272 std::default::Default::default()
273 }
274
275 pub fn set_resources<
280 T: std::convert::Into<
281 std::option::Option<crate::model::environment::infrastructure_spec::Resources>,
282 >,
283 >(
284 mut self,
285 v: T,
286 ) -> Self {
287 self.resources = v.into();
288 self
289 }
290
291 pub fn compute(
295 &self,
296 ) -> std::option::Option<
297 &std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
298 > {
299 #[allow(unreachable_patterns)]
300 self.resources.as_ref().and_then(|v| match v {
301 crate::model::environment::infrastructure_spec::Resources::Compute(v) => {
302 std::option::Option::Some(v)
303 }
304 _ => std::option::Option::None,
305 })
306 }
307
308 pub fn set_compute<
314 T: std::convert::Into<
315 std::boxed::Box<
316 crate::model::environment::infrastructure_spec::ComputeResources,
317 >,
318 >,
319 >(
320 mut self,
321 v: T,
322 ) -> Self {
323 self.resources = std::option::Option::Some(
324 crate::model::environment::infrastructure_spec::Resources::Compute(v.into()),
325 );
326 self
327 }
328
329 pub fn set_runtime<
334 T: std::convert::Into<
335 std::option::Option<crate::model::environment::infrastructure_spec::Runtime>,
336 >,
337 >(
338 mut self,
339 v: T,
340 ) -> Self {
341 self.runtime = v.into();
342 self
343 }
344
345 pub fn os_image(
349 &self,
350 ) -> std::option::Option<
351 &std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
352 > {
353 #[allow(unreachable_patterns)]
354 self.runtime.as_ref().and_then(|v| match v {
355 crate::model::environment::infrastructure_spec::Runtime::OsImage(v) => {
356 std::option::Option::Some(v)
357 }
358 _ => std::option::Option::None,
359 })
360 }
361
362 pub fn set_os_image<
368 T: std::convert::Into<
369 std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
370 >,
371 >(
372 mut self,
373 v: T,
374 ) -> Self {
375 self.runtime = std::option::Option::Some(
376 crate::model::environment::infrastructure_spec::Runtime::OsImage(v.into()),
377 );
378 self
379 }
380 }
381
382 impl wkt::message::Message for InfrastructureSpec {
383 fn typename() -> &'static str {
384 "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec"
385 }
386 }
387
388 pub mod infrastructure_spec {
390 #[allow(unused_imports)]
391 use super::*;
392
393 #[derive(Clone, Default, PartialEq)]
395 #[non_exhaustive]
396 pub struct ComputeResources {
397 pub disk_size_gb: i32,
399
400 pub node_count: i32,
403
404 pub max_node_count: i32,
407
408 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
409 }
410
411 impl ComputeResources {
412 pub fn new() -> Self {
413 std::default::Default::default()
414 }
415
416 pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
418 self.disk_size_gb = v.into();
419 self
420 }
421
422 pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
424 self.node_count = v.into();
425 self
426 }
427
428 pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
430 self.max_node_count = v.into();
431 self
432 }
433 }
434
435 impl wkt::message::Message for ComputeResources {
436 fn typename() -> &'static str {
437 "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources"
438 }
439 }
440
441 #[derive(Clone, Default, PartialEq)]
443 #[non_exhaustive]
444 pub struct OsImageRuntime {
445 pub image_version: std::string::String,
447
448 pub java_libraries: std::vec::Vec<std::string::String>,
452
453 pub python_packages: std::vec::Vec<std::string::String>,
457
458 pub properties: std::collections::HashMap<std::string::String, std::string::String>,
463
464 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
465 }
466
467 impl OsImageRuntime {
468 pub fn new() -> Self {
469 std::default::Default::default()
470 }
471
472 pub fn set_image_version<T: std::convert::Into<std::string::String>>(
474 mut self,
475 v: T,
476 ) -> Self {
477 self.image_version = v.into();
478 self
479 }
480
481 pub fn set_java_libraries<T, V>(mut self, v: T) -> Self
483 where
484 T: std::iter::IntoIterator<Item = V>,
485 V: std::convert::Into<std::string::String>,
486 {
487 use std::iter::Iterator;
488 self.java_libraries = v.into_iter().map(|i| i.into()).collect();
489 self
490 }
491
492 pub fn set_python_packages<T, V>(mut self, v: T) -> Self
494 where
495 T: std::iter::IntoIterator<Item = V>,
496 V: std::convert::Into<std::string::String>,
497 {
498 use std::iter::Iterator;
499 self.python_packages = v.into_iter().map(|i| i.into()).collect();
500 self
501 }
502
503 pub fn set_properties<T, K, V>(mut self, v: T) -> Self
505 where
506 T: std::iter::IntoIterator<Item = (K, V)>,
507 K: std::convert::Into<std::string::String>,
508 V: std::convert::Into<std::string::String>,
509 {
510 use std::iter::Iterator;
511 self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
512 self
513 }
514 }
515
516 impl wkt::message::Message for OsImageRuntime {
517 fn typename() -> &'static str {
518 "type.googleapis.com/google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime"
519 }
520 }
521
522 #[derive(Clone, Debug, PartialEq)]
524 #[non_exhaustive]
525 pub enum Resources {
526 Compute(
528 std::boxed::Box<crate::model::environment::infrastructure_spec::ComputeResources>,
529 ),
530 }
531
532 #[derive(Clone, Debug, PartialEq)]
534 #[non_exhaustive]
535 pub enum Runtime {
536 OsImage(
539 std::boxed::Box<crate::model::environment::infrastructure_spec::OsImageRuntime>,
540 ),
541 }
542 }
543
544 #[derive(Clone, Default, PartialEq)]
546 #[non_exhaustive]
547 pub struct SessionSpec {
548 pub max_idle_duration: std::option::Option<wkt::Duration>,
551
552 pub enable_fast_startup: bool,
558
559 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
560 }
561
562 impl SessionSpec {
563 pub fn new() -> Self {
564 std::default::Default::default()
565 }
566
567 pub fn set_max_idle_duration<T>(mut self, v: T) -> Self
569 where
570 T: std::convert::Into<wkt::Duration>,
571 {
572 self.max_idle_duration = std::option::Option::Some(v.into());
573 self
574 }
575
576 pub fn set_or_clear_max_idle_duration<T>(mut self, v: std::option::Option<T>) -> Self
578 where
579 T: std::convert::Into<wkt::Duration>,
580 {
581 self.max_idle_duration = v.map(|x| x.into());
582 self
583 }
584
585 pub fn set_enable_fast_startup<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
587 self.enable_fast_startup = v.into();
588 self
589 }
590 }
591
592 impl wkt::message::Message for SessionSpec {
593 fn typename() -> &'static str {
594 "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionSpec"
595 }
596 }
597
598 #[derive(Clone, Default, PartialEq)]
600 #[non_exhaustive]
601 pub struct SessionStatus {
602 pub active: bool,
605
606 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
607 }
608
609 impl SessionStatus {
610 pub fn new() -> Self {
611 std::default::Default::default()
612 }
613
614 pub fn set_active<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
616 self.active = v.into();
617 self
618 }
619 }
620
621 impl wkt::message::Message for SessionStatus {
622 fn typename() -> &'static str {
623 "type.googleapis.com/google.cloud.dataplex.v1.Environment.SessionStatus"
624 }
625 }
626
627 #[derive(Clone, Default, PartialEq)]
629 #[non_exhaustive]
630 pub struct Endpoints {
631 pub notebooks: std::string::String,
633
634 pub sql: std::string::String,
636
637 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
638 }
639
640 impl Endpoints {
641 pub fn new() -> Self {
642 std::default::Default::default()
643 }
644
645 pub fn set_notebooks<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
647 self.notebooks = v.into();
648 self
649 }
650
651 pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
653 self.sql = v.into();
654 self
655 }
656 }
657
658 impl wkt::message::Message for Endpoints {
659 fn typename() -> &'static str {
660 "type.googleapis.com/google.cloud.dataplex.v1.Environment.Endpoints"
661 }
662 }
663}
664
665#[derive(Clone, Default, PartialEq)]
667#[non_exhaustive]
668pub struct Content {
669 pub name: std::string::String,
672
673 pub uid: std::string::String,
677
678 pub path: std::string::String,
682
683 pub create_time: std::option::Option<wkt::Timestamp>,
685
686 pub update_time: std::option::Option<wkt::Timestamp>,
688
689 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
691
692 pub description: std::string::String,
694
695 pub data: std::option::Option<crate::model::content::Data>,
697
698 pub content: std::option::Option<crate::model::content::Content>,
700
701 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
702}
703
704impl Content {
705 pub fn new() -> Self {
706 std::default::Default::default()
707 }
708
709 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
711 self.name = v.into();
712 self
713 }
714
715 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
717 self.uid = v.into();
718 self
719 }
720
721 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
723 self.path = v.into();
724 self
725 }
726
727 pub fn set_create_time<T>(mut self, v: T) -> Self
729 where
730 T: std::convert::Into<wkt::Timestamp>,
731 {
732 self.create_time = std::option::Option::Some(v.into());
733 self
734 }
735
736 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
738 where
739 T: std::convert::Into<wkt::Timestamp>,
740 {
741 self.create_time = v.map(|x| x.into());
742 self
743 }
744
745 pub fn set_update_time<T>(mut self, v: T) -> Self
747 where
748 T: std::convert::Into<wkt::Timestamp>,
749 {
750 self.update_time = std::option::Option::Some(v.into());
751 self
752 }
753
754 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
756 where
757 T: std::convert::Into<wkt::Timestamp>,
758 {
759 self.update_time = v.map(|x| x.into());
760 self
761 }
762
763 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
765 where
766 T: std::iter::IntoIterator<Item = (K, V)>,
767 K: std::convert::Into<std::string::String>,
768 V: std::convert::Into<std::string::String>,
769 {
770 use std::iter::Iterator;
771 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
772 self
773 }
774
775 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
777 self.description = v.into();
778 self
779 }
780
781 pub fn set_data<T: std::convert::Into<std::option::Option<crate::model::content::Data>>>(
786 mut self,
787 v: T,
788 ) -> Self {
789 self.data = v.into();
790 self
791 }
792
793 pub fn data_text(&self) -> std::option::Option<&std::string::String> {
797 #[allow(unreachable_patterns)]
798 self.data.as_ref().and_then(|v| match v {
799 crate::model::content::Data::DataText(v) => std::option::Option::Some(v),
800 _ => std::option::Option::None,
801 })
802 }
803
804 pub fn set_data_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
810 self.data = std::option::Option::Some(crate::model::content::Data::DataText(v.into()));
811 self
812 }
813
814 pub fn set_content<
819 T: std::convert::Into<std::option::Option<crate::model::content::Content>>,
820 >(
821 mut self,
822 v: T,
823 ) -> Self {
824 self.content = v.into();
825 self
826 }
827
828 pub fn sql_script(
832 &self,
833 ) -> std::option::Option<&std::boxed::Box<crate::model::content::SqlScript>> {
834 #[allow(unreachable_patterns)]
835 self.content.as_ref().and_then(|v| match v {
836 crate::model::content::Content::SqlScript(v) => std::option::Option::Some(v),
837 _ => std::option::Option::None,
838 })
839 }
840
841 pub fn set_sql_script<
847 T: std::convert::Into<std::boxed::Box<crate::model::content::SqlScript>>,
848 >(
849 mut self,
850 v: T,
851 ) -> Self {
852 self.content =
853 std::option::Option::Some(crate::model::content::Content::SqlScript(v.into()));
854 self
855 }
856
857 pub fn notebook(
861 &self,
862 ) -> std::option::Option<&std::boxed::Box<crate::model::content::Notebook>> {
863 #[allow(unreachable_patterns)]
864 self.content.as_ref().and_then(|v| match v {
865 crate::model::content::Content::Notebook(v) => std::option::Option::Some(v),
866 _ => std::option::Option::None,
867 })
868 }
869
870 pub fn set_notebook<T: std::convert::Into<std::boxed::Box<crate::model::content::Notebook>>>(
876 mut self,
877 v: T,
878 ) -> Self {
879 self.content =
880 std::option::Option::Some(crate::model::content::Content::Notebook(v.into()));
881 self
882 }
883}
884
885impl wkt::message::Message for Content {
886 fn typename() -> &'static str {
887 "type.googleapis.com/google.cloud.dataplex.v1.Content"
888 }
889}
890
891pub mod content {
893 #[allow(unused_imports)]
894 use super::*;
895
896 #[derive(Clone, Default, PartialEq)]
898 #[non_exhaustive]
899 pub struct SqlScript {
900 pub engine: crate::model::content::sql_script::QueryEngine,
902
903 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
904 }
905
906 impl SqlScript {
907 pub fn new() -> Self {
908 std::default::Default::default()
909 }
910
911 pub fn set_engine<T: std::convert::Into<crate::model::content::sql_script::QueryEngine>>(
913 mut self,
914 v: T,
915 ) -> Self {
916 self.engine = v.into();
917 self
918 }
919 }
920
921 impl wkt::message::Message for SqlScript {
922 fn typename() -> &'static str {
923 "type.googleapis.com/google.cloud.dataplex.v1.Content.SqlScript"
924 }
925 }
926
927 pub mod sql_script {
929 #[allow(unused_imports)]
930 use super::*;
931
932 #[derive(Clone, Debug, PartialEq)]
948 #[non_exhaustive]
949 pub enum QueryEngine {
950 Unspecified,
952 Spark,
954 UnknownValue(query_engine::UnknownValue),
959 }
960
961 #[doc(hidden)]
962 pub mod query_engine {
963 #[allow(unused_imports)]
964 use super::*;
965 #[derive(Clone, Debug, PartialEq)]
966 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
967 }
968
969 impl QueryEngine {
970 pub fn value(&self) -> std::option::Option<i32> {
975 match self {
976 Self::Unspecified => std::option::Option::Some(0),
977 Self::Spark => std::option::Option::Some(2),
978 Self::UnknownValue(u) => u.0.value(),
979 }
980 }
981
982 pub fn name(&self) -> std::option::Option<&str> {
987 match self {
988 Self::Unspecified => std::option::Option::Some("QUERY_ENGINE_UNSPECIFIED"),
989 Self::Spark => std::option::Option::Some("SPARK"),
990 Self::UnknownValue(u) => u.0.name(),
991 }
992 }
993 }
994
995 impl std::default::Default for QueryEngine {
996 fn default() -> Self {
997 use std::convert::From;
998 Self::from(0)
999 }
1000 }
1001
1002 impl std::fmt::Display for QueryEngine {
1003 fn fmt(
1004 &self,
1005 f: &mut std::fmt::Formatter<'_>,
1006 ) -> std::result::Result<(), std::fmt::Error> {
1007 wkt::internal::display_enum(f, self.name(), self.value())
1008 }
1009 }
1010
1011 impl std::convert::From<i32> for QueryEngine {
1012 fn from(value: i32) -> Self {
1013 match value {
1014 0 => Self::Unspecified,
1015 2 => Self::Spark,
1016 _ => Self::UnknownValue(query_engine::UnknownValue(
1017 wkt::internal::UnknownEnumValue::Integer(value),
1018 )),
1019 }
1020 }
1021 }
1022
1023 impl std::convert::From<&str> for QueryEngine {
1024 fn from(value: &str) -> Self {
1025 use std::string::ToString;
1026 match value {
1027 "QUERY_ENGINE_UNSPECIFIED" => Self::Unspecified,
1028 "SPARK" => Self::Spark,
1029 _ => Self::UnknownValue(query_engine::UnknownValue(
1030 wkt::internal::UnknownEnumValue::String(value.to_string()),
1031 )),
1032 }
1033 }
1034 }
1035
1036 impl serde::ser::Serialize for QueryEngine {
1037 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1038 where
1039 S: serde::Serializer,
1040 {
1041 match self {
1042 Self::Unspecified => serializer.serialize_i32(0),
1043 Self::Spark => serializer.serialize_i32(2),
1044 Self::UnknownValue(u) => u.0.serialize(serializer),
1045 }
1046 }
1047 }
1048
1049 impl<'de> serde::de::Deserialize<'de> for QueryEngine {
1050 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1051 where
1052 D: serde::Deserializer<'de>,
1053 {
1054 deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryEngine>::new(
1055 ".google.cloud.dataplex.v1.Content.SqlScript.QueryEngine",
1056 ))
1057 }
1058 }
1059 }
1060
1061 #[derive(Clone, Default, PartialEq)]
1063 #[non_exhaustive]
1064 pub struct Notebook {
1065 pub kernel_type: crate::model::content::notebook::KernelType,
1067
1068 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1069 }
1070
1071 impl Notebook {
1072 pub fn new() -> Self {
1073 std::default::Default::default()
1074 }
1075
1076 pub fn set_kernel_type<
1078 T: std::convert::Into<crate::model::content::notebook::KernelType>,
1079 >(
1080 mut self,
1081 v: T,
1082 ) -> Self {
1083 self.kernel_type = v.into();
1084 self
1085 }
1086 }
1087
1088 impl wkt::message::Message for Notebook {
1089 fn typename() -> &'static str {
1090 "type.googleapis.com/google.cloud.dataplex.v1.Content.Notebook"
1091 }
1092 }
1093
1094 pub mod notebook {
1096 #[allow(unused_imports)]
1097 use super::*;
1098
1099 #[derive(Clone, Debug, PartialEq)]
1115 #[non_exhaustive]
1116 pub enum KernelType {
1117 Unspecified,
1119 Python3,
1121 UnknownValue(kernel_type::UnknownValue),
1126 }
1127
1128 #[doc(hidden)]
1129 pub mod kernel_type {
1130 #[allow(unused_imports)]
1131 use super::*;
1132 #[derive(Clone, Debug, PartialEq)]
1133 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1134 }
1135
1136 impl KernelType {
1137 pub fn value(&self) -> std::option::Option<i32> {
1142 match self {
1143 Self::Unspecified => std::option::Option::Some(0),
1144 Self::Python3 => std::option::Option::Some(1),
1145 Self::UnknownValue(u) => u.0.value(),
1146 }
1147 }
1148
1149 pub fn name(&self) -> std::option::Option<&str> {
1154 match self {
1155 Self::Unspecified => std::option::Option::Some("KERNEL_TYPE_UNSPECIFIED"),
1156 Self::Python3 => std::option::Option::Some("PYTHON3"),
1157 Self::UnknownValue(u) => u.0.name(),
1158 }
1159 }
1160 }
1161
1162 impl std::default::Default for KernelType {
1163 fn default() -> Self {
1164 use std::convert::From;
1165 Self::from(0)
1166 }
1167 }
1168
1169 impl std::fmt::Display for KernelType {
1170 fn fmt(
1171 &self,
1172 f: &mut std::fmt::Formatter<'_>,
1173 ) -> std::result::Result<(), std::fmt::Error> {
1174 wkt::internal::display_enum(f, self.name(), self.value())
1175 }
1176 }
1177
1178 impl std::convert::From<i32> for KernelType {
1179 fn from(value: i32) -> Self {
1180 match value {
1181 0 => Self::Unspecified,
1182 1 => Self::Python3,
1183 _ => Self::UnknownValue(kernel_type::UnknownValue(
1184 wkt::internal::UnknownEnumValue::Integer(value),
1185 )),
1186 }
1187 }
1188 }
1189
1190 impl std::convert::From<&str> for KernelType {
1191 fn from(value: &str) -> Self {
1192 use std::string::ToString;
1193 match value {
1194 "KERNEL_TYPE_UNSPECIFIED" => Self::Unspecified,
1195 "PYTHON3" => Self::Python3,
1196 _ => Self::UnknownValue(kernel_type::UnknownValue(
1197 wkt::internal::UnknownEnumValue::String(value.to_string()),
1198 )),
1199 }
1200 }
1201 }
1202
1203 impl serde::ser::Serialize for KernelType {
1204 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1205 where
1206 S: serde::Serializer,
1207 {
1208 match self {
1209 Self::Unspecified => serializer.serialize_i32(0),
1210 Self::Python3 => serializer.serialize_i32(1),
1211 Self::UnknownValue(u) => u.0.serialize(serializer),
1212 }
1213 }
1214 }
1215
1216 impl<'de> serde::de::Deserialize<'de> for KernelType {
1217 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1218 where
1219 D: serde::Deserializer<'de>,
1220 {
1221 deserializer.deserialize_any(wkt::internal::EnumVisitor::<KernelType>::new(
1222 ".google.cloud.dataplex.v1.Content.Notebook.KernelType",
1223 ))
1224 }
1225 }
1226 }
1227
1228 #[derive(Clone, Debug, PartialEq)]
1230 #[non_exhaustive]
1231 pub enum Data {
1232 DataText(std::string::String),
1234 }
1235
1236 #[derive(Clone, Debug, PartialEq)]
1238 #[non_exhaustive]
1239 pub enum Content {
1240 SqlScript(std::boxed::Box<crate::model::content::SqlScript>),
1242 Notebook(std::boxed::Box<crate::model::content::Notebook>),
1244 }
1245}
1246
1247#[derive(Clone, Default, PartialEq)]
1249#[non_exhaustive]
1250pub struct Session {
1251 pub name: std::string::String,
1254
1255 pub user_id: std::string::String,
1257
1258 pub create_time: std::option::Option<wkt::Timestamp>,
1260
1261 pub state: crate::model::State,
1263
1264 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1265}
1266
1267impl Session {
1268 pub fn new() -> Self {
1269 std::default::Default::default()
1270 }
1271
1272 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1274 self.name = v.into();
1275 self
1276 }
1277
1278 pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1280 self.user_id = v.into();
1281 self
1282 }
1283
1284 pub fn set_create_time<T>(mut self, v: T) -> Self
1286 where
1287 T: std::convert::Into<wkt::Timestamp>,
1288 {
1289 self.create_time = std::option::Option::Some(v.into());
1290 self
1291 }
1292
1293 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1295 where
1296 T: std::convert::Into<wkt::Timestamp>,
1297 {
1298 self.create_time = v.map(|x| x.into());
1299 self
1300 }
1301
1302 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
1304 self.state = v.into();
1305 self
1306 }
1307}
1308
1309impl wkt::message::Message for Session {
1310 fn typename() -> &'static str {
1311 "type.googleapis.com/google.cloud.dataplex.v1.Session"
1312 }
1313}
1314
1315#[derive(Clone, Default, PartialEq)]
1319#[non_exhaustive]
1320pub struct Glossary {
1321 pub name: std::string::String,
1325
1326 pub uid: std::string::String,
1330
1331 pub display_name: std::string::String,
1334
1335 pub description: std::string::String,
1337
1338 pub create_time: std::option::Option<wkt::Timestamp>,
1340
1341 pub update_time: std::option::Option<wkt::Timestamp>,
1343
1344 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1346
1347 pub term_count: i32,
1349
1350 pub category_count: i32,
1352
1353 pub etag: std::string::String,
1358
1359 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1360}
1361
1362impl Glossary {
1363 pub fn new() -> Self {
1364 std::default::Default::default()
1365 }
1366
1367 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1369 self.name = v.into();
1370 self
1371 }
1372
1373 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1375 self.uid = v.into();
1376 self
1377 }
1378
1379 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1381 self.display_name = v.into();
1382 self
1383 }
1384
1385 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1387 self.description = v.into();
1388 self
1389 }
1390
1391 pub fn set_create_time<T>(mut self, v: T) -> Self
1393 where
1394 T: std::convert::Into<wkt::Timestamp>,
1395 {
1396 self.create_time = std::option::Option::Some(v.into());
1397 self
1398 }
1399
1400 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1402 where
1403 T: std::convert::Into<wkt::Timestamp>,
1404 {
1405 self.create_time = v.map(|x| x.into());
1406 self
1407 }
1408
1409 pub fn set_update_time<T>(mut self, v: T) -> Self
1411 where
1412 T: std::convert::Into<wkt::Timestamp>,
1413 {
1414 self.update_time = std::option::Option::Some(v.into());
1415 self
1416 }
1417
1418 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1420 where
1421 T: std::convert::Into<wkt::Timestamp>,
1422 {
1423 self.update_time = v.map(|x| x.into());
1424 self
1425 }
1426
1427 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1429 where
1430 T: std::iter::IntoIterator<Item = (K, V)>,
1431 K: std::convert::Into<std::string::String>,
1432 V: std::convert::Into<std::string::String>,
1433 {
1434 use std::iter::Iterator;
1435 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1436 self
1437 }
1438
1439 pub fn set_term_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1441 self.term_count = v.into();
1442 self
1443 }
1444
1445 pub fn set_category_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1447 self.category_count = v.into();
1448 self
1449 }
1450
1451 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1453 self.etag = v.into();
1454 self
1455 }
1456}
1457
1458impl wkt::message::Message for Glossary {
1459 fn typename() -> &'static str {
1460 "type.googleapis.com/google.cloud.dataplex.v1.Glossary"
1461 }
1462}
1463
1464#[derive(Clone, Default, PartialEq)]
1467#[non_exhaustive]
1468pub struct GlossaryCategory {
1469 pub name: std::string::String,
1473
1474 pub uid: std::string::String,
1478
1479 pub display_name: std::string::String,
1483
1484 pub description: std::string::String,
1486
1487 pub create_time: std::option::Option<wkt::Timestamp>,
1489
1490 pub update_time: std::option::Option<wkt::Timestamp>,
1492
1493 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1495
1496 pub parent: std::string::String,
1503
1504 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1505}
1506
1507impl GlossaryCategory {
1508 pub fn new() -> Self {
1509 std::default::Default::default()
1510 }
1511
1512 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1514 self.name = v.into();
1515 self
1516 }
1517
1518 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1520 self.uid = v.into();
1521 self
1522 }
1523
1524 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1526 self.display_name = v.into();
1527 self
1528 }
1529
1530 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1532 self.description = v.into();
1533 self
1534 }
1535
1536 pub fn set_create_time<T>(mut self, v: T) -> Self
1538 where
1539 T: std::convert::Into<wkt::Timestamp>,
1540 {
1541 self.create_time = std::option::Option::Some(v.into());
1542 self
1543 }
1544
1545 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1547 where
1548 T: std::convert::Into<wkt::Timestamp>,
1549 {
1550 self.create_time = v.map(|x| x.into());
1551 self
1552 }
1553
1554 pub fn set_update_time<T>(mut self, v: T) -> Self
1556 where
1557 T: std::convert::Into<wkt::Timestamp>,
1558 {
1559 self.update_time = std::option::Option::Some(v.into());
1560 self
1561 }
1562
1563 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1565 where
1566 T: std::convert::Into<wkt::Timestamp>,
1567 {
1568 self.update_time = v.map(|x| x.into());
1569 self
1570 }
1571
1572 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1574 where
1575 T: std::iter::IntoIterator<Item = (K, V)>,
1576 K: std::convert::Into<std::string::String>,
1577 V: std::convert::Into<std::string::String>,
1578 {
1579 use std::iter::Iterator;
1580 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1581 self
1582 }
1583
1584 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1586 self.parent = v.into();
1587 self
1588 }
1589}
1590
1591impl wkt::message::Message for GlossaryCategory {
1592 fn typename() -> &'static str {
1593 "type.googleapis.com/google.cloud.dataplex.v1.GlossaryCategory"
1594 }
1595}
1596
1597#[derive(Clone, Default, PartialEq)]
1601#[non_exhaustive]
1602pub struct GlossaryTerm {
1603 pub name: std::string::String,
1607
1608 pub uid: std::string::String,
1612
1613 pub display_name: std::string::String,
1616
1617 pub description: std::string::String,
1619
1620 pub create_time: std::option::Option<wkt::Timestamp>,
1622
1623 pub update_time: std::option::Option<wkt::Timestamp>,
1625
1626 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1628
1629 pub parent: std::string::String,
1636
1637 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1638}
1639
1640impl GlossaryTerm {
1641 pub fn new() -> Self {
1642 std::default::Default::default()
1643 }
1644
1645 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1647 self.name = v.into();
1648 self
1649 }
1650
1651 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1653 self.uid = v.into();
1654 self
1655 }
1656
1657 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1659 self.display_name = v.into();
1660 self
1661 }
1662
1663 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1665 self.description = v.into();
1666 self
1667 }
1668
1669 pub fn set_create_time<T>(mut self, v: T) -> Self
1671 where
1672 T: std::convert::Into<wkt::Timestamp>,
1673 {
1674 self.create_time = std::option::Option::Some(v.into());
1675 self
1676 }
1677
1678 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1680 where
1681 T: std::convert::Into<wkt::Timestamp>,
1682 {
1683 self.create_time = v.map(|x| x.into());
1684 self
1685 }
1686
1687 pub fn set_update_time<T>(mut self, v: T) -> Self
1689 where
1690 T: std::convert::Into<wkt::Timestamp>,
1691 {
1692 self.update_time = std::option::Option::Some(v.into());
1693 self
1694 }
1695
1696 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1698 where
1699 T: std::convert::Into<wkt::Timestamp>,
1700 {
1701 self.update_time = v.map(|x| x.into());
1702 self
1703 }
1704
1705 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1707 where
1708 T: std::iter::IntoIterator<Item = (K, V)>,
1709 K: std::convert::Into<std::string::String>,
1710 V: std::convert::Into<std::string::String>,
1711 {
1712 use std::iter::Iterator;
1713 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1714 self
1715 }
1716
1717 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1719 self.parent = v.into();
1720 self
1721 }
1722}
1723
1724impl wkt::message::Message for GlossaryTerm {
1725 fn typename() -> &'static str {
1726 "type.googleapis.com/google.cloud.dataplex.v1.GlossaryTerm"
1727 }
1728}
1729
1730#[derive(Clone, Default, PartialEq)]
1732#[non_exhaustive]
1733pub struct CreateGlossaryRequest {
1734 pub parent: std::string::String,
1738
1739 pub glossary_id: std::string::String,
1741
1742 pub glossary: std::option::Option<crate::model::Glossary>,
1744
1745 pub validate_only: bool,
1748
1749 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1750}
1751
1752impl CreateGlossaryRequest {
1753 pub fn new() -> Self {
1754 std::default::Default::default()
1755 }
1756
1757 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1759 self.parent = v.into();
1760 self
1761 }
1762
1763 pub fn set_glossary_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1765 self.glossary_id = v.into();
1766 self
1767 }
1768
1769 pub fn set_glossary<T>(mut self, v: T) -> Self
1771 where
1772 T: std::convert::Into<crate::model::Glossary>,
1773 {
1774 self.glossary = std::option::Option::Some(v.into());
1775 self
1776 }
1777
1778 pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
1780 where
1781 T: std::convert::Into<crate::model::Glossary>,
1782 {
1783 self.glossary = v.map(|x| x.into());
1784 self
1785 }
1786
1787 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1789 self.validate_only = v.into();
1790 self
1791 }
1792}
1793
1794impl wkt::message::Message for CreateGlossaryRequest {
1795 fn typename() -> &'static str {
1796 "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryRequest"
1797 }
1798}
1799
1800#[derive(Clone, Default, PartialEq)]
1802#[non_exhaustive]
1803pub struct UpdateGlossaryRequest {
1804 pub glossary: std::option::Option<crate::model::Glossary>,
1809
1810 pub update_mask: std::option::Option<wkt::FieldMask>,
1812
1813 pub validate_only: bool,
1816
1817 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1818}
1819
1820impl UpdateGlossaryRequest {
1821 pub fn new() -> Self {
1822 std::default::Default::default()
1823 }
1824
1825 pub fn set_glossary<T>(mut self, v: T) -> Self
1827 where
1828 T: std::convert::Into<crate::model::Glossary>,
1829 {
1830 self.glossary = std::option::Option::Some(v.into());
1831 self
1832 }
1833
1834 pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
1836 where
1837 T: std::convert::Into<crate::model::Glossary>,
1838 {
1839 self.glossary = v.map(|x| x.into());
1840 self
1841 }
1842
1843 pub fn set_update_mask<T>(mut self, v: T) -> Self
1845 where
1846 T: std::convert::Into<wkt::FieldMask>,
1847 {
1848 self.update_mask = std::option::Option::Some(v.into());
1849 self
1850 }
1851
1852 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1854 where
1855 T: std::convert::Into<wkt::FieldMask>,
1856 {
1857 self.update_mask = v.map(|x| x.into());
1858 self
1859 }
1860
1861 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1863 self.validate_only = v.into();
1864 self
1865 }
1866}
1867
1868impl wkt::message::Message for UpdateGlossaryRequest {
1869 fn typename() -> &'static str {
1870 "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryRequest"
1871 }
1872}
1873
1874#[derive(Clone, Default, PartialEq)]
1876#[non_exhaustive]
1877pub struct DeleteGlossaryRequest {
1878 pub name: std::string::String,
1882
1883 pub etag: std::string::String,
1888
1889 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1890}
1891
1892impl DeleteGlossaryRequest {
1893 pub fn new() -> Self {
1894 std::default::Default::default()
1895 }
1896
1897 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1899 self.name = v.into();
1900 self
1901 }
1902
1903 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1905 self.etag = v.into();
1906 self
1907 }
1908}
1909
1910impl wkt::message::Message for DeleteGlossaryRequest {
1911 fn typename() -> &'static str {
1912 "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryRequest"
1913 }
1914}
1915
1916#[derive(Clone, Default, PartialEq)]
1918#[non_exhaustive]
1919pub struct GetGlossaryRequest {
1920 pub name: std::string::String,
1924
1925 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1926}
1927
1928impl GetGlossaryRequest {
1929 pub fn new() -> Self {
1930 std::default::Default::default()
1931 }
1932
1933 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1935 self.name = v.into();
1936 self
1937 }
1938}
1939
1940impl wkt::message::Message for GetGlossaryRequest {
1941 fn typename() -> &'static str {
1942 "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryRequest"
1943 }
1944}
1945
1946#[derive(Clone, Default, PartialEq)]
1948#[non_exhaustive]
1949pub struct ListGlossariesRequest {
1950 pub parent: std::string::String,
1954
1955 pub page_size: i32,
1960
1961 pub page_token: std::string::String,
1966
1967 pub filter: std::string::String,
1975
1976 pub order_by: std::string::String,
1980
1981 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1982}
1983
1984impl ListGlossariesRequest {
1985 pub fn new() -> Self {
1986 std::default::Default::default()
1987 }
1988
1989 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1991 self.parent = v.into();
1992 self
1993 }
1994
1995 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1997 self.page_size = v.into();
1998 self
1999 }
2000
2001 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2003 self.page_token = v.into();
2004 self
2005 }
2006
2007 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2009 self.filter = v.into();
2010 self
2011 }
2012
2013 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2015 self.order_by = v.into();
2016 self
2017 }
2018}
2019
2020impl wkt::message::Message for ListGlossariesRequest {
2021 fn typename() -> &'static str {
2022 "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesRequest"
2023 }
2024}
2025
2026#[derive(Clone, Default, PartialEq)]
2028#[non_exhaustive]
2029pub struct ListGlossariesResponse {
2030 pub glossaries: std::vec::Vec<crate::model::Glossary>,
2032
2033 pub next_page_token: std::string::String,
2036
2037 pub unreachable_locations: std::vec::Vec<std::string::String>,
2039
2040 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2041}
2042
2043impl ListGlossariesResponse {
2044 pub fn new() -> Self {
2045 std::default::Default::default()
2046 }
2047
2048 pub fn set_glossaries<T, V>(mut self, v: T) -> Self
2050 where
2051 T: std::iter::IntoIterator<Item = V>,
2052 V: std::convert::Into<crate::model::Glossary>,
2053 {
2054 use std::iter::Iterator;
2055 self.glossaries = v.into_iter().map(|i| i.into()).collect();
2056 self
2057 }
2058
2059 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2061 self.next_page_token = v.into();
2062 self
2063 }
2064
2065 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2067 where
2068 T: std::iter::IntoIterator<Item = V>,
2069 V: std::convert::Into<std::string::String>,
2070 {
2071 use std::iter::Iterator;
2072 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2073 self
2074 }
2075}
2076
2077impl wkt::message::Message for ListGlossariesResponse {
2078 fn typename() -> &'static str {
2079 "type.googleapis.com/google.cloud.dataplex.v1.ListGlossariesResponse"
2080 }
2081}
2082
2083#[doc(hidden)]
2084impl gax::paginator::internal::PageableResponse for ListGlossariesResponse {
2085 type PageItem = crate::model::Glossary;
2086
2087 fn items(self) -> std::vec::Vec<Self::PageItem> {
2088 self.glossaries
2089 }
2090
2091 fn next_page_token(&self) -> std::string::String {
2092 use std::clone::Clone;
2093 self.next_page_token.clone()
2094 }
2095}
2096
2097#[derive(Clone, Default, PartialEq)]
2099#[non_exhaustive]
2100pub struct CreateGlossaryCategoryRequest {
2101 pub parent: std::string::String,
2106
2107 pub category_id: std::string::String,
2109
2110 pub category: std::option::Option<crate::model::GlossaryCategory>,
2112
2113 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2114}
2115
2116impl CreateGlossaryCategoryRequest {
2117 pub fn new() -> Self {
2118 std::default::Default::default()
2119 }
2120
2121 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2123 self.parent = v.into();
2124 self
2125 }
2126
2127 pub fn set_category_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2129 self.category_id = v.into();
2130 self
2131 }
2132
2133 pub fn set_category<T>(mut self, v: T) -> Self
2135 where
2136 T: std::convert::Into<crate::model::GlossaryCategory>,
2137 {
2138 self.category = std::option::Option::Some(v.into());
2139 self
2140 }
2141
2142 pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2144 where
2145 T: std::convert::Into<crate::model::GlossaryCategory>,
2146 {
2147 self.category = v.map(|x| x.into());
2148 self
2149 }
2150}
2151
2152impl wkt::message::Message for CreateGlossaryCategoryRequest {
2153 fn typename() -> &'static str {
2154 "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryCategoryRequest"
2155 }
2156}
2157
2158#[derive(Clone, Default, PartialEq)]
2160#[non_exhaustive]
2161pub struct UpdateGlossaryCategoryRequest {
2162 pub category: std::option::Option<crate::model::GlossaryCategory>,
2167
2168 pub update_mask: std::option::Option<wkt::FieldMask>,
2170
2171 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2172}
2173
2174impl UpdateGlossaryCategoryRequest {
2175 pub fn new() -> Self {
2176 std::default::Default::default()
2177 }
2178
2179 pub fn set_category<T>(mut self, v: T) -> Self
2181 where
2182 T: std::convert::Into<crate::model::GlossaryCategory>,
2183 {
2184 self.category = std::option::Option::Some(v.into());
2185 self
2186 }
2187
2188 pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
2190 where
2191 T: std::convert::Into<crate::model::GlossaryCategory>,
2192 {
2193 self.category = v.map(|x| x.into());
2194 self
2195 }
2196
2197 pub fn set_update_mask<T>(mut self, v: T) -> Self
2199 where
2200 T: std::convert::Into<wkt::FieldMask>,
2201 {
2202 self.update_mask = std::option::Option::Some(v.into());
2203 self
2204 }
2205
2206 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2208 where
2209 T: std::convert::Into<wkt::FieldMask>,
2210 {
2211 self.update_mask = v.map(|x| x.into());
2212 self
2213 }
2214}
2215
2216impl wkt::message::Message for UpdateGlossaryCategoryRequest {
2217 fn typename() -> &'static str {
2218 "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest"
2219 }
2220}
2221
2222#[derive(Clone, Default, PartialEq)]
2224#[non_exhaustive]
2225pub struct DeleteGlossaryCategoryRequest {
2226 pub name: std::string::String,
2230
2231 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2232}
2233
2234impl DeleteGlossaryCategoryRequest {
2235 pub fn new() -> Self {
2236 std::default::Default::default()
2237 }
2238
2239 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2241 self.name = v.into();
2242 self
2243 }
2244}
2245
2246impl wkt::message::Message for DeleteGlossaryCategoryRequest {
2247 fn typename() -> &'static str {
2248 "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest"
2249 }
2250}
2251
2252#[derive(Clone, Default, PartialEq)]
2254#[non_exhaustive]
2255pub struct GetGlossaryCategoryRequest {
2256 pub name: std::string::String,
2260
2261 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2262}
2263
2264impl GetGlossaryCategoryRequest {
2265 pub fn new() -> Self {
2266 std::default::Default::default()
2267 }
2268
2269 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2271 self.name = v.into();
2272 self
2273 }
2274}
2275
2276impl wkt::message::Message for GetGlossaryCategoryRequest {
2277 fn typename() -> &'static str {
2278 "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryCategoryRequest"
2279 }
2280}
2281
2282#[derive(Clone, Default, PartialEq)]
2284#[non_exhaustive]
2285pub struct ListGlossaryCategoriesRequest {
2286 pub parent: std::string::String,
2291
2292 pub page_size: i32,
2297
2298 pub page_token: std::string::String,
2303
2304 pub filter: std::string::String,
2318
2319 pub order_by: std::string::String,
2323
2324 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2325}
2326
2327impl ListGlossaryCategoriesRequest {
2328 pub fn new() -> Self {
2329 std::default::Default::default()
2330 }
2331
2332 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2334 self.parent = v.into();
2335 self
2336 }
2337
2338 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2340 self.page_size = v.into();
2341 self
2342 }
2343
2344 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2346 self.page_token = v.into();
2347 self
2348 }
2349
2350 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2352 self.filter = v.into();
2353 self
2354 }
2355
2356 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2358 self.order_by = v.into();
2359 self
2360 }
2361}
2362
2363impl wkt::message::Message for ListGlossaryCategoriesRequest {
2364 fn typename() -> &'static str {
2365 "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesRequest"
2366 }
2367}
2368
2369#[derive(Clone, Default, PartialEq)]
2371#[non_exhaustive]
2372pub struct ListGlossaryCategoriesResponse {
2373 pub categories: std::vec::Vec<crate::model::GlossaryCategory>,
2375
2376 pub next_page_token: std::string::String,
2379
2380 pub unreachable_locations: std::vec::Vec<std::string::String>,
2382
2383 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2384}
2385
2386impl ListGlossaryCategoriesResponse {
2387 pub fn new() -> Self {
2388 std::default::Default::default()
2389 }
2390
2391 pub fn set_categories<T, V>(mut self, v: T) -> Self
2393 where
2394 T: std::iter::IntoIterator<Item = V>,
2395 V: std::convert::Into<crate::model::GlossaryCategory>,
2396 {
2397 use std::iter::Iterator;
2398 self.categories = v.into_iter().map(|i| i.into()).collect();
2399 self
2400 }
2401
2402 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2404 self.next_page_token = v.into();
2405 self
2406 }
2407
2408 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2410 where
2411 T: std::iter::IntoIterator<Item = V>,
2412 V: std::convert::Into<std::string::String>,
2413 {
2414 use std::iter::Iterator;
2415 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2416 self
2417 }
2418}
2419
2420impl wkt::message::Message for ListGlossaryCategoriesResponse {
2421 fn typename() -> &'static str {
2422 "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryCategoriesResponse"
2423 }
2424}
2425
2426#[doc(hidden)]
2427impl gax::paginator::internal::PageableResponse for ListGlossaryCategoriesResponse {
2428 type PageItem = crate::model::GlossaryCategory;
2429
2430 fn items(self) -> std::vec::Vec<Self::PageItem> {
2431 self.categories
2432 }
2433
2434 fn next_page_token(&self) -> std::string::String {
2435 use std::clone::Clone;
2436 self.next_page_token.clone()
2437 }
2438}
2439
2440#[derive(Clone, Default, PartialEq)]
2442#[non_exhaustive]
2443pub struct CreateGlossaryTermRequest {
2444 pub parent: std::string::String,
2449
2450 pub term_id: std::string::String,
2452
2453 pub term: std::option::Option<crate::model::GlossaryTerm>,
2455
2456 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2457}
2458
2459impl CreateGlossaryTermRequest {
2460 pub fn new() -> Self {
2461 std::default::Default::default()
2462 }
2463
2464 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2466 self.parent = v.into();
2467 self
2468 }
2469
2470 pub fn set_term_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2472 self.term_id = v.into();
2473 self
2474 }
2475
2476 pub fn set_term<T>(mut self, v: T) -> Self
2478 where
2479 T: std::convert::Into<crate::model::GlossaryTerm>,
2480 {
2481 self.term = std::option::Option::Some(v.into());
2482 self
2483 }
2484
2485 pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
2487 where
2488 T: std::convert::Into<crate::model::GlossaryTerm>,
2489 {
2490 self.term = v.map(|x| x.into());
2491 self
2492 }
2493}
2494
2495impl wkt::message::Message for CreateGlossaryTermRequest {
2496 fn typename() -> &'static str {
2497 "type.googleapis.com/google.cloud.dataplex.v1.CreateGlossaryTermRequest"
2498 }
2499}
2500
2501#[derive(Clone, Default, PartialEq)]
2503#[non_exhaustive]
2504pub struct UpdateGlossaryTermRequest {
2505 pub term: std::option::Option<crate::model::GlossaryTerm>,
2510
2511 pub update_mask: std::option::Option<wkt::FieldMask>,
2513
2514 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2515}
2516
2517impl UpdateGlossaryTermRequest {
2518 pub fn new() -> Self {
2519 std::default::Default::default()
2520 }
2521
2522 pub fn set_term<T>(mut self, v: T) -> Self
2524 where
2525 T: std::convert::Into<crate::model::GlossaryTerm>,
2526 {
2527 self.term = std::option::Option::Some(v.into());
2528 self
2529 }
2530
2531 pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
2533 where
2534 T: std::convert::Into<crate::model::GlossaryTerm>,
2535 {
2536 self.term = v.map(|x| x.into());
2537 self
2538 }
2539
2540 pub fn set_update_mask<T>(mut self, v: T) -> Self
2542 where
2543 T: std::convert::Into<wkt::FieldMask>,
2544 {
2545 self.update_mask = std::option::Option::Some(v.into());
2546 self
2547 }
2548
2549 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2551 where
2552 T: std::convert::Into<wkt::FieldMask>,
2553 {
2554 self.update_mask = v.map(|x| x.into());
2555 self
2556 }
2557}
2558
2559impl wkt::message::Message for UpdateGlossaryTermRequest {
2560 fn typename() -> &'static str {
2561 "type.googleapis.com/google.cloud.dataplex.v1.UpdateGlossaryTermRequest"
2562 }
2563}
2564
2565#[derive(Clone, Default, PartialEq)]
2567#[non_exhaustive]
2568pub struct DeleteGlossaryTermRequest {
2569 pub name: std::string::String,
2573
2574 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2575}
2576
2577impl DeleteGlossaryTermRequest {
2578 pub fn new() -> Self {
2579 std::default::Default::default()
2580 }
2581
2582 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2584 self.name = v.into();
2585 self
2586 }
2587}
2588
2589impl wkt::message::Message for DeleteGlossaryTermRequest {
2590 fn typename() -> &'static str {
2591 "type.googleapis.com/google.cloud.dataplex.v1.DeleteGlossaryTermRequest"
2592 }
2593}
2594
2595#[derive(Clone, Default, PartialEq)]
2597#[non_exhaustive]
2598pub struct GetGlossaryTermRequest {
2599 pub name: std::string::String,
2603
2604 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2605}
2606
2607impl GetGlossaryTermRequest {
2608 pub fn new() -> Self {
2609 std::default::Default::default()
2610 }
2611
2612 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2614 self.name = v.into();
2615 self
2616 }
2617}
2618
2619impl wkt::message::Message for GetGlossaryTermRequest {
2620 fn typename() -> &'static str {
2621 "type.googleapis.com/google.cloud.dataplex.v1.GetGlossaryTermRequest"
2622 }
2623}
2624
2625#[derive(Clone, Default, PartialEq)]
2627#[non_exhaustive]
2628pub struct ListGlossaryTermsRequest {
2629 pub parent: std::string::String,
2634
2635 pub page_size: i32,
2640
2641 pub page_token: std::string::String,
2646
2647 pub filter: std::string::String,
2661
2662 pub order_by: std::string::String,
2666
2667 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2668}
2669
2670impl ListGlossaryTermsRequest {
2671 pub fn new() -> Self {
2672 std::default::Default::default()
2673 }
2674
2675 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2677 self.parent = v.into();
2678 self
2679 }
2680
2681 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2683 self.page_size = v.into();
2684 self
2685 }
2686
2687 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2689 self.page_token = v.into();
2690 self
2691 }
2692
2693 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2695 self.filter = v.into();
2696 self
2697 }
2698
2699 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2701 self.order_by = v.into();
2702 self
2703 }
2704}
2705
2706impl wkt::message::Message for ListGlossaryTermsRequest {
2707 fn typename() -> &'static str {
2708 "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsRequest"
2709 }
2710}
2711
2712#[derive(Clone, Default, PartialEq)]
2714#[non_exhaustive]
2715pub struct ListGlossaryTermsResponse {
2716 pub terms: std::vec::Vec<crate::model::GlossaryTerm>,
2718
2719 pub next_page_token: std::string::String,
2722
2723 pub unreachable_locations: std::vec::Vec<std::string::String>,
2725
2726 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2727}
2728
2729impl ListGlossaryTermsResponse {
2730 pub fn new() -> Self {
2731 std::default::Default::default()
2732 }
2733
2734 pub fn set_terms<T, V>(mut self, v: T) -> Self
2736 where
2737 T: std::iter::IntoIterator<Item = V>,
2738 V: std::convert::Into<crate::model::GlossaryTerm>,
2739 {
2740 use std::iter::Iterator;
2741 self.terms = v.into_iter().map(|i| i.into()).collect();
2742 self
2743 }
2744
2745 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2747 self.next_page_token = v.into();
2748 self
2749 }
2750
2751 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
2753 where
2754 T: std::iter::IntoIterator<Item = V>,
2755 V: std::convert::Into<std::string::String>,
2756 {
2757 use std::iter::Iterator;
2758 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
2759 self
2760 }
2761}
2762
2763impl wkt::message::Message for ListGlossaryTermsResponse {
2764 fn typename() -> &'static str {
2765 "type.googleapis.com/google.cloud.dataplex.v1.ListGlossaryTermsResponse"
2766 }
2767}
2768
2769#[doc(hidden)]
2770impl gax::paginator::internal::PageableResponse for ListGlossaryTermsResponse {
2771 type PageItem = crate::model::GlossaryTerm;
2772
2773 fn items(self) -> std::vec::Vec<Self::PageItem> {
2774 self.terms
2775 }
2776
2777 fn next_page_token(&self) -> std::string::String {
2778 use std::clone::Clone;
2779 self.next_page_token.clone()
2780 }
2781}
2782
2783#[derive(Clone, Default, PartialEq)]
2786#[non_exhaustive]
2787pub struct AspectType {
2788 pub name: std::string::String,
2791
2792 pub uid: std::string::String,
2796
2797 pub create_time: std::option::Option<wkt::Timestamp>,
2799
2800 pub update_time: std::option::Option<wkt::Timestamp>,
2802
2803 pub description: std::string::String,
2805
2806 pub display_name: std::string::String,
2808
2809 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2811
2812 pub etag: std::string::String,
2815
2816 pub data_classification: crate::model::aspect_type::DataClassification,
2818
2819 pub authorization: std::option::Option<crate::model::aspect_type::Authorization>,
2821
2822 pub metadata_template: std::option::Option<crate::model::aspect_type::MetadataTemplate>,
2824
2825 pub transfer_status: crate::model::TransferStatus,
2828
2829 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2830}
2831
2832impl AspectType {
2833 pub fn new() -> Self {
2834 std::default::Default::default()
2835 }
2836
2837 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2839 self.name = v.into();
2840 self
2841 }
2842
2843 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2845 self.uid = v.into();
2846 self
2847 }
2848
2849 pub fn set_create_time<T>(mut self, v: T) -> Self
2851 where
2852 T: std::convert::Into<wkt::Timestamp>,
2853 {
2854 self.create_time = std::option::Option::Some(v.into());
2855 self
2856 }
2857
2858 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2860 where
2861 T: std::convert::Into<wkt::Timestamp>,
2862 {
2863 self.create_time = v.map(|x| x.into());
2864 self
2865 }
2866
2867 pub fn set_update_time<T>(mut self, v: T) -> Self
2869 where
2870 T: std::convert::Into<wkt::Timestamp>,
2871 {
2872 self.update_time = std::option::Option::Some(v.into());
2873 self
2874 }
2875
2876 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
2878 where
2879 T: std::convert::Into<wkt::Timestamp>,
2880 {
2881 self.update_time = v.map(|x| x.into());
2882 self
2883 }
2884
2885 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2887 self.description = v.into();
2888 self
2889 }
2890
2891 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2893 self.display_name = v.into();
2894 self
2895 }
2896
2897 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2899 where
2900 T: std::iter::IntoIterator<Item = (K, V)>,
2901 K: std::convert::Into<std::string::String>,
2902 V: std::convert::Into<std::string::String>,
2903 {
2904 use std::iter::Iterator;
2905 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2906 self
2907 }
2908
2909 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2911 self.etag = v.into();
2912 self
2913 }
2914
2915 pub fn set_data_classification<
2917 T: std::convert::Into<crate::model::aspect_type::DataClassification>,
2918 >(
2919 mut self,
2920 v: T,
2921 ) -> Self {
2922 self.data_classification = v.into();
2923 self
2924 }
2925
2926 pub fn set_authorization<T>(mut self, v: T) -> Self
2928 where
2929 T: std::convert::Into<crate::model::aspect_type::Authorization>,
2930 {
2931 self.authorization = std::option::Option::Some(v.into());
2932 self
2933 }
2934
2935 pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
2937 where
2938 T: std::convert::Into<crate::model::aspect_type::Authorization>,
2939 {
2940 self.authorization = v.map(|x| x.into());
2941 self
2942 }
2943
2944 pub fn set_metadata_template<T>(mut self, v: T) -> Self
2946 where
2947 T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
2948 {
2949 self.metadata_template = std::option::Option::Some(v.into());
2950 self
2951 }
2952
2953 pub fn set_or_clear_metadata_template<T>(mut self, v: std::option::Option<T>) -> Self
2955 where
2956 T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
2957 {
2958 self.metadata_template = v.map(|x| x.into());
2959 self
2960 }
2961
2962 pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
2964 mut self,
2965 v: T,
2966 ) -> Self {
2967 self.transfer_status = v.into();
2968 self
2969 }
2970}
2971
2972impl wkt::message::Message for AspectType {
2973 fn typename() -> &'static str {
2974 "type.googleapis.com/google.cloud.dataplex.v1.AspectType"
2975 }
2976}
2977
2978pub mod aspect_type {
2980 #[allow(unused_imports)]
2981 use super::*;
2982
2983 #[derive(Clone, Default, PartialEq)]
2985 #[non_exhaustive]
2986 pub struct Authorization {
2987 pub alternate_use_permission: std::string::String,
2991
2992 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2993 }
2994
2995 impl Authorization {
2996 pub fn new() -> Self {
2997 std::default::Default::default()
2998 }
2999
3000 pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
3002 mut self,
3003 v: T,
3004 ) -> Self {
3005 self.alternate_use_permission = v.into();
3006 self
3007 }
3008 }
3009
3010 impl wkt::message::Message for Authorization {
3011 fn typename() -> &'static str {
3012 "type.googleapis.com/google.cloud.dataplex.v1.AspectType.Authorization"
3013 }
3014 }
3015
3016 #[derive(Clone, Default, PartialEq)]
3018 #[non_exhaustive]
3019 pub struct MetadataTemplate {
3020 pub index: i32,
3027
3028 pub name: std::string::String,
3030
3031 pub r#type: std::string::String,
3049
3050 pub record_fields: std::vec::Vec<crate::model::aspect_type::MetadataTemplate>,
3053
3054 pub enum_values: std::vec::Vec<crate::model::aspect_type::metadata_template::EnumValue>,
3057
3058 pub map_items:
3064 std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
3065
3066 pub array_items:
3072 std::option::Option<std::boxed::Box<crate::model::aspect_type::MetadataTemplate>>,
3073
3074 pub type_id: std::string::String,
3078
3079 pub type_ref: std::string::String,
3084
3085 pub constraints:
3087 std::option::Option<crate::model::aspect_type::metadata_template::Constraints>,
3088
3089 pub annotations:
3091 std::option::Option<crate::model::aspect_type::metadata_template::Annotations>,
3092
3093 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3094 }
3095
3096 impl MetadataTemplate {
3097 pub fn new() -> Self {
3098 std::default::Default::default()
3099 }
3100
3101 pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3103 self.index = v.into();
3104 self
3105 }
3106
3107 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3109 self.name = v.into();
3110 self
3111 }
3112
3113 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3115 self.r#type = v.into();
3116 self
3117 }
3118
3119 pub fn set_record_fields<T, V>(mut self, v: T) -> Self
3121 where
3122 T: std::iter::IntoIterator<Item = V>,
3123 V: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3124 {
3125 use std::iter::Iterator;
3126 self.record_fields = v.into_iter().map(|i| i.into()).collect();
3127 self
3128 }
3129
3130 pub fn set_enum_values<T, V>(mut self, v: T) -> Self
3132 where
3133 T: std::iter::IntoIterator<Item = V>,
3134 V: std::convert::Into<crate::model::aspect_type::metadata_template::EnumValue>,
3135 {
3136 use std::iter::Iterator;
3137 self.enum_values = v.into_iter().map(|i| i.into()).collect();
3138 self
3139 }
3140
3141 pub fn set_map_items<T>(mut self, v: T) -> Self
3143 where
3144 T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3145 {
3146 self.map_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
3147 self
3148 }
3149
3150 pub fn set_or_clear_map_items<T>(mut self, v: std::option::Option<T>) -> Self
3152 where
3153 T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3154 {
3155 self.map_items = v.map(|x| std::boxed::Box::new(x.into()));
3156 self
3157 }
3158
3159 pub fn set_array_items<T>(mut self, v: T) -> Self
3161 where
3162 T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3163 {
3164 self.array_items = std::option::Option::Some(std::boxed::Box::new(v.into()));
3165 self
3166 }
3167
3168 pub fn set_or_clear_array_items<T>(mut self, v: std::option::Option<T>) -> Self
3170 where
3171 T: std::convert::Into<crate::model::aspect_type::MetadataTemplate>,
3172 {
3173 self.array_items = v.map(|x| std::boxed::Box::new(x.into()));
3174 self
3175 }
3176
3177 pub fn set_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3179 self.type_id = v.into();
3180 self
3181 }
3182
3183 pub fn set_type_ref<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3185 self.type_ref = v.into();
3186 self
3187 }
3188
3189 pub fn set_constraints<T>(mut self, v: T) -> Self
3191 where
3192 T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
3193 {
3194 self.constraints = std::option::Option::Some(v.into());
3195 self
3196 }
3197
3198 pub fn set_or_clear_constraints<T>(mut self, v: std::option::Option<T>) -> Self
3200 where
3201 T: std::convert::Into<crate::model::aspect_type::metadata_template::Constraints>,
3202 {
3203 self.constraints = v.map(|x| x.into());
3204 self
3205 }
3206
3207 pub fn set_annotations<T>(mut self, v: T) -> Self
3209 where
3210 T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
3211 {
3212 self.annotations = std::option::Option::Some(v.into());
3213 self
3214 }
3215
3216 pub fn set_or_clear_annotations<T>(mut self, v: std::option::Option<T>) -> Self
3218 where
3219 T: std::convert::Into<crate::model::aspect_type::metadata_template::Annotations>,
3220 {
3221 self.annotations = v.map(|x| x.into());
3222 self
3223 }
3224 }
3225
3226 impl wkt::message::Message for MetadataTemplate {
3227 fn typename() -> &'static str {
3228 "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate"
3229 }
3230 }
3231
3232 pub mod metadata_template {
3234 #[allow(unused_imports)]
3235 use super::*;
3236
3237 #[derive(Clone, Default, PartialEq)]
3239 #[non_exhaustive]
3240 pub struct EnumValue {
3241 pub index: i32,
3243
3244 pub name: std::string::String,
3247
3248 pub deprecated: std::string::String,
3251
3252 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3253 }
3254
3255 impl EnumValue {
3256 pub fn new() -> Self {
3257 std::default::Default::default()
3258 }
3259
3260 pub fn set_index<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3262 self.index = v.into();
3263 self
3264 }
3265
3266 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3268 self.name = v.into();
3269 self
3270 }
3271
3272 pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
3274 mut self,
3275 v: T,
3276 ) -> Self {
3277 self.deprecated = v.into();
3278 self
3279 }
3280 }
3281
3282 impl wkt::message::Message for EnumValue {
3283 fn typename() -> &'static str {
3284 "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue"
3285 }
3286 }
3287
3288 #[derive(Clone, Default, PartialEq)]
3290 #[non_exhaustive]
3291 pub struct Constraints {
3292 pub required: bool,
3294
3295 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3296 }
3297
3298 impl Constraints {
3299 pub fn new() -> Self {
3300 std::default::Default::default()
3301 }
3302
3303 pub fn set_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3305 self.required = v.into();
3306 self
3307 }
3308 }
3309
3310 impl wkt::message::Message for Constraints {
3311 fn typename() -> &'static str {
3312 "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints"
3313 }
3314 }
3315
3316 #[derive(Clone, Default, PartialEq)]
3318 #[non_exhaustive]
3319 pub struct Annotations {
3320 pub deprecated: std::string::String,
3323
3324 pub display_name: std::string::String,
3326
3327 pub description: std::string::String,
3329
3330 pub display_order: i32,
3333
3334 pub string_type: std::string::String,
3341
3342 pub string_values: std::vec::Vec<std::string::String>,
3345
3346 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3347 }
3348
3349 impl Annotations {
3350 pub fn new() -> Self {
3351 std::default::Default::default()
3352 }
3353
3354 pub fn set_deprecated<T: std::convert::Into<std::string::String>>(
3356 mut self,
3357 v: T,
3358 ) -> Self {
3359 self.deprecated = v.into();
3360 self
3361 }
3362
3363 pub fn set_display_name<T: std::convert::Into<std::string::String>>(
3365 mut self,
3366 v: T,
3367 ) -> Self {
3368 self.display_name = v.into();
3369 self
3370 }
3371
3372 pub fn set_description<T: std::convert::Into<std::string::String>>(
3374 mut self,
3375 v: T,
3376 ) -> Self {
3377 self.description = v.into();
3378 self
3379 }
3380
3381 pub fn set_display_order<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3383 self.display_order = v.into();
3384 self
3385 }
3386
3387 pub fn set_string_type<T: std::convert::Into<std::string::String>>(
3389 mut self,
3390 v: T,
3391 ) -> Self {
3392 self.string_type = v.into();
3393 self
3394 }
3395
3396 pub fn set_string_values<T, V>(mut self, v: T) -> Self
3398 where
3399 T: std::iter::IntoIterator<Item = V>,
3400 V: std::convert::Into<std::string::String>,
3401 {
3402 use std::iter::Iterator;
3403 self.string_values = v.into_iter().map(|i| i.into()).collect();
3404 self
3405 }
3406 }
3407
3408 impl wkt::message::Message for Annotations {
3409 fn typename() -> &'static str {
3410 "type.googleapis.com/google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations"
3411 }
3412 }
3413 }
3414
3415 #[derive(Clone, Debug, PartialEq)]
3431 #[non_exhaustive]
3432 pub enum DataClassification {
3433 Unspecified,
3435 MetadataAndData,
3437 UnknownValue(data_classification::UnknownValue),
3442 }
3443
3444 #[doc(hidden)]
3445 pub mod data_classification {
3446 #[allow(unused_imports)]
3447 use super::*;
3448 #[derive(Clone, Debug, PartialEq)]
3449 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3450 }
3451
3452 impl DataClassification {
3453 pub fn value(&self) -> std::option::Option<i32> {
3458 match self {
3459 Self::Unspecified => std::option::Option::Some(0),
3460 Self::MetadataAndData => std::option::Option::Some(1),
3461 Self::UnknownValue(u) => u.0.value(),
3462 }
3463 }
3464
3465 pub fn name(&self) -> std::option::Option<&str> {
3470 match self {
3471 Self::Unspecified => std::option::Option::Some("DATA_CLASSIFICATION_UNSPECIFIED"),
3472 Self::MetadataAndData => std::option::Option::Some("METADATA_AND_DATA"),
3473 Self::UnknownValue(u) => u.0.name(),
3474 }
3475 }
3476 }
3477
3478 impl std::default::Default for DataClassification {
3479 fn default() -> Self {
3480 use std::convert::From;
3481 Self::from(0)
3482 }
3483 }
3484
3485 impl std::fmt::Display for DataClassification {
3486 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3487 wkt::internal::display_enum(f, self.name(), self.value())
3488 }
3489 }
3490
3491 impl std::convert::From<i32> for DataClassification {
3492 fn from(value: i32) -> Self {
3493 match value {
3494 0 => Self::Unspecified,
3495 1 => Self::MetadataAndData,
3496 _ => Self::UnknownValue(data_classification::UnknownValue(
3497 wkt::internal::UnknownEnumValue::Integer(value),
3498 )),
3499 }
3500 }
3501 }
3502
3503 impl std::convert::From<&str> for DataClassification {
3504 fn from(value: &str) -> Self {
3505 use std::string::ToString;
3506 match value {
3507 "DATA_CLASSIFICATION_UNSPECIFIED" => Self::Unspecified,
3508 "METADATA_AND_DATA" => Self::MetadataAndData,
3509 _ => Self::UnknownValue(data_classification::UnknownValue(
3510 wkt::internal::UnknownEnumValue::String(value.to_string()),
3511 )),
3512 }
3513 }
3514 }
3515
3516 impl serde::ser::Serialize for DataClassification {
3517 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3518 where
3519 S: serde::Serializer,
3520 {
3521 match self {
3522 Self::Unspecified => serializer.serialize_i32(0),
3523 Self::MetadataAndData => serializer.serialize_i32(1),
3524 Self::UnknownValue(u) => u.0.serialize(serializer),
3525 }
3526 }
3527 }
3528
3529 impl<'de> serde::de::Deserialize<'de> for DataClassification {
3530 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3531 where
3532 D: serde::Deserializer<'de>,
3533 {
3534 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataClassification>::new(
3535 ".google.cloud.dataplex.v1.AspectType.DataClassification",
3536 ))
3537 }
3538 }
3539}
3540
3541#[derive(Clone, Default, PartialEq)]
3543#[non_exhaustive]
3544pub struct EntryGroup {
3545 pub name: std::string::String,
3548
3549 pub uid: std::string::String,
3553
3554 pub create_time: std::option::Option<wkt::Timestamp>,
3556
3557 pub update_time: std::option::Option<wkt::Timestamp>,
3559
3560 pub description: std::string::String,
3562
3563 pub display_name: std::string::String,
3565
3566 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3568
3569 pub etag: std::string::String,
3573
3574 pub transfer_status: crate::model::TransferStatus,
3577
3578 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3579}
3580
3581impl EntryGroup {
3582 pub fn new() -> Self {
3583 std::default::Default::default()
3584 }
3585
3586 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3588 self.name = v.into();
3589 self
3590 }
3591
3592 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3594 self.uid = v.into();
3595 self
3596 }
3597
3598 pub fn set_create_time<T>(mut self, v: T) -> Self
3600 where
3601 T: std::convert::Into<wkt::Timestamp>,
3602 {
3603 self.create_time = std::option::Option::Some(v.into());
3604 self
3605 }
3606
3607 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3609 where
3610 T: std::convert::Into<wkt::Timestamp>,
3611 {
3612 self.create_time = v.map(|x| x.into());
3613 self
3614 }
3615
3616 pub fn set_update_time<T>(mut self, v: T) -> Self
3618 where
3619 T: std::convert::Into<wkt::Timestamp>,
3620 {
3621 self.update_time = std::option::Option::Some(v.into());
3622 self
3623 }
3624
3625 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3627 where
3628 T: std::convert::Into<wkt::Timestamp>,
3629 {
3630 self.update_time = v.map(|x| x.into());
3631 self
3632 }
3633
3634 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3636 self.description = v.into();
3637 self
3638 }
3639
3640 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3642 self.display_name = v.into();
3643 self
3644 }
3645
3646 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3648 where
3649 T: std::iter::IntoIterator<Item = (K, V)>,
3650 K: std::convert::Into<std::string::String>,
3651 V: std::convert::Into<std::string::String>,
3652 {
3653 use std::iter::Iterator;
3654 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3655 self
3656 }
3657
3658 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3660 self.etag = v.into();
3661 self
3662 }
3663
3664 pub fn set_transfer_status<T: std::convert::Into<crate::model::TransferStatus>>(
3666 mut self,
3667 v: T,
3668 ) -> Self {
3669 self.transfer_status = v.into();
3670 self
3671 }
3672}
3673
3674impl wkt::message::Message for EntryGroup {
3675 fn typename() -> &'static str {
3676 "type.googleapis.com/google.cloud.dataplex.v1.EntryGroup"
3677 }
3678}
3679
3680#[derive(Clone, Default, PartialEq)]
3682#[non_exhaustive]
3683pub struct EntryType {
3684 pub name: std::string::String,
3687
3688 pub uid: std::string::String,
3692
3693 pub create_time: std::option::Option<wkt::Timestamp>,
3695
3696 pub update_time: std::option::Option<wkt::Timestamp>,
3698
3699 pub description: std::string::String,
3701
3702 pub display_name: std::string::String,
3704
3705 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3707
3708 pub etag: std::string::String,
3712
3713 pub type_aliases: std::vec::Vec<std::string::String>,
3716
3717 pub platform: std::string::String,
3719
3720 pub system: std::string::String,
3723
3724 pub required_aspects: std::vec::Vec<crate::model::entry_type::AspectInfo>,
3726
3727 pub authorization: std::option::Option<crate::model::entry_type::Authorization>,
3729
3730 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3731}
3732
3733impl EntryType {
3734 pub fn new() -> Self {
3735 std::default::Default::default()
3736 }
3737
3738 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3740 self.name = v.into();
3741 self
3742 }
3743
3744 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3746 self.uid = v.into();
3747 self
3748 }
3749
3750 pub fn set_create_time<T>(mut self, v: T) -> Self
3752 where
3753 T: std::convert::Into<wkt::Timestamp>,
3754 {
3755 self.create_time = std::option::Option::Some(v.into());
3756 self
3757 }
3758
3759 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3761 where
3762 T: std::convert::Into<wkt::Timestamp>,
3763 {
3764 self.create_time = v.map(|x| x.into());
3765 self
3766 }
3767
3768 pub fn set_update_time<T>(mut self, v: T) -> Self
3770 where
3771 T: std::convert::Into<wkt::Timestamp>,
3772 {
3773 self.update_time = std::option::Option::Some(v.into());
3774 self
3775 }
3776
3777 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
3779 where
3780 T: std::convert::Into<wkt::Timestamp>,
3781 {
3782 self.update_time = v.map(|x| x.into());
3783 self
3784 }
3785
3786 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3788 self.description = v.into();
3789 self
3790 }
3791
3792 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3794 self.display_name = v.into();
3795 self
3796 }
3797
3798 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3800 where
3801 T: std::iter::IntoIterator<Item = (K, V)>,
3802 K: std::convert::Into<std::string::String>,
3803 V: std::convert::Into<std::string::String>,
3804 {
3805 use std::iter::Iterator;
3806 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3807 self
3808 }
3809
3810 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3812 self.etag = v.into();
3813 self
3814 }
3815
3816 pub fn set_type_aliases<T, V>(mut self, v: T) -> Self
3818 where
3819 T: std::iter::IntoIterator<Item = V>,
3820 V: std::convert::Into<std::string::String>,
3821 {
3822 use std::iter::Iterator;
3823 self.type_aliases = v.into_iter().map(|i| i.into()).collect();
3824 self
3825 }
3826
3827 pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3829 self.platform = v.into();
3830 self
3831 }
3832
3833 pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3835 self.system = v.into();
3836 self
3837 }
3838
3839 pub fn set_required_aspects<T, V>(mut self, v: T) -> Self
3841 where
3842 T: std::iter::IntoIterator<Item = V>,
3843 V: std::convert::Into<crate::model::entry_type::AspectInfo>,
3844 {
3845 use std::iter::Iterator;
3846 self.required_aspects = v.into_iter().map(|i| i.into()).collect();
3847 self
3848 }
3849
3850 pub fn set_authorization<T>(mut self, v: T) -> Self
3852 where
3853 T: std::convert::Into<crate::model::entry_type::Authorization>,
3854 {
3855 self.authorization = std::option::Option::Some(v.into());
3856 self
3857 }
3858
3859 pub fn set_or_clear_authorization<T>(mut self, v: std::option::Option<T>) -> Self
3861 where
3862 T: std::convert::Into<crate::model::entry_type::Authorization>,
3863 {
3864 self.authorization = v.map(|x| x.into());
3865 self
3866 }
3867}
3868
3869impl wkt::message::Message for EntryType {
3870 fn typename() -> &'static str {
3871 "type.googleapis.com/google.cloud.dataplex.v1.EntryType"
3872 }
3873}
3874
3875pub mod entry_type {
3877 #[allow(unused_imports)]
3878 use super::*;
3879
3880 #[derive(Clone, Default, PartialEq)]
3881 #[non_exhaustive]
3882 pub struct AspectInfo {
3883 pub r#type: std::string::String,
3885
3886 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3887 }
3888
3889 impl AspectInfo {
3890 pub fn new() -> Self {
3891 std::default::Default::default()
3892 }
3893
3894 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3896 self.r#type = v.into();
3897 self
3898 }
3899 }
3900
3901 impl wkt::message::Message for AspectInfo {
3902 fn typename() -> &'static str {
3903 "type.googleapis.com/google.cloud.dataplex.v1.EntryType.AspectInfo"
3904 }
3905 }
3906
3907 #[derive(Clone, Default, PartialEq)]
3909 #[non_exhaustive]
3910 pub struct Authorization {
3911 pub alternate_use_permission: std::string::String,
3915
3916 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3917 }
3918
3919 impl Authorization {
3920 pub fn new() -> Self {
3921 std::default::Default::default()
3922 }
3923
3924 pub fn set_alternate_use_permission<T: std::convert::Into<std::string::String>>(
3926 mut self,
3927 v: T,
3928 ) -> Self {
3929 self.alternate_use_permission = v.into();
3930 self
3931 }
3932 }
3933
3934 impl wkt::message::Message for Authorization {
3935 fn typename() -> &'static str {
3936 "type.googleapis.com/google.cloud.dataplex.v1.EntryType.Authorization"
3937 }
3938 }
3939}
3940
3941#[derive(Clone, Default, PartialEq)]
3943#[non_exhaustive]
3944pub struct Aspect {
3945 pub aspect_type: std::string::String,
3947
3948 pub path: std::string::String,
3950
3951 pub create_time: std::option::Option<wkt::Timestamp>,
3953
3954 pub update_time: std::option::Option<wkt::Timestamp>,
3956
3957 pub data: std::option::Option<wkt::Struct>,
3960
3961 pub aspect_source: std::option::Option<crate::model::AspectSource>,
3963
3964 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3965}
3966
3967impl Aspect {
3968 pub fn new() -> Self {
3969 std::default::Default::default()
3970 }
3971
3972 pub fn set_aspect_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3974 self.aspect_type = v.into();
3975 self
3976 }
3977
3978 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3980 self.path = v.into();
3981 self
3982 }
3983
3984 pub fn set_create_time<T>(mut self, v: T) -> Self
3986 where
3987 T: std::convert::Into<wkt::Timestamp>,
3988 {
3989 self.create_time = std::option::Option::Some(v.into());
3990 self
3991 }
3992
3993 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3995 where
3996 T: std::convert::Into<wkt::Timestamp>,
3997 {
3998 self.create_time = v.map(|x| x.into());
3999 self
4000 }
4001
4002 pub fn set_update_time<T>(mut self, v: T) -> Self
4004 where
4005 T: std::convert::Into<wkt::Timestamp>,
4006 {
4007 self.update_time = std::option::Option::Some(v.into());
4008 self
4009 }
4010
4011 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4013 where
4014 T: std::convert::Into<wkt::Timestamp>,
4015 {
4016 self.update_time = v.map(|x| x.into());
4017 self
4018 }
4019
4020 pub fn set_data<T>(mut self, v: T) -> Self
4022 where
4023 T: std::convert::Into<wkt::Struct>,
4024 {
4025 self.data = std::option::Option::Some(v.into());
4026 self
4027 }
4028
4029 pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
4031 where
4032 T: std::convert::Into<wkt::Struct>,
4033 {
4034 self.data = v.map(|x| x.into());
4035 self
4036 }
4037
4038 pub fn set_aspect_source<T>(mut self, v: T) -> Self
4040 where
4041 T: std::convert::Into<crate::model::AspectSource>,
4042 {
4043 self.aspect_source = std::option::Option::Some(v.into());
4044 self
4045 }
4046
4047 pub fn set_or_clear_aspect_source<T>(mut self, v: std::option::Option<T>) -> Self
4049 where
4050 T: std::convert::Into<crate::model::AspectSource>,
4051 {
4052 self.aspect_source = v.map(|x| x.into());
4053 self
4054 }
4055}
4056
4057impl wkt::message::Message for Aspect {
4058 fn typename() -> &'static str {
4059 "type.googleapis.com/google.cloud.dataplex.v1.Aspect"
4060 }
4061}
4062
4063#[derive(Clone, Default, PartialEq)]
4065#[non_exhaustive]
4066pub struct AspectSource {
4067 pub create_time: std::option::Option<wkt::Timestamp>,
4069
4070 pub update_time: std::option::Option<wkt::Timestamp>,
4072
4073 pub data_version: std::string::String,
4077
4078 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4079}
4080
4081impl AspectSource {
4082 pub fn new() -> Self {
4083 std::default::Default::default()
4084 }
4085
4086 pub fn set_create_time<T>(mut self, v: T) -> Self
4088 where
4089 T: std::convert::Into<wkt::Timestamp>,
4090 {
4091 self.create_time = std::option::Option::Some(v.into());
4092 self
4093 }
4094
4095 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4097 where
4098 T: std::convert::Into<wkt::Timestamp>,
4099 {
4100 self.create_time = v.map(|x| x.into());
4101 self
4102 }
4103
4104 pub fn set_update_time<T>(mut self, v: T) -> Self
4106 where
4107 T: std::convert::Into<wkt::Timestamp>,
4108 {
4109 self.update_time = std::option::Option::Some(v.into());
4110 self
4111 }
4112
4113 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4115 where
4116 T: std::convert::Into<wkt::Timestamp>,
4117 {
4118 self.update_time = v.map(|x| x.into());
4119 self
4120 }
4121
4122 pub fn set_data_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4124 self.data_version = v.into();
4125 self
4126 }
4127}
4128
4129impl wkt::message::Message for AspectSource {
4130 fn typename() -> &'static str {
4131 "type.googleapis.com/google.cloud.dataplex.v1.AspectSource"
4132 }
4133}
4134
4135#[derive(Clone, Default, PartialEq)]
4138#[non_exhaustive]
4139pub struct Entry {
4140 pub name: std::string::String,
4143
4144 pub entry_type: std::string::String,
4148
4149 pub create_time: std::option::Option<wkt::Timestamp>,
4152
4153 pub update_time: std::option::Option<wkt::Timestamp>,
4156
4157 pub aspects: std::collections::HashMap<std::string::String, crate::model::Aspect>,
4166
4167 pub parent_entry: std::string::String,
4170
4171 pub fully_qualified_name: std::string::String,
4176
4177 pub entry_source: std::option::Option<crate::model::EntrySource>,
4180
4181 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4182}
4183
4184impl Entry {
4185 pub fn new() -> Self {
4186 std::default::Default::default()
4187 }
4188
4189 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4191 self.name = v.into();
4192 self
4193 }
4194
4195 pub fn set_entry_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4197 self.entry_type = v.into();
4198 self
4199 }
4200
4201 pub fn set_create_time<T>(mut self, v: T) -> Self
4203 where
4204 T: std::convert::Into<wkt::Timestamp>,
4205 {
4206 self.create_time = std::option::Option::Some(v.into());
4207 self
4208 }
4209
4210 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4212 where
4213 T: std::convert::Into<wkt::Timestamp>,
4214 {
4215 self.create_time = v.map(|x| x.into());
4216 self
4217 }
4218
4219 pub fn set_update_time<T>(mut self, v: T) -> Self
4221 where
4222 T: std::convert::Into<wkt::Timestamp>,
4223 {
4224 self.update_time = std::option::Option::Some(v.into());
4225 self
4226 }
4227
4228 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4230 where
4231 T: std::convert::Into<wkt::Timestamp>,
4232 {
4233 self.update_time = v.map(|x| x.into());
4234 self
4235 }
4236
4237 pub fn set_aspects<T, K, V>(mut self, v: T) -> Self
4239 where
4240 T: std::iter::IntoIterator<Item = (K, V)>,
4241 K: std::convert::Into<std::string::String>,
4242 V: std::convert::Into<crate::model::Aspect>,
4243 {
4244 use std::iter::Iterator;
4245 self.aspects = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4246 self
4247 }
4248
4249 pub fn set_parent_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4251 self.parent_entry = v.into();
4252 self
4253 }
4254
4255 pub fn set_fully_qualified_name<T: std::convert::Into<std::string::String>>(
4257 mut self,
4258 v: T,
4259 ) -> Self {
4260 self.fully_qualified_name = v.into();
4261 self
4262 }
4263
4264 pub fn set_entry_source<T>(mut self, v: T) -> Self
4266 where
4267 T: std::convert::Into<crate::model::EntrySource>,
4268 {
4269 self.entry_source = std::option::Option::Some(v.into());
4270 self
4271 }
4272
4273 pub fn set_or_clear_entry_source<T>(mut self, v: std::option::Option<T>) -> Self
4275 where
4276 T: std::convert::Into<crate::model::EntrySource>,
4277 {
4278 self.entry_source = v.map(|x| x.into());
4279 self
4280 }
4281}
4282
4283impl wkt::message::Message for Entry {
4284 fn typename() -> &'static str {
4285 "type.googleapis.com/google.cloud.dataplex.v1.Entry"
4286 }
4287}
4288
4289#[derive(Clone, Default, PartialEq)]
4292#[non_exhaustive]
4293pub struct EntrySource {
4294 pub resource: std::string::String,
4297
4298 pub system: std::string::String,
4301
4302 pub platform: std::string::String,
4305
4306 pub display_name: std::string::String,
4309
4310 pub description: std::string::String,
4313
4314 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4317
4318 pub ancestors: std::vec::Vec<crate::model::entry_source::Ancestor>,
4321
4322 pub create_time: std::option::Option<wkt::Timestamp>,
4324
4325 pub update_time: std::option::Option<wkt::Timestamp>,
4330
4331 pub location: std::string::String,
4336
4337 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4338}
4339
4340impl EntrySource {
4341 pub fn new() -> Self {
4342 std::default::Default::default()
4343 }
4344
4345 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4347 self.resource = v.into();
4348 self
4349 }
4350
4351 pub fn set_system<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4353 self.system = v.into();
4354 self
4355 }
4356
4357 pub fn set_platform<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4359 self.platform = v.into();
4360 self
4361 }
4362
4363 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4365 self.display_name = v.into();
4366 self
4367 }
4368
4369 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4371 self.description = v.into();
4372 self
4373 }
4374
4375 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4377 where
4378 T: std::iter::IntoIterator<Item = (K, V)>,
4379 K: std::convert::Into<std::string::String>,
4380 V: std::convert::Into<std::string::String>,
4381 {
4382 use std::iter::Iterator;
4383 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4384 self
4385 }
4386
4387 pub fn set_ancestors<T, V>(mut self, v: T) -> Self
4389 where
4390 T: std::iter::IntoIterator<Item = V>,
4391 V: std::convert::Into<crate::model::entry_source::Ancestor>,
4392 {
4393 use std::iter::Iterator;
4394 self.ancestors = v.into_iter().map(|i| i.into()).collect();
4395 self
4396 }
4397
4398 pub fn set_create_time<T>(mut self, v: T) -> Self
4400 where
4401 T: std::convert::Into<wkt::Timestamp>,
4402 {
4403 self.create_time = std::option::Option::Some(v.into());
4404 self
4405 }
4406
4407 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4409 where
4410 T: std::convert::Into<wkt::Timestamp>,
4411 {
4412 self.create_time = v.map(|x| x.into());
4413 self
4414 }
4415
4416 pub fn set_update_time<T>(mut self, v: T) -> Self
4418 where
4419 T: std::convert::Into<wkt::Timestamp>,
4420 {
4421 self.update_time = std::option::Option::Some(v.into());
4422 self
4423 }
4424
4425 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4427 where
4428 T: std::convert::Into<wkt::Timestamp>,
4429 {
4430 self.update_time = v.map(|x| x.into());
4431 self
4432 }
4433
4434 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4436 self.location = v.into();
4437 self
4438 }
4439}
4440
4441impl wkt::message::Message for EntrySource {
4442 fn typename() -> &'static str {
4443 "type.googleapis.com/google.cloud.dataplex.v1.EntrySource"
4444 }
4445}
4446
4447pub mod entry_source {
4449 #[allow(unused_imports)]
4450 use super::*;
4451
4452 #[derive(Clone, Default, PartialEq)]
4455 #[non_exhaustive]
4456 pub struct Ancestor {
4457 pub name: std::string::String,
4459
4460 pub r#type: std::string::String,
4462
4463 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4464 }
4465
4466 impl Ancestor {
4467 pub fn new() -> Self {
4468 std::default::Default::default()
4469 }
4470
4471 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4473 self.name = v.into();
4474 self
4475 }
4476
4477 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4479 self.r#type = v.into();
4480 self
4481 }
4482 }
4483
4484 impl wkt::message::Message for Ancestor {
4485 fn typename() -> &'static str {
4486 "type.googleapis.com/google.cloud.dataplex.v1.EntrySource.Ancestor"
4487 }
4488 }
4489}
4490
4491#[derive(Clone, Default, PartialEq)]
4493#[non_exhaustive]
4494pub struct CreateEntryGroupRequest {
4495 pub parent: std::string::String,
4499
4500 pub entry_group_id: std::string::String,
4502
4503 pub entry_group: std::option::Option<crate::model::EntryGroup>,
4505
4506 pub validate_only: bool,
4509
4510 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4511}
4512
4513impl CreateEntryGroupRequest {
4514 pub fn new() -> Self {
4515 std::default::Default::default()
4516 }
4517
4518 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4520 self.parent = v.into();
4521 self
4522 }
4523
4524 pub fn set_entry_group_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4526 self.entry_group_id = v.into();
4527 self
4528 }
4529
4530 pub fn set_entry_group<T>(mut self, v: T) -> Self
4532 where
4533 T: std::convert::Into<crate::model::EntryGroup>,
4534 {
4535 self.entry_group = std::option::Option::Some(v.into());
4536 self
4537 }
4538
4539 pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
4541 where
4542 T: std::convert::Into<crate::model::EntryGroup>,
4543 {
4544 self.entry_group = v.map(|x| x.into());
4545 self
4546 }
4547
4548 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4550 self.validate_only = v.into();
4551 self
4552 }
4553}
4554
4555impl wkt::message::Message for CreateEntryGroupRequest {
4556 fn typename() -> &'static str {
4557 "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryGroupRequest"
4558 }
4559}
4560
4561#[derive(Clone, Default, PartialEq)]
4563#[non_exhaustive]
4564pub struct UpdateEntryGroupRequest {
4565 pub entry_group: std::option::Option<crate::model::EntryGroup>,
4567
4568 pub update_mask: std::option::Option<wkt::FieldMask>,
4570
4571 pub validate_only: bool,
4574
4575 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4576}
4577
4578impl UpdateEntryGroupRequest {
4579 pub fn new() -> Self {
4580 std::default::Default::default()
4581 }
4582
4583 pub fn set_entry_group<T>(mut self, v: T) -> Self
4585 where
4586 T: std::convert::Into<crate::model::EntryGroup>,
4587 {
4588 self.entry_group = std::option::Option::Some(v.into());
4589 self
4590 }
4591
4592 pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
4594 where
4595 T: std::convert::Into<crate::model::EntryGroup>,
4596 {
4597 self.entry_group = v.map(|x| x.into());
4598 self
4599 }
4600
4601 pub fn set_update_mask<T>(mut self, v: T) -> Self
4603 where
4604 T: std::convert::Into<wkt::FieldMask>,
4605 {
4606 self.update_mask = std::option::Option::Some(v.into());
4607 self
4608 }
4609
4610 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4612 where
4613 T: std::convert::Into<wkt::FieldMask>,
4614 {
4615 self.update_mask = v.map(|x| x.into());
4616 self
4617 }
4618
4619 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4621 self.validate_only = v.into();
4622 self
4623 }
4624}
4625
4626impl wkt::message::Message for UpdateEntryGroupRequest {
4627 fn typename() -> &'static str {
4628 "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryGroupRequest"
4629 }
4630}
4631
4632#[derive(Clone, Default, PartialEq)]
4634#[non_exhaustive]
4635pub struct DeleteEntryGroupRequest {
4636 pub name: std::string::String,
4639
4640 pub etag: std::string::String,
4644
4645 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4646}
4647
4648impl DeleteEntryGroupRequest {
4649 pub fn new() -> Self {
4650 std::default::Default::default()
4651 }
4652
4653 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4655 self.name = v.into();
4656 self
4657 }
4658
4659 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4661 self.etag = v.into();
4662 self
4663 }
4664}
4665
4666impl wkt::message::Message for DeleteEntryGroupRequest {
4667 fn typename() -> &'static str {
4668 "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryGroupRequest"
4669 }
4670}
4671
4672#[derive(Clone, Default, PartialEq)]
4674#[non_exhaustive]
4675pub struct ListEntryGroupsRequest {
4676 pub parent: std::string::String,
4680
4681 pub page_size: i32,
4686
4687 pub page_token: std::string::String,
4692
4693 pub filter: std::string::String,
4695
4696 pub order_by: std::string::String,
4698
4699 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4700}
4701
4702impl ListEntryGroupsRequest {
4703 pub fn new() -> Self {
4704 std::default::Default::default()
4705 }
4706
4707 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4709 self.parent = v.into();
4710 self
4711 }
4712
4713 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4715 self.page_size = v.into();
4716 self
4717 }
4718
4719 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4721 self.page_token = v.into();
4722 self
4723 }
4724
4725 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4727 self.filter = v.into();
4728 self
4729 }
4730
4731 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4733 self.order_by = v.into();
4734 self
4735 }
4736}
4737
4738impl wkt::message::Message for ListEntryGroupsRequest {
4739 fn typename() -> &'static str {
4740 "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsRequest"
4741 }
4742}
4743
4744#[derive(Clone, Default, PartialEq)]
4746#[non_exhaustive]
4747pub struct ListEntryGroupsResponse {
4748 pub entry_groups: std::vec::Vec<crate::model::EntryGroup>,
4750
4751 pub next_page_token: std::string::String,
4754
4755 pub unreachable_locations: std::vec::Vec<std::string::String>,
4757
4758 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4759}
4760
4761impl ListEntryGroupsResponse {
4762 pub fn new() -> Self {
4763 std::default::Default::default()
4764 }
4765
4766 pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
4768 where
4769 T: std::iter::IntoIterator<Item = V>,
4770 V: std::convert::Into<crate::model::EntryGroup>,
4771 {
4772 use std::iter::Iterator;
4773 self.entry_groups = v.into_iter().map(|i| i.into()).collect();
4774 self
4775 }
4776
4777 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4779 self.next_page_token = v.into();
4780 self
4781 }
4782
4783 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
4785 where
4786 T: std::iter::IntoIterator<Item = V>,
4787 V: std::convert::Into<std::string::String>,
4788 {
4789 use std::iter::Iterator;
4790 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
4791 self
4792 }
4793}
4794
4795impl wkt::message::Message for ListEntryGroupsResponse {
4796 fn typename() -> &'static str {
4797 "type.googleapis.com/google.cloud.dataplex.v1.ListEntryGroupsResponse"
4798 }
4799}
4800
4801#[doc(hidden)]
4802impl gax::paginator::internal::PageableResponse for ListEntryGroupsResponse {
4803 type PageItem = crate::model::EntryGroup;
4804
4805 fn items(self) -> std::vec::Vec<Self::PageItem> {
4806 self.entry_groups
4807 }
4808
4809 fn next_page_token(&self) -> std::string::String {
4810 use std::clone::Clone;
4811 self.next_page_token.clone()
4812 }
4813}
4814
4815#[derive(Clone, Default, PartialEq)]
4817#[non_exhaustive]
4818pub struct GetEntryGroupRequest {
4819 pub name: std::string::String,
4822
4823 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4824}
4825
4826impl GetEntryGroupRequest {
4827 pub fn new() -> Self {
4828 std::default::Default::default()
4829 }
4830
4831 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4833 self.name = v.into();
4834 self
4835 }
4836}
4837
4838impl wkt::message::Message for GetEntryGroupRequest {
4839 fn typename() -> &'static str {
4840 "type.googleapis.com/google.cloud.dataplex.v1.GetEntryGroupRequest"
4841 }
4842}
4843
4844#[derive(Clone, Default, PartialEq)]
4846#[non_exhaustive]
4847pub struct CreateEntryTypeRequest {
4848 pub parent: std::string::String,
4852
4853 pub entry_type_id: std::string::String,
4855
4856 pub entry_type: std::option::Option<crate::model::EntryType>,
4858
4859 pub validate_only: bool,
4862
4863 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4864}
4865
4866impl CreateEntryTypeRequest {
4867 pub fn new() -> Self {
4868 std::default::Default::default()
4869 }
4870
4871 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4873 self.parent = v.into();
4874 self
4875 }
4876
4877 pub fn set_entry_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4879 self.entry_type_id = v.into();
4880 self
4881 }
4882
4883 pub fn set_entry_type<T>(mut self, v: T) -> Self
4885 where
4886 T: std::convert::Into<crate::model::EntryType>,
4887 {
4888 self.entry_type = std::option::Option::Some(v.into());
4889 self
4890 }
4891
4892 pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
4894 where
4895 T: std::convert::Into<crate::model::EntryType>,
4896 {
4897 self.entry_type = v.map(|x| x.into());
4898 self
4899 }
4900
4901 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4903 self.validate_only = v.into();
4904 self
4905 }
4906}
4907
4908impl wkt::message::Message for CreateEntryTypeRequest {
4909 fn typename() -> &'static str {
4910 "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryTypeRequest"
4911 }
4912}
4913
4914#[derive(Clone, Default, PartialEq)]
4916#[non_exhaustive]
4917pub struct UpdateEntryTypeRequest {
4918 pub entry_type: std::option::Option<crate::model::EntryType>,
4920
4921 pub update_mask: std::option::Option<wkt::FieldMask>,
4923
4924 pub validate_only: bool,
4927
4928 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4929}
4930
4931impl UpdateEntryTypeRequest {
4932 pub fn new() -> Self {
4933 std::default::Default::default()
4934 }
4935
4936 pub fn set_entry_type<T>(mut self, v: T) -> Self
4938 where
4939 T: std::convert::Into<crate::model::EntryType>,
4940 {
4941 self.entry_type = std::option::Option::Some(v.into());
4942 self
4943 }
4944
4945 pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
4947 where
4948 T: std::convert::Into<crate::model::EntryType>,
4949 {
4950 self.entry_type = v.map(|x| x.into());
4951 self
4952 }
4953
4954 pub fn set_update_mask<T>(mut self, v: T) -> Self
4956 where
4957 T: std::convert::Into<wkt::FieldMask>,
4958 {
4959 self.update_mask = std::option::Option::Some(v.into());
4960 self
4961 }
4962
4963 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4965 where
4966 T: std::convert::Into<wkt::FieldMask>,
4967 {
4968 self.update_mask = v.map(|x| x.into());
4969 self
4970 }
4971
4972 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4974 self.validate_only = v.into();
4975 self
4976 }
4977}
4978
4979impl wkt::message::Message for UpdateEntryTypeRequest {
4980 fn typename() -> &'static str {
4981 "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryTypeRequest"
4982 }
4983}
4984
4985#[derive(Clone, Default, PartialEq)]
4987#[non_exhaustive]
4988pub struct DeleteEntryTypeRequest {
4989 pub name: std::string::String,
4992
4993 pub etag: std::string::String,
4996
4997 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4998}
4999
5000impl DeleteEntryTypeRequest {
5001 pub fn new() -> Self {
5002 std::default::Default::default()
5003 }
5004
5005 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5007 self.name = v.into();
5008 self
5009 }
5010
5011 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5013 self.etag = v.into();
5014 self
5015 }
5016}
5017
5018impl wkt::message::Message for DeleteEntryTypeRequest {
5019 fn typename() -> &'static str {
5020 "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryTypeRequest"
5021 }
5022}
5023
5024#[derive(Clone, Default, PartialEq)]
5026#[non_exhaustive]
5027pub struct ListEntryTypesRequest {
5028 pub parent: std::string::String,
5032
5033 pub page_size: i32,
5038
5039 pub page_token: std::string::String,
5044
5045 pub filter: std::string::String,
5054
5055 pub order_by: std::string::String,
5058
5059 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5060}
5061
5062impl ListEntryTypesRequest {
5063 pub fn new() -> Self {
5064 std::default::Default::default()
5065 }
5066
5067 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5069 self.parent = v.into();
5070 self
5071 }
5072
5073 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5075 self.page_size = v.into();
5076 self
5077 }
5078
5079 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5081 self.page_token = v.into();
5082 self
5083 }
5084
5085 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5087 self.filter = v.into();
5088 self
5089 }
5090
5091 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5093 self.order_by = v.into();
5094 self
5095 }
5096}
5097
5098impl wkt::message::Message for ListEntryTypesRequest {
5099 fn typename() -> &'static str {
5100 "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesRequest"
5101 }
5102}
5103
5104#[derive(Clone, Default, PartialEq)]
5106#[non_exhaustive]
5107pub struct ListEntryTypesResponse {
5108 pub entry_types: std::vec::Vec<crate::model::EntryType>,
5110
5111 pub next_page_token: std::string::String,
5114
5115 pub unreachable_locations: std::vec::Vec<std::string::String>,
5117
5118 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5119}
5120
5121impl ListEntryTypesResponse {
5122 pub fn new() -> Self {
5123 std::default::Default::default()
5124 }
5125
5126 pub fn set_entry_types<T, V>(mut self, v: T) -> Self
5128 where
5129 T: std::iter::IntoIterator<Item = V>,
5130 V: std::convert::Into<crate::model::EntryType>,
5131 {
5132 use std::iter::Iterator;
5133 self.entry_types = v.into_iter().map(|i| i.into()).collect();
5134 self
5135 }
5136
5137 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5139 self.next_page_token = v.into();
5140 self
5141 }
5142
5143 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
5145 where
5146 T: std::iter::IntoIterator<Item = V>,
5147 V: std::convert::Into<std::string::String>,
5148 {
5149 use std::iter::Iterator;
5150 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
5151 self
5152 }
5153}
5154
5155impl wkt::message::Message for ListEntryTypesResponse {
5156 fn typename() -> &'static str {
5157 "type.googleapis.com/google.cloud.dataplex.v1.ListEntryTypesResponse"
5158 }
5159}
5160
5161#[doc(hidden)]
5162impl gax::paginator::internal::PageableResponse for ListEntryTypesResponse {
5163 type PageItem = crate::model::EntryType;
5164
5165 fn items(self) -> std::vec::Vec<Self::PageItem> {
5166 self.entry_types
5167 }
5168
5169 fn next_page_token(&self) -> std::string::String {
5170 use std::clone::Clone;
5171 self.next_page_token.clone()
5172 }
5173}
5174
5175#[derive(Clone, Default, PartialEq)]
5177#[non_exhaustive]
5178pub struct GetEntryTypeRequest {
5179 pub name: std::string::String,
5182
5183 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5184}
5185
5186impl GetEntryTypeRequest {
5187 pub fn new() -> Self {
5188 std::default::Default::default()
5189 }
5190
5191 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5193 self.name = v.into();
5194 self
5195 }
5196}
5197
5198impl wkt::message::Message for GetEntryTypeRequest {
5199 fn typename() -> &'static str {
5200 "type.googleapis.com/google.cloud.dataplex.v1.GetEntryTypeRequest"
5201 }
5202}
5203
5204#[derive(Clone, Default, PartialEq)]
5206#[non_exhaustive]
5207pub struct CreateAspectTypeRequest {
5208 pub parent: std::string::String,
5212
5213 pub aspect_type_id: std::string::String,
5215
5216 pub aspect_type: std::option::Option<crate::model::AspectType>,
5218
5219 pub validate_only: bool,
5222
5223 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5224}
5225
5226impl CreateAspectTypeRequest {
5227 pub fn new() -> Self {
5228 std::default::Default::default()
5229 }
5230
5231 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5233 self.parent = v.into();
5234 self
5235 }
5236
5237 pub fn set_aspect_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5239 self.aspect_type_id = v.into();
5240 self
5241 }
5242
5243 pub fn set_aspect_type<T>(mut self, v: T) -> Self
5245 where
5246 T: std::convert::Into<crate::model::AspectType>,
5247 {
5248 self.aspect_type = std::option::Option::Some(v.into());
5249 self
5250 }
5251
5252 pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
5254 where
5255 T: std::convert::Into<crate::model::AspectType>,
5256 {
5257 self.aspect_type = v.map(|x| x.into());
5258 self
5259 }
5260
5261 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5263 self.validate_only = v.into();
5264 self
5265 }
5266}
5267
5268impl wkt::message::Message for CreateAspectTypeRequest {
5269 fn typename() -> &'static str {
5270 "type.googleapis.com/google.cloud.dataplex.v1.CreateAspectTypeRequest"
5271 }
5272}
5273
5274#[derive(Clone, Default, PartialEq)]
5276#[non_exhaustive]
5277pub struct UpdateAspectTypeRequest {
5278 pub aspect_type: std::option::Option<crate::model::AspectType>,
5280
5281 pub update_mask: std::option::Option<wkt::FieldMask>,
5283
5284 pub validate_only: bool,
5287
5288 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5289}
5290
5291impl UpdateAspectTypeRequest {
5292 pub fn new() -> Self {
5293 std::default::Default::default()
5294 }
5295
5296 pub fn set_aspect_type<T>(mut self, v: T) -> Self
5298 where
5299 T: std::convert::Into<crate::model::AspectType>,
5300 {
5301 self.aspect_type = std::option::Option::Some(v.into());
5302 self
5303 }
5304
5305 pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
5307 where
5308 T: std::convert::Into<crate::model::AspectType>,
5309 {
5310 self.aspect_type = v.map(|x| x.into());
5311 self
5312 }
5313
5314 pub fn set_update_mask<T>(mut self, v: T) -> Self
5316 where
5317 T: std::convert::Into<wkt::FieldMask>,
5318 {
5319 self.update_mask = std::option::Option::Some(v.into());
5320 self
5321 }
5322
5323 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5325 where
5326 T: std::convert::Into<wkt::FieldMask>,
5327 {
5328 self.update_mask = v.map(|x| x.into());
5329 self
5330 }
5331
5332 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5334 self.validate_only = v.into();
5335 self
5336 }
5337}
5338
5339impl wkt::message::Message for UpdateAspectTypeRequest {
5340 fn typename() -> &'static str {
5341 "type.googleapis.com/google.cloud.dataplex.v1.UpdateAspectTypeRequest"
5342 }
5343}
5344
5345#[derive(Clone, Default, PartialEq)]
5347#[non_exhaustive]
5348pub struct DeleteAspectTypeRequest {
5349 pub name: std::string::String,
5352
5353 pub etag: std::string::String,
5357
5358 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5359}
5360
5361impl DeleteAspectTypeRequest {
5362 pub fn new() -> Self {
5363 std::default::Default::default()
5364 }
5365
5366 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5368 self.name = v.into();
5369 self
5370 }
5371
5372 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5374 self.etag = v.into();
5375 self
5376 }
5377}
5378
5379impl wkt::message::Message for DeleteAspectTypeRequest {
5380 fn typename() -> &'static str {
5381 "type.googleapis.com/google.cloud.dataplex.v1.DeleteAspectTypeRequest"
5382 }
5383}
5384
5385#[derive(Clone, Default, PartialEq)]
5387#[non_exhaustive]
5388pub struct ListAspectTypesRequest {
5389 pub parent: std::string::String,
5393
5394 pub page_size: i32,
5399
5400 pub page_token: std::string::String,
5405
5406 pub filter: std::string::String,
5415
5416 pub order_by: std::string::String,
5419
5420 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5421}
5422
5423impl ListAspectTypesRequest {
5424 pub fn new() -> Self {
5425 std::default::Default::default()
5426 }
5427
5428 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5430 self.parent = v.into();
5431 self
5432 }
5433
5434 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5436 self.page_size = v.into();
5437 self
5438 }
5439
5440 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5442 self.page_token = v.into();
5443 self
5444 }
5445
5446 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5448 self.filter = v.into();
5449 self
5450 }
5451
5452 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5454 self.order_by = v.into();
5455 self
5456 }
5457}
5458
5459impl wkt::message::Message for ListAspectTypesRequest {
5460 fn typename() -> &'static str {
5461 "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesRequest"
5462 }
5463}
5464
5465#[derive(Clone, Default, PartialEq)]
5467#[non_exhaustive]
5468pub struct ListAspectTypesResponse {
5469 pub aspect_types: std::vec::Vec<crate::model::AspectType>,
5471
5472 pub next_page_token: std::string::String,
5475
5476 pub unreachable_locations: std::vec::Vec<std::string::String>,
5478
5479 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5480}
5481
5482impl ListAspectTypesResponse {
5483 pub fn new() -> Self {
5484 std::default::Default::default()
5485 }
5486
5487 pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
5489 where
5490 T: std::iter::IntoIterator<Item = V>,
5491 V: std::convert::Into<crate::model::AspectType>,
5492 {
5493 use std::iter::Iterator;
5494 self.aspect_types = v.into_iter().map(|i| i.into()).collect();
5495 self
5496 }
5497
5498 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5500 self.next_page_token = v.into();
5501 self
5502 }
5503
5504 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
5506 where
5507 T: std::iter::IntoIterator<Item = V>,
5508 V: std::convert::Into<std::string::String>,
5509 {
5510 use std::iter::Iterator;
5511 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
5512 self
5513 }
5514}
5515
5516impl wkt::message::Message for ListAspectTypesResponse {
5517 fn typename() -> &'static str {
5518 "type.googleapis.com/google.cloud.dataplex.v1.ListAspectTypesResponse"
5519 }
5520}
5521
5522#[doc(hidden)]
5523impl gax::paginator::internal::PageableResponse for ListAspectTypesResponse {
5524 type PageItem = crate::model::AspectType;
5525
5526 fn items(self) -> std::vec::Vec<Self::PageItem> {
5527 self.aspect_types
5528 }
5529
5530 fn next_page_token(&self) -> std::string::String {
5531 use std::clone::Clone;
5532 self.next_page_token.clone()
5533 }
5534}
5535
5536#[derive(Clone, Default, PartialEq)]
5538#[non_exhaustive]
5539pub struct GetAspectTypeRequest {
5540 pub name: std::string::String,
5543
5544 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5545}
5546
5547impl GetAspectTypeRequest {
5548 pub fn new() -> Self {
5549 std::default::Default::default()
5550 }
5551
5552 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5554 self.name = v.into();
5555 self
5556 }
5557}
5558
5559impl wkt::message::Message for GetAspectTypeRequest {
5560 fn typename() -> &'static str {
5561 "type.googleapis.com/google.cloud.dataplex.v1.GetAspectTypeRequest"
5562 }
5563}
5564
5565#[derive(Clone, Default, PartialEq)]
5567#[non_exhaustive]
5568pub struct CreateEntryRequest {
5569 pub parent: std::string::String,
5572
5573 pub entry_id: std::string::String,
5594
5595 pub entry: std::option::Option<crate::model::Entry>,
5597
5598 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5599}
5600
5601impl CreateEntryRequest {
5602 pub fn new() -> Self {
5603 std::default::Default::default()
5604 }
5605
5606 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5608 self.parent = v.into();
5609 self
5610 }
5611
5612 pub fn set_entry_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5614 self.entry_id = v.into();
5615 self
5616 }
5617
5618 pub fn set_entry<T>(mut self, v: T) -> Self
5620 where
5621 T: std::convert::Into<crate::model::Entry>,
5622 {
5623 self.entry = std::option::Option::Some(v.into());
5624 self
5625 }
5626
5627 pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
5629 where
5630 T: std::convert::Into<crate::model::Entry>,
5631 {
5632 self.entry = v.map(|x| x.into());
5633 self
5634 }
5635}
5636
5637impl wkt::message::Message for CreateEntryRequest {
5638 fn typename() -> &'static str {
5639 "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryRequest"
5640 }
5641}
5642
5643#[derive(Clone, Default, PartialEq)]
5645#[non_exhaustive]
5646pub struct UpdateEntryRequest {
5647 pub entry: std::option::Option<crate::model::Entry>,
5649
5650 pub update_mask: std::option::Option<wkt::FieldMask>,
5656
5657 pub allow_missing: bool,
5660
5661 pub delete_missing_aspects: bool,
5665
5666 pub aspect_keys: std::vec::Vec<std::string::String>,
5685
5686 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5687}
5688
5689impl UpdateEntryRequest {
5690 pub fn new() -> Self {
5691 std::default::Default::default()
5692 }
5693
5694 pub fn set_entry<T>(mut self, v: T) -> Self
5696 where
5697 T: std::convert::Into<crate::model::Entry>,
5698 {
5699 self.entry = std::option::Option::Some(v.into());
5700 self
5701 }
5702
5703 pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
5705 where
5706 T: std::convert::Into<crate::model::Entry>,
5707 {
5708 self.entry = v.map(|x| x.into());
5709 self
5710 }
5711
5712 pub fn set_update_mask<T>(mut self, v: T) -> Self
5714 where
5715 T: std::convert::Into<wkt::FieldMask>,
5716 {
5717 self.update_mask = std::option::Option::Some(v.into());
5718 self
5719 }
5720
5721 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5723 where
5724 T: std::convert::Into<wkt::FieldMask>,
5725 {
5726 self.update_mask = v.map(|x| x.into());
5727 self
5728 }
5729
5730 pub fn set_allow_missing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5732 self.allow_missing = v.into();
5733 self
5734 }
5735
5736 pub fn set_delete_missing_aspects<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5738 self.delete_missing_aspects = v.into();
5739 self
5740 }
5741
5742 pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
5744 where
5745 T: std::iter::IntoIterator<Item = V>,
5746 V: std::convert::Into<std::string::String>,
5747 {
5748 use std::iter::Iterator;
5749 self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
5750 self
5751 }
5752}
5753
5754impl wkt::message::Message for UpdateEntryRequest {
5755 fn typename() -> &'static str {
5756 "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntryRequest"
5757 }
5758}
5759
5760#[derive(Clone, Default, PartialEq)]
5762#[non_exhaustive]
5763pub struct DeleteEntryRequest {
5764 pub name: std::string::String,
5767
5768 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5769}
5770
5771impl DeleteEntryRequest {
5772 pub fn new() -> Self {
5773 std::default::Default::default()
5774 }
5775
5776 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5778 self.name = v.into();
5779 self
5780 }
5781}
5782
5783impl wkt::message::Message for DeleteEntryRequest {
5784 fn typename() -> &'static str {
5785 "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryRequest"
5786 }
5787}
5788
5789#[derive(Clone, Default, PartialEq)]
5791#[non_exhaustive]
5792pub struct ListEntriesRequest {
5793 pub parent: std::string::String,
5796
5797 pub page_size: i32,
5802
5803 pub page_token: std::string::String,
5806
5807 pub filter: std::string::String,
5833
5834 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5835}
5836
5837impl ListEntriesRequest {
5838 pub fn new() -> Self {
5839 std::default::Default::default()
5840 }
5841
5842 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5844 self.parent = v.into();
5845 self
5846 }
5847
5848 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5850 self.page_size = v.into();
5851 self
5852 }
5853
5854 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5856 self.page_token = v.into();
5857 self
5858 }
5859
5860 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5862 self.filter = v.into();
5863 self
5864 }
5865}
5866
5867impl wkt::message::Message for ListEntriesRequest {
5868 fn typename() -> &'static str {
5869 "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesRequest"
5870 }
5871}
5872
5873#[derive(Clone, Default, PartialEq)]
5875#[non_exhaustive]
5876pub struct ListEntriesResponse {
5877 pub entries: std::vec::Vec<crate::model::Entry>,
5879
5880 pub next_page_token: std::string::String,
5883
5884 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5885}
5886
5887impl ListEntriesResponse {
5888 pub fn new() -> Self {
5889 std::default::Default::default()
5890 }
5891
5892 pub fn set_entries<T, V>(mut self, v: T) -> Self
5894 where
5895 T: std::iter::IntoIterator<Item = V>,
5896 V: std::convert::Into<crate::model::Entry>,
5897 {
5898 use std::iter::Iterator;
5899 self.entries = v.into_iter().map(|i| i.into()).collect();
5900 self
5901 }
5902
5903 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5905 self.next_page_token = v.into();
5906 self
5907 }
5908}
5909
5910impl wkt::message::Message for ListEntriesResponse {
5911 fn typename() -> &'static str {
5912 "type.googleapis.com/google.cloud.dataplex.v1.ListEntriesResponse"
5913 }
5914}
5915
5916#[doc(hidden)]
5917impl gax::paginator::internal::PageableResponse for ListEntriesResponse {
5918 type PageItem = crate::model::Entry;
5919
5920 fn items(self) -> std::vec::Vec<Self::PageItem> {
5921 self.entries
5922 }
5923
5924 fn next_page_token(&self) -> std::string::String {
5925 use std::clone::Clone;
5926 self.next_page_token.clone()
5927 }
5928}
5929
5930#[derive(Clone, Default, PartialEq)]
5932#[non_exhaustive]
5933pub struct GetEntryRequest {
5934 pub name: std::string::String,
5937
5938 pub view: crate::model::EntryView,
5941
5942 pub aspect_types: std::vec::Vec<std::string::String>,
5945
5946 pub paths: std::vec::Vec<std::string::String>,
5949
5950 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5951}
5952
5953impl GetEntryRequest {
5954 pub fn new() -> Self {
5955 std::default::Default::default()
5956 }
5957
5958 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5960 self.name = v.into();
5961 self
5962 }
5963
5964 pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
5966 self.view = v.into();
5967 self
5968 }
5969
5970 pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
5972 where
5973 T: std::iter::IntoIterator<Item = V>,
5974 V: std::convert::Into<std::string::String>,
5975 {
5976 use std::iter::Iterator;
5977 self.aspect_types = v.into_iter().map(|i| i.into()).collect();
5978 self
5979 }
5980
5981 pub fn set_paths<T, V>(mut self, v: T) -> Self
5983 where
5984 T: std::iter::IntoIterator<Item = V>,
5985 V: std::convert::Into<std::string::String>,
5986 {
5987 use std::iter::Iterator;
5988 self.paths = v.into_iter().map(|i| i.into()).collect();
5989 self
5990 }
5991}
5992
5993impl wkt::message::Message for GetEntryRequest {
5994 fn typename() -> &'static str {
5995 "type.googleapis.com/google.cloud.dataplex.v1.GetEntryRequest"
5996 }
5997}
5998
5999#[derive(Clone, Default, PartialEq)]
6001#[non_exhaustive]
6002pub struct LookupEntryRequest {
6003 pub name: std::string::String,
6006
6007 pub view: crate::model::EntryView,
6010
6011 pub aspect_types: std::vec::Vec<std::string::String>,
6014
6015 pub paths: std::vec::Vec<std::string::String>,
6018
6019 pub entry: std::string::String,
6022
6023 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6024}
6025
6026impl LookupEntryRequest {
6027 pub fn new() -> Self {
6028 std::default::Default::default()
6029 }
6030
6031 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6033 self.name = v.into();
6034 self
6035 }
6036
6037 pub fn set_view<T: std::convert::Into<crate::model::EntryView>>(mut self, v: T) -> Self {
6039 self.view = v.into();
6040 self
6041 }
6042
6043 pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
6045 where
6046 T: std::iter::IntoIterator<Item = V>,
6047 V: std::convert::Into<std::string::String>,
6048 {
6049 use std::iter::Iterator;
6050 self.aspect_types = v.into_iter().map(|i| i.into()).collect();
6051 self
6052 }
6053
6054 pub fn set_paths<T, V>(mut self, v: T) -> Self
6056 where
6057 T: std::iter::IntoIterator<Item = V>,
6058 V: std::convert::Into<std::string::String>,
6059 {
6060 use std::iter::Iterator;
6061 self.paths = v.into_iter().map(|i| i.into()).collect();
6062 self
6063 }
6064
6065 pub fn set_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6067 self.entry = v.into();
6068 self
6069 }
6070}
6071
6072impl wkt::message::Message for LookupEntryRequest {
6073 fn typename() -> &'static str {
6074 "type.googleapis.com/google.cloud.dataplex.v1.LookupEntryRequest"
6075 }
6076}
6077
6078#[derive(Clone, Default, PartialEq)]
6079#[non_exhaustive]
6080pub struct SearchEntriesRequest {
6081 pub name: std::string::String,
6084
6085 pub query: std::string::String,
6089
6090 pub page_size: i32,
6094
6095 pub page_token: std::string::String,
6098
6099 pub order_by: std::string::String,
6106
6107 pub scope: std::string::String,
6112
6113 pub semantic_search: bool,
6116
6117 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6118}
6119
6120impl SearchEntriesRequest {
6121 pub fn new() -> Self {
6122 std::default::Default::default()
6123 }
6124
6125 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6127 self.name = v.into();
6128 self
6129 }
6130
6131 pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6133 self.query = v.into();
6134 self
6135 }
6136
6137 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6139 self.page_size = v.into();
6140 self
6141 }
6142
6143 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6145 self.page_token = v.into();
6146 self
6147 }
6148
6149 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6151 self.order_by = v.into();
6152 self
6153 }
6154
6155 pub fn set_scope<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6157 self.scope = v.into();
6158 self
6159 }
6160
6161 pub fn set_semantic_search<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6163 self.semantic_search = v.into();
6164 self
6165 }
6166}
6167
6168impl wkt::message::Message for SearchEntriesRequest {
6169 fn typename() -> &'static str {
6170 "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesRequest"
6171 }
6172}
6173
6174#[derive(Clone, Default, PartialEq)]
6176#[non_exhaustive]
6177pub struct SearchEntriesResult {
6178 #[deprecated]
6180 pub linked_resource: std::string::String,
6181
6182 pub dataplex_entry: std::option::Option<crate::model::Entry>,
6183
6184 #[deprecated]
6186 pub snippets: std::option::Option<crate::model::search_entries_result::Snippets>,
6187
6188 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6189}
6190
6191impl SearchEntriesResult {
6192 pub fn new() -> Self {
6193 std::default::Default::default()
6194 }
6195
6196 #[deprecated]
6198 pub fn set_linked_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6199 self.linked_resource = v.into();
6200 self
6201 }
6202
6203 pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
6205 where
6206 T: std::convert::Into<crate::model::Entry>,
6207 {
6208 self.dataplex_entry = std::option::Option::Some(v.into());
6209 self
6210 }
6211
6212 pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
6214 where
6215 T: std::convert::Into<crate::model::Entry>,
6216 {
6217 self.dataplex_entry = v.map(|x| x.into());
6218 self
6219 }
6220
6221 #[deprecated]
6223 pub fn set_snippets<T>(mut self, v: T) -> Self
6224 where
6225 T: std::convert::Into<crate::model::search_entries_result::Snippets>,
6226 {
6227 self.snippets = std::option::Option::Some(v.into());
6228 self
6229 }
6230
6231 #[deprecated]
6233 pub fn set_or_clear_snippets<T>(mut self, v: std::option::Option<T>) -> Self
6234 where
6235 T: std::convert::Into<crate::model::search_entries_result::Snippets>,
6236 {
6237 self.snippets = v.map(|x| x.into());
6238 self
6239 }
6240}
6241
6242impl wkt::message::Message for SearchEntriesResult {
6243 fn typename() -> &'static str {
6244 "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult"
6245 }
6246}
6247
6248pub mod search_entries_result {
6250 #[allow(unused_imports)]
6251 use super::*;
6252
6253 #[derive(Clone, Default, PartialEq)]
6256 #[non_exhaustive]
6257 #[deprecated]
6258 pub struct Snippets {
6259 #[deprecated]
6261 pub dataplex_entry: std::option::Option<crate::model::Entry>,
6262
6263 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6264 }
6265
6266 impl Snippets {
6267 pub fn new() -> Self {
6268 std::default::Default::default()
6269 }
6270
6271 #[deprecated]
6273 pub fn set_dataplex_entry<T>(mut self, v: T) -> Self
6274 where
6275 T: std::convert::Into<crate::model::Entry>,
6276 {
6277 self.dataplex_entry = std::option::Option::Some(v.into());
6278 self
6279 }
6280
6281 #[deprecated]
6283 pub fn set_or_clear_dataplex_entry<T>(mut self, v: std::option::Option<T>) -> Self
6284 where
6285 T: std::convert::Into<crate::model::Entry>,
6286 {
6287 self.dataplex_entry = v.map(|x| x.into());
6288 self
6289 }
6290 }
6291
6292 impl wkt::message::Message for Snippets {
6293 fn typename() -> &'static str {
6294 "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResult.Snippets"
6295 }
6296 }
6297}
6298
6299#[derive(Clone, Default, PartialEq)]
6300#[non_exhaustive]
6301pub struct SearchEntriesResponse {
6302 pub results: std::vec::Vec<crate::model::SearchEntriesResult>,
6304
6305 pub total_size: i32,
6308
6309 pub next_page_token: std::string::String,
6312
6313 pub unreachable: std::vec::Vec<std::string::String>,
6316
6317 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6318}
6319
6320impl SearchEntriesResponse {
6321 pub fn new() -> Self {
6322 std::default::Default::default()
6323 }
6324
6325 pub fn set_results<T, V>(mut self, v: T) -> Self
6327 where
6328 T: std::iter::IntoIterator<Item = V>,
6329 V: std::convert::Into<crate::model::SearchEntriesResult>,
6330 {
6331 use std::iter::Iterator;
6332 self.results = v.into_iter().map(|i| i.into()).collect();
6333 self
6334 }
6335
6336 pub fn set_total_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6338 self.total_size = v.into();
6339 self
6340 }
6341
6342 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6344 self.next_page_token = v.into();
6345 self
6346 }
6347
6348 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6350 where
6351 T: std::iter::IntoIterator<Item = V>,
6352 V: std::convert::Into<std::string::String>,
6353 {
6354 use std::iter::Iterator;
6355 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6356 self
6357 }
6358}
6359
6360impl wkt::message::Message for SearchEntriesResponse {
6361 fn typename() -> &'static str {
6362 "type.googleapis.com/google.cloud.dataplex.v1.SearchEntriesResponse"
6363 }
6364}
6365
6366#[doc(hidden)]
6367impl gax::paginator::internal::PageableResponse for SearchEntriesResponse {
6368 type PageItem = crate::model::SearchEntriesResult;
6369
6370 fn items(self) -> std::vec::Vec<Self::PageItem> {
6371 self.results
6372 }
6373
6374 fn next_page_token(&self) -> std::string::String {
6375 use std::clone::Clone;
6376 self.next_page_token.clone()
6377 }
6378}
6379
6380#[derive(Clone, Default, PartialEq)]
6391#[non_exhaustive]
6392pub struct ImportItem {
6393 pub entry: std::option::Option<crate::model::Entry>,
6395
6396 pub entry_link: std::option::Option<crate::model::EntryLink>,
6400
6401 pub update_mask: std::option::Option<wkt::FieldMask>,
6422
6423 pub aspect_keys: std::vec::Vec<std::string::String>,
6442
6443 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6444}
6445
6446impl ImportItem {
6447 pub fn new() -> Self {
6448 std::default::Default::default()
6449 }
6450
6451 pub fn set_entry<T>(mut self, v: T) -> Self
6453 where
6454 T: std::convert::Into<crate::model::Entry>,
6455 {
6456 self.entry = std::option::Option::Some(v.into());
6457 self
6458 }
6459
6460 pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
6462 where
6463 T: std::convert::Into<crate::model::Entry>,
6464 {
6465 self.entry = v.map(|x| x.into());
6466 self
6467 }
6468
6469 pub fn set_entry_link<T>(mut self, v: T) -> Self
6471 where
6472 T: std::convert::Into<crate::model::EntryLink>,
6473 {
6474 self.entry_link = std::option::Option::Some(v.into());
6475 self
6476 }
6477
6478 pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
6480 where
6481 T: std::convert::Into<crate::model::EntryLink>,
6482 {
6483 self.entry_link = v.map(|x| x.into());
6484 self
6485 }
6486
6487 pub fn set_update_mask<T>(mut self, v: T) -> Self
6489 where
6490 T: std::convert::Into<wkt::FieldMask>,
6491 {
6492 self.update_mask = std::option::Option::Some(v.into());
6493 self
6494 }
6495
6496 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6498 where
6499 T: std::convert::Into<wkt::FieldMask>,
6500 {
6501 self.update_mask = v.map(|x| x.into());
6502 self
6503 }
6504
6505 pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
6507 where
6508 T: std::iter::IntoIterator<Item = V>,
6509 V: std::convert::Into<std::string::String>,
6510 {
6511 use std::iter::Iterator;
6512 self.aspect_keys = v.into_iter().map(|i| i.into()).collect();
6513 self
6514 }
6515}
6516
6517impl wkt::message::Message for ImportItem {
6518 fn typename() -> &'static str {
6519 "type.googleapis.com/google.cloud.dataplex.v1.ImportItem"
6520 }
6521}
6522
6523#[derive(Clone, Default, PartialEq)]
6525#[non_exhaustive]
6526pub struct CreateMetadataJobRequest {
6527 pub parent: std::string::String,
6530
6531 pub metadata_job: std::option::Option<crate::model::MetadataJob>,
6533
6534 pub metadata_job_id: std::string::String,
6537
6538 pub validate_only: bool,
6541
6542 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6543}
6544
6545impl CreateMetadataJobRequest {
6546 pub fn new() -> Self {
6547 std::default::Default::default()
6548 }
6549
6550 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6552 self.parent = v.into();
6553 self
6554 }
6555
6556 pub fn set_metadata_job<T>(mut self, v: T) -> Self
6558 where
6559 T: std::convert::Into<crate::model::MetadataJob>,
6560 {
6561 self.metadata_job = std::option::Option::Some(v.into());
6562 self
6563 }
6564
6565 pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
6567 where
6568 T: std::convert::Into<crate::model::MetadataJob>,
6569 {
6570 self.metadata_job = v.map(|x| x.into());
6571 self
6572 }
6573
6574 pub fn set_metadata_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6576 self.metadata_job_id = v.into();
6577 self
6578 }
6579
6580 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6582 self.validate_only = v.into();
6583 self
6584 }
6585}
6586
6587impl wkt::message::Message for CreateMetadataJobRequest {
6588 fn typename() -> &'static str {
6589 "type.googleapis.com/google.cloud.dataplex.v1.CreateMetadataJobRequest"
6590 }
6591}
6592
6593#[derive(Clone, Default, PartialEq)]
6595#[non_exhaustive]
6596pub struct GetMetadataJobRequest {
6597 pub name: std::string::String,
6600
6601 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6602}
6603
6604impl GetMetadataJobRequest {
6605 pub fn new() -> Self {
6606 std::default::Default::default()
6607 }
6608
6609 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6611 self.name = v.into();
6612 self
6613 }
6614}
6615
6616impl wkt::message::Message for GetMetadataJobRequest {
6617 fn typename() -> &'static str {
6618 "type.googleapis.com/google.cloud.dataplex.v1.GetMetadataJobRequest"
6619 }
6620}
6621
6622#[derive(Clone, Default, PartialEq)]
6624#[non_exhaustive]
6625pub struct ListMetadataJobsRequest {
6626 pub parent: std::string::String,
6629
6630 pub page_size: i32,
6634
6635 pub page_token: std::string::String,
6641
6642 pub filter: std::string::String,
6651
6652 pub order_by: std::string::String,
6655
6656 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6657}
6658
6659impl ListMetadataJobsRequest {
6660 pub fn new() -> Self {
6661 std::default::Default::default()
6662 }
6663
6664 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6666 self.parent = v.into();
6667 self
6668 }
6669
6670 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6672 self.page_size = v.into();
6673 self
6674 }
6675
6676 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6678 self.page_token = v.into();
6679 self
6680 }
6681
6682 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6684 self.filter = v.into();
6685 self
6686 }
6687
6688 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6690 self.order_by = v.into();
6691 self
6692 }
6693}
6694
6695impl wkt::message::Message for ListMetadataJobsRequest {
6696 fn typename() -> &'static str {
6697 "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsRequest"
6698 }
6699}
6700
6701#[derive(Clone, Default, PartialEq)]
6703#[non_exhaustive]
6704pub struct ListMetadataJobsResponse {
6705 pub metadata_jobs: std::vec::Vec<crate::model::MetadataJob>,
6707
6708 pub next_page_token: std::string::String,
6711
6712 pub unreachable_locations: std::vec::Vec<std::string::String>,
6714
6715 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6716}
6717
6718impl ListMetadataJobsResponse {
6719 pub fn new() -> Self {
6720 std::default::Default::default()
6721 }
6722
6723 pub fn set_metadata_jobs<T, V>(mut self, v: T) -> Self
6725 where
6726 T: std::iter::IntoIterator<Item = V>,
6727 V: std::convert::Into<crate::model::MetadataJob>,
6728 {
6729 use std::iter::Iterator;
6730 self.metadata_jobs = v.into_iter().map(|i| i.into()).collect();
6731 self
6732 }
6733
6734 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6736 self.next_page_token = v.into();
6737 self
6738 }
6739
6740 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
6742 where
6743 T: std::iter::IntoIterator<Item = V>,
6744 V: std::convert::Into<std::string::String>,
6745 {
6746 use std::iter::Iterator;
6747 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
6748 self
6749 }
6750}
6751
6752impl wkt::message::Message for ListMetadataJobsResponse {
6753 fn typename() -> &'static str {
6754 "type.googleapis.com/google.cloud.dataplex.v1.ListMetadataJobsResponse"
6755 }
6756}
6757
6758#[doc(hidden)]
6759impl gax::paginator::internal::PageableResponse for ListMetadataJobsResponse {
6760 type PageItem = crate::model::MetadataJob;
6761
6762 fn items(self) -> std::vec::Vec<Self::PageItem> {
6763 self.metadata_jobs
6764 }
6765
6766 fn next_page_token(&self) -> std::string::String {
6767 use std::clone::Clone;
6768 self.next_page_token.clone()
6769 }
6770}
6771
6772#[derive(Clone, Default, PartialEq)]
6774#[non_exhaustive]
6775pub struct CancelMetadataJobRequest {
6776 pub name: std::string::String,
6779
6780 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6781}
6782
6783impl CancelMetadataJobRequest {
6784 pub fn new() -> Self {
6785 std::default::Default::default()
6786 }
6787
6788 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6790 self.name = v.into();
6791 self
6792 }
6793}
6794
6795impl wkt::message::Message for CancelMetadataJobRequest {
6796 fn typename() -> &'static str {
6797 "type.googleapis.com/google.cloud.dataplex.v1.CancelMetadataJobRequest"
6798 }
6799}
6800
6801#[derive(Clone, Default, PartialEq)]
6803#[non_exhaustive]
6804pub struct MetadataJob {
6805 pub name: std::string::String,
6809
6810 pub uid: std::string::String,
6814
6815 pub create_time: std::option::Option<wkt::Timestamp>,
6817
6818 pub update_time: std::option::Option<wkt::Timestamp>,
6820
6821 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6823
6824 pub r#type: crate::model::metadata_job::Type,
6826
6827 pub status: std::option::Option<crate::model::metadata_job::Status>,
6829
6830 pub spec: std::option::Option<crate::model::metadata_job::Spec>,
6831
6832 pub result: std::option::Option<crate::model::metadata_job::Result>,
6833
6834 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6835}
6836
6837impl MetadataJob {
6838 pub fn new() -> Self {
6839 std::default::Default::default()
6840 }
6841
6842 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6844 self.name = v.into();
6845 self
6846 }
6847
6848 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6850 self.uid = v.into();
6851 self
6852 }
6853
6854 pub fn set_create_time<T>(mut self, v: T) -> Self
6856 where
6857 T: std::convert::Into<wkt::Timestamp>,
6858 {
6859 self.create_time = std::option::Option::Some(v.into());
6860 self
6861 }
6862
6863 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6865 where
6866 T: std::convert::Into<wkt::Timestamp>,
6867 {
6868 self.create_time = v.map(|x| x.into());
6869 self
6870 }
6871
6872 pub fn set_update_time<T>(mut self, v: T) -> Self
6874 where
6875 T: std::convert::Into<wkt::Timestamp>,
6876 {
6877 self.update_time = std::option::Option::Some(v.into());
6878 self
6879 }
6880
6881 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6883 where
6884 T: std::convert::Into<wkt::Timestamp>,
6885 {
6886 self.update_time = v.map(|x| x.into());
6887 self
6888 }
6889
6890 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6892 where
6893 T: std::iter::IntoIterator<Item = (K, V)>,
6894 K: std::convert::Into<std::string::String>,
6895 V: std::convert::Into<std::string::String>,
6896 {
6897 use std::iter::Iterator;
6898 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6899 self
6900 }
6901
6902 pub fn set_type<T: std::convert::Into<crate::model::metadata_job::Type>>(
6904 mut self,
6905 v: T,
6906 ) -> Self {
6907 self.r#type = v.into();
6908 self
6909 }
6910
6911 pub fn set_status<T>(mut self, v: T) -> Self
6913 where
6914 T: std::convert::Into<crate::model::metadata_job::Status>,
6915 {
6916 self.status = std::option::Option::Some(v.into());
6917 self
6918 }
6919
6920 pub fn set_or_clear_status<T>(mut self, v: std::option::Option<T>) -> Self
6922 where
6923 T: std::convert::Into<crate::model::metadata_job::Status>,
6924 {
6925 self.status = v.map(|x| x.into());
6926 self
6927 }
6928
6929 pub fn set_spec<
6934 T: std::convert::Into<std::option::Option<crate::model::metadata_job::Spec>>,
6935 >(
6936 mut self,
6937 v: T,
6938 ) -> Self {
6939 self.spec = v.into();
6940 self
6941 }
6942
6943 pub fn import_spec(
6947 &self,
6948 ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobSpec>> {
6949 #[allow(unreachable_patterns)]
6950 self.spec.as_ref().and_then(|v| match v {
6951 crate::model::metadata_job::Spec::ImportSpec(v) => std::option::Option::Some(v),
6952 _ => std::option::Option::None,
6953 })
6954 }
6955
6956 pub fn set_import_spec<
6962 T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobSpec>>,
6963 >(
6964 mut self,
6965 v: T,
6966 ) -> Self {
6967 self.spec =
6968 std::option::Option::Some(crate::model::metadata_job::Spec::ImportSpec(v.into()));
6969 self
6970 }
6971
6972 pub fn export_spec(
6976 &self,
6977 ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobSpec>> {
6978 #[allow(unreachable_patterns)]
6979 self.spec.as_ref().and_then(|v| match v {
6980 crate::model::metadata_job::Spec::ExportSpec(v) => std::option::Option::Some(v),
6981 _ => std::option::Option::None,
6982 })
6983 }
6984
6985 pub fn set_export_spec<
6991 T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobSpec>>,
6992 >(
6993 mut self,
6994 v: T,
6995 ) -> Self {
6996 self.spec =
6997 std::option::Option::Some(crate::model::metadata_job::Spec::ExportSpec(v.into()));
6998 self
6999 }
7000
7001 pub fn set_result<
7006 T: std::convert::Into<std::option::Option<crate::model::metadata_job::Result>>,
7007 >(
7008 mut self,
7009 v: T,
7010 ) -> Self {
7011 self.result = v.into();
7012 self
7013 }
7014
7015 pub fn import_result(
7019 &self,
7020 ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ImportJobResult>> {
7021 #[allow(unreachable_patterns)]
7022 self.result.as_ref().and_then(|v| match v {
7023 crate::model::metadata_job::Result::ImportResult(v) => std::option::Option::Some(v),
7024 _ => std::option::Option::None,
7025 })
7026 }
7027
7028 pub fn set_import_result<
7034 T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ImportJobResult>>,
7035 >(
7036 mut self,
7037 v: T,
7038 ) -> Self {
7039 self.result =
7040 std::option::Option::Some(crate::model::metadata_job::Result::ImportResult(v.into()));
7041 self
7042 }
7043
7044 pub fn export_result(
7048 &self,
7049 ) -> std::option::Option<&std::boxed::Box<crate::model::metadata_job::ExportJobResult>> {
7050 #[allow(unreachable_patterns)]
7051 self.result.as_ref().and_then(|v| match v {
7052 crate::model::metadata_job::Result::ExportResult(v) => std::option::Option::Some(v),
7053 _ => std::option::Option::None,
7054 })
7055 }
7056
7057 pub fn set_export_result<
7063 T: std::convert::Into<std::boxed::Box<crate::model::metadata_job::ExportJobResult>>,
7064 >(
7065 mut self,
7066 v: T,
7067 ) -> Self {
7068 self.result =
7069 std::option::Option::Some(crate::model::metadata_job::Result::ExportResult(v.into()));
7070 self
7071 }
7072}
7073
7074impl wkt::message::Message for MetadataJob {
7075 fn typename() -> &'static str {
7076 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob"
7077 }
7078}
7079
7080pub mod metadata_job {
7082 #[allow(unused_imports)]
7083 use super::*;
7084
7085 #[derive(Clone, Default, PartialEq)]
7087 #[non_exhaustive]
7088 pub struct ImportJobResult {
7089 pub deleted_entries: i64,
7091
7092 pub updated_entries: i64,
7094
7095 pub created_entries: i64,
7097
7098 pub unchanged_entries: i64,
7100
7101 pub recreated_entries: i64,
7103
7104 pub update_time: std::option::Option<wkt::Timestamp>,
7106
7107 pub deleted_entry_links: i64,
7110
7111 pub created_entry_links: i64,
7114
7115 pub unchanged_entry_links: i64,
7117
7118 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7119 }
7120
7121 impl ImportJobResult {
7122 pub fn new() -> Self {
7123 std::default::Default::default()
7124 }
7125
7126 pub fn set_deleted_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7128 self.deleted_entries = v.into();
7129 self
7130 }
7131
7132 pub fn set_updated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7134 self.updated_entries = v.into();
7135 self
7136 }
7137
7138 pub fn set_created_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7140 self.created_entries = v.into();
7141 self
7142 }
7143
7144 pub fn set_unchanged_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7146 self.unchanged_entries = v.into();
7147 self
7148 }
7149
7150 pub fn set_recreated_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7152 self.recreated_entries = v.into();
7153 self
7154 }
7155
7156 pub fn set_update_time<T>(mut self, v: T) -> Self
7158 where
7159 T: std::convert::Into<wkt::Timestamp>,
7160 {
7161 self.update_time = std::option::Option::Some(v.into());
7162 self
7163 }
7164
7165 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7167 where
7168 T: std::convert::Into<wkt::Timestamp>,
7169 {
7170 self.update_time = v.map(|x| x.into());
7171 self
7172 }
7173
7174 pub fn set_deleted_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7176 self.deleted_entry_links = v.into();
7177 self
7178 }
7179
7180 pub fn set_created_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7182 self.created_entry_links = v.into();
7183 self
7184 }
7185
7186 pub fn set_unchanged_entry_links<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7188 self.unchanged_entry_links = v.into();
7189 self
7190 }
7191 }
7192
7193 impl wkt::message::Message for ImportJobResult {
7194 fn typename() -> &'static str {
7195 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobResult"
7196 }
7197 }
7198
7199 #[derive(Clone, Default, PartialEq)]
7203 #[non_exhaustive]
7204 pub struct ExportJobResult {
7205 pub exported_entries: i64,
7207
7208 pub error_message: std::string::String,
7210
7211 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7212 }
7213
7214 impl ExportJobResult {
7215 pub fn new() -> Self {
7216 std::default::Default::default()
7217 }
7218
7219 pub fn set_exported_entries<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7221 self.exported_entries = v.into();
7222 self
7223 }
7224
7225 pub fn set_error_message<T: std::convert::Into<std::string::String>>(
7227 mut self,
7228 v: T,
7229 ) -> Self {
7230 self.error_message = v.into();
7231 self
7232 }
7233 }
7234
7235 impl wkt::message::Message for ExportJobResult {
7236 fn typename() -> &'static str {
7237 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobResult"
7238 }
7239 }
7240
7241 #[derive(Clone, Default, PartialEq)]
7252 #[non_exhaustive]
7253 pub struct ImportJobSpec {
7254 pub source_storage_uri: std::string::String,
7274
7275 pub source_create_time: std::option::Option<wkt::Timestamp>,
7278
7279 pub scope: std::option::Option<crate::model::metadata_job::import_job_spec::ImportJobScope>,
7282
7283 pub entry_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
7285
7286 pub aspect_sync_mode: crate::model::metadata_job::import_job_spec::SyncMode,
7288
7289 pub log_level: crate::model::metadata_job::import_job_spec::LogLevel,
7298
7299 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7300 }
7301
7302 impl ImportJobSpec {
7303 pub fn new() -> Self {
7304 std::default::Default::default()
7305 }
7306
7307 pub fn set_source_storage_uri<T: std::convert::Into<std::string::String>>(
7309 mut self,
7310 v: T,
7311 ) -> Self {
7312 self.source_storage_uri = v.into();
7313 self
7314 }
7315
7316 pub fn set_source_create_time<T>(mut self, v: T) -> Self
7318 where
7319 T: std::convert::Into<wkt::Timestamp>,
7320 {
7321 self.source_create_time = std::option::Option::Some(v.into());
7322 self
7323 }
7324
7325 pub fn set_or_clear_source_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7327 where
7328 T: std::convert::Into<wkt::Timestamp>,
7329 {
7330 self.source_create_time = v.map(|x| x.into());
7331 self
7332 }
7333
7334 pub fn set_scope<T>(mut self, v: T) -> Self
7336 where
7337 T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
7338 {
7339 self.scope = std::option::Option::Some(v.into());
7340 self
7341 }
7342
7343 pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
7345 where
7346 T: std::convert::Into<crate::model::metadata_job::import_job_spec::ImportJobScope>,
7347 {
7348 self.scope = v.map(|x| x.into());
7349 self
7350 }
7351
7352 pub fn set_entry_sync_mode<
7354 T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
7355 >(
7356 mut self,
7357 v: T,
7358 ) -> Self {
7359 self.entry_sync_mode = v.into();
7360 self
7361 }
7362
7363 pub fn set_aspect_sync_mode<
7365 T: std::convert::Into<crate::model::metadata_job::import_job_spec::SyncMode>,
7366 >(
7367 mut self,
7368 v: T,
7369 ) -> Self {
7370 self.aspect_sync_mode = v.into();
7371 self
7372 }
7373
7374 pub fn set_log_level<
7376 T: std::convert::Into<crate::model::metadata_job::import_job_spec::LogLevel>,
7377 >(
7378 mut self,
7379 v: T,
7380 ) -> Self {
7381 self.log_level = v.into();
7382 self
7383 }
7384 }
7385
7386 impl wkt::message::Message for ImportJobSpec {
7387 fn typename() -> &'static str {
7388 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec"
7389 }
7390 }
7391
7392 pub mod import_job_spec {
7394 #[allow(unused_imports)]
7395 use super::*;
7396
7397 #[derive(Clone, Default, PartialEq)]
7399 #[non_exhaustive]
7400 pub struct ImportJobScope {
7401 pub entry_groups: std::vec::Vec<std::string::String>,
7409
7410 pub entry_types: std::vec::Vec<std::string::String>,
7423
7424 pub aspect_types: std::vec::Vec<std::string::String>,
7438
7439 pub glossaries: std::vec::Vec<std::string::String>,
7452
7453 pub entry_link_types: std::vec::Vec<std::string::String>,
7463
7464 pub referenced_entry_scopes: std::vec::Vec<std::string::String>,
7474
7475 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7476 }
7477
7478 impl ImportJobScope {
7479 pub fn new() -> Self {
7480 std::default::Default::default()
7481 }
7482
7483 pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
7485 where
7486 T: std::iter::IntoIterator<Item = V>,
7487 V: std::convert::Into<std::string::String>,
7488 {
7489 use std::iter::Iterator;
7490 self.entry_groups = v.into_iter().map(|i| i.into()).collect();
7491 self
7492 }
7493
7494 pub fn set_entry_types<T, V>(mut self, v: T) -> Self
7496 where
7497 T: std::iter::IntoIterator<Item = V>,
7498 V: std::convert::Into<std::string::String>,
7499 {
7500 use std::iter::Iterator;
7501 self.entry_types = v.into_iter().map(|i| i.into()).collect();
7502 self
7503 }
7504
7505 pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
7507 where
7508 T: std::iter::IntoIterator<Item = V>,
7509 V: std::convert::Into<std::string::String>,
7510 {
7511 use std::iter::Iterator;
7512 self.aspect_types = v.into_iter().map(|i| i.into()).collect();
7513 self
7514 }
7515
7516 pub fn set_glossaries<T, V>(mut self, v: T) -> Self
7518 where
7519 T: std::iter::IntoIterator<Item = V>,
7520 V: std::convert::Into<std::string::String>,
7521 {
7522 use std::iter::Iterator;
7523 self.glossaries = v.into_iter().map(|i| i.into()).collect();
7524 self
7525 }
7526
7527 pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
7529 where
7530 T: std::iter::IntoIterator<Item = V>,
7531 V: std::convert::Into<std::string::String>,
7532 {
7533 use std::iter::Iterator;
7534 self.entry_link_types = v.into_iter().map(|i| i.into()).collect();
7535 self
7536 }
7537
7538 pub fn set_referenced_entry_scopes<T, V>(mut self, v: T) -> Self
7540 where
7541 T: std::iter::IntoIterator<Item = V>,
7542 V: std::convert::Into<std::string::String>,
7543 {
7544 use std::iter::Iterator;
7545 self.referenced_entry_scopes = v.into_iter().map(|i| i.into()).collect();
7546 self
7547 }
7548 }
7549
7550 impl wkt::message::Message for ImportJobScope {
7551 fn typename() -> &'static str {
7552 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScope"
7553 }
7554 }
7555
7556 #[derive(Clone, Debug, PartialEq)]
7574 #[non_exhaustive]
7575 pub enum SyncMode {
7576 Unspecified,
7578 Full,
7585 Incremental,
7591 None,
7597 UnknownValue(sync_mode::UnknownValue),
7602 }
7603
7604 #[doc(hidden)]
7605 pub mod sync_mode {
7606 #[allow(unused_imports)]
7607 use super::*;
7608 #[derive(Clone, Debug, PartialEq)]
7609 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7610 }
7611
7612 impl SyncMode {
7613 pub fn value(&self) -> std::option::Option<i32> {
7618 match self {
7619 Self::Unspecified => std::option::Option::Some(0),
7620 Self::Full => std::option::Option::Some(1),
7621 Self::Incremental => std::option::Option::Some(2),
7622 Self::None => std::option::Option::Some(3),
7623 Self::UnknownValue(u) => u.0.value(),
7624 }
7625 }
7626
7627 pub fn name(&self) -> std::option::Option<&str> {
7632 match self {
7633 Self::Unspecified => std::option::Option::Some("SYNC_MODE_UNSPECIFIED"),
7634 Self::Full => std::option::Option::Some("FULL"),
7635 Self::Incremental => std::option::Option::Some("INCREMENTAL"),
7636 Self::None => std::option::Option::Some("NONE"),
7637 Self::UnknownValue(u) => u.0.name(),
7638 }
7639 }
7640 }
7641
7642 impl std::default::Default for SyncMode {
7643 fn default() -> Self {
7644 use std::convert::From;
7645 Self::from(0)
7646 }
7647 }
7648
7649 impl std::fmt::Display for SyncMode {
7650 fn fmt(
7651 &self,
7652 f: &mut std::fmt::Formatter<'_>,
7653 ) -> std::result::Result<(), std::fmt::Error> {
7654 wkt::internal::display_enum(f, self.name(), self.value())
7655 }
7656 }
7657
7658 impl std::convert::From<i32> for SyncMode {
7659 fn from(value: i32) -> Self {
7660 match value {
7661 0 => Self::Unspecified,
7662 1 => Self::Full,
7663 2 => Self::Incremental,
7664 3 => Self::None,
7665 _ => Self::UnknownValue(sync_mode::UnknownValue(
7666 wkt::internal::UnknownEnumValue::Integer(value),
7667 )),
7668 }
7669 }
7670 }
7671
7672 impl std::convert::From<&str> for SyncMode {
7673 fn from(value: &str) -> Self {
7674 use std::string::ToString;
7675 match value {
7676 "SYNC_MODE_UNSPECIFIED" => Self::Unspecified,
7677 "FULL" => Self::Full,
7678 "INCREMENTAL" => Self::Incremental,
7679 "NONE" => Self::None,
7680 _ => Self::UnknownValue(sync_mode::UnknownValue(
7681 wkt::internal::UnknownEnumValue::String(value.to_string()),
7682 )),
7683 }
7684 }
7685 }
7686
7687 impl serde::ser::Serialize for SyncMode {
7688 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7689 where
7690 S: serde::Serializer,
7691 {
7692 match self {
7693 Self::Unspecified => serializer.serialize_i32(0),
7694 Self::Full => serializer.serialize_i32(1),
7695 Self::Incremental => serializer.serialize_i32(2),
7696 Self::None => serializer.serialize_i32(3),
7697 Self::UnknownValue(u) => u.0.serialize(serializer),
7698 }
7699 }
7700 }
7701
7702 impl<'de> serde::de::Deserialize<'de> for SyncMode {
7703 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7704 where
7705 D: serde::Deserializer<'de>,
7706 {
7707 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SyncMode>::new(
7708 ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncMode",
7709 ))
7710 }
7711 }
7712
7713 #[derive(Clone, Debug, PartialEq)]
7729 #[non_exhaustive]
7730 pub enum LogLevel {
7731 Unspecified,
7733 Debug,
7744 Info,
7748 UnknownValue(log_level::UnknownValue),
7753 }
7754
7755 #[doc(hidden)]
7756 pub mod log_level {
7757 #[allow(unused_imports)]
7758 use super::*;
7759 #[derive(Clone, Debug, PartialEq)]
7760 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7761 }
7762
7763 impl LogLevel {
7764 pub fn value(&self) -> std::option::Option<i32> {
7769 match self {
7770 Self::Unspecified => std::option::Option::Some(0),
7771 Self::Debug => std::option::Option::Some(1),
7772 Self::Info => std::option::Option::Some(2),
7773 Self::UnknownValue(u) => u.0.value(),
7774 }
7775 }
7776
7777 pub fn name(&self) -> std::option::Option<&str> {
7782 match self {
7783 Self::Unspecified => std::option::Option::Some("LOG_LEVEL_UNSPECIFIED"),
7784 Self::Debug => std::option::Option::Some("DEBUG"),
7785 Self::Info => std::option::Option::Some("INFO"),
7786 Self::UnknownValue(u) => u.0.name(),
7787 }
7788 }
7789 }
7790
7791 impl std::default::Default for LogLevel {
7792 fn default() -> Self {
7793 use std::convert::From;
7794 Self::from(0)
7795 }
7796 }
7797
7798 impl std::fmt::Display for LogLevel {
7799 fn fmt(
7800 &self,
7801 f: &mut std::fmt::Formatter<'_>,
7802 ) -> std::result::Result<(), std::fmt::Error> {
7803 wkt::internal::display_enum(f, self.name(), self.value())
7804 }
7805 }
7806
7807 impl std::convert::From<i32> for LogLevel {
7808 fn from(value: i32) -> Self {
7809 match value {
7810 0 => Self::Unspecified,
7811 1 => Self::Debug,
7812 2 => Self::Info,
7813 _ => Self::UnknownValue(log_level::UnknownValue(
7814 wkt::internal::UnknownEnumValue::Integer(value),
7815 )),
7816 }
7817 }
7818 }
7819
7820 impl std::convert::From<&str> for LogLevel {
7821 fn from(value: &str) -> Self {
7822 use std::string::ToString;
7823 match value {
7824 "LOG_LEVEL_UNSPECIFIED" => Self::Unspecified,
7825 "DEBUG" => Self::Debug,
7826 "INFO" => Self::Info,
7827 _ => Self::UnknownValue(log_level::UnknownValue(
7828 wkt::internal::UnknownEnumValue::String(value.to_string()),
7829 )),
7830 }
7831 }
7832 }
7833
7834 impl serde::ser::Serialize for LogLevel {
7835 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7836 where
7837 S: serde::Serializer,
7838 {
7839 match self {
7840 Self::Unspecified => serializer.serialize_i32(0),
7841 Self::Debug => serializer.serialize_i32(1),
7842 Self::Info => serializer.serialize_i32(2),
7843 Self::UnknownValue(u) => u.0.serialize(serializer),
7844 }
7845 }
7846 }
7847
7848 impl<'de> serde::de::Deserialize<'de> for LogLevel {
7849 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7850 where
7851 D: serde::Deserializer<'de>,
7852 {
7853 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LogLevel>::new(
7854 ".google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevel",
7855 ))
7856 }
7857 }
7858 }
7859
7860 #[derive(Clone, Default, PartialEq)]
7862 #[non_exhaustive]
7863 pub struct ExportJobSpec {
7864 pub scope: std::option::Option<crate::model::metadata_job::export_job_spec::ExportJobScope>,
7866
7867 pub output_path: std::string::String,
7877
7878 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7879 }
7880
7881 impl ExportJobSpec {
7882 pub fn new() -> Self {
7883 std::default::Default::default()
7884 }
7885
7886 pub fn set_scope<T>(mut self, v: T) -> Self
7888 where
7889 T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
7890 {
7891 self.scope = std::option::Option::Some(v.into());
7892 self
7893 }
7894
7895 pub fn set_or_clear_scope<T>(mut self, v: std::option::Option<T>) -> Self
7897 where
7898 T: std::convert::Into<crate::model::metadata_job::export_job_spec::ExportJobScope>,
7899 {
7900 self.scope = v.map(|x| x.into());
7901 self
7902 }
7903
7904 pub fn set_output_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7906 self.output_path = v.into();
7907 self
7908 }
7909 }
7910
7911 impl wkt::message::Message for ExportJobSpec {
7912 fn typename() -> &'static str {
7913 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec"
7914 }
7915 }
7916
7917 pub mod export_job_spec {
7919 #[allow(unused_imports)]
7920 use super::*;
7921
7922 #[derive(Clone, Default, PartialEq)]
7924 #[non_exhaustive]
7925 pub struct ExportJobScope {
7926 pub organization_level: bool,
7938
7939 pub projects: std::vec::Vec<std::string::String>,
7950
7951 pub entry_groups: std::vec::Vec<std::string::String>,
7962
7963 pub entry_types: std::vec::Vec<std::string::String>,
7969
7970 pub aspect_types: std::vec::Vec<std::string::String>,
7976
7977 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7978 }
7979
7980 impl ExportJobScope {
7981 pub fn new() -> Self {
7982 std::default::Default::default()
7983 }
7984
7985 pub fn set_organization_level<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7987 self.organization_level = v.into();
7988 self
7989 }
7990
7991 pub fn set_projects<T, V>(mut self, v: T) -> Self
7993 where
7994 T: std::iter::IntoIterator<Item = V>,
7995 V: std::convert::Into<std::string::String>,
7996 {
7997 use std::iter::Iterator;
7998 self.projects = v.into_iter().map(|i| i.into()).collect();
7999 self
8000 }
8001
8002 pub fn set_entry_groups<T, V>(mut self, v: T) -> Self
8004 where
8005 T: std::iter::IntoIterator<Item = V>,
8006 V: std::convert::Into<std::string::String>,
8007 {
8008 use std::iter::Iterator;
8009 self.entry_groups = v.into_iter().map(|i| i.into()).collect();
8010 self
8011 }
8012
8013 pub fn set_entry_types<T, V>(mut self, v: T) -> Self
8015 where
8016 T: std::iter::IntoIterator<Item = V>,
8017 V: std::convert::Into<std::string::String>,
8018 {
8019 use std::iter::Iterator;
8020 self.entry_types = v.into_iter().map(|i| i.into()).collect();
8021 self
8022 }
8023
8024 pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
8026 where
8027 T: std::iter::IntoIterator<Item = V>,
8028 V: std::convert::Into<std::string::String>,
8029 {
8030 use std::iter::Iterator;
8031 self.aspect_types = v.into_iter().map(|i| i.into()).collect();
8032 self
8033 }
8034 }
8035
8036 impl wkt::message::Message for ExportJobScope {
8037 fn typename() -> &'static str {
8038 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScope"
8039 }
8040 }
8041 }
8042
8043 #[derive(Clone, Default, PartialEq)]
8045 #[non_exhaustive]
8046 pub struct Status {
8047 pub state: crate::model::metadata_job::status::State,
8049
8050 pub message: std::string::String,
8052
8053 pub completion_percent: i32,
8055
8056 pub update_time: std::option::Option<wkt::Timestamp>,
8058
8059 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8060 }
8061
8062 impl Status {
8063 pub fn new() -> Self {
8064 std::default::Default::default()
8065 }
8066
8067 pub fn set_state<T: std::convert::Into<crate::model::metadata_job::status::State>>(
8069 mut self,
8070 v: T,
8071 ) -> Self {
8072 self.state = v.into();
8073 self
8074 }
8075
8076 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8078 self.message = v.into();
8079 self
8080 }
8081
8082 pub fn set_completion_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8084 self.completion_percent = v.into();
8085 self
8086 }
8087
8088 pub fn set_update_time<T>(mut self, v: T) -> Self
8090 where
8091 T: std::convert::Into<wkt::Timestamp>,
8092 {
8093 self.update_time = std::option::Option::Some(v.into());
8094 self
8095 }
8096
8097 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8099 where
8100 T: std::convert::Into<wkt::Timestamp>,
8101 {
8102 self.update_time = v.map(|x| x.into());
8103 self
8104 }
8105 }
8106
8107 impl wkt::message::Message for Status {
8108 fn typename() -> &'static str {
8109 "type.googleapis.com/google.cloud.dataplex.v1.MetadataJob.Status"
8110 }
8111 }
8112
8113 pub mod status {
8115 #[allow(unused_imports)]
8116 use super::*;
8117
8118 #[derive(Clone, Debug, PartialEq)]
8134 #[non_exhaustive]
8135 pub enum State {
8136 Unspecified,
8138 Queued,
8140 Running,
8142 Canceling,
8144 Canceled,
8146 Succeeded,
8148 Failed,
8150 SucceededWithErrors,
8152 UnknownValue(state::UnknownValue),
8157 }
8158
8159 #[doc(hidden)]
8160 pub mod state {
8161 #[allow(unused_imports)]
8162 use super::*;
8163 #[derive(Clone, Debug, PartialEq)]
8164 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8165 }
8166
8167 impl State {
8168 pub fn value(&self) -> std::option::Option<i32> {
8173 match self {
8174 Self::Unspecified => std::option::Option::Some(0),
8175 Self::Queued => std::option::Option::Some(1),
8176 Self::Running => std::option::Option::Some(2),
8177 Self::Canceling => std::option::Option::Some(3),
8178 Self::Canceled => std::option::Option::Some(4),
8179 Self::Succeeded => std::option::Option::Some(5),
8180 Self::Failed => std::option::Option::Some(6),
8181 Self::SucceededWithErrors => std::option::Option::Some(7),
8182 Self::UnknownValue(u) => u.0.value(),
8183 }
8184 }
8185
8186 pub fn name(&self) -> std::option::Option<&str> {
8191 match self {
8192 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8193 Self::Queued => std::option::Option::Some("QUEUED"),
8194 Self::Running => std::option::Option::Some("RUNNING"),
8195 Self::Canceling => std::option::Option::Some("CANCELING"),
8196 Self::Canceled => std::option::Option::Some("CANCELED"),
8197 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
8198 Self::Failed => std::option::Option::Some("FAILED"),
8199 Self::SucceededWithErrors => std::option::Option::Some("SUCCEEDED_WITH_ERRORS"),
8200 Self::UnknownValue(u) => u.0.name(),
8201 }
8202 }
8203 }
8204
8205 impl std::default::Default for State {
8206 fn default() -> Self {
8207 use std::convert::From;
8208 Self::from(0)
8209 }
8210 }
8211
8212 impl std::fmt::Display for State {
8213 fn fmt(
8214 &self,
8215 f: &mut std::fmt::Formatter<'_>,
8216 ) -> std::result::Result<(), std::fmt::Error> {
8217 wkt::internal::display_enum(f, self.name(), self.value())
8218 }
8219 }
8220
8221 impl std::convert::From<i32> for State {
8222 fn from(value: i32) -> Self {
8223 match value {
8224 0 => Self::Unspecified,
8225 1 => Self::Queued,
8226 2 => Self::Running,
8227 3 => Self::Canceling,
8228 4 => Self::Canceled,
8229 5 => Self::Succeeded,
8230 6 => Self::Failed,
8231 7 => Self::SucceededWithErrors,
8232 _ => Self::UnknownValue(state::UnknownValue(
8233 wkt::internal::UnknownEnumValue::Integer(value),
8234 )),
8235 }
8236 }
8237 }
8238
8239 impl std::convert::From<&str> for State {
8240 fn from(value: &str) -> Self {
8241 use std::string::ToString;
8242 match value {
8243 "STATE_UNSPECIFIED" => Self::Unspecified,
8244 "QUEUED" => Self::Queued,
8245 "RUNNING" => Self::Running,
8246 "CANCELING" => Self::Canceling,
8247 "CANCELED" => Self::Canceled,
8248 "SUCCEEDED" => Self::Succeeded,
8249 "FAILED" => Self::Failed,
8250 "SUCCEEDED_WITH_ERRORS" => Self::SucceededWithErrors,
8251 _ => Self::UnknownValue(state::UnknownValue(
8252 wkt::internal::UnknownEnumValue::String(value.to_string()),
8253 )),
8254 }
8255 }
8256 }
8257
8258 impl serde::ser::Serialize for State {
8259 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8260 where
8261 S: serde::Serializer,
8262 {
8263 match self {
8264 Self::Unspecified => serializer.serialize_i32(0),
8265 Self::Queued => serializer.serialize_i32(1),
8266 Self::Running => serializer.serialize_i32(2),
8267 Self::Canceling => serializer.serialize_i32(3),
8268 Self::Canceled => serializer.serialize_i32(4),
8269 Self::Succeeded => serializer.serialize_i32(5),
8270 Self::Failed => serializer.serialize_i32(6),
8271 Self::SucceededWithErrors => serializer.serialize_i32(7),
8272 Self::UnknownValue(u) => u.0.serialize(serializer),
8273 }
8274 }
8275 }
8276
8277 impl<'de> serde::de::Deserialize<'de> for State {
8278 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8279 where
8280 D: serde::Deserializer<'de>,
8281 {
8282 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8283 ".google.cloud.dataplex.v1.MetadataJob.Status.State",
8284 ))
8285 }
8286 }
8287 }
8288
8289 #[derive(Clone, Debug, PartialEq)]
8305 #[non_exhaustive]
8306 pub enum Type {
8307 Unspecified,
8309 Import,
8311 Export,
8313 UnknownValue(r#type::UnknownValue),
8318 }
8319
8320 #[doc(hidden)]
8321 pub mod r#type {
8322 #[allow(unused_imports)]
8323 use super::*;
8324 #[derive(Clone, Debug, PartialEq)]
8325 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8326 }
8327
8328 impl Type {
8329 pub fn value(&self) -> std::option::Option<i32> {
8334 match self {
8335 Self::Unspecified => std::option::Option::Some(0),
8336 Self::Import => std::option::Option::Some(1),
8337 Self::Export => std::option::Option::Some(2),
8338 Self::UnknownValue(u) => u.0.value(),
8339 }
8340 }
8341
8342 pub fn name(&self) -> std::option::Option<&str> {
8347 match self {
8348 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
8349 Self::Import => std::option::Option::Some("IMPORT"),
8350 Self::Export => std::option::Option::Some("EXPORT"),
8351 Self::UnknownValue(u) => u.0.name(),
8352 }
8353 }
8354 }
8355
8356 impl std::default::Default for Type {
8357 fn default() -> Self {
8358 use std::convert::From;
8359 Self::from(0)
8360 }
8361 }
8362
8363 impl std::fmt::Display for Type {
8364 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8365 wkt::internal::display_enum(f, self.name(), self.value())
8366 }
8367 }
8368
8369 impl std::convert::From<i32> for Type {
8370 fn from(value: i32) -> Self {
8371 match value {
8372 0 => Self::Unspecified,
8373 1 => Self::Import,
8374 2 => Self::Export,
8375 _ => Self::UnknownValue(r#type::UnknownValue(
8376 wkt::internal::UnknownEnumValue::Integer(value),
8377 )),
8378 }
8379 }
8380 }
8381
8382 impl std::convert::From<&str> for Type {
8383 fn from(value: &str) -> Self {
8384 use std::string::ToString;
8385 match value {
8386 "TYPE_UNSPECIFIED" => Self::Unspecified,
8387 "IMPORT" => Self::Import,
8388 "EXPORT" => Self::Export,
8389 _ => Self::UnknownValue(r#type::UnknownValue(
8390 wkt::internal::UnknownEnumValue::String(value.to_string()),
8391 )),
8392 }
8393 }
8394 }
8395
8396 impl serde::ser::Serialize for Type {
8397 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8398 where
8399 S: serde::Serializer,
8400 {
8401 match self {
8402 Self::Unspecified => serializer.serialize_i32(0),
8403 Self::Import => serializer.serialize_i32(1),
8404 Self::Export => serializer.serialize_i32(2),
8405 Self::UnknownValue(u) => u.0.serialize(serializer),
8406 }
8407 }
8408 }
8409
8410 impl<'de> serde::de::Deserialize<'de> for Type {
8411 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8412 where
8413 D: serde::Deserializer<'de>,
8414 {
8415 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
8416 ".google.cloud.dataplex.v1.MetadataJob.Type",
8417 ))
8418 }
8419 }
8420
8421 #[derive(Clone, Debug, PartialEq)]
8422 #[non_exhaustive]
8423 pub enum Spec {
8424 ImportSpec(std::boxed::Box<crate::model::metadata_job::ImportJobSpec>),
8426 ExportSpec(std::boxed::Box<crate::model::metadata_job::ExportJobSpec>),
8428 }
8429
8430 #[derive(Clone, Debug, PartialEq)]
8431 #[non_exhaustive]
8432 pub enum Result {
8433 ImportResult(std::boxed::Box<crate::model::metadata_job::ImportJobResult>),
8435 ExportResult(std::boxed::Box<crate::model::metadata_job::ExportJobResult>),
8437 }
8438}
8439
8440#[derive(Clone, Default, PartialEq)]
8442#[non_exhaustive]
8443pub struct EntryLink {
8444 pub name: std::string::String,
8448
8449 pub entry_link_type: std::string::String,
8459
8460 pub create_time: std::option::Option<wkt::Timestamp>,
8462
8463 pub update_time: std::option::Option<wkt::Timestamp>,
8465
8466 pub entry_references: std::vec::Vec<crate::model::entry_link::EntryReference>,
8469
8470 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8471}
8472
8473impl EntryLink {
8474 pub fn new() -> Self {
8475 std::default::Default::default()
8476 }
8477
8478 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8480 self.name = v.into();
8481 self
8482 }
8483
8484 pub fn set_entry_link_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8486 self.entry_link_type = v.into();
8487 self
8488 }
8489
8490 pub fn set_create_time<T>(mut self, v: T) -> Self
8492 where
8493 T: std::convert::Into<wkt::Timestamp>,
8494 {
8495 self.create_time = std::option::Option::Some(v.into());
8496 self
8497 }
8498
8499 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8501 where
8502 T: std::convert::Into<wkt::Timestamp>,
8503 {
8504 self.create_time = v.map(|x| x.into());
8505 self
8506 }
8507
8508 pub fn set_update_time<T>(mut self, v: T) -> Self
8510 where
8511 T: std::convert::Into<wkt::Timestamp>,
8512 {
8513 self.update_time = std::option::Option::Some(v.into());
8514 self
8515 }
8516
8517 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8519 where
8520 T: std::convert::Into<wkt::Timestamp>,
8521 {
8522 self.update_time = v.map(|x| x.into());
8523 self
8524 }
8525
8526 pub fn set_entry_references<T, V>(mut self, v: T) -> Self
8528 where
8529 T: std::iter::IntoIterator<Item = V>,
8530 V: std::convert::Into<crate::model::entry_link::EntryReference>,
8531 {
8532 use std::iter::Iterator;
8533 self.entry_references = v.into_iter().map(|i| i.into()).collect();
8534 self
8535 }
8536}
8537
8538impl wkt::message::Message for EntryLink {
8539 fn typename() -> &'static str {
8540 "type.googleapis.com/google.cloud.dataplex.v1.EntryLink"
8541 }
8542}
8543
8544pub mod entry_link {
8546 #[allow(unused_imports)]
8547 use super::*;
8548
8549 #[derive(Clone, Default, PartialEq)]
8551 #[non_exhaustive]
8552 pub struct EntryReference {
8553 pub name: std::string::String,
8557
8558 pub path: std::string::String,
8562
8563 pub r#type: crate::model::entry_link::entry_reference::Type,
8565
8566 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8567 }
8568
8569 impl EntryReference {
8570 pub fn new() -> Self {
8571 std::default::Default::default()
8572 }
8573
8574 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8576 self.name = v.into();
8577 self
8578 }
8579
8580 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8582 self.path = v.into();
8583 self
8584 }
8585
8586 pub fn set_type<T: std::convert::Into<crate::model::entry_link::entry_reference::Type>>(
8588 mut self,
8589 v: T,
8590 ) -> Self {
8591 self.r#type = v.into();
8592 self
8593 }
8594 }
8595
8596 impl wkt::message::Message for EntryReference {
8597 fn typename() -> &'static str {
8598 "type.googleapis.com/google.cloud.dataplex.v1.EntryLink.EntryReference"
8599 }
8600 }
8601
8602 pub mod entry_reference {
8604 #[allow(unused_imports)]
8605 use super::*;
8606
8607 #[derive(Clone, Debug, PartialEq)]
8623 #[non_exhaustive]
8624 pub enum Type {
8625 Unspecified,
8628 Source,
8630 Target,
8632 UnknownValue(r#type::UnknownValue),
8637 }
8638
8639 #[doc(hidden)]
8640 pub mod r#type {
8641 #[allow(unused_imports)]
8642 use super::*;
8643 #[derive(Clone, Debug, PartialEq)]
8644 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8645 }
8646
8647 impl Type {
8648 pub fn value(&self) -> std::option::Option<i32> {
8653 match self {
8654 Self::Unspecified => std::option::Option::Some(0),
8655 Self::Source => std::option::Option::Some(2),
8656 Self::Target => std::option::Option::Some(3),
8657 Self::UnknownValue(u) => u.0.value(),
8658 }
8659 }
8660
8661 pub fn name(&self) -> std::option::Option<&str> {
8666 match self {
8667 Self::Unspecified => std::option::Option::Some("UNSPECIFIED"),
8668 Self::Source => std::option::Option::Some("SOURCE"),
8669 Self::Target => std::option::Option::Some("TARGET"),
8670 Self::UnknownValue(u) => u.0.name(),
8671 }
8672 }
8673 }
8674
8675 impl std::default::Default for Type {
8676 fn default() -> Self {
8677 use std::convert::From;
8678 Self::from(0)
8679 }
8680 }
8681
8682 impl std::fmt::Display for Type {
8683 fn fmt(
8684 &self,
8685 f: &mut std::fmt::Formatter<'_>,
8686 ) -> std::result::Result<(), std::fmt::Error> {
8687 wkt::internal::display_enum(f, self.name(), self.value())
8688 }
8689 }
8690
8691 impl std::convert::From<i32> for Type {
8692 fn from(value: i32) -> Self {
8693 match value {
8694 0 => Self::Unspecified,
8695 2 => Self::Source,
8696 3 => Self::Target,
8697 _ => Self::UnknownValue(r#type::UnknownValue(
8698 wkt::internal::UnknownEnumValue::Integer(value),
8699 )),
8700 }
8701 }
8702 }
8703
8704 impl std::convert::From<&str> for Type {
8705 fn from(value: &str) -> Self {
8706 use std::string::ToString;
8707 match value {
8708 "UNSPECIFIED" => Self::Unspecified,
8709 "SOURCE" => Self::Source,
8710 "TARGET" => Self::Target,
8711 _ => Self::UnknownValue(r#type::UnknownValue(
8712 wkt::internal::UnknownEnumValue::String(value.to_string()),
8713 )),
8714 }
8715 }
8716 }
8717
8718 impl serde::ser::Serialize for Type {
8719 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8720 where
8721 S: serde::Serializer,
8722 {
8723 match self {
8724 Self::Unspecified => serializer.serialize_i32(0),
8725 Self::Source => serializer.serialize_i32(2),
8726 Self::Target => serializer.serialize_i32(3),
8727 Self::UnknownValue(u) => u.0.serialize(serializer),
8728 }
8729 }
8730 }
8731
8732 impl<'de> serde::de::Deserialize<'de> for Type {
8733 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8734 where
8735 D: serde::Deserializer<'de>,
8736 {
8737 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
8738 ".google.cloud.dataplex.v1.EntryLink.EntryReference.Type",
8739 ))
8740 }
8741 }
8742 }
8743}
8744
8745#[derive(Clone, Default, PartialEq)]
8747#[non_exhaustive]
8748pub struct CreateEntryLinkRequest {
8749 pub parent: std::string::String,
8752
8753 pub entry_link_id: std::string::String,
8761
8762 pub entry_link: std::option::Option<crate::model::EntryLink>,
8764
8765 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8766}
8767
8768impl CreateEntryLinkRequest {
8769 pub fn new() -> Self {
8770 std::default::Default::default()
8771 }
8772
8773 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8775 self.parent = v.into();
8776 self
8777 }
8778
8779 pub fn set_entry_link_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8781 self.entry_link_id = v.into();
8782 self
8783 }
8784
8785 pub fn set_entry_link<T>(mut self, v: T) -> Self
8787 where
8788 T: std::convert::Into<crate::model::EntryLink>,
8789 {
8790 self.entry_link = std::option::Option::Some(v.into());
8791 self
8792 }
8793
8794 pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
8796 where
8797 T: std::convert::Into<crate::model::EntryLink>,
8798 {
8799 self.entry_link = v.map(|x| x.into());
8800 self
8801 }
8802}
8803
8804impl wkt::message::Message for CreateEntryLinkRequest {
8805 fn typename() -> &'static str {
8806 "type.googleapis.com/google.cloud.dataplex.v1.CreateEntryLinkRequest"
8807 }
8808}
8809
8810#[derive(Clone, Default, PartialEq)]
8812#[non_exhaustive]
8813pub struct DeleteEntryLinkRequest {
8814 pub name: std::string::String,
8817
8818 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8819}
8820
8821impl DeleteEntryLinkRequest {
8822 pub fn new() -> Self {
8823 std::default::Default::default()
8824 }
8825
8826 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8828 self.name = v.into();
8829 self
8830 }
8831}
8832
8833impl wkt::message::Message for DeleteEntryLinkRequest {
8834 fn typename() -> &'static str {
8835 "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntryLinkRequest"
8836 }
8837}
8838
8839#[derive(Clone, Default, PartialEq)]
8841#[non_exhaustive]
8842pub struct GetEntryLinkRequest {
8843 pub name: std::string::String,
8846
8847 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8848}
8849
8850impl GetEntryLinkRequest {
8851 pub fn new() -> Self {
8852 std::default::Default::default()
8853 }
8854
8855 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8857 self.name = v.into();
8858 self
8859 }
8860}
8861
8862impl wkt::message::Message for GetEntryLinkRequest {
8863 fn typename() -> &'static str {
8864 "type.googleapis.com/google.cloud.dataplex.v1.GetEntryLinkRequest"
8865 }
8866}
8867
8868#[derive(Clone, Default, PartialEq)]
8871#[non_exhaustive]
8872pub struct EncryptionConfig {
8873 pub name: std::string::String,
8878
8879 pub key: std::string::String,
8883
8884 pub create_time: std::option::Option<wkt::Timestamp>,
8886
8887 pub update_time: std::option::Option<wkt::Timestamp>,
8889
8890 pub encryption_state: crate::model::encryption_config::EncryptionState,
8892
8893 pub etag: std::string::String,
8895
8896 pub failure_details: std::option::Option<crate::model::encryption_config::FailureDetails>,
8898
8899 pub enable_metastore_encryption: bool,
8901
8902 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8903}
8904
8905impl EncryptionConfig {
8906 pub fn new() -> Self {
8907 std::default::Default::default()
8908 }
8909
8910 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8912 self.name = v.into();
8913 self
8914 }
8915
8916 pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8918 self.key = v.into();
8919 self
8920 }
8921
8922 pub fn set_create_time<T>(mut self, v: T) -> Self
8924 where
8925 T: std::convert::Into<wkt::Timestamp>,
8926 {
8927 self.create_time = std::option::Option::Some(v.into());
8928 self
8929 }
8930
8931 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8933 where
8934 T: std::convert::Into<wkt::Timestamp>,
8935 {
8936 self.create_time = v.map(|x| x.into());
8937 self
8938 }
8939
8940 pub fn set_update_time<T>(mut self, v: T) -> Self
8942 where
8943 T: std::convert::Into<wkt::Timestamp>,
8944 {
8945 self.update_time = std::option::Option::Some(v.into());
8946 self
8947 }
8948
8949 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8951 where
8952 T: std::convert::Into<wkt::Timestamp>,
8953 {
8954 self.update_time = v.map(|x| x.into());
8955 self
8956 }
8957
8958 pub fn set_encryption_state<
8960 T: std::convert::Into<crate::model::encryption_config::EncryptionState>,
8961 >(
8962 mut self,
8963 v: T,
8964 ) -> Self {
8965 self.encryption_state = v.into();
8966 self
8967 }
8968
8969 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8971 self.etag = v.into();
8972 self
8973 }
8974
8975 pub fn set_failure_details<T>(mut self, v: T) -> Self
8977 where
8978 T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
8979 {
8980 self.failure_details = std::option::Option::Some(v.into());
8981 self
8982 }
8983
8984 pub fn set_or_clear_failure_details<T>(mut self, v: std::option::Option<T>) -> Self
8986 where
8987 T: std::convert::Into<crate::model::encryption_config::FailureDetails>,
8988 {
8989 self.failure_details = v.map(|x| x.into());
8990 self
8991 }
8992
8993 pub fn set_enable_metastore_encryption<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8995 self.enable_metastore_encryption = v.into();
8996 self
8997 }
8998}
8999
9000impl wkt::message::Message for EncryptionConfig {
9001 fn typename() -> &'static str {
9002 "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig"
9003 }
9004}
9005
9006pub mod encryption_config {
9008 #[allow(unused_imports)]
9009 use super::*;
9010
9011 #[derive(Clone, Default, PartialEq)]
9013 #[non_exhaustive]
9014 pub struct FailureDetails {
9015 pub error_code: crate::model::encryption_config::failure_details::ErrorCode,
9017
9018 pub error_message: std::string::String,
9021
9022 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9023 }
9024
9025 impl FailureDetails {
9026 pub fn new() -> Self {
9027 std::default::Default::default()
9028 }
9029
9030 pub fn set_error_code<
9032 T: std::convert::Into<crate::model::encryption_config::failure_details::ErrorCode>,
9033 >(
9034 mut self,
9035 v: T,
9036 ) -> Self {
9037 self.error_code = v.into();
9038 self
9039 }
9040
9041 pub fn set_error_message<T: std::convert::Into<std::string::String>>(
9043 mut self,
9044 v: T,
9045 ) -> Self {
9046 self.error_message = v.into();
9047 self
9048 }
9049 }
9050
9051 impl wkt::message::Message for FailureDetails {
9052 fn typename() -> &'static str {
9053 "type.googleapis.com/google.cloud.dataplex.v1.EncryptionConfig.FailureDetails"
9054 }
9055 }
9056
9057 pub mod failure_details {
9059 #[allow(unused_imports)]
9060 use super::*;
9061
9062 #[derive(Clone, Debug, PartialEq)]
9078 #[non_exhaustive]
9079 pub enum ErrorCode {
9080 Unknown,
9082 InternalError,
9084 RequireUserAction,
9086 UnknownValue(error_code::UnknownValue),
9091 }
9092
9093 #[doc(hidden)]
9094 pub mod error_code {
9095 #[allow(unused_imports)]
9096 use super::*;
9097 #[derive(Clone, Debug, PartialEq)]
9098 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9099 }
9100
9101 impl ErrorCode {
9102 pub fn value(&self) -> std::option::Option<i32> {
9107 match self {
9108 Self::Unknown => std::option::Option::Some(0),
9109 Self::InternalError => std::option::Option::Some(1),
9110 Self::RequireUserAction => std::option::Option::Some(2),
9111 Self::UnknownValue(u) => u.0.value(),
9112 }
9113 }
9114
9115 pub fn name(&self) -> std::option::Option<&str> {
9120 match self {
9121 Self::Unknown => std::option::Option::Some("UNKNOWN"),
9122 Self::InternalError => std::option::Option::Some("INTERNAL_ERROR"),
9123 Self::RequireUserAction => std::option::Option::Some("REQUIRE_USER_ACTION"),
9124 Self::UnknownValue(u) => u.0.name(),
9125 }
9126 }
9127 }
9128
9129 impl std::default::Default for ErrorCode {
9130 fn default() -> Self {
9131 use std::convert::From;
9132 Self::from(0)
9133 }
9134 }
9135
9136 impl std::fmt::Display for ErrorCode {
9137 fn fmt(
9138 &self,
9139 f: &mut std::fmt::Formatter<'_>,
9140 ) -> std::result::Result<(), std::fmt::Error> {
9141 wkt::internal::display_enum(f, self.name(), self.value())
9142 }
9143 }
9144
9145 impl std::convert::From<i32> for ErrorCode {
9146 fn from(value: i32) -> Self {
9147 match value {
9148 0 => Self::Unknown,
9149 1 => Self::InternalError,
9150 2 => Self::RequireUserAction,
9151 _ => Self::UnknownValue(error_code::UnknownValue(
9152 wkt::internal::UnknownEnumValue::Integer(value),
9153 )),
9154 }
9155 }
9156 }
9157
9158 impl std::convert::From<&str> for ErrorCode {
9159 fn from(value: &str) -> Self {
9160 use std::string::ToString;
9161 match value {
9162 "UNKNOWN" => Self::Unknown,
9163 "INTERNAL_ERROR" => Self::InternalError,
9164 "REQUIRE_USER_ACTION" => Self::RequireUserAction,
9165 _ => Self::UnknownValue(error_code::UnknownValue(
9166 wkt::internal::UnknownEnumValue::String(value.to_string()),
9167 )),
9168 }
9169 }
9170 }
9171
9172 impl serde::ser::Serialize for ErrorCode {
9173 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9174 where
9175 S: serde::Serializer,
9176 {
9177 match self {
9178 Self::Unknown => serializer.serialize_i32(0),
9179 Self::InternalError => serializer.serialize_i32(1),
9180 Self::RequireUserAction => serializer.serialize_i32(2),
9181 Self::UnknownValue(u) => u.0.serialize(serializer),
9182 }
9183 }
9184 }
9185
9186 impl<'de> serde::de::Deserialize<'de> for ErrorCode {
9187 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9188 where
9189 D: serde::Deserializer<'de>,
9190 {
9191 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
9192 ".google.cloud.dataplex.v1.EncryptionConfig.FailureDetails.ErrorCode",
9193 ))
9194 }
9195 }
9196 }
9197
9198 #[derive(Clone, Debug, PartialEq)]
9215 #[non_exhaustive]
9216 pub enum EncryptionState {
9217 Unspecified,
9219 Encrypting,
9223 Completed,
9225 Failed,
9229 UnknownValue(encryption_state::UnknownValue),
9234 }
9235
9236 #[doc(hidden)]
9237 pub mod encryption_state {
9238 #[allow(unused_imports)]
9239 use super::*;
9240 #[derive(Clone, Debug, PartialEq)]
9241 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9242 }
9243
9244 impl EncryptionState {
9245 pub fn value(&self) -> std::option::Option<i32> {
9250 match self {
9251 Self::Unspecified => std::option::Option::Some(0),
9252 Self::Encrypting => std::option::Option::Some(1),
9253 Self::Completed => std::option::Option::Some(2),
9254 Self::Failed => std::option::Option::Some(3),
9255 Self::UnknownValue(u) => u.0.value(),
9256 }
9257 }
9258
9259 pub fn name(&self) -> std::option::Option<&str> {
9264 match self {
9265 Self::Unspecified => std::option::Option::Some("ENCRYPTION_STATE_UNSPECIFIED"),
9266 Self::Encrypting => std::option::Option::Some("ENCRYPTING"),
9267 Self::Completed => std::option::Option::Some("COMPLETED"),
9268 Self::Failed => std::option::Option::Some("FAILED"),
9269 Self::UnknownValue(u) => u.0.name(),
9270 }
9271 }
9272 }
9273
9274 impl std::default::Default for EncryptionState {
9275 fn default() -> Self {
9276 use std::convert::From;
9277 Self::from(0)
9278 }
9279 }
9280
9281 impl std::fmt::Display for EncryptionState {
9282 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9283 wkt::internal::display_enum(f, self.name(), self.value())
9284 }
9285 }
9286
9287 impl std::convert::From<i32> for EncryptionState {
9288 fn from(value: i32) -> Self {
9289 match value {
9290 0 => Self::Unspecified,
9291 1 => Self::Encrypting,
9292 2 => Self::Completed,
9293 3 => Self::Failed,
9294 _ => Self::UnknownValue(encryption_state::UnknownValue(
9295 wkt::internal::UnknownEnumValue::Integer(value),
9296 )),
9297 }
9298 }
9299 }
9300
9301 impl std::convert::From<&str> for EncryptionState {
9302 fn from(value: &str) -> Self {
9303 use std::string::ToString;
9304 match value {
9305 "ENCRYPTION_STATE_UNSPECIFIED" => Self::Unspecified,
9306 "ENCRYPTING" => Self::Encrypting,
9307 "COMPLETED" => Self::Completed,
9308 "FAILED" => Self::Failed,
9309 _ => Self::UnknownValue(encryption_state::UnknownValue(
9310 wkt::internal::UnknownEnumValue::String(value.to_string()),
9311 )),
9312 }
9313 }
9314 }
9315
9316 impl serde::ser::Serialize for EncryptionState {
9317 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9318 where
9319 S: serde::Serializer,
9320 {
9321 match self {
9322 Self::Unspecified => serializer.serialize_i32(0),
9323 Self::Encrypting => serializer.serialize_i32(1),
9324 Self::Completed => serializer.serialize_i32(2),
9325 Self::Failed => serializer.serialize_i32(3),
9326 Self::UnknownValue(u) => u.0.serialize(serializer),
9327 }
9328 }
9329 }
9330
9331 impl<'de> serde::de::Deserialize<'de> for EncryptionState {
9332 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9333 where
9334 D: serde::Deserializer<'de>,
9335 {
9336 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionState>::new(
9337 ".google.cloud.dataplex.v1.EncryptionConfig.EncryptionState",
9338 ))
9339 }
9340 }
9341}
9342
9343#[derive(Clone, Default, PartialEq)]
9345#[non_exhaustive]
9346pub struct CreateEncryptionConfigRequest {
9347 pub parent: std::string::String,
9349
9350 pub encryption_config_id: std::string::String,
9356
9357 pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
9359
9360 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9361}
9362
9363impl CreateEncryptionConfigRequest {
9364 pub fn new() -> Self {
9365 std::default::Default::default()
9366 }
9367
9368 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9370 self.parent = v.into();
9371 self
9372 }
9373
9374 pub fn set_encryption_config_id<T: std::convert::Into<std::string::String>>(
9376 mut self,
9377 v: T,
9378 ) -> Self {
9379 self.encryption_config_id = v.into();
9380 self
9381 }
9382
9383 pub fn set_encryption_config<T>(mut self, v: T) -> Self
9385 where
9386 T: std::convert::Into<crate::model::EncryptionConfig>,
9387 {
9388 self.encryption_config = std::option::Option::Some(v.into());
9389 self
9390 }
9391
9392 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
9394 where
9395 T: std::convert::Into<crate::model::EncryptionConfig>,
9396 {
9397 self.encryption_config = v.map(|x| x.into());
9398 self
9399 }
9400}
9401
9402impl wkt::message::Message for CreateEncryptionConfigRequest {
9403 fn typename() -> &'static str {
9404 "type.googleapis.com/google.cloud.dataplex.v1.CreateEncryptionConfigRequest"
9405 }
9406}
9407
9408#[derive(Clone, Default, PartialEq)]
9410#[non_exhaustive]
9411pub struct GetEncryptionConfigRequest {
9412 pub name: std::string::String,
9414
9415 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9416}
9417
9418impl GetEncryptionConfigRequest {
9419 pub fn new() -> Self {
9420 std::default::Default::default()
9421 }
9422
9423 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9425 self.name = v.into();
9426 self
9427 }
9428}
9429
9430impl wkt::message::Message for GetEncryptionConfigRequest {
9431 fn typename() -> &'static str {
9432 "type.googleapis.com/google.cloud.dataplex.v1.GetEncryptionConfigRequest"
9433 }
9434}
9435
9436#[derive(Clone, Default, PartialEq)]
9438#[non_exhaustive]
9439pub struct UpdateEncryptionConfigRequest {
9440 pub encryption_config: std::option::Option<crate::model::EncryptionConfig>,
9442
9443 pub update_mask: std::option::Option<wkt::FieldMask>,
9447
9448 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9449}
9450
9451impl UpdateEncryptionConfigRequest {
9452 pub fn new() -> Self {
9453 std::default::Default::default()
9454 }
9455
9456 pub fn set_encryption_config<T>(mut self, v: T) -> Self
9458 where
9459 T: std::convert::Into<crate::model::EncryptionConfig>,
9460 {
9461 self.encryption_config = std::option::Option::Some(v.into());
9462 self
9463 }
9464
9465 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
9467 where
9468 T: std::convert::Into<crate::model::EncryptionConfig>,
9469 {
9470 self.encryption_config = v.map(|x| x.into());
9471 self
9472 }
9473
9474 pub fn set_update_mask<T>(mut self, v: T) -> Self
9476 where
9477 T: std::convert::Into<wkt::FieldMask>,
9478 {
9479 self.update_mask = std::option::Option::Some(v.into());
9480 self
9481 }
9482
9483 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9485 where
9486 T: std::convert::Into<wkt::FieldMask>,
9487 {
9488 self.update_mask = v.map(|x| x.into());
9489 self
9490 }
9491}
9492
9493impl wkt::message::Message for UpdateEncryptionConfigRequest {
9494 fn typename() -> &'static str {
9495 "type.googleapis.com/google.cloud.dataplex.v1.UpdateEncryptionConfigRequest"
9496 }
9497}
9498
9499#[derive(Clone, Default, PartialEq)]
9501#[non_exhaustive]
9502pub struct DeleteEncryptionConfigRequest {
9503 pub name: std::string::String,
9505
9506 pub etag: std::string::String,
9508
9509 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9510}
9511
9512impl DeleteEncryptionConfigRequest {
9513 pub fn new() -> Self {
9514 std::default::Default::default()
9515 }
9516
9517 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9519 self.name = v.into();
9520 self
9521 }
9522
9523 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9525 self.etag = v.into();
9526 self
9527 }
9528}
9529
9530impl wkt::message::Message for DeleteEncryptionConfigRequest {
9531 fn typename() -> &'static str {
9532 "type.googleapis.com/google.cloud.dataplex.v1.DeleteEncryptionConfigRequest"
9533 }
9534}
9535
9536#[derive(Clone, Default, PartialEq)]
9538#[non_exhaustive]
9539pub struct ListEncryptionConfigsRequest {
9540 pub parent: std::string::String,
9542
9543 pub page_size: i32,
9548
9549 pub page_token: std::string::String,
9554
9555 pub filter: std::string::String,
9572
9573 pub order_by: std::string::String,
9575
9576 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9577}
9578
9579impl ListEncryptionConfigsRequest {
9580 pub fn new() -> Self {
9581 std::default::Default::default()
9582 }
9583
9584 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9586 self.parent = v.into();
9587 self
9588 }
9589
9590 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9592 self.page_size = v.into();
9593 self
9594 }
9595
9596 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9598 self.page_token = v.into();
9599 self
9600 }
9601
9602 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9604 self.filter = v.into();
9605 self
9606 }
9607
9608 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9610 self.order_by = v.into();
9611 self
9612 }
9613}
9614
9615impl wkt::message::Message for ListEncryptionConfigsRequest {
9616 fn typename() -> &'static str {
9617 "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsRequest"
9618 }
9619}
9620
9621#[derive(Clone, Default, PartialEq)]
9623#[non_exhaustive]
9624pub struct ListEncryptionConfigsResponse {
9625 pub encryption_configs: std::vec::Vec<crate::model::EncryptionConfig>,
9627
9628 pub next_page_token: std::string::String,
9631
9632 pub unreachable_locations: std::vec::Vec<std::string::String>,
9634
9635 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9636}
9637
9638impl ListEncryptionConfigsResponse {
9639 pub fn new() -> Self {
9640 std::default::Default::default()
9641 }
9642
9643 pub fn set_encryption_configs<T, V>(mut self, v: T) -> Self
9645 where
9646 T: std::iter::IntoIterator<Item = V>,
9647 V: std::convert::Into<crate::model::EncryptionConfig>,
9648 {
9649 use std::iter::Iterator;
9650 self.encryption_configs = v.into_iter().map(|i| i.into()).collect();
9651 self
9652 }
9653
9654 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9656 self.next_page_token = v.into();
9657 self
9658 }
9659
9660 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
9662 where
9663 T: std::iter::IntoIterator<Item = V>,
9664 V: std::convert::Into<std::string::String>,
9665 {
9666 use std::iter::Iterator;
9667 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
9668 self
9669 }
9670}
9671
9672impl wkt::message::Message for ListEncryptionConfigsResponse {
9673 fn typename() -> &'static str {
9674 "type.googleapis.com/google.cloud.dataplex.v1.ListEncryptionConfigsResponse"
9675 }
9676}
9677
9678#[doc(hidden)]
9679impl gax::paginator::internal::PageableResponse for ListEncryptionConfigsResponse {
9680 type PageItem = crate::model::EncryptionConfig;
9681
9682 fn items(self) -> std::vec::Vec<Self::PageItem> {
9683 self.encryption_configs
9684 }
9685
9686 fn next_page_token(&self) -> std::string::String {
9687 use std::clone::Clone;
9688 self.next_page_token.clone()
9689 }
9690}
9691
9692#[derive(Clone, Default, PartialEq)]
9694#[non_exhaustive]
9695pub struct CreateContentRequest {
9696 pub parent: std::string::String,
9699
9700 pub content: std::option::Option<crate::model::Content>,
9702
9703 pub validate_only: bool,
9706
9707 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9708}
9709
9710impl CreateContentRequest {
9711 pub fn new() -> Self {
9712 std::default::Default::default()
9713 }
9714
9715 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9717 self.parent = v.into();
9718 self
9719 }
9720
9721 pub fn set_content<T>(mut self, v: T) -> Self
9723 where
9724 T: std::convert::Into<crate::model::Content>,
9725 {
9726 self.content = std::option::Option::Some(v.into());
9727 self
9728 }
9729
9730 pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
9732 where
9733 T: std::convert::Into<crate::model::Content>,
9734 {
9735 self.content = v.map(|x| x.into());
9736 self
9737 }
9738
9739 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9741 self.validate_only = v.into();
9742 self
9743 }
9744}
9745
9746impl wkt::message::Message for CreateContentRequest {
9747 fn typename() -> &'static str {
9748 "type.googleapis.com/google.cloud.dataplex.v1.CreateContentRequest"
9749 }
9750}
9751
9752#[derive(Clone, Default, PartialEq)]
9754#[non_exhaustive]
9755pub struct UpdateContentRequest {
9756 pub update_mask: std::option::Option<wkt::FieldMask>,
9758
9759 pub content: std::option::Option<crate::model::Content>,
9762
9763 pub validate_only: bool,
9766
9767 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9768}
9769
9770impl UpdateContentRequest {
9771 pub fn new() -> Self {
9772 std::default::Default::default()
9773 }
9774
9775 pub fn set_update_mask<T>(mut self, v: T) -> Self
9777 where
9778 T: std::convert::Into<wkt::FieldMask>,
9779 {
9780 self.update_mask = std::option::Option::Some(v.into());
9781 self
9782 }
9783
9784 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9786 where
9787 T: std::convert::Into<wkt::FieldMask>,
9788 {
9789 self.update_mask = v.map(|x| x.into());
9790 self
9791 }
9792
9793 pub fn set_content<T>(mut self, v: T) -> Self
9795 where
9796 T: std::convert::Into<crate::model::Content>,
9797 {
9798 self.content = std::option::Option::Some(v.into());
9799 self
9800 }
9801
9802 pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
9804 where
9805 T: std::convert::Into<crate::model::Content>,
9806 {
9807 self.content = v.map(|x| x.into());
9808 self
9809 }
9810
9811 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9813 self.validate_only = v.into();
9814 self
9815 }
9816}
9817
9818impl wkt::message::Message for UpdateContentRequest {
9819 fn typename() -> &'static str {
9820 "type.googleapis.com/google.cloud.dataplex.v1.UpdateContentRequest"
9821 }
9822}
9823
9824#[derive(Clone, Default, PartialEq)]
9826#[non_exhaustive]
9827pub struct DeleteContentRequest {
9828 pub name: std::string::String,
9831
9832 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9833}
9834
9835impl DeleteContentRequest {
9836 pub fn new() -> Self {
9837 std::default::Default::default()
9838 }
9839
9840 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9842 self.name = v.into();
9843 self
9844 }
9845}
9846
9847impl wkt::message::Message for DeleteContentRequest {
9848 fn typename() -> &'static str {
9849 "type.googleapis.com/google.cloud.dataplex.v1.DeleteContentRequest"
9850 }
9851}
9852
9853#[derive(Clone, Default, PartialEq)]
9855#[non_exhaustive]
9856pub struct ListContentRequest {
9857 pub parent: std::string::String,
9860
9861 pub page_size: i32,
9865
9866 pub page_token: std::string::String,
9871
9872 pub filter: std::string::String,
9882
9883 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9884}
9885
9886impl ListContentRequest {
9887 pub fn new() -> Self {
9888 std::default::Default::default()
9889 }
9890
9891 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9893 self.parent = v.into();
9894 self
9895 }
9896
9897 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9899 self.page_size = v.into();
9900 self
9901 }
9902
9903 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9905 self.page_token = v.into();
9906 self
9907 }
9908
9909 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9911 self.filter = v.into();
9912 self
9913 }
9914}
9915
9916impl wkt::message::Message for ListContentRequest {
9917 fn typename() -> &'static str {
9918 "type.googleapis.com/google.cloud.dataplex.v1.ListContentRequest"
9919 }
9920}
9921
9922#[derive(Clone, Default, PartialEq)]
9924#[non_exhaustive]
9925pub struct ListContentResponse {
9926 pub content: std::vec::Vec<crate::model::Content>,
9928
9929 pub next_page_token: std::string::String,
9932
9933 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9934}
9935
9936impl ListContentResponse {
9937 pub fn new() -> Self {
9938 std::default::Default::default()
9939 }
9940
9941 pub fn set_content<T, V>(mut self, v: T) -> Self
9943 where
9944 T: std::iter::IntoIterator<Item = V>,
9945 V: std::convert::Into<crate::model::Content>,
9946 {
9947 use std::iter::Iterator;
9948 self.content = v.into_iter().map(|i| i.into()).collect();
9949 self
9950 }
9951
9952 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9954 self.next_page_token = v.into();
9955 self
9956 }
9957}
9958
9959impl wkt::message::Message for ListContentResponse {
9960 fn typename() -> &'static str {
9961 "type.googleapis.com/google.cloud.dataplex.v1.ListContentResponse"
9962 }
9963}
9964
9965#[doc(hidden)]
9966impl gax::paginator::internal::PageableResponse for ListContentResponse {
9967 type PageItem = crate::model::Content;
9968
9969 fn items(self) -> std::vec::Vec<Self::PageItem> {
9970 self.content
9971 }
9972
9973 fn next_page_token(&self) -> std::string::String {
9974 use std::clone::Clone;
9975 self.next_page_token.clone()
9976 }
9977}
9978
9979#[derive(Clone, Default, PartialEq)]
9981#[non_exhaustive]
9982pub struct GetContentRequest {
9983 pub name: std::string::String,
9986
9987 pub view: crate::model::get_content_request::ContentView,
9989
9990 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9991}
9992
9993impl GetContentRequest {
9994 pub fn new() -> Self {
9995 std::default::Default::default()
9996 }
9997
9998 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10000 self.name = v.into();
10001 self
10002 }
10003
10004 pub fn set_view<T: std::convert::Into<crate::model::get_content_request::ContentView>>(
10006 mut self,
10007 v: T,
10008 ) -> Self {
10009 self.view = v.into();
10010 self
10011 }
10012}
10013
10014impl wkt::message::Message for GetContentRequest {
10015 fn typename() -> &'static str {
10016 "type.googleapis.com/google.cloud.dataplex.v1.GetContentRequest"
10017 }
10018}
10019
10020pub mod get_content_request {
10022 #[allow(unused_imports)]
10023 use super::*;
10024
10025 #[derive(Clone, Debug, PartialEq)]
10042 #[non_exhaustive]
10043 pub enum ContentView {
10044 Unspecified,
10047 Basic,
10049 Full,
10051 UnknownValue(content_view::UnknownValue),
10056 }
10057
10058 #[doc(hidden)]
10059 pub mod content_view {
10060 #[allow(unused_imports)]
10061 use super::*;
10062 #[derive(Clone, Debug, PartialEq)]
10063 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10064 }
10065
10066 impl ContentView {
10067 pub fn value(&self) -> std::option::Option<i32> {
10072 match self {
10073 Self::Unspecified => std::option::Option::Some(0),
10074 Self::Basic => std::option::Option::Some(1),
10075 Self::Full => std::option::Option::Some(2),
10076 Self::UnknownValue(u) => u.0.value(),
10077 }
10078 }
10079
10080 pub fn name(&self) -> std::option::Option<&str> {
10085 match self {
10086 Self::Unspecified => std::option::Option::Some("CONTENT_VIEW_UNSPECIFIED"),
10087 Self::Basic => std::option::Option::Some("BASIC"),
10088 Self::Full => std::option::Option::Some("FULL"),
10089 Self::UnknownValue(u) => u.0.name(),
10090 }
10091 }
10092 }
10093
10094 impl std::default::Default for ContentView {
10095 fn default() -> Self {
10096 use std::convert::From;
10097 Self::from(0)
10098 }
10099 }
10100
10101 impl std::fmt::Display for ContentView {
10102 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10103 wkt::internal::display_enum(f, self.name(), self.value())
10104 }
10105 }
10106
10107 impl std::convert::From<i32> for ContentView {
10108 fn from(value: i32) -> Self {
10109 match value {
10110 0 => Self::Unspecified,
10111 1 => Self::Basic,
10112 2 => Self::Full,
10113 _ => Self::UnknownValue(content_view::UnknownValue(
10114 wkt::internal::UnknownEnumValue::Integer(value),
10115 )),
10116 }
10117 }
10118 }
10119
10120 impl std::convert::From<&str> for ContentView {
10121 fn from(value: &str) -> Self {
10122 use std::string::ToString;
10123 match value {
10124 "CONTENT_VIEW_UNSPECIFIED" => Self::Unspecified,
10125 "BASIC" => Self::Basic,
10126 "FULL" => Self::Full,
10127 _ => Self::UnknownValue(content_view::UnknownValue(
10128 wkt::internal::UnknownEnumValue::String(value.to_string()),
10129 )),
10130 }
10131 }
10132 }
10133
10134 impl serde::ser::Serialize for ContentView {
10135 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10136 where
10137 S: serde::Serializer,
10138 {
10139 match self {
10140 Self::Unspecified => serializer.serialize_i32(0),
10141 Self::Basic => serializer.serialize_i32(1),
10142 Self::Full => serializer.serialize_i32(2),
10143 Self::UnknownValue(u) => u.0.serialize(serializer),
10144 }
10145 }
10146 }
10147
10148 impl<'de> serde::de::Deserialize<'de> for ContentView {
10149 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10150 where
10151 D: serde::Deserializer<'de>,
10152 {
10153 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ContentView>::new(
10154 ".google.cloud.dataplex.v1.GetContentRequest.ContentView",
10155 ))
10156 }
10157 }
10158}
10159
10160#[derive(Clone, Default, PartialEq)]
10162#[non_exhaustive]
10163pub struct DataDiscoverySpec {
10164 pub bigquery_publishing_config:
10166 std::option::Option<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
10167
10168 pub resource_config: std::option::Option<crate::model::data_discovery_spec::ResourceConfig>,
10170
10171 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10172}
10173
10174impl DataDiscoverySpec {
10175 pub fn new() -> Self {
10176 std::default::Default::default()
10177 }
10178
10179 pub fn set_bigquery_publishing_config<T>(mut self, v: T) -> Self
10181 where
10182 T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
10183 {
10184 self.bigquery_publishing_config = std::option::Option::Some(v.into());
10185 self
10186 }
10187
10188 pub fn set_or_clear_bigquery_publishing_config<T>(mut self, v: std::option::Option<T>) -> Self
10190 where
10191 T: std::convert::Into<crate::model::data_discovery_spec::BigQueryPublishingConfig>,
10192 {
10193 self.bigquery_publishing_config = v.map(|x| x.into());
10194 self
10195 }
10196
10197 pub fn set_resource_config<
10202 T: std::convert::Into<std::option::Option<crate::model::data_discovery_spec::ResourceConfig>>,
10203 >(
10204 mut self,
10205 v: T,
10206 ) -> Self {
10207 self.resource_config = v.into();
10208 self
10209 }
10210
10211 pub fn storage_config(
10215 &self,
10216 ) -> std::option::Option<&std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>
10217 {
10218 #[allow(unreachable_patterns)]
10219 self.resource_config.as_ref().and_then(|v| match v {
10220 crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v) => {
10221 std::option::Option::Some(v)
10222 }
10223 _ => std::option::Option::None,
10224 })
10225 }
10226
10227 pub fn set_storage_config<
10233 T: std::convert::Into<std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>>,
10234 >(
10235 mut self,
10236 v: T,
10237 ) -> Self {
10238 self.resource_config = std::option::Option::Some(
10239 crate::model::data_discovery_spec::ResourceConfig::StorageConfig(v.into()),
10240 );
10241 self
10242 }
10243}
10244
10245impl wkt::message::Message for DataDiscoverySpec {
10246 fn typename() -> &'static str {
10247 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec"
10248 }
10249}
10250
10251pub mod data_discovery_spec {
10253 #[allow(unused_imports)]
10254 use super::*;
10255
10256 #[derive(Clone, Default, PartialEq)]
10258 #[non_exhaustive]
10259 pub struct BigQueryPublishingConfig {
10260 pub table_type: crate::model::data_discovery_spec::big_query_publishing_config::TableType,
10263
10264 pub connection: std::string::String,
10268
10269 pub location: std::string::String,
10292
10293 pub project: std::string::String,
10298
10299 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10300 }
10301
10302 impl BigQueryPublishingConfig {
10303 pub fn new() -> Self {
10304 std::default::Default::default()
10305 }
10306
10307 pub fn set_table_type<
10309 T: std::convert::Into<
10310 crate::model::data_discovery_spec::big_query_publishing_config::TableType,
10311 >,
10312 >(
10313 mut self,
10314 v: T,
10315 ) -> Self {
10316 self.table_type = v.into();
10317 self
10318 }
10319
10320 pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10322 self.connection = v.into();
10323 self
10324 }
10325
10326 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10328 self.location = v.into();
10329 self
10330 }
10331
10332 pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10334 self.project = v.into();
10335 self
10336 }
10337 }
10338
10339 impl wkt::message::Message for BigQueryPublishingConfig {
10340 fn typename() -> &'static str {
10341 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig"
10342 }
10343 }
10344
10345 pub mod big_query_publishing_config {
10347 #[allow(unused_imports)]
10348 use super::*;
10349
10350 #[derive(Clone, Debug, PartialEq)]
10366 #[non_exhaustive]
10367 pub enum TableType {
10368 Unspecified,
10370 External,
10374 Biglake,
10378 UnknownValue(table_type::UnknownValue),
10383 }
10384
10385 #[doc(hidden)]
10386 pub mod table_type {
10387 #[allow(unused_imports)]
10388 use super::*;
10389 #[derive(Clone, Debug, PartialEq)]
10390 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10391 }
10392
10393 impl TableType {
10394 pub fn value(&self) -> std::option::Option<i32> {
10399 match self {
10400 Self::Unspecified => std::option::Option::Some(0),
10401 Self::External => std::option::Option::Some(1),
10402 Self::Biglake => std::option::Option::Some(2),
10403 Self::UnknownValue(u) => u.0.value(),
10404 }
10405 }
10406
10407 pub fn name(&self) -> std::option::Option<&str> {
10412 match self {
10413 Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
10414 Self::External => std::option::Option::Some("EXTERNAL"),
10415 Self::Biglake => std::option::Option::Some("BIGLAKE"),
10416 Self::UnknownValue(u) => u.0.name(),
10417 }
10418 }
10419 }
10420
10421 impl std::default::Default for TableType {
10422 fn default() -> Self {
10423 use std::convert::From;
10424 Self::from(0)
10425 }
10426 }
10427
10428 impl std::fmt::Display for TableType {
10429 fn fmt(
10430 &self,
10431 f: &mut std::fmt::Formatter<'_>,
10432 ) -> std::result::Result<(), std::fmt::Error> {
10433 wkt::internal::display_enum(f, self.name(), self.value())
10434 }
10435 }
10436
10437 impl std::convert::From<i32> for TableType {
10438 fn from(value: i32) -> Self {
10439 match value {
10440 0 => Self::Unspecified,
10441 1 => Self::External,
10442 2 => Self::Biglake,
10443 _ => Self::UnknownValue(table_type::UnknownValue(
10444 wkt::internal::UnknownEnumValue::Integer(value),
10445 )),
10446 }
10447 }
10448 }
10449
10450 impl std::convert::From<&str> for TableType {
10451 fn from(value: &str) -> Self {
10452 use std::string::ToString;
10453 match value {
10454 "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
10455 "EXTERNAL" => Self::External,
10456 "BIGLAKE" => Self::Biglake,
10457 _ => Self::UnknownValue(table_type::UnknownValue(
10458 wkt::internal::UnknownEnumValue::String(value.to_string()),
10459 )),
10460 }
10461 }
10462 }
10463
10464 impl serde::ser::Serialize for TableType {
10465 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10466 where
10467 S: serde::Serializer,
10468 {
10469 match self {
10470 Self::Unspecified => serializer.serialize_i32(0),
10471 Self::External => serializer.serialize_i32(1),
10472 Self::Biglake => serializer.serialize_i32(2),
10473 Self::UnknownValue(u) => u.0.serialize(serializer),
10474 }
10475 }
10476 }
10477
10478 impl<'de> serde::de::Deserialize<'de> for TableType {
10479 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10480 where
10481 D: serde::Deserializer<'de>,
10482 {
10483 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
10484 ".google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType"))
10485 }
10486 }
10487 }
10488
10489 #[derive(Clone, Default, PartialEq)]
10491 #[non_exhaustive]
10492 pub struct StorageConfig {
10493 pub include_patterns: std::vec::Vec<std::string::String>,
10500
10501 pub exclude_patterns: std::vec::Vec<std::string::String>,
10507
10508 pub csv_options:
10510 std::option::Option<crate::model::data_discovery_spec::storage_config::CsvOptions>,
10511
10512 pub json_options:
10514 std::option::Option<crate::model::data_discovery_spec::storage_config::JsonOptions>,
10515
10516 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10517 }
10518
10519 impl StorageConfig {
10520 pub fn new() -> Self {
10521 std::default::Default::default()
10522 }
10523
10524 pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
10526 where
10527 T: std::iter::IntoIterator<Item = V>,
10528 V: std::convert::Into<std::string::String>,
10529 {
10530 use std::iter::Iterator;
10531 self.include_patterns = v.into_iter().map(|i| i.into()).collect();
10532 self
10533 }
10534
10535 pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
10537 where
10538 T: std::iter::IntoIterator<Item = V>,
10539 V: std::convert::Into<std::string::String>,
10540 {
10541 use std::iter::Iterator;
10542 self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
10543 self
10544 }
10545
10546 pub fn set_csv_options<T>(mut self, v: T) -> Self
10548 where
10549 T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
10550 {
10551 self.csv_options = std::option::Option::Some(v.into());
10552 self
10553 }
10554
10555 pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
10557 where
10558 T: std::convert::Into<crate::model::data_discovery_spec::storage_config::CsvOptions>,
10559 {
10560 self.csv_options = v.map(|x| x.into());
10561 self
10562 }
10563
10564 pub fn set_json_options<T>(mut self, v: T) -> Self
10566 where
10567 T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
10568 {
10569 self.json_options = std::option::Option::Some(v.into());
10570 self
10571 }
10572
10573 pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
10575 where
10576 T: std::convert::Into<crate::model::data_discovery_spec::storage_config::JsonOptions>,
10577 {
10578 self.json_options = v.map(|x| x.into());
10579 self
10580 }
10581 }
10582
10583 impl wkt::message::Message for StorageConfig {
10584 fn typename() -> &'static str {
10585 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig"
10586 }
10587 }
10588
10589 pub mod storage_config {
10591 #[allow(unused_imports)]
10592 use super::*;
10593
10594 #[derive(Clone, Default, PartialEq)]
10596 #[non_exhaustive]
10597 pub struct CsvOptions {
10598 pub header_rows: i32,
10601
10602 pub delimiter: std::string::String,
10605
10606 pub encoding: std::string::String,
10608
10609 pub type_inference_disabled: bool,
10612
10613 pub quote: std::string::String,
10617
10618 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10619 }
10620
10621 impl CsvOptions {
10622 pub fn new() -> Self {
10623 std::default::Default::default()
10624 }
10625
10626 pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10628 self.header_rows = v.into();
10629 self
10630 }
10631
10632 pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
10634 mut self,
10635 v: T,
10636 ) -> Self {
10637 self.delimiter = v.into();
10638 self
10639 }
10640
10641 pub fn set_encoding<T: std::convert::Into<std::string::String>>(
10643 mut self,
10644 v: T,
10645 ) -> Self {
10646 self.encoding = v.into();
10647 self
10648 }
10649
10650 pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
10652 mut self,
10653 v: T,
10654 ) -> Self {
10655 self.type_inference_disabled = v.into();
10656 self
10657 }
10658
10659 pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10661 self.quote = v.into();
10662 self
10663 }
10664 }
10665
10666 impl wkt::message::Message for CsvOptions {
10667 fn typename() -> &'static str {
10668 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions"
10669 }
10670 }
10671
10672 #[derive(Clone, Default, PartialEq)]
10674 #[non_exhaustive]
10675 pub struct JsonOptions {
10676 pub encoding: std::string::String,
10678
10679 pub type_inference_disabled: bool,
10683
10684 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10685 }
10686
10687 impl JsonOptions {
10688 pub fn new() -> Self {
10689 std::default::Default::default()
10690 }
10691
10692 pub fn set_encoding<T: std::convert::Into<std::string::String>>(
10694 mut self,
10695 v: T,
10696 ) -> Self {
10697 self.encoding = v.into();
10698 self
10699 }
10700
10701 pub fn set_type_inference_disabled<T: std::convert::Into<bool>>(
10703 mut self,
10704 v: T,
10705 ) -> Self {
10706 self.type_inference_disabled = v.into();
10707 self
10708 }
10709 }
10710
10711 impl wkt::message::Message for JsonOptions {
10712 fn typename() -> &'static str {
10713 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions"
10714 }
10715 }
10716 }
10717
10718 #[derive(Clone, Debug, PartialEq)]
10720 #[non_exhaustive]
10721 pub enum ResourceConfig {
10722 StorageConfig(std::boxed::Box<crate::model::data_discovery_spec::StorageConfig>),
10724 }
10725}
10726
10727#[derive(Clone, Default, PartialEq)]
10729#[non_exhaustive]
10730pub struct DataDiscoveryResult {
10731 pub bigquery_publishing:
10733 std::option::Option<crate::model::data_discovery_result::BigQueryPublishing>,
10734
10735 pub scan_statistics: std::option::Option<crate::model::data_discovery_result::ScanStatistics>,
10737
10738 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10739}
10740
10741impl DataDiscoveryResult {
10742 pub fn new() -> Self {
10743 std::default::Default::default()
10744 }
10745
10746 pub fn set_bigquery_publishing<T>(mut self, v: T) -> Self
10748 where
10749 T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
10750 {
10751 self.bigquery_publishing = std::option::Option::Some(v.into());
10752 self
10753 }
10754
10755 pub fn set_or_clear_bigquery_publishing<T>(mut self, v: std::option::Option<T>) -> Self
10757 where
10758 T: std::convert::Into<crate::model::data_discovery_result::BigQueryPublishing>,
10759 {
10760 self.bigquery_publishing = v.map(|x| x.into());
10761 self
10762 }
10763
10764 pub fn set_scan_statistics<T>(mut self, v: T) -> Self
10766 where
10767 T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
10768 {
10769 self.scan_statistics = std::option::Option::Some(v.into());
10770 self
10771 }
10772
10773 pub fn set_or_clear_scan_statistics<T>(mut self, v: std::option::Option<T>) -> Self
10775 where
10776 T: std::convert::Into<crate::model::data_discovery_result::ScanStatistics>,
10777 {
10778 self.scan_statistics = v.map(|x| x.into());
10779 self
10780 }
10781}
10782
10783impl wkt::message::Message for DataDiscoveryResult {
10784 fn typename() -> &'static str {
10785 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult"
10786 }
10787}
10788
10789pub mod data_discovery_result {
10791 #[allow(unused_imports)]
10792 use super::*;
10793
10794 #[derive(Clone, Default, PartialEq)]
10796 #[non_exhaustive]
10797 pub struct BigQueryPublishing {
10798 pub dataset: std::string::String,
10800
10801 pub location: std::string::String,
10803
10804 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10805 }
10806
10807 impl BigQueryPublishing {
10808 pub fn new() -> Self {
10809 std::default::Default::default()
10810 }
10811
10812 pub fn set_dataset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10814 self.dataset = v.into();
10815 self
10816 }
10817
10818 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10820 self.location = v.into();
10821 self
10822 }
10823 }
10824
10825 impl wkt::message::Message for BigQueryPublishing {
10826 fn typename() -> &'static str {
10827 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing"
10828 }
10829 }
10830
10831 #[derive(Clone, Default, PartialEq)]
10833 #[non_exhaustive]
10834 pub struct ScanStatistics {
10835 pub scanned_file_count: i32,
10837
10838 pub data_processed_bytes: i64,
10840
10841 pub files_excluded: i32,
10843
10844 pub tables_created: i32,
10846
10847 pub tables_deleted: i32,
10849
10850 pub tables_updated: i32,
10852
10853 pub filesets_created: i32,
10855
10856 pub filesets_deleted: i32,
10858
10859 pub filesets_updated: i32,
10861
10862 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10863 }
10864
10865 impl ScanStatistics {
10866 pub fn new() -> Self {
10867 std::default::Default::default()
10868 }
10869
10870 pub fn set_scanned_file_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10872 self.scanned_file_count = v.into();
10873 self
10874 }
10875
10876 pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10878 self.data_processed_bytes = v.into();
10879 self
10880 }
10881
10882 pub fn set_files_excluded<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10884 self.files_excluded = v.into();
10885 self
10886 }
10887
10888 pub fn set_tables_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10890 self.tables_created = v.into();
10891 self
10892 }
10893
10894 pub fn set_tables_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10896 self.tables_deleted = v.into();
10897 self
10898 }
10899
10900 pub fn set_tables_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10902 self.tables_updated = v.into();
10903 self
10904 }
10905
10906 pub fn set_filesets_created<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10908 self.filesets_created = v.into();
10909 self
10910 }
10911
10912 pub fn set_filesets_deleted<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10914 self.filesets_deleted = v.into();
10915 self
10916 }
10917
10918 pub fn set_filesets_updated<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10920 self.filesets_updated = v.into();
10921 self
10922 }
10923 }
10924
10925 impl wkt::message::Message for ScanStatistics {
10926 fn typename() -> &'static str {
10927 "type.googleapis.com/google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatistics"
10928 }
10929 }
10930}
10931
10932#[derive(Clone, Default, PartialEq)]
10934#[non_exhaustive]
10935pub struct DataDocumentationSpec {
10936 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10937}
10938
10939impl DataDocumentationSpec {
10940 pub fn new() -> Self {
10941 std::default::Default::default()
10942 }
10943}
10944
10945impl wkt::message::Message for DataDocumentationSpec {
10946 fn typename() -> &'static str {
10947 "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationSpec"
10948 }
10949}
10950
10951#[derive(Clone, Default, PartialEq)]
10953#[non_exhaustive]
10954pub struct DataDocumentationResult {
10955 pub result: std::option::Option<crate::model::data_documentation_result::Result>,
10957
10958 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10959}
10960
10961impl DataDocumentationResult {
10962 pub fn new() -> Self {
10963 std::default::Default::default()
10964 }
10965
10966 pub fn set_result<
10971 T: std::convert::Into<std::option::Option<crate::model::data_documentation_result::Result>>,
10972 >(
10973 mut self,
10974 v: T,
10975 ) -> Self {
10976 self.result = v.into();
10977 self
10978 }
10979
10980 pub fn table_result(
10984 &self,
10985 ) -> std::option::Option<&std::boxed::Box<crate::model::data_documentation_result::TableResult>>
10986 {
10987 #[allow(unreachable_patterns)]
10988 self.result.as_ref().and_then(|v| match v {
10989 crate::model::data_documentation_result::Result::TableResult(v) => {
10990 std::option::Option::Some(v)
10991 }
10992 _ => std::option::Option::None,
10993 })
10994 }
10995
10996 pub fn set_table_result<
11002 T: std::convert::Into<std::boxed::Box<crate::model::data_documentation_result::TableResult>>,
11003 >(
11004 mut self,
11005 v: T,
11006 ) -> Self {
11007 self.result = std::option::Option::Some(
11008 crate::model::data_documentation_result::Result::TableResult(v.into()),
11009 );
11010 self
11011 }
11012}
11013
11014impl wkt::message::Message for DataDocumentationResult {
11015 fn typename() -> &'static str {
11016 "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult"
11017 }
11018}
11019
11020pub mod data_documentation_result {
11022 #[allow(unused_imports)]
11023 use super::*;
11024
11025 #[derive(Clone, Default, PartialEq)]
11027 #[non_exhaustive]
11028 pub struct TableResult {
11029 pub name: std::string::String,
11033
11034 pub overview: std::string::String,
11036
11037 pub schema: std::option::Option<crate::model::data_documentation_result::Schema>,
11040
11041 pub queries: std::vec::Vec<crate::model::data_documentation_result::Query>,
11043
11044 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11045 }
11046
11047 impl TableResult {
11048 pub fn new() -> Self {
11049 std::default::Default::default()
11050 }
11051
11052 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11054 self.name = v.into();
11055 self
11056 }
11057
11058 pub fn set_overview<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11060 self.overview = v.into();
11061 self
11062 }
11063
11064 pub fn set_schema<T>(mut self, v: T) -> Self
11066 where
11067 T: std::convert::Into<crate::model::data_documentation_result::Schema>,
11068 {
11069 self.schema = std::option::Option::Some(v.into());
11070 self
11071 }
11072
11073 pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
11075 where
11076 T: std::convert::Into<crate::model::data_documentation_result::Schema>,
11077 {
11078 self.schema = v.map(|x| x.into());
11079 self
11080 }
11081
11082 pub fn set_queries<T, V>(mut self, v: T) -> Self
11084 where
11085 T: std::iter::IntoIterator<Item = V>,
11086 V: std::convert::Into<crate::model::data_documentation_result::Query>,
11087 {
11088 use std::iter::Iterator;
11089 self.queries = v.into_iter().map(|i| i.into()).collect();
11090 self
11091 }
11092 }
11093
11094 impl wkt::message::Message for TableResult {
11095 fn typename() -> &'static str {
11096 "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.TableResult"
11097 }
11098 }
11099
11100 #[derive(Clone, Default, PartialEq)]
11102 #[non_exhaustive]
11103 pub struct Query {
11104 pub sql: std::string::String,
11106
11107 pub description: std::string::String,
11109
11110 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11111 }
11112
11113 impl Query {
11114 pub fn new() -> Self {
11115 std::default::Default::default()
11116 }
11117
11118 pub fn set_sql<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11120 self.sql = v.into();
11121 self
11122 }
11123
11124 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11126 self.description = v.into();
11127 self
11128 }
11129 }
11130
11131 impl wkt::message::Message for Query {
11132 fn typename() -> &'static str {
11133 "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Query"
11134 }
11135 }
11136
11137 #[derive(Clone, Default, PartialEq)]
11139 #[non_exhaustive]
11140 pub struct Schema {
11141 pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
11143
11144 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11145 }
11146
11147 impl Schema {
11148 pub fn new() -> Self {
11149 std::default::Default::default()
11150 }
11151
11152 pub fn set_fields<T, V>(mut self, v: T) -> Self
11154 where
11155 T: std::iter::IntoIterator<Item = V>,
11156 V: std::convert::Into<crate::model::data_documentation_result::Field>,
11157 {
11158 use std::iter::Iterator;
11159 self.fields = v.into_iter().map(|i| i.into()).collect();
11160 self
11161 }
11162 }
11163
11164 impl wkt::message::Message for Schema {
11165 fn typename() -> &'static str {
11166 "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Schema"
11167 }
11168 }
11169
11170 #[derive(Clone, Default, PartialEq)]
11172 #[non_exhaustive]
11173 pub struct Field {
11174 pub name: std::string::String,
11176
11177 pub description: std::string::String,
11179
11180 pub fields: std::vec::Vec<crate::model::data_documentation_result::Field>,
11182
11183 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11184 }
11185
11186 impl Field {
11187 pub fn new() -> Self {
11188 std::default::Default::default()
11189 }
11190
11191 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11193 self.name = v.into();
11194 self
11195 }
11196
11197 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11199 self.description = v.into();
11200 self
11201 }
11202
11203 pub fn set_fields<T, V>(mut self, v: T) -> Self
11205 where
11206 T: std::iter::IntoIterator<Item = V>,
11207 V: std::convert::Into<crate::model::data_documentation_result::Field>,
11208 {
11209 use std::iter::Iterator;
11210 self.fields = v.into_iter().map(|i| i.into()).collect();
11211 self
11212 }
11213 }
11214
11215 impl wkt::message::Message for Field {
11216 fn typename() -> &'static str {
11217 "type.googleapis.com/google.cloud.dataplex.v1.DataDocumentationResult.Field"
11218 }
11219 }
11220
11221 #[derive(Clone, Debug, PartialEq)]
11223 #[non_exhaustive]
11224 pub enum Result {
11225 TableResult(std::boxed::Box<crate::model::data_documentation_result::TableResult>),
11227 }
11228}
11229
11230#[derive(Clone, Default, PartialEq)]
11232#[non_exhaustive]
11233pub struct DataProfileSpec {
11234 pub sampling_percent: f32,
11242
11243 pub row_filter: std::string::String,
11248
11249 pub post_scan_actions: std::option::Option<crate::model::data_profile_spec::PostScanActions>,
11251
11252 pub include_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
11257
11258 pub exclude_fields: std::option::Option<crate::model::data_profile_spec::SelectedFields>,
11263
11264 pub catalog_publishing_enabled: bool,
11267
11268 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11269}
11270
11271impl DataProfileSpec {
11272 pub fn new() -> Self {
11273 std::default::Default::default()
11274 }
11275
11276 pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
11278 self.sampling_percent = v.into();
11279 self
11280 }
11281
11282 pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11284 self.row_filter = v.into();
11285 self
11286 }
11287
11288 pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
11290 where
11291 T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
11292 {
11293 self.post_scan_actions = std::option::Option::Some(v.into());
11294 self
11295 }
11296
11297 pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
11299 where
11300 T: std::convert::Into<crate::model::data_profile_spec::PostScanActions>,
11301 {
11302 self.post_scan_actions = v.map(|x| x.into());
11303 self
11304 }
11305
11306 pub fn set_include_fields<T>(mut self, v: T) -> Self
11308 where
11309 T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11310 {
11311 self.include_fields = std::option::Option::Some(v.into());
11312 self
11313 }
11314
11315 pub fn set_or_clear_include_fields<T>(mut self, v: std::option::Option<T>) -> Self
11317 where
11318 T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11319 {
11320 self.include_fields = v.map(|x| x.into());
11321 self
11322 }
11323
11324 pub fn set_exclude_fields<T>(mut self, v: T) -> Self
11326 where
11327 T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11328 {
11329 self.exclude_fields = std::option::Option::Some(v.into());
11330 self
11331 }
11332
11333 pub fn set_or_clear_exclude_fields<T>(mut self, v: std::option::Option<T>) -> Self
11335 where
11336 T: std::convert::Into<crate::model::data_profile_spec::SelectedFields>,
11337 {
11338 self.exclude_fields = v.map(|x| x.into());
11339 self
11340 }
11341
11342 pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11344 self.catalog_publishing_enabled = v.into();
11345 self
11346 }
11347}
11348
11349impl wkt::message::Message for DataProfileSpec {
11350 fn typename() -> &'static str {
11351 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec"
11352 }
11353}
11354
11355pub mod data_profile_spec {
11357 #[allow(unused_imports)]
11358 use super::*;
11359
11360 #[derive(Clone, Default, PartialEq)]
11362 #[non_exhaustive]
11363 pub struct PostScanActions {
11364 pub bigquery_export:
11367 std::option::Option<crate::model::data_profile_spec::post_scan_actions::BigQueryExport>,
11368
11369 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11370 }
11371
11372 impl PostScanActions {
11373 pub fn new() -> Self {
11374 std::default::Default::default()
11375 }
11376
11377 pub fn set_bigquery_export<T>(mut self, v: T) -> Self
11379 where
11380 T: std::convert::Into<
11381 crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
11382 >,
11383 {
11384 self.bigquery_export = std::option::Option::Some(v.into());
11385 self
11386 }
11387
11388 pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
11390 where
11391 T: std::convert::Into<
11392 crate::model::data_profile_spec::post_scan_actions::BigQueryExport,
11393 >,
11394 {
11395 self.bigquery_export = v.map(|x| x.into());
11396 self
11397 }
11398 }
11399
11400 impl wkt::message::Message for PostScanActions {
11401 fn typename() -> &'static str {
11402 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions"
11403 }
11404 }
11405
11406 pub mod post_scan_actions {
11408 #[allow(unused_imports)]
11409 use super::*;
11410
11411 #[derive(Clone, Default, PartialEq)]
11413 #[non_exhaustive]
11414 pub struct BigQueryExport {
11415 pub results_table: std::string::String,
11419
11420 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11421 }
11422
11423 impl BigQueryExport {
11424 pub fn new() -> Self {
11425 std::default::Default::default()
11426 }
11427
11428 pub fn set_results_table<T: std::convert::Into<std::string::String>>(
11430 mut self,
11431 v: T,
11432 ) -> Self {
11433 self.results_table = v.into();
11434 self
11435 }
11436 }
11437
11438 impl wkt::message::Message for BigQueryExport {
11439 fn typename() -> &'static str {
11440 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport"
11441 }
11442 }
11443 }
11444
11445 #[derive(Clone, Default, PartialEq)]
11447 #[non_exhaustive]
11448 pub struct SelectedFields {
11449 pub field_names: std::vec::Vec<std::string::String>,
11457
11458 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11459 }
11460
11461 impl SelectedFields {
11462 pub fn new() -> Self {
11463 std::default::Default::default()
11464 }
11465
11466 pub fn set_field_names<T, V>(mut self, v: T) -> Self
11468 where
11469 T: std::iter::IntoIterator<Item = V>,
11470 V: std::convert::Into<std::string::String>,
11471 {
11472 use std::iter::Iterator;
11473 self.field_names = v.into_iter().map(|i| i.into()).collect();
11474 self
11475 }
11476 }
11477
11478 impl wkt::message::Message for SelectedFields {
11479 fn typename() -> &'static str {
11480 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileSpec.SelectedFields"
11481 }
11482 }
11483}
11484
11485#[derive(Clone, Default, PartialEq)]
11488#[non_exhaustive]
11489pub struct DataProfileResult {
11490 pub row_count: i64,
11492
11493 pub profile: std::option::Option<crate::model::data_profile_result::Profile>,
11495
11496 pub scanned_data: std::option::Option<crate::model::ScannedData>,
11498
11499 pub post_scan_actions_result:
11501 std::option::Option<crate::model::data_profile_result::PostScanActionsResult>,
11502
11503 pub catalog_publishing_status:
11506 std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
11507
11508 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11509}
11510
11511impl DataProfileResult {
11512 pub fn new() -> Self {
11513 std::default::Default::default()
11514 }
11515
11516 pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11518 self.row_count = v.into();
11519 self
11520 }
11521
11522 pub fn set_profile<T>(mut self, v: T) -> Self
11524 where
11525 T: std::convert::Into<crate::model::data_profile_result::Profile>,
11526 {
11527 self.profile = std::option::Option::Some(v.into());
11528 self
11529 }
11530
11531 pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
11533 where
11534 T: std::convert::Into<crate::model::data_profile_result::Profile>,
11535 {
11536 self.profile = v.map(|x| x.into());
11537 self
11538 }
11539
11540 pub fn set_scanned_data<T>(mut self, v: T) -> Self
11542 where
11543 T: std::convert::Into<crate::model::ScannedData>,
11544 {
11545 self.scanned_data = std::option::Option::Some(v.into());
11546 self
11547 }
11548
11549 pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
11551 where
11552 T: std::convert::Into<crate::model::ScannedData>,
11553 {
11554 self.scanned_data = v.map(|x| x.into());
11555 self
11556 }
11557
11558 pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
11560 where
11561 T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
11562 {
11563 self.post_scan_actions_result = std::option::Option::Some(v.into());
11564 self
11565 }
11566
11567 pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
11569 where
11570 T: std::convert::Into<crate::model::data_profile_result::PostScanActionsResult>,
11571 {
11572 self.post_scan_actions_result = v.map(|x| x.into());
11573 self
11574 }
11575
11576 pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
11578 where
11579 T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
11580 {
11581 self.catalog_publishing_status = std::option::Option::Some(v.into());
11582 self
11583 }
11584
11585 pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
11587 where
11588 T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
11589 {
11590 self.catalog_publishing_status = v.map(|x| x.into());
11591 self
11592 }
11593}
11594
11595impl wkt::message::Message for DataProfileResult {
11596 fn typename() -> &'static str {
11597 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult"
11598 }
11599}
11600
11601pub mod data_profile_result {
11603 #[allow(unused_imports)]
11604 use super::*;
11605
11606 #[derive(Clone, Default, PartialEq)]
11608 #[non_exhaustive]
11609 pub struct Profile {
11610 pub fields: std::vec::Vec<crate::model::data_profile_result::profile::Field>,
11613
11614 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11615 }
11616
11617 impl Profile {
11618 pub fn new() -> Self {
11619 std::default::Default::default()
11620 }
11621
11622 pub fn set_fields<T, V>(mut self, v: T) -> Self
11624 where
11625 T: std::iter::IntoIterator<Item = V>,
11626 V: std::convert::Into<crate::model::data_profile_result::profile::Field>,
11627 {
11628 use std::iter::Iterator;
11629 self.fields = v.into_iter().map(|i| i.into()).collect();
11630 self
11631 }
11632 }
11633
11634 impl wkt::message::Message for Profile {
11635 fn typename() -> &'static str {
11636 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile"
11637 }
11638 }
11639
11640 pub mod profile {
11642 #[allow(unused_imports)]
11643 use super::*;
11644
11645 #[derive(Clone, Default, PartialEq)]
11647 #[non_exhaustive]
11648 pub struct Field {
11649 pub name: std::string::String,
11651
11652 pub r#type: std::string::String,
11659
11660 pub mode: std::string::String,
11666
11667 pub profile:
11669 std::option::Option<crate::model::data_profile_result::profile::field::ProfileInfo>,
11670
11671 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11672 }
11673
11674 impl Field {
11675 pub fn new() -> Self {
11676 std::default::Default::default()
11677 }
11678
11679 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11681 self.name = v.into();
11682 self
11683 }
11684
11685 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11687 self.r#type = v.into();
11688 self
11689 }
11690
11691 pub fn set_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11693 self.mode = v.into();
11694 self
11695 }
11696
11697 pub fn set_profile<T>(mut self, v: T) -> Self
11699 where
11700 T: std::convert::Into<
11701 crate::model::data_profile_result::profile::field::ProfileInfo,
11702 >,
11703 {
11704 self.profile = std::option::Option::Some(v.into());
11705 self
11706 }
11707
11708 pub fn set_or_clear_profile<T>(mut self, v: std::option::Option<T>) -> Self
11710 where
11711 T: std::convert::Into<
11712 crate::model::data_profile_result::profile::field::ProfileInfo,
11713 >,
11714 {
11715 self.profile = v.map(|x| x.into());
11716 self
11717 }
11718 }
11719
11720 impl wkt::message::Message for Field {
11721 fn typename() -> &'static str {
11722 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field"
11723 }
11724 }
11725
11726 pub mod field {
11728 #[allow(unused_imports)]
11729 use super::*;
11730
11731 #[derive(Clone, Default, PartialEq)]
11733 #[non_exhaustive]
11734 pub struct ProfileInfo {
11735 pub null_ratio: f64,
11738
11739 pub distinct_ratio: f64,
11744
11745 pub top_n_values: std::vec::Vec<
11751 crate::model::data_profile_result::profile::field::profile_info::TopNValue,
11752 >,
11753
11754 pub field_info: std::option::Option<
11757 crate::model::data_profile_result::profile::field::profile_info::FieldInfo,
11758 >,
11759
11760 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11761 }
11762
11763 impl ProfileInfo {
11764 pub fn new() -> Self {
11765 std::default::Default::default()
11766 }
11767
11768 pub fn set_null_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11770 self.null_ratio = v.into();
11771 self
11772 }
11773
11774 pub fn set_distinct_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11776 self.distinct_ratio = v.into();
11777 self
11778 }
11779
11780 pub fn set_top_n_values<T, V>(mut self, v: T) -> Self
11782 where
11783 T: std::iter::IntoIterator<Item = V>,
11784 V: std::convert::Into<crate::model::data_profile_result::profile::field::profile_info::TopNValue>
11785 {
11786 use std::iter::Iterator;
11787 self.top_n_values = v.into_iter().map(|i| i.into()).collect();
11788 self
11789 }
11790
11791 pub fn set_field_info<T: std::convert::Into<std::option::Option<crate::model::data_profile_result::profile::field::profile_info::FieldInfo>>>(mut self, v: T) -> Self
11796 {
11797 self.field_info = v.into();
11798 self
11799 }
11800
11801 pub fn string_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>>{
11805 #[allow(unreachable_patterns)]
11806 self.field_info.as_ref().and_then(|v| match v {
11807 crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(v) => std::option::Option::Some(v),
11808 _ => std::option::Option::None,
11809 })
11810 }
11811
11812 pub fn set_string_profile<T: std::convert::Into<std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>>>(mut self, v: T) -> Self{
11818 self.field_info = std::option::Option::Some(
11819 crate::model::data_profile_result::profile::field::profile_info::FieldInfo::StringProfile(
11820 v.into()
11821 )
11822 );
11823 self
11824 }
11825
11826 pub fn integer_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>>{
11830 #[allow(unreachable_patterns)]
11831 self.field_info.as_ref().and_then(|v| match v {
11832 crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(v) => std::option::Option::Some(v),
11833 _ => std::option::Option::None,
11834 })
11835 }
11836
11837 pub fn set_integer_profile<T: std::convert::Into<std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>>>(mut self, v: T) -> Self{
11843 self.field_info = std::option::Option::Some(
11844 crate::model::data_profile_result::profile::field::profile_info::FieldInfo::IntegerProfile(
11845 v.into()
11846 )
11847 );
11848 self
11849 }
11850
11851 pub fn double_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>>{
11855 #[allow(unreachable_patterns)]
11856 self.field_info.as_ref().and_then(|v| match v {
11857 crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(v) => std::option::Option::Some(v),
11858 _ => std::option::Option::None,
11859 })
11860 }
11861
11862 pub fn set_double_profile<T: std::convert::Into<std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>>>(mut self, v: T) -> Self{
11868 self.field_info = std::option::Option::Some(
11869 crate::model::data_profile_result::profile::field::profile_info::FieldInfo::DoubleProfile(
11870 v.into()
11871 )
11872 );
11873 self
11874 }
11875 }
11876
11877 impl wkt::message::Message for ProfileInfo {
11878 fn typename() -> &'static str {
11879 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo"
11880 }
11881 }
11882
11883 pub mod profile_info {
11885 #[allow(unused_imports)]
11886 use super::*;
11887
11888 #[derive(Clone, Default, PartialEq)]
11890 #[non_exhaustive]
11891 pub struct StringFieldInfo {
11892 pub min_length: i64,
11894
11895 pub max_length: i64,
11897
11898 pub average_length: f64,
11900
11901 pub(crate) _unknown_fields:
11902 serde_json::Map<std::string::String, serde_json::Value>,
11903 }
11904
11905 impl StringFieldInfo {
11906 pub fn new() -> Self {
11907 std::default::Default::default()
11908 }
11909
11910 pub fn set_min_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11912 self.min_length = v.into();
11913 self
11914 }
11915
11916 pub fn set_max_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11918 self.max_length = v.into();
11919 self
11920 }
11921
11922 pub fn set_average_length<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11924 self.average_length = v.into();
11925 self
11926 }
11927 }
11928
11929 impl wkt::message::Message for StringFieldInfo {
11930 fn typename() -> &'static str {
11931 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo"
11932 }
11933 }
11934
11935 #[derive(Clone, Default, PartialEq)]
11937 #[non_exhaustive]
11938 pub struct IntegerFieldInfo {
11939 pub average: f64,
11942
11943 pub standard_deviation: f64,
11946
11947 pub min: i64,
11950
11951 pub quartiles: std::vec::Vec<i64>,
11964
11965 pub max: i64,
11968
11969 pub(crate) _unknown_fields:
11970 serde_json::Map<std::string::String, serde_json::Value>,
11971 }
11972
11973 impl IntegerFieldInfo {
11974 pub fn new() -> Self {
11975 std::default::Default::default()
11976 }
11977
11978 pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
11980 self.average = v.into();
11981 self
11982 }
11983
11984 pub fn set_standard_deviation<T: std::convert::Into<f64>>(
11986 mut self,
11987 v: T,
11988 ) -> Self {
11989 self.standard_deviation = v.into();
11990 self
11991 }
11992
11993 pub fn set_min<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11995 self.min = v.into();
11996 self
11997 }
11998
11999 pub fn set_quartiles<T, V>(mut self, v: T) -> Self
12001 where
12002 T: std::iter::IntoIterator<Item = V>,
12003 V: std::convert::Into<i64>,
12004 {
12005 use std::iter::Iterator;
12006 self.quartiles = v.into_iter().map(|i| i.into()).collect();
12007 self
12008 }
12009
12010 pub fn set_max<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12012 self.max = v.into();
12013 self
12014 }
12015 }
12016
12017 impl wkt::message::Message for IntegerFieldInfo {
12018 fn typename() -> &'static str {
12019 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo"
12020 }
12021 }
12022
12023 #[derive(Clone, Default, PartialEq)]
12025 #[non_exhaustive]
12026 pub struct DoubleFieldInfo {
12027 pub average: f64,
12030
12031 pub standard_deviation: f64,
12034
12035 pub min: f64,
12038
12039 pub quartiles: std::vec::Vec<f64>,
12052
12053 pub max: f64,
12056
12057 pub(crate) _unknown_fields:
12058 serde_json::Map<std::string::String, serde_json::Value>,
12059 }
12060
12061 impl DoubleFieldInfo {
12062 pub fn new() -> Self {
12063 std::default::Default::default()
12064 }
12065
12066 pub fn set_average<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12068 self.average = v.into();
12069 self
12070 }
12071
12072 pub fn set_standard_deviation<T: std::convert::Into<f64>>(
12074 mut self,
12075 v: T,
12076 ) -> Self {
12077 self.standard_deviation = v.into();
12078 self
12079 }
12080
12081 pub fn set_min<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12083 self.min = v.into();
12084 self
12085 }
12086
12087 pub fn set_quartiles<T, V>(mut self, v: T) -> Self
12089 where
12090 T: std::iter::IntoIterator<Item = V>,
12091 V: std::convert::Into<f64>,
12092 {
12093 use std::iter::Iterator;
12094 self.quartiles = v.into_iter().map(|i| i.into()).collect();
12095 self
12096 }
12097
12098 pub fn set_max<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12100 self.max = v.into();
12101 self
12102 }
12103 }
12104
12105 impl wkt::message::Message for DoubleFieldInfo {
12106 fn typename() -> &'static str {
12107 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo"
12108 }
12109 }
12110
12111 #[derive(Clone, Default, PartialEq)]
12113 #[non_exhaustive]
12114 pub struct TopNValue {
12115 pub value: std::string::String,
12117
12118 pub count: i64,
12120
12121 pub ratio: f64,
12124
12125 pub(crate) _unknown_fields:
12126 serde_json::Map<std::string::String, serde_json::Value>,
12127 }
12128
12129 impl TopNValue {
12130 pub fn new() -> Self {
12131 std::default::Default::default()
12132 }
12133
12134 pub fn set_value<T: std::convert::Into<std::string::String>>(
12136 mut self,
12137 v: T,
12138 ) -> Self {
12139 self.value = v.into();
12140 self
12141 }
12142
12143 pub fn set_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12145 self.count = v.into();
12146 self
12147 }
12148
12149 pub fn set_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12151 self.ratio = v.into();
12152 self
12153 }
12154 }
12155
12156 impl wkt::message::Message for TopNValue {
12157 fn typename() -> &'static str {
12158 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue"
12159 }
12160 }
12161
12162 #[derive(Clone, Debug, PartialEq)]
12165 #[non_exhaustive]
12166 pub enum FieldInfo {
12167 StringProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::StringFieldInfo>),
12169 IntegerProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::IntegerFieldInfo>),
12171 DoubleProfile(std::boxed::Box<crate::model::data_profile_result::profile::field::profile_info::DoubleFieldInfo>),
12173 }
12174 }
12175 }
12176 }
12177
12178 #[derive(Clone, Default, PartialEq)]
12180 #[non_exhaustive]
12181 pub struct PostScanActionsResult {
12182 pub bigquery_export_result: std::option::Option<
12184 crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult,
12185 >,
12186
12187 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12188 }
12189
12190 impl PostScanActionsResult {
12191 pub fn new() -> Self {
12192 std::default::Default::default()
12193 }
12194
12195 pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
12197 where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
12198 {
12199 self.bigquery_export_result = std::option::Option::Some(v.into());
12200 self
12201 }
12202
12203 pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
12205 where T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::BigQueryExportResult>
12206 {
12207 self.bigquery_export_result = v.map(|x| x.into());
12208 self
12209 }
12210 }
12211
12212 impl wkt::message::Message for PostScanActionsResult {
12213 fn typename() -> &'static str {
12214 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult"
12215 }
12216 }
12217
12218 pub mod post_scan_actions_result {
12220 #[allow(unused_imports)]
12221 use super::*;
12222
12223 #[derive(Clone, Default, PartialEq)]
12225 #[non_exhaustive]
12226 pub struct BigQueryExportResult {
12227
12228 pub state: crate::model::data_profile_result::post_scan_actions_result::big_query_export_result::State,
12230
12231 pub message: std::string::String,
12233
12234 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12235 }
12236
12237 impl BigQueryExportResult {
12238 pub fn new() -> Self {
12239 std::default::Default::default()
12240 }
12241
12242 pub fn set_state<T: std::convert::Into<crate::model::data_profile_result::post_scan_actions_result::big_query_export_result::State>>(mut self, v: T) -> Self{
12244 self.state = v.into();
12245 self
12246 }
12247
12248 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12250 self.message = v.into();
12251 self
12252 }
12253 }
12254
12255 impl wkt::message::Message for BigQueryExportResult {
12256 fn typename() -> &'static str {
12257 "type.googleapis.com/google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult"
12258 }
12259 }
12260
12261 pub mod big_query_export_result {
12263 #[allow(unused_imports)]
12264 use super::*;
12265
12266 #[derive(Clone, Debug, PartialEq)]
12282 #[non_exhaustive]
12283 pub enum State {
12284 Unspecified,
12286 Succeeded,
12288 Failed,
12290 Skipped,
12293 UnknownValue(state::UnknownValue),
12298 }
12299
12300 #[doc(hidden)]
12301 pub mod state {
12302 #[allow(unused_imports)]
12303 use super::*;
12304 #[derive(Clone, Debug, PartialEq)]
12305 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12306 }
12307
12308 impl State {
12309 pub fn value(&self) -> std::option::Option<i32> {
12314 match self {
12315 Self::Unspecified => std::option::Option::Some(0),
12316 Self::Succeeded => std::option::Option::Some(1),
12317 Self::Failed => std::option::Option::Some(2),
12318 Self::Skipped => std::option::Option::Some(3),
12319 Self::UnknownValue(u) => u.0.value(),
12320 }
12321 }
12322
12323 pub fn name(&self) -> std::option::Option<&str> {
12328 match self {
12329 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12330 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12331 Self::Failed => std::option::Option::Some("FAILED"),
12332 Self::Skipped => std::option::Option::Some("SKIPPED"),
12333 Self::UnknownValue(u) => u.0.name(),
12334 }
12335 }
12336 }
12337
12338 impl std::default::Default for State {
12339 fn default() -> Self {
12340 use std::convert::From;
12341 Self::from(0)
12342 }
12343 }
12344
12345 impl std::fmt::Display for State {
12346 fn fmt(
12347 &self,
12348 f: &mut std::fmt::Formatter<'_>,
12349 ) -> std::result::Result<(), std::fmt::Error> {
12350 wkt::internal::display_enum(f, self.name(), self.value())
12351 }
12352 }
12353
12354 impl std::convert::From<i32> for State {
12355 fn from(value: i32) -> Self {
12356 match value {
12357 0 => Self::Unspecified,
12358 1 => Self::Succeeded,
12359 2 => Self::Failed,
12360 3 => Self::Skipped,
12361 _ => Self::UnknownValue(state::UnknownValue(
12362 wkt::internal::UnknownEnumValue::Integer(value),
12363 )),
12364 }
12365 }
12366 }
12367
12368 impl std::convert::From<&str> for State {
12369 fn from(value: &str) -> Self {
12370 use std::string::ToString;
12371 match value {
12372 "STATE_UNSPECIFIED" => Self::Unspecified,
12373 "SUCCEEDED" => Self::Succeeded,
12374 "FAILED" => Self::Failed,
12375 "SKIPPED" => Self::Skipped,
12376 _ => Self::UnknownValue(state::UnknownValue(
12377 wkt::internal::UnknownEnumValue::String(value.to_string()),
12378 )),
12379 }
12380 }
12381 }
12382
12383 impl serde::ser::Serialize for State {
12384 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12385 where
12386 S: serde::Serializer,
12387 {
12388 match self {
12389 Self::Unspecified => serializer.serialize_i32(0),
12390 Self::Succeeded => serializer.serialize_i32(1),
12391 Self::Failed => serializer.serialize_i32(2),
12392 Self::Skipped => serializer.serialize_i32(3),
12393 Self::UnknownValue(u) => u.0.serialize(serializer),
12394 }
12395 }
12396 }
12397
12398 impl<'de> serde::de::Deserialize<'de> for State {
12399 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12400 where
12401 D: serde::Deserializer<'de>,
12402 {
12403 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12404 ".google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State"))
12405 }
12406 }
12407 }
12408 }
12409}
12410
12411#[derive(Clone, Default, PartialEq)]
12413#[non_exhaustive]
12414pub struct DataQualitySpec {
12415 pub rules: std::vec::Vec<crate::model::DataQualityRule>,
12418
12419 pub sampling_percent: f32,
12427
12428 pub row_filter: std::string::String,
12435
12436 pub post_scan_actions: std::option::Option<crate::model::data_quality_spec::PostScanActions>,
12438
12439 pub catalog_publishing_enabled: bool,
12442
12443 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12444}
12445
12446impl DataQualitySpec {
12447 pub fn new() -> Self {
12448 std::default::Default::default()
12449 }
12450
12451 pub fn set_rules<T, V>(mut self, v: T) -> Self
12453 where
12454 T: std::iter::IntoIterator<Item = V>,
12455 V: std::convert::Into<crate::model::DataQualityRule>,
12456 {
12457 use std::iter::Iterator;
12458 self.rules = v.into_iter().map(|i| i.into()).collect();
12459 self
12460 }
12461
12462 pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12464 self.sampling_percent = v.into();
12465 self
12466 }
12467
12468 pub fn set_row_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12470 self.row_filter = v.into();
12471 self
12472 }
12473
12474 pub fn set_post_scan_actions<T>(mut self, v: T) -> Self
12476 where
12477 T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
12478 {
12479 self.post_scan_actions = std::option::Option::Some(v.into());
12480 self
12481 }
12482
12483 pub fn set_or_clear_post_scan_actions<T>(mut self, v: std::option::Option<T>) -> Self
12485 where
12486 T: std::convert::Into<crate::model::data_quality_spec::PostScanActions>,
12487 {
12488 self.post_scan_actions = v.map(|x| x.into());
12489 self
12490 }
12491
12492 pub fn set_catalog_publishing_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12494 self.catalog_publishing_enabled = v.into();
12495 self
12496 }
12497}
12498
12499impl wkt::message::Message for DataQualitySpec {
12500 fn typename() -> &'static str {
12501 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec"
12502 }
12503}
12504
12505pub mod data_quality_spec {
12507 #[allow(unused_imports)]
12508 use super::*;
12509
12510 #[derive(Clone, Default, PartialEq)]
12512 #[non_exhaustive]
12513 pub struct PostScanActions {
12514 pub bigquery_export:
12517 std::option::Option<crate::model::data_quality_spec::post_scan_actions::BigQueryExport>,
12518
12519 pub notification_report: std::option::Option<
12522 crate::model::data_quality_spec::post_scan_actions::NotificationReport,
12523 >,
12524
12525 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12526 }
12527
12528 impl PostScanActions {
12529 pub fn new() -> Self {
12530 std::default::Default::default()
12531 }
12532
12533 pub fn set_bigquery_export<T>(mut self, v: T) -> Self
12535 where
12536 T: std::convert::Into<
12537 crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
12538 >,
12539 {
12540 self.bigquery_export = std::option::Option::Some(v.into());
12541 self
12542 }
12543
12544 pub fn set_or_clear_bigquery_export<T>(mut self, v: std::option::Option<T>) -> Self
12546 where
12547 T: std::convert::Into<
12548 crate::model::data_quality_spec::post_scan_actions::BigQueryExport,
12549 >,
12550 {
12551 self.bigquery_export = v.map(|x| x.into());
12552 self
12553 }
12554
12555 pub fn set_notification_report<T>(mut self, v: T) -> Self
12557 where
12558 T: std::convert::Into<
12559 crate::model::data_quality_spec::post_scan_actions::NotificationReport,
12560 >,
12561 {
12562 self.notification_report = std::option::Option::Some(v.into());
12563 self
12564 }
12565
12566 pub fn set_or_clear_notification_report<T>(mut self, v: std::option::Option<T>) -> Self
12568 where
12569 T: std::convert::Into<
12570 crate::model::data_quality_spec::post_scan_actions::NotificationReport,
12571 >,
12572 {
12573 self.notification_report = v.map(|x| x.into());
12574 self
12575 }
12576 }
12577
12578 impl wkt::message::Message for PostScanActions {
12579 fn typename() -> &'static str {
12580 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions"
12581 }
12582 }
12583
12584 pub mod post_scan_actions {
12586 #[allow(unused_imports)]
12587 use super::*;
12588
12589 #[derive(Clone, Default, PartialEq)]
12591 #[non_exhaustive]
12592 pub struct BigQueryExport {
12593 pub results_table: std::string::String,
12599
12600 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12601 }
12602
12603 impl BigQueryExport {
12604 pub fn new() -> Self {
12605 std::default::Default::default()
12606 }
12607
12608 pub fn set_results_table<T: std::convert::Into<std::string::String>>(
12610 mut self,
12611 v: T,
12612 ) -> Self {
12613 self.results_table = v.into();
12614 self
12615 }
12616 }
12617
12618 impl wkt::message::Message for BigQueryExport {
12619 fn typename() -> &'static str {
12620 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport"
12621 }
12622 }
12623
12624 #[derive(Clone, Default, PartialEq)]
12627 #[non_exhaustive]
12628 pub struct Recipients {
12629 pub emails: std::vec::Vec<std::string::String>,
12632
12633 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12634 }
12635
12636 impl Recipients {
12637 pub fn new() -> Self {
12638 std::default::Default::default()
12639 }
12640
12641 pub fn set_emails<T, V>(mut self, v: T) -> Self
12643 where
12644 T: std::iter::IntoIterator<Item = V>,
12645 V: std::convert::Into<std::string::String>,
12646 {
12647 use std::iter::Iterator;
12648 self.emails = v.into_iter().map(|i| i.into()).collect();
12649 self
12650 }
12651 }
12652
12653 impl wkt::message::Message for Recipients {
12654 fn typename() -> &'static str {
12655 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients"
12656 }
12657 }
12658
12659 #[derive(Clone, Default, PartialEq)]
12662 #[non_exhaustive]
12663 pub struct ScoreThresholdTrigger {
12664 pub score_threshold: f32,
12666
12667 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12668 }
12669
12670 impl ScoreThresholdTrigger {
12671 pub fn new() -> Self {
12672 std::default::Default::default()
12673 }
12674
12675 pub fn set_score_threshold<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
12677 self.score_threshold = v.into();
12678 self
12679 }
12680 }
12681
12682 impl wkt::message::Message for ScoreThresholdTrigger {
12683 fn typename() -> &'static str {
12684 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger"
12685 }
12686 }
12687
12688 #[derive(Clone, Default, PartialEq)]
12691 #[non_exhaustive]
12692 pub struct JobFailureTrigger {
12693 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12694 }
12695
12696 impl JobFailureTrigger {
12697 pub fn new() -> Self {
12698 std::default::Default::default()
12699 }
12700 }
12701
12702 impl wkt::message::Message for JobFailureTrigger {
12703 fn typename() -> &'static str {
12704 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger"
12705 }
12706 }
12707
12708 #[derive(Clone, Default, PartialEq)]
12711 #[non_exhaustive]
12712 pub struct JobEndTrigger {
12713 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12714 }
12715
12716 impl JobEndTrigger {
12717 pub fn new() -> Self {
12718 std::default::Default::default()
12719 }
12720 }
12721
12722 impl wkt::message::Message for JobEndTrigger {
12723 fn typename() -> &'static str {
12724 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger"
12725 }
12726 }
12727
12728 #[derive(Clone, Default, PartialEq)]
12730 #[non_exhaustive]
12731 pub struct NotificationReport {
12732 pub recipients:
12734 std::option::Option<crate::model::data_quality_spec::post_scan_actions::Recipients>,
12735
12736 pub score_threshold_trigger: std::option::Option<
12738 crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
12739 >,
12740
12741 pub job_failure_trigger: std::option::Option<
12743 crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
12744 >,
12745
12746 pub job_end_trigger: std::option::Option<
12748 crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
12749 >,
12750
12751 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12752 }
12753
12754 impl NotificationReport {
12755 pub fn new() -> Self {
12756 std::default::Default::default()
12757 }
12758
12759 pub fn set_recipients<T>(mut self, v: T) -> Self
12761 where
12762 T: std::convert::Into<
12763 crate::model::data_quality_spec::post_scan_actions::Recipients,
12764 >,
12765 {
12766 self.recipients = std::option::Option::Some(v.into());
12767 self
12768 }
12769
12770 pub fn set_or_clear_recipients<T>(mut self, v: std::option::Option<T>) -> Self
12772 where
12773 T: std::convert::Into<
12774 crate::model::data_quality_spec::post_scan_actions::Recipients,
12775 >,
12776 {
12777 self.recipients = v.map(|x| x.into());
12778 self
12779 }
12780
12781 pub fn set_score_threshold_trigger<T>(mut self, v: T) -> Self
12783 where
12784 T: std::convert::Into<
12785 crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
12786 >,
12787 {
12788 self.score_threshold_trigger = std::option::Option::Some(v.into());
12789 self
12790 }
12791
12792 pub fn set_or_clear_score_threshold_trigger<T>(
12794 mut self,
12795 v: std::option::Option<T>,
12796 ) -> Self
12797 where
12798 T: std::convert::Into<
12799 crate::model::data_quality_spec::post_scan_actions::ScoreThresholdTrigger,
12800 >,
12801 {
12802 self.score_threshold_trigger = v.map(|x| x.into());
12803 self
12804 }
12805
12806 pub fn set_job_failure_trigger<T>(mut self, v: T) -> Self
12808 where
12809 T: std::convert::Into<
12810 crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
12811 >,
12812 {
12813 self.job_failure_trigger = std::option::Option::Some(v.into());
12814 self
12815 }
12816
12817 pub fn set_or_clear_job_failure_trigger<T>(mut self, v: std::option::Option<T>) -> Self
12819 where
12820 T: std::convert::Into<
12821 crate::model::data_quality_spec::post_scan_actions::JobFailureTrigger,
12822 >,
12823 {
12824 self.job_failure_trigger = v.map(|x| x.into());
12825 self
12826 }
12827
12828 pub fn set_job_end_trigger<T>(mut self, v: T) -> Self
12830 where
12831 T: std::convert::Into<
12832 crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
12833 >,
12834 {
12835 self.job_end_trigger = std::option::Option::Some(v.into());
12836 self
12837 }
12838
12839 pub fn set_or_clear_job_end_trigger<T>(mut self, v: std::option::Option<T>) -> Self
12841 where
12842 T: std::convert::Into<
12843 crate::model::data_quality_spec::post_scan_actions::JobEndTrigger,
12844 >,
12845 {
12846 self.job_end_trigger = v.map(|x| x.into());
12847 self
12848 }
12849 }
12850
12851 impl wkt::message::Message for NotificationReport {
12852 fn typename() -> &'static str {
12853 "type.googleapis.com/google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport"
12854 }
12855 }
12856 }
12857}
12858
12859#[derive(Clone, Default, PartialEq)]
12861#[non_exhaustive]
12862pub struct DataQualityResult {
12863 pub passed: bool,
12865
12866 pub score: std::option::Option<f32>,
12870
12871 pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
12876
12877 pub columns: std::vec::Vec<crate::model::DataQualityColumnResult>,
12882
12883 pub rules: std::vec::Vec<crate::model::DataQualityRuleResult>,
12885
12886 pub row_count: i64,
12888
12889 pub scanned_data: std::option::Option<crate::model::ScannedData>,
12891
12892 pub post_scan_actions_result:
12894 std::option::Option<crate::model::data_quality_result::PostScanActionsResult>,
12895
12896 pub catalog_publishing_status:
12899 std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
12900
12901 pub anomaly_detection_generated_assets:
12903 std::option::Option<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
12904
12905 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12906}
12907
12908impl DataQualityResult {
12909 pub fn new() -> Self {
12910 std::default::Default::default()
12911 }
12912
12913 pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12915 self.passed = v.into();
12916 self
12917 }
12918
12919 pub fn set_score<T>(mut self, v: T) -> Self
12921 where
12922 T: std::convert::Into<f32>,
12923 {
12924 self.score = std::option::Option::Some(v.into());
12925 self
12926 }
12927
12928 pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
12930 where
12931 T: std::convert::Into<f32>,
12932 {
12933 self.score = v.map(|x| x.into());
12934 self
12935 }
12936
12937 pub fn set_dimensions<T, V>(mut self, v: T) -> Self
12939 where
12940 T: std::iter::IntoIterator<Item = V>,
12941 V: std::convert::Into<crate::model::DataQualityDimensionResult>,
12942 {
12943 use std::iter::Iterator;
12944 self.dimensions = v.into_iter().map(|i| i.into()).collect();
12945 self
12946 }
12947
12948 pub fn set_columns<T, V>(mut self, v: T) -> Self
12950 where
12951 T: std::iter::IntoIterator<Item = V>,
12952 V: std::convert::Into<crate::model::DataQualityColumnResult>,
12953 {
12954 use std::iter::Iterator;
12955 self.columns = v.into_iter().map(|i| i.into()).collect();
12956 self
12957 }
12958
12959 pub fn set_rules<T, V>(mut self, v: T) -> Self
12961 where
12962 T: std::iter::IntoIterator<Item = V>,
12963 V: std::convert::Into<crate::model::DataQualityRuleResult>,
12964 {
12965 use std::iter::Iterator;
12966 self.rules = v.into_iter().map(|i| i.into()).collect();
12967 self
12968 }
12969
12970 pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12972 self.row_count = v.into();
12973 self
12974 }
12975
12976 pub fn set_scanned_data<T>(mut self, v: T) -> Self
12978 where
12979 T: std::convert::Into<crate::model::ScannedData>,
12980 {
12981 self.scanned_data = std::option::Option::Some(v.into());
12982 self
12983 }
12984
12985 pub fn set_or_clear_scanned_data<T>(mut self, v: std::option::Option<T>) -> Self
12987 where
12988 T: std::convert::Into<crate::model::ScannedData>,
12989 {
12990 self.scanned_data = v.map(|x| x.into());
12991 self
12992 }
12993
12994 pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
12996 where
12997 T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
12998 {
12999 self.post_scan_actions_result = std::option::Option::Some(v.into());
13000 self
13001 }
13002
13003 pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
13005 where
13006 T: std::convert::Into<crate::model::data_quality_result::PostScanActionsResult>,
13007 {
13008 self.post_scan_actions_result = v.map(|x| x.into());
13009 self
13010 }
13011
13012 pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
13014 where
13015 T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
13016 {
13017 self.catalog_publishing_status = std::option::Option::Some(v.into());
13018 self
13019 }
13020
13021 pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
13023 where
13024 T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
13025 {
13026 self.catalog_publishing_status = v.map(|x| x.into());
13027 self
13028 }
13029
13030 pub fn set_anomaly_detection_generated_assets<T>(mut self, v: T) -> Self
13032 where
13033 T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
13034 {
13035 self.anomaly_detection_generated_assets = std::option::Option::Some(v.into());
13036 self
13037 }
13038
13039 pub fn set_or_clear_anomaly_detection_generated_assets<T>(
13041 mut self,
13042 v: std::option::Option<T>,
13043 ) -> Self
13044 where
13045 T: std::convert::Into<crate::model::data_quality_result::AnomalyDetectionGeneratedAssets>,
13046 {
13047 self.anomaly_detection_generated_assets = v.map(|x| x.into());
13048 self
13049 }
13050}
13051
13052impl wkt::message::Message for DataQualityResult {
13053 fn typename() -> &'static str {
13054 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult"
13055 }
13056}
13057
13058pub mod data_quality_result {
13060 #[allow(unused_imports)]
13061 use super::*;
13062
13063 #[derive(Clone, Default, PartialEq)]
13065 #[non_exhaustive]
13066 pub struct PostScanActionsResult {
13067 pub bigquery_export_result: std::option::Option<
13069 crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult,
13070 >,
13071
13072 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13073 }
13074
13075 impl PostScanActionsResult {
13076 pub fn new() -> Self {
13077 std::default::Default::default()
13078 }
13079
13080 pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
13082 where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
13083 {
13084 self.bigquery_export_result = std::option::Option::Some(v.into());
13085 self
13086 }
13087
13088 pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
13090 where T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::BigQueryExportResult>
13091 {
13092 self.bigquery_export_result = v.map(|x| x.into());
13093 self
13094 }
13095 }
13096
13097 impl wkt::message::Message for PostScanActionsResult {
13098 fn typename() -> &'static str {
13099 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult"
13100 }
13101 }
13102
13103 pub mod post_scan_actions_result {
13105 #[allow(unused_imports)]
13106 use super::*;
13107
13108 #[derive(Clone, Default, PartialEq)]
13110 #[non_exhaustive]
13111 pub struct BigQueryExportResult {
13112
13113 pub state: crate::model::data_quality_result::post_scan_actions_result::big_query_export_result::State,
13115
13116 pub message: std::string::String,
13118
13119 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13120 }
13121
13122 impl BigQueryExportResult {
13123 pub fn new() -> Self {
13124 std::default::Default::default()
13125 }
13126
13127 pub fn set_state<T: std::convert::Into<crate::model::data_quality_result::post_scan_actions_result::big_query_export_result::State>>(mut self, v: T) -> Self{
13129 self.state = v.into();
13130 self
13131 }
13132
13133 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13135 self.message = v.into();
13136 self
13137 }
13138 }
13139
13140 impl wkt::message::Message for BigQueryExportResult {
13141 fn typename() -> &'static str {
13142 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult"
13143 }
13144 }
13145
13146 pub mod big_query_export_result {
13148 #[allow(unused_imports)]
13149 use super::*;
13150
13151 #[derive(Clone, Debug, PartialEq)]
13167 #[non_exhaustive]
13168 pub enum State {
13169 Unspecified,
13171 Succeeded,
13173 Failed,
13175 Skipped,
13178 UnknownValue(state::UnknownValue),
13183 }
13184
13185 #[doc(hidden)]
13186 pub mod state {
13187 #[allow(unused_imports)]
13188 use super::*;
13189 #[derive(Clone, Debug, PartialEq)]
13190 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13191 }
13192
13193 impl State {
13194 pub fn value(&self) -> std::option::Option<i32> {
13199 match self {
13200 Self::Unspecified => std::option::Option::Some(0),
13201 Self::Succeeded => std::option::Option::Some(1),
13202 Self::Failed => std::option::Option::Some(2),
13203 Self::Skipped => std::option::Option::Some(3),
13204 Self::UnknownValue(u) => u.0.value(),
13205 }
13206 }
13207
13208 pub fn name(&self) -> std::option::Option<&str> {
13213 match self {
13214 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13215 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
13216 Self::Failed => std::option::Option::Some("FAILED"),
13217 Self::Skipped => std::option::Option::Some("SKIPPED"),
13218 Self::UnknownValue(u) => u.0.name(),
13219 }
13220 }
13221 }
13222
13223 impl std::default::Default for State {
13224 fn default() -> Self {
13225 use std::convert::From;
13226 Self::from(0)
13227 }
13228 }
13229
13230 impl std::fmt::Display for State {
13231 fn fmt(
13232 &self,
13233 f: &mut std::fmt::Formatter<'_>,
13234 ) -> std::result::Result<(), std::fmt::Error> {
13235 wkt::internal::display_enum(f, self.name(), self.value())
13236 }
13237 }
13238
13239 impl std::convert::From<i32> for State {
13240 fn from(value: i32) -> Self {
13241 match value {
13242 0 => Self::Unspecified,
13243 1 => Self::Succeeded,
13244 2 => Self::Failed,
13245 3 => Self::Skipped,
13246 _ => Self::UnknownValue(state::UnknownValue(
13247 wkt::internal::UnknownEnumValue::Integer(value),
13248 )),
13249 }
13250 }
13251 }
13252
13253 impl std::convert::From<&str> for State {
13254 fn from(value: &str) -> Self {
13255 use std::string::ToString;
13256 match value {
13257 "STATE_UNSPECIFIED" => Self::Unspecified,
13258 "SUCCEEDED" => Self::Succeeded,
13259 "FAILED" => Self::Failed,
13260 "SKIPPED" => Self::Skipped,
13261 _ => Self::UnknownValue(state::UnknownValue(
13262 wkt::internal::UnknownEnumValue::String(value.to_string()),
13263 )),
13264 }
13265 }
13266 }
13267
13268 impl serde::ser::Serialize for State {
13269 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13270 where
13271 S: serde::Serializer,
13272 {
13273 match self {
13274 Self::Unspecified => serializer.serialize_i32(0),
13275 Self::Succeeded => serializer.serialize_i32(1),
13276 Self::Failed => serializer.serialize_i32(2),
13277 Self::Skipped => serializer.serialize_i32(3),
13278 Self::UnknownValue(u) => u.0.serialize(serializer),
13279 }
13280 }
13281 }
13282
13283 impl<'de> serde::de::Deserialize<'de> for State {
13284 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13285 where
13286 D: serde::Deserializer<'de>,
13287 {
13288 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13289 ".google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State"))
13290 }
13291 }
13292 }
13293 }
13294
13295 #[derive(Clone, Default, PartialEq)]
13297 #[non_exhaustive]
13298 pub struct AnomalyDetectionGeneratedAssets {
13299 pub result_table: std::string::String,
13306
13307 pub data_intermediate_table: std::string::String,
13311
13312 pub freshness_intermediate_table: std::string::String,
13316
13317 pub volume_intermediate_table: std::string::String,
13321
13322 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13323 }
13324
13325 impl AnomalyDetectionGeneratedAssets {
13326 pub fn new() -> Self {
13327 std::default::Default::default()
13328 }
13329
13330 pub fn set_result_table<T: std::convert::Into<std::string::String>>(
13332 mut self,
13333 v: T,
13334 ) -> Self {
13335 self.result_table = v.into();
13336 self
13337 }
13338
13339 pub fn set_data_intermediate_table<T: std::convert::Into<std::string::String>>(
13341 mut self,
13342 v: T,
13343 ) -> Self {
13344 self.data_intermediate_table = v.into();
13345 self
13346 }
13347
13348 pub fn set_freshness_intermediate_table<T: std::convert::Into<std::string::String>>(
13350 mut self,
13351 v: T,
13352 ) -> Self {
13353 self.freshness_intermediate_table = v.into();
13354 self
13355 }
13356
13357 pub fn set_volume_intermediate_table<T: std::convert::Into<std::string::String>>(
13359 mut self,
13360 v: T,
13361 ) -> Self {
13362 self.volume_intermediate_table = v.into();
13363 self
13364 }
13365 }
13366
13367 impl wkt::message::Message for AnomalyDetectionGeneratedAssets {
13368 fn typename() -> &'static str {
13369 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityResult.AnomalyDetectionGeneratedAssets"
13370 }
13371 }
13372}
13373
13374#[derive(Clone, Default, PartialEq)]
13376#[non_exhaustive]
13377pub struct DataQualityRuleResult {
13378 pub rule: std::option::Option<crate::model::DataQualityRule>,
13380
13381 pub passed: bool,
13383
13384 pub evaluated_count: i64,
13397
13398 pub passed_count: i64,
13404
13405 pub null_count: i64,
13407
13408 pub pass_ratio: f64,
13412
13413 pub failing_rows_query: std::string::String,
13417
13418 pub assertion_row_count: i64,
13423
13424 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13425}
13426
13427impl DataQualityRuleResult {
13428 pub fn new() -> Self {
13429 std::default::Default::default()
13430 }
13431
13432 pub fn set_rule<T>(mut self, v: T) -> Self
13434 where
13435 T: std::convert::Into<crate::model::DataQualityRule>,
13436 {
13437 self.rule = std::option::Option::Some(v.into());
13438 self
13439 }
13440
13441 pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
13443 where
13444 T: std::convert::Into<crate::model::DataQualityRule>,
13445 {
13446 self.rule = v.map(|x| x.into());
13447 self
13448 }
13449
13450 pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13452 self.passed = v.into();
13453 self
13454 }
13455
13456 pub fn set_evaluated_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13458 self.evaluated_count = v.into();
13459 self
13460 }
13461
13462 pub fn set_passed_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13464 self.passed_count = v.into();
13465 self
13466 }
13467
13468 pub fn set_null_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13470 self.null_count = v.into();
13471 self
13472 }
13473
13474 pub fn set_pass_ratio<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13476 self.pass_ratio = v.into();
13477 self
13478 }
13479
13480 pub fn set_failing_rows_query<T: std::convert::Into<std::string::String>>(
13482 mut self,
13483 v: T,
13484 ) -> Self {
13485 self.failing_rows_query = v.into();
13486 self
13487 }
13488
13489 pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13491 self.assertion_row_count = v.into();
13492 self
13493 }
13494}
13495
13496impl wkt::message::Message for DataQualityRuleResult {
13497 fn typename() -> &'static str {
13498 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRuleResult"
13499 }
13500}
13501
13502#[derive(Clone, Default, PartialEq)]
13505#[non_exhaustive]
13506pub struct DataQualityDimensionResult {
13507 pub dimension: std::option::Option<crate::model::DataQualityDimension>,
13509
13510 pub passed: bool,
13512
13513 pub score: std::option::Option<f32>,
13519
13520 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13521}
13522
13523impl DataQualityDimensionResult {
13524 pub fn new() -> Self {
13525 std::default::Default::default()
13526 }
13527
13528 pub fn set_dimension<T>(mut self, v: T) -> Self
13530 where
13531 T: std::convert::Into<crate::model::DataQualityDimension>,
13532 {
13533 self.dimension = std::option::Option::Some(v.into());
13534 self
13535 }
13536
13537 pub fn set_or_clear_dimension<T>(mut self, v: std::option::Option<T>) -> Self
13539 where
13540 T: std::convert::Into<crate::model::DataQualityDimension>,
13541 {
13542 self.dimension = v.map(|x| x.into());
13543 self
13544 }
13545
13546 pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13548 self.passed = v.into();
13549 self
13550 }
13551
13552 pub fn set_score<T>(mut self, v: T) -> Self
13554 where
13555 T: std::convert::Into<f32>,
13556 {
13557 self.score = std::option::Option::Some(v.into());
13558 self
13559 }
13560
13561 pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
13563 where
13564 T: std::convert::Into<f32>,
13565 {
13566 self.score = v.map(|x| x.into());
13567 self
13568 }
13569}
13570
13571impl wkt::message::Message for DataQualityDimensionResult {
13572 fn typename() -> &'static str {
13573 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimensionResult"
13574 }
13575}
13576
13577#[derive(Clone, Default, PartialEq)]
13580#[non_exhaustive]
13581pub struct DataQualityDimension {
13582 pub name: std::string::String,
13585
13586 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13587}
13588
13589impl DataQualityDimension {
13590 pub fn new() -> Self {
13591 std::default::Default::default()
13592 }
13593
13594 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13596 self.name = v.into();
13597 self
13598 }
13599}
13600
13601impl wkt::message::Message for DataQualityDimension {
13602 fn typename() -> &'static str {
13603 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityDimension"
13604 }
13605}
13606
13607#[derive(Clone, Default, PartialEq)]
13609#[non_exhaustive]
13610pub struct DataQualityRule {
13611 pub column: std::string::String,
13613
13614 pub ignore_null: bool,
13625
13626 pub dimension: std::string::String,
13630
13631 pub threshold: f64,
13638
13639 pub name: std::string::String,
13647
13648 pub description: std::string::String,
13652
13653 pub suspended: bool,
13656
13657 pub rule_type: std::option::Option<crate::model::data_quality_rule::RuleType>,
13659
13660 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13661}
13662
13663impl DataQualityRule {
13664 pub fn new() -> Self {
13665 std::default::Default::default()
13666 }
13667
13668 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13670 self.column = v.into();
13671 self
13672 }
13673
13674 pub fn set_ignore_null<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13676 self.ignore_null = v.into();
13677 self
13678 }
13679
13680 pub fn set_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13682 self.dimension = v.into();
13683 self
13684 }
13685
13686 pub fn set_threshold<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
13688 self.threshold = v.into();
13689 self
13690 }
13691
13692 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13694 self.name = v.into();
13695 self
13696 }
13697
13698 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13700 self.description = v.into();
13701 self
13702 }
13703
13704 pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13706 self.suspended = v.into();
13707 self
13708 }
13709
13710 pub fn set_rule_type<
13715 T: std::convert::Into<std::option::Option<crate::model::data_quality_rule::RuleType>>,
13716 >(
13717 mut self,
13718 v: T,
13719 ) -> Self {
13720 self.rule_type = v.into();
13721 self
13722 }
13723
13724 pub fn range_expectation(
13728 &self,
13729 ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>
13730 {
13731 #[allow(unreachable_patterns)]
13732 self.rule_type.as_ref().and_then(|v| match v {
13733 crate::model::data_quality_rule::RuleType::RangeExpectation(v) => {
13734 std::option::Option::Some(v)
13735 }
13736 _ => std::option::Option::None,
13737 })
13738 }
13739
13740 pub fn set_range_expectation<
13746 T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>>,
13747 >(
13748 mut self,
13749 v: T,
13750 ) -> Self {
13751 self.rule_type = std::option::Option::Some(
13752 crate::model::data_quality_rule::RuleType::RangeExpectation(v.into()),
13753 );
13754 self
13755 }
13756
13757 pub fn non_null_expectation(
13761 &self,
13762 ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>
13763 {
13764 #[allow(unreachable_patterns)]
13765 self.rule_type.as_ref().and_then(|v| match v {
13766 crate::model::data_quality_rule::RuleType::NonNullExpectation(v) => {
13767 std::option::Option::Some(v)
13768 }
13769 _ => std::option::Option::None,
13770 })
13771 }
13772
13773 pub fn set_non_null_expectation<
13779 T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>>,
13780 >(
13781 mut self,
13782 v: T,
13783 ) -> Self {
13784 self.rule_type = std::option::Option::Some(
13785 crate::model::data_quality_rule::RuleType::NonNullExpectation(v.into()),
13786 );
13787 self
13788 }
13789
13790 pub fn set_expectation(
13794 &self,
13795 ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>
13796 {
13797 #[allow(unreachable_patterns)]
13798 self.rule_type.as_ref().and_then(|v| match v {
13799 crate::model::data_quality_rule::RuleType::SetExpectation(v) => {
13800 std::option::Option::Some(v)
13801 }
13802 _ => std::option::Option::None,
13803 })
13804 }
13805
13806 pub fn set_set_expectation<
13812 T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SetExpectation>>,
13813 >(
13814 mut self,
13815 v: T,
13816 ) -> Self {
13817 self.rule_type = std::option::Option::Some(
13818 crate::model::data_quality_rule::RuleType::SetExpectation(v.into()),
13819 );
13820 self
13821 }
13822
13823 pub fn regex_expectation(
13827 &self,
13828 ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>
13829 {
13830 #[allow(unreachable_patterns)]
13831 self.rule_type.as_ref().and_then(|v| match v {
13832 crate::model::data_quality_rule::RuleType::RegexExpectation(v) => {
13833 std::option::Option::Some(v)
13834 }
13835 _ => std::option::Option::None,
13836 })
13837 }
13838
13839 pub fn set_regex_expectation<
13845 T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>>,
13846 >(
13847 mut self,
13848 v: T,
13849 ) -> Self {
13850 self.rule_type = std::option::Option::Some(
13851 crate::model::data_quality_rule::RuleType::RegexExpectation(v.into()),
13852 );
13853 self
13854 }
13855
13856 pub fn uniqueness_expectation(
13860 &self,
13861 ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>
13862 {
13863 #[allow(unreachable_patterns)]
13864 self.rule_type.as_ref().and_then(|v| match v {
13865 crate::model::data_quality_rule::RuleType::UniquenessExpectation(v) => {
13866 std::option::Option::Some(v)
13867 }
13868 _ => std::option::Option::None,
13869 })
13870 }
13871
13872 pub fn set_uniqueness_expectation<
13878 T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>>,
13879 >(
13880 mut self,
13881 v: T,
13882 ) -> Self {
13883 self.rule_type = std::option::Option::Some(
13884 crate::model::data_quality_rule::RuleType::UniquenessExpectation(v.into()),
13885 );
13886 self
13887 }
13888
13889 pub fn statistic_range_expectation(
13893 &self,
13894 ) -> std::option::Option<
13895 &std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
13896 > {
13897 #[allow(unreachable_patterns)]
13898 self.rule_type.as_ref().and_then(|v| match v {
13899 crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v) => {
13900 std::option::Option::Some(v)
13901 }
13902 _ => std::option::Option::None,
13903 })
13904 }
13905
13906 pub fn set_statistic_range_expectation<
13912 T: std::convert::Into<
13913 std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
13914 >,
13915 >(
13916 mut self,
13917 v: T,
13918 ) -> Self {
13919 self.rule_type = std::option::Option::Some(
13920 crate::model::data_quality_rule::RuleType::StatisticRangeExpectation(v.into()),
13921 );
13922 self
13923 }
13924
13925 pub fn row_condition_expectation(
13929 &self,
13930 ) -> std::option::Option<
13931 &std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
13932 > {
13933 #[allow(unreachable_patterns)]
13934 self.rule_type.as_ref().and_then(|v| match v {
13935 crate::model::data_quality_rule::RuleType::RowConditionExpectation(v) => {
13936 std::option::Option::Some(v)
13937 }
13938 _ => std::option::Option::None,
13939 })
13940 }
13941
13942 pub fn set_row_condition_expectation<
13948 T: std::convert::Into<
13949 std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
13950 >,
13951 >(
13952 mut self,
13953 v: T,
13954 ) -> Self {
13955 self.rule_type = std::option::Option::Some(
13956 crate::model::data_quality_rule::RuleType::RowConditionExpectation(v.into()),
13957 );
13958 self
13959 }
13960
13961 pub fn table_condition_expectation(
13965 &self,
13966 ) -> std::option::Option<
13967 &std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
13968 > {
13969 #[allow(unreachable_patterns)]
13970 self.rule_type.as_ref().and_then(|v| match v {
13971 crate::model::data_quality_rule::RuleType::TableConditionExpectation(v) => {
13972 std::option::Option::Some(v)
13973 }
13974 _ => std::option::Option::None,
13975 })
13976 }
13977
13978 pub fn set_table_condition_expectation<
13984 T: std::convert::Into<
13985 std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
13986 >,
13987 >(
13988 mut self,
13989 v: T,
13990 ) -> Self {
13991 self.rule_type = std::option::Option::Some(
13992 crate::model::data_quality_rule::RuleType::TableConditionExpectation(v.into()),
13993 );
13994 self
13995 }
13996
13997 pub fn sql_assertion(
14001 &self,
14002 ) -> std::option::Option<&std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>> {
14003 #[allow(unreachable_patterns)]
14004 self.rule_type.as_ref().and_then(|v| match v {
14005 crate::model::data_quality_rule::RuleType::SqlAssertion(v) => {
14006 std::option::Option::Some(v)
14007 }
14008 _ => std::option::Option::None,
14009 })
14010 }
14011
14012 pub fn set_sql_assertion<
14018 T: std::convert::Into<std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>>,
14019 >(
14020 mut self,
14021 v: T,
14022 ) -> Self {
14023 self.rule_type = std::option::Option::Some(
14024 crate::model::data_quality_rule::RuleType::SqlAssertion(v.into()),
14025 );
14026 self
14027 }
14028}
14029
14030impl wkt::message::Message for DataQualityRule {
14031 fn typename() -> &'static str {
14032 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule"
14033 }
14034}
14035
14036pub mod data_quality_rule {
14038 #[allow(unused_imports)]
14039 use super::*;
14040
14041 #[derive(Clone, Default, PartialEq)]
14043 #[non_exhaustive]
14044 pub struct RangeExpectation {
14045 pub min_value: std::string::String,
14049
14050 pub max_value: std::string::String,
14054
14055 pub strict_min_enabled: bool,
14060
14061 pub strict_max_enabled: bool,
14066
14067 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14068 }
14069
14070 impl RangeExpectation {
14071 pub fn new() -> Self {
14072 std::default::Default::default()
14073 }
14074
14075 pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14077 self.min_value = v.into();
14078 self
14079 }
14080
14081 pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14083 self.max_value = v.into();
14084 self
14085 }
14086
14087 pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14089 self.strict_min_enabled = v.into();
14090 self
14091 }
14092
14093 pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14095 self.strict_max_enabled = v.into();
14096 self
14097 }
14098 }
14099
14100 impl wkt::message::Message for RangeExpectation {
14101 fn typename() -> &'static str {
14102 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RangeExpectation"
14103 }
14104 }
14105
14106 #[derive(Clone, Default, PartialEq)]
14108 #[non_exhaustive]
14109 pub struct NonNullExpectation {
14110 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14111 }
14112
14113 impl NonNullExpectation {
14114 pub fn new() -> Self {
14115 std::default::Default::default()
14116 }
14117 }
14118
14119 impl wkt::message::Message for NonNullExpectation {
14120 fn typename() -> &'static str {
14121 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation"
14122 }
14123 }
14124
14125 #[derive(Clone, Default, PartialEq)]
14127 #[non_exhaustive]
14128 pub struct SetExpectation {
14129 pub values: std::vec::Vec<std::string::String>,
14131
14132 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14133 }
14134
14135 impl SetExpectation {
14136 pub fn new() -> Self {
14137 std::default::Default::default()
14138 }
14139
14140 pub fn set_values<T, V>(mut self, v: T) -> Self
14142 where
14143 T: std::iter::IntoIterator<Item = V>,
14144 V: std::convert::Into<std::string::String>,
14145 {
14146 use std::iter::Iterator;
14147 self.values = v.into_iter().map(|i| i.into()).collect();
14148 self
14149 }
14150 }
14151
14152 impl wkt::message::Message for SetExpectation {
14153 fn typename() -> &'static str {
14154 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SetExpectation"
14155 }
14156 }
14157
14158 #[derive(Clone, Default, PartialEq)]
14160 #[non_exhaustive]
14161 pub struct RegexExpectation {
14162 pub regex: std::string::String,
14164
14165 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14166 }
14167
14168 impl RegexExpectation {
14169 pub fn new() -> Self {
14170 std::default::Default::default()
14171 }
14172
14173 pub fn set_regex<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14175 self.regex = v.into();
14176 self
14177 }
14178 }
14179
14180 impl wkt::message::Message for RegexExpectation {
14181 fn typename() -> &'static str {
14182 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RegexExpectation"
14183 }
14184 }
14185
14186 #[derive(Clone, Default, PartialEq)]
14188 #[non_exhaustive]
14189 pub struct UniquenessExpectation {
14190 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14191 }
14192
14193 impl UniquenessExpectation {
14194 pub fn new() -> Self {
14195 std::default::Default::default()
14196 }
14197 }
14198
14199 impl wkt::message::Message for UniquenessExpectation {
14200 fn typename() -> &'static str {
14201 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation"
14202 }
14203 }
14204
14205 #[derive(Clone, Default, PartialEq)]
14208 #[non_exhaustive]
14209 pub struct StatisticRangeExpectation {
14210 pub statistic:
14212 crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
14213
14214 pub min_value: std::string::String,
14219
14220 pub max_value: std::string::String,
14225
14226 pub strict_min_enabled: bool,
14231
14232 pub strict_max_enabled: bool,
14237
14238 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14239 }
14240
14241 impl StatisticRangeExpectation {
14242 pub fn new() -> Self {
14243 std::default::Default::default()
14244 }
14245
14246 pub fn set_statistic<
14248 T: std::convert::Into<
14249 crate::model::data_quality_rule::statistic_range_expectation::ColumnStatistic,
14250 >,
14251 >(
14252 mut self,
14253 v: T,
14254 ) -> Self {
14255 self.statistic = v.into();
14256 self
14257 }
14258
14259 pub fn set_min_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14261 self.min_value = v.into();
14262 self
14263 }
14264
14265 pub fn set_max_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14267 self.max_value = v.into();
14268 self
14269 }
14270
14271 pub fn set_strict_min_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14273 self.strict_min_enabled = v.into();
14274 self
14275 }
14276
14277 pub fn set_strict_max_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14279 self.strict_max_enabled = v.into();
14280 self
14281 }
14282 }
14283
14284 impl wkt::message::Message for StatisticRangeExpectation {
14285 fn typename() -> &'static str {
14286 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation"
14287 }
14288 }
14289
14290 pub mod statistic_range_expectation {
14292 #[allow(unused_imports)]
14293 use super::*;
14294
14295 #[derive(Clone, Debug, PartialEq)]
14311 #[non_exhaustive]
14312 pub enum ColumnStatistic {
14313 StatisticUndefined,
14315 Mean,
14317 Min,
14319 Max,
14321 UnknownValue(column_statistic::UnknownValue),
14326 }
14327
14328 #[doc(hidden)]
14329 pub mod column_statistic {
14330 #[allow(unused_imports)]
14331 use super::*;
14332 #[derive(Clone, Debug, PartialEq)]
14333 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14334 }
14335
14336 impl ColumnStatistic {
14337 pub fn value(&self) -> std::option::Option<i32> {
14342 match self {
14343 Self::StatisticUndefined => std::option::Option::Some(0),
14344 Self::Mean => std::option::Option::Some(1),
14345 Self::Min => std::option::Option::Some(2),
14346 Self::Max => std::option::Option::Some(3),
14347 Self::UnknownValue(u) => u.0.value(),
14348 }
14349 }
14350
14351 pub fn name(&self) -> std::option::Option<&str> {
14356 match self {
14357 Self::StatisticUndefined => std::option::Option::Some("STATISTIC_UNDEFINED"),
14358 Self::Mean => std::option::Option::Some("MEAN"),
14359 Self::Min => std::option::Option::Some("MIN"),
14360 Self::Max => std::option::Option::Some("MAX"),
14361 Self::UnknownValue(u) => u.0.name(),
14362 }
14363 }
14364 }
14365
14366 impl std::default::Default for ColumnStatistic {
14367 fn default() -> Self {
14368 use std::convert::From;
14369 Self::from(0)
14370 }
14371 }
14372
14373 impl std::fmt::Display for ColumnStatistic {
14374 fn fmt(
14375 &self,
14376 f: &mut std::fmt::Formatter<'_>,
14377 ) -> std::result::Result<(), std::fmt::Error> {
14378 wkt::internal::display_enum(f, self.name(), self.value())
14379 }
14380 }
14381
14382 impl std::convert::From<i32> for ColumnStatistic {
14383 fn from(value: i32) -> Self {
14384 match value {
14385 0 => Self::StatisticUndefined,
14386 1 => Self::Mean,
14387 2 => Self::Min,
14388 3 => Self::Max,
14389 _ => Self::UnknownValue(column_statistic::UnknownValue(
14390 wkt::internal::UnknownEnumValue::Integer(value),
14391 )),
14392 }
14393 }
14394 }
14395
14396 impl std::convert::From<&str> for ColumnStatistic {
14397 fn from(value: &str) -> Self {
14398 use std::string::ToString;
14399 match value {
14400 "STATISTIC_UNDEFINED" => Self::StatisticUndefined,
14401 "MEAN" => Self::Mean,
14402 "MIN" => Self::Min,
14403 "MAX" => Self::Max,
14404 _ => Self::UnknownValue(column_statistic::UnknownValue(
14405 wkt::internal::UnknownEnumValue::String(value.to_string()),
14406 )),
14407 }
14408 }
14409 }
14410
14411 impl serde::ser::Serialize for ColumnStatistic {
14412 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14413 where
14414 S: serde::Serializer,
14415 {
14416 match self {
14417 Self::StatisticUndefined => serializer.serialize_i32(0),
14418 Self::Mean => serializer.serialize_i32(1),
14419 Self::Min => serializer.serialize_i32(2),
14420 Self::Max => serializer.serialize_i32(3),
14421 Self::UnknownValue(u) => u.0.serialize(serializer),
14422 }
14423 }
14424 }
14425
14426 impl<'de> serde::de::Deserialize<'de> for ColumnStatistic {
14427 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14428 where
14429 D: serde::Deserializer<'de>,
14430 {
14431 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ColumnStatistic>::new(
14432 ".google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic"))
14433 }
14434 }
14435 }
14436
14437 #[derive(Clone, Default, PartialEq)]
14445 #[non_exhaustive]
14446 pub struct RowConditionExpectation {
14447 pub sql_expression: std::string::String,
14449
14450 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14451 }
14452
14453 impl RowConditionExpectation {
14454 pub fn new() -> Self {
14455 std::default::Default::default()
14456 }
14457
14458 pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
14460 mut self,
14461 v: T,
14462 ) -> Self {
14463 self.sql_expression = v.into();
14464 self
14465 }
14466 }
14467
14468 impl wkt::message::Message for RowConditionExpectation {
14469 fn typename() -> &'static str {
14470 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation"
14471 }
14472 }
14473
14474 #[derive(Clone, Default, PartialEq)]
14482 #[non_exhaustive]
14483 pub struct TableConditionExpectation {
14484 pub sql_expression: std::string::String,
14486
14487 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14488 }
14489
14490 impl TableConditionExpectation {
14491 pub fn new() -> Self {
14492 std::default::Default::default()
14493 }
14494
14495 pub fn set_sql_expression<T: std::convert::Into<std::string::String>>(
14497 mut self,
14498 v: T,
14499 ) -> Self {
14500 self.sql_expression = v.into();
14501 self
14502 }
14503 }
14504
14505 impl wkt::message::Message for TableConditionExpectation {
14506 fn typename() -> &'static str {
14507 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation"
14508 }
14509 }
14510
14511 #[derive(Clone, Default, PartialEq)]
14526 #[non_exhaustive]
14527 pub struct SqlAssertion {
14528 pub sql_statement: std::string::String,
14530
14531 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14532 }
14533
14534 impl SqlAssertion {
14535 pub fn new() -> Self {
14536 std::default::Default::default()
14537 }
14538
14539 pub fn set_sql_statement<T: std::convert::Into<std::string::String>>(
14541 mut self,
14542 v: T,
14543 ) -> Self {
14544 self.sql_statement = v.into();
14545 self
14546 }
14547 }
14548
14549 impl wkt::message::Message for SqlAssertion {
14550 fn typename() -> &'static str {
14551 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityRule.SqlAssertion"
14552 }
14553 }
14554
14555 #[derive(Clone, Debug, PartialEq)]
14557 #[non_exhaustive]
14558 pub enum RuleType {
14559 RangeExpectation(std::boxed::Box<crate::model::data_quality_rule::RangeExpectation>),
14562 NonNullExpectation(std::boxed::Box<crate::model::data_quality_rule::NonNullExpectation>),
14564 SetExpectation(std::boxed::Box<crate::model::data_quality_rule::SetExpectation>),
14567 RegexExpectation(std::boxed::Box<crate::model::data_quality_rule::RegexExpectation>),
14570 UniquenessExpectation(
14572 std::boxed::Box<crate::model::data_quality_rule::UniquenessExpectation>,
14573 ),
14574 StatisticRangeExpectation(
14577 std::boxed::Box<crate::model::data_quality_rule::StatisticRangeExpectation>,
14578 ),
14579 RowConditionExpectation(
14582 std::boxed::Box<crate::model::data_quality_rule::RowConditionExpectation>,
14583 ),
14584 TableConditionExpectation(
14587 std::boxed::Box<crate::model::data_quality_rule::TableConditionExpectation>,
14588 ),
14589 SqlAssertion(std::boxed::Box<crate::model::data_quality_rule::SqlAssertion>),
14592 }
14593}
14594
14595#[derive(Clone, Default, PartialEq)]
14598#[non_exhaustive]
14599pub struct DataQualityColumnResult {
14600 pub column: std::string::String,
14602
14603 pub score: std::option::Option<f32>,
14609
14610 pub passed: bool,
14612
14613 pub dimensions: std::vec::Vec<crate::model::DataQualityDimensionResult>,
14615
14616 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14617}
14618
14619impl DataQualityColumnResult {
14620 pub fn new() -> Self {
14621 std::default::Default::default()
14622 }
14623
14624 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14626 self.column = v.into();
14627 self
14628 }
14629
14630 pub fn set_score<T>(mut self, v: T) -> Self
14632 where
14633 T: std::convert::Into<f32>,
14634 {
14635 self.score = std::option::Option::Some(v.into());
14636 self
14637 }
14638
14639 pub fn set_or_clear_score<T>(mut self, v: std::option::Option<T>) -> Self
14641 where
14642 T: std::convert::Into<f32>,
14643 {
14644 self.score = v.map(|x| x.into());
14645 self
14646 }
14647
14648 pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14650 self.passed = v.into();
14651 self
14652 }
14653
14654 pub fn set_dimensions<T, V>(mut self, v: T) -> Self
14656 where
14657 T: std::iter::IntoIterator<Item = V>,
14658 V: std::convert::Into<crate::model::DataQualityDimensionResult>,
14659 {
14660 use std::iter::Iterator;
14661 self.dimensions = v.into_iter().map(|i| i.into()).collect();
14662 self
14663 }
14664}
14665
14666impl wkt::message::Message for DataQualityColumnResult {
14667 fn typename() -> &'static str {
14668 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityColumnResult"
14669 }
14670}
14671
14672#[derive(Clone, Default, PartialEq)]
14676#[non_exhaustive]
14677#[deprecated]
14678pub struct DataTaxonomy {
14679 pub name: std::string::String,
14682
14683 pub uid: std::string::String,
14687
14688 pub create_time: std::option::Option<wkt::Timestamp>,
14690
14691 pub update_time: std::option::Option<wkt::Timestamp>,
14693
14694 pub description: std::string::String,
14696
14697 pub display_name: std::string::String,
14699
14700 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
14702
14703 pub attribute_count: i32,
14705
14706 pub etag: std::string::String,
14710
14711 pub class_count: i32,
14713
14714 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14715}
14716
14717impl DataTaxonomy {
14718 pub fn new() -> Self {
14719 std::default::Default::default()
14720 }
14721
14722 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14724 self.name = v.into();
14725 self
14726 }
14727
14728 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14730 self.uid = v.into();
14731 self
14732 }
14733
14734 pub fn set_create_time<T>(mut self, v: T) -> Self
14736 where
14737 T: std::convert::Into<wkt::Timestamp>,
14738 {
14739 self.create_time = std::option::Option::Some(v.into());
14740 self
14741 }
14742
14743 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14745 where
14746 T: std::convert::Into<wkt::Timestamp>,
14747 {
14748 self.create_time = v.map(|x| x.into());
14749 self
14750 }
14751
14752 pub fn set_update_time<T>(mut self, v: T) -> Self
14754 where
14755 T: std::convert::Into<wkt::Timestamp>,
14756 {
14757 self.update_time = std::option::Option::Some(v.into());
14758 self
14759 }
14760
14761 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14763 where
14764 T: std::convert::Into<wkt::Timestamp>,
14765 {
14766 self.update_time = v.map(|x| x.into());
14767 self
14768 }
14769
14770 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14772 self.description = v.into();
14773 self
14774 }
14775
14776 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14778 self.display_name = v.into();
14779 self
14780 }
14781
14782 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
14784 where
14785 T: std::iter::IntoIterator<Item = (K, V)>,
14786 K: std::convert::Into<std::string::String>,
14787 V: std::convert::Into<std::string::String>,
14788 {
14789 use std::iter::Iterator;
14790 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14791 self
14792 }
14793
14794 pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14796 self.attribute_count = v.into();
14797 self
14798 }
14799
14800 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14802 self.etag = v.into();
14803 self
14804 }
14805
14806 pub fn set_class_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14808 self.class_count = v.into();
14809 self
14810 }
14811}
14812
14813impl wkt::message::Message for DataTaxonomy {
14814 fn typename() -> &'static str {
14815 "type.googleapis.com/google.cloud.dataplex.v1.DataTaxonomy"
14816 }
14817}
14818
14819#[derive(Clone, Default, PartialEq)]
14831#[non_exhaustive]
14832#[deprecated]
14833pub struct DataAttribute {
14834 pub name: std::string::String,
14837
14838 pub uid: std::string::String,
14842
14843 pub create_time: std::option::Option<wkt::Timestamp>,
14845
14846 pub update_time: std::option::Option<wkt::Timestamp>,
14848
14849 pub description: std::string::String,
14851
14852 pub display_name: std::string::String,
14854
14855 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
14857
14858 pub parent_id: std::string::String,
14863
14864 pub attribute_count: i32,
14866
14867 pub etag: std::string::String,
14871
14872 pub resource_access_spec: std::option::Option<crate::model::ResourceAccessSpec>,
14875
14876 pub data_access_spec: std::option::Option<crate::model::DataAccessSpec>,
14879
14880 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14881}
14882
14883impl DataAttribute {
14884 pub fn new() -> Self {
14885 std::default::Default::default()
14886 }
14887
14888 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14890 self.name = v.into();
14891 self
14892 }
14893
14894 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14896 self.uid = v.into();
14897 self
14898 }
14899
14900 pub fn set_create_time<T>(mut self, v: T) -> Self
14902 where
14903 T: std::convert::Into<wkt::Timestamp>,
14904 {
14905 self.create_time = std::option::Option::Some(v.into());
14906 self
14907 }
14908
14909 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14911 where
14912 T: std::convert::Into<wkt::Timestamp>,
14913 {
14914 self.create_time = v.map(|x| x.into());
14915 self
14916 }
14917
14918 pub fn set_update_time<T>(mut self, v: T) -> Self
14920 where
14921 T: std::convert::Into<wkt::Timestamp>,
14922 {
14923 self.update_time = std::option::Option::Some(v.into());
14924 self
14925 }
14926
14927 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14929 where
14930 T: std::convert::Into<wkt::Timestamp>,
14931 {
14932 self.update_time = v.map(|x| x.into());
14933 self
14934 }
14935
14936 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14938 self.description = v.into();
14939 self
14940 }
14941
14942 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14944 self.display_name = v.into();
14945 self
14946 }
14947
14948 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
14950 where
14951 T: std::iter::IntoIterator<Item = (K, V)>,
14952 K: std::convert::Into<std::string::String>,
14953 V: std::convert::Into<std::string::String>,
14954 {
14955 use std::iter::Iterator;
14956 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14957 self
14958 }
14959
14960 pub fn set_parent_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14962 self.parent_id = v.into();
14963 self
14964 }
14965
14966 pub fn set_attribute_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14968 self.attribute_count = v.into();
14969 self
14970 }
14971
14972 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14974 self.etag = v.into();
14975 self
14976 }
14977
14978 pub fn set_resource_access_spec<T>(mut self, v: T) -> Self
14980 where
14981 T: std::convert::Into<crate::model::ResourceAccessSpec>,
14982 {
14983 self.resource_access_spec = std::option::Option::Some(v.into());
14984 self
14985 }
14986
14987 pub fn set_or_clear_resource_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
14989 where
14990 T: std::convert::Into<crate::model::ResourceAccessSpec>,
14991 {
14992 self.resource_access_spec = v.map(|x| x.into());
14993 self
14994 }
14995
14996 pub fn set_data_access_spec<T>(mut self, v: T) -> Self
14998 where
14999 T: std::convert::Into<crate::model::DataAccessSpec>,
15000 {
15001 self.data_access_spec = std::option::Option::Some(v.into());
15002 self
15003 }
15004
15005 pub fn set_or_clear_data_access_spec<T>(mut self, v: std::option::Option<T>) -> Self
15007 where
15008 T: std::convert::Into<crate::model::DataAccessSpec>,
15009 {
15010 self.data_access_spec = v.map(|x| x.into());
15011 self
15012 }
15013}
15014
15015impl wkt::message::Message for DataAttribute {
15016 fn typename() -> &'static str {
15017 "type.googleapis.com/google.cloud.dataplex.v1.DataAttribute"
15018 }
15019}
15020
15021#[derive(Clone, Default, PartialEq)]
15024#[non_exhaustive]
15025#[deprecated]
15026pub struct DataAttributeBinding {
15027 pub name: std::string::String,
15031
15032 pub uid: std::string::String,
15036
15037 pub create_time: std::option::Option<wkt::Timestamp>,
15039
15040 pub update_time: std::option::Option<wkt::Timestamp>,
15042
15043 pub description: std::string::String,
15045
15046 pub display_name: std::string::String,
15048
15049 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
15051
15052 pub etag: std::string::String,
15058
15059 pub attributes: std::vec::Vec<std::string::String>,
15063
15064 pub paths: std::vec::Vec<crate::model::data_attribute_binding::Path>,
15067
15068 pub resource_reference:
15071 std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
15072
15073 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15074}
15075
15076impl DataAttributeBinding {
15077 pub fn new() -> Self {
15078 std::default::Default::default()
15079 }
15080
15081 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15083 self.name = v.into();
15084 self
15085 }
15086
15087 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15089 self.uid = v.into();
15090 self
15091 }
15092
15093 pub fn set_create_time<T>(mut self, v: T) -> Self
15095 where
15096 T: std::convert::Into<wkt::Timestamp>,
15097 {
15098 self.create_time = std::option::Option::Some(v.into());
15099 self
15100 }
15101
15102 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15104 where
15105 T: std::convert::Into<wkt::Timestamp>,
15106 {
15107 self.create_time = v.map(|x| x.into());
15108 self
15109 }
15110
15111 pub fn set_update_time<T>(mut self, v: T) -> Self
15113 where
15114 T: std::convert::Into<wkt::Timestamp>,
15115 {
15116 self.update_time = std::option::Option::Some(v.into());
15117 self
15118 }
15119
15120 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15122 where
15123 T: std::convert::Into<wkt::Timestamp>,
15124 {
15125 self.update_time = v.map(|x| x.into());
15126 self
15127 }
15128
15129 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15131 self.description = v.into();
15132 self
15133 }
15134
15135 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15137 self.display_name = v.into();
15138 self
15139 }
15140
15141 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
15143 where
15144 T: std::iter::IntoIterator<Item = (K, V)>,
15145 K: std::convert::Into<std::string::String>,
15146 V: std::convert::Into<std::string::String>,
15147 {
15148 use std::iter::Iterator;
15149 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
15150 self
15151 }
15152
15153 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15155 self.etag = v.into();
15156 self
15157 }
15158
15159 pub fn set_attributes<T, V>(mut self, v: T) -> Self
15161 where
15162 T: std::iter::IntoIterator<Item = V>,
15163 V: std::convert::Into<std::string::String>,
15164 {
15165 use std::iter::Iterator;
15166 self.attributes = v.into_iter().map(|i| i.into()).collect();
15167 self
15168 }
15169
15170 pub fn set_paths<T, V>(mut self, v: T) -> Self
15172 where
15173 T: std::iter::IntoIterator<Item = V>,
15174 V: std::convert::Into<crate::model::data_attribute_binding::Path>,
15175 {
15176 use std::iter::Iterator;
15177 self.paths = v.into_iter().map(|i| i.into()).collect();
15178 self
15179 }
15180
15181 pub fn set_resource_reference<
15186 T: std::convert::Into<
15187 std::option::Option<crate::model::data_attribute_binding::ResourceReference>,
15188 >,
15189 >(
15190 mut self,
15191 v: T,
15192 ) -> Self {
15193 self.resource_reference = v.into();
15194 self
15195 }
15196
15197 pub fn resource(&self) -> std::option::Option<&std::string::String> {
15201 #[allow(unreachable_patterns)]
15202 self.resource_reference.as_ref().and_then(|v| match v {
15203 crate::model::data_attribute_binding::ResourceReference::Resource(v) => {
15204 std::option::Option::Some(v)
15205 }
15206 _ => std::option::Option::None,
15207 })
15208 }
15209
15210 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15216 self.resource_reference = std::option::Option::Some(
15217 crate::model::data_attribute_binding::ResourceReference::Resource(v.into()),
15218 );
15219 self
15220 }
15221}
15222
15223impl wkt::message::Message for DataAttributeBinding {
15224 fn typename() -> &'static str {
15225 "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding"
15226 }
15227}
15228
15229pub mod data_attribute_binding {
15231 #[allow(unused_imports)]
15232 use super::*;
15233
15234 #[derive(Clone, Default, PartialEq)]
15238 #[non_exhaustive]
15239 pub struct Path {
15240 pub name: std::string::String,
15243
15244 pub attributes: std::vec::Vec<std::string::String>,
15248
15249 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15250 }
15251
15252 impl Path {
15253 pub fn new() -> Self {
15254 std::default::Default::default()
15255 }
15256
15257 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15259 self.name = v.into();
15260 self
15261 }
15262
15263 pub fn set_attributes<T, V>(mut self, v: T) -> Self
15265 where
15266 T: std::iter::IntoIterator<Item = V>,
15267 V: std::convert::Into<std::string::String>,
15268 {
15269 use std::iter::Iterator;
15270 self.attributes = v.into_iter().map(|i| i.into()).collect();
15271 self
15272 }
15273 }
15274
15275 impl wkt::message::Message for Path {
15276 fn typename() -> &'static str {
15277 "type.googleapis.com/google.cloud.dataplex.v1.DataAttributeBinding.Path"
15278 }
15279 }
15280
15281 #[derive(Clone, Debug, PartialEq)]
15284 #[non_exhaustive]
15285 pub enum ResourceReference {
15286 Resource(std::string::String),
15292 }
15293}
15294
15295#[derive(Clone, Default, PartialEq)]
15297#[non_exhaustive]
15298#[deprecated]
15299pub struct CreateDataTaxonomyRequest {
15300 pub parent: std::string::String,
15301
15302 pub data_taxonomy_id: std::string::String,
15310
15311 pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
15313
15314 pub validate_only: bool,
15317
15318 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15319}
15320
15321impl CreateDataTaxonomyRequest {
15322 pub fn new() -> Self {
15323 std::default::Default::default()
15324 }
15325
15326 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15328 self.parent = v.into();
15329 self
15330 }
15331
15332 pub fn set_data_taxonomy_id<T: std::convert::Into<std::string::String>>(
15334 mut self,
15335 v: T,
15336 ) -> Self {
15337 self.data_taxonomy_id = v.into();
15338 self
15339 }
15340
15341 pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
15343 where
15344 T: std::convert::Into<crate::model::DataTaxonomy>,
15345 {
15346 self.data_taxonomy = std::option::Option::Some(v.into());
15347 self
15348 }
15349
15350 pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
15352 where
15353 T: std::convert::Into<crate::model::DataTaxonomy>,
15354 {
15355 self.data_taxonomy = v.map(|x| x.into());
15356 self
15357 }
15358
15359 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15361 self.validate_only = v.into();
15362 self
15363 }
15364}
15365
15366impl wkt::message::Message for CreateDataTaxonomyRequest {
15367 fn typename() -> &'static str {
15368 "type.googleapis.com/google.cloud.dataplex.v1.CreateDataTaxonomyRequest"
15369 }
15370}
15371
15372#[derive(Clone, Default, PartialEq)]
15374#[non_exhaustive]
15375#[deprecated]
15376pub struct UpdateDataTaxonomyRequest {
15377 pub update_mask: std::option::Option<wkt::FieldMask>,
15379
15380 pub data_taxonomy: std::option::Option<crate::model::DataTaxonomy>,
15382
15383 pub validate_only: bool,
15386
15387 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15388}
15389
15390impl UpdateDataTaxonomyRequest {
15391 pub fn new() -> Self {
15392 std::default::Default::default()
15393 }
15394
15395 pub fn set_update_mask<T>(mut self, v: T) -> Self
15397 where
15398 T: std::convert::Into<wkt::FieldMask>,
15399 {
15400 self.update_mask = std::option::Option::Some(v.into());
15401 self
15402 }
15403
15404 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15406 where
15407 T: std::convert::Into<wkt::FieldMask>,
15408 {
15409 self.update_mask = v.map(|x| x.into());
15410 self
15411 }
15412
15413 pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
15415 where
15416 T: std::convert::Into<crate::model::DataTaxonomy>,
15417 {
15418 self.data_taxonomy = std::option::Option::Some(v.into());
15419 self
15420 }
15421
15422 pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
15424 where
15425 T: std::convert::Into<crate::model::DataTaxonomy>,
15426 {
15427 self.data_taxonomy = v.map(|x| x.into());
15428 self
15429 }
15430
15431 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15433 self.validate_only = v.into();
15434 self
15435 }
15436}
15437
15438impl wkt::message::Message for UpdateDataTaxonomyRequest {
15439 fn typename() -> &'static str {
15440 "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataTaxonomyRequest"
15441 }
15442}
15443
15444#[derive(Clone, Default, PartialEq)]
15446#[non_exhaustive]
15447#[deprecated]
15448pub struct GetDataTaxonomyRequest {
15449 pub name: std::string::String,
15450
15451 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15452}
15453
15454impl GetDataTaxonomyRequest {
15455 pub fn new() -> Self {
15456 std::default::Default::default()
15457 }
15458
15459 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15461 self.name = v.into();
15462 self
15463 }
15464}
15465
15466impl wkt::message::Message for GetDataTaxonomyRequest {
15467 fn typename() -> &'static str {
15468 "type.googleapis.com/google.cloud.dataplex.v1.GetDataTaxonomyRequest"
15469 }
15470}
15471
15472#[derive(Clone, Default, PartialEq)]
15474#[non_exhaustive]
15475pub struct ListDataTaxonomiesRequest {
15476 pub parent: std::string::String,
15480
15481 pub page_size: i32,
15486
15487 pub page_token: std::string::String,
15492
15493 pub filter: std::string::String,
15495
15496 pub order_by: std::string::String,
15498
15499 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15500}
15501
15502impl ListDataTaxonomiesRequest {
15503 pub fn new() -> Self {
15504 std::default::Default::default()
15505 }
15506
15507 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15509 self.parent = v.into();
15510 self
15511 }
15512
15513 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15515 self.page_size = v.into();
15516 self
15517 }
15518
15519 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15521 self.page_token = v.into();
15522 self
15523 }
15524
15525 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15527 self.filter = v.into();
15528 self
15529 }
15530
15531 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15533 self.order_by = v.into();
15534 self
15535 }
15536}
15537
15538impl wkt::message::Message for ListDataTaxonomiesRequest {
15539 fn typename() -> &'static str {
15540 "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesRequest"
15541 }
15542}
15543
15544#[derive(Clone, Default, PartialEq)]
15546#[non_exhaustive]
15547pub struct ListDataTaxonomiesResponse {
15548 pub data_taxonomies: std::vec::Vec<crate::model::DataTaxonomy>,
15550
15551 pub next_page_token: std::string::String,
15554
15555 pub unreachable_locations: std::vec::Vec<std::string::String>,
15557
15558 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15559}
15560
15561impl ListDataTaxonomiesResponse {
15562 pub fn new() -> Self {
15563 std::default::Default::default()
15564 }
15565
15566 pub fn set_data_taxonomies<T, V>(mut self, v: T) -> Self
15568 where
15569 T: std::iter::IntoIterator<Item = V>,
15570 V: std::convert::Into<crate::model::DataTaxonomy>,
15571 {
15572 use std::iter::Iterator;
15573 self.data_taxonomies = v.into_iter().map(|i| i.into()).collect();
15574 self
15575 }
15576
15577 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15579 self.next_page_token = v.into();
15580 self
15581 }
15582
15583 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
15585 where
15586 T: std::iter::IntoIterator<Item = V>,
15587 V: std::convert::Into<std::string::String>,
15588 {
15589 use std::iter::Iterator;
15590 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
15591 self
15592 }
15593}
15594
15595impl wkt::message::Message for ListDataTaxonomiesResponse {
15596 fn typename() -> &'static str {
15597 "type.googleapis.com/google.cloud.dataplex.v1.ListDataTaxonomiesResponse"
15598 }
15599}
15600
15601#[doc(hidden)]
15602impl gax::paginator::internal::PageableResponse for ListDataTaxonomiesResponse {
15603 type PageItem = crate::model::DataTaxonomy;
15604
15605 fn items(self) -> std::vec::Vec<Self::PageItem> {
15606 self.data_taxonomies
15607 }
15608
15609 fn next_page_token(&self) -> std::string::String {
15610 use std::clone::Clone;
15611 self.next_page_token.clone()
15612 }
15613}
15614
15615#[derive(Clone, Default, PartialEq)]
15617#[non_exhaustive]
15618#[deprecated]
15619pub struct DeleteDataTaxonomyRequest {
15620 pub name: std::string::String,
15623
15624 pub etag: std::string::String,
15627
15628 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15629}
15630
15631impl DeleteDataTaxonomyRequest {
15632 pub fn new() -> Self {
15633 std::default::Default::default()
15634 }
15635
15636 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15638 self.name = v.into();
15639 self
15640 }
15641
15642 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15644 self.etag = v.into();
15645 self
15646 }
15647}
15648
15649impl wkt::message::Message for DeleteDataTaxonomyRequest {
15650 fn typename() -> &'static str {
15651 "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataTaxonomyRequest"
15652 }
15653}
15654
15655#[derive(Clone, Default, PartialEq)]
15657#[non_exhaustive]
15658pub struct CreateDataAttributeRequest {
15659 pub parent: std::string::String,
15662
15663 pub data_attribute_id: std::string::String,
15671
15672 pub data_attribute: std::option::Option<crate::model::DataAttribute>,
15674
15675 pub validate_only: bool,
15678
15679 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15680}
15681
15682impl CreateDataAttributeRequest {
15683 pub fn new() -> Self {
15684 std::default::Default::default()
15685 }
15686
15687 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15689 self.parent = v.into();
15690 self
15691 }
15692
15693 pub fn set_data_attribute_id<T: std::convert::Into<std::string::String>>(
15695 mut self,
15696 v: T,
15697 ) -> Self {
15698 self.data_attribute_id = v.into();
15699 self
15700 }
15701
15702 pub fn set_data_attribute<T>(mut self, v: T) -> Self
15704 where
15705 T: std::convert::Into<crate::model::DataAttribute>,
15706 {
15707 self.data_attribute = std::option::Option::Some(v.into());
15708 self
15709 }
15710
15711 pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
15713 where
15714 T: std::convert::Into<crate::model::DataAttribute>,
15715 {
15716 self.data_attribute = v.map(|x| x.into());
15717 self
15718 }
15719
15720 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15722 self.validate_only = v.into();
15723 self
15724 }
15725}
15726
15727impl wkt::message::Message for CreateDataAttributeRequest {
15728 fn typename() -> &'static str {
15729 "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeRequest"
15730 }
15731}
15732
15733#[derive(Clone, Default, PartialEq)]
15735#[non_exhaustive]
15736pub struct UpdateDataAttributeRequest {
15737 pub update_mask: std::option::Option<wkt::FieldMask>,
15739
15740 pub data_attribute: std::option::Option<crate::model::DataAttribute>,
15742
15743 pub validate_only: bool,
15746
15747 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15748}
15749
15750impl UpdateDataAttributeRequest {
15751 pub fn new() -> Self {
15752 std::default::Default::default()
15753 }
15754
15755 pub fn set_update_mask<T>(mut self, v: T) -> Self
15757 where
15758 T: std::convert::Into<wkt::FieldMask>,
15759 {
15760 self.update_mask = std::option::Option::Some(v.into());
15761 self
15762 }
15763
15764 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15766 where
15767 T: std::convert::Into<wkt::FieldMask>,
15768 {
15769 self.update_mask = v.map(|x| x.into());
15770 self
15771 }
15772
15773 pub fn set_data_attribute<T>(mut self, v: T) -> Self
15775 where
15776 T: std::convert::Into<crate::model::DataAttribute>,
15777 {
15778 self.data_attribute = std::option::Option::Some(v.into());
15779 self
15780 }
15781
15782 pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
15784 where
15785 T: std::convert::Into<crate::model::DataAttribute>,
15786 {
15787 self.data_attribute = v.map(|x| x.into());
15788 self
15789 }
15790
15791 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15793 self.validate_only = v.into();
15794 self
15795 }
15796}
15797
15798impl wkt::message::Message for UpdateDataAttributeRequest {
15799 fn typename() -> &'static str {
15800 "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeRequest"
15801 }
15802}
15803
15804#[derive(Clone, Default, PartialEq)]
15806#[non_exhaustive]
15807pub struct GetDataAttributeRequest {
15808 pub name: std::string::String,
15811
15812 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15813}
15814
15815impl GetDataAttributeRequest {
15816 pub fn new() -> Self {
15817 std::default::Default::default()
15818 }
15819
15820 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15822 self.name = v.into();
15823 self
15824 }
15825}
15826
15827impl wkt::message::Message for GetDataAttributeRequest {
15828 fn typename() -> &'static str {
15829 "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeRequest"
15830 }
15831}
15832
15833#[derive(Clone, Default, PartialEq)]
15835#[non_exhaustive]
15836pub struct ListDataAttributesRequest {
15837 pub parent: std::string::String,
15840
15841 pub page_size: i32,
15846
15847 pub page_token: std::string::String,
15852
15853 pub filter: std::string::String,
15855
15856 pub order_by: std::string::String,
15858
15859 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15860}
15861
15862impl ListDataAttributesRequest {
15863 pub fn new() -> Self {
15864 std::default::Default::default()
15865 }
15866
15867 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15869 self.parent = v.into();
15870 self
15871 }
15872
15873 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15875 self.page_size = v.into();
15876 self
15877 }
15878
15879 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15881 self.page_token = v.into();
15882 self
15883 }
15884
15885 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15887 self.filter = v.into();
15888 self
15889 }
15890
15891 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15893 self.order_by = v.into();
15894 self
15895 }
15896}
15897
15898impl wkt::message::Message for ListDataAttributesRequest {
15899 fn typename() -> &'static str {
15900 "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesRequest"
15901 }
15902}
15903
15904#[derive(Clone, Default, PartialEq)]
15906#[non_exhaustive]
15907pub struct ListDataAttributesResponse {
15908 pub data_attributes: std::vec::Vec<crate::model::DataAttribute>,
15910
15911 pub next_page_token: std::string::String,
15914
15915 pub unreachable_locations: std::vec::Vec<std::string::String>,
15917
15918 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15919}
15920
15921impl ListDataAttributesResponse {
15922 pub fn new() -> Self {
15923 std::default::Default::default()
15924 }
15925
15926 pub fn set_data_attributes<T, V>(mut self, v: T) -> Self
15928 where
15929 T: std::iter::IntoIterator<Item = V>,
15930 V: std::convert::Into<crate::model::DataAttribute>,
15931 {
15932 use std::iter::Iterator;
15933 self.data_attributes = v.into_iter().map(|i| i.into()).collect();
15934 self
15935 }
15936
15937 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15939 self.next_page_token = v.into();
15940 self
15941 }
15942
15943 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
15945 where
15946 T: std::iter::IntoIterator<Item = V>,
15947 V: std::convert::Into<std::string::String>,
15948 {
15949 use std::iter::Iterator;
15950 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
15951 self
15952 }
15953}
15954
15955impl wkt::message::Message for ListDataAttributesResponse {
15956 fn typename() -> &'static str {
15957 "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributesResponse"
15958 }
15959}
15960
15961#[doc(hidden)]
15962impl gax::paginator::internal::PageableResponse for ListDataAttributesResponse {
15963 type PageItem = crate::model::DataAttribute;
15964
15965 fn items(self) -> std::vec::Vec<Self::PageItem> {
15966 self.data_attributes
15967 }
15968
15969 fn next_page_token(&self) -> std::string::String {
15970 use std::clone::Clone;
15971 self.next_page_token.clone()
15972 }
15973}
15974
15975#[derive(Clone, Default, PartialEq)]
15977#[non_exhaustive]
15978pub struct DeleteDataAttributeRequest {
15979 pub name: std::string::String,
15982
15983 pub etag: std::string::String,
15986
15987 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15988}
15989
15990impl DeleteDataAttributeRequest {
15991 pub fn new() -> Self {
15992 std::default::Default::default()
15993 }
15994
15995 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15997 self.name = v.into();
15998 self
15999 }
16000
16001 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16003 self.etag = v.into();
16004 self
16005 }
16006}
16007
16008impl wkt::message::Message for DeleteDataAttributeRequest {
16009 fn typename() -> &'static str {
16010 "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeRequest"
16011 }
16012}
16013
16014#[derive(Clone, Default, PartialEq)]
16016#[non_exhaustive]
16017pub struct CreateDataAttributeBindingRequest {
16018 pub parent: std::string::String,
16021
16022 pub data_attribute_binding_id: std::string::String,
16030
16031 pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
16033
16034 pub validate_only: bool,
16037
16038 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16039}
16040
16041impl CreateDataAttributeBindingRequest {
16042 pub fn new() -> Self {
16043 std::default::Default::default()
16044 }
16045
16046 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16048 self.parent = v.into();
16049 self
16050 }
16051
16052 pub fn set_data_attribute_binding_id<T: std::convert::Into<std::string::String>>(
16054 mut self,
16055 v: T,
16056 ) -> Self {
16057 self.data_attribute_binding_id = v.into();
16058 self
16059 }
16060
16061 pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
16063 where
16064 T: std::convert::Into<crate::model::DataAttributeBinding>,
16065 {
16066 self.data_attribute_binding = std::option::Option::Some(v.into());
16067 self
16068 }
16069
16070 pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
16072 where
16073 T: std::convert::Into<crate::model::DataAttributeBinding>,
16074 {
16075 self.data_attribute_binding = v.map(|x| x.into());
16076 self
16077 }
16078
16079 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16081 self.validate_only = v.into();
16082 self
16083 }
16084}
16085
16086impl wkt::message::Message for CreateDataAttributeBindingRequest {
16087 fn typename() -> &'static str {
16088 "type.googleapis.com/google.cloud.dataplex.v1.CreateDataAttributeBindingRequest"
16089 }
16090}
16091
16092#[derive(Clone, Default, PartialEq)]
16094#[non_exhaustive]
16095pub struct UpdateDataAttributeBindingRequest {
16096 pub update_mask: std::option::Option<wkt::FieldMask>,
16098
16099 pub data_attribute_binding: std::option::Option<crate::model::DataAttributeBinding>,
16101
16102 pub validate_only: bool,
16105
16106 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16107}
16108
16109impl UpdateDataAttributeBindingRequest {
16110 pub fn new() -> Self {
16111 std::default::Default::default()
16112 }
16113
16114 pub fn set_update_mask<T>(mut self, v: T) -> Self
16116 where
16117 T: std::convert::Into<wkt::FieldMask>,
16118 {
16119 self.update_mask = std::option::Option::Some(v.into());
16120 self
16121 }
16122
16123 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16125 where
16126 T: std::convert::Into<wkt::FieldMask>,
16127 {
16128 self.update_mask = v.map(|x| x.into());
16129 self
16130 }
16131
16132 pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
16134 where
16135 T: std::convert::Into<crate::model::DataAttributeBinding>,
16136 {
16137 self.data_attribute_binding = std::option::Option::Some(v.into());
16138 self
16139 }
16140
16141 pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
16143 where
16144 T: std::convert::Into<crate::model::DataAttributeBinding>,
16145 {
16146 self.data_attribute_binding = v.map(|x| x.into());
16147 self
16148 }
16149
16150 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16152 self.validate_only = v.into();
16153 self
16154 }
16155}
16156
16157impl wkt::message::Message for UpdateDataAttributeBindingRequest {
16158 fn typename() -> &'static str {
16159 "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest"
16160 }
16161}
16162
16163#[derive(Clone, Default, PartialEq)]
16165#[non_exhaustive]
16166pub struct GetDataAttributeBindingRequest {
16167 pub name: std::string::String,
16170
16171 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16172}
16173
16174impl GetDataAttributeBindingRequest {
16175 pub fn new() -> Self {
16176 std::default::Default::default()
16177 }
16178
16179 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16181 self.name = v.into();
16182 self
16183 }
16184}
16185
16186impl wkt::message::Message for GetDataAttributeBindingRequest {
16187 fn typename() -> &'static str {
16188 "type.googleapis.com/google.cloud.dataplex.v1.GetDataAttributeBindingRequest"
16189 }
16190}
16191
16192#[derive(Clone, Default, PartialEq)]
16194#[non_exhaustive]
16195pub struct ListDataAttributeBindingsRequest {
16196 pub parent: std::string::String,
16199
16200 pub page_size: i32,
16205
16206 pub page_token: std::string::String,
16211
16212 pub filter: std::string::String,
16218
16219 pub order_by: std::string::String,
16221
16222 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16223}
16224
16225impl ListDataAttributeBindingsRequest {
16226 pub fn new() -> Self {
16227 std::default::Default::default()
16228 }
16229
16230 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16232 self.parent = v.into();
16233 self
16234 }
16235
16236 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16238 self.page_size = v.into();
16239 self
16240 }
16241
16242 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16244 self.page_token = v.into();
16245 self
16246 }
16247
16248 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16250 self.filter = v.into();
16251 self
16252 }
16253
16254 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16256 self.order_by = v.into();
16257 self
16258 }
16259}
16260
16261impl wkt::message::Message for ListDataAttributeBindingsRequest {
16262 fn typename() -> &'static str {
16263 "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsRequest"
16264 }
16265}
16266
16267#[derive(Clone, Default, PartialEq)]
16269#[non_exhaustive]
16270pub struct ListDataAttributeBindingsResponse {
16271 pub data_attribute_bindings: std::vec::Vec<crate::model::DataAttributeBinding>,
16273
16274 pub next_page_token: std::string::String,
16277
16278 pub unreachable_locations: std::vec::Vec<std::string::String>,
16280
16281 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16282}
16283
16284impl ListDataAttributeBindingsResponse {
16285 pub fn new() -> Self {
16286 std::default::Default::default()
16287 }
16288
16289 pub fn set_data_attribute_bindings<T, V>(mut self, v: T) -> Self
16291 where
16292 T: std::iter::IntoIterator<Item = V>,
16293 V: std::convert::Into<crate::model::DataAttributeBinding>,
16294 {
16295 use std::iter::Iterator;
16296 self.data_attribute_bindings = v.into_iter().map(|i| i.into()).collect();
16297 self
16298 }
16299
16300 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16302 self.next_page_token = v.into();
16303 self
16304 }
16305
16306 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
16308 where
16309 T: std::iter::IntoIterator<Item = V>,
16310 V: std::convert::Into<std::string::String>,
16311 {
16312 use std::iter::Iterator;
16313 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
16314 self
16315 }
16316}
16317
16318impl wkt::message::Message for ListDataAttributeBindingsResponse {
16319 fn typename() -> &'static str {
16320 "type.googleapis.com/google.cloud.dataplex.v1.ListDataAttributeBindingsResponse"
16321 }
16322}
16323
16324#[doc(hidden)]
16325impl gax::paginator::internal::PageableResponse for ListDataAttributeBindingsResponse {
16326 type PageItem = crate::model::DataAttributeBinding;
16327
16328 fn items(self) -> std::vec::Vec<Self::PageItem> {
16329 self.data_attribute_bindings
16330 }
16331
16332 fn next_page_token(&self) -> std::string::String {
16333 use std::clone::Clone;
16334 self.next_page_token.clone()
16335 }
16336}
16337
16338#[derive(Clone, Default, PartialEq)]
16340#[non_exhaustive]
16341pub struct DeleteDataAttributeBindingRequest {
16342 pub name: std::string::String,
16345
16346 pub etag: std::string::String,
16351
16352 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16353}
16354
16355impl DeleteDataAttributeBindingRequest {
16356 pub fn new() -> Self {
16357 std::default::Default::default()
16358 }
16359
16360 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16362 self.name = v.into();
16363 self
16364 }
16365
16366 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16368 self.etag = v.into();
16369 self
16370 }
16371}
16372
16373impl wkt::message::Message for DeleteDataAttributeBindingRequest {
16374 fn typename() -> &'static str {
16375 "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest"
16376 }
16377}
16378
16379#[derive(Clone, Default, PartialEq)]
16381#[non_exhaustive]
16382pub struct CreateDataScanRequest {
16383 pub parent: std::string::String,
16388
16389 pub data_scan: std::option::Option<crate::model::DataScan>,
16391
16392 pub data_scan_id: std::string::String,
16400
16401 pub validate_only: bool,
16404
16405 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16406}
16407
16408impl CreateDataScanRequest {
16409 pub fn new() -> Self {
16410 std::default::Default::default()
16411 }
16412
16413 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16415 self.parent = v.into();
16416 self
16417 }
16418
16419 pub fn set_data_scan<T>(mut self, v: T) -> Self
16421 where
16422 T: std::convert::Into<crate::model::DataScan>,
16423 {
16424 self.data_scan = std::option::Option::Some(v.into());
16425 self
16426 }
16427
16428 pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
16430 where
16431 T: std::convert::Into<crate::model::DataScan>,
16432 {
16433 self.data_scan = v.map(|x| x.into());
16434 self
16435 }
16436
16437 pub fn set_data_scan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16439 self.data_scan_id = v.into();
16440 self
16441 }
16442
16443 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16445 self.validate_only = v.into();
16446 self
16447 }
16448}
16449
16450impl wkt::message::Message for CreateDataScanRequest {
16451 fn typename() -> &'static str {
16452 "type.googleapis.com/google.cloud.dataplex.v1.CreateDataScanRequest"
16453 }
16454}
16455
16456#[derive(Clone, Default, PartialEq)]
16458#[non_exhaustive]
16459pub struct UpdateDataScanRequest {
16460 pub data_scan: std::option::Option<crate::model::DataScan>,
16464
16465 pub update_mask: std::option::Option<wkt::FieldMask>,
16467
16468 pub validate_only: bool,
16471
16472 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16473}
16474
16475impl UpdateDataScanRequest {
16476 pub fn new() -> Self {
16477 std::default::Default::default()
16478 }
16479
16480 pub fn set_data_scan<T>(mut self, v: T) -> Self
16482 where
16483 T: std::convert::Into<crate::model::DataScan>,
16484 {
16485 self.data_scan = std::option::Option::Some(v.into());
16486 self
16487 }
16488
16489 pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
16491 where
16492 T: std::convert::Into<crate::model::DataScan>,
16493 {
16494 self.data_scan = v.map(|x| x.into());
16495 self
16496 }
16497
16498 pub fn set_update_mask<T>(mut self, v: T) -> Self
16500 where
16501 T: std::convert::Into<wkt::FieldMask>,
16502 {
16503 self.update_mask = std::option::Option::Some(v.into());
16504 self
16505 }
16506
16507 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16509 where
16510 T: std::convert::Into<wkt::FieldMask>,
16511 {
16512 self.update_mask = v.map(|x| x.into());
16513 self
16514 }
16515
16516 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16518 self.validate_only = v.into();
16519 self
16520 }
16521}
16522
16523impl wkt::message::Message for UpdateDataScanRequest {
16524 fn typename() -> &'static str {
16525 "type.googleapis.com/google.cloud.dataplex.v1.UpdateDataScanRequest"
16526 }
16527}
16528
16529#[derive(Clone, Default, PartialEq)]
16531#[non_exhaustive]
16532pub struct DeleteDataScanRequest {
16533 pub name: std::string::String,
16538
16539 pub force: bool,
16543
16544 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16545}
16546
16547impl DeleteDataScanRequest {
16548 pub fn new() -> Self {
16549 std::default::Default::default()
16550 }
16551
16552 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16554 self.name = v.into();
16555 self
16556 }
16557
16558 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16560 self.force = v.into();
16561 self
16562 }
16563}
16564
16565impl wkt::message::Message for DeleteDataScanRequest {
16566 fn typename() -> &'static str {
16567 "type.googleapis.com/google.cloud.dataplex.v1.DeleteDataScanRequest"
16568 }
16569}
16570
16571#[derive(Clone, Default, PartialEq)]
16573#[non_exhaustive]
16574pub struct GetDataScanRequest {
16575 pub name: std::string::String,
16580
16581 pub view: crate::model::get_data_scan_request::DataScanView,
16583
16584 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16585}
16586
16587impl GetDataScanRequest {
16588 pub fn new() -> Self {
16589 std::default::Default::default()
16590 }
16591
16592 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16594 self.name = v.into();
16595 self
16596 }
16597
16598 pub fn set_view<T: std::convert::Into<crate::model::get_data_scan_request::DataScanView>>(
16600 mut self,
16601 v: T,
16602 ) -> Self {
16603 self.view = v.into();
16604 self
16605 }
16606}
16607
16608impl wkt::message::Message for GetDataScanRequest {
16609 fn typename() -> &'static str {
16610 "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanRequest"
16611 }
16612}
16613
16614pub mod get_data_scan_request {
16616 #[allow(unused_imports)]
16617 use super::*;
16618
16619 #[derive(Clone, Debug, PartialEq)]
16635 #[non_exhaustive]
16636 pub enum DataScanView {
16637 Unspecified,
16639 Basic,
16641 Full,
16643 UnknownValue(data_scan_view::UnknownValue),
16648 }
16649
16650 #[doc(hidden)]
16651 pub mod data_scan_view {
16652 #[allow(unused_imports)]
16653 use super::*;
16654 #[derive(Clone, Debug, PartialEq)]
16655 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16656 }
16657
16658 impl DataScanView {
16659 pub fn value(&self) -> std::option::Option<i32> {
16664 match self {
16665 Self::Unspecified => std::option::Option::Some(0),
16666 Self::Basic => std::option::Option::Some(1),
16667 Self::Full => std::option::Option::Some(10),
16668 Self::UnknownValue(u) => u.0.value(),
16669 }
16670 }
16671
16672 pub fn name(&self) -> std::option::Option<&str> {
16677 match self {
16678 Self::Unspecified => std::option::Option::Some("DATA_SCAN_VIEW_UNSPECIFIED"),
16679 Self::Basic => std::option::Option::Some("BASIC"),
16680 Self::Full => std::option::Option::Some("FULL"),
16681 Self::UnknownValue(u) => u.0.name(),
16682 }
16683 }
16684 }
16685
16686 impl std::default::Default for DataScanView {
16687 fn default() -> Self {
16688 use std::convert::From;
16689 Self::from(0)
16690 }
16691 }
16692
16693 impl std::fmt::Display for DataScanView {
16694 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16695 wkt::internal::display_enum(f, self.name(), self.value())
16696 }
16697 }
16698
16699 impl std::convert::From<i32> for DataScanView {
16700 fn from(value: i32) -> Self {
16701 match value {
16702 0 => Self::Unspecified,
16703 1 => Self::Basic,
16704 10 => Self::Full,
16705 _ => Self::UnknownValue(data_scan_view::UnknownValue(
16706 wkt::internal::UnknownEnumValue::Integer(value),
16707 )),
16708 }
16709 }
16710 }
16711
16712 impl std::convert::From<&str> for DataScanView {
16713 fn from(value: &str) -> Self {
16714 use std::string::ToString;
16715 match value {
16716 "DATA_SCAN_VIEW_UNSPECIFIED" => Self::Unspecified,
16717 "BASIC" => Self::Basic,
16718 "FULL" => Self::Full,
16719 _ => Self::UnknownValue(data_scan_view::UnknownValue(
16720 wkt::internal::UnknownEnumValue::String(value.to_string()),
16721 )),
16722 }
16723 }
16724 }
16725
16726 impl serde::ser::Serialize for DataScanView {
16727 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16728 where
16729 S: serde::Serializer,
16730 {
16731 match self {
16732 Self::Unspecified => serializer.serialize_i32(0),
16733 Self::Basic => serializer.serialize_i32(1),
16734 Self::Full => serializer.serialize_i32(10),
16735 Self::UnknownValue(u) => u.0.serialize(serializer),
16736 }
16737 }
16738 }
16739
16740 impl<'de> serde::de::Deserialize<'de> for DataScanView {
16741 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16742 where
16743 D: serde::Deserializer<'de>,
16744 {
16745 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanView>::new(
16746 ".google.cloud.dataplex.v1.GetDataScanRequest.DataScanView",
16747 ))
16748 }
16749 }
16750}
16751
16752#[derive(Clone, Default, PartialEq)]
16754#[non_exhaustive]
16755pub struct ListDataScansRequest {
16756 pub parent: std::string::String,
16761
16762 pub page_size: i32,
16766
16767 pub page_token: std::string::String,
16772
16773 pub filter: std::string::String,
16775
16776 pub order_by: std::string::String,
16779
16780 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16781}
16782
16783impl ListDataScansRequest {
16784 pub fn new() -> Self {
16785 std::default::Default::default()
16786 }
16787
16788 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16790 self.parent = v.into();
16791 self
16792 }
16793
16794 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16796 self.page_size = v.into();
16797 self
16798 }
16799
16800 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16802 self.page_token = v.into();
16803 self
16804 }
16805
16806 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16808 self.filter = v.into();
16809 self
16810 }
16811
16812 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16814 self.order_by = v.into();
16815 self
16816 }
16817}
16818
16819impl wkt::message::Message for ListDataScansRequest {
16820 fn typename() -> &'static str {
16821 "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansRequest"
16822 }
16823}
16824
16825#[derive(Clone, Default, PartialEq)]
16827#[non_exhaustive]
16828pub struct ListDataScansResponse {
16829 pub data_scans: std::vec::Vec<crate::model::DataScan>,
16831
16832 pub next_page_token: std::string::String,
16835
16836 pub unreachable: std::vec::Vec<std::string::String>,
16838
16839 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16840}
16841
16842impl ListDataScansResponse {
16843 pub fn new() -> Self {
16844 std::default::Default::default()
16845 }
16846
16847 pub fn set_data_scans<T, V>(mut self, v: T) -> Self
16849 where
16850 T: std::iter::IntoIterator<Item = V>,
16851 V: std::convert::Into<crate::model::DataScan>,
16852 {
16853 use std::iter::Iterator;
16854 self.data_scans = v.into_iter().map(|i| i.into()).collect();
16855 self
16856 }
16857
16858 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16860 self.next_page_token = v.into();
16861 self
16862 }
16863
16864 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
16866 where
16867 T: std::iter::IntoIterator<Item = V>,
16868 V: std::convert::Into<std::string::String>,
16869 {
16870 use std::iter::Iterator;
16871 self.unreachable = v.into_iter().map(|i| i.into()).collect();
16872 self
16873 }
16874}
16875
16876impl wkt::message::Message for ListDataScansResponse {
16877 fn typename() -> &'static str {
16878 "type.googleapis.com/google.cloud.dataplex.v1.ListDataScansResponse"
16879 }
16880}
16881
16882#[doc(hidden)]
16883impl gax::paginator::internal::PageableResponse for ListDataScansResponse {
16884 type PageItem = crate::model::DataScan;
16885
16886 fn items(self) -> std::vec::Vec<Self::PageItem> {
16887 self.data_scans
16888 }
16889
16890 fn next_page_token(&self) -> std::string::String {
16891 use std::clone::Clone;
16892 self.next_page_token.clone()
16893 }
16894}
16895
16896#[derive(Clone, Default, PartialEq)]
16898#[non_exhaustive]
16899pub struct RunDataScanRequest {
16900 pub name: std::string::String,
16907
16908 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16909}
16910
16911impl RunDataScanRequest {
16912 pub fn new() -> Self {
16913 std::default::Default::default()
16914 }
16915
16916 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16918 self.name = v.into();
16919 self
16920 }
16921}
16922
16923impl wkt::message::Message for RunDataScanRequest {
16924 fn typename() -> &'static str {
16925 "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanRequest"
16926 }
16927}
16928
16929#[derive(Clone, Default, PartialEq)]
16931#[non_exhaustive]
16932pub struct RunDataScanResponse {
16933 pub job: std::option::Option<crate::model::DataScanJob>,
16935
16936 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16937}
16938
16939impl RunDataScanResponse {
16940 pub fn new() -> Self {
16941 std::default::Default::default()
16942 }
16943
16944 pub fn set_job<T>(mut self, v: T) -> Self
16946 where
16947 T: std::convert::Into<crate::model::DataScanJob>,
16948 {
16949 self.job = std::option::Option::Some(v.into());
16950 self
16951 }
16952
16953 pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
16955 where
16956 T: std::convert::Into<crate::model::DataScanJob>,
16957 {
16958 self.job = v.map(|x| x.into());
16959 self
16960 }
16961}
16962
16963impl wkt::message::Message for RunDataScanResponse {
16964 fn typename() -> &'static str {
16965 "type.googleapis.com/google.cloud.dataplex.v1.RunDataScanResponse"
16966 }
16967}
16968
16969#[derive(Clone, Default, PartialEq)]
16971#[non_exhaustive]
16972pub struct GetDataScanJobRequest {
16973 pub name: std::string::String,
16978
16979 pub view: crate::model::get_data_scan_job_request::DataScanJobView,
16981
16982 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16983}
16984
16985impl GetDataScanJobRequest {
16986 pub fn new() -> Self {
16987 std::default::Default::default()
16988 }
16989
16990 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16992 self.name = v.into();
16993 self
16994 }
16995
16996 pub fn set_view<
16998 T: std::convert::Into<crate::model::get_data_scan_job_request::DataScanJobView>,
16999 >(
17000 mut self,
17001 v: T,
17002 ) -> Self {
17003 self.view = v.into();
17004 self
17005 }
17006}
17007
17008impl wkt::message::Message for GetDataScanJobRequest {
17009 fn typename() -> &'static str {
17010 "type.googleapis.com/google.cloud.dataplex.v1.GetDataScanJobRequest"
17011 }
17012}
17013
17014pub mod get_data_scan_job_request {
17016 #[allow(unused_imports)]
17017 use super::*;
17018
17019 #[derive(Clone, Debug, PartialEq)]
17035 #[non_exhaustive]
17036 pub enum DataScanJobView {
17037 Unspecified,
17039 Basic,
17041 Full,
17043 UnknownValue(data_scan_job_view::UnknownValue),
17048 }
17049
17050 #[doc(hidden)]
17051 pub mod data_scan_job_view {
17052 #[allow(unused_imports)]
17053 use super::*;
17054 #[derive(Clone, Debug, PartialEq)]
17055 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17056 }
17057
17058 impl DataScanJobView {
17059 pub fn value(&self) -> std::option::Option<i32> {
17064 match self {
17065 Self::Unspecified => std::option::Option::Some(0),
17066 Self::Basic => std::option::Option::Some(1),
17067 Self::Full => std::option::Option::Some(10),
17068 Self::UnknownValue(u) => u.0.value(),
17069 }
17070 }
17071
17072 pub fn name(&self) -> std::option::Option<&str> {
17077 match self {
17078 Self::Unspecified => std::option::Option::Some("DATA_SCAN_JOB_VIEW_UNSPECIFIED"),
17079 Self::Basic => std::option::Option::Some("BASIC"),
17080 Self::Full => std::option::Option::Some("FULL"),
17081 Self::UnknownValue(u) => u.0.name(),
17082 }
17083 }
17084 }
17085
17086 impl std::default::Default for DataScanJobView {
17087 fn default() -> Self {
17088 use std::convert::From;
17089 Self::from(0)
17090 }
17091 }
17092
17093 impl std::fmt::Display for DataScanJobView {
17094 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17095 wkt::internal::display_enum(f, self.name(), self.value())
17096 }
17097 }
17098
17099 impl std::convert::From<i32> for DataScanJobView {
17100 fn from(value: i32) -> Self {
17101 match value {
17102 0 => Self::Unspecified,
17103 1 => Self::Basic,
17104 10 => Self::Full,
17105 _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
17106 wkt::internal::UnknownEnumValue::Integer(value),
17107 )),
17108 }
17109 }
17110 }
17111
17112 impl std::convert::From<&str> for DataScanJobView {
17113 fn from(value: &str) -> Self {
17114 use std::string::ToString;
17115 match value {
17116 "DATA_SCAN_JOB_VIEW_UNSPECIFIED" => Self::Unspecified,
17117 "BASIC" => Self::Basic,
17118 "FULL" => Self::Full,
17119 _ => Self::UnknownValue(data_scan_job_view::UnknownValue(
17120 wkt::internal::UnknownEnumValue::String(value.to_string()),
17121 )),
17122 }
17123 }
17124 }
17125
17126 impl serde::ser::Serialize for DataScanJobView {
17127 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17128 where
17129 S: serde::Serializer,
17130 {
17131 match self {
17132 Self::Unspecified => serializer.serialize_i32(0),
17133 Self::Basic => serializer.serialize_i32(1),
17134 Self::Full => serializer.serialize_i32(10),
17135 Self::UnknownValue(u) => u.0.serialize(serializer),
17136 }
17137 }
17138 }
17139
17140 impl<'de> serde::de::Deserialize<'de> for DataScanJobView {
17141 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17142 where
17143 D: serde::Deserializer<'de>,
17144 {
17145 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanJobView>::new(
17146 ".google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView",
17147 ))
17148 }
17149 }
17150}
17151
17152#[derive(Clone, Default, PartialEq)]
17154#[non_exhaustive]
17155pub struct ListDataScanJobsRequest {
17156 pub parent: std::string::String,
17161
17162 pub page_size: i32,
17167
17168 pub page_token: std::string::String,
17173
17174 pub filter: std::string::String,
17192
17193 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17194}
17195
17196impl ListDataScanJobsRequest {
17197 pub fn new() -> Self {
17198 std::default::Default::default()
17199 }
17200
17201 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17203 self.parent = v.into();
17204 self
17205 }
17206
17207 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17209 self.page_size = v.into();
17210 self
17211 }
17212
17213 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17215 self.page_token = v.into();
17216 self
17217 }
17218
17219 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17221 self.filter = v.into();
17222 self
17223 }
17224}
17225
17226impl wkt::message::Message for ListDataScanJobsRequest {
17227 fn typename() -> &'static str {
17228 "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsRequest"
17229 }
17230}
17231
17232#[derive(Clone, Default, PartialEq)]
17234#[non_exhaustive]
17235pub struct ListDataScanJobsResponse {
17236 pub data_scan_jobs: std::vec::Vec<crate::model::DataScanJob>,
17238
17239 pub next_page_token: std::string::String,
17242
17243 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17244}
17245
17246impl ListDataScanJobsResponse {
17247 pub fn new() -> Self {
17248 std::default::Default::default()
17249 }
17250
17251 pub fn set_data_scan_jobs<T, V>(mut self, v: T) -> Self
17253 where
17254 T: std::iter::IntoIterator<Item = V>,
17255 V: std::convert::Into<crate::model::DataScanJob>,
17256 {
17257 use std::iter::Iterator;
17258 self.data_scan_jobs = v.into_iter().map(|i| i.into()).collect();
17259 self
17260 }
17261
17262 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17264 self.next_page_token = v.into();
17265 self
17266 }
17267}
17268
17269impl wkt::message::Message for ListDataScanJobsResponse {
17270 fn typename() -> &'static str {
17271 "type.googleapis.com/google.cloud.dataplex.v1.ListDataScanJobsResponse"
17272 }
17273}
17274
17275#[doc(hidden)]
17276impl gax::paginator::internal::PageableResponse for ListDataScanJobsResponse {
17277 type PageItem = crate::model::DataScanJob;
17278
17279 fn items(self) -> std::vec::Vec<Self::PageItem> {
17280 self.data_scan_jobs
17281 }
17282
17283 fn next_page_token(&self) -> std::string::String {
17284 use std::clone::Clone;
17285 self.next_page_token.clone()
17286 }
17287}
17288
17289#[derive(Clone, Default, PartialEq)]
17291#[non_exhaustive]
17292pub struct GenerateDataQualityRulesRequest {
17293 pub name: std::string::String,
17300
17301 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17302}
17303
17304impl GenerateDataQualityRulesRequest {
17305 pub fn new() -> Self {
17306 std::default::Default::default()
17307 }
17308
17309 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17311 self.name = v.into();
17312 self
17313 }
17314}
17315
17316impl wkt::message::Message for GenerateDataQualityRulesRequest {
17317 fn typename() -> &'static str {
17318 "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesRequest"
17319 }
17320}
17321
17322#[derive(Clone, Default, PartialEq)]
17324#[non_exhaustive]
17325pub struct GenerateDataQualityRulesResponse {
17326 pub rule: std::vec::Vec<crate::model::DataQualityRule>,
17329
17330 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17331}
17332
17333impl GenerateDataQualityRulesResponse {
17334 pub fn new() -> Self {
17335 std::default::Default::default()
17336 }
17337
17338 pub fn set_rule<T, V>(mut self, v: T) -> Self
17340 where
17341 T: std::iter::IntoIterator<Item = V>,
17342 V: std::convert::Into<crate::model::DataQualityRule>,
17343 {
17344 use std::iter::Iterator;
17345 self.rule = v.into_iter().map(|i| i.into()).collect();
17346 self
17347 }
17348}
17349
17350impl wkt::message::Message for GenerateDataQualityRulesResponse {
17351 fn typename() -> &'static str {
17352 "type.googleapis.com/google.cloud.dataplex.v1.GenerateDataQualityRulesResponse"
17353 }
17354}
17355
17356#[derive(Clone, Default, PartialEq)]
17377#[non_exhaustive]
17378pub struct DataScan {
17379 pub name: std::string::String,
17384
17385 pub uid: std::string::String,
17388
17389 pub description: std::string::String,
17393
17394 pub display_name: std::string::String,
17398
17399 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
17401
17402 pub state: crate::model::State,
17404
17405 pub create_time: std::option::Option<wkt::Timestamp>,
17407
17408 pub update_time: std::option::Option<wkt::Timestamp>,
17410
17411 pub data: std::option::Option<crate::model::DataSource>,
17413
17414 pub execution_spec: std::option::Option<crate::model::data_scan::ExecutionSpec>,
17418
17419 pub execution_status: std::option::Option<crate::model::data_scan::ExecutionStatus>,
17421
17422 pub r#type: crate::model::DataScanType,
17424
17425 pub spec: std::option::Option<crate::model::data_scan::Spec>,
17430
17431 pub result: std::option::Option<crate::model::data_scan::Result>,
17433
17434 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17435}
17436
17437impl DataScan {
17438 pub fn new() -> Self {
17439 std::default::Default::default()
17440 }
17441
17442 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17444 self.name = v.into();
17445 self
17446 }
17447
17448 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17450 self.uid = v.into();
17451 self
17452 }
17453
17454 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17456 self.description = v.into();
17457 self
17458 }
17459
17460 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17462 self.display_name = v.into();
17463 self
17464 }
17465
17466 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
17468 where
17469 T: std::iter::IntoIterator<Item = (K, V)>,
17470 K: std::convert::Into<std::string::String>,
17471 V: std::convert::Into<std::string::String>,
17472 {
17473 use std::iter::Iterator;
17474 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17475 self
17476 }
17477
17478 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
17480 self.state = v.into();
17481 self
17482 }
17483
17484 pub fn set_create_time<T>(mut self, v: T) -> Self
17486 where
17487 T: std::convert::Into<wkt::Timestamp>,
17488 {
17489 self.create_time = std::option::Option::Some(v.into());
17490 self
17491 }
17492
17493 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17495 where
17496 T: std::convert::Into<wkt::Timestamp>,
17497 {
17498 self.create_time = v.map(|x| x.into());
17499 self
17500 }
17501
17502 pub fn set_update_time<T>(mut self, v: T) -> Self
17504 where
17505 T: std::convert::Into<wkt::Timestamp>,
17506 {
17507 self.update_time = std::option::Option::Some(v.into());
17508 self
17509 }
17510
17511 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
17513 where
17514 T: std::convert::Into<wkt::Timestamp>,
17515 {
17516 self.update_time = v.map(|x| x.into());
17517 self
17518 }
17519
17520 pub fn set_data<T>(mut self, v: T) -> Self
17522 where
17523 T: std::convert::Into<crate::model::DataSource>,
17524 {
17525 self.data = std::option::Option::Some(v.into());
17526 self
17527 }
17528
17529 pub fn set_or_clear_data<T>(mut self, v: std::option::Option<T>) -> Self
17531 where
17532 T: std::convert::Into<crate::model::DataSource>,
17533 {
17534 self.data = v.map(|x| x.into());
17535 self
17536 }
17537
17538 pub fn set_execution_spec<T>(mut self, v: T) -> Self
17540 where
17541 T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
17542 {
17543 self.execution_spec = std::option::Option::Some(v.into());
17544 self
17545 }
17546
17547 pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
17549 where
17550 T: std::convert::Into<crate::model::data_scan::ExecutionSpec>,
17551 {
17552 self.execution_spec = v.map(|x| x.into());
17553 self
17554 }
17555
17556 pub fn set_execution_status<T>(mut self, v: T) -> Self
17558 where
17559 T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
17560 {
17561 self.execution_status = std::option::Option::Some(v.into());
17562 self
17563 }
17564
17565 pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
17567 where
17568 T: std::convert::Into<crate::model::data_scan::ExecutionStatus>,
17569 {
17570 self.execution_status = v.map(|x| x.into());
17571 self
17572 }
17573
17574 pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
17576 self.r#type = v.into();
17577 self
17578 }
17579
17580 pub fn set_spec<T: std::convert::Into<std::option::Option<crate::model::data_scan::Spec>>>(
17585 mut self,
17586 v: T,
17587 ) -> Self {
17588 self.spec = v.into();
17589 self
17590 }
17591
17592 pub fn data_quality_spec(
17596 &self,
17597 ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
17598 #[allow(unreachable_patterns)]
17599 self.spec.as_ref().and_then(|v| match v {
17600 crate::model::data_scan::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
17601 _ => std::option::Option::None,
17602 })
17603 }
17604
17605 pub fn set_data_quality_spec<
17611 T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
17612 >(
17613 mut self,
17614 v: T,
17615 ) -> Self {
17616 self.spec =
17617 std::option::Option::Some(crate::model::data_scan::Spec::DataQualitySpec(v.into()));
17618 self
17619 }
17620
17621 pub fn data_profile_spec(
17625 &self,
17626 ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
17627 #[allow(unreachable_patterns)]
17628 self.spec.as_ref().and_then(|v| match v {
17629 crate::model::data_scan::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
17630 _ => std::option::Option::None,
17631 })
17632 }
17633
17634 pub fn set_data_profile_spec<
17640 T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
17641 >(
17642 mut self,
17643 v: T,
17644 ) -> Self {
17645 self.spec =
17646 std::option::Option::Some(crate::model::data_scan::Spec::DataProfileSpec(v.into()));
17647 self
17648 }
17649
17650 pub fn data_discovery_spec(
17654 &self,
17655 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
17656 #[allow(unreachable_patterns)]
17657 self.spec.as_ref().and_then(|v| match v {
17658 crate::model::data_scan::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
17659 _ => std::option::Option::None,
17660 })
17661 }
17662
17663 pub fn set_data_discovery_spec<
17669 T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
17670 >(
17671 mut self,
17672 v: T,
17673 ) -> Self {
17674 self.spec =
17675 std::option::Option::Some(crate::model::data_scan::Spec::DataDiscoverySpec(v.into()));
17676 self
17677 }
17678
17679 pub fn data_documentation_spec(
17683 &self,
17684 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
17685 #[allow(unreachable_patterns)]
17686 self.spec.as_ref().and_then(|v| match v {
17687 crate::model::data_scan::Spec::DataDocumentationSpec(v) => std::option::Option::Some(v),
17688 _ => std::option::Option::None,
17689 })
17690 }
17691
17692 pub fn set_data_documentation_spec<
17698 T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
17699 >(
17700 mut self,
17701 v: T,
17702 ) -> Self {
17703 self.spec = std::option::Option::Some(
17704 crate::model::data_scan::Spec::DataDocumentationSpec(v.into()),
17705 );
17706 self
17707 }
17708
17709 pub fn set_result<
17714 T: std::convert::Into<std::option::Option<crate::model::data_scan::Result>>,
17715 >(
17716 mut self,
17717 v: T,
17718 ) -> Self {
17719 self.result = v.into();
17720 self
17721 }
17722
17723 pub fn data_quality_result(
17727 &self,
17728 ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
17729 #[allow(unreachable_patterns)]
17730 self.result.as_ref().and_then(|v| match v {
17731 crate::model::data_scan::Result::DataQualityResult(v) => std::option::Option::Some(v),
17732 _ => std::option::Option::None,
17733 })
17734 }
17735
17736 pub fn set_data_quality_result<
17742 T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
17743 >(
17744 mut self,
17745 v: T,
17746 ) -> Self {
17747 self.result =
17748 std::option::Option::Some(crate::model::data_scan::Result::DataQualityResult(v.into()));
17749 self
17750 }
17751
17752 pub fn data_profile_result(
17756 &self,
17757 ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
17758 #[allow(unreachable_patterns)]
17759 self.result.as_ref().and_then(|v| match v {
17760 crate::model::data_scan::Result::DataProfileResult(v) => std::option::Option::Some(v),
17761 _ => std::option::Option::None,
17762 })
17763 }
17764
17765 pub fn set_data_profile_result<
17771 T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
17772 >(
17773 mut self,
17774 v: T,
17775 ) -> Self {
17776 self.result =
17777 std::option::Option::Some(crate::model::data_scan::Result::DataProfileResult(v.into()));
17778 self
17779 }
17780
17781 pub fn data_discovery_result(
17785 &self,
17786 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
17787 #[allow(unreachable_patterns)]
17788 self.result.as_ref().and_then(|v| match v {
17789 crate::model::data_scan::Result::DataDiscoveryResult(v) => std::option::Option::Some(v),
17790 _ => std::option::Option::None,
17791 })
17792 }
17793
17794 pub fn set_data_discovery_result<
17800 T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
17801 >(
17802 mut self,
17803 v: T,
17804 ) -> Self {
17805 self.result = std::option::Option::Some(
17806 crate::model::data_scan::Result::DataDiscoveryResult(v.into()),
17807 );
17808 self
17809 }
17810
17811 pub fn data_documentation_result(
17815 &self,
17816 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
17817 #[allow(unreachable_patterns)]
17818 self.result.as_ref().and_then(|v| match v {
17819 crate::model::data_scan::Result::DataDocumentationResult(v) => {
17820 std::option::Option::Some(v)
17821 }
17822 _ => std::option::Option::None,
17823 })
17824 }
17825
17826 pub fn set_data_documentation_result<
17832 T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
17833 >(
17834 mut self,
17835 v: T,
17836 ) -> Self {
17837 self.result = std::option::Option::Some(
17838 crate::model::data_scan::Result::DataDocumentationResult(v.into()),
17839 );
17840 self
17841 }
17842}
17843
17844impl wkt::message::Message for DataScan {
17845 fn typename() -> &'static str {
17846 "type.googleapis.com/google.cloud.dataplex.v1.DataScan"
17847 }
17848}
17849
17850pub mod data_scan {
17852 #[allow(unused_imports)]
17853 use super::*;
17854
17855 #[derive(Clone, Default, PartialEq)]
17857 #[non_exhaustive]
17858 pub struct ExecutionSpec {
17859 pub trigger: std::option::Option<crate::model::Trigger>,
17864
17865 pub incremental: std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
17871
17872 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17873 }
17874
17875 impl ExecutionSpec {
17876 pub fn new() -> Self {
17877 std::default::Default::default()
17878 }
17879
17880 pub fn set_trigger<T>(mut self, v: T) -> Self
17882 where
17883 T: std::convert::Into<crate::model::Trigger>,
17884 {
17885 self.trigger = std::option::Option::Some(v.into());
17886 self
17887 }
17888
17889 pub fn set_or_clear_trigger<T>(mut self, v: std::option::Option<T>) -> Self
17891 where
17892 T: std::convert::Into<crate::model::Trigger>,
17893 {
17894 self.trigger = v.map(|x| x.into());
17895 self
17896 }
17897
17898 pub fn set_incremental<
17903 T: std::convert::Into<
17904 std::option::Option<crate::model::data_scan::execution_spec::Incremental>,
17905 >,
17906 >(
17907 mut self,
17908 v: T,
17909 ) -> Self {
17910 self.incremental = v.into();
17911 self
17912 }
17913
17914 pub fn field(&self) -> std::option::Option<&std::string::String> {
17918 #[allow(unreachable_patterns)]
17919 self.incremental.as_ref().and_then(|v| match v {
17920 crate::model::data_scan::execution_spec::Incremental::Field(v) => {
17921 std::option::Option::Some(v)
17922 }
17923 _ => std::option::Option::None,
17924 })
17925 }
17926
17927 pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17933 self.incremental = std::option::Option::Some(
17934 crate::model::data_scan::execution_spec::Incremental::Field(v.into()),
17935 );
17936 self
17937 }
17938 }
17939
17940 impl wkt::message::Message for ExecutionSpec {
17941 fn typename() -> &'static str {
17942 "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionSpec"
17943 }
17944 }
17945
17946 pub mod execution_spec {
17948 #[allow(unused_imports)]
17949 use super::*;
17950
17951 #[derive(Clone, Debug, PartialEq)]
17957 #[non_exhaustive]
17958 pub enum Incremental {
17959 Field(std::string::String),
17964 }
17965 }
17966
17967 #[derive(Clone, Default, PartialEq)]
17969 #[non_exhaustive]
17970 pub struct ExecutionStatus {
17971 pub latest_job_start_time: std::option::Option<wkt::Timestamp>,
17973
17974 pub latest_job_end_time: std::option::Option<wkt::Timestamp>,
17976
17977 pub latest_job_create_time: std::option::Option<wkt::Timestamp>,
17979
17980 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17981 }
17982
17983 impl ExecutionStatus {
17984 pub fn new() -> Self {
17985 std::default::Default::default()
17986 }
17987
17988 pub fn set_latest_job_start_time<T>(mut self, v: T) -> Self
17990 where
17991 T: std::convert::Into<wkt::Timestamp>,
17992 {
17993 self.latest_job_start_time = std::option::Option::Some(v.into());
17994 self
17995 }
17996
17997 pub fn set_or_clear_latest_job_start_time<T>(mut self, v: std::option::Option<T>) -> Self
17999 where
18000 T: std::convert::Into<wkt::Timestamp>,
18001 {
18002 self.latest_job_start_time = v.map(|x| x.into());
18003 self
18004 }
18005
18006 pub fn set_latest_job_end_time<T>(mut self, v: T) -> Self
18008 where
18009 T: std::convert::Into<wkt::Timestamp>,
18010 {
18011 self.latest_job_end_time = std::option::Option::Some(v.into());
18012 self
18013 }
18014
18015 pub fn set_or_clear_latest_job_end_time<T>(mut self, v: std::option::Option<T>) -> Self
18017 where
18018 T: std::convert::Into<wkt::Timestamp>,
18019 {
18020 self.latest_job_end_time = v.map(|x| x.into());
18021 self
18022 }
18023
18024 pub fn set_latest_job_create_time<T>(mut self, v: T) -> Self
18026 where
18027 T: std::convert::Into<wkt::Timestamp>,
18028 {
18029 self.latest_job_create_time = std::option::Option::Some(v.into());
18030 self
18031 }
18032
18033 pub fn set_or_clear_latest_job_create_time<T>(mut self, v: std::option::Option<T>) -> Self
18035 where
18036 T: std::convert::Into<wkt::Timestamp>,
18037 {
18038 self.latest_job_create_time = v.map(|x| x.into());
18039 self
18040 }
18041 }
18042
18043 impl wkt::message::Message for ExecutionStatus {
18044 fn typename() -> &'static str {
18045 "type.googleapis.com/google.cloud.dataplex.v1.DataScan.ExecutionStatus"
18046 }
18047 }
18048
18049 #[derive(Clone, Debug, PartialEq)]
18054 #[non_exhaustive]
18055 pub enum Spec {
18056 DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
18058 DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
18060 DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
18062 DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
18064 }
18065
18066 #[derive(Clone, Debug, PartialEq)]
18068 #[non_exhaustive]
18069 pub enum Result {
18070 DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
18072 DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
18074 DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
18076 DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
18078 }
18079}
18080
18081#[derive(Clone, Default, PartialEq)]
18083#[non_exhaustive]
18084pub struct DataScanJob {
18085 pub name: std::string::String,
18091
18092 pub uid: std::string::String,
18094
18095 pub create_time: std::option::Option<wkt::Timestamp>,
18097
18098 pub start_time: std::option::Option<wkt::Timestamp>,
18100
18101 pub end_time: std::option::Option<wkt::Timestamp>,
18103
18104 pub state: crate::model::data_scan_job::State,
18106
18107 pub message: std::string::String,
18109
18110 pub r#type: crate::model::DataScanType,
18112
18113 pub spec: std::option::Option<crate::model::data_scan_job::Spec>,
18115
18116 pub result: std::option::Option<crate::model::data_scan_job::Result>,
18118
18119 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18120}
18121
18122impl DataScanJob {
18123 pub fn new() -> Self {
18124 std::default::Default::default()
18125 }
18126
18127 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18129 self.name = v.into();
18130 self
18131 }
18132
18133 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18135 self.uid = v.into();
18136 self
18137 }
18138
18139 pub fn set_create_time<T>(mut self, v: T) -> Self
18141 where
18142 T: std::convert::Into<wkt::Timestamp>,
18143 {
18144 self.create_time = std::option::Option::Some(v.into());
18145 self
18146 }
18147
18148 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
18150 where
18151 T: std::convert::Into<wkt::Timestamp>,
18152 {
18153 self.create_time = v.map(|x| x.into());
18154 self
18155 }
18156
18157 pub fn set_start_time<T>(mut self, v: T) -> Self
18159 where
18160 T: std::convert::Into<wkt::Timestamp>,
18161 {
18162 self.start_time = std::option::Option::Some(v.into());
18163 self
18164 }
18165
18166 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
18168 where
18169 T: std::convert::Into<wkt::Timestamp>,
18170 {
18171 self.start_time = v.map(|x| x.into());
18172 self
18173 }
18174
18175 pub fn set_end_time<T>(mut self, v: T) -> Self
18177 where
18178 T: std::convert::Into<wkt::Timestamp>,
18179 {
18180 self.end_time = std::option::Option::Some(v.into());
18181 self
18182 }
18183
18184 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
18186 where
18187 T: std::convert::Into<wkt::Timestamp>,
18188 {
18189 self.end_time = v.map(|x| x.into());
18190 self
18191 }
18192
18193 pub fn set_state<T: std::convert::Into<crate::model::data_scan_job::State>>(
18195 mut self,
18196 v: T,
18197 ) -> Self {
18198 self.state = v.into();
18199 self
18200 }
18201
18202 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18204 self.message = v.into();
18205 self
18206 }
18207
18208 pub fn set_type<T: std::convert::Into<crate::model::DataScanType>>(mut self, v: T) -> Self {
18210 self.r#type = v.into();
18211 self
18212 }
18213
18214 pub fn set_spec<
18219 T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Spec>>,
18220 >(
18221 mut self,
18222 v: T,
18223 ) -> Self {
18224 self.spec = v.into();
18225 self
18226 }
18227
18228 pub fn data_quality_spec(
18232 &self,
18233 ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualitySpec>> {
18234 #[allow(unreachable_patterns)]
18235 self.spec.as_ref().and_then(|v| match v {
18236 crate::model::data_scan_job::Spec::DataQualitySpec(v) => std::option::Option::Some(v),
18237 _ => std::option::Option::None,
18238 })
18239 }
18240
18241 pub fn set_data_quality_spec<
18247 T: std::convert::Into<std::boxed::Box<crate::model::DataQualitySpec>>,
18248 >(
18249 mut self,
18250 v: T,
18251 ) -> Self {
18252 self.spec =
18253 std::option::Option::Some(crate::model::data_scan_job::Spec::DataQualitySpec(v.into()));
18254 self
18255 }
18256
18257 pub fn data_profile_spec(
18261 &self,
18262 ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileSpec>> {
18263 #[allow(unreachable_patterns)]
18264 self.spec.as_ref().and_then(|v| match v {
18265 crate::model::data_scan_job::Spec::DataProfileSpec(v) => std::option::Option::Some(v),
18266 _ => std::option::Option::None,
18267 })
18268 }
18269
18270 pub fn set_data_profile_spec<
18276 T: std::convert::Into<std::boxed::Box<crate::model::DataProfileSpec>>,
18277 >(
18278 mut self,
18279 v: T,
18280 ) -> Self {
18281 self.spec =
18282 std::option::Option::Some(crate::model::data_scan_job::Spec::DataProfileSpec(v.into()));
18283 self
18284 }
18285
18286 pub fn data_discovery_spec(
18290 &self,
18291 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoverySpec>> {
18292 #[allow(unreachable_patterns)]
18293 self.spec.as_ref().and_then(|v| match v {
18294 crate::model::data_scan_job::Spec::DataDiscoverySpec(v) => std::option::Option::Some(v),
18295 _ => std::option::Option::None,
18296 })
18297 }
18298
18299 pub fn set_data_discovery_spec<
18305 T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoverySpec>>,
18306 >(
18307 mut self,
18308 v: T,
18309 ) -> Self {
18310 self.spec = std::option::Option::Some(
18311 crate::model::data_scan_job::Spec::DataDiscoverySpec(v.into()),
18312 );
18313 self
18314 }
18315
18316 pub fn data_documentation_spec(
18320 &self,
18321 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationSpec>> {
18322 #[allow(unreachable_patterns)]
18323 self.spec.as_ref().and_then(|v| match v {
18324 crate::model::data_scan_job::Spec::DataDocumentationSpec(v) => {
18325 std::option::Option::Some(v)
18326 }
18327 _ => std::option::Option::None,
18328 })
18329 }
18330
18331 pub fn set_data_documentation_spec<
18337 T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationSpec>>,
18338 >(
18339 mut self,
18340 v: T,
18341 ) -> Self {
18342 self.spec = std::option::Option::Some(
18343 crate::model::data_scan_job::Spec::DataDocumentationSpec(v.into()),
18344 );
18345 self
18346 }
18347
18348 pub fn set_result<
18353 T: std::convert::Into<std::option::Option<crate::model::data_scan_job::Result>>,
18354 >(
18355 mut self,
18356 v: T,
18357 ) -> Self {
18358 self.result = v.into();
18359 self
18360 }
18361
18362 pub fn data_quality_result(
18366 &self,
18367 ) -> std::option::Option<&std::boxed::Box<crate::model::DataQualityResult>> {
18368 #[allow(unreachable_patterns)]
18369 self.result.as_ref().and_then(|v| match v {
18370 crate::model::data_scan_job::Result::DataQualityResult(v) => {
18371 std::option::Option::Some(v)
18372 }
18373 _ => std::option::Option::None,
18374 })
18375 }
18376
18377 pub fn set_data_quality_result<
18383 T: std::convert::Into<std::boxed::Box<crate::model::DataQualityResult>>,
18384 >(
18385 mut self,
18386 v: T,
18387 ) -> Self {
18388 self.result = std::option::Option::Some(
18389 crate::model::data_scan_job::Result::DataQualityResult(v.into()),
18390 );
18391 self
18392 }
18393
18394 pub fn data_profile_result(
18398 &self,
18399 ) -> std::option::Option<&std::boxed::Box<crate::model::DataProfileResult>> {
18400 #[allow(unreachable_patterns)]
18401 self.result.as_ref().and_then(|v| match v {
18402 crate::model::data_scan_job::Result::DataProfileResult(v) => {
18403 std::option::Option::Some(v)
18404 }
18405 _ => std::option::Option::None,
18406 })
18407 }
18408
18409 pub fn set_data_profile_result<
18415 T: std::convert::Into<std::boxed::Box<crate::model::DataProfileResult>>,
18416 >(
18417 mut self,
18418 v: T,
18419 ) -> Self {
18420 self.result = std::option::Option::Some(
18421 crate::model::data_scan_job::Result::DataProfileResult(v.into()),
18422 );
18423 self
18424 }
18425
18426 pub fn data_discovery_result(
18430 &self,
18431 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDiscoveryResult>> {
18432 #[allow(unreachable_patterns)]
18433 self.result.as_ref().and_then(|v| match v {
18434 crate::model::data_scan_job::Result::DataDiscoveryResult(v) => {
18435 std::option::Option::Some(v)
18436 }
18437 _ => std::option::Option::None,
18438 })
18439 }
18440
18441 pub fn set_data_discovery_result<
18447 T: std::convert::Into<std::boxed::Box<crate::model::DataDiscoveryResult>>,
18448 >(
18449 mut self,
18450 v: T,
18451 ) -> Self {
18452 self.result = std::option::Option::Some(
18453 crate::model::data_scan_job::Result::DataDiscoveryResult(v.into()),
18454 );
18455 self
18456 }
18457
18458 pub fn data_documentation_result(
18462 &self,
18463 ) -> std::option::Option<&std::boxed::Box<crate::model::DataDocumentationResult>> {
18464 #[allow(unreachable_patterns)]
18465 self.result.as_ref().and_then(|v| match v {
18466 crate::model::data_scan_job::Result::DataDocumentationResult(v) => {
18467 std::option::Option::Some(v)
18468 }
18469 _ => std::option::Option::None,
18470 })
18471 }
18472
18473 pub fn set_data_documentation_result<
18479 T: std::convert::Into<std::boxed::Box<crate::model::DataDocumentationResult>>,
18480 >(
18481 mut self,
18482 v: T,
18483 ) -> Self {
18484 self.result = std::option::Option::Some(
18485 crate::model::data_scan_job::Result::DataDocumentationResult(v.into()),
18486 );
18487 self
18488 }
18489}
18490
18491impl wkt::message::Message for DataScanJob {
18492 fn typename() -> &'static str {
18493 "type.googleapis.com/google.cloud.dataplex.v1.DataScanJob"
18494 }
18495}
18496
18497pub mod data_scan_job {
18499 #[allow(unused_imports)]
18500 use super::*;
18501
18502 #[derive(Clone, Debug, PartialEq)]
18518 #[non_exhaustive]
18519 pub enum State {
18520 Unspecified,
18522 Running,
18524 Canceling,
18526 Cancelled,
18528 Succeeded,
18530 Failed,
18532 Pending,
18534 UnknownValue(state::UnknownValue),
18539 }
18540
18541 #[doc(hidden)]
18542 pub mod state {
18543 #[allow(unused_imports)]
18544 use super::*;
18545 #[derive(Clone, Debug, PartialEq)]
18546 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18547 }
18548
18549 impl State {
18550 pub fn value(&self) -> std::option::Option<i32> {
18555 match self {
18556 Self::Unspecified => std::option::Option::Some(0),
18557 Self::Running => std::option::Option::Some(1),
18558 Self::Canceling => std::option::Option::Some(2),
18559 Self::Cancelled => std::option::Option::Some(3),
18560 Self::Succeeded => std::option::Option::Some(4),
18561 Self::Failed => std::option::Option::Some(5),
18562 Self::Pending => std::option::Option::Some(7),
18563 Self::UnknownValue(u) => u.0.value(),
18564 }
18565 }
18566
18567 pub fn name(&self) -> std::option::Option<&str> {
18572 match self {
18573 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18574 Self::Running => std::option::Option::Some("RUNNING"),
18575 Self::Canceling => std::option::Option::Some("CANCELING"),
18576 Self::Cancelled => std::option::Option::Some("CANCELLED"),
18577 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
18578 Self::Failed => std::option::Option::Some("FAILED"),
18579 Self::Pending => std::option::Option::Some("PENDING"),
18580 Self::UnknownValue(u) => u.0.name(),
18581 }
18582 }
18583 }
18584
18585 impl std::default::Default for State {
18586 fn default() -> Self {
18587 use std::convert::From;
18588 Self::from(0)
18589 }
18590 }
18591
18592 impl std::fmt::Display for State {
18593 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18594 wkt::internal::display_enum(f, self.name(), self.value())
18595 }
18596 }
18597
18598 impl std::convert::From<i32> for State {
18599 fn from(value: i32) -> Self {
18600 match value {
18601 0 => Self::Unspecified,
18602 1 => Self::Running,
18603 2 => Self::Canceling,
18604 3 => Self::Cancelled,
18605 4 => Self::Succeeded,
18606 5 => Self::Failed,
18607 7 => Self::Pending,
18608 _ => Self::UnknownValue(state::UnknownValue(
18609 wkt::internal::UnknownEnumValue::Integer(value),
18610 )),
18611 }
18612 }
18613 }
18614
18615 impl std::convert::From<&str> for State {
18616 fn from(value: &str) -> Self {
18617 use std::string::ToString;
18618 match value {
18619 "STATE_UNSPECIFIED" => Self::Unspecified,
18620 "RUNNING" => Self::Running,
18621 "CANCELING" => Self::Canceling,
18622 "CANCELLED" => Self::Cancelled,
18623 "SUCCEEDED" => Self::Succeeded,
18624 "FAILED" => Self::Failed,
18625 "PENDING" => Self::Pending,
18626 _ => Self::UnknownValue(state::UnknownValue(
18627 wkt::internal::UnknownEnumValue::String(value.to_string()),
18628 )),
18629 }
18630 }
18631 }
18632
18633 impl serde::ser::Serialize for State {
18634 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18635 where
18636 S: serde::Serializer,
18637 {
18638 match self {
18639 Self::Unspecified => serializer.serialize_i32(0),
18640 Self::Running => serializer.serialize_i32(1),
18641 Self::Canceling => serializer.serialize_i32(2),
18642 Self::Cancelled => serializer.serialize_i32(3),
18643 Self::Succeeded => serializer.serialize_i32(4),
18644 Self::Failed => serializer.serialize_i32(5),
18645 Self::Pending => serializer.serialize_i32(7),
18646 Self::UnknownValue(u) => u.0.serialize(serializer),
18647 }
18648 }
18649 }
18650
18651 impl<'de> serde::de::Deserialize<'de> for State {
18652 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18653 where
18654 D: serde::Deserializer<'de>,
18655 {
18656 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18657 ".google.cloud.dataplex.v1.DataScanJob.State",
18658 ))
18659 }
18660 }
18661
18662 #[derive(Clone, Debug, PartialEq)]
18664 #[non_exhaustive]
18665 pub enum Spec {
18666 DataQualitySpec(std::boxed::Box<crate::model::DataQualitySpec>),
18668 DataProfileSpec(std::boxed::Box<crate::model::DataProfileSpec>),
18670 DataDiscoverySpec(std::boxed::Box<crate::model::DataDiscoverySpec>),
18672 DataDocumentationSpec(std::boxed::Box<crate::model::DataDocumentationSpec>),
18674 }
18675
18676 #[derive(Clone, Debug, PartialEq)]
18678 #[non_exhaustive]
18679 pub enum Result {
18680 DataQualityResult(std::boxed::Box<crate::model::DataQualityResult>),
18682 DataProfileResult(std::boxed::Box<crate::model::DataProfileResult>),
18684 DataDiscoveryResult(std::boxed::Box<crate::model::DataDiscoveryResult>),
18686 DataDocumentationResult(std::boxed::Box<crate::model::DataDocumentationResult>),
18688 }
18689}
18690
18691#[derive(Clone, Default, PartialEq)]
18694#[non_exhaustive]
18695pub struct DataScanCatalogPublishingStatus {
18696 pub state: crate::model::data_scan_catalog_publishing_status::State,
18698
18699 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18700}
18701
18702impl DataScanCatalogPublishingStatus {
18703 pub fn new() -> Self {
18704 std::default::Default::default()
18705 }
18706
18707 pub fn set_state<
18709 T: std::convert::Into<crate::model::data_scan_catalog_publishing_status::State>,
18710 >(
18711 mut self,
18712 v: T,
18713 ) -> Self {
18714 self.state = v.into();
18715 self
18716 }
18717}
18718
18719impl wkt::message::Message for DataScanCatalogPublishingStatus {
18720 fn typename() -> &'static str {
18721 "type.googleapis.com/google.cloud.dataplex.v1.DataScanCatalogPublishingStatus"
18722 }
18723}
18724
18725pub mod data_scan_catalog_publishing_status {
18727 #[allow(unused_imports)]
18728 use super::*;
18729
18730 #[derive(Clone, Debug, PartialEq)]
18746 #[non_exhaustive]
18747 pub enum State {
18748 Unspecified,
18750 Succeeded,
18752 Failed,
18754 UnknownValue(state::UnknownValue),
18759 }
18760
18761 #[doc(hidden)]
18762 pub mod state {
18763 #[allow(unused_imports)]
18764 use super::*;
18765 #[derive(Clone, Debug, PartialEq)]
18766 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18767 }
18768
18769 impl State {
18770 pub fn value(&self) -> std::option::Option<i32> {
18775 match self {
18776 Self::Unspecified => std::option::Option::Some(0),
18777 Self::Succeeded => std::option::Option::Some(1),
18778 Self::Failed => std::option::Option::Some(2),
18779 Self::UnknownValue(u) => u.0.value(),
18780 }
18781 }
18782
18783 pub fn name(&self) -> std::option::Option<&str> {
18788 match self {
18789 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18790 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
18791 Self::Failed => std::option::Option::Some("FAILED"),
18792 Self::UnknownValue(u) => u.0.name(),
18793 }
18794 }
18795 }
18796
18797 impl std::default::Default for State {
18798 fn default() -> Self {
18799 use std::convert::From;
18800 Self::from(0)
18801 }
18802 }
18803
18804 impl std::fmt::Display for State {
18805 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18806 wkt::internal::display_enum(f, self.name(), self.value())
18807 }
18808 }
18809
18810 impl std::convert::From<i32> for State {
18811 fn from(value: i32) -> Self {
18812 match value {
18813 0 => Self::Unspecified,
18814 1 => Self::Succeeded,
18815 2 => Self::Failed,
18816 _ => Self::UnknownValue(state::UnknownValue(
18817 wkt::internal::UnknownEnumValue::Integer(value),
18818 )),
18819 }
18820 }
18821 }
18822
18823 impl std::convert::From<&str> for State {
18824 fn from(value: &str) -> Self {
18825 use std::string::ToString;
18826 match value {
18827 "STATE_UNSPECIFIED" => Self::Unspecified,
18828 "SUCCEEDED" => Self::Succeeded,
18829 "FAILED" => Self::Failed,
18830 _ => Self::UnknownValue(state::UnknownValue(
18831 wkt::internal::UnknownEnumValue::String(value.to_string()),
18832 )),
18833 }
18834 }
18835 }
18836
18837 impl serde::ser::Serialize for State {
18838 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18839 where
18840 S: serde::Serializer,
18841 {
18842 match self {
18843 Self::Unspecified => serializer.serialize_i32(0),
18844 Self::Succeeded => serializer.serialize_i32(1),
18845 Self::Failed => serializer.serialize_i32(2),
18846 Self::UnknownValue(u) => u.0.serialize(serializer),
18847 }
18848 }
18849 }
18850
18851 impl<'de> serde::de::Deserialize<'de> for State {
18852 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18853 where
18854 D: serde::Deserializer<'de>,
18855 {
18856 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18857 ".google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.State",
18858 ))
18859 }
18860 }
18861}
18862
18863#[derive(Clone, Default, PartialEq)]
18865#[non_exhaustive]
18866pub struct DiscoveryEvent {
18867 pub message: std::string::String,
18869
18870 pub lake_id: std::string::String,
18872
18873 pub zone_id: std::string::String,
18875
18876 pub asset_id: std::string::String,
18878
18879 pub data_location: std::string::String,
18881
18882 pub datascan_id: std::string::String,
18884
18885 pub r#type: crate::model::discovery_event::EventType,
18887
18888 pub details: std::option::Option<crate::model::discovery_event::Details>,
18890
18891 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18892}
18893
18894impl DiscoveryEvent {
18895 pub fn new() -> Self {
18896 std::default::Default::default()
18897 }
18898
18899 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18901 self.message = v.into();
18902 self
18903 }
18904
18905 pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18907 self.lake_id = v.into();
18908 self
18909 }
18910
18911 pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18913 self.zone_id = v.into();
18914 self
18915 }
18916
18917 pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18919 self.asset_id = v.into();
18920 self
18921 }
18922
18923 pub fn set_data_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18925 self.data_location = v.into();
18926 self
18927 }
18928
18929 pub fn set_datascan_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18931 self.datascan_id = v.into();
18932 self
18933 }
18934
18935 pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EventType>>(
18937 mut self,
18938 v: T,
18939 ) -> Self {
18940 self.r#type = v.into();
18941 self
18942 }
18943
18944 pub fn set_details<
18949 T: std::convert::Into<std::option::Option<crate::model::discovery_event::Details>>,
18950 >(
18951 mut self,
18952 v: T,
18953 ) -> Self {
18954 self.details = v.into();
18955 self
18956 }
18957
18958 pub fn config(
18962 &self,
18963 ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ConfigDetails>> {
18964 #[allow(unreachable_patterns)]
18965 self.details.as_ref().and_then(|v| match v {
18966 crate::model::discovery_event::Details::Config(v) => std::option::Option::Some(v),
18967 _ => std::option::Option::None,
18968 })
18969 }
18970
18971 pub fn set_config<
18977 T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ConfigDetails>>,
18978 >(
18979 mut self,
18980 v: T,
18981 ) -> Self {
18982 self.details =
18983 std::option::Option::Some(crate::model::discovery_event::Details::Config(v.into()));
18984 self
18985 }
18986
18987 pub fn entity(
18991 &self,
18992 ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::EntityDetails>> {
18993 #[allow(unreachable_patterns)]
18994 self.details.as_ref().and_then(|v| match v {
18995 crate::model::discovery_event::Details::Entity(v) => std::option::Option::Some(v),
18996 _ => std::option::Option::None,
18997 })
18998 }
18999
19000 pub fn set_entity<
19006 T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::EntityDetails>>,
19007 >(
19008 mut self,
19009 v: T,
19010 ) -> Self {
19011 self.details =
19012 std::option::Option::Some(crate::model::discovery_event::Details::Entity(v.into()));
19013 self
19014 }
19015
19016 pub fn partition(
19020 &self,
19021 ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::PartitionDetails>>
19022 {
19023 #[allow(unreachable_patterns)]
19024 self.details.as_ref().and_then(|v| match v {
19025 crate::model::discovery_event::Details::Partition(v) => std::option::Option::Some(v),
19026 _ => std::option::Option::None,
19027 })
19028 }
19029
19030 pub fn set_partition<
19036 T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::PartitionDetails>>,
19037 >(
19038 mut self,
19039 v: T,
19040 ) -> Self {
19041 self.details =
19042 std::option::Option::Some(crate::model::discovery_event::Details::Partition(v.into()));
19043 self
19044 }
19045
19046 pub fn action(
19050 &self,
19051 ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::ActionDetails>> {
19052 #[allow(unreachable_patterns)]
19053 self.details.as_ref().and_then(|v| match v {
19054 crate::model::discovery_event::Details::Action(v) => std::option::Option::Some(v),
19055 _ => std::option::Option::None,
19056 })
19057 }
19058
19059 pub fn set_action<
19065 T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::ActionDetails>>,
19066 >(
19067 mut self,
19068 v: T,
19069 ) -> Self {
19070 self.details =
19071 std::option::Option::Some(crate::model::discovery_event::Details::Action(v.into()));
19072 self
19073 }
19074
19075 pub fn table(
19079 &self,
19080 ) -> std::option::Option<&std::boxed::Box<crate::model::discovery_event::TableDetails>> {
19081 #[allow(unreachable_patterns)]
19082 self.details.as_ref().and_then(|v| match v {
19083 crate::model::discovery_event::Details::Table(v) => std::option::Option::Some(v),
19084 _ => std::option::Option::None,
19085 })
19086 }
19087
19088 pub fn set_table<
19094 T: std::convert::Into<std::boxed::Box<crate::model::discovery_event::TableDetails>>,
19095 >(
19096 mut self,
19097 v: T,
19098 ) -> Self {
19099 self.details =
19100 std::option::Option::Some(crate::model::discovery_event::Details::Table(v.into()));
19101 self
19102 }
19103}
19104
19105impl wkt::message::Message for DiscoveryEvent {
19106 fn typename() -> &'static str {
19107 "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent"
19108 }
19109}
19110
19111pub mod discovery_event {
19113 #[allow(unused_imports)]
19114 use super::*;
19115
19116 #[derive(Clone, Default, PartialEq)]
19118 #[non_exhaustive]
19119 pub struct ConfigDetails {
19120 pub parameters: std::collections::HashMap<std::string::String, std::string::String>,
19125
19126 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19127 }
19128
19129 impl ConfigDetails {
19130 pub fn new() -> Self {
19131 std::default::Default::default()
19132 }
19133
19134 pub fn set_parameters<T, K, V>(mut self, v: T) -> Self
19136 where
19137 T: std::iter::IntoIterator<Item = (K, V)>,
19138 K: std::convert::Into<std::string::String>,
19139 V: std::convert::Into<std::string::String>,
19140 {
19141 use std::iter::Iterator;
19142 self.parameters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19143 self
19144 }
19145 }
19146
19147 impl wkt::message::Message for ConfigDetails {
19148 fn typename() -> &'static str {
19149 "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"
19150 }
19151 }
19152
19153 #[derive(Clone, Default, PartialEq)]
19155 #[non_exhaustive]
19156 pub struct EntityDetails {
19157 pub entity: std::string::String,
19160
19161 pub r#type: crate::model::discovery_event::EntityType,
19163
19164 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19165 }
19166
19167 impl EntityDetails {
19168 pub fn new() -> Self {
19169 std::default::Default::default()
19170 }
19171
19172 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19174 self.entity = v.into();
19175 self
19176 }
19177
19178 pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
19180 mut self,
19181 v: T,
19182 ) -> Self {
19183 self.r#type = v.into();
19184 self
19185 }
19186 }
19187
19188 impl wkt::message::Message for EntityDetails {
19189 fn typename() -> &'static str {
19190 "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"
19191 }
19192 }
19193
19194 #[derive(Clone, Default, PartialEq)]
19196 #[non_exhaustive]
19197 pub struct TableDetails {
19198 pub table: std::string::String,
19200
19201 pub r#type: crate::model::discovery_event::TableType,
19203
19204 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19205 }
19206
19207 impl TableDetails {
19208 pub fn new() -> Self {
19209 std::default::Default::default()
19210 }
19211
19212 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19214 self.table = v.into();
19215 self
19216 }
19217
19218 pub fn set_type<T: std::convert::Into<crate::model::discovery_event::TableType>>(
19220 mut self,
19221 v: T,
19222 ) -> Self {
19223 self.r#type = v.into();
19224 self
19225 }
19226 }
19227
19228 impl wkt::message::Message for TableDetails {
19229 fn typename() -> &'static str {
19230 "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.TableDetails"
19231 }
19232 }
19233
19234 #[derive(Clone, Default, PartialEq)]
19236 #[non_exhaustive]
19237 pub struct PartitionDetails {
19238 pub partition: std::string::String,
19241
19242 pub entity: std::string::String,
19245
19246 pub r#type: crate::model::discovery_event::EntityType,
19248
19249 pub sampled_data_locations: std::vec::Vec<std::string::String>,
19252
19253 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19254 }
19255
19256 impl PartitionDetails {
19257 pub fn new() -> Self {
19258 std::default::Default::default()
19259 }
19260
19261 pub fn set_partition<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19263 self.partition = v.into();
19264 self
19265 }
19266
19267 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19269 self.entity = v.into();
19270 self
19271 }
19272
19273 pub fn set_type<T: std::convert::Into<crate::model::discovery_event::EntityType>>(
19275 mut self,
19276 v: T,
19277 ) -> Self {
19278 self.r#type = v.into();
19279 self
19280 }
19281
19282 pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
19284 where
19285 T: std::iter::IntoIterator<Item = V>,
19286 V: std::convert::Into<std::string::String>,
19287 {
19288 use std::iter::Iterator;
19289 self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
19290 self
19291 }
19292 }
19293
19294 impl wkt::message::Message for PartitionDetails {
19295 fn typename() -> &'static str {
19296 "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"
19297 }
19298 }
19299
19300 #[derive(Clone, Default, PartialEq)]
19302 #[non_exhaustive]
19303 pub struct ActionDetails {
19304 pub r#type: std::string::String,
19307
19308 pub issue: std::string::String,
19310
19311 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19312 }
19313
19314 impl ActionDetails {
19315 pub fn new() -> Self {
19316 std::default::Default::default()
19317 }
19318
19319 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19321 self.r#type = v.into();
19322 self
19323 }
19324
19325 pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19327 self.issue = v.into();
19328 self
19329 }
19330 }
19331
19332 impl wkt::message::Message for ActionDetails {
19333 fn typename() -> &'static str {
19334 "type.googleapis.com/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"
19335 }
19336 }
19337
19338 #[derive(Clone, Debug, PartialEq)]
19354 #[non_exhaustive]
19355 pub enum EventType {
19356 Unspecified,
19358 Config,
19360 EntityCreated,
19362 EntityUpdated,
19364 EntityDeleted,
19366 PartitionCreated,
19368 PartitionUpdated,
19370 PartitionDeleted,
19372 TablePublished,
19374 TableUpdated,
19376 TableIgnored,
19378 TableDeleted,
19380 UnknownValue(event_type::UnknownValue),
19385 }
19386
19387 #[doc(hidden)]
19388 pub mod event_type {
19389 #[allow(unused_imports)]
19390 use super::*;
19391 #[derive(Clone, Debug, PartialEq)]
19392 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19393 }
19394
19395 impl EventType {
19396 pub fn value(&self) -> std::option::Option<i32> {
19401 match self {
19402 Self::Unspecified => std::option::Option::Some(0),
19403 Self::Config => std::option::Option::Some(1),
19404 Self::EntityCreated => std::option::Option::Some(2),
19405 Self::EntityUpdated => std::option::Option::Some(3),
19406 Self::EntityDeleted => std::option::Option::Some(4),
19407 Self::PartitionCreated => std::option::Option::Some(5),
19408 Self::PartitionUpdated => std::option::Option::Some(6),
19409 Self::PartitionDeleted => std::option::Option::Some(7),
19410 Self::TablePublished => std::option::Option::Some(10),
19411 Self::TableUpdated => std::option::Option::Some(11),
19412 Self::TableIgnored => std::option::Option::Some(12),
19413 Self::TableDeleted => std::option::Option::Some(13),
19414 Self::UnknownValue(u) => u.0.value(),
19415 }
19416 }
19417
19418 pub fn name(&self) -> std::option::Option<&str> {
19423 match self {
19424 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
19425 Self::Config => std::option::Option::Some("CONFIG"),
19426 Self::EntityCreated => std::option::Option::Some("ENTITY_CREATED"),
19427 Self::EntityUpdated => std::option::Option::Some("ENTITY_UPDATED"),
19428 Self::EntityDeleted => std::option::Option::Some("ENTITY_DELETED"),
19429 Self::PartitionCreated => std::option::Option::Some("PARTITION_CREATED"),
19430 Self::PartitionUpdated => std::option::Option::Some("PARTITION_UPDATED"),
19431 Self::PartitionDeleted => std::option::Option::Some("PARTITION_DELETED"),
19432 Self::TablePublished => std::option::Option::Some("TABLE_PUBLISHED"),
19433 Self::TableUpdated => std::option::Option::Some("TABLE_UPDATED"),
19434 Self::TableIgnored => std::option::Option::Some("TABLE_IGNORED"),
19435 Self::TableDeleted => std::option::Option::Some("TABLE_DELETED"),
19436 Self::UnknownValue(u) => u.0.name(),
19437 }
19438 }
19439 }
19440
19441 impl std::default::Default for EventType {
19442 fn default() -> Self {
19443 use std::convert::From;
19444 Self::from(0)
19445 }
19446 }
19447
19448 impl std::fmt::Display for EventType {
19449 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19450 wkt::internal::display_enum(f, self.name(), self.value())
19451 }
19452 }
19453
19454 impl std::convert::From<i32> for EventType {
19455 fn from(value: i32) -> Self {
19456 match value {
19457 0 => Self::Unspecified,
19458 1 => Self::Config,
19459 2 => Self::EntityCreated,
19460 3 => Self::EntityUpdated,
19461 4 => Self::EntityDeleted,
19462 5 => Self::PartitionCreated,
19463 6 => Self::PartitionUpdated,
19464 7 => Self::PartitionDeleted,
19465 10 => Self::TablePublished,
19466 11 => Self::TableUpdated,
19467 12 => Self::TableIgnored,
19468 13 => Self::TableDeleted,
19469 _ => Self::UnknownValue(event_type::UnknownValue(
19470 wkt::internal::UnknownEnumValue::Integer(value),
19471 )),
19472 }
19473 }
19474 }
19475
19476 impl std::convert::From<&str> for EventType {
19477 fn from(value: &str) -> Self {
19478 use std::string::ToString;
19479 match value {
19480 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
19481 "CONFIG" => Self::Config,
19482 "ENTITY_CREATED" => Self::EntityCreated,
19483 "ENTITY_UPDATED" => Self::EntityUpdated,
19484 "ENTITY_DELETED" => Self::EntityDeleted,
19485 "PARTITION_CREATED" => Self::PartitionCreated,
19486 "PARTITION_UPDATED" => Self::PartitionUpdated,
19487 "PARTITION_DELETED" => Self::PartitionDeleted,
19488 "TABLE_PUBLISHED" => Self::TablePublished,
19489 "TABLE_UPDATED" => Self::TableUpdated,
19490 "TABLE_IGNORED" => Self::TableIgnored,
19491 "TABLE_DELETED" => Self::TableDeleted,
19492 _ => Self::UnknownValue(event_type::UnknownValue(
19493 wkt::internal::UnknownEnumValue::String(value.to_string()),
19494 )),
19495 }
19496 }
19497 }
19498
19499 impl serde::ser::Serialize for EventType {
19500 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19501 where
19502 S: serde::Serializer,
19503 {
19504 match self {
19505 Self::Unspecified => serializer.serialize_i32(0),
19506 Self::Config => serializer.serialize_i32(1),
19507 Self::EntityCreated => serializer.serialize_i32(2),
19508 Self::EntityUpdated => serializer.serialize_i32(3),
19509 Self::EntityDeleted => serializer.serialize_i32(4),
19510 Self::PartitionCreated => serializer.serialize_i32(5),
19511 Self::PartitionUpdated => serializer.serialize_i32(6),
19512 Self::PartitionDeleted => serializer.serialize_i32(7),
19513 Self::TablePublished => serializer.serialize_i32(10),
19514 Self::TableUpdated => serializer.serialize_i32(11),
19515 Self::TableIgnored => serializer.serialize_i32(12),
19516 Self::TableDeleted => serializer.serialize_i32(13),
19517 Self::UnknownValue(u) => u.0.serialize(serializer),
19518 }
19519 }
19520 }
19521
19522 impl<'de> serde::de::Deserialize<'de> for EventType {
19523 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19524 where
19525 D: serde::Deserializer<'de>,
19526 {
19527 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
19528 ".google.cloud.dataplex.v1.DiscoveryEvent.EventType",
19529 ))
19530 }
19531 }
19532
19533 #[derive(Clone, Debug, PartialEq)]
19549 #[non_exhaustive]
19550 pub enum EntityType {
19551 Unspecified,
19553 Table,
19555 Fileset,
19557 UnknownValue(entity_type::UnknownValue),
19562 }
19563
19564 #[doc(hidden)]
19565 pub mod entity_type {
19566 #[allow(unused_imports)]
19567 use super::*;
19568 #[derive(Clone, Debug, PartialEq)]
19569 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19570 }
19571
19572 impl EntityType {
19573 pub fn value(&self) -> std::option::Option<i32> {
19578 match self {
19579 Self::Unspecified => std::option::Option::Some(0),
19580 Self::Table => std::option::Option::Some(1),
19581 Self::Fileset => std::option::Option::Some(2),
19582 Self::UnknownValue(u) => u.0.value(),
19583 }
19584 }
19585
19586 pub fn name(&self) -> std::option::Option<&str> {
19591 match self {
19592 Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
19593 Self::Table => std::option::Option::Some("TABLE"),
19594 Self::Fileset => std::option::Option::Some("FILESET"),
19595 Self::UnknownValue(u) => u.0.name(),
19596 }
19597 }
19598 }
19599
19600 impl std::default::Default for EntityType {
19601 fn default() -> Self {
19602 use std::convert::From;
19603 Self::from(0)
19604 }
19605 }
19606
19607 impl std::fmt::Display for EntityType {
19608 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19609 wkt::internal::display_enum(f, self.name(), self.value())
19610 }
19611 }
19612
19613 impl std::convert::From<i32> for EntityType {
19614 fn from(value: i32) -> Self {
19615 match value {
19616 0 => Self::Unspecified,
19617 1 => Self::Table,
19618 2 => Self::Fileset,
19619 _ => Self::UnknownValue(entity_type::UnknownValue(
19620 wkt::internal::UnknownEnumValue::Integer(value),
19621 )),
19622 }
19623 }
19624 }
19625
19626 impl std::convert::From<&str> for EntityType {
19627 fn from(value: &str) -> Self {
19628 use std::string::ToString;
19629 match value {
19630 "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
19631 "TABLE" => Self::Table,
19632 "FILESET" => Self::Fileset,
19633 _ => Self::UnknownValue(entity_type::UnknownValue(
19634 wkt::internal::UnknownEnumValue::String(value.to_string()),
19635 )),
19636 }
19637 }
19638 }
19639
19640 impl serde::ser::Serialize for EntityType {
19641 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19642 where
19643 S: serde::Serializer,
19644 {
19645 match self {
19646 Self::Unspecified => serializer.serialize_i32(0),
19647 Self::Table => serializer.serialize_i32(1),
19648 Self::Fileset => serializer.serialize_i32(2),
19649 Self::UnknownValue(u) => u.0.serialize(serializer),
19650 }
19651 }
19652 }
19653
19654 impl<'de> serde::de::Deserialize<'de> for EntityType {
19655 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19656 where
19657 D: serde::Deserializer<'de>,
19658 {
19659 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
19660 ".google.cloud.dataplex.v1.DiscoveryEvent.EntityType",
19661 ))
19662 }
19663 }
19664
19665 #[derive(Clone, Debug, PartialEq)]
19681 #[non_exhaustive]
19682 pub enum TableType {
19683 Unspecified,
19685 ExternalTable,
19687 BiglakeTable,
19689 ObjectTable,
19691 UnknownValue(table_type::UnknownValue),
19696 }
19697
19698 #[doc(hidden)]
19699 pub mod table_type {
19700 #[allow(unused_imports)]
19701 use super::*;
19702 #[derive(Clone, Debug, PartialEq)]
19703 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19704 }
19705
19706 impl TableType {
19707 pub fn value(&self) -> std::option::Option<i32> {
19712 match self {
19713 Self::Unspecified => std::option::Option::Some(0),
19714 Self::ExternalTable => std::option::Option::Some(1),
19715 Self::BiglakeTable => std::option::Option::Some(2),
19716 Self::ObjectTable => std::option::Option::Some(3),
19717 Self::UnknownValue(u) => u.0.value(),
19718 }
19719 }
19720
19721 pub fn name(&self) -> std::option::Option<&str> {
19726 match self {
19727 Self::Unspecified => std::option::Option::Some("TABLE_TYPE_UNSPECIFIED"),
19728 Self::ExternalTable => std::option::Option::Some("EXTERNAL_TABLE"),
19729 Self::BiglakeTable => std::option::Option::Some("BIGLAKE_TABLE"),
19730 Self::ObjectTable => std::option::Option::Some("OBJECT_TABLE"),
19731 Self::UnknownValue(u) => u.0.name(),
19732 }
19733 }
19734 }
19735
19736 impl std::default::Default for TableType {
19737 fn default() -> Self {
19738 use std::convert::From;
19739 Self::from(0)
19740 }
19741 }
19742
19743 impl std::fmt::Display for TableType {
19744 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19745 wkt::internal::display_enum(f, self.name(), self.value())
19746 }
19747 }
19748
19749 impl std::convert::From<i32> for TableType {
19750 fn from(value: i32) -> Self {
19751 match value {
19752 0 => Self::Unspecified,
19753 1 => Self::ExternalTable,
19754 2 => Self::BiglakeTable,
19755 3 => Self::ObjectTable,
19756 _ => Self::UnknownValue(table_type::UnknownValue(
19757 wkt::internal::UnknownEnumValue::Integer(value),
19758 )),
19759 }
19760 }
19761 }
19762
19763 impl std::convert::From<&str> for TableType {
19764 fn from(value: &str) -> Self {
19765 use std::string::ToString;
19766 match value {
19767 "TABLE_TYPE_UNSPECIFIED" => Self::Unspecified,
19768 "EXTERNAL_TABLE" => Self::ExternalTable,
19769 "BIGLAKE_TABLE" => Self::BiglakeTable,
19770 "OBJECT_TABLE" => Self::ObjectTable,
19771 _ => Self::UnknownValue(table_type::UnknownValue(
19772 wkt::internal::UnknownEnumValue::String(value.to_string()),
19773 )),
19774 }
19775 }
19776 }
19777
19778 impl serde::ser::Serialize for TableType {
19779 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19780 where
19781 S: serde::Serializer,
19782 {
19783 match self {
19784 Self::Unspecified => serializer.serialize_i32(0),
19785 Self::ExternalTable => serializer.serialize_i32(1),
19786 Self::BiglakeTable => serializer.serialize_i32(2),
19787 Self::ObjectTable => serializer.serialize_i32(3),
19788 Self::UnknownValue(u) => u.0.serialize(serializer),
19789 }
19790 }
19791 }
19792
19793 impl<'de> serde::de::Deserialize<'de> for TableType {
19794 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19795 where
19796 D: serde::Deserializer<'de>,
19797 {
19798 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableType>::new(
19799 ".google.cloud.dataplex.v1.DiscoveryEvent.TableType",
19800 ))
19801 }
19802 }
19803
19804 #[derive(Clone, Debug, PartialEq)]
19806 #[non_exhaustive]
19807 pub enum Details {
19808 Config(std::boxed::Box<crate::model::discovery_event::ConfigDetails>),
19810 Entity(std::boxed::Box<crate::model::discovery_event::EntityDetails>),
19812 Partition(std::boxed::Box<crate::model::discovery_event::PartitionDetails>),
19814 Action(std::boxed::Box<crate::model::discovery_event::ActionDetails>),
19816 Table(std::boxed::Box<crate::model::discovery_event::TableDetails>),
19818 }
19819}
19820
19821#[derive(Clone, Default, PartialEq)]
19824#[non_exhaustive]
19825pub struct JobEvent {
19826 pub message: std::string::String,
19828
19829 pub job_id: std::string::String,
19831
19832 pub start_time: std::option::Option<wkt::Timestamp>,
19834
19835 pub end_time: std::option::Option<wkt::Timestamp>,
19837
19838 pub state: crate::model::job_event::State,
19840
19841 pub retries: i32,
19843
19844 pub r#type: crate::model::job_event::Type,
19846
19847 pub service: crate::model::job_event::Service,
19849
19850 pub service_job: std::string::String,
19852
19853 pub execution_trigger: crate::model::job_event::ExecutionTrigger,
19855
19856 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19857}
19858
19859impl JobEvent {
19860 pub fn new() -> Self {
19861 std::default::Default::default()
19862 }
19863
19864 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19866 self.message = v.into();
19867 self
19868 }
19869
19870 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19872 self.job_id = v.into();
19873 self
19874 }
19875
19876 pub fn set_start_time<T>(mut self, v: T) -> Self
19878 where
19879 T: std::convert::Into<wkt::Timestamp>,
19880 {
19881 self.start_time = std::option::Option::Some(v.into());
19882 self
19883 }
19884
19885 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
19887 where
19888 T: std::convert::Into<wkt::Timestamp>,
19889 {
19890 self.start_time = v.map(|x| x.into());
19891 self
19892 }
19893
19894 pub fn set_end_time<T>(mut self, v: T) -> Self
19896 where
19897 T: std::convert::Into<wkt::Timestamp>,
19898 {
19899 self.end_time = std::option::Option::Some(v.into());
19900 self
19901 }
19902
19903 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
19905 where
19906 T: std::convert::Into<wkt::Timestamp>,
19907 {
19908 self.end_time = v.map(|x| x.into());
19909 self
19910 }
19911
19912 pub fn set_state<T: std::convert::Into<crate::model::job_event::State>>(
19914 mut self,
19915 v: T,
19916 ) -> Self {
19917 self.state = v.into();
19918 self
19919 }
19920
19921 pub fn set_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19923 self.retries = v.into();
19924 self
19925 }
19926
19927 pub fn set_type<T: std::convert::Into<crate::model::job_event::Type>>(mut self, v: T) -> Self {
19929 self.r#type = v.into();
19930 self
19931 }
19932
19933 pub fn set_service<T: std::convert::Into<crate::model::job_event::Service>>(
19935 mut self,
19936 v: T,
19937 ) -> Self {
19938 self.service = v.into();
19939 self
19940 }
19941
19942 pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
19944 self.service_job = v.into();
19945 self
19946 }
19947
19948 pub fn set_execution_trigger<
19950 T: std::convert::Into<crate::model::job_event::ExecutionTrigger>,
19951 >(
19952 mut self,
19953 v: T,
19954 ) -> Self {
19955 self.execution_trigger = v.into();
19956 self
19957 }
19958}
19959
19960impl wkt::message::Message for JobEvent {
19961 fn typename() -> &'static str {
19962 "type.googleapis.com/google.cloud.dataplex.v1.JobEvent"
19963 }
19964}
19965
19966pub mod job_event {
19968 #[allow(unused_imports)]
19969 use super::*;
19970
19971 #[derive(Clone, Debug, PartialEq)]
19987 #[non_exhaustive]
19988 pub enum Type {
19989 Unspecified,
19991 Spark,
19993 Notebook,
19995 UnknownValue(r#type::UnknownValue),
20000 }
20001
20002 #[doc(hidden)]
20003 pub mod r#type {
20004 #[allow(unused_imports)]
20005 use super::*;
20006 #[derive(Clone, Debug, PartialEq)]
20007 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20008 }
20009
20010 impl Type {
20011 pub fn value(&self) -> std::option::Option<i32> {
20016 match self {
20017 Self::Unspecified => std::option::Option::Some(0),
20018 Self::Spark => std::option::Option::Some(1),
20019 Self::Notebook => std::option::Option::Some(2),
20020 Self::UnknownValue(u) => u.0.value(),
20021 }
20022 }
20023
20024 pub fn name(&self) -> std::option::Option<&str> {
20029 match self {
20030 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
20031 Self::Spark => std::option::Option::Some("SPARK"),
20032 Self::Notebook => std::option::Option::Some("NOTEBOOK"),
20033 Self::UnknownValue(u) => u.0.name(),
20034 }
20035 }
20036 }
20037
20038 impl std::default::Default for Type {
20039 fn default() -> Self {
20040 use std::convert::From;
20041 Self::from(0)
20042 }
20043 }
20044
20045 impl std::fmt::Display for Type {
20046 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20047 wkt::internal::display_enum(f, self.name(), self.value())
20048 }
20049 }
20050
20051 impl std::convert::From<i32> for Type {
20052 fn from(value: i32) -> Self {
20053 match value {
20054 0 => Self::Unspecified,
20055 1 => Self::Spark,
20056 2 => Self::Notebook,
20057 _ => Self::UnknownValue(r#type::UnknownValue(
20058 wkt::internal::UnknownEnumValue::Integer(value),
20059 )),
20060 }
20061 }
20062 }
20063
20064 impl std::convert::From<&str> for Type {
20065 fn from(value: &str) -> Self {
20066 use std::string::ToString;
20067 match value {
20068 "TYPE_UNSPECIFIED" => Self::Unspecified,
20069 "SPARK" => Self::Spark,
20070 "NOTEBOOK" => Self::Notebook,
20071 _ => Self::UnknownValue(r#type::UnknownValue(
20072 wkt::internal::UnknownEnumValue::String(value.to_string()),
20073 )),
20074 }
20075 }
20076 }
20077
20078 impl serde::ser::Serialize for Type {
20079 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20080 where
20081 S: serde::Serializer,
20082 {
20083 match self {
20084 Self::Unspecified => serializer.serialize_i32(0),
20085 Self::Spark => serializer.serialize_i32(1),
20086 Self::Notebook => serializer.serialize_i32(2),
20087 Self::UnknownValue(u) => u.0.serialize(serializer),
20088 }
20089 }
20090 }
20091
20092 impl<'de> serde::de::Deserialize<'de> for Type {
20093 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20094 where
20095 D: serde::Deserializer<'de>,
20096 {
20097 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
20098 ".google.cloud.dataplex.v1.JobEvent.Type",
20099 ))
20100 }
20101 }
20102
20103 #[derive(Clone, Debug, PartialEq)]
20119 #[non_exhaustive]
20120 pub enum State {
20121 Unspecified,
20123 Succeeded,
20125 Failed,
20127 Cancelled,
20129 Aborted,
20131 UnknownValue(state::UnknownValue),
20136 }
20137
20138 #[doc(hidden)]
20139 pub mod state {
20140 #[allow(unused_imports)]
20141 use super::*;
20142 #[derive(Clone, Debug, PartialEq)]
20143 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20144 }
20145
20146 impl State {
20147 pub fn value(&self) -> std::option::Option<i32> {
20152 match self {
20153 Self::Unspecified => std::option::Option::Some(0),
20154 Self::Succeeded => std::option::Option::Some(1),
20155 Self::Failed => std::option::Option::Some(2),
20156 Self::Cancelled => std::option::Option::Some(3),
20157 Self::Aborted => std::option::Option::Some(4),
20158 Self::UnknownValue(u) => u.0.value(),
20159 }
20160 }
20161
20162 pub fn name(&self) -> std::option::Option<&str> {
20167 match self {
20168 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
20169 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
20170 Self::Failed => std::option::Option::Some("FAILED"),
20171 Self::Cancelled => std::option::Option::Some("CANCELLED"),
20172 Self::Aborted => std::option::Option::Some("ABORTED"),
20173 Self::UnknownValue(u) => u.0.name(),
20174 }
20175 }
20176 }
20177
20178 impl std::default::Default for State {
20179 fn default() -> Self {
20180 use std::convert::From;
20181 Self::from(0)
20182 }
20183 }
20184
20185 impl std::fmt::Display for State {
20186 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20187 wkt::internal::display_enum(f, self.name(), self.value())
20188 }
20189 }
20190
20191 impl std::convert::From<i32> for State {
20192 fn from(value: i32) -> Self {
20193 match value {
20194 0 => Self::Unspecified,
20195 1 => Self::Succeeded,
20196 2 => Self::Failed,
20197 3 => Self::Cancelled,
20198 4 => Self::Aborted,
20199 _ => Self::UnknownValue(state::UnknownValue(
20200 wkt::internal::UnknownEnumValue::Integer(value),
20201 )),
20202 }
20203 }
20204 }
20205
20206 impl std::convert::From<&str> for State {
20207 fn from(value: &str) -> Self {
20208 use std::string::ToString;
20209 match value {
20210 "STATE_UNSPECIFIED" => Self::Unspecified,
20211 "SUCCEEDED" => Self::Succeeded,
20212 "FAILED" => Self::Failed,
20213 "CANCELLED" => Self::Cancelled,
20214 "ABORTED" => Self::Aborted,
20215 _ => Self::UnknownValue(state::UnknownValue(
20216 wkt::internal::UnknownEnumValue::String(value.to_string()),
20217 )),
20218 }
20219 }
20220 }
20221
20222 impl serde::ser::Serialize for State {
20223 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20224 where
20225 S: serde::Serializer,
20226 {
20227 match self {
20228 Self::Unspecified => serializer.serialize_i32(0),
20229 Self::Succeeded => serializer.serialize_i32(1),
20230 Self::Failed => serializer.serialize_i32(2),
20231 Self::Cancelled => serializer.serialize_i32(3),
20232 Self::Aborted => serializer.serialize_i32(4),
20233 Self::UnknownValue(u) => u.0.serialize(serializer),
20234 }
20235 }
20236 }
20237
20238 impl<'de> serde::de::Deserialize<'de> for State {
20239 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20240 where
20241 D: serde::Deserializer<'de>,
20242 {
20243 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
20244 ".google.cloud.dataplex.v1.JobEvent.State",
20245 ))
20246 }
20247 }
20248
20249 #[derive(Clone, Debug, PartialEq)]
20265 #[non_exhaustive]
20266 pub enum Service {
20267 Unspecified,
20269 Dataproc,
20271 UnknownValue(service::UnknownValue),
20276 }
20277
20278 #[doc(hidden)]
20279 pub mod service {
20280 #[allow(unused_imports)]
20281 use super::*;
20282 #[derive(Clone, Debug, PartialEq)]
20283 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20284 }
20285
20286 impl Service {
20287 pub fn value(&self) -> std::option::Option<i32> {
20292 match self {
20293 Self::Unspecified => std::option::Option::Some(0),
20294 Self::Dataproc => std::option::Option::Some(1),
20295 Self::UnknownValue(u) => u.0.value(),
20296 }
20297 }
20298
20299 pub fn name(&self) -> std::option::Option<&str> {
20304 match self {
20305 Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
20306 Self::Dataproc => std::option::Option::Some("DATAPROC"),
20307 Self::UnknownValue(u) => u.0.name(),
20308 }
20309 }
20310 }
20311
20312 impl std::default::Default for Service {
20313 fn default() -> Self {
20314 use std::convert::From;
20315 Self::from(0)
20316 }
20317 }
20318
20319 impl std::fmt::Display for Service {
20320 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20321 wkt::internal::display_enum(f, self.name(), self.value())
20322 }
20323 }
20324
20325 impl std::convert::From<i32> for Service {
20326 fn from(value: i32) -> Self {
20327 match value {
20328 0 => Self::Unspecified,
20329 1 => Self::Dataproc,
20330 _ => Self::UnknownValue(service::UnknownValue(
20331 wkt::internal::UnknownEnumValue::Integer(value),
20332 )),
20333 }
20334 }
20335 }
20336
20337 impl std::convert::From<&str> for Service {
20338 fn from(value: &str) -> Self {
20339 use std::string::ToString;
20340 match value {
20341 "SERVICE_UNSPECIFIED" => Self::Unspecified,
20342 "DATAPROC" => Self::Dataproc,
20343 _ => Self::UnknownValue(service::UnknownValue(
20344 wkt::internal::UnknownEnumValue::String(value.to_string()),
20345 )),
20346 }
20347 }
20348 }
20349
20350 impl serde::ser::Serialize for Service {
20351 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20352 where
20353 S: serde::Serializer,
20354 {
20355 match self {
20356 Self::Unspecified => serializer.serialize_i32(0),
20357 Self::Dataproc => serializer.serialize_i32(1),
20358 Self::UnknownValue(u) => u.0.serialize(serializer),
20359 }
20360 }
20361 }
20362
20363 impl<'de> serde::de::Deserialize<'de> for Service {
20364 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20365 where
20366 D: serde::Deserializer<'de>,
20367 {
20368 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
20369 ".google.cloud.dataplex.v1.JobEvent.Service",
20370 ))
20371 }
20372 }
20373
20374 #[derive(Clone, Debug, PartialEq)]
20390 #[non_exhaustive]
20391 pub enum ExecutionTrigger {
20392 Unspecified,
20394 TaskConfig,
20397 RunRequest,
20399 UnknownValue(execution_trigger::UnknownValue),
20404 }
20405
20406 #[doc(hidden)]
20407 pub mod execution_trigger {
20408 #[allow(unused_imports)]
20409 use super::*;
20410 #[derive(Clone, Debug, PartialEq)]
20411 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20412 }
20413
20414 impl ExecutionTrigger {
20415 pub fn value(&self) -> std::option::Option<i32> {
20420 match self {
20421 Self::Unspecified => std::option::Option::Some(0),
20422 Self::TaskConfig => std::option::Option::Some(1),
20423 Self::RunRequest => std::option::Option::Some(2),
20424 Self::UnknownValue(u) => u.0.value(),
20425 }
20426 }
20427
20428 pub fn name(&self) -> std::option::Option<&str> {
20433 match self {
20434 Self::Unspecified => std::option::Option::Some("EXECUTION_TRIGGER_UNSPECIFIED"),
20435 Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
20436 Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
20437 Self::UnknownValue(u) => u.0.name(),
20438 }
20439 }
20440 }
20441
20442 impl std::default::Default for ExecutionTrigger {
20443 fn default() -> Self {
20444 use std::convert::From;
20445 Self::from(0)
20446 }
20447 }
20448
20449 impl std::fmt::Display for ExecutionTrigger {
20450 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20451 wkt::internal::display_enum(f, self.name(), self.value())
20452 }
20453 }
20454
20455 impl std::convert::From<i32> for ExecutionTrigger {
20456 fn from(value: i32) -> Self {
20457 match value {
20458 0 => Self::Unspecified,
20459 1 => Self::TaskConfig,
20460 2 => Self::RunRequest,
20461 _ => Self::UnknownValue(execution_trigger::UnknownValue(
20462 wkt::internal::UnknownEnumValue::Integer(value),
20463 )),
20464 }
20465 }
20466 }
20467
20468 impl std::convert::From<&str> for ExecutionTrigger {
20469 fn from(value: &str) -> Self {
20470 use std::string::ToString;
20471 match value {
20472 "EXECUTION_TRIGGER_UNSPECIFIED" => Self::Unspecified,
20473 "TASK_CONFIG" => Self::TaskConfig,
20474 "RUN_REQUEST" => Self::RunRequest,
20475 _ => Self::UnknownValue(execution_trigger::UnknownValue(
20476 wkt::internal::UnknownEnumValue::String(value.to_string()),
20477 )),
20478 }
20479 }
20480 }
20481
20482 impl serde::ser::Serialize for ExecutionTrigger {
20483 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20484 where
20485 S: serde::Serializer,
20486 {
20487 match self {
20488 Self::Unspecified => serializer.serialize_i32(0),
20489 Self::TaskConfig => serializer.serialize_i32(1),
20490 Self::RunRequest => serializer.serialize_i32(2),
20491 Self::UnknownValue(u) => u.0.serialize(serializer),
20492 }
20493 }
20494 }
20495
20496 impl<'de> serde::de::Deserialize<'de> for ExecutionTrigger {
20497 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20498 where
20499 D: serde::Deserializer<'de>,
20500 {
20501 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExecutionTrigger>::new(
20502 ".google.cloud.dataplex.v1.JobEvent.ExecutionTrigger",
20503 ))
20504 }
20505 }
20506}
20507
20508#[derive(Clone, Default, PartialEq)]
20511#[non_exhaustive]
20512pub struct SessionEvent {
20513 pub message: std::string::String,
20515
20516 pub user_id: std::string::String,
20519
20520 pub session_id: std::string::String,
20522
20523 pub r#type: crate::model::session_event::EventType,
20525
20526 pub event_succeeded: bool,
20528
20529 pub fast_startup_enabled: bool,
20532
20533 pub unassigned_duration: std::option::Option<wkt::Duration>,
20535
20536 pub detail: std::option::Option<crate::model::session_event::Detail>,
20538
20539 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20540}
20541
20542impl SessionEvent {
20543 pub fn new() -> Self {
20544 std::default::Default::default()
20545 }
20546
20547 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20549 self.message = v.into();
20550 self
20551 }
20552
20553 pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20555 self.user_id = v.into();
20556 self
20557 }
20558
20559 pub fn set_session_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20561 self.session_id = v.into();
20562 self
20563 }
20564
20565 pub fn set_type<T: std::convert::Into<crate::model::session_event::EventType>>(
20567 mut self,
20568 v: T,
20569 ) -> Self {
20570 self.r#type = v.into();
20571 self
20572 }
20573
20574 pub fn set_event_succeeded<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20576 self.event_succeeded = v.into();
20577 self
20578 }
20579
20580 pub fn set_fast_startup_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20582 self.fast_startup_enabled = v.into();
20583 self
20584 }
20585
20586 pub fn set_unassigned_duration<T>(mut self, v: T) -> Self
20588 where
20589 T: std::convert::Into<wkt::Duration>,
20590 {
20591 self.unassigned_duration = std::option::Option::Some(v.into());
20592 self
20593 }
20594
20595 pub fn set_or_clear_unassigned_duration<T>(mut self, v: std::option::Option<T>) -> Self
20597 where
20598 T: std::convert::Into<wkt::Duration>,
20599 {
20600 self.unassigned_duration = v.map(|x| x.into());
20601 self
20602 }
20603
20604 pub fn set_detail<
20609 T: std::convert::Into<std::option::Option<crate::model::session_event::Detail>>,
20610 >(
20611 mut self,
20612 v: T,
20613 ) -> Self {
20614 self.detail = v.into();
20615 self
20616 }
20617
20618 pub fn query(
20622 &self,
20623 ) -> std::option::Option<&std::boxed::Box<crate::model::session_event::QueryDetail>> {
20624 #[allow(unreachable_patterns)]
20625 self.detail.as_ref().and_then(|v| match v {
20626 crate::model::session_event::Detail::Query(v) => std::option::Option::Some(v),
20627 _ => std::option::Option::None,
20628 })
20629 }
20630
20631 pub fn set_query<
20637 T: std::convert::Into<std::boxed::Box<crate::model::session_event::QueryDetail>>,
20638 >(
20639 mut self,
20640 v: T,
20641 ) -> Self {
20642 self.detail =
20643 std::option::Option::Some(crate::model::session_event::Detail::Query(v.into()));
20644 self
20645 }
20646}
20647
20648impl wkt::message::Message for SessionEvent {
20649 fn typename() -> &'static str {
20650 "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent"
20651 }
20652}
20653
20654pub mod session_event {
20656 #[allow(unused_imports)]
20657 use super::*;
20658
20659 #[derive(Clone, Default, PartialEq)]
20661 #[non_exhaustive]
20662 pub struct QueryDetail {
20663 pub query_id: std::string::String,
20665
20666 pub query_text: std::string::String,
20668
20669 pub engine: crate::model::session_event::query_detail::Engine,
20671
20672 pub duration: std::option::Option<wkt::Duration>,
20674
20675 pub result_size_bytes: i64,
20677
20678 pub data_processed_bytes: i64,
20680
20681 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20682 }
20683
20684 impl QueryDetail {
20685 pub fn new() -> Self {
20686 std::default::Default::default()
20687 }
20688
20689 pub fn set_query_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20691 self.query_id = v.into();
20692 self
20693 }
20694
20695 pub fn set_query_text<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20697 self.query_text = v.into();
20698 self
20699 }
20700
20701 pub fn set_engine<
20703 T: std::convert::Into<crate::model::session_event::query_detail::Engine>,
20704 >(
20705 mut self,
20706 v: T,
20707 ) -> Self {
20708 self.engine = v.into();
20709 self
20710 }
20711
20712 pub fn set_duration<T>(mut self, v: T) -> Self
20714 where
20715 T: std::convert::Into<wkt::Duration>,
20716 {
20717 self.duration = std::option::Option::Some(v.into());
20718 self
20719 }
20720
20721 pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
20723 where
20724 T: std::convert::Into<wkt::Duration>,
20725 {
20726 self.duration = v.map(|x| x.into());
20727 self
20728 }
20729
20730 pub fn set_result_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20732 self.result_size_bytes = v.into();
20733 self
20734 }
20735
20736 pub fn set_data_processed_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
20738 self.data_processed_bytes = v.into();
20739 self
20740 }
20741 }
20742
20743 impl wkt::message::Message for QueryDetail {
20744 fn typename() -> &'static str {
20745 "type.googleapis.com/google.cloud.dataplex.v1.SessionEvent.QueryDetail"
20746 }
20747 }
20748
20749 pub mod query_detail {
20751 #[allow(unused_imports)]
20752 use super::*;
20753
20754 #[derive(Clone, Debug, PartialEq)]
20770 #[non_exhaustive]
20771 pub enum Engine {
20772 Unspecified,
20774 SparkSql,
20776 Bigquery,
20778 UnknownValue(engine::UnknownValue),
20783 }
20784
20785 #[doc(hidden)]
20786 pub mod engine {
20787 #[allow(unused_imports)]
20788 use super::*;
20789 #[derive(Clone, Debug, PartialEq)]
20790 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20791 }
20792
20793 impl Engine {
20794 pub fn value(&self) -> std::option::Option<i32> {
20799 match self {
20800 Self::Unspecified => std::option::Option::Some(0),
20801 Self::SparkSql => std::option::Option::Some(1),
20802 Self::Bigquery => std::option::Option::Some(2),
20803 Self::UnknownValue(u) => u.0.value(),
20804 }
20805 }
20806
20807 pub fn name(&self) -> std::option::Option<&str> {
20812 match self {
20813 Self::Unspecified => std::option::Option::Some("ENGINE_UNSPECIFIED"),
20814 Self::SparkSql => std::option::Option::Some("SPARK_SQL"),
20815 Self::Bigquery => std::option::Option::Some("BIGQUERY"),
20816 Self::UnknownValue(u) => u.0.name(),
20817 }
20818 }
20819 }
20820
20821 impl std::default::Default for Engine {
20822 fn default() -> Self {
20823 use std::convert::From;
20824 Self::from(0)
20825 }
20826 }
20827
20828 impl std::fmt::Display for Engine {
20829 fn fmt(
20830 &self,
20831 f: &mut std::fmt::Formatter<'_>,
20832 ) -> std::result::Result<(), std::fmt::Error> {
20833 wkt::internal::display_enum(f, self.name(), self.value())
20834 }
20835 }
20836
20837 impl std::convert::From<i32> for Engine {
20838 fn from(value: i32) -> Self {
20839 match value {
20840 0 => Self::Unspecified,
20841 1 => Self::SparkSql,
20842 2 => Self::Bigquery,
20843 _ => Self::UnknownValue(engine::UnknownValue(
20844 wkt::internal::UnknownEnumValue::Integer(value),
20845 )),
20846 }
20847 }
20848 }
20849
20850 impl std::convert::From<&str> for Engine {
20851 fn from(value: &str) -> Self {
20852 use std::string::ToString;
20853 match value {
20854 "ENGINE_UNSPECIFIED" => Self::Unspecified,
20855 "SPARK_SQL" => Self::SparkSql,
20856 "BIGQUERY" => Self::Bigquery,
20857 _ => Self::UnknownValue(engine::UnknownValue(
20858 wkt::internal::UnknownEnumValue::String(value.to_string()),
20859 )),
20860 }
20861 }
20862 }
20863
20864 impl serde::ser::Serialize for Engine {
20865 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20866 where
20867 S: serde::Serializer,
20868 {
20869 match self {
20870 Self::Unspecified => serializer.serialize_i32(0),
20871 Self::SparkSql => serializer.serialize_i32(1),
20872 Self::Bigquery => serializer.serialize_i32(2),
20873 Self::UnknownValue(u) => u.0.serialize(serializer),
20874 }
20875 }
20876 }
20877
20878 impl<'de> serde::de::Deserialize<'de> for Engine {
20879 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20880 where
20881 D: serde::Deserializer<'de>,
20882 {
20883 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Engine>::new(
20884 ".google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine",
20885 ))
20886 }
20887 }
20888 }
20889
20890 #[derive(Clone, Debug, PartialEq)]
20906 #[non_exhaustive]
20907 pub enum EventType {
20908 Unspecified,
20910 Start,
20912 Stop,
20914 Query,
20916 Create,
20919 UnknownValue(event_type::UnknownValue),
20924 }
20925
20926 #[doc(hidden)]
20927 pub mod event_type {
20928 #[allow(unused_imports)]
20929 use super::*;
20930 #[derive(Clone, Debug, PartialEq)]
20931 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20932 }
20933
20934 impl EventType {
20935 pub fn value(&self) -> std::option::Option<i32> {
20940 match self {
20941 Self::Unspecified => std::option::Option::Some(0),
20942 Self::Start => std::option::Option::Some(1),
20943 Self::Stop => std::option::Option::Some(2),
20944 Self::Query => std::option::Option::Some(3),
20945 Self::Create => std::option::Option::Some(4),
20946 Self::UnknownValue(u) => u.0.value(),
20947 }
20948 }
20949
20950 pub fn name(&self) -> std::option::Option<&str> {
20955 match self {
20956 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
20957 Self::Start => std::option::Option::Some("START"),
20958 Self::Stop => std::option::Option::Some("STOP"),
20959 Self::Query => std::option::Option::Some("QUERY"),
20960 Self::Create => std::option::Option::Some("CREATE"),
20961 Self::UnknownValue(u) => u.0.name(),
20962 }
20963 }
20964 }
20965
20966 impl std::default::Default for EventType {
20967 fn default() -> Self {
20968 use std::convert::From;
20969 Self::from(0)
20970 }
20971 }
20972
20973 impl std::fmt::Display for EventType {
20974 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
20975 wkt::internal::display_enum(f, self.name(), self.value())
20976 }
20977 }
20978
20979 impl std::convert::From<i32> for EventType {
20980 fn from(value: i32) -> Self {
20981 match value {
20982 0 => Self::Unspecified,
20983 1 => Self::Start,
20984 2 => Self::Stop,
20985 3 => Self::Query,
20986 4 => Self::Create,
20987 _ => Self::UnknownValue(event_type::UnknownValue(
20988 wkt::internal::UnknownEnumValue::Integer(value),
20989 )),
20990 }
20991 }
20992 }
20993
20994 impl std::convert::From<&str> for EventType {
20995 fn from(value: &str) -> Self {
20996 use std::string::ToString;
20997 match value {
20998 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
20999 "START" => Self::Start,
21000 "STOP" => Self::Stop,
21001 "QUERY" => Self::Query,
21002 "CREATE" => Self::Create,
21003 _ => Self::UnknownValue(event_type::UnknownValue(
21004 wkt::internal::UnknownEnumValue::String(value.to_string()),
21005 )),
21006 }
21007 }
21008 }
21009
21010 impl serde::ser::Serialize for EventType {
21011 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21012 where
21013 S: serde::Serializer,
21014 {
21015 match self {
21016 Self::Unspecified => serializer.serialize_i32(0),
21017 Self::Start => serializer.serialize_i32(1),
21018 Self::Stop => serializer.serialize_i32(2),
21019 Self::Query => serializer.serialize_i32(3),
21020 Self::Create => serializer.serialize_i32(4),
21021 Self::UnknownValue(u) => u.0.serialize(serializer),
21022 }
21023 }
21024 }
21025
21026 impl<'de> serde::de::Deserialize<'de> for EventType {
21027 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21028 where
21029 D: serde::Deserializer<'de>,
21030 {
21031 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
21032 ".google.cloud.dataplex.v1.SessionEvent.EventType",
21033 ))
21034 }
21035 }
21036
21037 #[derive(Clone, Debug, PartialEq)]
21039 #[non_exhaustive]
21040 pub enum Detail {
21041 Query(std::boxed::Box<crate::model::session_event::QueryDetail>),
21043 }
21044}
21045
21046#[derive(Clone, Default, PartialEq)]
21048#[non_exhaustive]
21049pub struct GovernanceEvent {
21050 pub message: std::string::String,
21052
21053 pub event_type: crate::model::governance_event::EventType,
21055
21056 pub entity: std::option::Option<crate::model::governance_event::Entity>,
21059
21060 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21061}
21062
21063impl GovernanceEvent {
21064 pub fn new() -> Self {
21065 std::default::Default::default()
21066 }
21067
21068 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21070 self.message = v.into();
21071 self
21072 }
21073
21074 pub fn set_event_type<T: std::convert::Into<crate::model::governance_event::EventType>>(
21076 mut self,
21077 v: T,
21078 ) -> Self {
21079 self.event_type = v.into();
21080 self
21081 }
21082
21083 pub fn set_entity<T>(mut self, v: T) -> Self
21085 where
21086 T: std::convert::Into<crate::model::governance_event::Entity>,
21087 {
21088 self.entity = std::option::Option::Some(v.into());
21089 self
21090 }
21091
21092 pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
21094 where
21095 T: std::convert::Into<crate::model::governance_event::Entity>,
21096 {
21097 self.entity = v.map(|x| x.into());
21098 self
21099 }
21100}
21101
21102impl wkt::message::Message for GovernanceEvent {
21103 fn typename() -> &'static str {
21104 "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent"
21105 }
21106}
21107
21108pub mod governance_event {
21110 #[allow(unused_imports)]
21111 use super::*;
21112
21113 #[derive(Clone, Default, PartialEq)]
21115 #[non_exhaustive]
21116 pub struct Entity {
21117 pub entity: std::string::String,
21121
21122 pub entity_type: crate::model::governance_event::entity::EntityType,
21124
21125 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21126 }
21127
21128 impl Entity {
21129 pub fn new() -> Self {
21130 std::default::Default::default()
21131 }
21132
21133 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21135 self.entity = v.into();
21136 self
21137 }
21138
21139 pub fn set_entity_type<
21141 T: std::convert::Into<crate::model::governance_event::entity::EntityType>,
21142 >(
21143 mut self,
21144 v: T,
21145 ) -> Self {
21146 self.entity_type = v.into();
21147 self
21148 }
21149 }
21150
21151 impl wkt::message::Message for Entity {
21152 fn typename() -> &'static str {
21153 "type.googleapis.com/google.cloud.dataplex.v1.GovernanceEvent.Entity"
21154 }
21155 }
21156
21157 pub mod entity {
21159 #[allow(unused_imports)]
21160 use super::*;
21161
21162 #[derive(Clone, Debug, PartialEq)]
21178 #[non_exhaustive]
21179 pub enum EntityType {
21180 Unspecified,
21182 Table,
21184 Fileset,
21186 UnknownValue(entity_type::UnknownValue),
21191 }
21192
21193 #[doc(hidden)]
21194 pub mod entity_type {
21195 #[allow(unused_imports)]
21196 use super::*;
21197 #[derive(Clone, Debug, PartialEq)]
21198 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21199 }
21200
21201 impl EntityType {
21202 pub fn value(&self) -> std::option::Option<i32> {
21207 match self {
21208 Self::Unspecified => std::option::Option::Some(0),
21209 Self::Table => std::option::Option::Some(1),
21210 Self::Fileset => std::option::Option::Some(2),
21211 Self::UnknownValue(u) => u.0.value(),
21212 }
21213 }
21214
21215 pub fn name(&self) -> std::option::Option<&str> {
21220 match self {
21221 Self::Unspecified => std::option::Option::Some("ENTITY_TYPE_UNSPECIFIED"),
21222 Self::Table => std::option::Option::Some("TABLE"),
21223 Self::Fileset => std::option::Option::Some("FILESET"),
21224 Self::UnknownValue(u) => u.0.name(),
21225 }
21226 }
21227 }
21228
21229 impl std::default::Default for EntityType {
21230 fn default() -> Self {
21231 use std::convert::From;
21232 Self::from(0)
21233 }
21234 }
21235
21236 impl std::fmt::Display for EntityType {
21237 fn fmt(
21238 &self,
21239 f: &mut std::fmt::Formatter<'_>,
21240 ) -> std::result::Result<(), std::fmt::Error> {
21241 wkt::internal::display_enum(f, self.name(), self.value())
21242 }
21243 }
21244
21245 impl std::convert::From<i32> for EntityType {
21246 fn from(value: i32) -> Self {
21247 match value {
21248 0 => Self::Unspecified,
21249 1 => Self::Table,
21250 2 => Self::Fileset,
21251 _ => Self::UnknownValue(entity_type::UnknownValue(
21252 wkt::internal::UnknownEnumValue::Integer(value),
21253 )),
21254 }
21255 }
21256 }
21257
21258 impl std::convert::From<&str> for EntityType {
21259 fn from(value: &str) -> Self {
21260 use std::string::ToString;
21261 match value {
21262 "ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
21263 "TABLE" => Self::Table,
21264 "FILESET" => Self::Fileset,
21265 _ => Self::UnknownValue(entity_type::UnknownValue(
21266 wkt::internal::UnknownEnumValue::String(value.to_string()),
21267 )),
21268 }
21269 }
21270 }
21271
21272 impl serde::ser::Serialize for EntityType {
21273 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21274 where
21275 S: serde::Serializer,
21276 {
21277 match self {
21278 Self::Unspecified => serializer.serialize_i32(0),
21279 Self::Table => serializer.serialize_i32(1),
21280 Self::Fileset => serializer.serialize_i32(2),
21281 Self::UnknownValue(u) => u.0.serialize(serializer),
21282 }
21283 }
21284 }
21285
21286 impl<'de> serde::de::Deserialize<'de> for EntityType {
21287 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21288 where
21289 D: serde::Deserializer<'de>,
21290 {
21291 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityType>::new(
21292 ".google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType",
21293 ))
21294 }
21295 }
21296 }
21297
21298 #[derive(Clone, Debug, PartialEq)]
21314 #[non_exhaustive]
21315 pub enum EventType {
21316 Unspecified,
21318 ResourceIamPolicyUpdate,
21320 BigqueryTableCreate,
21322 BigqueryTableUpdate,
21324 BigqueryTableDelete,
21326 BigqueryConnectionCreate,
21328 BigqueryConnectionUpdate,
21330 BigqueryConnectionDelete,
21332 BigqueryTaxonomyCreate,
21334 BigqueryPolicyTagCreate,
21336 BigqueryPolicyTagDelete,
21338 BigqueryPolicyTagSetIamPolicy,
21340 AccessPolicyUpdate,
21342 GovernanceRuleMatchedResources,
21344 GovernanceRuleSearchLimitExceeds,
21346 GovernanceRuleErrors,
21348 GovernanceRuleProcessing,
21350 UnknownValue(event_type::UnknownValue),
21355 }
21356
21357 #[doc(hidden)]
21358 pub mod event_type {
21359 #[allow(unused_imports)]
21360 use super::*;
21361 #[derive(Clone, Debug, PartialEq)]
21362 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
21363 }
21364
21365 impl EventType {
21366 pub fn value(&self) -> std::option::Option<i32> {
21371 match self {
21372 Self::Unspecified => std::option::Option::Some(0),
21373 Self::ResourceIamPolicyUpdate => std::option::Option::Some(1),
21374 Self::BigqueryTableCreate => std::option::Option::Some(2),
21375 Self::BigqueryTableUpdate => std::option::Option::Some(3),
21376 Self::BigqueryTableDelete => std::option::Option::Some(4),
21377 Self::BigqueryConnectionCreate => std::option::Option::Some(5),
21378 Self::BigqueryConnectionUpdate => std::option::Option::Some(6),
21379 Self::BigqueryConnectionDelete => std::option::Option::Some(7),
21380 Self::BigqueryTaxonomyCreate => std::option::Option::Some(10),
21381 Self::BigqueryPolicyTagCreate => std::option::Option::Some(11),
21382 Self::BigqueryPolicyTagDelete => std::option::Option::Some(12),
21383 Self::BigqueryPolicyTagSetIamPolicy => std::option::Option::Some(13),
21384 Self::AccessPolicyUpdate => std::option::Option::Some(14),
21385 Self::GovernanceRuleMatchedResources => std::option::Option::Some(15),
21386 Self::GovernanceRuleSearchLimitExceeds => std::option::Option::Some(16),
21387 Self::GovernanceRuleErrors => std::option::Option::Some(17),
21388 Self::GovernanceRuleProcessing => std::option::Option::Some(18),
21389 Self::UnknownValue(u) => u.0.value(),
21390 }
21391 }
21392
21393 pub fn name(&self) -> std::option::Option<&str> {
21398 match self {
21399 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
21400 Self::ResourceIamPolicyUpdate => {
21401 std::option::Option::Some("RESOURCE_IAM_POLICY_UPDATE")
21402 }
21403 Self::BigqueryTableCreate => std::option::Option::Some("BIGQUERY_TABLE_CREATE"),
21404 Self::BigqueryTableUpdate => std::option::Option::Some("BIGQUERY_TABLE_UPDATE"),
21405 Self::BigqueryTableDelete => std::option::Option::Some("BIGQUERY_TABLE_DELETE"),
21406 Self::BigqueryConnectionCreate => {
21407 std::option::Option::Some("BIGQUERY_CONNECTION_CREATE")
21408 }
21409 Self::BigqueryConnectionUpdate => {
21410 std::option::Option::Some("BIGQUERY_CONNECTION_UPDATE")
21411 }
21412 Self::BigqueryConnectionDelete => {
21413 std::option::Option::Some("BIGQUERY_CONNECTION_DELETE")
21414 }
21415 Self::BigqueryTaxonomyCreate => {
21416 std::option::Option::Some("BIGQUERY_TAXONOMY_CREATE")
21417 }
21418 Self::BigqueryPolicyTagCreate => {
21419 std::option::Option::Some("BIGQUERY_POLICY_TAG_CREATE")
21420 }
21421 Self::BigqueryPolicyTagDelete => {
21422 std::option::Option::Some("BIGQUERY_POLICY_TAG_DELETE")
21423 }
21424 Self::BigqueryPolicyTagSetIamPolicy => {
21425 std::option::Option::Some("BIGQUERY_POLICY_TAG_SET_IAM_POLICY")
21426 }
21427 Self::AccessPolicyUpdate => std::option::Option::Some("ACCESS_POLICY_UPDATE"),
21428 Self::GovernanceRuleMatchedResources => {
21429 std::option::Option::Some("GOVERNANCE_RULE_MATCHED_RESOURCES")
21430 }
21431 Self::GovernanceRuleSearchLimitExceeds => {
21432 std::option::Option::Some("GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS")
21433 }
21434 Self::GovernanceRuleErrors => std::option::Option::Some("GOVERNANCE_RULE_ERRORS"),
21435 Self::GovernanceRuleProcessing => {
21436 std::option::Option::Some("GOVERNANCE_RULE_PROCESSING")
21437 }
21438 Self::UnknownValue(u) => u.0.name(),
21439 }
21440 }
21441 }
21442
21443 impl std::default::Default for EventType {
21444 fn default() -> Self {
21445 use std::convert::From;
21446 Self::from(0)
21447 }
21448 }
21449
21450 impl std::fmt::Display for EventType {
21451 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
21452 wkt::internal::display_enum(f, self.name(), self.value())
21453 }
21454 }
21455
21456 impl std::convert::From<i32> for EventType {
21457 fn from(value: i32) -> Self {
21458 match value {
21459 0 => Self::Unspecified,
21460 1 => Self::ResourceIamPolicyUpdate,
21461 2 => Self::BigqueryTableCreate,
21462 3 => Self::BigqueryTableUpdate,
21463 4 => Self::BigqueryTableDelete,
21464 5 => Self::BigqueryConnectionCreate,
21465 6 => Self::BigqueryConnectionUpdate,
21466 7 => Self::BigqueryConnectionDelete,
21467 10 => Self::BigqueryTaxonomyCreate,
21468 11 => Self::BigqueryPolicyTagCreate,
21469 12 => Self::BigqueryPolicyTagDelete,
21470 13 => Self::BigqueryPolicyTagSetIamPolicy,
21471 14 => Self::AccessPolicyUpdate,
21472 15 => Self::GovernanceRuleMatchedResources,
21473 16 => Self::GovernanceRuleSearchLimitExceeds,
21474 17 => Self::GovernanceRuleErrors,
21475 18 => Self::GovernanceRuleProcessing,
21476 _ => Self::UnknownValue(event_type::UnknownValue(
21477 wkt::internal::UnknownEnumValue::Integer(value),
21478 )),
21479 }
21480 }
21481 }
21482
21483 impl std::convert::From<&str> for EventType {
21484 fn from(value: &str) -> Self {
21485 use std::string::ToString;
21486 match value {
21487 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
21488 "RESOURCE_IAM_POLICY_UPDATE" => Self::ResourceIamPolicyUpdate,
21489 "BIGQUERY_TABLE_CREATE" => Self::BigqueryTableCreate,
21490 "BIGQUERY_TABLE_UPDATE" => Self::BigqueryTableUpdate,
21491 "BIGQUERY_TABLE_DELETE" => Self::BigqueryTableDelete,
21492 "BIGQUERY_CONNECTION_CREATE" => Self::BigqueryConnectionCreate,
21493 "BIGQUERY_CONNECTION_UPDATE" => Self::BigqueryConnectionUpdate,
21494 "BIGQUERY_CONNECTION_DELETE" => Self::BigqueryConnectionDelete,
21495 "BIGQUERY_TAXONOMY_CREATE" => Self::BigqueryTaxonomyCreate,
21496 "BIGQUERY_POLICY_TAG_CREATE" => Self::BigqueryPolicyTagCreate,
21497 "BIGQUERY_POLICY_TAG_DELETE" => Self::BigqueryPolicyTagDelete,
21498 "BIGQUERY_POLICY_TAG_SET_IAM_POLICY" => Self::BigqueryPolicyTagSetIamPolicy,
21499 "ACCESS_POLICY_UPDATE" => Self::AccessPolicyUpdate,
21500 "GOVERNANCE_RULE_MATCHED_RESOURCES" => Self::GovernanceRuleMatchedResources,
21501 "GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS" => Self::GovernanceRuleSearchLimitExceeds,
21502 "GOVERNANCE_RULE_ERRORS" => Self::GovernanceRuleErrors,
21503 "GOVERNANCE_RULE_PROCESSING" => Self::GovernanceRuleProcessing,
21504 _ => Self::UnknownValue(event_type::UnknownValue(
21505 wkt::internal::UnknownEnumValue::String(value.to_string()),
21506 )),
21507 }
21508 }
21509 }
21510
21511 impl serde::ser::Serialize for EventType {
21512 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21513 where
21514 S: serde::Serializer,
21515 {
21516 match self {
21517 Self::Unspecified => serializer.serialize_i32(0),
21518 Self::ResourceIamPolicyUpdate => serializer.serialize_i32(1),
21519 Self::BigqueryTableCreate => serializer.serialize_i32(2),
21520 Self::BigqueryTableUpdate => serializer.serialize_i32(3),
21521 Self::BigqueryTableDelete => serializer.serialize_i32(4),
21522 Self::BigqueryConnectionCreate => serializer.serialize_i32(5),
21523 Self::BigqueryConnectionUpdate => serializer.serialize_i32(6),
21524 Self::BigqueryConnectionDelete => serializer.serialize_i32(7),
21525 Self::BigqueryTaxonomyCreate => serializer.serialize_i32(10),
21526 Self::BigqueryPolicyTagCreate => serializer.serialize_i32(11),
21527 Self::BigqueryPolicyTagDelete => serializer.serialize_i32(12),
21528 Self::BigqueryPolicyTagSetIamPolicy => serializer.serialize_i32(13),
21529 Self::AccessPolicyUpdate => serializer.serialize_i32(14),
21530 Self::GovernanceRuleMatchedResources => serializer.serialize_i32(15),
21531 Self::GovernanceRuleSearchLimitExceeds => serializer.serialize_i32(16),
21532 Self::GovernanceRuleErrors => serializer.serialize_i32(17),
21533 Self::GovernanceRuleProcessing => serializer.serialize_i32(18),
21534 Self::UnknownValue(u) => u.0.serialize(serializer),
21535 }
21536 }
21537 }
21538
21539 impl<'de> serde::de::Deserialize<'de> for EventType {
21540 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21541 where
21542 D: serde::Deserializer<'de>,
21543 {
21544 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
21545 ".google.cloud.dataplex.v1.GovernanceEvent.EventType",
21546 ))
21547 }
21548 }
21549}
21550
21551#[derive(Clone, Default, PartialEq)]
21554#[non_exhaustive]
21555pub struct DataScanEvent {
21556 pub data_source: std::string::String,
21558
21559 pub job_id: std::string::String,
21561
21562 pub create_time: std::option::Option<wkt::Timestamp>,
21564
21565 pub start_time: std::option::Option<wkt::Timestamp>,
21567
21568 pub end_time: std::option::Option<wkt::Timestamp>,
21570
21571 pub r#type: crate::model::data_scan_event::ScanType,
21573
21574 pub state: crate::model::data_scan_event::State,
21576
21577 pub message: std::string::String,
21579
21580 pub spec_version: std::string::String,
21582
21583 pub trigger: crate::model::data_scan_event::Trigger,
21585
21586 pub scope: crate::model::data_scan_event::Scope,
21588
21589 pub post_scan_actions_result:
21591 std::option::Option<crate::model::data_scan_event::PostScanActionsResult>,
21592
21593 pub catalog_publishing_status:
21596 std::option::Option<crate::model::DataScanCatalogPublishingStatus>,
21597
21598 pub result: std::option::Option<crate::model::data_scan_event::Result>,
21600
21601 pub applied_configs: std::option::Option<crate::model::data_scan_event::AppliedConfigs>,
21603
21604 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21605}
21606
21607impl DataScanEvent {
21608 pub fn new() -> Self {
21609 std::default::Default::default()
21610 }
21611
21612 pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21614 self.data_source = v.into();
21615 self
21616 }
21617
21618 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21620 self.job_id = v.into();
21621 self
21622 }
21623
21624 pub fn set_create_time<T>(mut self, v: T) -> Self
21626 where
21627 T: std::convert::Into<wkt::Timestamp>,
21628 {
21629 self.create_time = std::option::Option::Some(v.into());
21630 self
21631 }
21632
21633 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
21635 where
21636 T: std::convert::Into<wkt::Timestamp>,
21637 {
21638 self.create_time = v.map(|x| x.into());
21639 self
21640 }
21641
21642 pub fn set_start_time<T>(mut self, v: T) -> Self
21644 where
21645 T: std::convert::Into<wkt::Timestamp>,
21646 {
21647 self.start_time = std::option::Option::Some(v.into());
21648 self
21649 }
21650
21651 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
21653 where
21654 T: std::convert::Into<wkt::Timestamp>,
21655 {
21656 self.start_time = v.map(|x| x.into());
21657 self
21658 }
21659
21660 pub fn set_end_time<T>(mut self, v: T) -> Self
21662 where
21663 T: std::convert::Into<wkt::Timestamp>,
21664 {
21665 self.end_time = std::option::Option::Some(v.into());
21666 self
21667 }
21668
21669 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
21671 where
21672 T: std::convert::Into<wkt::Timestamp>,
21673 {
21674 self.end_time = v.map(|x| x.into());
21675 self
21676 }
21677
21678 pub fn set_type<T: std::convert::Into<crate::model::data_scan_event::ScanType>>(
21680 mut self,
21681 v: T,
21682 ) -> Self {
21683 self.r#type = v.into();
21684 self
21685 }
21686
21687 pub fn set_state<T: std::convert::Into<crate::model::data_scan_event::State>>(
21689 mut self,
21690 v: T,
21691 ) -> Self {
21692 self.state = v.into();
21693 self
21694 }
21695
21696 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21698 self.message = v.into();
21699 self
21700 }
21701
21702 pub fn set_spec_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21704 self.spec_version = v.into();
21705 self
21706 }
21707
21708 pub fn set_trigger<T: std::convert::Into<crate::model::data_scan_event::Trigger>>(
21710 mut self,
21711 v: T,
21712 ) -> Self {
21713 self.trigger = v.into();
21714 self
21715 }
21716
21717 pub fn set_scope<T: std::convert::Into<crate::model::data_scan_event::Scope>>(
21719 mut self,
21720 v: T,
21721 ) -> Self {
21722 self.scope = v.into();
21723 self
21724 }
21725
21726 pub fn set_post_scan_actions_result<T>(mut self, v: T) -> Self
21728 where
21729 T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
21730 {
21731 self.post_scan_actions_result = std::option::Option::Some(v.into());
21732 self
21733 }
21734
21735 pub fn set_or_clear_post_scan_actions_result<T>(mut self, v: std::option::Option<T>) -> Self
21737 where
21738 T: std::convert::Into<crate::model::data_scan_event::PostScanActionsResult>,
21739 {
21740 self.post_scan_actions_result = v.map(|x| x.into());
21741 self
21742 }
21743
21744 pub fn set_catalog_publishing_status<T>(mut self, v: T) -> Self
21746 where
21747 T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
21748 {
21749 self.catalog_publishing_status = std::option::Option::Some(v.into());
21750 self
21751 }
21752
21753 pub fn set_or_clear_catalog_publishing_status<T>(mut self, v: std::option::Option<T>) -> Self
21755 where
21756 T: std::convert::Into<crate::model::DataScanCatalogPublishingStatus>,
21757 {
21758 self.catalog_publishing_status = v.map(|x| x.into());
21759 self
21760 }
21761
21762 pub fn set_result<
21767 T: std::convert::Into<std::option::Option<crate::model::data_scan_event::Result>>,
21768 >(
21769 mut self,
21770 v: T,
21771 ) -> Self {
21772 self.result = v.into();
21773 self
21774 }
21775
21776 pub fn data_profile(
21780 &self,
21781 ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>
21782 {
21783 #[allow(unreachable_patterns)]
21784 self.result.as_ref().and_then(|v| match v {
21785 crate::model::data_scan_event::Result::DataProfile(v) => std::option::Option::Some(v),
21786 _ => std::option::Option::None,
21787 })
21788 }
21789
21790 pub fn set_data_profile<
21796 T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataProfileResult>>,
21797 >(
21798 mut self,
21799 v: T,
21800 ) -> Self {
21801 self.result =
21802 std::option::Option::Some(crate::model::data_scan_event::Result::DataProfile(v.into()));
21803 self
21804 }
21805
21806 pub fn data_quality(
21810 &self,
21811 ) -> std::option::Option<&std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>
21812 {
21813 #[allow(unreachable_patterns)]
21814 self.result.as_ref().and_then(|v| match v {
21815 crate::model::data_scan_event::Result::DataQuality(v) => std::option::Option::Some(v),
21816 _ => std::option::Option::None,
21817 })
21818 }
21819
21820 pub fn set_data_quality<
21826 T: std::convert::Into<std::boxed::Box<crate::model::data_scan_event::DataQualityResult>>,
21827 >(
21828 mut self,
21829 v: T,
21830 ) -> Self {
21831 self.result =
21832 std::option::Option::Some(crate::model::data_scan_event::Result::DataQuality(v.into()));
21833 self
21834 }
21835
21836 pub fn set_applied_configs<
21841 T: std::convert::Into<std::option::Option<crate::model::data_scan_event::AppliedConfigs>>,
21842 >(
21843 mut self,
21844 v: T,
21845 ) -> Self {
21846 self.applied_configs = v.into();
21847 self
21848 }
21849
21850 pub fn data_profile_configs(
21854 &self,
21855 ) -> std::option::Option<
21856 &std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
21857 > {
21858 #[allow(unreachable_patterns)]
21859 self.applied_configs.as_ref().and_then(|v| match v {
21860 crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v) => {
21861 std::option::Option::Some(v)
21862 }
21863 _ => std::option::Option::None,
21864 })
21865 }
21866
21867 pub fn set_data_profile_configs<
21873 T: std::convert::Into<
21874 std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
21875 >,
21876 >(
21877 mut self,
21878 v: T,
21879 ) -> Self {
21880 self.applied_configs = std::option::Option::Some(
21881 crate::model::data_scan_event::AppliedConfigs::DataProfileConfigs(v.into()),
21882 );
21883 self
21884 }
21885
21886 pub fn data_quality_configs(
21890 &self,
21891 ) -> std::option::Option<
21892 &std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
21893 > {
21894 #[allow(unreachable_patterns)]
21895 self.applied_configs.as_ref().and_then(|v| match v {
21896 crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v) => {
21897 std::option::Option::Some(v)
21898 }
21899 _ => std::option::Option::None,
21900 })
21901 }
21902
21903 pub fn set_data_quality_configs<
21909 T: std::convert::Into<
21910 std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
21911 >,
21912 >(
21913 mut self,
21914 v: T,
21915 ) -> Self {
21916 self.applied_configs = std::option::Option::Some(
21917 crate::model::data_scan_event::AppliedConfigs::DataQualityConfigs(v.into()),
21918 );
21919 self
21920 }
21921}
21922
21923impl wkt::message::Message for DataScanEvent {
21924 fn typename() -> &'static str {
21925 "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent"
21926 }
21927}
21928
21929pub mod data_scan_event {
21931 #[allow(unused_imports)]
21932 use super::*;
21933
21934 #[derive(Clone, Default, PartialEq)]
21936 #[non_exhaustive]
21937 pub struct DataProfileResult {
21938 pub row_count: i64,
21940
21941 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21942 }
21943
21944 impl DataProfileResult {
21945 pub fn new() -> Self {
21946 std::default::Default::default()
21947 }
21948
21949 pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
21951 self.row_count = v.into();
21952 self
21953 }
21954 }
21955
21956 impl wkt::message::Message for DataProfileResult {
21957 fn typename() -> &'static str {
21958 "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"
21959 }
21960 }
21961
21962 #[derive(Clone, Default, PartialEq)]
21964 #[non_exhaustive]
21965 pub struct DataQualityResult {
21966 pub row_count: i64,
21968
21969 pub passed: bool,
21971
21972 pub dimension_passed: std::collections::HashMap<std::string::String, bool>,
21977
21978 pub score: f32,
21983
21984 pub dimension_score: std::collections::HashMap<std::string::String, f32>,
21991
21992 pub column_score: std::collections::HashMap<std::string::String, f32>,
21999
22000 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22001 }
22002
22003 impl DataQualityResult {
22004 pub fn new() -> Self {
22005 std::default::Default::default()
22006 }
22007
22008 pub fn set_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
22010 self.row_count = v.into();
22011 self
22012 }
22013
22014 pub fn set_passed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22016 self.passed = v.into();
22017 self
22018 }
22019
22020 pub fn set_dimension_passed<T, K, V>(mut self, v: T) -> Self
22022 where
22023 T: std::iter::IntoIterator<Item = (K, V)>,
22024 K: std::convert::Into<std::string::String>,
22025 V: std::convert::Into<bool>,
22026 {
22027 use std::iter::Iterator;
22028 self.dimension_passed = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22029 self
22030 }
22031
22032 pub fn set_score<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
22034 self.score = v.into();
22035 self
22036 }
22037
22038 pub fn set_dimension_score<T, K, V>(mut self, v: T) -> Self
22040 where
22041 T: std::iter::IntoIterator<Item = (K, V)>,
22042 K: std::convert::Into<std::string::String>,
22043 V: std::convert::Into<f32>,
22044 {
22045 use std::iter::Iterator;
22046 self.dimension_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22047 self
22048 }
22049
22050 pub fn set_column_score<T, K, V>(mut self, v: T) -> Self
22052 where
22053 T: std::iter::IntoIterator<Item = (K, V)>,
22054 K: std::convert::Into<std::string::String>,
22055 V: std::convert::Into<f32>,
22056 {
22057 use std::iter::Iterator;
22058 self.column_score = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
22059 self
22060 }
22061 }
22062
22063 impl wkt::message::Message for DataQualityResult {
22064 fn typename() -> &'static str {
22065 "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"
22066 }
22067 }
22068
22069 #[derive(Clone, Default, PartialEq)]
22071 #[non_exhaustive]
22072 pub struct DataProfileAppliedConfigs {
22073 pub sampling_percent: f32,
22078
22079 pub row_filter_applied: bool,
22081
22082 pub column_filter_applied: bool,
22085
22086 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22087 }
22088
22089 impl DataProfileAppliedConfigs {
22090 pub fn new() -> Self {
22091 std::default::Default::default()
22092 }
22093
22094 pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
22096 self.sampling_percent = v.into();
22097 self
22098 }
22099
22100 pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22102 self.row_filter_applied = v.into();
22103 self
22104 }
22105
22106 pub fn set_column_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22108 self.column_filter_applied = v.into();
22109 self
22110 }
22111 }
22112
22113 impl wkt::message::Message for DataProfileAppliedConfigs {
22114 fn typename() -> &'static str {
22115 "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs"
22116 }
22117 }
22118
22119 #[derive(Clone, Default, PartialEq)]
22121 #[non_exhaustive]
22122 pub struct DataQualityAppliedConfigs {
22123 pub sampling_percent: f32,
22128
22129 pub row_filter_applied: bool,
22131
22132 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22133 }
22134
22135 impl DataQualityAppliedConfigs {
22136 pub fn new() -> Self {
22137 std::default::Default::default()
22138 }
22139
22140 pub fn set_sampling_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
22142 self.sampling_percent = v.into();
22143 self
22144 }
22145
22146 pub fn set_row_filter_applied<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22148 self.row_filter_applied = v.into();
22149 self
22150 }
22151 }
22152
22153 impl wkt::message::Message for DataQualityAppliedConfigs {
22154 fn typename() -> &'static str {
22155 "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs"
22156 }
22157 }
22158
22159 #[derive(Clone, Default, PartialEq)]
22161 #[non_exhaustive]
22162 pub struct PostScanActionsResult {
22163 pub bigquery_export_result: std::option::Option<
22165 crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
22166 >,
22167
22168 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22169 }
22170
22171 impl PostScanActionsResult {
22172 pub fn new() -> Self {
22173 std::default::Default::default()
22174 }
22175
22176 pub fn set_bigquery_export_result<T>(mut self, v: T) -> Self
22178 where
22179 T: std::convert::Into<
22180 crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
22181 >,
22182 {
22183 self.bigquery_export_result = std::option::Option::Some(v.into());
22184 self
22185 }
22186
22187 pub fn set_or_clear_bigquery_export_result<T>(mut self, v: std::option::Option<T>) -> Self
22189 where
22190 T: std::convert::Into<
22191 crate::model::data_scan_event::post_scan_actions_result::BigQueryExportResult,
22192 >,
22193 {
22194 self.bigquery_export_result = v.map(|x| x.into());
22195 self
22196 }
22197 }
22198
22199 impl wkt::message::Message for PostScanActionsResult {
22200 fn typename() -> &'static str {
22201 "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult"
22202 }
22203 }
22204
22205 pub mod post_scan_actions_result {
22207 #[allow(unused_imports)]
22208 use super::*;
22209
22210 #[derive(Clone, Default, PartialEq)]
22212 #[non_exhaustive]
22213 pub struct BigQueryExportResult {
22214
22215 pub state: crate::model::data_scan_event::post_scan_actions_result::big_query_export_result::State,
22217
22218 pub message: std::string::String,
22220
22221 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22222 }
22223
22224 impl BigQueryExportResult {
22225 pub fn new() -> Self {
22226 std::default::Default::default()
22227 }
22228
22229 pub fn set_state<T: std::convert::Into<crate::model::data_scan_event::post_scan_actions_result::big_query_export_result::State>>(mut self, v: T) -> Self{
22231 self.state = v.into();
22232 self
22233 }
22234
22235 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22237 self.message = v.into();
22238 self
22239 }
22240 }
22241
22242 impl wkt::message::Message for BigQueryExportResult {
22243 fn typename() -> &'static str {
22244 "type.googleapis.com/google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult"
22245 }
22246 }
22247
22248 pub mod big_query_export_result {
22250 #[allow(unused_imports)]
22251 use super::*;
22252
22253 #[derive(Clone, Debug, PartialEq)]
22269 #[non_exhaustive]
22270 pub enum State {
22271 Unspecified,
22273 Succeeded,
22275 Failed,
22277 Skipped,
22280 UnknownValue(state::UnknownValue),
22285 }
22286
22287 #[doc(hidden)]
22288 pub mod state {
22289 #[allow(unused_imports)]
22290 use super::*;
22291 #[derive(Clone, Debug, PartialEq)]
22292 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22293 }
22294
22295 impl State {
22296 pub fn value(&self) -> std::option::Option<i32> {
22301 match self {
22302 Self::Unspecified => std::option::Option::Some(0),
22303 Self::Succeeded => std::option::Option::Some(1),
22304 Self::Failed => std::option::Option::Some(2),
22305 Self::Skipped => std::option::Option::Some(3),
22306 Self::UnknownValue(u) => u.0.value(),
22307 }
22308 }
22309
22310 pub fn name(&self) -> std::option::Option<&str> {
22315 match self {
22316 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
22317 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
22318 Self::Failed => std::option::Option::Some("FAILED"),
22319 Self::Skipped => std::option::Option::Some("SKIPPED"),
22320 Self::UnknownValue(u) => u.0.name(),
22321 }
22322 }
22323 }
22324
22325 impl std::default::Default for State {
22326 fn default() -> Self {
22327 use std::convert::From;
22328 Self::from(0)
22329 }
22330 }
22331
22332 impl std::fmt::Display for State {
22333 fn fmt(
22334 &self,
22335 f: &mut std::fmt::Formatter<'_>,
22336 ) -> std::result::Result<(), std::fmt::Error> {
22337 wkt::internal::display_enum(f, self.name(), self.value())
22338 }
22339 }
22340
22341 impl std::convert::From<i32> for State {
22342 fn from(value: i32) -> Self {
22343 match value {
22344 0 => Self::Unspecified,
22345 1 => Self::Succeeded,
22346 2 => Self::Failed,
22347 3 => Self::Skipped,
22348 _ => Self::UnknownValue(state::UnknownValue(
22349 wkt::internal::UnknownEnumValue::Integer(value),
22350 )),
22351 }
22352 }
22353 }
22354
22355 impl std::convert::From<&str> for State {
22356 fn from(value: &str) -> Self {
22357 use std::string::ToString;
22358 match value {
22359 "STATE_UNSPECIFIED" => Self::Unspecified,
22360 "SUCCEEDED" => Self::Succeeded,
22361 "FAILED" => Self::Failed,
22362 "SKIPPED" => Self::Skipped,
22363 _ => Self::UnknownValue(state::UnknownValue(
22364 wkt::internal::UnknownEnumValue::String(value.to_string()),
22365 )),
22366 }
22367 }
22368 }
22369
22370 impl serde::ser::Serialize for State {
22371 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22372 where
22373 S: serde::Serializer,
22374 {
22375 match self {
22376 Self::Unspecified => serializer.serialize_i32(0),
22377 Self::Succeeded => serializer.serialize_i32(1),
22378 Self::Failed => serializer.serialize_i32(2),
22379 Self::Skipped => serializer.serialize_i32(3),
22380 Self::UnknownValue(u) => u.0.serialize(serializer),
22381 }
22382 }
22383 }
22384
22385 impl<'de> serde::de::Deserialize<'de> for State {
22386 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22387 where
22388 D: serde::Deserializer<'de>,
22389 {
22390 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
22391 ".google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State"))
22392 }
22393 }
22394 }
22395 }
22396
22397 #[derive(Clone, Debug, PartialEq)]
22413 #[non_exhaustive]
22414 pub enum ScanType {
22415 Unspecified,
22417 DataProfile,
22419 DataQuality,
22421 DataDiscovery,
22423 UnknownValue(scan_type::UnknownValue),
22428 }
22429
22430 #[doc(hidden)]
22431 pub mod scan_type {
22432 #[allow(unused_imports)]
22433 use super::*;
22434 #[derive(Clone, Debug, PartialEq)]
22435 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22436 }
22437
22438 impl ScanType {
22439 pub fn value(&self) -> std::option::Option<i32> {
22444 match self {
22445 Self::Unspecified => std::option::Option::Some(0),
22446 Self::DataProfile => std::option::Option::Some(1),
22447 Self::DataQuality => std::option::Option::Some(2),
22448 Self::DataDiscovery => std::option::Option::Some(4),
22449 Self::UnknownValue(u) => u.0.value(),
22450 }
22451 }
22452
22453 pub fn name(&self) -> std::option::Option<&str> {
22458 match self {
22459 Self::Unspecified => std::option::Option::Some("SCAN_TYPE_UNSPECIFIED"),
22460 Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
22461 Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
22462 Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
22463 Self::UnknownValue(u) => u.0.name(),
22464 }
22465 }
22466 }
22467
22468 impl std::default::Default for ScanType {
22469 fn default() -> Self {
22470 use std::convert::From;
22471 Self::from(0)
22472 }
22473 }
22474
22475 impl std::fmt::Display for ScanType {
22476 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22477 wkt::internal::display_enum(f, self.name(), self.value())
22478 }
22479 }
22480
22481 impl std::convert::From<i32> for ScanType {
22482 fn from(value: i32) -> Self {
22483 match value {
22484 0 => Self::Unspecified,
22485 1 => Self::DataProfile,
22486 2 => Self::DataQuality,
22487 4 => Self::DataDiscovery,
22488 _ => Self::UnknownValue(scan_type::UnknownValue(
22489 wkt::internal::UnknownEnumValue::Integer(value),
22490 )),
22491 }
22492 }
22493 }
22494
22495 impl std::convert::From<&str> for ScanType {
22496 fn from(value: &str) -> Self {
22497 use std::string::ToString;
22498 match value {
22499 "SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
22500 "DATA_PROFILE" => Self::DataProfile,
22501 "DATA_QUALITY" => Self::DataQuality,
22502 "DATA_DISCOVERY" => Self::DataDiscovery,
22503 _ => Self::UnknownValue(scan_type::UnknownValue(
22504 wkt::internal::UnknownEnumValue::String(value.to_string()),
22505 )),
22506 }
22507 }
22508 }
22509
22510 impl serde::ser::Serialize for ScanType {
22511 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22512 where
22513 S: serde::Serializer,
22514 {
22515 match self {
22516 Self::Unspecified => serializer.serialize_i32(0),
22517 Self::DataProfile => serializer.serialize_i32(1),
22518 Self::DataQuality => serializer.serialize_i32(2),
22519 Self::DataDiscovery => serializer.serialize_i32(4),
22520 Self::UnknownValue(u) => u.0.serialize(serializer),
22521 }
22522 }
22523 }
22524
22525 impl<'de> serde::de::Deserialize<'de> for ScanType {
22526 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22527 where
22528 D: serde::Deserializer<'de>,
22529 {
22530 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ScanType>::new(
22531 ".google.cloud.dataplex.v1.DataScanEvent.ScanType",
22532 ))
22533 }
22534 }
22535
22536 #[derive(Clone, Debug, PartialEq)]
22552 #[non_exhaustive]
22553 pub enum State {
22554 Unspecified,
22556 Started,
22558 Succeeded,
22560 Failed,
22562 Cancelled,
22564 Created,
22566 UnknownValue(state::UnknownValue),
22571 }
22572
22573 #[doc(hidden)]
22574 pub mod state {
22575 #[allow(unused_imports)]
22576 use super::*;
22577 #[derive(Clone, Debug, PartialEq)]
22578 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22579 }
22580
22581 impl State {
22582 pub fn value(&self) -> std::option::Option<i32> {
22587 match self {
22588 Self::Unspecified => std::option::Option::Some(0),
22589 Self::Started => std::option::Option::Some(1),
22590 Self::Succeeded => std::option::Option::Some(2),
22591 Self::Failed => std::option::Option::Some(3),
22592 Self::Cancelled => std::option::Option::Some(4),
22593 Self::Created => std::option::Option::Some(5),
22594 Self::UnknownValue(u) => u.0.value(),
22595 }
22596 }
22597
22598 pub fn name(&self) -> std::option::Option<&str> {
22603 match self {
22604 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
22605 Self::Started => std::option::Option::Some("STARTED"),
22606 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
22607 Self::Failed => std::option::Option::Some("FAILED"),
22608 Self::Cancelled => std::option::Option::Some("CANCELLED"),
22609 Self::Created => std::option::Option::Some("CREATED"),
22610 Self::UnknownValue(u) => u.0.name(),
22611 }
22612 }
22613 }
22614
22615 impl std::default::Default for State {
22616 fn default() -> Self {
22617 use std::convert::From;
22618 Self::from(0)
22619 }
22620 }
22621
22622 impl std::fmt::Display for State {
22623 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22624 wkt::internal::display_enum(f, self.name(), self.value())
22625 }
22626 }
22627
22628 impl std::convert::From<i32> for State {
22629 fn from(value: i32) -> Self {
22630 match value {
22631 0 => Self::Unspecified,
22632 1 => Self::Started,
22633 2 => Self::Succeeded,
22634 3 => Self::Failed,
22635 4 => Self::Cancelled,
22636 5 => Self::Created,
22637 _ => Self::UnknownValue(state::UnknownValue(
22638 wkt::internal::UnknownEnumValue::Integer(value),
22639 )),
22640 }
22641 }
22642 }
22643
22644 impl std::convert::From<&str> for State {
22645 fn from(value: &str) -> Self {
22646 use std::string::ToString;
22647 match value {
22648 "STATE_UNSPECIFIED" => Self::Unspecified,
22649 "STARTED" => Self::Started,
22650 "SUCCEEDED" => Self::Succeeded,
22651 "FAILED" => Self::Failed,
22652 "CANCELLED" => Self::Cancelled,
22653 "CREATED" => Self::Created,
22654 _ => Self::UnknownValue(state::UnknownValue(
22655 wkt::internal::UnknownEnumValue::String(value.to_string()),
22656 )),
22657 }
22658 }
22659 }
22660
22661 impl serde::ser::Serialize for State {
22662 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22663 where
22664 S: serde::Serializer,
22665 {
22666 match self {
22667 Self::Unspecified => serializer.serialize_i32(0),
22668 Self::Started => serializer.serialize_i32(1),
22669 Self::Succeeded => serializer.serialize_i32(2),
22670 Self::Failed => serializer.serialize_i32(3),
22671 Self::Cancelled => serializer.serialize_i32(4),
22672 Self::Created => serializer.serialize_i32(5),
22673 Self::UnknownValue(u) => u.0.serialize(serializer),
22674 }
22675 }
22676 }
22677
22678 impl<'de> serde::de::Deserialize<'de> for State {
22679 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22680 where
22681 D: serde::Deserializer<'de>,
22682 {
22683 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
22684 ".google.cloud.dataplex.v1.DataScanEvent.State",
22685 ))
22686 }
22687 }
22688
22689 #[derive(Clone, Debug, PartialEq)]
22705 #[non_exhaustive]
22706 pub enum Trigger {
22707 Unspecified,
22709 OnDemand,
22711 Schedule,
22713 UnknownValue(trigger::UnknownValue),
22718 }
22719
22720 #[doc(hidden)]
22721 pub mod trigger {
22722 #[allow(unused_imports)]
22723 use super::*;
22724 #[derive(Clone, Debug, PartialEq)]
22725 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22726 }
22727
22728 impl Trigger {
22729 pub fn value(&self) -> std::option::Option<i32> {
22734 match self {
22735 Self::Unspecified => std::option::Option::Some(0),
22736 Self::OnDemand => std::option::Option::Some(1),
22737 Self::Schedule => std::option::Option::Some(2),
22738 Self::UnknownValue(u) => u.0.value(),
22739 }
22740 }
22741
22742 pub fn name(&self) -> std::option::Option<&str> {
22747 match self {
22748 Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
22749 Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
22750 Self::Schedule => std::option::Option::Some("SCHEDULE"),
22751 Self::UnknownValue(u) => u.0.name(),
22752 }
22753 }
22754 }
22755
22756 impl std::default::Default for Trigger {
22757 fn default() -> Self {
22758 use std::convert::From;
22759 Self::from(0)
22760 }
22761 }
22762
22763 impl std::fmt::Display for Trigger {
22764 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22765 wkt::internal::display_enum(f, self.name(), self.value())
22766 }
22767 }
22768
22769 impl std::convert::From<i32> for Trigger {
22770 fn from(value: i32) -> Self {
22771 match value {
22772 0 => Self::Unspecified,
22773 1 => Self::OnDemand,
22774 2 => Self::Schedule,
22775 _ => Self::UnknownValue(trigger::UnknownValue(
22776 wkt::internal::UnknownEnumValue::Integer(value),
22777 )),
22778 }
22779 }
22780 }
22781
22782 impl std::convert::From<&str> for Trigger {
22783 fn from(value: &str) -> Self {
22784 use std::string::ToString;
22785 match value {
22786 "TRIGGER_UNSPECIFIED" => Self::Unspecified,
22787 "ON_DEMAND" => Self::OnDemand,
22788 "SCHEDULE" => Self::Schedule,
22789 _ => Self::UnknownValue(trigger::UnknownValue(
22790 wkt::internal::UnknownEnumValue::String(value.to_string()),
22791 )),
22792 }
22793 }
22794 }
22795
22796 impl serde::ser::Serialize for Trigger {
22797 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22798 where
22799 S: serde::Serializer,
22800 {
22801 match self {
22802 Self::Unspecified => serializer.serialize_i32(0),
22803 Self::OnDemand => serializer.serialize_i32(1),
22804 Self::Schedule => serializer.serialize_i32(2),
22805 Self::UnknownValue(u) => u.0.serialize(serializer),
22806 }
22807 }
22808 }
22809
22810 impl<'de> serde::de::Deserialize<'de> for Trigger {
22811 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22812 where
22813 D: serde::Deserializer<'de>,
22814 {
22815 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
22816 ".google.cloud.dataplex.v1.DataScanEvent.Trigger",
22817 ))
22818 }
22819 }
22820
22821 #[derive(Clone, Debug, PartialEq)]
22837 #[non_exhaustive]
22838 pub enum Scope {
22839 Unspecified,
22841 Full,
22843 Incremental,
22845 UnknownValue(scope::UnknownValue),
22850 }
22851
22852 #[doc(hidden)]
22853 pub mod scope {
22854 #[allow(unused_imports)]
22855 use super::*;
22856 #[derive(Clone, Debug, PartialEq)]
22857 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
22858 }
22859
22860 impl Scope {
22861 pub fn value(&self) -> std::option::Option<i32> {
22866 match self {
22867 Self::Unspecified => std::option::Option::Some(0),
22868 Self::Full => std::option::Option::Some(1),
22869 Self::Incremental => std::option::Option::Some(2),
22870 Self::UnknownValue(u) => u.0.value(),
22871 }
22872 }
22873
22874 pub fn name(&self) -> std::option::Option<&str> {
22879 match self {
22880 Self::Unspecified => std::option::Option::Some("SCOPE_UNSPECIFIED"),
22881 Self::Full => std::option::Option::Some("FULL"),
22882 Self::Incremental => std::option::Option::Some("INCREMENTAL"),
22883 Self::UnknownValue(u) => u.0.name(),
22884 }
22885 }
22886 }
22887
22888 impl std::default::Default for Scope {
22889 fn default() -> Self {
22890 use std::convert::From;
22891 Self::from(0)
22892 }
22893 }
22894
22895 impl std::fmt::Display for Scope {
22896 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
22897 wkt::internal::display_enum(f, self.name(), self.value())
22898 }
22899 }
22900
22901 impl std::convert::From<i32> for Scope {
22902 fn from(value: i32) -> Self {
22903 match value {
22904 0 => Self::Unspecified,
22905 1 => Self::Full,
22906 2 => Self::Incremental,
22907 _ => Self::UnknownValue(scope::UnknownValue(
22908 wkt::internal::UnknownEnumValue::Integer(value),
22909 )),
22910 }
22911 }
22912 }
22913
22914 impl std::convert::From<&str> for Scope {
22915 fn from(value: &str) -> Self {
22916 use std::string::ToString;
22917 match value {
22918 "SCOPE_UNSPECIFIED" => Self::Unspecified,
22919 "FULL" => Self::Full,
22920 "INCREMENTAL" => Self::Incremental,
22921 _ => Self::UnknownValue(scope::UnknownValue(
22922 wkt::internal::UnknownEnumValue::String(value.to_string()),
22923 )),
22924 }
22925 }
22926 }
22927
22928 impl serde::ser::Serialize for Scope {
22929 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22930 where
22931 S: serde::Serializer,
22932 {
22933 match self {
22934 Self::Unspecified => serializer.serialize_i32(0),
22935 Self::Full => serializer.serialize_i32(1),
22936 Self::Incremental => serializer.serialize_i32(2),
22937 Self::UnknownValue(u) => u.0.serialize(serializer),
22938 }
22939 }
22940 }
22941
22942 impl<'de> serde::de::Deserialize<'de> for Scope {
22943 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22944 where
22945 D: serde::Deserializer<'de>,
22946 {
22947 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Scope>::new(
22948 ".google.cloud.dataplex.v1.DataScanEvent.Scope",
22949 ))
22950 }
22951 }
22952
22953 #[derive(Clone, Debug, PartialEq)]
22955 #[non_exhaustive]
22956 pub enum Result {
22957 DataProfile(std::boxed::Box<crate::model::data_scan_event::DataProfileResult>),
22959 DataQuality(std::boxed::Box<crate::model::data_scan_event::DataQualityResult>),
22961 }
22962
22963 #[derive(Clone, Debug, PartialEq)]
22965 #[non_exhaustive]
22966 pub enum AppliedConfigs {
22967 DataProfileConfigs(
22969 std::boxed::Box<crate::model::data_scan_event::DataProfileAppliedConfigs>,
22970 ),
22971 DataQualityConfigs(
22973 std::boxed::Box<crate::model::data_scan_event::DataQualityAppliedConfigs>,
22974 ),
22975 }
22976}
22977
22978#[derive(Clone, Default, PartialEq)]
22981#[non_exhaustive]
22982pub struct DataQualityScanRuleResult {
22983 pub job_id: std::string::String,
22985
22986 pub data_source: std::string::String,
22988
22989 pub column: std::string::String,
22991
22992 pub rule_name: std::string::String,
22994
22995 pub rule_type: crate::model::data_quality_scan_rule_result::RuleType,
22997
22998 pub evalution_type: crate::model::data_quality_scan_rule_result::EvaluationType,
23000
23001 pub rule_dimension: std::string::String,
23003
23004 pub threshold_percent: f64,
23006
23007 pub result: crate::model::data_quality_scan_rule_result::Result,
23009
23010 pub evaluated_row_count: i64,
23013
23014 pub passed_row_count: i64,
23017
23018 pub null_row_count: i64,
23020
23021 pub assertion_row_count: i64,
23024
23025 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23026}
23027
23028impl DataQualityScanRuleResult {
23029 pub fn new() -> Self {
23030 std::default::Default::default()
23031 }
23032
23033 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23035 self.job_id = v.into();
23036 self
23037 }
23038
23039 pub fn set_data_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23041 self.data_source = v.into();
23042 self
23043 }
23044
23045 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23047 self.column = v.into();
23048 self
23049 }
23050
23051 pub fn set_rule_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23053 self.rule_name = v.into();
23054 self
23055 }
23056
23057 pub fn set_rule_type<
23059 T: std::convert::Into<crate::model::data_quality_scan_rule_result::RuleType>,
23060 >(
23061 mut self,
23062 v: T,
23063 ) -> Self {
23064 self.rule_type = v.into();
23065 self
23066 }
23067
23068 pub fn set_evalution_type<
23070 T: std::convert::Into<crate::model::data_quality_scan_rule_result::EvaluationType>,
23071 >(
23072 mut self,
23073 v: T,
23074 ) -> Self {
23075 self.evalution_type = v.into();
23076 self
23077 }
23078
23079 pub fn set_rule_dimension<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23081 self.rule_dimension = v.into();
23082 self
23083 }
23084
23085 pub fn set_threshold_percent<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
23087 self.threshold_percent = v.into();
23088 self
23089 }
23090
23091 pub fn set_result<
23093 T: std::convert::Into<crate::model::data_quality_scan_rule_result::Result>,
23094 >(
23095 mut self,
23096 v: T,
23097 ) -> Self {
23098 self.result = v.into();
23099 self
23100 }
23101
23102 pub fn set_evaluated_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23104 self.evaluated_row_count = v.into();
23105 self
23106 }
23107
23108 pub fn set_passed_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23110 self.passed_row_count = v.into();
23111 self
23112 }
23113
23114 pub fn set_null_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23116 self.null_row_count = v.into();
23117 self
23118 }
23119
23120 pub fn set_assertion_row_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
23122 self.assertion_row_count = v.into();
23123 self
23124 }
23125}
23126
23127impl wkt::message::Message for DataQualityScanRuleResult {
23128 fn typename() -> &'static str {
23129 "type.googleapis.com/google.cloud.dataplex.v1.DataQualityScanRuleResult"
23130 }
23131}
23132
23133pub mod data_quality_scan_rule_result {
23135 #[allow(unused_imports)]
23136 use super::*;
23137
23138 #[derive(Clone, Debug, PartialEq)]
23154 #[non_exhaustive]
23155 pub enum RuleType {
23156 Unspecified,
23158 NonNullExpectation,
23163 RangeExpectation,
23168 RegexExpectation,
23173 RowConditionExpectation,
23178 SetExpectation,
23183 StatisticRangeExpectation,
23188 TableConditionExpectation,
23193 UniquenessExpectation,
23198 SqlAssertion,
23203 UnknownValue(rule_type::UnknownValue),
23208 }
23209
23210 #[doc(hidden)]
23211 pub mod rule_type {
23212 #[allow(unused_imports)]
23213 use super::*;
23214 #[derive(Clone, Debug, PartialEq)]
23215 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23216 }
23217
23218 impl RuleType {
23219 pub fn value(&self) -> std::option::Option<i32> {
23224 match self {
23225 Self::Unspecified => std::option::Option::Some(0),
23226 Self::NonNullExpectation => std::option::Option::Some(1),
23227 Self::RangeExpectation => std::option::Option::Some(2),
23228 Self::RegexExpectation => std::option::Option::Some(3),
23229 Self::RowConditionExpectation => std::option::Option::Some(4),
23230 Self::SetExpectation => std::option::Option::Some(5),
23231 Self::StatisticRangeExpectation => std::option::Option::Some(6),
23232 Self::TableConditionExpectation => std::option::Option::Some(7),
23233 Self::UniquenessExpectation => std::option::Option::Some(8),
23234 Self::SqlAssertion => std::option::Option::Some(9),
23235 Self::UnknownValue(u) => u.0.value(),
23236 }
23237 }
23238
23239 pub fn name(&self) -> std::option::Option<&str> {
23244 match self {
23245 Self::Unspecified => std::option::Option::Some("RULE_TYPE_UNSPECIFIED"),
23246 Self::NonNullExpectation => std::option::Option::Some("NON_NULL_EXPECTATION"),
23247 Self::RangeExpectation => std::option::Option::Some("RANGE_EXPECTATION"),
23248 Self::RegexExpectation => std::option::Option::Some("REGEX_EXPECTATION"),
23249 Self::RowConditionExpectation => {
23250 std::option::Option::Some("ROW_CONDITION_EXPECTATION")
23251 }
23252 Self::SetExpectation => std::option::Option::Some("SET_EXPECTATION"),
23253 Self::StatisticRangeExpectation => {
23254 std::option::Option::Some("STATISTIC_RANGE_EXPECTATION")
23255 }
23256 Self::TableConditionExpectation => {
23257 std::option::Option::Some("TABLE_CONDITION_EXPECTATION")
23258 }
23259 Self::UniquenessExpectation => std::option::Option::Some("UNIQUENESS_EXPECTATION"),
23260 Self::SqlAssertion => std::option::Option::Some("SQL_ASSERTION"),
23261 Self::UnknownValue(u) => u.0.name(),
23262 }
23263 }
23264 }
23265
23266 impl std::default::Default for RuleType {
23267 fn default() -> Self {
23268 use std::convert::From;
23269 Self::from(0)
23270 }
23271 }
23272
23273 impl std::fmt::Display for RuleType {
23274 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23275 wkt::internal::display_enum(f, self.name(), self.value())
23276 }
23277 }
23278
23279 impl std::convert::From<i32> for RuleType {
23280 fn from(value: i32) -> Self {
23281 match value {
23282 0 => Self::Unspecified,
23283 1 => Self::NonNullExpectation,
23284 2 => Self::RangeExpectation,
23285 3 => Self::RegexExpectation,
23286 4 => Self::RowConditionExpectation,
23287 5 => Self::SetExpectation,
23288 6 => Self::StatisticRangeExpectation,
23289 7 => Self::TableConditionExpectation,
23290 8 => Self::UniquenessExpectation,
23291 9 => Self::SqlAssertion,
23292 _ => Self::UnknownValue(rule_type::UnknownValue(
23293 wkt::internal::UnknownEnumValue::Integer(value),
23294 )),
23295 }
23296 }
23297 }
23298
23299 impl std::convert::From<&str> for RuleType {
23300 fn from(value: &str) -> Self {
23301 use std::string::ToString;
23302 match value {
23303 "RULE_TYPE_UNSPECIFIED" => Self::Unspecified,
23304 "NON_NULL_EXPECTATION" => Self::NonNullExpectation,
23305 "RANGE_EXPECTATION" => Self::RangeExpectation,
23306 "REGEX_EXPECTATION" => Self::RegexExpectation,
23307 "ROW_CONDITION_EXPECTATION" => Self::RowConditionExpectation,
23308 "SET_EXPECTATION" => Self::SetExpectation,
23309 "STATISTIC_RANGE_EXPECTATION" => Self::StatisticRangeExpectation,
23310 "TABLE_CONDITION_EXPECTATION" => Self::TableConditionExpectation,
23311 "UNIQUENESS_EXPECTATION" => Self::UniquenessExpectation,
23312 "SQL_ASSERTION" => Self::SqlAssertion,
23313 _ => Self::UnknownValue(rule_type::UnknownValue(
23314 wkt::internal::UnknownEnumValue::String(value.to_string()),
23315 )),
23316 }
23317 }
23318 }
23319
23320 impl serde::ser::Serialize for RuleType {
23321 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23322 where
23323 S: serde::Serializer,
23324 {
23325 match self {
23326 Self::Unspecified => serializer.serialize_i32(0),
23327 Self::NonNullExpectation => serializer.serialize_i32(1),
23328 Self::RangeExpectation => serializer.serialize_i32(2),
23329 Self::RegexExpectation => serializer.serialize_i32(3),
23330 Self::RowConditionExpectation => serializer.serialize_i32(4),
23331 Self::SetExpectation => serializer.serialize_i32(5),
23332 Self::StatisticRangeExpectation => serializer.serialize_i32(6),
23333 Self::TableConditionExpectation => serializer.serialize_i32(7),
23334 Self::UniquenessExpectation => serializer.serialize_i32(8),
23335 Self::SqlAssertion => serializer.serialize_i32(9),
23336 Self::UnknownValue(u) => u.0.serialize(serializer),
23337 }
23338 }
23339 }
23340
23341 impl<'de> serde::de::Deserialize<'de> for RuleType {
23342 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23343 where
23344 D: serde::Deserializer<'de>,
23345 {
23346 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RuleType>::new(
23347 ".google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType",
23348 ))
23349 }
23350 }
23351
23352 #[derive(Clone, Debug, PartialEq)]
23368 #[non_exhaustive]
23369 pub enum EvaluationType {
23370 Unspecified,
23372 PerRow,
23374 Aggregate,
23376 UnknownValue(evaluation_type::UnknownValue),
23381 }
23382
23383 #[doc(hidden)]
23384 pub mod evaluation_type {
23385 #[allow(unused_imports)]
23386 use super::*;
23387 #[derive(Clone, Debug, PartialEq)]
23388 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23389 }
23390
23391 impl EvaluationType {
23392 pub fn value(&self) -> std::option::Option<i32> {
23397 match self {
23398 Self::Unspecified => std::option::Option::Some(0),
23399 Self::PerRow => std::option::Option::Some(1),
23400 Self::Aggregate => std::option::Option::Some(2),
23401 Self::UnknownValue(u) => u.0.value(),
23402 }
23403 }
23404
23405 pub fn name(&self) -> std::option::Option<&str> {
23410 match self {
23411 Self::Unspecified => std::option::Option::Some("EVALUATION_TYPE_UNSPECIFIED"),
23412 Self::PerRow => std::option::Option::Some("PER_ROW"),
23413 Self::Aggregate => std::option::Option::Some("AGGREGATE"),
23414 Self::UnknownValue(u) => u.0.name(),
23415 }
23416 }
23417 }
23418
23419 impl std::default::Default for EvaluationType {
23420 fn default() -> Self {
23421 use std::convert::From;
23422 Self::from(0)
23423 }
23424 }
23425
23426 impl std::fmt::Display for EvaluationType {
23427 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23428 wkt::internal::display_enum(f, self.name(), self.value())
23429 }
23430 }
23431
23432 impl std::convert::From<i32> for EvaluationType {
23433 fn from(value: i32) -> Self {
23434 match value {
23435 0 => Self::Unspecified,
23436 1 => Self::PerRow,
23437 2 => Self::Aggregate,
23438 _ => Self::UnknownValue(evaluation_type::UnknownValue(
23439 wkt::internal::UnknownEnumValue::Integer(value),
23440 )),
23441 }
23442 }
23443 }
23444
23445 impl std::convert::From<&str> for EvaluationType {
23446 fn from(value: &str) -> Self {
23447 use std::string::ToString;
23448 match value {
23449 "EVALUATION_TYPE_UNSPECIFIED" => Self::Unspecified,
23450 "PER_ROW" => Self::PerRow,
23451 "AGGREGATE" => Self::Aggregate,
23452 _ => Self::UnknownValue(evaluation_type::UnknownValue(
23453 wkt::internal::UnknownEnumValue::String(value.to_string()),
23454 )),
23455 }
23456 }
23457 }
23458
23459 impl serde::ser::Serialize for EvaluationType {
23460 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23461 where
23462 S: serde::Serializer,
23463 {
23464 match self {
23465 Self::Unspecified => serializer.serialize_i32(0),
23466 Self::PerRow => serializer.serialize_i32(1),
23467 Self::Aggregate => serializer.serialize_i32(2),
23468 Self::UnknownValue(u) => u.0.serialize(serializer),
23469 }
23470 }
23471 }
23472
23473 impl<'de> serde::de::Deserialize<'de> for EvaluationType {
23474 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23475 where
23476 D: serde::Deserializer<'de>,
23477 {
23478 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EvaluationType>::new(
23479 ".google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType",
23480 ))
23481 }
23482 }
23483
23484 #[derive(Clone, Debug, PartialEq)]
23500 #[non_exhaustive]
23501 pub enum Result {
23502 Unspecified,
23504 Passed,
23506 Failed,
23508 UnknownValue(result::UnknownValue),
23513 }
23514
23515 #[doc(hidden)]
23516 pub mod result {
23517 #[allow(unused_imports)]
23518 use super::*;
23519 #[derive(Clone, Debug, PartialEq)]
23520 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23521 }
23522
23523 impl Result {
23524 pub fn value(&self) -> std::option::Option<i32> {
23529 match self {
23530 Self::Unspecified => std::option::Option::Some(0),
23531 Self::Passed => std::option::Option::Some(1),
23532 Self::Failed => std::option::Option::Some(2),
23533 Self::UnknownValue(u) => u.0.value(),
23534 }
23535 }
23536
23537 pub fn name(&self) -> std::option::Option<&str> {
23542 match self {
23543 Self::Unspecified => std::option::Option::Some("RESULT_UNSPECIFIED"),
23544 Self::Passed => std::option::Option::Some("PASSED"),
23545 Self::Failed => std::option::Option::Some("FAILED"),
23546 Self::UnknownValue(u) => u.0.name(),
23547 }
23548 }
23549 }
23550
23551 impl std::default::Default for Result {
23552 fn default() -> Self {
23553 use std::convert::From;
23554 Self::from(0)
23555 }
23556 }
23557
23558 impl std::fmt::Display for Result {
23559 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23560 wkt::internal::display_enum(f, self.name(), self.value())
23561 }
23562 }
23563
23564 impl std::convert::From<i32> for Result {
23565 fn from(value: i32) -> Self {
23566 match value {
23567 0 => Self::Unspecified,
23568 1 => Self::Passed,
23569 2 => Self::Failed,
23570 _ => Self::UnknownValue(result::UnknownValue(
23571 wkt::internal::UnknownEnumValue::Integer(value),
23572 )),
23573 }
23574 }
23575 }
23576
23577 impl std::convert::From<&str> for Result {
23578 fn from(value: &str) -> Self {
23579 use std::string::ToString;
23580 match value {
23581 "RESULT_UNSPECIFIED" => Self::Unspecified,
23582 "PASSED" => Self::Passed,
23583 "FAILED" => Self::Failed,
23584 _ => Self::UnknownValue(result::UnknownValue(
23585 wkt::internal::UnknownEnumValue::String(value.to_string()),
23586 )),
23587 }
23588 }
23589 }
23590
23591 impl serde::ser::Serialize for Result {
23592 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23593 where
23594 S: serde::Serializer,
23595 {
23596 match self {
23597 Self::Unspecified => serializer.serialize_i32(0),
23598 Self::Passed => serializer.serialize_i32(1),
23599 Self::Failed => serializer.serialize_i32(2),
23600 Self::UnknownValue(u) => u.0.serialize(serializer),
23601 }
23602 }
23603 }
23604
23605 impl<'de> serde::de::Deserialize<'de> for Result {
23606 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23607 where
23608 D: serde::Deserializer<'de>,
23609 {
23610 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Result>::new(
23611 ".google.cloud.dataplex.v1.DataQualityScanRuleResult.Result",
23612 ))
23613 }
23614 }
23615}
23616
23617#[derive(Clone, Default, PartialEq)]
23619#[non_exhaustive]
23620pub struct BusinessGlossaryEvent {
23621 pub message: std::string::String,
23623
23624 pub event_type: crate::model::business_glossary_event::EventType,
23626
23627 pub resource: std::string::String,
23629
23630 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23631}
23632
23633impl BusinessGlossaryEvent {
23634 pub fn new() -> Self {
23635 std::default::Default::default()
23636 }
23637
23638 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23640 self.message = v.into();
23641 self
23642 }
23643
23644 pub fn set_event_type<
23646 T: std::convert::Into<crate::model::business_glossary_event::EventType>,
23647 >(
23648 mut self,
23649 v: T,
23650 ) -> Self {
23651 self.event_type = v.into();
23652 self
23653 }
23654
23655 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23657 self.resource = v.into();
23658 self
23659 }
23660}
23661
23662impl wkt::message::Message for BusinessGlossaryEvent {
23663 fn typename() -> &'static str {
23664 "type.googleapis.com/google.cloud.dataplex.v1.BusinessGlossaryEvent"
23665 }
23666}
23667
23668pub mod business_glossary_event {
23670 #[allow(unused_imports)]
23671 use super::*;
23672
23673 #[derive(Clone, Debug, PartialEq)]
23689 #[non_exhaustive]
23690 pub enum EventType {
23691 Unspecified,
23693 GlossaryCreate,
23695 GlossaryUpdate,
23697 GlossaryDelete,
23699 GlossaryCategoryCreate,
23701 GlossaryCategoryUpdate,
23703 GlossaryCategoryDelete,
23705 GlossaryTermCreate,
23707 GlossaryTermUpdate,
23709 GlossaryTermDelete,
23711 UnknownValue(event_type::UnknownValue),
23716 }
23717
23718 #[doc(hidden)]
23719 pub mod event_type {
23720 #[allow(unused_imports)]
23721 use super::*;
23722 #[derive(Clone, Debug, PartialEq)]
23723 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23724 }
23725
23726 impl EventType {
23727 pub fn value(&self) -> std::option::Option<i32> {
23732 match self {
23733 Self::Unspecified => std::option::Option::Some(0),
23734 Self::GlossaryCreate => std::option::Option::Some(1),
23735 Self::GlossaryUpdate => std::option::Option::Some(2),
23736 Self::GlossaryDelete => std::option::Option::Some(3),
23737 Self::GlossaryCategoryCreate => std::option::Option::Some(4),
23738 Self::GlossaryCategoryUpdate => std::option::Option::Some(5),
23739 Self::GlossaryCategoryDelete => std::option::Option::Some(6),
23740 Self::GlossaryTermCreate => std::option::Option::Some(7),
23741 Self::GlossaryTermUpdate => std::option::Option::Some(8),
23742 Self::GlossaryTermDelete => std::option::Option::Some(9),
23743 Self::UnknownValue(u) => u.0.value(),
23744 }
23745 }
23746
23747 pub fn name(&self) -> std::option::Option<&str> {
23752 match self {
23753 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
23754 Self::GlossaryCreate => std::option::Option::Some("GLOSSARY_CREATE"),
23755 Self::GlossaryUpdate => std::option::Option::Some("GLOSSARY_UPDATE"),
23756 Self::GlossaryDelete => std::option::Option::Some("GLOSSARY_DELETE"),
23757 Self::GlossaryCategoryCreate => {
23758 std::option::Option::Some("GLOSSARY_CATEGORY_CREATE")
23759 }
23760 Self::GlossaryCategoryUpdate => {
23761 std::option::Option::Some("GLOSSARY_CATEGORY_UPDATE")
23762 }
23763 Self::GlossaryCategoryDelete => {
23764 std::option::Option::Some("GLOSSARY_CATEGORY_DELETE")
23765 }
23766 Self::GlossaryTermCreate => std::option::Option::Some("GLOSSARY_TERM_CREATE"),
23767 Self::GlossaryTermUpdate => std::option::Option::Some("GLOSSARY_TERM_UPDATE"),
23768 Self::GlossaryTermDelete => std::option::Option::Some("GLOSSARY_TERM_DELETE"),
23769 Self::UnknownValue(u) => u.0.name(),
23770 }
23771 }
23772 }
23773
23774 impl std::default::Default for EventType {
23775 fn default() -> Self {
23776 use std::convert::From;
23777 Self::from(0)
23778 }
23779 }
23780
23781 impl std::fmt::Display for EventType {
23782 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23783 wkt::internal::display_enum(f, self.name(), self.value())
23784 }
23785 }
23786
23787 impl std::convert::From<i32> for EventType {
23788 fn from(value: i32) -> Self {
23789 match value {
23790 0 => Self::Unspecified,
23791 1 => Self::GlossaryCreate,
23792 2 => Self::GlossaryUpdate,
23793 3 => Self::GlossaryDelete,
23794 4 => Self::GlossaryCategoryCreate,
23795 5 => Self::GlossaryCategoryUpdate,
23796 6 => Self::GlossaryCategoryDelete,
23797 7 => Self::GlossaryTermCreate,
23798 8 => Self::GlossaryTermUpdate,
23799 9 => Self::GlossaryTermDelete,
23800 _ => Self::UnknownValue(event_type::UnknownValue(
23801 wkt::internal::UnknownEnumValue::Integer(value),
23802 )),
23803 }
23804 }
23805 }
23806
23807 impl std::convert::From<&str> for EventType {
23808 fn from(value: &str) -> Self {
23809 use std::string::ToString;
23810 match value {
23811 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
23812 "GLOSSARY_CREATE" => Self::GlossaryCreate,
23813 "GLOSSARY_UPDATE" => Self::GlossaryUpdate,
23814 "GLOSSARY_DELETE" => Self::GlossaryDelete,
23815 "GLOSSARY_CATEGORY_CREATE" => Self::GlossaryCategoryCreate,
23816 "GLOSSARY_CATEGORY_UPDATE" => Self::GlossaryCategoryUpdate,
23817 "GLOSSARY_CATEGORY_DELETE" => Self::GlossaryCategoryDelete,
23818 "GLOSSARY_TERM_CREATE" => Self::GlossaryTermCreate,
23819 "GLOSSARY_TERM_UPDATE" => Self::GlossaryTermUpdate,
23820 "GLOSSARY_TERM_DELETE" => Self::GlossaryTermDelete,
23821 _ => Self::UnknownValue(event_type::UnknownValue(
23822 wkt::internal::UnknownEnumValue::String(value.to_string()),
23823 )),
23824 }
23825 }
23826 }
23827
23828 impl serde::ser::Serialize for EventType {
23829 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23830 where
23831 S: serde::Serializer,
23832 {
23833 match self {
23834 Self::Unspecified => serializer.serialize_i32(0),
23835 Self::GlossaryCreate => serializer.serialize_i32(1),
23836 Self::GlossaryUpdate => serializer.serialize_i32(2),
23837 Self::GlossaryDelete => serializer.serialize_i32(3),
23838 Self::GlossaryCategoryCreate => serializer.serialize_i32(4),
23839 Self::GlossaryCategoryUpdate => serializer.serialize_i32(5),
23840 Self::GlossaryCategoryDelete => serializer.serialize_i32(6),
23841 Self::GlossaryTermCreate => serializer.serialize_i32(7),
23842 Self::GlossaryTermUpdate => serializer.serialize_i32(8),
23843 Self::GlossaryTermDelete => serializer.serialize_i32(9),
23844 Self::UnknownValue(u) => u.0.serialize(serializer),
23845 }
23846 }
23847 }
23848
23849 impl<'de> serde::de::Deserialize<'de> for EventType {
23850 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23851 where
23852 D: serde::Deserializer<'de>,
23853 {
23854 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
23855 ".google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType",
23856 ))
23857 }
23858 }
23859}
23860
23861#[derive(Clone, Default, PartialEq)]
23863#[non_exhaustive]
23864pub struct EntryLinkEvent {
23865 pub message: std::string::String,
23867
23868 pub event_type: crate::model::entry_link_event::EventType,
23870
23871 pub resource: std::string::String,
23873
23874 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23875}
23876
23877impl EntryLinkEvent {
23878 pub fn new() -> Self {
23879 std::default::Default::default()
23880 }
23881
23882 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23884 self.message = v.into();
23885 self
23886 }
23887
23888 pub fn set_event_type<T: std::convert::Into<crate::model::entry_link_event::EventType>>(
23890 mut self,
23891 v: T,
23892 ) -> Self {
23893 self.event_type = v.into();
23894 self
23895 }
23896
23897 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23899 self.resource = v.into();
23900 self
23901 }
23902}
23903
23904impl wkt::message::Message for EntryLinkEvent {
23905 fn typename() -> &'static str {
23906 "type.googleapis.com/google.cloud.dataplex.v1.EntryLinkEvent"
23907 }
23908}
23909
23910pub mod entry_link_event {
23912 #[allow(unused_imports)]
23913 use super::*;
23914
23915 #[derive(Clone, Debug, PartialEq)]
23931 #[non_exhaustive]
23932 pub enum EventType {
23933 Unspecified,
23935 EntryLinkCreate,
23937 EntryLinkDelete,
23939 UnknownValue(event_type::UnknownValue),
23944 }
23945
23946 #[doc(hidden)]
23947 pub mod event_type {
23948 #[allow(unused_imports)]
23949 use super::*;
23950 #[derive(Clone, Debug, PartialEq)]
23951 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
23952 }
23953
23954 impl EventType {
23955 pub fn value(&self) -> std::option::Option<i32> {
23960 match self {
23961 Self::Unspecified => std::option::Option::Some(0),
23962 Self::EntryLinkCreate => std::option::Option::Some(1),
23963 Self::EntryLinkDelete => std::option::Option::Some(2),
23964 Self::UnknownValue(u) => u.0.value(),
23965 }
23966 }
23967
23968 pub fn name(&self) -> std::option::Option<&str> {
23973 match self {
23974 Self::Unspecified => std::option::Option::Some("EVENT_TYPE_UNSPECIFIED"),
23975 Self::EntryLinkCreate => std::option::Option::Some("ENTRY_LINK_CREATE"),
23976 Self::EntryLinkDelete => std::option::Option::Some("ENTRY_LINK_DELETE"),
23977 Self::UnknownValue(u) => u.0.name(),
23978 }
23979 }
23980 }
23981
23982 impl std::default::Default for EventType {
23983 fn default() -> Self {
23984 use std::convert::From;
23985 Self::from(0)
23986 }
23987 }
23988
23989 impl std::fmt::Display for EventType {
23990 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
23991 wkt::internal::display_enum(f, self.name(), self.value())
23992 }
23993 }
23994
23995 impl std::convert::From<i32> for EventType {
23996 fn from(value: i32) -> Self {
23997 match value {
23998 0 => Self::Unspecified,
23999 1 => Self::EntryLinkCreate,
24000 2 => Self::EntryLinkDelete,
24001 _ => Self::UnknownValue(event_type::UnknownValue(
24002 wkt::internal::UnknownEnumValue::Integer(value),
24003 )),
24004 }
24005 }
24006 }
24007
24008 impl std::convert::From<&str> for EventType {
24009 fn from(value: &str) -> Self {
24010 use std::string::ToString;
24011 match value {
24012 "EVENT_TYPE_UNSPECIFIED" => Self::Unspecified,
24013 "ENTRY_LINK_CREATE" => Self::EntryLinkCreate,
24014 "ENTRY_LINK_DELETE" => Self::EntryLinkDelete,
24015 _ => Self::UnknownValue(event_type::UnknownValue(
24016 wkt::internal::UnknownEnumValue::String(value.to_string()),
24017 )),
24018 }
24019 }
24020 }
24021
24022 impl serde::ser::Serialize for EventType {
24023 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24024 where
24025 S: serde::Serializer,
24026 {
24027 match self {
24028 Self::Unspecified => serializer.serialize_i32(0),
24029 Self::EntryLinkCreate => serializer.serialize_i32(1),
24030 Self::EntryLinkDelete => serializer.serialize_i32(2),
24031 Self::UnknownValue(u) => u.0.serialize(serializer),
24032 }
24033 }
24034 }
24035
24036 impl<'de> serde::de::Deserialize<'de> for EventType {
24037 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24038 where
24039 D: serde::Deserializer<'de>,
24040 {
24041 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EventType>::new(
24042 ".google.cloud.dataplex.v1.EntryLinkEvent.EventType",
24043 ))
24044 }
24045 }
24046}
24047
24048#[derive(Clone, Default, PartialEq)]
24050#[non_exhaustive]
24051pub struct CreateEntityRequest {
24052 pub parent: std::string::String,
24055
24056 pub entity: std::option::Option<crate::model::Entity>,
24058
24059 pub validate_only: bool,
24062
24063 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24064}
24065
24066impl CreateEntityRequest {
24067 pub fn new() -> Self {
24068 std::default::Default::default()
24069 }
24070
24071 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24073 self.parent = v.into();
24074 self
24075 }
24076
24077 pub fn set_entity<T>(mut self, v: T) -> Self
24079 where
24080 T: std::convert::Into<crate::model::Entity>,
24081 {
24082 self.entity = std::option::Option::Some(v.into());
24083 self
24084 }
24085
24086 pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
24088 where
24089 T: std::convert::Into<crate::model::Entity>,
24090 {
24091 self.entity = v.map(|x| x.into());
24092 self
24093 }
24094
24095 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24097 self.validate_only = v.into();
24098 self
24099 }
24100}
24101
24102impl wkt::message::Message for CreateEntityRequest {
24103 fn typename() -> &'static str {
24104 "type.googleapis.com/google.cloud.dataplex.v1.CreateEntityRequest"
24105 }
24106}
24107
24108#[derive(Clone, Default, PartialEq)]
24113#[non_exhaustive]
24114pub struct UpdateEntityRequest {
24115 pub entity: std::option::Option<crate::model::Entity>,
24117
24118 pub validate_only: bool,
24121
24122 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24123}
24124
24125impl UpdateEntityRequest {
24126 pub fn new() -> Self {
24127 std::default::Default::default()
24128 }
24129
24130 pub fn set_entity<T>(mut self, v: T) -> Self
24132 where
24133 T: std::convert::Into<crate::model::Entity>,
24134 {
24135 self.entity = std::option::Option::Some(v.into());
24136 self
24137 }
24138
24139 pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
24141 where
24142 T: std::convert::Into<crate::model::Entity>,
24143 {
24144 self.entity = v.map(|x| x.into());
24145 self
24146 }
24147
24148 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24150 self.validate_only = v.into();
24151 self
24152 }
24153}
24154
24155impl wkt::message::Message for UpdateEntityRequest {
24156 fn typename() -> &'static str {
24157 "type.googleapis.com/google.cloud.dataplex.v1.UpdateEntityRequest"
24158 }
24159}
24160
24161#[derive(Clone, Default, PartialEq)]
24163#[non_exhaustive]
24164pub struct DeleteEntityRequest {
24165 pub name: std::string::String,
24168
24169 pub etag: std::string::String,
24172
24173 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24174}
24175
24176impl DeleteEntityRequest {
24177 pub fn new() -> Self {
24178 std::default::Default::default()
24179 }
24180
24181 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24183 self.name = v.into();
24184 self
24185 }
24186
24187 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24189 self.etag = v.into();
24190 self
24191 }
24192}
24193
24194impl wkt::message::Message for DeleteEntityRequest {
24195 fn typename() -> &'static str {
24196 "type.googleapis.com/google.cloud.dataplex.v1.DeleteEntityRequest"
24197 }
24198}
24199
24200#[derive(Clone, Default, PartialEq)]
24202#[non_exhaustive]
24203pub struct ListEntitiesRequest {
24204 pub parent: std::string::String,
24207
24208 pub view: crate::model::list_entities_request::EntityView,
24210
24211 pub page_size: i32,
24216
24217 pub page_token: std::string::String,
24222
24223 pub filter: std::string::String,
24232
24233 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24234}
24235
24236impl ListEntitiesRequest {
24237 pub fn new() -> Self {
24238 std::default::Default::default()
24239 }
24240
24241 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24243 self.parent = v.into();
24244 self
24245 }
24246
24247 pub fn set_view<T: std::convert::Into<crate::model::list_entities_request::EntityView>>(
24249 mut self,
24250 v: T,
24251 ) -> Self {
24252 self.view = v.into();
24253 self
24254 }
24255
24256 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24258 self.page_size = v.into();
24259 self
24260 }
24261
24262 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24264 self.page_token = v.into();
24265 self
24266 }
24267
24268 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24270 self.filter = v.into();
24271 self
24272 }
24273}
24274
24275impl wkt::message::Message for ListEntitiesRequest {
24276 fn typename() -> &'static str {
24277 "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesRequest"
24278 }
24279}
24280
24281pub mod list_entities_request {
24283 #[allow(unused_imports)]
24284 use super::*;
24285
24286 #[derive(Clone, Debug, PartialEq)]
24302 #[non_exhaustive]
24303 pub enum EntityView {
24304 Unspecified,
24307 Tables,
24309 Filesets,
24311 UnknownValue(entity_view::UnknownValue),
24316 }
24317
24318 #[doc(hidden)]
24319 pub mod entity_view {
24320 #[allow(unused_imports)]
24321 use super::*;
24322 #[derive(Clone, Debug, PartialEq)]
24323 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24324 }
24325
24326 impl EntityView {
24327 pub fn value(&self) -> std::option::Option<i32> {
24332 match self {
24333 Self::Unspecified => std::option::Option::Some(0),
24334 Self::Tables => std::option::Option::Some(1),
24335 Self::Filesets => std::option::Option::Some(2),
24336 Self::UnknownValue(u) => u.0.value(),
24337 }
24338 }
24339
24340 pub fn name(&self) -> std::option::Option<&str> {
24345 match self {
24346 Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
24347 Self::Tables => std::option::Option::Some("TABLES"),
24348 Self::Filesets => std::option::Option::Some("FILESETS"),
24349 Self::UnknownValue(u) => u.0.name(),
24350 }
24351 }
24352 }
24353
24354 impl std::default::Default for EntityView {
24355 fn default() -> Self {
24356 use std::convert::From;
24357 Self::from(0)
24358 }
24359 }
24360
24361 impl std::fmt::Display for EntityView {
24362 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24363 wkt::internal::display_enum(f, self.name(), self.value())
24364 }
24365 }
24366
24367 impl std::convert::From<i32> for EntityView {
24368 fn from(value: i32) -> Self {
24369 match value {
24370 0 => Self::Unspecified,
24371 1 => Self::Tables,
24372 2 => Self::Filesets,
24373 _ => Self::UnknownValue(entity_view::UnknownValue(
24374 wkt::internal::UnknownEnumValue::Integer(value),
24375 )),
24376 }
24377 }
24378 }
24379
24380 impl std::convert::From<&str> for EntityView {
24381 fn from(value: &str) -> Self {
24382 use std::string::ToString;
24383 match value {
24384 "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
24385 "TABLES" => Self::Tables,
24386 "FILESETS" => Self::Filesets,
24387 _ => Self::UnknownValue(entity_view::UnknownValue(
24388 wkt::internal::UnknownEnumValue::String(value.to_string()),
24389 )),
24390 }
24391 }
24392 }
24393
24394 impl serde::ser::Serialize for EntityView {
24395 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24396 where
24397 S: serde::Serializer,
24398 {
24399 match self {
24400 Self::Unspecified => serializer.serialize_i32(0),
24401 Self::Tables => serializer.serialize_i32(1),
24402 Self::Filesets => serializer.serialize_i32(2),
24403 Self::UnknownValue(u) => u.0.serialize(serializer),
24404 }
24405 }
24406 }
24407
24408 impl<'de> serde::de::Deserialize<'de> for EntityView {
24409 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24410 where
24411 D: serde::Deserializer<'de>,
24412 {
24413 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
24414 ".google.cloud.dataplex.v1.ListEntitiesRequest.EntityView",
24415 ))
24416 }
24417 }
24418}
24419
24420#[derive(Clone, Default, PartialEq)]
24422#[non_exhaustive]
24423pub struct ListEntitiesResponse {
24424 pub entities: std::vec::Vec<crate::model::Entity>,
24426
24427 pub next_page_token: std::string::String,
24430
24431 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24432}
24433
24434impl ListEntitiesResponse {
24435 pub fn new() -> Self {
24436 std::default::Default::default()
24437 }
24438
24439 pub fn set_entities<T, V>(mut self, v: T) -> Self
24441 where
24442 T: std::iter::IntoIterator<Item = V>,
24443 V: std::convert::Into<crate::model::Entity>,
24444 {
24445 use std::iter::Iterator;
24446 self.entities = v.into_iter().map(|i| i.into()).collect();
24447 self
24448 }
24449
24450 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24452 self.next_page_token = v.into();
24453 self
24454 }
24455}
24456
24457impl wkt::message::Message for ListEntitiesResponse {
24458 fn typename() -> &'static str {
24459 "type.googleapis.com/google.cloud.dataplex.v1.ListEntitiesResponse"
24460 }
24461}
24462
24463#[doc(hidden)]
24464impl gax::paginator::internal::PageableResponse for ListEntitiesResponse {
24465 type PageItem = crate::model::Entity;
24466
24467 fn items(self) -> std::vec::Vec<Self::PageItem> {
24468 self.entities
24469 }
24470
24471 fn next_page_token(&self) -> std::string::String {
24472 use std::clone::Clone;
24473 self.next_page_token.clone()
24474 }
24475}
24476
24477#[derive(Clone, Default, PartialEq)]
24479#[non_exhaustive]
24480pub struct GetEntityRequest {
24481 pub name: std::string::String,
24484
24485 pub view: crate::model::get_entity_request::EntityView,
24488
24489 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24490}
24491
24492impl GetEntityRequest {
24493 pub fn new() -> Self {
24494 std::default::Default::default()
24495 }
24496
24497 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24499 self.name = v.into();
24500 self
24501 }
24502
24503 pub fn set_view<T: std::convert::Into<crate::model::get_entity_request::EntityView>>(
24505 mut self,
24506 v: T,
24507 ) -> Self {
24508 self.view = v.into();
24509 self
24510 }
24511}
24512
24513impl wkt::message::Message for GetEntityRequest {
24514 fn typename() -> &'static str {
24515 "type.googleapis.com/google.cloud.dataplex.v1.GetEntityRequest"
24516 }
24517}
24518
24519pub mod get_entity_request {
24521 #[allow(unused_imports)]
24522 use super::*;
24523
24524 #[derive(Clone, Debug, PartialEq)]
24540 #[non_exhaustive]
24541 pub enum EntityView {
24542 Unspecified,
24544 Basic,
24546 Schema,
24548 Full,
24550 UnknownValue(entity_view::UnknownValue),
24555 }
24556
24557 #[doc(hidden)]
24558 pub mod entity_view {
24559 #[allow(unused_imports)]
24560 use super::*;
24561 #[derive(Clone, Debug, PartialEq)]
24562 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24563 }
24564
24565 impl EntityView {
24566 pub fn value(&self) -> std::option::Option<i32> {
24571 match self {
24572 Self::Unspecified => std::option::Option::Some(0),
24573 Self::Basic => std::option::Option::Some(1),
24574 Self::Schema => std::option::Option::Some(2),
24575 Self::Full => std::option::Option::Some(4),
24576 Self::UnknownValue(u) => u.0.value(),
24577 }
24578 }
24579
24580 pub fn name(&self) -> std::option::Option<&str> {
24585 match self {
24586 Self::Unspecified => std::option::Option::Some("ENTITY_VIEW_UNSPECIFIED"),
24587 Self::Basic => std::option::Option::Some("BASIC"),
24588 Self::Schema => std::option::Option::Some("SCHEMA"),
24589 Self::Full => std::option::Option::Some("FULL"),
24590 Self::UnknownValue(u) => u.0.name(),
24591 }
24592 }
24593 }
24594
24595 impl std::default::Default for EntityView {
24596 fn default() -> Self {
24597 use std::convert::From;
24598 Self::from(0)
24599 }
24600 }
24601
24602 impl std::fmt::Display for EntityView {
24603 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24604 wkt::internal::display_enum(f, self.name(), self.value())
24605 }
24606 }
24607
24608 impl std::convert::From<i32> for EntityView {
24609 fn from(value: i32) -> Self {
24610 match value {
24611 0 => Self::Unspecified,
24612 1 => Self::Basic,
24613 2 => Self::Schema,
24614 4 => Self::Full,
24615 _ => Self::UnknownValue(entity_view::UnknownValue(
24616 wkt::internal::UnknownEnumValue::Integer(value),
24617 )),
24618 }
24619 }
24620 }
24621
24622 impl std::convert::From<&str> for EntityView {
24623 fn from(value: &str) -> Self {
24624 use std::string::ToString;
24625 match value {
24626 "ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
24627 "BASIC" => Self::Basic,
24628 "SCHEMA" => Self::Schema,
24629 "FULL" => Self::Full,
24630 _ => Self::UnknownValue(entity_view::UnknownValue(
24631 wkt::internal::UnknownEnumValue::String(value.to_string()),
24632 )),
24633 }
24634 }
24635 }
24636
24637 impl serde::ser::Serialize for EntityView {
24638 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24639 where
24640 S: serde::Serializer,
24641 {
24642 match self {
24643 Self::Unspecified => serializer.serialize_i32(0),
24644 Self::Basic => serializer.serialize_i32(1),
24645 Self::Schema => serializer.serialize_i32(2),
24646 Self::Full => serializer.serialize_i32(4),
24647 Self::UnknownValue(u) => u.0.serialize(serializer),
24648 }
24649 }
24650 }
24651
24652 impl<'de> serde::de::Deserialize<'de> for EntityView {
24653 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24654 where
24655 D: serde::Deserializer<'de>,
24656 {
24657 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityView>::new(
24658 ".google.cloud.dataplex.v1.GetEntityRequest.EntityView",
24659 ))
24660 }
24661 }
24662}
24663
24664#[derive(Clone, Default, PartialEq)]
24666#[non_exhaustive]
24667pub struct ListPartitionsRequest {
24668 pub parent: std::string::String,
24671
24672 pub page_size: i32,
24677
24678 pub page_token: std::string::String,
24683
24684 pub filter: std::string::String,
24704
24705 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24706}
24707
24708impl ListPartitionsRequest {
24709 pub fn new() -> Self {
24710 std::default::Default::default()
24711 }
24712
24713 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24715 self.parent = v.into();
24716 self
24717 }
24718
24719 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24721 self.page_size = v.into();
24722 self
24723 }
24724
24725 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24727 self.page_token = v.into();
24728 self
24729 }
24730
24731 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24733 self.filter = v.into();
24734 self
24735 }
24736}
24737
24738impl wkt::message::Message for ListPartitionsRequest {
24739 fn typename() -> &'static str {
24740 "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsRequest"
24741 }
24742}
24743
24744#[derive(Clone, Default, PartialEq)]
24746#[non_exhaustive]
24747pub struct CreatePartitionRequest {
24748 pub parent: std::string::String,
24751
24752 pub partition: std::option::Option<crate::model::Partition>,
24754
24755 pub validate_only: bool,
24758
24759 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24760}
24761
24762impl CreatePartitionRequest {
24763 pub fn new() -> Self {
24764 std::default::Default::default()
24765 }
24766
24767 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24769 self.parent = v.into();
24770 self
24771 }
24772
24773 pub fn set_partition<T>(mut self, v: T) -> Self
24775 where
24776 T: std::convert::Into<crate::model::Partition>,
24777 {
24778 self.partition = std::option::Option::Some(v.into());
24779 self
24780 }
24781
24782 pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
24784 where
24785 T: std::convert::Into<crate::model::Partition>,
24786 {
24787 self.partition = v.map(|x| x.into());
24788 self
24789 }
24790
24791 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24793 self.validate_only = v.into();
24794 self
24795 }
24796}
24797
24798impl wkt::message::Message for CreatePartitionRequest {
24799 fn typename() -> &'static str {
24800 "type.googleapis.com/google.cloud.dataplex.v1.CreatePartitionRequest"
24801 }
24802}
24803
24804#[derive(Clone, Default, PartialEq)]
24806#[non_exhaustive]
24807pub struct DeletePartitionRequest {
24808 pub name: std::string::String,
24814
24815 #[deprecated]
24817 pub etag: std::string::String,
24818
24819 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24820}
24821
24822impl DeletePartitionRequest {
24823 pub fn new() -> Self {
24824 std::default::Default::default()
24825 }
24826
24827 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24829 self.name = v.into();
24830 self
24831 }
24832
24833 #[deprecated]
24835 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24836 self.etag = v.into();
24837 self
24838 }
24839}
24840
24841impl wkt::message::Message for DeletePartitionRequest {
24842 fn typename() -> &'static str {
24843 "type.googleapis.com/google.cloud.dataplex.v1.DeletePartitionRequest"
24844 }
24845}
24846
24847#[derive(Clone, Default, PartialEq)]
24849#[non_exhaustive]
24850pub struct ListPartitionsResponse {
24851 pub partitions: std::vec::Vec<crate::model::Partition>,
24853
24854 pub next_page_token: std::string::String,
24857
24858 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24859}
24860
24861impl ListPartitionsResponse {
24862 pub fn new() -> Self {
24863 std::default::Default::default()
24864 }
24865
24866 pub fn set_partitions<T, V>(mut self, v: T) -> Self
24868 where
24869 T: std::iter::IntoIterator<Item = V>,
24870 V: std::convert::Into<crate::model::Partition>,
24871 {
24872 use std::iter::Iterator;
24873 self.partitions = v.into_iter().map(|i| i.into()).collect();
24874 self
24875 }
24876
24877 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24879 self.next_page_token = v.into();
24880 self
24881 }
24882}
24883
24884impl wkt::message::Message for ListPartitionsResponse {
24885 fn typename() -> &'static str {
24886 "type.googleapis.com/google.cloud.dataplex.v1.ListPartitionsResponse"
24887 }
24888}
24889
24890#[doc(hidden)]
24891impl gax::paginator::internal::PageableResponse for ListPartitionsResponse {
24892 type PageItem = crate::model::Partition;
24893
24894 fn items(self) -> std::vec::Vec<Self::PageItem> {
24895 self.partitions
24896 }
24897
24898 fn next_page_token(&self) -> std::string::String {
24899 use std::clone::Clone;
24900 self.next_page_token.clone()
24901 }
24902}
24903
24904#[derive(Clone, Default, PartialEq)]
24906#[non_exhaustive]
24907pub struct GetPartitionRequest {
24908 pub name: std::string::String,
24913
24914 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24915}
24916
24917impl GetPartitionRequest {
24918 pub fn new() -> Self {
24919 std::default::Default::default()
24920 }
24921
24922 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24924 self.name = v.into();
24925 self
24926 }
24927}
24928
24929impl wkt::message::Message for GetPartitionRequest {
24930 fn typename() -> &'static str {
24931 "type.googleapis.com/google.cloud.dataplex.v1.GetPartitionRequest"
24932 }
24933}
24934
24935#[derive(Clone, Default, PartialEq)]
24937#[non_exhaustive]
24938pub struct Entity {
24939 pub name: std::string::String,
24942
24943 pub display_name: std::string::String,
24945
24946 pub description: std::string::String,
24949
24950 pub create_time: std::option::Option<wkt::Timestamp>,
24952
24953 pub update_time: std::option::Option<wkt::Timestamp>,
24955
24956 pub id: std::string::String,
24962
24963 pub etag: std::string::String,
24966
24967 pub r#type: crate::model::entity::Type,
24969
24970 pub asset: std::string::String,
24974
24975 pub data_path: std::string::String,
24981
24982 pub data_path_pattern: std::string::String,
24986
24987 pub catalog_entry: std::string::String,
24989
24990 pub system: crate::model::StorageSystem,
24992
24993 pub format: std::option::Option<crate::model::StorageFormat>,
24996
24997 pub compatibility: std::option::Option<crate::model::entity::CompatibilityStatus>,
24999
25000 pub access: std::option::Option<crate::model::StorageAccess>,
25003
25004 pub uid: std::string::String,
25007
25008 pub schema: std::option::Option<crate::model::Schema>,
25012
25013 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25014}
25015
25016impl Entity {
25017 pub fn new() -> Self {
25018 std::default::Default::default()
25019 }
25020
25021 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25023 self.name = v.into();
25024 self
25025 }
25026
25027 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25029 self.display_name = v.into();
25030 self
25031 }
25032
25033 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25035 self.description = v.into();
25036 self
25037 }
25038
25039 pub fn set_create_time<T>(mut self, v: T) -> Self
25041 where
25042 T: std::convert::Into<wkt::Timestamp>,
25043 {
25044 self.create_time = std::option::Option::Some(v.into());
25045 self
25046 }
25047
25048 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
25050 where
25051 T: std::convert::Into<wkt::Timestamp>,
25052 {
25053 self.create_time = v.map(|x| x.into());
25054 self
25055 }
25056
25057 pub fn set_update_time<T>(mut self, v: T) -> Self
25059 where
25060 T: std::convert::Into<wkt::Timestamp>,
25061 {
25062 self.update_time = std::option::Option::Some(v.into());
25063 self
25064 }
25065
25066 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
25068 where
25069 T: std::convert::Into<wkt::Timestamp>,
25070 {
25071 self.update_time = v.map(|x| x.into());
25072 self
25073 }
25074
25075 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25077 self.id = v.into();
25078 self
25079 }
25080
25081 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25083 self.etag = v.into();
25084 self
25085 }
25086
25087 pub fn set_type<T: std::convert::Into<crate::model::entity::Type>>(mut self, v: T) -> Self {
25089 self.r#type = v.into();
25090 self
25091 }
25092
25093 pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25095 self.asset = v.into();
25096 self
25097 }
25098
25099 pub fn set_data_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25101 self.data_path = v.into();
25102 self
25103 }
25104
25105 pub fn set_data_path_pattern<T: std::convert::Into<std::string::String>>(
25107 mut self,
25108 v: T,
25109 ) -> Self {
25110 self.data_path_pattern = v.into();
25111 self
25112 }
25113
25114 pub fn set_catalog_entry<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25116 self.catalog_entry = v.into();
25117 self
25118 }
25119
25120 pub fn set_system<T: std::convert::Into<crate::model::StorageSystem>>(mut self, v: T) -> Self {
25122 self.system = v.into();
25123 self
25124 }
25125
25126 pub fn set_format<T>(mut self, v: T) -> Self
25128 where
25129 T: std::convert::Into<crate::model::StorageFormat>,
25130 {
25131 self.format = std::option::Option::Some(v.into());
25132 self
25133 }
25134
25135 pub fn set_or_clear_format<T>(mut self, v: std::option::Option<T>) -> Self
25137 where
25138 T: std::convert::Into<crate::model::StorageFormat>,
25139 {
25140 self.format = v.map(|x| x.into());
25141 self
25142 }
25143
25144 pub fn set_compatibility<T>(mut self, v: T) -> Self
25146 where
25147 T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
25148 {
25149 self.compatibility = std::option::Option::Some(v.into());
25150 self
25151 }
25152
25153 pub fn set_or_clear_compatibility<T>(mut self, v: std::option::Option<T>) -> Self
25155 where
25156 T: std::convert::Into<crate::model::entity::CompatibilityStatus>,
25157 {
25158 self.compatibility = v.map(|x| x.into());
25159 self
25160 }
25161
25162 pub fn set_access<T>(mut self, v: T) -> Self
25164 where
25165 T: std::convert::Into<crate::model::StorageAccess>,
25166 {
25167 self.access = std::option::Option::Some(v.into());
25168 self
25169 }
25170
25171 pub fn set_or_clear_access<T>(mut self, v: std::option::Option<T>) -> Self
25173 where
25174 T: std::convert::Into<crate::model::StorageAccess>,
25175 {
25176 self.access = v.map(|x| x.into());
25177 self
25178 }
25179
25180 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25182 self.uid = v.into();
25183 self
25184 }
25185
25186 pub fn set_schema<T>(mut self, v: T) -> Self
25188 where
25189 T: std::convert::Into<crate::model::Schema>,
25190 {
25191 self.schema = std::option::Option::Some(v.into());
25192 self
25193 }
25194
25195 pub fn set_or_clear_schema<T>(mut self, v: std::option::Option<T>) -> Self
25197 where
25198 T: std::convert::Into<crate::model::Schema>,
25199 {
25200 self.schema = v.map(|x| x.into());
25201 self
25202 }
25203}
25204
25205impl wkt::message::Message for Entity {
25206 fn typename() -> &'static str {
25207 "type.googleapis.com/google.cloud.dataplex.v1.Entity"
25208 }
25209}
25210
25211pub mod entity {
25213 #[allow(unused_imports)]
25214 use super::*;
25215
25216 #[derive(Clone, Default, PartialEq)]
25218 #[non_exhaustive]
25219 pub struct CompatibilityStatus {
25220 pub hive_metastore:
25222 std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
25223
25224 pub bigquery:
25226 std::option::Option<crate::model::entity::compatibility_status::Compatibility>,
25227
25228 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25229 }
25230
25231 impl CompatibilityStatus {
25232 pub fn new() -> Self {
25233 std::default::Default::default()
25234 }
25235
25236 pub fn set_hive_metastore<T>(mut self, v: T) -> Self
25238 where
25239 T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25240 {
25241 self.hive_metastore = std::option::Option::Some(v.into());
25242 self
25243 }
25244
25245 pub fn set_or_clear_hive_metastore<T>(mut self, v: std::option::Option<T>) -> Self
25247 where
25248 T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25249 {
25250 self.hive_metastore = v.map(|x| x.into());
25251 self
25252 }
25253
25254 pub fn set_bigquery<T>(mut self, v: T) -> Self
25256 where
25257 T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25258 {
25259 self.bigquery = std::option::Option::Some(v.into());
25260 self
25261 }
25262
25263 pub fn set_or_clear_bigquery<T>(mut self, v: std::option::Option<T>) -> Self
25265 where
25266 T: std::convert::Into<crate::model::entity::compatibility_status::Compatibility>,
25267 {
25268 self.bigquery = v.map(|x| x.into());
25269 self
25270 }
25271 }
25272
25273 impl wkt::message::Message for CompatibilityStatus {
25274 fn typename() -> &'static str {
25275 "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus"
25276 }
25277 }
25278
25279 pub mod compatibility_status {
25281 #[allow(unused_imports)]
25282 use super::*;
25283
25284 #[derive(Clone, Default, PartialEq)]
25286 #[non_exhaustive]
25287 pub struct Compatibility {
25288 pub compatible: bool,
25291
25292 pub reason: std::string::String,
25295
25296 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25297 }
25298
25299 impl Compatibility {
25300 pub fn new() -> Self {
25301 std::default::Default::default()
25302 }
25303
25304 pub fn set_compatible<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25306 self.compatible = v.into();
25307 self
25308 }
25309
25310 pub fn set_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25312 self.reason = v.into();
25313 self
25314 }
25315 }
25316
25317 impl wkt::message::Message for Compatibility {
25318 fn typename() -> &'static str {
25319 "type.googleapis.com/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"
25320 }
25321 }
25322 }
25323
25324 #[derive(Clone, Debug, PartialEq)]
25340 #[non_exhaustive]
25341 pub enum Type {
25342 Unspecified,
25344 Table,
25346 Fileset,
25348 UnknownValue(r#type::UnknownValue),
25353 }
25354
25355 #[doc(hidden)]
25356 pub mod r#type {
25357 #[allow(unused_imports)]
25358 use super::*;
25359 #[derive(Clone, Debug, PartialEq)]
25360 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25361 }
25362
25363 impl Type {
25364 pub fn value(&self) -> std::option::Option<i32> {
25369 match self {
25370 Self::Unspecified => std::option::Option::Some(0),
25371 Self::Table => std::option::Option::Some(1),
25372 Self::Fileset => std::option::Option::Some(2),
25373 Self::UnknownValue(u) => u.0.value(),
25374 }
25375 }
25376
25377 pub fn name(&self) -> std::option::Option<&str> {
25382 match self {
25383 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
25384 Self::Table => std::option::Option::Some("TABLE"),
25385 Self::Fileset => std::option::Option::Some("FILESET"),
25386 Self::UnknownValue(u) => u.0.name(),
25387 }
25388 }
25389 }
25390
25391 impl std::default::Default for Type {
25392 fn default() -> Self {
25393 use std::convert::From;
25394 Self::from(0)
25395 }
25396 }
25397
25398 impl std::fmt::Display for Type {
25399 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25400 wkt::internal::display_enum(f, self.name(), self.value())
25401 }
25402 }
25403
25404 impl std::convert::From<i32> for Type {
25405 fn from(value: i32) -> Self {
25406 match value {
25407 0 => Self::Unspecified,
25408 1 => Self::Table,
25409 2 => Self::Fileset,
25410 _ => Self::UnknownValue(r#type::UnknownValue(
25411 wkt::internal::UnknownEnumValue::Integer(value),
25412 )),
25413 }
25414 }
25415 }
25416
25417 impl std::convert::From<&str> for Type {
25418 fn from(value: &str) -> Self {
25419 use std::string::ToString;
25420 match value {
25421 "TYPE_UNSPECIFIED" => Self::Unspecified,
25422 "TABLE" => Self::Table,
25423 "FILESET" => Self::Fileset,
25424 _ => Self::UnknownValue(r#type::UnknownValue(
25425 wkt::internal::UnknownEnumValue::String(value.to_string()),
25426 )),
25427 }
25428 }
25429 }
25430
25431 impl serde::ser::Serialize for Type {
25432 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25433 where
25434 S: serde::Serializer,
25435 {
25436 match self {
25437 Self::Unspecified => serializer.serialize_i32(0),
25438 Self::Table => serializer.serialize_i32(1),
25439 Self::Fileset => serializer.serialize_i32(2),
25440 Self::UnknownValue(u) => u.0.serialize(serializer),
25441 }
25442 }
25443 }
25444
25445 impl<'de> serde::de::Deserialize<'de> for Type {
25446 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25447 where
25448 D: serde::Deserializer<'de>,
25449 {
25450 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
25451 ".google.cloud.dataplex.v1.Entity.Type",
25452 ))
25453 }
25454 }
25455}
25456
25457#[derive(Clone, Default, PartialEq)]
25459#[non_exhaustive]
25460pub struct Partition {
25461 pub name: std::string::String,
25467
25468 pub values: std::vec::Vec<std::string::String>,
25471
25472 pub location: std::string::String,
25476
25477 #[deprecated]
25479 pub etag: std::string::String,
25480
25481 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25482}
25483
25484impl Partition {
25485 pub fn new() -> Self {
25486 std::default::Default::default()
25487 }
25488
25489 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25491 self.name = v.into();
25492 self
25493 }
25494
25495 pub fn set_values<T, V>(mut self, v: T) -> Self
25497 where
25498 T: std::iter::IntoIterator<Item = V>,
25499 V: std::convert::Into<std::string::String>,
25500 {
25501 use std::iter::Iterator;
25502 self.values = v.into_iter().map(|i| i.into()).collect();
25503 self
25504 }
25505
25506 pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25508 self.location = v.into();
25509 self
25510 }
25511
25512 #[deprecated]
25514 pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25515 self.etag = v.into();
25516 self
25517 }
25518}
25519
25520impl wkt::message::Message for Partition {
25521 fn typename() -> &'static str {
25522 "type.googleapis.com/google.cloud.dataplex.v1.Partition"
25523 }
25524}
25525
25526#[derive(Clone, Default, PartialEq)]
25528#[non_exhaustive]
25529pub struct Schema {
25530 pub user_managed: bool,
25547
25548 pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
25551
25552 pub partition_fields: std::vec::Vec<crate::model::schema::PartitionField>,
25555
25556 pub partition_style: crate::model::schema::PartitionStyle,
25559
25560 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25561}
25562
25563impl Schema {
25564 pub fn new() -> Self {
25565 std::default::Default::default()
25566 }
25567
25568 pub fn set_user_managed<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
25570 self.user_managed = v.into();
25571 self
25572 }
25573
25574 pub fn set_fields<T, V>(mut self, v: T) -> Self
25576 where
25577 T: std::iter::IntoIterator<Item = V>,
25578 V: std::convert::Into<crate::model::schema::SchemaField>,
25579 {
25580 use std::iter::Iterator;
25581 self.fields = v.into_iter().map(|i| i.into()).collect();
25582 self
25583 }
25584
25585 pub fn set_partition_fields<T, V>(mut self, v: T) -> Self
25587 where
25588 T: std::iter::IntoIterator<Item = V>,
25589 V: std::convert::Into<crate::model::schema::PartitionField>,
25590 {
25591 use std::iter::Iterator;
25592 self.partition_fields = v.into_iter().map(|i| i.into()).collect();
25593 self
25594 }
25595
25596 pub fn set_partition_style<T: std::convert::Into<crate::model::schema::PartitionStyle>>(
25598 mut self,
25599 v: T,
25600 ) -> Self {
25601 self.partition_style = v.into();
25602 self
25603 }
25604}
25605
25606impl wkt::message::Message for Schema {
25607 fn typename() -> &'static str {
25608 "type.googleapis.com/google.cloud.dataplex.v1.Schema"
25609 }
25610}
25611
25612pub mod schema {
25614 #[allow(unused_imports)]
25615 use super::*;
25616
25617 #[derive(Clone, Default, PartialEq)]
25619 #[non_exhaustive]
25620 pub struct SchemaField {
25621 pub name: std::string::String,
25625
25626 pub description: std::string::String,
25629
25630 pub r#type: crate::model::schema::Type,
25632
25633 pub mode: crate::model::schema::Mode,
25635
25636 pub fields: std::vec::Vec<crate::model::schema::SchemaField>,
25638
25639 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25640 }
25641
25642 impl SchemaField {
25643 pub fn new() -> Self {
25644 std::default::Default::default()
25645 }
25646
25647 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25649 self.name = v.into();
25650 self
25651 }
25652
25653 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25655 self.description = v.into();
25656 self
25657 }
25658
25659 pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
25661 self.r#type = v.into();
25662 self
25663 }
25664
25665 pub fn set_mode<T: std::convert::Into<crate::model::schema::Mode>>(mut self, v: T) -> Self {
25667 self.mode = v.into();
25668 self
25669 }
25670
25671 pub fn set_fields<T, V>(mut self, v: T) -> Self
25673 where
25674 T: std::iter::IntoIterator<Item = V>,
25675 V: std::convert::Into<crate::model::schema::SchemaField>,
25676 {
25677 use std::iter::Iterator;
25678 self.fields = v.into_iter().map(|i| i.into()).collect();
25679 self
25680 }
25681 }
25682
25683 impl wkt::message::Message for SchemaField {
25684 fn typename() -> &'static str {
25685 "type.googleapis.com/google.cloud.dataplex.v1.Schema.SchemaField"
25686 }
25687 }
25688
25689 #[derive(Clone, Default, PartialEq)]
25694 #[non_exhaustive]
25695 pub struct PartitionField {
25696 pub name: std::string::String,
25700
25701 pub r#type: crate::model::schema::Type,
25703
25704 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25705 }
25706
25707 impl PartitionField {
25708 pub fn new() -> Self {
25709 std::default::Default::default()
25710 }
25711
25712 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25714 self.name = v.into();
25715 self
25716 }
25717
25718 pub fn set_type<T: std::convert::Into<crate::model::schema::Type>>(mut self, v: T) -> Self {
25720 self.r#type = v.into();
25721 self
25722 }
25723 }
25724
25725 impl wkt::message::Message for PartitionField {
25726 fn typename() -> &'static str {
25727 "type.googleapis.com/google.cloud.dataplex.v1.Schema.PartitionField"
25728 }
25729 }
25730
25731 #[derive(Clone, Debug, PartialEq)]
25747 #[non_exhaustive]
25748 pub enum Type {
25749 Unspecified,
25751 Boolean,
25753 Byte,
25755 Int16,
25757 Int32,
25759 Int64,
25761 Float,
25763 Double,
25765 Decimal,
25767 String,
25769 Binary,
25771 Timestamp,
25773 Date,
25775 Time,
25777 Record,
25780 Null,
25782 UnknownValue(r#type::UnknownValue),
25787 }
25788
25789 #[doc(hidden)]
25790 pub mod r#type {
25791 #[allow(unused_imports)]
25792 use super::*;
25793 #[derive(Clone, Debug, PartialEq)]
25794 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25795 }
25796
25797 impl Type {
25798 pub fn value(&self) -> std::option::Option<i32> {
25803 match self {
25804 Self::Unspecified => std::option::Option::Some(0),
25805 Self::Boolean => std::option::Option::Some(1),
25806 Self::Byte => std::option::Option::Some(2),
25807 Self::Int16 => std::option::Option::Some(3),
25808 Self::Int32 => std::option::Option::Some(4),
25809 Self::Int64 => std::option::Option::Some(5),
25810 Self::Float => std::option::Option::Some(6),
25811 Self::Double => std::option::Option::Some(7),
25812 Self::Decimal => std::option::Option::Some(8),
25813 Self::String => std::option::Option::Some(9),
25814 Self::Binary => std::option::Option::Some(10),
25815 Self::Timestamp => std::option::Option::Some(11),
25816 Self::Date => std::option::Option::Some(12),
25817 Self::Time => std::option::Option::Some(13),
25818 Self::Record => std::option::Option::Some(14),
25819 Self::Null => std::option::Option::Some(100),
25820 Self::UnknownValue(u) => u.0.value(),
25821 }
25822 }
25823
25824 pub fn name(&self) -> std::option::Option<&str> {
25829 match self {
25830 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
25831 Self::Boolean => std::option::Option::Some("BOOLEAN"),
25832 Self::Byte => std::option::Option::Some("BYTE"),
25833 Self::Int16 => std::option::Option::Some("INT16"),
25834 Self::Int32 => std::option::Option::Some("INT32"),
25835 Self::Int64 => std::option::Option::Some("INT64"),
25836 Self::Float => std::option::Option::Some("FLOAT"),
25837 Self::Double => std::option::Option::Some("DOUBLE"),
25838 Self::Decimal => std::option::Option::Some("DECIMAL"),
25839 Self::String => std::option::Option::Some("STRING"),
25840 Self::Binary => std::option::Option::Some("BINARY"),
25841 Self::Timestamp => std::option::Option::Some("TIMESTAMP"),
25842 Self::Date => std::option::Option::Some("DATE"),
25843 Self::Time => std::option::Option::Some("TIME"),
25844 Self::Record => std::option::Option::Some("RECORD"),
25845 Self::Null => std::option::Option::Some("NULL"),
25846 Self::UnknownValue(u) => u.0.name(),
25847 }
25848 }
25849 }
25850
25851 impl std::default::Default for Type {
25852 fn default() -> Self {
25853 use std::convert::From;
25854 Self::from(0)
25855 }
25856 }
25857
25858 impl std::fmt::Display for Type {
25859 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
25860 wkt::internal::display_enum(f, self.name(), self.value())
25861 }
25862 }
25863
25864 impl std::convert::From<i32> for Type {
25865 fn from(value: i32) -> Self {
25866 match value {
25867 0 => Self::Unspecified,
25868 1 => Self::Boolean,
25869 2 => Self::Byte,
25870 3 => Self::Int16,
25871 4 => Self::Int32,
25872 5 => Self::Int64,
25873 6 => Self::Float,
25874 7 => Self::Double,
25875 8 => Self::Decimal,
25876 9 => Self::String,
25877 10 => Self::Binary,
25878 11 => Self::Timestamp,
25879 12 => Self::Date,
25880 13 => Self::Time,
25881 14 => Self::Record,
25882 100 => Self::Null,
25883 _ => Self::UnknownValue(r#type::UnknownValue(
25884 wkt::internal::UnknownEnumValue::Integer(value),
25885 )),
25886 }
25887 }
25888 }
25889
25890 impl std::convert::From<&str> for Type {
25891 fn from(value: &str) -> Self {
25892 use std::string::ToString;
25893 match value {
25894 "TYPE_UNSPECIFIED" => Self::Unspecified,
25895 "BOOLEAN" => Self::Boolean,
25896 "BYTE" => Self::Byte,
25897 "INT16" => Self::Int16,
25898 "INT32" => Self::Int32,
25899 "INT64" => Self::Int64,
25900 "FLOAT" => Self::Float,
25901 "DOUBLE" => Self::Double,
25902 "DECIMAL" => Self::Decimal,
25903 "STRING" => Self::String,
25904 "BINARY" => Self::Binary,
25905 "TIMESTAMP" => Self::Timestamp,
25906 "DATE" => Self::Date,
25907 "TIME" => Self::Time,
25908 "RECORD" => Self::Record,
25909 "NULL" => Self::Null,
25910 _ => Self::UnknownValue(r#type::UnknownValue(
25911 wkt::internal::UnknownEnumValue::String(value.to_string()),
25912 )),
25913 }
25914 }
25915 }
25916
25917 impl serde::ser::Serialize for Type {
25918 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25919 where
25920 S: serde::Serializer,
25921 {
25922 match self {
25923 Self::Unspecified => serializer.serialize_i32(0),
25924 Self::Boolean => serializer.serialize_i32(1),
25925 Self::Byte => serializer.serialize_i32(2),
25926 Self::Int16 => serializer.serialize_i32(3),
25927 Self::Int32 => serializer.serialize_i32(4),
25928 Self::Int64 => serializer.serialize_i32(5),
25929 Self::Float => serializer.serialize_i32(6),
25930 Self::Double => serializer.serialize_i32(7),
25931 Self::Decimal => serializer.serialize_i32(8),
25932 Self::String => serializer.serialize_i32(9),
25933 Self::Binary => serializer.serialize_i32(10),
25934 Self::Timestamp => serializer.serialize_i32(11),
25935 Self::Date => serializer.serialize_i32(12),
25936 Self::Time => serializer.serialize_i32(13),
25937 Self::Record => serializer.serialize_i32(14),
25938 Self::Null => serializer.serialize_i32(100),
25939 Self::UnknownValue(u) => u.0.serialize(serializer),
25940 }
25941 }
25942 }
25943
25944 impl<'de> serde::de::Deserialize<'de> for Type {
25945 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25946 where
25947 D: serde::Deserializer<'de>,
25948 {
25949 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
25950 ".google.cloud.dataplex.v1.Schema.Type",
25951 ))
25952 }
25953 }
25954
25955 #[derive(Clone, Debug, PartialEq)]
25971 #[non_exhaustive]
25972 pub enum Mode {
25973 Unspecified,
25975 Required,
25977 Nullable,
25979 Repeated,
25981 UnknownValue(mode::UnknownValue),
25986 }
25987
25988 #[doc(hidden)]
25989 pub mod mode {
25990 #[allow(unused_imports)]
25991 use super::*;
25992 #[derive(Clone, Debug, PartialEq)]
25993 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
25994 }
25995
25996 impl Mode {
25997 pub fn value(&self) -> std::option::Option<i32> {
26002 match self {
26003 Self::Unspecified => std::option::Option::Some(0),
26004 Self::Required => std::option::Option::Some(1),
26005 Self::Nullable => std::option::Option::Some(2),
26006 Self::Repeated => std::option::Option::Some(3),
26007 Self::UnknownValue(u) => u.0.value(),
26008 }
26009 }
26010
26011 pub fn name(&self) -> std::option::Option<&str> {
26016 match self {
26017 Self::Unspecified => std::option::Option::Some("MODE_UNSPECIFIED"),
26018 Self::Required => std::option::Option::Some("REQUIRED"),
26019 Self::Nullable => std::option::Option::Some("NULLABLE"),
26020 Self::Repeated => std::option::Option::Some("REPEATED"),
26021 Self::UnknownValue(u) => u.0.name(),
26022 }
26023 }
26024 }
26025
26026 impl std::default::Default for Mode {
26027 fn default() -> Self {
26028 use std::convert::From;
26029 Self::from(0)
26030 }
26031 }
26032
26033 impl std::fmt::Display for Mode {
26034 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26035 wkt::internal::display_enum(f, self.name(), self.value())
26036 }
26037 }
26038
26039 impl std::convert::From<i32> for Mode {
26040 fn from(value: i32) -> Self {
26041 match value {
26042 0 => Self::Unspecified,
26043 1 => Self::Required,
26044 2 => Self::Nullable,
26045 3 => Self::Repeated,
26046 _ => Self::UnknownValue(mode::UnknownValue(
26047 wkt::internal::UnknownEnumValue::Integer(value),
26048 )),
26049 }
26050 }
26051 }
26052
26053 impl std::convert::From<&str> for Mode {
26054 fn from(value: &str) -> Self {
26055 use std::string::ToString;
26056 match value {
26057 "MODE_UNSPECIFIED" => Self::Unspecified,
26058 "REQUIRED" => Self::Required,
26059 "NULLABLE" => Self::Nullable,
26060 "REPEATED" => Self::Repeated,
26061 _ => Self::UnknownValue(mode::UnknownValue(
26062 wkt::internal::UnknownEnumValue::String(value.to_string()),
26063 )),
26064 }
26065 }
26066 }
26067
26068 impl serde::ser::Serialize for Mode {
26069 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26070 where
26071 S: serde::Serializer,
26072 {
26073 match self {
26074 Self::Unspecified => serializer.serialize_i32(0),
26075 Self::Required => serializer.serialize_i32(1),
26076 Self::Nullable => serializer.serialize_i32(2),
26077 Self::Repeated => serializer.serialize_i32(3),
26078 Self::UnknownValue(u) => u.0.serialize(serializer),
26079 }
26080 }
26081 }
26082
26083 impl<'de> serde::de::Deserialize<'de> for Mode {
26084 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26085 where
26086 D: serde::Deserializer<'de>,
26087 {
26088 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Mode>::new(
26089 ".google.cloud.dataplex.v1.Schema.Mode",
26090 ))
26091 }
26092 }
26093
26094 #[derive(Clone, Debug, PartialEq)]
26110 #[non_exhaustive]
26111 pub enum PartitionStyle {
26112 Unspecified,
26114 HiveCompatible,
26118 UnknownValue(partition_style::UnknownValue),
26123 }
26124
26125 #[doc(hidden)]
26126 pub mod partition_style {
26127 #[allow(unused_imports)]
26128 use super::*;
26129 #[derive(Clone, Debug, PartialEq)]
26130 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26131 }
26132
26133 impl PartitionStyle {
26134 pub fn value(&self) -> std::option::Option<i32> {
26139 match self {
26140 Self::Unspecified => std::option::Option::Some(0),
26141 Self::HiveCompatible => std::option::Option::Some(1),
26142 Self::UnknownValue(u) => u.0.value(),
26143 }
26144 }
26145
26146 pub fn name(&self) -> std::option::Option<&str> {
26151 match self {
26152 Self::Unspecified => std::option::Option::Some("PARTITION_STYLE_UNSPECIFIED"),
26153 Self::HiveCompatible => std::option::Option::Some("HIVE_COMPATIBLE"),
26154 Self::UnknownValue(u) => u.0.name(),
26155 }
26156 }
26157 }
26158
26159 impl std::default::Default for PartitionStyle {
26160 fn default() -> Self {
26161 use std::convert::From;
26162 Self::from(0)
26163 }
26164 }
26165
26166 impl std::fmt::Display for PartitionStyle {
26167 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26168 wkt::internal::display_enum(f, self.name(), self.value())
26169 }
26170 }
26171
26172 impl std::convert::From<i32> for PartitionStyle {
26173 fn from(value: i32) -> Self {
26174 match value {
26175 0 => Self::Unspecified,
26176 1 => Self::HiveCompatible,
26177 _ => Self::UnknownValue(partition_style::UnknownValue(
26178 wkt::internal::UnknownEnumValue::Integer(value),
26179 )),
26180 }
26181 }
26182 }
26183
26184 impl std::convert::From<&str> for PartitionStyle {
26185 fn from(value: &str) -> Self {
26186 use std::string::ToString;
26187 match value {
26188 "PARTITION_STYLE_UNSPECIFIED" => Self::Unspecified,
26189 "HIVE_COMPATIBLE" => Self::HiveCompatible,
26190 _ => Self::UnknownValue(partition_style::UnknownValue(
26191 wkt::internal::UnknownEnumValue::String(value.to_string()),
26192 )),
26193 }
26194 }
26195 }
26196
26197 impl serde::ser::Serialize for PartitionStyle {
26198 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26199 where
26200 S: serde::Serializer,
26201 {
26202 match self {
26203 Self::Unspecified => serializer.serialize_i32(0),
26204 Self::HiveCompatible => serializer.serialize_i32(1),
26205 Self::UnknownValue(u) => u.0.serialize(serializer),
26206 }
26207 }
26208 }
26209
26210 impl<'de> serde::de::Deserialize<'de> for PartitionStyle {
26211 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26212 where
26213 D: serde::Deserializer<'de>,
26214 {
26215 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStyle>::new(
26216 ".google.cloud.dataplex.v1.Schema.PartitionStyle",
26217 ))
26218 }
26219 }
26220}
26221
26222#[derive(Clone, Default, PartialEq)]
26224#[non_exhaustive]
26225pub struct StorageFormat {
26226 pub format: crate::model::storage_format::Format,
26229
26230 pub compression_format: crate::model::storage_format::CompressionFormat,
26233
26234 pub mime_type: std::string::String,
26252
26253 pub options: std::option::Option<crate::model::storage_format::Options>,
26255
26256 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26257}
26258
26259impl StorageFormat {
26260 pub fn new() -> Self {
26261 std::default::Default::default()
26262 }
26263
26264 pub fn set_format<T: std::convert::Into<crate::model::storage_format::Format>>(
26266 mut self,
26267 v: T,
26268 ) -> Self {
26269 self.format = v.into();
26270 self
26271 }
26272
26273 pub fn set_compression_format<
26275 T: std::convert::Into<crate::model::storage_format::CompressionFormat>,
26276 >(
26277 mut self,
26278 v: T,
26279 ) -> Self {
26280 self.compression_format = v.into();
26281 self
26282 }
26283
26284 pub fn set_mime_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26286 self.mime_type = v.into();
26287 self
26288 }
26289
26290 pub fn set_options<
26295 T: std::convert::Into<std::option::Option<crate::model::storage_format::Options>>,
26296 >(
26297 mut self,
26298 v: T,
26299 ) -> Self {
26300 self.options = v.into();
26301 self
26302 }
26303
26304 pub fn csv(
26308 &self,
26309 ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::CsvOptions>> {
26310 #[allow(unreachable_patterns)]
26311 self.options.as_ref().and_then(|v| match v {
26312 crate::model::storage_format::Options::Csv(v) => std::option::Option::Some(v),
26313 _ => std::option::Option::None,
26314 })
26315 }
26316
26317 pub fn set_csv<
26323 T: std::convert::Into<std::boxed::Box<crate::model::storage_format::CsvOptions>>,
26324 >(
26325 mut self,
26326 v: T,
26327 ) -> Self {
26328 self.options =
26329 std::option::Option::Some(crate::model::storage_format::Options::Csv(v.into()));
26330 self
26331 }
26332
26333 pub fn json(
26337 &self,
26338 ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::JsonOptions>> {
26339 #[allow(unreachable_patterns)]
26340 self.options.as_ref().and_then(|v| match v {
26341 crate::model::storage_format::Options::Json(v) => std::option::Option::Some(v),
26342 _ => std::option::Option::None,
26343 })
26344 }
26345
26346 pub fn set_json<
26352 T: std::convert::Into<std::boxed::Box<crate::model::storage_format::JsonOptions>>,
26353 >(
26354 mut self,
26355 v: T,
26356 ) -> Self {
26357 self.options =
26358 std::option::Option::Some(crate::model::storage_format::Options::Json(v.into()));
26359 self
26360 }
26361
26362 pub fn iceberg(
26366 &self,
26367 ) -> std::option::Option<&std::boxed::Box<crate::model::storage_format::IcebergOptions>> {
26368 #[allow(unreachable_patterns)]
26369 self.options.as_ref().and_then(|v| match v {
26370 crate::model::storage_format::Options::Iceberg(v) => std::option::Option::Some(v),
26371 _ => std::option::Option::None,
26372 })
26373 }
26374
26375 pub fn set_iceberg<
26381 T: std::convert::Into<std::boxed::Box<crate::model::storage_format::IcebergOptions>>,
26382 >(
26383 mut self,
26384 v: T,
26385 ) -> Self {
26386 self.options =
26387 std::option::Option::Some(crate::model::storage_format::Options::Iceberg(v.into()));
26388 self
26389 }
26390}
26391
26392impl wkt::message::Message for StorageFormat {
26393 fn typename() -> &'static str {
26394 "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat"
26395 }
26396}
26397
26398pub mod storage_format {
26400 #[allow(unused_imports)]
26401 use super::*;
26402
26403 #[derive(Clone, Default, PartialEq)]
26405 #[non_exhaustive]
26406 pub struct CsvOptions {
26407 pub encoding: std::string::String,
26410
26411 pub header_rows: i32,
26414
26415 pub delimiter: std::string::String,
26417
26418 pub quote: std::string::String,
26422
26423 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26424 }
26425
26426 impl CsvOptions {
26427 pub fn new() -> Self {
26428 std::default::Default::default()
26429 }
26430
26431 pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26433 self.encoding = v.into();
26434 self
26435 }
26436
26437 pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
26439 self.header_rows = v.into();
26440 self
26441 }
26442
26443 pub fn set_delimiter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26445 self.delimiter = v.into();
26446 self
26447 }
26448
26449 pub fn set_quote<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26451 self.quote = v.into();
26452 self
26453 }
26454 }
26455
26456 impl wkt::message::Message for CsvOptions {
26457 fn typename() -> &'static str {
26458 "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.CsvOptions"
26459 }
26460 }
26461
26462 #[derive(Clone, Default, PartialEq)]
26464 #[non_exhaustive]
26465 pub struct JsonOptions {
26466 pub encoding: std::string::String,
26469
26470 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26471 }
26472
26473 impl JsonOptions {
26474 pub fn new() -> Self {
26475 std::default::Default::default()
26476 }
26477
26478 pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26480 self.encoding = v.into();
26481 self
26482 }
26483 }
26484
26485 impl wkt::message::Message for JsonOptions {
26486 fn typename() -> &'static str {
26487 "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.JsonOptions"
26488 }
26489 }
26490
26491 #[derive(Clone, Default, PartialEq)]
26493 #[non_exhaustive]
26494 pub struct IcebergOptions {
26495 pub metadata_location: std::string::String,
26498
26499 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26500 }
26501
26502 impl IcebergOptions {
26503 pub fn new() -> Self {
26504 std::default::Default::default()
26505 }
26506
26507 pub fn set_metadata_location<T: std::convert::Into<std::string::String>>(
26509 mut self,
26510 v: T,
26511 ) -> Self {
26512 self.metadata_location = v.into();
26513 self
26514 }
26515 }
26516
26517 impl wkt::message::Message for IcebergOptions {
26518 fn typename() -> &'static str {
26519 "type.googleapis.com/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"
26520 }
26521 }
26522
26523 #[derive(Clone, Debug, PartialEq)]
26539 #[non_exhaustive]
26540 pub enum Format {
26541 Unspecified,
26543 Parquet,
26545 Avro,
26547 Orc,
26549 Csv,
26551 Json,
26553 Image,
26555 Audio,
26557 Video,
26559 Text,
26561 Tfrecord,
26563 Other,
26565 Unknown,
26567 UnknownValue(format::UnknownValue),
26572 }
26573
26574 #[doc(hidden)]
26575 pub mod format {
26576 #[allow(unused_imports)]
26577 use super::*;
26578 #[derive(Clone, Debug, PartialEq)]
26579 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26580 }
26581
26582 impl Format {
26583 pub fn value(&self) -> std::option::Option<i32> {
26588 match self {
26589 Self::Unspecified => std::option::Option::Some(0),
26590 Self::Parquet => std::option::Option::Some(1),
26591 Self::Avro => std::option::Option::Some(2),
26592 Self::Orc => std::option::Option::Some(3),
26593 Self::Csv => std::option::Option::Some(100),
26594 Self::Json => std::option::Option::Some(101),
26595 Self::Image => std::option::Option::Some(200),
26596 Self::Audio => std::option::Option::Some(201),
26597 Self::Video => std::option::Option::Some(202),
26598 Self::Text => std::option::Option::Some(203),
26599 Self::Tfrecord => std::option::Option::Some(204),
26600 Self::Other => std::option::Option::Some(1000),
26601 Self::Unknown => std::option::Option::Some(1001),
26602 Self::UnknownValue(u) => u.0.value(),
26603 }
26604 }
26605
26606 pub fn name(&self) -> std::option::Option<&str> {
26611 match self {
26612 Self::Unspecified => std::option::Option::Some("FORMAT_UNSPECIFIED"),
26613 Self::Parquet => std::option::Option::Some("PARQUET"),
26614 Self::Avro => std::option::Option::Some("AVRO"),
26615 Self::Orc => std::option::Option::Some("ORC"),
26616 Self::Csv => std::option::Option::Some("CSV"),
26617 Self::Json => std::option::Option::Some("JSON"),
26618 Self::Image => std::option::Option::Some("IMAGE"),
26619 Self::Audio => std::option::Option::Some("AUDIO"),
26620 Self::Video => std::option::Option::Some("VIDEO"),
26621 Self::Text => std::option::Option::Some("TEXT"),
26622 Self::Tfrecord => std::option::Option::Some("TFRECORD"),
26623 Self::Other => std::option::Option::Some("OTHER"),
26624 Self::Unknown => std::option::Option::Some("UNKNOWN"),
26625 Self::UnknownValue(u) => u.0.name(),
26626 }
26627 }
26628 }
26629
26630 impl std::default::Default for Format {
26631 fn default() -> Self {
26632 use std::convert::From;
26633 Self::from(0)
26634 }
26635 }
26636
26637 impl std::fmt::Display for Format {
26638 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26639 wkt::internal::display_enum(f, self.name(), self.value())
26640 }
26641 }
26642
26643 impl std::convert::From<i32> for Format {
26644 fn from(value: i32) -> Self {
26645 match value {
26646 0 => Self::Unspecified,
26647 1 => Self::Parquet,
26648 2 => Self::Avro,
26649 3 => Self::Orc,
26650 100 => Self::Csv,
26651 101 => Self::Json,
26652 200 => Self::Image,
26653 201 => Self::Audio,
26654 202 => Self::Video,
26655 203 => Self::Text,
26656 204 => Self::Tfrecord,
26657 1000 => Self::Other,
26658 1001 => Self::Unknown,
26659 _ => Self::UnknownValue(format::UnknownValue(
26660 wkt::internal::UnknownEnumValue::Integer(value),
26661 )),
26662 }
26663 }
26664 }
26665
26666 impl std::convert::From<&str> for Format {
26667 fn from(value: &str) -> Self {
26668 use std::string::ToString;
26669 match value {
26670 "FORMAT_UNSPECIFIED" => Self::Unspecified,
26671 "PARQUET" => Self::Parquet,
26672 "AVRO" => Self::Avro,
26673 "ORC" => Self::Orc,
26674 "CSV" => Self::Csv,
26675 "JSON" => Self::Json,
26676 "IMAGE" => Self::Image,
26677 "AUDIO" => Self::Audio,
26678 "VIDEO" => Self::Video,
26679 "TEXT" => Self::Text,
26680 "TFRECORD" => Self::Tfrecord,
26681 "OTHER" => Self::Other,
26682 "UNKNOWN" => Self::Unknown,
26683 _ => Self::UnknownValue(format::UnknownValue(
26684 wkt::internal::UnknownEnumValue::String(value.to_string()),
26685 )),
26686 }
26687 }
26688 }
26689
26690 impl serde::ser::Serialize for Format {
26691 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26692 where
26693 S: serde::Serializer,
26694 {
26695 match self {
26696 Self::Unspecified => serializer.serialize_i32(0),
26697 Self::Parquet => serializer.serialize_i32(1),
26698 Self::Avro => serializer.serialize_i32(2),
26699 Self::Orc => serializer.serialize_i32(3),
26700 Self::Csv => serializer.serialize_i32(100),
26701 Self::Json => serializer.serialize_i32(101),
26702 Self::Image => serializer.serialize_i32(200),
26703 Self::Audio => serializer.serialize_i32(201),
26704 Self::Video => serializer.serialize_i32(202),
26705 Self::Text => serializer.serialize_i32(203),
26706 Self::Tfrecord => serializer.serialize_i32(204),
26707 Self::Other => serializer.serialize_i32(1000),
26708 Self::Unknown => serializer.serialize_i32(1001),
26709 Self::UnknownValue(u) => u.0.serialize(serializer),
26710 }
26711 }
26712 }
26713
26714 impl<'de> serde::de::Deserialize<'de> for Format {
26715 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26716 where
26717 D: serde::Deserializer<'de>,
26718 {
26719 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Format>::new(
26720 ".google.cloud.dataplex.v1.StorageFormat.Format",
26721 ))
26722 }
26723 }
26724
26725 #[derive(Clone, Debug, PartialEq)]
26741 #[non_exhaustive]
26742 pub enum CompressionFormat {
26743 Unspecified,
26745 Gzip,
26747 Bzip2,
26749 UnknownValue(compression_format::UnknownValue),
26754 }
26755
26756 #[doc(hidden)]
26757 pub mod compression_format {
26758 #[allow(unused_imports)]
26759 use super::*;
26760 #[derive(Clone, Debug, PartialEq)]
26761 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26762 }
26763
26764 impl CompressionFormat {
26765 pub fn value(&self) -> std::option::Option<i32> {
26770 match self {
26771 Self::Unspecified => std::option::Option::Some(0),
26772 Self::Gzip => std::option::Option::Some(2),
26773 Self::Bzip2 => std::option::Option::Some(3),
26774 Self::UnknownValue(u) => u.0.value(),
26775 }
26776 }
26777
26778 pub fn name(&self) -> std::option::Option<&str> {
26783 match self {
26784 Self::Unspecified => std::option::Option::Some("COMPRESSION_FORMAT_UNSPECIFIED"),
26785 Self::Gzip => std::option::Option::Some("GZIP"),
26786 Self::Bzip2 => std::option::Option::Some("BZIP2"),
26787 Self::UnknownValue(u) => u.0.name(),
26788 }
26789 }
26790 }
26791
26792 impl std::default::Default for CompressionFormat {
26793 fn default() -> Self {
26794 use std::convert::From;
26795 Self::from(0)
26796 }
26797 }
26798
26799 impl std::fmt::Display for CompressionFormat {
26800 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26801 wkt::internal::display_enum(f, self.name(), self.value())
26802 }
26803 }
26804
26805 impl std::convert::From<i32> for CompressionFormat {
26806 fn from(value: i32) -> Self {
26807 match value {
26808 0 => Self::Unspecified,
26809 2 => Self::Gzip,
26810 3 => Self::Bzip2,
26811 _ => Self::UnknownValue(compression_format::UnknownValue(
26812 wkt::internal::UnknownEnumValue::Integer(value),
26813 )),
26814 }
26815 }
26816 }
26817
26818 impl std::convert::From<&str> for CompressionFormat {
26819 fn from(value: &str) -> Self {
26820 use std::string::ToString;
26821 match value {
26822 "COMPRESSION_FORMAT_UNSPECIFIED" => Self::Unspecified,
26823 "GZIP" => Self::Gzip,
26824 "BZIP2" => Self::Bzip2,
26825 _ => Self::UnknownValue(compression_format::UnknownValue(
26826 wkt::internal::UnknownEnumValue::String(value.to_string()),
26827 )),
26828 }
26829 }
26830 }
26831
26832 impl serde::ser::Serialize for CompressionFormat {
26833 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26834 where
26835 S: serde::Serializer,
26836 {
26837 match self {
26838 Self::Unspecified => serializer.serialize_i32(0),
26839 Self::Gzip => serializer.serialize_i32(2),
26840 Self::Bzip2 => serializer.serialize_i32(3),
26841 Self::UnknownValue(u) => u.0.serialize(serializer),
26842 }
26843 }
26844 }
26845
26846 impl<'de> serde::de::Deserialize<'de> for CompressionFormat {
26847 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26848 where
26849 D: serde::Deserializer<'de>,
26850 {
26851 deserializer.deserialize_any(wkt::internal::EnumVisitor::<CompressionFormat>::new(
26852 ".google.cloud.dataplex.v1.StorageFormat.CompressionFormat",
26853 ))
26854 }
26855 }
26856
26857 #[derive(Clone, Debug, PartialEq)]
26859 #[non_exhaustive]
26860 pub enum Options {
26861 Csv(std::boxed::Box<crate::model::storage_format::CsvOptions>),
26863 Json(std::boxed::Box<crate::model::storage_format::JsonOptions>),
26865 Iceberg(std::boxed::Box<crate::model::storage_format::IcebergOptions>),
26867 }
26868}
26869
26870#[derive(Clone, Default, PartialEq)]
26872#[non_exhaustive]
26873pub struct StorageAccess {
26874 pub read: crate::model::storage_access::AccessMode,
26877
26878 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26879}
26880
26881impl StorageAccess {
26882 pub fn new() -> Self {
26883 std::default::Default::default()
26884 }
26885
26886 pub fn set_read<T: std::convert::Into<crate::model::storage_access::AccessMode>>(
26888 mut self,
26889 v: T,
26890 ) -> Self {
26891 self.read = v.into();
26892 self
26893 }
26894}
26895
26896impl wkt::message::Message for StorageAccess {
26897 fn typename() -> &'static str {
26898 "type.googleapis.com/google.cloud.dataplex.v1.StorageAccess"
26899 }
26900}
26901
26902pub mod storage_access {
26904 #[allow(unused_imports)]
26905 use super::*;
26906
26907 #[derive(Clone, Debug, PartialEq)]
26923 #[non_exhaustive]
26924 pub enum AccessMode {
26925 Unspecified,
26927 Direct,
26929 Managed,
26931 UnknownValue(access_mode::UnknownValue),
26936 }
26937
26938 #[doc(hidden)]
26939 pub mod access_mode {
26940 #[allow(unused_imports)]
26941 use super::*;
26942 #[derive(Clone, Debug, PartialEq)]
26943 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26944 }
26945
26946 impl AccessMode {
26947 pub fn value(&self) -> std::option::Option<i32> {
26952 match self {
26953 Self::Unspecified => std::option::Option::Some(0),
26954 Self::Direct => std::option::Option::Some(1),
26955 Self::Managed => std::option::Option::Some(2),
26956 Self::UnknownValue(u) => u.0.value(),
26957 }
26958 }
26959
26960 pub fn name(&self) -> std::option::Option<&str> {
26965 match self {
26966 Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
26967 Self::Direct => std::option::Option::Some("DIRECT"),
26968 Self::Managed => std::option::Option::Some("MANAGED"),
26969 Self::UnknownValue(u) => u.0.name(),
26970 }
26971 }
26972 }
26973
26974 impl std::default::Default for AccessMode {
26975 fn default() -> Self {
26976 use std::convert::From;
26977 Self::from(0)
26978 }
26979 }
26980
26981 impl std::fmt::Display for AccessMode {
26982 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26983 wkt::internal::display_enum(f, self.name(), self.value())
26984 }
26985 }
26986
26987 impl std::convert::From<i32> for AccessMode {
26988 fn from(value: i32) -> Self {
26989 match value {
26990 0 => Self::Unspecified,
26991 1 => Self::Direct,
26992 2 => Self::Managed,
26993 _ => Self::UnknownValue(access_mode::UnknownValue(
26994 wkt::internal::UnknownEnumValue::Integer(value),
26995 )),
26996 }
26997 }
26998 }
26999
27000 impl std::convert::From<&str> for AccessMode {
27001 fn from(value: &str) -> Self {
27002 use std::string::ToString;
27003 match value {
27004 "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
27005 "DIRECT" => Self::Direct,
27006 "MANAGED" => Self::Managed,
27007 _ => Self::UnknownValue(access_mode::UnknownValue(
27008 wkt::internal::UnknownEnumValue::String(value.to_string()),
27009 )),
27010 }
27011 }
27012 }
27013
27014 impl serde::ser::Serialize for AccessMode {
27015 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27016 where
27017 S: serde::Serializer,
27018 {
27019 match self {
27020 Self::Unspecified => serializer.serialize_i32(0),
27021 Self::Direct => serializer.serialize_i32(1),
27022 Self::Managed => serializer.serialize_i32(2),
27023 Self::UnknownValue(u) => u.0.serialize(serializer),
27024 }
27025 }
27026 }
27027
27028 impl<'de> serde::de::Deserialize<'de> for AccessMode {
27029 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27030 where
27031 D: serde::Deserializer<'de>,
27032 {
27033 deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
27034 ".google.cloud.dataplex.v1.StorageAccess.AccessMode",
27035 ))
27036 }
27037 }
27038}
27039
27040#[derive(Clone, Default, PartialEq)]
27042#[non_exhaustive]
27043pub struct Trigger {
27044 pub mode: std::option::Option<crate::model::trigger::Mode>,
27048
27049 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27050}
27051
27052impl Trigger {
27053 pub fn new() -> Self {
27054 std::default::Default::default()
27055 }
27056
27057 pub fn set_mode<T: std::convert::Into<std::option::Option<crate::model::trigger::Mode>>>(
27062 mut self,
27063 v: T,
27064 ) -> Self {
27065 self.mode = v.into();
27066 self
27067 }
27068
27069 pub fn on_demand(
27073 &self,
27074 ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::OnDemand>> {
27075 #[allow(unreachable_patterns)]
27076 self.mode.as_ref().and_then(|v| match v {
27077 crate::model::trigger::Mode::OnDemand(v) => std::option::Option::Some(v),
27078 _ => std::option::Option::None,
27079 })
27080 }
27081
27082 pub fn set_on_demand<
27088 T: std::convert::Into<std::boxed::Box<crate::model::trigger::OnDemand>>,
27089 >(
27090 mut self,
27091 v: T,
27092 ) -> Self {
27093 self.mode = std::option::Option::Some(crate::model::trigger::Mode::OnDemand(v.into()));
27094 self
27095 }
27096
27097 pub fn schedule(
27101 &self,
27102 ) -> std::option::Option<&std::boxed::Box<crate::model::trigger::Schedule>> {
27103 #[allow(unreachable_patterns)]
27104 self.mode.as_ref().and_then(|v| match v {
27105 crate::model::trigger::Mode::Schedule(v) => std::option::Option::Some(v),
27106 _ => std::option::Option::None,
27107 })
27108 }
27109
27110 pub fn set_schedule<T: std::convert::Into<std::boxed::Box<crate::model::trigger::Schedule>>>(
27116 mut self,
27117 v: T,
27118 ) -> Self {
27119 self.mode = std::option::Option::Some(crate::model::trigger::Mode::Schedule(v.into()));
27120 self
27121 }
27122}
27123
27124impl wkt::message::Message for Trigger {
27125 fn typename() -> &'static str {
27126 "type.googleapis.com/google.cloud.dataplex.v1.Trigger"
27127 }
27128}
27129
27130pub mod trigger {
27132 #[allow(unused_imports)]
27133 use super::*;
27134
27135 #[derive(Clone, Default, PartialEq)]
27137 #[non_exhaustive]
27138 pub struct OnDemand {
27139 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27140 }
27141
27142 impl OnDemand {
27143 pub fn new() -> Self {
27144 std::default::Default::default()
27145 }
27146 }
27147
27148 impl wkt::message::Message for OnDemand {
27149 fn typename() -> &'static str {
27150 "type.googleapis.com/google.cloud.dataplex.v1.Trigger.OnDemand"
27151 }
27152 }
27153
27154 #[derive(Clone, Default, PartialEq)]
27156 #[non_exhaustive]
27157 pub struct Schedule {
27158 pub cron: std::string::String,
27171
27172 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27173 }
27174
27175 impl Schedule {
27176 pub fn new() -> Self {
27177 std::default::Default::default()
27178 }
27179
27180 pub fn set_cron<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27182 self.cron = v.into();
27183 self
27184 }
27185 }
27186
27187 impl wkt::message::Message for Schedule {
27188 fn typename() -> &'static str {
27189 "type.googleapis.com/google.cloud.dataplex.v1.Trigger.Schedule"
27190 }
27191 }
27192
27193 #[derive(Clone, Debug, PartialEq)]
27197 #[non_exhaustive]
27198 pub enum Mode {
27199 OnDemand(std::boxed::Box<crate::model::trigger::OnDemand>),
27201 Schedule(std::boxed::Box<crate::model::trigger::Schedule>),
27203 }
27204}
27205
27206#[derive(Clone, Default, PartialEq)]
27208#[non_exhaustive]
27209pub struct DataSource {
27210 pub source: std::option::Option<crate::model::data_source::Source>,
27213
27214 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27215}
27216
27217impl DataSource {
27218 pub fn new() -> Self {
27219 std::default::Default::default()
27220 }
27221
27222 pub fn set_source<
27227 T: std::convert::Into<std::option::Option<crate::model::data_source::Source>>,
27228 >(
27229 mut self,
27230 v: T,
27231 ) -> Self {
27232 self.source = v.into();
27233 self
27234 }
27235
27236 pub fn entity(&self) -> std::option::Option<&std::string::String> {
27240 #[allow(unreachable_patterns)]
27241 self.source.as_ref().and_then(|v| match v {
27242 crate::model::data_source::Source::Entity(v) => std::option::Option::Some(v),
27243 _ => std::option::Option::None,
27244 })
27245 }
27246
27247 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27253 self.source =
27254 std::option::Option::Some(crate::model::data_source::Source::Entity(v.into()));
27255 self
27256 }
27257
27258 pub fn resource(&self) -> std::option::Option<&std::string::String> {
27262 #[allow(unreachable_patterns)]
27263 self.source.as_ref().and_then(|v| match v {
27264 crate::model::data_source::Source::Resource(v) => std::option::Option::Some(v),
27265 _ => std::option::Option::None,
27266 })
27267 }
27268
27269 pub fn set_resource<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27275 self.source =
27276 std::option::Option::Some(crate::model::data_source::Source::Resource(v.into()));
27277 self
27278 }
27279}
27280
27281impl wkt::message::Message for DataSource {
27282 fn typename() -> &'static str {
27283 "type.googleapis.com/google.cloud.dataplex.v1.DataSource"
27284 }
27285}
27286
27287pub mod data_source {
27289 #[allow(unused_imports)]
27290 use super::*;
27291
27292 #[derive(Clone, Debug, PartialEq)]
27295 #[non_exhaustive]
27296 pub enum Source {
27297 Entity(std::string::String),
27301 Resource(std::string::String),
27310 }
27311}
27312
27313#[derive(Clone, Default, PartialEq)]
27315#[non_exhaustive]
27316pub struct ScannedData {
27317 pub data_range: std::option::Option<crate::model::scanned_data::DataRange>,
27319
27320 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27321}
27322
27323impl ScannedData {
27324 pub fn new() -> Self {
27325 std::default::Default::default()
27326 }
27327
27328 pub fn set_data_range<
27333 T: std::convert::Into<std::option::Option<crate::model::scanned_data::DataRange>>,
27334 >(
27335 mut self,
27336 v: T,
27337 ) -> Self {
27338 self.data_range = v.into();
27339 self
27340 }
27341
27342 pub fn incremental_field(
27346 &self,
27347 ) -> std::option::Option<&std::boxed::Box<crate::model::scanned_data::IncrementalField>> {
27348 #[allow(unreachable_patterns)]
27349 self.data_range.as_ref().and_then(|v| match v {
27350 crate::model::scanned_data::DataRange::IncrementalField(v) => {
27351 std::option::Option::Some(v)
27352 }
27353 _ => std::option::Option::None,
27354 })
27355 }
27356
27357 pub fn set_incremental_field<
27363 T: std::convert::Into<std::boxed::Box<crate::model::scanned_data::IncrementalField>>,
27364 >(
27365 mut self,
27366 v: T,
27367 ) -> Self {
27368 self.data_range = std::option::Option::Some(
27369 crate::model::scanned_data::DataRange::IncrementalField(v.into()),
27370 );
27371 self
27372 }
27373}
27374
27375impl wkt::message::Message for ScannedData {
27376 fn typename() -> &'static str {
27377 "type.googleapis.com/google.cloud.dataplex.v1.ScannedData"
27378 }
27379}
27380
27381pub mod scanned_data {
27383 #[allow(unused_imports)]
27384 use super::*;
27385
27386 #[derive(Clone, Default, PartialEq)]
27388 #[non_exhaustive]
27389 pub struct IncrementalField {
27390 pub field: std::string::String,
27393
27394 pub start: std::string::String,
27396
27397 pub end: std::string::String,
27399
27400 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27401 }
27402
27403 impl IncrementalField {
27404 pub fn new() -> Self {
27405 std::default::Default::default()
27406 }
27407
27408 pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27410 self.field = v.into();
27411 self
27412 }
27413
27414 pub fn set_start<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27416 self.start = v.into();
27417 self
27418 }
27419
27420 pub fn set_end<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27422 self.end = v.into();
27423 self
27424 }
27425 }
27426
27427 impl wkt::message::Message for IncrementalField {
27428 fn typename() -> &'static str {
27429 "type.googleapis.com/google.cloud.dataplex.v1.ScannedData.IncrementalField"
27430 }
27431 }
27432
27433 #[derive(Clone, Debug, PartialEq)]
27435 #[non_exhaustive]
27436 pub enum DataRange {
27437 IncrementalField(std::boxed::Box<crate::model::scanned_data::IncrementalField>),
27439 }
27440}
27441
27442#[derive(Clone, Default, PartialEq)]
27451#[non_exhaustive]
27452pub struct Lake {
27453 pub name: std::string::String,
27456
27457 pub display_name: std::string::String,
27459
27460 pub uid: std::string::String,
27463
27464 pub create_time: std::option::Option<wkt::Timestamp>,
27466
27467 pub update_time: std::option::Option<wkt::Timestamp>,
27469
27470 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
27472
27473 pub description: std::string::String,
27475
27476 pub state: crate::model::State,
27478
27479 pub service_account: std::string::String,
27483
27484 pub metastore: std::option::Option<crate::model::lake::Metastore>,
27487
27488 pub asset_status: std::option::Option<crate::model::AssetStatus>,
27490
27491 pub metastore_status: std::option::Option<crate::model::lake::MetastoreStatus>,
27493
27494 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27495}
27496
27497impl Lake {
27498 pub fn new() -> Self {
27499 std::default::Default::default()
27500 }
27501
27502 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27504 self.name = v.into();
27505 self
27506 }
27507
27508 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27510 self.display_name = v.into();
27511 self
27512 }
27513
27514 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27516 self.uid = v.into();
27517 self
27518 }
27519
27520 pub fn set_create_time<T>(mut self, v: T) -> Self
27522 where
27523 T: std::convert::Into<wkt::Timestamp>,
27524 {
27525 self.create_time = std::option::Option::Some(v.into());
27526 self
27527 }
27528
27529 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
27531 where
27532 T: std::convert::Into<wkt::Timestamp>,
27533 {
27534 self.create_time = v.map(|x| x.into());
27535 self
27536 }
27537
27538 pub fn set_update_time<T>(mut self, v: T) -> Self
27540 where
27541 T: std::convert::Into<wkt::Timestamp>,
27542 {
27543 self.update_time = std::option::Option::Some(v.into());
27544 self
27545 }
27546
27547 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
27549 where
27550 T: std::convert::Into<wkt::Timestamp>,
27551 {
27552 self.update_time = v.map(|x| x.into());
27553 self
27554 }
27555
27556 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
27558 where
27559 T: std::iter::IntoIterator<Item = (K, V)>,
27560 K: std::convert::Into<std::string::String>,
27561 V: std::convert::Into<std::string::String>,
27562 {
27563 use std::iter::Iterator;
27564 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
27565 self
27566 }
27567
27568 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27570 self.description = v.into();
27571 self
27572 }
27573
27574 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
27576 self.state = v.into();
27577 self
27578 }
27579
27580 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27582 self.service_account = v.into();
27583 self
27584 }
27585
27586 pub fn set_metastore<T>(mut self, v: T) -> Self
27588 where
27589 T: std::convert::Into<crate::model::lake::Metastore>,
27590 {
27591 self.metastore = std::option::Option::Some(v.into());
27592 self
27593 }
27594
27595 pub fn set_or_clear_metastore<T>(mut self, v: std::option::Option<T>) -> Self
27597 where
27598 T: std::convert::Into<crate::model::lake::Metastore>,
27599 {
27600 self.metastore = v.map(|x| x.into());
27601 self
27602 }
27603
27604 pub fn set_asset_status<T>(mut self, v: T) -> Self
27606 where
27607 T: std::convert::Into<crate::model::AssetStatus>,
27608 {
27609 self.asset_status = std::option::Option::Some(v.into());
27610 self
27611 }
27612
27613 pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
27615 where
27616 T: std::convert::Into<crate::model::AssetStatus>,
27617 {
27618 self.asset_status = v.map(|x| x.into());
27619 self
27620 }
27621
27622 pub fn set_metastore_status<T>(mut self, v: T) -> Self
27624 where
27625 T: std::convert::Into<crate::model::lake::MetastoreStatus>,
27626 {
27627 self.metastore_status = std::option::Option::Some(v.into());
27628 self
27629 }
27630
27631 pub fn set_or_clear_metastore_status<T>(mut self, v: std::option::Option<T>) -> Self
27633 where
27634 T: std::convert::Into<crate::model::lake::MetastoreStatus>,
27635 {
27636 self.metastore_status = v.map(|x| x.into());
27637 self
27638 }
27639}
27640
27641impl wkt::message::Message for Lake {
27642 fn typename() -> &'static str {
27643 "type.googleapis.com/google.cloud.dataplex.v1.Lake"
27644 }
27645}
27646
27647pub mod lake {
27649 #[allow(unused_imports)]
27650 use super::*;
27651
27652 #[derive(Clone, Default, PartialEq)]
27654 #[non_exhaustive]
27655 pub struct Metastore {
27656 pub service: std::string::String,
27661
27662 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27663 }
27664
27665 impl Metastore {
27666 pub fn new() -> Self {
27667 std::default::Default::default()
27668 }
27669
27670 pub fn set_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27672 self.service = v.into();
27673 self
27674 }
27675 }
27676
27677 impl wkt::message::Message for Metastore {
27678 fn typename() -> &'static str {
27679 "type.googleapis.com/google.cloud.dataplex.v1.Lake.Metastore"
27680 }
27681 }
27682
27683 #[derive(Clone, Default, PartialEq)]
27685 #[non_exhaustive]
27686 pub struct MetastoreStatus {
27687 pub state: crate::model::lake::metastore_status::State,
27689
27690 pub message: std::string::String,
27692
27693 pub update_time: std::option::Option<wkt::Timestamp>,
27695
27696 pub endpoint: std::string::String,
27698
27699 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27700 }
27701
27702 impl MetastoreStatus {
27703 pub fn new() -> Self {
27704 std::default::Default::default()
27705 }
27706
27707 pub fn set_state<T: std::convert::Into<crate::model::lake::metastore_status::State>>(
27709 mut self,
27710 v: T,
27711 ) -> Self {
27712 self.state = v.into();
27713 self
27714 }
27715
27716 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27718 self.message = v.into();
27719 self
27720 }
27721
27722 pub fn set_update_time<T>(mut self, v: T) -> Self
27724 where
27725 T: std::convert::Into<wkt::Timestamp>,
27726 {
27727 self.update_time = std::option::Option::Some(v.into());
27728 self
27729 }
27730
27731 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
27733 where
27734 T: std::convert::Into<wkt::Timestamp>,
27735 {
27736 self.update_time = v.map(|x| x.into());
27737 self
27738 }
27739
27740 pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27742 self.endpoint = v.into();
27743 self
27744 }
27745 }
27746
27747 impl wkt::message::Message for MetastoreStatus {
27748 fn typename() -> &'static str {
27749 "type.googleapis.com/google.cloud.dataplex.v1.Lake.MetastoreStatus"
27750 }
27751 }
27752
27753 pub mod metastore_status {
27755 #[allow(unused_imports)]
27756 use super::*;
27757
27758 #[derive(Clone, Debug, PartialEq)]
27774 #[non_exhaustive]
27775 pub enum State {
27776 Unspecified,
27778 None,
27780 Ready,
27782 Updating,
27784 Error,
27786 UnknownValue(state::UnknownValue),
27791 }
27792
27793 #[doc(hidden)]
27794 pub mod state {
27795 #[allow(unused_imports)]
27796 use super::*;
27797 #[derive(Clone, Debug, PartialEq)]
27798 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
27799 }
27800
27801 impl State {
27802 pub fn value(&self) -> std::option::Option<i32> {
27807 match self {
27808 Self::Unspecified => std::option::Option::Some(0),
27809 Self::None => std::option::Option::Some(1),
27810 Self::Ready => std::option::Option::Some(2),
27811 Self::Updating => std::option::Option::Some(3),
27812 Self::Error => std::option::Option::Some(4),
27813 Self::UnknownValue(u) => u.0.value(),
27814 }
27815 }
27816
27817 pub fn name(&self) -> std::option::Option<&str> {
27822 match self {
27823 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
27824 Self::None => std::option::Option::Some("NONE"),
27825 Self::Ready => std::option::Option::Some("READY"),
27826 Self::Updating => std::option::Option::Some("UPDATING"),
27827 Self::Error => std::option::Option::Some("ERROR"),
27828 Self::UnknownValue(u) => u.0.name(),
27829 }
27830 }
27831 }
27832
27833 impl std::default::Default for State {
27834 fn default() -> Self {
27835 use std::convert::From;
27836 Self::from(0)
27837 }
27838 }
27839
27840 impl std::fmt::Display for State {
27841 fn fmt(
27842 &self,
27843 f: &mut std::fmt::Formatter<'_>,
27844 ) -> std::result::Result<(), std::fmt::Error> {
27845 wkt::internal::display_enum(f, self.name(), self.value())
27846 }
27847 }
27848
27849 impl std::convert::From<i32> for State {
27850 fn from(value: i32) -> Self {
27851 match value {
27852 0 => Self::Unspecified,
27853 1 => Self::None,
27854 2 => Self::Ready,
27855 3 => Self::Updating,
27856 4 => Self::Error,
27857 _ => Self::UnknownValue(state::UnknownValue(
27858 wkt::internal::UnknownEnumValue::Integer(value),
27859 )),
27860 }
27861 }
27862 }
27863
27864 impl std::convert::From<&str> for State {
27865 fn from(value: &str) -> Self {
27866 use std::string::ToString;
27867 match value {
27868 "STATE_UNSPECIFIED" => Self::Unspecified,
27869 "NONE" => Self::None,
27870 "READY" => Self::Ready,
27871 "UPDATING" => Self::Updating,
27872 "ERROR" => Self::Error,
27873 _ => Self::UnknownValue(state::UnknownValue(
27874 wkt::internal::UnknownEnumValue::String(value.to_string()),
27875 )),
27876 }
27877 }
27878 }
27879
27880 impl serde::ser::Serialize for State {
27881 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27882 where
27883 S: serde::Serializer,
27884 {
27885 match self {
27886 Self::Unspecified => serializer.serialize_i32(0),
27887 Self::None => serializer.serialize_i32(1),
27888 Self::Ready => serializer.serialize_i32(2),
27889 Self::Updating => serializer.serialize_i32(3),
27890 Self::Error => serializer.serialize_i32(4),
27891 Self::UnknownValue(u) => u.0.serialize(serializer),
27892 }
27893 }
27894 }
27895
27896 impl<'de> serde::de::Deserialize<'de> for State {
27897 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27898 where
27899 D: serde::Deserializer<'de>,
27900 {
27901 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
27902 ".google.cloud.dataplex.v1.Lake.MetastoreStatus.State",
27903 ))
27904 }
27905 }
27906 }
27907}
27908
27909#[derive(Clone, Default, PartialEq)]
27911#[non_exhaustive]
27912pub struct AssetStatus {
27913 pub update_time: std::option::Option<wkt::Timestamp>,
27915
27916 pub active_assets: i32,
27918
27919 pub security_policy_applying_assets: i32,
27922
27923 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27924}
27925
27926impl AssetStatus {
27927 pub fn new() -> Self {
27928 std::default::Default::default()
27929 }
27930
27931 pub fn set_update_time<T>(mut self, v: T) -> Self
27933 where
27934 T: std::convert::Into<wkt::Timestamp>,
27935 {
27936 self.update_time = std::option::Option::Some(v.into());
27937 self
27938 }
27939
27940 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
27942 where
27943 T: std::convert::Into<wkt::Timestamp>,
27944 {
27945 self.update_time = v.map(|x| x.into());
27946 self
27947 }
27948
27949 pub fn set_active_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27951 self.active_assets = v.into();
27952 self
27953 }
27954
27955 pub fn set_security_policy_applying_assets<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27957 self.security_policy_applying_assets = v.into();
27958 self
27959 }
27960}
27961
27962impl wkt::message::Message for AssetStatus {
27963 fn typename() -> &'static str {
27964 "type.googleapis.com/google.cloud.dataplex.v1.AssetStatus"
27965 }
27966}
27967
27968#[derive(Clone, Default, PartialEq)]
27973#[non_exhaustive]
27974pub struct Zone {
27975 pub name: std::string::String,
27978
27979 pub display_name: std::string::String,
27981
27982 pub uid: std::string::String,
27985
27986 pub create_time: std::option::Option<wkt::Timestamp>,
27988
27989 pub update_time: std::option::Option<wkt::Timestamp>,
27991
27992 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
27994
27995 pub description: std::string::String,
27997
27998 pub state: crate::model::State,
28000
28001 pub r#type: crate::model::zone::Type,
28003
28004 pub discovery_spec: std::option::Option<crate::model::zone::DiscoverySpec>,
28007
28008 pub resource_spec: std::option::Option<crate::model::zone::ResourceSpec>,
28011
28012 pub asset_status: std::option::Option<crate::model::AssetStatus>,
28014
28015 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28016}
28017
28018impl Zone {
28019 pub fn new() -> Self {
28020 std::default::Default::default()
28021 }
28022
28023 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28025 self.name = v.into();
28026 self
28027 }
28028
28029 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28031 self.display_name = v.into();
28032 self
28033 }
28034
28035 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28037 self.uid = v.into();
28038 self
28039 }
28040
28041 pub fn set_create_time<T>(mut self, v: T) -> Self
28043 where
28044 T: std::convert::Into<wkt::Timestamp>,
28045 {
28046 self.create_time = std::option::Option::Some(v.into());
28047 self
28048 }
28049
28050 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
28052 where
28053 T: std::convert::Into<wkt::Timestamp>,
28054 {
28055 self.create_time = v.map(|x| x.into());
28056 self
28057 }
28058
28059 pub fn set_update_time<T>(mut self, v: T) -> Self
28061 where
28062 T: std::convert::Into<wkt::Timestamp>,
28063 {
28064 self.update_time = std::option::Option::Some(v.into());
28065 self
28066 }
28067
28068 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
28070 where
28071 T: std::convert::Into<wkt::Timestamp>,
28072 {
28073 self.update_time = v.map(|x| x.into());
28074 self
28075 }
28076
28077 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
28079 where
28080 T: std::iter::IntoIterator<Item = (K, V)>,
28081 K: std::convert::Into<std::string::String>,
28082 V: std::convert::Into<std::string::String>,
28083 {
28084 use std::iter::Iterator;
28085 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
28086 self
28087 }
28088
28089 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28091 self.description = v.into();
28092 self
28093 }
28094
28095 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
28097 self.state = v.into();
28098 self
28099 }
28100
28101 pub fn set_type<T: std::convert::Into<crate::model::zone::Type>>(mut self, v: T) -> Self {
28103 self.r#type = v.into();
28104 self
28105 }
28106
28107 pub fn set_discovery_spec<T>(mut self, v: T) -> Self
28109 where
28110 T: std::convert::Into<crate::model::zone::DiscoverySpec>,
28111 {
28112 self.discovery_spec = std::option::Option::Some(v.into());
28113 self
28114 }
28115
28116 pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
28118 where
28119 T: std::convert::Into<crate::model::zone::DiscoverySpec>,
28120 {
28121 self.discovery_spec = v.map(|x| x.into());
28122 self
28123 }
28124
28125 pub fn set_resource_spec<T>(mut self, v: T) -> Self
28127 where
28128 T: std::convert::Into<crate::model::zone::ResourceSpec>,
28129 {
28130 self.resource_spec = std::option::Option::Some(v.into());
28131 self
28132 }
28133
28134 pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
28136 where
28137 T: std::convert::Into<crate::model::zone::ResourceSpec>,
28138 {
28139 self.resource_spec = v.map(|x| x.into());
28140 self
28141 }
28142
28143 pub fn set_asset_status<T>(mut self, v: T) -> Self
28145 where
28146 T: std::convert::Into<crate::model::AssetStatus>,
28147 {
28148 self.asset_status = std::option::Option::Some(v.into());
28149 self
28150 }
28151
28152 pub fn set_or_clear_asset_status<T>(mut self, v: std::option::Option<T>) -> Self
28154 where
28155 T: std::convert::Into<crate::model::AssetStatus>,
28156 {
28157 self.asset_status = v.map(|x| x.into());
28158 self
28159 }
28160}
28161
28162impl wkt::message::Message for Zone {
28163 fn typename() -> &'static str {
28164 "type.googleapis.com/google.cloud.dataplex.v1.Zone"
28165 }
28166}
28167
28168pub mod zone {
28170 #[allow(unused_imports)]
28171 use super::*;
28172
28173 #[derive(Clone, Default, PartialEq)]
28175 #[non_exhaustive]
28176 pub struct ResourceSpec {
28177 pub location_type: crate::model::zone::resource_spec::LocationType,
28180
28181 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28182 }
28183
28184 impl ResourceSpec {
28185 pub fn new() -> Self {
28186 std::default::Default::default()
28187 }
28188
28189 pub fn set_location_type<
28191 T: std::convert::Into<crate::model::zone::resource_spec::LocationType>,
28192 >(
28193 mut self,
28194 v: T,
28195 ) -> Self {
28196 self.location_type = v.into();
28197 self
28198 }
28199 }
28200
28201 impl wkt::message::Message for ResourceSpec {
28202 fn typename() -> &'static str {
28203 "type.googleapis.com/google.cloud.dataplex.v1.Zone.ResourceSpec"
28204 }
28205 }
28206
28207 pub mod resource_spec {
28209 #[allow(unused_imports)]
28210 use super::*;
28211
28212 #[derive(Clone, Debug, PartialEq)]
28228 #[non_exhaustive]
28229 pub enum LocationType {
28230 Unspecified,
28232 SingleRegion,
28234 MultiRegion,
28236 UnknownValue(location_type::UnknownValue),
28241 }
28242
28243 #[doc(hidden)]
28244 pub mod location_type {
28245 #[allow(unused_imports)]
28246 use super::*;
28247 #[derive(Clone, Debug, PartialEq)]
28248 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28249 }
28250
28251 impl LocationType {
28252 pub fn value(&self) -> std::option::Option<i32> {
28257 match self {
28258 Self::Unspecified => std::option::Option::Some(0),
28259 Self::SingleRegion => std::option::Option::Some(1),
28260 Self::MultiRegion => std::option::Option::Some(2),
28261 Self::UnknownValue(u) => u.0.value(),
28262 }
28263 }
28264
28265 pub fn name(&self) -> std::option::Option<&str> {
28270 match self {
28271 Self::Unspecified => std::option::Option::Some("LOCATION_TYPE_UNSPECIFIED"),
28272 Self::SingleRegion => std::option::Option::Some("SINGLE_REGION"),
28273 Self::MultiRegion => std::option::Option::Some("MULTI_REGION"),
28274 Self::UnknownValue(u) => u.0.name(),
28275 }
28276 }
28277 }
28278
28279 impl std::default::Default for LocationType {
28280 fn default() -> Self {
28281 use std::convert::From;
28282 Self::from(0)
28283 }
28284 }
28285
28286 impl std::fmt::Display for LocationType {
28287 fn fmt(
28288 &self,
28289 f: &mut std::fmt::Formatter<'_>,
28290 ) -> std::result::Result<(), std::fmt::Error> {
28291 wkt::internal::display_enum(f, self.name(), self.value())
28292 }
28293 }
28294
28295 impl std::convert::From<i32> for LocationType {
28296 fn from(value: i32) -> Self {
28297 match value {
28298 0 => Self::Unspecified,
28299 1 => Self::SingleRegion,
28300 2 => Self::MultiRegion,
28301 _ => Self::UnknownValue(location_type::UnknownValue(
28302 wkt::internal::UnknownEnumValue::Integer(value),
28303 )),
28304 }
28305 }
28306 }
28307
28308 impl std::convert::From<&str> for LocationType {
28309 fn from(value: &str) -> Self {
28310 use std::string::ToString;
28311 match value {
28312 "LOCATION_TYPE_UNSPECIFIED" => Self::Unspecified,
28313 "SINGLE_REGION" => Self::SingleRegion,
28314 "MULTI_REGION" => Self::MultiRegion,
28315 _ => Self::UnknownValue(location_type::UnknownValue(
28316 wkt::internal::UnknownEnumValue::String(value.to_string()),
28317 )),
28318 }
28319 }
28320 }
28321
28322 impl serde::ser::Serialize for LocationType {
28323 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28324 where
28325 S: serde::Serializer,
28326 {
28327 match self {
28328 Self::Unspecified => serializer.serialize_i32(0),
28329 Self::SingleRegion => serializer.serialize_i32(1),
28330 Self::MultiRegion => serializer.serialize_i32(2),
28331 Self::UnknownValue(u) => u.0.serialize(serializer),
28332 }
28333 }
28334 }
28335
28336 impl<'de> serde::de::Deserialize<'de> for LocationType {
28337 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28338 where
28339 D: serde::Deserializer<'de>,
28340 {
28341 deserializer.deserialize_any(wkt::internal::EnumVisitor::<LocationType>::new(
28342 ".google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType",
28343 ))
28344 }
28345 }
28346 }
28347
28348 #[derive(Clone, Default, PartialEq)]
28350 #[non_exhaustive]
28351 pub struct DiscoverySpec {
28352 pub enabled: bool,
28354
28355 pub include_patterns: std::vec::Vec<std::string::String>,
28361
28362 pub exclude_patterns: std::vec::Vec<std::string::String>,
28367
28368 pub csv_options: std::option::Option<crate::model::zone::discovery_spec::CsvOptions>,
28370
28371 pub json_options: std::option::Option<crate::model::zone::discovery_spec::JsonOptions>,
28373
28374 pub trigger: std::option::Option<crate::model::zone::discovery_spec::Trigger>,
28376
28377 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28378 }
28379
28380 impl DiscoverySpec {
28381 pub fn new() -> Self {
28382 std::default::Default::default()
28383 }
28384
28385 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
28387 self.enabled = v.into();
28388 self
28389 }
28390
28391 pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
28393 where
28394 T: std::iter::IntoIterator<Item = V>,
28395 V: std::convert::Into<std::string::String>,
28396 {
28397 use std::iter::Iterator;
28398 self.include_patterns = v.into_iter().map(|i| i.into()).collect();
28399 self
28400 }
28401
28402 pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
28404 where
28405 T: std::iter::IntoIterator<Item = V>,
28406 V: std::convert::Into<std::string::String>,
28407 {
28408 use std::iter::Iterator;
28409 self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
28410 self
28411 }
28412
28413 pub fn set_csv_options<T>(mut self, v: T) -> Self
28415 where
28416 T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
28417 {
28418 self.csv_options = std::option::Option::Some(v.into());
28419 self
28420 }
28421
28422 pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
28424 where
28425 T: std::convert::Into<crate::model::zone::discovery_spec::CsvOptions>,
28426 {
28427 self.csv_options = v.map(|x| x.into());
28428 self
28429 }
28430
28431 pub fn set_json_options<T>(mut self, v: T) -> Self
28433 where
28434 T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
28435 {
28436 self.json_options = std::option::Option::Some(v.into());
28437 self
28438 }
28439
28440 pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
28442 where
28443 T: std::convert::Into<crate::model::zone::discovery_spec::JsonOptions>,
28444 {
28445 self.json_options = v.map(|x| x.into());
28446 self
28447 }
28448
28449 pub fn set_trigger<
28454 T: std::convert::Into<std::option::Option<crate::model::zone::discovery_spec::Trigger>>,
28455 >(
28456 mut self,
28457 v: T,
28458 ) -> Self {
28459 self.trigger = v.into();
28460 self
28461 }
28462
28463 pub fn schedule(&self) -> std::option::Option<&std::string::String> {
28467 #[allow(unreachable_patterns)]
28468 self.trigger.as_ref().and_then(|v| match v {
28469 crate::model::zone::discovery_spec::Trigger::Schedule(v) => {
28470 std::option::Option::Some(v)
28471 }
28472 _ => std::option::Option::None,
28473 })
28474 }
28475
28476 pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28482 self.trigger = std::option::Option::Some(
28483 crate::model::zone::discovery_spec::Trigger::Schedule(v.into()),
28484 );
28485 self
28486 }
28487 }
28488
28489 impl wkt::message::Message for DiscoverySpec {
28490 fn typename() -> &'static str {
28491 "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec"
28492 }
28493 }
28494
28495 pub mod discovery_spec {
28497 #[allow(unused_imports)]
28498 use super::*;
28499
28500 #[derive(Clone, Default, PartialEq)]
28502 #[non_exhaustive]
28503 pub struct CsvOptions {
28504 pub header_rows: i32,
28507
28508 pub delimiter: std::string::String,
28511
28512 pub encoding: std::string::String,
28514
28515 pub disable_type_inference: bool,
28518
28519 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28520 }
28521
28522 impl CsvOptions {
28523 pub fn new() -> Self {
28524 std::default::Default::default()
28525 }
28526
28527 pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
28529 self.header_rows = v.into();
28530 self
28531 }
28532
28533 pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
28535 mut self,
28536 v: T,
28537 ) -> Self {
28538 self.delimiter = v.into();
28539 self
28540 }
28541
28542 pub fn set_encoding<T: std::convert::Into<std::string::String>>(
28544 mut self,
28545 v: T,
28546 ) -> Self {
28547 self.encoding = v.into();
28548 self
28549 }
28550
28551 pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
28553 self.disable_type_inference = v.into();
28554 self
28555 }
28556 }
28557
28558 impl wkt::message::Message for CsvOptions {
28559 fn typename() -> &'static str {
28560 "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions"
28561 }
28562 }
28563
28564 #[derive(Clone, Default, PartialEq)]
28566 #[non_exhaustive]
28567 pub struct JsonOptions {
28568 pub encoding: std::string::String,
28570
28571 pub disable_type_inference: bool,
28575
28576 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28577 }
28578
28579 impl JsonOptions {
28580 pub fn new() -> Self {
28581 std::default::Default::default()
28582 }
28583
28584 pub fn set_encoding<T: std::convert::Into<std::string::String>>(
28586 mut self,
28587 v: T,
28588 ) -> Self {
28589 self.encoding = v.into();
28590 self
28591 }
28592
28593 pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
28595 self.disable_type_inference = v.into();
28596 self
28597 }
28598 }
28599
28600 impl wkt::message::Message for JsonOptions {
28601 fn typename() -> &'static str {
28602 "type.googleapis.com/google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions"
28603 }
28604 }
28605
28606 #[derive(Clone, Debug, PartialEq)]
28608 #[non_exhaustive]
28609 pub enum Trigger {
28610 Schedule(std::string::String),
28621 }
28622 }
28623
28624 #[derive(Clone, Debug, PartialEq)]
28640 #[non_exhaustive]
28641 pub enum Type {
28642 Unspecified,
28644 Raw,
28647 Curated,
28652 UnknownValue(r#type::UnknownValue),
28657 }
28658
28659 #[doc(hidden)]
28660 pub mod r#type {
28661 #[allow(unused_imports)]
28662 use super::*;
28663 #[derive(Clone, Debug, PartialEq)]
28664 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28665 }
28666
28667 impl Type {
28668 pub fn value(&self) -> std::option::Option<i32> {
28673 match self {
28674 Self::Unspecified => std::option::Option::Some(0),
28675 Self::Raw => std::option::Option::Some(1),
28676 Self::Curated => std::option::Option::Some(2),
28677 Self::UnknownValue(u) => u.0.value(),
28678 }
28679 }
28680
28681 pub fn name(&self) -> std::option::Option<&str> {
28686 match self {
28687 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
28688 Self::Raw => std::option::Option::Some("RAW"),
28689 Self::Curated => std::option::Option::Some("CURATED"),
28690 Self::UnknownValue(u) => u.0.name(),
28691 }
28692 }
28693 }
28694
28695 impl std::default::Default for Type {
28696 fn default() -> Self {
28697 use std::convert::From;
28698 Self::from(0)
28699 }
28700 }
28701
28702 impl std::fmt::Display for Type {
28703 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28704 wkt::internal::display_enum(f, self.name(), self.value())
28705 }
28706 }
28707
28708 impl std::convert::From<i32> for Type {
28709 fn from(value: i32) -> Self {
28710 match value {
28711 0 => Self::Unspecified,
28712 1 => Self::Raw,
28713 2 => Self::Curated,
28714 _ => Self::UnknownValue(r#type::UnknownValue(
28715 wkt::internal::UnknownEnumValue::Integer(value),
28716 )),
28717 }
28718 }
28719 }
28720
28721 impl std::convert::From<&str> for Type {
28722 fn from(value: &str) -> Self {
28723 use std::string::ToString;
28724 match value {
28725 "TYPE_UNSPECIFIED" => Self::Unspecified,
28726 "RAW" => Self::Raw,
28727 "CURATED" => Self::Curated,
28728 _ => Self::UnknownValue(r#type::UnknownValue(
28729 wkt::internal::UnknownEnumValue::String(value.to_string()),
28730 )),
28731 }
28732 }
28733 }
28734
28735 impl serde::ser::Serialize for Type {
28736 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28737 where
28738 S: serde::Serializer,
28739 {
28740 match self {
28741 Self::Unspecified => serializer.serialize_i32(0),
28742 Self::Raw => serializer.serialize_i32(1),
28743 Self::Curated => serializer.serialize_i32(2),
28744 Self::UnknownValue(u) => u.0.serialize(serializer),
28745 }
28746 }
28747 }
28748
28749 impl<'de> serde::de::Deserialize<'de> for Type {
28750 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28751 where
28752 D: serde::Deserializer<'de>,
28753 {
28754 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
28755 ".google.cloud.dataplex.v1.Zone.Type",
28756 ))
28757 }
28758 }
28759}
28760
28761#[derive(Clone, Default, PartialEq)]
28763#[non_exhaustive]
28764pub struct Action {
28765 pub category: crate::model::action::Category,
28767
28768 pub issue: std::string::String,
28770
28771 pub detect_time: std::option::Option<wkt::Timestamp>,
28773
28774 pub name: std::string::String,
28779
28780 pub lake: std::string::String,
28783
28784 pub zone: std::string::String,
28787
28788 pub asset: std::string::String,
28791
28792 pub data_locations: std::vec::Vec<std::string::String>,
28798
28799 pub details: std::option::Option<crate::model::action::Details>,
28801
28802 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28803}
28804
28805impl Action {
28806 pub fn new() -> Self {
28807 std::default::Default::default()
28808 }
28809
28810 pub fn set_category<T: std::convert::Into<crate::model::action::Category>>(
28812 mut self,
28813 v: T,
28814 ) -> Self {
28815 self.category = v.into();
28816 self
28817 }
28818
28819 pub fn set_issue<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28821 self.issue = v.into();
28822 self
28823 }
28824
28825 pub fn set_detect_time<T>(mut self, v: T) -> Self
28827 where
28828 T: std::convert::Into<wkt::Timestamp>,
28829 {
28830 self.detect_time = std::option::Option::Some(v.into());
28831 self
28832 }
28833
28834 pub fn set_or_clear_detect_time<T>(mut self, v: std::option::Option<T>) -> Self
28836 where
28837 T: std::convert::Into<wkt::Timestamp>,
28838 {
28839 self.detect_time = v.map(|x| x.into());
28840 self
28841 }
28842
28843 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28845 self.name = v.into();
28846 self
28847 }
28848
28849 pub fn set_lake<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28851 self.lake = v.into();
28852 self
28853 }
28854
28855 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28857 self.zone = v.into();
28858 self
28859 }
28860
28861 pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28863 self.asset = v.into();
28864 self
28865 }
28866
28867 pub fn set_data_locations<T, V>(mut self, v: T) -> Self
28869 where
28870 T: std::iter::IntoIterator<Item = V>,
28871 V: std::convert::Into<std::string::String>,
28872 {
28873 use std::iter::Iterator;
28874 self.data_locations = v.into_iter().map(|i| i.into()).collect();
28875 self
28876 }
28877
28878 pub fn set_details<
28883 T: std::convert::Into<std::option::Option<crate::model::action::Details>>,
28884 >(
28885 mut self,
28886 v: T,
28887 ) -> Self {
28888 self.details = v.into();
28889 self
28890 }
28891
28892 pub fn invalid_data_format(
28896 &self,
28897 ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataFormat>> {
28898 #[allow(unreachable_patterns)]
28899 self.details.as_ref().and_then(|v| match v {
28900 crate::model::action::Details::InvalidDataFormat(v) => std::option::Option::Some(v),
28901 _ => std::option::Option::None,
28902 })
28903 }
28904
28905 pub fn set_invalid_data_format<
28911 T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataFormat>>,
28912 >(
28913 mut self,
28914 v: T,
28915 ) -> Self {
28916 self.details =
28917 std::option::Option::Some(crate::model::action::Details::InvalidDataFormat(v.into()));
28918 self
28919 }
28920
28921 pub fn incompatible_data_schema(
28925 &self,
28926 ) -> std::option::Option<&std::boxed::Box<crate::model::action::IncompatibleDataSchema>> {
28927 #[allow(unreachable_patterns)]
28928 self.details.as_ref().and_then(|v| match v {
28929 crate::model::action::Details::IncompatibleDataSchema(v) => {
28930 std::option::Option::Some(v)
28931 }
28932 _ => std::option::Option::None,
28933 })
28934 }
28935
28936 pub fn set_incompatible_data_schema<
28942 T: std::convert::Into<std::boxed::Box<crate::model::action::IncompatibleDataSchema>>,
28943 >(
28944 mut self,
28945 v: T,
28946 ) -> Self {
28947 self.details = std::option::Option::Some(
28948 crate::model::action::Details::IncompatibleDataSchema(v.into()),
28949 );
28950 self
28951 }
28952
28953 pub fn invalid_data_partition(
28957 &self,
28958 ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataPartition>> {
28959 #[allow(unreachable_patterns)]
28960 self.details.as_ref().and_then(|v| match v {
28961 crate::model::action::Details::InvalidDataPartition(v) => std::option::Option::Some(v),
28962 _ => std::option::Option::None,
28963 })
28964 }
28965
28966 pub fn set_invalid_data_partition<
28972 T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataPartition>>,
28973 >(
28974 mut self,
28975 v: T,
28976 ) -> Self {
28977 self.details = std::option::Option::Some(
28978 crate::model::action::Details::InvalidDataPartition(v.into()),
28979 );
28980 self
28981 }
28982
28983 pub fn missing_data(
28987 &self,
28988 ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingData>> {
28989 #[allow(unreachable_patterns)]
28990 self.details.as_ref().and_then(|v| match v {
28991 crate::model::action::Details::MissingData(v) => std::option::Option::Some(v),
28992 _ => std::option::Option::None,
28993 })
28994 }
28995
28996 pub fn set_missing_data<
29002 T: std::convert::Into<std::boxed::Box<crate::model::action::MissingData>>,
29003 >(
29004 mut self,
29005 v: T,
29006 ) -> Self {
29007 self.details =
29008 std::option::Option::Some(crate::model::action::Details::MissingData(v.into()));
29009 self
29010 }
29011
29012 pub fn missing_resource(
29016 &self,
29017 ) -> std::option::Option<&std::boxed::Box<crate::model::action::MissingResource>> {
29018 #[allow(unreachable_patterns)]
29019 self.details.as_ref().and_then(|v| match v {
29020 crate::model::action::Details::MissingResource(v) => std::option::Option::Some(v),
29021 _ => std::option::Option::None,
29022 })
29023 }
29024
29025 pub fn set_missing_resource<
29031 T: std::convert::Into<std::boxed::Box<crate::model::action::MissingResource>>,
29032 >(
29033 mut self,
29034 v: T,
29035 ) -> Self {
29036 self.details =
29037 std::option::Option::Some(crate::model::action::Details::MissingResource(v.into()));
29038 self
29039 }
29040
29041 pub fn unauthorized_resource(
29045 &self,
29046 ) -> std::option::Option<&std::boxed::Box<crate::model::action::UnauthorizedResource>> {
29047 #[allow(unreachable_patterns)]
29048 self.details.as_ref().and_then(|v| match v {
29049 crate::model::action::Details::UnauthorizedResource(v) => std::option::Option::Some(v),
29050 _ => std::option::Option::None,
29051 })
29052 }
29053
29054 pub fn set_unauthorized_resource<
29060 T: std::convert::Into<std::boxed::Box<crate::model::action::UnauthorizedResource>>,
29061 >(
29062 mut self,
29063 v: T,
29064 ) -> Self {
29065 self.details = std::option::Option::Some(
29066 crate::model::action::Details::UnauthorizedResource(v.into()),
29067 );
29068 self
29069 }
29070
29071 pub fn failed_security_policy_apply(
29075 &self,
29076 ) -> std::option::Option<&std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>
29077 {
29078 #[allow(unreachable_patterns)]
29079 self.details.as_ref().and_then(|v| match v {
29080 crate::model::action::Details::FailedSecurityPolicyApply(v) => {
29081 std::option::Option::Some(v)
29082 }
29083 _ => std::option::Option::None,
29084 })
29085 }
29086
29087 pub fn set_failed_security_policy_apply<
29093 T: std::convert::Into<std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>>,
29094 >(
29095 mut self,
29096 v: T,
29097 ) -> Self {
29098 self.details = std::option::Option::Some(
29099 crate::model::action::Details::FailedSecurityPolicyApply(v.into()),
29100 );
29101 self
29102 }
29103
29104 pub fn invalid_data_organization(
29108 &self,
29109 ) -> std::option::Option<&std::boxed::Box<crate::model::action::InvalidDataOrganization>> {
29110 #[allow(unreachable_patterns)]
29111 self.details.as_ref().and_then(|v| match v {
29112 crate::model::action::Details::InvalidDataOrganization(v) => {
29113 std::option::Option::Some(v)
29114 }
29115 _ => std::option::Option::None,
29116 })
29117 }
29118
29119 pub fn set_invalid_data_organization<
29125 T: std::convert::Into<std::boxed::Box<crate::model::action::InvalidDataOrganization>>,
29126 >(
29127 mut self,
29128 v: T,
29129 ) -> Self {
29130 self.details = std::option::Option::Some(
29131 crate::model::action::Details::InvalidDataOrganization(v.into()),
29132 );
29133 self
29134 }
29135}
29136
29137impl wkt::message::Message for Action {
29138 fn typename() -> &'static str {
29139 "type.googleapis.com/google.cloud.dataplex.v1.Action"
29140 }
29141}
29142
29143pub mod action {
29145 #[allow(unused_imports)]
29146 use super::*;
29147
29148 #[derive(Clone, Default, PartialEq)]
29150 #[non_exhaustive]
29151 pub struct MissingResource {
29152 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29153 }
29154
29155 impl MissingResource {
29156 pub fn new() -> Self {
29157 std::default::Default::default()
29158 }
29159 }
29160
29161 impl wkt::message::Message for MissingResource {
29162 fn typename() -> &'static str {
29163 "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingResource"
29164 }
29165 }
29166
29167 #[derive(Clone, Default, PartialEq)]
29171 #[non_exhaustive]
29172 pub struct UnauthorizedResource {
29173 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29174 }
29175
29176 impl UnauthorizedResource {
29177 pub fn new() -> Self {
29178 std::default::Default::default()
29179 }
29180 }
29181
29182 impl wkt::message::Message for UnauthorizedResource {
29183 fn typename() -> &'static str {
29184 "type.googleapis.com/google.cloud.dataplex.v1.Action.UnauthorizedResource"
29185 }
29186 }
29187
29188 #[derive(Clone, Default, PartialEq)]
29193 #[non_exhaustive]
29194 pub struct FailedSecurityPolicyApply {
29195 pub asset: std::string::String,
29198
29199 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29200 }
29201
29202 impl FailedSecurityPolicyApply {
29203 pub fn new() -> Self {
29204 std::default::Default::default()
29205 }
29206
29207 pub fn set_asset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29209 self.asset = v.into();
29210 self
29211 }
29212 }
29213
29214 impl wkt::message::Message for FailedSecurityPolicyApply {
29215 fn typename() -> &'static str {
29216 "type.googleapis.com/google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply"
29217 }
29218 }
29219
29220 #[derive(Clone, Default, PartialEq)]
29222 #[non_exhaustive]
29223 pub struct InvalidDataFormat {
29224 pub sampled_data_locations: std::vec::Vec<std::string::String>,
29227
29228 pub expected_format: std::string::String,
29230
29231 pub new_format: std::string::String,
29233
29234 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29235 }
29236
29237 impl InvalidDataFormat {
29238 pub fn new() -> Self {
29239 std::default::Default::default()
29240 }
29241
29242 pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
29244 where
29245 T: std::iter::IntoIterator<Item = V>,
29246 V: std::convert::Into<std::string::String>,
29247 {
29248 use std::iter::Iterator;
29249 self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
29250 self
29251 }
29252
29253 pub fn set_expected_format<T: std::convert::Into<std::string::String>>(
29255 mut self,
29256 v: T,
29257 ) -> Self {
29258 self.expected_format = v.into();
29259 self
29260 }
29261
29262 pub fn set_new_format<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29264 self.new_format = v.into();
29265 self
29266 }
29267 }
29268
29269 impl wkt::message::Message for InvalidDataFormat {
29270 fn typename() -> &'static str {
29271 "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataFormat"
29272 }
29273 }
29274
29275 #[derive(Clone, Default, PartialEq)]
29277 #[non_exhaustive]
29278 pub struct IncompatibleDataSchema {
29279 pub table: std::string::String,
29281
29282 pub existing_schema: std::string::String,
29285
29286 pub new_schema: std::string::String,
29289
29290 pub sampled_data_locations: std::vec::Vec<std::string::String>,
29293
29294 pub schema_change: crate::model::action::incompatible_data_schema::SchemaChange,
29296
29297 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29298 }
29299
29300 impl IncompatibleDataSchema {
29301 pub fn new() -> Self {
29302 std::default::Default::default()
29303 }
29304
29305 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29307 self.table = v.into();
29308 self
29309 }
29310
29311 pub fn set_existing_schema<T: std::convert::Into<std::string::String>>(
29313 mut self,
29314 v: T,
29315 ) -> Self {
29316 self.existing_schema = v.into();
29317 self
29318 }
29319
29320 pub fn set_new_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29322 self.new_schema = v.into();
29323 self
29324 }
29325
29326 pub fn set_sampled_data_locations<T, V>(mut self, v: T) -> Self
29328 where
29329 T: std::iter::IntoIterator<Item = V>,
29330 V: std::convert::Into<std::string::String>,
29331 {
29332 use std::iter::Iterator;
29333 self.sampled_data_locations = v.into_iter().map(|i| i.into()).collect();
29334 self
29335 }
29336
29337 pub fn set_schema_change<
29339 T: std::convert::Into<crate::model::action::incompatible_data_schema::SchemaChange>,
29340 >(
29341 mut self,
29342 v: T,
29343 ) -> Self {
29344 self.schema_change = v.into();
29345 self
29346 }
29347 }
29348
29349 impl wkt::message::Message for IncompatibleDataSchema {
29350 fn typename() -> &'static str {
29351 "type.googleapis.com/google.cloud.dataplex.v1.Action.IncompatibleDataSchema"
29352 }
29353 }
29354
29355 pub mod incompatible_data_schema {
29357 #[allow(unused_imports)]
29358 use super::*;
29359
29360 #[derive(Clone, Debug, PartialEq)]
29376 #[non_exhaustive]
29377 pub enum SchemaChange {
29378 Unspecified,
29380 Incompatible,
29382 Modified,
29385 UnknownValue(schema_change::UnknownValue),
29390 }
29391
29392 #[doc(hidden)]
29393 pub mod schema_change {
29394 #[allow(unused_imports)]
29395 use super::*;
29396 #[derive(Clone, Debug, PartialEq)]
29397 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29398 }
29399
29400 impl SchemaChange {
29401 pub fn value(&self) -> std::option::Option<i32> {
29406 match self {
29407 Self::Unspecified => std::option::Option::Some(0),
29408 Self::Incompatible => std::option::Option::Some(1),
29409 Self::Modified => std::option::Option::Some(2),
29410 Self::UnknownValue(u) => u.0.value(),
29411 }
29412 }
29413
29414 pub fn name(&self) -> std::option::Option<&str> {
29419 match self {
29420 Self::Unspecified => std::option::Option::Some("SCHEMA_CHANGE_UNSPECIFIED"),
29421 Self::Incompatible => std::option::Option::Some("INCOMPATIBLE"),
29422 Self::Modified => std::option::Option::Some("MODIFIED"),
29423 Self::UnknownValue(u) => u.0.name(),
29424 }
29425 }
29426 }
29427
29428 impl std::default::Default for SchemaChange {
29429 fn default() -> Self {
29430 use std::convert::From;
29431 Self::from(0)
29432 }
29433 }
29434
29435 impl std::fmt::Display for SchemaChange {
29436 fn fmt(
29437 &self,
29438 f: &mut std::fmt::Formatter<'_>,
29439 ) -> std::result::Result<(), std::fmt::Error> {
29440 wkt::internal::display_enum(f, self.name(), self.value())
29441 }
29442 }
29443
29444 impl std::convert::From<i32> for SchemaChange {
29445 fn from(value: i32) -> Self {
29446 match value {
29447 0 => Self::Unspecified,
29448 1 => Self::Incompatible,
29449 2 => Self::Modified,
29450 _ => Self::UnknownValue(schema_change::UnknownValue(
29451 wkt::internal::UnknownEnumValue::Integer(value),
29452 )),
29453 }
29454 }
29455 }
29456
29457 impl std::convert::From<&str> for SchemaChange {
29458 fn from(value: &str) -> Self {
29459 use std::string::ToString;
29460 match value {
29461 "SCHEMA_CHANGE_UNSPECIFIED" => Self::Unspecified,
29462 "INCOMPATIBLE" => Self::Incompatible,
29463 "MODIFIED" => Self::Modified,
29464 _ => Self::UnknownValue(schema_change::UnknownValue(
29465 wkt::internal::UnknownEnumValue::String(value.to_string()),
29466 )),
29467 }
29468 }
29469 }
29470
29471 impl serde::ser::Serialize for SchemaChange {
29472 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29473 where
29474 S: serde::Serializer,
29475 {
29476 match self {
29477 Self::Unspecified => serializer.serialize_i32(0),
29478 Self::Incompatible => serializer.serialize_i32(1),
29479 Self::Modified => serializer.serialize_i32(2),
29480 Self::UnknownValue(u) => u.0.serialize(serializer),
29481 }
29482 }
29483 }
29484
29485 impl<'de> serde::de::Deserialize<'de> for SchemaChange {
29486 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29487 where
29488 D: serde::Deserializer<'de>,
29489 {
29490 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SchemaChange>::new(
29491 ".google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange",
29492 ))
29493 }
29494 }
29495 }
29496
29497 #[derive(Clone, Default, PartialEq)]
29499 #[non_exhaustive]
29500 pub struct InvalidDataPartition {
29501 pub expected_structure: crate::model::action::invalid_data_partition::PartitionStructure,
29503
29504 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29505 }
29506
29507 impl InvalidDataPartition {
29508 pub fn new() -> Self {
29509 std::default::Default::default()
29510 }
29511
29512 pub fn set_expected_structure<
29514 T: std::convert::Into<crate::model::action::invalid_data_partition::PartitionStructure>,
29515 >(
29516 mut self,
29517 v: T,
29518 ) -> Self {
29519 self.expected_structure = v.into();
29520 self
29521 }
29522 }
29523
29524 impl wkt::message::Message for InvalidDataPartition {
29525 fn typename() -> &'static str {
29526 "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataPartition"
29527 }
29528 }
29529
29530 pub mod invalid_data_partition {
29532 #[allow(unused_imports)]
29533 use super::*;
29534
29535 #[derive(Clone, Debug, PartialEq)]
29551 #[non_exhaustive]
29552 pub enum PartitionStructure {
29553 Unspecified,
29555 ConsistentKeys,
29557 HiveStyleKeys,
29559 UnknownValue(partition_structure::UnknownValue),
29564 }
29565
29566 #[doc(hidden)]
29567 pub mod partition_structure {
29568 #[allow(unused_imports)]
29569 use super::*;
29570 #[derive(Clone, Debug, PartialEq)]
29571 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29572 }
29573
29574 impl PartitionStructure {
29575 pub fn value(&self) -> std::option::Option<i32> {
29580 match self {
29581 Self::Unspecified => std::option::Option::Some(0),
29582 Self::ConsistentKeys => std::option::Option::Some(1),
29583 Self::HiveStyleKeys => std::option::Option::Some(2),
29584 Self::UnknownValue(u) => u.0.value(),
29585 }
29586 }
29587
29588 pub fn name(&self) -> std::option::Option<&str> {
29593 match self {
29594 Self::Unspecified => {
29595 std::option::Option::Some("PARTITION_STRUCTURE_UNSPECIFIED")
29596 }
29597 Self::ConsistentKeys => std::option::Option::Some("CONSISTENT_KEYS"),
29598 Self::HiveStyleKeys => std::option::Option::Some("HIVE_STYLE_KEYS"),
29599 Self::UnknownValue(u) => u.0.name(),
29600 }
29601 }
29602 }
29603
29604 impl std::default::Default for PartitionStructure {
29605 fn default() -> Self {
29606 use std::convert::From;
29607 Self::from(0)
29608 }
29609 }
29610
29611 impl std::fmt::Display for PartitionStructure {
29612 fn fmt(
29613 &self,
29614 f: &mut std::fmt::Formatter<'_>,
29615 ) -> std::result::Result<(), std::fmt::Error> {
29616 wkt::internal::display_enum(f, self.name(), self.value())
29617 }
29618 }
29619
29620 impl std::convert::From<i32> for PartitionStructure {
29621 fn from(value: i32) -> Self {
29622 match value {
29623 0 => Self::Unspecified,
29624 1 => Self::ConsistentKeys,
29625 2 => Self::HiveStyleKeys,
29626 _ => Self::UnknownValue(partition_structure::UnknownValue(
29627 wkt::internal::UnknownEnumValue::Integer(value),
29628 )),
29629 }
29630 }
29631 }
29632
29633 impl std::convert::From<&str> for PartitionStructure {
29634 fn from(value: &str) -> Self {
29635 use std::string::ToString;
29636 match value {
29637 "PARTITION_STRUCTURE_UNSPECIFIED" => Self::Unspecified,
29638 "CONSISTENT_KEYS" => Self::ConsistentKeys,
29639 "HIVE_STYLE_KEYS" => Self::HiveStyleKeys,
29640 _ => Self::UnknownValue(partition_structure::UnknownValue(
29641 wkt::internal::UnknownEnumValue::String(value.to_string()),
29642 )),
29643 }
29644 }
29645 }
29646
29647 impl serde::ser::Serialize for PartitionStructure {
29648 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29649 where
29650 S: serde::Serializer,
29651 {
29652 match self {
29653 Self::Unspecified => serializer.serialize_i32(0),
29654 Self::ConsistentKeys => serializer.serialize_i32(1),
29655 Self::HiveStyleKeys => serializer.serialize_i32(2),
29656 Self::UnknownValue(u) => u.0.serialize(serializer),
29657 }
29658 }
29659 }
29660
29661 impl<'de> serde::de::Deserialize<'de> for PartitionStructure {
29662 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29663 where
29664 D: serde::Deserializer<'de>,
29665 {
29666 deserializer.deserialize_any(wkt::internal::EnumVisitor::<PartitionStructure>::new(
29667 ".google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure",
29668 ))
29669 }
29670 }
29671 }
29672
29673 #[derive(Clone, Default, PartialEq)]
29675 #[non_exhaustive]
29676 pub struct MissingData {
29677 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29678 }
29679
29680 impl MissingData {
29681 pub fn new() -> Self {
29682 std::default::Default::default()
29683 }
29684 }
29685
29686 impl wkt::message::Message for MissingData {
29687 fn typename() -> &'static str {
29688 "type.googleapis.com/google.cloud.dataplex.v1.Action.MissingData"
29689 }
29690 }
29691
29692 #[derive(Clone, Default, PartialEq)]
29694 #[non_exhaustive]
29695 pub struct InvalidDataOrganization {
29696 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29697 }
29698
29699 impl InvalidDataOrganization {
29700 pub fn new() -> Self {
29701 std::default::Default::default()
29702 }
29703 }
29704
29705 impl wkt::message::Message for InvalidDataOrganization {
29706 fn typename() -> &'static str {
29707 "type.googleapis.com/google.cloud.dataplex.v1.Action.InvalidDataOrganization"
29708 }
29709 }
29710
29711 #[derive(Clone, Debug, PartialEq)]
29727 #[non_exhaustive]
29728 pub enum Category {
29729 Unspecified,
29731 ResourceManagement,
29733 SecurityPolicy,
29735 DataDiscovery,
29737 UnknownValue(category::UnknownValue),
29742 }
29743
29744 #[doc(hidden)]
29745 pub mod category {
29746 #[allow(unused_imports)]
29747 use super::*;
29748 #[derive(Clone, Debug, PartialEq)]
29749 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29750 }
29751
29752 impl Category {
29753 pub fn value(&self) -> std::option::Option<i32> {
29758 match self {
29759 Self::Unspecified => std::option::Option::Some(0),
29760 Self::ResourceManagement => std::option::Option::Some(1),
29761 Self::SecurityPolicy => std::option::Option::Some(2),
29762 Self::DataDiscovery => std::option::Option::Some(3),
29763 Self::UnknownValue(u) => u.0.value(),
29764 }
29765 }
29766
29767 pub fn name(&self) -> std::option::Option<&str> {
29772 match self {
29773 Self::Unspecified => std::option::Option::Some("CATEGORY_UNSPECIFIED"),
29774 Self::ResourceManagement => std::option::Option::Some("RESOURCE_MANAGEMENT"),
29775 Self::SecurityPolicy => std::option::Option::Some("SECURITY_POLICY"),
29776 Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
29777 Self::UnknownValue(u) => u.0.name(),
29778 }
29779 }
29780 }
29781
29782 impl std::default::Default for Category {
29783 fn default() -> Self {
29784 use std::convert::From;
29785 Self::from(0)
29786 }
29787 }
29788
29789 impl std::fmt::Display for Category {
29790 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29791 wkt::internal::display_enum(f, self.name(), self.value())
29792 }
29793 }
29794
29795 impl std::convert::From<i32> for Category {
29796 fn from(value: i32) -> Self {
29797 match value {
29798 0 => Self::Unspecified,
29799 1 => Self::ResourceManagement,
29800 2 => Self::SecurityPolicy,
29801 3 => Self::DataDiscovery,
29802 _ => Self::UnknownValue(category::UnknownValue(
29803 wkt::internal::UnknownEnumValue::Integer(value),
29804 )),
29805 }
29806 }
29807 }
29808
29809 impl std::convert::From<&str> for Category {
29810 fn from(value: &str) -> Self {
29811 use std::string::ToString;
29812 match value {
29813 "CATEGORY_UNSPECIFIED" => Self::Unspecified,
29814 "RESOURCE_MANAGEMENT" => Self::ResourceManagement,
29815 "SECURITY_POLICY" => Self::SecurityPolicy,
29816 "DATA_DISCOVERY" => Self::DataDiscovery,
29817 _ => Self::UnknownValue(category::UnknownValue(
29818 wkt::internal::UnknownEnumValue::String(value.to_string()),
29819 )),
29820 }
29821 }
29822 }
29823
29824 impl serde::ser::Serialize for Category {
29825 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29826 where
29827 S: serde::Serializer,
29828 {
29829 match self {
29830 Self::Unspecified => serializer.serialize_i32(0),
29831 Self::ResourceManagement => serializer.serialize_i32(1),
29832 Self::SecurityPolicy => serializer.serialize_i32(2),
29833 Self::DataDiscovery => serializer.serialize_i32(3),
29834 Self::UnknownValue(u) => u.0.serialize(serializer),
29835 }
29836 }
29837 }
29838
29839 impl<'de> serde::de::Deserialize<'de> for Category {
29840 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29841 where
29842 D: serde::Deserializer<'de>,
29843 {
29844 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Category>::new(
29845 ".google.cloud.dataplex.v1.Action.Category",
29846 ))
29847 }
29848 }
29849
29850 #[derive(Clone, Debug, PartialEq)]
29852 #[non_exhaustive]
29853 pub enum Details {
29854 InvalidDataFormat(std::boxed::Box<crate::model::action::InvalidDataFormat>),
29856 IncompatibleDataSchema(std::boxed::Box<crate::model::action::IncompatibleDataSchema>),
29858 InvalidDataPartition(std::boxed::Box<crate::model::action::InvalidDataPartition>),
29861 MissingData(std::boxed::Box<crate::model::action::MissingData>),
29863 MissingResource(std::boxed::Box<crate::model::action::MissingResource>),
29865 UnauthorizedResource(std::boxed::Box<crate::model::action::UnauthorizedResource>),
29868 FailedSecurityPolicyApply(std::boxed::Box<crate::model::action::FailedSecurityPolicyApply>),
29870 InvalidDataOrganization(std::boxed::Box<crate::model::action::InvalidDataOrganization>),
29872 }
29873}
29874
29875#[derive(Clone, Default, PartialEq)]
29878#[non_exhaustive]
29879pub struct Asset {
29880 pub name: std::string::String,
29883
29884 pub display_name: std::string::String,
29886
29887 pub uid: std::string::String,
29891
29892 pub create_time: std::option::Option<wkt::Timestamp>,
29894
29895 pub update_time: std::option::Option<wkt::Timestamp>,
29897
29898 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
29900
29901 pub description: std::string::String,
29903
29904 pub state: crate::model::State,
29906
29907 pub resource_spec: std::option::Option<crate::model::asset::ResourceSpec>,
29909
29910 pub resource_status: std::option::Option<crate::model::asset::ResourceStatus>,
29912
29913 pub security_status: std::option::Option<crate::model::asset::SecurityStatus>,
29916
29917 pub discovery_spec: std::option::Option<crate::model::asset::DiscoverySpec>,
29921
29922 pub discovery_status: std::option::Option<crate::model::asset::DiscoveryStatus>,
29925
29926 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29927}
29928
29929impl Asset {
29930 pub fn new() -> Self {
29931 std::default::Default::default()
29932 }
29933
29934 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29936 self.name = v.into();
29937 self
29938 }
29939
29940 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29942 self.display_name = v.into();
29943 self
29944 }
29945
29946 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29948 self.uid = v.into();
29949 self
29950 }
29951
29952 pub fn set_create_time<T>(mut self, v: T) -> Self
29954 where
29955 T: std::convert::Into<wkt::Timestamp>,
29956 {
29957 self.create_time = std::option::Option::Some(v.into());
29958 self
29959 }
29960
29961 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
29963 where
29964 T: std::convert::Into<wkt::Timestamp>,
29965 {
29966 self.create_time = v.map(|x| x.into());
29967 self
29968 }
29969
29970 pub fn set_update_time<T>(mut self, v: T) -> Self
29972 where
29973 T: std::convert::Into<wkt::Timestamp>,
29974 {
29975 self.update_time = std::option::Option::Some(v.into());
29976 self
29977 }
29978
29979 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
29981 where
29982 T: std::convert::Into<wkt::Timestamp>,
29983 {
29984 self.update_time = v.map(|x| x.into());
29985 self
29986 }
29987
29988 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
29990 where
29991 T: std::iter::IntoIterator<Item = (K, V)>,
29992 K: std::convert::Into<std::string::String>,
29993 V: std::convert::Into<std::string::String>,
29994 {
29995 use std::iter::Iterator;
29996 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
29997 self
29998 }
29999
30000 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30002 self.description = v.into();
30003 self
30004 }
30005
30006 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
30008 self.state = v.into();
30009 self
30010 }
30011
30012 pub fn set_resource_spec<T>(mut self, v: T) -> Self
30014 where
30015 T: std::convert::Into<crate::model::asset::ResourceSpec>,
30016 {
30017 self.resource_spec = std::option::Option::Some(v.into());
30018 self
30019 }
30020
30021 pub fn set_or_clear_resource_spec<T>(mut self, v: std::option::Option<T>) -> Self
30023 where
30024 T: std::convert::Into<crate::model::asset::ResourceSpec>,
30025 {
30026 self.resource_spec = v.map(|x| x.into());
30027 self
30028 }
30029
30030 pub fn set_resource_status<T>(mut self, v: T) -> Self
30032 where
30033 T: std::convert::Into<crate::model::asset::ResourceStatus>,
30034 {
30035 self.resource_status = std::option::Option::Some(v.into());
30036 self
30037 }
30038
30039 pub fn set_or_clear_resource_status<T>(mut self, v: std::option::Option<T>) -> Self
30041 where
30042 T: std::convert::Into<crate::model::asset::ResourceStatus>,
30043 {
30044 self.resource_status = v.map(|x| x.into());
30045 self
30046 }
30047
30048 pub fn set_security_status<T>(mut self, v: T) -> Self
30050 where
30051 T: std::convert::Into<crate::model::asset::SecurityStatus>,
30052 {
30053 self.security_status = std::option::Option::Some(v.into());
30054 self
30055 }
30056
30057 pub fn set_or_clear_security_status<T>(mut self, v: std::option::Option<T>) -> Self
30059 where
30060 T: std::convert::Into<crate::model::asset::SecurityStatus>,
30061 {
30062 self.security_status = v.map(|x| x.into());
30063 self
30064 }
30065
30066 pub fn set_discovery_spec<T>(mut self, v: T) -> Self
30068 where
30069 T: std::convert::Into<crate::model::asset::DiscoverySpec>,
30070 {
30071 self.discovery_spec = std::option::Option::Some(v.into());
30072 self
30073 }
30074
30075 pub fn set_or_clear_discovery_spec<T>(mut self, v: std::option::Option<T>) -> Self
30077 where
30078 T: std::convert::Into<crate::model::asset::DiscoverySpec>,
30079 {
30080 self.discovery_spec = v.map(|x| x.into());
30081 self
30082 }
30083
30084 pub fn set_discovery_status<T>(mut self, v: T) -> Self
30086 where
30087 T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
30088 {
30089 self.discovery_status = std::option::Option::Some(v.into());
30090 self
30091 }
30092
30093 pub fn set_or_clear_discovery_status<T>(mut self, v: std::option::Option<T>) -> Self
30095 where
30096 T: std::convert::Into<crate::model::asset::DiscoveryStatus>,
30097 {
30098 self.discovery_status = v.map(|x| x.into());
30099 self
30100 }
30101}
30102
30103impl wkt::message::Message for Asset {
30104 fn typename() -> &'static str {
30105 "type.googleapis.com/google.cloud.dataplex.v1.Asset"
30106 }
30107}
30108
30109pub mod asset {
30111 #[allow(unused_imports)]
30112 use super::*;
30113
30114 #[derive(Clone, Default, PartialEq)]
30117 #[non_exhaustive]
30118 pub struct SecurityStatus {
30119 pub state: crate::model::asset::security_status::State,
30122
30123 pub message: std::string::String,
30125
30126 pub update_time: std::option::Option<wkt::Timestamp>,
30128
30129 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30130 }
30131
30132 impl SecurityStatus {
30133 pub fn new() -> Self {
30134 std::default::Default::default()
30135 }
30136
30137 pub fn set_state<T: std::convert::Into<crate::model::asset::security_status::State>>(
30139 mut self,
30140 v: T,
30141 ) -> Self {
30142 self.state = v.into();
30143 self
30144 }
30145
30146 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30148 self.message = v.into();
30149 self
30150 }
30151
30152 pub fn set_update_time<T>(mut self, v: T) -> Self
30154 where
30155 T: std::convert::Into<wkt::Timestamp>,
30156 {
30157 self.update_time = std::option::Option::Some(v.into());
30158 self
30159 }
30160
30161 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
30163 where
30164 T: std::convert::Into<wkt::Timestamp>,
30165 {
30166 self.update_time = v.map(|x| x.into());
30167 self
30168 }
30169 }
30170
30171 impl wkt::message::Message for SecurityStatus {
30172 fn typename() -> &'static str {
30173 "type.googleapis.com/google.cloud.dataplex.v1.Asset.SecurityStatus"
30174 }
30175 }
30176
30177 pub mod security_status {
30179 #[allow(unused_imports)]
30180 use super::*;
30181
30182 #[derive(Clone, Debug, PartialEq)]
30198 #[non_exhaustive]
30199 pub enum State {
30200 Unspecified,
30202 Ready,
30204 Applying,
30207 Error,
30210 UnknownValue(state::UnknownValue),
30215 }
30216
30217 #[doc(hidden)]
30218 pub mod state {
30219 #[allow(unused_imports)]
30220 use super::*;
30221 #[derive(Clone, Debug, PartialEq)]
30222 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30223 }
30224
30225 impl State {
30226 pub fn value(&self) -> std::option::Option<i32> {
30231 match self {
30232 Self::Unspecified => std::option::Option::Some(0),
30233 Self::Ready => std::option::Option::Some(1),
30234 Self::Applying => std::option::Option::Some(2),
30235 Self::Error => std::option::Option::Some(3),
30236 Self::UnknownValue(u) => u.0.value(),
30237 }
30238 }
30239
30240 pub fn name(&self) -> std::option::Option<&str> {
30245 match self {
30246 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
30247 Self::Ready => std::option::Option::Some("READY"),
30248 Self::Applying => std::option::Option::Some("APPLYING"),
30249 Self::Error => std::option::Option::Some("ERROR"),
30250 Self::UnknownValue(u) => u.0.name(),
30251 }
30252 }
30253 }
30254
30255 impl std::default::Default for State {
30256 fn default() -> Self {
30257 use std::convert::From;
30258 Self::from(0)
30259 }
30260 }
30261
30262 impl std::fmt::Display for State {
30263 fn fmt(
30264 &self,
30265 f: &mut std::fmt::Formatter<'_>,
30266 ) -> std::result::Result<(), std::fmt::Error> {
30267 wkt::internal::display_enum(f, self.name(), self.value())
30268 }
30269 }
30270
30271 impl std::convert::From<i32> for State {
30272 fn from(value: i32) -> Self {
30273 match value {
30274 0 => Self::Unspecified,
30275 1 => Self::Ready,
30276 2 => Self::Applying,
30277 3 => Self::Error,
30278 _ => Self::UnknownValue(state::UnknownValue(
30279 wkt::internal::UnknownEnumValue::Integer(value),
30280 )),
30281 }
30282 }
30283 }
30284
30285 impl std::convert::From<&str> for State {
30286 fn from(value: &str) -> Self {
30287 use std::string::ToString;
30288 match value {
30289 "STATE_UNSPECIFIED" => Self::Unspecified,
30290 "READY" => Self::Ready,
30291 "APPLYING" => Self::Applying,
30292 "ERROR" => Self::Error,
30293 _ => Self::UnknownValue(state::UnknownValue(
30294 wkt::internal::UnknownEnumValue::String(value.to_string()),
30295 )),
30296 }
30297 }
30298 }
30299
30300 impl serde::ser::Serialize for State {
30301 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30302 where
30303 S: serde::Serializer,
30304 {
30305 match self {
30306 Self::Unspecified => serializer.serialize_i32(0),
30307 Self::Ready => serializer.serialize_i32(1),
30308 Self::Applying => serializer.serialize_i32(2),
30309 Self::Error => serializer.serialize_i32(3),
30310 Self::UnknownValue(u) => u.0.serialize(serializer),
30311 }
30312 }
30313 }
30314
30315 impl<'de> serde::de::Deserialize<'de> for State {
30316 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30317 where
30318 D: serde::Deserializer<'de>,
30319 {
30320 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
30321 ".google.cloud.dataplex.v1.Asset.SecurityStatus.State",
30322 ))
30323 }
30324 }
30325 }
30326
30327 #[derive(Clone, Default, PartialEq)]
30329 #[non_exhaustive]
30330 pub struct DiscoverySpec {
30331 pub enabled: bool,
30333
30334 pub include_patterns: std::vec::Vec<std::string::String>,
30340
30341 pub exclude_patterns: std::vec::Vec<std::string::String>,
30346
30347 pub csv_options: std::option::Option<crate::model::asset::discovery_spec::CsvOptions>,
30349
30350 pub json_options: std::option::Option<crate::model::asset::discovery_spec::JsonOptions>,
30352
30353 pub trigger: std::option::Option<crate::model::asset::discovery_spec::Trigger>,
30355
30356 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30357 }
30358
30359 impl DiscoverySpec {
30360 pub fn new() -> Self {
30361 std::default::Default::default()
30362 }
30363
30364 pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
30366 self.enabled = v.into();
30367 self
30368 }
30369
30370 pub fn set_include_patterns<T, V>(mut self, v: T) -> Self
30372 where
30373 T: std::iter::IntoIterator<Item = V>,
30374 V: std::convert::Into<std::string::String>,
30375 {
30376 use std::iter::Iterator;
30377 self.include_patterns = v.into_iter().map(|i| i.into()).collect();
30378 self
30379 }
30380
30381 pub fn set_exclude_patterns<T, V>(mut self, v: T) -> Self
30383 where
30384 T: std::iter::IntoIterator<Item = V>,
30385 V: std::convert::Into<std::string::String>,
30386 {
30387 use std::iter::Iterator;
30388 self.exclude_patterns = v.into_iter().map(|i| i.into()).collect();
30389 self
30390 }
30391
30392 pub fn set_csv_options<T>(mut self, v: T) -> Self
30394 where
30395 T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
30396 {
30397 self.csv_options = std::option::Option::Some(v.into());
30398 self
30399 }
30400
30401 pub fn set_or_clear_csv_options<T>(mut self, v: std::option::Option<T>) -> Self
30403 where
30404 T: std::convert::Into<crate::model::asset::discovery_spec::CsvOptions>,
30405 {
30406 self.csv_options = v.map(|x| x.into());
30407 self
30408 }
30409
30410 pub fn set_json_options<T>(mut self, v: T) -> Self
30412 where
30413 T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
30414 {
30415 self.json_options = std::option::Option::Some(v.into());
30416 self
30417 }
30418
30419 pub fn set_or_clear_json_options<T>(mut self, v: std::option::Option<T>) -> Self
30421 where
30422 T: std::convert::Into<crate::model::asset::discovery_spec::JsonOptions>,
30423 {
30424 self.json_options = v.map(|x| x.into());
30425 self
30426 }
30427
30428 pub fn set_trigger<
30433 T: std::convert::Into<std::option::Option<crate::model::asset::discovery_spec::Trigger>>,
30434 >(
30435 mut self,
30436 v: T,
30437 ) -> Self {
30438 self.trigger = v.into();
30439 self
30440 }
30441
30442 pub fn schedule(&self) -> std::option::Option<&std::string::String> {
30446 #[allow(unreachable_patterns)]
30447 self.trigger.as_ref().and_then(|v| match v {
30448 crate::model::asset::discovery_spec::Trigger::Schedule(v) => {
30449 std::option::Option::Some(v)
30450 }
30451 _ => std::option::Option::None,
30452 })
30453 }
30454
30455 pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30461 self.trigger = std::option::Option::Some(
30462 crate::model::asset::discovery_spec::Trigger::Schedule(v.into()),
30463 );
30464 self
30465 }
30466 }
30467
30468 impl wkt::message::Message for DiscoverySpec {
30469 fn typename() -> &'static str {
30470 "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec"
30471 }
30472 }
30473
30474 pub mod discovery_spec {
30476 #[allow(unused_imports)]
30477 use super::*;
30478
30479 #[derive(Clone, Default, PartialEq)]
30481 #[non_exhaustive]
30482 pub struct CsvOptions {
30483 pub header_rows: i32,
30486
30487 pub delimiter: std::string::String,
30490
30491 pub encoding: std::string::String,
30493
30494 pub disable_type_inference: bool,
30497
30498 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30499 }
30500
30501 impl CsvOptions {
30502 pub fn new() -> Self {
30503 std::default::Default::default()
30504 }
30505
30506 pub fn set_header_rows<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
30508 self.header_rows = v.into();
30509 self
30510 }
30511
30512 pub fn set_delimiter<T: std::convert::Into<std::string::String>>(
30514 mut self,
30515 v: T,
30516 ) -> Self {
30517 self.delimiter = v.into();
30518 self
30519 }
30520
30521 pub fn set_encoding<T: std::convert::Into<std::string::String>>(
30523 mut self,
30524 v: T,
30525 ) -> Self {
30526 self.encoding = v.into();
30527 self
30528 }
30529
30530 pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
30532 self.disable_type_inference = v.into();
30533 self
30534 }
30535 }
30536
30537 impl wkt::message::Message for CsvOptions {
30538 fn typename() -> &'static str {
30539 "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions"
30540 }
30541 }
30542
30543 #[derive(Clone, Default, PartialEq)]
30545 #[non_exhaustive]
30546 pub struct JsonOptions {
30547 pub encoding: std::string::String,
30549
30550 pub disable_type_inference: bool,
30554
30555 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30556 }
30557
30558 impl JsonOptions {
30559 pub fn new() -> Self {
30560 std::default::Default::default()
30561 }
30562
30563 pub fn set_encoding<T: std::convert::Into<std::string::String>>(
30565 mut self,
30566 v: T,
30567 ) -> Self {
30568 self.encoding = v.into();
30569 self
30570 }
30571
30572 pub fn set_disable_type_inference<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
30574 self.disable_type_inference = v.into();
30575 self
30576 }
30577 }
30578
30579 impl wkt::message::Message for JsonOptions {
30580 fn typename() -> &'static str {
30581 "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions"
30582 }
30583 }
30584
30585 #[derive(Clone, Debug, PartialEq)]
30587 #[non_exhaustive]
30588 pub enum Trigger {
30589 Schedule(std::string::String),
30600 }
30601 }
30602
30603 #[derive(Clone, Default, PartialEq)]
30605 #[non_exhaustive]
30606 pub struct ResourceSpec {
30607 pub name: std::string::String,
30612
30613 pub r#type: crate::model::asset::resource_spec::Type,
30615
30616 pub read_access_mode: crate::model::asset::resource_spec::AccessMode,
30619
30620 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30621 }
30622
30623 impl ResourceSpec {
30624 pub fn new() -> Self {
30625 std::default::Default::default()
30626 }
30627
30628 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30630 self.name = v.into();
30631 self
30632 }
30633
30634 pub fn set_type<T: std::convert::Into<crate::model::asset::resource_spec::Type>>(
30636 mut self,
30637 v: T,
30638 ) -> Self {
30639 self.r#type = v.into();
30640 self
30641 }
30642
30643 pub fn set_read_access_mode<
30645 T: std::convert::Into<crate::model::asset::resource_spec::AccessMode>,
30646 >(
30647 mut self,
30648 v: T,
30649 ) -> Self {
30650 self.read_access_mode = v.into();
30651 self
30652 }
30653 }
30654
30655 impl wkt::message::Message for ResourceSpec {
30656 fn typename() -> &'static str {
30657 "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceSpec"
30658 }
30659 }
30660
30661 pub mod resource_spec {
30663 #[allow(unused_imports)]
30664 use super::*;
30665
30666 #[derive(Clone, Debug, PartialEq)]
30682 #[non_exhaustive]
30683 pub enum Type {
30684 Unspecified,
30686 StorageBucket,
30688 BigqueryDataset,
30690 UnknownValue(r#type::UnknownValue),
30695 }
30696
30697 #[doc(hidden)]
30698 pub mod r#type {
30699 #[allow(unused_imports)]
30700 use super::*;
30701 #[derive(Clone, Debug, PartialEq)]
30702 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30703 }
30704
30705 impl Type {
30706 pub fn value(&self) -> std::option::Option<i32> {
30711 match self {
30712 Self::Unspecified => std::option::Option::Some(0),
30713 Self::StorageBucket => std::option::Option::Some(1),
30714 Self::BigqueryDataset => std::option::Option::Some(2),
30715 Self::UnknownValue(u) => u.0.value(),
30716 }
30717 }
30718
30719 pub fn name(&self) -> std::option::Option<&str> {
30724 match self {
30725 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
30726 Self::StorageBucket => std::option::Option::Some("STORAGE_BUCKET"),
30727 Self::BigqueryDataset => std::option::Option::Some("BIGQUERY_DATASET"),
30728 Self::UnknownValue(u) => u.0.name(),
30729 }
30730 }
30731 }
30732
30733 impl std::default::Default for Type {
30734 fn default() -> Self {
30735 use std::convert::From;
30736 Self::from(0)
30737 }
30738 }
30739
30740 impl std::fmt::Display for Type {
30741 fn fmt(
30742 &self,
30743 f: &mut std::fmt::Formatter<'_>,
30744 ) -> std::result::Result<(), std::fmt::Error> {
30745 wkt::internal::display_enum(f, self.name(), self.value())
30746 }
30747 }
30748
30749 impl std::convert::From<i32> for Type {
30750 fn from(value: i32) -> Self {
30751 match value {
30752 0 => Self::Unspecified,
30753 1 => Self::StorageBucket,
30754 2 => Self::BigqueryDataset,
30755 _ => Self::UnknownValue(r#type::UnknownValue(
30756 wkt::internal::UnknownEnumValue::Integer(value),
30757 )),
30758 }
30759 }
30760 }
30761
30762 impl std::convert::From<&str> for Type {
30763 fn from(value: &str) -> Self {
30764 use std::string::ToString;
30765 match value {
30766 "TYPE_UNSPECIFIED" => Self::Unspecified,
30767 "STORAGE_BUCKET" => Self::StorageBucket,
30768 "BIGQUERY_DATASET" => Self::BigqueryDataset,
30769 _ => Self::UnknownValue(r#type::UnknownValue(
30770 wkt::internal::UnknownEnumValue::String(value.to_string()),
30771 )),
30772 }
30773 }
30774 }
30775
30776 impl serde::ser::Serialize for Type {
30777 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30778 where
30779 S: serde::Serializer,
30780 {
30781 match self {
30782 Self::Unspecified => serializer.serialize_i32(0),
30783 Self::StorageBucket => serializer.serialize_i32(1),
30784 Self::BigqueryDataset => serializer.serialize_i32(2),
30785 Self::UnknownValue(u) => u.0.serialize(serializer),
30786 }
30787 }
30788 }
30789
30790 impl<'de> serde::de::Deserialize<'de> for Type {
30791 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30792 where
30793 D: serde::Deserializer<'de>,
30794 {
30795 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
30796 ".google.cloud.dataplex.v1.Asset.ResourceSpec.Type",
30797 ))
30798 }
30799 }
30800
30801 #[derive(Clone, Debug, PartialEq)]
30818 #[non_exhaustive]
30819 pub enum AccessMode {
30820 Unspecified,
30822 Direct,
30824 Managed,
30826 UnknownValue(access_mode::UnknownValue),
30831 }
30832
30833 #[doc(hidden)]
30834 pub mod access_mode {
30835 #[allow(unused_imports)]
30836 use super::*;
30837 #[derive(Clone, Debug, PartialEq)]
30838 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
30839 }
30840
30841 impl AccessMode {
30842 pub fn value(&self) -> std::option::Option<i32> {
30847 match self {
30848 Self::Unspecified => std::option::Option::Some(0),
30849 Self::Direct => std::option::Option::Some(1),
30850 Self::Managed => std::option::Option::Some(2),
30851 Self::UnknownValue(u) => u.0.value(),
30852 }
30853 }
30854
30855 pub fn name(&self) -> std::option::Option<&str> {
30860 match self {
30861 Self::Unspecified => std::option::Option::Some("ACCESS_MODE_UNSPECIFIED"),
30862 Self::Direct => std::option::Option::Some("DIRECT"),
30863 Self::Managed => std::option::Option::Some("MANAGED"),
30864 Self::UnknownValue(u) => u.0.name(),
30865 }
30866 }
30867 }
30868
30869 impl std::default::Default for AccessMode {
30870 fn default() -> Self {
30871 use std::convert::From;
30872 Self::from(0)
30873 }
30874 }
30875
30876 impl std::fmt::Display for AccessMode {
30877 fn fmt(
30878 &self,
30879 f: &mut std::fmt::Formatter<'_>,
30880 ) -> std::result::Result<(), std::fmt::Error> {
30881 wkt::internal::display_enum(f, self.name(), self.value())
30882 }
30883 }
30884
30885 impl std::convert::From<i32> for AccessMode {
30886 fn from(value: i32) -> Self {
30887 match value {
30888 0 => Self::Unspecified,
30889 1 => Self::Direct,
30890 2 => Self::Managed,
30891 _ => Self::UnknownValue(access_mode::UnknownValue(
30892 wkt::internal::UnknownEnumValue::Integer(value),
30893 )),
30894 }
30895 }
30896 }
30897
30898 impl std::convert::From<&str> for AccessMode {
30899 fn from(value: &str) -> Self {
30900 use std::string::ToString;
30901 match value {
30902 "ACCESS_MODE_UNSPECIFIED" => Self::Unspecified,
30903 "DIRECT" => Self::Direct,
30904 "MANAGED" => Self::Managed,
30905 _ => Self::UnknownValue(access_mode::UnknownValue(
30906 wkt::internal::UnknownEnumValue::String(value.to_string()),
30907 )),
30908 }
30909 }
30910 }
30911
30912 impl serde::ser::Serialize for AccessMode {
30913 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30914 where
30915 S: serde::Serializer,
30916 {
30917 match self {
30918 Self::Unspecified => serializer.serialize_i32(0),
30919 Self::Direct => serializer.serialize_i32(1),
30920 Self::Managed => serializer.serialize_i32(2),
30921 Self::UnknownValue(u) => u.0.serialize(serializer),
30922 }
30923 }
30924 }
30925
30926 impl<'de> serde::de::Deserialize<'de> for AccessMode {
30927 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30928 where
30929 D: serde::Deserializer<'de>,
30930 {
30931 deserializer.deserialize_any(wkt::internal::EnumVisitor::<AccessMode>::new(
30932 ".google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode",
30933 ))
30934 }
30935 }
30936 }
30937
30938 #[derive(Clone, Default, PartialEq)]
30940 #[non_exhaustive]
30941 pub struct ResourceStatus {
30942 pub state: crate::model::asset::resource_status::State,
30944
30945 pub message: std::string::String,
30947
30948 pub update_time: std::option::Option<wkt::Timestamp>,
30950
30951 pub managed_access_identity: std::string::String,
30953
30954 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30955 }
30956
30957 impl ResourceStatus {
30958 pub fn new() -> Self {
30959 std::default::Default::default()
30960 }
30961
30962 pub fn set_state<T: std::convert::Into<crate::model::asset::resource_status::State>>(
30964 mut self,
30965 v: T,
30966 ) -> Self {
30967 self.state = v.into();
30968 self
30969 }
30970
30971 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30973 self.message = v.into();
30974 self
30975 }
30976
30977 pub fn set_update_time<T>(mut self, v: T) -> Self
30979 where
30980 T: std::convert::Into<wkt::Timestamp>,
30981 {
30982 self.update_time = std::option::Option::Some(v.into());
30983 self
30984 }
30985
30986 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
30988 where
30989 T: std::convert::Into<wkt::Timestamp>,
30990 {
30991 self.update_time = v.map(|x| x.into());
30992 self
30993 }
30994
30995 pub fn set_managed_access_identity<T: std::convert::Into<std::string::String>>(
30997 mut self,
30998 v: T,
30999 ) -> Self {
31000 self.managed_access_identity = v.into();
31001 self
31002 }
31003 }
31004
31005 impl wkt::message::Message for ResourceStatus {
31006 fn typename() -> &'static str {
31007 "type.googleapis.com/google.cloud.dataplex.v1.Asset.ResourceStatus"
31008 }
31009 }
31010
31011 pub mod resource_status {
31013 #[allow(unused_imports)]
31014 use super::*;
31015
31016 #[derive(Clone, Debug, PartialEq)]
31032 #[non_exhaustive]
31033 pub enum State {
31034 Unspecified,
31036 Ready,
31038 Error,
31040 UnknownValue(state::UnknownValue),
31045 }
31046
31047 #[doc(hidden)]
31048 pub mod state {
31049 #[allow(unused_imports)]
31050 use super::*;
31051 #[derive(Clone, Debug, PartialEq)]
31052 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31053 }
31054
31055 impl State {
31056 pub fn value(&self) -> std::option::Option<i32> {
31061 match self {
31062 Self::Unspecified => std::option::Option::Some(0),
31063 Self::Ready => std::option::Option::Some(1),
31064 Self::Error => std::option::Option::Some(2),
31065 Self::UnknownValue(u) => u.0.value(),
31066 }
31067 }
31068
31069 pub fn name(&self) -> std::option::Option<&str> {
31074 match self {
31075 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
31076 Self::Ready => std::option::Option::Some("READY"),
31077 Self::Error => std::option::Option::Some("ERROR"),
31078 Self::UnknownValue(u) => u.0.name(),
31079 }
31080 }
31081 }
31082
31083 impl std::default::Default for State {
31084 fn default() -> Self {
31085 use std::convert::From;
31086 Self::from(0)
31087 }
31088 }
31089
31090 impl std::fmt::Display for State {
31091 fn fmt(
31092 &self,
31093 f: &mut std::fmt::Formatter<'_>,
31094 ) -> std::result::Result<(), std::fmt::Error> {
31095 wkt::internal::display_enum(f, self.name(), self.value())
31096 }
31097 }
31098
31099 impl std::convert::From<i32> for State {
31100 fn from(value: i32) -> Self {
31101 match value {
31102 0 => Self::Unspecified,
31103 1 => Self::Ready,
31104 2 => Self::Error,
31105 _ => Self::UnknownValue(state::UnknownValue(
31106 wkt::internal::UnknownEnumValue::Integer(value),
31107 )),
31108 }
31109 }
31110 }
31111
31112 impl std::convert::From<&str> for State {
31113 fn from(value: &str) -> Self {
31114 use std::string::ToString;
31115 match value {
31116 "STATE_UNSPECIFIED" => Self::Unspecified,
31117 "READY" => Self::Ready,
31118 "ERROR" => Self::Error,
31119 _ => Self::UnknownValue(state::UnknownValue(
31120 wkt::internal::UnknownEnumValue::String(value.to_string()),
31121 )),
31122 }
31123 }
31124 }
31125
31126 impl serde::ser::Serialize for State {
31127 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31128 where
31129 S: serde::Serializer,
31130 {
31131 match self {
31132 Self::Unspecified => serializer.serialize_i32(0),
31133 Self::Ready => serializer.serialize_i32(1),
31134 Self::Error => serializer.serialize_i32(2),
31135 Self::UnknownValue(u) => u.0.serialize(serializer),
31136 }
31137 }
31138 }
31139
31140 impl<'de> serde::de::Deserialize<'de> for State {
31141 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31142 where
31143 D: serde::Deserializer<'de>,
31144 {
31145 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
31146 ".google.cloud.dataplex.v1.Asset.ResourceStatus.State",
31147 ))
31148 }
31149 }
31150 }
31151
31152 #[derive(Clone, Default, PartialEq)]
31154 #[non_exhaustive]
31155 pub struct DiscoveryStatus {
31156 pub state: crate::model::asset::discovery_status::State,
31158
31159 pub message: std::string::String,
31161
31162 pub update_time: std::option::Option<wkt::Timestamp>,
31164
31165 pub last_run_time: std::option::Option<wkt::Timestamp>,
31167
31168 pub stats: std::option::Option<crate::model::asset::discovery_status::Stats>,
31170
31171 pub last_run_duration: std::option::Option<wkt::Duration>,
31173
31174 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31175 }
31176
31177 impl DiscoveryStatus {
31178 pub fn new() -> Self {
31179 std::default::Default::default()
31180 }
31181
31182 pub fn set_state<T: std::convert::Into<crate::model::asset::discovery_status::State>>(
31184 mut self,
31185 v: T,
31186 ) -> Self {
31187 self.state = v.into();
31188 self
31189 }
31190
31191 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31193 self.message = v.into();
31194 self
31195 }
31196
31197 pub fn set_update_time<T>(mut self, v: T) -> Self
31199 where
31200 T: std::convert::Into<wkt::Timestamp>,
31201 {
31202 self.update_time = std::option::Option::Some(v.into());
31203 self
31204 }
31205
31206 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
31208 where
31209 T: std::convert::Into<wkt::Timestamp>,
31210 {
31211 self.update_time = v.map(|x| x.into());
31212 self
31213 }
31214
31215 pub fn set_last_run_time<T>(mut self, v: T) -> Self
31217 where
31218 T: std::convert::Into<wkt::Timestamp>,
31219 {
31220 self.last_run_time = std::option::Option::Some(v.into());
31221 self
31222 }
31223
31224 pub fn set_or_clear_last_run_time<T>(mut self, v: std::option::Option<T>) -> Self
31226 where
31227 T: std::convert::Into<wkt::Timestamp>,
31228 {
31229 self.last_run_time = v.map(|x| x.into());
31230 self
31231 }
31232
31233 pub fn set_stats<T>(mut self, v: T) -> Self
31235 where
31236 T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
31237 {
31238 self.stats = std::option::Option::Some(v.into());
31239 self
31240 }
31241
31242 pub fn set_or_clear_stats<T>(mut self, v: std::option::Option<T>) -> Self
31244 where
31245 T: std::convert::Into<crate::model::asset::discovery_status::Stats>,
31246 {
31247 self.stats = v.map(|x| x.into());
31248 self
31249 }
31250
31251 pub fn set_last_run_duration<T>(mut self, v: T) -> Self
31253 where
31254 T: std::convert::Into<wkt::Duration>,
31255 {
31256 self.last_run_duration = std::option::Option::Some(v.into());
31257 self
31258 }
31259
31260 pub fn set_or_clear_last_run_duration<T>(mut self, v: std::option::Option<T>) -> Self
31262 where
31263 T: std::convert::Into<wkt::Duration>,
31264 {
31265 self.last_run_duration = v.map(|x| x.into());
31266 self
31267 }
31268 }
31269
31270 impl wkt::message::Message for DiscoveryStatus {
31271 fn typename() -> &'static str {
31272 "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus"
31273 }
31274 }
31275
31276 pub mod discovery_status {
31278 #[allow(unused_imports)]
31279 use super::*;
31280
31281 #[derive(Clone, Default, PartialEq)]
31283 #[non_exhaustive]
31284 pub struct Stats {
31285 pub data_items: i64,
31287
31288 pub data_size: i64,
31290
31291 pub tables: i64,
31293
31294 pub filesets: i64,
31296
31297 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31298 }
31299
31300 impl Stats {
31301 pub fn new() -> Self {
31302 std::default::Default::default()
31303 }
31304
31305 pub fn set_data_items<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31307 self.data_items = v.into();
31308 self
31309 }
31310
31311 pub fn set_data_size<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31313 self.data_size = v.into();
31314 self
31315 }
31316
31317 pub fn set_tables<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31319 self.tables = v.into();
31320 self
31321 }
31322
31323 pub fn set_filesets<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
31325 self.filesets = v.into();
31326 self
31327 }
31328 }
31329
31330 impl wkt::message::Message for Stats {
31331 fn typename() -> &'static str {
31332 "type.googleapis.com/google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats"
31333 }
31334 }
31335
31336 #[derive(Clone, Debug, PartialEq)]
31352 #[non_exhaustive]
31353 pub enum State {
31354 Unspecified,
31356 Scheduled,
31358 InProgress,
31360 Paused,
31363 Disabled,
31365 UnknownValue(state::UnknownValue),
31370 }
31371
31372 #[doc(hidden)]
31373 pub mod state {
31374 #[allow(unused_imports)]
31375 use super::*;
31376 #[derive(Clone, Debug, PartialEq)]
31377 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
31378 }
31379
31380 impl State {
31381 pub fn value(&self) -> std::option::Option<i32> {
31386 match self {
31387 Self::Unspecified => std::option::Option::Some(0),
31388 Self::Scheduled => std::option::Option::Some(1),
31389 Self::InProgress => std::option::Option::Some(2),
31390 Self::Paused => std::option::Option::Some(3),
31391 Self::Disabled => std::option::Option::Some(5),
31392 Self::UnknownValue(u) => u.0.value(),
31393 }
31394 }
31395
31396 pub fn name(&self) -> std::option::Option<&str> {
31401 match self {
31402 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
31403 Self::Scheduled => std::option::Option::Some("SCHEDULED"),
31404 Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
31405 Self::Paused => std::option::Option::Some("PAUSED"),
31406 Self::Disabled => std::option::Option::Some("DISABLED"),
31407 Self::UnknownValue(u) => u.0.name(),
31408 }
31409 }
31410 }
31411
31412 impl std::default::Default for State {
31413 fn default() -> Self {
31414 use std::convert::From;
31415 Self::from(0)
31416 }
31417 }
31418
31419 impl std::fmt::Display for State {
31420 fn fmt(
31421 &self,
31422 f: &mut std::fmt::Formatter<'_>,
31423 ) -> std::result::Result<(), std::fmt::Error> {
31424 wkt::internal::display_enum(f, self.name(), self.value())
31425 }
31426 }
31427
31428 impl std::convert::From<i32> for State {
31429 fn from(value: i32) -> Self {
31430 match value {
31431 0 => Self::Unspecified,
31432 1 => Self::Scheduled,
31433 2 => Self::InProgress,
31434 3 => Self::Paused,
31435 5 => Self::Disabled,
31436 _ => Self::UnknownValue(state::UnknownValue(
31437 wkt::internal::UnknownEnumValue::Integer(value),
31438 )),
31439 }
31440 }
31441 }
31442
31443 impl std::convert::From<&str> for State {
31444 fn from(value: &str) -> Self {
31445 use std::string::ToString;
31446 match value {
31447 "STATE_UNSPECIFIED" => Self::Unspecified,
31448 "SCHEDULED" => Self::Scheduled,
31449 "IN_PROGRESS" => Self::InProgress,
31450 "PAUSED" => Self::Paused,
31451 "DISABLED" => Self::Disabled,
31452 _ => Self::UnknownValue(state::UnknownValue(
31453 wkt::internal::UnknownEnumValue::String(value.to_string()),
31454 )),
31455 }
31456 }
31457 }
31458
31459 impl serde::ser::Serialize for State {
31460 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
31461 where
31462 S: serde::Serializer,
31463 {
31464 match self {
31465 Self::Unspecified => serializer.serialize_i32(0),
31466 Self::Scheduled => serializer.serialize_i32(1),
31467 Self::InProgress => serializer.serialize_i32(2),
31468 Self::Paused => serializer.serialize_i32(3),
31469 Self::Disabled => serializer.serialize_i32(5),
31470 Self::UnknownValue(u) => u.0.serialize(serializer),
31471 }
31472 }
31473 }
31474
31475 impl<'de> serde::de::Deserialize<'de> for State {
31476 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
31477 where
31478 D: serde::Deserializer<'de>,
31479 {
31480 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
31481 ".google.cloud.dataplex.v1.Asset.DiscoveryStatus.State",
31482 ))
31483 }
31484 }
31485 }
31486}
31487
31488#[derive(Clone, Default, PartialEq)]
31492#[non_exhaustive]
31493pub struct ResourceAccessSpec {
31494 pub readers: std::vec::Vec<std::string::String>,
31498
31499 pub writers: std::vec::Vec<std::string::String>,
31501
31502 pub owners: std::vec::Vec<std::string::String>,
31504
31505 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31506}
31507
31508impl ResourceAccessSpec {
31509 pub fn new() -> Self {
31510 std::default::Default::default()
31511 }
31512
31513 pub fn set_readers<T, V>(mut self, v: T) -> Self
31515 where
31516 T: std::iter::IntoIterator<Item = V>,
31517 V: std::convert::Into<std::string::String>,
31518 {
31519 use std::iter::Iterator;
31520 self.readers = v.into_iter().map(|i| i.into()).collect();
31521 self
31522 }
31523
31524 pub fn set_writers<T, V>(mut self, v: T) -> Self
31526 where
31527 T: std::iter::IntoIterator<Item = V>,
31528 V: std::convert::Into<std::string::String>,
31529 {
31530 use std::iter::Iterator;
31531 self.writers = v.into_iter().map(|i| i.into()).collect();
31532 self
31533 }
31534
31535 pub fn set_owners<T, V>(mut self, v: T) -> Self
31537 where
31538 T: std::iter::IntoIterator<Item = V>,
31539 V: std::convert::Into<std::string::String>,
31540 {
31541 use std::iter::Iterator;
31542 self.owners = v.into_iter().map(|i| i.into()).collect();
31543 self
31544 }
31545}
31546
31547impl wkt::message::Message for ResourceAccessSpec {
31548 fn typename() -> &'static str {
31549 "type.googleapis.com/google.cloud.dataplex.v1.ResourceAccessSpec"
31550 }
31551}
31552
31553#[derive(Clone, Default, PartialEq)]
31559#[non_exhaustive]
31560pub struct DataAccessSpec {
31561 pub readers: std::vec::Vec<std::string::String>,
31566
31567 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31568}
31569
31570impl DataAccessSpec {
31571 pub fn new() -> Self {
31572 std::default::Default::default()
31573 }
31574
31575 pub fn set_readers<T, V>(mut self, v: T) -> Self
31577 where
31578 T: std::iter::IntoIterator<Item = V>,
31579 V: std::convert::Into<std::string::String>,
31580 {
31581 use std::iter::Iterator;
31582 self.readers = v.into_iter().map(|i| i.into()).collect();
31583 self
31584 }
31585}
31586
31587impl wkt::message::Message for DataAccessSpec {
31588 fn typename() -> &'static str {
31589 "type.googleapis.com/google.cloud.dataplex.v1.DataAccessSpec"
31590 }
31591}
31592
31593#[derive(Clone, Default, PartialEq)]
31595#[non_exhaustive]
31596pub struct CreateLakeRequest {
31597 pub parent: std::string::String,
31601
31602 pub lake_id: std::string::String,
31612
31613 pub lake: std::option::Option<crate::model::Lake>,
31615
31616 pub validate_only: bool,
31619
31620 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31621}
31622
31623impl CreateLakeRequest {
31624 pub fn new() -> Self {
31625 std::default::Default::default()
31626 }
31627
31628 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31630 self.parent = v.into();
31631 self
31632 }
31633
31634 pub fn set_lake_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31636 self.lake_id = v.into();
31637 self
31638 }
31639
31640 pub fn set_lake<T>(mut self, v: T) -> Self
31642 where
31643 T: std::convert::Into<crate::model::Lake>,
31644 {
31645 self.lake = std::option::Option::Some(v.into());
31646 self
31647 }
31648
31649 pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
31651 where
31652 T: std::convert::Into<crate::model::Lake>,
31653 {
31654 self.lake = v.map(|x| x.into());
31655 self
31656 }
31657
31658 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31660 self.validate_only = v.into();
31661 self
31662 }
31663}
31664
31665impl wkt::message::Message for CreateLakeRequest {
31666 fn typename() -> &'static str {
31667 "type.googleapis.com/google.cloud.dataplex.v1.CreateLakeRequest"
31668 }
31669}
31670
31671#[derive(Clone, Default, PartialEq)]
31673#[non_exhaustive]
31674pub struct UpdateLakeRequest {
31675 pub update_mask: std::option::Option<wkt::FieldMask>,
31677
31678 pub lake: std::option::Option<crate::model::Lake>,
31681
31682 pub validate_only: bool,
31685
31686 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31687}
31688
31689impl UpdateLakeRequest {
31690 pub fn new() -> Self {
31691 std::default::Default::default()
31692 }
31693
31694 pub fn set_update_mask<T>(mut self, v: T) -> Self
31696 where
31697 T: std::convert::Into<wkt::FieldMask>,
31698 {
31699 self.update_mask = std::option::Option::Some(v.into());
31700 self
31701 }
31702
31703 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
31705 where
31706 T: std::convert::Into<wkt::FieldMask>,
31707 {
31708 self.update_mask = v.map(|x| x.into());
31709 self
31710 }
31711
31712 pub fn set_lake<T>(mut self, v: T) -> Self
31714 where
31715 T: std::convert::Into<crate::model::Lake>,
31716 {
31717 self.lake = std::option::Option::Some(v.into());
31718 self
31719 }
31720
31721 pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
31723 where
31724 T: std::convert::Into<crate::model::Lake>,
31725 {
31726 self.lake = v.map(|x| x.into());
31727 self
31728 }
31729
31730 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
31732 self.validate_only = v.into();
31733 self
31734 }
31735}
31736
31737impl wkt::message::Message for UpdateLakeRequest {
31738 fn typename() -> &'static str {
31739 "type.googleapis.com/google.cloud.dataplex.v1.UpdateLakeRequest"
31740 }
31741}
31742
31743#[derive(Clone, Default, PartialEq)]
31745#[non_exhaustive]
31746pub struct DeleteLakeRequest {
31747 pub name: std::string::String,
31750
31751 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31752}
31753
31754impl DeleteLakeRequest {
31755 pub fn new() -> Self {
31756 std::default::Default::default()
31757 }
31758
31759 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31761 self.name = v.into();
31762 self
31763 }
31764}
31765
31766impl wkt::message::Message for DeleteLakeRequest {
31767 fn typename() -> &'static str {
31768 "type.googleapis.com/google.cloud.dataplex.v1.DeleteLakeRequest"
31769 }
31770}
31771
31772#[derive(Clone, Default, PartialEq)]
31774#[non_exhaustive]
31775pub struct ListLakesRequest {
31776 pub parent: std::string::String,
31780
31781 pub page_size: i32,
31785
31786 pub page_token: std::string::String,
31790
31791 pub filter: std::string::String,
31793
31794 pub order_by: std::string::String,
31796
31797 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31798}
31799
31800impl ListLakesRequest {
31801 pub fn new() -> Self {
31802 std::default::Default::default()
31803 }
31804
31805 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31807 self.parent = v.into();
31808 self
31809 }
31810
31811 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
31813 self.page_size = v.into();
31814 self
31815 }
31816
31817 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31819 self.page_token = v.into();
31820 self
31821 }
31822
31823 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31825 self.filter = v.into();
31826 self
31827 }
31828
31829 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31831 self.order_by = v.into();
31832 self
31833 }
31834}
31835
31836impl wkt::message::Message for ListLakesRequest {
31837 fn typename() -> &'static str {
31838 "type.googleapis.com/google.cloud.dataplex.v1.ListLakesRequest"
31839 }
31840}
31841
31842#[derive(Clone, Default, PartialEq)]
31844#[non_exhaustive]
31845pub struct ListLakesResponse {
31846 pub lakes: std::vec::Vec<crate::model::Lake>,
31848
31849 pub next_page_token: std::string::String,
31852
31853 pub unreachable_locations: std::vec::Vec<std::string::String>,
31855
31856 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31857}
31858
31859impl ListLakesResponse {
31860 pub fn new() -> Self {
31861 std::default::Default::default()
31862 }
31863
31864 pub fn set_lakes<T, V>(mut self, v: T) -> Self
31866 where
31867 T: std::iter::IntoIterator<Item = V>,
31868 V: std::convert::Into<crate::model::Lake>,
31869 {
31870 use std::iter::Iterator;
31871 self.lakes = v.into_iter().map(|i| i.into()).collect();
31872 self
31873 }
31874
31875 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31877 self.next_page_token = v.into();
31878 self
31879 }
31880
31881 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
31883 where
31884 T: std::iter::IntoIterator<Item = V>,
31885 V: std::convert::Into<std::string::String>,
31886 {
31887 use std::iter::Iterator;
31888 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
31889 self
31890 }
31891}
31892
31893impl wkt::message::Message for ListLakesResponse {
31894 fn typename() -> &'static str {
31895 "type.googleapis.com/google.cloud.dataplex.v1.ListLakesResponse"
31896 }
31897}
31898
31899#[doc(hidden)]
31900impl gax::paginator::internal::PageableResponse for ListLakesResponse {
31901 type PageItem = crate::model::Lake;
31902
31903 fn items(self) -> std::vec::Vec<Self::PageItem> {
31904 self.lakes
31905 }
31906
31907 fn next_page_token(&self) -> std::string::String {
31908 use std::clone::Clone;
31909 self.next_page_token.clone()
31910 }
31911}
31912
31913#[derive(Clone, Default, PartialEq)]
31915#[non_exhaustive]
31916pub struct ListLakeActionsRequest {
31917 pub parent: std::string::String,
31920
31921 pub page_size: i32,
31925
31926 pub page_token: std::string::String,
31931
31932 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31933}
31934
31935impl ListLakeActionsRequest {
31936 pub fn new() -> Self {
31937 std::default::Default::default()
31938 }
31939
31940 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31942 self.parent = v.into();
31943 self
31944 }
31945
31946 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
31948 self.page_size = v.into();
31949 self
31950 }
31951
31952 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31954 self.page_token = v.into();
31955 self
31956 }
31957}
31958
31959impl wkt::message::Message for ListLakeActionsRequest {
31960 fn typename() -> &'static str {
31961 "type.googleapis.com/google.cloud.dataplex.v1.ListLakeActionsRequest"
31962 }
31963}
31964
31965#[derive(Clone, Default, PartialEq)]
31967#[non_exhaustive]
31968pub struct ListActionsResponse {
31969 pub actions: std::vec::Vec<crate::model::Action>,
31971
31972 pub next_page_token: std::string::String,
31975
31976 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
31977}
31978
31979impl ListActionsResponse {
31980 pub fn new() -> Self {
31981 std::default::Default::default()
31982 }
31983
31984 pub fn set_actions<T, V>(mut self, v: T) -> Self
31986 where
31987 T: std::iter::IntoIterator<Item = V>,
31988 V: std::convert::Into<crate::model::Action>,
31989 {
31990 use std::iter::Iterator;
31991 self.actions = v.into_iter().map(|i| i.into()).collect();
31992 self
31993 }
31994
31995 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
31997 self.next_page_token = v.into();
31998 self
31999 }
32000}
32001
32002impl wkt::message::Message for ListActionsResponse {
32003 fn typename() -> &'static str {
32004 "type.googleapis.com/google.cloud.dataplex.v1.ListActionsResponse"
32005 }
32006}
32007
32008#[doc(hidden)]
32009impl gax::paginator::internal::PageableResponse for ListActionsResponse {
32010 type PageItem = crate::model::Action;
32011
32012 fn items(self) -> std::vec::Vec<Self::PageItem> {
32013 self.actions
32014 }
32015
32016 fn next_page_token(&self) -> std::string::String {
32017 use std::clone::Clone;
32018 self.next_page_token.clone()
32019 }
32020}
32021
32022#[derive(Clone, Default, PartialEq)]
32024#[non_exhaustive]
32025pub struct GetLakeRequest {
32026 pub name: std::string::String,
32029
32030 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32031}
32032
32033impl GetLakeRequest {
32034 pub fn new() -> Self {
32035 std::default::Default::default()
32036 }
32037
32038 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32040 self.name = v.into();
32041 self
32042 }
32043}
32044
32045impl wkt::message::Message for GetLakeRequest {
32046 fn typename() -> &'static str {
32047 "type.googleapis.com/google.cloud.dataplex.v1.GetLakeRequest"
32048 }
32049}
32050
32051#[derive(Clone, Default, PartialEq)]
32053#[non_exhaustive]
32054pub struct CreateZoneRequest {
32055 pub parent: std::string::String,
32058
32059 pub zone_id: std::string::String,
32070
32071 pub zone: std::option::Option<crate::model::Zone>,
32073
32074 pub validate_only: bool,
32077
32078 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32079}
32080
32081impl CreateZoneRequest {
32082 pub fn new() -> Self {
32083 std::default::Default::default()
32084 }
32085
32086 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32088 self.parent = v.into();
32089 self
32090 }
32091
32092 pub fn set_zone_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32094 self.zone_id = v.into();
32095 self
32096 }
32097
32098 pub fn set_zone<T>(mut self, v: T) -> Self
32100 where
32101 T: std::convert::Into<crate::model::Zone>,
32102 {
32103 self.zone = std::option::Option::Some(v.into());
32104 self
32105 }
32106
32107 pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
32109 where
32110 T: std::convert::Into<crate::model::Zone>,
32111 {
32112 self.zone = v.map(|x| x.into());
32113 self
32114 }
32115
32116 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32118 self.validate_only = v.into();
32119 self
32120 }
32121}
32122
32123impl wkt::message::Message for CreateZoneRequest {
32124 fn typename() -> &'static str {
32125 "type.googleapis.com/google.cloud.dataplex.v1.CreateZoneRequest"
32126 }
32127}
32128
32129#[derive(Clone, Default, PartialEq)]
32131#[non_exhaustive]
32132pub struct UpdateZoneRequest {
32133 pub update_mask: std::option::Option<wkt::FieldMask>,
32135
32136 pub zone: std::option::Option<crate::model::Zone>,
32139
32140 pub validate_only: bool,
32143
32144 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32145}
32146
32147impl UpdateZoneRequest {
32148 pub fn new() -> Self {
32149 std::default::Default::default()
32150 }
32151
32152 pub fn set_update_mask<T>(mut self, v: T) -> Self
32154 where
32155 T: std::convert::Into<wkt::FieldMask>,
32156 {
32157 self.update_mask = std::option::Option::Some(v.into());
32158 self
32159 }
32160
32161 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
32163 where
32164 T: std::convert::Into<wkt::FieldMask>,
32165 {
32166 self.update_mask = v.map(|x| x.into());
32167 self
32168 }
32169
32170 pub fn set_zone<T>(mut self, v: T) -> Self
32172 where
32173 T: std::convert::Into<crate::model::Zone>,
32174 {
32175 self.zone = std::option::Option::Some(v.into());
32176 self
32177 }
32178
32179 pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
32181 where
32182 T: std::convert::Into<crate::model::Zone>,
32183 {
32184 self.zone = v.map(|x| x.into());
32185 self
32186 }
32187
32188 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32190 self.validate_only = v.into();
32191 self
32192 }
32193}
32194
32195impl wkt::message::Message for UpdateZoneRequest {
32196 fn typename() -> &'static str {
32197 "type.googleapis.com/google.cloud.dataplex.v1.UpdateZoneRequest"
32198 }
32199}
32200
32201#[derive(Clone, Default, PartialEq)]
32203#[non_exhaustive]
32204pub struct DeleteZoneRequest {
32205 pub name: std::string::String,
32208
32209 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32210}
32211
32212impl DeleteZoneRequest {
32213 pub fn new() -> Self {
32214 std::default::Default::default()
32215 }
32216
32217 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32219 self.name = v.into();
32220 self
32221 }
32222}
32223
32224impl wkt::message::Message for DeleteZoneRequest {
32225 fn typename() -> &'static str {
32226 "type.googleapis.com/google.cloud.dataplex.v1.DeleteZoneRequest"
32227 }
32228}
32229
32230#[derive(Clone, Default, PartialEq)]
32232#[non_exhaustive]
32233pub struct ListZonesRequest {
32234 pub parent: std::string::String,
32237
32238 pub page_size: i32,
32242
32243 pub page_token: std::string::String,
32247
32248 pub filter: std::string::String,
32250
32251 pub order_by: std::string::String,
32253
32254 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32255}
32256
32257impl ListZonesRequest {
32258 pub fn new() -> Self {
32259 std::default::Default::default()
32260 }
32261
32262 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32264 self.parent = v.into();
32265 self
32266 }
32267
32268 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32270 self.page_size = v.into();
32271 self
32272 }
32273
32274 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32276 self.page_token = v.into();
32277 self
32278 }
32279
32280 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32282 self.filter = v.into();
32283 self
32284 }
32285
32286 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32288 self.order_by = v.into();
32289 self
32290 }
32291}
32292
32293impl wkt::message::Message for ListZonesRequest {
32294 fn typename() -> &'static str {
32295 "type.googleapis.com/google.cloud.dataplex.v1.ListZonesRequest"
32296 }
32297}
32298
32299#[derive(Clone, Default, PartialEq)]
32301#[non_exhaustive]
32302pub struct ListZonesResponse {
32303 pub zones: std::vec::Vec<crate::model::Zone>,
32305
32306 pub next_page_token: std::string::String,
32309
32310 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32311}
32312
32313impl ListZonesResponse {
32314 pub fn new() -> Self {
32315 std::default::Default::default()
32316 }
32317
32318 pub fn set_zones<T, V>(mut self, v: T) -> Self
32320 where
32321 T: std::iter::IntoIterator<Item = V>,
32322 V: std::convert::Into<crate::model::Zone>,
32323 {
32324 use std::iter::Iterator;
32325 self.zones = v.into_iter().map(|i| i.into()).collect();
32326 self
32327 }
32328
32329 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32331 self.next_page_token = v.into();
32332 self
32333 }
32334}
32335
32336impl wkt::message::Message for ListZonesResponse {
32337 fn typename() -> &'static str {
32338 "type.googleapis.com/google.cloud.dataplex.v1.ListZonesResponse"
32339 }
32340}
32341
32342#[doc(hidden)]
32343impl gax::paginator::internal::PageableResponse for ListZonesResponse {
32344 type PageItem = crate::model::Zone;
32345
32346 fn items(self) -> std::vec::Vec<Self::PageItem> {
32347 self.zones
32348 }
32349
32350 fn next_page_token(&self) -> std::string::String {
32351 use std::clone::Clone;
32352 self.next_page_token.clone()
32353 }
32354}
32355
32356#[derive(Clone, Default, PartialEq)]
32358#[non_exhaustive]
32359pub struct ListZoneActionsRequest {
32360 pub parent: std::string::String,
32363
32364 pub page_size: i32,
32368
32369 pub page_token: std::string::String,
32374
32375 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32376}
32377
32378impl ListZoneActionsRequest {
32379 pub fn new() -> Self {
32380 std::default::Default::default()
32381 }
32382
32383 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32385 self.parent = v.into();
32386 self
32387 }
32388
32389 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32391 self.page_size = v.into();
32392 self
32393 }
32394
32395 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32397 self.page_token = v.into();
32398 self
32399 }
32400}
32401
32402impl wkt::message::Message for ListZoneActionsRequest {
32403 fn typename() -> &'static str {
32404 "type.googleapis.com/google.cloud.dataplex.v1.ListZoneActionsRequest"
32405 }
32406}
32407
32408#[derive(Clone, Default, PartialEq)]
32410#[non_exhaustive]
32411pub struct GetZoneRequest {
32412 pub name: std::string::String,
32415
32416 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32417}
32418
32419impl GetZoneRequest {
32420 pub fn new() -> Self {
32421 std::default::Default::default()
32422 }
32423
32424 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32426 self.name = v.into();
32427 self
32428 }
32429}
32430
32431impl wkt::message::Message for GetZoneRequest {
32432 fn typename() -> &'static str {
32433 "type.googleapis.com/google.cloud.dataplex.v1.GetZoneRequest"
32434 }
32435}
32436
32437#[derive(Clone, Default, PartialEq)]
32439#[non_exhaustive]
32440pub struct CreateAssetRequest {
32441 pub parent: std::string::String,
32444
32445 pub asset_id: std::string::String,
32455
32456 pub asset: std::option::Option<crate::model::Asset>,
32458
32459 pub validate_only: bool,
32462
32463 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32464}
32465
32466impl CreateAssetRequest {
32467 pub fn new() -> Self {
32468 std::default::Default::default()
32469 }
32470
32471 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32473 self.parent = v.into();
32474 self
32475 }
32476
32477 pub fn set_asset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32479 self.asset_id = v.into();
32480 self
32481 }
32482
32483 pub fn set_asset<T>(mut self, v: T) -> Self
32485 where
32486 T: std::convert::Into<crate::model::Asset>,
32487 {
32488 self.asset = std::option::Option::Some(v.into());
32489 self
32490 }
32491
32492 pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
32494 where
32495 T: std::convert::Into<crate::model::Asset>,
32496 {
32497 self.asset = v.map(|x| x.into());
32498 self
32499 }
32500
32501 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32503 self.validate_only = v.into();
32504 self
32505 }
32506}
32507
32508impl wkt::message::Message for CreateAssetRequest {
32509 fn typename() -> &'static str {
32510 "type.googleapis.com/google.cloud.dataplex.v1.CreateAssetRequest"
32511 }
32512}
32513
32514#[derive(Clone, Default, PartialEq)]
32516#[non_exhaustive]
32517pub struct UpdateAssetRequest {
32518 pub update_mask: std::option::Option<wkt::FieldMask>,
32520
32521 pub asset: std::option::Option<crate::model::Asset>,
32524
32525 pub validate_only: bool,
32528
32529 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32530}
32531
32532impl UpdateAssetRequest {
32533 pub fn new() -> Self {
32534 std::default::Default::default()
32535 }
32536
32537 pub fn set_update_mask<T>(mut self, v: T) -> Self
32539 where
32540 T: std::convert::Into<wkt::FieldMask>,
32541 {
32542 self.update_mask = std::option::Option::Some(v.into());
32543 self
32544 }
32545
32546 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
32548 where
32549 T: std::convert::Into<wkt::FieldMask>,
32550 {
32551 self.update_mask = v.map(|x| x.into());
32552 self
32553 }
32554
32555 pub fn set_asset<T>(mut self, v: T) -> Self
32557 where
32558 T: std::convert::Into<crate::model::Asset>,
32559 {
32560 self.asset = std::option::Option::Some(v.into());
32561 self
32562 }
32563
32564 pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
32566 where
32567 T: std::convert::Into<crate::model::Asset>,
32568 {
32569 self.asset = v.map(|x| x.into());
32570 self
32571 }
32572
32573 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32575 self.validate_only = v.into();
32576 self
32577 }
32578}
32579
32580impl wkt::message::Message for UpdateAssetRequest {
32581 fn typename() -> &'static str {
32582 "type.googleapis.com/google.cloud.dataplex.v1.UpdateAssetRequest"
32583 }
32584}
32585
32586#[derive(Clone, Default, PartialEq)]
32588#[non_exhaustive]
32589pub struct DeleteAssetRequest {
32590 pub name: std::string::String,
32593
32594 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32595}
32596
32597impl DeleteAssetRequest {
32598 pub fn new() -> Self {
32599 std::default::Default::default()
32600 }
32601
32602 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32604 self.name = v.into();
32605 self
32606 }
32607}
32608
32609impl wkt::message::Message for DeleteAssetRequest {
32610 fn typename() -> &'static str {
32611 "type.googleapis.com/google.cloud.dataplex.v1.DeleteAssetRequest"
32612 }
32613}
32614
32615#[derive(Clone, Default, PartialEq)]
32617#[non_exhaustive]
32618pub struct ListAssetsRequest {
32619 pub parent: std::string::String,
32622
32623 pub page_size: i32,
32627
32628 pub page_token: std::string::String,
32633
32634 pub filter: std::string::String,
32636
32637 pub order_by: std::string::String,
32639
32640 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32641}
32642
32643impl ListAssetsRequest {
32644 pub fn new() -> Self {
32645 std::default::Default::default()
32646 }
32647
32648 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32650 self.parent = v.into();
32651 self
32652 }
32653
32654 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32656 self.page_size = v.into();
32657 self
32658 }
32659
32660 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32662 self.page_token = v.into();
32663 self
32664 }
32665
32666 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32668 self.filter = v.into();
32669 self
32670 }
32671
32672 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32674 self.order_by = v.into();
32675 self
32676 }
32677}
32678
32679impl wkt::message::Message for ListAssetsRequest {
32680 fn typename() -> &'static str {
32681 "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsRequest"
32682 }
32683}
32684
32685#[derive(Clone, Default, PartialEq)]
32687#[non_exhaustive]
32688pub struct ListAssetsResponse {
32689 pub assets: std::vec::Vec<crate::model::Asset>,
32691
32692 pub next_page_token: std::string::String,
32695
32696 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32697}
32698
32699impl ListAssetsResponse {
32700 pub fn new() -> Self {
32701 std::default::Default::default()
32702 }
32703
32704 pub fn set_assets<T, V>(mut self, v: T) -> Self
32706 where
32707 T: std::iter::IntoIterator<Item = V>,
32708 V: std::convert::Into<crate::model::Asset>,
32709 {
32710 use std::iter::Iterator;
32711 self.assets = v.into_iter().map(|i| i.into()).collect();
32712 self
32713 }
32714
32715 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32717 self.next_page_token = v.into();
32718 self
32719 }
32720}
32721
32722impl wkt::message::Message for ListAssetsResponse {
32723 fn typename() -> &'static str {
32724 "type.googleapis.com/google.cloud.dataplex.v1.ListAssetsResponse"
32725 }
32726}
32727
32728#[doc(hidden)]
32729impl gax::paginator::internal::PageableResponse for ListAssetsResponse {
32730 type PageItem = crate::model::Asset;
32731
32732 fn items(self) -> std::vec::Vec<Self::PageItem> {
32733 self.assets
32734 }
32735
32736 fn next_page_token(&self) -> std::string::String {
32737 use std::clone::Clone;
32738 self.next_page_token.clone()
32739 }
32740}
32741
32742#[derive(Clone, Default, PartialEq)]
32744#[non_exhaustive]
32745pub struct ListAssetActionsRequest {
32746 pub parent: std::string::String,
32749
32750 pub page_size: i32,
32754
32755 pub page_token: std::string::String,
32760
32761 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32762}
32763
32764impl ListAssetActionsRequest {
32765 pub fn new() -> Self {
32766 std::default::Default::default()
32767 }
32768
32769 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32771 self.parent = v.into();
32772 self
32773 }
32774
32775 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
32777 self.page_size = v.into();
32778 self
32779 }
32780
32781 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32783 self.page_token = v.into();
32784 self
32785 }
32786}
32787
32788impl wkt::message::Message for ListAssetActionsRequest {
32789 fn typename() -> &'static str {
32790 "type.googleapis.com/google.cloud.dataplex.v1.ListAssetActionsRequest"
32791 }
32792}
32793
32794#[derive(Clone, Default, PartialEq)]
32796#[non_exhaustive]
32797pub struct GetAssetRequest {
32798 pub name: std::string::String,
32801
32802 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32803}
32804
32805impl GetAssetRequest {
32806 pub fn new() -> Self {
32807 std::default::Default::default()
32808 }
32809
32810 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32812 self.name = v.into();
32813 self
32814 }
32815}
32816
32817impl wkt::message::Message for GetAssetRequest {
32818 fn typename() -> &'static str {
32819 "type.googleapis.com/google.cloud.dataplex.v1.GetAssetRequest"
32820 }
32821}
32822
32823#[derive(Clone, Default, PartialEq)]
32825#[non_exhaustive]
32826pub struct OperationMetadata {
32827 pub create_time: std::option::Option<wkt::Timestamp>,
32829
32830 pub end_time: std::option::Option<wkt::Timestamp>,
32832
32833 pub target: std::string::String,
32835
32836 pub verb: std::string::String,
32838
32839 pub status_message: std::string::String,
32841
32842 pub requested_cancellation: bool,
32850
32851 pub api_version: std::string::String,
32853
32854 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32855}
32856
32857impl OperationMetadata {
32858 pub fn new() -> Self {
32859 std::default::Default::default()
32860 }
32861
32862 pub fn set_create_time<T>(mut self, v: T) -> Self
32864 where
32865 T: std::convert::Into<wkt::Timestamp>,
32866 {
32867 self.create_time = std::option::Option::Some(v.into());
32868 self
32869 }
32870
32871 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
32873 where
32874 T: std::convert::Into<wkt::Timestamp>,
32875 {
32876 self.create_time = v.map(|x| x.into());
32877 self
32878 }
32879
32880 pub fn set_end_time<T>(mut self, v: T) -> Self
32882 where
32883 T: std::convert::Into<wkt::Timestamp>,
32884 {
32885 self.end_time = std::option::Option::Some(v.into());
32886 self
32887 }
32888
32889 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
32891 where
32892 T: std::convert::Into<wkt::Timestamp>,
32893 {
32894 self.end_time = v.map(|x| x.into());
32895 self
32896 }
32897
32898 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32900 self.target = v.into();
32901 self
32902 }
32903
32904 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32906 self.verb = v.into();
32907 self
32908 }
32909
32910 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32912 self.status_message = v.into();
32913 self
32914 }
32915
32916 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32918 self.requested_cancellation = v.into();
32919 self
32920 }
32921
32922 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32924 self.api_version = v.into();
32925 self
32926 }
32927}
32928
32929impl wkt::message::Message for OperationMetadata {
32930 fn typename() -> &'static str {
32931 "type.googleapis.com/google.cloud.dataplex.v1.OperationMetadata"
32932 }
32933}
32934
32935#[derive(Clone, Default, PartialEq)]
32937#[non_exhaustive]
32938pub struct CreateTaskRequest {
32939 pub parent: std::string::String,
32942
32943 pub task_id: std::string::String,
32945
32946 pub task: std::option::Option<crate::model::Task>,
32948
32949 pub validate_only: bool,
32952
32953 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
32954}
32955
32956impl CreateTaskRequest {
32957 pub fn new() -> Self {
32958 std::default::Default::default()
32959 }
32960
32961 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32963 self.parent = v.into();
32964 self
32965 }
32966
32967 pub fn set_task_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
32969 self.task_id = v.into();
32970 self
32971 }
32972
32973 pub fn set_task<T>(mut self, v: T) -> Self
32975 where
32976 T: std::convert::Into<crate::model::Task>,
32977 {
32978 self.task = std::option::Option::Some(v.into());
32979 self
32980 }
32981
32982 pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
32984 where
32985 T: std::convert::Into<crate::model::Task>,
32986 {
32987 self.task = v.map(|x| x.into());
32988 self
32989 }
32990
32991 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
32993 self.validate_only = v.into();
32994 self
32995 }
32996}
32997
32998impl wkt::message::Message for CreateTaskRequest {
32999 fn typename() -> &'static str {
33000 "type.googleapis.com/google.cloud.dataplex.v1.CreateTaskRequest"
33001 }
33002}
33003
33004#[derive(Clone, Default, PartialEq)]
33006#[non_exhaustive]
33007pub struct UpdateTaskRequest {
33008 pub update_mask: std::option::Option<wkt::FieldMask>,
33010
33011 pub task: std::option::Option<crate::model::Task>,
33014
33015 pub validate_only: bool,
33018
33019 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33020}
33021
33022impl UpdateTaskRequest {
33023 pub fn new() -> Self {
33024 std::default::Default::default()
33025 }
33026
33027 pub fn set_update_mask<T>(mut self, v: T) -> Self
33029 where
33030 T: std::convert::Into<wkt::FieldMask>,
33031 {
33032 self.update_mask = std::option::Option::Some(v.into());
33033 self
33034 }
33035
33036 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
33038 where
33039 T: std::convert::Into<wkt::FieldMask>,
33040 {
33041 self.update_mask = v.map(|x| x.into());
33042 self
33043 }
33044
33045 pub fn set_task<T>(mut self, v: T) -> Self
33047 where
33048 T: std::convert::Into<crate::model::Task>,
33049 {
33050 self.task = std::option::Option::Some(v.into());
33051 self
33052 }
33053
33054 pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
33056 where
33057 T: std::convert::Into<crate::model::Task>,
33058 {
33059 self.task = v.map(|x| x.into());
33060 self
33061 }
33062
33063 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33065 self.validate_only = v.into();
33066 self
33067 }
33068}
33069
33070impl wkt::message::Message for UpdateTaskRequest {
33071 fn typename() -> &'static str {
33072 "type.googleapis.com/google.cloud.dataplex.v1.UpdateTaskRequest"
33073 }
33074}
33075
33076#[derive(Clone, Default, PartialEq)]
33078#[non_exhaustive]
33079pub struct DeleteTaskRequest {
33080 pub name: std::string::String,
33083
33084 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33085}
33086
33087impl DeleteTaskRequest {
33088 pub fn new() -> Self {
33089 std::default::Default::default()
33090 }
33091
33092 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33094 self.name = v.into();
33095 self
33096 }
33097}
33098
33099impl wkt::message::Message for DeleteTaskRequest {
33100 fn typename() -> &'static str {
33101 "type.googleapis.com/google.cloud.dataplex.v1.DeleteTaskRequest"
33102 }
33103}
33104
33105#[derive(Clone, Default, PartialEq)]
33107#[non_exhaustive]
33108pub struct ListTasksRequest {
33109 pub parent: std::string::String,
33112
33113 pub page_size: i32,
33117
33118 pub page_token: std::string::String,
33122
33123 pub filter: std::string::String,
33125
33126 pub order_by: std::string::String,
33128
33129 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33130}
33131
33132impl ListTasksRequest {
33133 pub fn new() -> Self {
33134 std::default::Default::default()
33135 }
33136
33137 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33139 self.parent = v.into();
33140 self
33141 }
33142
33143 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33145 self.page_size = v.into();
33146 self
33147 }
33148
33149 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33151 self.page_token = v.into();
33152 self
33153 }
33154
33155 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33157 self.filter = v.into();
33158 self
33159 }
33160
33161 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33163 self.order_by = v.into();
33164 self
33165 }
33166}
33167
33168impl wkt::message::Message for ListTasksRequest {
33169 fn typename() -> &'static str {
33170 "type.googleapis.com/google.cloud.dataplex.v1.ListTasksRequest"
33171 }
33172}
33173
33174#[derive(Clone, Default, PartialEq)]
33176#[non_exhaustive]
33177pub struct ListTasksResponse {
33178 pub tasks: std::vec::Vec<crate::model::Task>,
33180
33181 pub next_page_token: std::string::String,
33184
33185 pub unreachable_locations: std::vec::Vec<std::string::String>,
33187
33188 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33189}
33190
33191impl ListTasksResponse {
33192 pub fn new() -> Self {
33193 std::default::Default::default()
33194 }
33195
33196 pub fn set_tasks<T, V>(mut self, v: T) -> Self
33198 where
33199 T: std::iter::IntoIterator<Item = V>,
33200 V: std::convert::Into<crate::model::Task>,
33201 {
33202 use std::iter::Iterator;
33203 self.tasks = v.into_iter().map(|i| i.into()).collect();
33204 self
33205 }
33206
33207 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33209 self.next_page_token = v.into();
33210 self
33211 }
33212
33213 pub fn set_unreachable_locations<T, V>(mut self, v: T) -> Self
33215 where
33216 T: std::iter::IntoIterator<Item = V>,
33217 V: std::convert::Into<std::string::String>,
33218 {
33219 use std::iter::Iterator;
33220 self.unreachable_locations = v.into_iter().map(|i| i.into()).collect();
33221 self
33222 }
33223}
33224
33225impl wkt::message::Message for ListTasksResponse {
33226 fn typename() -> &'static str {
33227 "type.googleapis.com/google.cloud.dataplex.v1.ListTasksResponse"
33228 }
33229}
33230
33231#[doc(hidden)]
33232impl gax::paginator::internal::PageableResponse for ListTasksResponse {
33233 type PageItem = crate::model::Task;
33234
33235 fn items(self) -> std::vec::Vec<Self::PageItem> {
33236 self.tasks
33237 }
33238
33239 fn next_page_token(&self) -> std::string::String {
33240 use std::clone::Clone;
33241 self.next_page_token.clone()
33242 }
33243}
33244
33245#[derive(Clone, Default, PartialEq)]
33247#[non_exhaustive]
33248pub struct GetTaskRequest {
33249 pub name: std::string::String,
33252
33253 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33254}
33255
33256impl GetTaskRequest {
33257 pub fn new() -> Self {
33258 std::default::Default::default()
33259 }
33260
33261 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33263 self.name = v.into();
33264 self
33265 }
33266}
33267
33268impl wkt::message::Message for GetTaskRequest {
33269 fn typename() -> &'static str {
33270 "type.googleapis.com/google.cloud.dataplex.v1.GetTaskRequest"
33271 }
33272}
33273
33274#[derive(Clone, Default, PartialEq)]
33276#[non_exhaustive]
33277pub struct GetJobRequest {
33278 pub name: std::string::String,
33281
33282 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33283}
33284
33285impl GetJobRequest {
33286 pub fn new() -> Self {
33287 std::default::Default::default()
33288 }
33289
33290 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33292 self.name = v.into();
33293 self
33294 }
33295}
33296
33297impl wkt::message::Message for GetJobRequest {
33298 fn typename() -> &'static str {
33299 "type.googleapis.com/google.cloud.dataplex.v1.GetJobRequest"
33300 }
33301}
33302
33303#[derive(Clone, Default, PartialEq)]
33304#[non_exhaustive]
33305pub struct RunTaskRequest {
33306 pub name: std::string::String,
33309
33310 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
33318
33319 pub args: std::collections::HashMap<std::string::String, std::string::String>,
33327
33328 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33329}
33330
33331impl RunTaskRequest {
33332 pub fn new() -> Self {
33333 std::default::Default::default()
33334 }
33335
33336 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33338 self.name = v.into();
33339 self
33340 }
33341
33342 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
33344 where
33345 T: std::iter::IntoIterator<Item = (K, V)>,
33346 K: std::convert::Into<std::string::String>,
33347 V: std::convert::Into<std::string::String>,
33348 {
33349 use std::iter::Iterator;
33350 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
33351 self
33352 }
33353
33354 pub fn set_args<T, K, V>(mut self, v: T) -> Self
33356 where
33357 T: std::iter::IntoIterator<Item = (K, V)>,
33358 K: std::convert::Into<std::string::String>,
33359 V: std::convert::Into<std::string::String>,
33360 {
33361 use std::iter::Iterator;
33362 self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
33363 self
33364 }
33365}
33366
33367impl wkt::message::Message for RunTaskRequest {
33368 fn typename() -> &'static str {
33369 "type.googleapis.com/google.cloud.dataplex.v1.RunTaskRequest"
33370 }
33371}
33372
33373#[derive(Clone, Default, PartialEq)]
33374#[non_exhaustive]
33375pub struct RunTaskResponse {
33376 pub job: std::option::Option<crate::model::Job>,
33378
33379 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33380}
33381
33382impl RunTaskResponse {
33383 pub fn new() -> Self {
33384 std::default::Default::default()
33385 }
33386
33387 pub fn set_job<T>(mut self, v: T) -> Self
33389 where
33390 T: std::convert::Into<crate::model::Job>,
33391 {
33392 self.job = std::option::Option::Some(v.into());
33393 self
33394 }
33395
33396 pub fn set_or_clear_job<T>(mut self, v: std::option::Option<T>) -> Self
33398 where
33399 T: std::convert::Into<crate::model::Job>,
33400 {
33401 self.job = v.map(|x| x.into());
33402 self
33403 }
33404}
33405
33406impl wkt::message::Message for RunTaskResponse {
33407 fn typename() -> &'static str {
33408 "type.googleapis.com/google.cloud.dataplex.v1.RunTaskResponse"
33409 }
33410}
33411
33412#[derive(Clone, Default, PartialEq)]
33414#[non_exhaustive]
33415pub struct ListJobsRequest {
33416 pub parent: std::string::String,
33419
33420 pub page_size: i32,
33424
33425 pub page_token: std::string::String,
33430
33431 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33432}
33433
33434impl ListJobsRequest {
33435 pub fn new() -> Self {
33436 std::default::Default::default()
33437 }
33438
33439 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33441 self.parent = v.into();
33442 self
33443 }
33444
33445 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33447 self.page_size = v.into();
33448 self
33449 }
33450
33451 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33453 self.page_token = v.into();
33454 self
33455 }
33456}
33457
33458impl wkt::message::Message for ListJobsRequest {
33459 fn typename() -> &'static str {
33460 "type.googleapis.com/google.cloud.dataplex.v1.ListJobsRequest"
33461 }
33462}
33463
33464#[derive(Clone, Default, PartialEq)]
33466#[non_exhaustive]
33467pub struct ListJobsResponse {
33468 pub jobs: std::vec::Vec<crate::model::Job>,
33470
33471 pub next_page_token: std::string::String,
33474
33475 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33476}
33477
33478impl ListJobsResponse {
33479 pub fn new() -> Self {
33480 std::default::Default::default()
33481 }
33482
33483 pub fn set_jobs<T, V>(mut self, v: T) -> Self
33485 where
33486 T: std::iter::IntoIterator<Item = V>,
33487 V: std::convert::Into<crate::model::Job>,
33488 {
33489 use std::iter::Iterator;
33490 self.jobs = v.into_iter().map(|i| i.into()).collect();
33491 self
33492 }
33493
33494 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33496 self.next_page_token = v.into();
33497 self
33498 }
33499}
33500
33501impl wkt::message::Message for ListJobsResponse {
33502 fn typename() -> &'static str {
33503 "type.googleapis.com/google.cloud.dataplex.v1.ListJobsResponse"
33504 }
33505}
33506
33507#[doc(hidden)]
33508impl gax::paginator::internal::PageableResponse for ListJobsResponse {
33509 type PageItem = crate::model::Job;
33510
33511 fn items(self) -> std::vec::Vec<Self::PageItem> {
33512 self.jobs
33513 }
33514
33515 fn next_page_token(&self) -> std::string::String {
33516 use std::clone::Clone;
33517 self.next_page_token.clone()
33518 }
33519}
33520
33521#[derive(Clone, Default, PartialEq)]
33523#[non_exhaustive]
33524pub struct CancelJobRequest {
33525 pub name: std::string::String,
33528
33529 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33530}
33531
33532impl CancelJobRequest {
33533 pub fn new() -> Self {
33534 std::default::Default::default()
33535 }
33536
33537 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33539 self.name = v.into();
33540 self
33541 }
33542}
33543
33544impl wkt::message::Message for CancelJobRequest {
33545 fn typename() -> &'static str {
33546 "type.googleapis.com/google.cloud.dataplex.v1.CancelJobRequest"
33547 }
33548}
33549
33550#[derive(Clone, Default, PartialEq)]
33552#[non_exhaustive]
33553pub struct CreateEnvironmentRequest {
33554 pub parent: std::string::String,
33557
33558 pub environment_id: std::string::String,
33566
33567 pub environment: std::option::Option<crate::model::Environment>,
33569
33570 pub validate_only: bool,
33573
33574 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33575}
33576
33577impl CreateEnvironmentRequest {
33578 pub fn new() -> Self {
33579 std::default::Default::default()
33580 }
33581
33582 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33584 self.parent = v.into();
33585 self
33586 }
33587
33588 pub fn set_environment_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33590 self.environment_id = v.into();
33591 self
33592 }
33593
33594 pub fn set_environment<T>(mut self, v: T) -> Self
33596 where
33597 T: std::convert::Into<crate::model::Environment>,
33598 {
33599 self.environment = std::option::Option::Some(v.into());
33600 self
33601 }
33602
33603 pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
33605 where
33606 T: std::convert::Into<crate::model::Environment>,
33607 {
33608 self.environment = v.map(|x| x.into());
33609 self
33610 }
33611
33612 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33614 self.validate_only = v.into();
33615 self
33616 }
33617}
33618
33619impl wkt::message::Message for CreateEnvironmentRequest {
33620 fn typename() -> &'static str {
33621 "type.googleapis.com/google.cloud.dataplex.v1.CreateEnvironmentRequest"
33622 }
33623}
33624
33625#[derive(Clone, Default, PartialEq)]
33627#[non_exhaustive]
33628pub struct UpdateEnvironmentRequest {
33629 pub update_mask: std::option::Option<wkt::FieldMask>,
33631
33632 pub environment: std::option::Option<crate::model::Environment>,
33635
33636 pub validate_only: bool,
33639
33640 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33641}
33642
33643impl UpdateEnvironmentRequest {
33644 pub fn new() -> Self {
33645 std::default::Default::default()
33646 }
33647
33648 pub fn set_update_mask<T>(mut self, v: T) -> Self
33650 where
33651 T: std::convert::Into<wkt::FieldMask>,
33652 {
33653 self.update_mask = std::option::Option::Some(v.into());
33654 self
33655 }
33656
33657 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
33659 where
33660 T: std::convert::Into<wkt::FieldMask>,
33661 {
33662 self.update_mask = v.map(|x| x.into());
33663 self
33664 }
33665
33666 pub fn set_environment<T>(mut self, v: T) -> Self
33668 where
33669 T: std::convert::Into<crate::model::Environment>,
33670 {
33671 self.environment = std::option::Option::Some(v.into());
33672 self
33673 }
33674
33675 pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
33677 where
33678 T: std::convert::Into<crate::model::Environment>,
33679 {
33680 self.environment = v.map(|x| x.into());
33681 self
33682 }
33683
33684 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
33686 self.validate_only = v.into();
33687 self
33688 }
33689}
33690
33691impl wkt::message::Message for UpdateEnvironmentRequest {
33692 fn typename() -> &'static str {
33693 "type.googleapis.com/google.cloud.dataplex.v1.UpdateEnvironmentRequest"
33694 }
33695}
33696
33697#[derive(Clone, Default, PartialEq)]
33699#[non_exhaustive]
33700pub struct DeleteEnvironmentRequest {
33701 pub name: std::string::String,
33704
33705 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33706}
33707
33708impl DeleteEnvironmentRequest {
33709 pub fn new() -> Self {
33710 std::default::Default::default()
33711 }
33712
33713 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33715 self.name = v.into();
33716 self
33717 }
33718}
33719
33720impl wkt::message::Message for DeleteEnvironmentRequest {
33721 fn typename() -> &'static str {
33722 "type.googleapis.com/google.cloud.dataplex.v1.DeleteEnvironmentRequest"
33723 }
33724}
33725
33726#[derive(Clone, Default, PartialEq)]
33728#[non_exhaustive]
33729pub struct ListEnvironmentsRequest {
33730 pub parent: std::string::String,
33733
33734 pub page_size: i32,
33739
33740 pub page_token: std::string::String,
33745
33746 pub filter: std::string::String,
33748
33749 pub order_by: std::string::String,
33751
33752 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33753}
33754
33755impl ListEnvironmentsRequest {
33756 pub fn new() -> Self {
33757 std::default::Default::default()
33758 }
33759
33760 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33762 self.parent = v.into();
33763 self
33764 }
33765
33766 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33768 self.page_size = v.into();
33769 self
33770 }
33771
33772 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33774 self.page_token = v.into();
33775 self
33776 }
33777
33778 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33780 self.filter = v.into();
33781 self
33782 }
33783
33784 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33786 self.order_by = v.into();
33787 self
33788 }
33789}
33790
33791impl wkt::message::Message for ListEnvironmentsRequest {
33792 fn typename() -> &'static str {
33793 "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsRequest"
33794 }
33795}
33796
33797#[derive(Clone, Default, PartialEq)]
33799#[non_exhaustive]
33800pub struct ListEnvironmentsResponse {
33801 pub environments: std::vec::Vec<crate::model::Environment>,
33803
33804 pub next_page_token: std::string::String,
33807
33808 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33809}
33810
33811impl ListEnvironmentsResponse {
33812 pub fn new() -> Self {
33813 std::default::Default::default()
33814 }
33815
33816 pub fn set_environments<T, V>(mut self, v: T) -> Self
33818 where
33819 T: std::iter::IntoIterator<Item = V>,
33820 V: std::convert::Into<crate::model::Environment>,
33821 {
33822 use std::iter::Iterator;
33823 self.environments = v.into_iter().map(|i| i.into()).collect();
33824 self
33825 }
33826
33827 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33829 self.next_page_token = v.into();
33830 self
33831 }
33832}
33833
33834impl wkt::message::Message for ListEnvironmentsResponse {
33835 fn typename() -> &'static str {
33836 "type.googleapis.com/google.cloud.dataplex.v1.ListEnvironmentsResponse"
33837 }
33838}
33839
33840#[doc(hidden)]
33841impl gax::paginator::internal::PageableResponse for ListEnvironmentsResponse {
33842 type PageItem = crate::model::Environment;
33843
33844 fn items(self) -> std::vec::Vec<Self::PageItem> {
33845 self.environments
33846 }
33847
33848 fn next_page_token(&self) -> std::string::String {
33849 use std::clone::Clone;
33850 self.next_page_token.clone()
33851 }
33852}
33853
33854#[derive(Clone, Default, PartialEq)]
33856#[non_exhaustive]
33857pub struct GetEnvironmentRequest {
33858 pub name: std::string::String,
33861
33862 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33863}
33864
33865impl GetEnvironmentRequest {
33866 pub fn new() -> Self {
33867 std::default::Default::default()
33868 }
33869
33870 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33872 self.name = v.into();
33873 self
33874 }
33875}
33876
33877impl wkt::message::Message for GetEnvironmentRequest {
33878 fn typename() -> &'static str {
33879 "type.googleapis.com/google.cloud.dataplex.v1.GetEnvironmentRequest"
33880 }
33881}
33882
33883#[derive(Clone, Default, PartialEq)]
33885#[non_exhaustive]
33886pub struct ListSessionsRequest {
33887 pub parent: std::string::String,
33890
33891 pub page_size: i32,
33896
33897 pub page_token: std::string::String,
33902
33903 pub filter: std::string::String,
33912
33913 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33914}
33915
33916impl ListSessionsRequest {
33917 pub fn new() -> Self {
33918 std::default::Default::default()
33919 }
33920
33921 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33923 self.parent = v.into();
33924 self
33925 }
33926
33927 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
33929 self.page_size = v.into();
33930 self
33931 }
33932
33933 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33935 self.page_token = v.into();
33936 self
33937 }
33938
33939 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33941 self.filter = v.into();
33942 self
33943 }
33944}
33945
33946impl wkt::message::Message for ListSessionsRequest {
33947 fn typename() -> &'static str {
33948 "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsRequest"
33949 }
33950}
33951
33952#[derive(Clone, Default, PartialEq)]
33954#[non_exhaustive]
33955pub struct ListSessionsResponse {
33956 pub sessions: std::vec::Vec<crate::model::Session>,
33958
33959 pub next_page_token: std::string::String,
33962
33963 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
33964}
33965
33966impl ListSessionsResponse {
33967 pub fn new() -> Self {
33968 std::default::Default::default()
33969 }
33970
33971 pub fn set_sessions<T, V>(mut self, v: T) -> Self
33973 where
33974 T: std::iter::IntoIterator<Item = V>,
33975 V: std::convert::Into<crate::model::Session>,
33976 {
33977 use std::iter::Iterator;
33978 self.sessions = v.into_iter().map(|i| i.into()).collect();
33979 self
33980 }
33981
33982 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
33984 self.next_page_token = v.into();
33985 self
33986 }
33987}
33988
33989impl wkt::message::Message for ListSessionsResponse {
33990 fn typename() -> &'static str {
33991 "type.googleapis.com/google.cloud.dataplex.v1.ListSessionsResponse"
33992 }
33993}
33994
33995#[doc(hidden)]
33996impl gax::paginator::internal::PageableResponse for ListSessionsResponse {
33997 type PageItem = crate::model::Session;
33998
33999 fn items(self) -> std::vec::Vec<Self::PageItem> {
34000 self.sessions
34001 }
34002
34003 fn next_page_token(&self) -> std::string::String {
34004 use std::clone::Clone;
34005 self.next_page_token.clone()
34006 }
34007}
34008
34009#[derive(Clone, Default, PartialEq)]
34011#[non_exhaustive]
34012pub struct Task {
34013 pub name: std::string::String,
34017
34018 pub uid: std::string::String,
34021
34022 pub create_time: std::option::Option<wkt::Timestamp>,
34024
34025 pub update_time: std::option::Option<wkt::Timestamp>,
34027
34028 pub description: std::string::String,
34030
34031 pub display_name: std::string::String,
34033
34034 pub state: crate::model::State,
34036
34037 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
34039
34040 pub trigger_spec: std::option::Option<crate::model::task::TriggerSpec>,
34042
34043 pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
34045
34046 pub execution_status: std::option::Option<crate::model::task::ExecutionStatus>,
34048
34049 pub config: std::option::Option<crate::model::task::Config>,
34051
34052 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34053}
34054
34055impl Task {
34056 pub fn new() -> Self {
34057 std::default::Default::default()
34058 }
34059
34060 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34062 self.name = v.into();
34063 self
34064 }
34065
34066 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34068 self.uid = v.into();
34069 self
34070 }
34071
34072 pub fn set_create_time<T>(mut self, v: T) -> Self
34074 where
34075 T: std::convert::Into<wkt::Timestamp>,
34076 {
34077 self.create_time = std::option::Option::Some(v.into());
34078 self
34079 }
34080
34081 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
34083 where
34084 T: std::convert::Into<wkt::Timestamp>,
34085 {
34086 self.create_time = v.map(|x| x.into());
34087 self
34088 }
34089
34090 pub fn set_update_time<T>(mut self, v: T) -> Self
34092 where
34093 T: std::convert::Into<wkt::Timestamp>,
34094 {
34095 self.update_time = std::option::Option::Some(v.into());
34096 self
34097 }
34098
34099 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
34101 where
34102 T: std::convert::Into<wkt::Timestamp>,
34103 {
34104 self.update_time = v.map(|x| x.into());
34105 self
34106 }
34107
34108 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34110 self.description = v.into();
34111 self
34112 }
34113
34114 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34116 self.display_name = v.into();
34117 self
34118 }
34119
34120 pub fn set_state<T: std::convert::Into<crate::model::State>>(mut self, v: T) -> Self {
34122 self.state = v.into();
34123 self
34124 }
34125
34126 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
34128 where
34129 T: std::iter::IntoIterator<Item = (K, V)>,
34130 K: std::convert::Into<std::string::String>,
34131 V: std::convert::Into<std::string::String>,
34132 {
34133 use std::iter::Iterator;
34134 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
34135 self
34136 }
34137
34138 pub fn set_trigger_spec<T>(mut self, v: T) -> Self
34140 where
34141 T: std::convert::Into<crate::model::task::TriggerSpec>,
34142 {
34143 self.trigger_spec = std::option::Option::Some(v.into());
34144 self
34145 }
34146
34147 pub fn set_or_clear_trigger_spec<T>(mut self, v: std::option::Option<T>) -> Self
34149 where
34150 T: std::convert::Into<crate::model::task::TriggerSpec>,
34151 {
34152 self.trigger_spec = v.map(|x| x.into());
34153 self
34154 }
34155
34156 pub fn set_execution_spec<T>(mut self, v: T) -> Self
34158 where
34159 T: std::convert::Into<crate::model::task::ExecutionSpec>,
34160 {
34161 self.execution_spec = std::option::Option::Some(v.into());
34162 self
34163 }
34164
34165 pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
34167 where
34168 T: std::convert::Into<crate::model::task::ExecutionSpec>,
34169 {
34170 self.execution_spec = v.map(|x| x.into());
34171 self
34172 }
34173
34174 pub fn set_execution_status<T>(mut self, v: T) -> Self
34176 where
34177 T: std::convert::Into<crate::model::task::ExecutionStatus>,
34178 {
34179 self.execution_status = std::option::Option::Some(v.into());
34180 self
34181 }
34182
34183 pub fn set_or_clear_execution_status<T>(mut self, v: std::option::Option<T>) -> Self
34185 where
34186 T: std::convert::Into<crate::model::task::ExecutionStatus>,
34187 {
34188 self.execution_status = v.map(|x| x.into());
34189 self
34190 }
34191
34192 pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::task::Config>>>(
34197 mut self,
34198 v: T,
34199 ) -> Self {
34200 self.config = v.into();
34201 self
34202 }
34203
34204 pub fn spark(
34208 &self,
34209 ) -> std::option::Option<&std::boxed::Box<crate::model::task::SparkTaskConfig>> {
34210 #[allow(unreachable_patterns)]
34211 self.config.as_ref().and_then(|v| match v {
34212 crate::model::task::Config::Spark(v) => std::option::Option::Some(v),
34213 _ => std::option::Option::None,
34214 })
34215 }
34216
34217 pub fn set_spark<
34223 T: std::convert::Into<std::boxed::Box<crate::model::task::SparkTaskConfig>>,
34224 >(
34225 mut self,
34226 v: T,
34227 ) -> Self {
34228 self.config = std::option::Option::Some(crate::model::task::Config::Spark(v.into()));
34229 self
34230 }
34231
34232 pub fn notebook(
34236 &self,
34237 ) -> std::option::Option<&std::boxed::Box<crate::model::task::NotebookTaskConfig>> {
34238 #[allow(unreachable_patterns)]
34239 self.config.as_ref().and_then(|v| match v {
34240 crate::model::task::Config::Notebook(v) => std::option::Option::Some(v),
34241 _ => std::option::Option::None,
34242 })
34243 }
34244
34245 pub fn set_notebook<
34251 T: std::convert::Into<std::boxed::Box<crate::model::task::NotebookTaskConfig>>,
34252 >(
34253 mut self,
34254 v: T,
34255 ) -> Self {
34256 self.config = std::option::Option::Some(crate::model::task::Config::Notebook(v.into()));
34257 self
34258 }
34259}
34260
34261impl wkt::message::Message for Task {
34262 fn typename() -> &'static str {
34263 "type.googleapis.com/google.cloud.dataplex.v1.Task"
34264 }
34265}
34266
34267pub mod task {
34269 #[allow(unused_imports)]
34270 use super::*;
34271
34272 #[derive(Clone, Default, PartialEq)]
34274 #[non_exhaustive]
34275 pub struct InfrastructureSpec {
34276 pub resources: std::option::Option<crate::model::task::infrastructure_spec::Resources>,
34278
34279 pub runtime: std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
34281
34282 pub network: std::option::Option<crate::model::task::infrastructure_spec::Network>,
34284
34285 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34286 }
34287
34288 impl InfrastructureSpec {
34289 pub fn new() -> Self {
34290 std::default::Default::default()
34291 }
34292
34293 pub fn set_resources<
34298 T: std::convert::Into<
34299 std::option::Option<crate::model::task::infrastructure_spec::Resources>,
34300 >,
34301 >(
34302 mut self,
34303 v: T,
34304 ) -> Self {
34305 self.resources = v.into();
34306 self
34307 }
34308
34309 pub fn batch(
34313 &self,
34314 ) -> std::option::Option<
34315 &std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
34316 > {
34317 #[allow(unreachable_patterns)]
34318 self.resources.as_ref().and_then(|v| match v {
34319 crate::model::task::infrastructure_spec::Resources::Batch(v) => {
34320 std::option::Option::Some(v)
34321 }
34322 _ => std::option::Option::None,
34323 })
34324 }
34325
34326 pub fn set_batch<
34332 T: std::convert::Into<
34333 std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>,
34334 >,
34335 >(
34336 mut self,
34337 v: T,
34338 ) -> Self {
34339 self.resources = std::option::Option::Some(
34340 crate::model::task::infrastructure_spec::Resources::Batch(v.into()),
34341 );
34342 self
34343 }
34344
34345 pub fn set_runtime<
34350 T: std::convert::Into<
34351 std::option::Option<crate::model::task::infrastructure_spec::Runtime>,
34352 >,
34353 >(
34354 mut self,
34355 v: T,
34356 ) -> Self {
34357 self.runtime = v.into();
34358 self
34359 }
34360
34361 pub fn container_image(
34365 &self,
34366 ) -> std::option::Option<
34367 &std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
34368 > {
34369 #[allow(unreachable_patterns)]
34370 self.runtime.as_ref().and_then(|v| match v {
34371 crate::model::task::infrastructure_spec::Runtime::ContainerImage(v) => {
34372 std::option::Option::Some(v)
34373 }
34374 _ => std::option::Option::None,
34375 })
34376 }
34377
34378 pub fn set_container_image<
34384 T: std::convert::Into<
34385 std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
34386 >,
34387 >(
34388 mut self,
34389 v: T,
34390 ) -> Self {
34391 self.runtime = std::option::Option::Some(
34392 crate::model::task::infrastructure_spec::Runtime::ContainerImage(v.into()),
34393 );
34394 self
34395 }
34396
34397 pub fn set_network<
34402 T: std::convert::Into<
34403 std::option::Option<crate::model::task::infrastructure_spec::Network>,
34404 >,
34405 >(
34406 mut self,
34407 v: T,
34408 ) -> Self {
34409 self.network = v.into();
34410 self
34411 }
34412
34413 pub fn vpc_network(
34417 &self,
34418 ) -> std::option::Option<
34419 &std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
34420 > {
34421 #[allow(unreachable_patterns)]
34422 self.network.as_ref().and_then(|v| match v {
34423 crate::model::task::infrastructure_spec::Network::VpcNetwork(v) => {
34424 std::option::Option::Some(v)
34425 }
34426 _ => std::option::Option::None,
34427 })
34428 }
34429
34430 pub fn set_vpc_network<
34436 T: std::convert::Into<
34437 std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>,
34438 >,
34439 >(
34440 mut self,
34441 v: T,
34442 ) -> Self {
34443 self.network = std::option::Option::Some(
34444 crate::model::task::infrastructure_spec::Network::VpcNetwork(v.into()),
34445 );
34446 self
34447 }
34448 }
34449
34450 impl wkt::message::Message for InfrastructureSpec {
34451 fn typename() -> &'static str {
34452 "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec"
34453 }
34454 }
34455
34456 pub mod infrastructure_spec {
34458 #[allow(unused_imports)]
34459 use super::*;
34460
34461 #[derive(Clone, Default, PartialEq)]
34463 #[non_exhaustive]
34464 pub struct BatchComputeResources {
34465 pub executors_count: i32,
34468
34469 pub max_executors_count: i32,
34473
34474 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34475 }
34476
34477 impl BatchComputeResources {
34478 pub fn new() -> Self {
34479 std::default::Default::default()
34480 }
34481
34482 pub fn set_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34484 self.executors_count = v.into();
34485 self
34486 }
34487
34488 pub fn set_max_executors_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34490 self.max_executors_count = v.into();
34491 self
34492 }
34493 }
34494
34495 impl wkt::message::Message for BatchComputeResources {
34496 fn typename() -> &'static str {
34497 "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"
34498 }
34499 }
34500
34501 #[derive(Clone, Default, PartialEq)]
34503 #[non_exhaustive]
34504 pub struct ContainerImageRuntime {
34505 pub image: std::string::String,
34507
34508 pub java_jars: std::vec::Vec<std::string::String>,
34512
34513 pub python_packages: std::vec::Vec<std::string::String>,
34517
34518 pub properties: std::collections::HashMap<std::string::String, std::string::String>,
34524
34525 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34526 }
34527
34528 impl ContainerImageRuntime {
34529 pub fn new() -> Self {
34530 std::default::Default::default()
34531 }
34532
34533 pub fn set_image<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34535 self.image = v.into();
34536 self
34537 }
34538
34539 pub fn set_java_jars<T, V>(mut self, v: T) -> Self
34541 where
34542 T: std::iter::IntoIterator<Item = V>,
34543 V: std::convert::Into<std::string::String>,
34544 {
34545 use std::iter::Iterator;
34546 self.java_jars = v.into_iter().map(|i| i.into()).collect();
34547 self
34548 }
34549
34550 pub fn set_python_packages<T, V>(mut self, v: T) -> Self
34552 where
34553 T: std::iter::IntoIterator<Item = V>,
34554 V: std::convert::Into<std::string::String>,
34555 {
34556 use std::iter::Iterator;
34557 self.python_packages = v.into_iter().map(|i| i.into()).collect();
34558 self
34559 }
34560
34561 pub fn set_properties<T, K, V>(mut self, v: T) -> Self
34563 where
34564 T: std::iter::IntoIterator<Item = (K, V)>,
34565 K: std::convert::Into<std::string::String>,
34566 V: std::convert::Into<std::string::String>,
34567 {
34568 use std::iter::Iterator;
34569 self.properties = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
34570 self
34571 }
34572 }
34573
34574 impl wkt::message::Message for ContainerImageRuntime {
34575 fn typename() -> &'static str {
34576 "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"
34577 }
34578 }
34579
34580 #[derive(Clone, Default, PartialEq)]
34582 #[non_exhaustive]
34583 pub struct VpcNetwork {
34584 pub network_tags: std::vec::Vec<std::string::String>,
34586
34587 pub network_name: std::option::Option<
34589 crate::model::task::infrastructure_spec::vpc_network::NetworkName,
34590 >,
34591
34592 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34593 }
34594
34595 impl VpcNetwork {
34596 pub fn new() -> Self {
34597 std::default::Default::default()
34598 }
34599
34600 pub fn set_network_tags<T, V>(mut self, v: T) -> Self
34602 where
34603 T: std::iter::IntoIterator<Item = V>,
34604 V: std::convert::Into<std::string::String>,
34605 {
34606 use std::iter::Iterator;
34607 self.network_tags = v.into_iter().map(|i| i.into()).collect();
34608 self
34609 }
34610
34611 pub fn set_network_name<
34616 T: std::convert::Into<
34617 std::option::Option<
34618 crate::model::task::infrastructure_spec::vpc_network::NetworkName,
34619 >,
34620 >,
34621 >(
34622 mut self,
34623 v: T,
34624 ) -> Self {
34625 self.network_name = v.into();
34626 self
34627 }
34628
34629 pub fn network(&self) -> std::option::Option<&std::string::String> {
34633 #[allow(unreachable_patterns)]
34634 self.network_name.as_ref().and_then(|v| match v {
34635 crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
34636 v,
34637 ) => std::option::Option::Some(v),
34638 _ => std::option::Option::None,
34639 })
34640 }
34641
34642 pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34648 self.network_name = std::option::Option::Some(
34649 crate::model::task::infrastructure_spec::vpc_network::NetworkName::Network(
34650 v.into(),
34651 ),
34652 );
34653 self
34654 }
34655
34656 pub fn sub_network(&self) -> std::option::Option<&std::string::String> {
34660 #[allow(unreachable_patterns)]
34661 self.network_name.as_ref().and_then(|v| match v {
34662 crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(v) => std::option::Option::Some(v),
34663 _ => std::option::Option::None,
34664 })
34665 }
34666
34667 pub fn set_sub_network<T: std::convert::Into<std::string::String>>(
34673 mut self,
34674 v: T,
34675 ) -> Self {
34676 self.network_name = std::option::Option::Some(
34677 crate::model::task::infrastructure_spec::vpc_network::NetworkName::SubNetwork(
34678 v.into(),
34679 ),
34680 );
34681 self
34682 }
34683 }
34684
34685 impl wkt::message::Message for VpcNetwork {
34686 fn typename() -> &'static str {
34687 "type.googleapis.com/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"
34688 }
34689 }
34690
34691 pub mod vpc_network {
34693 #[allow(unused_imports)]
34694 use super::*;
34695
34696 #[derive(Clone, Debug, PartialEq)]
34698 #[non_exhaustive]
34699 pub enum NetworkName {
34700 Network(std::string::String),
34703 SubNetwork(std::string::String),
34705 }
34706 }
34707
34708 #[derive(Clone, Debug, PartialEq)]
34710 #[non_exhaustive]
34711 pub enum Resources {
34712 Batch(std::boxed::Box<crate::model::task::infrastructure_spec::BatchComputeResources>),
34714 }
34715
34716 #[derive(Clone, Debug, PartialEq)]
34718 #[non_exhaustive]
34719 pub enum Runtime {
34720 ContainerImage(
34722 std::boxed::Box<crate::model::task::infrastructure_spec::ContainerImageRuntime>,
34723 ),
34724 }
34725
34726 #[derive(Clone, Debug, PartialEq)]
34728 #[non_exhaustive]
34729 pub enum Network {
34730 VpcNetwork(std::boxed::Box<crate::model::task::infrastructure_spec::VpcNetwork>),
34732 }
34733 }
34734
34735 #[derive(Clone, Default, PartialEq)]
34737 #[non_exhaustive]
34738 pub struct TriggerSpec {
34739 pub r#type: crate::model::task::trigger_spec::Type,
34741
34742 pub start_time: std::option::Option<wkt::Timestamp>,
34746
34747 pub disabled: bool,
34751
34752 pub max_retries: i32,
34755
34756 pub trigger: std::option::Option<crate::model::task::trigger_spec::Trigger>,
34758
34759 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
34760 }
34761
34762 impl TriggerSpec {
34763 pub fn new() -> Self {
34764 std::default::Default::default()
34765 }
34766
34767 pub fn set_type<T: std::convert::Into<crate::model::task::trigger_spec::Type>>(
34769 mut self,
34770 v: T,
34771 ) -> Self {
34772 self.r#type = v.into();
34773 self
34774 }
34775
34776 pub fn set_start_time<T>(mut self, v: T) -> Self
34778 where
34779 T: std::convert::Into<wkt::Timestamp>,
34780 {
34781 self.start_time = std::option::Option::Some(v.into());
34782 self
34783 }
34784
34785 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
34787 where
34788 T: std::convert::Into<wkt::Timestamp>,
34789 {
34790 self.start_time = v.map(|x| x.into());
34791 self
34792 }
34793
34794 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
34796 self.disabled = v.into();
34797 self
34798 }
34799
34800 pub fn set_max_retries<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
34802 self.max_retries = v.into();
34803 self
34804 }
34805
34806 pub fn set_trigger<
34811 T: std::convert::Into<std::option::Option<crate::model::task::trigger_spec::Trigger>>,
34812 >(
34813 mut self,
34814 v: T,
34815 ) -> Self {
34816 self.trigger = v.into();
34817 self
34818 }
34819
34820 pub fn schedule(&self) -> std::option::Option<&std::string::String> {
34824 #[allow(unreachable_patterns)]
34825 self.trigger.as_ref().and_then(|v| match v {
34826 crate::model::task::trigger_spec::Trigger::Schedule(v) => {
34827 std::option::Option::Some(v)
34828 }
34829 _ => std::option::Option::None,
34830 })
34831 }
34832
34833 pub fn set_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
34839 self.trigger = std::option::Option::Some(
34840 crate::model::task::trigger_spec::Trigger::Schedule(v.into()),
34841 );
34842 self
34843 }
34844 }
34845
34846 impl wkt::message::Message for TriggerSpec {
34847 fn typename() -> &'static str {
34848 "type.googleapis.com/google.cloud.dataplex.v1.Task.TriggerSpec"
34849 }
34850 }
34851
34852 pub mod trigger_spec {
34854 #[allow(unused_imports)]
34855 use super::*;
34856
34857 #[derive(Clone, Debug, PartialEq)]
34873 #[non_exhaustive]
34874 pub enum Type {
34875 Unspecified,
34877 OnDemand,
34879 Recurring,
34881 UnknownValue(r#type::UnknownValue),
34886 }
34887
34888 #[doc(hidden)]
34889 pub mod r#type {
34890 #[allow(unused_imports)]
34891 use super::*;
34892 #[derive(Clone, Debug, PartialEq)]
34893 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
34894 }
34895
34896 impl Type {
34897 pub fn value(&self) -> std::option::Option<i32> {
34902 match self {
34903 Self::Unspecified => std::option::Option::Some(0),
34904 Self::OnDemand => std::option::Option::Some(1),
34905 Self::Recurring => std::option::Option::Some(2),
34906 Self::UnknownValue(u) => u.0.value(),
34907 }
34908 }
34909
34910 pub fn name(&self) -> std::option::Option<&str> {
34915 match self {
34916 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
34917 Self::OnDemand => std::option::Option::Some("ON_DEMAND"),
34918 Self::Recurring => std::option::Option::Some("RECURRING"),
34919 Self::UnknownValue(u) => u.0.name(),
34920 }
34921 }
34922 }
34923
34924 impl std::default::Default for Type {
34925 fn default() -> Self {
34926 use std::convert::From;
34927 Self::from(0)
34928 }
34929 }
34930
34931 impl std::fmt::Display for Type {
34932 fn fmt(
34933 &self,
34934 f: &mut std::fmt::Formatter<'_>,
34935 ) -> std::result::Result<(), std::fmt::Error> {
34936 wkt::internal::display_enum(f, self.name(), self.value())
34937 }
34938 }
34939
34940 impl std::convert::From<i32> for Type {
34941 fn from(value: i32) -> Self {
34942 match value {
34943 0 => Self::Unspecified,
34944 1 => Self::OnDemand,
34945 2 => Self::Recurring,
34946 _ => Self::UnknownValue(r#type::UnknownValue(
34947 wkt::internal::UnknownEnumValue::Integer(value),
34948 )),
34949 }
34950 }
34951 }
34952
34953 impl std::convert::From<&str> for Type {
34954 fn from(value: &str) -> Self {
34955 use std::string::ToString;
34956 match value {
34957 "TYPE_UNSPECIFIED" => Self::Unspecified,
34958 "ON_DEMAND" => Self::OnDemand,
34959 "RECURRING" => Self::Recurring,
34960 _ => Self::UnknownValue(r#type::UnknownValue(
34961 wkt::internal::UnknownEnumValue::String(value.to_string()),
34962 )),
34963 }
34964 }
34965 }
34966
34967 impl serde::ser::Serialize for Type {
34968 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
34969 where
34970 S: serde::Serializer,
34971 {
34972 match self {
34973 Self::Unspecified => serializer.serialize_i32(0),
34974 Self::OnDemand => serializer.serialize_i32(1),
34975 Self::Recurring => serializer.serialize_i32(2),
34976 Self::UnknownValue(u) => u.0.serialize(serializer),
34977 }
34978 }
34979 }
34980
34981 impl<'de> serde::de::Deserialize<'de> for Type {
34982 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
34983 where
34984 D: serde::Deserializer<'de>,
34985 {
34986 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
34987 ".google.cloud.dataplex.v1.Task.TriggerSpec.Type",
34988 ))
34989 }
34990 }
34991
34992 #[derive(Clone, Debug, PartialEq)]
34994 #[non_exhaustive]
34995 pub enum Trigger {
34996 Schedule(std::string::String),
35004 }
35005 }
35006
35007 #[derive(Clone, Default, PartialEq)]
35009 #[non_exhaustive]
35010 pub struct ExecutionSpec {
35011 pub args: std::collections::HashMap<std::string::String, std::string::String>,
35025
35026 pub service_account: std::string::String,
35030
35031 pub project: std::string::String,
35038
35039 pub max_job_execution_lifetime: std::option::Option<wkt::Duration>,
35041
35042 pub kms_key: std::string::String,
35045
35046 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35047 }
35048
35049 impl ExecutionSpec {
35050 pub fn new() -> Self {
35051 std::default::Default::default()
35052 }
35053
35054 pub fn set_args<T, K, V>(mut self, v: T) -> Self
35056 where
35057 T: std::iter::IntoIterator<Item = (K, V)>,
35058 K: std::convert::Into<std::string::String>,
35059 V: std::convert::Into<std::string::String>,
35060 {
35061 use std::iter::Iterator;
35062 self.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
35063 self
35064 }
35065
35066 pub fn set_service_account<T: std::convert::Into<std::string::String>>(
35068 mut self,
35069 v: T,
35070 ) -> Self {
35071 self.service_account = v.into();
35072 self
35073 }
35074
35075 pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35077 self.project = v.into();
35078 self
35079 }
35080
35081 pub fn set_max_job_execution_lifetime<T>(mut self, v: T) -> Self
35083 where
35084 T: std::convert::Into<wkt::Duration>,
35085 {
35086 self.max_job_execution_lifetime = std::option::Option::Some(v.into());
35087 self
35088 }
35089
35090 pub fn set_or_clear_max_job_execution_lifetime<T>(
35092 mut self,
35093 v: std::option::Option<T>,
35094 ) -> Self
35095 where
35096 T: std::convert::Into<wkt::Duration>,
35097 {
35098 self.max_job_execution_lifetime = v.map(|x| x.into());
35099 self
35100 }
35101
35102 pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35104 self.kms_key = v.into();
35105 self
35106 }
35107 }
35108
35109 impl wkt::message::Message for ExecutionSpec {
35110 fn typename() -> &'static str {
35111 "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionSpec"
35112 }
35113 }
35114
35115 #[derive(Clone, Default, PartialEq)]
35117 #[non_exhaustive]
35118 pub struct SparkTaskConfig {
35119 pub file_uris: std::vec::Vec<std::string::String>,
35122
35123 pub archive_uris: std::vec::Vec<std::string::String>,
35127
35128 pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
35130
35131 pub driver: std::option::Option<crate::model::task::spark_task_config::Driver>,
35135
35136 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35137 }
35138
35139 impl SparkTaskConfig {
35140 pub fn new() -> Self {
35141 std::default::Default::default()
35142 }
35143
35144 pub fn set_file_uris<T, V>(mut self, v: T) -> Self
35146 where
35147 T: std::iter::IntoIterator<Item = V>,
35148 V: std::convert::Into<std::string::String>,
35149 {
35150 use std::iter::Iterator;
35151 self.file_uris = v.into_iter().map(|i| i.into()).collect();
35152 self
35153 }
35154
35155 pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
35157 where
35158 T: std::iter::IntoIterator<Item = V>,
35159 V: std::convert::Into<std::string::String>,
35160 {
35161 use std::iter::Iterator;
35162 self.archive_uris = v.into_iter().map(|i| i.into()).collect();
35163 self
35164 }
35165
35166 pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
35168 where
35169 T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35170 {
35171 self.infrastructure_spec = std::option::Option::Some(v.into());
35172 self
35173 }
35174
35175 pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
35177 where
35178 T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35179 {
35180 self.infrastructure_spec = v.map(|x| x.into());
35181 self
35182 }
35183
35184 pub fn set_driver<
35189 T: std::convert::Into<std::option::Option<crate::model::task::spark_task_config::Driver>>,
35190 >(
35191 mut self,
35192 v: T,
35193 ) -> Self {
35194 self.driver = v.into();
35195 self
35196 }
35197
35198 pub fn main_jar_file_uri(&self) -> std::option::Option<&std::string::String> {
35202 #[allow(unreachable_patterns)]
35203 self.driver.as_ref().and_then(|v| match v {
35204 crate::model::task::spark_task_config::Driver::MainJarFileUri(v) => {
35205 std::option::Option::Some(v)
35206 }
35207 _ => std::option::Option::None,
35208 })
35209 }
35210
35211 pub fn set_main_jar_file_uri<T: std::convert::Into<std::string::String>>(
35217 mut self,
35218 v: T,
35219 ) -> Self {
35220 self.driver = std::option::Option::Some(
35221 crate::model::task::spark_task_config::Driver::MainJarFileUri(v.into()),
35222 );
35223 self
35224 }
35225
35226 pub fn main_class(&self) -> std::option::Option<&std::string::String> {
35230 #[allow(unreachable_patterns)]
35231 self.driver.as_ref().and_then(|v| match v {
35232 crate::model::task::spark_task_config::Driver::MainClass(v) => {
35233 std::option::Option::Some(v)
35234 }
35235 _ => std::option::Option::None,
35236 })
35237 }
35238
35239 pub fn set_main_class<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35245 self.driver = std::option::Option::Some(
35246 crate::model::task::spark_task_config::Driver::MainClass(v.into()),
35247 );
35248 self
35249 }
35250
35251 pub fn python_script_file(&self) -> std::option::Option<&std::string::String> {
35255 #[allow(unreachable_patterns)]
35256 self.driver.as_ref().and_then(|v| match v {
35257 crate::model::task::spark_task_config::Driver::PythonScriptFile(v) => {
35258 std::option::Option::Some(v)
35259 }
35260 _ => std::option::Option::None,
35261 })
35262 }
35263
35264 pub fn set_python_script_file<T: std::convert::Into<std::string::String>>(
35270 mut self,
35271 v: T,
35272 ) -> Self {
35273 self.driver = std::option::Option::Some(
35274 crate::model::task::spark_task_config::Driver::PythonScriptFile(v.into()),
35275 );
35276 self
35277 }
35278
35279 pub fn sql_script_file(&self) -> std::option::Option<&std::string::String> {
35283 #[allow(unreachable_patterns)]
35284 self.driver.as_ref().and_then(|v| match v {
35285 crate::model::task::spark_task_config::Driver::SqlScriptFile(v) => {
35286 std::option::Option::Some(v)
35287 }
35288 _ => std::option::Option::None,
35289 })
35290 }
35291
35292 pub fn set_sql_script_file<T: std::convert::Into<std::string::String>>(
35298 mut self,
35299 v: T,
35300 ) -> Self {
35301 self.driver = std::option::Option::Some(
35302 crate::model::task::spark_task_config::Driver::SqlScriptFile(v.into()),
35303 );
35304 self
35305 }
35306
35307 pub fn sql_script(&self) -> std::option::Option<&std::string::String> {
35311 #[allow(unreachable_patterns)]
35312 self.driver.as_ref().and_then(|v| match v {
35313 crate::model::task::spark_task_config::Driver::SqlScript(v) => {
35314 std::option::Option::Some(v)
35315 }
35316 _ => std::option::Option::None,
35317 })
35318 }
35319
35320 pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35326 self.driver = std::option::Option::Some(
35327 crate::model::task::spark_task_config::Driver::SqlScript(v.into()),
35328 );
35329 self
35330 }
35331 }
35332
35333 impl wkt::message::Message for SparkTaskConfig {
35334 fn typename() -> &'static str {
35335 "type.googleapis.com/google.cloud.dataplex.v1.Task.SparkTaskConfig"
35336 }
35337 }
35338
35339 pub mod spark_task_config {
35341 #[allow(unused_imports)]
35342 use super::*;
35343
35344 #[derive(Clone, Debug, PartialEq)]
35348 #[non_exhaustive]
35349 pub enum Driver {
35350 MainJarFileUri(std::string::String),
35354 MainClass(std::string::String),
35360 PythonScriptFile(std::string::String),
35364 SqlScriptFile(std::string::String),
35368 SqlScript(std::string::String),
35372 }
35373 }
35374
35375 #[derive(Clone, Default, PartialEq)]
35377 #[non_exhaustive]
35378 pub struct NotebookTaskConfig {
35379 pub notebook: std::string::String,
35384
35385 pub infrastructure_spec: std::option::Option<crate::model::task::InfrastructureSpec>,
35387
35388 pub file_uris: std::vec::Vec<std::string::String>,
35391
35392 pub archive_uris: std::vec::Vec<std::string::String>,
35396
35397 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35398 }
35399
35400 impl NotebookTaskConfig {
35401 pub fn new() -> Self {
35402 std::default::Default::default()
35403 }
35404
35405 pub fn set_notebook<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35407 self.notebook = v.into();
35408 self
35409 }
35410
35411 pub fn set_infrastructure_spec<T>(mut self, v: T) -> Self
35413 where
35414 T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35415 {
35416 self.infrastructure_spec = std::option::Option::Some(v.into());
35417 self
35418 }
35419
35420 pub fn set_or_clear_infrastructure_spec<T>(mut self, v: std::option::Option<T>) -> Self
35422 where
35423 T: std::convert::Into<crate::model::task::InfrastructureSpec>,
35424 {
35425 self.infrastructure_spec = v.map(|x| x.into());
35426 self
35427 }
35428
35429 pub fn set_file_uris<T, V>(mut self, v: T) -> Self
35431 where
35432 T: std::iter::IntoIterator<Item = V>,
35433 V: std::convert::Into<std::string::String>,
35434 {
35435 use std::iter::Iterator;
35436 self.file_uris = v.into_iter().map(|i| i.into()).collect();
35437 self
35438 }
35439
35440 pub fn set_archive_uris<T, V>(mut self, v: T) -> Self
35442 where
35443 T: std::iter::IntoIterator<Item = V>,
35444 V: std::convert::Into<std::string::String>,
35445 {
35446 use std::iter::Iterator;
35447 self.archive_uris = v.into_iter().map(|i| i.into()).collect();
35448 self
35449 }
35450 }
35451
35452 impl wkt::message::Message for NotebookTaskConfig {
35453 fn typename() -> &'static str {
35454 "type.googleapis.com/google.cloud.dataplex.v1.Task.NotebookTaskConfig"
35455 }
35456 }
35457
35458 #[derive(Clone, Default, PartialEq)]
35460 #[non_exhaustive]
35461 pub struct ExecutionStatus {
35462 pub update_time: std::option::Option<wkt::Timestamp>,
35464
35465 pub latest_job: std::option::Option<crate::model::Job>,
35467
35468 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35469 }
35470
35471 impl ExecutionStatus {
35472 pub fn new() -> Self {
35473 std::default::Default::default()
35474 }
35475
35476 pub fn set_update_time<T>(mut self, v: T) -> Self
35478 where
35479 T: std::convert::Into<wkt::Timestamp>,
35480 {
35481 self.update_time = std::option::Option::Some(v.into());
35482 self
35483 }
35484
35485 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
35487 where
35488 T: std::convert::Into<wkt::Timestamp>,
35489 {
35490 self.update_time = v.map(|x| x.into());
35491 self
35492 }
35493
35494 pub fn set_latest_job<T>(mut self, v: T) -> Self
35496 where
35497 T: std::convert::Into<crate::model::Job>,
35498 {
35499 self.latest_job = std::option::Option::Some(v.into());
35500 self
35501 }
35502
35503 pub fn set_or_clear_latest_job<T>(mut self, v: std::option::Option<T>) -> Self
35505 where
35506 T: std::convert::Into<crate::model::Job>,
35507 {
35508 self.latest_job = v.map(|x| x.into());
35509 self
35510 }
35511 }
35512
35513 impl wkt::message::Message for ExecutionStatus {
35514 fn typename() -> &'static str {
35515 "type.googleapis.com/google.cloud.dataplex.v1.Task.ExecutionStatus"
35516 }
35517 }
35518
35519 #[derive(Clone, Debug, PartialEq)]
35521 #[non_exhaustive]
35522 pub enum Config {
35523 Spark(std::boxed::Box<crate::model::task::SparkTaskConfig>),
35525 Notebook(std::boxed::Box<crate::model::task::NotebookTaskConfig>),
35527 }
35528}
35529
35530#[derive(Clone, Default, PartialEq)]
35532#[non_exhaustive]
35533pub struct Job {
35534 pub name: std::string::String,
35537
35538 pub uid: std::string::String,
35540
35541 pub start_time: std::option::Option<wkt::Timestamp>,
35543
35544 pub end_time: std::option::Option<wkt::Timestamp>,
35546
35547 pub state: crate::model::job::State,
35549
35550 pub retry_count: u32,
35553
35554 pub service: crate::model::job::Service,
35556
35557 pub service_job: std::string::String,
35560
35561 pub message: std::string::String,
35563
35564 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
35566
35567 pub trigger: crate::model::job::Trigger,
35569
35570 pub execution_spec: std::option::Option<crate::model::task::ExecutionSpec>,
35572
35573 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
35574}
35575
35576impl Job {
35577 pub fn new() -> Self {
35578 std::default::Default::default()
35579 }
35580
35581 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35583 self.name = v.into();
35584 self
35585 }
35586
35587 pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35589 self.uid = v.into();
35590 self
35591 }
35592
35593 pub fn set_start_time<T>(mut self, v: T) -> Self
35595 where
35596 T: std::convert::Into<wkt::Timestamp>,
35597 {
35598 self.start_time = std::option::Option::Some(v.into());
35599 self
35600 }
35601
35602 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
35604 where
35605 T: std::convert::Into<wkt::Timestamp>,
35606 {
35607 self.start_time = v.map(|x| x.into());
35608 self
35609 }
35610
35611 pub fn set_end_time<T>(mut self, v: T) -> Self
35613 where
35614 T: std::convert::Into<wkt::Timestamp>,
35615 {
35616 self.end_time = std::option::Option::Some(v.into());
35617 self
35618 }
35619
35620 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
35622 where
35623 T: std::convert::Into<wkt::Timestamp>,
35624 {
35625 self.end_time = v.map(|x| x.into());
35626 self
35627 }
35628
35629 pub fn set_state<T: std::convert::Into<crate::model::job::State>>(mut self, v: T) -> Self {
35631 self.state = v.into();
35632 self
35633 }
35634
35635 pub fn set_retry_count<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
35637 self.retry_count = v.into();
35638 self
35639 }
35640
35641 pub fn set_service<T: std::convert::Into<crate::model::job::Service>>(mut self, v: T) -> Self {
35643 self.service = v.into();
35644 self
35645 }
35646
35647 pub fn set_service_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35649 self.service_job = v.into();
35650 self
35651 }
35652
35653 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
35655 self.message = v.into();
35656 self
35657 }
35658
35659 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
35661 where
35662 T: std::iter::IntoIterator<Item = (K, V)>,
35663 K: std::convert::Into<std::string::String>,
35664 V: std::convert::Into<std::string::String>,
35665 {
35666 use std::iter::Iterator;
35667 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
35668 self
35669 }
35670
35671 pub fn set_trigger<T: std::convert::Into<crate::model::job::Trigger>>(mut self, v: T) -> Self {
35673 self.trigger = v.into();
35674 self
35675 }
35676
35677 pub fn set_execution_spec<T>(mut self, v: T) -> Self
35679 where
35680 T: std::convert::Into<crate::model::task::ExecutionSpec>,
35681 {
35682 self.execution_spec = std::option::Option::Some(v.into());
35683 self
35684 }
35685
35686 pub fn set_or_clear_execution_spec<T>(mut self, v: std::option::Option<T>) -> Self
35688 where
35689 T: std::convert::Into<crate::model::task::ExecutionSpec>,
35690 {
35691 self.execution_spec = v.map(|x| x.into());
35692 self
35693 }
35694}
35695
35696impl wkt::message::Message for Job {
35697 fn typename() -> &'static str {
35698 "type.googleapis.com/google.cloud.dataplex.v1.Job"
35699 }
35700}
35701
35702pub mod job {
35704 #[allow(unused_imports)]
35705 use super::*;
35706
35707 #[derive(Clone, Debug, PartialEq)]
35722 #[non_exhaustive]
35723 pub enum Service {
35724 Unspecified,
35726 Dataproc,
35728 UnknownValue(service::UnknownValue),
35733 }
35734
35735 #[doc(hidden)]
35736 pub mod service {
35737 #[allow(unused_imports)]
35738 use super::*;
35739 #[derive(Clone, Debug, PartialEq)]
35740 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
35741 }
35742
35743 impl Service {
35744 pub fn value(&self) -> std::option::Option<i32> {
35749 match self {
35750 Self::Unspecified => std::option::Option::Some(0),
35751 Self::Dataproc => std::option::Option::Some(1),
35752 Self::UnknownValue(u) => u.0.value(),
35753 }
35754 }
35755
35756 pub fn name(&self) -> std::option::Option<&str> {
35761 match self {
35762 Self::Unspecified => std::option::Option::Some("SERVICE_UNSPECIFIED"),
35763 Self::Dataproc => std::option::Option::Some("DATAPROC"),
35764 Self::UnknownValue(u) => u.0.name(),
35765 }
35766 }
35767 }
35768
35769 impl std::default::Default for Service {
35770 fn default() -> Self {
35771 use std::convert::From;
35772 Self::from(0)
35773 }
35774 }
35775
35776 impl std::fmt::Display for Service {
35777 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
35778 wkt::internal::display_enum(f, self.name(), self.value())
35779 }
35780 }
35781
35782 impl std::convert::From<i32> for Service {
35783 fn from(value: i32) -> Self {
35784 match value {
35785 0 => Self::Unspecified,
35786 1 => Self::Dataproc,
35787 _ => Self::UnknownValue(service::UnknownValue(
35788 wkt::internal::UnknownEnumValue::Integer(value),
35789 )),
35790 }
35791 }
35792 }
35793
35794 impl std::convert::From<&str> for Service {
35795 fn from(value: &str) -> Self {
35796 use std::string::ToString;
35797 match value {
35798 "SERVICE_UNSPECIFIED" => Self::Unspecified,
35799 "DATAPROC" => Self::Dataproc,
35800 _ => Self::UnknownValue(service::UnknownValue(
35801 wkt::internal::UnknownEnumValue::String(value.to_string()),
35802 )),
35803 }
35804 }
35805 }
35806
35807 impl serde::ser::Serialize for Service {
35808 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
35809 where
35810 S: serde::Serializer,
35811 {
35812 match self {
35813 Self::Unspecified => serializer.serialize_i32(0),
35814 Self::Dataproc => serializer.serialize_i32(1),
35815 Self::UnknownValue(u) => u.0.serialize(serializer),
35816 }
35817 }
35818 }
35819
35820 impl<'de> serde::de::Deserialize<'de> for Service {
35821 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
35822 where
35823 D: serde::Deserializer<'de>,
35824 {
35825 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Service>::new(
35826 ".google.cloud.dataplex.v1.Job.Service",
35827 ))
35828 }
35829 }
35830
35831 #[derive(Clone, Debug, PartialEq)]
35846 #[non_exhaustive]
35847 pub enum State {
35848 Unspecified,
35850 Running,
35852 Cancelling,
35854 Cancelled,
35856 Succeeded,
35858 Failed,
35860 Aborted,
35862 UnknownValue(state::UnknownValue),
35867 }
35868
35869 #[doc(hidden)]
35870 pub mod state {
35871 #[allow(unused_imports)]
35872 use super::*;
35873 #[derive(Clone, Debug, PartialEq)]
35874 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
35875 }
35876
35877 impl State {
35878 pub fn value(&self) -> std::option::Option<i32> {
35883 match self {
35884 Self::Unspecified => std::option::Option::Some(0),
35885 Self::Running => std::option::Option::Some(1),
35886 Self::Cancelling => std::option::Option::Some(2),
35887 Self::Cancelled => std::option::Option::Some(3),
35888 Self::Succeeded => std::option::Option::Some(4),
35889 Self::Failed => std::option::Option::Some(5),
35890 Self::Aborted => std::option::Option::Some(6),
35891 Self::UnknownValue(u) => u.0.value(),
35892 }
35893 }
35894
35895 pub fn name(&self) -> std::option::Option<&str> {
35900 match self {
35901 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
35902 Self::Running => std::option::Option::Some("RUNNING"),
35903 Self::Cancelling => std::option::Option::Some("CANCELLING"),
35904 Self::Cancelled => std::option::Option::Some("CANCELLED"),
35905 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
35906 Self::Failed => std::option::Option::Some("FAILED"),
35907 Self::Aborted => std::option::Option::Some("ABORTED"),
35908 Self::UnknownValue(u) => u.0.name(),
35909 }
35910 }
35911 }
35912
35913 impl std::default::Default for State {
35914 fn default() -> Self {
35915 use std::convert::From;
35916 Self::from(0)
35917 }
35918 }
35919
35920 impl std::fmt::Display for State {
35921 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
35922 wkt::internal::display_enum(f, self.name(), self.value())
35923 }
35924 }
35925
35926 impl std::convert::From<i32> for State {
35927 fn from(value: i32) -> Self {
35928 match value {
35929 0 => Self::Unspecified,
35930 1 => Self::Running,
35931 2 => Self::Cancelling,
35932 3 => Self::Cancelled,
35933 4 => Self::Succeeded,
35934 5 => Self::Failed,
35935 6 => Self::Aborted,
35936 _ => Self::UnknownValue(state::UnknownValue(
35937 wkt::internal::UnknownEnumValue::Integer(value),
35938 )),
35939 }
35940 }
35941 }
35942
35943 impl std::convert::From<&str> for State {
35944 fn from(value: &str) -> Self {
35945 use std::string::ToString;
35946 match value {
35947 "STATE_UNSPECIFIED" => Self::Unspecified,
35948 "RUNNING" => Self::Running,
35949 "CANCELLING" => Self::Cancelling,
35950 "CANCELLED" => Self::Cancelled,
35951 "SUCCEEDED" => Self::Succeeded,
35952 "FAILED" => Self::Failed,
35953 "ABORTED" => Self::Aborted,
35954 _ => Self::UnknownValue(state::UnknownValue(
35955 wkt::internal::UnknownEnumValue::String(value.to_string()),
35956 )),
35957 }
35958 }
35959 }
35960
35961 impl serde::ser::Serialize for State {
35962 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
35963 where
35964 S: serde::Serializer,
35965 {
35966 match self {
35967 Self::Unspecified => serializer.serialize_i32(0),
35968 Self::Running => serializer.serialize_i32(1),
35969 Self::Cancelling => serializer.serialize_i32(2),
35970 Self::Cancelled => serializer.serialize_i32(3),
35971 Self::Succeeded => serializer.serialize_i32(4),
35972 Self::Failed => serializer.serialize_i32(5),
35973 Self::Aborted => serializer.serialize_i32(6),
35974 Self::UnknownValue(u) => u.0.serialize(serializer),
35975 }
35976 }
35977 }
35978
35979 impl<'de> serde::de::Deserialize<'de> for State {
35980 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
35981 where
35982 D: serde::Deserializer<'de>,
35983 {
35984 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
35985 ".google.cloud.dataplex.v1.Job.State",
35986 ))
35987 }
35988 }
35989
35990 #[derive(Clone, Debug, PartialEq)]
36006 #[non_exhaustive]
36007 pub enum Trigger {
36008 Unspecified,
36010 TaskConfig,
36013 RunRequest,
36015 UnknownValue(trigger::UnknownValue),
36020 }
36021
36022 #[doc(hidden)]
36023 pub mod trigger {
36024 #[allow(unused_imports)]
36025 use super::*;
36026 #[derive(Clone, Debug, PartialEq)]
36027 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36028 }
36029
36030 impl Trigger {
36031 pub fn value(&self) -> std::option::Option<i32> {
36036 match self {
36037 Self::Unspecified => std::option::Option::Some(0),
36038 Self::TaskConfig => std::option::Option::Some(1),
36039 Self::RunRequest => std::option::Option::Some(2),
36040 Self::UnknownValue(u) => u.0.value(),
36041 }
36042 }
36043
36044 pub fn name(&self) -> std::option::Option<&str> {
36049 match self {
36050 Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
36051 Self::TaskConfig => std::option::Option::Some("TASK_CONFIG"),
36052 Self::RunRequest => std::option::Option::Some("RUN_REQUEST"),
36053 Self::UnknownValue(u) => u.0.name(),
36054 }
36055 }
36056 }
36057
36058 impl std::default::Default for Trigger {
36059 fn default() -> Self {
36060 use std::convert::From;
36061 Self::from(0)
36062 }
36063 }
36064
36065 impl std::fmt::Display for Trigger {
36066 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36067 wkt::internal::display_enum(f, self.name(), self.value())
36068 }
36069 }
36070
36071 impl std::convert::From<i32> for Trigger {
36072 fn from(value: i32) -> Self {
36073 match value {
36074 0 => Self::Unspecified,
36075 1 => Self::TaskConfig,
36076 2 => Self::RunRequest,
36077 _ => Self::UnknownValue(trigger::UnknownValue(
36078 wkt::internal::UnknownEnumValue::Integer(value),
36079 )),
36080 }
36081 }
36082 }
36083
36084 impl std::convert::From<&str> for Trigger {
36085 fn from(value: &str) -> Self {
36086 use std::string::ToString;
36087 match value {
36088 "TRIGGER_UNSPECIFIED" => Self::Unspecified,
36089 "TASK_CONFIG" => Self::TaskConfig,
36090 "RUN_REQUEST" => Self::RunRequest,
36091 _ => Self::UnknownValue(trigger::UnknownValue(
36092 wkt::internal::UnknownEnumValue::String(value.to_string()),
36093 )),
36094 }
36095 }
36096 }
36097
36098 impl serde::ser::Serialize for Trigger {
36099 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36100 where
36101 S: serde::Serializer,
36102 {
36103 match self {
36104 Self::Unspecified => serializer.serialize_i32(0),
36105 Self::TaskConfig => serializer.serialize_i32(1),
36106 Self::RunRequest => serializer.serialize_i32(2),
36107 Self::UnknownValue(u) => u.0.serialize(serializer),
36108 }
36109 }
36110 }
36111
36112 impl<'de> serde::de::Deserialize<'de> for Trigger {
36113 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36114 where
36115 D: serde::Deserializer<'de>,
36116 {
36117 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
36118 ".google.cloud.dataplex.v1.Job.Trigger",
36119 ))
36120 }
36121 }
36122}
36123
36124#[derive(Clone, Debug, PartialEq)]
36140#[non_exhaustive]
36141pub enum EntryView {
36142 Unspecified,
36144 Basic,
36146 Full,
36149 Custom,
36152 All,
36153 UnknownValue(entry_view::UnknownValue),
36158}
36159
36160#[doc(hidden)]
36161pub mod entry_view {
36162 #[allow(unused_imports)]
36163 use super::*;
36164 #[derive(Clone, Debug, PartialEq)]
36165 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36166}
36167
36168impl EntryView {
36169 pub fn value(&self) -> std::option::Option<i32> {
36174 match self {
36175 Self::Unspecified => std::option::Option::Some(0),
36176 Self::Basic => std::option::Option::Some(1),
36177 Self::Full => std::option::Option::Some(2),
36178 Self::Custom => std::option::Option::Some(3),
36179 Self::All => std::option::Option::Some(4),
36180 Self::UnknownValue(u) => u.0.value(),
36181 }
36182 }
36183
36184 pub fn name(&self) -> std::option::Option<&str> {
36189 match self {
36190 Self::Unspecified => std::option::Option::Some("ENTRY_VIEW_UNSPECIFIED"),
36191 Self::Basic => std::option::Option::Some("BASIC"),
36192 Self::Full => std::option::Option::Some("FULL"),
36193 Self::Custom => std::option::Option::Some("CUSTOM"),
36194 Self::All => std::option::Option::Some("ALL"),
36195 Self::UnknownValue(u) => u.0.name(),
36196 }
36197 }
36198}
36199
36200impl std::default::Default for EntryView {
36201 fn default() -> Self {
36202 use std::convert::From;
36203 Self::from(0)
36204 }
36205}
36206
36207impl std::fmt::Display for EntryView {
36208 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36209 wkt::internal::display_enum(f, self.name(), self.value())
36210 }
36211}
36212
36213impl std::convert::From<i32> for EntryView {
36214 fn from(value: i32) -> Self {
36215 match value {
36216 0 => Self::Unspecified,
36217 1 => Self::Basic,
36218 2 => Self::Full,
36219 3 => Self::Custom,
36220 4 => Self::All,
36221 _ => Self::UnknownValue(entry_view::UnknownValue(
36222 wkt::internal::UnknownEnumValue::Integer(value),
36223 )),
36224 }
36225 }
36226}
36227
36228impl std::convert::From<&str> for EntryView {
36229 fn from(value: &str) -> Self {
36230 use std::string::ToString;
36231 match value {
36232 "ENTRY_VIEW_UNSPECIFIED" => Self::Unspecified,
36233 "BASIC" => Self::Basic,
36234 "FULL" => Self::Full,
36235 "CUSTOM" => Self::Custom,
36236 "ALL" => Self::All,
36237 _ => Self::UnknownValue(entry_view::UnknownValue(
36238 wkt::internal::UnknownEnumValue::String(value.to_string()),
36239 )),
36240 }
36241 }
36242}
36243
36244impl serde::ser::Serialize for EntryView {
36245 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36246 where
36247 S: serde::Serializer,
36248 {
36249 match self {
36250 Self::Unspecified => serializer.serialize_i32(0),
36251 Self::Basic => serializer.serialize_i32(1),
36252 Self::Full => serializer.serialize_i32(2),
36253 Self::Custom => serializer.serialize_i32(3),
36254 Self::All => serializer.serialize_i32(4),
36255 Self::UnknownValue(u) => u.0.serialize(serializer),
36256 }
36257 }
36258}
36259
36260impl<'de> serde::de::Deserialize<'de> for EntryView {
36261 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36262 where
36263 D: serde::Deserializer<'de>,
36264 {
36265 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntryView>::new(
36266 ".google.cloud.dataplex.v1.EntryView",
36267 ))
36268 }
36269}
36270
36271#[derive(Clone, Debug, PartialEq)]
36288#[non_exhaustive]
36289pub enum TransferStatus {
36290 Unspecified,
36293 Migrated,
36297 Transferred,
36300 UnknownValue(transfer_status::UnknownValue),
36305}
36306
36307#[doc(hidden)]
36308pub mod transfer_status {
36309 #[allow(unused_imports)]
36310 use super::*;
36311 #[derive(Clone, Debug, PartialEq)]
36312 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36313}
36314
36315impl TransferStatus {
36316 pub fn value(&self) -> std::option::Option<i32> {
36321 match self {
36322 Self::Unspecified => std::option::Option::Some(0),
36323 Self::Migrated => std::option::Option::Some(1),
36324 Self::Transferred => std::option::Option::Some(2),
36325 Self::UnknownValue(u) => u.0.value(),
36326 }
36327 }
36328
36329 pub fn name(&self) -> std::option::Option<&str> {
36334 match self {
36335 Self::Unspecified => std::option::Option::Some("TRANSFER_STATUS_UNSPECIFIED"),
36336 Self::Migrated => std::option::Option::Some("TRANSFER_STATUS_MIGRATED"),
36337 Self::Transferred => std::option::Option::Some("TRANSFER_STATUS_TRANSFERRED"),
36338 Self::UnknownValue(u) => u.0.name(),
36339 }
36340 }
36341}
36342
36343impl std::default::Default for TransferStatus {
36344 fn default() -> Self {
36345 use std::convert::From;
36346 Self::from(0)
36347 }
36348}
36349
36350impl std::fmt::Display for TransferStatus {
36351 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36352 wkt::internal::display_enum(f, self.name(), self.value())
36353 }
36354}
36355
36356impl std::convert::From<i32> for TransferStatus {
36357 fn from(value: i32) -> Self {
36358 match value {
36359 0 => Self::Unspecified,
36360 1 => Self::Migrated,
36361 2 => Self::Transferred,
36362 _ => Self::UnknownValue(transfer_status::UnknownValue(
36363 wkt::internal::UnknownEnumValue::Integer(value),
36364 )),
36365 }
36366 }
36367}
36368
36369impl std::convert::From<&str> for TransferStatus {
36370 fn from(value: &str) -> Self {
36371 use std::string::ToString;
36372 match value {
36373 "TRANSFER_STATUS_UNSPECIFIED" => Self::Unspecified,
36374 "TRANSFER_STATUS_MIGRATED" => Self::Migrated,
36375 "TRANSFER_STATUS_TRANSFERRED" => Self::Transferred,
36376 _ => Self::UnknownValue(transfer_status::UnknownValue(
36377 wkt::internal::UnknownEnumValue::String(value.to_string()),
36378 )),
36379 }
36380 }
36381}
36382
36383impl serde::ser::Serialize for TransferStatus {
36384 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36385 where
36386 S: serde::Serializer,
36387 {
36388 match self {
36389 Self::Unspecified => serializer.serialize_i32(0),
36390 Self::Migrated => serializer.serialize_i32(1),
36391 Self::Transferred => serializer.serialize_i32(2),
36392 Self::UnknownValue(u) => u.0.serialize(serializer),
36393 }
36394 }
36395}
36396
36397impl<'de> serde::de::Deserialize<'de> for TransferStatus {
36398 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36399 where
36400 D: serde::Deserializer<'de>,
36401 {
36402 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TransferStatus>::new(
36403 ".google.cloud.dataplex.v1.TransferStatus",
36404 ))
36405 }
36406}
36407
36408#[derive(Clone, Debug, PartialEq)]
36424#[non_exhaustive]
36425pub enum DataScanType {
36426 Unspecified,
36428 DataQuality,
36430 DataProfile,
36432 DataDiscovery,
36434 DataDocumentation,
36436 UnknownValue(data_scan_type::UnknownValue),
36441}
36442
36443#[doc(hidden)]
36444pub mod data_scan_type {
36445 #[allow(unused_imports)]
36446 use super::*;
36447 #[derive(Clone, Debug, PartialEq)]
36448 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36449}
36450
36451impl DataScanType {
36452 pub fn value(&self) -> std::option::Option<i32> {
36457 match self {
36458 Self::Unspecified => std::option::Option::Some(0),
36459 Self::DataQuality => std::option::Option::Some(1),
36460 Self::DataProfile => std::option::Option::Some(2),
36461 Self::DataDiscovery => std::option::Option::Some(3),
36462 Self::DataDocumentation => std::option::Option::Some(4),
36463 Self::UnknownValue(u) => u.0.value(),
36464 }
36465 }
36466
36467 pub fn name(&self) -> std::option::Option<&str> {
36472 match self {
36473 Self::Unspecified => std::option::Option::Some("DATA_SCAN_TYPE_UNSPECIFIED"),
36474 Self::DataQuality => std::option::Option::Some("DATA_QUALITY"),
36475 Self::DataProfile => std::option::Option::Some("DATA_PROFILE"),
36476 Self::DataDiscovery => std::option::Option::Some("DATA_DISCOVERY"),
36477 Self::DataDocumentation => std::option::Option::Some("DATA_DOCUMENTATION"),
36478 Self::UnknownValue(u) => u.0.name(),
36479 }
36480 }
36481}
36482
36483impl std::default::Default for DataScanType {
36484 fn default() -> Self {
36485 use std::convert::From;
36486 Self::from(0)
36487 }
36488}
36489
36490impl std::fmt::Display for DataScanType {
36491 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36492 wkt::internal::display_enum(f, self.name(), self.value())
36493 }
36494}
36495
36496impl std::convert::From<i32> for DataScanType {
36497 fn from(value: i32) -> Self {
36498 match value {
36499 0 => Self::Unspecified,
36500 1 => Self::DataQuality,
36501 2 => Self::DataProfile,
36502 3 => Self::DataDiscovery,
36503 4 => Self::DataDocumentation,
36504 _ => Self::UnknownValue(data_scan_type::UnknownValue(
36505 wkt::internal::UnknownEnumValue::Integer(value),
36506 )),
36507 }
36508 }
36509}
36510
36511impl std::convert::From<&str> for DataScanType {
36512 fn from(value: &str) -> Self {
36513 use std::string::ToString;
36514 match value {
36515 "DATA_SCAN_TYPE_UNSPECIFIED" => Self::Unspecified,
36516 "DATA_QUALITY" => Self::DataQuality,
36517 "DATA_PROFILE" => Self::DataProfile,
36518 "DATA_DISCOVERY" => Self::DataDiscovery,
36519 "DATA_DOCUMENTATION" => Self::DataDocumentation,
36520 _ => Self::UnknownValue(data_scan_type::UnknownValue(
36521 wkt::internal::UnknownEnumValue::String(value.to_string()),
36522 )),
36523 }
36524 }
36525}
36526
36527impl serde::ser::Serialize for DataScanType {
36528 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36529 where
36530 S: serde::Serializer,
36531 {
36532 match self {
36533 Self::Unspecified => serializer.serialize_i32(0),
36534 Self::DataQuality => serializer.serialize_i32(1),
36535 Self::DataProfile => serializer.serialize_i32(2),
36536 Self::DataDiscovery => serializer.serialize_i32(3),
36537 Self::DataDocumentation => serializer.serialize_i32(4),
36538 Self::UnknownValue(u) => u.0.serialize(serializer),
36539 }
36540 }
36541}
36542
36543impl<'de> serde::de::Deserialize<'de> for DataScanType {
36544 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36545 where
36546 D: serde::Deserializer<'de>,
36547 {
36548 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DataScanType>::new(
36549 ".google.cloud.dataplex.v1.DataScanType",
36550 ))
36551 }
36552}
36553
36554#[derive(Clone, Debug, PartialEq)]
36570#[non_exhaustive]
36571pub enum StorageSystem {
36572 Unspecified,
36574 CloudStorage,
36576 Bigquery,
36578 UnknownValue(storage_system::UnknownValue),
36583}
36584
36585#[doc(hidden)]
36586pub mod storage_system {
36587 #[allow(unused_imports)]
36588 use super::*;
36589 #[derive(Clone, Debug, PartialEq)]
36590 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36591}
36592
36593impl StorageSystem {
36594 pub fn value(&self) -> std::option::Option<i32> {
36599 match self {
36600 Self::Unspecified => std::option::Option::Some(0),
36601 Self::CloudStorage => std::option::Option::Some(1),
36602 Self::Bigquery => std::option::Option::Some(2),
36603 Self::UnknownValue(u) => u.0.value(),
36604 }
36605 }
36606
36607 pub fn name(&self) -> std::option::Option<&str> {
36612 match self {
36613 Self::Unspecified => std::option::Option::Some("STORAGE_SYSTEM_UNSPECIFIED"),
36614 Self::CloudStorage => std::option::Option::Some("CLOUD_STORAGE"),
36615 Self::Bigquery => std::option::Option::Some("BIGQUERY"),
36616 Self::UnknownValue(u) => u.0.name(),
36617 }
36618 }
36619}
36620
36621impl std::default::Default for StorageSystem {
36622 fn default() -> Self {
36623 use std::convert::From;
36624 Self::from(0)
36625 }
36626}
36627
36628impl std::fmt::Display for StorageSystem {
36629 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36630 wkt::internal::display_enum(f, self.name(), self.value())
36631 }
36632}
36633
36634impl std::convert::From<i32> for StorageSystem {
36635 fn from(value: i32) -> Self {
36636 match value {
36637 0 => Self::Unspecified,
36638 1 => Self::CloudStorage,
36639 2 => Self::Bigquery,
36640 _ => Self::UnknownValue(storage_system::UnknownValue(
36641 wkt::internal::UnknownEnumValue::Integer(value),
36642 )),
36643 }
36644 }
36645}
36646
36647impl std::convert::From<&str> for StorageSystem {
36648 fn from(value: &str) -> Self {
36649 use std::string::ToString;
36650 match value {
36651 "STORAGE_SYSTEM_UNSPECIFIED" => Self::Unspecified,
36652 "CLOUD_STORAGE" => Self::CloudStorage,
36653 "BIGQUERY" => Self::Bigquery,
36654 _ => Self::UnknownValue(storage_system::UnknownValue(
36655 wkt::internal::UnknownEnumValue::String(value.to_string()),
36656 )),
36657 }
36658 }
36659}
36660
36661impl serde::ser::Serialize for StorageSystem {
36662 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36663 where
36664 S: serde::Serializer,
36665 {
36666 match self {
36667 Self::Unspecified => serializer.serialize_i32(0),
36668 Self::CloudStorage => serializer.serialize_i32(1),
36669 Self::Bigquery => serializer.serialize_i32(2),
36670 Self::UnknownValue(u) => u.0.serialize(serializer),
36671 }
36672 }
36673}
36674
36675impl<'de> serde::de::Deserialize<'de> for StorageSystem {
36676 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36677 where
36678 D: serde::Deserializer<'de>,
36679 {
36680 deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageSystem>::new(
36681 ".google.cloud.dataplex.v1.StorageSystem",
36682 ))
36683 }
36684}
36685
36686#[derive(Clone, Debug, PartialEq)]
36702#[non_exhaustive]
36703pub enum State {
36704 Unspecified,
36706 Active,
36708 Creating,
36710 Deleting,
36712 ActionRequired,
36714 UnknownValue(state::UnknownValue),
36719}
36720
36721#[doc(hidden)]
36722pub mod state {
36723 #[allow(unused_imports)]
36724 use super::*;
36725 #[derive(Clone, Debug, PartialEq)]
36726 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
36727}
36728
36729impl State {
36730 pub fn value(&self) -> std::option::Option<i32> {
36735 match self {
36736 Self::Unspecified => std::option::Option::Some(0),
36737 Self::Active => std::option::Option::Some(1),
36738 Self::Creating => std::option::Option::Some(2),
36739 Self::Deleting => std::option::Option::Some(3),
36740 Self::ActionRequired => std::option::Option::Some(4),
36741 Self::UnknownValue(u) => u.0.value(),
36742 }
36743 }
36744
36745 pub fn name(&self) -> std::option::Option<&str> {
36750 match self {
36751 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
36752 Self::Active => std::option::Option::Some("ACTIVE"),
36753 Self::Creating => std::option::Option::Some("CREATING"),
36754 Self::Deleting => std::option::Option::Some("DELETING"),
36755 Self::ActionRequired => std::option::Option::Some("ACTION_REQUIRED"),
36756 Self::UnknownValue(u) => u.0.name(),
36757 }
36758 }
36759}
36760
36761impl std::default::Default for State {
36762 fn default() -> Self {
36763 use std::convert::From;
36764 Self::from(0)
36765 }
36766}
36767
36768impl std::fmt::Display for State {
36769 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
36770 wkt::internal::display_enum(f, self.name(), self.value())
36771 }
36772}
36773
36774impl std::convert::From<i32> for State {
36775 fn from(value: i32) -> Self {
36776 match value {
36777 0 => Self::Unspecified,
36778 1 => Self::Active,
36779 2 => Self::Creating,
36780 3 => Self::Deleting,
36781 4 => Self::ActionRequired,
36782 _ => Self::UnknownValue(state::UnknownValue(
36783 wkt::internal::UnknownEnumValue::Integer(value),
36784 )),
36785 }
36786 }
36787}
36788
36789impl std::convert::From<&str> for State {
36790 fn from(value: &str) -> Self {
36791 use std::string::ToString;
36792 match value {
36793 "STATE_UNSPECIFIED" => Self::Unspecified,
36794 "ACTIVE" => Self::Active,
36795 "CREATING" => Self::Creating,
36796 "DELETING" => Self::Deleting,
36797 "ACTION_REQUIRED" => Self::ActionRequired,
36798 _ => Self::UnknownValue(state::UnknownValue(
36799 wkt::internal::UnknownEnumValue::String(value.to_string()),
36800 )),
36801 }
36802 }
36803}
36804
36805impl serde::ser::Serialize for State {
36806 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
36807 where
36808 S: serde::Serializer,
36809 {
36810 match self {
36811 Self::Unspecified => serializer.serialize_i32(0),
36812 Self::Active => serializer.serialize_i32(1),
36813 Self::Creating => serializer.serialize_i32(2),
36814 Self::Deleting => serializer.serialize_i32(3),
36815 Self::ActionRequired => serializer.serialize_i32(4),
36816 Self::UnknownValue(u) => u.0.serialize(serializer),
36817 }
36818 }
36819}
36820
36821impl<'de> serde::de::Deserialize<'de> for State {
36822 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
36823 where
36824 D: serde::Deserializer<'de>,
36825 {
36826 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
36827 ".google.cloud.dataplex.v1.State",
36828 ))
36829 }
36830}