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
36#[serde_with::serde_as]
38#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
39#[serde(default, rename_all = "camelCase")]
40#[non_exhaustive]
41pub struct DiscoverConnectionProfileRequest {
42 #[serde(skip_serializing_if = "std::string::String::is_empty")]
45 pub parent: std::string::String,
46
47 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
49 pub target: std::option::Option<crate::model::discover_connection_profile_request::Target>,
50
51 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
53 pub hierarchy:
54 std::option::Option<crate::model::discover_connection_profile_request::Hierarchy>,
55
56 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
58 pub data_object:
59 std::option::Option<crate::model::discover_connection_profile_request::DataObject>,
60
61 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
62 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63}
64
65impl DiscoverConnectionProfileRequest {
66 pub fn new() -> Self {
67 std::default::Default::default()
68 }
69
70 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
72 self.parent = v.into();
73 self
74 }
75
76 pub fn set_target<
81 T: std::convert::Into<
82 std::option::Option<crate::model::discover_connection_profile_request::Target>,
83 >,
84 >(
85 mut self,
86 v: T,
87 ) -> Self {
88 self.target = v.into();
89 self
90 }
91
92 pub fn connection_profile(
96 &self,
97 ) -> std::option::Option<&std::boxed::Box<crate::model::ConnectionProfile>> {
98 #[allow(unreachable_patterns)]
99 self.target.as_ref().and_then(|v| match v {
100 crate::model::discover_connection_profile_request::Target::ConnectionProfile(v) => {
101 std::option::Option::Some(v)
102 }
103 _ => std::option::Option::None,
104 })
105 }
106
107 pub fn connection_profile_name(&self) -> std::option::Option<&std::string::String> {
111 #[allow(unreachable_patterns)]
112 self.target.as_ref().and_then(|v| match v {
113 crate::model::discover_connection_profile_request::Target::ConnectionProfileName(v) => {
114 std::option::Option::Some(v)
115 }
116 _ => std::option::Option::None,
117 })
118 }
119
120 pub fn set_connection_profile<
126 T: std::convert::Into<std::boxed::Box<crate::model::ConnectionProfile>>,
127 >(
128 mut self,
129 v: T,
130 ) -> Self {
131 self.target = std::option::Option::Some(
132 crate::model::discover_connection_profile_request::Target::ConnectionProfile(v.into()),
133 );
134 self
135 }
136
137 pub fn set_connection_profile_name<T: std::convert::Into<std::string::String>>(
143 mut self,
144 v: T,
145 ) -> Self {
146 self.target = std::option::Option::Some(
147 crate::model::discover_connection_profile_request::Target::ConnectionProfileName(
148 v.into(),
149 ),
150 );
151 self
152 }
153
154 pub fn set_hierarchy<
159 T: std::convert::Into<
160 std::option::Option<crate::model::discover_connection_profile_request::Hierarchy>,
161 >,
162 >(
163 mut self,
164 v: T,
165 ) -> Self {
166 self.hierarchy = v.into();
167 self
168 }
169
170 pub fn full_hierarchy(&self) -> std::option::Option<&bool> {
174 #[allow(unreachable_patterns)]
175 self.hierarchy.as_ref().and_then(|v| match v {
176 crate::model::discover_connection_profile_request::Hierarchy::FullHierarchy(v) => {
177 std::option::Option::Some(v)
178 }
179 _ => std::option::Option::None,
180 })
181 }
182
183 pub fn hierarchy_depth(&self) -> std::option::Option<&i32> {
187 #[allow(unreachable_patterns)]
188 self.hierarchy.as_ref().and_then(|v| match v {
189 crate::model::discover_connection_profile_request::Hierarchy::HierarchyDepth(v) => {
190 std::option::Option::Some(v)
191 }
192 _ => std::option::Option::None,
193 })
194 }
195
196 pub fn set_full_hierarchy<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
202 self.hierarchy = std::option::Option::Some(
203 crate::model::discover_connection_profile_request::Hierarchy::FullHierarchy(v.into()),
204 );
205 self
206 }
207
208 pub fn set_hierarchy_depth<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
214 self.hierarchy = std::option::Option::Some(
215 crate::model::discover_connection_profile_request::Hierarchy::HierarchyDepth(v.into()),
216 );
217 self
218 }
219
220 pub fn set_data_object<
225 T: std::convert::Into<
226 std::option::Option<crate::model::discover_connection_profile_request::DataObject>,
227 >,
228 >(
229 mut self,
230 v: T,
231 ) -> Self {
232 self.data_object = v.into();
233 self
234 }
235
236 pub fn oracle_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::OracleRdbms>> {
240 #[allow(unreachable_patterns)]
241 self.data_object.as_ref().and_then(|v| match v {
242 crate::model::discover_connection_profile_request::DataObject::OracleRdbms(v) => {
243 std::option::Option::Some(v)
244 }
245 _ => std::option::Option::None,
246 })
247 }
248
249 pub fn mysql_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::MysqlRdbms>> {
253 #[allow(unreachable_patterns)]
254 self.data_object.as_ref().and_then(|v| match v {
255 crate::model::discover_connection_profile_request::DataObject::MysqlRdbms(v) => {
256 std::option::Option::Some(v)
257 }
258 _ => std::option::Option::None,
259 })
260 }
261
262 pub fn postgresql_rdbms(
266 &self,
267 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlRdbms>> {
268 #[allow(unreachable_patterns)]
269 self.data_object.as_ref().and_then(|v| match v {
270 crate::model::discover_connection_profile_request::DataObject::PostgresqlRdbms(v) => {
271 std::option::Option::Some(v)
272 }
273 _ => std::option::Option::None,
274 })
275 }
276
277 pub fn sql_server_rdbms(
281 &self,
282 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerRdbms>> {
283 #[allow(unreachable_patterns)]
284 self.data_object.as_ref().and_then(|v| match v {
285 crate::model::discover_connection_profile_request::DataObject::SqlServerRdbms(v) => {
286 std::option::Option::Some(v)
287 }
288 _ => std::option::Option::None,
289 })
290 }
291
292 pub fn set_oracle_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::OracleRdbms>>>(
298 mut self,
299 v: T,
300 ) -> Self {
301 self.data_object = std::option::Option::Some(
302 crate::model::discover_connection_profile_request::DataObject::OracleRdbms(v.into()),
303 );
304 self
305 }
306
307 pub fn set_mysql_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::MysqlRdbms>>>(
313 mut self,
314 v: T,
315 ) -> Self {
316 self.data_object = std::option::Option::Some(
317 crate::model::discover_connection_profile_request::DataObject::MysqlRdbms(v.into()),
318 );
319 self
320 }
321
322 pub fn set_postgresql_rdbms<
328 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlRdbms>>,
329 >(
330 mut self,
331 v: T,
332 ) -> Self {
333 self.data_object = std::option::Option::Some(
334 crate::model::discover_connection_profile_request::DataObject::PostgresqlRdbms(
335 v.into(),
336 ),
337 );
338 self
339 }
340
341 pub fn set_sql_server_rdbms<
347 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerRdbms>>,
348 >(
349 mut self,
350 v: T,
351 ) -> Self {
352 self.data_object = std::option::Option::Some(
353 crate::model::discover_connection_profile_request::DataObject::SqlServerRdbms(v.into()),
354 );
355 self
356 }
357}
358
359impl wkt::message::Message for DiscoverConnectionProfileRequest {
360 fn typename() -> &'static str {
361 "type.googleapis.com/google.cloud.datastream.v1.DiscoverConnectionProfileRequest"
362 }
363}
364
365pub mod discover_connection_profile_request {
367 #[allow(unused_imports)]
368 use super::*;
369
370 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
372 #[serde(rename_all = "camelCase")]
373 #[non_exhaustive]
374 pub enum Target {
375 ConnectionProfile(std::boxed::Box<crate::model::ConnectionProfile>),
377 ConnectionProfileName(std::string::String),
379 }
380
381 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
383 #[serde(rename_all = "camelCase")]
384 #[non_exhaustive]
385 pub enum Hierarchy {
386 FullHierarchy(bool),
389 HierarchyDepth(i32),
391 }
392
393 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
395 #[serde(rename_all = "camelCase")]
396 #[non_exhaustive]
397 pub enum DataObject {
398 OracleRdbms(std::boxed::Box<crate::model::OracleRdbms>),
400 MysqlRdbms(std::boxed::Box<crate::model::MysqlRdbms>),
402 PostgresqlRdbms(std::boxed::Box<crate::model::PostgresqlRdbms>),
404 SqlServerRdbms(std::boxed::Box<crate::model::SqlServerRdbms>),
406 }
407}
408
409#[serde_with::serde_as]
411#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
412#[serde(default, rename_all = "camelCase")]
413#[non_exhaustive]
414pub struct DiscoverConnectionProfileResponse {
415 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
417 pub data_object:
418 std::option::Option<crate::model::discover_connection_profile_response::DataObject>,
419
420 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
421 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
422}
423
424impl DiscoverConnectionProfileResponse {
425 pub fn new() -> Self {
426 std::default::Default::default()
427 }
428
429 pub fn set_data_object<
434 T: std::convert::Into<
435 std::option::Option<crate::model::discover_connection_profile_response::DataObject>,
436 >,
437 >(
438 mut self,
439 v: T,
440 ) -> Self {
441 self.data_object = v.into();
442 self
443 }
444
445 pub fn oracle_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::OracleRdbms>> {
449 #[allow(unreachable_patterns)]
450 self.data_object.as_ref().and_then(|v| match v {
451 crate::model::discover_connection_profile_response::DataObject::OracleRdbms(v) => {
452 std::option::Option::Some(v)
453 }
454 _ => std::option::Option::None,
455 })
456 }
457
458 pub fn mysql_rdbms(&self) -> std::option::Option<&std::boxed::Box<crate::model::MysqlRdbms>> {
462 #[allow(unreachable_patterns)]
463 self.data_object.as_ref().and_then(|v| match v {
464 crate::model::discover_connection_profile_response::DataObject::MysqlRdbms(v) => {
465 std::option::Option::Some(v)
466 }
467 _ => std::option::Option::None,
468 })
469 }
470
471 pub fn postgresql_rdbms(
475 &self,
476 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlRdbms>> {
477 #[allow(unreachable_patterns)]
478 self.data_object.as_ref().and_then(|v| match v {
479 crate::model::discover_connection_profile_response::DataObject::PostgresqlRdbms(v) => {
480 std::option::Option::Some(v)
481 }
482 _ => std::option::Option::None,
483 })
484 }
485
486 pub fn sql_server_rdbms(
490 &self,
491 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerRdbms>> {
492 #[allow(unreachable_patterns)]
493 self.data_object.as_ref().and_then(|v| match v {
494 crate::model::discover_connection_profile_response::DataObject::SqlServerRdbms(v) => {
495 std::option::Option::Some(v)
496 }
497 _ => std::option::Option::None,
498 })
499 }
500
501 pub fn set_oracle_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::OracleRdbms>>>(
507 mut self,
508 v: T,
509 ) -> Self {
510 self.data_object = std::option::Option::Some(
511 crate::model::discover_connection_profile_response::DataObject::OracleRdbms(v.into()),
512 );
513 self
514 }
515
516 pub fn set_mysql_rdbms<T: std::convert::Into<std::boxed::Box<crate::model::MysqlRdbms>>>(
522 mut self,
523 v: T,
524 ) -> Self {
525 self.data_object = std::option::Option::Some(
526 crate::model::discover_connection_profile_response::DataObject::MysqlRdbms(v.into()),
527 );
528 self
529 }
530
531 pub fn set_postgresql_rdbms<
537 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlRdbms>>,
538 >(
539 mut self,
540 v: T,
541 ) -> Self {
542 self.data_object = std::option::Option::Some(
543 crate::model::discover_connection_profile_response::DataObject::PostgresqlRdbms(
544 v.into(),
545 ),
546 );
547 self
548 }
549
550 pub fn set_sql_server_rdbms<
556 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerRdbms>>,
557 >(
558 mut self,
559 v: T,
560 ) -> Self {
561 self.data_object = std::option::Option::Some(
562 crate::model::discover_connection_profile_response::DataObject::SqlServerRdbms(
563 v.into(),
564 ),
565 );
566 self
567 }
568}
569
570impl wkt::message::Message for DiscoverConnectionProfileResponse {
571 fn typename() -> &'static str {
572 "type.googleapis.com/google.cloud.datastream.v1.DiscoverConnectionProfileResponse"
573 }
574}
575
576pub mod discover_connection_profile_response {
578 #[allow(unused_imports)]
579 use super::*;
580
581 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
583 #[serde(rename_all = "camelCase")]
584 #[non_exhaustive]
585 pub enum DataObject {
586 OracleRdbms(std::boxed::Box<crate::model::OracleRdbms>),
588 MysqlRdbms(std::boxed::Box<crate::model::MysqlRdbms>),
590 PostgresqlRdbms(std::boxed::Box<crate::model::PostgresqlRdbms>),
592 SqlServerRdbms(std::boxed::Box<crate::model::SqlServerRdbms>),
594 }
595}
596
597#[serde_with::serde_as]
599#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
600#[serde(default, rename_all = "camelCase")]
601#[non_exhaustive]
602pub struct FetchStaticIpsRequest {
603 #[serde(skip_serializing_if = "std::string::String::is_empty")]
606 pub name: std::string::String,
607
608 pub page_size: i32,
610
611 #[serde(skip_serializing_if = "std::string::String::is_empty")]
614 pub page_token: std::string::String,
615
616 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
617 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
618}
619
620impl FetchStaticIpsRequest {
621 pub fn new() -> Self {
622 std::default::Default::default()
623 }
624
625 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
627 self.name = v.into();
628 self
629 }
630
631 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
633 self.page_size = v.into();
634 self
635 }
636
637 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
639 self.page_token = v.into();
640 self
641 }
642}
643
644impl wkt::message::Message for FetchStaticIpsRequest {
645 fn typename() -> &'static str {
646 "type.googleapis.com/google.cloud.datastream.v1.FetchStaticIpsRequest"
647 }
648}
649
650#[serde_with::serde_as]
652#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
653#[serde(default, rename_all = "camelCase")]
654#[non_exhaustive]
655pub struct FetchStaticIpsResponse {
656 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
658 pub static_ips: std::vec::Vec<std::string::String>,
659
660 #[serde(skip_serializing_if = "std::string::String::is_empty")]
663 pub next_page_token: std::string::String,
664
665 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
666 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
667}
668
669impl FetchStaticIpsResponse {
670 pub fn new() -> Self {
671 std::default::Default::default()
672 }
673
674 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
676 self.next_page_token = v.into();
677 self
678 }
679
680 pub fn set_static_ips<T, V>(mut self, v: T) -> Self
682 where
683 T: std::iter::IntoIterator<Item = V>,
684 V: std::convert::Into<std::string::String>,
685 {
686 use std::iter::Iterator;
687 self.static_ips = v.into_iter().map(|i| i.into()).collect();
688 self
689 }
690}
691
692impl wkt::message::Message for FetchStaticIpsResponse {
693 fn typename() -> &'static str {
694 "type.googleapis.com/google.cloud.datastream.v1.FetchStaticIpsResponse"
695 }
696}
697
698#[serde_with::serde_as]
700#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
701#[serde(default, rename_all = "camelCase")]
702#[non_exhaustive]
703pub struct ListConnectionProfilesRequest {
704 #[serde(skip_serializing_if = "std::string::String::is_empty")]
706 pub parent: std::string::String,
707
708 pub page_size: i32,
712
713 #[serde(skip_serializing_if = "std::string::String::is_empty")]
719 pub page_token: std::string::String,
720
721 #[serde(skip_serializing_if = "std::string::String::is_empty")]
723 pub filter: std::string::String,
724
725 #[serde(skip_serializing_if = "std::string::String::is_empty")]
727 pub order_by: std::string::String,
728
729 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
730 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
731}
732
733impl ListConnectionProfilesRequest {
734 pub fn new() -> Self {
735 std::default::Default::default()
736 }
737
738 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
740 self.parent = v.into();
741 self
742 }
743
744 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
746 self.page_size = v.into();
747 self
748 }
749
750 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
752 self.page_token = v.into();
753 self
754 }
755
756 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
758 self.filter = v.into();
759 self
760 }
761
762 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
764 self.order_by = v.into();
765 self
766 }
767}
768
769impl wkt::message::Message for ListConnectionProfilesRequest {
770 fn typename() -> &'static str {
771 "type.googleapis.com/google.cloud.datastream.v1.ListConnectionProfilesRequest"
772 }
773}
774
775#[serde_with::serde_as]
777#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
778#[serde(default, rename_all = "camelCase")]
779#[non_exhaustive]
780pub struct ListConnectionProfilesResponse {
781 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
783 pub connection_profiles: std::vec::Vec<crate::model::ConnectionProfile>,
784
785 #[serde(skip_serializing_if = "std::string::String::is_empty")]
788 pub next_page_token: std::string::String,
789
790 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
792 pub unreachable: std::vec::Vec<std::string::String>,
793
794 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
795 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
796}
797
798impl ListConnectionProfilesResponse {
799 pub fn new() -> Self {
800 std::default::Default::default()
801 }
802
803 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
805 self.next_page_token = v.into();
806 self
807 }
808
809 pub fn set_connection_profiles<T, V>(mut self, v: T) -> Self
811 where
812 T: std::iter::IntoIterator<Item = V>,
813 V: std::convert::Into<crate::model::ConnectionProfile>,
814 {
815 use std::iter::Iterator;
816 self.connection_profiles = v.into_iter().map(|i| i.into()).collect();
817 self
818 }
819
820 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
822 where
823 T: std::iter::IntoIterator<Item = V>,
824 V: std::convert::Into<std::string::String>,
825 {
826 use std::iter::Iterator;
827 self.unreachable = v.into_iter().map(|i| i.into()).collect();
828 self
829 }
830}
831
832impl wkt::message::Message for ListConnectionProfilesResponse {
833 fn typename() -> &'static str {
834 "type.googleapis.com/google.cloud.datastream.v1.ListConnectionProfilesResponse"
835 }
836}
837
838#[doc(hidden)]
839impl gax::paginator::internal::PageableResponse for ListConnectionProfilesResponse {
840 type PageItem = crate::model::ConnectionProfile;
841
842 fn items(self) -> std::vec::Vec<Self::PageItem> {
843 self.connection_profiles
844 }
845
846 fn next_page_token(&self) -> std::string::String {
847 use std::clone::Clone;
848 self.next_page_token.clone()
849 }
850}
851
852#[serde_with::serde_as]
854#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
855#[serde(default, rename_all = "camelCase")]
856#[non_exhaustive]
857pub struct GetConnectionProfileRequest {
858 #[serde(skip_serializing_if = "std::string::String::is_empty")]
860 pub name: std::string::String,
861
862 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
863 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
864}
865
866impl GetConnectionProfileRequest {
867 pub fn new() -> Self {
868 std::default::Default::default()
869 }
870
871 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
873 self.name = v.into();
874 self
875 }
876}
877
878impl wkt::message::Message for GetConnectionProfileRequest {
879 fn typename() -> &'static str {
880 "type.googleapis.com/google.cloud.datastream.v1.GetConnectionProfileRequest"
881 }
882}
883
884#[serde_with::serde_as]
886#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
887#[serde(default, rename_all = "camelCase")]
888#[non_exhaustive]
889pub struct CreateConnectionProfileRequest {
890 #[serde(skip_serializing_if = "std::string::String::is_empty")]
892 pub parent: std::string::String,
893
894 #[serde(skip_serializing_if = "std::string::String::is_empty")]
896 pub connection_profile_id: std::string::String,
897
898 #[serde(skip_serializing_if = "std::option::Option::is_none")]
900 pub connection_profile: std::option::Option<crate::model::ConnectionProfile>,
901
902 #[serde(skip_serializing_if = "std::string::String::is_empty")]
916 pub request_id: std::string::String,
917
918 pub validate_only: bool,
921
922 pub force: bool,
924
925 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
926 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
927}
928
929impl CreateConnectionProfileRequest {
930 pub fn new() -> Self {
931 std::default::Default::default()
932 }
933
934 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
936 self.parent = v.into();
937 self
938 }
939
940 pub fn set_connection_profile_id<T: std::convert::Into<std::string::String>>(
942 mut self,
943 v: T,
944 ) -> Self {
945 self.connection_profile_id = v.into();
946 self
947 }
948
949 pub fn set_connection_profile<
951 T: std::convert::Into<std::option::Option<crate::model::ConnectionProfile>>,
952 >(
953 mut self,
954 v: T,
955 ) -> Self {
956 self.connection_profile = v.into();
957 self
958 }
959
960 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
962 self.request_id = v.into();
963 self
964 }
965
966 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
968 self.validate_only = v.into();
969 self
970 }
971
972 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
974 self.force = v.into();
975 self
976 }
977}
978
979impl wkt::message::Message for CreateConnectionProfileRequest {
980 fn typename() -> &'static str {
981 "type.googleapis.com/google.cloud.datastream.v1.CreateConnectionProfileRequest"
982 }
983}
984
985#[serde_with::serde_as]
987#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
988#[serde(default, rename_all = "camelCase")]
989#[non_exhaustive]
990pub struct UpdateConnectionProfileRequest {
991 #[serde(skip_serializing_if = "std::option::Option::is_none")]
997 pub update_mask: std::option::Option<wkt::FieldMask>,
998
999 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1001 pub connection_profile: std::option::Option<crate::model::ConnectionProfile>,
1002
1003 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1017 pub request_id: std::string::String,
1018
1019 pub validate_only: bool,
1022
1023 pub force: bool,
1025
1026 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1027 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1028}
1029
1030impl UpdateConnectionProfileRequest {
1031 pub fn new() -> Self {
1032 std::default::Default::default()
1033 }
1034
1035 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1037 mut self,
1038 v: T,
1039 ) -> Self {
1040 self.update_mask = v.into();
1041 self
1042 }
1043
1044 pub fn set_connection_profile<
1046 T: std::convert::Into<std::option::Option<crate::model::ConnectionProfile>>,
1047 >(
1048 mut self,
1049 v: T,
1050 ) -> Self {
1051 self.connection_profile = v.into();
1052 self
1053 }
1054
1055 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1057 self.request_id = v.into();
1058 self
1059 }
1060
1061 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1063 self.validate_only = v.into();
1064 self
1065 }
1066
1067 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1069 self.force = v.into();
1070 self
1071 }
1072}
1073
1074impl wkt::message::Message for UpdateConnectionProfileRequest {
1075 fn typename() -> &'static str {
1076 "type.googleapis.com/google.cloud.datastream.v1.UpdateConnectionProfileRequest"
1077 }
1078}
1079
1080#[serde_with::serde_as]
1082#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1083#[serde(default, rename_all = "camelCase")]
1084#[non_exhaustive]
1085pub struct DeleteConnectionProfileRequest {
1086 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1088 pub name: std::string::String,
1089
1090 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1104 pub request_id: std::string::String,
1105
1106 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1107 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1108}
1109
1110impl DeleteConnectionProfileRequest {
1111 pub fn new() -> Self {
1112 std::default::Default::default()
1113 }
1114
1115 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1117 self.name = v.into();
1118 self
1119 }
1120
1121 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1123 self.request_id = v.into();
1124 self
1125 }
1126}
1127
1128impl wkt::message::Message for DeleteConnectionProfileRequest {
1129 fn typename() -> &'static str {
1130 "type.googleapis.com/google.cloud.datastream.v1.DeleteConnectionProfileRequest"
1131 }
1132}
1133
1134#[serde_with::serde_as]
1136#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1137#[serde(default, rename_all = "camelCase")]
1138#[non_exhaustive]
1139pub struct ListStreamsRequest {
1140 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1142 pub parent: std::string::String,
1143
1144 pub page_size: i32,
1148
1149 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1155 pub page_token: std::string::String,
1156
1157 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1159 pub filter: std::string::String,
1160
1161 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1163 pub order_by: std::string::String,
1164
1165 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1166 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1167}
1168
1169impl ListStreamsRequest {
1170 pub fn new() -> Self {
1171 std::default::Default::default()
1172 }
1173
1174 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1176 self.parent = v.into();
1177 self
1178 }
1179
1180 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1182 self.page_size = v.into();
1183 self
1184 }
1185
1186 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1188 self.page_token = v.into();
1189 self
1190 }
1191
1192 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1194 self.filter = v.into();
1195 self
1196 }
1197
1198 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1200 self.order_by = v.into();
1201 self
1202 }
1203}
1204
1205impl wkt::message::Message for ListStreamsRequest {
1206 fn typename() -> &'static str {
1207 "type.googleapis.com/google.cloud.datastream.v1.ListStreamsRequest"
1208 }
1209}
1210
1211#[serde_with::serde_as]
1213#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1214#[serde(default, rename_all = "camelCase")]
1215#[non_exhaustive]
1216pub struct ListStreamsResponse {
1217 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1219 pub streams: std::vec::Vec<crate::model::Stream>,
1220
1221 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1224 pub next_page_token: std::string::String,
1225
1226 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1228 pub unreachable: std::vec::Vec<std::string::String>,
1229
1230 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1231 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1232}
1233
1234impl ListStreamsResponse {
1235 pub fn new() -> Self {
1236 std::default::Default::default()
1237 }
1238
1239 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1241 self.next_page_token = v.into();
1242 self
1243 }
1244
1245 pub fn set_streams<T, V>(mut self, v: T) -> Self
1247 where
1248 T: std::iter::IntoIterator<Item = V>,
1249 V: std::convert::Into<crate::model::Stream>,
1250 {
1251 use std::iter::Iterator;
1252 self.streams = v.into_iter().map(|i| i.into()).collect();
1253 self
1254 }
1255
1256 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1258 where
1259 T: std::iter::IntoIterator<Item = V>,
1260 V: std::convert::Into<std::string::String>,
1261 {
1262 use std::iter::Iterator;
1263 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1264 self
1265 }
1266}
1267
1268impl wkt::message::Message for ListStreamsResponse {
1269 fn typename() -> &'static str {
1270 "type.googleapis.com/google.cloud.datastream.v1.ListStreamsResponse"
1271 }
1272}
1273
1274#[doc(hidden)]
1275impl gax::paginator::internal::PageableResponse for ListStreamsResponse {
1276 type PageItem = crate::model::Stream;
1277
1278 fn items(self) -> std::vec::Vec<Self::PageItem> {
1279 self.streams
1280 }
1281
1282 fn next_page_token(&self) -> std::string::String {
1283 use std::clone::Clone;
1284 self.next_page_token.clone()
1285 }
1286}
1287
1288#[serde_with::serde_as]
1290#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1291#[serde(default, rename_all = "camelCase")]
1292#[non_exhaustive]
1293pub struct GetStreamRequest {
1294 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1296 pub name: std::string::String,
1297
1298 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1299 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1300}
1301
1302impl GetStreamRequest {
1303 pub fn new() -> Self {
1304 std::default::Default::default()
1305 }
1306
1307 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1309 self.name = v.into();
1310 self
1311 }
1312}
1313
1314impl wkt::message::Message for GetStreamRequest {
1315 fn typename() -> &'static str {
1316 "type.googleapis.com/google.cloud.datastream.v1.GetStreamRequest"
1317 }
1318}
1319
1320#[serde_with::serde_as]
1322#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1323#[serde(default, rename_all = "camelCase")]
1324#[non_exhaustive]
1325pub struct CreateStreamRequest {
1326 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1328 pub parent: std::string::String,
1329
1330 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1332 pub stream_id: std::string::String,
1333
1334 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1336 pub stream: std::option::Option<crate::model::Stream>,
1337
1338 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1352 pub request_id: std::string::String,
1353
1354 pub validate_only: bool,
1357
1358 pub force: bool,
1360
1361 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1362 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1363}
1364
1365impl CreateStreamRequest {
1366 pub fn new() -> Self {
1367 std::default::Default::default()
1368 }
1369
1370 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1372 self.parent = v.into();
1373 self
1374 }
1375
1376 pub fn set_stream_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1378 self.stream_id = v.into();
1379 self
1380 }
1381
1382 pub fn set_stream<T: std::convert::Into<std::option::Option<crate::model::Stream>>>(
1384 mut self,
1385 v: T,
1386 ) -> Self {
1387 self.stream = v.into();
1388 self
1389 }
1390
1391 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1393 self.request_id = v.into();
1394 self
1395 }
1396
1397 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1399 self.validate_only = v.into();
1400 self
1401 }
1402
1403 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1405 self.force = v.into();
1406 self
1407 }
1408}
1409
1410impl wkt::message::Message for CreateStreamRequest {
1411 fn typename() -> &'static str {
1412 "type.googleapis.com/google.cloud.datastream.v1.CreateStreamRequest"
1413 }
1414}
1415
1416#[serde_with::serde_as]
1418#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1419#[serde(default, rename_all = "camelCase")]
1420#[non_exhaustive]
1421pub struct UpdateStreamRequest {
1422 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1428 pub update_mask: std::option::Option<wkt::FieldMask>,
1429
1430 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1432 pub stream: std::option::Option<crate::model::Stream>,
1433
1434 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1448 pub request_id: std::string::String,
1449
1450 pub validate_only: bool,
1453
1454 pub force: bool,
1456
1457 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1458 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1459}
1460
1461impl UpdateStreamRequest {
1462 pub fn new() -> Self {
1463 std::default::Default::default()
1464 }
1465
1466 pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1468 mut self,
1469 v: T,
1470 ) -> Self {
1471 self.update_mask = v.into();
1472 self
1473 }
1474
1475 pub fn set_stream<T: std::convert::Into<std::option::Option<crate::model::Stream>>>(
1477 mut self,
1478 v: T,
1479 ) -> Self {
1480 self.stream = v.into();
1481 self
1482 }
1483
1484 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1486 self.request_id = v.into();
1487 self
1488 }
1489
1490 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1492 self.validate_only = v.into();
1493 self
1494 }
1495
1496 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1498 self.force = v.into();
1499 self
1500 }
1501}
1502
1503impl wkt::message::Message for UpdateStreamRequest {
1504 fn typename() -> &'static str {
1505 "type.googleapis.com/google.cloud.datastream.v1.UpdateStreamRequest"
1506 }
1507}
1508
1509#[serde_with::serde_as]
1511#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1512#[serde(default, rename_all = "camelCase")]
1513#[non_exhaustive]
1514pub struct DeleteStreamRequest {
1515 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1517 pub name: std::string::String,
1518
1519 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1533 pub request_id: std::string::String,
1534
1535 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1536 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1537}
1538
1539impl DeleteStreamRequest {
1540 pub fn new() -> Self {
1541 std::default::Default::default()
1542 }
1543
1544 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1546 self.name = v.into();
1547 self
1548 }
1549
1550 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1552 self.request_id = v.into();
1553 self
1554 }
1555}
1556
1557impl wkt::message::Message for DeleteStreamRequest {
1558 fn typename() -> &'static str {
1559 "type.googleapis.com/google.cloud.datastream.v1.DeleteStreamRequest"
1560 }
1561}
1562
1563#[serde_with::serde_as]
1565#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1566#[serde(default, rename_all = "camelCase")]
1567#[non_exhaustive]
1568pub struct RunStreamRequest {
1569 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1572 pub name: std::string::String,
1573
1574 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1577 pub cdc_strategy: std::option::Option<crate::model::CdcStrategy>,
1578
1579 pub force: bool,
1581
1582 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1583 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1584}
1585
1586impl RunStreamRequest {
1587 pub fn new() -> Self {
1588 std::default::Default::default()
1589 }
1590
1591 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1593 self.name = v.into();
1594 self
1595 }
1596
1597 pub fn set_cdc_strategy<
1599 T: std::convert::Into<std::option::Option<crate::model::CdcStrategy>>,
1600 >(
1601 mut self,
1602 v: T,
1603 ) -> Self {
1604 self.cdc_strategy = v.into();
1605 self
1606 }
1607
1608 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1610 self.force = v.into();
1611 self
1612 }
1613}
1614
1615impl wkt::message::Message for RunStreamRequest {
1616 fn typename() -> &'static str {
1617 "type.googleapis.com/google.cloud.datastream.v1.RunStreamRequest"
1618 }
1619}
1620
1621#[serde_with::serde_as]
1623#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1624#[serde(default, rename_all = "camelCase")]
1625#[non_exhaustive]
1626pub struct GetStreamObjectRequest {
1627 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1629 pub name: std::string::String,
1630
1631 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1632 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1633}
1634
1635impl GetStreamObjectRequest {
1636 pub fn new() -> Self {
1637 std::default::Default::default()
1638 }
1639
1640 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1642 self.name = v.into();
1643 self
1644 }
1645}
1646
1647impl wkt::message::Message for GetStreamObjectRequest {
1648 fn typename() -> &'static str {
1649 "type.googleapis.com/google.cloud.datastream.v1.GetStreamObjectRequest"
1650 }
1651}
1652
1653#[serde_with::serde_as]
1656#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1657#[serde(default, rename_all = "camelCase")]
1658#[non_exhaustive]
1659pub struct LookupStreamObjectRequest {
1660 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1662 pub parent: std::string::String,
1663
1664 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1666 pub source_object_identifier: std::option::Option<crate::model::SourceObjectIdentifier>,
1667
1668 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1669 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1670}
1671
1672impl LookupStreamObjectRequest {
1673 pub fn new() -> Self {
1674 std::default::Default::default()
1675 }
1676
1677 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1679 self.parent = v.into();
1680 self
1681 }
1682
1683 pub fn set_source_object_identifier<
1685 T: std::convert::Into<std::option::Option<crate::model::SourceObjectIdentifier>>,
1686 >(
1687 mut self,
1688 v: T,
1689 ) -> Self {
1690 self.source_object_identifier = v.into();
1691 self
1692 }
1693}
1694
1695impl wkt::message::Message for LookupStreamObjectRequest {
1696 fn typename() -> &'static str {
1697 "type.googleapis.com/google.cloud.datastream.v1.LookupStreamObjectRequest"
1698 }
1699}
1700
1701#[serde_with::serde_as]
1703#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1704#[serde(default, rename_all = "camelCase")]
1705#[non_exhaustive]
1706pub struct StartBackfillJobRequest {
1707 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1710 pub object: std::string::String,
1711
1712 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1713 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1714}
1715
1716impl StartBackfillJobRequest {
1717 pub fn new() -> Self {
1718 std::default::Default::default()
1719 }
1720
1721 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1723 self.object = v.into();
1724 self
1725 }
1726}
1727
1728impl wkt::message::Message for StartBackfillJobRequest {
1729 fn typename() -> &'static str {
1730 "type.googleapis.com/google.cloud.datastream.v1.StartBackfillJobRequest"
1731 }
1732}
1733
1734#[serde_with::serde_as]
1736#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1737#[serde(default, rename_all = "camelCase")]
1738#[non_exhaustive]
1739pub struct StartBackfillJobResponse {
1740 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1742 pub object: std::option::Option<crate::model::StreamObject>,
1743
1744 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1745 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1746}
1747
1748impl StartBackfillJobResponse {
1749 pub fn new() -> Self {
1750 std::default::Default::default()
1751 }
1752
1753 pub fn set_object<T: std::convert::Into<std::option::Option<crate::model::StreamObject>>>(
1755 mut self,
1756 v: T,
1757 ) -> Self {
1758 self.object = v.into();
1759 self
1760 }
1761}
1762
1763impl wkt::message::Message for StartBackfillJobResponse {
1764 fn typename() -> &'static str {
1765 "type.googleapis.com/google.cloud.datastream.v1.StartBackfillJobResponse"
1766 }
1767}
1768
1769#[serde_with::serde_as]
1772#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1773#[serde(default, rename_all = "camelCase")]
1774#[non_exhaustive]
1775pub struct StopBackfillJobRequest {
1776 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1779 pub object: std::string::String,
1780
1781 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1782 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1783}
1784
1785impl StopBackfillJobRequest {
1786 pub fn new() -> Self {
1787 std::default::Default::default()
1788 }
1789
1790 pub fn set_object<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1792 self.object = v.into();
1793 self
1794 }
1795}
1796
1797impl wkt::message::Message for StopBackfillJobRequest {
1798 fn typename() -> &'static str {
1799 "type.googleapis.com/google.cloud.datastream.v1.StopBackfillJobRequest"
1800 }
1801}
1802
1803#[serde_with::serde_as]
1805#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1806#[serde(default, rename_all = "camelCase")]
1807#[non_exhaustive]
1808pub struct StopBackfillJobResponse {
1809 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1811 pub object: std::option::Option<crate::model::StreamObject>,
1812
1813 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1814 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1815}
1816
1817impl StopBackfillJobResponse {
1818 pub fn new() -> Self {
1819 std::default::Default::default()
1820 }
1821
1822 pub fn set_object<T: std::convert::Into<std::option::Option<crate::model::StreamObject>>>(
1824 mut self,
1825 v: T,
1826 ) -> Self {
1827 self.object = v.into();
1828 self
1829 }
1830}
1831
1832impl wkt::message::Message for StopBackfillJobResponse {
1833 fn typename() -> &'static str {
1834 "type.googleapis.com/google.cloud.datastream.v1.StopBackfillJobResponse"
1835 }
1836}
1837
1838#[serde_with::serde_as]
1840#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1841#[serde(default, rename_all = "camelCase")]
1842#[non_exhaustive]
1843pub struct ListStreamObjectsRequest {
1844 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1846 pub parent: std::string::String,
1847
1848 pub page_size: i32,
1851
1852 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1859 pub page_token: std::string::String,
1860
1861 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1862 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1863}
1864
1865impl ListStreamObjectsRequest {
1866 pub fn new() -> Self {
1867 std::default::Default::default()
1868 }
1869
1870 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1872 self.parent = v.into();
1873 self
1874 }
1875
1876 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1878 self.page_size = v.into();
1879 self
1880 }
1881
1882 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1884 self.page_token = v.into();
1885 self
1886 }
1887}
1888
1889impl wkt::message::Message for ListStreamObjectsRequest {
1890 fn typename() -> &'static str {
1891 "type.googleapis.com/google.cloud.datastream.v1.ListStreamObjectsRequest"
1892 }
1893}
1894
1895#[serde_with::serde_as]
1897#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1898#[serde(default, rename_all = "camelCase")]
1899#[non_exhaustive]
1900pub struct ListStreamObjectsResponse {
1901 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1903 pub stream_objects: std::vec::Vec<crate::model::StreamObject>,
1904
1905 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1907 pub next_page_token: std::string::String,
1908
1909 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1910 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1911}
1912
1913impl ListStreamObjectsResponse {
1914 pub fn new() -> Self {
1915 std::default::Default::default()
1916 }
1917
1918 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1920 self.next_page_token = v.into();
1921 self
1922 }
1923
1924 pub fn set_stream_objects<T, V>(mut self, v: T) -> Self
1926 where
1927 T: std::iter::IntoIterator<Item = V>,
1928 V: std::convert::Into<crate::model::StreamObject>,
1929 {
1930 use std::iter::Iterator;
1931 self.stream_objects = v.into_iter().map(|i| i.into()).collect();
1932 self
1933 }
1934}
1935
1936impl wkt::message::Message for ListStreamObjectsResponse {
1937 fn typename() -> &'static str {
1938 "type.googleapis.com/google.cloud.datastream.v1.ListStreamObjectsResponse"
1939 }
1940}
1941
1942#[doc(hidden)]
1943impl gax::paginator::internal::PageableResponse for ListStreamObjectsResponse {
1944 type PageItem = crate::model::StreamObject;
1945
1946 fn items(self) -> std::vec::Vec<Self::PageItem> {
1947 self.stream_objects
1948 }
1949
1950 fn next_page_token(&self) -> std::string::String {
1951 use std::clone::Clone;
1952 self.next_page_token.clone()
1953 }
1954}
1955
1956#[serde_with::serde_as]
1958#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1959#[serde(default, rename_all = "camelCase")]
1960#[non_exhaustive]
1961pub struct OperationMetadata {
1962 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1964 pub create_time: std::option::Option<wkt::Timestamp>,
1965
1966 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1968 pub end_time: std::option::Option<wkt::Timestamp>,
1969
1970 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1972 pub target: std::string::String,
1973
1974 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1976 pub verb: std::string::String,
1977
1978 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1980 pub status_message: std::string::String,
1981
1982 pub requested_cancellation: bool,
1992
1993 #[serde(skip_serializing_if = "std::string::String::is_empty")]
1995 pub api_version: std::string::String,
1996
1997 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1999 pub validation_result: std::option::Option<crate::model::ValidationResult>,
2000
2001 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2002 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2003}
2004
2005impl OperationMetadata {
2006 pub fn new() -> Self {
2007 std::default::Default::default()
2008 }
2009
2010 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2012 mut self,
2013 v: T,
2014 ) -> Self {
2015 self.create_time = v.into();
2016 self
2017 }
2018
2019 pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2021 mut self,
2022 v: T,
2023 ) -> Self {
2024 self.end_time = v.into();
2025 self
2026 }
2027
2028 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2030 self.target = v.into();
2031 self
2032 }
2033
2034 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2036 self.verb = v.into();
2037 self
2038 }
2039
2040 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2042 self.status_message = v.into();
2043 self
2044 }
2045
2046 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2048 self.requested_cancellation = v.into();
2049 self
2050 }
2051
2052 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2054 self.api_version = v.into();
2055 self
2056 }
2057
2058 pub fn set_validation_result<
2060 T: std::convert::Into<std::option::Option<crate::model::ValidationResult>>,
2061 >(
2062 mut self,
2063 v: T,
2064 ) -> Self {
2065 self.validation_result = v.into();
2066 self
2067 }
2068}
2069
2070impl wkt::message::Message for OperationMetadata {
2071 fn typename() -> &'static str {
2072 "type.googleapis.com/google.cloud.datastream.v1.OperationMetadata"
2073 }
2074}
2075
2076#[serde_with::serde_as]
2078#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2079#[serde(default, rename_all = "camelCase")]
2080#[non_exhaustive]
2081pub struct CreatePrivateConnectionRequest {
2082 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2084 pub parent: std::string::String,
2085
2086 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2088 pub private_connection_id: std::string::String,
2089
2090 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2092 pub private_connection: std::option::Option<crate::model::PrivateConnection>,
2093
2094 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2108 pub request_id: std::string::String,
2109
2110 pub force: bool,
2112
2113 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2114 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2115}
2116
2117impl CreatePrivateConnectionRequest {
2118 pub fn new() -> Self {
2119 std::default::Default::default()
2120 }
2121
2122 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2124 self.parent = v.into();
2125 self
2126 }
2127
2128 pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
2130 mut self,
2131 v: T,
2132 ) -> Self {
2133 self.private_connection_id = v.into();
2134 self
2135 }
2136
2137 pub fn set_private_connection<
2139 T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
2140 >(
2141 mut self,
2142 v: T,
2143 ) -> Self {
2144 self.private_connection = v.into();
2145 self
2146 }
2147
2148 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2150 self.request_id = v.into();
2151 self
2152 }
2153
2154 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2156 self.force = v.into();
2157 self
2158 }
2159}
2160
2161impl wkt::message::Message for CreatePrivateConnectionRequest {
2162 fn typename() -> &'static str {
2163 "type.googleapis.com/google.cloud.datastream.v1.CreatePrivateConnectionRequest"
2164 }
2165}
2166
2167#[serde_with::serde_as]
2169#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2170#[serde(default, rename_all = "camelCase")]
2171#[non_exhaustive]
2172pub struct ListPrivateConnectionsRequest {
2173 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2176 pub parent: std::string::String,
2177
2178 pub page_size: i32,
2183
2184 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2191 pub page_token: std::string::String,
2192
2193 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2195 pub filter: std::string::String,
2196
2197 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2199 pub order_by: std::string::String,
2200
2201 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2202 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2203}
2204
2205impl ListPrivateConnectionsRequest {
2206 pub fn new() -> Self {
2207 std::default::Default::default()
2208 }
2209
2210 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2212 self.parent = v.into();
2213 self
2214 }
2215
2216 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2218 self.page_size = v.into();
2219 self
2220 }
2221
2222 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2224 self.page_token = v.into();
2225 self
2226 }
2227
2228 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2230 self.filter = v.into();
2231 self
2232 }
2233
2234 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2236 self.order_by = v.into();
2237 self
2238 }
2239}
2240
2241impl wkt::message::Message for ListPrivateConnectionsRequest {
2242 fn typename() -> &'static str {
2243 "type.googleapis.com/google.cloud.datastream.v1.ListPrivateConnectionsRequest"
2244 }
2245}
2246
2247#[serde_with::serde_as]
2249#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2250#[serde(default, rename_all = "camelCase")]
2251#[non_exhaustive]
2252pub struct ListPrivateConnectionsResponse {
2253 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2255 pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
2256
2257 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2260 pub next_page_token: std::string::String,
2261
2262 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2264 pub unreachable: std::vec::Vec<std::string::String>,
2265
2266 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2267 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2268}
2269
2270impl ListPrivateConnectionsResponse {
2271 pub fn new() -> Self {
2272 std::default::Default::default()
2273 }
2274
2275 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2277 self.next_page_token = v.into();
2278 self
2279 }
2280
2281 pub fn set_private_connections<T, V>(mut self, v: T) -> Self
2283 where
2284 T: std::iter::IntoIterator<Item = V>,
2285 V: std::convert::Into<crate::model::PrivateConnection>,
2286 {
2287 use std::iter::Iterator;
2288 self.private_connections = v.into_iter().map(|i| i.into()).collect();
2289 self
2290 }
2291
2292 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2294 where
2295 T: std::iter::IntoIterator<Item = V>,
2296 V: std::convert::Into<std::string::String>,
2297 {
2298 use std::iter::Iterator;
2299 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2300 self
2301 }
2302}
2303
2304impl wkt::message::Message for ListPrivateConnectionsResponse {
2305 fn typename() -> &'static str {
2306 "type.googleapis.com/google.cloud.datastream.v1.ListPrivateConnectionsResponse"
2307 }
2308}
2309
2310#[doc(hidden)]
2311impl gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
2312 type PageItem = crate::model::PrivateConnection;
2313
2314 fn items(self) -> std::vec::Vec<Self::PageItem> {
2315 self.private_connections
2316 }
2317
2318 fn next_page_token(&self) -> std::string::String {
2319 use std::clone::Clone;
2320 self.next_page_token.clone()
2321 }
2322}
2323
2324#[serde_with::serde_as]
2326#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2327#[serde(default, rename_all = "camelCase")]
2328#[non_exhaustive]
2329pub struct DeletePrivateConnectionRequest {
2330 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2332 pub name: std::string::String,
2333
2334 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2348 pub request_id: std::string::String,
2349
2350 pub force: bool,
2353
2354 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2355 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2356}
2357
2358impl DeletePrivateConnectionRequest {
2359 pub fn new() -> Self {
2360 std::default::Default::default()
2361 }
2362
2363 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2365 self.name = v.into();
2366 self
2367 }
2368
2369 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2371 self.request_id = v.into();
2372 self
2373 }
2374
2375 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2377 self.force = v.into();
2378 self
2379 }
2380}
2381
2382impl wkt::message::Message for DeletePrivateConnectionRequest {
2383 fn typename() -> &'static str {
2384 "type.googleapis.com/google.cloud.datastream.v1.DeletePrivateConnectionRequest"
2385 }
2386}
2387
2388#[serde_with::serde_as]
2390#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2391#[serde(default, rename_all = "camelCase")]
2392#[non_exhaustive]
2393pub struct GetPrivateConnectionRequest {
2394 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2396 pub name: std::string::String,
2397
2398 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2399 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2400}
2401
2402impl GetPrivateConnectionRequest {
2403 pub fn new() -> Self {
2404 std::default::Default::default()
2405 }
2406
2407 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2409 self.name = v.into();
2410 self
2411 }
2412}
2413
2414impl wkt::message::Message for GetPrivateConnectionRequest {
2415 fn typename() -> &'static str {
2416 "type.googleapis.com/google.cloud.datastream.v1.GetPrivateConnectionRequest"
2417 }
2418}
2419
2420#[serde_with::serde_as]
2422#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2423#[serde(default, rename_all = "camelCase")]
2424#[non_exhaustive]
2425pub struct CreateRouteRequest {
2426 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2428 pub parent: std::string::String,
2429
2430 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2432 pub route_id: std::string::String,
2433
2434 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2436 pub route: std::option::Option<crate::model::Route>,
2437
2438 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2452 pub request_id: std::string::String,
2453
2454 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2455 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2456}
2457
2458impl CreateRouteRequest {
2459 pub fn new() -> Self {
2460 std::default::Default::default()
2461 }
2462
2463 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2465 self.parent = v.into();
2466 self
2467 }
2468
2469 pub fn set_route_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2471 self.route_id = v.into();
2472 self
2473 }
2474
2475 pub fn set_route<T: std::convert::Into<std::option::Option<crate::model::Route>>>(
2477 mut self,
2478 v: T,
2479 ) -> Self {
2480 self.route = v.into();
2481 self
2482 }
2483
2484 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2486 self.request_id = v.into();
2487 self
2488 }
2489}
2490
2491impl wkt::message::Message for CreateRouteRequest {
2492 fn typename() -> &'static str {
2493 "type.googleapis.com/google.cloud.datastream.v1.CreateRouteRequest"
2494 }
2495}
2496
2497#[serde_with::serde_as]
2499#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2500#[serde(default, rename_all = "camelCase")]
2501#[non_exhaustive]
2502pub struct ListRoutesRequest {
2503 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2505 pub parent: std::string::String,
2506
2507 pub page_size: i32,
2512
2513 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2520 pub page_token: std::string::String,
2521
2522 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2524 pub filter: std::string::String,
2525
2526 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2528 pub order_by: std::string::String,
2529
2530 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2531 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2532}
2533
2534impl ListRoutesRequest {
2535 pub fn new() -> Self {
2536 std::default::Default::default()
2537 }
2538
2539 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2541 self.parent = v.into();
2542 self
2543 }
2544
2545 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2547 self.page_size = v.into();
2548 self
2549 }
2550
2551 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2553 self.page_token = v.into();
2554 self
2555 }
2556
2557 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2559 self.filter = v.into();
2560 self
2561 }
2562
2563 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2565 self.order_by = v.into();
2566 self
2567 }
2568}
2569
2570impl wkt::message::Message for ListRoutesRequest {
2571 fn typename() -> &'static str {
2572 "type.googleapis.com/google.cloud.datastream.v1.ListRoutesRequest"
2573 }
2574}
2575
2576#[serde_with::serde_as]
2578#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2579#[serde(default, rename_all = "camelCase")]
2580#[non_exhaustive]
2581pub struct ListRoutesResponse {
2582 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2584 pub routes: std::vec::Vec<crate::model::Route>,
2585
2586 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2589 pub next_page_token: std::string::String,
2590
2591 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2593 pub unreachable: std::vec::Vec<std::string::String>,
2594
2595 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2596 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2597}
2598
2599impl ListRoutesResponse {
2600 pub fn new() -> Self {
2601 std::default::Default::default()
2602 }
2603
2604 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2606 self.next_page_token = v.into();
2607 self
2608 }
2609
2610 pub fn set_routes<T, V>(mut self, v: T) -> Self
2612 where
2613 T: std::iter::IntoIterator<Item = V>,
2614 V: std::convert::Into<crate::model::Route>,
2615 {
2616 use std::iter::Iterator;
2617 self.routes = v.into_iter().map(|i| i.into()).collect();
2618 self
2619 }
2620
2621 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2623 where
2624 T: std::iter::IntoIterator<Item = V>,
2625 V: std::convert::Into<std::string::String>,
2626 {
2627 use std::iter::Iterator;
2628 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2629 self
2630 }
2631}
2632
2633impl wkt::message::Message for ListRoutesResponse {
2634 fn typename() -> &'static str {
2635 "type.googleapis.com/google.cloud.datastream.v1.ListRoutesResponse"
2636 }
2637}
2638
2639#[doc(hidden)]
2640impl gax::paginator::internal::PageableResponse for ListRoutesResponse {
2641 type PageItem = crate::model::Route;
2642
2643 fn items(self) -> std::vec::Vec<Self::PageItem> {
2644 self.routes
2645 }
2646
2647 fn next_page_token(&self) -> std::string::String {
2648 use std::clone::Clone;
2649 self.next_page_token.clone()
2650 }
2651}
2652
2653#[serde_with::serde_as]
2655#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2656#[serde(default, rename_all = "camelCase")]
2657#[non_exhaustive]
2658pub struct DeleteRouteRequest {
2659 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2661 pub name: std::string::String,
2662
2663 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2677 pub request_id: std::string::String,
2678
2679 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2680 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2681}
2682
2683impl DeleteRouteRequest {
2684 pub fn new() -> Self {
2685 std::default::Default::default()
2686 }
2687
2688 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2690 self.name = v.into();
2691 self
2692 }
2693
2694 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2696 self.request_id = v.into();
2697 self
2698 }
2699}
2700
2701impl wkt::message::Message for DeleteRouteRequest {
2702 fn typename() -> &'static str {
2703 "type.googleapis.com/google.cloud.datastream.v1.DeleteRouteRequest"
2704 }
2705}
2706
2707#[serde_with::serde_as]
2709#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2710#[serde(default, rename_all = "camelCase")]
2711#[non_exhaustive]
2712pub struct GetRouteRequest {
2713 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2715 pub name: std::string::String,
2716
2717 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2718 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2719}
2720
2721impl GetRouteRequest {
2722 pub fn new() -> Self {
2723 std::default::Default::default()
2724 }
2725
2726 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2728 self.name = v.into();
2729 self
2730 }
2731}
2732
2733impl wkt::message::Message for GetRouteRequest {
2734 fn typename() -> &'static str {
2735 "type.googleapis.com/google.cloud.datastream.v1.GetRouteRequest"
2736 }
2737}
2738
2739#[serde_with::serde_as]
2741#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2742#[serde(default, rename_all = "camelCase")]
2743#[non_exhaustive]
2744pub struct OracleProfile {
2745 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2747 pub hostname: std::string::String,
2748
2749 pub port: i32,
2751
2752 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2754 pub username: std::string::String,
2755
2756 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2759 pub password: std::string::String,
2760
2761 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2763 pub database_service: std::string::String,
2764
2765 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2767 pub connection_attributes: std::collections::HashMap<std::string::String, std::string::String>,
2768
2769 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2771 pub oracle_ssl_config: std::option::Option<crate::model::OracleSslConfig>,
2772
2773 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2775 pub oracle_asm_config: std::option::Option<crate::model::OracleAsmConfig>,
2776
2777 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2780 pub secret_manager_stored_password: std::string::String,
2781
2782 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2783 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2784}
2785
2786impl OracleProfile {
2787 pub fn new() -> Self {
2788 std::default::Default::default()
2789 }
2790
2791 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2793 self.hostname = v.into();
2794 self
2795 }
2796
2797 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2799 self.port = v.into();
2800 self
2801 }
2802
2803 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2805 self.username = v.into();
2806 self
2807 }
2808
2809 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2811 self.password = v.into();
2812 self
2813 }
2814
2815 pub fn set_database_service<T: std::convert::Into<std::string::String>>(
2817 mut self,
2818 v: T,
2819 ) -> Self {
2820 self.database_service = v.into();
2821 self
2822 }
2823
2824 pub fn set_oracle_ssl_config<
2826 T: std::convert::Into<std::option::Option<crate::model::OracleSslConfig>>,
2827 >(
2828 mut self,
2829 v: T,
2830 ) -> Self {
2831 self.oracle_ssl_config = v.into();
2832 self
2833 }
2834
2835 pub fn set_oracle_asm_config<
2837 T: std::convert::Into<std::option::Option<crate::model::OracleAsmConfig>>,
2838 >(
2839 mut self,
2840 v: T,
2841 ) -> Self {
2842 self.oracle_asm_config = v.into();
2843 self
2844 }
2845
2846 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
2848 mut self,
2849 v: T,
2850 ) -> Self {
2851 self.secret_manager_stored_password = v.into();
2852 self
2853 }
2854
2855 pub fn set_connection_attributes<T, K, V>(mut self, v: T) -> Self
2857 where
2858 T: std::iter::IntoIterator<Item = (K, V)>,
2859 K: std::convert::Into<std::string::String>,
2860 V: std::convert::Into<std::string::String>,
2861 {
2862 use std::iter::Iterator;
2863 self.connection_attributes = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2864 self
2865 }
2866}
2867
2868impl wkt::message::Message for OracleProfile {
2869 fn typename() -> &'static str {
2870 "type.googleapis.com/google.cloud.datastream.v1.OracleProfile"
2871 }
2872}
2873
2874#[serde_with::serde_as]
2876#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2877#[serde(default, rename_all = "camelCase")]
2878#[non_exhaustive]
2879pub struct OracleAsmConfig {
2880 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2882 pub hostname: std::string::String,
2883
2884 pub port: i32,
2886
2887 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2889 pub username: std::string::String,
2890
2891 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2894 pub password: std::string::String,
2895
2896 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2898 pub asm_service: std::string::String,
2899
2900 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2902 pub connection_attributes: std::collections::HashMap<std::string::String, std::string::String>,
2903
2904 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2906 pub oracle_ssl_config: std::option::Option<crate::model::OracleSslConfig>,
2907
2908 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2911 pub secret_manager_stored_password: std::string::String,
2912
2913 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2914 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2915}
2916
2917impl OracleAsmConfig {
2918 pub fn new() -> Self {
2919 std::default::Default::default()
2920 }
2921
2922 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2924 self.hostname = v.into();
2925 self
2926 }
2927
2928 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2930 self.port = v.into();
2931 self
2932 }
2933
2934 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2936 self.username = v.into();
2937 self
2938 }
2939
2940 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2942 self.password = v.into();
2943 self
2944 }
2945
2946 pub fn set_asm_service<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2948 self.asm_service = v.into();
2949 self
2950 }
2951
2952 pub fn set_oracle_ssl_config<
2954 T: std::convert::Into<std::option::Option<crate::model::OracleSslConfig>>,
2955 >(
2956 mut self,
2957 v: T,
2958 ) -> Self {
2959 self.oracle_ssl_config = v.into();
2960 self
2961 }
2962
2963 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
2965 mut self,
2966 v: T,
2967 ) -> Self {
2968 self.secret_manager_stored_password = v.into();
2969 self
2970 }
2971
2972 pub fn set_connection_attributes<T, K, V>(mut self, v: T) -> Self
2974 where
2975 T: std::iter::IntoIterator<Item = (K, V)>,
2976 K: std::convert::Into<std::string::String>,
2977 V: std::convert::Into<std::string::String>,
2978 {
2979 use std::iter::Iterator;
2980 self.connection_attributes = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2981 self
2982 }
2983}
2984
2985impl wkt::message::Message for OracleAsmConfig {
2986 fn typename() -> &'static str {
2987 "type.googleapis.com/google.cloud.datastream.v1.OracleAsmConfig"
2988 }
2989}
2990
2991#[serde_with::serde_as]
2993#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2994#[serde(default, rename_all = "camelCase")]
2995#[non_exhaustive]
2996pub struct MysqlProfile {
2997 #[serde(skip_serializing_if = "std::string::String::is_empty")]
2999 pub hostname: std::string::String,
3000
3001 pub port: i32,
3003
3004 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3006 pub username: std::string::String,
3007
3008 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3011 pub password: std::string::String,
3012
3013 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3015 pub ssl_config: std::option::Option<crate::model::MysqlSslConfig>,
3016
3017 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3020 pub secret_manager_stored_password: std::string::String,
3021
3022 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3023 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3024}
3025
3026impl MysqlProfile {
3027 pub fn new() -> Self {
3028 std::default::Default::default()
3029 }
3030
3031 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3033 self.hostname = v.into();
3034 self
3035 }
3036
3037 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3039 self.port = v.into();
3040 self
3041 }
3042
3043 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3045 self.username = v.into();
3046 self
3047 }
3048
3049 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3051 self.password = v.into();
3052 self
3053 }
3054
3055 pub fn set_ssl_config<
3057 T: std::convert::Into<std::option::Option<crate::model::MysqlSslConfig>>,
3058 >(
3059 mut self,
3060 v: T,
3061 ) -> Self {
3062 self.ssl_config = v.into();
3063 self
3064 }
3065
3066 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3068 mut self,
3069 v: T,
3070 ) -> Self {
3071 self.secret_manager_stored_password = v.into();
3072 self
3073 }
3074}
3075
3076impl wkt::message::Message for MysqlProfile {
3077 fn typename() -> &'static str {
3078 "type.googleapis.com/google.cloud.datastream.v1.MysqlProfile"
3079 }
3080}
3081
3082#[serde_with::serde_as]
3084#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3085#[serde(default, rename_all = "camelCase")]
3086#[non_exhaustive]
3087pub struct PostgresqlProfile {
3088 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3090 pub hostname: std::string::String,
3091
3092 pub port: i32,
3094
3095 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3097 pub username: std::string::String,
3098
3099 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3102 pub password: std::string::String,
3103
3104 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3106 pub database: std::string::String,
3107
3108 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3112 pub secret_manager_stored_password: std::string::String,
3113
3114 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3119 pub ssl_config: std::option::Option<crate::model::PostgresqlSslConfig>,
3120
3121 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3122 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3123}
3124
3125impl PostgresqlProfile {
3126 pub fn new() -> Self {
3127 std::default::Default::default()
3128 }
3129
3130 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3132 self.hostname = v.into();
3133 self
3134 }
3135
3136 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3138 self.port = v.into();
3139 self
3140 }
3141
3142 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3144 self.username = v.into();
3145 self
3146 }
3147
3148 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3150 self.password = v.into();
3151 self
3152 }
3153
3154 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3156 self.database = v.into();
3157 self
3158 }
3159
3160 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3162 mut self,
3163 v: T,
3164 ) -> Self {
3165 self.secret_manager_stored_password = v.into();
3166 self
3167 }
3168
3169 pub fn set_ssl_config<
3171 T: std::convert::Into<std::option::Option<crate::model::PostgresqlSslConfig>>,
3172 >(
3173 mut self,
3174 v: T,
3175 ) -> Self {
3176 self.ssl_config = v.into();
3177 self
3178 }
3179}
3180
3181impl wkt::message::Message for PostgresqlProfile {
3182 fn typename() -> &'static str {
3183 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlProfile"
3184 }
3185}
3186
3187#[serde_with::serde_as]
3189#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3190#[serde(default, rename_all = "camelCase")]
3191#[non_exhaustive]
3192pub struct SqlServerProfile {
3193 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3195 pub hostname: std::string::String,
3196
3197 pub port: i32,
3199
3200 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3202 pub username: std::string::String,
3203
3204 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3207 pub password: std::string::String,
3208
3209 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3211 pub database: std::string::String,
3212
3213 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3217 pub secret_manager_stored_password: std::string::String,
3218
3219 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3220 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3221}
3222
3223impl SqlServerProfile {
3224 pub fn new() -> Self {
3225 std::default::Default::default()
3226 }
3227
3228 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3230 self.hostname = v.into();
3231 self
3232 }
3233
3234 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3236 self.port = v.into();
3237 self
3238 }
3239
3240 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3242 self.username = v.into();
3243 self
3244 }
3245
3246 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3248 self.password = v.into();
3249 self
3250 }
3251
3252 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3254 self.database = v.into();
3255 self
3256 }
3257
3258 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3260 mut self,
3261 v: T,
3262 ) -> Self {
3263 self.secret_manager_stored_password = v.into();
3264 self
3265 }
3266}
3267
3268impl wkt::message::Message for SqlServerProfile {
3269 fn typename() -> &'static str {
3270 "type.googleapis.com/google.cloud.datastream.v1.SqlServerProfile"
3271 }
3272}
3273
3274#[serde_with::serde_as]
3276#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3277#[serde(default, rename_all = "camelCase")]
3278#[non_exhaustive]
3279pub struct SalesforceProfile {
3280 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3282 pub domain: std::string::String,
3283
3284 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
3286 pub credentials: std::option::Option<crate::model::salesforce_profile::Credentials>,
3287
3288 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3289 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3290}
3291
3292impl SalesforceProfile {
3293 pub fn new() -> Self {
3294 std::default::Default::default()
3295 }
3296
3297 pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3299 self.domain = v.into();
3300 self
3301 }
3302
3303 pub fn set_credentials<
3308 T: std::convert::Into<std::option::Option<crate::model::salesforce_profile::Credentials>>,
3309 >(
3310 mut self,
3311 v: T,
3312 ) -> Self {
3313 self.credentials = v.into();
3314 self
3315 }
3316
3317 pub fn user_credentials(
3321 &self,
3322 ) -> std::option::Option<&std::boxed::Box<crate::model::salesforce_profile::UserCredentials>>
3323 {
3324 #[allow(unreachable_patterns)]
3325 self.credentials.as_ref().and_then(|v| match v {
3326 crate::model::salesforce_profile::Credentials::UserCredentials(v) => {
3327 std::option::Option::Some(v)
3328 }
3329 _ => std::option::Option::None,
3330 })
3331 }
3332
3333 pub fn oauth2_client_credentials(
3337 &self,
3338 ) -> std::option::Option<
3339 &std::boxed::Box<crate::model::salesforce_profile::Oauth2ClientCredentials>,
3340 > {
3341 #[allow(unreachable_patterns)]
3342 self.credentials.as_ref().and_then(|v| match v {
3343 crate::model::salesforce_profile::Credentials::Oauth2ClientCredentials(v) => {
3344 std::option::Option::Some(v)
3345 }
3346 _ => std::option::Option::None,
3347 })
3348 }
3349
3350 pub fn set_user_credentials<
3356 T: std::convert::Into<std::boxed::Box<crate::model::salesforce_profile::UserCredentials>>,
3357 >(
3358 mut self,
3359 v: T,
3360 ) -> Self {
3361 self.credentials = std::option::Option::Some(
3362 crate::model::salesforce_profile::Credentials::UserCredentials(v.into()),
3363 );
3364 self
3365 }
3366
3367 pub fn set_oauth2_client_credentials<
3373 T: std::convert::Into<
3374 std::boxed::Box<crate::model::salesforce_profile::Oauth2ClientCredentials>,
3375 >,
3376 >(
3377 mut self,
3378 v: T,
3379 ) -> Self {
3380 self.credentials = std::option::Option::Some(
3381 crate::model::salesforce_profile::Credentials::Oauth2ClientCredentials(v.into()),
3382 );
3383 self
3384 }
3385}
3386
3387impl wkt::message::Message for SalesforceProfile {
3388 fn typename() -> &'static str {
3389 "type.googleapis.com/google.cloud.datastream.v1.SalesforceProfile"
3390 }
3391}
3392
3393pub mod salesforce_profile {
3395 #[allow(unused_imports)]
3396 use super::*;
3397
3398 #[serde_with::serde_as]
3400 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3401 #[serde(default, rename_all = "camelCase")]
3402 #[non_exhaustive]
3403 pub struct UserCredentials {
3404 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3406 pub username: std::string::String,
3407
3408 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3411 pub password: std::string::String,
3412
3413 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3416 pub security_token: std::string::String,
3417
3418 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3422 pub secret_manager_stored_password: std::string::String,
3423
3424 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3428 pub secret_manager_stored_security_token: std::string::String,
3429
3430 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3431 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3432 }
3433
3434 impl UserCredentials {
3435 pub fn new() -> Self {
3436 std::default::Default::default()
3437 }
3438
3439 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3441 self.username = v.into();
3442 self
3443 }
3444
3445 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3447 self.password = v.into();
3448 self
3449 }
3450
3451 pub fn set_security_token<T: std::convert::Into<std::string::String>>(
3453 mut self,
3454 v: T,
3455 ) -> Self {
3456 self.security_token = v.into();
3457 self
3458 }
3459
3460 pub fn set_secret_manager_stored_password<T: std::convert::Into<std::string::String>>(
3462 mut self,
3463 v: T,
3464 ) -> Self {
3465 self.secret_manager_stored_password = v.into();
3466 self
3467 }
3468
3469 pub fn set_secret_manager_stored_security_token<
3471 T: std::convert::Into<std::string::String>,
3472 >(
3473 mut self,
3474 v: T,
3475 ) -> Self {
3476 self.secret_manager_stored_security_token = v.into();
3477 self
3478 }
3479 }
3480
3481 impl wkt::message::Message for UserCredentials {
3482 fn typename() -> &'static str {
3483 "type.googleapis.com/google.cloud.datastream.v1.SalesforceProfile.UserCredentials"
3484 }
3485 }
3486
3487 #[serde_with::serde_as]
3489 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3490 #[serde(default, rename_all = "camelCase")]
3491 #[non_exhaustive]
3492 pub struct Oauth2ClientCredentials {
3493 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3495 pub client_id: std::string::String,
3496
3497 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3500 pub client_secret: std::string::String,
3501
3502 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3506 pub secret_manager_stored_client_secret: std::string::String,
3507
3508 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3509 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3510 }
3511
3512 impl Oauth2ClientCredentials {
3513 pub fn new() -> Self {
3514 std::default::Default::default()
3515 }
3516
3517 pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3519 self.client_id = v.into();
3520 self
3521 }
3522
3523 pub fn set_client_secret<T: std::convert::Into<std::string::String>>(
3525 mut self,
3526 v: T,
3527 ) -> Self {
3528 self.client_secret = v.into();
3529 self
3530 }
3531
3532 pub fn set_secret_manager_stored_client_secret<
3534 T: std::convert::Into<std::string::String>,
3535 >(
3536 mut self,
3537 v: T,
3538 ) -> Self {
3539 self.secret_manager_stored_client_secret = v.into();
3540 self
3541 }
3542 }
3543
3544 impl wkt::message::Message for Oauth2ClientCredentials {
3545 fn typename() -> &'static str {
3546 "type.googleapis.com/google.cloud.datastream.v1.SalesforceProfile.Oauth2ClientCredentials"
3547 }
3548 }
3549
3550 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3552 #[serde(rename_all = "camelCase")]
3553 #[non_exhaustive]
3554 pub enum Credentials {
3555 UserCredentials(std::boxed::Box<crate::model::salesforce_profile::UserCredentials>),
3557 Oauth2ClientCredentials(
3559 std::boxed::Box<crate::model::salesforce_profile::Oauth2ClientCredentials>,
3560 ),
3561 }
3562}
3563
3564#[serde_with::serde_as]
3566#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3567#[serde(default, rename_all = "camelCase")]
3568#[non_exhaustive]
3569pub struct GcsProfile {
3570 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3572 pub bucket: std::string::String,
3573
3574 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3576 pub root_path: std::string::String,
3577
3578 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3579 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3580}
3581
3582impl GcsProfile {
3583 pub fn new() -> Self {
3584 std::default::Default::default()
3585 }
3586
3587 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3589 self.bucket = v.into();
3590 self
3591 }
3592
3593 pub fn set_root_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3595 self.root_path = v.into();
3596 self
3597 }
3598}
3599
3600impl wkt::message::Message for GcsProfile {
3601 fn typename() -> &'static str {
3602 "type.googleapis.com/google.cloud.datastream.v1.GcsProfile"
3603 }
3604}
3605
3606#[serde_with::serde_as]
3608#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3609#[serde(default, rename_all = "camelCase")]
3610#[non_exhaustive]
3611pub struct BigQueryProfile {
3612 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3613 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3614}
3615
3616impl BigQueryProfile {
3617 pub fn new() -> Self {
3618 std::default::Default::default()
3619 }
3620}
3621
3622impl wkt::message::Message for BigQueryProfile {
3623 fn typename() -> &'static str {
3624 "type.googleapis.com/google.cloud.datastream.v1.BigQueryProfile"
3625 }
3626}
3627
3628#[serde_with::serde_as]
3632#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3633#[serde(default, rename_all = "camelCase")]
3634#[non_exhaustive]
3635pub struct StaticServiceIpConnectivity {
3636 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3637 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3638}
3639
3640impl StaticServiceIpConnectivity {
3641 pub fn new() -> Self {
3642 std::default::Default::default()
3643 }
3644}
3645
3646impl wkt::message::Message for StaticServiceIpConnectivity {
3647 fn typename() -> &'static str {
3648 "type.googleapis.com/google.cloud.datastream.v1.StaticServiceIpConnectivity"
3649 }
3650}
3651
3652#[serde_with::serde_as]
3654#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3655#[serde(default, rename_all = "camelCase")]
3656#[non_exhaustive]
3657pub struct ForwardSshTunnelConnectivity {
3658 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3660 pub hostname: std::string::String,
3661
3662 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3664 pub username: std::string::String,
3665
3666 pub port: i32,
3668
3669 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
3670 pub authentication_method:
3671 std::option::Option<crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod>,
3672
3673 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3674 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3675}
3676
3677impl ForwardSshTunnelConnectivity {
3678 pub fn new() -> Self {
3679 std::default::Default::default()
3680 }
3681
3682 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3684 self.hostname = v.into();
3685 self
3686 }
3687
3688 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3690 self.username = v.into();
3691 self
3692 }
3693
3694 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3696 self.port = v.into();
3697 self
3698 }
3699
3700 pub fn set_authentication_method<
3705 T: std::convert::Into<
3706 std::option::Option<
3707 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod,
3708 >,
3709 >,
3710 >(
3711 mut self,
3712 v: T,
3713 ) -> Self {
3714 self.authentication_method = v.into();
3715 self
3716 }
3717
3718 pub fn password(&self) -> std::option::Option<&std::string::String> {
3722 #[allow(unreachable_patterns)]
3723 self.authentication_method.as_ref().and_then(|v| match v {
3724 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::Password(v) => {
3725 std::option::Option::Some(v)
3726 }
3727 _ => std::option::Option::None,
3728 })
3729 }
3730
3731 pub fn private_key(&self) -> std::option::Option<&std::string::String> {
3735 #[allow(unreachable_patterns)]
3736 self.authentication_method.as_ref().and_then(|v| match v {
3737 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::PrivateKey(v) => {
3738 std::option::Option::Some(v)
3739 }
3740 _ => std::option::Option::None,
3741 })
3742 }
3743
3744 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3750 self.authentication_method = std::option::Option::Some(
3751 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::Password(v.into()),
3752 );
3753 self
3754 }
3755
3756 pub fn set_private_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3762 self.authentication_method = std::option::Option::Some(
3763 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::PrivateKey(
3764 v.into(),
3765 ),
3766 );
3767 self
3768 }
3769}
3770
3771impl wkt::message::Message for ForwardSshTunnelConnectivity {
3772 fn typename() -> &'static str {
3773 "type.googleapis.com/google.cloud.datastream.v1.ForwardSshTunnelConnectivity"
3774 }
3775}
3776
3777pub mod forward_ssh_tunnel_connectivity {
3779 #[allow(unused_imports)]
3780 use super::*;
3781
3782 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3783 #[serde(rename_all = "camelCase")]
3784 #[non_exhaustive]
3785 pub enum AuthenticationMethod {
3786 Password(std::string::String),
3788 PrivateKey(std::string::String),
3790 }
3791}
3792
3793#[serde_with::serde_as]
3796#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3797#[serde(default, rename_all = "camelCase")]
3798#[non_exhaustive]
3799pub struct VpcPeeringConfig {
3800 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3803 pub vpc: std::string::String,
3804
3805 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3807 pub subnet: std::string::String,
3808
3809 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3810 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3811}
3812
3813impl VpcPeeringConfig {
3814 pub fn new() -> Self {
3815 std::default::Default::default()
3816 }
3817
3818 pub fn set_vpc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3820 self.vpc = v.into();
3821 self
3822 }
3823
3824 pub fn set_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3826 self.subnet = v.into();
3827 self
3828 }
3829}
3830
3831impl wkt::message::Message for VpcPeeringConfig {
3832 fn typename() -> &'static str {
3833 "type.googleapis.com/google.cloud.datastream.v1.VpcPeeringConfig"
3834 }
3835}
3836
3837#[serde_with::serde_as]
3840#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3841#[serde(default, rename_all = "camelCase")]
3842#[non_exhaustive]
3843pub struct PrivateConnection {
3844 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3846 pub name: std::string::String,
3847
3848 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3850 pub create_time: std::option::Option<wkt::Timestamp>,
3851
3852 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3854 pub update_time: std::option::Option<wkt::Timestamp>,
3855
3856 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3858 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
3859
3860 #[serde(skip_serializing_if = "std::string::String::is_empty")]
3862 pub display_name: std::string::String,
3863
3864 pub state: crate::model::private_connection::State,
3866
3867 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3870 pub error: std::option::Option<crate::model::Error>,
3871
3872 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3874 pub satisfies_pzs: std::option::Option<bool>,
3875
3876 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3878 pub satisfies_pzi: std::option::Option<bool>,
3879
3880 #[serde(skip_serializing_if = "std::option::Option::is_none")]
3882 pub vpc_peering_config: std::option::Option<crate::model::VpcPeeringConfig>,
3883
3884 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3885 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3886}
3887
3888impl PrivateConnection {
3889 pub fn new() -> Self {
3890 std::default::Default::default()
3891 }
3892
3893 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3895 self.name = v.into();
3896 self
3897 }
3898
3899 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3901 mut self,
3902 v: T,
3903 ) -> Self {
3904 self.create_time = v.into();
3905 self
3906 }
3907
3908 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3910 mut self,
3911 v: T,
3912 ) -> Self {
3913 self.update_time = v.into();
3914 self
3915 }
3916
3917 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3919 self.display_name = v.into();
3920 self
3921 }
3922
3923 pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
3925 mut self,
3926 v: T,
3927 ) -> Self {
3928 self.state = v.into();
3929 self
3930 }
3931
3932 pub fn set_error<T: std::convert::Into<std::option::Option<crate::model::Error>>>(
3934 mut self,
3935 v: T,
3936 ) -> Self {
3937 self.error = v.into();
3938 self
3939 }
3940
3941 pub fn set_satisfies_pzs<T: std::convert::Into<std::option::Option<bool>>>(
3943 mut self,
3944 v: T,
3945 ) -> Self {
3946 self.satisfies_pzs = v.into();
3947 self
3948 }
3949
3950 pub fn set_satisfies_pzi<T: std::convert::Into<std::option::Option<bool>>>(
3952 mut self,
3953 v: T,
3954 ) -> Self {
3955 self.satisfies_pzi = v.into();
3956 self
3957 }
3958
3959 pub fn set_vpc_peering_config<
3961 T: std::convert::Into<std::option::Option<crate::model::VpcPeeringConfig>>,
3962 >(
3963 mut self,
3964 v: T,
3965 ) -> Self {
3966 self.vpc_peering_config = v.into();
3967 self
3968 }
3969
3970 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
3972 where
3973 T: std::iter::IntoIterator<Item = (K, V)>,
3974 K: std::convert::Into<std::string::String>,
3975 V: std::convert::Into<std::string::String>,
3976 {
3977 use std::iter::Iterator;
3978 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3979 self
3980 }
3981}
3982
3983impl wkt::message::Message for PrivateConnection {
3984 fn typename() -> &'static str {
3985 "type.googleapis.com/google.cloud.datastream.v1.PrivateConnection"
3986 }
3987}
3988
3989pub mod private_connection {
3991 #[allow(unused_imports)]
3992 use super::*;
3993
3994 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
3996 pub struct State(i32);
3997
3998 impl State {
3999 pub const STATE_UNSPECIFIED: State = State::new(0);
4001
4002 pub const CREATING: State = State::new(1);
4004
4005 pub const CREATED: State = State::new(2);
4007
4008 pub const FAILED: State = State::new(3);
4010
4011 pub const DELETING: State = State::new(4);
4013
4014 pub const FAILED_TO_DELETE: State = State::new(5);
4016
4017 pub(crate) const fn new(value: i32) -> Self {
4019 Self(value)
4020 }
4021
4022 pub fn value(&self) -> i32 {
4024 self.0
4025 }
4026
4027 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
4029 match self.0 {
4030 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
4031 1 => std::borrow::Cow::Borrowed("CREATING"),
4032 2 => std::borrow::Cow::Borrowed("CREATED"),
4033 3 => std::borrow::Cow::Borrowed("FAILED"),
4034 4 => std::borrow::Cow::Borrowed("DELETING"),
4035 5 => std::borrow::Cow::Borrowed("FAILED_TO_DELETE"),
4036 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
4037 }
4038 }
4039
4040 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
4042 match name {
4043 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
4044 "CREATING" => std::option::Option::Some(Self::CREATING),
4045 "CREATED" => std::option::Option::Some(Self::CREATED),
4046 "FAILED" => std::option::Option::Some(Self::FAILED),
4047 "DELETING" => std::option::Option::Some(Self::DELETING),
4048 "FAILED_TO_DELETE" => std::option::Option::Some(Self::FAILED_TO_DELETE),
4049 _ => std::option::Option::None,
4050 }
4051 }
4052 }
4053
4054 impl std::convert::From<i32> for State {
4055 fn from(value: i32) -> Self {
4056 Self::new(value)
4057 }
4058 }
4059
4060 impl std::default::Default for State {
4061 fn default() -> Self {
4062 Self::new(0)
4063 }
4064 }
4065}
4066
4067#[serde_with::serde_as]
4069#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4070#[serde(default, rename_all = "camelCase")]
4071#[non_exhaustive]
4072pub struct PrivateConnectivity {
4073 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4076 pub private_connection: std::string::String,
4077
4078 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4079 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4080}
4081
4082impl PrivateConnectivity {
4083 pub fn new() -> Self {
4084 std::default::Default::default()
4085 }
4086
4087 pub fn set_private_connection<T: std::convert::Into<std::string::String>>(
4089 mut self,
4090 v: T,
4091 ) -> Self {
4092 self.private_connection = v.into();
4093 self
4094 }
4095}
4096
4097impl wkt::message::Message for PrivateConnectivity {
4098 fn typename() -> &'static str {
4099 "type.googleapis.com/google.cloud.datastream.v1.PrivateConnectivity"
4100 }
4101}
4102
4103#[serde_with::serde_as]
4106#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4107#[serde(default, rename_all = "camelCase")]
4108#[non_exhaustive]
4109pub struct Route {
4110 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4112 pub name: std::string::String,
4113
4114 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4116 pub create_time: std::option::Option<wkt::Timestamp>,
4117
4118 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4120 pub update_time: std::option::Option<wkt::Timestamp>,
4121
4122 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
4124 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4125
4126 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4128 pub display_name: std::string::String,
4129
4130 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4132 pub destination_address: std::string::String,
4133
4134 pub destination_port: i32,
4136
4137 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4138 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4139}
4140
4141impl Route {
4142 pub fn new() -> Self {
4143 std::default::Default::default()
4144 }
4145
4146 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4148 self.name = v.into();
4149 self
4150 }
4151
4152 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4154 mut self,
4155 v: T,
4156 ) -> Self {
4157 self.create_time = v.into();
4158 self
4159 }
4160
4161 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4163 mut self,
4164 v: T,
4165 ) -> Self {
4166 self.update_time = v.into();
4167 self
4168 }
4169
4170 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4172 self.display_name = v.into();
4173 self
4174 }
4175
4176 pub fn set_destination_address<T: std::convert::Into<std::string::String>>(
4178 mut self,
4179 v: T,
4180 ) -> Self {
4181 self.destination_address = v.into();
4182 self
4183 }
4184
4185 pub fn set_destination_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4187 self.destination_port = v.into();
4188 self
4189 }
4190
4191 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4193 where
4194 T: std::iter::IntoIterator<Item = (K, V)>,
4195 K: std::convert::Into<std::string::String>,
4196 V: std::convert::Into<std::string::String>,
4197 {
4198 use std::iter::Iterator;
4199 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4200 self
4201 }
4202}
4203
4204impl wkt::message::Message for Route {
4205 fn typename() -> &'static str {
4206 "type.googleapis.com/google.cloud.datastream.v1.Route"
4207 }
4208}
4209
4210#[serde_with::serde_as]
4212#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4213#[serde(default, rename_all = "camelCase")]
4214#[non_exhaustive]
4215pub struct MysqlSslConfig {
4216 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4220 pub client_key: std::string::String,
4221
4222 pub client_key_set: bool,
4224
4225 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4230 pub client_certificate: std::string::String,
4231
4232 pub client_certificate_set: bool,
4234
4235 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4238 pub ca_certificate: std::string::String,
4239
4240 pub ca_certificate_set: bool,
4242
4243 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4244 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4245}
4246
4247impl MysqlSslConfig {
4248 pub fn new() -> Self {
4249 std::default::Default::default()
4250 }
4251
4252 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4254 self.client_key = v.into();
4255 self
4256 }
4257
4258 pub fn set_client_key_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4260 self.client_key_set = v.into();
4261 self
4262 }
4263
4264 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
4266 mut self,
4267 v: T,
4268 ) -> Self {
4269 self.client_certificate = v.into();
4270 self
4271 }
4272
4273 pub fn set_client_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4275 self.client_certificate_set = v.into();
4276 self
4277 }
4278
4279 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4281 self.ca_certificate = v.into();
4282 self
4283 }
4284
4285 pub fn set_ca_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4287 self.ca_certificate_set = v.into();
4288 self
4289 }
4290}
4291
4292impl wkt::message::Message for MysqlSslConfig {
4293 fn typename() -> &'static str {
4294 "type.googleapis.com/google.cloud.datastream.v1.MysqlSslConfig"
4295 }
4296}
4297
4298#[serde_with::serde_as]
4300#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4301#[serde(default, rename_all = "camelCase")]
4302#[non_exhaustive]
4303pub struct OracleSslConfig {
4304 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4307 pub ca_certificate: std::string::String,
4308
4309 pub ca_certificate_set: bool,
4312
4313 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4314 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4315}
4316
4317impl OracleSslConfig {
4318 pub fn new() -> Self {
4319 std::default::Default::default()
4320 }
4321
4322 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4324 self.ca_certificate = v.into();
4325 self
4326 }
4327
4328 pub fn set_ca_certificate_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4330 self.ca_certificate_set = v.into();
4331 self
4332 }
4333}
4334
4335impl wkt::message::Message for OracleSslConfig {
4336 fn typename() -> &'static str {
4337 "type.googleapis.com/google.cloud.datastream.v1.OracleSslConfig"
4338 }
4339}
4340
4341#[serde_with::serde_as]
4343#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4344#[serde(default, rename_all = "camelCase")]
4345#[non_exhaustive]
4346pub struct PostgresqlSslConfig {
4347 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
4352 pub encryption_setting:
4353 std::option::Option<crate::model::postgresql_ssl_config::EncryptionSetting>,
4354
4355 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4356 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4357}
4358
4359impl PostgresqlSslConfig {
4360 pub fn new() -> Self {
4361 std::default::Default::default()
4362 }
4363
4364 pub fn set_encryption_setting<
4369 T: std::convert::Into<
4370 std::option::Option<crate::model::postgresql_ssl_config::EncryptionSetting>,
4371 >,
4372 >(
4373 mut self,
4374 v: T,
4375 ) -> Self {
4376 self.encryption_setting = v.into();
4377 self
4378 }
4379
4380 pub fn server_verification(
4384 &self,
4385 ) -> std::option::Option<
4386 &std::boxed::Box<crate::model::postgresql_ssl_config::ServerVerification>,
4387 > {
4388 #[allow(unreachable_patterns)]
4389 self.encryption_setting.as_ref().and_then(|v| match v {
4390 crate::model::postgresql_ssl_config::EncryptionSetting::ServerVerification(v) => {
4391 std::option::Option::Some(v)
4392 }
4393 _ => std::option::Option::None,
4394 })
4395 }
4396
4397 pub fn server_and_client_verification(
4401 &self,
4402 ) -> std::option::Option<
4403 &std::boxed::Box<crate::model::postgresql_ssl_config::ServerAndClientVerification>,
4404 > {
4405 #[allow(unreachable_patterns)]
4406 self.encryption_setting.as_ref().and_then(|v| match v {
4407 crate::model::postgresql_ssl_config::EncryptionSetting::ServerAndClientVerification(
4408 v,
4409 ) => std::option::Option::Some(v),
4410 _ => std::option::Option::None,
4411 })
4412 }
4413
4414 pub fn set_server_verification<
4420 T: std::convert::Into<
4421 std::boxed::Box<crate::model::postgresql_ssl_config::ServerVerification>,
4422 >,
4423 >(
4424 mut self,
4425 v: T,
4426 ) -> Self {
4427 self.encryption_setting = std::option::Option::Some(
4428 crate::model::postgresql_ssl_config::EncryptionSetting::ServerVerification(v.into()),
4429 );
4430 self
4431 }
4432
4433 pub fn set_server_and_client_verification<
4439 T: std::convert::Into<
4440 std::boxed::Box<crate::model::postgresql_ssl_config::ServerAndClientVerification>,
4441 >,
4442 >(
4443 mut self,
4444 v: T,
4445 ) -> Self {
4446 self.encryption_setting = std::option::Option::Some(
4447 crate::model::postgresql_ssl_config::EncryptionSetting::ServerAndClientVerification(
4448 v.into(),
4449 ),
4450 );
4451 self
4452 }
4453}
4454
4455impl wkt::message::Message for PostgresqlSslConfig {
4456 fn typename() -> &'static str {
4457 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSslConfig"
4458 }
4459}
4460
4461pub mod postgresql_ssl_config {
4463 #[allow(unused_imports)]
4464 use super::*;
4465
4466 #[serde_with::serde_as]
4470 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4471 #[serde(default, rename_all = "camelCase")]
4472 #[non_exhaustive]
4473 pub struct ServerVerification {
4474 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4476 pub ca_certificate: std::string::String,
4477
4478 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4479 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4480 }
4481
4482 impl ServerVerification {
4483 pub fn new() -> Self {
4484 std::default::Default::default()
4485 }
4486
4487 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(
4489 mut self,
4490 v: T,
4491 ) -> Self {
4492 self.ca_certificate = v.into();
4493 self
4494 }
4495 }
4496
4497 impl wkt::message::Message for ServerVerification {
4498 fn typename() -> &'static str {
4499 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSslConfig.ServerVerification"
4500 }
4501 }
4502
4503 #[serde_with::serde_as]
4508 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4509 #[serde(default, rename_all = "camelCase")]
4510 #[non_exhaustive]
4511 pub struct ServerAndClientVerification {
4512 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4519 pub client_certificate: std::string::String,
4520
4521 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4526 pub client_key: std::string::String,
4527
4528 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4530 pub ca_certificate: std::string::String,
4531
4532 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4533 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4534 }
4535
4536 impl ServerAndClientVerification {
4537 pub fn new() -> Self {
4538 std::default::Default::default()
4539 }
4540
4541 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
4543 mut self,
4544 v: T,
4545 ) -> Self {
4546 self.client_certificate = v.into();
4547 self
4548 }
4549
4550 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4552 self.client_key = v.into();
4553 self
4554 }
4555
4556 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(
4558 mut self,
4559 v: T,
4560 ) -> Self {
4561 self.ca_certificate = v.into();
4562 self
4563 }
4564 }
4565
4566 impl wkt::message::Message for ServerAndClientVerification {
4567 fn typename() -> &'static str {
4568 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification"
4569 }
4570 }
4571
4572 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
4577 #[serde(rename_all = "camelCase")]
4578 #[non_exhaustive]
4579 pub enum EncryptionSetting {
4580 ServerVerification(
4583 std::boxed::Box<crate::model::postgresql_ssl_config::ServerVerification>,
4584 ),
4585 ServerAndClientVerification(
4589 std::boxed::Box<crate::model::postgresql_ssl_config::ServerAndClientVerification>,
4590 ),
4591 }
4592}
4593
4594#[serde_with::serde_as]
4597#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4598#[serde(default, rename_all = "camelCase")]
4599#[non_exhaustive]
4600pub struct ConnectionProfile {
4601 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4603 pub name: std::string::String,
4604
4605 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4607 pub create_time: std::option::Option<wkt::Timestamp>,
4608
4609 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4611 pub update_time: std::option::Option<wkt::Timestamp>,
4612
4613 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
4615 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
4616
4617 #[serde(skip_serializing_if = "std::string::String::is_empty")]
4619 pub display_name: std::string::String,
4620
4621 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4623 pub satisfies_pzs: std::option::Option<bool>,
4624
4625 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4627 pub satisfies_pzi: std::option::Option<bool>,
4628
4629 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
4631 pub profile: std::option::Option<crate::model::connection_profile::Profile>,
4632
4633 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
4635 pub connectivity: std::option::Option<crate::model::connection_profile::Connectivity>,
4636
4637 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4638 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4639}
4640
4641impl ConnectionProfile {
4642 pub fn new() -> Self {
4643 std::default::Default::default()
4644 }
4645
4646 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4648 self.name = v.into();
4649 self
4650 }
4651
4652 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4654 mut self,
4655 v: T,
4656 ) -> Self {
4657 self.create_time = v.into();
4658 self
4659 }
4660
4661 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4663 mut self,
4664 v: T,
4665 ) -> Self {
4666 self.update_time = v.into();
4667 self
4668 }
4669
4670 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4672 self.display_name = v.into();
4673 self
4674 }
4675
4676 pub fn set_satisfies_pzs<T: std::convert::Into<std::option::Option<bool>>>(
4678 mut self,
4679 v: T,
4680 ) -> Self {
4681 self.satisfies_pzs = v.into();
4682 self
4683 }
4684
4685 pub fn set_satisfies_pzi<T: std::convert::Into<std::option::Option<bool>>>(
4687 mut self,
4688 v: T,
4689 ) -> Self {
4690 self.satisfies_pzi = v.into();
4691 self
4692 }
4693
4694 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
4696 where
4697 T: std::iter::IntoIterator<Item = (K, V)>,
4698 K: std::convert::Into<std::string::String>,
4699 V: std::convert::Into<std::string::String>,
4700 {
4701 use std::iter::Iterator;
4702 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4703 self
4704 }
4705
4706 pub fn set_profile<
4711 T: std::convert::Into<std::option::Option<crate::model::connection_profile::Profile>>,
4712 >(
4713 mut self,
4714 v: T,
4715 ) -> Self {
4716 self.profile = v.into();
4717 self
4718 }
4719
4720 pub fn oracle_profile(
4724 &self,
4725 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleProfile>> {
4726 #[allow(unreachable_patterns)]
4727 self.profile.as_ref().and_then(|v| match v {
4728 crate::model::connection_profile::Profile::OracleProfile(v) => {
4729 std::option::Option::Some(v)
4730 }
4731 _ => std::option::Option::None,
4732 })
4733 }
4734
4735 pub fn gcs_profile(&self) -> std::option::Option<&std::boxed::Box<crate::model::GcsProfile>> {
4739 #[allow(unreachable_patterns)]
4740 self.profile.as_ref().and_then(|v| match v {
4741 crate::model::connection_profile::Profile::GcsProfile(v) => {
4742 std::option::Option::Some(v)
4743 }
4744 _ => std::option::Option::None,
4745 })
4746 }
4747
4748 pub fn mysql_profile(
4752 &self,
4753 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlProfile>> {
4754 #[allow(unreachable_patterns)]
4755 self.profile.as_ref().and_then(|v| match v {
4756 crate::model::connection_profile::Profile::MysqlProfile(v) => {
4757 std::option::Option::Some(v)
4758 }
4759 _ => std::option::Option::None,
4760 })
4761 }
4762
4763 pub fn bigquery_profile(
4767 &self,
4768 ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryProfile>> {
4769 #[allow(unreachable_patterns)]
4770 self.profile.as_ref().and_then(|v| match v {
4771 crate::model::connection_profile::Profile::BigqueryProfile(v) => {
4772 std::option::Option::Some(v)
4773 }
4774 _ => std::option::Option::None,
4775 })
4776 }
4777
4778 pub fn postgresql_profile(
4782 &self,
4783 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlProfile>> {
4784 #[allow(unreachable_patterns)]
4785 self.profile.as_ref().and_then(|v| match v {
4786 crate::model::connection_profile::Profile::PostgresqlProfile(v) => {
4787 std::option::Option::Some(v)
4788 }
4789 _ => std::option::Option::None,
4790 })
4791 }
4792
4793 pub fn sql_server_profile(
4797 &self,
4798 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerProfile>> {
4799 #[allow(unreachable_patterns)]
4800 self.profile.as_ref().and_then(|v| match v {
4801 crate::model::connection_profile::Profile::SqlServerProfile(v) => {
4802 std::option::Option::Some(v)
4803 }
4804 _ => std::option::Option::None,
4805 })
4806 }
4807
4808 pub fn salesforce_profile(
4812 &self,
4813 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceProfile>> {
4814 #[allow(unreachable_patterns)]
4815 self.profile.as_ref().and_then(|v| match v {
4816 crate::model::connection_profile::Profile::SalesforceProfile(v) => {
4817 std::option::Option::Some(v)
4818 }
4819 _ => std::option::Option::None,
4820 })
4821 }
4822
4823 pub fn set_oracle_profile<
4829 T: std::convert::Into<std::boxed::Box<crate::model::OracleProfile>>,
4830 >(
4831 mut self,
4832 v: T,
4833 ) -> Self {
4834 self.profile = std::option::Option::Some(
4835 crate::model::connection_profile::Profile::OracleProfile(v.into()),
4836 );
4837 self
4838 }
4839
4840 pub fn set_gcs_profile<T: std::convert::Into<std::boxed::Box<crate::model::GcsProfile>>>(
4846 mut self,
4847 v: T,
4848 ) -> Self {
4849 self.profile = std::option::Option::Some(
4850 crate::model::connection_profile::Profile::GcsProfile(v.into()),
4851 );
4852 self
4853 }
4854
4855 pub fn set_mysql_profile<T: std::convert::Into<std::boxed::Box<crate::model::MysqlProfile>>>(
4861 mut self,
4862 v: T,
4863 ) -> Self {
4864 self.profile = std::option::Option::Some(
4865 crate::model::connection_profile::Profile::MysqlProfile(v.into()),
4866 );
4867 self
4868 }
4869
4870 pub fn set_bigquery_profile<
4876 T: std::convert::Into<std::boxed::Box<crate::model::BigQueryProfile>>,
4877 >(
4878 mut self,
4879 v: T,
4880 ) -> Self {
4881 self.profile = std::option::Option::Some(
4882 crate::model::connection_profile::Profile::BigqueryProfile(v.into()),
4883 );
4884 self
4885 }
4886
4887 pub fn set_postgresql_profile<
4893 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlProfile>>,
4894 >(
4895 mut self,
4896 v: T,
4897 ) -> Self {
4898 self.profile = std::option::Option::Some(
4899 crate::model::connection_profile::Profile::PostgresqlProfile(v.into()),
4900 );
4901 self
4902 }
4903
4904 pub fn set_sql_server_profile<
4910 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerProfile>>,
4911 >(
4912 mut self,
4913 v: T,
4914 ) -> Self {
4915 self.profile = std::option::Option::Some(
4916 crate::model::connection_profile::Profile::SqlServerProfile(v.into()),
4917 );
4918 self
4919 }
4920
4921 pub fn set_salesforce_profile<
4927 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceProfile>>,
4928 >(
4929 mut self,
4930 v: T,
4931 ) -> Self {
4932 self.profile = std::option::Option::Some(
4933 crate::model::connection_profile::Profile::SalesforceProfile(v.into()),
4934 );
4935 self
4936 }
4937
4938 pub fn set_connectivity<
4943 T: std::convert::Into<std::option::Option<crate::model::connection_profile::Connectivity>>,
4944 >(
4945 mut self,
4946 v: T,
4947 ) -> Self {
4948 self.connectivity = v.into();
4949 self
4950 }
4951
4952 pub fn static_service_ip_connectivity(
4956 &self,
4957 ) -> std::option::Option<&std::boxed::Box<crate::model::StaticServiceIpConnectivity>> {
4958 #[allow(unreachable_patterns)]
4959 self.connectivity.as_ref().and_then(|v| match v {
4960 crate::model::connection_profile::Connectivity::StaticServiceIpConnectivity(v) => {
4961 std::option::Option::Some(v)
4962 }
4963 _ => std::option::Option::None,
4964 })
4965 }
4966
4967 pub fn forward_ssh_connectivity(
4971 &self,
4972 ) -> std::option::Option<&std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>> {
4973 #[allow(unreachable_patterns)]
4974 self.connectivity.as_ref().and_then(|v| match v {
4975 crate::model::connection_profile::Connectivity::ForwardSshConnectivity(v) => {
4976 std::option::Option::Some(v)
4977 }
4978 _ => std::option::Option::None,
4979 })
4980 }
4981
4982 pub fn private_connectivity(
4986 &self,
4987 ) -> std::option::Option<&std::boxed::Box<crate::model::PrivateConnectivity>> {
4988 #[allow(unreachable_patterns)]
4989 self.connectivity.as_ref().and_then(|v| match v {
4990 crate::model::connection_profile::Connectivity::PrivateConnectivity(v) => {
4991 std::option::Option::Some(v)
4992 }
4993 _ => std::option::Option::None,
4994 })
4995 }
4996
4997 pub fn set_static_service_ip_connectivity<
5003 T: std::convert::Into<std::boxed::Box<crate::model::StaticServiceIpConnectivity>>,
5004 >(
5005 mut self,
5006 v: T,
5007 ) -> Self {
5008 self.connectivity = std::option::Option::Some(
5009 crate::model::connection_profile::Connectivity::StaticServiceIpConnectivity(v.into()),
5010 );
5011 self
5012 }
5013
5014 pub fn set_forward_ssh_connectivity<
5020 T: std::convert::Into<std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>>,
5021 >(
5022 mut self,
5023 v: T,
5024 ) -> Self {
5025 self.connectivity = std::option::Option::Some(
5026 crate::model::connection_profile::Connectivity::ForwardSshConnectivity(v.into()),
5027 );
5028 self
5029 }
5030
5031 pub fn set_private_connectivity<
5037 T: std::convert::Into<std::boxed::Box<crate::model::PrivateConnectivity>>,
5038 >(
5039 mut self,
5040 v: T,
5041 ) -> Self {
5042 self.connectivity = std::option::Option::Some(
5043 crate::model::connection_profile::Connectivity::PrivateConnectivity(v.into()),
5044 );
5045 self
5046 }
5047}
5048
5049impl wkt::message::Message for ConnectionProfile {
5050 fn typename() -> &'static str {
5051 "type.googleapis.com/google.cloud.datastream.v1.ConnectionProfile"
5052 }
5053}
5054
5055pub mod connection_profile {
5057 #[allow(unused_imports)]
5058 use super::*;
5059
5060 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5062 #[serde(rename_all = "camelCase")]
5063 #[non_exhaustive]
5064 pub enum Profile {
5065 OracleProfile(std::boxed::Box<crate::model::OracleProfile>),
5067 GcsProfile(std::boxed::Box<crate::model::GcsProfile>),
5069 MysqlProfile(std::boxed::Box<crate::model::MysqlProfile>),
5071 BigqueryProfile(std::boxed::Box<crate::model::BigQueryProfile>),
5073 PostgresqlProfile(std::boxed::Box<crate::model::PostgresqlProfile>),
5075 SqlServerProfile(std::boxed::Box<crate::model::SqlServerProfile>),
5077 SalesforceProfile(std::boxed::Box<crate::model::SalesforceProfile>),
5079 }
5080
5081 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5083 #[serde(rename_all = "camelCase")]
5084 #[non_exhaustive]
5085 pub enum Connectivity {
5086 StaticServiceIpConnectivity(std::boxed::Box<crate::model::StaticServiceIpConnectivity>),
5088 ForwardSshConnectivity(std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>),
5090 PrivateConnectivity(std::boxed::Box<crate::model::PrivateConnectivity>),
5092 }
5093}
5094
5095#[serde_with::serde_as]
5097#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5098#[serde(default, rename_all = "camelCase")]
5099#[non_exhaustive]
5100pub struct OracleColumn {
5101 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5103 pub column: std::string::String,
5104
5105 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5107 pub data_type: std::string::String,
5108
5109 pub length: i32,
5111
5112 pub precision: i32,
5114
5115 pub scale: i32,
5117
5118 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5120 pub encoding: std::string::String,
5121
5122 pub primary_key: bool,
5124
5125 pub nullable: bool,
5127
5128 pub ordinal_position: i32,
5130
5131 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5132 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5133}
5134
5135impl OracleColumn {
5136 pub fn new() -> Self {
5137 std::default::Default::default()
5138 }
5139
5140 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5142 self.column = v.into();
5143 self
5144 }
5145
5146 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5148 self.data_type = v.into();
5149 self
5150 }
5151
5152 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5154 self.length = v.into();
5155 self
5156 }
5157
5158 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5160 self.precision = v.into();
5161 self
5162 }
5163
5164 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5166 self.scale = v.into();
5167 self
5168 }
5169
5170 pub fn set_encoding<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5172 self.encoding = v.into();
5173 self
5174 }
5175
5176 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5178 self.primary_key = v.into();
5179 self
5180 }
5181
5182 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5184 self.nullable = v.into();
5185 self
5186 }
5187
5188 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5190 self.ordinal_position = v.into();
5191 self
5192 }
5193}
5194
5195impl wkt::message::Message for OracleColumn {
5196 fn typename() -> &'static str {
5197 "type.googleapis.com/google.cloud.datastream.v1.OracleColumn"
5198 }
5199}
5200
5201#[serde_with::serde_as]
5203#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5204#[serde(default, rename_all = "camelCase")]
5205#[non_exhaustive]
5206pub struct OracleTable {
5207 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5209 pub table: std::string::String,
5210
5211 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5215 pub oracle_columns: std::vec::Vec<crate::model::OracleColumn>,
5216
5217 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5218 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5219}
5220
5221impl OracleTable {
5222 pub fn new() -> Self {
5223 std::default::Default::default()
5224 }
5225
5226 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5228 self.table = v.into();
5229 self
5230 }
5231
5232 pub fn set_oracle_columns<T, V>(mut self, v: T) -> Self
5234 where
5235 T: std::iter::IntoIterator<Item = V>,
5236 V: std::convert::Into<crate::model::OracleColumn>,
5237 {
5238 use std::iter::Iterator;
5239 self.oracle_columns = v.into_iter().map(|i| i.into()).collect();
5240 self
5241 }
5242}
5243
5244impl wkt::message::Message for OracleTable {
5245 fn typename() -> &'static str {
5246 "type.googleapis.com/google.cloud.datastream.v1.OracleTable"
5247 }
5248}
5249
5250#[serde_with::serde_as]
5252#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5253#[serde(default, rename_all = "camelCase")]
5254#[non_exhaustive]
5255pub struct OracleSchema {
5256 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5258 pub schema: std::string::String,
5259
5260 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5262 pub oracle_tables: std::vec::Vec<crate::model::OracleTable>,
5263
5264 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5265 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5266}
5267
5268impl OracleSchema {
5269 pub fn new() -> Self {
5270 std::default::Default::default()
5271 }
5272
5273 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5275 self.schema = v.into();
5276 self
5277 }
5278
5279 pub fn set_oracle_tables<T, V>(mut self, v: T) -> Self
5281 where
5282 T: std::iter::IntoIterator<Item = V>,
5283 V: std::convert::Into<crate::model::OracleTable>,
5284 {
5285 use std::iter::Iterator;
5286 self.oracle_tables = v.into_iter().map(|i| i.into()).collect();
5287 self
5288 }
5289}
5290
5291impl wkt::message::Message for OracleSchema {
5292 fn typename() -> &'static str {
5293 "type.googleapis.com/google.cloud.datastream.v1.OracleSchema"
5294 }
5295}
5296
5297#[serde_with::serde_as]
5299#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5300#[serde(default, rename_all = "camelCase")]
5301#[non_exhaustive]
5302pub struct OracleRdbms {
5303 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5305 pub oracle_schemas: std::vec::Vec<crate::model::OracleSchema>,
5306
5307 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5308 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5309}
5310
5311impl OracleRdbms {
5312 pub fn new() -> Self {
5313 std::default::Default::default()
5314 }
5315
5316 pub fn set_oracle_schemas<T, V>(mut self, v: T) -> Self
5318 where
5319 T: std::iter::IntoIterator<Item = V>,
5320 V: std::convert::Into<crate::model::OracleSchema>,
5321 {
5322 use std::iter::Iterator;
5323 self.oracle_schemas = v.into_iter().map(|i| i.into()).collect();
5324 self
5325 }
5326}
5327
5328impl wkt::message::Message for OracleRdbms {
5329 fn typename() -> &'static str {
5330 "type.googleapis.com/google.cloud.datastream.v1.OracleRdbms"
5331 }
5332}
5333
5334#[serde_with::serde_as]
5336#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5337#[serde(default, rename_all = "camelCase")]
5338#[non_exhaustive]
5339pub struct OracleSourceConfig {
5340 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5342 pub include_objects: std::option::Option<crate::model::OracleRdbms>,
5343
5344 #[serde(skip_serializing_if = "std::option::Option::is_none")]
5346 pub exclude_objects: std::option::Option<crate::model::OracleRdbms>,
5347
5348 pub max_concurrent_cdc_tasks: i32,
5351
5352 pub max_concurrent_backfill_tasks: i32,
5355
5356 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
5358 pub large_objects_handling:
5359 std::option::Option<crate::model::oracle_source_config::LargeObjectsHandling>,
5360
5361 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
5363 pub cdc_method: std::option::Option<crate::model::oracle_source_config::CdcMethod>,
5364
5365 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5366 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5367}
5368
5369impl OracleSourceConfig {
5370 pub fn new() -> Self {
5371 std::default::Default::default()
5372 }
5373
5374 pub fn set_include_objects<
5376 T: std::convert::Into<std::option::Option<crate::model::OracleRdbms>>,
5377 >(
5378 mut self,
5379 v: T,
5380 ) -> Self {
5381 self.include_objects = v.into();
5382 self
5383 }
5384
5385 pub fn set_exclude_objects<
5387 T: std::convert::Into<std::option::Option<crate::model::OracleRdbms>>,
5388 >(
5389 mut self,
5390 v: T,
5391 ) -> Self {
5392 self.exclude_objects = v.into();
5393 self
5394 }
5395
5396 pub fn set_max_concurrent_cdc_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5398 self.max_concurrent_cdc_tasks = v.into();
5399 self
5400 }
5401
5402 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5404 self.max_concurrent_backfill_tasks = v.into();
5405 self
5406 }
5407
5408 pub fn set_large_objects_handling<
5413 T: std::convert::Into<
5414 std::option::Option<crate::model::oracle_source_config::LargeObjectsHandling>,
5415 >,
5416 >(
5417 mut self,
5418 v: T,
5419 ) -> Self {
5420 self.large_objects_handling = v.into();
5421 self
5422 }
5423
5424 pub fn drop_large_objects(
5428 &self,
5429 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::DropLargeObjects>>
5430 {
5431 #[allow(unreachable_patterns)]
5432 self.large_objects_handling.as_ref().and_then(|v| match v {
5433 crate::model::oracle_source_config::LargeObjectsHandling::DropLargeObjects(v) => {
5434 std::option::Option::Some(v)
5435 }
5436 _ => std::option::Option::None,
5437 })
5438 }
5439
5440 pub fn stream_large_objects(
5444 &self,
5445 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::StreamLargeObjects>>
5446 {
5447 #[allow(unreachable_patterns)]
5448 self.large_objects_handling.as_ref().and_then(|v| match v {
5449 crate::model::oracle_source_config::LargeObjectsHandling::StreamLargeObjects(v) => {
5450 std::option::Option::Some(v)
5451 }
5452 _ => std::option::Option::None,
5453 })
5454 }
5455
5456 pub fn set_drop_large_objects<
5462 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::DropLargeObjects>>,
5463 >(
5464 mut self,
5465 v: T,
5466 ) -> Self {
5467 self.large_objects_handling = std::option::Option::Some(
5468 crate::model::oracle_source_config::LargeObjectsHandling::DropLargeObjects(v.into()),
5469 );
5470 self
5471 }
5472
5473 pub fn set_stream_large_objects<
5479 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::StreamLargeObjects>>,
5480 >(
5481 mut self,
5482 v: T,
5483 ) -> Self {
5484 self.large_objects_handling = std::option::Option::Some(
5485 crate::model::oracle_source_config::LargeObjectsHandling::StreamLargeObjects(v.into()),
5486 );
5487 self
5488 }
5489
5490 pub fn set_cdc_method<
5495 T: std::convert::Into<std::option::Option<crate::model::oracle_source_config::CdcMethod>>,
5496 >(
5497 mut self,
5498 v: T,
5499 ) -> Self {
5500 self.cdc_method = v.into();
5501 self
5502 }
5503
5504 pub fn log_miner(
5508 &self,
5509 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::LogMiner>> {
5510 #[allow(unreachable_patterns)]
5511 self.cdc_method.as_ref().and_then(|v| match v {
5512 crate::model::oracle_source_config::CdcMethod::LogMiner(v) => {
5513 std::option::Option::Some(v)
5514 }
5515 _ => std::option::Option::None,
5516 })
5517 }
5518
5519 pub fn binary_log_parser(
5523 &self,
5524 ) -> std::option::Option<&std::boxed::Box<crate::model::oracle_source_config::BinaryLogParser>>
5525 {
5526 #[allow(unreachable_patterns)]
5527 self.cdc_method.as_ref().and_then(|v| match v {
5528 crate::model::oracle_source_config::CdcMethod::BinaryLogParser(v) => {
5529 std::option::Option::Some(v)
5530 }
5531 _ => std::option::Option::None,
5532 })
5533 }
5534
5535 pub fn set_log_miner<
5541 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::LogMiner>>,
5542 >(
5543 mut self,
5544 v: T,
5545 ) -> Self {
5546 self.cdc_method = std::option::Option::Some(
5547 crate::model::oracle_source_config::CdcMethod::LogMiner(v.into()),
5548 );
5549 self
5550 }
5551
5552 pub fn set_binary_log_parser<
5558 T: std::convert::Into<std::boxed::Box<crate::model::oracle_source_config::BinaryLogParser>>,
5559 >(
5560 mut self,
5561 v: T,
5562 ) -> Self {
5563 self.cdc_method = std::option::Option::Some(
5564 crate::model::oracle_source_config::CdcMethod::BinaryLogParser(v.into()),
5565 );
5566 self
5567 }
5568}
5569
5570impl wkt::message::Message for OracleSourceConfig {
5571 fn typename() -> &'static str {
5572 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig"
5573 }
5574}
5575
5576pub mod oracle_source_config {
5578 #[allow(unused_imports)]
5579 use super::*;
5580
5581 #[serde_with::serde_as]
5583 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5584 #[serde(default, rename_all = "camelCase")]
5585 #[non_exhaustive]
5586 pub struct DropLargeObjects {
5587 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5588 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5589 }
5590
5591 impl DropLargeObjects {
5592 pub fn new() -> Self {
5593 std::default::Default::default()
5594 }
5595 }
5596
5597 impl wkt::message::Message for DropLargeObjects {
5598 fn typename() -> &'static str {
5599 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects"
5600 }
5601 }
5602
5603 #[serde_with::serde_as]
5605 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5606 #[serde(default, rename_all = "camelCase")]
5607 #[non_exhaustive]
5608 pub struct StreamLargeObjects {
5609 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5610 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5611 }
5612
5613 impl StreamLargeObjects {
5614 pub fn new() -> Self {
5615 std::default::Default::default()
5616 }
5617 }
5618
5619 impl wkt::message::Message for StreamLargeObjects {
5620 fn typename() -> &'static str {
5621 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects"
5622 }
5623 }
5624
5625 #[serde_with::serde_as]
5627 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5628 #[serde(default, rename_all = "camelCase")]
5629 #[non_exhaustive]
5630 pub struct LogMiner {
5631 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5632 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5633 }
5634
5635 impl LogMiner {
5636 pub fn new() -> Self {
5637 std::default::Default::default()
5638 }
5639 }
5640
5641 impl wkt::message::Message for LogMiner {
5642 fn typename() -> &'static str {
5643 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.LogMiner"
5644 }
5645 }
5646
5647 #[serde_with::serde_as]
5649 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5650 #[serde(default, rename_all = "camelCase")]
5651 #[non_exhaustive]
5652 pub struct BinaryLogParser {
5653 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
5655 pub log_file_access: std::option::Option<
5656 crate::model::oracle_source_config::binary_log_parser::LogFileAccess,
5657 >,
5658
5659 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5660 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5661 }
5662
5663 impl BinaryLogParser {
5664 pub fn new() -> Self {
5665 std::default::Default::default()
5666 }
5667
5668 pub fn set_log_file_access<
5673 T: std::convert::Into<
5674 std::option::Option<
5675 crate::model::oracle_source_config::binary_log_parser::LogFileAccess,
5676 >,
5677 >,
5678 >(
5679 mut self,
5680 v: T,
5681 ) -> Self {
5682 self.log_file_access = v.into();
5683 self
5684 }
5685
5686 pub fn oracle_asm_log_file_access(
5690 &self,
5691 ) -> std::option::Option<
5692 &std::boxed::Box<
5693 crate::model::oracle_source_config::binary_log_parser::OracleAsmLogFileAccess,
5694 >,
5695 > {
5696 #[allow(unreachable_patterns)]
5697 self.log_file_access.as_ref().and_then(|v| match v {
5698 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::OracleAsmLogFileAccess(v) => std::option::Option::Some(v),
5699 _ => std::option::Option::None,
5700 })
5701 }
5702
5703 pub fn log_file_directories(
5707 &self,
5708 ) -> std::option::Option<
5709 &std::boxed::Box<
5710 crate::model::oracle_source_config::binary_log_parser::LogFileDirectories,
5711 >,
5712 > {
5713 #[allow(unreachable_patterns)]
5714 self.log_file_access.as_ref().and_then(|v| match v {
5715 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::LogFileDirectories(v) => std::option::Option::Some(v),
5716 _ => std::option::Option::None,
5717 })
5718 }
5719
5720 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{
5726 self.log_file_access = std::option::Option::Some(
5727 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::OracleAsmLogFileAccess(
5728 v.into()
5729 )
5730 );
5731 self
5732 }
5733
5734 pub fn set_log_file_directories<
5740 T: std::convert::Into<
5741 std::boxed::Box<
5742 crate::model::oracle_source_config::binary_log_parser::LogFileDirectories,
5743 >,
5744 >,
5745 >(
5746 mut self,
5747 v: T,
5748 ) -> Self {
5749 self.log_file_access = std::option::Option::Some(
5750 crate::model::oracle_source_config::binary_log_parser::LogFileAccess::LogFileDirectories(
5751 v.into()
5752 )
5753 );
5754 self
5755 }
5756 }
5757
5758 impl wkt::message::Message for BinaryLogParser {
5759 fn typename() -> &'static str {
5760 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser"
5761 }
5762 }
5763
5764 pub mod binary_log_parser {
5766 #[allow(unused_imports)]
5767 use super::*;
5768
5769 #[serde_with::serde_as]
5771 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5772 #[serde(default, rename_all = "camelCase")]
5773 #[non_exhaustive]
5774 pub struct OracleAsmLogFileAccess {
5775 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5776 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5777 }
5778
5779 impl OracleAsmLogFileAccess {
5780 pub fn new() -> Self {
5781 std::default::Default::default()
5782 }
5783 }
5784
5785 impl wkt::message::Message for OracleAsmLogFileAccess {
5786 fn typename() -> &'static str {
5787 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess"
5788 }
5789 }
5790
5791 #[serde_with::serde_as]
5793 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5794 #[serde(default, rename_all = "camelCase")]
5795 #[non_exhaustive]
5796 pub struct LogFileDirectories {
5797 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5799 pub online_log_directory: std::string::String,
5800
5801 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5803 pub archived_log_directory: std::string::String,
5804
5805 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5806 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5807 }
5808
5809 impl LogFileDirectories {
5810 pub fn new() -> Self {
5811 std::default::Default::default()
5812 }
5813
5814 pub fn set_online_log_directory<T: std::convert::Into<std::string::String>>(
5816 mut self,
5817 v: T,
5818 ) -> Self {
5819 self.online_log_directory = v.into();
5820 self
5821 }
5822
5823 pub fn set_archived_log_directory<T: std::convert::Into<std::string::String>>(
5825 mut self,
5826 v: T,
5827 ) -> Self {
5828 self.archived_log_directory = v.into();
5829 self
5830 }
5831 }
5832
5833 impl wkt::message::Message for LogFileDirectories {
5834 fn typename() -> &'static str {
5835 "type.googleapis.com/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories"
5836 }
5837 }
5838
5839 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5841 #[serde(rename_all = "camelCase")]
5842 #[non_exhaustive]
5843 pub enum LogFileAccess {
5844 OracleAsmLogFileAccess(
5846 std::boxed::Box<
5847 crate::model::oracle_source_config::binary_log_parser::OracleAsmLogFileAccess,
5848 >,
5849 ),
5850 LogFileDirectories(
5852 std::boxed::Box<
5853 crate::model::oracle_source_config::binary_log_parser::LogFileDirectories,
5854 >,
5855 ),
5856 }
5857 }
5858
5859 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5861 #[serde(rename_all = "camelCase")]
5862 #[non_exhaustive]
5863 pub enum LargeObjectsHandling {
5864 DropLargeObjects(std::boxed::Box<crate::model::oracle_source_config::DropLargeObjects>),
5866 StreamLargeObjects(std::boxed::Box<crate::model::oracle_source_config::StreamLargeObjects>),
5868 }
5869
5870 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
5872 #[serde(rename_all = "camelCase")]
5873 #[non_exhaustive]
5874 pub enum CdcMethod {
5875 LogMiner(std::boxed::Box<crate::model::oracle_source_config::LogMiner>),
5877 BinaryLogParser(std::boxed::Box<crate::model::oracle_source_config::BinaryLogParser>),
5879 }
5880}
5881
5882#[serde_with::serde_as]
5884#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5885#[serde(default, rename_all = "camelCase")]
5886#[non_exhaustive]
5887pub struct PostgresqlColumn {
5888 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5890 pub column: std::string::String,
5891
5892 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5894 pub data_type: std::string::String,
5895
5896 pub length: i32,
5898
5899 pub precision: i32,
5901
5902 pub scale: i32,
5904
5905 pub primary_key: bool,
5907
5908 pub nullable: bool,
5910
5911 pub ordinal_position: i32,
5913
5914 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5915 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5916}
5917
5918impl PostgresqlColumn {
5919 pub fn new() -> Self {
5920 std::default::Default::default()
5921 }
5922
5923 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5925 self.column = v.into();
5926 self
5927 }
5928
5929 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5931 self.data_type = v.into();
5932 self
5933 }
5934
5935 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5937 self.length = v.into();
5938 self
5939 }
5940
5941 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5943 self.precision = v.into();
5944 self
5945 }
5946
5947 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5949 self.scale = v.into();
5950 self
5951 }
5952
5953 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5955 self.primary_key = v.into();
5956 self
5957 }
5958
5959 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5961 self.nullable = v.into();
5962 self
5963 }
5964
5965 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5967 self.ordinal_position = v.into();
5968 self
5969 }
5970}
5971
5972impl wkt::message::Message for PostgresqlColumn {
5973 fn typename() -> &'static str {
5974 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlColumn"
5975 }
5976}
5977
5978#[serde_with::serde_as]
5980#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5981#[serde(default, rename_all = "camelCase")]
5982#[non_exhaustive]
5983pub struct PostgresqlTable {
5984 #[serde(skip_serializing_if = "std::string::String::is_empty")]
5986 pub table: std::string::String,
5987
5988 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5992 pub postgresql_columns: std::vec::Vec<crate::model::PostgresqlColumn>,
5993
5994 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5995 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5996}
5997
5998impl PostgresqlTable {
5999 pub fn new() -> Self {
6000 std::default::Default::default()
6001 }
6002
6003 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6005 self.table = v.into();
6006 self
6007 }
6008
6009 pub fn set_postgresql_columns<T, V>(mut self, v: T) -> Self
6011 where
6012 T: std::iter::IntoIterator<Item = V>,
6013 V: std::convert::Into<crate::model::PostgresqlColumn>,
6014 {
6015 use std::iter::Iterator;
6016 self.postgresql_columns = v.into_iter().map(|i| i.into()).collect();
6017 self
6018 }
6019}
6020
6021impl wkt::message::Message for PostgresqlTable {
6022 fn typename() -> &'static str {
6023 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlTable"
6024 }
6025}
6026
6027#[serde_with::serde_as]
6029#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6030#[serde(default, rename_all = "camelCase")]
6031#[non_exhaustive]
6032pub struct PostgresqlSchema {
6033 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6035 pub schema: std::string::String,
6036
6037 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6039 pub postgresql_tables: std::vec::Vec<crate::model::PostgresqlTable>,
6040
6041 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6042 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6043}
6044
6045impl PostgresqlSchema {
6046 pub fn new() -> Self {
6047 std::default::Default::default()
6048 }
6049
6050 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6052 self.schema = v.into();
6053 self
6054 }
6055
6056 pub fn set_postgresql_tables<T, V>(mut self, v: T) -> Self
6058 where
6059 T: std::iter::IntoIterator<Item = V>,
6060 V: std::convert::Into<crate::model::PostgresqlTable>,
6061 {
6062 use std::iter::Iterator;
6063 self.postgresql_tables = v.into_iter().map(|i| i.into()).collect();
6064 self
6065 }
6066}
6067
6068impl wkt::message::Message for PostgresqlSchema {
6069 fn typename() -> &'static str {
6070 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSchema"
6071 }
6072}
6073
6074#[serde_with::serde_as]
6076#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6077#[serde(default, rename_all = "camelCase")]
6078#[non_exhaustive]
6079pub struct PostgresqlRdbms {
6080 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6082 pub postgresql_schemas: std::vec::Vec<crate::model::PostgresqlSchema>,
6083
6084 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6085 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6086}
6087
6088impl PostgresqlRdbms {
6089 pub fn new() -> Self {
6090 std::default::Default::default()
6091 }
6092
6093 pub fn set_postgresql_schemas<T, V>(mut self, v: T) -> Self
6095 where
6096 T: std::iter::IntoIterator<Item = V>,
6097 V: std::convert::Into<crate::model::PostgresqlSchema>,
6098 {
6099 use std::iter::Iterator;
6100 self.postgresql_schemas = v.into_iter().map(|i| i.into()).collect();
6101 self
6102 }
6103}
6104
6105impl wkt::message::Message for PostgresqlRdbms {
6106 fn typename() -> &'static str {
6107 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlRdbms"
6108 }
6109}
6110
6111#[serde_with::serde_as]
6113#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6114#[serde(default, rename_all = "camelCase")]
6115#[non_exhaustive]
6116pub struct PostgresqlSourceConfig {
6117 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6119 pub include_objects: std::option::Option<crate::model::PostgresqlRdbms>,
6120
6121 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6123 pub exclude_objects: std::option::Option<crate::model::PostgresqlRdbms>,
6124
6125 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6128 pub replication_slot: std::string::String,
6129
6130 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6133 pub publication: std::string::String,
6134
6135 pub max_concurrent_backfill_tasks: i32,
6139
6140 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6141 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6142}
6143
6144impl PostgresqlSourceConfig {
6145 pub fn new() -> Self {
6146 std::default::Default::default()
6147 }
6148
6149 pub fn set_include_objects<
6151 T: std::convert::Into<std::option::Option<crate::model::PostgresqlRdbms>>,
6152 >(
6153 mut self,
6154 v: T,
6155 ) -> Self {
6156 self.include_objects = v.into();
6157 self
6158 }
6159
6160 pub fn set_exclude_objects<
6162 T: std::convert::Into<std::option::Option<crate::model::PostgresqlRdbms>>,
6163 >(
6164 mut self,
6165 v: T,
6166 ) -> Self {
6167 self.exclude_objects = v.into();
6168 self
6169 }
6170
6171 pub fn set_replication_slot<T: std::convert::Into<std::string::String>>(
6173 mut self,
6174 v: T,
6175 ) -> Self {
6176 self.replication_slot = v.into();
6177 self
6178 }
6179
6180 pub fn set_publication<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6182 self.publication = v.into();
6183 self
6184 }
6185
6186 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6188 self.max_concurrent_backfill_tasks = v.into();
6189 self
6190 }
6191}
6192
6193impl wkt::message::Message for PostgresqlSourceConfig {
6194 fn typename() -> &'static str {
6195 "type.googleapis.com/google.cloud.datastream.v1.PostgresqlSourceConfig"
6196 }
6197}
6198
6199#[serde_with::serde_as]
6201#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6202#[serde(default, rename_all = "camelCase")]
6203#[non_exhaustive]
6204pub struct SqlServerColumn {
6205 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6207 pub column: std::string::String,
6208
6209 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6211 pub data_type: std::string::String,
6212
6213 pub length: i32,
6215
6216 pub precision: i32,
6218
6219 pub scale: i32,
6221
6222 pub primary_key: bool,
6224
6225 pub nullable: bool,
6227
6228 pub ordinal_position: i32,
6230
6231 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6232 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6233}
6234
6235impl SqlServerColumn {
6236 pub fn new() -> Self {
6237 std::default::Default::default()
6238 }
6239
6240 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6242 self.column = v.into();
6243 self
6244 }
6245
6246 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6248 self.data_type = v.into();
6249 self
6250 }
6251
6252 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6254 self.length = v.into();
6255 self
6256 }
6257
6258 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6260 self.precision = v.into();
6261 self
6262 }
6263
6264 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6266 self.scale = v.into();
6267 self
6268 }
6269
6270 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6272 self.primary_key = v.into();
6273 self
6274 }
6275
6276 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6278 self.nullable = v.into();
6279 self
6280 }
6281
6282 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6284 self.ordinal_position = v.into();
6285 self
6286 }
6287}
6288
6289impl wkt::message::Message for SqlServerColumn {
6290 fn typename() -> &'static str {
6291 "type.googleapis.com/google.cloud.datastream.v1.SqlServerColumn"
6292 }
6293}
6294
6295#[serde_with::serde_as]
6297#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6298#[serde(default, rename_all = "camelCase")]
6299#[non_exhaustive]
6300pub struct SqlServerTable {
6301 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6303 pub table: std::string::String,
6304
6305 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6309 pub columns: std::vec::Vec<crate::model::SqlServerColumn>,
6310
6311 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6312 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6313}
6314
6315impl SqlServerTable {
6316 pub fn new() -> Self {
6317 std::default::Default::default()
6318 }
6319
6320 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6322 self.table = v.into();
6323 self
6324 }
6325
6326 pub fn set_columns<T, V>(mut self, v: T) -> Self
6328 where
6329 T: std::iter::IntoIterator<Item = V>,
6330 V: std::convert::Into<crate::model::SqlServerColumn>,
6331 {
6332 use std::iter::Iterator;
6333 self.columns = v.into_iter().map(|i| i.into()).collect();
6334 self
6335 }
6336}
6337
6338impl wkt::message::Message for SqlServerTable {
6339 fn typename() -> &'static str {
6340 "type.googleapis.com/google.cloud.datastream.v1.SqlServerTable"
6341 }
6342}
6343
6344#[serde_with::serde_as]
6346#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6347#[serde(default, rename_all = "camelCase")]
6348#[non_exhaustive]
6349pub struct SqlServerSchema {
6350 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6352 pub schema: std::string::String,
6353
6354 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6356 pub tables: std::vec::Vec<crate::model::SqlServerTable>,
6357
6358 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6359 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6360}
6361
6362impl SqlServerSchema {
6363 pub fn new() -> Self {
6364 std::default::Default::default()
6365 }
6366
6367 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6369 self.schema = v.into();
6370 self
6371 }
6372
6373 pub fn set_tables<T, V>(mut self, v: T) -> Self
6375 where
6376 T: std::iter::IntoIterator<Item = V>,
6377 V: std::convert::Into<crate::model::SqlServerTable>,
6378 {
6379 use std::iter::Iterator;
6380 self.tables = v.into_iter().map(|i| i.into()).collect();
6381 self
6382 }
6383}
6384
6385impl wkt::message::Message for SqlServerSchema {
6386 fn typename() -> &'static str {
6387 "type.googleapis.com/google.cloud.datastream.v1.SqlServerSchema"
6388 }
6389}
6390
6391#[serde_with::serde_as]
6393#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6394#[serde(default, rename_all = "camelCase")]
6395#[non_exhaustive]
6396pub struct SqlServerRdbms {
6397 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6399 pub schemas: std::vec::Vec<crate::model::SqlServerSchema>,
6400
6401 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6402 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6403}
6404
6405impl SqlServerRdbms {
6406 pub fn new() -> Self {
6407 std::default::Default::default()
6408 }
6409
6410 pub fn set_schemas<T, V>(mut self, v: T) -> Self
6412 where
6413 T: std::iter::IntoIterator<Item = V>,
6414 V: std::convert::Into<crate::model::SqlServerSchema>,
6415 {
6416 use std::iter::Iterator;
6417 self.schemas = v.into_iter().map(|i| i.into()).collect();
6418 self
6419 }
6420}
6421
6422impl wkt::message::Message for SqlServerRdbms {
6423 fn typename() -> &'static str {
6424 "type.googleapis.com/google.cloud.datastream.v1.SqlServerRdbms"
6425 }
6426}
6427
6428#[serde_with::serde_as]
6430#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6431#[serde(default, rename_all = "camelCase")]
6432#[non_exhaustive]
6433pub struct SqlServerSourceConfig {
6434 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6436 pub include_objects: std::option::Option<crate::model::SqlServerRdbms>,
6437
6438 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6440 pub exclude_objects: std::option::Option<crate::model::SqlServerRdbms>,
6441
6442 pub max_concurrent_cdc_tasks: i32,
6444
6445 pub max_concurrent_backfill_tasks: i32,
6447
6448 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
6450 pub cdc_method: std::option::Option<crate::model::sql_server_source_config::CdcMethod>,
6451
6452 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6453 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6454}
6455
6456impl SqlServerSourceConfig {
6457 pub fn new() -> Self {
6458 std::default::Default::default()
6459 }
6460
6461 pub fn set_include_objects<
6463 T: std::convert::Into<std::option::Option<crate::model::SqlServerRdbms>>,
6464 >(
6465 mut self,
6466 v: T,
6467 ) -> Self {
6468 self.include_objects = v.into();
6469 self
6470 }
6471
6472 pub fn set_exclude_objects<
6474 T: std::convert::Into<std::option::Option<crate::model::SqlServerRdbms>>,
6475 >(
6476 mut self,
6477 v: T,
6478 ) -> Self {
6479 self.exclude_objects = v.into();
6480 self
6481 }
6482
6483 pub fn set_max_concurrent_cdc_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6485 self.max_concurrent_cdc_tasks = v.into();
6486 self
6487 }
6488
6489 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6491 self.max_concurrent_backfill_tasks = v.into();
6492 self
6493 }
6494
6495 pub fn set_cdc_method<
6500 T: std::convert::Into<std::option::Option<crate::model::sql_server_source_config::CdcMethod>>,
6501 >(
6502 mut self,
6503 v: T,
6504 ) -> Self {
6505 self.cdc_method = v.into();
6506 self
6507 }
6508
6509 pub fn transaction_logs(
6513 &self,
6514 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerTransactionLogs>> {
6515 #[allow(unreachable_patterns)]
6516 self.cdc_method.as_ref().and_then(|v| match v {
6517 crate::model::sql_server_source_config::CdcMethod::TransactionLogs(v) => {
6518 std::option::Option::Some(v)
6519 }
6520 _ => std::option::Option::None,
6521 })
6522 }
6523
6524 pub fn change_tables(
6528 &self,
6529 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerChangeTables>> {
6530 #[allow(unreachable_patterns)]
6531 self.cdc_method.as_ref().and_then(|v| match v {
6532 crate::model::sql_server_source_config::CdcMethod::ChangeTables(v) => {
6533 std::option::Option::Some(v)
6534 }
6535 _ => std::option::Option::None,
6536 })
6537 }
6538
6539 pub fn set_transaction_logs<
6545 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerTransactionLogs>>,
6546 >(
6547 mut self,
6548 v: T,
6549 ) -> Self {
6550 self.cdc_method = std::option::Option::Some(
6551 crate::model::sql_server_source_config::CdcMethod::TransactionLogs(v.into()),
6552 );
6553 self
6554 }
6555
6556 pub fn set_change_tables<
6562 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerChangeTables>>,
6563 >(
6564 mut self,
6565 v: T,
6566 ) -> Self {
6567 self.cdc_method = std::option::Option::Some(
6568 crate::model::sql_server_source_config::CdcMethod::ChangeTables(v.into()),
6569 );
6570 self
6571 }
6572}
6573
6574impl wkt::message::Message for SqlServerSourceConfig {
6575 fn typename() -> &'static str {
6576 "type.googleapis.com/google.cloud.datastream.v1.SqlServerSourceConfig"
6577 }
6578}
6579
6580pub mod sql_server_source_config {
6582 #[allow(unused_imports)]
6583 use super::*;
6584
6585 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
6587 #[serde(rename_all = "camelCase")]
6588 #[non_exhaustive]
6589 pub enum CdcMethod {
6590 TransactionLogs(std::boxed::Box<crate::model::SqlServerTransactionLogs>),
6592 ChangeTables(std::boxed::Box<crate::model::SqlServerChangeTables>),
6594 }
6595}
6596
6597#[serde_with::serde_as]
6599#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6600#[serde(default, rename_all = "camelCase")]
6601#[non_exhaustive]
6602pub struct SqlServerTransactionLogs {
6603 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6604 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6605}
6606
6607impl SqlServerTransactionLogs {
6608 pub fn new() -> Self {
6609 std::default::Default::default()
6610 }
6611}
6612
6613impl wkt::message::Message for SqlServerTransactionLogs {
6614 fn typename() -> &'static str {
6615 "type.googleapis.com/google.cloud.datastream.v1.SqlServerTransactionLogs"
6616 }
6617}
6618
6619#[serde_with::serde_as]
6621#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6622#[serde(default, rename_all = "camelCase")]
6623#[non_exhaustive]
6624pub struct SqlServerChangeTables {
6625 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6626 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6627}
6628
6629impl SqlServerChangeTables {
6630 pub fn new() -> Self {
6631 std::default::Default::default()
6632 }
6633}
6634
6635impl wkt::message::Message for SqlServerChangeTables {
6636 fn typename() -> &'static str {
6637 "type.googleapis.com/google.cloud.datastream.v1.SqlServerChangeTables"
6638 }
6639}
6640
6641#[serde_with::serde_as]
6643#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6644#[serde(default, rename_all = "camelCase")]
6645#[non_exhaustive]
6646pub struct MysqlColumn {
6647 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6649 pub column: std::string::String,
6650
6651 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6654 pub data_type: std::string::String,
6655
6656 pub length: i32,
6658
6659 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6661 pub collation: std::string::String,
6662
6663 pub primary_key: bool,
6665
6666 pub nullable: bool,
6668
6669 pub ordinal_position: i32,
6671
6672 pub precision: i32,
6674
6675 pub scale: i32,
6677
6678 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6679 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6680}
6681
6682impl MysqlColumn {
6683 pub fn new() -> Self {
6684 std::default::Default::default()
6685 }
6686
6687 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6689 self.column = v.into();
6690 self
6691 }
6692
6693 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6695 self.data_type = v.into();
6696 self
6697 }
6698
6699 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6701 self.length = v.into();
6702 self
6703 }
6704
6705 pub fn set_collation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6707 self.collation = v.into();
6708 self
6709 }
6710
6711 pub fn set_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6713 self.primary_key = v.into();
6714 self
6715 }
6716
6717 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6719 self.nullable = v.into();
6720 self
6721 }
6722
6723 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6725 self.ordinal_position = v.into();
6726 self
6727 }
6728
6729 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6731 self.precision = v.into();
6732 self
6733 }
6734
6735 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6737 self.scale = v.into();
6738 self
6739 }
6740}
6741
6742impl wkt::message::Message for MysqlColumn {
6743 fn typename() -> &'static str {
6744 "type.googleapis.com/google.cloud.datastream.v1.MysqlColumn"
6745 }
6746}
6747
6748#[serde_with::serde_as]
6750#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6751#[serde(default, rename_all = "camelCase")]
6752#[non_exhaustive]
6753pub struct MysqlTable {
6754 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6756 pub table: std::string::String,
6757
6758 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6762 pub mysql_columns: std::vec::Vec<crate::model::MysqlColumn>,
6763
6764 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6765 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6766}
6767
6768impl MysqlTable {
6769 pub fn new() -> Self {
6770 std::default::Default::default()
6771 }
6772
6773 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6775 self.table = v.into();
6776 self
6777 }
6778
6779 pub fn set_mysql_columns<T, V>(mut self, v: T) -> Self
6781 where
6782 T: std::iter::IntoIterator<Item = V>,
6783 V: std::convert::Into<crate::model::MysqlColumn>,
6784 {
6785 use std::iter::Iterator;
6786 self.mysql_columns = v.into_iter().map(|i| i.into()).collect();
6787 self
6788 }
6789}
6790
6791impl wkt::message::Message for MysqlTable {
6792 fn typename() -> &'static str {
6793 "type.googleapis.com/google.cloud.datastream.v1.MysqlTable"
6794 }
6795}
6796
6797#[serde_with::serde_as]
6799#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6800#[serde(default, rename_all = "camelCase")]
6801#[non_exhaustive]
6802pub struct MysqlDatabase {
6803 #[serde(skip_serializing_if = "std::string::String::is_empty")]
6805 pub database: std::string::String,
6806
6807 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6809 pub mysql_tables: std::vec::Vec<crate::model::MysqlTable>,
6810
6811 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6812 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6813}
6814
6815impl MysqlDatabase {
6816 pub fn new() -> Self {
6817 std::default::Default::default()
6818 }
6819
6820 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6822 self.database = v.into();
6823 self
6824 }
6825
6826 pub fn set_mysql_tables<T, V>(mut self, v: T) -> Self
6828 where
6829 T: std::iter::IntoIterator<Item = V>,
6830 V: std::convert::Into<crate::model::MysqlTable>,
6831 {
6832 use std::iter::Iterator;
6833 self.mysql_tables = v.into_iter().map(|i| i.into()).collect();
6834 self
6835 }
6836}
6837
6838impl wkt::message::Message for MysqlDatabase {
6839 fn typename() -> &'static str {
6840 "type.googleapis.com/google.cloud.datastream.v1.MysqlDatabase"
6841 }
6842}
6843
6844#[serde_with::serde_as]
6846#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6847#[serde(default, rename_all = "camelCase")]
6848#[non_exhaustive]
6849pub struct MysqlRdbms {
6850 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6852 pub mysql_databases: std::vec::Vec<crate::model::MysqlDatabase>,
6853
6854 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6855 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6856}
6857
6858impl MysqlRdbms {
6859 pub fn new() -> Self {
6860 std::default::Default::default()
6861 }
6862
6863 pub fn set_mysql_databases<T, V>(mut self, v: T) -> Self
6865 where
6866 T: std::iter::IntoIterator<Item = V>,
6867 V: std::convert::Into<crate::model::MysqlDatabase>,
6868 {
6869 use std::iter::Iterator;
6870 self.mysql_databases = v.into_iter().map(|i| i.into()).collect();
6871 self
6872 }
6873}
6874
6875impl wkt::message::Message for MysqlRdbms {
6876 fn typename() -> &'static str {
6877 "type.googleapis.com/google.cloud.datastream.v1.MysqlRdbms"
6878 }
6879}
6880
6881#[serde_with::serde_as]
6883#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6884#[serde(default, rename_all = "camelCase")]
6885#[non_exhaustive]
6886pub struct MysqlSourceConfig {
6887 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6889 pub include_objects: std::option::Option<crate::model::MysqlRdbms>,
6890
6891 #[serde(skip_serializing_if = "std::option::Option::is_none")]
6893 pub exclude_objects: std::option::Option<crate::model::MysqlRdbms>,
6894
6895 pub max_concurrent_cdc_tasks: i32,
6898
6899 pub max_concurrent_backfill_tasks: i32,
6903
6904 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
6906 pub cdc_method: std::option::Option<crate::model::mysql_source_config::CdcMethod>,
6907
6908 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6909 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6910}
6911
6912impl MysqlSourceConfig {
6913 pub fn new() -> Self {
6914 std::default::Default::default()
6915 }
6916
6917 pub fn set_include_objects<
6919 T: std::convert::Into<std::option::Option<crate::model::MysqlRdbms>>,
6920 >(
6921 mut self,
6922 v: T,
6923 ) -> Self {
6924 self.include_objects = v.into();
6925 self
6926 }
6927
6928 pub fn set_exclude_objects<
6930 T: std::convert::Into<std::option::Option<crate::model::MysqlRdbms>>,
6931 >(
6932 mut self,
6933 v: T,
6934 ) -> Self {
6935 self.exclude_objects = v.into();
6936 self
6937 }
6938
6939 pub fn set_max_concurrent_cdc_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6941 self.max_concurrent_cdc_tasks = v.into();
6942 self
6943 }
6944
6945 pub fn set_max_concurrent_backfill_tasks<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6947 self.max_concurrent_backfill_tasks = v.into();
6948 self
6949 }
6950
6951 pub fn set_cdc_method<
6956 T: std::convert::Into<std::option::Option<crate::model::mysql_source_config::CdcMethod>>,
6957 >(
6958 mut self,
6959 v: T,
6960 ) -> Self {
6961 self.cdc_method = v.into();
6962 self
6963 }
6964
6965 pub fn binary_log_position(
6969 &self,
6970 ) -> std::option::Option<&std::boxed::Box<crate::model::mysql_source_config::BinaryLogPosition>>
6971 {
6972 #[allow(unreachable_patterns)]
6973 self.cdc_method.as_ref().and_then(|v| match v {
6974 crate::model::mysql_source_config::CdcMethod::BinaryLogPosition(v) => {
6975 std::option::Option::Some(v)
6976 }
6977 _ => std::option::Option::None,
6978 })
6979 }
6980
6981 pub fn gtid(
6985 &self,
6986 ) -> std::option::Option<&std::boxed::Box<crate::model::mysql_source_config::Gtid>> {
6987 #[allow(unreachable_patterns)]
6988 self.cdc_method.as_ref().and_then(|v| match v {
6989 crate::model::mysql_source_config::CdcMethod::Gtid(v) => std::option::Option::Some(v),
6990 _ => std::option::Option::None,
6991 })
6992 }
6993
6994 pub fn set_binary_log_position<
7000 T: std::convert::Into<std::boxed::Box<crate::model::mysql_source_config::BinaryLogPosition>>,
7001 >(
7002 mut self,
7003 v: T,
7004 ) -> Self {
7005 self.cdc_method = std::option::Option::Some(
7006 crate::model::mysql_source_config::CdcMethod::BinaryLogPosition(v.into()),
7007 );
7008 self
7009 }
7010
7011 pub fn set_gtid<
7017 T: std::convert::Into<std::boxed::Box<crate::model::mysql_source_config::Gtid>>,
7018 >(
7019 mut self,
7020 v: T,
7021 ) -> Self {
7022 self.cdc_method =
7023 std::option::Option::Some(crate::model::mysql_source_config::CdcMethod::Gtid(v.into()));
7024 self
7025 }
7026}
7027
7028impl wkt::message::Message for MysqlSourceConfig {
7029 fn typename() -> &'static str {
7030 "type.googleapis.com/google.cloud.datastream.v1.MysqlSourceConfig"
7031 }
7032}
7033
7034pub mod mysql_source_config {
7036 #[allow(unused_imports)]
7037 use super::*;
7038
7039 #[serde_with::serde_as]
7041 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7042 #[serde(default, rename_all = "camelCase")]
7043 #[non_exhaustive]
7044 pub struct BinaryLogPosition {
7045 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7046 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7047 }
7048
7049 impl BinaryLogPosition {
7050 pub fn new() -> Self {
7051 std::default::Default::default()
7052 }
7053 }
7054
7055 impl wkt::message::Message for BinaryLogPosition {
7056 fn typename() -> &'static str {
7057 "type.googleapis.com/google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition"
7058 }
7059 }
7060
7061 #[serde_with::serde_as]
7063 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7064 #[serde(default, rename_all = "camelCase")]
7065 #[non_exhaustive]
7066 pub struct Gtid {
7067 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7068 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7069 }
7070
7071 impl Gtid {
7072 pub fn new() -> Self {
7073 std::default::Default::default()
7074 }
7075 }
7076
7077 impl wkt::message::Message for Gtid {
7078 fn typename() -> &'static str {
7079 "type.googleapis.com/google.cloud.datastream.v1.MysqlSourceConfig.Gtid"
7080 }
7081 }
7082
7083 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7085 #[serde(rename_all = "camelCase")]
7086 #[non_exhaustive]
7087 pub enum CdcMethod {
7088 BinaryLogPosition(std::boxed::Box<crate::model::mysql_source_config::BinaryLogPosition>),
7090 Gtid(std::boxed::Box<crate::model::mysql_source_config::Gtid>),
7092 }
7093}
7094
7095#[serde_with::serde_as]
7097#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7098#[serde(default, rename_all = "camelCase")]
7099#[non_exhaustive]
7100pub struct SalesforceSourceConfig {
7101 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7103 pub include_objects: std::option::Option<crate::model::SalesforceOrg>,
7104
7105 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7107 pub exclude_objects: std::option::Option<crate::model::SalesforceOrg>,
7108
7109 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7113 pub polling_interval: std::option::Option<wkt::Duration>,
7114
7115 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7116 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7117}
7118
7119impl SalesforceSourceConfig {
7120 pub fn new() -> Self {
7121 std::default::Default::default()
7122 }
7123
7124 pub fn set_include_objects<
7126 T: std::convert::Into<std::option::Option<crate::model::SalesforceOrg>>,
7127 >(
7128 mut self,
7129 v: T,
7130 ) -> Self {
7131 self.include_objects = v.into();
7132 self
7133 }
7134
7135 pub fn set_exclude_objects<
7137 T: std::convert::Into<std::option::Option<crate::model::SalesforceOrg>>,
7138 >(
7139 mut self,
7140 v: T,
7141 ) -> Self {
7142 self.exclude_objects = v.into();
7143 self
7144 }
7145
7146 pub fn set_polling_interval<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
7148 mut self,
7149 v: T,
7150 ) -> Self {
7151 self.polling_interval = v.into();
7152 self
7153 }
7154}
7155
7156impl wkt::message::Message for SalesforceSourceConfig {
7157 fn typename() -> &'static str {
7158 "type.googleapis.com/google.cloud.datastream.v1.SalesforceSourceConfig"
7159 }
7160}
7161
7162#[serde_with::serde_as]
7164#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7165#[serde(default, rename_all = "camelCase")]
7166#[non_exhaustive]
7167pub struct SalesforceOrg {
7168 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7170 pub objects: std::vec::Vec<crate::model::SalesforceObject>,
7171
7172 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7173 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7174}
7175
7176impl SalesforceOrg {
7177 pub fn new() -> Self {
7178 std::default::Default::default()
7179 }
7180
7181 pub fn set_objects<T, V>(mut self, v: T) -> Self
7183 where
7184 T: std::iter::IntoIterator<Item = V>,
7185 V: std::convert::Into<crate::model::SalesforceObject>,
7186 {
7187 use std::iter::Iterator;
7188 self.objects = v.into_iter().map(|i| i.into()).collect();
7189 self
7190 }
7191}
7192
7193impl wkt::message::Message for SalesforceOrg {
7194 fn typename() -> &'static str {
7195 "type.googleapis.com/google.cloud.datastream.v1.SalesforceOrg"
7196 }
7197}
7198
7199#[serde_with::serde_as]
7201#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7202#[serde(default, rename_all = "camelCase")]
7203#[non_exhaustive]
7204pub struct SalesforceObject {
7205 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7207 pub object_name: std::string::String,
7208
7209 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7214 pub fields: std::vec::Vec<crate::model::SalesforceField>,
7215
7216 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7217 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7218}
7219
7220impl SalesforceObject {
7221 pub fn new() -> Self {
7222 std::default::Default::default()
7223 }
7224
7225 pub fn set_object_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7227 self.object_name = v.into();
7228 self
7229 }
7230
7231 pub fn set_fields<T, V>(mut self, v: T) -> Self
7233 where
7234 T: std::iter::IntoIterator<Item = V>,
7235 V: std::convert::Into<crate::model::SalesforceField>,
7236 {
7237 use std::iter::Iterator;
7238 self.fields = v.into_iter().map(|i| i.into()).collect();
7239 self
7240 }
7241}
7242
7243impl wkt::message::Message for SalesforceObject {
7244 fn typename() -> &'static str {
7245 "type.googleapis.com/google.cloud.datastream.v1.SalesforceObject"
7246 }
7247}
7248
7249#[serde_with::serde_as]
7251#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7252#[serde(default, rename_all = "camelCase")]
7253#[non_exhaustive]
7254pub struct SalesforceField {
7255 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7257 pub name: std::string::String,
7258
7259 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7261 pub data_type: std::string::String,
7262
7263 pub nillable: bool,
7265
7266 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7267 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7268}
7269
7270impl SalesforceField {
7271 pub fn new() -> Self {
7272 std::default::Default::default()
7273 }
7274
7275 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7277 self.name = v.into();
7278 self
7279 }
7280
7281 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7283 self.data_type = v.into();
7284 self
7285 }
7286
7287 pub fn set_nillable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7289 self.nillable = v.into();
7290 self
7291 }
7292}
7293
7294impl wkt::message::Message for SalesforceField {
7295 fn typename() -> &'static str {
7296 "type.googleapis.com/google.cloud.datastream.v1.SalesforceField"
7297 }
7298}
7299
7300#[serde_with::serde_as]
7302#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7303#[serde(default, rename_all = "camelCase")]
7304#[non_exhaustive]
7305pub struct SourceConfig {
7306 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7309 pub source_connection_profile: std::string::String,
7310
7311 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
7313 pub source_stream_config: std::option::Option<crate::model::source_config::SourceStreamConfig>,
7314
7315 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7316 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7317}
7318
7319impl SourceConfig {
7320 pub fn new() -> Self {
7321 std::default::Default::default()
7322 }
7323
7324 pub fn set_source_connection_profile<T: std::convert::Into<std::string::String>>(
7326 mut self,
7327 v: T,
7328 ) -> Self {
7329 self.source_connection_profile = v.into();
7330 self
7331 }
7332
7333 pub fn set_source_stream_config<
7338 T: std::convert::Into<std::option::Option<crate::model::source_config::SourceStreamConfig>>,
7339 >(
7340 mut self,
7341 v: T,
7342 ) -> Self {
7343 self.source_stream_config = v.into();
7344 self
7345 }
7346
7347 pub fn oracle_source_config(
7351 &self,
7352 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleSourceConfig>> {
7353 #[allow(unreachable_patterns)]
7354 self.source_stream_config.as_ref().and_then(|v| match v {
7355 crate::model::source_config::SourceStreamConfig::OracleSourceConfig(v) => {
7356 std::option::Option::Some(v)
7357 }
7358 _ => std::option::Option::None,
7359 })
7360 }
7361
7362 pub fn mysql_source_config(
7366 &self,
7367 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlSourceConfig>> {
7368 #[allow(unreachable_patterns)]
7369 self.source_stream_config.as_ref().and_then(|v| match v {
7370 crate::model::source_config::SourceStreamConfig::MysqlSourceConfig(v) => {
7371 std::option::Option::Some(v)
7372 }
7373 _ => std::option::Option::None,
7374 })
7375 }
7376
7377 pub fn postgresql_source_config(
7381 &self,
7382 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlSourceConfig>> {
7383 #[allow(unreachable_patterns)]
7384 self.source_stream_config.as_ref().and_then(|v| match v {
7385 crate::model::source_config::SourceStreamConfig::PostgresqlSourceConfig(v) => {
7386 std::option::Option::Some(v)
7387 }
7388 _ => std::option::Option::None,
7389 })
7390 }
7391
7392 pub fn sql_server_source_config(
7396 &self,
7397 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerSourceConfig>> {
7398 #[allow(unreachable_patterns)]
7399 self.source_stream_config.as_ref().and_then(|v| match v {
7400 crate::model::source_config::SourceStreamConfig::SqlServerSourceConfig(v) => {
7401 std::option::Option::Some(v)
7402 }
7403 _ => std::option::Option::None,
7404 })
7405 }
7406
7407 pub fn salesforce_source_config(
7411 &self,
7412 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceSourceConfig>> {
7413 #[allow(unreachable_patterns)]
7414 self.source_stream_config.as_ref().and_then(|v| match v {
7415 crate::model::source_config::SourceStreamConfig::SalesforceSourceConfig(v) => {
7416 std::option::Option::Some(v)
7417 }
7418 _ => std::option::Option::None,
7419 })
7420 }
7421
7422 pub fn set_oracle_source_config<
7428 T: std::convert::Into<std::boxed::Box<crate::model::OracleSourceConfig>>,
7429 >(
7430 mut self,
7431 v: T,
7432 ) -> Self {
7433 self.source_stream_config = std::option::Option::Some(
7434 crate::model::source_config::SourceStreamConfig::OracleSourceConfig(v.into()),
7435 );
7436 self
7437 }
7438
7439 pub fn set_mysql_source_config<
7445 T: std::convert::Into<std::boxed::Box<crate::model::MysqlSourceConfig>>,
7446 >(
7447 mut self,
7448 v: T,
7449 ) -> Self {
7450 self.source_stream_config = std::option::Option::Some(
7451 crate::model::source_config::SourceStreamConfig::MysqlSourceConfig(v.into()),
7452 );
7453 self
7454 }
7455
7456 pub fn set_postgresql_source_config<
7462 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlSourceConfig>>,
7463 >(
7464 mut self,
7465 v: T,
7466 ) -> Self {
7467 self.source_stream_config = std::option::Option::Some(
7468 crate::model::source_config::SourceStreamConfig::PostgresqlSourceConfig(v.into()),
7469 );
7470 self
7471 }
7472
7473 pub fn set_sql_server_source_config<
7479 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerSourceConfig>>,
7480 >(
7481 mut self,
7482 v: T,
7483 ) -> Self {
7484 self.source_stream_config = std::option::Option::Some(
7485 crate::model::source_config::SourceStreamConfig::SqlServerSourceConfig(v.into()),
7486 );
7487 self
7488 }
7489
7490 pub fn set_salesforce_source_config<
7496 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceSourceConfig>>,
7497 >(
7498 mut self,
7499 v: T,
7500 ) -> Self {
7501 self.source_stream_config = std::option::Option::Some(
7502 crate::model::source_config::SourceStreamConfig::SalesforceSourceConfig(v.into()),
7503 );
7504 self
7505 }
7506}
7507
7508impl wkt::message::Message for SourceConfig {
7509 fn typename() -> &'static str {
7510 "type.googleapis.com/google.cloud.datastream.v1.SourceConfig"
7511 }
7512}
7513
7514pub mod source_config {
7516 #[allow(unused_imports)]
7517 use super::*;
7518
7519 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7521 #[serde(rename_all = "camelCase")]
7522 #[non_exhaustive]
7523 pub enum SourceStreamConfig {
7524 OracleSourceConfig(std::boxed::Box<crate::model::OracleSourceConfig>),
7526 MysqlSourceConfig(std::boxed::Box<crate::model::MysqlSourceConfig>),
7528 PostgresqlSourceConfig(std::boxed::Box<crate::model::PostgresqlSourceConfig>),
7530 SqlServerSourceConfig(std::boxed::Box<crate::model::SqlServerSourceConfig>),
7532 SalesforceSourceConfig(std::boxed::Box<crate::model::SalesforceSourceConfig>),
7534 }
7535}
7536
7537#[serde_with::serde_as]
7539#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7540#[serde(default, rename_all = "camelCase")]
7541#[non_exhaustive]
7542pub struct AvroFileFormat {
7543 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7544 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7545}
7546
7547impl AvroFileFormat {
7548 pub fn new() -> Self {
7549 std::default::Default::default()
7550 }
7551}
7552
7553impl wkt::message::Message for AvroFileFormat {
7554 fn typename() -> &'static str {
7555 "type.googleapis.com/google.cloud.datastream.v1.AvroFileFormat"
7556 }
7557}
7558
7559#[serde_with::serde_as]
7561#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7562#[serde(default, rename_all = "camelCase")]
7563#[non_exhaustive]
7564pub struct JsonFileFormat {
7565 pub schema_file_format: crate::model::json_file_format::SchemaFileFormat,
7567
7568 pub compression: crate::model::json_file_format::JsonCompression,
7570
7571 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7572 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7573}
7574
7575impl JsonFileFormat {
7576 pub fn new() -> Self {
7577 std::default::Default::default()
7578 }
7579
7580 pub fn set_schema_file_format<
7582 T: std::convert::Into<crate::model::json_file_format::SchemaFileFormat>,
7583 >(
7584 mut self,
7585 v: T,
7586 ) -> Self {
7587 self.schema_file_format = v.into();
7588 self
7589 }
7590
7591 pub fn set_compression<
7593 T: std::convert::Into<crate::model::json_file_format::JsonCompression>,
7594 >(
7595 mut self,
7596 v: T,
7597 ) -> Self {
7598 self.compression = v.into();
7599 self
7600 }
7601}
7602
7603impl wkt::message::Message for JsonFileFormat {
7604 fn typename() -> &'static str {
7605 "type.googleapis.com/google.cloud.datastream.v1.JsonFileFormat"
7606 }
7607}
7608
7609pub mod json_file_format {
7611 #[allow(unused_imports)]
7612 use super::*;
7613
7614 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7616 pub struct SchemaFileFormat(i32);
7617
7618 impl SchemaFileFormat {
7619 pub const SCHEMA_FILE_FORMAT_UNSPECIFIED: SchemaFileFormat = SchemaFileFormat::new(0);
7621
7622 pub const NO_SCHEMA_FILE: SchemaFileFormat = SchemaFileFormat::new(1);
7624
7625 pub const AVRO_SCHEMA_FILE: SchemaFileFormat = SchemaFileFormat::new(2);
7627
7628 pub(crate) const fn new(value: i32) -> Self {
7630 Self(value)
7631 }
7632
7633 pub fn value(&self) -> i32 {
7635 self.0
7636 }
7637
7638 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7640 match self.0 {
7641 0 => std::borrow::Cow::Borrowed("SCHEMA_FILE_FORMAT_UNSPECIFIED"),
7642 1 => std::borrow::Cow::Borrowed("NO_SCHEMA_FILE"),
7643 2 => std::borrow::Cow::Borrowed("AVRO_SCHEMA_FILE"),
7644 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7645 }
7646 }
7647
7648 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7650 match name {
7651 "SCHEMA_FILE_FORMAT_UNSPECIFIED" => {
7652 std::option::Option::Some(Self::SCHEMA_FILE_FORMAT_UNSPECIFIED)
7653 }
7654 "NO_SCHEMA_FILE" => std::option::Option::Some(Self::NO_SCHEMA_FILE),
7655 "AVRO_SCHEMA_FILE" => std::option::Option::Some(Self::AVRO_SCHEMA_FILE),
7656 _ => std::option::Option::None,
7657 }
7658 }
7659 }
7660
7661 impl std::convert::From<i32> for SchemaFileFormat {
7662 fn from(value: i32) -> Self {
7663 Self::new(value)
7664 }
7665 }
7666
7667 impl std::default::Default for SchemaFileFormat {
7668 fn default() -> Self {
7669 Self::new(0)
7670 }
7671 }
7672
7673 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7675 pub struct JsonCompression(i32);
7676
7677 impl JsonCompression {
7678 pub const JSON_COMPRESSION_UNSPECIFIED: JsonCompression = JsonCompression::new(0);
7680
7681 pub const NO_COMPRESSION: JsonCompression = JsonCompression::new(1);
7683
7684 pub const GZIP: JsonCompression = JsonCompression::new(2);
7686
7687 pub(crate) const fn new(value: i32) -> Self {
7689 Self(value)
7690 }
7691
7692 pub fn value(&self) -> i32 {
7694 self.0
7695 }
7696
7697 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7699 match self.0 {
7700 0 => std::borrow::Cow::Borrowed("JSON_COMPRESSION_UNSPECIFIED"),
7701 1 => std::borrow::Cow::Borrowed("NO_COMPRESSION"),
7702 2 => std::borrow::Cow::Borrowed("GZIP"),
7703 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7704 }
7705 }
7706
7707 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7709 match name {
7710 "JSON_COMPRESSION_UNSPECIFIED" => {
7711 std::option::Option::Some(Self::JSON_COMPRESSION_UNSPECIFIED)
7712 }
7713 "NO_COMPRESSION" => std::option::Option::Some(Self::NO_COMPRESSION),
7714 "GZIP" => std::option::Option::Some(Self::GZIP),
7715 _ => std::option::Option::None,
7716 }
7717 }
7718 }
7719
7720 impl std::convert::From<i32> for JsonCompression {
7721 fn from(value: i32) -> Self {
7722 Self::new(value)
7723 }
7724 }
7725
7726 impl std::default::Default for JsonCompression {
7727 fn default() -> Self {
7728 Self::new(0)
7729 }
7730 }
7731}
7732
7733#[serde_with::serde_as]
7735#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7736#[serde(default, rename_all = "camelCase")]
7737#[non_exhaustive]
7738pub struct GcsDestinationConfig {
7739 #[serde(skip_serializing_if = "std::string::String::is_empty")]
7741 pub path: std::string::String,
7742
7743 pub file_rotation_mb: i32,
7745
7746 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7750 pub file_rotation_interval: std::option::Option<wkt::Duration>,
7751
7752 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
7754 pub file_format: std::option::Option<crate::model::gcs_destination_config::FileFormat>,
7755
7756 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7757 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7758}
7759
7760impl GcsDestinationConfig {
7761 pub fn new() -> Self {
7762 std::default::Default::default()
7763 }
7764
7765 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7767 self.path = v.into();
7768 self
7769 }
7770
7771 pub fn set_file_rotation_mb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7773 self.file_rotation_mb = v.into();
7774 self
7775 }
7776
7777 pub fn set_file_rotation_interval<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
7779 mut self,
7780 v: T,
7781 ) -> Self {
7782 self.file_rotation_interval = v.into();
7783 self
7784 }
7785
7786 pub fn set_file_format<
7791 T: std::convert::Into<std::option::Option<crate::model::gcs_destination_config::FileFormat>>,
7792 >(
7793 mut self,
7794 v: T,
7795 ) -> Self {
7796 self.file_format = v.into();
7797 self
7798 }
7799
7800 pub fn avro_file_format(
7804 &self,
7805 ) -> std::option::Option<&std::boxed::Box<crate::model::AvroFileFormat>> {
7806 #[allow(unreachable_patterns)]
7807 self.file_format.as_ref().and_then(|v| match v {
7808 crate::model::gcs_destination_config::FileFormat::AvroFileFormat(v) => {
7809 std::option::Option::Some(v)
7810 }
7811 _ => std::option::Option::None,
7812 })
7813 }
7814
7815 pub fn json_file_format(
7819 &self,
7820 ) -> std::option::Option<&std::boxed::Box<crate::model::JsonFileFormat>> {
7821 #[allow(unreachable_patterns)]
7822 self.file_format.as_ref().and_then(|v| match v {
7823 crate::model::gcs_destination_config::FileFormat::JsonFileFormat(v) => {
7824 std::option::Option::Some(v)
7825 }
7826 _ => std::option::Option::None,
7827 })
7828 }
7829
7830 pub fn set_avro_file_format<
7836 T: std::convert::Into<std::boxed::Box<crate::model::AvroFileFormat>>,
7837 >(
7838 mut self,
7839 v: T,
7840 ) -> Self {
7841 self.file_format = std::option::Option::Some(
7842 crate::model::gcs_destination_config::FileFormat::AvroFileFormat(v.into()),
7843 );
7844 self
7845 }
7846
7847 pub fn set_json_file_format<
7853 T: std::convert::Into<std::boxed::Box<crate::model::JsonFileFormat>>,
7854 >(
7855 mut self,
7856 v: T,
7857 ) -> Self {
7858 self.file_format = std::option::Option::Some(
7859 crate::model::gcs_destination_config::FileFormat::JsonFileFormat(v.into()),
7860 );
7861 self
7862 }
7863}
7864
7865impl wkt::message::Message for GcsDestinationConfig {
7866 fn typename() -> &'static str {
7867 "type.googleapis.com/google.cloud.datastream.v1.GcsDestinationConfig"
7868 }
7869}
7870
7871pub mod gcs_destination_config {
7873 #[allow(unused_imports)]
7874 use super::*;
7875
7876 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7878 #[serde(rename_all = "camelCase")]
7879 #[non_exhaustive]
7880 pub enum FileFormat {
7881 AvroFileFormat(std::boxed::Box<crate::model::AvroFileFormat>),
7883 JsonFileFormat(std::boxed::Box<crate::model::JsonFileFormat>),
7885 }
7886}
7887
7888#[serde_with::serde_as]
7890#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7891#[serde(default, rename_all = "camelCase")]
7892#[non_exhaustive]
7893pub struct BigQueryDestinationConfig {
7894 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7899 pub data_freshness: std::option::Option<wkt::Duration>,
7900
7901 #[serde(skip_serializing_if = "std::option::Option::is_none")]
7903 pub blmt_config: std::option::Option<crate::model::big_query_destination_config::BlmtConfig>,
7904
7905 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
7907 pub dataset_config:
7908 std::option::Option<crate::model::big_query_destination_config::DatasetConfig>,
7909
7910 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
7911 pub write_mode: std::option::Option<crate::model::big_query_destination_config::WriteMode>,
7912
7913 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7914 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7915}
7916
7917impl BigQueryDestinationConfig {
7918 pub fn new() -> Self {
7919 std::default::Default::default()
7920 }
7921
7922 pub fn set_data_freshness<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
7924 mut self,
7925 v: T,
7926 ) -> Self {
7927 self.data_freshness = v.into();
7928 self
7929 }
7930
7931 pub fn set_blmt_config<
7933 T: std::convert::Into<
7934 std::option::Option<crate::model::big_query_destination_config::BlmtConfig>,
7935 >,
7936 >(
7937 mut self,
7938 v: T,
7939 ) -> Self {
7940 self.blmt_config = v.into();
7941 self
7942 }
7943
7944 pub fn set_dataset_config<
7949 T: std::convert::Into<
7950 std::option::Option<crate::model::big_query_destination_config::DatasetConfig>,
7951 >,
7952 >(
7953 mut self,
7954 v: T,
7955 ) -> Self {
7956 self.dataset_config = v.into();
7957 self
7958 }
7959
7960 pub fn single_target_dataset(
7964 &self,
7965 ) -> std::option::Option<
7966 &std::boxed::Box<crate::model::big_query_destination_config::SingleTargetDataset>,
7967 > {
7968 #[allow(unreachable_patterns)]
7969 self.dataset_config.as_ref().and_then(|v| match v {
7970 crate::model::big_query_destination_config::DatasetConfig::SingleTargetDataset(v) => {
7971 std::option::Option::Some(v)
7972 }
7973 _ => std::option::Option::None,
7974 })
7975 }
7976
7977 pub fn source_hierarchy_datasets(
7981 &self,
7982 ) -> std::option::Option<
7983 &std::boxed::Box<crate::model::big_query_destination_config::SourceHierarchyDatasets>,
7984 > {
7985 #[allow(unreachable_patterns)]
7986 self.dataset_config.as_ref().and_then(|v| match v {
7987 crate::model::big_query_destination_config::DatasetConfig::SourceHierarchyDatasets(
7988 v,
7989 ) => std::option::Option::Some(v),
7990 _ => std::option::Option::None,
7991 })
7992 }
7993
7994 pub fn set_single_target_dataset<
8000 T: std::convert::Into<
8001 std::boxed::Box<crate::model::big_query_destination_config::SingleTargetDataset>,
8002 >,
8003 >(
8004 mut self,
8005 v: T,
8006 ) -> Self {
8007 self.dataset_config = std::option::Option::Some(
8008 crate::model::big_query_destination_config::DatasetConfig::SingleTargetDataset(
8009 v.into(),
8010 ),
8011 );
8012 self
8013 }
8014
8015 pub fn set_source_hierarchy_datasets<
8021 T: std::convert::Into<
8022 std::boxed::Box<
8023 crate::model::big_query_destination_config::SourceHierarchyDatasets,
8024 >,
8025 >,
8026 >(
8027 mut self,
8028 v: T,
8029 ) -> Self {
8030 self.dataset_config = std::option::Option::Some(
8031 crate::model::big_query_destination_config::DatasetConfig::SourceHierarchyDatasets(
8032 v.into(),
8033 ),
8034 );
8035 self
8036 }
8037
8038 pub fn set_write_mode<
8043 T: std::convert::Into<
8044 std::option::Option<crate::model::big_query_destination_config::WriteMode>,
8045 >,
8046 >(
8047 mut self,
8048 v: T,
8049 ) -> Self {
8050 self.write_mode = v.into();
8051 self
8052 }
8053
8054 pub fn merge(
8058 &self,
8059 ) -> std::option::Option<&std::boxed::Box<crate::model::big_query_destination_config::Merge>>
8060 {
8061 #[allow(unreachable_patterns)]
8062 self.write_mode.as_ref().and_then(|v| match v {
8063 crate::model::big_query_destination_config::WriteMode::Merge(v) => {
8064 std::option::Option::Some(v)
8065 }
8066 _ => std::option::Option::None,
8067 })
8068 }
8069
8070 pub fn append_only(
8074 &self,
8075 ) -> std::option::Option<&std::boxed::Box<crate::model::big_query_destination_config::AppendOnly>>
8076 {
8077 #[allow(unreachable_patterns)]
8078 self.write_mode.as_ref().and_then(|v| match v {
8079 crate::model::big_query_destination_config::WriteMode::AppendOnly(v) => {
8080 std::option::Option::Some(v)
8081 }
8082 _ => std::option::Option::None,
8083 })
8084 }
8085
8086 pub fn set_merge<
8092 T: std::convert::Into<std::boxed::Box<crate::model::big_query_destination_config::Merge>>,
8093 >(
8094 mut self,
8095 v: T,
8096 ) -> Self {
8097 self.write_mode = std::option::Option::Some(
8098 crate::model::big_query_destination_config::WriteMode::Merge(v.into()),
8099 );
8100 self
8101 }
8102
8103 pub fn set_append_only<
8109 T: std::convert::Into<std::boxed::Box<crate::model::big_query_destination_config::AppendOnly>>,
8110 >(
8111 mut self,
8112 v: T,
8113 ) -> Self {
8114 self.write_mode = std::option::Option::Some(
8115 crate::model::big_query_destination_config::WriteMode::AppendOnly(v.into()),
8116 );
8117 self
8118 }
8119}
8120
8121impl wkt::message::Message for BigQueryDestinationConfig {
8122 fn typename() -> &'static str {
8123 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig"
8124 }
8125}
8126
8127pub mod big_query_destination_config {
8129 #[allow(unused_imports)]
8130 use super::*;
8131
8132 #[serde_with::serde_as]
8134 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8135 #[serde(default, rename_all = "camelCase")]
8136 #[non_exhaustive]
8137 pub struct SingleTargetDataset {
8138 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8142 pub dataset_id: std::string::String,
8143
8144 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8145 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8146 }
8147
8148 impl SingleTargetDataset {
8149 pub fn new() -> Self {
8150 std::default::Default::default()
8151 }
8152
8153 pub fn set_dataset_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8155 self.dataset_id = v.into();
8156 self
8157 }
8158 }
8159
8160 impl wkt::message::Message for SingleTargetDataset {
8161 fn typename() -> &'static str {
8162 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset"
8163 }
8164 }
8165
8166 #[serde_with::serde_as]
8169 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8170 #[serde(default, rename_all = "camelCase")]
8171 #[non_exhaustive]
8172 pub struct SourceHierarchyDatasets {
8173 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8175 pub dataset_template: std::option::Option<
8176 crate::model::big_query_destination_config::source_hierarchy_datasets::DatasetTemplate,
8177 >,
8178
8179 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8180 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8181 }
8182
8183 impl SourceHierarchyDatasets {
8184 pub fn new() -> Self {
8185 std::default::Default::default()
8186 }
8187
8188 pub fn set_dataset_template<T: std::convert::Into<std::option::Option<crate::model::big_query_destination_config::source_hierarchy_datasets::DatasetTemplate>>>(mut self, v: T) -> Self{
8190 self.dataset_template = v.into();
8191 self
8192 }
8193 }
8194
8195 impl wkt::message::Message for SourceHierarchyDatasets {
8196 fn typename() -> &'static str {
8197 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets"
8198 }
8199 }
8200
8201 pub mod source_hierarchy_datasets {
8203 #[allow(unused_imports)]
8204 use super::*;
8205
8206 #[serde_with::serde_as]
8208 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8209 #[serde(default, rename_all = "camelCase")]
8210 #[non_exhaustive]
8211 pub struct DatasetTemplate {
8212 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8216 pub location: std::string::String,
8217
8218 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8222 pub dataset_id_prefix: std::string::String,
8223
8224 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8232 pub kms_key_name: std::string::String,
8233
8234 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8235 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8236 }
8237
8238 impl DatasetTemplate {
8239 pub fn new() -> Self {
8240 std::default::Default::default()
8241 }
8242
8243 pub fn set_location<T: std::convert::Into<std::string::String>>(
8245 mut self,
8246 v: T,
8247 ) -> Self {
8248 self.location = v.into();
8249 self
8250 }
8251
8252 pub fn set_dataset_id_prefix<T: std::convert::Into<std::string::String>>(
8254 mut self,
8255 v: T,
8256 ) -> Self {
8257 self.dataset_id_prefix = v.into();
8258 self
8259 }
8260
8261 pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
8263 mut self,
8264 v: T,
8265 ) -> Self {
8266 self.kms_key_name = v.into();
8267 self
8268 }
8269 }
8270
8271 impl wkt::message::Message for DatasetTemplate {
8272 fn typename() -> &'static str {
8273 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate"
8274 }
8275 }
8276 }
8277
8278 #[serde_with::serde_as]
8280 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8281 #[serde(default, rename_all = "camelCase")]
8282 #[non_exhaustive]
8283 pub struct BlmtConfig {
8284 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8286 pub bucket: std::string::String,
8287
8288 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8290 pub root_path: std::string::String,
8291
8292 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8295 pub connection_name: std::string::String,
8296
8297 pub file_format: crate::model::big_query_destination_config::blmt_config::FileFormat,
8299
8300 pub table_format: crate::model::big_query_destination_config::blmt_config::TableFormat,
8302
8303 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8304 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8305 }
8306
8307 impl BlmtConfig {
8308 pub fn new() -> Self {
8309 std::default::Default::default()
8310 }
8311
8312 pub fn set_bucket<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8314 self.bucket = v.into();
8315 self
8316 }
8317
8318 pub fn set_root_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8320 self.root_path = v.into();
8321 self
8322 }
8323
8324 pub fn set_connection_name<T: std::convert::Into<std::string::String>>(
8326 mut self,
8327 v: T,
8328 ) -> Self {
8329 self.connection_name = v.into();
8330 self
8331 }
8332
8333 pub fn set_file_format<
8335 T: std::convert::Into<crate::model::big_query_destination_config::blmt_config::FileFormat>,
8336 >(
8337 mut self,
8338 v: T,
8339 ) -> Self {
8340 self.file_format = v.into();
8341 self
8342 }
8343
8344 pub fn set_table_format<
8346 T: std::convert::Into<
8347 crate::model::big_query_destination_config::blmt_config::TableFormat,
8348 >,
8349 >(
8350 mut self,
8351 v: T,
8352 ) -> Self {
8353 self.table_format = v.into();
8354 self
8355 }
8356 }
8357
8358 impl wkt::message::Message for BlmtConfig {
8359 fn typename() -> &'static str {
8360 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig"
8361 }
8362 }
8363
8364 pub mod blmt_config {
8366 #[allow(unused_imports)]
8367 use super::*;
8368
8369 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8371 pub struct FileFormat(i32);
8372
8373 impl FileFormat {
8374 pub const FILE_FORMAT_UNSPECIFIED: FileFormat = FileFormat::new(0);
8376
8377 pub const PARQUET: FileFormat = FileFormat::new(1);
8379
8380 pub(crate) const fn new(value: i32) -> Self {
8382 Self(value)
8383 }
8384
8385 pub fn value(&self) -> i32 {
8387 self.0
8388 }
8389
8390 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8392 match self.0 {
8393 0 => std::borrow::Cow::Borrowed("FILE_FORMAT_UNSPECIFIED"),
8394 1 => std::borrow::Cow::Borrowed("PARQUET"),
8395 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8396 }
8397 }
8398
8399 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8401 match name {
8402 "FILE_FORMAT_UNSPECIFIED" => {
8403 std::option::Option::Some(Self::FILE_FORMAT_UNSPECIFIED)
8404 }
8405 "PARQUET" => std::option::Option::Some(Self::PARQUET),
8406 _ => std::option::Option::None,
8407 }
8408 }
8409 }
8410
8411 impl std::convert::From<i32> for FileFormat {
8412 fn from(value: i32) -> Self {
8413 Self::new(value)
8414 }
8415 }
8416
8417 impl std::default::Default for FileFormat {
8418 fn default() -> Self {
8419 Self::new(0)
8420 }
8421 }
8422
8423 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8425 pub struct TableFormat(i32);
8426
8427 impl TableFormat {
8428 pub const TABLE_FORMAT_UNSPECIFIED: TableFormat = TableFormat::new(0);
8430
8431 pub const ICEBERG: TableFormat = TableFormat::new(1);
8433
8434 pub(crate) const fn new(value: i32) -> Self {
8436 Self(value)
8437 }
8438
8439 pub fn value(&self) -> i32 {
8441 self.0
8442 }
8443
8444 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8446 match self.0 {
8447 0 => std::borrow::Cow::Borrowed("TABLE_FORMAT_UNSPECIFIED"),
8448 1 => std::borrow::Cow::Borrowed("ICEBERG"),
8449 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8450 }
8451 }
8452
8453 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8455 match name {
8456 "TABLE_FORMAT_UNSPECIFIED" => {
8457 std::option::Option::Some(Self::TABLE_FORMAT_UNSPECIFIED)
8458 }
8459 "ICEBERG" => std::option::Option::Some(Self::ICEBERG),
8460 _ => std::option::Option::None,
8461 }
8462 }
8463 }
8464
8465 impl std::convert::From<i32> for TableFormat {
8466 fn from(value: i32) -> Self {
8467 Self::new(value)
8468 }
8469 }
8470
8471 impl std::default::Default for TableFormat {
8472 fn default() -> Self {
8473 Self::new(0)
8474 }
8475 }
8476 }
8477
8478 #[serde_with::serde_as]
8481 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8482 #[serde(default, rename_all = "camelCase")]
8483 #[non_exhaustive]
8484 pub struct AppendOnly {
8485 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8486 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8487 }
8488
8489 impl AppendOnly {
8490 pub fn new() -> Self {
8491 std::default::Default::default()
8492 }
8493 }
8494
8495 impl wkt::message::Message for AppendOnly {
8496 fn typename() -> &'static str {
8497 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly"
8498 }
8499 }
8500
8501 #[serde_with::serde_as]
8504 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8505 #[serde(default, rename_all = "camelCase")]
8506 #[non_exhaustive]
8507 pub struct Merge {
8508 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8509 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8510 }
8511
8512 impl Merge {
8513 pub fn new() -> Self {
8514 std::default::Default::default()
8515 }
8516 }
8517
8518 impl wkt::message::Message for Merge {
8519 fn typename() -> &'static str {
8520 "type.googleapis.com/google.cloud.datastream.v1.BigQueryDestinationConfig.Merge"
8521 }
8522 }
8523
8524 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8526 #[serde(rename_all = "camelCase")]
8527 #[non_exhaustive]
8528 pub enum DatasetConfig {
8529 SingleTargetDataset(
8531 std::boxed::Box<crate::model::big_query_destination_config::SingleTargetDataset>,
8532 ),
8533 SourceHierarchyDatasets(
8535 std::boxed::Box<crate::model::big_query_destination_config::SourceHierarchyDatasets>,
8536 ),
8537 }
8538
8539 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8540 #[serde(rename_all = "camelCase")]
8541 #[non_exhaustive]
8542 pub enum WriteMode {
8543 Merge(std::boxed::Box<crate::model::big_query_destination_config::Merge>),
8545 AppendOnly(std::boxed::Box<crate::model::big_query_destination_config::AppendOnly>),
8547 }
8548}
8549
8550#[serde_with::serde_as]
8552#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8553#[serde(default, rename_all = "camelCase")]
8554#[non_exhaustive]
8555pub struct DestinationConfig {
8556 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8559 pub destination_connection_profile: std::string::String,
8560
8561 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
8563 pub destination_stream_config:
8564 std::option::Option<crate::model::destination_config::DestinationStreamConfig>,
8565
8566 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8567 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8568}
8569
8570impl DestinationConfig {
8571 pub fn new() -> Self {
8572 std::default::Default::default()
8573 }
8574
8575 pub fn set_destination_connection_profile<T: std::convert::Into<std::string::String>>(
8577 mut self,
8578 v: T,
8579 ) -> Self {
8580 self.destination_connection_profile = v.into();
8581 self
8582 }
8583
8584 pub fn set_destination_stream_config<
8589 T: std::convert::Into<
8590 std::option::Option<crate::model::destination_config::DestinationStreamConfig>,
8591 >,
8592 >(
8593 mut self,
8594 v: T,
8595 ) -> Self {
8596 self.destination_stream_config = v.into();
8597 self
8598 }
8599
8600 pub fn gcs_destination_config(
8604 &self,
8605 ) -> std::option::Option<&std::boxed::Box<crate::model::GcsDestinationConfig>> {
8606 #[allow(unreachable_patterns)]
8607 self.destination_stream_config
8608 .as_ref()
8609 .and_then(|v| match v {
8610 crate::model::destination_config::DestinationStreamConfig::GcsDestinationConfig(
8611 v,
8612 ) => std::option::Option::Some(v),
8613 _ => std::option::Option::None,
8614 })
8615 }
8616
8617 pub fn bigquery_destination_config(
8621 &self,
8622 ) -> std::option::Option<&std::boxed::Box<crate::model::BigQueryDestinationConfig>> {
8623 #[allow(unreachable_patterns)]
8624 self.destination_stream_config.as_ref().and_then(|v| match v {
8625 crate::model::destination_config::DestinationStreamConfig::BigqueryDestinationConfig(v) => std::option::Option::Some(v),
8626 _ => std::option::Option::None,
8627 })
8628 }
8629
8630 pub fn set_gcs_destination_config<
8636 T: std::convert::Into<std::boxed::Box<crate::model::GcsDestinationConfig>>,
8637 >(
8638 mut self,
8639 v: T,
8640 ) -> Self {
8641 self.destination_stream_config = std::option::Option::Some(
8642 crate::model::destination_config::DestinationStreamConfig::GcsDestinationConfig(
8643 v.into(),
8644 ),
8645 );
8646 self
8647 }
8648
8649 pub fn set_bigquery_destination_config<
8655 T: std::convert::Into<std::boxed::Box<crate::model::BigQueryDestinationConfig>>,
8656 >(
8657 mut self,
8658 v: T,
8659 ) -> Self {
8660 self.destination_stream_config = std::option::Option::Some(
8661 crate::model::destination_config::DestinationStreamConfig::BigqueryDestinationConfig(
8662 v.into(),
8663 ),
8664 );
8665 self
8666 }
8667}
8668
8669impl wkt::message::Message for DestinationConfig {
8670 fn typename() -> &'static str {
8671 "type.googleapis.com/google.cloud.datastream.v1.DestinationConfig"
8672 }
8673}
8674
8675pub mod destination_config {
8677 #[allow(unused_imports)]
8678 use super::*;
8679
8680 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8682 #[serde(rename_all = "camelCase")]
8683 #[non_exhaustive]
8684 pub enum DestinationStreamConfig {
8685 GcsDestinationConfig(std::boxed::Box<crate::model::GcsDestinationConfig>),
8687 BigqueryDestinationConfig(std::boxed::Box<crate::model::BigQueryDestinationConfig>),
8689 }
8690}
8691
8692#[serde_with::serde_as]
8694#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8695#[serde(default, rename_all = "camelCase")]
8696#[non_exhaustive]
8697pub struct Stream {
8698 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8700 pub name: std::string::String,
8701
8702 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8704 pub create_time: std::option::Option<wkt::Timestamp>,
8705
8706 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8708 pub update_time: std::option::Option<wkt::Timestamp>,
8709
8710 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
8712 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
8713
8714 #[serde(skip_serializing_if = "std::string::String::is_empty")]
8716 pub display_name: std::string::String,
8717
8718 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8720 pub source_config: std::option::Option<crate::model::SourceConfig>,
8721
8722 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8724 pub destination_config: std::option::Option<crate::model::DestinationConfig>,
8725
8726 pub state: crate::model::stream::State,
8728
8729 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8731 pub errors: std::vec::Vec<crate::model::Error>,
8732
8733 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8738 pub customer_managed_encryption_key: std::option::Option<std::string::String>,
8739
8740 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8743 pub last_recovery_time: std::option::Option<wkt::Timestamp>,
8744
8745 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8747 pub satisfies_pzs: std::option::Option<bool>,
8748
8749 #[serde(skip_serializing_if = "std::option::Option::is_none")]
8751 pub satisfies_pzi: std::option::Option<bool>,
8752
8753 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
8755 pub backfill_strategy: std::option::Option<crate::model::stream::BackfillStrategy>,
8756
8757 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8758 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8759}
8760
8761impl Stream {
8762 pub fn new() -> Self {
8763 std::default::Default::default()
8764 }
8765
8766 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8768 self.name = v.into();
8769 self
8770 }
8771
8772 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8774 mut self,
8775 v: T,
8776 ) -> Self {
8777 self.create_time = v.into();
8778 self
8779 }
8780
8781 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8783 mut self,
8784 v: T,
8785 ) -> Self {
8786 self.update_time = v.into();
8787 self
8788 }
8789
8790 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8792 self.display_name = v.into();
8793 self
8794 }
8795
8796 pub fn set_source_config<
8798 T: std::convert::Into<std::option::Option<crate::model::SourceConfig>>,
8799 >(
8800 mut self,
8801 v: T,
8802 ) -> Self {
8803 self.source_config = v.into();
8804 self
8805 }
8806
8807 pub fn set_destination_config<
8809 T: std::convert::Into<std::option::Option<crate::model::DestinationConfig>>,
8810 >(
8811 mut self,
8812 v: T,
8813 ) -> Self {
8814 self.destination_config = v.into();
8815 self
8816 }
8817
8818 pub fn set_state<T: std::convert::Into<crate::model::stream::State>>(mut self, v: T) -> Self {
8820 self.state = v.into();
8821 self
8822 }
8823
8824 pub fn set_customer_managed_encryption_key<
8826 T: std::convert::Into<std::option::Option<std::string::String>>,
8827 >(
8828 mut self,
8829 v: T,
8830 ) -> Self {
8831 self.customer_managed_encryption_key = v.into();
8832 self
8833 }
8834
8835 pub fn set_last_recovery_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8837 mut self,
8838 v: T,
8839 ) -> Self {
8840 self.last_recovery_time = v.into();
8841 self
8842 }
8843
8844 pub fn set_satisfies_pzs<T: std::convert::Into<std::option::Option<bool>>>(
8846 mut self,
8847 v: T,
8848 ) -> Self {
8849 self.satisfies_pzs = v.into();
8850 self
8851 }
8852
8853 pub fn set_satisfies_pzi<T: std::convert::Into<std::option::Option<bool>>>(
8855 mut self,
8856 v: T,
8857 ) -> Self {
8858 self.satisfies_pzi = v.into();
8859 self
8860 }
8861
8862 pub fn set_errors<T, V>(mut self, v: T) -> Self
8864 where
8865 T: std::iter::IntoIterator<Item = V>,
8866 V: std::convert::Into<crate::model::Error>,
8867 {
8868 use std::iter::Iterator;
8869 self.errors = v.into_iter().map(|i| i.into()).collect();
8870 self
8871 }
8872
8873 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
8875 where
8876 T: std::iter::IntoIterator<Item = (K, V)>,
8877 K: std::convert::Into<std::string::String>,
8878 V: std::convert::Into<std::string::String>,
8879 {
8880 use std::iter::Iterator;
8881 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8882 self
8883 }
8884
8885 pub fn set_backfill_strategy<
8890 T: std::convert::Into<std::option::Option<crate::model::stream::BackfillStrategy>>,
8891 >(
8892 mut self,
8893 v: T,
8894 ) -> Self {
8895 self.backfill_strategy = v.into();
8896 self
8897 }
8898
8899 pub fn backfill_all(
8903 &self,
8904 ) -> std::option::Option<&std::boxed::Box<crate::model::stream::BackfillAllStrategy>> {
8905 #[allow(unreachable_patterns)]
8906 self.backfill_strategy.as_ref().and_then(|v| match v {
8907 crate::model::stream::BackfillStrategy::BackfillAll(v) => std::option::Option::Some(v),
8908 _ => std::option::Option::None,
8909 })
8910 }
8911
8912 pub fn backfill_none(
8916 &self,
8917 ) -> std::option::Option<&std::boxed::Box<crate::model::stream::BackfillNoneStrategy>> {
8918 #[allow(unreachable_patterns)]
8919 self.backfill_strategy.as_ref().and_then(|v| match v {
8920 crate::model::stream::BackfillStrategy::BackfillNone(v) => std::option::Option::Some(v),
8921 _ => std::option::Option::None,
8922 })
8923 }
8924
8925 pub fn set_backfill_all<
8931 T: std::convert::Into<std::boxed::Box<crate::model::stream::BackfillAllStrategy>>,
8932 >(
8933 mut self,
8934 v: T,
8935 ) -> Self {
8936 self.backfill_strategy = std::option::Option::Some(
8937 crate::model::stream::BackfillStrategy::BackfillAll(v.into()),
8938 );
8939 self
8940 }
8941
8942 pub fn set_backfill_none<
8948 T: std::convert::Into<std::boxed::Box<crate::model::stream::BackfillNoneStrategy>>,
8949 >(
8950 mut self,
8951 v: T,
8952 ) -> Self {
8953 self.backfill_strategy = std::option::Option::Some(
8954 crate::model::stream::BackfillStrategy::BackfillNone(v.into()),
8955 );
8956 self
8957 }
8958}
8959
8960impl wkt::message::Message for Stream {
8961 fn typename() -> &'static str {
8962 "type.googleapis.com/google.cloud.datastream.v1.Stream"
8963 }
8964}
8965
8966pub mod stream {
8968 #[allow(unused_imports)]
8969 use super::*;
8970
8971 #[serde_with::serde_as]
8974 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8975 #[serde(default, rename_all = "camelCase")]
8976 #[non_exhaustive]
8977 pub struct BackfillAllStrategy {
8978 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
8980 pub excluded_objects:
8981 std::option::Option<crate::model::stream::backfill_all_strategy::ExcludedObjects>,
8982
8983 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8984 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8985 }
8986
8987 impl BackfillAllStrategy {
8988 pub fn new() -> Self {
8989 std::default::Default::default()
8990 }
8991
8992 pub fn set_excluded_objects<
8997 T: std::convert::Into<
8998 std::option::Option<
8999 crate::model::stream::backfill_all_strategy::ExcludedObjects,
9000 >,
9001 >,
9002 >(
9003 mut self,
9004 v: T,
9005 ) -> Self {
9006 self.excluded_objects = v.into();
9007 self
9008 }
9009
9010 pub fn oracle_excluded_objects(
9014 &self,
9015 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleRdbms>> {
9016 #[allow(unreachable_patterns)]
9017 self.excluded_objects.as_ref().and_then(|v| match v {
9018 crate::model::stream::backfill_all_strategy::ExcludedObjects::OracleExcludedObjects(v) => std::option::Option::Some(v),
9019 _ => std::option::Option::None,
9020 })
9021 }
9022
9023 pub fn mysql_excluded_objects(
9027 &self,
9028 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlRdbms>> {
9029 #[allow(unreachable_patterns)]
9030 self.excluded_objects.as_ref().and_then(|v| match v {
9031 crate::model::stream::backfill_all_strategy::ExcludedObjects::MysqlExcludedObjects(v) => std::option::Option::Some(v),
9032 _ => std::option::Option::None,
9033 })
9034 }
9035
9036 pub fn postgresql_excluded_objects(
9040 &self,
9041 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgresqlRdbms>> {
9042 #[allow(unreachable_patterns)]
9043 self.excluded_objects.as_ref().and_then(|v| match v {
9044 crate::model::stream::backfill_all_strategy::ExcludedObjects::PostgresqlExcludedObjects(v) => std::option::Option::Some(v),
9045 _ => std::option::Option::None,
9046 })
9047 }
9048
9049 pub fn sql_server_excluded_objects(
9053 &self,
9054 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerRdbms>> {
9055 #[allow(unreachable_patterns)]
9056 self.excluded_objects.as_ref().and_then(|v| match v {
9057 crate::model::stream::backfill_all_strategy::ExcludedObjects::SqlServerExcludedObjects(v) => std::option::Option::Some(v),
9058 _ => std::option::Option::None,
9059 })
9060 }
9061
9062 pub fn salesforce_excluded_objects(
9066 &self,
9067 ) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceOrg>> {
9068 #[allow(unreachable_patterns)]
9069 self.excluded_objects.as_ref().and_then(|v| match v {
9070 crate::model::stream::backfill_all_strategy::ExcludedObjects::SalesforceExcludedObjects(v) => std::option::Option::Some(v),
9071 _ => std::option::Option::None,
9072 })
9073 }
9074
9075 pub fn set_oracle_excluded_objects<
9081 T: std::convert::Into<std::boxed::Box<crate::model::OracleRdbms>>,
9082 >(
9083 mut self,
9084 v: T,
9085 ) -> Self {
9086 self.excluded_objects = std::option::Option::Some(
9087 crate::model::stream::backfill_all_strategy::ExcludedObjects::OracleExcludedObjects(
9088 v.into(),
9089 ),
9090 );
9091 self
9092 }
9093
9094 pub fn set_mysql_excluded_objects<
9100 T: std::convert::Into<std::boxed::Box<crate::model::MysqlRdbms>>,
9101 >(
9102 mut self,
9103 v: T,
9104 ) -> Self {
9105 self.excluded_objects = std::option::Option::Some(
9106 crate::model::stream::backfill_all_strategy::ExcludedObjects::MysqlExcludedObjects(
9107 v.into(),
9108 ),
9109 );
9110 self
9111 }
9112
9113 pub fn set_postgresql_excluded_objects<
9119 T: std::convert::Into<std::boxed::Box<crate::model::PostgresqlRdbms>>,
9120 >(
9121 mut self,
9122 v: T,
9123 ) -> Self {
9124 self.excluded_objects = std::option::Option::Some(
9125 crate::model::stream::backfill_all_strategy::ExcludedObjects::PostgresqlExcludedObjects(
9126 v.into()
9127 )
9128 );
9129 self
9130 }
9131
9132 pub fn set_sql_server_excluded_objects<
9138 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerRdbms>>,
9139 >(
9140 mut self,
9141 v: T,
9142 ) -> Self {
9143 self.excluded_objects = std::option::Option::Some(
9144 crate::model::stream::backfill_all_strategy::ExcludedObjects::SqlServerExcludedObjects(
9145 v.into()
9146 )
9147 );
9148 self
9149 }
9150
9151 pub fn set_salesforce_excluded_objects<
9157 T: std::convert::Into<std::boxed::Box<crate::model::SalesforceOrg>>,
9158 >(
9159 mut self,
9160 v: T,
9161 ) -> Self {
9162 self.excluded_objects = std::option::Option::Some(
9163 crate::model::stream::backfill_all_strategy::ExcludedObjects::SalesforceExcludedObjects(
9164 v.into()
9165 )
9166 );
9167 self
9168 }
9169 }
9170
9171 impl wkt::message::Message for BackfillAllStrategy {
9172 fn typename() -> &'static str {
9173 "type.googleapis.com/google.cloud.datastream.v1.Stream.BackfillAllStrategy"
9174 }
9175 }
9176
9177 pub mod backfill_all_strategy {
9179 #[allow(unused_imports)]
9180 use super::*;
9181
9182 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9184 #[serde(rename_all = "camelCase")]
9185 #[non_exhaustive]
9186 pub enum ExcludedObjects {
9187 OracleExcludedObjects(std::boxed::Box<crate::model::OracleRdbms>),
9189 MysqlExcludedObjects(std::boxed::Box<crate::model::MysqlRdbms>),
9191 PostgresqlExcludedObjects(std::boxed::Box<crate::model::PostgresqlRdbms>),
9193 SqlServerExcludedObjects(std::boxed::Box<crate::model::SqlServerRdbms>),
9195 SalesforceExcludedObjects(std::boxed::Box<crate::model::SalesforceOrg>),
9197 }
9198 }
9199
9200 #[serde_with::serde_as]
9202 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9203 #[serde(default, rename_all = "camelCase")]
9204 #[non_exhaustive]
9205 pub struct BackfillNoneStrategy {
9206 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9207 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9208 }
9209
9210 impl BackfillNoneStrategy {
9211 pub fn new() -> Self {
9212 std::default::Default::default()
9213 }
9214 }
9215
9216 impl wkt::message::Message for BackfillNoneStrategy {
9217 fn typename() -> &'static str {
9218 "type.googleapis.com/google.cloud.datastream.v1.Stream.BackfillNoneStrategy"
9219 }
9220 }
9221
9222 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9224 pub struct State(i32);
9225
9226 impl State {
9227 pub const STATE_UNSPECIFIED: State = State::new(0);
9229
9230 pub const NOT_STARTED: State = State::new(1);
9232
9233 pub const RUNNING: State = State::new(2);
9235
9236 pub const PAUSED: State = State::new(3);
9238
9239 pub const MAINTENANCE: State = State::new(4);
9243
9244 pub const FAILED: State = State::new(5);
9247
9248 pub const FAILED_PERMANENTLY: State = State::new(6);
9250
9251 pub const STARTING: State = State::new(7);
9253
9254 pub const DRAINING: State = State::new(8);
9257
9258 pub(crate) const fn new(value: i32) -> Self {
9260 Self(value)
9261 }
9262
9263 pub fn value(&self) -> i32 {
9265 self.0
9266 }
9267
9268 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9270 match self.0 {
9271 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9272 1 => std::borrow::Cow::Borrowed("NOT_STARTED"),
9273 2 => std::borrow::Cow::Borrowed("RUNNING"),
9274 3 => std::borrow::Cow::Borrowed("PAUSED"),
9275 4 => std::borrow::Cow::Borrowed("MAINTENANCE"),
9276 5 => std::borrow::Cow::Borrowed("FAILED"),
9277 6 => std::borrow::Cow::Borrowed("FAILED_PERMANENTLY"),
9278 7 => std::borrow::Cow::Borrowed("STARTING"),
9279 8 => std::borrow::Cow::Borrowed("DRAINING"),
9280 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9281 }
9282 }
9283
9284 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9286 match name {
9287 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9288 "NOT_STARTED" => std::option::Option::Some(Self::NOT_STARTED),
9289 "RUNNING" => std::option::Option::Some(Self::RUNNING),
9290 "PAUSED" => std::option::Option::Some(Self::PAUSED),
9291 "MAINTENANCE" => std::option::Option::Some(Self::MAINTENANCE),
9292 "FAILED" => std::option::Option::Some(Self::FAILED),
9293 "FAILED_PERMANENTLY" => std::option::Option::Some(Self::FAILED_PERMANENTLY),
9294 "STARTING" => std::option::Option::Some(Self::STARTING),
9295 "DRAINING" => std::option::Option::Some(Self::DRAINING),
9296 _ => std::option::Option::None,
9297 }
9298 }
9299 }
9300
9301 impl std::convert::From<i32> for State {
9302 fn from(value: i32) -> Self {
9303 Self::new(value)
9304 }
9305 }
9306
9307 impl std::default::Default for State {
9308 fn default() -> Self {
9309 Self::new(0)
9310 }
9311 }
9312
9313 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9315 #[serde(rename_all = "camelCase")]
9316 #[non_exhaustive]
9317 pub enum BackfillStrategy {
9318 BackfillAll(std::boxed::Box<crate::model::stream::BackfillAllStrategy>),
9321 BackfillNone(std::boxed::Box<crate::model::stream::BackfillNoneStrategy>),
9323 }
9324}
9325
9326#[serde_with::serde_as]
9328#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9329#[serde(default, rename_all = "camelCase")]
9330#[non_exhaustive]
9331pub struct StreamObject {
9332 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9334 pub name: std::string::String,
9335
9336 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9338 pub create_time: std::option::Option<wkt::Timestamp>,
9339
9340 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9342 pub update_time: std::option::Option<wkt::Timestamp>,
9343
9344 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9346 pub display_name: std::string::String,
9347
9348 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9350 pub errors: std::vec::Vec<crate::model::Error>,
9351
9352 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9354 pub backfill_job: std::option::Option<crate::model::BackfillJob>,
9355
9356 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9358 pub source_object: std::option::Option<crate::model::SourceObjectIdentifier>,
9359
9360 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9361 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9362}
9363
9364impl StreamObject {
9365 pub fn new() -> Self {
9366 std::default::Default::default()
9367 }
9368
9369 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9371 self.name = v.into();
9372 self
9373 }
9374
9375 pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9377 mut self,
9378 v: T,
9379 ) -> Self {
9380 self.create_time = v.into();
9381 self
9382 }
9383
9384 pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9386 mut self,
9387 v: T,
9388 ) -> Self {
9389 self.update_time = v.into();
9390 self
9391 }
9392
9393 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9395 self.display_name = v.into();
9396 self
9397 }
9398
9399 pub fn set_backfill_job<
9401 T: std::convert::Into<std::option::Option<crate::model::BackfillJob>>,
9402 >(
9403 mut self,
9404 v: T,
9405 ) -> Self {
9406 self.backfill_job = v.into();
9407 self
9408 }
9409
9410 pub fn set_source_object<
9412 T: std::convert::Into<std::option::Option<crate::model::SourceObjectIdentifier>>,
9413 >(
9414 mut self,
9415 v: T,
9416 ) -> Self {
9417 self.source_object = v.into();
9418 self
9419 }
9420
9421 pub fn set_errors<T, V>(mut self, v: T) -> Self
9423 where
9424 T: std::iter::IntoIterator<Item = V>,
9425 V: std::convert::Into<crate::model::Error>,
9426 {
9427 use std::iter::Iterator;
9428 self.errors = v.into_iter().map(|i| i.into()).collect();
9429 self
9430 }
9431}
9432
9433impl wkt::message::Message for StreamObject {
9434 fn typename() -> &'static str {
9435 "type.googleapis.com/google.cloud.datastream.v1.StreamObject"
9436 }
9437}
9438
9439#[serde_with::serde_as]
9441#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9442#[serde(default, rename_all = "camelCase")]
9443#[non_exhaustive]
9444pub struct SourceObjectIdentifier {
9445 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
9447 pub source_identifier:
9448 std::option::Option<crate::model::source_object_identifier::SourceIdentifier>,
9449
9450 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9451 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9452}
9453
9454impl SourceObjectIdentifier {
9455 pub fn new() -> Self {
9456 std::default::Default::default()
9457 }
9458
9459 pub fn set_source_identifier<
9464 T: std::convert::Into<
9465 std::option::Option<crate::model::source_object_identifier::SourceIdentifier>,
9466 >,
9467 >(
9468 mut self,
9469 v: T,
9470 ) -> Self {
9471 self.source_identifier = v.into();
9472 self
9473 }
9474
9475 pub fn oracle_identifier(
9479 &self,
9480 ) -> std::option::Option<
9481 &std::boxed::Box<crate::model::source_object_identifier::OracleObjectIdentifier>,
9482 > {
9483 #[allow(unreachable_patterns)]
9484 self.source_identifier.as_ref().and_then(|v| match v {
9485 crate::model::source_object_identifier::SourceIdentifier::OracleIdentifier(v) => {
9486 std::option::Option::Some(v)
9487 }
9488 _ => std::option::Option::None,
9489 })
9490 }
9491
9492 pub fn mysql_identifier(
9496 &self,
9497 ) -> std::option::Option<
9498 &std::boxed::Box<crate::model::source_object_identifier::MysqlObjectIdentifier>,
9499 > {
9500 #[allow(unreachable_patterns)]
9501 self.source_identifier.as_ref().and_then(|v| match v {
9502 crate::model::source_object_identifier::SourceIdentifier::MysqlIdentifier(v) => {
9503 std::option::Option::Some(v)
9504 }
9505 _ => std::option::Option::None,
9506 })
9507 }
9508
9509 pub fn postgresql_identifier(
9513 &self,
9514 ) -> std::option::Option<
9515 &std::boxed::Box<crate::model::source_object_identifier::PostgresqlObjectIdentifier>,
9516 > {
9517 #[allow(unreachable_patterns)]
9518 self.source_identifier.as_ref().and_then(|v| match v {
9519 crate::model::source_object_identifier::SourceIdentifier::PostgresqlIdentifier(v) => {
9520 std::option::Option::Some(v)
9521 }
9522 _ => std::option::Option::None,
9523 })
9524 }
9525
9526 pub fn sql_server_identifier(
9530 &self,
9531 ) -> std::option::Option<
9532 &std::boxed::Box<crate::model::source_object_identifier::SqlServerObjectIdentifier>,
9533 > {
9534 #[allow(unreachable_patterns)]
9535 self.source_identifier.as_ref().and_then(|v| match v {
9536 crate::model::source_object_identifier::SourceIdentifier::SqlServerIdentifier(v) => {
9537 std::option::Option::Some(v)
9538 }
9539 _ => std::option::Option::None,
9540 })
9541 }
9542
9543 pub fn salesforce_identifier(
9547 &self,
9548 ) -> std::option::Option<
9549 &std::boxed::Box<crate::model::source_object_identifier::SalesforceObjectIdentifier>,
9550 > {
9551 #[allow(unreachable_patterns)]
9552 self.source_identifier.as_ref().and_then(|v| match v {
9553 crate::model::source_object_identifier::SourceIdentifier::SalesforceIdentifier(v) => {
9554 std::option::Option::Some(v)
9555 }
9556 _ => std::option::Option::None,
9557 })
9558 }
9559
9560 pub fn set_oracle_identifier<
9566 T: std::convert::Into<
9567 std::boxed::Box<crate::model::source_object_identifier::OracleObjectIdentifier>,
9568 >,
9569 >(
9570 mut self,
9571 v: T,
9572 ) -> Self {
9573 self.source_identifier = std::option::Option::Some(
9574 crate::model::source_object_identifier::SourceIdentifier::OracleIdentifier(v.into()),
9575 );
9576 self
9577 }
9578
9579 pub fn set_mysql_identifier<
9585 T: std::convert::Into<
9586 std::boxed::Box<crate::model::source_object_identifier::MysqlObjectIdentifier>,
9587 >,
9588 >(
9589 mut self,
9590 v: T,
9591 ) -> Self {
9592 self.source_identifier = std::option::Option::Some(
9593 crate::model::source_object_identifier::SourceIdentifier::MysqlIdentifier(v.into()),
9594 );
9595 self
9596 }
9597
9598 pub fn set_postgresql_identifier<
9604 T: std::convert::Into<
9605 std::boxed::Box<crate::model::source_object_identifier::PostgresqlObjectIdentifier>,
9606 >,
9607 >(
9608 mut self,
9609 v: T,
9610 ) -> Self {
9611 self.source_identifier = std::option::Option::Some(
9612 crate::model::source_object_identifier::SourceIdentifier::PostgresqlIdentifier(
9613 v.into(),
9614 ),
9615 );
9616 self
9617 }
9618
9619 pub fn set_sql_server_identifier<
9625 T: std::convert::Into<
9626 std::boxed::Box<crate::model::source_object_identifier::SqlServerObjectIdentifier>,
9627 >,
9628 >(
9629 mut self,
9630 v: T,
9631 ) -> Self {
9632 self.source_identifier = std::option::Option::Some(
9633 crate::model::source_object_identifier::SourceIdentifier::SqlServerIdentifier(v.into()),
9634 );
9635 self
9636 }
9637
9638 pub fn set_salesforce_identifier<
9644 T: std::convert::Into<
9645 std::boxed::Box<crate::model::source_object_identifier::SalesforceObjectIdentifier>,
9646 >,
9647 >(
9648 mut self,
9649 v: T,
9650 ) -> Self {
9651 self.source_identifier = std::option::Option::Some(
9652 crate::model::source_object_identifier::SourceIdentifier::SalesforceIdentifier(
9653 v.into(),
9654 ),
9655 );
9656 self
9657 }
9658}
9659
9660impl wkt::message::Message for SourceObjectIdentifier {
9661 fn typename() -> &'static str {
9662 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier"
9663 }
9664}
9665
9666pub mod source_object_identifier {
9668 #[allow(unused_imports)]
9669 use super::*;
9670
9671 #[serde_with::serde_as]
9673 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9674 #[serde(default, rename_all = "camelCase")]
9675 #[non_exhaustive]
9676 pub struct OracleObjectIdentifier {
9677 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9679 pub schema: std::string::String,
9680
9681 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9683 pub table: std::string::String,
9684
9685 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9686 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9687 }
9688
9689 impl OracleObjectIdentifier {
9690 pub fn new() -> Self {
9691 std::default::Default::default()
9692 }
9693
9694 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9696 self.schema = v.into();
9697 self
9698 }
9699
9700 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9702 self.table = v.into();
9703 self
9704 }
9705 }
9706
9707 impl wkt::message::Message for OracleObjectIdentifier {
9708 fn typename() -> &'static str {
9709 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier"
9710 }
9711 }
9712
9713 #[serde_with::serde_as]
9715 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9716 #[serde(default, rename_all = "camelCase")]
9717 #[non_exhaustive]
9718 pub struct PostgresqlObjectIdentifier {
9719 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9721 pub schema: std::string::String,
9722
9723 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9725 pub table: std::string::String,
9726
9727 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9728 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9729 }
9730
9731 impl PostgresqlObjectIdentifier {
9732 pub fn new() -> Self {
9733 std::default::Default::default()
9734 }
9735
9736 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9738 self.schema = v.into();
9739 self
9740 }
9741
9742 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9744 self.table = v.into();
9745 self
9746 }
9747 }
9748
9749 impl wkt::message::Message for PostgresqlObjectIdentifier {
9750 fn typename() -> &'static str {
9751 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier"
9752 }
9753 }
9754
9755 #[serde_with::serde_as]
9757 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9758 #[serde(default, rename_all = "camelCase")]
9759 #[non_exhaustive]
9760 pub struct MysqlObjectIdentifier {
9761 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9763 pub database: std::string::String,
9764
9765 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9767 pub table: std::string::String,
9768
9769 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9770 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9771 }
9772
9773 impl MysqlObjectIdentifier {
9774 pub fn new() -> Self {
9775 std::default::Default::default()
9776 }
9777
9778 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9780 self.database = v.into();
9781 self
9782 }
9783
9784 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9786 self.table = v.into();
9787 self
9788 }
9789 }
9790
9791 impl wkt::message::Message for MysqlObjectIdentifier {
9792 fn typename() -> &'static str {
9793 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier"
9794 }
9795 }
9796
9797 #[serde_with::serde_as]
9799 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9800 #[serde(default, rename_all = "camelCase")]
9801 #[non_exhaustive]
9802 pub struct SqlServerObjectIdentifier {
9803 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9805 pub schema: std::string::String,
9806
9807 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9809 pub table: std::string::String,
9810
9811 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9812 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9813 }
9814
9815 impl SqlServerObjectIdentifier {
9816 pub fn new() -> Self {
9817 std::default::Default::default()
9818 }
9819
9820 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9822 self.schema = v.into();
9823 self
9824 }
9825
9826 pub fn set_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9828 self.table = v.into();
9829 self
9830 }
9831 }
9832
9833 impl wkt::message::Message for SqlServerObjectIdentifier {
9834 fn typename() -> &'static str {
9835 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier"
9836 }
9837 }
9838
9839 #[serde_with::serde_as]
9841 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9842 #[serde(default, rename_all = "camelCase")]
9843 #[non_exhaustive]
9844 pub struct SalesforceObjectIdentifier {
9845 #[serde(skip_serializing_if = "std::string::String::is_empty")]
9847 pub object_name: std::string::String,
9848
9849 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9850 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9851 }
9852
9853 impl SalesforceObjectIdentifier {
9854 pub fn new() -> Self {
9855 std::default::Default::default()
9856 }
9857
9858 pub fn set_object_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9860 self.object_name = v.into();
9861 self
9862 }
9863 }
9864
9865 impl wkt::message::Message for SalesforceObjectIdentifier {
9866 fn typename() -> &'static str {
9867 "type.googleapis.com/google.cloud.datastream.v1.SourceObjectIdentifier.SalesforceObjectIdentifier"
9868 }
9869 }
9870
9871 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9873 #[serde(rename_all = "camelCase")]
9874 #[non_exhaustive]
9875 pub enum SourceIdentifier {
9876 OracleIdentifier(
9878 std::boxed::Box<crate::model::source_object_identifier::OracleObjectIdentifier>,
9879 ),
9880 MysqlIdentifier(
9882 std::boxed::Box<crate::model::source_object_identifier::MysqlObjectIdentifier>,
9883 ),
9884 PostgresqlIdentifier(
9886 std::boxed::Box<crate::model::source_object_identifier::PostgresqlObjectIdentifier>,
9887 ),
9888 SqlServerIdentifier(
9890 std::boxed::Box<crate::model::source_object_identifier::SqlServerObjectIdentifier>,
9891 ),
9892 SalesforceIdentifier(
9894 std::boxed::Box<crate::model::source_object_identifier::SalesforceObjectIdentifier>,
9895 ),
9896 }
9897}
9898
9899#[serde_with::serde_as]
9901#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9902#[serde(default, rename_all = "camelCase")]
9903#[non_exhaustive]
9904pub struct BackfillJob {
9905 pub state: crate::model::backfill_job::State,
9907
9908 pub trigger: crate::model::backfill_job::Trigger,
9910
9911 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9913 pub last_start_time: std::option::Option<wkt::Timestamp>,
9914
9915 #[serde(skip_serializing_if = "std::option::Option::is_none")]
9917 pub last_end_time: std::option::Option<wkt::Timestamp>,
9918
9919 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9921 pub errors: std::vec::Vec<crate::model::Error>,
9922
9923 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9924 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9925}
9926
9927impl BackfillJob {
9928 pub fn new() -> Self {
9929 std::default::Default::default()
9930 }
9931
9932 pub fn set_state<T: std::convert::Into<crate::model::backfill_job::State>>(
9934 mut self,
9935 v: T,
9936 ) -> Self {
9937 self.state = v.into();
9938 self
9939 }
9940
9941 pub fn set_trigger<T: std::convert::Into<crate::model::backfill_job::Trigger>>(
9943 mut self,
9944 v: T,
9945 ) -> Self {
9946 self.trigger = v.into();
9947 self
9948 }
9949
9950 pub fn set_last_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9952 mut self,
9953 v: T,
9954 ) -> Self {
9955 self.last_start_time = v.into();
9956 self
9957 }
9958
9959 pub fn set_last_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9961 mut self,
9962 v: T,
9963 ) -> Self {
9964 self.last_end_time = v.into();
9965 self
9966 }
9967
9968 pub fn set_errors<T, V>(mut self, v: T) -> Self
9970 where
9971 T: std::iter::IntoIterator<Item = V>,
9972 V: std::convert::Into<crate::model::Error>,
9973 {
9974 use std::iter::Iterator;
9975 self.errors = v.into_iter().map(|i| i.into()).collect();
9976 self
9977 }
9978}
9979
9980impl wkt::message::Message for BackfillJob {
9981 fn typename() -> &'static str {
9982 "type.googleapis.com/google.cloud.datastream.v1.BackfillJob"
9983 }
9984}
9985
9986pub mod backfill_job {
9988 #[allow(unused_imports)]
9989 use super::*;
9990
9991 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9993 pub struct State(i32);
9994
9995 impl State {
9996 pub const STATE_UNSPECIFIED: State = State::new(0);
9998
9999 pub const NOT_STARTED: State = State::new(1);
10003
10004 pub const PENDING: State = State::new(2);
10006
10007 pub const ACTIVE: State = State::new(3);
10009
10010 pub const STOPPED: State = State::new(4);
10012
10013 pub const FAILED: State = State::new(5);
10015
10016 pub const COMPLETED: State = State::new(6);
10018
10019 pub const UNSUPPORTED: State = State::new(7);
10022
10023 pub(crate) const fn new(value: i32) -> Self {
10025 Self(value)
10026 }
10027
10028 pub fn value(&self) -> i32 {
10030 self.0
10031 }
10032
10033 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10035 match self.0 {
10036 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
10037 1 => std::borrow::Cow::Borrowed("NOT_STARTED"),
10038 2 => std::borrow::Cow::Borrowed("PENDING"),
10039 3 => std::borrow::Cow::Borrowed("ACTIVE"),
10040 4 => std::borrow::Cow::Borrowed("STOPPED"),
10041 5 => std::borrow::Cow::Borrowed("FAILED"),
10042 6 => std::borrow::Cow::Borrowed("COMPLETED"),
10043 7 => std::borrow::Cow::Borrowed("UNSUPPORTED"),
10044 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10045 }
10046 }
10047
10048 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10050 match name {
10051 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
10052 "NOT_STARTED" => std::option::Option::Some(Self::NOT_STARTED),
10053 "PENDING" => std::option::Option::Some(Self::PENDING),
10054 "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
10055 "STOPPED" => std::option::Option::Some(Self::STOPPED),
10056 "FAILED" => std::option::Option::Some(Self::FAILED),
10057 "COMPLETED" => std::option::Option::Some(Self::COMPLETED),
10058 "UNSUPPORTED" => std::option::Option::Some(Self::UNSUPPORTED),
10059 _ => std::option::Option::None,
10060 }
10061 }
10062 }
10063
10064 impl std::convert::From<i32> for State {
10065 fn from(value: i32) -> Self {
10066 Self::new(value)
10067 }
10068 }
10069
10070 impl std::default::Default for State {
10071 fn default() -> Self {
10072 Self::new(0)
10073 }
10074 }
10075
10076 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10078 pub struct Trigger(i32);
10079
10080 impl Trigger {
10081 pub const TRIGGER_UNSPECIFIED: Trigger = Trigger::new(0);
10083
10084 pub const AUTOMATIC: Trigger = Trigger::new(1);
10087
10088 pub const MANUAL: Trigger = Trigger::new(2);
10090
10091 pub(crate) const fn new(value: i32) -> Self {
10093 Self(value)
10094 }
10095
10096 pub fn value(&self) -> i32 {
10098 self.0
10099 }
10100
10101 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10103 match self.0 {
10104 0 => std::borrow::Cow::Borrowed("TRIGGER_UNSPECIFIED"),
10105 1 => std::borrow::Cow::Borrowed("AUTOMATIC"),
10106 2 => std::borrow::Cow::Borrowed("MANUAL"),
10107 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10108 }
10109 }
10110
10111 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10113 match name {
10114 "TRIGGER_UNSPECIFIED" => std::option::Option::Some(Self::TRIGGER_UNSPECIFIED),
10115 "AUTOMATIC" => std::option::Option::Some(Self::AUTOMATIC),
10116 "MANUAL" => std::option::Option::Some(Self::MANUAL),
10117 _ => std::option::Option::None,
10118 }
10119 }
10120 }
10121
10122 impl std::convert::From<i32> for Trigger {
10123 fn from(value: i32) -> Self {
10124 Self::new(value)
10125 }
10126 }
10127
10128 impl std::default::Default for Trigger {
10129 fn default() -> Self {
10130 Self::new(0)
10131 }
10132 }
10133}
10134
10135#[serde_with::serde_as]
10137#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10138#[serde(default, rename_all = "camelCase")]
10139#[non_exhaustive]
10140pub struct Error {
10141 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10143 pub reason: std::string::String,
10144
10145 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10148 pub error_uuid: std::string::String,
10149
10150 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10152 pub message: std::string::String,
10153
10154 #[serde(skip_serializing_if = "std::option::Option::is_none")]
10156 pub error_time: std::option::Option<wkt::Timestamp>,
10157
10158 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
10160 pub details: std::collections::HashMap<std::string::String, std::string::String>,
10161
10162 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10163 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10164}
10165
10166impl Error {
10167 pub fn new() -> Self {
10168 std::default::Default::default()
10169 }
10170
10171 pub fn set_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10173 self.reason = v.into();
10174 self
10175 }
10176
10177 pub fn set_error_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10179 self.error_uuid = v.into();
10180 self
10181 }
10182
10183 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10185 self.message = v.into();
10186 self
10187 }
10188
10189 pub fn set_error_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10191 mut self,
10192 v: T,
10193 ) -> Self {
10194 self.error_time = v.into();
10195 self
10196 }
10197
10198 pub fn set_details<T, K, V>(mut self, v: T) -> Self
10200 where
10201 T: std::iter::IntoIterator<Item = (K, V)>,
10202 K: std::convert::Into<std::string::String>,
10203 V: std::convert::Into<std::string::String>,
10204 {
10205 use std::iter::Iterator;
10206 self.details = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10207 self
10208 }
10209}
10210
10211impl wkt::message::Message for Error {
10212 fn typename() -> &'static str {
10213 "type.googleapis.com/google.cloud.datastream.v1.Error"
10214 }
10215}
10216
10217#[serde_with::serde_as]
10219#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10220#[serde(default, rename_all = "camelCase")]
10221#[non_exhaustive]
10222pub struct ValidationResult {
10223 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10226 pub validations: std::vec::Vec<crate::model::Validation>,
10227
10228 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10229 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10230}
10231
10232impl ValidationResult {
10233 pub fn new() -> Self {
10234 std::default::Default::default()
10235 }
10236
10237 pub fn set_validations<T, V>(mut self, v: T) -> Self
10239 where
10240 T: std::iter::IntoIterator<Item = V>,
10241 V: std::convert::Into<crate::model::Validation>,
10242 {
10243 use std::iter::Iterator;
10244 self.validations = v.into_iter().map(|i| i.into()).collect();
10245 self
10246 }
10247}
10248
10249impl wkt::message::Message for ValidationResult {
10250 fn typename() -> &'static str {
10251 "type.googleapis.com/google.cloud.datastream.v1.ValidationResult"
10252 }
10253}
10254
10255#[serde_with::serde_as]
10257#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10258#[serde(default, rename_all = "camelCase")]
10259#[non_exhaustive]
10260pub struct Validation {
10261 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10263 pub description: std::string::String,
10264
10265 pub state: crate::model::validation::State,
10267
10268 #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10270 pub message: std::vec::Vec<crate::model::ValidationMessage>,
10271
10272 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10274 pub code: std::string::String,
10275
10276 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10277 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10278}
10279
10280impl Validation {
10281 pub fn new() -> Self {
10282 std::default::Default::default()
10283 }
10284
10285 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10287 self.description = v.into();
10288 self
10289 }
10290
10291 pub fn set_state<T: std::convert::Into<crate::model::validation::State>>(
10293 mut self,
10294 v: T,
10295 ) -> Self {
10296 self.state = v.into();
10297 self
10298 }
10299
10300 pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10302 self.code = v.into();
10303 self
10304 }
10305
10306 pub fn set_message<T, V>(mut self, v: T) -> Self
10308 where
10309 T: std::iter::IntoIterator<Item = V>,
10310 V: std::convert::Into<crate::model::ValidationMessage>,
10311 {
10312 use std::iter::Iterator;
10313 self.message = v.into_iter().map(|i| i.into()).collect();
10314 self
10315 }
10316}
10317
10318impl wkt::message::Message for Validation {
10319 fn typename() -> &'static str {
10320 "type.googleapis.com/google.cloud.datastream.v1.Validation"
10321 }
10322}
10323
10324pub mod validation {
10326 #[allow(unused_imports)]
10327 use super::*;
10328
10329 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10331 pub struct State(i32);
10332
10333 impl State {
10334 pub const STATE_UNSPECIFIED: State = State::new(0);
10336
10337 pub const NOT_EXECUTED: State = State::new(1);
10339
10340 pub const FAILED: State = State::new(2);
10342
10343 pub const PASSED: State = State::new(3);
10345
10346 pub const WARNING: State = State::new(4);
10348
10349 pub(crate) const fn new(value: i32) -> Self {
10351 Self(value)
10352 }
10353
10354 pub fn value(&self) -> i32 {
10356 self.0
10357 }
10358
10359 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10361 match self.0 {
10362 0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
10363 1 => std::borrow::Cow::Borrowed("NOT_EXECUTED"),
10364 2 => std::borrow::Cow::Borrowed("FAILED"),
10365 3 => std::borrow::Cow::Borrowed("PASSED"),
10366 4 => std::borrow::Cow::Borrowed("WARNING"),
10367 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10368 }
10369 }
10370
10371 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10373 match name {
10374 "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
10375 "NOT_EXECUTED" => std::option::Option::Some(Self::NOT_EXECUTED),
10376 "FAILED" => std::option::Option::Some(Self::FAILED),
10377 "PASSED" => std::option::Option::Some(Self::PASSED),
10378 "WARNING" => std::option::Option::Some(Self::WARNING),
10379 _ => std::option::Option::None,
10380 }
10381 }
10382 }
10383
10384 impl std::convert::From<i32> for State {
10385 fn from(value: i32) -> Self {
10386 Self::new(value)
10387 }
10388 }
10389
10390 impl std::default::Default for State {
10391 fn default() -> Self {
10392 Self::new(0)
10393 }
10394 }
10395}
10396
10397#[serde_with::serde_as]
10399#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10400#[serde(default, rename_all = "camelCase")]
10401#[non_exhaustive]
10402pub struct ValidationMessage {
10403 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10405 pub message: std::string::String,
10406
10407 pub level: crate::model::validation_message::Level,
10409
10410 #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
10412 pub metadata: std::collections::HashMap<std::string::String, std::string::String>,
10413
10414 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10416 pub code: std::string::String,
10417
10418 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10419 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10420}
10421
10422impl ValidationMessage {
10423 pub fn new() -> Self {
10424 std::default::Default::default()
10425 }
10426
10427 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10429 self.message = v.into();
10430 self
10431 }
10432
10433 pub fn set_level<T: std::convert::Into<crate::model::validation_message::Level>>(
10435 mut self,
10436 v: T,
10437 ) -> Self {
10438 self.level = v.into();
10439 self
10440 }
10441
10442 pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10444 self.code = v.into();
10445 self
10446 }
10447
10448 pub fn set_metadata<T, K, V>(mut self, v: T) -> Self
10450 where
10451 T: std::iter::IntoIterator<Item = (K, V)>,
10452 K: std::convert::Into<std::string::String>,
10453 V: std::convert::Into<std::string::String>,
10454 {
10455 use std::iter::Iterator;
10456 self.metadata = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10457 self
10458 }
10459}
10460
10461impl wkt::message::Message for ValidationMessage {
10462 fn typename() -> &'static str {
10463 "type.googleapis.com/google.cloud.datastream.v1.ValidationMessage"
10464 }
10465}
10466
10467pub mod validation_message {
10469 #[allow(unused_imports)]
10470 use super::*;
10471
10472 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10474 pub struct Level(i32);
10475
10476 impl Level {
10477 pub const LEVEL_UNSPECIFIED: Level = Level::new(0);
10479
10480 pub const WARNING: Level = Level::new(1);
10482
10483 pub const ERROR: Level = Level::new(2);
10485
10486 pub(crate) const fn new(value: i32) -> Self {
10488 Self(value)
10489 }
10490
10491 pub fn value(&self) -> i32 {
10493 self.0
10494 }
10495
10496 pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10498 match self.0 {
10499 0 => std::borrow::Cow::Borrowed("LEVEL_UNSPECIFIED"),
10500 1 => std::borrow::Cow::Borrowed("WARNING"),
10501 2 => std::borrow::Cow::Borrowed("ERROR"),
10502 _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10503 }
10504 }
10505
10506 pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10508 match name {
10509 "LEVEL_UNSPECIFIED" => std::option::Option::Some(Self::LEVEL_UNSPECIFIED),
10510 "WARNING" => std::option::Option::Some(Self::WARNING),
10511 "ERROR" => std::option::Option::Some(Self::ERROR),
10512 _ => std::option::Option::None,
10513 }
10514 }
10515 }
10516
10517 impl std::convert::From<i32> for Level {
10518 fn from(value: i32) -> Self {
10519 Self::new(value)
10520 }
10521 }
10522
10523 impl std::default::Default for Level {
10524 fn default() -> Self {
10525 Self::new(0)
10526 }
10527 }
10528}
10529
10530#[serde_with::serde_as]
10532#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10533#[serde(default, rename_all = "camelCase")]
10534#[non_exhaustive]
10535pub struct CdcStrategy {
10536 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
10540 pub start_position: std::option::Option<crate::model::cdc_strategy::StartPosition>,
10541
10542 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10543 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10544}
10545
10546impl CdcStrategy {
10547 pub fn new() -> Self {
10548 std::default::Default::default()
10549 }
10550
10551 pub fn set_start_position<
10556 T: std::convert::Into<std::option::Option<crate::model::cdc_strategy::StartPosition>>,
10557 >(
10558 mut self,
10559 v: T,
10560 ) -> Self {
10561 self.start_position = v.into();
10562 self
10563 }
10564
10565 pub fn most_recent_start_position(
10569 &self,
10570 ) -> std::option::Option<&std::boxed::Box<crate::model::cdc_strategy::MostRecentStartPosition>>
10571 {
10572 #[allow(unreachable_patterns)]
10573 self.start_position.as_ref().and_then(|v| match v {
10574 crate::model::cdc_strategy::StartPosition::MostRecentStartPosition(v) => {
10575 std::option::Option::Some(v)
10576 }
10577 _ => std::option::Option::None,
10578 })
10579 }
10580
10581 pub fn next_available_start_position(
10585 &self,
10586 ) -> std::option::Option<&std::boxed::Box<crate::model::cdc_strategy::NextAvailableStartPosition>>
10587 {
10588 #[allow(unreachable_patterns)]
10589 self.start_position.as_ref().and_then(|v| match v {
10590 crate::model::cdc_strategy::StartPosition::NextAvailableStartPosition(v) => {
10591 std::option::Option::Some(v)
10592 }
10593 _ => std::option::Option::None,
10594 })
10595 }
10596
10597 pub fn specific_start_position(
10601 &self,
10602 ) -> std::option::Option<&std::boxed::Box<crate::model::cdc_strategy::SpecificStartPosition>>
10603 {
10604 #[allow(unreachable_patterns)]
10605 self.start_position.as_ref().and_then(|v| match v {
10606 crate::model::cdc_strategy::StartPosition::SpecificStartPosition(v) => {
10607 std::option::Option::Some(v)
10608 }
10609 _ => std::option::Option::None,
10610 })
10611 }
10612
10613 pub fn set_most_recent_start_position<
10619 T: std::convert::Into<std::boxed::Box<crate::model::cdc_strategy::MostRecentStartPosition>>,
10620 >(
10621 mut self,
10622 v: T,
10623 ) -> Self {
10624 self.start_position = std::option::Option::Some(
10625 crate::model::cdc_strategy::StartPosition::MostRecentStartPosition(v.into()),
10626 );
10627 self
10628 }
10629
10630 pub fn set_next_available_start_position<
10636 T: std::convert::Into<std::boxed::Box<crate::model::cdc_strategy::NextAvailableStartPosition>>,
10637 >(
10638 mut self,
10639 v: T,
10640 ) -> Self {
10641 self.start_position = std::option::Option::Some(
10642 crate::model::cdc_strategy::StartPosition::NextAvailableStartPosition(v.into()),
10643 );
10644 self
10645 }
10646
10647 pub fn set_specific_start_position<
10653 T: std::convert::Into<std::boxed::Box<crate::model::cdc_strategy::SpecificStartPosition>>,
10654 >(
10655 mut self,
10656 v: T,
10657 ) -> Self {
10658 self.start_position = std::option::Option::Some(
10659 crate::model::cdc_strategy::StartPosition::SpecificStartPosition(v.into()),
10660 );
10661 self
10662 }
10663}
10664
10665impl wkt::message::Message for CdcStrategy {
10666 fn typename() -> &'static str {
10667 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy"
10668 }
10669}
10670
10671pub mod cdc_strategy {
10673 #[allow(unused_imports)]
10674 use super::*;
10675
10676 #[serde_with::serde_as]
10679 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10680 #[serde(default, rename_all = "camelCase")]
10681 #[non_exhaustive]
10682 pub struct MostRecentStartPosition {
10683 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10684 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10685 }
10686
10687 impl MostRecentStartPosition {
10688 pub fn new() -> Self {
10689 std::default::Default::default()
10690 }
10691 }
10692
10693 impl wkt::message::Message for MostRecentStartPosition {
10694 fn typename() -> &'static str {
10695 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition"
10696 }
10697 }
10698
10699 #[serde_with::serde_as]
10702 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10703 #[serde(default, rename_all = "camelCase")]
10704 #[non_exhaustive]
10705 pub struct NextAvailableStartPosition {
10706 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10707 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10708 }
10709
10710 impl NextAvailableStartPosition {
10711 pub fn new() -> Self {
10712 std::default::Default::default()
10713 }
10714 }
10715
10716 impl wkt::message::Message for NextAvailableStartPosition {
10717 fn typename() -> &'static str {
10718 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition"
10719 }
10720 }
10721
10722 #[serde_with::serde_as]
10724 #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10725 #[serde(default, rename_all = "camelCase")]
10726 #[non_exhaustive]
10727 pub struct SpecificStartPosition {
10728 #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
10729 pub position:
10730 std::option::Option<crate::model::cdc_strategy::specific_start_position::Position>,
10731
10732 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10733 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10734 }
10735
10736 impl SpecificStartPosition {
10737 pub fn new() -> Self {
10738 std::default::Default::default()
10739 }
10740
10741 pub fn set_position<
10746 T: std::convert::Into<
10747 std::option::Option<
10748 crate::model::cdc_strategy::specific_start_position::Position,
10749 >,
10750 >,
10751 >(
10752 mut self,
10753 v: T,
10754 ) -> Self {
10755 self.position = v.into();
10756 self
10757 }
10758
10759 pub fn mysql_log_position(
10763 &self,
10764 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlLogPosition>> {
10765 #[allow(unreachable_patterns)]
10766 self.position.as_ref().and_then(|v| match v {
10767 crate::model::cdc_strategy::specific_start_position::Position::MysqlLogPosition(
10768 v,
10769 ) => std::option::Option::Some(v),
10770 _ => std::option::Option::None,
10771 })
10772 }
10773
10774 pub fn oracle_scn_position(
10778 &self,
10779 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleScnPosition>> {
10780 #[allow(unreachable_patterns)]
10781 self.position.as_ref().and_then(|v| match v {
10782 crate::model::cdc_strategy::specific_start_position::Position::OracleScnPosition(v) => std::option::Option::Some(v),
10783 _ => std::option::Option::None,
10784 })
10785 }
10786
10787 pub fn sql_server_lsn_position(
10791 &self,
10792 ) -> std::option::Option<&std::boxed::Box<crate::model::SqlServerLsnPosition>> {
10793 #[allow(unreachable_patterns)]
10794 self.position.as_ref().and_then(|v| match v {
10795 crate::model::cdc_strategy::specific_start_position::Position::SqlServerLsnPosition(v) => std::option::Option::Some(v),
10796 _ => std::option::Option::None,
10797 })
10798 }
10799
10800 pub fn mysql_gtid_position(
10804 &self,
10805 ) -> std::option::Option<&std::boxed::Box<crate::model::MysqlGtidPosition>> {
10806 #[allow(unreachable_patterns)]
10807 self.position.as_ref().and_then(|v| match v {
10808 crate::model::cdc_strategy::specific_start_position::Position::MysqlGtidPosition(v) => std::option::Option::Some(v),
10809 _ => std::option::Option::None,
10810 })
10811 }
10812
10813 pub fn set_mysql_log_position<
10819 T: std::convert::Into<std::boxed::Box<crate::model::MysqlLogPosition>>,
10820 >(
10821 mut self,
10822 v: T,
10823 ) -> Self {
10824 self.position = std::option::Option::Some(
10825 crate::model::cdc_strategy::specific_start_position::Position::MysqlLogPosition(
10826 v.into(),
10827 ),
10828 );
10829 self
10830 }
10831
10832 pub fn set_oracle_scn_position<
10838 T: std::convert::Into<std::boxed::Box<crate::model::OracleScnPosition>>,
10839 >(
10840 mut self,
10841 v: T,
10842 ) -> Self {
10843 self.position = std::option::Option::Some(
10844 crate::model::cdc_strategy::specific_start_position::Position::OracleScnPosition(
10845 v.into(),
10846 ),
10847 );
10848 self
10849 }
10850
10851 pub fn set_sql_server_lsn_position<
10857 T: std::convert::Into<std::boxed::Box<crate::model::SqlServerLsnPosition>>,
10858 >(
10859 mut self,
10860 v: T,
10861 ) -> Self {
10862 self.position = std::option::Option::Some(
10863 crate::model::cdc_strategy::specific_start_position::Position::SqlServerLsnPosition(
10864 v.into(),
10865 ),
10866 );
10867 self
10868 }
10869
10870 pub fn set_mysql_gtid_position<
10876 T: std::convert::Into<std::boxed::Box<crate::model::MysqlGtidPosition>>,
10877 >(
10878 mut self,
10879 v: T,
10880 ) -> Self {
10881 self.position = std::option::Option::Some(
10882 crate::model::cdc_strategy::specific_start_position::Position::MysqlGtidPosition(
10883 v.into(),
10884 ),
10885 );
10886 self
10887 }
10888 }
10889
10890 impl wkt::message::Message for SpecificStartPosition {
10891 fn typename() -> &'static str {
10892 "type.googleapis.com/google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition"
10893 }
10894 }
10895
10896 pub mod specific_start_position {
10898 #[allow(unused_imports)]
10899 use super::*;
10900
10901 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10902 #[serde(rename_all = "camelCase")]
10903 #[non_exhaustive]
10904 pub enum Position {
10905 MysqlLogPosition(std::boxed::Box<crate::model::MysqlLogPosition>),
10907 OracleScnPosition(std::boxed::Box<crate::model::OracleScnPosition>),
10909 SqlServerLsnPosition(std::boxed::Box<crate::model::SqlServerLsnPosition>),
10911 MysqlGtidPosition(std::boxed::Box<crate::model::MysqlGtidPosition>),
10913 }
10914 }
10915
10916 #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10920 #[serde(rename_all = "camelCase")]
10921 #[non_exhaustive]
10922 pub enum StartPosition {
10923 MostRecentStartPosition(
10925 std::boxed::Box<crate::model::cdc_strategy::MostRecentStartPosition>,
10926 ),
10927 NextAvailableStartPosition(
10930 std::boxed::Box<crate::model::cdc_strategy::NextAvailableStartPosition>,
10931 ),
10932 SpecificStartPosition(std::boxed::Box<crate::model::cdc_strategy::SpecificStartPosition>),
10934 }
10935}
10936
10937#[serde_with::serde_as]
10939#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10940#[serde(default, rename_all = "camelCase")]
10941#[non_exhaustive]
10942pub struct SqlServerLsnPosition {
10943 #[serde(skip_serializing_if = "std::string::String::is_empty")]
10945 pub lsn: std::string::String,
10946
10947 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10948 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10949}
10950
10951impl SqlServerLsnPosition {
10952 pub fn new() -> Self {
10953 std::default::Default::default()
10954 }
10955
10956 pub fn set_lsn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10958 self.lsn = v.into();
10959 self
10960 }
10961}
10962
10963impl wkt::message::Message for SqlServerLsnPosition {
10964 fn typename() -> &'static str {
10965 "type.googleapis.com/google.cloud.datastream.v1.SqlServerLsnPosition"
10966 }
10967}
10968
10969#[serde_with::serde_as]
10971#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10972#[serde(default, rename_all = "camelCase")]
10973#[non_exhaustive]
10974pub struct OracleScnPosition {
10975 #[serde_as(as = "serde_with::DisplayFromStr")]
10977 pub scn: i64,
10978
10979 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10980 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10981}
10982
10983impl OracleScnPosition {
10984 pub fn new() -> Self {
10985 std::default::Default::default()
10986 }
10987
10988 pub fn set_scn<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10990 self.scn = v.into();
10991 self
10992 }
10993}
10994
10995impl wkt::message::Message for OracleScnPosition {
10996 fn typename() -> &'static str {
10997 "type.googleapis.com/google.cloud.datastream.v1.OracleScnPosition"
10998 }
10999}
11000
11001#[serde_with::serde_as]
11003#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11004#[serde(default, rename_all = "camelCase")]
11005#[non_exhaustive]
11006pub struct MysqlLogPosition {
11007 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11009 pub log_file: std::string::String,
11010
11011 #[serde(skip_serializing_if = "std::option::Option::is_none")]
11013 pub log_position: std::option::Option<i32>,
11014
11015 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11016 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11017}
11018
11019impl MysqlLogPosition {
11020 pub fn new() -> Self {
11021 std::default::Default::default()
11022 }
11023
11024 pub fn set_log_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11026 self.log_file = v.into();
11027 self
11028 }
11029
11030 pub fn set_log_position<T: std::convert::Into<std::option::Option<i32>>>(
11032 mut self,
11033 v: T,
11034 ) -> Self {
11035 self.log_position = v.into();
11036 self
11037 }
11038}
11039
11040impl wkt::message::Message for MysqlLogPosition {
11041 fn typename() -> &'static str {
11042 "type.googleapis.com/google.cloud.datastream.v1.MysqlLogPosition"
11043 }
11044}
11045
11046#[serde_with::serde_as]
11048#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11049#[serde(default, rename_all = "camelCase")]
11050#[non_exhaustive]
11051pub struct MysqlGtidPosition {
11052 #[serde(skip_serializing_if = "std::string::String::is_empty")]
11054 pub gtid_set: std::string::String,
11055
11056 #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11057 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11058}
11059
11060impl MysqlGtidPosition {
11061 pub fn new() -> Self {
11062 std::default::Default::default()
11063 }
11064
11065 pub fn set_gtid_set<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11067 self.gtid_set = v.into();
11068 self
11069 }
11070}
11071
11072impl wkt::message::Message for MysqlGtidPosition {
11073 fn typename() -> &'static str {
11074 "type.googleapis.com/google.cloud.datastream.v1.MysqlGtidPosition"
11075 }
11076}