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 lazy_static;
25extern crate location;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36mod debug;
37mod deserialize;
38mod serialize;
39
40#[derive(Clone, Default, PartialEq)]
42#[non_exhaustive]
43pub struct DiscoverConnectionProfileRequest {
44 pub parent: std::string::String,
47
48 pub target: std::option::Option<crate::model::discover_connection_profile_request::Target>,
50
51 pub hierarchy:
53 std::option::Option<crate::model::discover_connection_profile_request::Hierarchy>,
54
55 pub data_object:
57 std::option::Option<crate::model::discover_connection_profile_request::DataObject>,
58
59 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
60}
61
62impl DiscoverConnectionProfileRequest {
63 pub fn new() -> Self {
64 std::default::Default::default()
65 }
66
67 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
69 self.parent = v.into();
70 self
71 }
72
73 pub fn set_target<
78 T: std::convert::Into<
79 std::option::Option<crate::model::discover_connection_profile_request::Target>,
80 >,
81 >(
82 mut self,
83 v: T,
84 ) -> Self {
85 self.target = v.into();
86 self
87 }
88
89 pub fn connection_profile(
93 &self,
94 ) -> std::option::Option<&std::boxed::Box<crate::model::ConnectionProfile>> {
95 #[allow(unreachable_patterns)]
96 self.target.as_ref().and_then(|v| match v {
97 crate::model::discover_connection_profile_request::Target::ConnectionProfile(v) => {
98 std::option::Option::Some(v)
99 }
100 _ => std::option::Option::None,
101 })
102 }
103
104 pub fn set_connection_profile<
110 T: std::convert::Into<std::boxed::Box<crate::model::ConnectionProfile>>,
111 >(
112 mut self,
113 v: T,
114 ) -> Self {
115 self.target = std::option::Option::Some(
116 crate::model::discover_connection_profile_request::Target::ConnectionProfile(v.into()),
117 );
118 self
119 }
120
121 pub fn connection_profile_name(&self) -> std::option::Option<&std::string::String> {
125 #[allow(unreachable_patterns)]
126 self.target.as_ref().and_then(|v| match v {
127 crate::model::discover_connection_profile_request::Target::ConnectionProfileName(v) => {
128 std::option::Option::Some(v)
129 }
130 _ => std::option::Option::None,
131 })
132 }
133
134 pub fn set_connection_profile_name<T: std::convert::Into<std::string::String>>(
140 mut self,
141 v: T,
142 ) -> Self {
143 self.target = std::option::Option::Some(
144 crate::model::discover_connection_profile_request::Target::ConnectionProfileName(
145 v.into(),
146 ),
147 );
148 self
149 }
150
151 pub fn set_hierarchy<
156 T: std::convert::Into<
157 std::option::Option<crate::model::discover_connection_profile_request::Hierarchy>,
158 >,
159 >(
160 mut self,
161 v: T,
162 ) -> Self {
163 self.hierarchy = v.into();
164 self
165 }
166
167 pub fn full_hierarchy(&self) -> std::option::Option<&bool> {
171 #[allow(unreachable_patterns)]
172 self.hierarchy.as_ref().and_then(|v| match v {
173 crate::model::discover_connection_profile_request::Hierarchy::FullHierarchy(v) => {
174 std::option::Option::Some(v)
175 }
176 _ => std::option::Option::None,
177 })
178 }
179
180 pub fn set_full_hierarchy<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
186 self.hierarchy = std::option::Option::Some(
187 crate::model::discover_connection_profile_request::Hierarchy::FullHierarchy(v.into()),
188 );
189 self
190 }
191
192 pub fn hierarchy_depth(&self) -> std::option::Option<&i32> {
196 #[allow(unreachable_patterns)]
197 self.hierarchy.as_ref().and_then(|v| match v {
198 crate::model::discover_connection_profile_request::Hierarchy::HierarchyDepth(v) => {
199 std::option::Option::Some(v)
200 }
201 _ => std::option::Option::None,
202 })
203 }
204
205 pub fn set_hierarchy_depth<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
211 self.hierarchy = std::option::Option::Some(
212 crate::model::discover_connection_profile_request::Hierarchy::HierarchyDepth(v.into()),
213 );
214 self
215 }
216
217 pub fn set_data_object<
222 T: std::convert::Into<
223 std::option::Option<crate::model::discover_connection_profile_request::DataObject>,
224 >,
225 >(
226 mut self,
227 v: T,
228 ) -> Self {
229 self.data_object = v.into();
230 self
231 }
232
233 pub fn oracle_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::OracleRdbms>> {
237 #[allow(unreachable_patterns)]
238 self.data_object.as_ref().and_then(|v| match v {
239 crate::model::discover_connection_profile_request::DataObject::OracleRdbms(v) => {
240 std::option::Option::Some(v)
241 }
242 _ => std::option::Option::None,
243 })
244 }
245
246 pub fn set_oracle_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::OracleRdbms>>>(
252 mut self,
253 v: T,
254 ) -> Self {
255 self.data_object = std::option::Option::Some(
256 crate::model::discover_connection_profile_request::DataObject::OracleRdbms(v.into()),
257 );
258 self
259 }
260
261 pub fn mysql_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::MysqlRdbms>> {
265 #[allow(unreachable_patterns)]
266 self.data_object.as_ref().and_then(|v| match v {
267 crate::model::discover_connection_profile_request::DataObject::MysqlRdbms(v) => {
268 std::option::Option::Some(v)
269 }
270 _ => std::option::Option::None,
271 })
272 }
273
274 pub fn set_mysql_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::MysqlRdbms>>>(
280 mut self,
281 v: T,
282 ) -> Self {
283 self.data_object = std::option::Option::Some(
284 crate::model::discover_connection_profile_request::DataObject::MysqlRdbms(v.into()),
285 );
286 self
287 }
288
289 pub fn postgresql_rdbms(
293 &self,
294 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlRdbms>> {
295 #[allow(unreachable_patterns)]
296 self.data_object.as_ref().and_then(|v| match v {
297 crate::model::discover_connection_profile_request::DataObject::PostgresqlRdbms(v) => {
298 std::option::Option::Some(v)
299 }
300 _ => std::option::Option::None,
301 })
302 }
303
304 pub fn set_postgresql_rdbms<
310 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlRdbms>>,
311 >(
312 mut self,
313 v: T,
314 ) -> Self {
315 self.data_object = std::option::Option::Some(
316 crate::model::discover_connection_profile_request::DataObject::PostgresqlRdbms(
317 v.into(),
318 ),
319 );
320 self
321 }
322
323 pub fn sql_server_rdbms(
327 &self,
328 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerRdbms>> {
329 #[allow(unreachable_patterns)]
330 self.data_object.as_ref().and_then(|v| match v {
331 crate::model::discover_connection_profile_request::DataObject::SqlServerRdbms(v) => {
332 std::option::Option::Some(v)
333 }
334 _ => std::option::Option::None,
335 })
336 }
337
338 pub fn set_sql_server_rdbms<
344 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerRdbms>>,
345 >(
346 mut self,
347 v: T,
348 ) -> Self {
349 self.data_object = std::option::Option::Some(
350 crate::model::discover_connection_profile_request::DataObject::SqlServerRdbms(v.into()),
351 );
352 self
353 }
354
355 pub fn salesforce_org(
359 &self,
360 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceOrg>> {
361 #[allow(unreachable_patterns)]
362 self.data_object.as_ref().and_then(|v| match v {
363 crate::model::discover_connection_profile_request::DataObject::SalesforceOrg(v) => {
364 std::option::Option::Some(v)
365 }
366 _ => std::option::Option::None,
367 })
368 }
369
370 pub fn set_salesforce_org<
376 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceOrg>>,
377 >(
378 mut self,
379 v: T,
380 ) -> Self {
381 self.data_object = std::option::Option::Some(
382 crate::model::discover_connection_profile_request::DataObject::SalesforceOrg(v.into()),
383 );
384 self
385 }
386
387 pub fn mongodb_cluster(
391 &self,
392 ) -> std::option::Option<&std::boxed::Box<crate::model::MongodbCluster>> {
393 #[allow(unreachable_patterns)]
394 self.data_object.as_ref().and_then(|v| match v {
395 crate::model::discover_connection_profile_request::DataObject::MongodbCluster(v) => {
396 std::option::Option::Some(v)
397 }
398 _ => std::option::Option::None,
399 })
400 }
401
402 pub fn set_mongodb_cluster<
408 T: std::convert::Into<std::boxed::Box<crate::model::MongodbCluster>>,
409 >(
410 mut self,
411 v: T,
412 ) -> Self {
413 self.data_object = std::option::Option::Some(
414 crate::model::discover_connection_profile_request::DataObject::MongodbCluster(v.into()),
415 );
416 self
417 }
418}
419
420impl wkt::message::Message for DiscoverConnectionProfileRequest {
421 fn typename() -> &'static str {
422 "type.googleapis.com/google.cloud.datastream.v1.DiscoverConnectionProfileRequest"
423 }
424}
425
426pub mod discover_connection_profile_request {
428 #[allow(unused_imports)]
429 use super::*;
430
431 #[derive(Clone, Debug, PartialEq)]
433 #[non_exhaustive]
434 pub enum Target {
435 ConnectionProfile(std::boxed::Box<crate::model::ConnectionProfile>),
437 ConnectionProfileName(std::string::String),
439 }
440
441 #[derive(Clone, Debug, PartialEq)]
443 #[non_exhaustive]
444 pub enum Hierarchy {
445 FullHierarchy(bool),
448 HierarchyDepth(i32),
450 }
451
452 #[derive(Clone, Debug, PartialEq)]
454 #[non_exhaustive]
455 pub enum DataObject {
456 OracleRdbms(std::boxed::Box<crate::model::OracleRdbms>),
458 MysqlRdbms(std::boxed::Box<crate::model::MysqlRdbms>),
460 PostgresqlRdbms(std::boxed::Box<crate::model::PostgresqlRdbms>),
462 SqlServerRdbms(std::boxed::Box<crate::model::SqlServerRdbms>),
464 SalesforceOrg(std::boxed::Box<crate::model::SalesforceOrg>),
466 MongodbCluster(std::boxed::Box<crate::model::MongodbCluster>),
468 }
469}
470
471#[derive(Clone, Default, PartialEq)]
473#[non_exhaustive]
474pub struct DiscoverConnectionProfileResponse {
475 pub data_object:
477 std::option::Option<crate::model::discover_connection_profile_response::DataObject>,
478
479 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
480}
481
482impl DiscoverConnectionProfileResponse {
483 pub fn new() -> Self {
484 std::default::Default::default()
485 }
486
487 pub fn set_data_object<
492 T: std::convert::Into<
493 std::option::Option<crate::model::discover_connection_profile_response::DataObject>,
494 >,
495 >(
496 mut self,
497 v: T,
498 ) -> Self {
499 self.data_object = v.into();
500 self
501 }
502
503 pub fn oracle_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::OracleRdbms>> {
507 #[allow(unreachable_patterns)]
508 self.data_object.as_ref().and_then(|v| match v {
509 crate::model::discover_connection_profile_response::DataObject::OracleRdbms(v) => {
510 std::option::Option::Some(v)
511 }
512 _ => std::option::Option::None,
513 })
514 }
515
516 pub fn set_oracle_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::OracleRdbms>>>(
522 mut self,
523 v: T,
524 ) -> Self {
525 self.data_object = std::option::Option::Some(
526 crate::model::discover_connection_profile_response::DataObject::OracleRdbms(v.into()),
527 );
528 self
529 }
530
531 pub fn mysql_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::MysqlRdbms>> {
535 #[allow(unreachable_patterns)]
536 self.data_object.as_ref().and_then(|v| match v {
537 crate::model::discover_connection_profile_response::DataObject::MysqlRdbms(v) => {
538 std::option::Option::Some(v)
539 }
540 _ => std::option::Option::None,
541 })
542 }
543
544 pub fn set_mysql_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::MysqlRdbms>>>(
550 mut self,
551 v: T,
552 ) -> Self {
553 self.data_object = std::option::Option::Some(
554 crate::model::discover_connection_profile_response::DataObject::MysqlRdbms(v.into()),
555 );
556 self
557 }
558
559 pub fn postgresql_rdbms(
563 &self,
564 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlRdbms>> {
565 #[allow(unreachable_patterns)]
566 self.data_object.as_ref().and_then(|v| match v {
567 crate::model::discover_connection_profile_response::DataObject::PostgresqlRdbms(v) => {
568 std::option::Option::Some(v)
569 }
570 _ => std::option::Option::None,
571 })
572 }
573
574 pub fn set_postgresql_rdbms<
580 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlRdbms>>,
581 >(
582 mut self,
583 v: T,
584 ) -> Self {
585 self.data_object = std::option::Option::Some(
586 crate::model::discover_connection_profile_response::DataObject::PostgresqlRdbms(
587 v.into(),
588 ),
589 );
590 self
591 }
592
593 pub fn sql_server_rdbms(
597 &self,
598 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerRdbms>> {
599 #[allow(unreachable_patterns)]
600 self.data_object.as_ref().and_then(|v| match v {
601 crate::model::discover_connection_profile_response::DataObject::SqlServerRdbms(v) => {
602 std::option::Option::Some(v)
603 }
604 _ => std::option::Option::None,
605 })
606 }
607
608 pub fn set_sql_server_rdbms<
614 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerRdbms>>,
615 >(
616 mut self,
617 v: T,
618 ) -> Self {
619 self.data_object = std::option::Option::Some(
620 crate::model::discover_connection_profile_response::DataObject::SqlServerRdbms(
621 v.into(),
622 ),
623 );
624 self
625 }
626
627 pub fn salesforce_org(
631 &self,
632 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceOrg>> {
633 #[allow(unreachable_patterns)]
634 self.data_object.as_ref().and_then(|v| match v {
635 crate::model::discover_connection_profile_response::DataObject::SalesforceOrg(v) => {
636 std::option::Option::Some(v)
637 }
638 _ => std::option::Option::None,
639 })
640 }
641
642 pub fn set_salesforce_org<
648 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceOrg>>,
649 >(
650 mut self,
651 v: T,
652 ) -> Self {
653 self.data_object = std::option::Option::Some(
654 crate::model::discover_connection_profile_response::DataObject::SalesforceOrg(v.into()),
655 );
656 self
657 }
658
659 pub fn mongodb_cluster(
663 &self,
664 ) -> std::option::Option<&std::boxed::Box<crate::model::MongodbCluster>> {
665 #[allow(unreachable_patterns)]
666 self.data_object.as_ref().and_then(|v| match v {
667 crate::model::discover_connection_profile_response::DataObject::MongodbCluster(v) => {
668 std::option::Option::Some(v)
669 }
670 _ => std::option::Option::None,
671 })
672 }
673
674 pub fn set_mongodb_cluster<
680 T: std::convert::Into<std::boxed::Box<crate::model::MongodbCluster>>,
681 >(
682 mut self,
683 v: T,
684 ) -> Self {
685 self.data_object = std::option::Option::Some(
686 crate::model::discover_connection_profile_response::DataObject::MongodbCluster(
687 v.into(),
688 ),
689 );
690 self
691 }
692}
693
694impl wkt::message::Message for DiscoverConnectionProfileResponse {
695 fn typename() -> &'static str {
696 "type.googleapis.com/google.cloud.datastream.v1.DiscoverConnectionProfileResponse"
697 }
698}
699
700pub mod discover_connection_profile_response {
702 #[allow(unused_imports)]
703 use super::*;
704
705 #[derive(Clone, Debug, PartialEq)]
707 #[non_exhaustive]
708 pub enum DataObject {
709 OracleRdbms(std::boxed::Box<crate::model::OracleRdbms>),
711 MysqlRdbms(std::boxed::Box<crate::model::MysqlRdbms>),
713 PostgresqlRdbms(std::boxed::Box<crate::model::PostgresqlRdbms>),
715 SqlServerRdbms(std::boxed::Box<crate::model::SqlServerRdbms>),
717 SalesforceOrg(std::boxed::Box<crate::model::SalesforceOrg>),
719 MongodbCluster(std::boxed::Box<crate::model::MongodbCluster>),
721 }
722}
723
724#[derive(Clone, Default, PartialEq)]
726#[non_exhaustive]
727pub struct FetchStaticIpsRequest {
728 pub name: std::string::String,
731
732 pub page_size: i32,
734
735 pub page_token: std::string::String,
738
739 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
740}
741
742impl FetchStaticIpsRequest {
743 pub fn new() -> Self {
744 std::default::Default::default()
745 }
746
747 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
749 self.name = v.into();
750 self
751 }
752
753 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
755 self.page_size = v.into();
756 self
757 }
758
759 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
761 self.page_token = v.into();
762 self
763 }
764}
765
766impl wkt::message::Message for FetchStaticIpsRequest {
767 fn typename() -> &'static str {
768 "type.googleapis.com/google.cloud.datastream.v1.FetchStaticIpsRequest"
769 }
770}
771
772#[derive(Clone, Default, PartialEq)]
774#[non_exhaustive]
775pub struct FetchStaticIpsResponse {
776 pub static_ips: std::vec::Vec<std::string::String>,
778
779 pub next_page_token: std::string::String,
782
783 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
784}
785
786impl FetchStaticIpsResponse {
787 pub fn new() -> Self {
788 std::default::Default::default()
789 }
790
791 pub fn set_static_ips<T, V>(mut self, v: T) -> Self
793 where
794 T: std::iter::IntoIterator<Item = V>,
795 V: std::convert::Into<std::string::String>,
796 {
797 use std::iter::Iterator;
798 self.static_ips = v.into_iter().map(|i| i.into()).collect();
799 self
800 }
801
802 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
804 self.next_page_token = v.into();
805 self
806 }
807}
808
809impl wkt::message::Message for FetchStaticIpsResponse {
810 fn typename() -> &'static str {
811 "type.googleapis.com/google.cloud.datastream.v1.FetchStaticIpsResponse"
812 }
813}
814
815#[derive(Clone, Default, PartialEq)]
817#[non_exhaustive]
818pub struct ListConnectionProfilesRequest {
819 pub parent: std::string::String,
821
822 pub page_size: i32,
826
827 pub page_token: std::string::String,
833
834 pub filter: std::string::String,
836
837 pub order_by: std::string::String,
839
840 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
841}
842
843impl ListConnectionProfilesRequest {
844 pub fn new() -> Self {
845 std::default::Default::default()
846 }
847
848 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
850 self.parent = v.into();
851 self
852 }
853
854 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
856 self.page_size = v.into();
857 self
858 }
859
860 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
862 self.page_token = v.into();
863 self
864 }
865
866 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
868 self.filter = v.into();
869 self
870 }
871
872 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
874 self.order_by = v.into();
875 self
876 }
877}
878
879impl wkt::message::Message for ListConnectionProfilesRequest {
880 fn typename() -> &'static str {
881 "type.googleapis.com/google.cloud.datastream.v1.ListConnectionProfilesRequest"
882 }
883}
884
885#[derive(Clone, Default, PartialEq)]
887#[non_exhaustive]
888pub struct ListConnectionProfilesResponse {
889 pub connection_profiles: std::vec::Vec<crate::model::ConnectionProfile>,
891
892 pub next_page_token: std::string::String,
895
896 pub unreachable: std::vec::Vec<std::string::String>,
898
899 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
900}
901
902impl ListConnectionProfilesResponse {
903 pub fn new() -> Self {
904 std::default::Default::default()
905 }
906
907 pub fn set_connection_profiles<T, V>(mut self, v: T) -> Self
909 where
910 T: std::iter::IntoIterator<Item = V>,
911 V: std::convert::Into<crate::model::ConnectionProfile>,
912 {
913 use std::iter::Iterator;
914 self.connection_profiles = v.into_iter().map(|i| i.into()).collect();
915 self
916 }
917
918 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
920 self.next_page_token = v.into();
921 self
922 }
923
924 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
926 where
927 T: std::iter::IntoIterator<Item = V>,
928 V: std::convert::Into<std::string::String>,
929 {
930 use std::iter::Iterator;
931 self.unreachable = v.into_iter().map(|i| i.into()).collect();
932 self
933 }
934}
935
936impl wkt::message::Message for ListConnectionProfilesResponse {
937 fn typename() -> &'static str {
938 "type.googleapis.com/google.cloud.datastream.v1.ListConnectionProfilesResponse"
939 }
940}
941
942#[doc(hidden)]
943impl gax::paginator::internal::PageableResponse for ListConnectionProfilesResponse {
944 type PageItem = crate::model::ConnectionProfile;
945
946 fn items(self) -> std::vec::Vec<Self::PageItem> {
947 self.connection_profiles
948 }
949
950 fn next_page_token(&self) -> std::string::String {
951 use std::clone::Clone;
952 self.next_page_token.clone()
953 }
954}
955
956#[derive(Clone, Default, PartialEq)]
958#[non_exhaustive]
959pub struct GetConnectionProfileRequest {
960 pub name: std::string::String,
962
963 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
964}
965
966impl GetConnectionProfileRequest {
967 pub fn new() -> Self {
968 std::default::Default::default()
969 }
970
971 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
973 self.name = v.into();
974 self
975 }
976}
977
978impl wkt::message::Message for GetConnectionProfileRequest {
979 fn typename() -> &'static str {
980 "type.googleapis.com/google.cloud.datastream.v1.GetConnectionProfileRequest"
981 }
982}
983
984#[derive(Clone, Default, PartialEq)]
986#[non_exhaustive]
987pub struct CreateConnectionProfileRequest {
988 pub parent: std::string::String,
990
991 pub connection_profile_id: std::string::String,
993
994 pub connection_profile: std::option::Option<crate::model::ConnectionProfile>,
996
997 pub request_id: std::string::String,
1011
1012 pub validate_only: bool,
1015
1016 pub force: bool,
1018
1019 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1020}
1021
1022impl CreateConnectionProfileRequest {
1023 pub fn new() -> Self {
1024 std::default::Default::default()
1025 }
1026
1027 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1029 self.parent = v.into();
1030 self
1031 }
1032
1033 pub fn set_connection_profile_id<T: std::convert::Into<std::string::String>>(
1035 mut self,
1036 v: T,
1037 ) -> Self {
1038 self.connection_profile_id = v.into();
1039 self
1040 }
1041
1042 pub fn set_connection_profile<T>(mut self, v: T) -> Self
1044 where
1045 T: std::convert::Into<crate::model::ConnectionProfile>,
1046 {
1047 self.connection_profile = std::option::Option::Some(v.into());
1048 self
1049 }
1050
1051 pub fn set_or_clear_connection_profile<T>(mut self, v: std::option::Option<T>) -> Self
1053 where
1054 T: std::convert::Into<crate::model::ConnectionProfile>,
1055 {
1056 self.connection_profile = v.map(|x| x.into());
1057 self
1058 }
1059
1060 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1062 self.request_id = v.into();
1063 self
1064 }
1065
1066 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1068 self.validate_only = v.into();
1069 self
1070 }
1071
1072 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1074 self.force = v.into();
1075 self
1076 }
1077}
1078
1079impl wkt::message::Message for CreateConnectionProfileRequest {
1080 fn typename() -> &'static str {
1081 "type.googleapis.com/google.cloud.datastream.v1.CreateConnectionProfileRequest"
1082 }
1083}
1084
1085#[derive(Clone, Default, PartialEq)]
1087#[non_exhaustive]
1088pub struct UpdateConnectionProfileRequest {
1089 pub update_mask: std::option::Option<wkt::FieldMask>,
1095
1096 pub connection_profile: std::option::Option<crate::model::ConnectionProfile>,
1098
1099 pub request_id: std::string::String,
1113
1114 pub validate_only: bool,
1117
1118 pub force: bool,
1120
1121 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1122}
1123
1124impl UpdateConnectionProfileRequest {
1125 pub fn new() -> Self {
1126 std::default::Default::default()
1127 }
1128
1129 pub fn set_update_mask<T>(mut self, v: T) -> Self
1131 where
1132 T: std::convert::Into<wkt::FieldMask>,
1133 {
1134 self.update_mask = std::option::Option::Some(v.into());
1135 self
1136 }
1137
1138 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1140 where
1141 T: std::convert::Into<wkt::FieldMask>,
1142 {
1143 self.update_mask = v.map(|x| x.into());
1144 self
1145 }
1146
1147 pub fn set_connection_profile<T>(mut self, v: T) -> Self
1149 where
1150 T: std::convert::Into<crate::model::ConnectionProfile>,
1151 {
1152 self.connection_profile = std::option::Option::Some(v.into());
1153 self
1154 }
1155
1156 pub fn set_or_clear_connection_profile<T>(mut self, v: std::option::Option<T>) -> Self
1158 where
1159 T: std::convert::Into<crate::model::ConnectionProfile>,
1160 {
1161 self.connection_profile = v.map(|x| x.into());
1162 self
1163 }
1164
1165 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1167 self.request_id = v.into();
1168 self
1169 }
1170
1171 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1173 self.validate_only = v.into();
1174 self
1175 }
1176
1177 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1179 self.force = v.into();
1180 self
1181 }
1182}
1183
1184impl wkt::message::Message for UpdateConnectionProfileRequest {
1185 fn typename() -> &'static str {
1186 "type.googleapis.com/google.cloud.datastream.v1.UpdateConnectionProfileRequest"
1187 }
1188}
1189
1190#[derive(Clone, Default, PartialEq)]
1192#[non_exhaustive]
1193pub struct DeleteConnectionProfileRequest {
1194 pub name: std::string::String,
1196
1197 pub request_id: std::string::String,
1211
1212 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1213}
1214
1215impl DeleteConnectionProfileRequest {
1216 pub fn new() -> Self {
1217 std::default::Default::default()
1218 }
1219
1220 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1222 self.name = v.into();
1223 self
1224 }
1225
1226 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1228 self.request_id = v.into();
1229 self
1230 }
1231}
1232
1233impl wkt::message::Message for DeleteConnectionProfileRequest {
1234 fn typename() -> &'static str {
1235 "type.googleapis.com/google.cloud.datastream.v1.DeleteConnectionProfileRequest"
1236 }
1237}
1238
1239#[derive(Clone, Default, PartialEq)]
1241#[non_exhaustive]
1242pub struct ListStreamsRequest {
1243 pub parent: std::string::String,
1245
1246 pub page_size: i32,
1250
1251 pub page_token: std::string::String,
1257
1258 pub filter: std::string::String,
1260
1261 pub order_by: std::string::String,
1263
1264 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1265}
1266
1267impl ListStreamsRequest {
1268 pub fn new() -> Self {
1269 std::default::Default::default()
1270 }
1271
1272 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1274 self.parent = v.into();
1275 self
1276 }
1277
1278 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1280 self.page_size = v.into();
1281 self
1282 }
1283
1284 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1286 self.page_token = v.into();
1287 self
1288 }
1289
1290 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1292 self.filter = v.into();
1293 self
1294 }
1295
1296 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1298 self.order_by = v.into();
1299 self
1300 }
1301}
1302
1303impl wkt::message::Message for ListStreamsRequest {
1304 fn typename() -> &'static str {
1305 "type.googleapis.com/google.cloud.datastream.v1.ListStreamsRequest"
1306 }
1307}
1308
1309#[derive(Clone, Default, PartialEq)]
1311#[non_exhaustive]
1312pub struct ListStreamsResponse {
1313 pub streams: std::vec::Vec<crate::model::Stream>,
1315
1316 pub next_page_token: std::string::String,
1319
1320 pub unreachable: std::vec::Vec<std::string::String>,
1322
1323 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1324}
1325
1326impl ListStreamsResponse {
1327 pub fn new() -> Self {
1328 std::default::Default::default()
1329 }
1330
1331 pub fn set_streams<T, V>(mut self, v: T) -> Self
1333 where
1334 T: std::iter::IntoIterator<Item = V>,
1335 V: std::convert::Into<crate::model::Stream>,
1336 {
1337 use std::iter::Iterator;
1338 self.streams = v.into_iter().map(|i| i.into()).collect();
1339 self
1340 }
1341
1342 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1344 self.next_page_token = v.into();
1345 self
1346 }
1347
1348 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1350 where
1351 T: std::iter::IntoIterator<Item = V>,
1352 V: std::convert::Into<std::string::String>,
1353 {
1354 use std::iter::Iterator;
1355 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1356 self
1357 }
1358}
1359
1360impl wkt::message::Message for ListStreamsResponse {
1361 fn typename() -> &'static str {
1362 "type.googleapis.com/google.cloud.datastream.v1.ListStreamsResponse"
1363 }
1364}
1365
1366#[doc(hidden)]
1367impl gax::paginator::internal::PageableResponse for ListStreamsResponse {
1368 type PageItem = crate::model::Stream;
1369
1370 fn items(self) -> std::vec::Vec<Self::PageItem> {
1371 self.streams
1372 }
1373
1374 fn next_page_token(&self) -> std::string::String {
1375 use std::clone::Clone;
1376 self.next_page_token.clone()
1377 }
1378}
1379
1380#[derive(Clone, Default, PartialEq)]
1382#[non_exhaustive]
1383pub struct GetStreamRequest {
1384 pub name: std::string::String,
1386
1387 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1388}
1389
1390impl GetStreamRequest {
1391 pub fn new() -> Self {
1392 std::default::Default::default()
1393 }
1394
1395 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1397 self.name = v.into();
1398 self
1399 }
1400}
1401
1402impl wkt::message::Message for GetStreamRequest {
1403 fn typename() -> &'static str {
1404 "type.googleapis.com/google.cloud.datastream.v1.GetStreamRequest"
1405 }
1406}
1407
1408#[derive(Clone, Default, PartialEq)]
1410#[non_exhaustive]
1411pub struct CreateStreamRequest {
1412 pub parent: std::string::String,
1414
1415 pub stream_id: std::string::String,
1417
1418 pub stream: std::option::Option<crate::model::Stream>,
1420
1421 pub request_id: std::string::String,
1435
1436 pub validate_only: bool,
1439
1440 pub force: bool,
1442
1443 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1444}
1445
1446impl CreateStreamRequest {
1447 pub fn new() -> Self {
1448 std::default::Default::default()
1449 }
1450
1451 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1453 self.parent = v.into();
1454 self
1455 }
1456
1457 pub fn set_stream_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1459 self.stream_id = v.into();
1460 self
1461 }
1462
1463 pub fn set_stream<T>(mut self, v: T) -> Self
1465 where
1466 T: std::convert::Into<crate::model::Stream>,
1467 {
1468 self.stream = std::option::Option::Some(v.into());
1469 self
1470 }
1471
1472 pub fn set_or_clear_stream<T>(mut self, v: std::option::Option<T>) -> Self
1474 where
1475 T: std::convert::Into<crate::model::Stream>,
1476 {
1477 self.stream = v.map(|x| x.into());
1478 self
1479 }
1480
1481 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1483 self.request_id = v.into();
1484 self
1485 }
1486
1487 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1489 self.validate_only = v.into();
1490 self
1491 }
1492
1493 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1495 self.force = v.into();
1496 self
1497 }
1498}
1499
1500impl wkt::message::Message for CreateStreamRequest {
1501 fn typename() -> &'static str {
1502 "type.googleapis.com/google.cloud.datastream.v1.CreateStreamRequest"
1503 }
1504}
1505
1506#[derive(Clone, Default, PartialEq)]
1508#[non_exhaustive]
1509pub struct UpdateStreamRequest {
1510 pub update_mask: std::option::Option<wkt::FieldMask>,
1516
1517 pub stream: std::option::Option<crate::model::Stream>,
1519
1520 pub request_id: std::string::String,
1534
1535 pub validate_only: bool,
1538
1539 pub force: bool,
1541
1542 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1543}
1544
1545impl UpdateStreamRequest {
1546 pub fn new() -> Self {
1547 std::default::Default::default()
1548 }
1549
1550 pub fn set_update_mask<T>(mut self, v: T) -> Self
1552 where
1553 T: std::convert::Into<wkt::FieldMask>,
1554 {
1555 self.update_mask = std::option::Option::Some(v.into());
1556 self
1557 }
1558
1559 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1561 where
1562 T: std::convert::Into<wkt::FieldMask>,
1563 {
1564 self.update_mask = v.map(|x| x.into());
1565 self
1566 }
1567
1568 pub fn set_stream<T>(mut self, v: T) -> Self
1570 where
1571 T: std::convert::Into<crate::model::Stream>,
1572 {
1573 self.stream = std::option::Option::Some(v.into());
1574 self
1575 }
1576
1577 pub fn set_or_clear_stream<T>(mut self, v: std::option::Option<T>) -> Self
1579 where
1580 T: std::convert::Into<crate::model::Stream>,
1581 {
1582 self.stream = v.map(|x| x.into());
1583 self
1584 }
1585
1586 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1588 self.request_id = v.into();
1589 self
1590 }
1591
1592 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1594 self.validate_only = v.into();
1595 self
1596 }
1597
1598 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1600 self.force = v.into();
1601 self
1602 }
1603}
1604
1605impl wkt::message::Message for UpdateStreamRequest {
1606 fn typename() -> &'static str {
1607 "type.googleapis.com/google.cloud.datastream.v1.UpdateStreamRequest"
1608 }
1609}
1610
1611#[derive(Clone, Default, PartialEq)]
1613#[non_exhaustive]
1614pub struct DeleteStreamRequest {
1615 pub name: std::string::String,
1617
1618 pub request_id: std::string::String,
1632
1633 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1634}
1635
1636impl DeleteStreamRequest {
1637 pub fn new() -> Self {
1638 std::default::Default::default()
1639 }
1640
1641 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1643 self.name = v.into();
1644 self
1645 }
1646
1647 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1649 self.request_id = v.into();
1650 self
1651 }
1652}
1653
1654impl wkt::message::Message for DeleteStreamRequest {
1655 fn typename() -> &'static str {
1656 "type.googleapis.com/google.cloud.datastream.v1.DeleteStreamRequest"
1657 }
1658}
1659
1660#[derive(Clone, Default, PartialEq)]
1662#[non_exhaustive]
1663pub struct RunStreamRequest {
1664 pub name: std::string::String,
1667
1668 pub cdc_strategy: std::option::Option<crate::model::CdcStrategy>,
1671
1672 pub force: bool,
1674
1675 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1676}
1677
1678impl RunStreamRequest {
1679 pub fn new() -> Self {
1680 std::default::Default::default()
1681 }
1682
1683 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1685 self.name = v.into();
1686 self
1687 }
1688
1689 pub fn set_cdc_strategy<T>(mut self, v: T) -> Self
1691 where
1692 T: std::convert::Into<crate::model::CdcStrategy>,
1693 {
1694 self.cdc_strategy = std::option::Option::Some(v.into());
1695 self
1696 }
1697
1698 pub fn set_or_clear_cdc_strategy<T>(mut self, v: std::option::Option<T>) -> Self
1700 where
1701 T: std::convert::Into<crate::model::CdcStrategy>,
1702 {
1703 self.cdc_strategy = v.map(|x| x.into());
1704 self
1705 }
1706
1707 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1709 self.force = v.into();
1710 self
1711 }
1712}
1713
1714impl wkt::message::Message for RunStreamRequest {
1715 fn typename() -> &'static str {
1716 "type.googleapis.com/google.cloud.datastream.v1.RunStreamRequest"
1717 }
1718}
1719
1720#[derive(Clone, Default, PartialEq)]
1722#[non_exhaustive]
1723pub struct GetStreamObjectRequest {
1724 pub name: std::string::String,
1726
1727 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1728}
1729
1730impl GetStreamObjectRequest {
1731 pub fn new() -> Self {
1732 std::default::Default::default()
1733 }
1734
1735 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1737 self.name = v.into();
1738 self
1739 }
1740}
1741
1742impl wkt::message::Message for GetStreamObjectRequest {
1743 fn typename() -> &'static str {
1744 "type.googleapis.com/google.cloud.datastream.v1.GetStreamObjectRequest"
1745 }
1746}
1747
1748#[derive(Clone, Default, PartialEq)]
1751#[non_exhaustive]
1752pub struct LookupStreamObjectRequest {
1753 pub parent: std::string::String,
1755
1756 pub source_object_identifier: std::option::Option<crate::model::SourceObjectIdentifier>,
1758
1759 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1760}
1761
1762impl LookupStreamObjectRequest {
1763 pub fn new() -> Self {
1764 std::default::Default::default()
1765 }
1766
1767 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1769 self.parent = v.into();
1770 self
1771 }
1772
1773 pub fn set_source_object_identifier<T>(mut self, v: T) -> Self
1775 where
1776 T: std::convert::Into<crate::model::SourceObjectIdentifier>,
1777 {
1778 self.source_object_identifier = std::option::Option::Some(v.into());
1779 self
1780 }
1781
1782 pub fn set_or_clear_source_object_identifier<T>(mut self, v: std::option::Option<T>) -> Self
1784 where
1785 T: std::convert::Into<crate::model::SourceObjectIdentifier>,
1786 {
1787 self.source_object_identifier = v.map(|x| x.into());
1788 self
1789 }
1790}
1791
1792impl wkt::message::Message for LookupStreamObjectRequest {
1793 fn typename() -> &'static str {
1794 "type.googleapis.com/google.cloud.datastream.v1.LookupStreamObjectRequest"
1795 }
1796}
1797
1798#[derive(Clone, Default, PartialEq)]
1800#[non_exhaustive]
1801pub struct StartBackfillJobRequest {
1802 pub object: std::string::String,
1805
1806 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1807}
1808
1809impl StartBackfillJobRequest {
1810 pub fn new() -> Self {
1811 std::default::Default::default()
1812 }
1813
1814 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1816 self.object = v.into();
1817 self
1818 }
1819}
1820
1821impl wkt::message::Message for StartBackfillJobRequest {
1822 fn typename() -> &'static str {
1823 "type.googleapis.com/google.cloud.datastream.v1.StartBackfillJobRequest"
1824 }
1825}
1826
1827#[derive(Clone, Default, PartialEq)]
1829#[non_exhaustive]
1830pub struct StartBackfillJobResponse {
1831 pub object: std::option::Option<crate::model::StreamObject>,
1833
1834 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1835}
1836
1837impl StartBackfillJobResponse {
1838 pub fn new() -> Self {
1839 std::default::Default::default()
1840 }
1841
1842 pub fn set_object<T>(mut self, v: T) -> Self
1844 where
1845 T: std::convert::Into<crate::model::StreamObject>,
1846 {
1847 self.object = std::option::Option::Some(v.into());
1848 self
1849 }
1850
1851 pub fn set_or_clear_object<T>(mut self, v: std::option::Option<T>) -> Self
1853 where
1854 T: std::convert::Into<crate::model::StreamObject>,
1855 {
1856 self.object = v.map(|x| x.into());
1857 self
1858 }
1859}
1860
1861impl wkt::message::Message for StartBackfillJobResponse {
1862 fn typename() -> &'static str {
1863 "type.googleapis.com/google.cloud.datastream.v1.StartBackfillJobResponse"
1864 }
1865}
1866
1867#[derive(Clone, Default, PartialEq)]
1870#[non_exhaustive]
1871pub struct StopBackfillJobRequest {
1872 pub object: std::string::String,
1875
1876 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1877}
1878
1879impl StopBackfillJobRequest {
1880 pub fn new() -> Self {
1881 std::default::Default::default()
1882 }
1883
1884 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1886 self.object = v.into();
1887 self
1888 }
1889}
1890
1891impl wkt::message::Message for StopBackfillJobRequest {
1892 fn typename() -> &'static str {
1893 "type.googleapis.com/google.cloud.datastream.v1.StopBackfillJobRequest"
1894 }
1895}
1896
1897#[derive(Clone, Default, PartialEq)]
1899#[non_exhaustive]
1900pub struct StopBackfillJobResponse {
1901 pub object: std::option::Option<crate::model::StreamObject>,
1903
1904 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1905}
1906
1907impl StopBackfillJobResponse {
1908 pub fn new() -> Self {
1909 std::default::Default::default()
1910 }
1911
1912 pub fn set_object<T>(mut self, v: T) -> Self
1914 where
1915 T: std::convert::Into<crate::model::StreamObject>,
1916 {
1917 self.object = std::option::Option::Some(v.into());
1918 self
1919 }
1920
1921 pub fn set_or_clear_object<T>(mut self, v: std::option::Option<T>) -> Self
1923 where
1924 T: std::convert::Into<crate::model::StreamObject>,
1925 {
1926 self.object = v.map(|x| x.into());
1927 self
1928 }
1929}
1930
1931impl wkt::message::Message for StopBackfillJobResponse {
1932 fn typename() -> &'static str {
1933 "type.googleapis.com/google.cloud.datastream.v1.StopBackfillJobResponse"
1934 }
1935}
1936
1937#[derive(Clone, Default, PartialEq)]
1939#[non_exhaustive]
1940pub struct ListStreamObjectsRequest {
1941 pub parent: std::string::String,
1943
1944 pub page_size: i32,
1947
1948 pub page_token: std::string::String,
1955
1956 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1957}
1958
1959impl ListStreamObjectsRequest {
1960 pub fn new() -> Self {
1961 std::default::Default::default()
1962 }
1963
1964 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1966 self.parent = v.into();
1967 self
1968 }
1969
1970 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1972 self.page_size = v.into();
1973 self
1974 }
1975
1976 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1978 self.page_token = v.into();
1979 self
1980 }
1981}
1982
1983impl wkt::message::Message for ListStreamObjectsRequest {
1984 fn typename() -> &'static str {
1985 "type.googleapis.com/google.cloud.datastream.v1.ListStreamObjectsRequest"
1986 }
1987}
1988
1989#[derive(Clone, Default, PartialEq)]
1991#[non_exhaustive]
1992pub struct ListStreamObjectsResponse {
1993 pub stream_objects: std::vec::Vec<crate::model::StreamObject>,
1995
1996 pub next_page_token: std::string::String,
1998
1999 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2000}
2001
2002impl ListStreamObjectsResponse {
2003 pub fn new() -> Self {
2004 std::default::Default::default()
2005 }
2006
2007 pub fn set_stream_objects<T, V>(mut self, v: T) -> Self
2009 where
2010 T: std::iter::IntoIterator<Item = V>,
2011 V: std::convert::Into<crate::model::StreamObject>,
2012 {
2013 use std::iter::Iterator;
2014 self.stream_objects = v.into_iter().map(|i| i.into()).collect();
2015 self
2016 }
2017
2018 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2020 self.next_page_token = v.into();
2021 self
2022 }
2023}
2024
2025impl wkt::message::Message for ListStreamObjectsResponse {
2026 fn typename() -> &'static str {
2027 "type.googleapis.com/google.cloud.datastream.v1.ListStreamObjectsResponse"
2028 }
2029}
2030
2031#[doc(hidden)]
2032impl gax::paginator::internal::PageableResponse for ListStreamObjectsResponse {
2033 type PageItem = crate::model::StreamObject;
2034
2035 fn items(self) -> std::vec::Vec<Self::PageItem> {
2036 self.stream_objects
2037 }
2038
2039 fn next_page_token(&self) -> std::string::String {
2040 use std::clone::Clone;
2041 self.next_page_token.clone()
2042 }
2043}
2044
2045#[derive(Clone, Default, PartialEq)]
2047#[non_exhaustive]
2048pub struct OperationMetadata {
2049 pub create_time: std::option::Option<wkt::Timestamp>,
2051
2052 pub end_time: std::option::Option<wkt::Timestamp>,
2054
2055 pub target: std::string::String,
2057
2058 pub verb: std::string::String,
2060
2061 pub status_message: std::string::String,
2063
2064 pub requested_cancellation: bool,
2074
2075 pub api_version: std::string::String,
2077
2078 pub validation_result: std::option::Option<crate::model::ValidationResult>,
2080
2081 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2082}
2083
2084impl OperationMetadata {
2085 pub fn new() -> Self {
2086 std::default::Default::default()
2087 }
2088
2089 pub fn set_create_time<T>(mut self, v: T) -> Self
2091 where
2092 T: std::convert::Into<wkt::Timestamp>,
2093 {
2094 self.create_time = std::option::Option::Some(v.into());
2095 self
2096 }
2097
2098 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2100 where
2101 T: std::convert::Into<wkt::Timestamp>,
2102 {
2103 self.create_time = v.map(|x| x.into());
2104 self
2105 }
2106
2107 pub fn set_end_time<T>(mut self, v: T) -> Self
2109 where
2110 T: std::convert::Into<wkt::Timestamp>,
2111 {
2112 self.end_time = std::option::Option::Some(v.into());
2113 self
2114 }
2115
2116 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2118 where
2119 T: std::convert::Into<wkt::Timestamp>,
2120 {
2121 self.end_time = v.map(|x| x.into());
2122 self
2123 }
2124
2125 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2127 self.target = v.into();
2128 self
2129 }
2130
2131 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2133 self.verb = v.into();
2134 self
2135 }
2136
2137 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2139 self.status_message = v.into();
2140 self
2141 }
2142
2143 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2145 self.requested_cancellation = v.into();
2146 self
2147 }
2148
2149 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2151 self.api_version = v.into();
2152 self
2153 }
2154
2155 pub fn set_validation_result<T>(mut self, v: T) -> Self
2157 where
2158 T: std::convert::Into<crate::model::ValidationResult>,
2159 {
2160 self.validation_result = std::option::Option::Some(v.into());
2161 self
2162 }
2163
2164 pub fn set_or_clear_validation_result<T>(mut self, v: std::option::Option<T>) -> Self
2166 where
2167 T: std::convert::Into<crate::model::ValidationResult>,
2168 {
2169 self.validation_result = v.map(|x| x.into());
2170 self
2171 }
2172}
2173
2174impl wkt::message::Message for OperationMetadata {
2175 fn typename() -> &'static str {
2176 "type.googleapis.com/google.cloud.datastream.v1.OperationMetadata"
2177 }
2178}
2179
2180#[derive(Clone, Default, PartialEq)]
2182#[non_exhaustive]
2183pub struct CreatePrivateConnectionRequest {
2184 pub parent: std::string::String,
2186
2187 pub private_connection_id: std::string::String,
2189
2190 pub private_connection: std::option::Option<crate::model::PrivateConnection>,
2192
2193 pub request_id: std::string::String,
2207
2208 pub force: bool,
2210
2211 pub validate_only: bool,
2215
2216 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2217}
2218
2219impl CreatePrivateConnectionRequest {
2220 pub fn new() -> Self {
2221 std::default::Default::default()
2222 }
2223
2224 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2226 self.parent = v.into();
2227 self
2228 }
2229
2230 pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
2232 mut self,
2233 v: T,
2234 ) -> Self {
2235 self.private_connection_id = v.into();
2236 self
2237 }
2238
2239 pub fn set_private_connection<T>(mut self, v: T) -> Self
2241 where
2242 T: std::convert::Into<crate::model::PrivateConnection>,
2243 {
2244 self.private_connection = std::option::Option::Some(v.into());
2245 self
2246 }
2247
2248 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
2250 where
2251 T: std::convert::Into<crate::model::PrivateConnection>,
2252 {
2253 self.private_connection = v.map(|x| x.into());
2254 self
2255 }
2256
2257 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2259 self.request_id = v.into();
2260 self
2261 }
2262
2263 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2265 self.force = v.into();
2266 self
2267 }
2268
2269 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2271 self.validate_only = v.into();
2272 self
2273 }
2274}
2275
2276impl wkt::message::Message for CreatePrivateConnectionRequest {
2277 fn typename() -> &'static str {
2278 "type.googleapis.com/google.cloud.datastream.v1.CreatePrivateConnectionRequest"
2279 }
2280}
2281
2282#[derive(Clone, Default, PartialEq)]
2284#[non_exhaustive]
2285pub struct ListPrivateConnectionsRequest {
2286 pub parent: std::string::String,
2289
2290 pub page_size: i32,
2295
2296 pub page_token: std::string::String,
2303
2304 pub filter: std::string::String,
2306
2307 pub order_by: std::string::String,
2309
2310 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2311}
2312
2313impl ListPrivateConnectionsRequest {
2314 pub fn new() -> Self {
2315 std::default::Default::default()
2316 }
2317
2318 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2320 self.parent = v.into();
2321 self
2322 }
2323
2324 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2326 self.page_size = v.into();
2327 self
2328 }
2329
2330 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2332 self.page_token = v.into();
2333 self
2334 }
2335
2336 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2338 self.filter = v.into();
2339 self
2340 }
2341
2342 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2344 self.order_by = v.into();
2345 self
2346 }
2347}
2348
2349impl wkt::message::Message for ListPrivateConnectionsRequest {
2350 fn typename() -> &'static str {
2351 "type.googleapis.com/google.cloud.datastream.v1.ListPrivateConnectionsRequest"
2352 }
2353}
2354
2355#[derive(Clone, Default, PartialEq)]
2357#[non_exhaustive]
2358pub struct ListPrivateConnectionsResponse {
2359 pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
2361
2362 pub next_page_token: std::string::String,
2365
2366 pub unreachable: std::vec::Vec<std::string::String>,
2368
2369 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2370}
2371
2372impl ListPrivateConnectionsResponse {
2373 pub fn new() -> Self {
2374 std::default::Default::default()
2375 }
2376
2377 pub fn set_private_connections<T, V>(mut self, v: T) -> Self
2379 where
2380 T: std::iter::IntoIterator<Item = V>,
2381 V: std::convert::Into<crate::model::PrivateConnection>,
2382 {
2383 use std::iter::Iterator;
2384 self.private_connections = v.into_iter().map(|i| i.into()).collect();
2385 self
2386 }
2387
2388 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2390 self.next_page_token = v.into();
2391 self
2392 }
2393
2394 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2396 where
2397 T: std::iter::IntoIterator<Item = V>,
2398 V: std::convert::Into<std::string::String>,
2399 {
2400 use std::iter::Iterator;
2401 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2402 self
2403 }
2404}
2405
2406impl wkt::message::Message for ListPrivateConnectionsResponse {
2407 fn typename() -> &'static str {
2408 "type.googleapis.com/google.cloud.datastream.v1.ListPrivateConnectionsResponse"
2409 }
2410}
2411
2412#[doc(hidden)]
2413impl gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
2414 type PageItem = crate::model::PrivateConnection;
2415
2416 fn items(self) -> std::vec::Vec<Self::PageItem> {
2417 self.private_connections
2418 }
2419
2420 fn next_page_token(&self) -> std::string::String {
2421 use std::clone::Clone;
2422 self.next_page_token.clone()
2423 }
2424}
2425
2426#[derive(Clone, Default, PartialEq)]
2428#[non_exhaustive]
2429pub struct DeletePrivateConnectionRequest {
2430 pub name: std::string::String,
2432
2433 pub request_id: std::string::String,
2447
2448 pub force: bool,
2451
2452 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2453}
2454
2455impl DeletePrivateConnectionRequest {
2456 pub fn new() -> Self {
2457 std::default::Default::default()
2458 }
2459
2460 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2462 self.name = v.into();
2463 self
2464 }
2465
2466 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2468 self.request_id = v.into();
2469 self
2470 }
2471
2472 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2474 self.force = v.into();
2475 self
2476 }
2477}
2478
2479impl wkt::message::Message for DeletePrivateConnectionRequest {
2480 fn typename() -> &'static str {
2481 "type.googleapis.com/google.cloud.datastream.v1.DeletePrivateConnectionRequest"
2482 }
2483}
2484
2485#[derive(Clone, Default, PartialEq)]
2487#[non_exhaustive]
2488pub struct GetPrivateConnectionRequest {
2489 pub name: std::string::String,
2491
2492 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2493}
2494
2495impl GetPrivateConnectionRequest {
2496 pub fn new() -> Self {
2497 std::default::Default::default()
2498 }
2499
2500 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2502 self.name = v.into();
2503 self
2504 }
2505}
2506
2507impl wkt::message::Message for GetPrivateConnectionRequest {
2508 fn typename() -> &'static str {
2509 "type.googleapis.com/google.cloud.datastream.v1.GetPrivateConnectionRequest"
2510 }
2511}
2512
2513#[derive(Clone, Default, PartialEq)]
2515#[non_exhaustive]
2516pub struct CreateRouteRequest {
2517 pub parent: std::string::String,
2519
2520 pub route_id: std::string::String,
2522
2523 pub route: std::option::Option<crate::model::Route>,
2525
2526 pub request_id: std::string::String,
2540
2541 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2542}
2543
2544impl CreateRouteRequest {
2545 pub fn new() -> Self {
2546 std::default::Default::default()
2547 }
2548
2549 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2551 self.parent = v.into();
2552 self
2553 }
2554
2555 pub fn set_route_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2557 self.route_id = v.into();
2558 self
2559 }
2560
2561 pub fn set_route<T>(mut self, v: T) -> Self
2563 where
2564 T: std::convert::Into<crate::model::Route>,
2565 {
2566 self.route = std::option::Option::Some(v.into());
2567 self
2568 }
2569
2570 pub fn set_or_clear_route<T>(mut self, v: std::option::Option<T>) -> Self
2572 where
2573 T: std::convert::Into<crate::model::Route>,
2574 {
2575 self.route = v.map(|x| x.into());
2576 self
2577 }
2578
2579 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2581 self.request_id = v.into();
2582 self
2583 }
2584}
2585
2586impl wkt::message::Message for CreateRouteRequest {
2587 fn typename() -> &'static str {
2588 "type.googleapis.com/google.cloud.datastream.v1.CreateRouteRequest"
2589 }
2590}
2591
2592#[derive(Clone, Default, PartialEq)]
2594#[non_exhaustive]
2595pub struct ListRoutesRequest {
2596 pub parent: std::string::String,
2598
2599 pub page_size: i32,
2604
2605 pub page_token: std::string::String,
2612
2613 pub filter: std::string::String,
2615
2616 pub order_by: std::string::String,
2618
2619 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2620}
2621
2622impl ListRoutesRequest {
2623 pub fn new() -> Self {
2624 std::default::Default::default()
2625 }
2626
2627 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2629 self.parent = v.into();
2630 self
2631 }
2632
2633 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2635 self.page_size = v.into();
2636 self
2637 }
2638
2639 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2641 self.page_token = v.into();
2642 self
2643 }
2644
2645 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2647 self.filter = v.into();
2648 self
2649 }
2650
2651 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2653 self.order_by = v.into();
2654 self
2655 }
2656}
2657
2658impl wkt::message::Message for ListRoutesRequest {
2659 fn typename() -> &'static str {
2660 "type.googleapis.com/google.cloud.datastream.v1.ListRoutesRequest"
2661 }
2662}
2663
2664#[derive(Clone, Default, PartialEq)]
2666#[non_exhaustive]
2667pub struct ListRoutesResponse {
2668 pub routes: std::vec::Vec<crate::model::Route>,
2670
2671 pub next_page_token: std::string::String,
2674
2675 pub unreachable: std::vec::Vec<std::string::String>,
2677
2678 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2679}
2680
2681impl ListRoutesResponse {
2682 pub fn new() -> Self {
2683 std::default::Default::default()
2684 }
2685
2686 pub fn set_routes<T, V>(mut self, v: T) -> Self
2688 where
2689 T: std::iter::IntoIterator<Item = V>,
2690 V: std::convert::Into<crate::model::Route>,
2691 {
2692 use std::iter::Iterator;
2693 self.routes = v.into_iter().map(|i| i.into()).collect();
2694 self
2695 }
2696
2697 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2699 self.next_page_token = v.into();
2700 self
2701 }
2702
2703 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2705 where
2706 T: std::iter::IntoIterator<Item = V>,
2707 V: std::convert::Into<std::string::String>,
2708 {
2709 use std::iter::Iterator;
2710 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2711 self
2712 }
2713}
2714
2715impl wkt::message::Message for ListRoutesResponse {
2716 fn typename() -> &'static str {
2717 "type.googleapis.com/google.cloud.datastream.v1.ListRoutesResponse"
2718 }
2719}
2720
2721#[doc(hidden)]
2722impl gax::paginator::internal::PageableResponse for ListRoutesResponse {
2723 type PageItem = crate::model::Route;
2724
2725 fn items(self) -> std::vec::Vec<Self::PageItem> {
2726 self.routes
2727 }
2728
2729 fn next_page_token(&self) -> std::string::String {
2730 use std::clone::Clone;
2731 self.next_page_token.clone()
2732 }
2733}
2734
2735#[derive(Clone, Default, PartialEq)]
2737#[non_exhaustive]
2738pub struct DeleteRouteRequest {
2739 pub name: std::string::String,
2741
2742 pub request_id: std::string::String,
2756
2757 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2758}
2759
2760impl DeleteRouteRequest {
2761 pub fn new() -> Self {
2762 std::default::Default::default()
2763 }
2764
2765 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2767 self.name = v.into();
2768 self
2769 }
2770
2771 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2773 self.request_id = v.into();
2774 self
2775 }
2776}
2777
2778impl wkt::message::Message for DeleteRouteRequest {
2779 fn typename() -> &'static str {
2780 "type.googleapis.com/google.cloud.datastream.v1.DeleteRouteRequest"
2781 }
2782}
2783
2784#[derive(Clone, Default, PartialEq)]
2786#[non_exhaustive]
2787pub struct GetRouteRequest {
2788 pub name: std::string::String,
2790
2791 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2792}
2793
2794impl GetRouteRequest {
2795 pub fn new() -> Self {
2796 std::default::Default::default()
2797 }
2798
2799 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2801 self.name = v.into();
2802 self
2803 }
2804}
2805
2806impl wkt::message::Message for GetRouteRequest {
2807 fn typename() -> &'static str {
2808 "type.googleapis.com/google.cloud.datastream.v1.GetRouteRequest"
2809 }
2810}
2811
2812#[derive(Clone, Default, PartialEq)]
2814#[non_exhaustive]
2815pub struct OracleProfile {
2816 pub hostname: std::string::String,
2818
2819 pub port: i32,
2821
2822 pub username: std::string::String,
2824
2825 pub password: std::string::String,
2828
2829 pub database_service: std::string::String,
2831
2832 pub connection_attributes: std::collections::HashMap<std::string::String, std::string::String>,
2834
2835 pub oracle_ssl_config: std::option::Option<crate::model::OracleSslConfig>,
2837
2838 pub oracle_asm_config: std::option::Option<crate::model::OracleAsmConfig>,
2840
2841 pub secret_manager_stored_password: std::string::String,
2844
2845 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2846}
2847
2848impl OracleProfile {
2849 pub fn new() -> Self {
2850 std::default::Default::default()
2851 }
2852
2853 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2855 self.hostname = v.into();
2856 self
2857 }
2858
2859 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2861 self.port = v.into();
2862 self
2863 }
2864
2865 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2867 self.username = v.into();
2868 self
2869 }
2870
2871 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2873 self.password = v.into();
2874 self
2875 }
2876
2877 pub fn set_database_service<T: std::convert::Into<std::string::String>>(
2879 mut self,
2880 v: T,
2881 ) -> Self {
2882 self.database_service = v.into();
2883 self
2884 }
2885
2886 pub fn set_connection_attributes<T, K, V>(mut self, v: T) -> Self
2888 where
2889 T: std::iter::IntoIterator<Item = (K, V)>,
2890 K: std::convert::Into<std::string::String>,
2891 V: std::convert::Into<std::string::String>,
2892 {
2893 use std::iter::Iterator;
2894 self.connection_attributes = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2895 self
2896 }
2897
2898 pub fn set_oracle_ssl_config<T>(mut self, v: T) -> Self
2900 where
2901 T: std::convert::Into<crate::model::OracleSslConfig>,
2902 {
2903 self.oracle_ssl_config = std::option::Option::Some(v.into());
2904 self
2905 }
2906
2907 pub fn set_or_clear_oracle_ssl_config<T>(mut self, v: std::option::Option<T>) -> Self
2909 where
2910 T: std::convert::Into<crate::model::OracleSslConfig>,
2911 {
2912 self.oracle_ssl_config = v.map(|x| x.into());
2913 self
2914 }
2915
2916 pub fn set_oracle_asm_config<T>(mut self, v: T) -> Self
2918 where
2919 T: std::convert::Into<crate::model::OracleAsmConfig>,
2920 {
2921 self.oracle_asm_config = std::option::Option::Some(v.into());
2922 self
2923 }
2924
2925 pub fn set_or_clear_oracle_asm_config<T>(mut self, v: std::option::Option<T>) -> Self
2927 where
2928 T: std::convert::Into<crate::model::OracleAsmConfig>,
2929 {
2930 self.oracle_asm_config = v.map(|x| x.into());
2931 self
2932 }
2933
2934 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
2936 mut self,
2937 v: T,
2938 ) -> Self {
2939 self.secret_manager_stored_password = v.into();
2940 self
2941 }
2942}
2943
2944impl wkt::message::Message for OracleProfile {
2945 fn typename() -> &'static str {
2946 "type.googleapis.com/google.cloud.datastream.v1.OracleProfile"
2947 }
2948}
2949
2950#[derive(Clone, Default, PartialEq)]
2952#[non_exhaustive]
2953pub struct OracleAsmConfig {
2954 pub hostname: std::string::String,
2956
2957 pub port: i32,
2959
2960 pub username: std::string::String,
2962
2963 pub password: std::string::String,
2966
2967 pub asm_service: std::string::String,
2969
2970 pub connection_attributes: std::collections::HashMap<std::string::String, std::string::String>,
2972
2973 pub oracle_ssl_config: std::option::Option<crate::model::OracleSslConfig>,
2975
2976 pub secret_manager_stored_password: std::string::String,
2979
2980 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2981}
2982
2983impl OracleAsmConfig {
2984 pub fn new() -> Self {
2985 std::default::Default::default()
2986 }
2987
2988 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2990 self.hostname = v.into();
2991 self
2992 }
2993
2994 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2996 self.port = v.into();
2997 self
2998 }
2999
3000 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3002 self.username = v.into();
3003 self
3004 }
3005
3006 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3008 self.password = v.into();
3009 self
3010 }
3011
3012 pub fn set_asm_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3014 self.asm_service = v.into();
3015 self
3016 }
3017
3018 pub fn set_connection_attributes<T, K, V>(mut self, v: T) -> Self
3020 where
3021 T: std::iter::IntoIterator<Item = (K, V)>,
3022 K: std::convert::Into<std::string::String>,
3023 V: std::convert::Into<std::string::String>,
3024 {
3025 use std::iter::Iterator;
3026 self.connection_attributes = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3027 self
3028 }
3029
3030 pub fn set_oracle_ssl_config<T>(mut self, v: T) -> Self
3032 where
3033 T: std::convert::Into<crate::model::OracleSslConfig>,
3034 {
3035 self.oracle_ssl_config = std::option::Option::Some(v.into());
3036 self
3037 }
3038
3039 pub fn set_or_clear_oracle_ssl_config<T>(mut self, v: std::option::Option<T>) -> Self
3041 where
3042 T: std::convert::Into<crate::model::OracleSslConfig>,
3043 {
3044 self.oracle_ssl_config = v.map(|x| x.into());
3045 self
3046 }
3047
3048 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3050 mut self,
3051 v: T,
3052 ) -> Self {
3053 self.secret_manager_stored_password = v.into();
3054 self
3055 }
3056}
3057
3058impl wkt::message::Message for OracleAsmConfig {
3059 fn typename() -> &'static str {
3060 "type.googleapis.com/google.cloud.datastream.v1.OracleAsmConfig"
3061 }
3062}
3063
3064#[derive(Clone, Default, PartialEq)]
3066#[non_exhaustive]
3067pub struct MysqlProfile {
3068 pub hostname: std::string::String,
3070
3071 pub port: i32,
3073
3074 pub username: std::string::String,
3076
3077 pub password: std::string::String,
3080
3081 pub ssl_config: std::option::Option<crate::model::MysqlSslConfig>,
3083
3084 pub secret_manager_stored_password: std::string::String,
3087
3088 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3089}
3090
3091impl MysqlProfile {
3092 pub fn new() -> Self {
3093 std::default::Default::default()
3094 }
3095
3096 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3098 self.hostname = v.into();
3099 self
3100 }
3101
3102 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3104 self.port = v.into();
3105 self
3106 }
3107
3108 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3110 self.username = v.into();
3111 self
3112 }
3113
3114 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3116 self.password = v.into();
3117 self
3118 }
3119
3120 pub fn set_ssl_config<T>(mut self, v: T) -> Self
3122 where
3123 T: std::convert::Into<crate::model::MysqlSslConfig>,
3124 {
3125 self.ssl_config = std::option::Option::Some(v.into());
3126 self
3127 }
3128
3129 pub fn set_or_clear_ssl_config<T>(mut self, v: std::option::Option<T>) -> Self
3131 where
3132 T: std::convert::Into<crate::model::MysqlSslConfig>,
3133 {
3134 self.ssl_config = v.map(|x| x.into());
3135 self
3136 }
3137
3138 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3140 mut self,
3141 v: T,
3142 ) -> Self {
3143 self.secret_manager_stored_password = v.into();
3144 self
3145 }
3146}
3147
3148impl wkt::message::Message for MysqlProfile {
3149 fn typename() -> &'static str {
3150 "type.googleapis.com/google.cloud.datastream.v1.MysqlProfile"
3151 }
3152}
3153
3154#[derive(Clone, Default, PartialEq)]
3156#[non_exhaustive]
3157pub struct PostgresqlProfile {
3158 pub hostname: std::string::String,
3160
3161 pub port: i32,
3163
3164 pub username: std::string::String,
3166
3167 pub password: std::string::String,
3170
3171 pub database: std::string::String,
3173
3174 pub secret_manager_stored_password: std::string::String,
3178
3179 pub ssl_config: std::option::Option<crate::model::PostgresqlSslConfig>,
3184
3185 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3186}
3187
3188impl PostgresqlProfile {
3189 pub fn new() -> Self {
3190 std::default::Default::default()
3191 }
3192
3193 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3195 self.hostname = v.into();
3196 self
3197 }
3198
3199 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3201 self.port = v.into();
3202 self
3203 }
3204
3205 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3207 self.username = v.into();
3208 self
3209 }
3210
3211 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3213 self.password = v.into();
3214 self
3215 }
3216
3217 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3219 self.database = v.into();
3220 self
3221 }
3222
3223 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3225 mut self,
3226 v: T,
3227 ) -> Self {
3228 self.secret_manager_stored_password = v.into();
3229 self
3230 }
3231
3232 pub fn set_ssl_config<T>(mut self, v: T) -> Self
3234 where
3235 T: std::convert::Into<crate::model::PostgresqlSslConfig>,
3236 {
3237 self.ssl_config = std::option::Option::Some(v.into());
3238 self
3239 }
3240
3241 pub fn set_or_clear_ssl_config<T>(mut self, v: std::option::Option<T>) -> Self
3243 where
3244 T: std::convert::Into<crate::model::PostgresqlSslConfig>,
3245 {
3246 self.ssl_config = v.map(|x| x.into());
3247 self
3248 }
3249}
3250
3251impl wkt::message::Message for PostgresqlProfile {
3252 fn typename() -> &'static str {
3253 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlProfile"
3254 }
3255}
3256
3257#[derive(Clone, Default, PartialEq)]
3259#[non_exhaustive]
3260pub struct SqlServerProfile {
3261 pub hostname: std::string::String,
3263
3264 pub port: i32,
3266
3267 pub username: std::string::String,
3269
3270 pub password: std::string::String,
3273
3274 pub database: std::string::String,
3276
3277 pub secret_manager_stored_password: std::string::String,
3281
3282 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3283}
3284
3285impl SqlServerProfile {
3286 pub fn new() -> Self {
3287 std::default::Default::default()
3288 }
3289
3290 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3292 self.hostname = v.into();
3293 self
3294 }
3295
3296 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3298 self.port = v.into();
3299 self
3300 }
3301
3302 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3304 self.username = v.into();
3305 self
3306 }
3307
3308 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3310 self.password = v.into();
3311 self
3312 }
3313
3314 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3316 self.database = v.into();
3317 self
3318 }
3319
3320 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3322 mut self,
3323 v: T,
3324 ) -> Self {
3325 self.secret_manager_stored_password = v.into();
3326 self
3327 }
3328}
3329
3330impl wkt::message::Message for SqlServerProfile {
3331 fn typename() -> &'static str {
3332 "type.googleapis.com/google.cloud.datastream.v1.SqlServerProfile"
3333 }
3334}
3335
3336#[derive(Clone, Default, PartialEq)]
3338#[non_exhaustive]
3339pub struct SalesforceProfile {
3340 pub domain: std::string::String,
3342
3343 pub credentials: std::option::Option<crate::model::salesforce_profile::Credentials>,
3345
3346 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3347}
3348
3349impl SalesforceProfile {
3350 pub fn new() -> Self {
3351 std::default::Default::default()
3352 }
3353
3354 pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3356 self.domain = v.into();
3357 self
3358 }
3359
3360 pub fn set_credentials<
3365 T: std::convert::Into<std::option::Option<crate::model::salesforce_profile::Credentials>>,
3366 >(
3367 mut self,
3368 v: T,
3369 ) -> Self {
3370 self.credentials = v.into();
3371 self
3372 }
3373
3374 pub fn user_credentials(
3378 &self,
3379 ) -> std::option::Option<&std::boxed::Box<crate::model::salesforce_profile::UserCredentials>>
3380 {
3381 #[allow(unreachable_patterns)]
3382 self.credentials.as_ref().and_then(|v| match v {
3383 crate::model::salesforce_profile::Credentials::UserCredentials(v) => {
3384 std::option::Option::Some(v)
3385 }
3386 _ => std::option::Option::None,
3387 })
3388 }
3389
3390 pub fn set_user_credentials<
3396 T: std::convert::Into<std::boxed::Box<crate::model::salesforce_profile::UserCredentials>>,
3397 >(
3398 mut self,
3399 v: T,
3400 ) -> Self {
3401 self.credentials = std::option::Option::Some(
3402 crate::model::salesforce_profile::Credentials::UserCredentials(v.into()),
3403 );
3404 self
3405 }
3406
3407 pub fn oauth2_client_credentials(
3411 &self,
3412 ) -> std::option::Option<
3413 &std::boxed::Box<crate::model::salesforce_profile::Oauth2ClientCredentials>,
3414 > {
3415 #[allow(unreachable_patterns)]
3416 self.credentials.as_ref().and_then(|v| match v {
3417 crate::model::salesforce_profile::Credentials::Oauth2ClientCredentials(v) => {
3418 std::option::Option::Some(v)
3419 }
3420 _ => std::option::Option::None,
3421 })
3422 }
3423
3424 pub fn set_oauth2_client_credentials<
3430 T: std::convert::Into<
3431 std::boxed::Box<crate::model::salesforce_profile::Oauth2ClientCredentials>,
3432 >,
3433 >(
3434 mut self,
3435 v: T,
3436 ) -> Self {
3437 self.credentials = std::option::Option::Some(
3438 crate::model::salesforce_profile::Credentials::Oauth2ClientCredentials(v.into()),
3439 );
3440 self
3441 }
3442}
3443
3444impl wkt::message::Message for SalesforceProfile {
3445 fn typename() -> &'static str {
3446 "type.googleapis.com/google.cloud.datastream.v1.SalesforceProfile"
3447 }
3448}
3449
3450pub mod salesforce_profile {
3452 #[allow(unused_imports)]
3453 use super::*;
3454
3455 #[derive(Clone, Default, PartialEq)]
3457 #[non_exhaustive]
3458 pub struct UserCredentials {
3459 pub username: std::string::String,
3461
3462 pub password: std::string::String,
3465
3466 pub security_token: std::string::String,
3469
3470 pub secret_manager_stored_password: std::string::String,
3474
3475 pub secret_manager_stored_security_token: std::string::String,
3479
3480 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3481 }
3482
3483 impl UserCredentials {
3484 pub fn new() -> Self {
3485 std::default::Default::default()
3486 }
3487
3488 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3490 self.username = v.into();
3491 self
3492 }
3493
3494 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3496 self.password = v.into();
3497 self
3498 }
3499
3500 pub fn set_security_token<T: std::convert::Into<std::string::String>>(
3502 mut self,
3503 v: T,
3504 ) -> Self {
3505 self.security_token = v.into();
3506 self
3507 }
3508
3509 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3511 mut self,
3512 v: T,
3513 ) -> Self {
3514 self.secret_manager_stored_password = v.into();
3515 self
3516 }
3517
3518 pub fn set_secret_manager_stored_security_token<
3520 T: std::convert::Into<std::string::String>,
3521 >(
3522 mut self,
3523 v: T,
3524 ) -> Self {
3525 self.secret_manager_stored_security_token = v.into();
3526 self
3527 }
3528 }
3529
3530 impl wkt::message::Message for UserCredentials {
3531 fn typename() -> &'static str {
3532 "type.googleapis.com/google.cloud.datastream.v1.SalesforceProfile.UserCredentials"
3533 }
3534 }
3535
3536 #[derive(Clone, Default, PartialEq)]
3538 #[non_exhaustive]
3539 pub struct Oauth2ClientCredentials {
3540 pub client_id: std::string::String,
3542
3543 pub client_secret: std::string::String,
3546
3547 pub secret_manager_stored_client_secret: std::string::String,
3551
3552 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3553 }
3554
3555 impl Oauth2ClientCredentials {
3556 pub fn new() -> Self {
3557 std::default::Default::default()
3558 }
3559
3560 pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3562 self.client_id = v.into();
3563 self
3564 }
3565
3566 pub fn set_client_secret<T: std::convert::Into<std::string::String>>(
3568 mut self,
3569 v: T,
3570 ) -> Self {
3571 self.client_secret = v.into();
3572 self
3573 }
3574
3575 pub fn set_secret_manager_stored_client_secret<
3577 T: std::convert::Into<std::string::String>,
3578 >(
3579 mut self,
3580 v: T,
3581 ) -> Self {
3582 self.secret_manager_stored_client_secret = v.into();
3583 self
3584 }
3585 }
3586
3587 impl wkt::message::Message for Oauth2ClientCredentials {
3588 fn typename() -> &'static str {
3589 "type.googleapis.com/google.cloud.datastream.v1.SalesforceProfile.Oauth2ClientCredentials"
3590 }
3591 }
3592
3593 #[derive(Clone, Debug, PartialEq)]
3595 #[non_exhaustive]
3596 pub enum Credentials {
3597 UserCredentials(std::boxed::Box<crate::model::salesforce_profile::UserCredentials>),
3599 Oauth2ClientCredentials(
3601 std::boxed::Box<crate::model::salesforce_profile::Oauth2ClientCredentials>,
3602 ),
3603 }
3604}
3605
3606#[derive(Clone, Default, PartialEq)]
3608#[non_exhaustive]
3609pub struct MongodbProfile {
3610 pub host_addresses: std::vec::Vec<crate::model::HostAddress>,
3615
3616 pub replica_set: std::string::String,
3620
3621 pub username: std::string::String,
3623
3624 pub password: std::string::String,
3627
3628 pub secret_manager_stored_password: std::string::String,
3632
3633 pub ssl_config: std::option::Option<crate::model::MongodbSslConfig>,
3635
3636 pub mongodb_connection_format:
3639 std::option::Option<crate::model::mongodb_profile::MongodbConnectionFormat>,
3640
3641 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3642}
3643
3644impl MongodbProfile {
3645 pub fn new() -> Self {
3646 std::default::Default::default()
3647 }
3648
3649 pub fn set_host_addresses<T, V>(mut self, v: T) -> Self
3651 where
3652 T: std::iter::IntoIterator<Item = V>,
3653 V: std::convert::Into<crate::model::HostAddress>,
3654 {
3655 use std::iter::Iterator;
3656 self.host_addresses = v.into_iter().map(|i| i.into()).collect();
3657 self
3658 }
3659
3660 pub fn set_replica_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3662 self.replica_set = v.into();
3663 self
3664 }
3665
3666 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3668 self.username = v.into();
3669 self
3670 }
3671
3672 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3674 self.password = v.into();
3675 self
3676 }
3677
3678 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3680 mut self,
3681 v: T,
3682 ) -> Self {
3683 self.secret_manager_stored_password = v.into();
3684 self
3685 }
3686
3687 pub fn set_ssl_config<T>(mut self, v: T) -> Self
3689 where
3690 T: std::convert::Into<crate::model::MongodbSslConfig>,
3691 {
3692 self.ssl_config = std::option::Option::Some(v.into());
3693 self
3694 }
3695
3696 pub fn set_or_clear_ssl_config<T>(mut self, v: std::option::Option<T>) -> Self
3698 where
3699 T: std::convert::Into<crate::model::MongodbSslConfig>,
3700 {
3701 self.ssl_config = v.map(|x| x.into());
3702 self
3703 }
3704
3705 pub fn set_mongodb_connection_format<
3710 T: std::convert::Into<
3711 std::option::Option<crate::model::mongodb_profile::MongodbConnectionFormat>,
3712 >,
3713 >(
3714 mut self,
3715 v: T,
3716 ) -> Self {
3717 self.mongodb_connection_format = v.into();
3718 self
3719 }
3720
3721 pub fn srv_connection_format(
3725 &self,
3726 ) -> std::option::Option<&std::boxed::Box<crate::model::SrvConnectionFormat>> {
3727 #[allow(unreachable_patterns)]
3728 self.mongodb_connection_format
3729 .as_ref()
3730 .and_then(|v| match v {
3731 crate::model::mongodb_profile::MongodbConnectionFormat::SrvConnectionFormat(v) => {
3732 std::option::Option::Some(v)
3733 }
3734 _ => std::option::Option::None,
3735 })
3736 }
3737
3738 pub fn set_srv_connection_format<
3744 T: std::convert::Into<std::boxed::Box<crate::model::SrvConnectionFormat>>,
3745 >(
3746 mut self,
3747 v: T,
3748 ) -> Self {
3749 self.mongodb_connection_format = std::option::Option::Some(
3750 crate::model::mongodb_profile::MongodbConnectionFormat::SrvConnectionFormat(v.into()),
3751 );
3752 self
3753 }
3754
3755 pub fn standard_connection_format(
3759 &self,
3760 ) -> std::option::Option<&std::boxed::Box<crate::model::StandardConnectionFormat>> {
3761 #[allow(unreachable_patterns)]
3762 self.mongodb_connection_format.as_ref().and_then(|v| match v {
3763 crate::model::mongodb_profile::MongodbConnectionFormat::StandardConnectionFormat(v) => std::option::Option::Some(v),
3764 _ => std::option::Option::None,
3765 })
3766 }
3767
3768 pub fn set_standard_connection_format<
3774 T: std::convert::Into<std::boxed::Box<crate::model::StandardConnectionFormat>>,
3775 >(
3776 mut self,
3777 v: T,
3778 ) -> Self {
3779 self.mongodb_connection_format = std::option::Option::Some(
3780 crate::model::mongodb_profile::MongodbConnectionFormat::StandardConnectionFormat(
3781 v.into(),
3782 ),
3783 );
3784 self
3785 }
3786}
3787
3788impl wkt::message::Message for MongodbProfile {
3789 fn typename() -> &'static str {
3790 "type.googleapis.com/google.cloud.datastream.v1.MongodbProfile"
3791 }
3792}
3793
3794pub mod mongodb_profile {
3796 #[allow(unused_imports)]
3797 use super::*;
3798
3799 #[derive(Clone, Debug, PartialEq)]
3802 #[non_exhaustive]
3803 pub enum MongodbConnectionFormat {
3804 SrvConnectionFormat(std::boxed::Box<crate::model::SrvConnectionFormat>),
3806 StandardConnectionFormat(std::boxed::Box<crate::model::StandardConnectionFormat>),
3808 }
3809}
3810
3811#[derive(Clone, Default, PartialEq)]
3814#[non_exhaustive]
3815pub struct HostAddress {
3816 pub hostname: std::string::String,
3818
3819 pub port: i32,
3821
3822 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3823}
3824
3825impl HostAddress {
3826 pub fn new() -> Self {
3827 std::default::Default::default()
3828 }
3829
3830 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3832 self.hostname = v.into();
3833 self
3834 }
3835
3836 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3838 self.port = v.into();
3839 self
3840 }
3841}
3842
3843impl wkt::message::Message for HostAddress {
3844 fn typename() -> &'static str {
3845 "type.googleapis.com/google.cloud.datastream.v1.HostAddress"
3846 }
3847}
3848
3849#[derive(Clone, Default, PartialEq)]
3851#[non_exhaustive]
3852pub struct SrvConnectionFormat {
3853 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3854}
3855
3856impl SrvConnectionFormat {
3857 pub fn new() -> Self {
3858 std::default::Default::default()
3859 }
3860}
3861
3862impl wkt::message::Message for SrvConnectionFormat {
3863 fn typename() -> &'static str {
3864 "type.googleapis.com/google.cloud.datastream.v1.SrvConnectionFormat"
3865 }
3866}
3867
3868#[derive(Clone, Default, PartialEq)]
3870#[non_exhaustive]
3871pub struct StandardConnectionFormat {
3872 pub direct_connection: bool,
3875
3876 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3877}
3878
3879impl StandardConnectionFormat {
3880 pub fn new() -> Self {
3881 std::default::Default::default()
3882 }
3883
3884 pub fn set_direct_connection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3886 self.direct_connection = v.into();
3887 self
3888 }
3889}
3890
3891impl wkt::message::Message for StandardConnectionFormat {
3892 fn typename() -> &'static str {
3893 "type.googleapis.com/google.cloud.datastream.v1.StandardConnectionFormat"
3894 }
3895}
3896
3897#[derive(Clone, Default, PartialEq)]
3899#[non_exhaustive]
3900pub struct GcsProfile {
3901 pub bucket: std::string::String,
3903
3904 pub root_path: std::string::String,
3906
3907 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3908}
3909
3910impl GcsProfile {
3911 pub fn new() -> Self {
3912 std::default::Default::default()
3913 }
3914
3915 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3917 self.bucket = v.into();
3918 self
3919 }
3920
3921 pub fn set_root_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3923 self.root_path = v.into();
3924 self
3925 }
3926}
3927
3928impl wkt::message::Message for GcsProfile {
3929 fn typename() -> &'static str {
3930 "type.googleapis.com/google.cloud.datastream.v1.GcsProfile"
3931 }
3932}
3933
3934#[derive(Clone, Default, PartialEq)]
3936#[non_exhaustive]
3937pub struct BigQueryProfile {
3938 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3939}
3940
3941impl BigQueryProfile {
3942 pub fn new() -> Self {
3943 std::default::Default::default()
3944 }
3945}
3946
3947impl wkt::message::Message for BigQueryProfile {
3948 fn typename() -> &'static str {
3949 "type.googleapis.com/google.cloud.datastream.v1.BigQueryProfile"
3950 }
3951}
3952
3953#[derive(Clone, Default, PartialEq)]
3957#[non_exhaustive]
3958pub struct StaticServiceIpConnectivity {
3959 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3960}
3961
3962impl StaticServiceIpConnectivity {
3963 pub fn new() -> Self {
3964 std::default::Default::default()
3965 }
3966}
3967
3968impl wkt::message::Message for StaticServiceIpConnectivity {
3969 fn typename() -> &'static str {
3970 "type.googleapis.com/google.cloud.datastream.v1.StaticServiceIpConnectivity"
3971 }
3972}
3973
3974#[derive(Clone, Default, PartialEq)]
3976#[non_exhaustive]
3977pub struct ForwardSshTunnelConnectivity {
3978 pub hostname: std::string::String,
3980
3981 pub username: std::string::String,
3983
3984 pub port: i32,
3986
3987 pub authentication_method:
3988 std::option::Option<crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod>,
3989
3990 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3991}
3992
3993impl ForwardSshTunnelConnectivity {
3994 pub fn new() -> Self {
3995 std::default::Default::default()
3996 }
3997
3998 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4000 self.hostname = v.into();
4001 self
4002 }
4003
4004 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4006 self.username = v.into();
4007 self
4008 }
4009
4010 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4012 self.port = v.into();
4013 self
4014 }
4015
4016 pub fn set_authentication_method<
4021 T: std::convert::Into<
4022 std::option::Option<
4023 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod,
4024 >,
4025 >,
4026 >(
4027 mut self,
4028 v: T,
4029 ) -> Self {
4030 self.authentication_method = v.into();
4031 self
4032 }
4033
4034 pub fn password(&self) -> std::option::Option<&std::string::String> {
4038 #[allow(unreachable_patterns)]
4039 self.authentication_method.as_ref().and_then(|v| match v {
4040 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::Password(v) => {
4041 std::option::Option::Some(v)
4042 }
4043 _ => std::option::Option::None,
4044 })
4045 }
4046
4047 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4053 self.authentication_method = std::option::Option::Some(
4054 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::Password(v.into()),
4055 );
4056 self
4057 }
4058
4059 pub fn private_key(&self) -> std::option::Option<&std::string::String> {
4063 #[allow(unreachable_patterns)]
4064 self.authentication_method.as_ref().and_then(|v| match v {
4065 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::PrivateKey(v) => {
4066 std::option::Option::Some(v)
4067 }
4068 _ => std::option::Option::None,
4069 })
4070 }
4071
4072 pub fn set_private_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4078 self.authentication_method = std::option::Option::Some(
4079 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::PrivateKey(
4080 v.into(),
4081 ),
4082 );
4083 self
4084 }
4085}
4086
4087impl wkt::message::Message for ForwardSshTunnelConnectivity {
4088 fn typename() -> &'static str {
4089 "type.googleapis.com/google.cloud.datastream.v1.ForwardSshTunnelConnectivity"
4090 }
4091}
4092
4093pub mod forward_ssh_tunnel_connectivity {
4095 #[allow(unused_imports)]
4096 use super::*;
4097
4098 #[derive(Clone, Debug, PartialEq)]
4099 #[non_exhaustive]
4100 pub enum AuthenticationMethod {
4101 Password(std::string::String),
4103 PrivateKey(std::string::String),
4105 }
4106}
4107
4108#[derive(Clone, Default, PartialEq)]
4111#[non_exhaustive]
4112pub struct VpcPeeringConfig {
4113 pub vpc: std::string::String,
4116
4117 pub subnet: std::string::String,
4119
4120 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4121}
4122
4123impl VpcPeeringConfig {
4124 pub fn new() -> Self {
4125 std::default::Default::default()
4126 }
4127
4128 pub fn set_vpc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4130 self.vpc = v.into();
4131 self
4132 }
4133
4134 pub fn set_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4136 self.subnet = v.into();
4137 self
4138 }
4139}
4140
4141impl wkt::message::Message for VpcPeeringConfig {
4142 fn typename() -> &'static str {
4143 "type.googleapis.com/google.cloud.datastream.v1.VpcPeeringConfig"
4144 }
4145}
4146
4147#[derive(Clone, Default, PartialEq)]
4150#[non_exhaustive]
4151pub struct PscInterfaceConfig {
4152 pub network_attachment: std::string::String,
4156
4157 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4158}
4159
4160impl PscInterfaceConfig {
4161 pub fn new() -> Self {
4162 std::default::Default::default()
4163 }
4164
4165 pub fn set_network_attachment<T: std::convert::Into<std::string::String>>(
4167 mut self,
4168 v: T,
4169 ) -> Self {
4170 self.network_attachment = v.into();
4171 self
4172 }
4173}
4174
4175impl wkt::message::Message for PscInterfaceConfig {
4176 fn typename() -> &'static str {
4177 "type.googleapis.com/google.cloud.datastream.v1.PscInterfaceConfig"
4178 }
4179}
4180
4181#[derive(Clone, Default, PartialEq)]
4184#[non_exhaustive]
4185pub struct PrivateConnection {
4186 pub name: std::string::String,
4188
4189 pub create_time: std::option::Option<wkt::Timestamp>,
4191
4192 pub update_time: std::option::Option<wkt::Timestamp>,
4194
4195 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4197
4198 pub display_name: std::string::String,
4200
4201 pub state: crate::model::private_connection::State,
4203
4204 pub error: std::option::Option<crate::model::Error>,
4207
4208 pub satisfies_pzs: std::option::Option<bool>,
4210
4211 pub satisfies_pzi: std::option::Option<bool>,
4213
4214 pub vpc_peering_config: std::option::Option<crate::model::VpcPeeringConfig>,
4216
4217 pub psc_interface_config: std::option::Option<crate::model::PscInterfaceConfig>,
4219
4220 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4221}
4222
4223impl PrivateConnection {
4224 pub fn new() -> Self {
4225 std::default::Default::default()
4226 }
4227
4228 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4230 self.name = v.into();
4231 self
4232 }
4233
4234 pub fn set_create_time<T>(mut self, v: T) -> Self
4236 where
4237 T: std::convert::Into<wkt::Timestamp>,
4238 {
4239 self.create_time = std::option::Option::Some(v.into());
4240 self
4241 }
4242
4243 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4245 where
4246 T: std::convert::Into<wkt::Timestamp>,
4247 {
4248 self.create_time = v.map(|x| x.into());
4249 self
4250 }
4251
4252 pub fn set_update_time<T>(mut self, v: T) -> Self
4254 where
4255 T: std::convert::Into<wkt::Timestamp>,
4256 {
4257 self.update_time = std::option::Option::Some(v.into());
4258 self
4259 }
4260
4261 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4263 where
4264 T: std::convert::Into<wkt::Timestamp>,
4265 {
4266 self.update_time = v.map(|x| x.into());
4267 self
4268 }
4269
4270 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4272 where
4273 T: std::iter::IntoIterator<Item = (K, V)>,
4274 K: std::convert::Into<std::string::String>,
4275 V: std::convert::Into<std::string::String>,
4276 {
4277 use std::iter::Iterator;
4278 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4279 self
4280 }
4281
4282 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4284 self.display_name = v.into();
4285 self
4286 }
4287
4288 pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
4290 mut self,
4291 v: T,
4292 ) -> Self {
4293 self.state = v.into();
4294 self
4295 }
4296
4297 pub fn set_error<T>(mut self, v: T) -> Self
4299 where
4300 T: std::convert::Into<crate::model::Error>,
4301 {
4302 self.error = std::option::Option::Some(v.into());
4303 self
4304 }
4305
4306 pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
4308 where
4309 T: std::convert::Into<crate::model::Error>,
4310 {
4311 self.error = v.map(|x| x.into());
4312 self
4313 }
4314
4315 pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
4317 where
4318 T: std::convert::Into<bool>,
4319 {
4320 self.satisfies_pzs = std::option::Option::Some(v.into());
4321 self
4322 }
4323
4324 pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
4326 where
4327 T: std::convert::Into<bool>,
4328 {
4329 self.satisfies_pzs = v.map(|x| x.into());
4330 self
4331 }
4332
4333 pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
4335 where
4336 T: std::convert::Into<bool>,
4337 {
4338 self.satisfies_pzi = std::option::Option::Some(v.into());
4339 self
4340 }
4341
4342 pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
4344 where
4345 T: std::convert::Into<bool>,
4346 {
4347 self.satisfies_pzi = v.map(|x| x.into());
4348 self
4349 }
4350
4351 pub fn set_vpc_peering_config<T>(mut self, v: T) -> Self
4353 where
4354 T: std::convert::Into<crate::model::VpcPeeringConfig>,
4355 {
4356 self.vpc_peering_config = std::option::Option::Some(v.into());
4357 self
4358 }
4359
4360 pub fn set_or_clear_vpc_peering_config<T>(mut self, v: std::option::Option<T>) -> Self
4362 where
4363 T: std::convert::Into<crate::model::VpcPeeringConfig>,
4364 {
4365 self.vpc_peering_config = v.map(|x| x.into());
4366 self
4367 }
4368
4369 pub fn set_psc_interface_config<T>(mut self, v: T) -> Self
4371 where
4372 T: std::convert::Into<crate::model::PscInterfaceConfig>,
4373 {
4374 self.psc_interface_config = std::option::Option::Some(v.into());
4375 self
4376 }
4377
4378 pub fn set_or_clear_psc_interface_config<T>(mut self, v: std::option::Option<T>) -> Self
4380 where
4381 T: std::convert::Into<crate::model::PscInterfaceConfig>,
4382 {
4383 self.psc_interface_config = v.map(|x| x.into());
4384 self
4385 }
4386}
4387
4388impl wkt::message::Message for PrivateConnection {
4389 fn typename() -> &'static str {
4390 "type.googleapis.com/google.cloud.datastream.v1.PrivateConnection"
4391 }
4392}
4393
4394pub mod private_connection {
4396 #[allow(unused_imports)]
4397 use super::*;
4398
4399 #[derive(Clone, Debug, PartialEq)]
4415 #[non_exhaustive]
4416 pub enum State {
4417 Unspecified,
4419 Creating,
4421 Created,
4423 Failed,
4425 Deleting,
4427 FailedToDelete,
4429 UnknownValue(state::UnknownValue),
4434 }
4435
4436 #[doc(hidden)]
4437 pub mod state {
4438 #[allow(unused_imports)]
4439 use super::*;
4440 #[derive(Clone, Debug, PartialEq)]
4441 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4442 }
4443
4444 impl State {
4445 pub fn value(&self) -> std::option::Option<i32> {
4450 match self {
4451 Self::Unspecified => std::option::Option::Some(0),
4452 Self::Creating => std::option::Option::Some(1),
4453 Self::Created => std::option::Option::Some(2),
4454 Self::Failed => std::option::Option::Some(3),
4455 Self::Deleting => std::option::Option::Some(4),
4456 Self::FailedToDelete => std::option::Option::Some(5),
4457 Self::UnknownValue(u) => u.0.value(),
4458 }
4459 }
4460
4461 pub fn name(&self) -> std::option::Option<&str> {
4466 match self {
4467 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
4468 Self::Creating => std::option::Option::Some("CREATING"),
4469 Self::Created => std::option::Option::Some("CREATED"),
4470 Self::Failed => std::option::Option::Some("FAILED"),
4471 Self::Deleting => std::option::Option::Some("DELETING"),
4472 Self::FailedToDelete => std::option::Option::Some("FAILED_TO_DELETE"),
4473 Self::UnknownValue(u) => u.0.name(),
4474 }
4475 }
4476 }
4477
4478 impl std::default::Default for State {
4479 fn default() -> Self {
4480 use std::convert::From;
4481 Self::from(0)
4482 }
4483 }
4484
4485 impl std::fmt::Display for State {
4486 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4487 wkt::internal::display_enum(f, self.name(), self.value())
4488 }
4489 }
4490
4491 impl std::convert::From<i32> for State {
4492 fn from(value: i32) -> Self {
4493 match value {
4494 0 => Self::Unspecified,
4495 1 => Self::Creating,
4496 2 => Self::Created,
4497 3 => Self::Failed,
4498 4 => Self::Deleting,
4499 5 => Self::FailedToDelete,
4500 _ => Self::UnknownValue(state::UnknownValue(
4501 wkt::internal::UnknownEnumValue::Integer(value),
4502 )),
4503 }
4504 }
4505 }
4506
4507 impl std::convert::From<&str> for State {
4508 fn from(value: &str) -> Self {
4509 use std::string::ToString;
4510 match value {
4511 "STATE_UNSPECIFIED" => Self::Unspecified,
4512 "CREATING" => Self::Creating,
4513 "CREATED" => Self::Created,
4514 "FAILED" => Self::Failed,
4515 "DELETING" => Self::Deleting,
4516 "FAILED_TO_DELETE" => Self::FailedToDelete,
4517 _ => Self::UnknownValue(state::UnknownValue(
4518 wkt::internal::UnknownEnumValue::String(value.to_string()),
4519 )),
4520 }
4521 }
4522 }
4523
4524 impl serde::ser::Serialize for State {
4525 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4526 where
4527 S: serde::Serializer,
4528 {
4529 match self {
4530 Self::Unspecified => serializer.serialize_i32(0),
4531 Self::Creating => serializer.serialize_i32(1),
4532 Self::Created => serializer.serialize_i32(2),
4533 Self::Failed => serializer.serialize_i32(3),
4534 Self::Deleting => serializer.serialize_i32(4),
4535 Self::FailedToDelete => serializer.serialize_i32(5),
4536 Self::UnknownValue(u) => u.0.serialize(serializer),
4537 }
4538 }
4539 }
4540
4541 impl<'de> serde::de::Deserialize<'de> for State {
4542 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4543 where
4544 D: serde::Deserializer<'de>,
4545 {
4546 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
4547 ".google.cloud.datastream.v1.PrivateConnection.State",
4548 ))
4549 }
4550 }
4551}
4552
4553#[derive(Clone, Default, PartialEq)]
4555#[non_exhaustive]
4556pub struct PrivateConnectivity {
4557 pub private_connection: std::string::String,
4560
4561 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4562}
4563
4564impl PrivateConnectivity {
4565 pub fn new() -> Self {
4566 std::default::Default::default()
4567 }
4568
4569 pub fn set_private_connection<T: std::convert::Into<std::string::String>>(
4571 mut self,
4572 v: T,
4573 ) -> Self {
4574 self.private_connection = v.into();
4575 self
4576 }
4577}
4578
4579impl wkt::message::Message for PrivateConnectivity {
4580 fn typename() -> &'static str {
4581 "type.googleapis.com/google.cloud.datastream.v1.PrivateConnectivity"
4582 }
4583}
4584
4585#[derive(Clone, Default, PartialEq)]
4588#[non_exhaustive]
4589pub struct Route {
4590 pub name: std::string::String,
4592
4593 pub create_time: std::option::Option<wkt::Timestamp>,
4595
4596 pub update_time: std::option::Option<wkt::Timestamp>,
4598
4599 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4601
4602 pub display_name: std::string::String,
4604
4605 pub destination_address: std::string::String,
4607
4608 pub destination_port: i32,
4610
4611 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4612}
4613
4614impl Route {
4615 pub fn new() -> Self {
4616 std::default::Default::default()
4617 }
4618
4619 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4621 self.name = v.into();
4622 self
4623 }
4624
4625 pub fn set_create_time<T>(mut self, v: T) -> Self
4627 where
4628 T: std::convert::Into<wkt::Timestamp>,
4629 {
4630 self.create_time = std::option::Option::Some(v.into());
4631 self
4632 }
4633
4634 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4636 where
4637 T: std::convert::Into<wkt::Timestamp>,
4638 {
4639 self.create_time = v.map(|x| x.into());
4640 self
4641 }
4642
4643 pub fn set_update_time<T>(mut self, v: T) -> Self
4645 where
4646 T: std::convert::Into<wkt::Timestamp>,
4647 {
4648 self.update_time = std::option::Option::Some(v.into());
4649 self
4650 }
4651
4652 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4654 where
4655 T: std::convert::Into<wkt::Timestamp>,
4656 {
4657 self.update_time = v.map(|x| x.into());
4658 self
4659 }
4660
4661 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4663 where
4664 T: std::iter::IntoIterator<Item = (K, V)>,
4665 K: std::convert::Into<std::string::String>,
4666 V: std::convert::Into<std::string::String>,
4667 {
4668 use std::iter::Iterator;
4669 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4670 self
4671 }
4672
4673 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4675 self.display_name = v.into();
4676 self
4677 }
4678
4679 pub fn set_destination_address<T: std::convert::Into<std::string::String>>(
4681 mut self,
4682 v: T,
4683 ) -> Self {
4684 self.destination_address = v.into();
4685 self
4686 }
4687
4688 pub fn set_destination_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4690 self.destination_port = v.into();
4691 self
4692 }
4693}
4694
4695impl wkt::message::Message for Route {
4696 fn typename() -> &'static str {
4697 "type.googleapis.com/google.cloud.datastream.v1.Route"
4698 }
4699}
4700
4701#[derive(Clone, Default, PartialEq)]
4703#[non_exhaustive]
4704pub struct MongodbSslConfig {
4705 pub client_key: std::string::String,
4709
4710 pub client_key_set: bool,
4712
4713 pub client_certificate: std::string::String,
4718
4719 pub client_certificate_set: bool,
4721
4722 pub ca_certificate: std::string::String,
4725
4726 pub ca_certificate_set: bool,
4728
4729 pub secret_manager_stored_client_key: std::string::String,
4734
4735 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4736}
4737
4738impl MongodbSslConfig {
4739 pub fn new() -> Self {
4740 std::default::Default::default()
4741 }
4742
4743 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4745 self.client_key = v.into();
4746 self
4747 }
4748
4749 pub fn set_client_key_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4751 self.client_key_set = v.into();
4752 self
4753 }
4754
4755 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
4757 mut self,
4758 v: T,
4759 ) -> Self {
4760 self.client_certificate = v.into();
4761 self
4762 }
4763
4764 pub fn set_client_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4766 self.client_certificate_set = v.into();
4767 self
4768 }
4769
4770 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4772 self.ca_certificate = v.into();
4773 self
4774 }
4775
4776 pub fn set_ca_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4778 self.ca_certificate_set = v.into();
4779 self
4780 }
4781
4782 pub fn set_secret_manager_stored_client_key<T: std::convert::Into<std::string::String>>(
4784 mut self,
4785 v: T,
4786 ) -> Self {
4787 self.secret_manager_stored_client_key = v.into();
4788 self
4789 }
4790}
4791
4792impl wkt::message::Message for MongodbSslConfig {
4793 fn typename() -> &'static str {
4794 "type.googleapis.com/google.cloud.datastream.v1.MongodbSslConfig"
4795 }
4796}
4797
4798#[derive(Clone, Default, PartialEq)]
4800#[non_exhaustive]
4801pub struct MysqlSslConfig {
4802 pub client_key: std::string::String,
4806
4807 pub client_key_set: bool,
4809
4810 pub client_certificate: std::string::String,
4815
4816 pub client_certificate_set: bool,
4818
4819 pub ca_certificate: std::string::String,
4822
4823 pub ca_certificate_set: bool,
4825
4826 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4827}
4828
4829impl MysqlSslConfig {
4830 pub fn new() -> Self {
4831 std::default::Default::default()
4832 }
4833
4834 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4836 self.client_key = v.into();
4837 self
4838 }
4839
4840 pub fn set_client_key_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4842 self.client_key_set = v.into();
4843 self
4844 }
4845
4846 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
4848 mut self,
4849 v: T,
4850 ) -> Self {
4851 self.client_certificate = v.into();
4852 self
4853 }
4854
4855 pub fn set_client_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4857 self.client_certificate_set = v.into();
4858 self
4859 }
4860
4861 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4863 self.ca_certificate = v.into();
4864 self
4865 }
4866
4867 pub fn set_ca_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4869 self.ca_certificate_set = v.into();
4870 self
4871 }
4872}
4873
4874impl wkt::message::Message for MysqlSslConfig {
4875 fn typename() -> &'static str {
4876 "type.googleapis.com/google.cloud.datastream.v1.MysqlSslConfig"
4877 }
4878}
4879
4880#[derive(Clone, Default, PartialEq)]
4882#[non_exhaustive]
4883pub struct OracleSslConfig {
4884 pub ca_certificate: std::string::String,
4887
4888 pub ca_certificate_set: bool,
4891
4892 pub server_certificate_distinguished_name: std::string::String,
4898
4899 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4900}
4901
4902impl OracleSslConfig {
4903 pub fn new() -> Self {
4904 std::default::Default::default()
4905 }
4906
4907 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4909 self.ca_certificate = v.into();
4910 self
4911 }
4912
4913 pub fn set_ca_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4915 self.ca_certificate_set = v.into();
4916 self
4917 }
4918
4919 pub fn set_server_certificate_distinguished_name<T: std::convert::Into<std::string::String>>(
4921 mut self,
4922 v: T,
4923 ) -> Self {
4924 self.server_certificate_distinguished_name = v.into();
4925 self
4926 }
4927}
4928
4929impl wkt::message::Message for OracleSslConfig {
4930 fn typename() -> &'static str {
4931 "type.googleapis.com/google.cloud.datastream.v1.OracleSslConfig"
4932 }
4933}
4934
4935#[derive(Clone, Default, PartialEq)]
4937#[non_exhaustive]
4938pub struct PostgresqlSslConfig {
4939 pub encryption_setting:
4944 std::option::Option<crate::model::postgresql_ssl_config::EncryptionSetting>,
4945
4946 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4947}
4948
4949impl PostgresqlSslConfig {
4950 pub fn new() -> Self {
4951 std::default::Default::default()
4952 }
4953
4954 pub fn set_encryption_setting<
4959 T: std::convert::Into<
4960 std::option::Option<crate::model::postgresql_ssl_config::EncryptionSetting>,
4961 >,
4962 >(
4963 mut self,
4964 v: T,
4965 ) -> Self {
4966 self.encryption_setting = v.into();
4967 self
4968 }
4969
4970 pub fn server_verification(
4974 &self,
4975 ) -> std::option::Option<
4976 &std::boxed::Box<crate::model::postgresql_ssl_config::ServerVerification>,
4977 > {
4978 #[allow(unreachable_patterns)]
4979 self.encryption_setting.as_ref().and_then(|v| match v {
4980 crate::model::postgresql_ssl_config::EncryptionSetting::ServerVerification(v) => {
4981 std::option::Option::Some(v)
4982 }
4983 _ => std::option::Option::None,
4984 })
4985 }
4986
4987 pub fn set_server_verification<
4993 T: std::convert::Into<
4994 std::boxed::Box<crate::model::postgresql_ssl_config::ServerVerification>,
4995 >,
4996 >(
4997 mut self,
4998 v: T,
4999 ) -> Self {
5000 self.encryption_setting = std::option::Option::Some(
5001 crate::model::postgresql_ssl_config::EncryptionSetting::ServerVerification(v.into()),
5002 );
5003 self
5004 }
5005
5006 pub fn server_and_client_verification(
5010 &self,
5011 ) -> std::option::Option<
5012 &std::boxed::Box<crate::model::postgresql_ssl_config::ServerAndClientVerification>,
5013 > {
5014 #[allow(unreachable_patterns)]
5015 self.encryption_setting.as_ref().and_then(|v| match v {
5016 crate::model::postgresql_ssl_config::EncryptionSetting::ServerAndClientVerification(
5017 v,
5018 ) => std::option::Option::Some(v),
5019 _ => std::option::Option::None,
5020 })
5021 }
5022
5023 pub fn set_server_and_client_verification<
5029 T: std::convert::Into<
5030 std::boxed::Box<crate::model::postgresql_ssl_config::ServerAndClientVerification>,
5031 >,
5032 >(
5033 mut self,
5034 v: T,
5035 ) -> Self {
5036 self.encryption_setting = std::option::Option::Some(
5037 crate::model::postgresql_ssl_config::EncryptionSetting::ServerAndClientVerification(
5038 v.into(),
5039 ),
5040 );
5041 self
5042 }
5043}
5044
5045impl wkt::message::Message for PostgresqlSslConfig {
5046 fn typename() -> &'static str {
5047 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSslConfig"
5048 }
5049}
5050
5051pub mod postgresql_ssl_config {
5053 #[allow(unused_imports)]
5054 use super::*;
5055
5056 #[derive(Clone, Default, PartialEq)]
5060 #[non_exhaustive]
5061 pub struct ServerVerification {
5062 pub ca_certificate: std::string::String,
5064
5065 pub server_certificate_hostname: std::string::String,
5069
5070 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5071 }
5072
5073 impl ServerVerification {
5074 pub fn new() -> Self {
5075 std::default::Default::default()
5076 }
5077
5078 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(
5080 mut self,
5081 v: T,
5082 ) -> Self {
5083 self.ca_certificate = v.into();
5084 self
5085 }
5086
5087 pub fn set_server_certificate_hostname<T: std::convert::Into<std::string::String>>(
5089 mut self,
5090 v: T,
5091 ) -> Self {
5092 self.server_certificate_hostname = v.into();
5093 self
5094 }
5095 }
5096
5097 impl wkt::message::Message for ServerVerification {
5098 fn typename() -> &'static str {
5099 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification"
5100 }
5101 }
5102
5103 #[derive(Clone, Default, PartialEq)]
5108 #[non_exhaustive]
5109 pub struct ServerAndClientVerification {
5110 pub client_certificate: std::string::String,
5117
5118 pub client_key: std::string::String,
5123
5124 pub ca_certificate: std::string::String,
5126
5127 pub server_certificate_hostname: std::string::String,
5131
5132 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5133 }
5134
5135 impl ServerAndClientVerification {
5136 pub fn new() -> Self {
5137 std::default::Default::default()
5138 }
5139
5140 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
5142 mut self,
5143 v: T,
5144 ) -> Self {
5145 self.client_certificate = v.into();
5146 self
5147 }
5148
5149 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5151 self.client_key = v.into();
5152 self
5153 }
5154
5155 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(
5157 mut self,
5158 v: T,
5159 ) -> Self {
5160 self.ca_certificate = v.into();
5161 self
5162 }
5163
5164 pub fn set_server_certificate_hostname<T: std::convert::Into<std::string::String>>(
5166 mut self,
5167 v: T,
5168 ) -> Self {
5169 self.server_certificate_hostname = v.into();
5170 self
5171 }
5172 }
5173
5174 impl wkt::message::Message for ServerAndClientVerification {
5175 fn typename() -> &'static str {
5176 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification"
5177 }
5178 }
5179
5180 #[derive(Clone, Debug, PartialEq)]
5185 #[non_exhaustive]
5186 pub enum EncryptionSetting {
5187 ServerVerification(
5190 std::boxed::Box<crate::model::postgresql_ssl_config::ServerVerification>,
5191 ),
5192 ServerAndClientVerification(
5196 std::boxed::Box<crate::model::postgresql_ssl_config::ServerAndClientVerification>,
5197 ),
5198 }
5199}
5200
5201#[derive(Clone, Default, PartialEq)]
5204#[non_exhaustive]
5205pub struct ConnectionProfile {
5206 pub name: std::string::String,
5208
5209 pub create_time: std::option::Option<wkt::Timestamp>,
5211
5212 pub update_time: std::option::Option<wkt::Timestamp>,
5214
5215 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5217
5218 pub display_name: std::string::String,
5220
5221 pub satisfies_pzs: std::option::Option<bool>,
5223
5224 pub satisfies_pzi: std::option::Option<bool>,
5226
5227 pub profile: std::option::Option<crate::model::connection_profile::Profile>,
5229
5230 pub connectivity: std::option::Option<crate::model::connection_profile::Connectivity>,
5232
5233 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5234}
5235
5236impl ConnectionProfile {
5237 pub fn new() -> Self {
5238 std::default::Default::default()
5239 }
5240
5241 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5243 self.name = v.into();
5244 self
5245 }
5246
5247 pub fn set_create_time<T>(mut self, v: T) -> Self
5249 where
5250 T: std::convert::Into<wkt::Timestamp>,
5251 {
5252 self.create_time = std::option::Option::Some(v.into());
5253 self
5254 }
5255
5256 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5258 where
5259 T: std::convert::Into<wkt::Timestamp>,
5260 {
5261 self.create_time = v.map(|x| x.into());
5262 self
5263 }
5264
5265 pub fn set_update_time<T>(mut self, v: T) -> Self
5267 where
5268 T: std::convert::Into<wkt::Timestamp>,
5269 {
5270 self.update_time = std::option::Option::Some(v.into());
5271 self
5272 }
5273
5274 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5276 where
5277 T: std::convert::Into<wkt::Timestamp>,
5278 {
5279 self.update_time = v.map(|x| x.into());
5280 self
5281 }
5282
5283 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5285 where
5286 T: std::iter::IntoIterator<Item = (K, V)>,
5287 K: std::convert::Into<std::string::String>,
5288 V: std::convert::Into<std::string::String>,
5289 {
5290 use std::iter::Iterator;
5291 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5292 self
5293 }
5294
5295 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5297 self.display_name = v.into();
5298 self
5299 }
5300
5301 pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
5303 where
5304 T: std::convert::Into<bool>,
5305 {
5306 self.satisfies_pzs = std::option::Option::Some(v.into());
5307 self
5308 }
5309
5310 pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
5312 where
5313 T: std::convert::Into<bool>,
5314 {
5315 self.satisfies_pzs = v.map(|x| x.into());
5316 self
5317 }
5318
5319 pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
5321 where
5322 T: std::convert::Into<bool>,
5323 {
5324 self.satisfies_pzi = std::option::Option::Some(v.into());
5325 self
5326 }
5327
5328 pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
5330 where
5331 T: std::convert::Into<bool>,
5332 {
5333 self.satisfies_pzi = v.map(|x| x.into());
5334 self
5335 }
5336
5337 pub fn set_profile<
5342 T: std::convert::Into<std::option::Option<crate::model::connection_profile::Profile>>,
5343 >(
5344 mut self,
5345 v: T,
5346 ) -> Self {
5347 self.profile = v.into();
5348 self
5349 }
5350
5351 pub fn oracle_profile(
5355 &self,
5356 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleProfile>> {
5357 #[allow(unreachable_patterns)]
5358 self.profile.as_ref().and_then(|v| match v {
5359 crate::model::connection_profile::Profile::OracleProfile(v) => {
5360 std::option::Option::Some(v)
5361 }
5362 _ => std::option::Option::None,
5363 })
5364 }
5365
5366 pub fn set_oracle_profile<
5372 T: std::convert::Into<std::boxed::Box<crate::model::OracleProfile>>,
5373 >(
5374 mut self,
5375 v: T,
5376 ) -> Self {
5377 self.profile = std::option::Option::Some(
5378 crate::model::connection_profile::Profile::OracleProfile(v.into()),
5379 );
5380 self
5381 }
5382
5383 pub fn gcs_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcsProfile>> {
5387 #[allow(unreachable_patterns)]
5388 self.profile.as_ref().and_then(|v| match v {
5389 crate::model::connection_profile::Profile::GcsProfile(v) => {
5390 std::option::Option::Some(v)
5391 }
5392 _ => std::option::Option::None,
5393 })
5394 }
5395
5396 pub fn set_gcs_profile<T: std::convert::Into<std::boxed::Box<crate::model::GcsProfile>>>(
5402 mut self,
5403 v: T,
5404 ) -> Self {
5405 self.profile = std::option::Option::Some(
5406 crate::model::connection_profile::Profile::GcsProfile(v.into()),
5407 );
5408 self
5409 }
5410
5411 pub fn mysql_profile(
5415 &self,
5416 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlProfile>> {
5417 #[allow(unreachable_patterns)]
5418 self.profile.as_ref().and_then(|v| match v {
5419 crate::model::connection_profile::Profile::MysqlProfile(v) => {
5420 std::option::Option::Some(v)
5421 }
5422 _ => std::option::Option::None,
5423 })
5424 }
5425
5426 pub fn set_mysql_profile<T: std::convert::Into<std::boxed::Box<crate::model::MysqlProfile>>>(
5432 mut self,
5433 v: T,
5434 ) -> Self {
5435 self.profile = std::option::Option::Some(
5436 crate::model::connection_profile::Profile::MysqlProfile(v.into()),
5437 );
5438 self
5439 }
5440
5441 pub fn bigquery_profile(
5445 &self,
5446 ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryProfile>> {
5447 #[allow(unreachable_patterns)]
5448 self.profile.as_ref().and_then(|v| match v {
5449 crate::model::connection_profile::Profile::BigqueryProfile(v) => {
5450 std::option::Option::Some(v)
5451 }
5452 _ => std::option::Option::None,
5453 })
5454 }
5455
5456 pub fn set_bigquery_profile<
5462 T: std::convert::Into<std::boxed::Box<crate::model::BigQueryProfile>>,
5463 >(
5464 mut self,
5465 v: T,
5466 ) -> Self {
5467 self.profile = std::option::Option::Some(
5468 crate::model::connection_profile::Profile::BigqueryProfile(v.into()),
5469 );
5470 self
5471 }
5472
5473 pub fn postgresql_profile(
5477 &self,
5478 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlProfile>> {
5479 #[allow(unreachable_patterns)]
5480 self.profile.as_ref().and_then(|v| match v {
5481 crate::model::connection_profile::Profile::PostgresqlProfile(v) => {
5482 std::option::Option::Some(v)
5483 }
5484 _ => std::option::Option::None,
5485 })
5486 }
5487
5488 pub fn set_postgresql_profile<
5494 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlProfile>>,
5495 >(
5496 mut self,
5497 v: T,
5498 ) -> Self {
5499 self.profile = std::option::Option::Some(
5500 crate::model::connection_profile::Profile::PostgresqlProfile(v.into()),
5501 );
5502 self
5503 }
5504
5505 pub fn sql_server_profile(
5509 &self,
5510 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerProfile>> {
5511 #[allow(unreachable_patterns)]
5512 self.profile.as_ref().and_then(|v| match v {
5513 crate::model::connection_profile::Profile::SqlServerProfile(v) => {
5514 std::option::Option::Some(v)
5515 }
5516 _ => std::option::Option::None,
5517 })
5518 }
5519
5520 pub fn set_sql_server_profile<
5526 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerProfile>>,
5527 >(
5528 mut self,
5529 v: T,
5530 ) -> Self {
5531 self.profile = std::option::Option::Some(
5532 crate::model::connection_profile::Profile::SqlServerProfile(v.into()),
5533 );
5534 self
5535 }
5536
5537 pub fn salesforce_profile(
5541 &self,
5542 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceProfile>> {
5543 #[allow(unreachable_patterns)]
5544 self.profile.as_ref().and_then(|v| match v {
5545 crate::model::connection_profile::Profile::SalesforceProfile(v) => {
5546 std::option::Option::Some(v)
5547 }
5548 _ => std::option::Option::None,
5549 })
5550 }
5551
5552 pub fn set_salesforce_profile<
5558 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceProfile>>,
5559 >(
5560 mut self,
5561 v: T,
5562 ) -> Self {
5563 self.profile = std::option::Option::Some(
5564 crate::model::connection_profile::Profile::SalesforceProfile(v.into()),
5565 );
5566 self
5567 }
5568
5569 pub fn mongodb_profile(
5573 &self,
5574 ) -> std::option::Option<&std::boxed::Box<crate::model::MongodbProfile>> {
5575 #[allow(unreachable_patterns)]
5576 self.profile.as_ref().and_then(|v| match v {
5577 crate::model::connection_profile::Profile::MongodbProfile(v) => {
5578 std::option::Option::Some(v)
5579 }
5580 _ => std::option::Option::None,
5581 })
5582 }
5583
5584 pub fn set_mongodb_profile<
5590 T: std::convert::Into<std::boxed::Box<crate::model::MongodbProfile>>,
5591 >(
5592 mut self,
5593 v: T,
5594 ) -> Self {
5595 self.profile = std::option::Option::Some(
5596 crate::model::connection_profile::Profile::MongodbProfile(v.into()),
5597 );
5598 self
5599 }
5600
5601 pub fn set_connectivity<
5606 T: std::convert::Into<std::option::Option<crate::model::connection_profile::Connectivity>>,
5607 >(
5608 mut self,
5609 v: T,
5610 ) -> Self {
5611 self.connectivity = v.into();
5612 self
5613 }
5614
5615 pub fn static_service_ip_connectivity(
5619 &self,
5620 ) -> std::option::Option<&std::boxed::Box<crate::model::StaticServiceIpConnectivity>> {
5621 #[allow(unreachable_patterns)]
5622 self.connectivity.as_ref().and_then(|v| match v {
5623 crate::model::connection_profile::Connectivity::StaticServiceIpConnectivity(v) => {
5624 std::option::Option::Some(v)
5625 }
5626 _ => std::option::Option::None,
5627 })
5628 }
5629
5630 pub fn set_static_service_ip_connectivity<
5636 T: std::convert::Into<std::boxed::Box<crate::model::StaticServiceIpConnectivity>>,
5637 >(
5638 mut self,
5639 v: T,
5640 ) -> Self {
5641 self.connectivity = std::option::Option::Some(
5642 crate::model::connection_profile::Connectivity::StaticServiceIpConnectivity(v.into()),
5643 );
5644 self
5645 }
5646
5647 pub fn forward_ssh_connectivity(
5651 &self,
5652 ) -> std::option::Option<&std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>> {
5653 #[allow(unreachable_patterns)]
5654 self.connectivity.as_ref().and_then(|v| match v {
5655 crate::model::connection_profile::Connectivity::ForwardSshConnectivity(v) => {
5656 std::option::Option::Some(v)
5657 }
5658 _ => std::option::Option::None,
5659 })
5660 }
5661
5662 pub fn set_forward_ssh_connectivity<
5668 T: std::convert::Into<std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>>,
5669 >(
5670 mut self,
5671 v: T,
5672 ) -> Self {
5673 self.connectivity = std::option::Option::Some(
5674 crate::model::connection_profile::Connectivity::ForwardSshConnectivity(v.into()),
5675 );
5676 self
5677 }
5678
5679 pub fn private_connectivity(
5683 &self,
5684 ) -> std::option::Option<&std::boxed::Box<crate::model::PrivateConnectivity>> {
5685 #[allow(unreachable_patterns)]
5686 self.connectivity.as_ref().and_then(|v| match v {
5687 crate::model::connection_profile::Connectivity::PrivateConnectivity(v) => {
5688 std::option::Option::Some(v)
5689 }
5690 _ => std::option::Option::None,
5691 })
5692 }
5693
5694 pub fn set_private_connectivity<
5700 T: std::convert::Into<std::boxed::Box<crate::model::PrivateConnectivity>>,
5701 >(
5702 mut self,
5703 v: T,
5704 ) -> Self {
5705 self.connectivity = std::option::Option::Some(
5706 crate::model::connection_profile::Connectivity::PrivateConnectivity(v.into()),
5707 );
5708 self
5709 }
5710}
5711
5712impl wkt::message::Message for ConnectionProfile {
5713 fn typename() -> &'static str {
5714 "type.googleapis.com/google.cloud.datastream.v1.ConnectionProfile"
5715 }
5716}
5717
5718pub mod connection_profile {
5720 #[allow(unused_imports)]
5721 use super::*;
5722
5723 #[derive(Clone, Debug, PartialEq)]
5725 #[non_exhaustive]
5726 pub enum Profile {
5727 OracleProfile(std::boxed::Box<crate::model::OracleProfile>),
5729 GcsProfile(std::boxed::Box<crate::model::GcsProfile>),
5731 MysqlProfile(std::boxed::Box<crate::model::MysqlProfile>),
5733 BigqueryProfile(std::boxed::Box<crate::model::BigQueryProfile>),
5735 PostgresqlProfile(std::boxed::Box<crate::model::PostgresqlProfile>),
5737 SqlServerProfile(std::boxed::Box<crate::model::SqlServerProfile>),
5739 SalesforceProfile(std::boxed::Box<crate::model::SalesforceProfile>),
5741 MongodbProfile(std::boxed::Box<crate::model::MongodbProfile>),
5743 }
5744
5745 #[derive(Clone, Debug, PartialEq)]
5747 #[non_exhaustive]
5748 pub enum Connectivity {
5749 StaticServiceIpConnectivity(std::boxed::Box<crate::model::StaticServiceIpConnectivity>),
5751 ForwardSshConnectivity(std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>),
5753 PrivateConnectivity(std::boxed::Box<crate::model::PrivateConnectivity>),
5755 }
5756}
5757
5758#[derive(Clone, Default, PartialEq)]
5760#[non_exhaustive]
5761pub struct OracleColumn {
5762 pub column: std::string::String,
5764
5765 pub data_type: std::string::String,
5767
5768 pub length: i32,
5770
5771 pub precision: i32,
5773
5774 pub scale: i32,
5776
5777 pub encoding: std::string::String,
5779
5780 pub primary_key: bool,
5782
5783 pub nullable: bool,
5785
5786 pub ordinal_position: i32,
5788
5789 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5790}
5791
5792impl OracleColumn {
5793 pub fn new() -> Self {
5794 std::default::Default::default()
5795 }
5796
5797 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5799 self.column = v.into();
5800 self
5801 }
5802
5803 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5805 self.data_type = v.into();
5806 self
5807 }
5808
5809 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5811 self.length = v.into();
5812 self
5813 }
5814
5815 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5817 self.precision = v.into();
5818 self
5819 }
5820
5821 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5823 self.scale = v.into();
5824 self
5825 }
5826
5827 pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5829 self.encoding = v.into();
5830 self
5831 }
5832
5833 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5835 self.primary_key = v.into();
5836 self
5837 }
5838
5839 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5841 self.nullable = v.into();
5842 self
5843 }
5844
5845 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5847 self.ordinal_position = v.into();
5848 self
5849 }
5850}
5851
5852impl wkt::message::Message for OracleColumn {
5853 fn typename() -> &'static str {
5854 "type.googleapis.com/google.cloud.datastream.v1.OracleColumn"
5855 }
5856}
5857
5858#[derive(Clone, Default, PartialEq)]
5860#[non_exhaustive]
5861pub struct OracleTable {
5862 pub table: std::string::String,
5864
5865 pub oracle_columns: std::vec::Vec<crate::model::OracleColumn>,
5869
5870 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5871}
5872
5873impl OracleTable {
5874 pub fn new() -> Self {
5875 std::default::Default::default()
5876 }
5877
5878 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5880 self.table = v.into();
5881 self
5882 }
5883
5884 pub fn set_oracle_columns<T, V>(mut self, v: T) -> Self
5886 where
5887 T: std::iter::IntoIterator<Item = V>,
5888 V: std::convert::Into<crate::model::OracleColumn>,
5889 {
5890 use std::iter::Iterator;
5891 self.oracle_columns = v.into_iter().map(|i| i.into()).collect();
5892 self
5893 }
5894}
5895
5896impl wkt::message::Message for OracleTable {
5897 fn typename() -> &'static str {
5898 "type.googleapis.com/google.cloud.datastream.v1.OracleTable"
5899 }
5900}
5901
5902#[derive(Clone, Default, PartialEq)]
5904#[non_exhaustive]
5905pub struct OracleSchema {
5906 pub schema: std::string::String,
5908
5909 pub oracle_tables: std::vec::Vec<crate::model::OracleTable>,
5911
5912 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5913}
5914
5915impl OracleSchema {
5916 pub fn new() -> Self {
5917 std::default::Default::default()
5918 }
5919
5920 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5922 self.schema = v.into();
5923 self
5924 }
5925
5926 pub fn set_oracle_tables<T, V>(mut self, v: T) -> Self
5928 where
5929 T: std::iter::IntoIterator<Item = V>,
5930 V: std::convert::Into<crate::model::OracleTable>,
5931 {
5932 use std::iter::Iterator;
5933 self.oracle_tables = v.into_iter().map(|i| i.into()).collect();
5934 self
5935 }
5936}
5937
5938impl wkt::message::Message for OracleSchema {
5939 fn typename() -> &'static str {
5940 "type.googleapis.com/google.cloud.datastream.v1.OracleSchema"
5941 }
5942}
5943
5944#[derive(Clone, Default, PartialEq)]
5946#[non_exhaustive]
5947pub struct OracleRdbms {
5948 pub oracle_schemas: std::vec::Vec<crate::model::OracleSchema>,
5950
5951 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5952}
5953
5954impl OracleRdbms {
5955 pub fn new() -> Self {
5956 std::default::Default::default()
5957 }
5958
5959 pub fn set_oracle_schemas<T, V>(mut self, v: T) -> Self
5961 where
5962 T: std::iter::IntoIterator<Item = V>,
5963 V: std::convert::Into<crate::model::OracleSchema>,
5964 {
5965 use std::iter::Iterator;
5966 self.oracle_schemas = v.into_iter().map(|i| i.into()).collect();
5967 self
5968 }
5969}
5970
5971impl wkt::message::Message for OracleRdbms {
5972 fn typename() -> &'static str {
5973 "type.googleapis.com/google.cloud.datastream.v1.OracleRdbms"
5974 }
5975}
5976
5977#[derive(Clone, Default, PartialEq)]
5979#[non_exhaustive]
5980pub struct OracleSourceConfig {
5981 pub include_objects: std::option::Option<crate::model::OracleRdbms>,
5983
5984 pub exclude_objects: std::option::Option<crate::model::OracleRdbms>,
5986
5987 pub max_concurrent_cdc_tasks: i32,
5990
5991 pub max_concurrent_backfill_tasks: i32,
5994
5995 pub large_objects_handling:
5997 std::option::Option<crate::model::oracle_source_config::LargeObjectsHandling>,
5998
5999 pub cdc_method: std::option::Option<crate::model::oracle_source_config::CdcMethod>,
6001
6002 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6003}
6004
6005impl OracleSourceConfig {
6006 pub fn new() -> Self {
6007 std::default::Default::default()
6008 }
6009
6010 pub fn set_include_objects<T>(mut self, v: T) -> Self
6012 where
6013 T: std::convert::Into<crate::model::OracleRdbms>,
6014 {
6015 self.include_objects = std::option::Option::Some(v.into());
6016 self
6017 }
6018
6019 pub fn set_or_clear_include_objects<T>(mut self, v: std::option::Option<T>) -> Self
6021 where
6022 T: std::convert::Into<crate::model::OracleRdbms>,
6023 {
6024 self.include_objects = v.map(|x| x.into());
6025 self
6026 }
6027
6028 pub fn set_exclude_objects<T>(mut self, v: T) -> Self
6030 where
6031 T: std::convert::Into<crate::model::OracleRdbms>,
6032 {
6033 self.exclude_objects = std::option::Option::Some(v.into());
6034 self
6035 }
6036
6037 pub fn set_or_clear_exclude_objects<T>(mut self, v: std::option::Option<T>) -> Self
6039 where
6040 T: std::convert::Into<crate::model::OracleRdbms>,
6041 {
6042 self.exclude_objects = v.map(|x| x.into());
6043 self
6044 }
6045
6046 pub fn set_max_concurrent_cdc_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6048 self.max_concurrent_cdc_tasks = v.into();
6049 self
6050 }
6051
6052 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6054 self.max_concurrent_backfill_tasks = v.into();
6055 self
6056 }
6057
6058 pub fn set_large_objects_handling<
6063 T: std::convert::Into<
6064 std::option::Option<crate::model::oracle_source_config::LargeObjectsHandling>,
6065 >,
6066 >(
6067 mut self,
6068 v: T,
6069 ) -> Self {
6070 self.large_objects_handling = v.into();
6071 self
6072 }
6073
6074 pub fn drop_large_objects(
6078 &self,
6079 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::DropLargeObjects>>
6080 {
6081 #[allow(unreachable_patterns)]
6082 self.large_objects_handling.as_ref().and_then(|v| match v {
6083 crate::model::oracle_source_config::LargeObjectsHandling::DropLargeObjects(v) => {
6084 std::option::Option::Some(v)
6085 }
6086 _ => std::option::Option::None,
6087 })
6088 }
6089
6090 pub fn set_drop_large_objects<
6096 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::DropLargeObjects>>,
6097 >(
6098 mut self,
6099 v: T,
6100 ) -> Self {
6101 self.large_objects_handling = std::option::Option::Some(
6102 crate::model::oracle_source_config::LargeObjectsHandling::DropLargeObjects(v.into()),
6103 );
6104 self
6105 }
6106
6107 pub fn stream_large_objects(
6111 &self,
6112 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::StreamLargeObjects>>
6113 {
6114 #[allow(unreachable_patterns)]
6115 self.large_objects_handling.as_ref().and_then(|v| match v {
6116 crate::model::oracle_source_config::LargeObjectsHandling::StreamLargeObjects(v) => {
6117 std::option::Option::Some(v)
6118 }
6119 _ => std::option::Option::None,
6120 })
6121 }
6122
6123 pub fn set_stream_large_objects<
6129 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::StreamLargeObjects>>,
6130 >(
6131 mut self,
6132 v: T,
6133 ) -> Self {
6134 self.large_objects_handling = std::option::Option::Some(
6135 crate::model::oracle_source_config::LargeObjectsHandling::StreamLargeObjects(v.into()),
6136 );
6137 self
6138 }
6139
6140 pub fn set_cdc_method<
6145 T: std::convert::Into<std::option::Option<crate::model::oracle_source_config::CdcMethod>>,
6146 >(
6147 mut self,
6148 v: T,
6149 ) -> Self {
6150 self.cdc_method = v.into();
6151 self
6152 }
6153
6154 pub fn log_miner(
6158 &self,
6159 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::LogMiner>> {
6160 #[allow(unreachable_patterns)]
6161 self.cdc_method.as_ref().and_then(|v| match v {
6162 crate::model::oracle_source_config::CdcMethod::LogMiner(v) => {
6163 std::option::Option::Some(v)
6164 }
6165 _ => std::option::Option::None,
6166 })
6167 }
6168
6169 pub fn set_log_miner<
6175 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::LogMiner>>,
6176 >(
6177 mut self,
6178 v: T,
6179 ) -> Self {
6180 self.cdc_method = std::option::Option::Some(
6181 crate::model::oracle_source_config::CdcMethod::LogMiner(v.into()),
6182 );
6183 self
6184 }
6185
6186 pub fn binary_log_parser(
6190 &self,
6191 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::BinaryLogParser>>
6192 {
6193 #[allow(unreachable_patterns)]
6194 self.cdc_method.as_ref().and_then(|v| match v {
6195 crate::model::oracle_source_config::CdcMethod::BinaryLogParser(v) => {
6196 std::option::Option::Some(v)
6197 }
6198 _ => std::option::Option::None,
6199 })
6200 }
6201
6202 pub fn set_binary_log_parser<
6208 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::BinaryLogParser>>,
6209 >(
6210 mut self,
6211 v: T,
6212 ) -> Self {
6213 self.cdc_method = std::option::Option::Some(
6214 crate::model::oracle_source_config::CdcMethod::BinaryLogParser(v.into()),
6215 );
6216 self
6217 }
6218}
6219
6220impl wkt::message::Message for OracleSourceConfig {
6221 fn typename() -> &'static str {
6222 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig"
6223 }
6224}
6225
6226pub mod oracle_source_config {
6228 #[allow(unused_imports)]
6229 use super::*;
6230
6231 #[derive(Clone, Default, PartialEq)]
6233 #[non_exhaustive]
6234 pub struct DropLargeObjects {
6235 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6236 }
6237
6238 impl DropLargeObjects {
6239 pub fn new() -> Self {
6240 std::default::Default::default()
6241 }
6242 }
6243
6244 impl wkt::message::Message for DropLargeObjects {
6245 fn typename() -> &'static str {
6246 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects"
6247 }
6248 }
6249
6250 #[derive(Clone, Default, PartialEq)]
6252 #[non_exhaustive]
6253 pub struct StreamLargeObjects {
6254 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6255 }
6256
6257 impl StreamLargeObjects {
6258 pub fn new() -> Self {
6259 std::default::Default::default()
6260 }
6261 }
6262
6263 impl wkt::message::Message for StreamLargeObjects {
6264 fn typename() -> &'static str {
6265 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects"
6266 }
6267 }
6268
6269 #[derive(Clone, Default, PartialEq)]
6271 #[non_exhaustive]
6272 pub struct LogMiner {
6273 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6274 }
6275
6276 impl LogMiner {
6277 pub fn new() -> Self {
6278 std::default::Default::default()
6279 }
6280 }
6281
6282 impl wkt::message::Message for LogMiner {
6283 fn typename() -> &'static str {
6284 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.LogMiner"
6285 }
6286 }
6287
6288 #[derive(Clone, Default, PartialEq)]
6290 #[non_exhaustive]
6291 pub struct BinaryLogParser {
6292 pub log_file_access: std::option::Option<
6294 crate::model::oracle_source_config::binary_log_parser::LogFileAccess,
6295 >,
6296
6297 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6298 }
6299
6300 impl BinaryLogParser {
6301 pub fn new() -> Self {
6302 std::default::Default::default()
6303 }
6304
6305 pub fn set_log_file_access<
6310 T: std::convert::Into<
6311 std::option::Option<
6312 crate::model::oracle_source_config::binary_log_parser::LogFileAccess,
6313 >,
6314 >,
6315 >(
6316 mut self,
6317 v: T,
6318 ) -> Self {
6319 self.log_file_access = v.into();
6320 self
6321 }
6322
6323 pub fn oracle_asm_log_file_access(
6327 &self,
6328 ) -> std::option::Option<
6329 &std::boxed::Box<
6330 crate::model::oracle_source_config::binary_log_parser::OracleAsmLogFileAccess,
6331 >,
6332 > {
6333 #[allow(unreachable_patterns)]
6334 self.log_file_access.as_ref().and_then(|v| match v {
6335 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::OracleAsmLogFileAccess(v) => std::option::Option::Some(v),
6336 _ => std::option::Option::None,
6337 })
6338 }
6339
6340 pub fn set_oracle_asm_log_file_access<T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::binary_log_parser::OracleAsmLogFileAccess>>>(mut self, v: T) -> Self{
6346 self.log_file_access = std::option::Option::Some(
6347 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::OracleAsmLogFileAccess(
6348 v.into()
6349 )
6350 );
6351 self
6352 }
6353
6354 pub fn log_file_directories(
6358 &self,
6359 ) -> std::option::Option<
6360 &std::boxed::Box<
6361 crate::model::oracle_source_config::binary_log_parser::LogFileDirectories,
6362 >,
6363 > {
6364 #[allow(unreachable_patterns)]
6365 self.log_file_access.as_ref().and_then(|v| match v {
6366 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::LogFileDirectories(v) => std::option::Option::Some(v),
6367 _ => std::option::Option::None,
6368 })
6369 }
6370
6371 pub fn set_log_file_directories<
6377 T: std::convert::Into<
6378 std::boxed::Box<
6379 crate::model::oracle_source_config::binary_log_parser::LogFileDirectories,
6380 >,
6381 >,
6382 >(
6383 mut self,
6384 v: T,
6385 ) -> Self {
6386 self.log_file_access = std::option::Option::Some(
6387 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::LogFileDirectories(
6388 v.into()
6389 )
6390 );
6391 self
6392 }
6393 }
6394
6395 impl wkt::message::Message for BinaryLogParser {
6396 fn typename() -> &'static str {
6397 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser"
6398 }
6399 }
6400
6401 pub mod binary_log_parser {
6403 #[allow(unused_imports)]
6404 use super::*;
6405
6406 #[derive(Clone, Default, PartialEq)]
6408 #[non_exhaustive]
6409 pub struct OracleAsmLogFileAccess {
6410 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6411 }
6412
6413 impl OracleAsmLogFileAccess {
6414 pub fn new() -> Self {
6415 std::default::Default::default()
6416 }
6417 }
6418
6419 impl wkt::message::Message for OracleAsmLogFileAccess {
6420 fn typename() -> &'static str {
6421 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess"
6422 }
6423 }
6424
6425 #[derive(Clone, Default, PartialEq)]
6427 #[non_exhaustive]
6428 pub struct LogFileDirectories {
6429 pub online_log_directory: std::string::String,
6431
6432 pub archived_log_directory: std::string::String,
6434
6435 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6436 }
6437
6438 impl LogFileDirectories {
6439 pub fn new() -> Self {
6440 std::default::Default::default()
6441 }
6442
6443 pub fn set_online_log_directory<T: std::convert::Into<std::string::String>>(
6445 mut self,
6446 v: T,
6447 ) -> Self {
6448 self.online_log_directory = v.into();
6449 self
6450 }
6451
6452 pub fn set_archived_log_directory<T: std::convert::Into<std::string::String>>(
6454 mut self,
6455 v: T,
6456 ) -> Self {
6457 self.archived_log_directory = v.into();
6458 self
6459 }
6460 }
6461
6462 impl wkt::message::Message for LogFileDirectories {
6463 fn typename() -> &'static str {
6464 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories"
6465 }
6466 }
6467
6468 #[derive(Clone, Debug, PartialEq)]
6470 #[non_exhaustive]
6471 pub enum LogFileAccess {
6472 OracleAsmLogFileAccess(
6474 std::boxed::Box<
6475 crate::model::oracle_source_config::binary_log_parser::OracleAsmLogFileAccess,
6476 >,
6477 ),
6478 LogFileDirectories(
6480 std::boxed::Box<
6481 crate::model::oracle_source_config::binary_log_parser::LogFileDirectories,
6482 >,
6483 ),
6484 }
6485 }
6486
6487 #[derive(Clone, Debug, PartialEq)]
6489 #[non_exhaustive]
6490 pub enum LargeObjectsHandling {
6491 DropLargeObjects(std::boxed::Box<crate::model::oracle_source_config::DropLargeObjects>),
6493 StreamLargeObjects(std::boxed::Box<crate::model::oracle_source_config::StreamLargeObjects>),
6495 }
6496
6497 #[derive(Clone, Debug, PartialEq)]
6499 #[non_exhaustive]
6500 pub enum CdcMethod {
6501 LogMiner(std::boxed::Box<crate::model::oracle_source_config::LogMiner>),
6503 BinaryLogParser(std::boxed::Box<crate::model::oracle_source_config::BinaryLogParser>),
6505 }
6506}
6507
6508#[derive(Clone, Default, PartialEq)]
6510#[non_exhaustive]
6511pub struct PostgresqlColumn {
6512 pub column: std::string::String,
6514
6515 pub data_type: std::string::String,
6517
6518 pub length: i32,
6520
6521 pub precision: i32,
6523
6524 pub scale: i32,
6526
6527 pub primary_key: bool,
6529
6530 pub nullable: bool,
6532
6533 pub ordinal_position: i32,
6535
6536 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6537}
6538
6539impl PostgresqlColumn {
6540 pub fn new() -> Self {
6541 std::default::Default::default()
6542 }
6543
6544 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6546 self.column = v.into();
6547 self
6548 }
6549
6550 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6552 self.data_type = v.into();
6553 self
6554 }
6555
6556 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6558 self.length = v.into();
6559 self
6560 }
6561
6562 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6564 self.precision = v.into();
6565 self
6566 }
6567
6568 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6570 self.scale = v.into();
6571 self
6572 }
6573
6574 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6576 self.primary_key = v.into();
6577 self
6578 }
6579
6580 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6582 self.nullable = v.into();
6583 self
6584 }
6585
6586 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6588 self.ordinal_position = v.into();
6589 self
6590 }
6591}
6592
6593impl wkt::message::Message for PostgresqlColumn {
6594 fn typename() -> &'static str {
6595 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlColumn"
6596 }
6597}
6598
6599#[derive(Clone, Default, PartialEq)]
6601#[non_exhaustive]
6602pub struct PostgresqlTable {
6603 pub table: std::string::String,
6605
6606 pub postgresql_columns: std::vec::Vec<crate::model::PostgresqlColumn>,
6610
6611 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6612}
6613
6614impl PostgresqlTable {
6615 pub fn new() -> Self {
6616 std::default::Default::default()
6617 }
6618
6619 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6621 self.table = v.into();
6622 self
6623 }
6624
6625 pub fn set_postgresql_columns<T, V>(mut self, v: T) -> Self
6627 where
6628 T: std::iter::IntoIterator<Item = V>,
6629 V: std::convert::Into<crate::model::PostgresqlColumn>,
6630 {
6631 use std::iter::Iterator;
6632 self.postgresql_columns = v.into_iter().map(|i| i.into()).collect();
6633 self
6634 }
6635}
6636
6637impl wkt::message::Message for PostgresqlTable {
6638 fn typename() -> &'static str {
6639 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlTable"
6640 }
6641}
6642
6643#[derive(Clone, Default, PartialEq)]
6645#[non_exhaustive]
6646pub struct PostgresqlSchema {
6647 pub schema: std::string::String,
6649
6650 pub postgresql_tables: std::vec::Vec<crate::model::PostgresqlTable>,
6652
6653 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6654}
6655
6656impl PostgresqlSchema {
6657 pub fn new() -> Self {
6658 std::default::Default::default()
6659 }
6660
6661 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6663 self.schema = v.into();
6664 self
6665 }
6666
6667 pub fn set_postgresql_tables<T, V>(mut self, v: T) -> Self
6669 where
6670 T: std::iter::IntoIterator<Item = V>,
6671 V: std::convert::Into<crate::model::PostgresqlTable>,
6672 {
6673 use std::iter::Iterator;
6674 self.postgresql_tables = v.into_iter().map(|i| i.into()).collect();
6675 self
6676 }
6677}
6678
6679impl wkt::message::Message for PostgresqlSchema {
6680 fn typename() -> &'static str {
6681 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSchema"
6682 }
6683}
6684
6685#[derive(Clone, Default, PartialEq)]
6687#[non_exhaustive]
6688pub struct PostgresqlRdbms {
6689 pub postgresql_schemas: std::vec::Vec<crate::model::PostgresqlSchema>,
6691
6692 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6693}
6694
6695impl PostgresqlRdbms {
6696 pub fn new() -> Self {
6697 std::default::Default::default()
6698 }
6699
6700 pub fn set_postgresql_schemas<T, V>(mut self, v: T) -> Self
6702 where
6703 T: std::iter::IntoIterator<Item = V>,
6704 V: std::convert::Into<crate::model::PostgresqlSchema>,
6705 {
6706 use std::iter::Iterator;
6707 self.postgresql_schemas = v.into_iter().map(|i| i.into()).collect();
6708 self
6709 }
6710}
6711
6712impl wkt::message::Message for PostgresqlRdbms {
6713 fn typename() -> &'static str {
6714 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlRdbms"
6715 }
6716}
6717
6718#[derive(Clone, Default, PartialEq)]
6720#[non_exhaustive]
6721pub struct PostgresqlSourceConfig {
6722 pub include_objects: std::option::Option<crate::model::PostgresqlRdbms>,
6724
6725 pub exclude_objects: std::option::Option<crate::model::PostgresqlRdbms>,
6727
6728 pub replication_slot: std::string::String,
6731
6732 pub publication: std::string::String,
6735
6736 pub max_concurrent_backfill_tasks: i32,
6740
6741 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6742}
6743
6744impl PostgresqlSourceConfig {
6745 pub fn new() -> Self {
6746 std::default::Default::default()
6747 }
6748
6749 pub fn set_include_objects<T>(mut self, v: T) -> Self
6751 where
6752 T: std::convert::Into<crate::model::PostgresqlRdbms>,
6753 {
6754 self.include_objects = std::option::Option::Some(v.into());
6755 self
6756 }
6757
6758 pub fn set_or_clear_include_objects<T>(mut self, v: std::option::Option<T>) -> Self
6760 where
6761 T: std::convert::Into<crate::model::PostgresqlRdbms>,
6762 {
6763 self.include_objects = v.map(|x| x.into());
6764 self
6765 }
6766
6767 pub fn set_exclude_objects<T>(mut self, v: T) -> Self
6769 where
6770 T: std::convert::Into<crate::model::PostgresqlRdbms>,
6771 {
6772 self.exclude_objects = std::option::Option::Some(v.into());
6773 self
6774 }
6775
6776 pub fn set_or_clear_exclude_objects<T>(mut self, v: std::option::Option<T>) -> Self
6778 where
6779 T: std::convert::Into<crate::model::PostgresqlRdbms>,
6780 {
6781 self.exclude_objects = v.map(|x| x.into());
6782 self
6783 }
6784
6785 pub fn set_replication_slot<T: std::convert::Into<std::string::String>>(
6787 mut self,
6788 v: T,
6789 ) -> Self {
6790 self.replication_slot = v.into();
6791 self
6792 }
6793
6794 pub fn set_publication<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6796 self.publication = v.into();
6797 self
6798 }
6799
6800 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6802 self.max_concurrent_backfill_tasks = v.into();
6803 self
6804 }
6805}
6806
6807impl wkt::message::Message for PostgresqlSourceConfig {
6808 fn typename() -> &'static str {
6809 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSourceConfig"
6810 }
6811}
6812
6813#[derive(Clone, Default, PartialEq)]
6815#[non_exhaustive]
6816pub struct SqlServerColumn {
6817 pub column: std::string::String,
6819
6820 pub data_type: std::string::String,
6822
6823 pub length: i32,
6825
6826 pub precision: i32,
6828
6829 pub scale: i32,
6831
6832 pub primary_key: bool,
6834
6835 pub nullable: bool,
6837
6838 pub ordinal_position: i32,
6840
6841 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6842}
6843
6844impl SqlServerColumn {
6845 pub fn new() -> Self {
6846 std::default::Default::default()
6847 }
6848
6849 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6851 self.column = v.into();
6852 self
6853 }
6854
6855 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6857 self.data_type = v.into();
6858 self
6859 }
6860
6861 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6863 self.length = v.into();
6864 self
6865 }
6866
6867 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6869 self.precision = v.into();
6870 self
6871 }
6872
6873 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6875 self.scale = v.into();
6876 self
6877 }
6878
6879 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6881 self.primary_key = v.into();
6882 self
6883 }
6884
6885 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6887 self.nullable = v.into();
6888 self
6889 }
6890
6891 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6893 self.ordinal_position = v.into();
6894 self
6895 }
6896}
6897
6898impl wkt::message::Message for SqlServerColumn {
6899 fn typename() -> &'static str {
6900 "type.googleapis.com/google.cloud.datastream.v1.SqlServerColumn"
6901 }
6902}
6903
6904#[derive(Clone, Default, PartialEq)]
6906#[non_exhaustive]
6907pub struct SqlServerTable {
6908 pub table: std::string::String,
6910
6911 pub columns: std::vec::Vec<crate::model::SqlServerColumn>,
6915
6916 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6917}
6918
6919impl SqlServerTable {
6920 pub fn new() -> Self {
6921 std::default::Default::default()
6922 }
6923
6924 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6926 self.table = v.into();
6927 self
6928 }
6929
6930 pub fn set_columns<T, V>(mut self, v: T) -> Self
6932 where
6933 T: std::iter::IntoIterator<Item = V>,
6934 V: std::convert::Into<crate::model::SqlServerColumn>,
6935 {
6936 use std::iter::Iterator;
6937 self.columns = v.into_iter().map(|i| i.into()).collect();
6938 self
6939 }
6940}
6941
6942impl wkt::message::Message for SqlServerTable {
6943 fn typename() -> &'static str {
6944 "type.googleapis.com/google.cloud.datastream.v1.SqlServerTable"
6945 }
6946}
6947
6948#[derive(Clone, Default, PartialEq)]
6950#[non_exhaustive]
6951pub struct SqlServerSchema {
6952 pub schema: std::string::String,
6954
6955 pub tables: std::vec::Vec<crate::model::SqlServerTable>,
6957
6958 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6959}
6960
6961impl SqlServerSchema {
6962 pub fn new() -> Self {
6963 std::default::Default::default()
6964 }
6965
6966 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6968 self.schema = v.into();
6969 self
6970 }
6971
6972 pub fn set_tables<T, V>(mut self, v: T) -> Self
6974 where
6975 T: std::iter::IntoIterator<Item = V>,
6976 V: std::convert::Into<crate::model::SqlServerTable>,
6977 {
6978 use std::iter::Iterator;
6979 self.tables = v.into_iter().map(|i| i.into()).collect();
6980 self
6981 }
6982}
6983
6984impl wkt::message::Message for SqlServerSchema {
6985 fn typename() -> &'static str {
6986 "type.googleapis.com/google.cloud.datastream.v1.SqlServerSchema"
6987 }
6988}
6989
6990#[derive(Clone, Default, PartialEq)]
6992#[non_exhaustive]
6993pub struct SqlServerRdbms {
6994 pub schemas: std::vec::Vec<crate::model::SqlServerSchema>,
6996
6997 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6998}
6999
7000impl SqlServerRdbms {
7001 pub fn new() -> Self {
7002 std::default::Default::default()
7003 }
7004
7005 pub fn set_schemas<T, V>(mut self, v: T) -> Self
7007 where
7008 T: std::iter::IntoIterator<Item = V>,
7009 V: std::convert::Into<crate::model::SqlServerSchema>,
7010 {
7011 use std::iter::Iterator;
7012 self.schemas = v.into_iter().map(|i| i.into()).collect();
7013 self
7014 }
7015}
7016
7017impl wkt::message::Message for SqlServerRdbms {
7018 fn typename() -> &'static str {
7019 "type.googleapis.com/google.cloud.datastream.v1.SqlServerRdbms"
7020 }
7021}
7022
7023#[derive(Clone, Default, PartialEq)]
7025#[non_exhaustive]
7026pub struct SqlServerSourceConfig {
7027 pub include_objects: std::option::Option<crate::model::SqlServerRdbms>,
7029
7030 pub exclude_objects: std::option::Option<crate::model::SqlServerRdbms>,
7032
7033 pub max_concurrent_cdc_tasks: i32,
7035
7036 pub max_concurrent_backfill_tasks: i32,
7038
7039 pub cdc_method: std::option::Option<crate::model::sql_server_source_config::CdcMethod>,
7041
7042 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7043}
7044
7045impl SqlServerSourceConfig {
7046 pub fn new() -> Self {
7047 std::default::Default::default()
7048 }
7049
7050 pub fn set_include_objects<T>(mut self, v: T) -> Self
7052 where
7053 T: std::convert::Into<crate::model::SqlServerRdbms>,
7054 {
7055 self.include_objects = std::option::Option::Some(v.into());
7056 self
7057 }
7058
7059 pub fn set_or_clear_include_objects<T>(mut self, v: std::option::Option<T>) -> Self
7061 where
7062 T: std::convert::Into<crate::model::SqlServerRdbms>,
7063 {
7064 self.include_objects = v.map(|x| x.into());
7065 self
7066 }
7067
7068 pub fn set_exclude_objects<T>(mut self, v: T) -> Self
7070 where
7071 T: std::convert::Into<crate::model::SqlServerRdbms>,
7072 {
7073 self.exclude_objects = std::option::Option::Some(v.into());
7074 self
7075 }
7076
7077 pub fn set_or_clear_exclude_objects<T>(mut self, v: std::option::Option<T>) -> Self
7079 where
7080 T: std::convert::Into<crate::model::SqlServerRdbms>,
7081 {
7082 self.exclude_objects = v.map(|x| x.into());
7083 self
7084 }
7085
7086 pub fn set_max_concurrent_cdc_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7088 self.max_concurrent_cdc_tasks = v.into();
7089 self
7090 }
7091
7092 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7094 self.max_concurrent_backfill_tasks = v.into();
7095 self
7096 }
7097
7098 pub fn set_cdc_method<
7103 T: std::convert::Into<std::option::Option<crate::model::sql_server_source_config::CdcMethod>>,
7104 >(
7105 mut self,
7106 v: T,
7107 ) -> Self {
7108 self.cdc_method = v.into();
7109 self
7110 }
7111
7112 pub fn transaction_logs(
7116 &self,
7117 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerTransactionLogs>> {
7118 #[allow(unreachable_patterns)]
7119 self.cdc_method.as_ref().and_then(|v| match v {
7120 crate::model::sql_server_source_config::CdcMethod::TransactionLogs(v) => {
7121 std::option::Option::Some(v)
7122 }
7123 _ => std::option::Option::None,
7124 })
7125 }
7126
7127 pub fn set_transaction_logs<
7133 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerTransactionLogs>>,
7134 >(
7135 mut self,
7136 v: T,
7137 ) -> Self {
7138 self.cdc_method = std::option::Option::Some(
7139 crate::model::sql_server_source_config::CdcMethod::TransactionLogs(v.into()),
7140 );
7141 self
7142 }
7143
7144 pub fn change_tables(
7148 &self,
7149 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerChangeTables>> {
7150 #[allow(unreachable_patterns)]
7151 self.cdc_method.as_ref().and_then(|v| match v {
7152 crate::model::sql_server_source_config::CdcMethod::ChangeTables(v) => {
7153 std::option::Option::Some(v)
7154 }
7155 _ => std::option::Option::None,
7156 })
7157 }
7158
7159 pub fn set_change_tables<
7165 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerChangeTables>>,
7166 >(
7167 mut self,
7168 v: T,
7169 ) -> Self {
7170 self.cdc_method = std::option::Option::Some(
7171 crate::model::sql_server_source_config::CdcMethod::ChangeTables(v.into()),
7172 );
7173 self
7174 }
7175}
7176
7177impl wkt::message::Message for SqlServerSourceConfig {
7178 fn typename() -> &'static str {
7179 "type.googleapis.com/google.cloud.datastream.v1.SqlServerSourceConfig"
7180 }
7181}
7182
7183pub mod sql_server_source_config {
7185 #[allow(unused_imports)]
7186 use super::*;
7187
7188 #[derive(Clone, Debug, PartialEq)]
7190 #[non_exhaustive]
7191 pub enum CdcMethod {
7192 TransactionLogs(std::boxed::Box<crate::model::SqlServerTransactionLogs>),
7194 ChangeTables(std::boxed::Box<crate::model::SqlServerChangeTables>),
7196 }
7197}
7198
7199#[derive(Clone, Default, PartialEq)]
7201#[non_exhaustive]
7202pub struct SqlServerTransactionLogs {
7203 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7204}
7205
7206impl SqlServerTransactionLogs {
7207 pub fn new() -> Self {
7208 std::default::Default::default()
7209 }
7210}
7211
7212impl wkt::message::Message for SqlServerTransactionLogs {
7213 fn typename() -> &'static str {
7214 "type.googleapis.com/google.cloud.datastream.v1.SqlServerTransactionLogs"
7215 }
7216}
7217
7218#[derive(Clone, Default, PartialEq)]
7220#[non_exhaustive]
7221pub struct SqlServerChangeTables {
7222 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7223}
7224
7225impl SqlServerChangeTables {
7226 pub fn new() -> Self {
7227 std::default::Default::default()
7228 }
7229}
7230
7231impl wkt::message::Message for SqlServerChangeTables {
7232 fn typename() -> &'static str {
7233 "type.googleapis.com/google.cloud.datastream.v1.SqlServerChangeTables"
7234 }
7235}
7236
7237#[derive(Clone, Default, PartialEq)]
7239#[non_exhaustive]
7240pub struct MysqlColumn {
7241 pub column: std::string::String,
7243
7244 pub data_type: std::string::String,
7247
7248 pub length: i32,
7250
7251 pub collation: std::string::String,
7253
7254 pub primary_key: bool,
7256
7257 pub nullable: bool,
7259
7260 pub ordinal_position: i32,
7262
7263 pub precision: i32,
7265
7266 pub scale: i32,
7268
7269 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7270}
7271
7272impl MysqlColumn {
7273 pub fn new() -> Self {
7274 std::default::Default::default()
7275 }
7276
7277 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7279 self.column = v.into();
7280 self
7281 }
7282
7283 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7285 self.data_type = v.into();
7286 self
7287 }
7288
7289 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7291 self.length = v.into();
7292 self
7293 }
7294
7295 pub fn set_collation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7297 self.collation = v.into();
7298 self
7299 }
7300
7301 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7303 self.primary_key = v.into();
7304 self
7305 }
7306
7307 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7309 self.nullable = v.into();
7310 self
7311 }
7312
7313 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7315 self.ordinal_position = v.into();
7316 self
7317 }
7318
7319 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7321 self.precision = v.into();
7322 self
7323 }
7324
7325 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7327 self.scale = v.into();
7328 self
7329 }
7330}
7331
7332impl wkt::message::Message for MysqlColumn {
7333 fn typename() -> &'static str {
7334 "type.googleapis.com/google.cloud.datastream.v1.MysqlColumn"
7335 }
7336}
7337
7338#[derive(Clone, Default, PartialEq)]
7340#[non_exhaustive]
7341pub struct MysqlTable {
7342 pub table: std::string::String,
7344
7345 pub mysql_columns: std::vec::Vec<crate::model::MysqlColumn>,
7349
7350 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7351}
7352
7353impl MysqlTable {
7354 pub fn new() -> Self {
7355 std::default::Default::default()
7356 }
7357
7358 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7360 self.table = v.into();
7361 self
7362 }
7363
7364 pub fn set_mysql_columns<T, V>(mut self, v: T) -> Self
7366 where
7367 T: std::iter::IntoIterator<Item = V>,
7368 V: std::convert::Into<crate::model::MysqlColumn>,
7369 {
7370 use std::iter::Iterator;
7371 self.mysql_columns = v.into_iter().map(|i| i.into()).collect();
7372 self
7373 }
7374}
7375
7376impl wkt::message::Message for MysqlTable {
7377 fn typename() -> &'static str {
7378 "type.googleapis.com/google.cloud.datastream.v1.MysqlTable"
7379 }
7380}
7381
7382#[derive(Clone, Default, PartialEq)]
7384#[non_exhaustive]
7385pub struct MysqlDatabase {
7386 pub database: std::string::String,
7388
7389 pub mysql_tables: std::vec::Vec<crate::model::MysqlTable>,
7391
7392 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7393}
7394
7395impl MysqlDatabase {
7396 pub fn new() -> Self {
7397 std::default::Default::default()
7398 }
7399
7400 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7402 self.database = v.into();
7403 self
7404 }
7405
7406 pub fn set_mysql_tables<T, V>(mut self, v: T) -> Self
7408 where
7409 T: std::iter::IntoIterator<Item = V>,
7410 V: std::convert::Into<crate::model::MysqlTable>,
7411 {
7412 use std::iter::Iterator;
7413 self.mysql_tables = v.into_iter().map(|i| i.into()).collect();
7414 self
7415 }
7416}
7417
7418impl wkt::message::Message for MysqlDatabase {
7419 fn typename() -> &'static str {
7420 "type.googleapis.com/google.cloud.datastream.v1.MysqlDatabase"
7421 }
7422}
7423
7424#[derive(Clone, Default, PartialEq)]
7426#[non_exhaustive]
7427pub struct MysqlRdbms {
7428 pub mysql_databases: std::vec::Vec<crate::model::MysqlDatabase>,
7430
7431 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7432}
7433
7434impl MysqlRdbms {
7435 pub fn new() -> Self {
7436 std::default::Default::default()
7437 }
7438
7439 pub fn set_mysql_databases<T, V>(mut self, v: T) -> Self
7441 where
7442 T: std::iter::IntoIterator<Item = V>,
7443 V: std::convert::Into<crate::model::MysqlDatabase>,
7444 {
7445 use std::iter::Iterator;
7446 self.mysql_databases = v.into_iter().map(|i| i.into()).collect();
7447 self
7448 }
7449}
7450
7451impl wkt::message::Message for MysqlRdbms {
7452 fn typename() -> &'static str {
7453 "type.googleapis.com/google.cloud.datastream.v1.MysqlRdbms"
7454 }
7455}
7456
7457#[derive(Clone, Default, PartialEq)]
7459#[non_exhaustive]
7460pub struct MysqlSourceConfig {
7461 pub include_objects: std::option::Option<crate::model::MysqlRdbms>,
7463
7464 pub exclude_objects: std::option::Option<crate::model::MysqlRdbms>,
7466
7467 pub max_concurrent_cdc_tasks: i32,
7470
7471 pub max_concurrent_backfill_tasks: i32,
7475
7476 pub cdc_method: std::option::Option<crate::model::mysql_source_config::CdcMethod>,
7478
7479 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7480}
7481
7482impl MysqlSourceConfig {
7483 pub fn new() -> Self {
7484 std::default::Default::default()
7485 }
7486
7487 pub fn set_include_objects<T>(mut self, v: T) -> Self
7489 where
7490 T: std::convert::Into<crate::model::MysqlRdbms>,
7491 {
7492 self.include_objects = std::option::Option::Some(v.into());
7493 self
7494 }
7495
7496 pub fn set_or_clear_include_objects<T>(mut self, v: std::option::Option<T>) -> Self
7498 where
7499 T: std::convert::Into<crate::model::MysqlRdbms>,
7500 {
7501 self.include_objects = v.map(|x| x.into());
7502 self
7503 }
7504
7505 pub fn set_exclude_objects<T>(mut self, v: T) -> Self
7507 where
7508 T: std::convert::Into<crate::model::MysqlRdbms>,
7509 {
7510 self.exclude_objects = std::option::Option::Some(v.into());
7511 self
7512 }
7513
7514 pub fn set_or_clear_exclude_objects<T>(mut self, v: std::option::Option<T>) -> Self
7516 where
7517 T: std::convert::Into<crate::model::MysqlRdbms>,
7518 {
7519 self.exclude_objects = v.map(|x| x.into());
7520 self
7521 }
7522
7523 pub fn set_max_concurrent_cdc_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7525 self.max_concurrent_cdc_tasks = v.into();
7526 self
7527 }
7528
7529 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7531 self.max_concurrent_backfill_tasks = v.into();
7532 self
7533 }
7534
7535 pub fn set_cdc_method<
7540 T: std::convert::Into<std::option::Option<crate::model::mysql_source_config::CdcMethod>>,
7541 >(
7542 mut self,
7543 v: T,
7544 ) -> Self {
7545 self.cdc_method = v.into();
7546 self
7547 }
7548
7549 pub fn binary_log_position(
7553 &self,
7554 ) -> std::option::Option<&std::boxed::Box<crate::model::mysql_source_config::BinaryLogPosition>>
7555 {
7556 #[allow(unreachable_patterns)]
7557 self.cdc_method.as_ref().and_then(|v| match v {
7558 crate::model::mysql_source_config::CdcMethod::BinaryLogPosition(v) => {
7559 std::option::Option::Some(v)
7560 }
7561 _ => std::option::Option::None,
7562 })
7563 }
7564
7565 pub fn set_binary_log_position<
7571 T: std::convert::Into<std::boxed::Box<crate::model::mysql_source_config::BinaryLogPosition>>,
7572 >(
7573 mut self,
7574 v: T,
7575 ) -> Self {
7576 self.cdc_method = std::option::Option::Some(
7577 crate::model::mysql_source_config::CdcMethod::BinaryLogPosition(v.into()),
7578 );
7579 self
7580 }
7581
7582 pub fn gtid(
7586 &self,
7587 ) -> std::option::Option<&std::boxed::Box<crate::model::mysql_source_config::Gtid>> {
7588 #[allow(unreachable_patterns)]
7589 self.cdc_method.as_ref().and_then(|v| match v {
7590 crate::model::mysql_source_config::CdcMethod::Gtid(v) => std::option::Option::Some(v),
7591 _ => std::option::Option::None,
7592 })
7593 }
7594
7595 pub fn set_gtid<
7601 T: std::convert::Into<std::boxed::Box<crate::model::mysql_source_config::Gtid>>,
7602 >(
7603 mut self,
7604 v: T,
7605 ) -> Self {
7606 self.cdc_method =
7607 std::option::Option::Some(crate::model::mysql_source_config::CdcMethod::Gtid(v.into()));
7608 self
7609 }
7610}
7611
7612impl wkt::message::Message for MysqlSourceConfig {
7613 fn typename() -> &'static str {
7614 "type.googleapis.com/google.cloud.datastream.v1.MysqlSourceConfig"
7615 }
7616}
7617
7618pub mod mysql_source_config {
7620 #[allow(unused_imports)]
7621 use super::*;
7622
7623 #[derive(Clone, Default, PartialEq)]
7625 #[non_exhaustive]
7626 pub struct BinaryLogPosition {
7627 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7628 }
7629
7630 impl BinaryLogPosition {
7631 pub fn new() -> Self {
7632 std::default::Default::default()
7633 }
7634 }
7635
7636 impl wkt::message::Message for BinaryLogPosition {
7637 fn typename() -> &'static str {
7638 "type.googleapis.com/google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition"
7639 }
7640 }
7641
7642 #[derive(Clone, Default, PartialEq)]
7644 #[non_exhaustive]
7645 pub struct Gtid {
7646 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7647 }
7648
7649 impl Gtid {
7650 pub fn new() -> Self {
7651 std::default::Default::default()
7652 }
7653 }
7654
7655 impl wkt::message::Message for Gtid {
7656 fn typename() -> &'static str {
7657 "type.googleapis.com/google.cloud.datastream.v1.MysqlSourceConfig.Gtid"
7658 }
7659 }
7660
7661 #[derive(Clone, Debug, PartialEq)]
7663 #[non_exhaustive]
7664 pub enum CdcMethod {
7665 BinaryLogPosition(std::boxed::Box<crate::model::mysql_source_config::BinaryLogPosition>),
7667 Gtid(std::boxed::Box<crate::model::mysql_source_config::Gtid>),
7669 }
7670}
7671
7672#[derive(Clone, Default, PartialEq)]
7674#[non_exhaustive]
7675pub struct SalesforceSourceConfig {
7676 pub include_objects: std::option::Option<crate::model::SalesforceOrg>,
7678
7679 pub exclude_objects: std::option::Option<crate::model::SalesforceOrg>,
7681
7682 pub polling_interval: std::option::Option<wkt::Duration>,
7686
7687 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7688}
7689
7690impl SalesforceSourceConfig {
7691 pub fn new() -> Self {
7692 std::default::Default::default()
7693 }
7694
7695 pub fn set_include_objects<T>(mut self, v: T) -> Self
7697 where
7698 T: std::convert::Into<crate::model::SalesforceOrg>,
7699 {
7700 self.include_objects = std::option::Option::Some(v.into());
7701 self
7702 }
7703
7704 pub fn set_or_clear_include_objects<T>(mut self, v: std::option::Option<T>) -> Self
7706 where
7707 T: std::convert::Into<crate::model::SalesforceOrg>,
7708 {
7709 self.include_objects = v.map(|x| x.into());
7710 self
7711 }
7712
7713 pub fn set_exclude_objects<T>(mut self, v: T) -> Self
7715 where
7716 T: std::convert::Into<crate::model::SalesforceOrg>,
7717 {
7718 self.exclude_objects = std::option::Option::Some(v.into());
7719 self
7720 }
7721
7722 pub fn set_or_clear_exclude_objects<T>(mut self, v: std::option::Option<T>) -> Self
7724 where
7725 T: std::convert::Into<crate::model::SalesforceOrg>,
7726 {
7727 self.exclude_objects = v.map(|x| x.into());
7728 self
7729 }
7730
7731 pub fn set_polling_interval<T>(mut self, v: T) -> Self
7733 where
7734 T: std::convert::Into<wkt::Duration>,
7735 {
7736 self.polling_interval = std::option::Option::Some(v.into());
7737 self
7738 }
7739
7740 pub fn set_or_clear_polling_interval<T>(mut self, v: std::option::Option<T>) -> Self
7742 where
7743 T: std::convert::Into<wkt::Duration>,
7744 {
7745 self.polling_interval = v.map(|x| x.into());
7746 self
7747 }
7748}
7749
7750impl wkt::message::Message for SalesforceSourceConfig {
7751 fn typename() -> &'static str {
7752 "type.googleapis.com/google.cloud.datastream.v1.SalesforceSourceConfig"
7753 }
7754}
7755
7756#[derive(Clone, Default, PartialEq)]
7758#[non_exhaustive]
7759pub struct SalesforceOrg {
7760 pub objects: std::vec::Vec<crate::model::SalesforceObject>,
7762
7763 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7764}
7765
7766impl SalesforceOrg {
7767 pub fn new() -> Self {
7768 std::default::Default::default()
7769 }
7770
7771 pub fn set_objects<T, V>(mut self, v: T) -> Self
7773 where
7774 T: std::iter::IntoIterator<Item = V>,
7775 V: std::convert::Into<crate::model::SalesforceObject>,
7776 {
7777 use std::iter::Iterator;
7778 self.objects = v.into_iter().map(|i| i.into()).collect();
7779 self
7780 }
7781}
7782
7783impl wkt::message::Message for SalesforceOrg {
7784 fn typename() -> &'static str {
7785 "type.googleapis.com/google.cloud.datastream.v1.SalesforceOrg"
7786 }
7787}
7788
7789#[derive(Clone, Default, PartialEq)]
7791#[non_exhaustive]
7792pub struct SalesforceObject {
7793 pub object_name: std::string::String,
7795
7796 pub fields: std::vec::Vec<crate::model::SalesforceField>,
7801
7802 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7803}
7804
7805impl SalesforceObject {
7806 pub fn new() -> Self {
7807 std::default::Default::default()
7808 }
7809
7810 pub fn set_object_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7812 self.object_name = v.into();
7813 self
7814 }
7815
7816 pub fn set_fields<T, V>(mut self, v: T) -> Self
7818 where
7819 T: std::iter::IntoIterator<Item = V>,
7820 V: std::convert::Into<crate::model::SalesforceField>,
7821 {
7822 use std::iter::Iterator;
7823 self.fields = v.into_iter().map(|i| i.into()).collect();
7824 self
7825 }
7826}
7827
7828impl wkt::message::Message for SalesforceObject {
7829 fn typename() -> &'static str {
7830 "type.googleapis.com/google.cloud.datastream.v1.SalesforceObject"
7831 }
7832}
7833
7834#[derive(Clone, Default, PartialEq)]
7836#[non_exhaustive]
7837pub struct SalesforceField {
7838 pub name: std::string::String,
7840
7841 pub data_type: std::string::String,
7843
7844 pub nillable: bool,
7846
7847 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7848}
7849
7850impl SalesforceField {
7851 pub fn new() -> Self {
7852 std::default::Default::default()
7853 }
7854
7855 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7857 self.name = v.into();
7858 self
7859 }
7860
7861 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7863 self.data_type = v.into();
7864 self
7865 }
7866
7867 pub fn set_nillable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7869 self.nillable = v.into();
7870 self
7871 }
7872}
7873
7874impl wkt::message::Message for SalesforceField {
7875 fn typename() -> &'static str {
7876 "type.googleapis.com/google.cloud.datastream.v1.SalesforceField"
7877 }
7878}
7879
7880#[derive(Clone, Default, PartialEq)]
7882#[non_exhaustive]
7883pub struct MongodbSourceConfig {
7884 pub include_objects: std::option::Option<crate::model::MongodbCluster>,
7886
7887 pub exclude_objects: std::option::Option<crate::model::MongodbCluster>,
7889
7890 pub max_concurrent_backfill_tasks: i32,
7894
7895 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7896}
7897
7898impl MongodbSourceConfig {
7899 pub fn new() -> Self {
7900 std::default::Default::default()
7901 }
7902
7903 pub fn set_include_objects<T>(mut self, v: T) -> Self
7905 where
7906 T: std::convert::Into<crate::model::MongodbCluster>,
7907 {
7908 self.include_objects = std::option::Option::Some(v.into());
7909 self
7910 }
7911
7912 pub fn set_or_clear_include_objects<T>(mut self, v: std::option::Option<T>) -> Self
7914 where
7915 T: std::convert::Into<crate::model::MongodbCluster>,
7916 {
7917 self.include_objects = v.map(|x| x.into());
7918 self
7919 }
7920
7921 pub fn set_exclude_objects<T>(mut self, v: T) -> Self
7923 where
7924 T: std::convert::Into<crate::model::MongodbCluster>,
7925 {
7926 self.exclude_objects = std::option::Option::Some(v.into());
7927 self
7928 }
7929
7930 pub fn set_or_clear_exclude_objects<T>(mut self, v: std::option::Option<T>) -> Self
7932 where
7933 T: std::convert::Into<crate::model::MongodbCluster>,
7934 {
7935 self.exclude_objects = v.map(|x| x.into());
7936 self
7937 }
7938
7939 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7941 self.max_concurrent_backfill_tasks = v.into();
7942 self
7943 }
7944}
7945
7946impl wkt::message::Message for MongodbSourceConfig {
7947 fn typename() -> &'static str {
7948 "type.googleapis.com/google.cloud.datastream.v1.MongodbSourceConfig"
7949 }
7950}
7951
7952#[derive(Clone, Default, PartialEq)]
7954#[non_exhaustive]
7955pub struct MongodbCluster {
7956 pub databases: std::vec::Vec<crate::model::MongodbDatabase>,
7958
7959 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7960}
7961
7962impl MongodbCluster {
7963 pub fn new() -> Self {
7964 std::default::Default::default()
7965 }
7966
7967 pub fn set_databases<T, V>(mut self, v: T) -> Self
7969 where
7970 T: std::iter::IntoIterator<Item = V>,
7971 V: std::convert::Into<crate::model::MongodbDatabase>,
7972 {
7973 use std::iter::Iterator;
7974 self.databases = v.into_iter().map(|i| i.into()).collect();
7975 self
7976 }
7977}
7978
7979impl wkt::message::Message for MongodbCluster {
7980 fn typename() -> &'static str {
7981 "type.googleapis.com/google.cloud.datastream.v1.MongodbCluster"
7982 }
7983}
7984
7985#[derive(Clone, Default, PartialEq)]
7987#[non_exhaustive]
7988pub struct MongodbDatabase {
7989 pub database: std::string::String,
7991
7992 pub collections: std::vec::Vec<crate::model::MongodbCollection>,
7994
7995 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7996}
7997
7998impl MongodbDatabase {
7999 pub fn new() -> Self {
8000 std::default::Default::default()
8001 }
8002
8003 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8005 self.database = v.into();
8006 self
8007 }
8008
8009 pub fn set_collections<T, V>(mut self, v: T) -> Self
8011 where
8012 T: std::iter::IntoIterator<Item = V>,
8013 V: std::convert::Into<crate::model::MongodbCollection>,
8014 {
8015 use std::iter::Iterator;
8016 self.collections = v.into_iter().map(|i| i.into()).collect();
8017 self
8018 }
8019}
8020
8021impl wkt::message::Message for MongodbDatabase {
8022 fn typename() -> &'static str {
8023 "type.googleapis.com/google.cloud.datastream.v1.MongodbDatabase"
8024 }
8025}
8026
8027#[derive(Clone, Default, PartialEq)]
8029#[non_exhaustive]
8030pub struct MongodbCollection {
8031 pub collection: std::string::String,
8033
8034 pub fields: std::vec::Vec<crate::model::MongodbField>,
8036
8037 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8038}
8039
8040impl MongodbCollection {
8041 pub fn new() -> Self {
8042 std::default::Default::default()
8043 }
8044
8045 pub fn set_collection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8047 self.collection = v.into();
8048 self
8049 }
8050
8051 pub fn set_fields<T, V>(mut self, v: T) -> Self
8053 where
8054 T: std::iter::IntoIterator<Item = V>,
8055 V: std::convert::Into<crate::model::MongodbField>,
8056 {
8057 use std::iter::Iterator;
8058 self.fields = v.into_iter().map(|i| i.into()).collect();
8059 self
8060 }
8061}
8062
8063impl wkt::message::Message for MongodbCollection {
8064 fn typename() -> &'static str {
8065 "type.googleapis.com/google.cloud.datastream.v1.MongodbCollection"
8066 }
8067}
8068
8069#[derive(Clone, Default, PartialEq)]
8071#[non_exhaustive]
8072pub struct MongodbField {
8073 pub field: std::string::String,
8075
8076 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8077}
8078
8079impl MongodbField {
8080 pub fn new() -> Self {
8081 std::default::Default::default()
8082 }
8083
8084 pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8086 self.field = v.into();
8087 self
8088 }
8089}
8090
8091impl wkt::message::Message for MongodbField {
8092 fn typename() -> &'static str {
8093 "type.googleapis.com/google.cloud.datastream.v1.MongodbField"
8094 }
8095}
8096
8097#[derive(Clone, Default, PartialEq)]
8099#[non_exhaustive]
8100pub struct SourceConfig {
8101 pub source_connection_profile: std::string::String,
8104
8105 pub source_stream_config: std::option::Option<crate::model::source_config::SourceStreamConfig>,
8107
8108 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8109}
8110
8111impl SourceConfig {
8112 pub fn new() -> Self {
8113 std::default::Default::default()
8114 }
8115
8116 pub fn set_source_connection_profile<T: std::convert::Into<std::string::String>>(
8118 mut self,
8119 v: T,
8120 ) -> Self {
8121 self.source_connection_profile = v.into();
8122 self
8123 }
8124
8125 pub fn set_source_stream_config<
8130 T: std::convert::Into<std::option::Option<crate::model::source_config::SourceStreamConfig>>,
8131 >(
8132 mut self,
8133 v: T,
8134 ) -> Self {
8135 self.source_stream_config = v.into();
8136 self
8137 }
8138
8139 pub fn oracle_source_config(
8143 &self,
8144 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleSourceConfig>> {
8145 #[allow(unreachable_patterns)]
8146 self.source_stream_config.as_ref().and_then(|v| match v {
8147 crate::model::source_config::SourceStreamConfig::OracleSourceConfig(v) => {
8148 std::option::Option::Some(v)
8149 }
8150 _ => std::option::Option::None,
8151 })
8152 }
8153
8154 pub fn set_oracle_source_config<
8160 T: std::convert::Into<std::boxed::Box<crate::model::OracleSourceConfig>>,
8161 >(
8162 mut self,
8163 v: T,
8164 ) -> Self {
8165 self.source_stream_config = std::option::Option::Some(
8166 crate::model::source_config::SourceStreamConfig::OracleSourceConfig(v.into()),
8167 );
8168 self
8169 }
8170
8171 pub fn mysql_source_config(
8175 &self,
8176 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlSourceConfig>> {
8177 #[allow(unreachable_patterns)]
8178 self.source_stream_config.as_ref().and_then(|v| match v {
8179 crate::model::source_config::SourceStreamConfig::MysqlSourceConfig(v) => {
8180 std::option::Option::Some(v)
8181 }
8182 _ => std::option::Option::None,
8183 })
8184 }
8185
8186 pub fn set_mysql_source_config<
8192 T: std::convert::Into<std::boxed::Box<crate::model::MysqlSourceConfig>>,
8193 >(
8194 mut self,
8195 v: T,
8196 ) -> Self {
8197 self.source_stream_config = std::option::Option::Some(
8198 crate::model::source_config::SourceStreamConfig::MysqlSourceConfig(v.into()),
8199 );
8200 self
8201 }
8202
8203 pub fn postgresql_source_config(
8207 &self,
8208 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlSourceConfig>> {
8209 #[allow(unreachable_patterns)]
8210 self.source_stream_config.as_ref().and_then(|v| match v {
8211 crate::model::source_config::SourceStreamConfig::PostgresqlSourceConfig(v) => {
8212 std::option::Option::Some(v)
8213 }
8214 _ => std::option::Option::None,
8215 })
8216 }
8217
8218 pub fn set_postgresql_source_config<
8224 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlSourceConfig>>,
8225 >(
8226 mut self,
8227 v: T,
8228 ) -> Self {
8229 self.source_stream_config = std::option::Option::Some(
8230 crate::model::source_config::SourceStreamConfig::PostgresqlSourceConfig(v.into()),
8231 );
8232 self
8233 }
8234
8235 pub fn sql_server_source_config(
8239 &self,
8240 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerSourceConfig>> {
8241 #[allow(unreachable_patterns)]
8242 self.source_stream_config.as_ref().and_then(|v| match v {
8243 crate::model::source_config::SourceStreamConfig::SqlServerSourceConfig(v) => {
8244 std::option::Option::Some(v)
8245 }
8246 _ => std::option::Option::None,
8247 })
8248 }
8249
8250 pub fn set_sql_server_source_config<
8256 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerSourceConfig>>,
8257 >(
8258 mut self,
8259 v: T,
8260 ) -> Self {
8261 self.source_stream_config = std::option::Option::Some(
8262 crate::model::source_config::SourceStreamConfig::SqlServerSourceConfig(v.into()),
8263 );
8264 self
8265 }
8266
8267 pub fn salesforce_source_config(
8271 &self,
8272 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceSourceConfig>> {
8273 #[allow(unreachable_patterns)]
8274 self.source_stream_config.as_ref().and_then(|v| match v {
8275 crate::model::source_config::SourceStreamConfig::SalesforceSourceConfig(v) => {
8276 std::option::Option::Some(v)
8277 }
8278 _ => std::option::Option::None,
8279 })
8280 }
8281
8282 pub fn set_salesforce_source_config<
8288 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceSourceConfig>>,
8289 >(
8290 mut self,
8291 v: T,
8292 ) -> Self {
8293 self.source_stream_config = std::option::Option::Some(
8294 crate::model::source_config::SourceStreamConfig::SalesforceSourceConfig(v.into()),
8295 );
8296 self
8297 }
8298
8299 pub fn mongodb_source_config(
8303 &self,
8304 ) -> std::option::Option<&std::boxed::Box<crate::model::MongodbSourceConfig>> {
8305 #[allow(unreachable_patterns)]
8306 self.source_stream_config.as_ref().and_then(|v| match v {
8307 crate::model::source_config::SourceStreamConfig::MongodbSourceConfig(v) => {
8308 std::option::Option::Some(v)
8309 }
8310 _ => std::option::Option::None,
8311 })
8312 }
8313
8314 pub fn set_mongodb_source_config<
8320 T: std::convert::Into<std::boxed::Box<crate::model::MongodbSourceConfig>>,
8321 >(
8322 mut self,
8323 v: T,
8324 ) -> Self {
8325 self.source_stream_config = std::option::Option::Some(
8326 crate::model::source_config::SourceStreamConfig::MongodbSourceConfig(v.into()),
8327 );
8328 self
8329 }
8330}
8331
8332impl wkt::message::Message for SourceConfig {
8333 fn typename() -> &'static str {
8334 "type.googleapis.com/google.cloud.datastream.v1.SourceConfig"
8335 }
8336}
8337
8338pub mod source_config {
8340 #[allow(unused_imports)]
8341 use super::*;
8342
8343 #[derive(Clone, Debug, PartialEq)]
8345 #[non_exhaustive]
8346 pub enum SourceStreamConfig {
8347 OracleSourceConfig(std::boxed::Box<crate::model::OracleSourceConfig>),
8349 MysqlSourceConfig(std::boxed::Box<crate::model::MysqlSourceConfig>),
8351 PostgresqlSourceConfig(std::boxed::Box<crate::model::PostgresqlSourceConfig>),
8353 SqlServerSourceConfig(std::boxed::Box<crate::model::SqlServerSourceConfig>),
8355 SalesforceSourceConfig(std::boxed::Box<crate::model::SalesforceSourceConfig>),
8357 MongodbSourceConfig(std::boxed::Box<crate::model::MongodbSourceConfig>),
8359 }
8360}
8361
8362#[derive(Clone, Default, PartialEq)]
8364#[non_exhaustive]
8365pub struct AvroFileFormat {
8366 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8367}
8368
8369impl AvroFileFormat {
8370 pub fn new() -> Self {
8371 std::default::Default::default()
8372 }
8373}
8374
8375impl wkt::message::Message for AvroFileFormat {
8376 fn typename() -> &'static str {
8377 "type.googleapis.com/google.cloud.datastream.v1.AvroFileFormat"
8378 }
8379}
8380
8381#[derive(Clone, Default, PartialEq)]
8383#[non_exhaustive]
8384pub struct JsonFileFormat {
8385 pub schema_file_format: crate::model::json_file_format::SchemaFileFormat,
8387
8388 pub compression: crate::model::json_file_format::JsonCompression,
8390
8391 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8392}
8393
8394impl JsonFileFormat {
8395 pub fn new() -> Self {
8396 std::default::Default::default()
8397 }
8398
8399 pub fn set_schema_file_format<
8401 T: std::convert::Into<crate::model::json_file_format::SchemaFileFormat>,
8402 >(
8403 mut self,
8404 v: T,
8405 ) -> Self {
8406 self.schema_file_format = v.into();
8407 self
8408 }
8409
8410 pub fn set_compression<
8412 T: std::convert::Into<crate::model::json_file_format::JsonCompression>,
8413 >(
8414 mut self,
8415 v: T,
8416 ) -> Self {
8417 self.compression = v.into();
8418 self
8419 }
8420}
8421
8422impl wkt::message::Message for JsonFileFormat {
8423 fn typename() -> &'static str {
8424 "type.googleapis.com/google.cloud.datastream.v1.JsonFileFormat"
8425 }
8426}
8427
8428pub mod json_file_format {
8430 #[allow(unused_imports)]
8431 use super::*;
8432
8433 #[derive(Clone, Debug, PartialEq)]
8449 #[non_exhaustive]
8450 pub enum SchemaFileFormat {
8451 Unspecified,
8453 NoSchemaFile,
8455 AvroSchemaFile,
8457 UnknownValue(schema_file_format::UnknownValue),
8462 }
8463
8464 #[doc(hidden)]
8465 pub mod schema_file_format {
8466 #[allow(unused_imports)]
8467 use super::*;
8468 #[derive(Clone, Debug, PartialEq)]
8469 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8470 }
8471
8472 impl SchemaFileFormat {
8473 pub fn value(&self) -> std::option::Option<i32> {
8478 match self {
8479 Self::Unspecified => std::option::Option::Some(0),
8480 Self::NoSchemaFile => std::option::Option::Some(1),
8481 Self::AvroSchemaFile => std::option::Option::Some(2),
8482 Self::UnknownValue(u) => u.0.value(),
8483 }
8484 }
8485
8486 pub fn name(&self) -> std::option::Option<&str> {
8491 match self {
8492 Self::Unspecified => std::option::Option::Some("SCHEMA_FILE_FORMAT_UNSPECIFIED"),
8493 Self::NoSchemaFile => std::option::Option::Some("NO_SCHEMA_FILE"),
8494 Self::AvroSchemaFile => std::option::Option::Some("AVRO_SCHEMA_FILE"),
8495 Self::UnknownValue(u) => u.0.name(),
8496 }
8497 }
8498 }
8499
8500 impl std::default::Default for SchemaFileFormat {
8501 fn default() -> Self {
8502 use std::convert::From;
8503 Self::from(0)
8504 }
8505 }
8506
8507 impl std::fmt::Display for SchemaFileFormat {
8508 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8509 wkt::internal::display_enum(f, self.name(), self.value())
8510 }
8511 }
8512
8513 impl std::convert::From<i32> for SchemaFileFormat {
8514 fn from(value: i32) -> Self {
8515 match value {
8516 0 => Self::Unspecified,
8517 1 => Self::NoSchemaFile,
8518 2 => Self::AvroSchemaFile,
8519 _ => Self::UnknownValue(schema_file_format::UnknownValue(
8520 wkt::internal::UnknownEnumValue::Integer(value),
8521 )),
8522 }
8523 }
8524 }
8525
8526 impl std::convert::From<&str> for SchemaFileFormat {
8527 fn from(value: &str) -> Self {
8528 use std::string::ToString;
8529 match value {
8530 "SCHEMA_FILE_FORMAT_UNSPECIFIED" => Self::Unspecified,
8531 "NO_SCHEMA_FILE" => Self::NoSchemaFile,
8532 "AVRO_SCHEMA_FILE" => Self::AvroSchemaFile,
8533 _ => Self::UnknownValue(schema_file_format::UnknownValue(
8534 wkt::internal::UnknownEnumValue::String(value.to_string()),
8535 )),
8536 }
8537 }
8538 }
8539
8540 impl serde::ser::Serialize for SchemaFileFormat {
8541 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8542 where
8543 S: serde::Serializer,
8544 {
8545 match self {
8546 Self::Unspecified => serializer.serialize_i32(0),
8547 Self::NoSchemaFile => serializer.serialize_i32(1),
8548 Self::AvroSchemaFile => serializer.serialize_i32(2),
8549 Self::UnknownValue(u) => u.0.serialize(serializer),
8550 }
8551 }
8552 }
8553
8554 impl<'de> serde::de::Deserialize<'de> for SchemaFileFormat {
8555 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8556 where
8557 D: serde::Deserializer<'de>,
8558 {
8559 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SchemaFileFormat>::new(
8560 ".google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat",
8561 ))
8562 }
8563 }
8564
8565 #[derive(Clone, Debug, PartialEq)]
8581 #[non_exhaustive]
8582 pub enum JsonCompression {
8583 Unspecified,
8585 NoCompression,
8587 Gzip,
8589 UnknownValue(json_compression::UnknownValue),
8594 }
8595
8596 #[doc(hidden)]
8597 pub mod json_compression {
8598 #[allow(unused_imports)]
8599 use super::*;
8600 #[derive(Clone, Debug, PartialEq)]
8601 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8602 }
8603
8604 impl JsonCompression {
8605 pub fn value(&self) -> std::option::Option<i32> {
8610 match self {
8611 Self::Unspecified => std::option::Option::Some(0),
8612 Self::NoCompression => std::option::Option::Some(1),
8613 Self::Gzip => std::option::Option::Some(2),
8614 Self::UnknownValue(u) => u.0.value(),
8615 }
8616 }
8617
8618 pub fn name(&self) -> std::option::Option<&str> {
8623 match self {
8624 Self::Unspecified => std::option::Option::Some("JSON_COMPRESSION_UNSPECIFIED"),
8625 Self::NoCompression => std::option::Option::Some("NO_COMPRESSION"),
8626 Self::Gzip => std::option::Option::Some("GZIP"),
8627 Self::UnknownValue(u) => u.0.name(),
8628 }
8629 }
8630 }
8631
8632 impl std::default::Default for JsonCompression {
8633 fn default() -> Self {
8634 use std::convert::From;
8635 Self::from(0)
8636 }
8637 }
8638
8639 impl std::fmt::Display for JsonCompression {
8640 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8641 wkt::internal::display_enum(f, self.name(), self.value())
8642 }
8643 }
8644
8645 impl std::convert::From<i32> for JsonCompression {
8646 fn from(value: i32) -> Self {
8647 match value {
8648 0 => Self::Unspecified,
8649 1 => Self::NoCompression,
8650 2 => Self::Gzip,
8651 _ => Self::UnknownValue(json_compression::UnknownValue(
8652 wkt::internal::UnknownEnumValue::Integer(value),
8653 )),
8654 }
8655 }
8656 }
8657
8658 impl std::convert::From<&str> for JsonCompression {
8659 fn from(value: &str) -> Self {
8660 use std::string::ToString;
8661 match value {
8662 "JSON_COMPRESSION_UNSPECIFIED" => Self::Unspecified,
8663 "NO_COMPRESSION" => Self::NoCompression,
8664 "GZIP" => Self::Gzip,
8665 _ => Self::UnknownValue(json_compression::UnknownValue(
8666 wkt::internal::UnknownEnumValue::String(value.to_string()),
8667 )),
8668 }
8669 }
8670 }
8671
8672 impl serde::ser::Serialize for JsonCompression {
8673 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8674 where
8675 S: serde::Serializer,
8676 {
8677 match self {
8678 Self::Unspecified => serializer.serialize_i32(0),
8679 Self::NoCompression => serializer.serialize_i32(1),
8680 Self::Gzip => serializer.serialize_i32(2),
8681 Self::UnknownValue(u) => u.0.serialize(serializer),
8682 }
8683 }
8684 }
8685
8686 impl<'de> serde::de::Deserialize<'de> for JsonCompression {
8687 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8688 where
8689 D: serde::Deserializer<'de>,
8690 {
8691 deserializer.deserialize_any(wkt::internal::EnumVisitor::<JsonCompression>::new(
8692 ".google.cloud.datastream.v1.JsonFileFormat.JsonCompression",
8693 ))
8694 }
8695 }
8696}
8697
8698#[derive(Clone, Default, PartialEq)]
8700#[non_exhaustive]
8701pub struct GcsDestinationConfig {
8702 pub path: std::string::String,
8704
8705 pub file_rotation_mb: i32,
8707
8708 pub file_rotation_interval: std::option::Option<wkt::Duration>,
8712
8713 pub file_format: std::option::Option<crate::model::gcs_destination_config::FileFormat>,
8715
8716 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8717}
8718
8719impl GcsDestinationConfig {
8720 pub fn new() -> Self {
8721 std::default::Default::default()
8722 }
8723
8724 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8726 self.path = v.into();
8727 self
8728 }
8729
8730 pub fn set_file_rotation_mb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8732 self.file_rotation_mb = v.into();
8733 self
8734 }
8735
8736 pub fn set_file_rotation_interval<T>(mut self, v: T) -> Self
8738 where
8739 T: std::convert::Into<wkt::Duration>,
8740 {
8741 self.file_rotation_interval = std::option::Option::Some(v.into());
8742 self
8743 }
8744
8745 pub fn set_or_clear_file_rotation_interval<T>(mut self, v: std::option::Option<T>) -> Self
8747 where
8748 T: std::convert::Into<wkt::Duration>,
8749 {
8750 self.file_rotation_interval = v.map(|x| x.into());
8751 self
8752 }
8753
8754 pub fn set_file_format<
8759 T: std::convert::Into<std::option::Option<crate::model::gcs_destination_config::FileFormat>>,
8760 >(
8761 mut self,
8762 v: T,
8763 ) -> Self {
8764 self.file_format = v.into();
8765 self
8766 }
8767
8768 pub fn avro_file_format(
8772 &self,
8773 ) -> std::option::Option<&std::boxed::Box<crate::model::AvroFileFormat>> {
8774 #[allow(unreachable_patterns)]
8775 self.file_format.as_ref().and_then(|v| match v {
8776 crate::model::gcs_destination_config::FileFormat::AvroFileFormat(v) => {
8777 std::option::Option::Some(v)
8778 }
8779 _ => std::option::Option::None,
8780 })
8781 }
8782
8783 pub fn set_avro_file_format<
8789 T: std::convert::Into<std::boxed::Box<crate::model::AvroFileFormat>>,
8790 >(
8791 mut self,
8792 v: T,
8793 ) -> Self {
8794 self.file_format = std::option::Option::Some(
8795 crate::model::gcs_destination_config::FileFormat::AvroFileFormat(v.into()),
8796 );
8797 self
8798 }
8799
8800 pub fn json_file_format(
8804 &self,
8805 ) -> std::option::Option<&std::boxed::Box<crate::model::JsonFileFormat>> {
8806 #[allow(unreachable_patterns)]
8807 self.file_format.as_ref().and_then(|v| match v {
8808 crate::model::gcs_destination_config::FileFormat::JsonFileFormat(v) => {
8809 std::option::Option::Some(v)
8810 }
8811 _ => std::option::Option::None,
8812 })
8813 }
8814
8815 pub fn set_json_file_format<
8821 T: std::convert::Into<std::boxed::Box<crate::model::JsonFileFormat>>,
8822 >(
8823 mut self,
8824 v: T,
8825 ) -> Self {
8826 self.file_format = std::option::Option::Some(
8827 crate::model::gcs_destination_config::FileFormat::JsonFileFormat(v.into()),
8828 );
8829 self
8830 }
8831}
8832
8833impl wkt::message::Message for GcsDestinationConfig {
8834 fn typename() -> &'static str {
8835 "type.googleapis.com/google.cloud.datastream.v1.GcsDestinationConfig"
8836 }
8837}
8838
8839pub mod gcs_destination_config {
8841 #[allow(unused_imports)]
8842 use super::*;
8843
8844 #[derive(Clone, Debug, PartialEq)]
8846 #[non_exhaustive]
8847 pub enum FileFormat {
8848 AvroFileFormat(std::boxed::Box<crate::model::AvroFileFormat>),
8850 JsonFileFormat(std::boxed::Box<crate::model::JsonFileFormat>),
8852 }
8853}
8854
8855#[derive(Clone, Default, PartialEq)]
8857#[non_exhaustive]
8858pub struct BigQueryDestinationConfig {
8859 pub data_freshness: std::option::Option<wkt::Duration>,
8864
8865 pub blmt_config: std::option::Option<crate::model::big_query_destination_config::BlmtConfig>,
8867
8868 pub dataset_config:
8870 std::option::Option<crate::model::big_query_destination_config::DatasetConfig>,
8871
8872 pub write_mode: std::option::Option<crate::model::big_query_destination_config::WriteMode>,
8873
8874 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8875}
8876
8877impl BigQueryDestinationConfig {
8878 pub fn new() -> Self {
8879 std::default::Default::default()
8880 }
8881
8882 pub fn set_data_freshness<T>(mut self, v: T) -> Self
8884 where
8885 T: std::convert::Into<wkt::Duration>,
8886 {
8887 self.data_freshness = std::option::Option::Some(v.into());
8888 self
8889 }
8890
8891 pub fn set_or_clear_data_freshness<T>(mut self, v: std::option::Option<T>) -> Self
8893 where
8894 T: std::convert::Into<wkt::Duration>,
8895 {
8896 self.data_freshness = v.map(|x| x.into());
8897 self
8898 }
8899
8900 pub fn set_blmt_config<T>(mut self, v: T) -> Self
8902 where
8903 T: std::convert::Into<crate::model::big_query_destination_config::BlmtConfig>,
8904 {
8905 self.blmt_config = std::option::Option::Some(v.into());
8906 self
8907 }
8908
8909 pub fn set_or_clear_blmt_config<T>(mut self, v: std::option::Option<T>) -> Self
8911 where
8912 T: std::convert::Into<crate::model::big_query_destination_config::BlmtConfig>,
8913 {
8914 self.blmt_config = v.map(|x| x.into());
8915 self
8916 }
8917
8918 pub fn set_dataset_config<
8923 T: std::convert::Into<
8924 std::option::Option<crate::model::big_query_destination_config::DatasetConfig>,
8925 >,
8926 >(
8927 mut self,
8928 v: T,
8929 ) -> Self {
8930 self.dataset_config = v.into();
8931 self
8932 }
8933
8934 pub fn single_target_dataset(
8938 &self,
8939 ) -> std::option::Option<
8940 &std::boxed::Box<crate::model::big_query_destination_config::SingleTargetDataset>,
8941 > {
8942 #[allow(unreachable_patterns)]
8943 self.dataset_config.as_ref().and_then(|v| match v {
8944 crate::model::big_query_destination_config::DatasetConfig::SingleTargetDataset(v) => {
8945 std::option::Option::Some(v)
8946 }
8947 _ => std::option::Option::None,
8948 })
8949 }
8950
8951 pub fn set_single_target_dataset<
8957 T: std::convert::Into<
8958 std::boxed::Box<crate::model::big_query_destination_config::SingleTargetDataset>,
8959 >,
8960 >(
8961 mut self,
8962 v: T,
8963 ) -> Self {
8964 self.dataset_config = std::option::Option::Some(
8965 crate::model::big_query_destination_config::DatasetConfig::SingleTargetDataset(
8966 v.into(),
8967 ),
8968 );
8969 self
8970 }
8971
8972 pub fn source_hierarchy_datasets(
8976 &self,
8977 ) -> std::option::Option<
8978 &std::boxed::Box<crate::model::big_query_destination_config::SourceHierarchyDatasets>,
8979 > {
8980 #[allow(unreachable_patterns)]
8981 self.dataset_config.as_ref().and_then(|v| match v {
8982 crate::model::big_query_destination_config::DatasetConfig::SourceHierarchyDatasets(
8983 v,
8984 ) => std::option::Option::Some(v),
8985 _ => std::option::Option::None,
8986 })
8987 }
8988
8989 pub fn set_source_hierarchy_datasets<
8995 T: std::convert::Into<
8996 std::boxed::Box<
8997 crate::model::big_query_destination_config::SourceHierarchyDatasets,
8998 >,
8999 >,
9000 >(
9001 mut self,
9002 v: T,
9003 ) -> Self {
9004 self.dataset_config = std::option::Option::Some(
9005 crate::model::big_query_destination_config::DatasetConfig::SourceHierarchyDatasets(
9006 v.into(),
9007 ),
9008 );
9009 self
9010 }
9011
9012 pub fn set_write_mode<
9017 T: std::convert::Into<
9018 std::option::Option<crate::model::big_query_destination_config::WriteMode>,
9019 >,
9020 >(
9021 mut self,
9022 v: T,
9023 ) -> Self {
9024 self.write_mode = v.into();
9025 self
9026 }
9027
9028 pub fn merge(
9032 &self,
9033 ) -> std::option::Option<&std::boxed::Box<crate::model::big_query_destination_config::Merge>>
9034 {
9035 #[allow(unreachable_patterns)]
9036 self.write_mode.as_ref().and_then(|v| match v {
9037 crate::model::big_query_destination_config::WriteMode::Merge(v) => {
9038 std::option::Option::Some(v)
9039 }
9040 _ => std::option::Option::None,
9041 })
9042 }
9043
9044 pub fn set_merge<
9050 T: std::convert::Into<std::boxed::Box<crate::model::big_query_destination_config::Merge>>,
9051 >(
9052 mut self,
9053 v: T,
9054 ) -> Self {
9055 self.write_mode = std::option::Option::Some(
9056 crate::model::big_query_destination_config::WriteMode::Merge(v.into()),
9057 );
9058 self
9059 }
9060
9061 pub fn append_only(
9065 &self,
9066 ) -> std::option::Option<&std::boxed::Box<crate::model::big_query_destination_config::AppendOnly>>
9067 {
9068 #[allow(unreachable_patterns)]
9069 self.write_mode.as_ref().and_then(|v| match v {
9070 crate::model::big_query_destination_config::WriteMode::AppendOnly(v) => {
9071 std::option::Option::Some(v)
9072 }
9073 _ => std::option::Option::None,
9074 })
9075 }
9076
9077 pub fn set_append_only<
9083 T: std::convert::Into<std::boxed::Box<crate::model::big_query_destination_config::AppendOnly>>,
9084 >(
9085 mut self,
9086 v: T,
9087 ) -> Self {
9088 self.write_mode = std::option::Option::Some(
9089 crate::model::big_query_destination_config::WriteMode::AppendOnly(v.into()),
9090 );
9091 self
9092 }
9093}
9094
9095impl wkt::message::Message for BigQueryDestinationConfig {
9096 fn typename() -> &'static str {
9097 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig"
9098 }
9099}
9100
9101pub mod big_query_destination_config {
9103 #[allow(unused_imports)]
9104 use super::*;
9105
9106 #[derive(Clone, Default, PartialEq)]
9108 #[non_exhaustive]
9109 pub struct SingleTargetDataset {
9110 pub dataset_id: std::string::String,
9114
9115 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9116 }
9117
9118 impl SingleTargetDataset {
9119 pub fn new() -> Self {
9120 std::default::Default::default()
9121 }
9122
9123 pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9125 self.dataset_id = v.into();
9126 self
9127 }
9128 }
9129
9130 impl wkt::message::Message for SingleTargetDataset {
9131 fn typename() -> &'static str {
9132 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset"
9133 }
9134 }
9135
9136 #[derive(Clone, Default, PartialEq)]
9139 #[non_exhaustive]
9140 pub struct SourceHierarchyDatasets {
9141 pub dataset_template: std::option::Option<
9143 crate::model::big_query_destination_config::source_hierarchy_datasets::DatasetTemplate,
9144 >,
9145
9146 pub project_id: std::option::Option<std::string::String>,
9149
9150 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9151 }
9152
9153 impl SourceHierarchyDatasets {
9154 pub fn new() -> Self {
9155 std::default::Default::default()
9156 }
9157
9158 pub fn set_dataset_template<T>(mut self, v: T) -> Self
9160 where T: std::convert::Into<crate::model::big_query_destination_config::source_hierarchy_datasets::DatasetTemplate>
9161 {
9162 self.dataset_template = std::option::Option::Some(v.into());
9163 self
9164 }
9165
9166 pub fn set_or_clear_dataset_template<T>(mut self, v: std::option::Option<T>) -> Self
9168 where T: std::convert::Into<crate::model::big_query_destination_config::source_hierarchy_datasets::DatasetTemplate>
9169 {
9170 self.dataset_template = v.map(|x| x.into());
9171 self
9172 }
9173
9174 pub fn set_project_id<T>(mut self, v: T) -> Self
9176 where
9177 T: std::convert::Into<std::string::String>,
9178 {
9179 self.project_id = std::option::Option::Some(v.into());
9180 self
9181 }
9182
9183 pub fn set_or_clear_project_id<T>(mut self, v: std::option::Option<T>) -> Self
9185 where
9186 T: std::convert::Into<std::string::String>,
9187 {
9188 self.project_id = v.map(|x| x.into());
9189 self
9190 }
9191 }
9192
9193 impl wkt::message::Message for SourceHierarchyDatasets {
9194 fn typename() -> &'static str {
9195 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets"
9196 }
9197 }
9198
9199 pub mod source_hierarchy_datasets {
9201 #[allow(unused_imports)]
9202 use super::*;
9203
9204 #[derive(Clone, Default, PartialEq)]
9206 #[non_exhaustive]
9207 pub struct DatasetTemplate {
9208 pub location: std::string::String,
9212
9213 pub dataset_id_prefix: std::string::String,
9217
9218 pub kms_key_name: std::string::String,
9226
9227 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9228 }
9229
9230 impl DatasetTemplate {
9231 pub fn new() -> Self {
9232 std::default::Default::default()
9233 }
9234
9235 pub fn set_location<T: std::convert::Into<std::string::String>>(
9237 mut self,
9238 v: T,
9239 ) -> Self {
9240 self.location = v.into();
9241 self
9242 }
9243
9244 pub fn set_dataset_id_prefix<T: std::convert::Into<std::string::String>>(
9246 mut self,
9247 v: T,
9248 ) -> Self {
9249 self.dataset_id_prefix = v.into();
9250 self
9251 }
9252
9253 pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
9255 mut self,
9256 v: T,
9257 ) -> Self {
9258 self.kms_key_name = v.into();
9259 self
9260 }
9261 }
9262
9263 impl wkt::message::Message for DatasetTemplate {
9264 fn typename() -> &'static str {
9265 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate"
9266 }
9267 }
9268 }
9269
9270 #[derive(Clone, Default, PartialEq)]
9272 #[non_exhaustive]
9273 pub struct BlmtConfig {
9274 pub bucket: std::string::String,
9276
9277 pub root_path: std::string::String,
9279
9280 pub connection_name: std::string::String,
9283
9284 pub file_format: crate::model::big_query_destination_config::blmt_config::FileFormat,
9286
9287 pub table_format: crate::model::big_query_destination_config::blmt_config::TableFormat,
9289
9290 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9291 }
9292
9293 impl BlmtConfig {
9294 pub fn new() -> Self {
9295 std::default::Default::default()
9296 }
9297
9298 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9300 self.bucket = v.into();
9301 self
9302 }
9303
9304 pub fn set_root_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9306 self.root_path = v.into();
9307 self
9308 }
9309
9310 pub fn set_connection_name<T: std::convert::Into<std::string::String>>(
9312 mut self,
9313 v: T,
9314 ) -> Self {
9315 self.connection_name = v.into();
9316 self
9317 }
9318
9319 pub fn set_file_format<
9321 T: std::convert::Into<crate::model::big_query_destination_config::blmt_config::FileFormat>,
9322 >(
9323 mut self,
9324 v: T,
9325 ) -> Self {
9326 self.file_format = v.into();
9327 self
9328 }
9329
9330 pub fn set_table_format<
9332 T: std::convert::Into<
9333 crate::model::big_query_destination_config::blmt_config::TableFormat,
9334 >,
9335 >(
9336 mut self,
9337 v: T,
9338 ) -> Self {
9339 self.table_format = v.into();
9340 self
9341 }
9342 }
9343
9344 impl wkt::message::Message for BlmtConfig {
9345 fn typename() -> &'static str {
9346 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig"
9347 }
9348 }
9349
9350 pub mod blmt_config {
9352 #[allow(unused_imports)]
9353 use super::*;
9354
9355 #[derive(Clone, Debug, PartialEq)]
9371 #[non_exhaustive]
9372 pub enum FileFormat {
9373 Unspecified,
9375 Parquet,
9377 UnknownValue(file_format::UnknownValue),
9382 }
9383
9384 #[doc(hidden)]
9385 pub mod file_format {
9386 #[allow(unused_imports)]
9387 use super::*;
9388 #[derive(Clone, Debug, PartialEq)]
9389 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9390 }
9391
9392 impl FileFormat {
9393 pub fn value(&self) -> std::option::Option<i32> {
9398 match self {
9399 Self::Unspecified => std::option::Option::Some(0),
9400 Self::Parquet => std::option::Option::Some(1),
9401 Self::UnknownValue(u) => u.0.value(),
9402 }
9403 }
9404
9405 pub fn name(&self) -> std::option::Option<&str> {
9410 match self {
9411 Self::Unspecified => std::option::Option::Some("FILE_FORMAT_UNSPECIFIED"),
9412 Self::Parquet => std::option::Option::Some("PARQUET"),
9413 Self::UnknownValue(u) => u.0.name(),
9414 }
9415 }
9416 }
9417
9418 impl std::default::Default for FileFormat {
9419 fn default() -> Self {
9420 use std::convert::From;
9421 Self::from(0)
9422 }
9423 }
9424
9425 impl std::fmt::Display for FileFormat {
9426 fn fmt(
9427 &self,
9428 f: &mut std::fmt::Formatter<'_>,
9429 ) -> std::result::Result<(), std::fmt::Error> {
9430 wkt::internal::display_enum(f, self.name(), self.value())
9431 }
9432 }
9433
9434 impl std::convert::From<i32> for FileFormat {
9435 fn from(value: i32) -> Self {
9436 match value {
9437 0 => Self::Unspecified,
9438 1 => Self::Parquet,
9439 _ => Self::UnknownValue(file_format::UnknownValue(
9440 wkt::internal::UnknownEnumValue::Integer(value),
9441 )),
9442 }
9443 }
9444 }
9445
9446 impl std::convert::From<&str> for FileFormat {
9447 fn from(value: &str) -> Self {
9448 use std::string::ToString;
9449 match value {
9450 "FILE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9451 "PARQUET" => Self::Parquet,
9452 _ => Self::UnknownValue(file_format::UnknownValue(
9453 wkt::internal::UnknownEnumValue::String(value.to_string()),
9454 )),
9455 }
9456 }
9457 }
9458
9459 impl serde::ser::Serialize for FileFormat {
9460 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9461 where
9462 S: serde::Serializer,
9463 {
9464 match self {
9465 Self::Unspecified => serializer.serialize_i32(0),
9466 Self::Parquet => serializer.serialize_i32(1),
9467 Self::UnknownValue(u) => u.0.serialize(serializer),
9468 }
9469 }
9470 }
9471
9472 impl<'de> serde::de::Deserialize<'de> for FileFormat {
9473 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9474 where
9475 D: serde::Deserializer<'de>,
9476 {
9477 deserializer.deserialize_any(wkt::internal::EnumVisitor::<FileFormat>::new(
9478 ".google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig.FileFormat",
9479 ))
9480 }
9481 }
9482
9483 #[derive(Clone, Debug, PartialEq)]
9499 #[non_exhaustive]
9500 pub enum TableFormat {
9501 Unspecified,
9503 Iceberg,
9505 UnknownValue(table_format::UnknownValue),
9510 }
9511
9512 #[doc(hidden)]
9513 pub mod table_format {
9514 #[allow(unused_imports)]
9515 use super::*;
9516 #[derive(Clone, Debug, PartialEq)]
9517 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9518 }
9519
9520 impl TableFormat {
9521 pub fn value(&self) -> std::option::Option<i32> {
9526 match self {
9527 Self::Unspecified => std::option::Option::Some(0),
9528 Self::Iceberg => std::option::Option::Some(1),
9529 Self::UnknownValue(u) => u.0.value(),
9530 }
9531 }
9532
9533 pub fn name(&self) -> std::option::Option<&str> {
9538 match self {
9539 Self::Unspecified => std::option::Option::Some("TABLE_FORMAT_UNSPECIFIED"),
9540 Self::Iceberg => std::option::Option::Some("ICEBERG"),
9541 Self::UnknownValue(u) => u.0.name(),
9542 }
9543 }
9544 }
9545
9546 impl std::default::Default for TableFormat {
9547 fn default() -> Self {
9548 use std::convert::From;
9549 Self::from(0)
9550 }
9551 }
9552
9553 impl std::fmt::Display for TableFormat {
9554 fn fmt(
9555 &self,
9556 f: &mut std::fmt::Formatter<'_>,
9557 ) -> std::result::Result<(), std::fmt::Error> {
9558 wkt::internal::display_enum(f, self.name(), self.value())
9559 }
9560 }
9561
9562 impl std::convert::From<i32> for TableFormat {
9563 fn from(value: i32) -> Self {
9564 match value {
9565 0 => Self::Unspecified,
9566 1 => Self::Iceberg,
9567 _ => Self::UnknownValue(table_format::UnknownValue(
9568 wkt::internal::UnknownEnumValue::Integer(value),
9569 )),
9570 }
9571 }
9572 }
9573
9574 impl std::convert::From<&str> for TableFormat {
9575 fn from(value: &str) -> Self {
9576 use std::string::ToString;
9577 match value {
9578 "TABLE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9579 "ICEBERG" => Self::Iceberg,
9580 _ => Self::UnknownValue(table_format::UnknownValue(
9581 wkt::internal::UnknownEnumValue::String(value.to_string()),
9582 )),
9583 }
9584 }
9585 }
9586
9587 impl serde::ser::Serialize for TableFormat {
9588 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9589 where
9590 S: serde::Serializer,
9591 {
9592 match self {
9593 Self::Unspecified => serializer.serialize_i32(0),
9594 Self::Iceberg => serializer.serialize_i32(1),
9595 Self::UnknownValue(u) => u.0.serialize(serializer),
9596 }
9597 }
9598 }
9599
9600 impl<'de> serde::de::Deserialize<'de> for TableFormat {
9601 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9602 where
9603 D: serde::Deserializer<'de>,
9604 {
9605 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableFormat>::new(
9606 ".google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig.TableFormat",
9607 ))
9608 }
9609 }
9610 }
9611
9612 #[derive(Clone, Default, PartialEq)]
9615 #[non_exhaustive]
9616 pub struct AppendOnly {
9617 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9618 }
9619
9620 impl AppendOnly {
9621 pub fn new() -> Self {
9622 std::default::Default::default()
9623 }
9624 }
9625
9626 impl wkt::message::Message for AppendOnly {
9627 fn typename() -> &'static str {
9628 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly"
9629 }
9630 }
9631
9632 #[derive(Clone, Default, PartialEq)]
9635 #[non_exhaustive]
9636 pub struct Merge {
9637 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9638 }
9639
9640 impl Merge {
9641 pub fn new() -> Self {
9642 std::default::Default::default()
9643 }
9644 }
9645
9646 impl wkt::message::Message for Merge {
9647 fn typename() -> &'static str {
9648 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.Merge"
9649 }
9650 }
9651
9652 #[derive(Clone, Debug, PartialEq)]
9654 #[non_exhaustive]
9655 pub enum DatasetConfig {
9656 SingleTargetDataset(
9658 std::boxed::Box<crate::model::big_query_destination_config::SingleTargetDataset>,
9659 ),
9660 SourceHierarchyDatasets(
9662 std::boxed::Box<crate::model::big_query_destination_config::SourceHierarchyDatasets>,
9663 ),
9664 }
9665
9666 #[derive(Clone, Debug, PartialEq)]
9667 #[non_exhaustive]
9668 pub enum WriteMode {
9669 Merge(std::boxed::Box<crate::model::big_query_destination_config::Merge>),
9671 AppendOnly(std::boxed::Box<crate::model::big_query_destination_config::AppendOnly>),
9673 }
9674}
9675
9676#[derive(Clone, Default, PartialEq)]
9678#[non_exhaustive]
9679pub struct DestinationConfig {
9680 pub destination_connection_profile: std::string::String,
9683
9684 pub destination_stream_config:
9686 std::option::Option<crate::model::destination_config::DestinationStreamConfig>,
9687
9688 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9689}
9690
9691impl DestinationConfig {
9692 pub fn new() -> Self {
9693 std::default::Default::default()
9694 }
9695
9696 pub fn set_destination_connection_profile<T: std::convert::Into<std::string::String>>(
9698 mut self,
9699 v: T,
9700 ) -> Self {
9701 self.destination_connection_profile = v.into();
9702 self
9703 }
9704
9705 pub fn set_destination_stream_config<
9710 T: std::convert::Into<
9711 std::option::Option<crate::model::destination_config::DestinationStreamConfig>,
9712 >,
9713 >(
9714 mut self,
9715 v: T,
9716 ) -> Self {
9717 self.destination_stream_config = v.into();
9718 self
9719 }
9720
9721 pub fn gcs_destination_config(
9725 &self,
9726 ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestinationConfig>> {
9727 #[allow(unreachable_patterns)]
9728 self.destination_stream_config
9729 .as_ref()
9730 .and_then(|v| match v {
9731 crate::model::destination_config::DestinationStreamConfig::GcsDestinationConfig(
9732 v,
9733 ) => std::option::Option::Some(v),
9734 _ => std::option::Option::None,
9735 })
9736 }
9737
9738 pub fn set_gcs_destination_config<
9744 T: std::convert::Into<std::boxed::Box<crate::model::GcsDestinationConfig>>,
9745 >(
9746 mut self,
9747 v: T,
9748 ) -> Self {
9749 self.destination_stream_config = std::option::Option::Some(
9750 crate::model::destination_config::DestinationStreamConfig::GcsDestinationConfig(
9751 v.into(),
9752 ),
9753 );
9754 self
9755 }
9756
9757 pub fn bigquery_destination_config(
9761 &self,
9762 ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestinationConfig>> {
9763 #[allow(unreachable_patterns)]
9764 self.destination_stream_config.as_ref().and_then(|v| match v {
9765 crate::model::destination_config::DestinationStreamConfig::BigqueryDestinationConfig(v) => std::option::Option::Some(v),
9766 _ => std::option::Option::None,
9767 })
9768 }
9769
9770 pub fn set_bigquery_destination_config<
9776 T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestinationConfig>>,
9777 >(
9778 mut self,
9779 v: T,
9780 ) -> Self {
9781 self.destination_stream_config = std::option::Option::Some(
9782 crate::model::destination_config::DestinationStreamConfig::BigqueryDestinationConfig(
9783 v.into(),
9784 ),
9785 );
9786 self
9787 }
9788}
9789
9790impl wkt::message::Message for DestinationConfig {
9791 fn typename() -> &'static str {
9792 "type.googleapis.com/google.cloud.datastream.v1.DestinationConfig"
9793 }
9794}
9795
9796pub mod destination_config {
9798 #[allow(unused_imports)]
9799 use super::*;
9800
9801 #[derive(Clone, Debug, PartialEq)]
9803 #[non_exhaustive]
9804 pub enum DestinationStreamConfig {
9805 GcsDestinationConfig(std::boxed::Box<crate::model::GcsDestinationConfig>),
9807 BigqueryDestinationConfig(std::boxed::Box<crate::model::BigQueryDestinationConfig>),
9809 }
9810}
9811
9812#[derive(Clone, Default, PartialEq)]
9814#[non_exhaustive]
9815pub struct Stream {
9816 pub name: std::string::String,
9818
9819 pub create_time: std::option::Option<wkt::Timestamp>,
9821
9822 pub update_time: std::option::Option<wkt::Timestamp>,
9824
9825 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9827
9828 pub display_name: std::string::String,
9830
9831 pub source_config: std::option::Option<crate::model::SourceConfig>,
9833
9834 pub destination_config: std::option::Option<crate::model::DestinationConfig>,
9836
9837 pub state: crate::model::stream::State,
9839
9840 pub errors: std::vec::Vec<crate::model::Error>,
9842
9843 pub customer_managed_encryption_key: std::option::Option<std::string::String>,
9848
9849 pub last_recovery_time: std::option::Option<wkt::Timestamp>,
9852
9853 pub satisfies_pzs: std::option::Option<bool>,
9855
9856 pub satisfies_pzi: std::option::Option<bool>,
9858
9859 pub backfill_strategy: std::option::Option<crate::model::stream::BackfillStrategy>,
9861
9862 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9863}
9864
9865impl Stream {
9866 pub fn new() -> Self {
9867 std::default::Default::default()
9868 }
9869
9870 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9872 self.name = v.into();
9873 self
9874 }
9875
9876 pub fn set_create_time<T>(mut self, v: T) -> Self
9878 where
9879 T: std::convert::Into<wkt::Timestamp>,
9880 {
9881 self.create_time = std::option::Option::Some(v.into());
9882 self
9883 }
9884
9885 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9887 where
9888 T: std::convert::Into<wkt::Timestamp>,
9889 {
9890 self.create_time = v.map(|x| x.into());
9891 self
9892 }
9893
9894 pub fn set_update_time<T>(mut self, v: T) -> Self
9896 where
9897 T: std::convert::Into<wkt::Timestamp>,
9898 {
9899 self.update_time = std::option::Option::Some(v.into());
9900 self
9901 }
9902
9903 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9905 where
9906 T: std::convert::Into<wkt::Timestamp>,
9907 {
9908 self.update_time = v.map(|x| x.into());
9909 self
9910 }
9911
9912 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9914 where
9915 T: std::iter::IntoIterator<Item = (K, V)>,
9916 K: std::convert::Into<std::string::String>,
9917 V: std::convert::Into<std::string::String>,
9918 {
9919 use std::iter::Iterator;
9920 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9921 self
9922 }
9923
9924 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9926 self.display_name = v.into();
9927 self
9928 }
9929
9930 pub fn set_source_config<T>(mut self, v: T) -> Self
9932 where
9933 T: std::convert::Into<crate::model::SourceConfig>,
9934 {
9935 self.source_config = std::option::Option::Some(v.into());
9936 self
9937 }
9938
9939 pub fn set_or_clear_source_config<T>(mut self, v: std::option::Option<T>) -> Self
9941 where
9942 T: std::convert::Into<crate::model::SourceConfig>,
9943 {
9944 self.source_config = v.map(|x| x.into());
9945 self
9946 }
9947
9948 pub fn set_destination_config<T>(mut self, v: T) -> Self
9950 where
9951 T: std::convert::Into<crate::model::DestinationConfig>,
9952 {
9953 self.destination_config = std::option::Option::Some(v.into());
9954 self
9955 }
9956
9957 pub fn set_or_clear_destination_config<T>(mut self, v: std::option::Option<T>) -> Self
9959 where
9960 T: std::convert::Into<crate::model::DestinationConfig>,
9961 {
9962 self.destination_config = v.map(|x| x.into());
9963 self
9964 }
9965
9966 pub fn set_state<T: std::convert::Into<crate::model::stream::State>>(mut self, v: T) -> Self {
9968 self.state = v.into();
9969 self
9970 }
9971
9972 pub fn set_errors<T, V>(mut self, v: T) -> Self
9974 where
9975 T: std::iter::IntoIterator<Item = V>,
9976 V: std::convert::Into<crate::model::Error>,
9977 {
9978 use std::iter::Iterator;
9979 self.errors = v.into_iter().map(|i| i.into()).collect();
9980 self
9981 }
9982
9983 pub fn set_customer_managed_encryption_key<T>(mut self, v: T) -> Self
9985 where
9986 T: std::convert::Into<std::string::String>,
9987 {
9988 self.customer_managed_encryption_key = std::option::Option::Some(v.into());
9989 self
9990 }
9991
9992 pub fn set_or_clear_customer_managed_encryption_key<T>(
9994 mut self,
9995 v: std::option::Option<T>,
9996 ) -> Self
9997 where
9998 T: std::convert::Into<std::string::String>,
9999 {
10000 self.customer_managed_encryption_key = v.map(|x| x.into());
10001 self
10002 }
10003
10004 pub fn set_last_recovery_time<T>(mut self, v: T) -> Self
10006 where
10007 T: std::convert::Into<wkt::Timestamp>,
10008 {
10009 self.last_recovery_time = std::option::Option::Some(v.into());
10010 self
10011 }
10012
10013 pub fn set_or_clear_last_recovery_time<T>(mut self, v: std::option::Option<T>) -> Self
10015 where
10016 T: std::convert::Into<wkt::Timestamp>,
10017 {
10018 self.last_recovery_time = v.map(|x| x.into());
10019 self
10020 }
10021
10022 pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
10024 where
10025 T: std::convert::Into<bool>,
10026 {
10027 self.satisfies_pzs = std::option::Option::Some(v.into());
10028 self
10029 }
10030
10031 pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
10033 where
10034 T: std::convert::Into<bool>,
10035 {
10036 self.satisfies_pzs = v.map(|x| x.into());
10037 self
10038 }
10039
10040 pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
10042 where
10043 T: std::convert::Into<bool>,
10044 {
10045 self.satisfies_pzi = std::option::Option::Some(v.into());
10046 self
10047 }
10048
10049 pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
10051 where
10052 T: std::convert::Into<bool>,
10053 {
10054 self.satisfies_pzi = v.map(|x| x.into());
10055 self
10056 }
10057
10058 pub fn set_backfill_strategy<
10063 T: std::convert::Into<std::option::Option<crate::model::stream::BackfillStrategy>>,
10064 >(
10065 mut self,
10066 v: T,
10067 ) -> Self {
10068 self.backfill_strategy = v.into();
10069 self
10070 }
10071
10072 pub fn backfill_all(
10076 &self,
10077 ) -> std::option::Option<&std::boxed::Box<crate::model::stream::BackfillAllStrategy>> {
10078 #[allow(unreachable_patterns)]
10079 self.backfill_strategy.as_ref().and_then(|v| match v {
10080 crate::model::stream::BackfillStrategy::BackfillAll(v) => std::option::Option::Some(v),
10081 _ => std::option::Option::None,
10082 })
10083 }
10084
10085 pub fn set_backfill_all<
10091 T: std::convert::Into<std::boxed::Box<crate::model::stream::BackfillAllStrategy>>,
10092 >(
10093 mut self,
10094 v: T,
10095 ) -> Self {
10096 self.backfill_strategy = std::option::Option::Some(
10097 crate::model::stream::BackfillStrategy::BackfillAll(v.into()),
10098 );
10099 self
10100 }
10101
10102 pub fn backfill_none(
10106 &self,
10107 ) -> std::option::Option<&std::boxed::Box<crate::model::stream::BackfillNoneStrategy>> {
10108 #[allow(unreachable_patterns)]
10109 self.backfill_strategy.as_ref().and_then(|v| match v {
10110 crate::model::stream::BackfillStrategy::BackfillNone(v) => std::option::Option::Some(v),
10111 _ => std::option::Option::None,
10112 })
10113 }
10114
10115 pub fn set_backfill_none<
10121 T: std::convert::Into<std::boxed::Box<crate::model::stream::BackfillNoneStrategy>>,
10122 >(
10123 mut self,
10124 v: T,
10125 ) -> Self {
10126 self.backfill_strategy = std::option::Option::Some(
10127 crate::model::stream::BackfillStrategy::BackfillNone(v.into()),
10128 );
10129 self
10130 }
10131}
10132
10133impl wkt::message::Message for Stream {
10134 fn typename() -> &'static str {
10135 "type.googleapis.com/google.cloud.datastream.v1.Stream"
10136 }
10137}
10138
10139pub mod stream {
10141 #[allow(unused_imports)]
10142 use super::*;
10143
10144 #[derive(Clone, Default, PartialEq)]
10147 #[non_exhaustive]
10148 pub struct BackfillAllStrategy {
10149 pub excluded_objects:
10151 std::option::Option<crate::model::stream::backfill_all_strategy::ExcludedObjects>,
10152
10153 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10154 }
10155
10156 impl BackfillAllStrategy {
10157 pub fn new() -> Self {
10158 std::default::Default::default()
10159 }
10160
10161 pub fn set_excluded_objects<
10166 T: std::convert::Into<
10167 std::option::Option<
10168 crate::model::stream::backfill_all_strategy::ExcludedObjects,
10169 >,
10170 >,
10171 >(
10172 mut self,
10173 v: T,
10174 ) -> Self {
10175 self.excluded_objects = v.into();
10176 self
10177 }
10178
10179 pub fn oracle_excluded_objects(
10183 &self,
10184 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleRdbms>> {
10185 #[allow(unreachable_patterns)]
10186 self.excluded_objects.as_ref().and_then(|v| match v {
10187 crate::model::stream::backfill_all_strategy::ExcludedObjects::OracleExcludedObjects(v) => std::option::Option::Some(v),
10188 _ => std::option::Option::None,
10189 })
10190 }
10191
10192 pub fn set_oracle_excluded_objects<
10198 T: std::convert::Into<std::boxed::Box<crate::model::OracleRdbms>>,
10199 >(
10200 mut self,
10201 v: T,
10202 ) -> Self {
10203 self.excluded_objects = std::option::Option::Some(
10204 crate::model::stream::backfill_all_strategy::ExcludedObjects::OracleExcludedObjects(
10205 v.into(),
10206 ),
10207 );
10208 self
10209 }
10210
10211 pub fn mysql_excluded_objects(
10215 &self,
10216 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlRdbms>> {
10217 #[allow(unreachable_patterns)]
10218 self.excluded_objects.as_ref().and_then(|v| match v {
10219 crate::model::stream::backfill_all_strategy::ExcludedObjects::MysqlExcludedObjects(v) => std::option::Option::Some(v),
10220 _ => std::option::Option::None,
10221 })
10222 }
10223
10224 pub fn set_mysql_excluded_objects<
10230 T: std::convert::Into<std::boxed::Box<crate::model::MysqlRdbms>>,
10231 >(
10232 mut self,
10233 v: T,
10234 ) -> Self {
10235 self.excluded_objects = std::option::Option::Some(
10236 crate::model::stream::backfill_all_strategy::ExcludedObjects::MysqlExcludedObjects(
10237 v.into(),
10238 ),
10239 );
10240 self
10241 }
10242
10243 pub fn postgresql_excluded_objects(
10247 &self,
10248 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlRdbms>> {
10249 #[allow(unreachable_patterns)]
10250 self.excluded_objects.as_ref().and_then(|v| match v {
10251 crate::model::stream::backfill_all_strategy::ExcludedObjects::PostgresqlExcludedObjects(v) => std::option::Option::Some(v),
10252 _ => std::option::Option::None,
10253 })
10254 }
10255
10256 pub fn set_postgresql_excluded_objects<
10262 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlRdbms>>,
10263 >(
10264 mut self,
10265 v: T,
10266 ) -> Self {
10267 self.excluded_objects = std::option::Option::Some(
10268 crate::model::stream::backfill_all_strategy::ExcludedObjects::PostgresqlExcludedObjects(
10269 v.into()
10270 )
10271 );
10272 self
10273 }
10274
10275 pub fn sql_server_excluded_objects(
10279 &self,
10280 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerRdbms>> {
10281 #[allow(unreachable_patterns)]
10282 self.excluded_objects.as_ref().and_then(|v| match v {
10283 crate::model::stream::backfill_all_strategy::ExcludedObjects::SqlServerExcludedObjects(v) => std::option::Option::Some(v),
10284 _ => std::option::Option::None,
10285 })
10286 }
10287
10288 pub fn set_sql_server_excluded_objects<
10294 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerRdbms>>,
10295 >(
10296 mut self,
10297 v: T,
10298 ) -> Self {
10299 self.excluded_objects = std::option::Option::Some(
10300 crate::model::stream::backfill_all_strategy::ExcludedObjects::SqlServerExcludedObjects(
10301 v.into()
10302 )
10303 );
10304 self
10305 }
10306
10307 pub fn salesforce_excluded_objects(
10311 &self,
10312 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceOrg>> {
10313 #[allow(unreachable_patterns)]
10314 self.excluded_objects.as_ref().and_then(|v| match v {
10315 crate::model::stream::backfill_all_strategy::ExcludedObjects::SalesforceExcludedObjects(v) => std::option::Option::Some(v),
10316 _ => std::option::Option::None,
10317 })
10318 }
10319
10320 pub fn set_salesforce_excluded_objects<
10326 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceOrg>>,
10327 >(
10328 mut self,
10329 v: T,
10330 ) -> Self {
10331 self.excluded_objects = std::option::Option::Some(
10332 crate::model::stream::backfill_all_strategy::ExcludedObjects::SalesforceExcludedObjects(
10333 v.into()
10334 )
10335 );
10336 self
10337 }
10338
10339 pub fn mongodb_excluded_objects(
10343 &self,
10344 ) -> std::option::Option<&std::boxed::Box<crate::model::MongodbCluster>> {
10345 #[allow(unreachable_patterns)]
10346 self.excluded_objects.as_ref().and_then(|v| match v {
10347 crate::model::stream::backfill_all_strategy::ExcludedObjects::MongodbExcludedObjects(v) => std::option::Option::Some(v),
10348 _ => std::option::Option::None,
10349 })
10350 }
10351
10352 pub fn set_mongodb_excluded_objects<
10358 T: std::convert::Into<std::boxed::Box<crate::model::MongodbCluster>>,
10359 >(
10360 mut self,
10361 v: T,
10362 ) -> Self {
10363 self.excluded_objects = std::option::Option::Some(
10364 crate::model::stream::backfill_all_strategy::ExcludedObjects::MongodbExcludedObjects(
10365 v.into()
10366 )
10367 );
10368 self
10369 }
10370 }
10371
10372 impl wkt::message::Message for BackfillAllStrategy {
10373 fn typename() -> &'static str {
10374 "type.googleapis.com/google.cloud.datastream.v1.Stream.BackfillAllStrategy"
10375 }
10376 }
10377
10378 pub mod backfill_all_strategy {
10380 #[allow(unused_imports)]
10381 use super::*;
10382
10383 #[derive(Clone, Debug, PartialEq)]
10385 #[non_exhaustive]
10386 pub enum ExcludedObjects {
10387 OracleExcludedObjects(std::boxed::Box<crate::model::OracleRdbms>),
10389 MysqlExcludedObjects(std::boxed::Box<crate::model::MysqlRdbms>),
10391 PostgresqlExcludedObjects(std::boxed::Box<crate::model::PostgresqlRdbms>),
10393 SqlServerExcludedObjects(std::boxed::Box<crate::model::SqlServerRdbms>),
10395 SalesforceExcludedObjects(std::boxed::Box<crate::model::SalesforceOrg>),
10397 MongodbExcludedObjects(std::boxed::Box<crate::model::MongodbCluster>),
10399 }
10400 }
10401
10402 #[derive(Clone, Default, PartialEq)]
10404 #[non_exhaustive]
10405 pub struct BackfillNoneStrategy {
10406 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10407 }
10408
10409 impl BackfillNoneStrategy {
10410 pub fn new() -> Self {
10411 std::default::Default::default()
10412 }
10413 }
10414
10415 impl wkt::message::Message for BackfillNoneStrategy {
10416 fn typename() -> &'static str {
10417 "type.googleapis.com/google.cloud.datastream.v1.Stream.BackfillNoneStrategy"
10418 }
10419 }
10420
10421 #[derive(Clone, Debug, PartialEq)]
10437 #[non_exhaustive]
10438 pub enum State {
10439 Unspecified,
10441 NotStarted,
10443 Running,
10445 Paused,
10447 Maintenance,
10451 Failed,
10454 FailedPermanently,
10456 Starting,
10458 Draining,
10461 UnknownValue(state::UnknownValue),
10466 }
10467
10468 #[doc(hidden)]
10469 pub mod state {
10470 #[allow(unused_imports)]
10471 use super::*;
10472 #[derive(Clone, Debug, PartialEq)]
10473 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10474 }
10475
10476 impl State {
10477 pub fn value(&self) -> std::option::Option<i32> {
10482 match self {
10483 Self::Unspecified => std::option::Option::Some(0),
10484 Self::NotStarted => std::option::Option::Some(1),
10485 Self::Running => std::option::Option::Some(2),
10486 Self::Paused => std::option::Option::Some(3),
10487 Self::Maintenance => std::option::Option::Some(4),
10488 Self::Failed => std::option::Option::Some(5),
10489 Self::FailedPermanently => std::option::Option::Some(6),
10490 Self::Starting => std::option::Option::Some(7),
10491 Self::Draining => std::option::Option::Some(8),
10492 Self::UnknownValue(u) => u.0.value(),
10493 }
10494 }
10495
10496 pub fn name(&self) -> std::option::Option<&str> {
10501 match self {
10502 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10503 Self::NotStarted => std::option::Option::Some("NOT_STARTED"),
10504 Self::Running => std::option::Option::Some("RUNNING"),
10505 Self::Paused => std::option::Option::Some("PAUSED"),
10506 Self::Maintenance => std::option::Option::Some("MAINTENANCE"),
10507 Self::Failed => std::option::Option::Some("FAILED"),
10508 Self::FailedPermanently => std::option::Option::Some("FAILED_PERMANENTLY"),
10509 Self::Starting => std::option::Option::Some("STARTING"),
10510 Self::Draining => std::option::Option::Some("DRAINING"),
10511 Self::UnknownValue(u) => u.0.name(),
10512 }
10513 }
10514 }
10515
10516 impl std::default::Default for State {
10517 fn default() -> Self {
10518 use std::convert::From;
10519 Self::from(0)
10520 }
10521 }
10522
10523 impl std::fmt::Display for State {
10524 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10525 wkt::internal::display_enum(f, self.name(), self.value())
10526 }
10527 }
10528
10529 impl std::convert::From<i32> for State {
10530 fn from(value: i32) -> Self {
10531 match value {
10532 0 => Self::Unspecified,
10533 1 => Self::NotStarted,
10534 2 => Self::Running,
10535 3 => Self::Paused,
10536 4 => Self::Maintenance,
10537 5 => Self::Failed,
10538 6 => Self::FailedPermanently,
10539 7 => Self::Starting,
10540 8 => Self::Draining,
10541 _ => Self::UnknownValue(state::UnknownValue(
10542 wkt::internal::UnknownEnumValue::Integer(value),
10543 )),
10544 }
10545 }
10546 }
10547
10548 impl std::convert::From<&str> for State {
10549 fn from(value: &str) -> Self {
10550 use std::string::ToString;
10551 match value {
10552 "STATE_UNSPECIFIED" => Self::Unspecified,
10553 "NOT_STARTED" => Self::NotStarted,
10554 "RUNNING" => Self::Running,
10555 "PAUSED" => Self::Paused,
10556 "MAINTENANCE" => Self::Maintenance,
10557 "FAILED" => Self::Failed,
10558 "FAILED_PERMANENTLY" => Self::FailedPermanently,
10559 "STARTING" => Self::Starting,
10560 "DRAINING" => Self::Draining,
10561 _ => Self::UnknownValue(state::UnknownValue(
10562 wkt::internal::UnknownEnumValue::String(value.to_string()),
10563 )),
10564 }
10565 }
10566 }
10567
10568 impl serde::ser::Serialize for State {
10569 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10570 where
10571 S: serde::Serializer,
10572 {
10573 match self {
10574 Self::Unspecified => serializer.serialize_i32(0),
10575 Self::NotStarted => serializer.serialize_i32(1),
10576 Self::Running => serializer.serialize_i32(2),
10577 Self::Paused => serializer.serialize_i32(3),
10578 Self::Maintenance => serializer.serialize_i32(4),
10579 Self::Failed => serializer.serialize_i32(5),
10580 Self::FailedPermanently => serializer.serialize_i32(6),
10581 Self::Starting => serializer.serialize_i32(7),
10582 Self::Draining => serializer.serialize_i32(8),
10583 Self::UnknownValue(u) => u.0.serialize(serializer),
10584 }
10585 }
10586 }
10587
10588 impl<'de> serde::de::Deserialize<'de> for State {
10589 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10590 where
10591 D: serde::Deserializer<'de>,
10592 {
10593 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10594 ".google.cloud.datastream.v1.Stream.State",
10595 ))
10596 }
10597 }
10598
10599 #[derive(Clone, Debug, PartialEq)]
10601 #[non_exhaustive]
10602 pub enum BackfillStrategy {
10603 BackfillAll(std::boxed::Box<crate::model::stream::BackfillAllStrategy>),
10606 BackfillNone(std::boxed::Box<crate::model::stream::BackfillNoneStrategy>),
10608 }
10609}
10610
10611#[derive(Clone, Default, PartialEq)]
10613#[non_exhaustive]
10614pub struct StreamObject {
10615 pub name: std::string::String,
10617
10618 pub create_time: std::option::Option<wkt::Timestamp>,
10620
10621 pub update_time: std::option::Option<wkt::Timestamp>,
10623
10624 pub display_name: std::string::String,
10626
10627 pub errors: std::vec::Vec<crate::model::Error>,
10629
10630 pub backfill_job: std::option::Option<crate::model::BackfillJob>,
10632
10633 pub source_object: std::option::Option<crate::model::SourceObjectIdentifier>,
10635
10636 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10637}
10638
10639impl StreamObject {
10640 pub fn new() -> Self {
10641 std::default::Default::default()
10642 }
10643
10644 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10646 self.name = v.into();
10647 self
10648 }
10649
10650 pub fn set_create_time<T>(mut self, v: T) -> Self
10652 where
10653 T: std::convert::Into<wkt::Timestamp>,
10654 {
10655 self.create_time = std::option::Option::Some(v.into());
10656 self
10657 }
10658
10659 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10661 where
10662 T: std::convert::Into<wkt::Timestamp>,
10663 {
10664 self.create_time = v.map(|x| x.into());
10665 self
10666 }
10667
10668 pub fn set_update_time<T>(mut self, v: T) -> Self
10670 where
10671 T: std::convert::Into<wkt::Timestamp>,
10672 {
10673 self.update_time = std::option::Option::Some(v.into());
10674 self
10675 }
10676
10677 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10679 where
10680 T: std::convert::Into<wkt::Timestamp>,
10681 {
10682 self.update_time = v.map(|x| x.into());
10683 self
10684 }
10685
10686 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10688 self.display_name = v.into();
10689 self
10690 }
10691
10692 pub fn set_errors<T, V>(mut self, v: T) -> Self
10694 where
10695 T: std::iter::IntoIterator<Item = V>,
10696 V: std::convert::Into<crate::model::Error>,
10697 {
10698 use std::iter::Iterator;
10699 self.errors = v.into_iter().map(|i| i.into()).collect();
10700 self
10701 }
10702
10703 pub fn set_backfill_job<T>(mut self, v: T) -> Self
10705 where
10706 T: std::convert::Into<crate::model::BackfillJob>,
10707 {
10708 self.backfill_job = std::option::Option::Some(v.into());
10709 self
10710 }
10711
10712 pub fn set_or_clear_backfill_job<T>(mut self, v: std::option::Option<T>) -> Self
10714 where
10715 T: std::convert::Into<crate::model::BackfillJob>,
10716 {
10717 self.backfill_job = v.map(|x| x.into());
10718 self
10719 }
10720
10721 pub fn set_source_object<T>(mut self, v: T) -> Self
10723 where
10724 T: std::convert::Into<crate::model::SourceObjectIdentifier>,
10725 {
10726 self.source_object = std::option::Option::Some(v.into());
10727 self
10728 }
10729
10730 pub fn set_or_clear_source_object<T>(mut self, v: std::option::Option<T>) -> Self
10732 where
10733 T: std::convert::Into<crate::model::SourceObjectIdentifier>,
10734 {
10735 self.source_object = v.map(|x| x.into());
10736 self
10737 }
10738}
10739
10740impl wkt::message::Message for StreamObject {
10741 fn typename() -> &'static str {
10742 "type.googleapis.com/google.cloud.datastream.v1.StreamObject"
10743 }
10744}
10745
10746#[derive(Clone, Default, PartialEq)]
10748#[non_exhaustive]
10749pub struct SourceObjectIdentifier {
10750 pub source_identifier:
10752 std::option::Option<crate::model::source_object_identifier::SourceIdentifier>,
10753
10754 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10755}
10756
10757impl SourceObjectIdentifier {
10758 pub fn new() -> Self {
10759 std::default::Default::default()
10760 }
10761
10762 pub fn set_source_identifier<
10767 T: std::convert::Into<
10768 std::option::Option<crate::model::source_object_identifier::SourceIdentifier>,
10769 >,
10770 >(
10771 mut self,
10772 v: T,
10773 ) -> Self {
10774 self.source_identifier = v.into();
10775 self
10776 }
10777
10778 pub fn oracle_identifier(
10782 &self,
10783 ) -> std::option::Option<
10784 &std::boxed::Box<crate::model::source_object_identifier::OracleObjectIdentifier>,
10785 > {
10786 #[allow(unreachable_patterns)]
10787 self.source_identifier.as_ref().and_then(|v| match v {
10788 crate::model::source_object_identifier::SourceIdentifier::OracleIdentifier(v) => {
10789 std::option::Option::Some(v)
10790 }
10791 _ => std::option::Option::None,
10792 })
10793 }
10794
10795 pub fn set_oracle_identifier<
10801 T: std::convert::Into<
10802 std::boxed::Box<crate::model::source_object_identifier::OracleObjectIdentifier>,
10803 >,
10804 >(
10805 mut self,
10806 v: T,
10807 ) -> Self {
10808 self.source_identifier = std::option::Option::Some(
10809 crate::model::source_object_identifier::SourceIdentifier::OracleIdentifier(v.into()),
10810 );
10811 self
10812 }
10813
10814 pub fn mysql_identifier(
10818 &self,
10819 ) -> std::option::Option<
10820 &std::boxed::Box<crate::model::source_object_identifier::MysqlObjectIdentifier>,
10821 > {
10822 #[allow(unreachable_patterns)]
10823 self.source_identifier.as_ref().and_then(|v| match v {
10824 crate::model::source_object_identifier::SourceIdentifier::MysqlIdentifier(v) => {
10825 std::option::Option::Some(v)
10826 }
10827 _ => std::option::Option::None,
10828 })
10829 }
10830
10831 pub fn set_mysql_identifier<
10837 T: std::convert::Into<
10838 std::boxed::Box<crate::model::source_object_identifier::MysqlObjectIdentifier>,
10839 >,
10840 >(
10841 mut self,
10842 v: T,
10843 ) -> Self {
10844 self.source_identifier = std::option::Option::Some(
10845 crate::model::source_object_identifier::SourceIdentifier::MysqlIdentifier(v.into()),
10846 );
10847 self
10848 }
10849
10850 pub fn postgresql_identifier(
10854 &self,
10855 ) -> std::option::Option<
10856 &std::boxed::Box<crate::model::source_object_identifier::PostgresqlObjectIdentifier>,
10857 > {
10858 #[allow(unreachable_patterns)]
10859 self.source_identifier.as_ref().and_then(|v| match v {
10860 crate::model::source_object_identifier::SourceIdentifier::PostgresqlIdentifier(v) => {
10861 std::option::Option::Some(v)
10862 }
10863 _ => std::option::Option::None,
10864 })
10865 }
10866
10867 pub fn set_postgresql_identifier<
10873 T: std::convert::Into<
10874 std::boxed::Box<crate::model::source_object_identifier::PostgresqlObjectIdentifier>,
10875 >,
10876 >(
10877 mut self,
10878 v: T,
10879 ) -> Self {
10880 self.source_identifier = std::option::Option::Some(
10881 crate::model::source_object_identifier::SourceIdentifier::PostgresqlIdentifier(
10882 v.into(),
10883 ),
10884 );
10885 self
10886 }
10887
10888 pub fn sql_server_identifier(
10892 &self,
10893 ) -> std::option::Option<
10894 &std::boxed::Box<crate::model::source_object_identifier::SqlServerObjectIdentifier>,
10895 > {
10896 #[allow(unreachable_patterns)]
10897 self.source_identifier.as_ref().and_then(|v| match v {
10898 crate::model::source_object_identifier::SourceIdentifier::SqlServerIdentifier(v) => {
10899 std::option::Option::Some(v)
10900 }
10901 _ => std::option::Option::None,
10902 })
10903 }
10904
10905 pub fn set_sql_server_identifier<
10911 T: std::convert::Into<
10912 std::boxed::Box<crate::model::source_object_identifier::SqlServerObjectIdentifier>,
10913 >,
10914 >(
10915 mut self,
10916 v: T,
10917 ) -> Self {
10918 self.source_identifier = std::option::Option::Some(
10919 crate::model::source_object_identifier::SourceIdentifier::SqlServerIdentifier(v.into()),
10920 );
10921 self
10922 }
10923
10924 pub fn salesforce_identifier(
10928 &self,
10929 ) -> std::option::Option<
10930 &std::boxed::Box<crate::model::source_object_identifier::SalesforceObjectIdentifier>,
10931 > {
10932 #[allow(unreachable_patterns)]
10933 self.source_identifier.as_ref().and_then(|v| match v {
10934 crate::model::source_object_identifier::SourceIdentifier::SalesforceIdentifier(v) => {
10935 std::option::Option::Some(v)
10936 }
10937 _ => std::option::Option::None,
10938 })
10939 }
10940
10941 pub fn set_salesforce_identifier<
10947 T: std::convert::Into<
10948 std::boxed::Box<crate::model::source_object_identifier::SalesforceObjectIdentifier>,
10949 >,
10950 >(
10951 mut self,
10952 v: T,
10953 ) -> Self {
10954 self.source_identifier = std::option::Option::Some(
10955 crate::model::source_object_identifier::SourceIdentifier::SalesforceIdentifier(
10956 v.into(),
10957 ),
10958 );
10959 self
10960 }
10961
10962 pub fn mongodb_identifier(
10966 &self,
10967 ) -> std::option::Option<
10968 &std::boxed::Box<crate::model::source_object_identifier::MongodbObjectIdentifier>,
10969 > {
10970 #[allow(unreachable_patterns)]
10971 self.source_identifier.as_ref().and_then(|v| match v {
10972 crate::model::source_object_identifier::SourceIdentifier::MongodbIdentifier(v) => {
10973 std::option::Option::Some(v)
10974 }
10975 _ => std::option::Option::None,
10976 })
10977 }
10978
10979 pub fn set_mongodb_identifier<
10985 T: std::convert::Into<
10986 std::boxed::Box<crate::model::source_object_identifier::MongodbObjectIdentifier>,
10987 >,
10988 >(
10989 mut self,
10990 v: T,
10991 ) -> Self {
10992 self.source_identifier = std::option::Option::Some(
10993 crate::model::source_object_identifier::SourceIdentifier::MongodbIdentifier(v.into()),
10994 );
10995 self
10996 }
10997}
10998
10999impl wkt::message::Message for SourceObjectIdentifier {
11000 fn typename() -> &'static str {
11001 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier"
11002 }
11003}
11004
11005pub mod source_object_identifier {
11007 #[allow(unused_imports)]
11008 use super::*;
11009
11010 #[derive(Clone, Default, PartialEq)]
11012 #[non_exhaustive]
11013 pub struct OracleObjectIdentifier {
11014 pub schema: std::string::String,
11016
11017 pub table: std::string::String,
11019
11020 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11021 }
11022
11023 impl OracleObjectIdentifier {
11024 pub fn new() -> Self {
11025 std::default::Default::default()
11026 }
11027
11028 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11030 self.schema = v.into();
11031 self
11032 }
11033
11034 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11036 self.table = v.into();
11037 self
11038 }
11039 }
11040
11041 impl wkt::message::Message for OracleObjectIdentifier {
11042 fn typename() -> &'static str {
11043 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier"
11044 }
11045 }
11046
11047 #[derive(Clone, Default, PartialEq)]
11049 #[non_exhaustive]
11050 pub struct PostgresqlObjectIdentifier {
11051 pub schema: std::string::String,
11053
11054 pub table: std::string::String,
11056
11057 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11058 }
11059
11060 impl PostgresqlObjectIdentifier {
11061 pub fn new() -> Self {
11062 std::default::Default::default()
11063 }
11064
11065 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11067 self.schema = v.into();
11068 self
11069 }
11070
11071 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11073 self.table = v.into();
11074 self
11075 }
11076 }
11077
11078 impl wkt::message::Message for PostgresqlObjectIdentifier {
11079 fn typename() -> &'static str {
11080 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier"
11081 }
11082 }
11083
11084 #[derive(Clone, Default, PartialEq)]
11086 #[non_exhaustive]
11087 pub struct MysqlObjectIdentifier {
11088 pub database: std::string::String,
11090
11091 pub table: std::string::String,
11093
11094 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11095 }
11096
11097 impl MysqlObjectIdentifier {
11098 pub fn new() -> Self {
11099 std::default::Default::default()
11100 }
11101
11102 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11104 self.database = v.into();
11105 self
11106 }
11107
11108 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11110 self.table = v.into();
11111 self
11112 }
11113 }
11114
11115 impl wkt::message::Message for MysqlObjectIdentifier {
11116 fn typename() -> &'static str {
11117 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier"
11118 }
11119 }
11120
11121 #[derive(Clone, Default, PartialEq)]
11123 #[non_exhaustive]
11124 pub struct SqlServerObjectIdentifier {
11125 pub schema: std::string::String,
11127
11128 pub table: std::string::String,
11130
11131 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11132 }
11133
11134 impl SqlServerObjectIdentifier {
11135 pub fn new() -> Self {
11136 std::default::Default::default()
11137 }
11138
11139 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11141 self.schema = v.into();
11142 self
11143 }
11144
11145 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11147 self.table = v.into();
11148 self
11149 }
11150 }
11151
11152 impl wkt::message::Message for SqlServerObjectIdentifier {
11153 fn typename() -> &'static str {
11154 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier"
11155 }
11156 }
11157
11158 #[derive(Clone, Default, PartialEq)]
11160 #[non_exhaustive]
11161 pub struct SalesforceObjectIdentifier {
11162 pub object_name: std::string::String,
11164
11165 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11166 }
11167
11168 impl SalesforceObjectIdentifier {
11169 pub fn new() -> Self {
11170 std::default::Default::default()
11171 }
11172
11173 pub fn set_object_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11175 self.object_name = v.into();
11176 self
11177 }
11178 }
11179
11180 impl wkt::message::Message for SalesforceObjectIdentifier {
11181 fn typename() -> &'static str {
11182 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.SalesforceObjectIdentifier"
11183 }
11184 }
11185
11186 #[derive(Clone, Default, PartialEq)]
11188 #[non_exhaustive]
11189 pub struct MongodbObjectIdentifier {
11190 pub database: std::string::String,
11192
11193 pub collection: std::string::String,
11195
11196 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11197 }
11198
11199 impl MongodbObjectIdentifier {
11200 pub fn new() -> Self {
11201 std::default::Default::default()
11202 }
11203
11204 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11206 self.database = v.into();
11207 self
11208 }
11209
11210 pub fn set_collection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11212 self.collection = v.into();
11213 self
11214 }
11215 }
11216
11217 impl wkt::message::Message for MongodbObjectIdentifier {
11218 fn typename() -> &'static str {
11219 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.MongodbObjectIdentifier"
11220 }
11221 }
11222
11223 #[derive(Clone, Debug, PartialEq)]
11225 #[non_exhaustive]
11226 pub enum SourceIdentifier {
11227 OracleIdentifier(
11229 std::boxed::Box<crate::model::source_object_identifier::OracleObjectIdentifier>,
11230 ),
11231 MysqlIdentifier(
11233 std::boxed::Box<crate::model::source_object_identifier::MysqlObjectIdentifier>,
11234 ),
11235 PostgresqlIdentifier(
11237 std::boxed::Box<crate::model::source_object_identifier::PostgresqlObjectIdentifier>,
11238 ),
11239 SqlServerIdentifier(
11241 std::boxed::Box<crate::model::source_object_identifier::SqlServerObjectIdentifier>,
11242 ),
11243 SalesforceIdentifier(
11245 std::boxed::Box<crate::model::source_object_identifier::SalesforceObjectIdentifier>,
11246 ),
11247 MongodbIdentifier(
11249 std::boxed::Box<crate::model::source_object_identifier::MongodbObjectIdentifier>,
11250 ),
11251 }
11252}
11253
11254#[derive(Clone, Default, PartialEq)]
11256#[non_exhaustive]
11257pub struct BackfillJob {
11258 pub state: crate::model::backfill_job::State,
11260
11261 pub trigger: crate::model::backfill_job::Trigger,
11263
11264 pub last_start_time: std::option::Option<wkt::Timestamp>,
11266
11267 pub last_end_time: std::option::Option<wkt::Timestamp>,
11269
11270 pub errors: std::vec::Vec<crate::model::Error>,
11272
11273 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11274}
11275
11276impl BackfillJob {
11277 pub fn new() -> Self {
11278 std::default::Default::default()
11279 }
11280
11281 pub fn set_state<T: std::convert::Into<crate::model::backfill_job::State>>(
11283 mut self,
11284 v: T,
11285 ) -> Self {
11286 self.state = v.into();
11287 self
11288 }
11289
11290 pub fn set_trigger<T: std::convert::Into<crate::model::backfill_job::Trigger>>(
11292 mut self,
11293 v: T,
11294 ) -> Self {
11295 self.trigger = v.into();
11296 self
11297 }
11298
11299 pub fn set_last_start_time<T>(mut self, v: T) -> Self
11301 where
11302 T: std::convert::Into<wkt::Timestamp>,
11303 {
11304 self.last_start_time = std::option::Option::Some(v.into());
11305 self
11306 }
11307
11308 pub fn set_or_clear_last_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11310 where
11311 T: std::convert::Into<wkt::Timestamp>,
11312 {
11313 self.last_start_time = v.map(|x| x.into());
11314 self
11315 }
11316
11317 pub fn set_last_end_time<T>(mut self, v: T) -> Self
11319 where
11320 T: std::convert::Into<wkt::Timestamp>,
11321 {
11322 self.last_end_time = std::option::Option::Some(v.into());
11323 self
11324 }
11325
11326 pub fn set_or_clear_last_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11328 where
11329 T: std::convert::Into<wkt::Timestamp>,
11330 {
11331 self.last_end_time = v.map(|x| x.into());
11332 self
11333 }
11334
11335 pub fn set_errors<T, V>(mut self, v: T) -> Self
11337 where
11338 T: std::iter::IntoIterator<Item = V>,
11339 V: std::convert::Into<crate::model::Error>,
11340 {
11341 use std::iter::Iterator;
11342 self.errors = v.into_iter().map(|i| i.into()).collect();
11343 self
11344 }
11345}
11346
11347impl wkt::message::Message for BackfillJob {
11348 fn typename() -> &'static str {
11349 "type.googleapis.com/google.cloud.datastream.v1.BackfillJob"
11350 }
11351}
11352
11353pub mod backfill_job {
11355 #[allow(unused_imports)]
11356 use super::*;
11357
11358 #[derive(Clone, Debug, PartialEq)]
11374 #[non_exhaustive]
11375 pub enum State {
11376 Unspecified,
11378 NotStarted,
11382 Pending,
11384 Active,
11386 Stopped,
11388 Failed,
11390 Completed,
11392 Unsupported,
11395 UnknownValue(state::UnknownValue),
11400 }
11401
11402 #[doc(hidden)]
11403 pub mod state {
11404 #[allow(unused_imports)]
11405 use super::*;
11406 #[derive(Clone, Debug, PartialEq)]
11407 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11408 }
11409
11410 impl State {
11411 pub fn value(&self) -> std::option::Option<i32> {
11416 match self {
11417 Self::Unspecified => std::option::Option::Some(0),
11418 Self::NotStarted => std::option::Option::Some(1),
11419 Self::Pending => std::option::Option::Some(2),
11420 Self::Active => std::option::Option::Some(3),
11421 Self::Stopped => std::option::Option::Some(4),
11422 Self::Failed => std::option::Option::Some(5),
11423 Self::Completed => std::option::Option::Some(6),
11424 Self::Unsupported => std::option::Option::Some(7),
11425 Self::UnknownValue(u) => u.0.value(),
11426 }
11427 }
11428
11429 pub fn name(&self) -> std::option::Option<&str> {
11434 match self {
11435 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11436 Self::NotStarted => std::option::Option::Some("NOT_STARTED"),
11437 Self::Pending => std::option::Option::Some("PENDING"),
11438 Self::Active => std::option::Option::Some("ACTIVE"),
11439 Self::Stopped => std::option::Option::Some("STOPPED"),
11440 Self::Failed => std::option::Option::Some("FAILED"),
11441 Self::Completed => std::option::Option::Some("COMPLETED"),
11442 Self::Unsupported => std::option::Option::Some("UNSUPPORTED"),
11443 Self::UnknownValue(u) => u.0.name(),
11444 }
11445 }
11446 }
11447
11448 impl std::default::Default for State {
11449 fn default() -> Self {
11450 use std::convert::From;
11451 Self::from(0)
11452 }
11453 }
11454
11455 impl std::fmt::Display for State {
11456 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11457 wkt::internal::display_enum(f, self.name(), self.value())
11458 }
11459 }
11460
11461 impl std::convert::From<i32> for State {
11462 fn from(value: i32) -> Self {
11463 match value {
11464 0 => Self::Unspecified,
11465 1 => Self::NotStarted,
11466 2 => Self::Pending,
11467 3 => Self::Active,
11468 4 => Self::Stopped,
11469 5 => Self::Failed,
11470 6 => Self::Completed,
11471 7 => Self::Unsupported,
11472 _ => Self::UnknownValue(state::UnknownValue(
11473 wkt::internal::UnknownEnumValue::Integer(value),
11474 )),
11475 }
11476 }
11477 }
11478
11479 impl std::convert::From<&str> for State {
11480 fn from(value: &str) -> Self {
11481 use std::string::ToString;
11482 match value {
11483 "STATE_UNSPECIFIED" => Self::Unspecified,
11484 "NOT_STARTED" => Self::NotStarted,
11485 "PENDING" => Self::Pending,
11486 "ACTIVE" => Self::Active,
11487 "STOPPED" => Self::Stopped,
11488 "FAILED" => Self::Failed,
11489 "COMPLETED" => Self::Completed,
11490 "UNSUPPORTED" => Self::Unsupported,
11491 _ => Self::UnknownValue(state::UnknownValue(
11492 wkt::internal::UnknownEnumValue::String(value.to_string()),
11493 )),
11494 }
11495 }
11496 }
11497
11498 impl serde::ser::Serialize for State {
11499 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11500 where
11501 S: serde::Serializer,
11502 {
11503 match self {
11504 Self::Unspecified => serializer.serialize_i32(0),
11505 Self::NotStarted => serializer.serialize_i32(1),
11506 Self::Pending => serializer.serialize_i32(2),
11507 Self::Active => serializer.serialize_i32(3),
11508 Self::Stopped => serializer.serialize_i32(4),
11509 Self::Failed => serializer.serialize_i32(5),
11510 Self::Completed => serializer.serialize_i32(6),
11511 Self::Unsupported => serializer.serialize_i32(7),
11512 Self::UnknownValue(u) => u.0.serialize(serializer),
11513 }
11514 }
11515 }
11516
11517 impl<'de> serde::de::Deserialize<'de> for State {
11518 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11519 where
11520 D: serde::Deserializer<'de>,
11521 {
11522 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11523 ".google.cloud.datastream.v1.BackfillJob.State",
11524 ))
11525 }
11526 }
11527
11528 #[derive(Clone, Debug, PartialEq)]
11544 #[non_exhaustive]
11545 pub enum Trigger {
11546 Unspecified,
11548 Automatic,
11551 Manual,
11553 UnknownValue(trigger::UnknownValue),
11558 }
11559
11560 #[doc(hidden)]
11561 pub mod trigger {
11562 #[allow(unused_imports)]
11563 use super::*;
11564 #[derive(Clone, Debug, PartialEq)]
11565 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11566 }
11567
11568 impl Trigger {
11569 pub fn value(&self) -> std::option::Option<i32> {
11574 match self {
11575 Self::Unspecified => std::option::Option::Some(0),
11576 Self::Automatic => std::option::Option::Some(1),
11577 Self::Manual => std::option::Option::Some(2),
11578 Self::UnknownValue(u) => u.0.value(),
11579 }
11580 }
11581
11582 pub fn name(&self) -> std::option::Option<&str> {
11587 match self {
11588 Self::Unspecified => std::option::Option::Some("TRIGGER_UNSPECIFIED"),
11589 Self::Automatic => std::option::Option::Some("AUTOMATIC"),
11590 Self::Manual => std::option::Option::Some("MANUAL"),
11591 Self::UnknownValue(u) => u.0.name(),
11592 }
11593 }
11594 }
11595
11596 impl std::default::Default for Trigger {
11597 fn default() -> Self {
11598 use std::convert::From;
11599 Self::from(0)
11600 }
11601 }
11602
11603 impl std::fmt::Display for Trigger {
11604 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11605 wkt::internal::display_enum(f, self.name(), self.value())
11606 }
11607 }
11608
11609 impl std::convert::From<i32> for Trigger {
11610 fn from(value: i32) -> Self {
11611 match value {
11612 0 => Self::Unspecified,
11613 1 => Self::Automatic,
11614 2 => Self::Manual,
11615 _ => Self::UnknownValue(trigger::UnknownValue(
11616 wkt::internal::UnknownEnumValue::Integer(value),
11617 )),
11618 }
11619 }
11620 }
11621
11622 impl std::convert::From<&str> for Trigger {
11623 fn from(value: &str) -> Self {
11624 use std::string::ToString;
11625 match value {
11626 "TRIGGER_UNSPECIFIED" => Self::Unspecified,
11627 "AUTOMATIC" => Self::Automatic,
11628 "MANUAL" => Self::Manual,
11629 _ => Self::UnknownValue(trigger::UnknownValue(
11630 wkt::internal::UnknownEnumValue::String(value.to_string()),
11631 )),
11632 }
11633 }
11634 }
11635
11636 impl serde::ser::Serialize for Trigger {
11637 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11638 where
11639 S: serde::Serializer,
11640 {
11641 match self {
11642 Self::Unspecified => serializer.serialize_i32(0),
11643 Self::Automatic => serializer.serialize_i32(1),
11644 Self::Manual => serializer.serialize_i32(2),
11645 Self::UnknownValue(u) => u.0.serialize(serializer),
11646 }
11647 }
11648 }
11649
11650 impl<'de> serde::de::Deserialize<'de> for Trigger {
11651 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11652 where
11653 D: serde::Deserializer<'de>,
11654 {
11655 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Trigger>::new(
11656 ".google.cloud.datastream.v1.BackfillJob.Trigger",
11657 ))
11658 }
11659 }
11660}
11661
11662#[derive(Clone, Default, PartialEq)]
11664#[non_exhaustive]
11665pub struct Error {
11666 pub reason: std::string::String,
11668
11669 pub error_uuid: std::string::String,
11672
11673 pub message: std::string::String,
11675
11676 pub error_time: std::option::Option<wkt::Timestamp>,
11678
11679 pub details: std::collections::HashMap<std::string::String, std::string::String>,
11681
11682 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11683}
11684
11685impl Error {
11686 pub fn new() -> Self {
11687 std::default::Default::default()
11688 }
11689
11690 pub fn set_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11692 self.reason = v.into();
11693 self
11694 }
11695
11696 pub fn set_error_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11698 self.error_uuid = v.into();
11699 self
11700 }
11701
11702 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11704 self.message = v.into();
11705 self
11706 }
11707
11708 pub fn set_error_time<T>(mut self, v: T) -> Self
11710 where
11711 T: std::convert::Into<wkt::Timestamp>,
11712 {
11713 self.error_time = std::option::Option::Some(v.into());
11714 self
11715 }
11716
11717 pub fn set_or_clear_error_time<T>(mut self, v: std::option::Option<T>) -> Self
11719 where
11720 T: std::convert::Into<wkt::Timestamp>,
11721 {
11722 self.error_time = v.map(|x| x.into());
11723 self
11724 }
11725
11726 pub fn set_details<T, K, V>(mut self, v: T) -> Self
11728 where
11729 T: std::iter::IntoIterator<Item = (K, V)>,
11730 K: std::convert::Into<std::string::String>,
11731 V: std::convert::Into<std::string::String>,
11732 {
11733 use std::iter::Iterator;
11734 self.details = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
11735 self
11736 }
11737}
11738
11739impl wkt::message::Message for Error {
11740 fn typename() -> &'static str {
11741 "type.googleapis.com/google.cloud.datastream.v1.Error"
11742 }
11743}
11744
11745#[derive(Clone, Default, PartialEq)]
11747#[non_exhaustive]
11748pub struct ValidationResult {
11749 pub validations: std::vec::Vec<crate::model::Validation>,
11752
11753 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11754}
11755
11756impl ValidationResult {
11757 pub fn new() -> Self {
11758 std::default::Default::default()
11759 }
11760
11761 pub fn set_validations<T, V>(mut self, v: T) -> Self
11763 where
11764 T: std::iter::IntoIterator<Item = V>,
11765 V: std::convert::Into<crate::model::Validation>,
11766 {
11767 use std::iter::Iterator;
11768 self.validations = v.into_iter().map(|i| i.into()).collect();
11769 self
11770 }
11771}
11772
11773impl wkt::message::Message for ValidationResult {
11774 fn typename() -> &'static str {
11775 "type.googleapis.com/google.cloud.datastream.v1.ValidationResult"
11776 }
11777}
11778
11779#[derive(Clone, Default, PartialEq)]
11781#[non_exhaustive]
11782pub struct Validation {
11783 pub description: std::string::String,
11785
11786 pub state: crate::model::validation::State,
11788
11789 pub message: std::vec::Vec<crate::model::ValidationMessage>,
11791
11792 pub code: std::string::String,
11794
11795 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11796}
11797
11798impl Validation {
11799 pub fn new() -> Self {
11800 std::default::Default::default()
11801 }
11802
11803 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11805 self.description = v.into();
11806 self
11807 }
11808
11809 pub fn set_state<T: std::convert::Into<crate::model::validation::State>>(
11811 mut self,
11812 v: T,
11813 ) -> Self {
11814 self.state = v.into();
11815 self
11816 }
11817
11818 pub fn set_message<T, V>(mut self, v: T) -> Self
11820 where
11821 T: std::iter::IntoIterator<Item = V>,
11822 V: std::convert::Into<crate::model::ValidationMessage>,
11823 {
11824 use std::iter::Iterator;
11825 self.message = v.into_iter().map(|i| i.into()).collect();
11826 self
11827 }
11828
11829 pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11831 self.code = v.into();
11832 self
11833 }
11834}
11835
11836impl wkt::message::Message for Validation {
11837 fn typename() -> &'static str {
11838 "type.googleapis.com/google.cloud.datastream.v1.Validation"
11839 }
11840}
11841
11842pub mod validation {
11844 #[allow(unused_imports)]
11845 use super::*;
11846
11847 #[derive(Clone, Debug, PartialEq)]
11863 #[non_exhaustive]
11864 pub enum State {
11865 Unspecified,
11867 NotExecuted,
11869 Failed,
11871 Passed,
11873 Warning,
11875 UnknownValue(state::UnknownValue),
11880 }
11881
11882 #[doc(hidden)]
11883 pub mod state {
11884 #[allow(unused_imports)]
11885 use super::*;
11886 #[derive(Clone, Debug, PartialEq)]
11887 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11888 }
11889
11890 impl State {
11891 pub fn value(&self) -> std::option::Option<i32> {
11896 match self {
11897 Self::Unspecified => std::option::Option::Some(0),
11898 Self::NotExecuted => std::option::Option::Some(1),
11899 Self::Failed => std::option::Option::Some(2),
11900 Self::Passed => std::option::Option::Some(3),
11901 Self::Warning => std::option::Option::Some(4),
11902 Self::UnknownValue(u) => u.0.value(),
11903 }
11904 }
11905
11906 pub fn name(&self) -> std::option::Option<&str> {
11911 match self {
11912 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11913 Self::NotExecuted => std::option::Option::Some("NOT_EXECUTED"),
11914 Self::Failed => std::option::Option::Some("FAILED"),
11915 Self::Passed => std::option::Option::Some("PASSED"),
11916 Self::Warning => std::option::Option::Some("WARNING"),
11917 Self::UnknownValue(u) => u.0.name(),
11918 }
11919 }
11920 }
11921
11922 impl std::default::Default for State {
11923 fn default() -> Self {
11924 use std::convert::From;
11925 Self::from(0)
11926 }
11927 }
11928
11929 impl std::fmt::Display for State {
11930 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11931 wkt::internal::display_enum(f, self.name(), self.value())
11932 }
11933 }
11934
11935 impl std::convert::From<i32> for State {
11936 fn from(value: i32) -> Self {
11937 match value {
11938 0 => Self::Unspecified,
11939 1 => Self::NotExecuted,
11940 2 => Self::Failed,
11941 3 => Self::Passed,
11942 4 => Self::Warning,
11943 _ => Self::UnknownValue(state::UnknownValue(
11944 wkt::internal::UnknownEnumValue::Integer(value),
11945 )),
11946 }
11947 }
11948 }
11949
11950 impl std::convert::From<&str> for State {
11951 fn from(value: &str) -> Self {
11952 use std::string::ToString;
11953 match value {
11954 "STATE_UNSPECIFIED" => Self::Unspecified,
11955 "NOT_EXECUTED" => Self::NotExecuted,
11956 "FAILED" => Self::Failed,
11957 "PASSED" => Self::Passed,
11958 "WARNING" => Self::Warning,
11959 _ => Self::UnknownValue(state::UnknownValue(
11960 wkt::internal::UnknownEnumValue::String(value.to_string()),
11961 )),
11962 }
11963 }
11964 }
11965
11966 impl serde::ser::Serialize for State {
11967 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11968 where
11969 S: serde::Serializer,
11970 {
11971 match self {
11972 Self::Unspecified => serializer.serialize_i32(0),
11973 Self::NotExecuted => serializer.serialize_i32(1),
11974 Self::Failed => serializer.serialize_i32(2),
11975 Self::Passed => serializer.serialize_i32(3),
11976 Self::Warning => serializer.serialize_i32(4),
11977 Self::UnknownValue(u) => u.0.serialize(serializer),
11978 }
11979 }
11980 }
11981
11982 impl<'de> serde::de::Deserialize<'de> for State {
11983 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11984 where
11985 D: serde::Deserializer<'de>,
11986 {
11987 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11988 ".google.cloud.datastream.v1.Validation.State",
11989 ))
11990 }
11991 }
11992}
11993
11994#[derive(Clone, Default, PartialEq)]
11996#[non_exhaustive]
11997pub struct ValidationMessage {
11998 pub message: std::string::String,
12000
12001 pub level: crate::model::validation_message::Level,
12003
12004 pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
12006
12007 pub code: std::string::String,
12009
12010 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12011}
12012
12013impl ValidationMessage {
12014 pub fn new() -> Self {
12015 std::default::Default::default()
12016 }
12017
12018 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12020 self.message = v.into();
12021 self
12022 }
12023
12024 pub fn set_level<T: std::convert::Into<crate::model::validation_message::Level>>(
12026 mut self,
12027 v: T,
12028 ) -> Self {
12029 self.level = v.into();
12030 self
12031 }
12032
12033 pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
12035 where
12036 T: std::iter::IntoIterator<Item = (K, V)>,
12037 K: std::convert::Into<std::string::String>,
12038 V: std::convert::Into<std::string::String>,
12039 {
12040 use std::iter::Iterator;
12041 self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12042 self
12043 }
12044
12045 pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12047 self.code = v.into();
12048 self
12049 }
12050}
12051
12052impl wkt::message::Message for ValidationMessage {
12053 fn typename() -> &'static str {
12054 "type.googleapis.com/google.cloud.datastream.v1.ValidationMessage"
12055 }
12056}
12057
12058pub mod validation_message {
12060 #[allow(unused_imports)]
12061 use super::*;
12062
12063 #[derive(Clone, Debug, PartialEq)]
12079 #[non_exhaustive]
12080 pub enum Level {
12081 Unspecified,
12083 Warning,
12085 Error,
12087 UnknownValue(level::UnknownValue),
12092 }
12093
12094 #[doc(hidden)]
12095 pub mod level {
12096 #[allow(unused_imports)]
12097 use super::*;
12098 #[derive(Clone, Debug, PartialEq)]
12099 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12100 }
12101
12102 impl Level {
12103 pub fn value(&self) -> std::option::Option<i32> {
12108 match self {
12109 Self::Unspecified => std::option::Option::Some(0),
12110 Self::Warning => std::option::Option::Some(1),
12111 Self::Error => std::option::Option::Some(2),
12112 Self::UnknownValue(u) => u.0.value(),
12113 }
12114 }
12115
12116 pub fn name(&self) -> std::option::Option<&str> {
12121 match self {
12122 Self::Unspecified => std::option::Option::Some("LEVEL_UNSPECIFIED"),
12123 Self::Warning => std::option::Option::Some("WARNING"),
12124 Self::Error => std::option::Option::Some("ERROR"),
12125 Self::UnknownValue(u) => u.0.name(),
12126 }
12127 }
12128 }
12129
12130 impl std::default::Default for Level {
12131 fn default() -> Self {
12132 use std::convert::From;
12133 Self::from(0)
12134 }
12135 }
12136
12137 impl std::fmt::Display for Level {
12138 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12139 wkt::internal::display_enum(f, self.name(), self.value())
12140 }
12141 }
12142
12143 impl std::convert::From<i32> for Level {
12144 fn from(value: i32) -> Self {
12145 match value {
12146 0 => Self::Unspecified,
12147 1 => Self::Warning,
12148 2 => Self::Error,
12149 _ => Self::UnknownValue(level::UnknownValue(
12150 wkt::internal::UnknownEnumValue::Integer(value),
12151 )),
12152 }
12153 }
12154 }
12155
12156 impl std::convert::From<&str> for Level {
12157 fn from(value: &str) -> Self {
12158 use std::string::ToString;
12159 match value {
12160 "LEVEL_UNSPECIFIED" => Self::Unspecified,
12161 "WARNING" => Self::Warning,
12162 "ERROR" => Self::Error,
12163 _ => Self::UnknownValue(level::UnknownValue(
12164 wkt::internal::UnknownEnumValue::String(value.to_string()),
12165 )),
12166 }
12167 }
12168 }
12169
12170 impl serde::ser::Serialize for Level {
12171 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12172 where
12173 S: serde::Serializer,
12174 {
12175 match self {
12176 Self::Unspecified => serializer.serialize_i32(0),
12177 Self::Warning => serializer.serialize_i32(1),
12178 Self::Error => serializer.serialize_i32(2),
12179 Self::UnknownValue(u) => u.0.serialize(serializer),
12180 }
12181 }
12182 }
12183
12184 impl<'de> serde::de::Deserialize<'de> for Level {
12185 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12186 where
12187 D: serde::Deserializer<'de>,
12188 {
12189 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Level>::new(
12190 ".google.cloud.datastream.v1.ValidationMessage.Level",
12191 ))
12192 }
12193 }
12194}
12195
12196#[derive(Clone, Default, PartialEq)]
12198#[non_exhaustive]
12199pub struct CdcStrategy {
12200 pub start_position: std::option::Option<crate::model::cdc_strategy::StartPosition>,
12204
12205 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12206}
12207
12208impl CdcStrategy {
12209 pub fn new() -> Self {
12210 std::default::Default::default()
12211 }
12212
12213 pub fn set_start_position<
12218 T: std::convert::Into<std::option::Option<crate::model::cdc_strategy::StartPosition>>,
12219 >(
12220 mut self,
12221 v: T,
12222 ) -> Self {
12223 self.start_position = v.into();
12224 self
12225 }
12226
12227 pub fn most_recent_start_position(
12231 &self,
12232 ) -> std::option::Option<&std::boxed::Box<crate::model::cdc_strategy::MostRecentStartPosition>>
12233 {
12234 #[allow(unreachable_patterns)]
12235 self.start_position.as_ref().and_then(|v| match v {
12236 crate::model::cdc_strategy::StartPosition::MostRecentStartPosition(v) => {
12237 std::option::Option::Some(v)
12238 }
12239 _ => std::option::Option::None,
12240 })
12241 }
12242
12243 pub fn set_most_recent_start_position<
12249 T: std::convert::Into<std::boxed::Box<crate::model::cdc_strategy::MostRecentStartPosition>>,
12250 >(
12251 mut self,
12252 v: T,
12253 ) -> Self {
12254 self.start_position = std::option::Option::Some(
12255 crate::model::cdc_strategy::StartPosition::MostRecentStartPosition(v.into()),
12256 );
12257 self
12258 }
12259
12260 pub fn next_available_start_position(
12264 &self,
12265 ) -> std::option::Option<&std::boxed::Box<crate::model::cdc_strategy::NextAvailableStartPosition>>
12266 {
12267 #[allow(unreachable_patterns)]
12268 self.start_position.as_ref().and_then(|v| match v {
12269 crate::model::cdc_strategy::StartPosition::NextAvailableStartPosition(v) => {
12270 std::option::Option::Some(v)
12271 }
12272 _ => std::option::Option::None,
12273 })
12274 }
12275
12276 pub fn set_next_available_start_position<
12282 T: std::convert::Into<std::boxed::Box<crate::model::cdc_strategy::NextAvailableStartPosition>>,
12283 >(
12284 mut self,
12285 v: T,
12286 ) -> Self {
12287 self.start_position = std::option::Option::Some(
12288 crate::model::cdc_strategy::StartPosition::NextAvailableStartPosition(v.into()),
12289 );
12290 self
12291 }
12292
12293 pub fn specific_start_position(
12297 &self,
12298 ) -> std::option::Option<&std::boxed::Box<crate::model::cdc_strategy::SpecificStartPosition>>
12299 {
12300 #[allow(unreachable_patterns)]
12301 self.start_position.as_ref().and_then(|v| match v {
12302 crate::model::cdc_strategy::StartPosition::SpecificStartPosition(v) => {
12303 std::option::Option::Some(v)
12304 }
12305 _ => std::option::Option::None,
12306 })
12307 }
12308
12309 pub fn set_specific_start_position<
12315 T: std::convert::Into<std::boxed::Box<crate::model::cdc_strategy::SpecificStartPosition>>,
12316 >(
12317 mut self,
12318 v: T,
12319 ) -> Self {
12320 self.start_position = std::option::Option::Some(
12321 crate::model::cdc_strategy::StartPosition::SpecificStartPosition(v.into()),
12322 );
12323 self
12324 }
12325}
12326
12327impl wkt::message::Message for CdcStrategy {
12328 fn typename() -> &'static str {
12329 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy"
12330 }
12331}
12332
12333pub mod cdc_strategy {
12335 #[allow(unused_imports)]
12336 use super::*;
12337
12338 #[derive(Clone, Default, PartialEq)]
12341 #[non_exhaustive]
12342 pub struct MostRecentStartPosition {
12343 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12344 }
12345
12346 impl MostRecentStartPosition {
12347 pub fn new() -> Self {
12348 std::default::Default::default()
12349 }
12350 }
12351
12352 impl wkt::message::Message for MostRecentStartPosition {
12353 fn typename() -> &'static str {
12354 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition"
12355 }
12356 }
12357
12358 #[derive(Clone, Default, PartialEq)]
12361 #[non_exhaustive]
12362 pub struct NextAvailableStartPosition {
12363 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12364 }
12365
12366 impl NextAvailableStartPosition {
12367 pub fn new() -> Self {
12368 std::default::Default::default()
12369 }
12370 }
12371
12372 impl wkt::message::Message for NextAvailableStartPosition {
12373 fn typename() -> &'static str {
12374 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition"
12375 }
12376 }
12377
12378 #[derive(Clone, Default, PartialEq)]
12380 #[non_exhaustive]
12381 pub struct SpecificStartPosition {
12382 pub position:
12383 std::option::Option<crate::model::cdc_strategy::specific_start_position::Position>,
12384
12385 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12386 }
12387
12388 impl SpecificStartPosition {
12389 pub fn new() -> Self {
12390 std::default::Default::default()
12391 }
12392
12393 pub fn set_position<
12398 T: std::convert::Into<
12399 std::option::Option<
12400 crate::model::cdc_strategy::specific_start_position::Position,
12401 >,
12402 >,
12403 >(
12404 mut self,
12405 v: T,
12406 ) -> Self {
12407 self.position = v.into();
12408 self
12409 }
12410
12411 pub fn mysql_log_position(
12415 &self,
12416 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlLogPosition>> {
12417 #[allow(unreachable_patterns)]
12418 self.position.as_ref().and_then(|v| match v {
12419 crate::model::cdc_strategy::specific_start_position::Position::MysqlLogPosition(
12420 v,
12421 ) => std::option::Option::Some(v),
12422 _ => std::option::Option::None,
12423 })
12424 }
12425
12426 pub fn set_mysql_log_position<
12432 T: std::convert::Into<std::boxed::Box<crate::model::MysqlLogPosition>>,
12433 >(
12434 mut self,
12435 v: T,
12436 ) -> Self {
12437 self.position = std::option::Option::Some(
12438 crate::model::cdc_strategy::specific_start_position::Position::MysqlLogPosition(
12439 v.into(),
12440 ),
12441 );
12442 self
12443 }
12444
12445 pub fn oracle_scn_position(
12449 &self,
12450 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleScnPosition>> {
12451 #[allow(unreachable_patterns)]
12452 self.position.as_ref().and_then(|v| match v {
12453 crate::model::cdc_strategy::specific_start_position::Position::OracleScnPosition(v) => std::option::Option::Some(v),
12454 _ => std::option::Option::None,
12455 })
12456 }
12457
12458 pub fn set_oracle_scn_position<
12464 T: std::convert::Into<std::boxed::Box<crate::model::OracleScnPosition>>,
12465 >(
12466 mut self,
12467 v: T,
12468 ) -> Self {
12469 self.position = std::option::Option::Some(
12470 crate::model::cdc_strategy::specific_start_position::Position::OracleScnPosition(
12471 v.into(),
12472 ),
12473 );
12474 self
12475 }
12476
12477 pub fn sql_server_lsn_position(
12481 &self,
12482 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerLsnPosition>> {
12483 #[allow(unreachable_patterns)]
12484 self.position.as_ref().and_then(|v| match v {
12485 crate::model::cdc_strategy::specific_start_position::Position::SqlServerLsnPosition(v) => std::option::Option::Some(v),
12486 _ => std::option::Option::None,
12487 })
12488 }
12489
12490 pub fn set_sql_server_lsn_position<
12496 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerLsnPosition>>,
12497 >(
12498 mut self,
12499 v: T,
12500 ) -> Self {
12501 self.position = std::option::Option::Some(
12502 crate::model::cdc_strategy::specific_start_position::Position::SqlServerLsnPosition(
12503 v.into(),
12504 ),
12505 );
12506 self
12507 }
12508
12509 pub fn mysql_gtid_position(
12513 &self,
12514 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlGtidPosition>> {
12515 #[allow(unreachable_patterns)]
12516 self.position.as_ref().and_then(|v| match v {
12517 crate::model::cdc_strategy::specific_start_position::Position::MysqlGtidPosition(v) => std::option::Option::Some(v),
12518 _ => std::option::Option::None,
12519 })
12520 }
12521
12522 pub fn set_mysql_gtid_position<
12528 T: std::convert::Into<std::boxed::Box<crate::model::MysqlGtidPosition>>,
12529 >(
12530 mut self,
12531 v: T,
12532 ) -> Self {
12533 self.position = std::option::Option::Some(
12534 crate::model::cdc_strategy::specific_start_position::Position::MysqlGtidPosition(
12535 v.into(),
12536 ),
12537 );
12538 self
12539 }
12540 }
12541
12542 impl wkt::message::Message for SpecificStartPosition {
12543 fn typename() -> &'static str {
12544 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition"
12545 }
12546 }
12547
12548 pub mod specific_start_position {
12550 #[allow(unused_imports)]
12551 use super::*;
12552
12553 #[derive(Clone, Debug, PartialEq)]
12554 #[non_exhaustive]
12555 pub enum Position {
12556 MysqlLogPosition(std::boxed::Box<crate::model::MysqlLogPosition>),
12558 OracleScnPosition(std::boxed::Box<crate::model::OracleScnPosition>),
12560 SqlServerLsnPosition(std::boxed::Box<crate::model::SqlServerLsnPosition>),
12562 MysqlGtidPosition(std::boxed::Box<crate::model::MysqlGtidPosition>),
12564 }
12565 }
12566
12567 #[derive(Clone, Debug, PartialEq)]
12571 #[non_exhaustive]
12572 pub enum StartPosition {
12573 MostRecentStartPosition(
12575 std::boxed::Box<crate::model::cdc_strategy::MostRecentStartPosition>,
12576 ),
12577 NextAvailableStartPosition(
12580 std::boxed::Box<crate::model::cdc_strategy::NextAvailableStartPosition>,
12581 ),
12582 SpecificStartPosition(std::boxed::Box<crate::model::cdc_strategy::SpecificStartPosition>),
12584 }
12585}
12586
12587#[derive(Clone, Default, PartialEq)]
12589#[non_exhaustive]
12590pub struct SqlServerLsnPosition {
12591 pub lsn: std::string::String,
12593
12594 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12595}
12596
12597impl SqlServerLsnPosition {
12598 pub fn new() -> Self {
12599 std::default::Default::default()
12600 }
12601
12602 pub fn set_lsn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12604 self.lsn = v.into();
12605 self
12606 }
12607}
12608
12609impl wkt::message::Message for SqlServerLsnPosition {
12610 fn typename() -> &'static str {
12611 "type.googleapis.com/google.cloud.datastream.v1.SqlServerLsnPosition"
12612 }
12613}
12614
12615#[derive(Clone, Default, PartialEq)]
12617#[non_exhaustive]
12618pub struct OracleScnPosition {
12619 pub scn: i64,
12621
12622 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12623}
12624
12625impl OracleScnPosition {
12626 pub fn new() -> Self {
12627 std::default::Default::default()
12628 }
12629
12630 pub fn set_scn<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12632 self.scn = v.into();
12633 self
12634 }
12635}
12636
12637impl wkt::message::Message for OracleScnPosition {
12638 fn typename() -> &'static str {
12639 "type.googleapis.com/google.cloud.datastream.v1.OracleScnPosition"
12640 }
12641}
12642
12643#[derive(Clone, Default, PartialEq)]
12645#[non_exhaustive]
12646pub struct MysqlLogPosition {
12647 pub log_file: std::string::String,
12649
12650 pub log_position: std::option::Option<i32>,
12652
12653 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12654}
12655
12656impl MysqlLogPosition {
12657 pub fn new() -> Self {
12658 std::default::Default::default()
12659 }
12660
12661 pub fn set_log_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12663 self.log_file = v.into();
12664 self
12665 }
12666
12667 pub fn set_log_position<T>(mut self, v: T) -> Self
12669 where
12670 T: std::convert::Into<i32>,
12671 {
12672 self.log_position = std::option::Option::Some(v.into());
12673 self
12674 }
12675
12676 pub fn set_or_clear_log_position<T>(mut self, v: std::option::Option<T>) -> Self
12678 where
12679 T: std::convert::Into<i32>,
12680 {
12681 self.log_position = v.map(|x| x.into());
12682 self
12683 }
12684}
12685
12686impl wkt::message::Message for MysqlLogPosition {
12687 fn typename() -> &'static str {
12688 "type.googleapis.com/google.cloud.datastream.v1.MysqlLogPosition"
12689 }
12690}
12691
12692#[derive(Clone, Default, PartialEq)]
12694#[non_exhaustive]
12695pub struct MysqlGtidPosition {
12696 pub gtid_set: std::string::String,
12698
12699 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12700}
12701
12702impl MysqlGtidPosition {
12703 pub fn new() -> Self {
12704 std::default::Default::default()
12705 }
12706
12707 pub fn set_gtid_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12709 self.gtid_set = v.into();
12710 self
12711 }
12712}
12713
12714impl wkt::message::Message for MysqlGtidPosition {
12715 fn typename() -> &'static str {
12716 "type.googleapis.com/google.cloud.datastream.v1.MysqlGtidPosition"
12717 }
12718}