1#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate rpc;
31extern crate serde;
32extern crate serde_json;
33extern crate serde_with;
34extern crate std;
35extern crate tracing;
36extern crate wkt;
37
38mod debug;
39mod deserialize;
40mod serialize;
41
42#[derive(Clone, Default, PartialEq)]
44#[non_exhaustive]
45pub struct ListMigrationJobsRequest {
46 pub parent: std::string::String,
48
49 pub page_size: i32,
54
55 pub page_token: std::string::String,
61
62 pub filter: std::string::String,
72
73 pub order_by: std::string::String,
76
77 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
78}
79
80impl ListMigrationJobsRequest {
81 pub fn new() -> Self {
82 std::default::Default::default()
83 }
84
85 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
87 self.parent = v.into();
88 self
89 }
90
91 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
93 self.page_size = v.into();
94 self
95 }
96
97 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
99 self.page_token = v.into();
100 self
101 }
102
103 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
105 self.filter = v.into();
106 self
107 }
108
109 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
111 self.order_by = v.into();
112 self
113 }
114}
115
116impl wkt::message::Message for ListMigrationJobsRequest {
117 fn typename() -> &'static str {
118 "type.googleapis.com/google.cloud.clouddms.v1.ListMigrationJobsRequest"
119 }
120}
121
122#[derive(Clone, Default, PartialEq)]
124#[non_exhaustive]
125pub struct ListMigrationJobsResponse {
126 pub migration_jobs: std::vec::Vec<crate::model::MigrationJob>,
128
129 pub next_page_token: std::string::String,
132
133 pub unreachable: std::vec::Vec<std::string::String>,
135
136 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
137}
138
139impl ListMigrationJobsResponse {
140 pub fn new() -> Self {
141 std::default::Default::default()
142 }
143
144 pub fn set_migration_jobs<T, V>(mut self, v: T) -> Self
146 where
147 T: std::iter::IntoIterator<Item = V>,
148 V: std::convert::Into<crate::model::MigrationJob>,
149 {
150 use std::iter::Iterator;
151 self.migration_jobs = v.into_iter().map(|i| i.into()).collect();
152 self
153 }
154
155 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
157 self.next_page_token = v.into();
158 self
159 }
160
161 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
163 where
164 T: std::iter::IntoIterator<Item = V>,
165 V: std::convert::Into<std::string::String>,
166 {
167 use std::iter::Iterator;
168 self.unreachable = v.into_iter().map(|i| i.into()).collect();
169 self
170 }
171}
172
173impl wkt::message::Message for ListMigrationJobsResponse {
174 fn typename() -> &'static str {
175 "type.googleapis.com/google.cloud.clouddms.v1.ListMigrationJobsResponse"
176 }
177}
178
179#[doc(hidden)]
180impl gax::paginator::internal::PageableResponse for ListMigrationJobsResponse {
181 type PageItem = crate::model::MigrationJob;
182
183 fn items(self) -> std::vec::Vec<Self::PageItem> {
184 self.migration_jobs
185 }
186
187 fn next_page_token(&self) -> std::string::String {
188 use std::clone::Clone;
189 self.next_page_token.clone()
190 }
191}
192
193#[derive(Clone, Default, PartialEq)]
195#[non_exhaustive]
196pub struct GetMigrationJobRequest {
197 pub name: std::string::String,
199
200 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
201}
202
203impl GetMigrationJobRequest {
204 pub fn new() -> Self {
205 std::default::Default::default()
206 }
207
208 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
210 self.name = v.into();
211 self
212 }
213}
214
215impl wkt::message::Message for GetMigrationJobRequest {
216 fn typename() -> &'static str {
217 "type.googleapis.com/google.cloud.clouddms.v1.GetMigrationJobRequest"
218 }
219}
220
221#[derive(Clone, Default, PartialEq)]
224#[non_exhaustive]
225pub struct CreateMigrationJobRequest {
226 pub parent: std::string::String,
228
229 pub migration_job_id: std::string::String,
231
232 pub migration_job: std::option::Option<crate::model::MigrationJob>,
236
237 pub request_id: std::string::String,
245
246 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
247}
248
249impl CreateMigrationJobRequest {
250 pub fn new() -> Self {
251 std::default::Default::default()
252 }
253
254 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
256 self.parent = v.into();
257 self
258 }
259
260 pub fn set_migration_job_id<T: std::convert::Into<std::string::String>>(
262 mut self,
263 v: T,
264 ) -> Self {
265 self.migration_job_id = v.into();
266 self
267 }
268
269 pub fn set_migration_job<T>(mut self, v: T) -> Self
271 where
272 T: std::convert::Into<crate::model::MigrationJob>,
273 {
274 self.migration_job = std::option::Option::Some(v.into());
275 self
276 }
277
278 pub fn set_or_clear_migration_job<T>(mut self, v: std::option::Option<T>) -> Self
280 where
281 T: std::convert::Into<crate::model::MigrationJob>,
282 {
283 self.migration_job = v.map(|x| x.into());
284 self
285 }
286
287 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
289 self.request_id = v.into();
290 self
291 }
292}
293
294impl wkt::message::Message for CreateMigrationJobRequest {
295 fn typename() -> &'static str {
296 "type.googleapis.com/google.cloud.clouddms.v1.CreateMigrationJobRequest"
297 }
298}
299
300#[derive(Clone, Default, PartialEq)]
302#[non_exhaustive]
303pub struct UpdateMigrationJobRequest {
304 pub update_mask: std::option::Option<wkt::FieldMask>,
307
308 pub migration_job: std::option::Option<crate::model::MigrationJob>,
310
311 pub request_id: std::string::String,
319
320 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
321}
322
323impl UpdateMigrationJobRequest {
324 pub fn new() -> Self {
325 std::default::Default::default()
326 }
327
328 pub fn set_update_mask<T>(mut self, v: T) -> Self
330 where
331 T: std::convert::Into<wkt::FieldMask>,
332 {
333 self.update_mask = std::option::Option::Some(v.into());
334 self
335 }
336
337 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
339 where
340 T: std::convert::Into<wkt::FieldMask>,
341 {
342 self.update_mask = v.map(|x| x.into());
343 self
344 }
345
346 pub fn set_migration_job<T>(mut self, v: T) -> Self
348 where
349 T: std::convert::Into<crate::model::MigrationJob>,
350 {
351 self.migration_job = std::option::Option::Some(v.into());
352 self
353 }
354
355 pub fn set_or_clear_migration_job<T>(mut self, v: std::option::Option<T>) -> Self
357 where
358 T: std::convert::Into<crate::model::MigrationJob>,
359 {
360 self.migration_job = v.map(|x| x.into());
361 self
362 }
363
364 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
366 self.request_id = v.into();
367 self
368 }
369}
370
371impl wkt::message::Message for UpdateMigrationJobRequest {
372 fn typename() -> &'static str {
373 "type.googleapis.com/google.cloud.clouddms.v1.UpdateMigrationJobRequest"
374 }
375}
376
377#[derive(Clone, Default, PartialEq)]
379#[non_exhaustive]
380pub struct DeleteMigrationJobRequest {
381 pub name: std::string::String,
383
384 pub request_id: std::string::String,
392
393 pub force: bool,
397
398 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
399}
400
401impl DeleteMigrationJobRequest {
402 pub fn new() -> Self {
403 std::default::Default::default()
404 }
405
406 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
408 self.name = v.into();
409 self
410 }
411
412 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
414 self.request_id = v.into();
415 self
416 }
417
418 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
420 self.force = v.into();
421 self
422 }
423}
424
425impl wkt::message::Message for DeleteMigrationJobRequest {
426 fn typename() -> &'static str {
427 "type.googleapis.com/google.cloud.clouddms.v1.DeleteMigrationJobRequest"
428 }
429}
430
431#[derive(Clone, Default, PartialEq)]
433#[non_exhaustive]
434pub struct StartMigrationJobRequest {
435 pub name: std::string::String,
437
438 pub skip_validation: bool,
441
442 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
443}
444
445impl StartMigrationJobRequest {
446 pub fn new() -> Self {
447 std::default::Default::default()
448 }
449
450 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
452 self.name = v.into();
453 self
454 }
455
456 pub fn set_skip_validation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
458 self.skip_validation = v.into();
459 self
460 }
461}
462
463impl wkt::message::Message for StartMigrationJobRequest {
464 fn typename() -> &'static str {
465 "type.googleapis.com/google.cloud.clouddms.v1.StartMigrationJobRequest"
466 }
467}
468
469#[derive(Clone, Default, PartialEq)]
471#[non_exhaustive]
472pub struct StopMigrationJobRequest {
473 pub name: std::string::String,
475
476 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
477}
478
479impl StopMigrationJobRequest {
480 pub fn new() -> Self {
481 std::default::Default::default()
482 }
483
484 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
486 self.name = v.into();
487 self
488 }
489}
490
491impl wkt::message::Message for StopMigrationJobRequest {
492 fn typename() -> &'static str {
493 "type.googleapis.com/google.cloud.clouddms.v1.StopMigrationJobRequest"
494 }
495}
496
497#[derive(Clone, Default, PartialEq)]
499#[non_exhaustive]
500pub struct ResumeMigrationJobRequest {
501 pub name: std::string::String,
503
504 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
505}
506
507impl ResumeMigrationJobRequest {
508 pub fn new() -> Self {
509 std::default::Default::default()
510 }
511
512 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
514 self.name = v.into();
515 self
516 }
517}
518
519impl wkt::message::Message for ResumeMigrationJobRequest {
520 fn typename() -> &'static str {
521 "type.googleapis.com/google.cloud.clouddms.v1.ResumeMigrationJobRequest"
522 }
523}
524
525#[derive(Clone, Default, PartialEq)]
527#[non_exhaustive]
528pub struct PromoteMigrationJobRequest {
529 pub name: std::string::String,
531
532 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
533}
534
535impl PromoteMigrationJobRequest {
536 pub fn new() -> Self {
537 std::default::Default::default()
538 }
539
540 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
542 self.name = v.into();
543 self
544 }
545}
546
547impl wkt::message::Message for PromoteMigrationJobRequest {
548 fn typename() -> &'static str {
549 "type.googleapis.com/google.cloud.clouddms.v1.PromoteMigrationJobRequest"
550 }
551}
552
553#[derive(Clone, Default, PartialEq)]
555#[non_exhaustive]
556pub struct VerifyMigrationJobRequest {
557 pub name: std::string::String,
559
560 pub update_mask: std::option::Option<wkt::FieldMask>,
563
564 pub migration_job: std::option::Option<crate::model::MigrationJob>,
567
568 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
569}
570
571impl VerifyMigrationJobRequest {
572 pub fn new() -> Self {
573 std::default::Default::default()
574 }
575
576 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
578 self.name = v.into();
579 self
580 }
581
582 pub fn set_update_mask<T>(mut self, v: T) -> Self
584 where
585 T: std::convert::Into<wkt::FieldMask>,
586 {
587 self.update_mask = std::option::Option::Some(v.into());
588 self
589 }
590
591 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
593 where
594 T: std::convert::Into<wkt::FieldMask>,
595 {
596 self.update_mask = v.map(|x| x.into());
597 self
598 }
599
600 pub fn set_migration_job<T>(mut self, v: T) -> Self
602 where
603 T: std::convert::Into<crate::model::MigrationJob>,
604 {
605 self.migration_job = std::option::Option::Some(v.into());
606 self
607 }
608
609 pub fn set_or_clear_migration_job<T>(mut self, v: std::option::Option<T>) -> Self
611 where
612 T: std::convert::Into<crate::model::MigrationJob>,
613 {
614 self.migration_job = v.map(|x| x.into());
615 self
616 }
617}
618
619impl wkt::message::Message for VerifyMigrationJobRequest {
620 fn typename() -> &'static str {
621 "type.googleapis.com/google.cloud.clouddms.v1.VerifyMigrationJobRequest"
622 }
623}
624
625#[derive(Clone, Default, PartialEq)]
627#[non_exhaustive]
628pub struct RestartMigrationJobRequest {
629 pub name: std::string::String,
631
632 pub skip_validation: bool,
635
636 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
637}
638
639impl RestartMigrationJobRequest {
640 pub fn new() -> Self {
641 std::default::Default::default()
642 }
643
644 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
646 self.name = v.into();
647 self
648 }
649
650 pub fn set_skip_validation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
652 self.skip_validation = v.into();
653 self
654 }
655}
656
657impl wkt::message::Message for RestartMigrationJobRequest {
658 fn typename() -> &'static str {
659 "type.googleapis.com/google.cloud.clouddms.v1.RestartMigrationJobRequest"
660 }
661}
662
663#[derive(Clone, Default, PartialEq)]
665#[non_exhaustive]
666pub struct GenerateSshScriptRequest {
667 pub migration_job: std::string::String,
669
670 pub vm: std::string::String,
672
673 pub vm_port: i32,
675
676 pub vm_config: std::option::Option<crate::model::generate_ssh_script_request::VmConfig>,
678
679 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
680}
681
682impl GenerateSshScriptRequest {
683 pub fn new() -> Self {
684 std::default::Default::default()
685 }
686
687 pub fn set_migration_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
689 self.migration_job = v.into();
690 self
691 }
692
693 pub fn set_vm<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
695 self.vm = v.into();
696 self
697 }
698
699 pub fn set_vm_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
701 self.vm_port = v.into();
702 self
703 }
704
705 pub fn set_vm_config<
710 T: std::convert::Into<
711 std::option::Option<crate::model::generate_ssh_script_request::VmConfig>,
712 >,
713 >(
714 mut self,
715 v: T,
716 ) -> Self {
717 self.vm_config = v.into();
718 self
719 }
720
721 pub fn vm_creation_config(
725 &self,
726 ) -> std::option::Option<&std::boxed::Box<crate::model::VmCreationConfig>> {
727 #[allow(unreachable_patterns)]
728 self.vm_config.as_ref().and_then(|v| match v {
729 crate::model::generate_ssh_script_request::VmConfig::VmCreationConfig(v) => {
730 std::option::Option::Some(v)
731 }
732 _ => std::option::Option::None,
733 })
734 }
735
736 pub fn set_vm_creation_config<
742 T: std::convert::Into<std::boxed::Box<crate::model::VmCreationConfig>>,
743 >(
744 mut self,
745 v: T,
746 ) -> Self {
747 self.vm_config = std::option::Option::Some(
748 crate::model::generate_ssh_script_request::VmConfig::VmCreationConfig(v.into()),
749 );
750 self
751 }
752
753 pub fn vm_selection_config(
757 &self,
758 ) -> std::option::Option<&std::boxed::Box<crate::model::VmSelectionConfig>> {
759 #[allow(unreachable_patterns)]
760 self.vm_config.as_ref().and_then(|v| match v {
761 crate::model::generate_ssh_script_request::VmConfig::VmSelectionConfig(v) => {
762 std::option::Option::Some(v)
763 }
764 _ => std::option::Option::None,
765 })
766 }
767
768 pub fn set_vm_selection_config<
774 T: std::convert::Into<std::boxed::Box<crate::model::VmSelectionConfig>>,
775 >(
776 mut self,
777 v: T,
778 ) -> Self {
779 self.vm_config = std::option::Option::Some(
780 crate::model::generate_ssh_script_request::VmConfig::VmSelectionConfig(v.into()),
781 );
782 self
783 }
784}
785
786impl wkt::message::Message for GenerateSshScriptRequest {
787 fn typename() -> &'static str {
788 "type.googleapis.com/google.cloud.clouddms.v1.GenerateSshScriptRequest"
789 }
790}
791
792pub mod generate_ssh_script_request {
794 #[allow(unused_imports)]
795 use super::*;
796
797 #[derive(Clone, Debug, PartialEq)]
799 #[non_exhaustive]
800 pub enum VmConfig {
801 VmCreationConfig(std::boxed::Box<crate::model::VmCreationConfig>),
803 VmSelectionConfig(std::boxed::Box<crate::model::VmSelectionConfig>),
805 }
806}
807
808#[derive(Clone, Default, PartialEq)]
810#[non_exhaustive]
811pub struct VmCreationConfig {
812 pub vm_machine_type: std::string::String,
814
815 pub vm_zone: std::string::String,
817
818 pub subnet: std::string::String,
820
821 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
822}
823
824impl VmCreationConfig {
825 pub fn new() -> Self {
826 std::default::Default::default()
827 }
828
829 pub fn set_vm_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
831 self.vm_machine_type = v.into();
832 self
833 }
834
835 pub fn set_vm_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
837 self.vm_zone = v.into();
838 self
839 }
840
841 pub fn set_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
843 self.subnet = v.into();
844 self
845 }
846}
847
848impl wkt::message::Message for VmCreationConfig {
849 fn typename() -> &'static str {
850 "type.googleapis.com/google.cloud.clouddms.v1.VmCreationConfig"
851 }
852}
853
854#[derive(Clone, Default, PartialEq)]
856#[non_exhaustive]
857pub struct VmSelectionConfig {
858 pub vm_zone: std::string::String,
860
861 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
862}
863
864impl VmSelectionConfig {
865 pub fn new() -> Self {
866 std::default::Default::default()
867 }
868
869 pub fn set_vm_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
871 self.vm_zone = v.into();
872 self
873 }
874}
875
876impl wkt::message::Message for VmSelectionConfig {
877 fn typename() -> &'static str {
878 "type.googleapis.com/google.cloud.clouddms.v1.VmSelectionConfig"
879 }
880}
881
882#[derive(Clone, Default, PartialEq)]
884#[non_exhaustive]
885pub struct SshScript {
886 pub script: std::string::String,
888
889 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
890}
891
892impl SshScript {
893 pub fn new() -> Self {
894 std::default::Default::default()
895 }
896
897 pub fn set_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
899 self.script = v.into();
900 self
901 }
902}
903
904impl wkt::message::Message for SshScript {
905 fn typename() -> &'static str {
906 "type.googleapis.com/google.cloud.clouddms.v1.SshScript"
907 }
908}
909
910#[derive(Clone, Default, PartialEq)]
912#[non_exhaustive]
913pub struct GenerateTcpProxyScriptRequest {
914 pub migration_job: std::string::String,
916
917 pub vm_name: std::string::String,
919
920 pub vm_machine_type: std::string::String,
922
923 pub vm_zone: std::string::String,
928
929 pub vm_subnet: std::string::String,
934
935 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
936}
937
938impl GenerateTcpProxyScriptRequest {
939 pub fn new() -> Self {
940 std::default::Default::default()
941 }
942
943 pub fn set_migration_job<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
945 self.migration_job = v.into();
946 self
947 }
948
949 pub fn set_vm_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
951 self.vm_name = v.into();
952 self
953 }
954
955 pub fn set_vm_machine_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
957 self.vm_machine_type = v.into();
958 self
959 }
960
961 pub fn set_vm_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
963 self.vm_zone = v.into();
964 self
965 }
966
967 pub fn set_vm_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
969 self.vm_subnet = v.into();
970 self
971 }
972}
973
974impl wkt::message::Message for GenerateTcpProxyScriptRequest {
975 fn typename() -> &'static str {
976 "type.googleapis.com/google.cloud.clouddms.v1.GenerateTcpProxyScriptRequest"
977 }
978}
979
980#[derive(Clone, Default, PartialEq)]
982#[non_exhaustive]
983pub struct TcpProxyScript {
984 pub script: std::string::String,
986
987 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
988}
989
990impl TcpProxyScript {
991 pub fn new() -> Self {
992 std::default::Default::default()
993 }
994
995 pub fn set_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
997 self.script = v.into();
998 self
999 }
1000}
1001
1002impl wkt::message::Message for TcpProxyScript {
1003 fn typename() -> &'static str {
1004 "type.googleapis.com/google.cloud.clouddms.v1.TcpProxyScript"
1005 }
1006}
1007
1008#[derive(Clone, Default, PartialEq)]
1010#[non_exhaustive]
1011pub struct ListConnectionProfilesRequest {
1012 pub parent: std::string::String,
1014
1015 pub page_size: i32,
1020
1021 pub page_token: std::string::String,
1027
1028 pub filter: std::string::String,
1038
1039 pub order_by: std::string::String,
1041
1042 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1043}
1044
1045impl ListConnectionProfilesRequest {
1046 pub fn new() -> Self {
1047 std::default::Default::default()
1048 }
1049
1050 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1052 self.parent = v.into();
1053 self
1054 }
1055
1056 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1058 self.page_size = v.into();
1059 self
1060 }
1061
1062 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1064 self.page_token = v.into();
1065 self
1066 }
1067
1068 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1070 self.filter = v.into();
1071 self
1072 }
1073
1074 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1076 self.order_by = v.into();
1077 self
1078 }
1079}
1080
1081impl wkt::message::Message for ListConnectionProfilesRequest {
1082 fn typename() -> &'static str {
1083 "type.googleapis.com/google.cloud.clouddms.v1.ListConnectionProfilesRequest"
1084 }
1085}
1086
1087#[derive(Clone, Default, PartialEq)]
1089#[non_exhaustive]
1090pub struct ListConnectionProfilesResponse {
1091 pub connection_profiles: std::vec::Vec<crate::model::ConnectionProfile>,
1093
1094 pub next_page_token: std::string::String,
1097
1098 pub unreachable: std::vec::Vec<std::string::String>,
1100
1101 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1102}
1103
1104impl ListConnectionProfilesResponse {
1105 pub fn new() -> Self {
1106 std::default::Default::default()
1107 }
1108
1109 pub fn set_connection_profiles<T, V>(mut self, v: T) -> Self
1111 where
1112 T: std::iter::IntoIterator<Item = V>,
1113 V: std::convert::Into<crate::model::ConnectionProfile>,
1114 {
1115 use std::iter::Iterator;
1116 self.connection_profiles = v.into_iter().map(|i| i.into()).collect();
1117 self
1118 }
1119
1120 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1122 self.next_page_token = v.into();
1123 self
1124 }
1125
1126 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1128 where
1129 T: std::iter::IntoIterator<Item = V>,
1130 V: std::convert::Into<std::string::String>,
1131 {
1132 use std::iter::Iterator;
1133 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1134 self
1135 }
1136}
1137
1138impl wkt::message::Message for ListConnectionProfilesResponse {
1139 fn typename() -> &'static str {
1140 "type.googleapis.com/google.cloud.clouddms.v1.ListConnectionProfilesResponse"
1141 }
1142}
1143
1144#[doc(hidden)]
1145impl gax::paginator::internal::PageableResponse for ListConnectionProfilesResponse {
1146 type PageItem = crate::model::ConnectionProfile;
1147
1148 fn items(self) -> std::vec::Vec<Self::PageItem> {
1149 self.connection_profiles
1150 }
1151
1152 fn next_page_token(&self) -> std::string::String {
1153 use std::clone::Clone;
1154 self.next_page_token.clone()
1155 }
1156}
1157
1158#[derive(Clone, Default, PartialEq)]
1160#[non_exhaustive]
1161pub struct GetConnectionProfileRequest {
1162 pub name: std::string::String,
1164
1165 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1166}
1167
1168impl GetConnectionProfileRequest {
1169 pub fn new() -> Self {
1170 std::default::Default::default()
1171 }
1172
1173 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1175 self.name = v.into();
1176 self
1177 }
1178}
1179
1180impl wkt::message::Message for GetConnectionProfileRequest {
1181 fn typename() -> &'static str {
1182 "type.googleapis.com/google.cloud.clouddms.v1.GetConnectionProfileRequest"
1183 }
1184}
1185
1186#[derive(Clone, Default, PartialEq)]
1188#[non_exhaustive]
1189pub struct CreateConnectionProfileRequest {
1190 pub parent: std::string::String,
1192
1193 pub connection_profile_id: std::string::String,
1195
1196 pub connection_profile: std::option::Option<crate::model::ConnectionProfile>,
1198
1199 pub request_id: std::string::String,
1207
1208 pub validate_only: bool,
1212
1213 pub skip_validation: bool,
1217
1218 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1219}
1220
1221impl CreateConnectionProfileRequest {
1222 pub fn new() -> Self {
1223 std::default::Default::default()
1224 }
1225
1226 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1228 self.parent = v.into();
1229 self
1230 }
1231
1232 pub fn set_connection_profile_id<T: std::convert::Into<std::string::String>>(
1234 mut self,
1235 v: T,
1236 ) -> Self {
1237 self.connection_profile_id = v.into();
1238 self
1239 }
1240
1241 pub fn set_connection_profile<T>(mut self, v: T) -> Self
1243 where
1244 T: std::convert::Into<crate::model::ConnectionProfile>,
1245 {
1246 self.connection_profile = std::option::Option::Some(v.into());
1247 self
1248 }
1249
1250 pub fn set_or_clear_connection_profile<T>(mut self, v: std::option::Option<T>) -> Self
1252 where
1253 T: std::convert::Into<crate::model::ConnectionProfile>,
1254 {
1255 self.connection_profile = v.map(|x| x.into());
1256 self
1257 }
1258
1259 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1261 self.request_id = v.into();
1262 self
1263 }
1264
1265 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1267 self.validate_only = v.into();
1268 self
1269 }
1270
1271 pub fn set_skip_validation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1273 self.skip_validation = v.into();
1274 self
1275 }
1276}
1277
1278impl wkt::message::Message for CreateConnectionProfileRequest {
1279 fn typename() -> &'static str {
1280 "type.googleapis.com/google.cloud.clouddms.v1.CreateConnectionProfileRequest"
1281 }
1282}
1283
1284#[derive(Clone, Default, PartialEq)]
1286#[non_exhaustive]
1287pub struct UpdateConnectionProfileRequest {
1288 pub update_mask: std::option::Option<wkt::FieldMask>,
1291
1292 pub connection_profile: std::option::Option<crate::model::ConnectionProfile>,
1294
1295 pub request_id: std::string::String,
1303
1304 pub validate_only: bool,
1308
1309 pub skip_validation: bool,
1313
1314 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1315}
1316
1317impl UpdateConnectionProfileRequest {
1318 pub fn new() -> Self {
1319 std::default::Default::default()
1320 }
1321
1322 pub fn set_update_mask<T>(mut self, v: T) -> Self
1324 where
1325 T: std::convert::Into<wkt::FieldMask>,
1326 {
1327 self.update_mask = std::option::Option::Some(v.into());
1328 self
1329 }
1330
1331 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1333 where
1334 T: std::convert::Into<wkt::FieldMask>,
1335 {
1336 self.update_mask = v.map(|x| x.into());
1337 self
1338 }
1339
1340 pub fn set_connection_profile<T>(mut self, v: T) -> Self
1342 where
1343 T: std::convert::Into<crate::model::ConnectionProfile>,
1344 {
1345 self.connection_profile = std::option::Option::Some(v.into());
1346 self
1347 }
1348
1349 pub fn set_or_clear_connection_profile<T>(mut self, v: std::option::Option<T>) -> Self
1351 where
1352 T: std::convert::Into<crate::model::ConnectionProfile>,
1353 {
1354 self.connection_profile = v.map(|x| x.into());
1355 self
1356 }
1357
1358 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1360 self.request_id = v.into();
1361 self
1362 }
1363
1364 pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1366 self.validate_only = v.into();
1367 self
1368 }
1369
1370 pub fn set_skip_validation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1372 self.skip_validation = v.into();
1373 self
1374 }
1375}
1376
1377impl wkt::message::Message for UpdateConnectionProfileRequest {
1378 fn typename() -> &'static str {
1379 "type.googleapis.com/google.cloud.clouddms.v1.UpdateConnectionProfileRequest"
1380 }
1381}
1382
1383#[derive(Clone, Default, PartialEq)]
1385#[non_exhaustive]
1386pub struct DeleteConnectionProfileRequest {
1387 pub name: std::string::String,
1389
1390 pub request_id: std::string::String,
1398
1399 pub force: bool,
1402
1403 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1404}
1405
1406impl DeleteConnectionProfileRequest {
1407 pub fn new() -> Self {
1408 std::default::Default::default()
1409 }
1410
1411 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1413 self.name = v.into();
1414 self
1415 }
1416
1417 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1419 self.request_id = v.into();
1420 self
1421 }
1422
1423 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1425 self.force = v.into();
1426 self
1427 }
1428}
1429
1430impl wkt::message::Message for DeleteConnectionProfileRequest {
1431 fn typename() -> &'static str {
1432 "type.googleapis.com/google.cloud.clouddms.v1.DeleteConnectionProfileRequest"
1433 }
1434}
1435
1436#[derive(Clone, Default, PartialEq)]
1439#[non_exhaustive]
1440pub struct CreatePrivateConnectionRequest {
1441 pub parent: std::string::String,
1443
1444 pub private_connection_id: std::string::String,
1446
1447 pub private_connection: std::option::Option<crate::model::PrivateConnection>,
1449
1450 pub request_id: std::string::String,
1458
1459 pub skip_validation: bool,
1461
1462 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1463}
1464
1465impl CreatePrivateConnectionRequest {
1466 pub fn new() -> Self {
1467 std::default::Default::default()
1468 }
1469
1470 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1472 self.parent = v.into();
1473 self
1474 }
1475
1476 pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
1478 mut self,
1479 v: T,
1480 ) -> Self {
1481 self.private_connection_id = v.into();
1482 self
1483 }
1484
1485 pub fn set_private_connection<T>(mut self, v: T) -> Self
1487 where
1488 T: std::convert::Into<crate::model::PrivateConnection>,
1489 {
1490 self.private_connection = std::option::Option::Some(v.into());
1491 self
1492 }
1493
1494 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
1496 where
1497 T: std::convert::Into<crate::model::PrivateConnection>,
1498 {
1499 self.private_connection = v.map(|x| x.into());
1500 self
1501 }
1502
1503 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1505 self.request_id = v.into();
1506 self
1507 }
1508
1509 pub fn set_skip_validation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1511 self.skip_validation = v.into();
1512 self
1513 }
1514}
1515
1516impl wkt::message::Message for CreatePrivateConnectionRequest {
1517 fn typename() -> &'static str {
1518 "type.googleapis.com/google.cloud.clouddms.v1.CreatePrivateConnectionRequest"
1519 }
1520}
1521
1522#[derive(Clone, Default, PartialEq)]
1525#[non_exhaustive]
1526pub struct ListPrivateConnectionsRequest {
1527 pub parent: std::string::String,
1529
1530 pub page_size: i32,
1534
1535 pub page_token: std::string::String,
1542
1543 pub filter: std::string::String,
1550
1551 pub order_by: std::string::String,
1553
1554 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1555}
1556
1557impl ListPrivateConnectionsRequest {
1558 pub fn new() -> Self {
1559 std::default::Default::default()
1560 }
1561
1562 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1564 self.parent = v.into();
1565 self
1566 }
1567
1568 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1570 self.page_size = v.into();
1571 self
1572 }
1573
1574 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1576 self.page_token = v.into();
1577 self
1578 }
1579
1580 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1582 self.filter = v.into();
1583 self
1584 }
1585
1586 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1588 self.order_by = v.into();
1589 self
1590 }
1591}
1592
1593impl wkt::message::Message for ListPrivateConnectionsRequest {
1594 fn typename() -> &'static str {
1595 "type.googleapis.com/google.cloud.clouddms.v1.ListPrivateConnectionsRequest"
1596 }
1597}
1598
1599#[derive(Clone, Default, PartialEq)]
1601#[non_exhaustive]
1602pub struct ListPrivateConnectionsResponse {
1603 pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
1605
1606 pub next_page_token: std::string::String,
1609
1610 pub unreachable: std::vec::Vec<std::string::String>,
1612
1613 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1614}
1615
1616impl ListPrivateConnectionsResponse {
1617 pub fn new() -> Self {
1618 std::default::Default::default()
1619 }
1620
1621 pub fn set_private_connections<T, V>(mut self, v: T) -> Self
1623 where
1624 T: std::iter::IntoIterator<Item = V>,
1625 V: std::convert::Into<crate::model::PrivateConnection>,
1626 {
1627 use std::iter::Iterator;
1628 self.private_connections = v.into_iter().map(|i| i.into()).collect();
1629 self
1630 }
1631
1632 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1634 self.next_page_token = v.into();
1635 self
1636 }
1637
1638 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1640 where
1641 T: std::iter::IntoIterator<Item = V>,
1642 V: std::convert::Into<std::string::String>,
1643 {
1644 use std::iter::Iterator;
1645 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1646 self
1647 }
1648}
1649
1650impl wkt::message::Message for ListPrivateConnectionsResponse {
1651 fn typename() -> &'static str {
1652 "type.googleapis.com/google.cloud.clouddms.v1.ListPrivateConnectionsResponse"
1653 }
1654}
1655
1656#[doc(hidden)]
1657impl gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
1658 type PageItem = crate::model::PrivateConnection;
1659
1660 fn items(self) -> std::vec::Vec<Self::PageItem> {
1661 self.private_connections
1662 }
1663
1664 fn next_page_token(&self) -> std::string::String {
1665 use std::clone::Clone;
1666 self.next_page_token.clone()
1667 }
1668}
1669
1670#[derive(Clone, Default, PartialEq)]
1672#[non_exhaustive]
1673pub struct DeletePrivateConnectionRequest {
1674 pub name: std::string::String,
1676
1677 pub request_id: std::string::String,
1685
1686 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1687}
1688
1689impl DeletePrivateConnectionRequest {
1690 pub fn new() -> Self {
1691 std::default::Default::default()
1692 }
1693
1694 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1696 self.name = v.into();
1697 self
1698 }
1699
1700 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1702 self.request_id = v.into();
1703 self
1704 }
1705}
1706
1707impl wkt::message::Message for DeletePrivateConnectionRequest {
1708 fn typename() -> &'static str {
1709 "type.googleapis.com/google.cloud.clouddms.v1.DeletePrivateConnectionRequest"
1710 }
1711}
1712
1713#[derive(Clone, Default, PartialEq)]
1715#[non_exhaustive]
1716pub struct GetPrivateConnectionRequest {
1717 pub name: std::string::String,
1719
1720 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1721}
1722
1723impl GetPrivateConnectionRequest {
1724 pub fn new() -> Self {
1725 std::default::Default::default()
1726 }
1727
1728 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1730 self.name = v.into();
1731 self
1732 }
1733}
1734
1735impl wkt::message::Message for GetPrivateConnectionRequest {
1736 fn typename() -> &'static str {
1737 "type.googleapis.com/google.cloud.clouddms.v1.GetPrivateConnectionRequest"
1738 }
1739}
1740
1741#[derive(Clone, Default, PartialEq)]
1743#[non_exhaustive]
1744pub struct OperationMetadata {
1745 pub create_time: std::option::Option<wkt::Timestamp>,
1747
1748 pub end_time: std::option::Option<wkt::Timestamp>,
1750
1751 pub target: std::string::String,
1753
1754 pub verb: std::string::String,
1756
1757 pub status_message: std::string::String,
1759
1760 pub requested_cancellation: bool,
1770
1771 pub api_version: std::string::String,
1773
1774 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1775}
1776
1777impl OperationMetadata {
1778 pub fn new() -> Self {
1779 std::default::Default::default()
1780 }
1781
1782 pub fn set_create_time<T>(mut self, v: T) -> Self
1784 where
1785 T: std::convert::Into<wkt::Timestamp>,
1786 {
1787 self.create_time = std::option::Option::Some(v.into());
1788 self
1789 }
1790
1791 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1793 where
1794 T: std::convert::Into<wkt::Timestamp>,
1795 {
1796 self.create_time = v.map(|x| x.into());
1797 self
1798 }
1799
1800 pub fn set_end_time<T>(mut self, v: T) -> Self
1802 where
1803 T: std::convert::Into<wkt::Timestamp>,
1804 {
1805 self.end_time = std::option::Option::Some(v.into());
1806 self
1807 }
1808
1809 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
1811 where
1812 T: std::convert::Into<wkt::Timestamp>,
1813 {
1814 self.end_time = v.map(|x| x.into());
1815 self
1816 }
1817
1818 pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1820 self.target = v.into();
1821 self
1822 }
1823
1824 pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1826 self.verb = v.into();
1827 self
1828 }
1829
1830 pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1832 self.status_message = v.into();
1833 self
1834 }
1835
1836 pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1838 self.requested_cancellation = v.into();
1839 self
1840 }
1841
1842 pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1844 self.api_version = v.into();
1845 self
1846 }
1847}
1848
1849impl wkt::message::Message for OperationMetadata {
1850 fn typename() -> &'static str {
1851 "type.googleapis.com/google.cloud.clouddms.v1.OperationMetadata"
1852 }
1853}
1854
1855#[derive(Clone, Default, PartialEq)]
1857#[non_exhaustive]
1858pub struct ListConversionWorkspacesRequest {
1859 pub parent: std::string::String,
1861
1862 pub page_size: i32,
1865
1866 pub page_token: std::string::String,
1872
1873 pub filter: std::string::String,
1883
1884 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1885}
1886
1887impl ListConversionWorkspacesRequest {
1888 pub fn new() -> Self {
1889 std::default::Default::default()
1890 }
1891
1892 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1894 self.parent = v.into();
1895 self
1896 }
1897
1898 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1900 self.page_size = v.into();
1901 self
1902 }
1903
1904 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1906 self.page_token = v.into();
1907 self
1908 }
1909
1910 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1912 self.filter = v.into();
1913 self
1914 }
1915}
1916
1917impl wkt::message::Message for ListConversionWorkspacesRequest {
1918 fn typename() -> &'static str {
1919 "type.googleapis.com/google.cloud.clouddms.v1.ListConversionWorkspacesRequest"
1920 }
1921}
1922
1923#[derive(Clone, Default, PartialEq)]
1925#[non_exhaustive]
1926pub struct ListConversionWorkspacesResponse {
1927 pub conversion_workspaces: std::vec::Vec<crate::model::ConversionWorkspace>,
1929
1930 pub next_page_token: std::string::String,
1933
1934 pub unreachable: std::vec::Vec<std::string::String>,
1936
1937 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1938}
1939
1940impl ListConversionWorkspacesResponse {
1941 pub fn new() -> Self {
1942 std::default::Default::default()
1943 }
1944
1945 pub fn set_conversion_workspaces<T, V>(mut self, v: T) -> Self
1947 where
1948 T: std::iter::IntoIterator<Item = V>,
1949 V: std::convert::Into<crate::model::ConversionWorkspace>,
1950 {
1951 use std::iter::Iterator;
1952 self.conversion_workspaces = v.into_iter().map(|i| i.into()).collect();
1953 self
1954 }
1955
1956 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1958 self.next_page_token = v.into();
1959 self
1960 }
1961
1962 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1964 where
1965 T: std::iter::IntoIterator<Item = V>,
1966 V: std::convert::Into<std::string::String>,
1967 {
1968 use std::iter::Iterator;
1969 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1970 self
1971 }
1972}
1973
1974impl wkt::message::Message for ListConversionWorkspacesResponse {
1975 fn typename() -> &'static str {
1976 "type.googleapis.com/google.cloud.clouddms.v1.ListConversionWorkspacesResponse"
1977 }
1978}
1979
1980#[doc(hidden)]
1981impl gax::paginator::internal::PageableResponse for ListConversionWorkspacesResponse {
1982 type PageItem = crate::model::ConversionWorkspace;
1983
1984 fn items(self) -> std::vec::Vec<Self::PageItem> {
1985 self.conversion_workspaces
1986 }
1987
1988 fn next_page_token(&self) -> std::string::String {
1989 use std::clone::Clone;
1990 self.next_page_token.clone()
1991 }
1992}
1993
1994#[derive(Clone, Default, PartialEq)]
1996#[non_exhaustive]
1997pub struct GetConversionWorkspaceRequest {
1998 pub name: std::string::String,
2000
2001 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2002}
2003
2004impl GetConversionWorkspaceRequest {
2005 pub fn new() -> Self {
2006 std::default::Default::default()
2007 }
2008
2009 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2011 self.name = v.into();
2012 self
2013 }
2014}
2015
2016impl wkt::message::Message for GetConversionWorkspaceRequest {
2017 fn typename() -> &'static str {
2018 "type.googleapis.com/google.cloud.clouddms.v1.GetConversionWorkspaceRequest"
2019 }
2020}
2021
2022#[derive(Clone, Default, PartialEq)]
2025#[non_exhaustive]
2026pub struct CreateConversionWorkspaceRequest {
2027 pub parent: std::string::String,
2029
2030 pub conversion_workspace_id: std::string::String,
2032
2033 pub conversion_workspace: std::option::Option<crate::model::ConversionWorkspace>,
2035
2036 pub request_id: std::string::String,
2044
2045 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2046}
2047
2048impl CreateConversionWorkspaceRequest {
2049 pub fn new() -> Self {
2050 std::default::Default::default()
2051 }
2052
2053 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2055 self.parent = v.into();
2056 self
2057 }
2058
2059 pub fn set_conversion_workspace_id<T: std::convert::Into<std::string::String>>(
2061 mut self,
2062 v: T,
2063 ) -> Self {
2064 self.conversion_workspace_id = v.into();
2065 self
2066 }
2067
2068 pub fn set_conversion_workspace<T>(mut self, v: T) -> Self
2070 where
2071 T: std::convert::Into<crate::model::ConversionWorkspace>,
2072 {
2073 self.conversion_workspace = std::option::Option::Some(v.into());
2074 self
2075 }
2076
2077 pub fn set_or_clear_conversion_workspace<T>(mut self, v: std::option::Option<T>) -> Self
2079 where
2080 T: std::convert::Into<crate::model::ConversionWorkspace>,
2081 {
2082 self.conversion_workspace = v.map(|x| x.into());
2083 self
2084 }
2085
2086 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2088 self.request_id = v.into();
2089 self
2090 }
2091}
2092
2093impl wkt::message::Message for CreateConversionWorkspaceRequest {
2094 fn typename() -> &'static str {
2095 "type.googleapis.com/google.cloud.clouddms.v1.CreateConversionWorkspaceRequest"
2096 }
2097}
2098
2099#[derive(Clone, Default, PartialEq)]
2101#[non_exhaustive]
2102pub struct UpdateConversionWorkspaceRequest {
2103 pub update_mask: std::option::Option<wkt::FieldMask>,
2106
2107 pub conversion_workspace: std::option::Option<crate::model::ConversionWorkspace>,
2109
2110 pub request_id: std::string::String,
2118
2119 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2120}
2121
2122impl UpdateConversionWorkspaceRequest {
2123 pub fn new() -> Self {
2124 std::default::Default::default()
2125 }
2126
2127 pub fn set_update_mask<T>(mut self, v: T) -> Self
2129 where
2130 T: std::convert::Into<wkt::FieldMask>,
2131 {
2132 self.update_mask = std::option::Option::Some(v.into());
2133 self
2134 }
2135
2136 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2138 where
2139 T: std::convert::Into<wkt::FieldMask>,
2140 {
2141 self.update_mask = v.map(|x| x.into());
2142 self
2143 }
2144
2145 pub fn set_conversion_workspace<T>(mut self, v: T) -> Self
2147 where
2148 T: std::convert::Into<crate::model::ConversionWorkspace>,
2149 {
2150 self.conversion_workspace = std::option::Option::Some(v.into());
2151 self
2152 }
2153
2154 pub fn set_or_clear_conversion_workspace<T>(mut self, v: std::option::Option<T>) -> Self
2156 where
2157 T: std::convert::Into<crate::model::ConversionWorkspace>,
2158 {
2159 self.conversion_workspace = v.map(|x| x.into());
2160 self
2161 }
2162
2163 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2165 self.request_id = v.into();
2166 self
2167 }
2168}
2169
2170impl wkt::message::Message for UpdateConversionWorkspaceRequest {
2171 fn typename() -> &'static str {
2172 "type.googleapis.com/google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest"
2173 }
2174}
2175
2176#[derive(Clone, Default, PartialEq)]
2178#[non_exhaustive]
2179pub struct DeleteConversionWorkspaceRequest {
2180 pub name: std::string::String,
2182
2183 pub request_id: std::string::String,
2191
2192 pub force: bool,
2195
2196 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2197}
2198
2199impl DeleteConversionWorkspaceRequest {
2200 pub fn new() -> Self {
2201 std::default::Default::default()
2202 }
2203
2204 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2206 self.name = v.into();
2207 self
2208 }
2209
2210 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2212 self.request_id = v.into();
2213 self
2214 }
2215
2216 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2218 self.force = v.into();
2219 self
2220 }
2221}
2222
2223impl wkt::message::Message for DeleteConversionWorkspaceRequest {
2224 fn typename() -> &'static str {
2225 "type.googleapis.com/google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest"
2226 }
2227}
2228
2229#[derive(Clone, Default, PartialEq)]
2231#[non_exhaustive]
2232pub struct CommitConversionWorkspaceRequest {
2233 pub name: std::string::String,
2235
2236 pub commit_name: std::string::String,
2238
2239 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2240}
2241
2242impl CommitConversionWorkspaceRequest {
2243 pub fn new() -> Self {
2244 std::default::Default::default()
2245 }
2246
2247 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2249 self.name = v.into();
2250 self
2251 }
2252
2253 pub fn set_commit_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2255 self.commit_name = v.into();
2256 self
2257 }
2258}
2259
2260impl wkt::message::Message for CommitConversionWorkspaceRequest {
2261 fn typename() -> &'static str {
2262 "type.googleapis.com/google.cloud.clouddms.v1.CommitConversionWorkspaceRequest"
2263 }
2264}
2265
2266#[derive(Clone, Default, PartialEq)]
2268#[non_exhaustive]
2269pub struct RollbackConversionWorkspaceRequest {
2270 pub name: std::string::String,
2272
2273 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2274}
2275
2276impl RollbackConversionWorkspaceRequest {
2277 pub fn new() -> Self {
2278 std::default::Default::default()
2279 }
2280
2281 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2283 self.name = v.into();
2284 self
2285 }
2286}
2287
2288impl wkt::message::Message for RollbackConversionWorkspaceRequest {
2289 fn typename() -> &'static str {
2290 "type.googleapis.com/google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest"
2291 }
2292}
2293
2294#[derive(Clone, Default, PartialEq)]
2296#[non_exhaustive]
2297pub struct ApplyConversionWorkspaceRequest {
2298 pub name: std::string::String,
2302
2303 pub filter: std::string::String,
2306
2307 pub dry_run: bool,
2311
2312 pub auto_commit: bool,
2315
2316 pub destination:
2318 std::option::Option<crate::model::apply_conversion_workspace_request::Destination>,
2319
2320 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2321}
2322
2323impl ApplyConversionWorkspaceRequest {
2324 pub fn new() -> Self {
2325 std::default::Default::default()
2326 }
2327
2328 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2330 self.name = v.into();
2331 self
2332 }
2333
2334 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2336 self.filter = v.into();
2337 self
2338 }
2339
2340 pub fn set_dry_run<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2342 self.dry_run = v.into();
2343 self
2344 }
2345
2346 pub fn set_auto_commit<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2348 self.auto_commit = v.into();
2349 self
2350 }
2351
2352 pub fn set_destination<
2357 T: std::convert::Into<
2358 std::option::Option<crate::model::apply_conversion_workspace_request::Destination>,
2359 >,
2360 >(
2361 mut self,
2362 v: T,
2363 ) -> Self {
2364 self.destination = v.into();
2365 self
2366 }
2367
2368 pub fn connection_profile(&self) -> std::option::Option<&std::string::String> {
2372 #[allow(unreachable_patterns)]
2373 self.destination.as_ref().and_then(|v| match v {
2374 crate::model::apply_conversion_workspace_request::Destination::ConnectionProfile(v) => {
2375 std::option::Option::Some(v)
2376 }
2377 _ => std::option::Option::None,
2378 })
2379 }
2380
2381 pub fn set_connection_profile<T: std::convert::Into<std::string::String>>(
2387 mut self,
2388 v: T,
2389 ) -> Self {
2390 self.destination = std::option::Option::Some(
2391 crate::model::apply_conversion_workspace_request::Destination::ConnectionProfile(
2392 v.into(),
2393 ),
2394 );
2395 self
2396 }
2397}
2398
2399impl wkt::message::Message for ApplyConversionWorkspaceRequest {
2400 fn typename() -> &'static str {
2401 "type.googleapis.com/google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest"
2402 }
2403}
2404
2405pub mod apply_conversion_workspace_request {
2407 #[allow(unused_imports)]
2408 use super::*;
2409
2410 #[derive(Clone, Debug, PartialEq)]
2412 #[non_exhaustive]
2413 pub enum Destination {
2414 ConnectionProfile(std::string::String),
2417 }
2418}
2419
2420#[derive(Clone, Default, PartialEq)]
2422#[non_exhaustive]
2423pub struct ListMappingRulesRequest {
2424 pub parent: std::string::String,
2428
2429 pub page_size: i32,
2432
2433 pub page_token: std::string::String,
2439
2440 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2441}
2442
2443impl ListMappingRulesRequest {
2444 pub fn new() -> Self {
2445 std::default::Default::default()
2446 }
2447
2448 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2450 self.parent = v.into();
2451 self
2452 }
2453
2454 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2456 self.page_size = v.into();
2457 self
2458 }
2459
2460 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2462 self.page_token = v.into();
2463 self
2464 }
2465}
2466
2467impl wkt::message::Message for ListMappingRulesRequest {
2468 fn typename() -> &'static str {
2469 "type.googleapis.com/google.cloud.clouddms.v1.ListMappingRulesRequest"
2470 }
2471}
2472
2473#[derive(Clone, Default, PartialEq)]
2475#[non_exhaustive]
2476pub struct ListMappingRulesResponse {
2477 pub mapping_rules: std::vec::Vec<crate::model::MappingRule>,
2479
2480 pub next_page_token: std::string::String,
2483
2484 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2485}
2486
2487impl ListMappingRulesResponse {
2488 pub fn new() -> Self {
2489 std::default::Default::default()
2490 }
2491
2492 pub fn set_mapping_rules<T, V>(mut self, v: T) -> Self
2494 where
2495 T: std::iter::IntoIterator<Item = V>,
2496 V: std::convert::Into<crate::model::MappingRule>,
2497 {
2498 use std::iter::Iterator;
2499 self.mapping_rules = v.into_iter().map(|i| i.into()).collect();
2500 self
2501 }
2502
2503 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2505 self.next_page_token = v.into();
2506 self
2507 }
2508}
2509
2510impl wkt::message::Message for ListMappingRulesResponse {
2511 fn typename() -> &'static str {
2512 "type.googleapis.com/google.cloud.clouddms.v1.ListMappingRulesResponse"
2513 }
2514}
2515
2516#[doc(hidden)]
2517impl gax::paginator::internal::PageableResponse for ListMappingRulesResponse {
2518 type PageItem = crate::model::MappingRule;
2519
2520 fn items(self) -> std::vec::Vec<Self::PageItem> {
2521 self.mapping_rules
2522 }
2523
2524 fn next_page_token(&self) -> std::string::String {
2525 use std::clone::Clone;
2526 self.next_page_token.clone()
2527 }
2528}
2529
2530#[derive(Clone, Default, PartialEq)]
2532#[non_exhaustive]
2533pub struct GetMappingRuleRequest {
2534 pub name: std::string::String,
2542
2543 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2544}
2545
2546impl GetMappingRuleRequest {
2547 pub fn new() -> Self {
2548 std::default::Default::default()
2549 }
2550
2551 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2553 self.name = v.into();
2554 self
2555 }
2556}
2557
2558impl wkt::message::Message for GetMappingRuleRequest {
2559 fn typename() -> &'static str {
2560 "type.googleapis.com/google.cloud.clouddms.v1.GetMappingRuleRequest"
2561 }
2562}
2563
2564#[derive(Clone, Default, PartialEq)]
2566#[non_exhaustive]
2567pub struct SeedConversionWorkspaceRequest {
2568 pub name: std::string::String,
2572
2573 pub auto_commit: bool,
2576
2577 pub seed_from: std::option::Option<crate::model::seed_conversion_workspace_request::SeedFrom>,
2581
2582 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2583}
2584
2585impl SeedConversionWorkspaceRequest {
2586 pub fn new() -> Self {
2587 std::default::Default::default()
2588 }
2589
2590 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2592 self.name = v.into();
2593 self
2594 }
2595
2596 pub fn set_auto_commit<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2598 self.auto_commit = v.into();
2599 self
2600 }
2601
2602 pub fn set_seed_from<
2607 T: std::convert::Into<
2608 std::option::Option<crate::model::seed_conversion_workspace_request::SeedFrom>,
2609 >,
2610 >(
2611 mut self,
2612 v: T,
2613 ) -> Self {
2614 self.seed_from = v.into();
2615 self
2616 }
2617
2618 pub fn source_connection_profile(&self) -> std::option::Option<&std::string::String> {
2622 #[allow(unreachable_patterns)]
2623 self.seed_from.as_ref().and_then(|v| match v {
2624 crate::model::seed_conversion_workspace_request::SeedFrom::SourceConnectionProfile(
2625 v,
2626 ) => std::option::Option::Some(v),
2627 _ => std::option::Option::None,
2628 })
2629 }
2630
2631 pub fn set_source_connection_profile<T: std::convert::Into<std::string::String>>(
2637 mut self,
2638 v: T,
2639 ) -> Self {
2640 self.seed_from = std::option::Option::Some(
2641 crate::model::seed_conversion_workspace_request::SeedFrom::SourceConnectionProfile(
2642 v.into(),
2643 ),
2644 );
2645 self
2646 }
2647
2648 pub fn destination_connection_profile(&self) -> std::option::Option<&std::string::String> {
2652 #[allow(unreachable_patterns)]
2653 self.seed_from.as_ref().and_then(|v| match v {
2654 crate::model::seed_conversion_workspace_request::SeedFrom::DestinationConnectionProfile(v) => std::option::Option::Some(v),
2655 _ => std::option::Option::None,
2656 })
2657 }
2658
2659 pub fn set_destination_connection_profile<T: std::convert::Into<std::string::String>>(
2665 mut self,
2666 v: T,
2667 ) -> Self {
2668 self.seed_from = std::option::Option::Some(
2669 crate::model::seed_conversion_workspace_request::SeedFrom::DestinationConnectionProfile(
2670 v.into(),
2671 ),
2672 );
2673 self
2674 }
2675}
2676
2677impl wkt::message::Message for SeedConversionWorkspaceRequest {
2678 fn typename() -> &'static str {
2679 "type.googleapis.com/google.cloud.clouddms.v1.SeedConversionWorkspaceRequest"
2680 }
2681}
2682
2683pub mod seed_conversion_workspace_request {
2685 #[allow(unused_imports)]
2686 use super::*;
2687
2688 #[derive(Clone, Debug, PartialEq)]
2692 #[non_exhaustive]
2693 pub enum SeedFrom {
2694 SourceConnectionProfile(std::string::String),
2696 DestinationConnectionProfile(std::string::String),
2699 }
2700}
2701
2702#[derive(Clone, Default, PartialEq)]
2704#[non_exhaustive]
2705pub struct ConvertConversionWorkspaceRequest {
2706 pub name: std::string::String,
2709
2710 pub auto_commit: bool,
2713
2714 pub filter: std::string::String,
2717
2718 pub convert_full_path: bool,
2722
2723 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2724}
2725
2726impl ConvertConversionWorkspaceRequest {
2727 pub fn new() -> Self {
2728 std::default::Default::default()
2729 }
2730
2731 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2733 self.name = v.into();
2734 self
2735 }
2736
2737 pub fn set_auto_commit<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2739 self.auto_commit = v.into();
2740 self
2741 }
2742
2743 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2745 self.filter = v.into();
2746 self
2747 }
2748
2749 pub fn set_convert_full_path<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2751 self.convert_full_path = v.into();
2752 self
2753 }
2754}
2755
2756impl wkt::message::Message for ConvertConversionWorkspaceRequest {
2757 fn typename() -> &'static str {
2758 "type.googleapis.com/google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest"
2759 }
2760}
2761
2762#[derive(Clone, Default, PartialEq)]
2764#[non_exhaustive]
2765pub struct ImportMappingRulesRequest {
2766 pub parent: std::string::String,
2770
2771 pub rules_format: crate::model::ImportRulesFileFormat,
2773
2774 pub rules_files: std::vec::Vec<crate::model::import_mapping_rules_request::RulesFile>,
2776
2777 pub auto_commit: bool,
2780
2781 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2782}
2783
2784impl ImportMappingRulesRequest {
2785 pub fn new() -> Self {
2786 std::default::Default::default()
2787 }
2788
2789 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2791 self.parent = v.into();
2792 self
2793 }
2794
2795 pub fn set_rules_format<T: std::convert::Into<crate::model::ImportRulesFileFormat>>(
2797 mut self,
2798 v: T,
2799 ) -> Self {
2800 self.rules_format = v.into();
2801 self
2802 }
2803
2804 pub fn set_rules_files<T, V>(mut self, v: T) -> Self
2806 where
2807 T: std::iter::IntoIterator<Item = V>,
2808 V: std::convert::Into<crate::model::import_mapping_rules_request::RulesFile>,
2809 {
2810 use std::iter::Iterator;
2811 self.rules_files = v.into_iter().map(|i| i.into()).collect();
2812 self
2813 }
2814
2815 pub fn set_auto_commit<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2817 self.auto_commit = v.into();
2818 self
2819 }
2820}
2821
2822impl wkt::message::Message for ImportMappingRulesRequest {
2823 fn typename() -> &'static str {
2824 "type.googleapis.com/google.cloud.clouddms.v1.ImportMappingRulesRequest"
2825 }
2826}
2827
2828pub mod import_mapping_rules_request {
2830 #[allow(unused_imports)]
2831 use super::*;
2832
2833 #[derive(Clone, Default, PartialEq)]
2835 #[non_exhaustive]
2836 pub struct RulesFile {
2837 pub rules_source_filename: std::string::String,
2841
2842 pub rules_content: std::string::String,
2844
2845 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2846 }
2847
2848 impl RulesFile {
2849 pub fn new() -> Self {
2850 std::default::Default::default()
2851 }
2852
2853 pub fn set_rules_source_filename<T: std::convert::Into<std::string::String>>(
2855 mut self,
2856 v: T,
2857 ) -> Self {
2858 self.rules_source_filename = v.into();
2859 self
2860 }
2861
2862 pub fn set_rules_content<T: std::convert::Into<std::string::String>>(
2864 mut self,
2865 v: T,
2866 ) -> Self {
2867 self.rules_content = v.into();
2868 self
2869 }
2870 }
2871
2872 impl wkt::message::Message for RulesFile {
2873 fn typename() -> &'static str {
2874 "type.googleapis.com/google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile"
2875 }
2876 }
2877}
2878
2879#[derive(Clone, Default, PartialEq)]
2881#[non_exhaustive]
2882pub struct DescribeDatabaseEntitiesRequest {
2883 pub conversion_workspace: std::string::String,
2887
2888 pub page_size: i32,
2891
2892 pub page_token: std::string::String,
2899
2900 pub tree: crate::model::describe_database_entities_request::DBTreeType,
2902
2903 pub uncommitted: bool,
2907
2908 pub commit_id: std::string::String,
2911
2912 pub filter: std::string::String,
2914
2915 pub view: crate::model::DatabaseEntityView,
2917
2918 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2919}
2920
2921impl DescribeDatabaseEntitiesRequest {
2922 pub fn new() -> Self {
2923 std::default::Default::default()
2924 }
2925
2926 pub fn set_conversion_workspace<T: std::convert::Into<std::string::String>>(
2928 mut self,
2929 v: T,
2930 ) -> Self {
2931 self.conversion_workspace = v.into();
2932 self
2933 }
2934
2935 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2937 self.page_size = v.into();
2938 self
2939 }
2940
2941 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2943 self.page_token = v.into();
2944 self
2945 }
2946
2947 pub fn set_tree<
2949 T: std::convert::Into<crate::model::describe_database_entities_request::DBTreeType>,
2950 >(
2951 mut self,
2952 v: T,
2953 ) -> Self {
2954 self.tree = v.into();
2955 self
2956 }
2957
2958 pub fn set_uncommitted<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2960 self.uncommitted = v.into();
2961 self
2962 }
2963
2964 pub fn set_commit_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2966 self.commit_id = v.into();
2967 self
2968 }
2969
2970 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2972 self.filter = v.into();
2973 self
2974 }
2975
2976 pub fn set_view<T: std::convert::Into<crate::model::DatabaseEntityView>>(
2978 mut self,
2979 v: T,
2980 ) -> Self {
2981 self.view = v.into();
2982 self
2983 }
2984}
2985
2986impl wkt::message::Message for DescribeDatabaseEntitiesRequest {
2987 fn typename() -> &'static str {
2988 "type.googleapis.com/google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest"
2989 }
2990}
2991
2992pub mod describe_database_entities_request {
2994 #[allow(unused_imports)]
2995 use super::*;
2996
2997 #[derive(Clone, Debug, PartialEq)]
3013 #[non_exhaustive]
3014 pub enum DBTreeType {
3015 Unspecified,
3017 SourceTree,
3019 DraftTree,
3021 DestinationTree,
3023 UnknownValue(db_tree_type::UnknownValue),
3028 }
3029
3030 #[doc(hidden)]
3031 pub mod db_tree_type {
3032 #[allow(unused_imports)]
3033 use super::*;
3034 #[derive(Clone, Debug, PartialEq)]
3035 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3036 }
3037
3038 impl DBTreeType {
3039 pub fn value(&self) -> std::option::Option<i32> {
3044 match self {
3045 Self::Unspecified => std::option::Option::Some(0),
3046 Self::SourceTree => std::option::Option::Some(1),
3047 Self::DraftTree => std::option::Option::Some(2),
3048 Self::DestinationTree => std::option::Option::Some(3),
3049 Self::UnknownValue(u) => u.0.value(),
3050 }
3051 }
3052
3053 pub fn name(&self) -> std::option::Option<&str> {
3058 match self {
3059 Self::Unspecified => std::option::Option::Some("DB_TREE_TYPE_UNSPECIFIED"),
3060 Self::SourceTree => std::option::Option::Some("SOURCE_TREE"),
3061 Self::DraftTree => std::option::Option::Some("DRAFT_TREE"),
3062 Self::DestinationTree => std::option::Option::Some("DESTINATION_TREE"),
3063 Self::UnknownValue(u) => u.0.name(),
3064 }
3065 }
3066 }
3067
3068 impl std::default::Default for DBTreeType {
3069 fn default() -> Self {
3070 use std::convert::From;
3071 Self::from(0)
3072 }
3073 }
3074
3075 impl std::fmt::Display for DBTreeType {
3076 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3077 wkt::internal::display_enum(f, self.name(), self.value())
3078 }
3079 }
3080
3081 impl std::convert::From<i32> for DBTreeType {
3082 fn from(value: i32) -> Self {
3083 match value {
3084 0 => Self::Unspecified,
3085 1 => Self::SourceTree,
3086 2 => Self::DraftTree,
3087 3 => Self::DestinationTree,
3088 _ => Self::UnknownValue(db_tree_type::UnknownValue(
3089 wkt::internal::UnknownEnumValue::Integer(value),
3090 )),
3091 }
3092 }
3093 }
3094
3095 impl std::convert::From<&str> for DBTreeType {
3096 fn from(value: &str) -> Self {
3097 use std::string::ToString;
3098 match value {
3099 "DB_TREE_TYPE_UNSPECIFIED" => Self::Unspecified,
3100 "SOURCE_TREE" => Self::SourceTree,
3101 "DRAFT_TREE" => Self::DraftTree,
3102 "DESTINATION_TREE" => Self::DestinationTree,
3103 _ => Self::UnknownValue(db_tree_type::UnknownValue(
3104 wkt::internal::UnknownEnumValue::String(value.to_string()),
3105 )),
3106 }
3107 }
3108 }
3109
3110 impl serde::ser::Serialize for DBTreeType {
3111 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3112 where
3113 S: serde::Serializer,
3114 {
3115 match self {
3116 Self::Unspecified => serializer.serialize_i32(0),
3117 Self::SourceTree => serializer.serialize_i32(1),
3118 Self::DraftTree => serializer.serialize_i32(2),
3119 Self::DestinationTree => serializer.serialize_i32(3),
3120 Self::UnknownValue(u) => u.0.serialize(serializer),
3121 }
3122 }
3123 }
3124
3125 impl<'de> serde::de::Deserialize<'de> for DBTreeType {
3126 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3127 where
3128 D: serde::Deserializer<'de>,
3129 {
3130 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DBTreeType>::new(
3131 ".google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType",
3132 ))
3133 }
3134 }
3135}
3136
3137#[derive(Clone, Default, PartialEq)]
3139#[non_exhaustive]
3140pub struct DescribeDatabaseEntitiesResponse {
3141 pub database_entities: std::vec::Vec<crate::model::DatabaseEntity>,
3143
3144 pub next_page_token: std::string::String,
3147
3148 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3149}
3150
3151impl DescribeDatabaseEntitiesResponse {
3152 pub fn new() -> Self {
3153 std::default::Default::default()
3154 }
3155
3156 pub fn set_database_entities<T, V>(mut self, v: T) -> Self
3158 where
3159 T: std::iter::IntoIterator<Item = V>,
3160 V: std::convert::Into<crate::model::DatabaseEntity>,
3161 {
3162 use std::iter::Iterator;
3163 self.database_entities = v.into_iter().map(|i| i.into()).collect();
3164 self
3165 }
3166
3167 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3169 self.next_page_token = v.into();
3170 self
3171 }
3172}
3173
3174impl wkt::message::Message for DescribeDatabaseEntitiesResponse {
3175 fn typename() -> &'static str {
3176 "type.googleapis.com/google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse"
3177 }
3178}
3179
3180#[doc(hidden)]
3181impl gax::paginator::internal::PageableResponse for DescribeDatabaseEntitiesResponse {
3182 type PageItem = crate::model::DatabaseEntity;
3183
3184 fn items(self) -> std::vec::Vec<Self::PageItem> {
3185 self.database_entities
3186 }
3187
3188 fn next_page_token(&self) -> std::string::String {
3189 use std::clone::Clone;
3190 self.next_page_token.clone()
3191 }
3192}
3193
3194#[derive(Clone, Default, PartialEq)]
3196#[non_exhaustive]
3197pub struct SearchBackgroundJobsRequest {
3198 pub conversion_workspace: std::string::String,
3202
3203 pub return_most_recent_per_job_type: bool,
3205
3206 pub max_size: i32,
3211
3212 pub completed_until_time: std::option::Option<wkt::Timestamp>,
3215
3216 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3217}
3218
3219impl SearchBackgroundJobsRequest {
3220 pub fn new() -> Self {
3221 std::default::Default::default()
3222 }
3223
3224 pub fn set_conversion_workspace<T: std::convert::Into<std::string::String>>(
3226 mut self,
3227 v: T,
3228 ) -> Self {
3229 self.conversion_workspace = v.into();
3230 self
3231 }
3232
3233 pub fn set_return_most_recent_per_job_type<T: std::convert::Into<bool>>(
3235 mut self,
3236 v: T,
3237 ) -> Self {
3238 self.return_most_recent_per_job_type = v.into();
3239 self
3240 }
3241
3242 pub fn set_max_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3244 self.max_size = v.into();
3245 self
3246 }
3247
3248 pub fn set_completed_until_time<T>(mut self, v: T) -> Self
3250 where
3251 T: std::convert::Into<wkt::Timestamp>,
3252 {
3253 self.completed_until_time = std::option::Option::Some(v.into());
3254 self
3255 }
3256
3257 pub fn set_or_clear_completed_until_time<T>(mut self, v: std::option::Option<T>) -> Self
3259 where
3260 T: std::convert::Into<wkt::Timestamp>,
3261 {
3262 self.completed_until_time = v.map(|x| x.into());
3263 self
3264 }
3265}
3266
3267impl wkt::message::Message for SearchBackgroundJobsRequest {
3268 fn typename() -> &'static str {
3269 "type.googleapis.com/google.cloud.clouddms.v1.SearchBackgroundJobsRequest"
3270 }
3271}
3272
3273#[derive(Clone, Default, PartialEq)]
3275#[non_exhaustive]
3276pub struct SearchBackgroundJobsResponse {
3277 pub jobs: std::vec::Vec<crate::model::BackgroundJobLogEntry>,
3279
3280 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3281}
3282
3283impl SearchBackgroundJobsResponse {
3284 pub fn new() -> Self {
3285 std::default::Default::default()
3286 }
3287
3288 pub fn set_jobs<T, V>(mut self, v: T) -> Self
3290 where
3291 T: std::iter::IntoIterator<Item = V>,
3292 V: std::convert::Into<crate::model::BackgroundJobLogEntry>,
3293 {
3294 use std::iter::Iterator;
3295 self.jobs = v.into_iter().map(|i| i.into()).collect();
3296 self
3297 }
3298}
3299
3300impl wkt::message::Message for SearchBackgroundJobsResponse {
3301 fn typename() -> &'static str {
3302 "type.googleapis.com/google.cloud.clouddms.v1.SearchBackgroundJobsResponse"
3303 }
3304}
3305
3306#[derive(Clone, Default, PartialEq)]
3308#[non_exhaustive]
3309pub struct DescribeConversionWorkspaceRevisionsRequest {
3310 pub conversion_workspace: std::string::String,
3314
3315 pub commit_id: std::string::String,
3317
3318 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3319}
3320
3321impl DescribeConversionWorkspaceRevisionsRequest {
3322 pub fn new() -> Self {
3323 std::default::Default::default()
3324 }
3325
3326 pub fn set_conversion_workspace<T: std::convert::Into<std::string::String>>(
3328 mut self,
3329 v: T,
3330 ) -> Self {
3331 self.conversion_workspace = v.into();
3332 self
3333 }
3334
3335 pub fn set_commit_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3337 self.commit_id = v.into();
3338 self
3339 }
3340}
3341
3342impl wkt::message::Message for DescribeConversionWorkspaceRevisionsRequest {
3343 fn typename() -> &'static str {
3344 "type.googleapis.com/google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest"
3345 }
3346}
3347
3348#[derive(Clone, Default, PartialEq)]
3350#[non_exhaustive]
3351pub struct DescribeConversionWorkspaceRevisionsResponse {
3352 pub revisions: std::vec::Vec<crate::model::ConversionWorkspace>,
3354
3355 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3356}
3357
3358impl DescribeConversionWorkspaceRevisionsResponse {
3359 pub fn new() -> Self {
3360 std::default::Default::default()
3361 }
3362
3363 pub fn set_revisions<T, V>(mut self, v: T) -> Self
3365 where
3366 T: std::iter::IntoIterator<Item = V>,
3367 V: std::convert::Into<crate::model::ConversionWorkspace>,
3368 {
3369 use std::iter::Iterator;
3370 self.revisions = v.into_iter().map(|i| i.into()).collect();
3371 self
3372 }
3373}
3374
3375impl wkt::message::Message for DescribeConversionWorkspaceRevisionsResponse {
3376 fn typename() -> &'static str {
3377 "type.googleapis.com/google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse"
3378 }
3379}
3380
3381#[derive(Clone, Default, PartialEq)]
3383#[non_exhaustive]
3384pub struct CreateMappingRuleRequest {
3385 pub parent: std::string::String,
3387
3388 pub mapping_rule_id: std::string::String,
3390
3391 pub mapping_rule: std::option::Option<crate::model::MappingRule>,
3395
3396 pub request_id: std::string::String,
3404
3405 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3406}
3407
3408impl CreateMappingRuleRequest {
3409 pub fn new() -> Self {
3410 std::default::Default::default()
3411 }
3412
3413 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3415 self.parent = v.into();
3416 self
3417 }
3418
3419 pub fn set_mapping_rule_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3421 self.mapping_rule_id = v.into();
3422 self
3423 }
3424
3425 pub fn set_mapping_rule<T>(mut self, v: T) -> Self
3427 where
3428 T: std::convert::Into<crate::model::MappingRule>,
3429 {
3430 self.mapping_rule = std::option::Option::Some(v.into());
3431 self
3432 }
3433
3434 pub fn set_or_clear_mapping_rule<T>(mut self, v: std::option::Option<T>) -> Self
3436 where
3437 T: std::convert::Into<crate::model::MappingRule>,
3438 {
3439 self.mapping_rule = v.map(|x| x.into());
3440 self
3441 }
3442
3443 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3445 self.request_id = v.into();
3446 self
3447 }
3448}
3449
3450impl wkt::message::Message for CreateMappingRuleRequest {
3451 fn typename() -> &'static str {
3452 "type.googleapis.com/google.cloud.clouddms.v1.CreateMappingRuleRequest"
3453 }
3454}
3455
3456#[derive(Clone, Default, PartialEq)]
3458#[non_exhaustive]
3459pub struct DeleteMappingRuleRequest {
3460 pub name: std::string::String,
3462
3463 pub request_id: std::string::String,
3471
3472 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3473}
3474
3475impl DeleteMappingRuleRequest {
3476 pub fn new() -> Self {
3477 std::default::Default::default()
3478 }
3479
3480 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3482 self.name = v.into();
3483 self
3484 }
3485
3486 pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3488 self.request_id = v.into();
3489 self
3490 }
3491}
3492
3493impl wkt::message::Message for DeleteMappingRuleRequest {
3494 fn typename() -> &'static str {
3495 "type.googleapis.com/google.cloud.clouddms.v1.DeleteMappingRuleRequest"
3496 }
3497}
3498
3499#[derive(Clone, Default, PartialEq)]
3501#[non_exhaustive]
3502pub struct FetchStaticIpsRequest {
3503 pub name: std::string::String,
3506
3507 pub page_size: i32,
3509
3510 pub page_token: std::string::String,
3512
3513 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3514}
3515
3516impl FetchStaticIpsRequest {
3517 pub fn new() -> Self {
3518 std::default::Default::default()
3519 }
3520
3521 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3523 self.name = v.into();
3524 self
3525 }
3526
3527 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3529 self.page_size = v.into();
3530 self
3531 }
3532
3533 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3535 self.page_token = v.into();
3536 self
3537 }
3538}
3539
3540impl wkt::message::Message for FetchStaticIpsRequest {
3541 fn typename() -> &'static str {
3542 "type.googleapis.com/google.cloud.clouddms.v1.FetchStaticIpsRequest"
3543 }
3544}
3545
3546#[derive(Clone, Default, PartialEq)]
3548#[non_exhaustive]
3549pub struct FetchStaticIpsResponse {
3550 pub static_ips: std::vec::Vec<std::string::String>,
3552
3553 pub next_page_token: std::string::String,
3556
3557 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3558}
3559
3560impl FetchStaticIpsResponse {
3561 pub fn new() -> Self {
3562 std::default::Default::default()
3563 }
3564
3565 pub fn set_static_ips<T, V>(mut self, v: T) -> Self
3567 where
3568 T: std::iter::IntoIterator<Item = V>,
3569 V: std::convert::Into<std::string::String>,
3570 {
3571 use std::iter::Iterator;
3572 self.static_ips = v.into_iter().map(|i| i.into()).collect();
3573 self
3574 }
3575
3576 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3578 self.next_page_token = v.into();
3579 self
3580 }
3581}
3582
3583impl wkt::message::Message for FetchStaticIpsResponse {
3584 fn typename() -> &'static str {
3585 "type.googleapis.com/google.cloud.clouddms.v1.FetchStaticIpsResponse"
3586 }
3587}
3588
3589#[derive(Clone, Default, PartialEq)]
3591#[non_exhaustive]
3592pub struct SslConfig {
3593 pub r#type: crate::model::ssl_config::SslType,
3596
3597 pub client_key: std::string::String,
3601
3602 pub client_certificate: std::string::String,
3606
3607 pub ca_certificate: std::string::String,
3611
3612 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3613}
3614
3615impl SslConfig {
3616 pub fn new() -> Self {
3617 std::default::Default::default()
3618 }
3619
3620 pub fn set_type<T: std::convert::Into<crate::model::ssl_config::SslType>>(
3622 mut self,
3623 v: T,
3624 ) -> Self {
3625 self.r#type = v.into();
3626 self
3627 }
3628
3629 pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3631 self.client_key = v.into();
3632 self
3633 }
3634
3635 pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
3637 mut self,
3638 v: T,
3639 ) -> Self {
3640 self.client_certificate = v.into();
3641 self
3642 }
3643
3644 pub fn set_ca_certificate<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3646 self.ca_certificate = v.into();
3647 self
3648 }
3649}
3650
3651impl wkt::message::Message for SslConfig {
3652 fn typename() -> &'static str {
3653 "type.googleapis.com/google.cloud.clouddms.v1.SslConfig"
3654 }
3655}
3656
3657pub mod ssl_config {
3659 #[allow(unused_imports)]
3660 use super::*;
3661
3662 #[derive(Clone, Debug, PartialEq)]
3678 #[non_exhaustive]
3679 pub enum SslType {
3680 Unspecified,
3682 ServerOnly,
3684 ServerClient,
3687 UnknownValue(ssl_type::UnknownValue),
3692 }
3693
3694 #[doc(hidden)]
3695 pub mod ssl_type {
3696 #[allow(unused_imports)]
3697 use super::*;
3698 #[derive(Clone, Debug, PartialEq)]
3699 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3700 }
3701
3702 impl SslType {
3703 pub fn value(&self) -> std::option::Option<i32> {
3708 match self {
3709 Self::Unspecified => std::option::Option::Some(0),
3710 Self::ServerOnly => std::option::Option::Some(1),
3711 Self::ServerClient => std::option::Option::Some(2),
3712 Self::UnknownValue(u) => u.0.value(),
3713 }
3714 }
3715
3716 pub fn name(&self) -> std::option::Option<&str> {
3721 match self {
3722 Self::Unspecified => std::option::Option::Some("SSL_TYPE_UNSPECIFIED"),
3723 Self::ServerOnly => std::option::Option::Some("SERVER_ONLY"),
3724 Self::ServerClient => std::option::Option::Some("SERVER_CLIENT"),
3725 Self::UnknownValue(u) => u.0.name(),
3726 }
3727 }
3728 }
3729
3730 impl std::default::Default for SslType {
3731 fn default() -> Self {
3732 use std::convert::From;
3733 Self::from(0)
3734 }
3735 }
3736
3737 impl std::fmt::Display for SslType {
3738 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3739 wkt::internal::display_enum(f, self.name(), self.value())
3740 }
3741 }
3742
3743 impl std::convert::From<i32> for SslType {
3744 fn from(value: i32) -> Self {
3745 match value {
3746 0 => Self::Unspecified,
3747 1 => Self::ServerOnly,
3748 2 => Self::ServerClient,
3749 _ => Self::UnknownValue(ssl_type::UnknownValue(
3750 wkt::internal::UnknownEnumValue::Integer(value),
3751 )),
3752 }
3753 }
3754 }
3755
3756 impl std::convert::From<&str> for SslType {
3757 fn from(value: &str) -> Self {
3758 use std::string::ToString;
3759 match value {
3760 "SSL_TYPE_UNSPECIFIED" => Self::Unspecified,
3761 "SERVER_ONLY" => Self::ServerOnly,
3762 "SERVER_CLIENT" => Self::ServerClient,
3763 _ => Self::UnknownValue(ssl_type::UnknownValue(
3764 wkt::internal::UnknownEnumValue::String(value.to_string()),
3765 )),
3766 }
3767 }
3768 }
3769
3770 impl serde::ser::Serialize for SslType {
3771 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3772 where
3773 S: serde::Serializer,
3774 {
3775 match self {
3776 Self::Unspecified => serializer.serialize_i32(0),
3777 Self::ServerOnly => serializer.serialize_i32(1),
3778 Self::ServerClient => serializer.serialize_i32(2),
3779 Self::UnknownValue(u) => u.0.serialize(serializer),
3780 }
3781 }
3782 }
3783
3784 impl<'de> serde::de::Deserialize<'de> for SslType {
3785 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3786 where
3787 D: serde::Deserializer<'de>,
3788 {
3789 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SslType>::new(
3790 ".google.cloud.clouddms.v1.SslConfig.SslType",
3791 ))
3792 }
3793 }
3794}
3795
3796#[derive(Clone, Default, PartialEq)]
3798#[non_exhaustive]
3799pub struct MySqlConnectionProfile {
3800 pub host: std::string::String,
3802
3803 pub port: i32,
3805
3806 pub username: std::string::String,
3810
3811 pub password: std::string::String,
3816
3817 pub password_set: bool,
3819
3820 pub ssl: std::option::Option<crate::model::SslConfig>,
3822
3823 pub cloud_sql_id: std::string::String,
3826
3827 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3828}
3829
3830impl MySqlConnectionProfile {
3831 pub fn new() -> Self {
3832 std::default::Default::default()
3833 }
3834
3835 pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3837 self.host = v.into();
3838 self
3839 }
3840
3841 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3843 self.port = v.into();
3844 self
3845 }
3846
3847 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3849 self.username = v.into();
3850 self
3851 }
3852
3853 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3855 self.password = v.into();
3856 self
3857 }
3858
3859 pub fn set_password_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3861 self.password_set = v.into();
3862 self
3863 }
3864
3865 pub fn set_ssl<T>(mut self, v: T) -> Self
3867 where
3868 T: std::convert::Into<crate::model::SslConfig>,
3869 {
3870 self.ssl = std::option::Option::Some(v.into());
3871 self
3872 }
3873
3874 pub fn set_or_clear_ssl<T>(mut self, v: std::option::Option<T>) -> Self
3876 where
3877 T: std::convert::Into<crate::model::SslConfig>,
3878 {
3879 self.ssl = v.map(|x| x.into());
3880 self
3881 }
3882
3883 pub fn set_cloud_sql_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3885 self.cloud_sql_id = v.into();
3886 self
3887 }
3888}
3889
3890impl wkt::message::Message for MySqlConnectionProfile {
3891 fn typename() -> &'static str {
3892 "type.googleapis.com/google.cloud.clouddms.v1.MySqlConnectionProfile"
3893 }
3894}
3895
3896#[derive(Clone, Default, PartialEq)]
3899#[non_exhaustive]
3900pub struct PostgreSqlConnectionProfile {
3901 pub host: std::string::String,
3903
3904 pub port: i32,
3906
3907 pub username: std::string::String,
3911
3912 pub password: std::string::String,
3917
3918 pub password_set: bool,
3920
3921 pub ssl: std::option::Option<crate::model::SslConfig>,
3923
3924 pub cloud_sql_id: std::string::String,
3927
3928 pub network_architecture: crate::model::NetworkArchitecture,
3931
3932 pub connectivity:
3934 std::option::Option<crate::model::postgre_sql_connection_profile::Connectivity>,
3935
3936 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3937}
3938
3939impl PostgreSqlConnectionProfile {
3940 pub fn new() -> Self {
3941 std::default::Default::default()
3942 }
3943
3944 pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3946 self.host = v.into();
3947 self
3948 }
3949
3950 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3952 self.port = v.into();
3953 self
3954 }
3955
3956 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3958 self.username = v.into();
3959 self
3960 }
3961
3962 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3964 self.password = v.into();
3965 self
3966 }
3967
3968 pub fn set_password_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3970 self.password_set = v.into();
3971 self
3972 }
3973
3974 pub fn set_ssl<T>(mut self, v: T) -> Self
3976 where
3977 T: std::convert::Into<crate::model::SslConfig>,
3978 {
3979 self.ssl = std::option::Option::Some(v.into());
3980 self
3981 }
3982
3983 pub fn set_or_clear_ssl<T>(mut self, v: std::option::Option<T>) -> Self
3985 where
3986 T: std::convert::Into<crate::model::SslConfig>,
3987 {
3988 self.ssl = v.map(|x| x.into());
3989 self
3990 }
3991
3992 pub fn set_cloud_sql_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3994 self.cloud_sql_id = v.into();
3995 self
3996 }
3997
3998 pub fn set_network_architecture<T: std::convert::Into<crate::model::NetworkArchitecture>>(
4000 mut self,
4001 v: T,
4002 ) -> Self {
4003 self.network_architecture = v.into();
4004 self
4005 }
4006
4007 pub fn set_connectivity<
4012 T: std::convert::Into<
4013 std::option::Option<crate::model::postgre_sql_connection_profile::Connectivity>,
4014 >,
4015 >(
4016 mut self,
4017 v: T,
4018 ) -> Self {
4019 self.connectivity = v.into();
4020 self
4021 }
4022
4023 pub fn static_ip_connectivity(
4027 &self,
4028 ) -> std::option::Option<&std::boxed::Box<crate::model::StaticIpConnectivity>> {
4029 #[allow(unreachable_patterns)]
4030 self.connectivity.as_ref().and_then(|v| match v {
4031 crate::model::postgre_sql_connection_profile::Connectivity::StaticIpConnectivity(v) => {
4032 std::option::Option::Some(v)
4033 }
4034 _ => std::option::Option::None,
4035 })
4036 }
4037
4038 pub fn set_static_ip_connectivity<
4044 T: std::convert::Into<std::boxed::Box<crate::model::StaticIpConnectivity>>,
4045 >(
4046 mut self,
4047 v: T,
4048 ) -> Self {
4049 self.connectivity = std::option::Option::Some(
4050 crate::model::postgre_sql_connection_profile::Connectivity::StaticIpConnectivity(
4051 v.into(),
4052 ),
4053 );
4054 self
4055 }
4056
4057 pub fn private_service_connect_connectivity(
4061 &self,
4062 ) -> std::option::Option<&std::boxed::Box<crate::model::PrivateServiceConnectConnectivity>>
4063 {
4064 #[allow(unreachable_patterns)]
4065 self.connectivity.as_ref().and_then(|v| match v {
4066 crate::model::postgre_sql_connection_profile::Connectivity::PrivateServiceConnectConnectivity(v) => std::option::Option::Some(v),
4067 _ => std::option::Option::None,
4068 })
4069 }
4070
4071 pub fn set_private_service_connect_connectivity<
4077 T: std::convert::Into<std::boxed::Box<crate::model::PrivateServiceConnectConnectivity>>,
4078 >(
4079 mut self,
4080 v: T,
4081 ) -> Self {
4082 self.connectivity = std::option::Option::Some(
4083 crate::model::postgre_sql_connection_profile::Connectivity::PrivateServiceConnectConnectivity(
4084 v.into()
4085 )
4086 );
4087 self
4088 }
4089}
4090
4091impl wkt::message::Message for PostgreSqlConnectionProfile {
4092 fn typename() -> &'static str {
4093 "type.googleapis.com/google.cloud.clouddms.v1.PostgreSqlConnectionProfile"
4094 }
4095}
4096
4097pub mod postgre_sql_connection_profile {
4099 #[allow(unused_imports)]
4100 use super::*;
4101
4102 #[derive(Clone, Debug, PartialEq)]
4104 #[non_exhaustive]
4105 pub enum Connectivity {
4106 StaticIpConnectivity(std::boxed::Box<crate::model::StaticIpConnectivity>),
4108 PrivateServiceConnectConnectivity(
4110 std::boxed::Box<crate::model::PrivateServiceConnectConnectivity>,
4111 ),
4112 }
4113}
4114
4115#[derive(Clone, Default, PartialEq)]
4118#[non_exhaustive]
4119pub struct OracleConnectionProfile {
4120 pub host: std::string::String,
4122
4123 pub port: i32,
4125
4126 pub username: std::string::String,
4130
4131 pub password: std::string::String,
4136
4137 pub password_set: bool,
4139
4140 pub database_service: std::string::String,
4142
4143 pub ssl: std::option::Option<crate::model::SslConfig>,
4148
4149 pub connectivity: std::option::Option<crate::model::oracle_connection_profile::Connectivity>,
4151
4152 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4153}
4154
4155impl OracleConnectionProfile {
4156 pub fn new() -> Self {
4157 std::default::Default::default()
4158 }
4159
4160 pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4162 self.host = v.into();
4163 self
4164 }
4165
4166 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4168 self.port = v.into();
4169 self
4170 }
4171
4172 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4174 self.username = v.into();
4175 self
4176 }
4177
4178 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4180 self.password = v.into();
4181 self
4182 }
4183
4184 pub fn set_password_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4186 self.password_set = v.into();
4187 self
4188 }
4189
4190 pub fn set_database_service<T: std::convert::Into<std::string::String>>(
4192 mut self,
4193 v: T,
4194 ) -> Self {
4195 self.database_service = v.into();
4196 self
4197 }
4198
4199 pub fn set_ssl<T>(mut self, v: T) -> Self
4201 where
4202 T: std::convert::Into<crate::model::SslConfig>,
4203 {
4204 self.ssl = std::option::Option::Some(v.into());
4205 self
4206 }
4207
4208 pub fn set_or_clear_ssl<T>(mut self, v: std::option::Option<T>) -> Self
4210 where
4211 T: std::convert::Into<crate::model::SslConfig>,
4212 {
4213 self.ssl = v.map(|x| x.into());
4214 self
4215 }
4216
4217 pub fn set_connectivity<
4222 T: std::convert::Into<
4223 std::option::Option<crate::model::oracle_connection_profile::Connectivity>,
4224 >,
4225 >(
4226 mut self,
4227 v: T,
4228 ) -> Self {
4229 self.connectivity = v.into();
4230 self
4231 }
4232
4233 pub fn static_service_ip_connectivity(
4237 &self,
4238 ) -> std::option::Option<&std::boxed::Box<crate::model::StaticServiceIpConnectivity>> {
4239 #[allow(unreachable_patterns)]
4240 self.connectivity.as_ref().and_then(|v| match v {
4241 crate::model::oracle_connection_profile::Connectivity::StaticServiceIpConnectivity(
4242 v,
4243 ) => std::option::Option::Some(v),
4244 _ => std::option::Option::None,
4245 })
4246 }
4247
4248 pub fn set_static_service_ip_connectivity<
4254 T: std::convert::Into<std::boxed::Box<crate::model::StaticServiceIpConnectivity>>,
4255 >(
4256 mut self,
4257 v: T,
4258 ) -> Self {
4259 self.connectivity = std::option::Option::Some(
4260 crate::model::oracle_connection_profile::Connectivity::StaticServiceIpConnectivity(
4261 v.into(),
4262 ),
4263 );
4264 self
4265 }
4266
4267 pub fn forward_ssh_connectivity(
4271 &self,
4272 ) -> std::option::Option<&std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>> {
4273 #[allow(unreachable_patterns)]
4274 self.connectivity.as_ref().and_then(|v| match v {
4275 crate::model::oracle_connection_profile::Connectivity::ForwardSshConnectivity(v) => {
4276 std::option::Option::Some(v)
4277 }
4278 _ => std::option::Option::None,
4279 })
4280 }
4281
4282 pub fn set_forward_ssh_connectivity<
4288 T: std::convert::Into<std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>>,
4289 >(
4290 mut self,
4291 v: T,
4292 ) -> Self {
4293 self.connectivity = std::option::Option::Some(
4294 crate::model::oracle_connection_profile::Connectivity::ForwardSshConnectivity(v.into()),
4295 );
4296 self
4297 }
4298
4299 pub fn private_connectivity(
4303 &self,
4304 ) -> std::option::Option<&std::boxed::Box<crate::model::PrivateConnectivity>> {
4305 #[allow(unreachable_patterns)]
4306 self.connectivity.as_ref().and_then(|v| match v {
4307 crate::model::oracle_connection_profile::Connectivity::PrivateConnectivity(v) => {
4308 std::option::Option::Some(v)
4309 }
4310 _ => std::option::Option::None,
4311 })
4312 }
4313
4314 pub fn set_private_connectivity<
4320 T: std::convert::Into<std::boxed::Box<crate::model::PrivateConnectivity>>,
4321 >(
4322 mut self,
4323 v: T,
4324 ) -> Self {
4325 self.connectivity = std::option::Option::Some(
4326 crate::model::oracle_connection_profile::Connectivity::PrivateConnectivity(v.into()),
4327 );
4328 self
4329 }
4330}
4331
4332impl wkt::message::Message for OracleConnectionProfile {
4333 fn typename() -> &'static str {
4334 "type.googleapis.com/google.cloud.clouddms.v1.OracleConnectionProfile"
4335 }
4336}
4337
4338pub mod oracle_connection_profile {
4340 #[allow(unused_imports)]
4341 use super::*;
4342
4343 #[derive(Clone, Debug, PartialEq)]
4345 #[non_exhaustive]
4346 pub enum Connectivity {
4347 StaticServiceIpConnectivity(std::boxed::Box<crate::model::StaticServiceIpConnectivity>),
4349 ForwardSshConnectivity(std::boxed::Box<crate::model::ForwardSshTunnelConnectivity>),
4351 PrivateConnectivity(std::boxed::Box<crate::model::PrivateConnectivity>),
4353 }
4354}
4355
4356#[derive(Clone, Default, PartialEq)]
4359#[non_exhaustive]
4360pub struct CloudSqlConnectionProfile {
4361 pub cloud_sql_id: std::string::String,
4364
4365 pub settings: std::option::Option<crate::model::CloudSqlSettings>,
4367
4368 pub private_ip: std::string::String,
4370
4371 pub public_ip: std::string::String,
4373
4374 pub additional_public_ip: std::string::String,
4378
4379 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4380}
4381
4382impl CloudSqlConnectionProfile {
4383 pub fn new() -> Self {
4384 std::default::Default::default()
4385 }
4386
4387 pub fn set_cloud_sql_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4389 self.cloud_sql_id = v.into();
4390 self
4391 }
4392
4393 pub fn set_settings<T>(mut self, v: T) -> Self
4395 where
4396 T: std::convert::Into<crate::model::CloudSqlSettings>,
4397 {
4398 self.settings = std::option::Option::Some(v.into());
4399 self
4400 }
4401
4402 pub fn set_or_clear_settings<T>(mut self, v: std::option::Option<T>) -> Self
4404 where
4405 T: std::convert::Into<crate::model::CloudSqlSettings>,
4406 {
4407 self.settings = v.map(|x| x.into());
4408 self
4409 }
4410
4411 pub fn set_private_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4413 self.private_ip = v.into();
4414 self
4415 }
4416
4417 pub fn set_public_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4419 self.public_ip = v.into();
4420 self
4421 }
4422
4423 pub fn set_additional_public_ip<T: std::convert::Into<std::string::String>>(
4425 mut self,
4426 v: T,
4427 ) -> Self {
4428 self.additional_public_ip = v.into();
4429 self
4430 }
4431}
4432
4433impl wkt::message::Message for CloudSqlConnectionProfile {
4434 fn typename() -> &'static str {
4435 "type.googleapis.com/google.cloud.clouddms.v1.CloudSqlConnectionProfile"
4436 }
4437}
4438
4439#[derive(Clone, Default, PartialEq)]
4442#[non_exhaustive]
4443pub struct AlloyDbConnectionProfile {
4444 pub cluster_id: std::string::String,
4447
4448 pub settings: std::option::Option<crate::model::AlloyDbSettings>,
4450
4451 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4452}
4453
4454impl AlloyDbConnectionProfile {
4455 pub fn new() -> Self {
4456 std::default::Default::default()
4457 }
4458
4459 pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4461 self.cluster_id = v.into();
4462 self
4463 }
4464
4465 pub fn set_settings<T>(mut self, v: T) -> Self
4467 where
4468 T: std::convert::Into<crate::model::AlloyDbSettings>,
4469 {
4470 self.settings = std::option::Option::Some(v.into());
4471 self
4472 }
4473
4474 pub fn set_or_clear_settings<T>(mut self, v: std::option::Option<T>) -> Self
4476 where
4477 T: std::convert::Into<crate::model::AlloyDbSettings>,
4478 {
4479 self.settings = v.map(|x| x.into());
4480 self
4481 }
4482}
4483
4484impl wkt::message::Message for AlloyDbConnectionProfile {
4485 fn typename() -> &'static str {
4486 "type.googleapis.com/google.cloud.clouddms.v1.AlloyDbConnectionProfile"
4487 }
4488}
4489
4490#[derive(Clone, Default, PartialEq)]
4492#[non_exhaustive]
4493pub struct SqlAclEntry {
4494 pub value: std::string::String,
4496
4497 pub label: std::string::String,
4499
4500 pub expiration: std::option::Option<crate::model::sql_acl_entry::Expiration>,
4502
4503 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4504}
4505
4506impl SqlAclEntry {
4507 pub fn new() -> Self {
4508 std::default::Default::default()
4509 }
4510
4511 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4513 self.value = v.into();
4514 self
4515 }
4516
4517 pub fn set_label<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4519 self.label = v.into();
4520 self
4521 }
4522
4523 pub fn set_expiration<
4528 T: std::convert::Into<std::option::Option<crate::model::sql_acl_entry::Expiration>>,
4529 >(
4530 mut self,
4531 v: T,
4532 ) -> Self {
4533 self.expiration = v.into();
4534 self
4535 }
4536
4537 pub fn expire_time(&self) -> std::option::Option<&std::boxed::Box<wkt::Timestamp>> {
4541 #[allow(unreachable_patterns)]
4542 self.expiration.as_ref().and_then(|v| match v {
4543 crate::model::sql_acl_entry::Expiration::ExpireTime(v) => std::option::Option::Some(v),
4544 _ => std::option::Option::None,
4545 })
4546 }
4547
4548 pub fn set_expire_time<T: std::convert::Into<std::boxed::Box<wkt::Timestamp>>>(
4554 mut self,
4555 v: T,
4556 ) -> Self {
4557 self.expiration = std::option::Option::Some(
4558 crate::model::sql_acl_entry::Expiration::ExpireTime(v.into()),
4559 );
4560 self
4561 }
4562
4563 pub fn ttl(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
4567 #[allow(unreachable_patterns)]
4568 self.expiration.as_ref().and_then(|v| match v {
4569 crate::model::sql_acl_entry::Expiration::Ttl(v) => std::option::Option::Some(v),
4570 _ => std::option::Option::None,
4571 })
4572 }
4573
4574 pub fn set_ttl<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(mut self, v: T) -> Self {
4580 self.expiration =
4581 std::option::Option::Some(crate::model::sql_acl_entry::Expiration::Ttl(v.into()));
4582 self
4583 }
4584}
4585
4586impl wkt::message::Message for SqlAclEntry {
4587 fn typename() -> &'static str {
4588 "type.googleapis.com/google.cloud.clouddms.v1.SqlAclEntry"
4589 }
4590}
4591
4592pub mod sql_acl_entry {
4594 #[allow(unused_imports)]
4595 use super::*;
4596
4597 #[derive(Clone, Debug, PartialEq)]
4599 #[non_exhaustive]
4600 pub enum Expiration {
4601 ExpireTime(std::boxed::Box<wkt::Timestamp>),
4605 Ttl(std::boxed::Box<wkt::Duration>),
4607 }
4608}
4609
4610#[derive(Clone, Default, PartialEq)]
4612#[non_exhaustive]
4613pub struct SqlIpConfig {
4614 pub enable_ipv4: std::option::Option<wkt::BoolValue>,
4616
4617 pub private_network: std::string::String,
4622
4623 pub allocated_ip_range: std::string::String,
4630
4631 pub require_ssl: std::option::Option<wkt::BoolValue>,
4633
4634 pub authorized_networks: std::vec::Vec<crate::model::SqlAclEntry>,
4639
4640 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4641}
4642
4643impl SqlIpConfig {
4644 pub fn new() -> Self {
4645 std::default::Default::default()
4646 }
4647
4648 pub fn set_enable_ipv4<T>(mut self, v: T) -> Self
4650 where
4651 T: std::convert::Into<wkt::BoolValue>,
4652 {
4653 self.enable_ipv4 = std::option::Option::Some(v.into());
4654 self
4655 }
4656
4657 pub fn set_or_clear_enable_ipv4<T>(mut self, v: std::option::Option<T>) -> Self
4659 where
4660 T: std::convert::Into<wkt::BoolValue>,
4661 {
4662 self.enable_ipv4 = v.map(|x| x.into());
4663 self
4664 }
4665
4666 pub fn set_private_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4668 self.private_network = v.into();
4669 self
4670 }
4671
4672 pub fn set_allocated_ip_range<T: std::convert::Into<std::string::String>>(
4674 mut self,
4675 v: T,
4676 ) -> Self {
4677 self.allocated_ip_range = v.into();
4678 self
4679 }
4680
4681 pub fn set_require_ssl<T>(mut self, v: T) -> Self
4683 where
4684 T: std::convert::Into<wkt::BoolValue>,
4685 {
4686 self.require_ssl = std::option::Option::Some(v.into());
4687 self
4688 }
4689
4690 pub fn set_or_clear_require_ssl<T>(mut self, v: std::option::Option<T>) -> Self
4692 where
4693 T: std::convert::Into<wkt::BoolValue>,
4694 {
4695 self.require_ssl = v.map(|x| x.into());
4696 self
4697 }
4698
4699 pub fn set_authorized_networks<T, V>(mut self, v: T) -> Self
4701 where
4702 T: std::iter::IntoIterator<Item = V>,
4703 V: std::convert::Into<crate::model::SqlAclEntry>,
4704 {
4705 use std::iter::Iterator;
4706 self.authorized_networks = v.into_iter().map(|i| i.into()).collect();
4707 self
4708 }
4709}
4710
4711impl wkt::message::Message for SqlIpConfig {
4712 fn typename() -> &'static str {
4713 "type.googleapis.com/google.cloud.clouddms.v1.SqlIpConfig"
4714 }
4715}
4716
4717#[derive(Clone, Default, PartialEq)]
4719#[non_exhaustive]
4720pub struct CloudSqlSettings {
4721 pub database_version: crate::model::cloud_sql_settings::SqlDatabaseVersion,
4723
4724 pub user_labels: std::collections::HashMap<std::string::String, std::string::String>,
4730
4731 pub tier: std::string::String,
4738
4739 pub storage_auto_resize_limit: std::option::Option<wkt::Int64Value>,
4742
4743 pub activation_policy: crate::model::cloud_sql_settings::SqlActivationPolicy,
4752
4753 pub ip_config: std::option::Option<crate::model::SqlIpConfig>,
4757
4758 pub auto_storage_increase: std::option::Option<wkt::BoolValue>,
4764
4765 pub database_flags: std::collections::HashMap<std::string::String, std::string::String>,
4769
4770 pub data_disk_type: crate::model::cloud_sql_settings::SqlDataDiskType,
4772
4773 pub data_disk_size_gb: std::option::Option<wkt::Int64Value>,
4776
4777 pub zone: std::string::String,
4780
4781 pub secondary_zone: std::string::String,
4785
4786 pub source_id: std::string::String,
4790
4791 pub root_password: std::string::String,
4793
4794 pub root_password_set: bool,
4796
4797 pub collation: std::string::String,
4799
4800 pub cmek_key_name: std::string::String,
4802
4803 pub availability_type: crate::model::cloud_sql_settings::SqlAvailabilityType,
4810
4811 pub edition: crate::model::cloud_sql_settings::Edition,
4813
4814 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4815}
4816
4817impl CloudSqlSettings {
4818 pub fn new() -> Self {
4819 std::default::Default::default()
4820 }
4821
4822 pub fn set_database_version<
4824 T: std::convert::Into<crate::model::cloud_sql_settings::SqlDatabaseVersion>,
4825 >(
4826 mut self,
4827 v: T,
4828 ) -> Self {
4829 self.database_version = v.into();
4830 self
4831 }
4832
4833 pub fn set_user_labels<T, K, V>(mut self, v: T) -> Self
4835 where
4836 T: std::iter::IntoIterator<Item = (K, V)>,
4837 K: std::convert::Into<std::string::String>,
4838 V: std::convert::Into<std::string::String>,
4839 {
4840 use std::iter::Iterator;
4841 self.user_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4842 self
4843 }
4844
4845 pub fn set_tier<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4847 self.tier = v.into();
4848 self
4849 }
4850
4851 pub fn set_storage_auto_resize_limit<T>(mut self, v: T) -> Self
4853 where
4854 T: std::convert::Into<wkt::Int64Value>,
4855 {
4856 self.storage_auto_resize_limit = std::option::Option::Some(v.into());
4857 self
4858 }
4859
4860 pub fn set_or_clear_storage_auto_resize_limit<T>(mut self, v: std::option::Option<T>) -> Self
4862 where
4863 T: std::convert::Into<wkt::Int64Value>,
4864 {
4865 self.storage_auto_resize_limit = v.map(|x| x.into());
4866 self
4867 }
4868
4869 pub fn set_activation_policy<
4871 T: std::convert::Into<crate::model::cloud_sql_settings::SqlActivationPolicy>,
4872 >(
4873 mut self,
4874 v: T,
4875 ) -> Self {
4876 self.activation_policy = v.into();
4877 self
4878 }
4879
4880 pub fn set_ip_config<T>(mut self, v: T) -> Self
4882 where
4883 T: std::convert::Into<crate::model::SqlIpConfig>,
4884 {
4885 self.ip_config = std::option::Option::Some(v.into());
4886 self
4887 }
4888
4889 pub fn set_or_clear_ip_config<T>(mut self, v: std::option::Option<T>) -> Self
4891 where
4892 T: std::convert::Into<crate::model::SqlIpConfig>,
4893 {
4894 self.ip_config = v.map(|x| x.into());
4895 self
4896 }
4897
4898 pub fn set_auto_storage_increase<T>(mut self, v: T) -> Self
4900 where
4901 T: std::convert::Into<wkt::BoolValue>,
4902 {
4903 self.auto_storage_increase = std::option::Option::Some(v.into());
4904 self
4905 }
4906
4907 pub fn set_or_clear_auto_storage_increase<T>(mut self, v: std::option::Option<T>) -> Self
4909 where
4910 T: std::convert::Into<wkt::BoolValue>,
4911 {
4912 self.auto_storage_increase = v.map(|x| x.into());
4913 self
4914 }
4915
4916 pub fn set_database_flags<T, K, V>(mut self, v: T) -> Self
4918 where
4919 T: std::iter::IntoIterator<Item = (K, V)>,
4920 K: std::convert::Into<std::string::String>,
4921 V: std::convert::Into<std::string::String>,
4922 {
4923 use std::iter::Iterator;
4924 self.database_flags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
4925 self
4926 }
4927
4928 pub fn set_data_disk_type<
4930 T: std::convert::Into<crate::model::cloud_sql_settings::SqlDataDiskType>,
4931 >(
4932 mut self,
4933 v: T,
4934 ) -> Self {
4935 self.data_disk_type = v.into();
4936 self
4937 }
4938
4939 pub fn set_data_disk_size_gb<T>(mut self, v: T) -> Self
4941 where
4942 T: std::convert::Into<wkt::Int64Value>,
4943 {
4944 self.data_disk_size_gb = std::option::Option::Some(v.into());
4945 self
4946 }
4947
4948 pub fn set_or_clear_data_disk_size_gb<T>(mut self, v: std::option::Option<T>) -> Self
4950 where
4951 T: std::convert::Into<wkt::Int64Value>,
4952 {
4953 self.data_disk_size_gb = v.map(|x| x.into());
4954 self
4955 }
4956
4957 pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4959 self.zone = v.into();
4960 self
4961 }
4962
4963 pub fn set_secondary_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4965 self.secondary_zone = v.into();
4966 self
4967 }
4968
4969 pub fn set_source_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4971 self.source_id = v.into();
4972 self
4973 }
4974
4975 pub fn set_root_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4977 self.root_password = v.into();
4978 self
4979 }
4980
4981 pub fn set_root_password_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4983 self.root_password_set = v.into();
4984 self
4985 }
4986
4987 pub fn set_collation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4989 self.collation = v.into();
4990 self
4991 }
4992
4993 pub fn set_cmek_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4995 self.cmek_key_name = v.into();
4996 self
4997 }
4998
4999 pub fn set_availability_type<
5001 T: std::convert::Into<crate::model::cloud_sql_settings::SqlAvailabilityType>,
5002 >(
5003 mut self,
5004 v: T,
5005 ) -> Self {
5006 self.availability_type = v.into();
5007 self
5008 }
5009
5010 pub fn set_edition<T: std::convert::Into<crate::model::cloud_sql_settings::Edition>>(
5012 mut self,
5013 v: T,
5014 ) -> Self {
5015 self.edition = v.into();
5016 self
5017 }
5018}
5019
5020impl wkt::message::Message for CloudSqlSettings {
5021 fn typename() -> &'static str {
5022 "type.googleapis.com/google.cloud.clouddms.v1.CloudSqlSettings"
5023 }
5024}
5025
5026pub mod cloud_sql_settings {
5028 #[allow(unused_imports)]
5029 use super::*;
5030
5031 #[derive(Clone, Debug, PartialEq)]
5047 #[non_exhaustive]
5048 pub enum SqlActivationPolicy {
5049 Unspecified,
5051 Always,
5053 Never,
5055 UnknownValue(sql_activation_policy::UnknownValue),
5060 }
5061
5062 #[doc(hidden)]
5063 pub mod sql_activation_policy {
5064 #[allow(unused_imports)]
5065 use super::*;
5066 #[derive(Clone, Debug, PartialEq)]
5067 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5068 }
5069
5070 impl SqlActivationPolicy {
5071 pub fn value(&self) -> std::option::Option<i32> {
5076 match self {
5077 Self::Unspecified => std::option::Option::Some(0),
5078 Self::Always => std::option::Option::Some(1),
5079 Self::Never => std::option::Option::Some(2),
5080 Self::UnknownValue(u) => u.0.value(),
5081 }
5082 }
5083
5084 pub fn name(&self) -> std::option::Option<&str> {
5089 match self {
5090 Self::Unspecified => std::option::Option::Some("SQL_ACTIVATION_POLICY_UNSPECIFIED"),
5091 Self::Always => std::option::Option::Some("ALWAYS"),
5092 Self::Never => std::option::Option::Some("NEVER"),
5093 Self::UnknownValue(u) => u.0.name(),
5094 }
5095 }
5096 }
5097
5098 impl std::default::Default for SqlActivationPolicy {
5099 fn default() -> Self {
5100 use std::convert::From;
5101 Self::from(0)
5102 }
5103 }
5104
5105 impl std::fmt::Display for SqlActivationPolicy {
5106 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5107 wkt::internal::display_enum(f, self.name(), self.value())
5108 }
5109 }
5110
5111 impl std::convert::From<i32> for SqlActivationPolicy {
5112 fn from(value: i32) -> Self {
5113 match value {
5114 0 => Self::Unspecified,
5115 1 => Self::Always,
5116 2 => Self::Never,
5117 _ => Self::UnknownValue(sql_activation_policy::UnknownValue(
5118 wkt::internal::UnknownEnumValue::Integer(value),
5119 )),
5120 }
5121 }
5122 }
5123
5124 impl std::convert::From<&str> for SqlActivationPolicy {
5125 fn from(value: &str) -> Self {
5126 use std::string::ToString;
5127 match value {
5128 "SQL_ACTIVATION_POLICY_UNSPECIFIED" => Self::Unspecified,
5129 "ALWAYS" => Self::Always,
5130 "NEVER" => Self::Never,
5131 _ => Self::UnknownValue(sql_activation_policy::UnknownValue(
5132 wkt::internal::UnknownEnumValue::String(value.to_string()),
5133 )),
5134 }
5135 }
5136 }
5137
5138 impl serde::ser::Serialize for SqlActivationPolicy {
5139 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5140 where
5141 S: serde::Serializer,
5142 {
5143 match self {
5144 Self::Unspecified => serializer.serialize_i32(0),
5145 Self::Always => serializer.serialize_i32(1),
5146 Self::Never => serializer.serialize_i32(2),
5147 Self::UnknownValue(u) => u.0.serialize(serializer),
5148 }
5149 }
5150 }
5151
5152 impl<'de> serde::de::Deserialize<'de> for SqlActivationPolicy {
5153 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5154 where
5155 D: serde::Deserializer<'de>,
5156 {
5157 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SqlActivationPolicy>::new(
5158 ".google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy",
5159 ))
5160 }
5161 }
5162
5163 #[derive(Clone, Debug, PartialEq)]
5179 #[non_exhaustive]
5180 pub enum SqlDataDiskType {
5181 Unspecified,
5183 PdSsd,
5185 PdHdd,
5187 UnknownValue(sql_data_disk_type::UnknownValue),
5192 }
5193
5194 #[doc(hidden)]
5195 pub mod sql_data_disk_type {
5196 #[allow(unused_imports)]
5197 use super::*;
5198 #[derive(Clone, Debug, PartialEq)]
5199 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5200 }
5201
5202 impl SqlDataDiskType {
5203 pub fn value(&self) -> std::option::Option<i32> {
5208 match self {
5209 Self::Unspecified => std::option::Option::Some(0),
5210 Self::PdSsd => std::option::Option::Some(1),
5211 Self::PdHdd => std::option::Option::Some(2),
5212 Self::UnknownValue(u) => u.0.value(),
5213 }
5214 }
5215
5216 pub fn name(&self) -> std::option::Option<&str> {
5221 match self {
5222 Self::Unspecified => std::option::Option::Some("SQL_DATA_DISK_TYPE_UNSPECIFIED"),
5223 Self::PdSsd => std::option::Option::Some("PD_SSD"),
5224 Self::PdHdd => std::option::Option::Some("PD_HDD"),
5225 Self::UnknownValue(u) => u.0.name(),
5226 }
5227 }
5228 }
5229
5230 impl std::default::Default for SqlDataDiskType {
5231 fn default() -> Self {
5232 use std::convert::From;
5233 Self::from(0)
5234 }
5235 }
5236
5237 impl std::fmt::Display for SqlDataDiskType {
5238 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5239 wkt::internal::display_enum(f, self.name(), self.value())
5240 }
5241 }
5242
5243 impl std::convert::From<i32> for SqlDataDiskType {
5244 fn from(value: i32) -> Self {
5245 match value {
5246 0 => Self::Unspecified,
5247 1 => Self::PdSsd,
5248 2 => Self::PdHdd,
5249 _ => Self::UnknownValue(sql_data_disk_type::UnknownValue(
5250 wkt::internal::UnknownEnumValue::Integer(value),
5251 )),
5252 }
5253 }
5254 }
5255
5256 impl std::convert::From<&str> for SqlDataDiskType {
5257 fn from(value: &str) -> Self {
5258 use std::string::ToString;
5259 match value {
5260 "SQL_DATA_DISK_TYPE_UNSPECIFIED" => Self::Unspecified,
5261 "PD_SSD" => Self::PdSsd,
5262 "PD_HDD" => Self::PdHdd,
5263 _ => Self::UnknownValue(sql_data_disk_type::UnknownValue(
5264 wkt::internal::UnknownEnumValue::String(value.to_string()),
5265 )),
5266 }
5267 }
5268 }
5269
5270 impl serde::ser::Serialize for SqlDataDiskType {
5271 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5272 where
5273 S: serde::Serializer,
5274 {
5275 match self {
5276 Self::Unspecified => serializer.serialize_i32(0),
5277 Self::PdSsd => serializer.serialize_i32(1),
5278 Self::PdHdd => serializer.serialize_i32(2),
5279 Self::UnknownValue(u) => u.0.serialize(serializer),
5280 }
5281 }
5282 }
5283
5284 impl<'de> serde::de::Deserialize<'de> for SqlDataDiskType {
5285 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5286 where
5287 D: serde::Deserializer<'de>,
5288 {
5289 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SqlDataDiskType>::new(
5290 ".google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType",
5291 ))
5292 }
5293 }
5294
5295 #[derive(Clone, Debug, PartialEq)]
5311 #[non_exhaustive]
5312 pub enum SqlDatabaseVersion {
5313 Unspecified,
5315 Mysql56,
5317 Mysql57,
5319 Postgres96,
5321 Postgres11,
5323 Postgres10,
5325 Mysql80,
5327 Postgres12,
5329 Postgres13,
5331 Postgres14,
5333 Postgres15,
5335 UnknownValue(sql_database_version::UnknownValue),
5340 }
5341
5342 #[doc(hidden)]
5343 pub mod sql_database_version {
5344 #[allow(unused_imports)]
5345 use super::*;
5346 #[derive(Clone, Debug, PartialEq)]
5347 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5348 }
5349
5350 impl SqlDatabaseVersion {
5351 pub fn value(&self) -> std::option::Option<i32> {
5356 match self {
5357 Self::Unspecified => std::option::Option::Some(0),
5358 Self::Mysql56 => std::option::Option::Some(1),
5359 Self::Mysql57 => std::option::Option::Some(2),
5360 Self::Postgres96 => std::option::Option::Some(3),
5361 Self::Postgres11 => std::option::Option::Some(4),
5362 Self::Postgres10 => std::option::Option::Some(5),
5363 Self::Mysql80 => std::option::Option::Some(6),
5364 Self::Postgres12 => std::option::Option::Some(7),
5365 Self::Postgres13 => std::option::Option::Some(8),
5366 Self::Postgres14 => std::option::Option::Some(17),
5367 Self::Postgres15 => std::option::Option::Some(18),
5368 Self::UnknownValue(u) => u.0.value(),
5369 }
5370 }
5371
5372 pub fn name(&self) -> std::option::Option<&str> {
5377 match self {
5378 Self::Unspecified => std::option::Option::Some("SQL_DATABASE_VERSION_UNSPECIFIED"),
5379 Self::Mysql56 => std::option::Option::Some("MYSQL_5_6"),
5380 Self::Mysql57 => std::option::Option::Some("MYSQL_5_7"),
5381 Self::Postgres96 => std::option::Option::Some("POSTGRES_9_6"),
5382 Self::Postgres11 => std::option::Option::Some("POSTGRES_11"),
5383 Self::Postgres10 => std::option::Option::Some("POSTGRES_10"),
5384 Self::Mysql80 => std::option::Option::Some("MYSQL_8_0"),
5385 Self::Postgres12 => std::option::Option::Some("POSTGRES_12"),
5386 Self::Postgres13 => std::option::Option::Some("POSTGRES_13"),
5387 Self::Postgres14 => std::option::Option::Some("POSTGRES_14"),
5388 Self::Postgres15 => std::option::Option::Some("POSTGRES_15"),
5389 Self::UnknownValue(u) => u.0.name(),
5390 }
5391 }
5392 }
5393
5394 impl std::default::Default for SqlDatabaseVersion {
5395 fn default() -> Self {
5396 use std::convert::From;
5397 Self::from(0)
5398 }
5399 }
5400
5401 impl std::fmt::Display for SqlDatabaseVersion {
5402 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5403 wkt::internal::display_enum(f, self.name(), self.value())
5404 }
5405 }
5406
5407 impl std::convert::From<i32> for SqlDatabaseVersion {
5408 fn from(value: i32) -> Self {
5409 match value {
5410 0 => Self::Unspecified,
5411 1 => Self::Mysql56,
5412 2 => Self::Mysql57,
5413 3 => Self::Postgres96,
5414 4 => Self::Postgres11,
5415 5 => Self::Postgres10,
5416 6 => Self::Mysql80,
5417 7 => Self::Postgres12,
5418 8 => Self::Postgres13,
5419 17 => Self::Postgres14,
5420 18 => Self::Postgres15,
5421 _ => Self::UnknownValue(sql_database_version::UnknownValue(
5422 wkt::internal::UnknownEnumValue::Integer(value),
5423 )),
5424 }
5425 }
5426 }
5427
5428 impl std::convert::From<&str> for SqlDatabaseVersion {
5429 fn from(value: &str) -> Self {
5430 use std::string::ToString;
5431 match value {
5432 "SQL_DATABASE_VERSION_UNSPECIFIED" => Self::Unspecified,
5433 "MYSQL_5_6" => Self::Mysql56,
5434 "MYSQL_5_7" => Self::Mysql57,
5435 "POSTGRES_9_6" => Self::Postgres96,
5436 "POSTGRES_11" => Self::Postgres11,
5437 "POSTGRES_10" => Self::Postgres10,
5438 "MYSQL_8_0" => Self::Mysql80,
5439 "POSTGRES_12" => Self::Postgres12,
5440 "POSTGRES_13" => Self::Postgres13,
5441 "POSTGRES_14" => Self::Postgres14,
5442 "POSTGRES_15" => Self::Postgres15,
5443 _ => Self::UnknownValue(sql_database_version::UnknownValue(
5444 wkt::internal::UnknownEnumValue::String(value.to_string()),
5445 )),
5446 }
5447 }
5448 }
5449
5450 impl serde::ser::Serialize for SqlDatabaseVersion {
5451 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5452 where
5453 S: serde::Serializer,
5454 {
5455 match self {
5456 Self::Unspecified => serializer.serialize_i32(0),
5457 Self::Mysql56 => serializer.serialize_i32(1),
5458 Self::Mysql57 => serializer.serialize_i32(2),
5459 Self::Postgres96 => serializer.serialize_i32(3),
5460 Self::Postgres11 => serializer.serialize_i32(4),
5461 Self::Postgres10 => serializer.serialize_i32(5),
5462 Self::Mysql80 => serializer.serialize_i32(6),
5463 Self::Postgres12 => serializer.serialize_i32(7),
5464 Self::Postgres13 => serializer.serialize_i32(8),
5465 Self::Postgres14 => serializer.serialize_i32(17),
5466 Self::Postgres15 => serializer.serialize_i32(18),
5467 Self::UnknownValue(u) => u.0.serialize(serializer),
5468 }
5469 }
5470 }
5471
5472 impl<'de> serde::de::Deserialize<'de> for SqlDatabaseVersion {
5473 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5474 where
5475 D: serde::Deserializer<'de>,
5476 {
5477 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SqlDatabaseVersion>::new(
5478 ".google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion",
5479 ))
5480 }
5481 }
5482
5483 #[derive(Clone, Debug, PartialEq)]
5499 #[non_exhaustive]
5500 pub enum SqlAvailabilityType {
5501 Unspecified,
5503 Zonal,
5505 Regional,
5507 UnknownValue(sql_availability_type::UnknownValue),
5512 }
5513
5514 #[doc(hidden)]
5515 pub mod sql_availability_type {
5516 #[allow(unused_imports)]
5517 use super::*;
5518 #[derive(Clone, Debug, PartialEq)]
5519 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5520 }
5521
5522 impl SqlAvailabilityType {
5523 pub fn value(&self) -> std::option::Option<i32> {
5528 match self {
5529 Self::Unspecified => std::option::Option::Some(0),
5530 Self::Zonal => std::option::Option::Some(1),
5531 Self::Regional => std::option::Option::Some(2),
5532 Self::UnknownValue(u) => u.0.value(),
5533 }
5534 }
5535
5536 pub fn name(&self) -> std::option::Option<&str> {
5541 match self {
5542 Self::Unspecified => std::option::Option::Some("SQL_AVAILABILITY_TYPE_UNSPECIFIED"),
5543 Self::Zonal => std::option::Option::Some("ZONAL"),
5544 Self::Regional => std::option::Option::Some("REGIONAL"),
5545 Self::UnknownValue(u) => u.0.name(),
5546 }
5547 }
5548 }
5549
5550 impl std::default::Default for SqlAvailabilityType {
5551 fn default() -> Self {
5552 use std::convert::From;
5553 Self::from(0)
5554 }
5555 }
5556
5557 impl std::fmt::Display for SqlAvailabilityType {
5558 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5559 wkt::internal::display_enum(f, self.name(), self.value())
5560 }
5561 }
5562
5563 impl std::convert::From<i32> for SqlAvailabilityType {
5564 fn from(value: i32) -> Self {
5565 match value {
5566 0 => Self::Unspecified,
5567 1 => Self::Zonal,
5568 2 => Self::Regional,
5569 _ => Self::UnknownValue(sql_availability_type::UnknownValue(
5570 wkt::internal::UnknownEnumValue::Integer(value),
5571 )),
5572 }
5573 }
5574 }
5575
5576 impl std::convert::From<&str> for SqlAvailabilityType {
5577 fn from(value: &str) -> Self {
5578 use std::string::ToString;
5579 match value {
5580 "SQL_AVAILABILITY_TYPE_UNSPECIFIED" => Self::Unspecified,
5581 "ZONAL" => Self::Zonal,
5582 "REGIONAL" => Self::Regional,
5583 _ => Self::UnknownValue(sql_availability_type::UnknownValue(
5584 wkt::internal::UnknownEnumValue::String(value.to_string()),
5585 )),
5586 }
5587 }
5588 }
5589
5590 impl serde::ser::Serialize for SqlAvailabilityType {
5591 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5592 where
5593 S: serde::Serializer,
5594 {
5595 match self {
5596 Self::Unspecified => serializer.serialize_i32(0),
5597 Self::Zonal => serializer.serialize_i32(1),
5598 Self::Regional => serializer.serialize_i32(2),
5599 Self::UnknownValue(u) => u.0.serialize(serializer),
5600 }
5601 }
5602 }
5603
5604 impl<'de> serde::de::Deserialize<'de> for SqlAvailabilityType {
5605 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5606 where
5607 D: serde::Deserializer<'de>,
5608 {
5609 deserializer.deserialize_any(wkt::internal::EnumVisitor::<SqlAvailabilityType>::new(
5610 ".google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType",
5611 ))
5612 }
5613 }
5614
5615 #[derive(Clone, Debug, PartialEq)]
5632 #[non_exhaustive]
5633 pub enum Edition {
5634 Unspecified,
5636 Enterprise,
5638 EnterprisePlus,
5640 UnknownValue(edition::UnknownValue),
5645 }
5646
5647 #[doc(hidden)]
5648 pub mod edition {
5649 #[allow(unused_imports)]
5650 use super::*;
5651 #[derive(Clone, Debug, PartialEq)]
5652 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5653 }
5654
5655 impl Edition {
5656 pub fn value(&self) -> std::option::Option<i32> {
5661 match self {
5662 Self::Unspecified => std::option::Option::Some(0),
5663 Self::Enterprise => std::option::Option::Some(2),
5664 Self::EnterprisePlus => std::option::Option::Some(3),
5665 Self::UnknownValue(u) => u.0.value(),
5666 }
5667 }
5668
5669 pub fn name(&self) -> std::option::Option<&str> {
5674 match self {
5675 Self::Unspecified => std::option::Option::Some("EDITION_UNSPECIFIED"),
5676 Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
5677 Self::EnterprisePlus => std::option::Option::Some("ENTERPRISE_PLUS"),
5678 Self::UnknownValue(u) => u.0.name(),
5679 }
5680 }
5681 }
5682
5683 impl std::default::Default for Edition {
5684 fn default() -> Self {
5685 use std::convert::From;
5686 Self::from(0)
5687 }
5688 }
5689
5690 impl std::fmt::Display for Edition {
5691 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5692 wkt::internal::display_enum(f, self.name(), self.value())
5693 }
5694 }
5695
5696 impl std::convert::From<i32> for Edition {
5697 fn from(value: i32) -> Self {
5698 match value {
5699 0 => Self::Unspecified,
5700 2 => Self::Enterprise,
5701 3 => Self::EnterprisePlus,
5702 _ => Self::UnknownValue(edition::UnknownValue(
5703 wkt::internal::UnknownEnumValue::Integer(value),
5704 )),
5705 }
5706 }
5707 }
5708
5709 impl std::convert::From<&str> for Edition {
5710 fn from(value: &str) -> Self {
5711 use std::string::ToString;
5712 match value {
5713 "EDITION_UNSPECIFIED" => Self::Unspecified,
5714 "ENTERPRISE" => Self::Enterprise,
5715 "ENTERPRISE_PLUS" => Self::EnterprisePlus,
5716 _ => Self::UnknownValue(edition::UnknownValue(
5717 wkt::internal::UnknownEnumValue::String(value.to_string()),
5718 )),
5719 }
5720 }
5721 }
5722
5723 impl serde::ser::Serialize for Edition {
5724 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5725 where
5726 S: serde::Serializer,
5727 {
5728 match self {
5729 Self::Unspecified => serializer.serialize_i32(0),
5730 Self::Enterprise => serializer.serialize_i32(2),
5731 Self::EnterprisePlus => serializer.serialize_i32(3),
5732 Self::UnknownValue(u) => u.0.serialize(serializer),
5733 }
5734 }
5735 }
5736
5737 impl<'de> serde::de::Deserialize<'de> for Edition {
5738 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5739 where
5740 D: serde::Deserializer<'de>,
5741 {
5742 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Edition>::new(
5743 ".google.cloud.clouddms.v1.CloudSqlSettings.Edition",
5744 ))
5745 }
5746 }
5747}
5748
5749#[derive(Clone, Default, PartialEq)]
5751#[non_exhaustive]
5752pub struct AlloyDbSettings {
5753 pub initial_user: std::option::Option<crate::model::alloy_db_settings::UserPassword>,
5756
5757 pub vpc_network: std::string::String,
5763
5764 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5767
5768 pub primary_instance_settings:
5769 std::option::Option<crate::model::alloy_db_settings::PrimaryInstanceSettings>,
5770
5771 pub encryption_config: std::option::Option<crate::model::alloy_db_settings::EncryptionConfig>,
5777
5778 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5779}
5780
5781impl AlloyDbSettings {
5782 pub fn new() -> Self {
5783 std::default::Default::default()
5784 }
5785
5786 pub fn set_initial_user<T>(mut self, v: T) -> Self
5788 where
5789 T: std::convert::Into<crate::model::alloy_db_settings::UserPassword>,
5790 {
5791 self.initial_user = std::option::Option::Some(v.into());
5792 self
5793 }
5794
5795 pub fn set_or_clear_initial_user<T>(mut self, v: std::option::Option<T>) -> Self
5797 where
5798 T: std::convert::Into<crate::model::alloy_db_settings::UserPassword>,
5799 {
5800 self.initial_user = v.map(|x| x.into());
5801 self
5802 }
5803
5804 pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5806 self.vpc_network = v.into();
5807 self
5808 }
5809
5810 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5812 where
5813 T: std::iter::IntoIterator<Item = (K, V)>,
5814 K: std::convert::Into<std::string::String>,
5815 V: std::convert::Into<std::string::String>,
5816 {
5817 use std::iter::Iterator;
5818 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5819 self
5820 }
5821
5822 pub fn set_primary_instance_settings<T>(mut self, v: T) -> Self
5824 where
5825 T: std::convert::Into<crate::model::alloy_db_settings::PrimaryInstanceSettings>,
5826 {
5827 self.primary_instance_settings = std::option::Option::Some(v.into());
5828 self
5829 }
5830
5831 pub fn set_or_clear_primary_instance_settings<T>(mut self, v: std::option::Option<T>) -> Self
5833 where
5834 T: std::convert::Into<crate::model::alloy_db_settings::PrimaryInstanceSettings>,
5835 {
5836 self.primary_instance_settings = v.map(|x| x.into());
5837 self
5838 }
5839
5840 pub fn set_encryption_config<T>(mut self, v: T) -> Self
5842 where
5843 T: std::convert::Into<crate::model::alloy_db_settings::EncryptionConfig>,
5844 {
5845 self.encryption_config = std::option::Option::Some(v.into());
5846 self
5847 }
5848
5849 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
5851 where
5852 T: std::convert::Into<crate::model::alloy_db_settings::EncryptionConfig>,
5853 {
5854 self.encryption_config = v.map(|x| x.into());
5855 self
5856 }
5857}
5858
5859impl wkt::message::Message for AlloyDbSettings {
5860 fn typename() -> &'static str {
5861 "type.googleapis.com/google.cloud.clouddms.v1.AlloyDbSettings"
5862 }
5863}
5864
5865pub mod alloy_db_settings {
5867 #[allow(unused_imports)]
5868 use super::*;
5869
5870 #[derive(Clone, Default, PartialEq)]
5873 #[non_exhaustive]
5874 pub struct UserPassword {
5875 pub user: std::string::String,
5877
5878 pub password: std::string::String,
5880
5881 pub password_set: bool,
5883
5884 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5885 }
5886
5887 impl UserPassword {
5888 pub fn new() -> Self {
5889 std::default::Default::default()
5890 }
5891
5892 pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5894 self.user = v.into();
5895 self
5896 }
5897
5898 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5900 self.password = v.into();
5901 self
5902 }
5903
5904 pub fn set_password_set<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5906 self.password_set = v.into();
5907 self
5908 }
5909 }
5910
5911 impl wkt::message::Message for UserPassword {
5912 fn typename() -> &'static str {
5913 "type.googleapis.com/google.cloud.clouddms.v1.AlloyDbSettings.UserPassword"
5914 }
5915 }
5916
5917 #[derive(Clone, Default, PartialEq)]
5919 #[non_exhaustive]
5920 pub struct PrimaryInstanceSettings {
5921 pub id: std::string::String,
5924
5925 pub machine_config: std::option::Option<
5928 crate::model::alloy_db_settings::primary_instance_settings::MachineConfig,
5929 >,
5930
5931 pub database_flags: std::collections::HashMap<std::string::String, std::string::String>,
5935
5936 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
5939
5940 pub private_ip: std::string::String,
5943
5944 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5945 }
5946
5947 impl PrimaryInstanceSettings {
5948 pub fn new() -> Self {
5949 std::default::Default::default()
5950 }
5951
5952 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5954 self.id = v.into();
5955 self
5956 }
5957
5958 pub fn set_machine_config<T>(mut self, v: T) -> Self
5960 where
5961 T: std::convert::Into<
5962 crate::model::alloy_db_settings::primary_instance_settings::MachineConfig,
5963 >,
5964 {
5965 self.machine_config = std::option::Option::Some(v.into());
5966 self
5967 }
5968
5969 pub fn set_or_clear_machine_config<T>(mut self, v: std::option::Option<T>) -> Self
5971 where
5972 T: std::convert::Into<
5973 crate::model::alloy_db_settings::primary_instance_settings::MachineConfig,
5974 >,
5975 {
5976 self.machine_config = v.map(|x| x.into());
5977 self
5978 }
5979
5980 pub fn set_database_flags<T, K, V>(mut self, v: T) -> Self
5982 where
5983 T: std::iter::IntoIterator<Item = (K, V)>,
5984 K: std::convert::Into<std::string::String>,
5985 V: std::convert::Into<std::string::String>,
5986 {
5987 use std::iter::Iterator;
5988 self.database_flags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5989 self
5990 }
5991
5992 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
5994 where
5995 T: std::iter::IntoIterator<Item = (K, V)>,
5996 K: std::convert::Into<std::string::String>,
5997 V: std::convert::Into<std::string::String>,
5998 {
5999 use std::iter::Iterator;
6000 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6001 self
6002 }
6003
6004 pub fn set_private_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6006 self.private_ip = v.into();
6007 self
6008 }
6009 }
6010
6011 impl wkt::message::Message for PrimaryInstanceSettings {
6012 fn typename() -> &'static str {
6013 "type.googleapis.com/google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings"
6014 }
6015 }
6016
6017 pub mod primary_instance_settings {
6019 #[allow(unused_imports)]
6020 use super::*;
6021
6022 #[derive(Clone, Default, PartialEq)]
6024 #[non_exhaustive]
6025 pub struct MachineConfig {
6026 pub cpu_count: i32,
6028
6029 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6030 }
6031
6032 impl MachineConfig {
6033 pub fn new() -> Self {
6034 std::default::Default::default()
6035 }
6036
6037 pub fn set_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6039 self.cpu_count = v.into();
6040 self
6041 }
6042 }
6043
6044 impl wkt::message::Message for MachineConfig {
6045 fn typename() -> &'static str {
6046 "type.googleapis.com/google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig"
6047 }
6048 }
6049 }
6050
6051 #[derive(Clone, Default, PartialEq)]
6054 #[non_exhaustive]
6055 pub struct EncryptionConfig {
6056 pub kms_key_name: std::string::String,
6060
6061 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6062 }
6063
6064 impl EncryptionConfig {
6065 pub fn new() -> Self {
6066 std::default::Default::default()
6067 }
6068
6069 pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
6071 mut self,
6072 v: T,
6073 ) -> Self {
6074 self.kms_key_name = v.into();
6075 self
6076 }
6077 }
6078
6079 impl wkt::message::Message for EncryptionConfig {
6080 fn typename() -> &'static str {
6081 "type.googleapis.com/google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig"
6082 }
6083 }
6084}
6085
6086#[derive(Clone, Default, PartialEq)]
6091#[non_exhaustive]
6092pub struct StaticIpConnectivity {
6093 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6094}
6095
6096impl StaticIpConnectivity {
6097 pub fn new() -> Self {
6098 std::default::Default::default()
6099 }
6100}
6101
6102impl wkt::message::Message for StaticIpConnectivity {
6103 fn typename() -> &'static str {
6104 "type.googleapis.com/google.cloud.clouddms.v1.StaticIpConnectivity"
6105 }
6106}
6107
6108#[derive(Clone, Default, PartialEq)]
6111#[non_exhaustive]
6112pub struct PrivateServiceConnectConnectivity {
6113 pub service_attachment: std::string::String,
6117
6118 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6119}
6120
6121impl PrivateServiceConnectConnectivity {
6122 pub fn new() -> Self {
6123 std::default::Default::default()
6124 }
6125
6126 pub fn set_service_attachment<T: std::convert::Into<std::string::String>>(
6128 mut self,
6129 v: T,
6130 ) -> Self {
6131 self.service_attachment = v.into();
6132 self
6133 }
6134}
6135
6136impl wkt::message::Message for PrivateServiceConnectConnectivity {
6137 fn typename() -> &'static str {
6138 "type.googleapis.com/google.cloud.clouddms.v1.PrivateServiceConnectConnectivity"
6139 }
6140}
6141
6142#[derive(Clone, Default, PartialEq)]
6149#[non_exhaustive]
6150pub struct ReverseSshConnectivity {
6151 pub vm_ip: std::string::String,
6154
6155 pub vm_port: i32,
6158
6159 pub vm: std::string::String,
6162
6163 pub vpc: std::string::String,
6165
6166 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6167}
6168
6169impl ReverseSshConnectivity {
6170 pub fn new() -> Self {
6171 std::default::Default::default()
6172 }
6173
6174 pub fn set_vm_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6176 self.vm_ip = v.into();
6177 self
6178 }
6179
6180 pub fn set_vm_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6182 self.vm_port = v.into();
6183 self
6184 }
6185
6186 pub fn set_vm<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6188 self.vm = v.into();
6189 self
6190 }
6191
6192 pub fn set_vpc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6194 self.vpc = v.into();
6195 self
6196 }
6197}
6198
6199impl wkt::message::Message for ReverseSshConnectivity {
6200 fn typename() -> &'static str {
6201 "type.googleapis.com/google.cloud.clouddms.v1.ReverseSshConnectivity"
6202 }
6203}
6204
6205#[derive(Clone, Default, PartialEq)]
6209#[non_exhaustive]
6210pub struct VpcPeeringConnectivity {
6211 pub vpc: std::string::String,
6213
6214 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6215}
6216
6217impl VpcPeeringConnectivity {
6218 pub fn new() -> Self {
6219 std::default::Default::default()
6220 }
6221
6222 pub fn set_vpc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6224 self.vpc = v.into();
6225 self
6226 }
6227}
6228
6229impl wkt::message::Message for VpcPeeringConnectivity {
6230 fn typename() -> &'static str {
6231 "type.googleapis.com/google.cloud.clouddms.v1.VpcPeeringConnectivity"
6232 }
6233}
6234
6235#[derive(Clone, Default, PartialEq)]
6237#[non_exhaustive]
6238pub struct ForwardSshTunnelConnectivity {
6239 pub hostname: std::string::String,
6241
6242 pub username: std::string::String,
6244
6245 pub port: i32,
6247
6248 pub authentication_method:
6249 std::option::Option<crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod>,
6250
6251 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6252}
6253
6254impl ForwardSshTunnelConnectivity {
6255 pub fn new() -> Self {
6256 std::default::Default::default()
6257 }
6258
6259 pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6261 self.hostname = v.into();
6262 self
6263 }
6264
6265 pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6267 self.username = v.into();
6268 self
6269 }
6270
6271 pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6273 self.port = v.into();
6274 self
6275 }
6276
6277 pub fn set_authentication_method<
6282 T: std::convert::Into<
6283 std::option::Option<
6284 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod,
6285 >,
6286 >,
6287 >(
6288 mut self,
6289 v: T,
6290 ) -> Self {
6291 self.authentication_method = v.into();
6292 self
6293 }
6294
6295 pub fn password(&self) -> std::option::Option<&std::string::String> {
6299 #[allow(unreachable_patterns)]
6300 self.authentication_method.as_ref().and_then(|v| match v {
6301 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::Password(v) => {
6302 std::option::Option::Some(v)
6303 }
6304 _ => std::option::Option::None,
6305 })
6306 }
6307
6308 pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6314 self.authentication_method = std::option::Option::Some(
6315 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::Password(v.into()),
6316 );
6317 self
6318 }
6319
6320 pub fn private_key(&self) -> std::option::Option<&std::string::String> {
6324 #[allow(unreachable_patterns)]
6325 self.authentication_method.as_ref().and_then(|v| match v {
6326 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::PrivateKey(v) => {
6327 std::option::Option::Some(v)
6328 }
6329 _ => std::option::Option::None,
6330 })
6331 }
6332
6333 pub fn set_private_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6339 self.authentication_method = std::option::Option::Some(
6340 crate::model::forward_ssh_tunnel_connectivity::AuthenticationMethod::PrivateKey(
6341 v.into(),
6342 ),
6343 );
6344 self
6345 }
6346}
6347
6348impl wkt::message::Message for ForwardSshTunnelConnectivity {
6349 fn typename() -> &'static str {
6350 "type.googleapis.com/google.cloud.clouddms.v1.ForwardSshTunnelConnectivity"
6351 }
6352}
6353
6354pub mod forward_ssh_tunnel_connectivity {
6356 #[allow(unused_imports)]
6357 use super::*;
6358
6359 #[derive(Clone, Debug, PartialEq)]
6360 #[non_exhaustive]
6361 pub enum AuthenticationMethod {
6362 Password(std::string::String),
6364 PrivateKey(std::string::String),
6366 }
6367}
6368
6369#[derive(Clone, Default, PartialEq)]
6371#[non_exhaustive]
6372pub struct StaticServiceIpConnectivity {
6373 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6374}
6375
6376impl StaticServiceIpConnectivity {
6377 pub fn new() -> Self {
6378 std::default::Default::default()
6379 }
6380}
6381
6382impl wkt::message::Message for StaticServiceIpConnectivity {
6383 fn typename() -> &'static str {
6384 "type.googleapis.com/google.cloud.clouddms.v1.StaticServiceIpConnectivity"
6385 }
6386}
6387
6388#[derive(Clone, Default, PartialEq)]
6390#[non_exhaustive]
6391pub struct PrivateConnectivity {
6392 pub private_connection: std::string::String,
6394
6395 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6396}
6397
6398impl PrivateConnectivity {
6399 pub fn new() -> Self {
6400 std::default::Default::default()
6401 }
6402
6403 pub fn set_private_connection<T: std::convert::Into<std::string::String>>(
6405 mut self,
6406 v: T,
6407 ) -> Self {
6408 self.private_connection = v.into();
6409 self
6410 }
6411}
6412
6413impl wkt::message::Message for PrivateConnectivity {
6414 fn typename() -> &'static str {
6415 "type.googleapis.com/google.cloud.clouddms.v1.PrivateConnectivity"
6416 }
6417}
6418
6419#[derive(Clone, Default, PartialEq)]
6421#[non_exhaustive]
6422pub struct DatabaseType {
6423 pub provider: crate::model::DatabaseProvider,
6425
6426 pub engine: crate::model::DatabaseEngine,
6428
6429 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6430}
6431
6432impl DatabaseType {
6433 pub fn new() -> Self {
6434 std::default::Default::default()
6435 }
6436
6437 pub fn set_provider<T: std::convert::Into<crate::model::DatabaseProvider>>(
6439 mut self,
6440 v: T,
6441 ) -> Self {
6442 self.provider = v.into();
6443 self
6444 }
6445
6446 pub fn set_engine<T: std::convert::Into<crate::model::DatabaseEngine>>(mut self, v: T) -> Self {
6448 self.engine = v.into();
6449 self
6450 }
6451}
6452
6453impl wkt::message::Message for DatabaseType {
6454 fn typename() -> &'static str {
6455 "type.googleapis.com/google.cloud.clouddms.v1.DatabaseType"
6456 }
6457}
6458
6459#[derive(Clone, Default, PartialEq)]
6461#[non_exhaustive]
6462pub struct MigrationJob {
6463 pub name: std::string::String,
6466
6467 pub create_time: std::option::Option<wkt::Timestamp>,
6471
6472 pub update_time: std::option::Option<wkt::Timestamp>,
6476
6477 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
6483
6484 pub display_name: std::string::String,
6486
6487 pub state: crate::model::migration_job::State,
6489
6490 pub phase: crate::model::migration_job::Phase,
6492
6493 pub r#type: crate::model::migration_job::Type,
6495
6496 pub dump_path: std::string::String,
6500
6501 pub dump_flags: std::option::Option<crate::model::migration_job::DumpFlags>,
6504
6505 pub source: std::string::String,
6507
6508 pub destination: std::string::String,
6510
6511 pub duration: std::option::Option<wkt::Duration>,
6515
6516 pub error: std::option::Option<rpc::model::Status>,
6518
6519 pub source_database: std::option::Option<crate::model::DatabaseType>,
6521
6522 pub destination_database: std::option::Option<crate::model::DatabaseType>,
6524
6525 pub end_time: std::option::Option<wkt::Timestamp>,
6528
6529 pub conversion_workspace: std::option::Option<crate::model::ConversionWorkspaceInfo>,
6531
6532 pub filter: std::string::String,
6538
6539 pub cmek_key_name: std::string::String,
6552
6553 pub performance_config: std::option::Option<crate::model::migration_job::PerformanceConfig>,
6556
6557 pub connectivity: std::option::Option<crate::model::migration_job::Connectivity>,
6559
6560 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6561}
6562
6563impl MigrationJob {
6564 pub fn new() -> Self {
6565 std::default::Default::default()
6566 }
6567
6568 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6570 self.name = v.into();
6571 self
6572 }
6573
6574 pub fn set_create_time<T>(mut self, v: T) -> Self
6576 where
6577 T: std::convert::Into<wkt::Timestamp>,
6578 {
6579 self.create_time = std::option::Option::Some(v.into());
6580 self
6581 }
6582
6583 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6585 where
6586 T: std::convert::Into<wkt::Timestamp>,
6587 {
6588 self.create_time = v.map(|x| x.into());
6589 self
6590 }
6591
6592 pub fn set_update_time<T>(mut self, v: T) -> Self
6594 where
6595 T: std::convert::Into<wkt::Timestamp>,
6596 {
6597 self.update_time = std::option::Option::Some(v.into());
6598 self
6599 }
6600
6601 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6603 where
6604 T: std::convert::Into<wkt::Timestamp>,
6605 {
6606 self.update_time = v.map(|x| x.into());
6607 self
6608 }
6609
6610 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
6612 where
6613 T: std::iter::IntoIterator<Item = (K, V)>,
6614 K: std::convert::Into<std::string::String>,
6615 V: std::convert::Into<std::string::String>,
6616 {
6617 use std::iter::Iterator;
6618 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6619 self
6620 }
6621
6622 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6624 self.display_name = v.into();
6625 self
6626 }
6627
6628 pub fn set_state<T: std::convert::Into<crate::model::migration_job::State>>(
6630 mut self,
6631 v: T,
6632 ) -> Self {
6633 self.state = v.into();
6634 self
6635 }
6636
6637 pub fn set_phase<T: std::convert::Into<crate::model::migration_job::Phase>>(
6639 mut self,
6640 v: T,
6641 ) -> Self {
6642 self.phase = v.into();
6643 self
6644 }
6645
6646 pub fn set_type<T: std::convert::Into<crate::model::migration_job::Type>>(
6648 mut self,
6649 v: T,
6650 ) -> Self {
6651 self.r#type = v.into();
6652 self
6653 }
6654
6655 pub fn set_dump_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6657 self.dump_path = v.into();
6658 self
6659 }
6660
6661 pub fn set_dump_flags<T>(mut self, v: T) -> Self
6663 where
6664 T: std::convert::Into<crate::model::migration_job::DumpFlags>,
6665 {
6666 self.dump_flags = std::option::Option::Some(v.into());
6667 self
6668 }
6669
6670 pub fn set_or_clear_dump_flags<T>(mut self, v: std::option::Option<T>) -> Self
6672 where
6673 T: std::convert::Into<crate::model::migration_job::DumpFlags>,
6674 {
6675 self.dump_flags = v.map(|x| x.into());
6676 self
6677 }
6678
6679 pub fn set_source<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6681 self.source = v.into();
6682 self
6683 }
6684
6685 pub fn set_destination<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6687 self.destination = v.into();
6688 self
6689 }
6690
6691 pub fn set_duration<T>(mut self, v: T) -> Self
6693 where
6694 T: std::convert::Into<wkt::Duration>,
6695 {
6696 self.duration = std::option::Option::Some(v.into());
6697 self
6698 }
6699
6700 pub fn set_or_clear_duration<T>(mut self, v: std::option::Option<T>) -> Self
6702 where
6703 T: std::convert::Into<wkt::Duration>,
6704 {
6705 self.duration = v.map(|x| x.into());
6706 self
6707 }
6708
6709 pub fn set_error<T>(mut self, v: T) -> Self
6711 where
6712 T: std::convert::Into<rpc::model::Status>,
6713 {
6714 self.error = std::option::Option::Some(v.into());
6715 self
6716 }
6717
6718 pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
6720 where
6721 T: std::convert::Into<rpc::model::Status>,
6722 {
6723 self.error = v.map(|x| x.into());
6724 self
6725 }
6726
6727 pub fn set_source_database<T>(mut self, v: T) -> Self
6729 where
6730 T: std::convert::Into<crate::model::DatabaseType>,
6731 {
6732 self.source_database = std::option::Option::Some(v.into());
6733 self
6734 }
6735
6736 pub fn set_or_clear_source_database<T>(mut self, v: std::option::Option<T>) -> Self
6738 where
6739 T: std::convert::Into<crate::model::DatabaseType>,
6740 {
6741 self.source_database = v.map(|x| x.into());
6742 self
6743 }
6744
6745 pub fn set_destination_database<T>(mut self, v: T) -> Self
6747 where
6748 T: std::convert::Into<crate::model::DatabaseType>,
6749 {
6750 self.destination_database = std::option::Option::Some(v.into());
6751 self
6752 }
6753
6754 pub fn set_or_clear_destination_database<T>(mut self, v: std::option::Option<T>) -> Self
6756 where
6757 T: std::convert::Into<crate::model::DatabaseType>,
6758 {
6759 self.destination_database = v.map(|x| x.into());
6760 self
6761 }
6762
6763 pub fn set_end_time<T>(mut self, v: T) -> Self
6765 where
6766 T: std::convert::Into<wkt::Timestamp>,
6767 {
6768 self.end_time = std::option::Option::Some(v.into());
6769 self
6770 }
6771
6772 pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6774 where
6775 T: std::convert::Into<wkt::Timestamp>,
6776 {
6777 self.end_time = v.map(|x| x.into());
6778 self
6779 }
6780
6781 pub fn set_conversion_workspace<T>(mut self, v: T) -> Self
6783 where
6784 T: std::convert::Into<crate::model::ConversionWorkspaceInfo>,
6785 {
6786 self.conversion_workspace = std::option::Option::Some(v.into());
6787 self
6788 }
6789
6790 pub fn set_or_clear_conversion_workspace<T>(mut self, v: std::option::Option<T>) -> Self
6792 where
6793 T: std::convert::Into<crate::model::ConversionWorkspaceInfo>,
6794 {
6795 self.conversion_workspace = v.map(|x| x.into());
6796 self
6797 }
6798
6799 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6801 self.filter = v.into();
6802 self
6803 }
6804
6805 pub fn set_cmek_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6807 self.cmek_key_name = v.into();
6808 self
6809 }
6810
6811 pub fn set_performance_config<T>(mut self, v: T) -> Self
6813 where
6814 T: std::convert::Into<crate::model::migration_job::PerformanceConfig>,
6815 {
6816 self.performance_config = std::option::Option::Some(v.into());
6817 self
6818 }
6819
6820 pub fn set_or_clear_performance_config<T>(mut self, v: std::option::Option<T>) -> Self
6822 where
6823 T: std::convert::Into<crate::model::migration_job::PerformanceConfig>,
6824 {
6825 self.performance_config = v.map(|x| x.into());
6826 self
6827 }
6828
6829 pub fn set_connectivity<
6834 T: std::convert::Into<std::option::Option<crate::model::migration_job::Connectivity>>,
6835 >(
6836 mut self,
6837 v: T,
6838 ) -> Self {
6839 self.connectivity = v.into();
6840 self
6841 }
6842
6843 pub fn reverse_ssh_connectivity(
6847 &self,
6848 ) -> std::option::Option<&std::boxed::Box<crate::model::ReverseSshConnectivity>> {
6849 #[allow(unreachable_patterns)]
6850 self.connectivity.as_ref().and_then(|v| match v {
6851 crate::model::migration_job::Connectivity::ReverseSshConnectivity(v) => {
6852 std::option::Option::Some(v)
6853 }
6854 _ => std::option::Option::None,
6855 })
6856 }
6857
6858 pub fn set_reverse_ssh_connectivity<
6864 T: std::convert::Into<std::boxed::Box<crate::model::ReverseSshConnectivity>>,
6865 >(
6866 mut self,
6867 v: T,
6868 ) -> Self {
6869 self.connectivity = std::option::Option::Some(
6870 crate::model::migration_job::Connectivity::ReverseSshConnectivity(v.into()),
6871 );
6872 self
6873 }
6874
6875 pub fn vpc_peering_connectivity(
6879 &self,
6880 ) -> std::option::Option<&std::boxed::Box<crate::model::VpcPeeringConnectivity>> {
6881 #[allow(unreachable_patterns)]
6882 self.connectivity.as_ref().and_then(|v| match v {
6883 crate::model::migration_job::Connectivity::VpcPeeringConnectivity(v) => {
6884 std::option::Option::Some(v)
6885 }
6886 _ => std::option::Option::None,
6887 })
6888 }
6889
6890 pub fn set_vpc_peering_connectivity<
6896 T: std::convert::Into<std::boxed::Box<crate::model::VpcPeeringConnectivity>>,
6897 >(
6898 mut self,
6899 v: T,
6900 ) -> Self {
6901 self.connectivity = std::option::Option::Some(
6902 crate::model::migration_job::Connectivity::VpcPeeringConnectivity(v.into()),
6903 );
6904 self
6905 }
6906
6907 pub fn static_ip_connectivity(
6911 &self,
6912 ) -> std::option::Option<&std::boxed::Box<crate::model::StaticIpConnectivity>> {
6913 #[allow(unreachable_patterns)]
6914 self.connectivity.as_ref().and_then(|v| match v {
6915 crate::model::migration_job::Connectivity::StaticIpConnectivity(v) => {
6916 std::option::Option::Some(v)
6917 }
6918 _ => std::option::Option::None,
6919 })
6920 }
6921
6922 pub fn set_static_ip_connectivity<
6928 T: std::convert::Into<std::boxed::Box<crate::model::StaticIpConnectivity>>,
6929 >(
6930 mut self,
6931 v: T,
6932 ) -> Self {
6933 self.connectivity = std::option::Option::Some(
6934 crate::model::migration_job::Connectivity::StaticIpConnectivity(v.into()),
6935 );
6936 self
6937 }
6938}
6939
6940impl wkt::message::Message for MigrationJob {
6941 fn typename() -> &'static str {
6942 "type.googleapis.com/google.cloud.clouddms.v1.MigrationJob"
6943 }
6944}
6945
6946pub mod migration_job {
6948 #[allow(unused_imports)]
6949 use super::*;
6950
6951 #[derive(Clone, Default, PartialEq)]
6953 #[non_exhaustive]
6954 pub struct DumpFlag {
6955 pub name: std::string::String,
6957
6958 pub value: std::string::String,
6960
6961 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6962 }
6963
6964 impl DumpFlag {
6965 pub fn new() -> Self {
6966 std::default::Default::default()
6967 }
6968
6969 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6971 self.name = v.into();
6972 self
6973 }
6974
6975 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6977 self.value = v.into();
6978 self
6979 }
6980 }
6981
6982 impl wkt::message::Message for DumpFlag {
6983 fn typename() -> &'static str {
6984 "type.googleapis.com/google.cloud.clouddms.v1.MigrationJob.DumpFlag"
6985 }
6986 }
6987
6988 #[derive(Clone, Default, PartialEq)]
6990 #[non_exhaustive]
6991 pub struct DumpFlags {
6992 pub dump_flags: std::vec::Vec<crate::model::migration_job::DumpFlag>,
6994
6995 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6996 }
6997
6998 impl DumpFlags {
6999 pub fn new() -> Self {
7000 std::default::Default::default()
7001 }
7002
7003 pub fn set_dump_flags<T, V>(mut self, v: T) -> Self
7005 where
7006 T: std::iter::IntoIterator<Item = V>,
7007 V: std::convert::Into<crate::model::migration_job::DumpFlag>,
7008 {
7009 use std::iter::Iterator;
7010 self.dump_flags = v.into_iter().map(|i| i.into()).collect();
7011 self
7012 }
7013 }
7014
7015 impl wkt::message::Message for DumpFlags {
7016 fn typename() -> &'static str {
7017 "type.googleapis.com/google.cloud.clouddms.v1.MigrationJob.DumpFlags"
7018 }
7019 }
7020
7021 #[derive(Clone, Default, PartialEq)]
7023 #[non_exhaustive]
7024 pub struct PerformanceConfig {
7025 pub dump_parallel_level: crate::model::migration_job::performance_config::DumpParallelLevel,
7027
7028 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7029 }
7030
7031 impl PerformanceConfig {
7032 pub fn new() -> Self {
7033 std::default::Default::default()
7034 }
7035
7036 pub fn set_dump_parallel_level<
7038 T: std::convert::Into<crate::model::migration_job::performance_config::DumpParallelLevel>,
7039 >(
7040 mut self,
7041 v: T,
7042 ) -> Self {
7043 self.dump_parallel_level = v.into();
7044 self
7045 }
7046 }
7047
7048 impl wkt::message::Message for PerformanceConfig {
7049 fn typename() -> &'static str {
7050 "type.googleapis.com/google.cloud.clouddms.v1.MigrationJob.PerformanceConfig"
7051 }
7052 }
7053
7054 pub mod performance_config {
7056 #[allow(unused_imports)]
7057 use super::*;
7058
7059 #[derive(Clone, Debug, PartialEq)]
7075 #[non_exhaustive]
7076 pub enum DumpParallelLevel {
7077 Unspecified,
7079 Min,
7081 Optimal,
7083 Max,
7085 UnknownValue(dump_parallel_level::UnknownValue),
7090 }
7091
7092 #[doc(hidden)]
7093 pub mod dump_parallel_level {
7094 #[allow(unused_imports)]
7095 use super::*;
7096 #[derive(Clone, Debug, PartialEq)]
7097 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7098 }
7099
7100 impl DumpParallelLevel {
7101 pub fn value(&self) -> std::option::Option<i32> {
7106 match self {
7107 Self::Unspecified => std::option::Option::Some(0),
7108 Self::Min => std::option::Option::Some(1),
7109 Self::Optimal => std::option::Option::Some(2),
7110 Self::Max => std::option::Option::Some(3),
7111 Self::UnknownValue(u) => u.0.value(),
7112 }
7113 }
7114
7115 pub fn name(&self) -> std::option::Option<&str> {
7120 match self {
7121 Self::Unspecified => {
7122 std::option::Option::Some("DUMP_PARALLEL_LEVEL_UNSPECIFIED")
7123 }
7124 Self::Min => std::option::Option::Some("MIN"),
7125 Self::Optimal => std::option::Option::Some("OPTIMAL"),
7126 Self::Max => std::option::Option::Some("MAX"),
7127 Self::UnknownValue(u) => u.0.name(),
7128 }
7129 }
7130 }
7131
7132 impl std::default::Default for DumpParallelLevel {
7133 fn default() -> Self {
7134 use std::convert::From;
7135 Self::from(0)
7136 }
7137 }
7138
7139 impl std::fmt::Display for DumpParallelLevel {
7140 fn fmt(
7141 &self,
7142 f: &mut std::fmt::Formatter<'_>,
7143 ) -> std::result::Result<(), std::fmt::Error> {
7144 wkt::internal::display_enum(f, self.name(), self.value())
7145 }
7146 }
7147
7148 impl std::convert::From<i32> for DumpParallelLevel {
7149 fn from(value: i32) -> Self {
7150 match value {
7151 0 => Self::Unspecified,
7152 1 => Self::Min,
7153 2 => Self::Optimal,
7154 3 => Self::Max,
7155 _ => Self::UnknownValue(dump_parallel_level::UnknownValue(
7156 wkt::internal::UnknownEnumValue::Integer(value),
7157 )),
7158 }
7159 }
7160 }
7161
7162 impl std::convert::From<&str> for DumpParallelLevel {
7163 fn from(value: &str) -> Self {
7164 use std::string::ToString;
7165 match value {
7166 "DUMP_PARALLEL_LEVEL_UNSPECIFIED" => Self::Unspecified,
7167 "MIN" => Self::Min,
7168 "OPTIMAL" => Self::Optimal,
7169 "MAX" => Self::Max,
7170 _ => Self::UnknownValue(dump_parallel_level::UnknownValue(
7171 wkt::internal::UnknownEnumValue::String(value.to_string()),
7172 )),
7173 }
7174 }
7175 }
7176
7177 impl serde::ser::Serialize for DumpParallelLevel {
7178 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7179 where
7180 S: serde::Serializer,
7181 {
7182 match self {
7183 Self::Unspecified => serializer.serialize_i32(0),
7184 Self::Min => serializer.serialize_i32(1),
7185 Self::Optimal => serializer.serialize_i32(2),
7186 Self::Max => serializer.serialize_i32(3),
7187 Self::UnknownValue(u) => u.0.serialize(serializer),
7188 }
7189 }
7190 }
7191
7192 impl<'de> serde::de::Deserialize<'de> for DumpParallelLevel {
7193 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7194 where
7195 D: serde::Deserializer<'de>,
7196 {
7197 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DumpParallelLevel>::new(
7198 ".google.cloud.clouddms.v1.MigrationJob.PerformanceConfig.DumpParallelLevel",
7199 ))
7200 }
7201 }
7202 }
7203
7204 #[derive(Clone, Debug, PartialEq)]
7220 #[non_exhaustive]
7221 pub enum State {
7222 Unspecified,
7224 Maintenance,
7226 Draft,
7228 Creating,
7230 NotStarted,
7232 Running,
7234 Failed,
7236 Completed,
7238 Deleting,
7240 Stopping,
7242 Stopped,
7244 Deleted,
7246 Updating,
7248 Starting,
7250 Restarting,
7252 Resuming,
7254 UnknownValue(state::UnknownValue),
7259 }
7260
7261 #[doc(hidden)]
7262 pub mod state {
7263 #[allow(unused_imports)]
7264 use super::*;
7265 #[derive(Clone, Debug, PartialEq)]
7266 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7267 }
7268
7269 impl State {
7270 pub fn value(&self) -> std::option::Option<i32> {
7275 match self {
7276 Self::Unspecified => std::option::Option::Some(0),
7277 Self::Maintenance => std::option::Option::Some(1),
7278 Self::Draft => std::option::Option::Some(2),
7279 Self::Creating => std::option::Option::Some(3),
7280 Self::NotStarted => std::option::Option::Some(4),
7281 Self::Running => std::option::Option::Some(5),
7282 Self::Failed => std::option::Option::Some(6),
7283 Self::Completed => std::option::Option::Some(7),
7284 Self::Deleting => std::option::Option::Some(8),
7285 Self::Stopping => std::option::Option::Some(9),
7286 Self::Stopped => std::option::Option::Some(10),
7287 Self::Deleted => std::option::Option::Some(11),
7288 Self::Updating => std::option::Option::Some(12),
7289 Self::Starting => std::option::Option::Some(13),
7290 Self::Restarting => std::option::Option::Some(14),
7291 Self::Resuming => std::option::Option::Some(15),
7292 Self::UnknownValue(u) => u.0.value(),
7293 }
7294 }
7295
7296 pub fn name(&self) -> std::option::Option<&str> {
7301 match self {
7302 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7303 Self::Maintenance => std::option::Option::Some("MAINTENANCE"),
7304 Self::Draft => std::option::Option::Some("DRAFT"),
7305 Self::Creating => std::option::Option::Some("CREATING"),
7306 Self::NotStarted => std::option::Option::Some("NOT_STARTED"),
7307 Self::Running => std::option::Option::Some("RUNNING"),
7308 Self::Failed => std::option::Option::Some("FAILED"),
7309 Self::Completed => std::option::Option::Some("COMPLETED"),
7310 Self::Deleting => std::option::Option::Some("DELETING"),
7311 Self::Stopping => std::option::Option::Some("STOPPING"),
7312 Self::Stopped => std::option::Option::Some("STOPPED"),
7313 Self::Deleted => std::option::Option::Some("DELETED"),
7314 Self::Updating => std::option::Option::Some("UPDATING"),
7315 Self::Starting => std::option::Option::Some("STARTING"),
7316 Self::Restarting => std::option::Option::Some("RESTARTING"),
7317 Self::Resuming => std::option::Option::Some("RESUMING"),
7318 Self::UnknownValue(u) => u.0.name(),
7319 }
7320 }
7321 }
7322
7323 impl std::default::Default for State {
7324 fn default() -> Self {
7325 use std::convert::From;
7326 Self::from(0)
7327 }
7328 }
7329
7330 impl std::fmt::Display for State {
7331 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7332 wkt::internal::display_enum(f, self.name(), self.value())
7333 }
7334 }
7335
7336 impl std::convert::From<i32> for State {
7337 fn from(value: i32) -> Self {
7338 match value {
7339 0 => Self::Unspecified,
7340 1 => Self::Maintenance,
7341 2 => Self::Draft,
7342 3 => Self::Creating,
7343 4 => Self::NotStarted,
7344 5 => Self::Running,
7345 6 => Self::Failed,
7346 7 => Self::Completed,
7347 8 => Self::Deleting,
7348 9 => Self::Stopping,
7349 10 => Self::Stopped,
7350 11 => Self::Deleted,
7351 12 => Self::Updating,
7352 13 => Self::Starting,
7353 14 => Self::Restarting,
7354 15 => Self::Resuming,
7355 _ => Self::UnknownValue(state::UnknownValue(
7356 wkt::internal::UnknownEnumValue::Integer(value),
7357 )),
7358 }
7359 }
7360 }
7361
7362 impl std::convert::From<&str> for State {
7363 fn from(value: &str) -> Self {
7364 use std::string::ToString;
7365 match value {
7366 "STATE_UNSPECIFIED" => Self::Unspecified,
7367 "MAINTENANCE" => Self::Maintenance,
7368 "DRAFT" => Self::Draft,
7369 "CREATING" => Self::Creating,
7370 "NOT_STARTED" => Self::NotStarted,
7371 "RUNNING" => Self::Running,
7372 "FAILED" => Self::Failed,
7373 "COMPLETED" => Self::Completed,
7374 "DELETING" => Self::Deleting,
7375 "STOPPING" => Self::Stopping,
7376 "STOPPED" => Self::Stopped,
7377 "DELETED" => Self::Deleted,
7378 "UPDATING" => Self::Updating,
7379 "STARTING" => Self::Starting,
7380 "RESTARTING" => Self::Restarting,
7381 "RESUMING" => Self::Resuming,
7382 _ => Self::UnknownValue(state::UnknownValue(
7383 wkt::internal::UnknownEnumValue::String(value.to_string()),
7384 )),
7385 }
7386 }
7387 }
7388
7389 impl serde::ser::Serialize for State {
7390 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7391 where
7392 S: serde::Serializer,
7393 {
7394 match self {
7395 Self::Unspecified => serializer.serialize_i32(0),
7396 Self::Maintenance => serializer.serialize_i32(1),
7397 Self::Draft => serializer.serialize_i32(2),
7398 Self::Creating => serializer.serialize_i32(3),
7399 Self::NotStarted => serializer.serialize_i32(4),
7400 Self::Running => serializer.serialize_i32(5),
7401 Self::Failed => serializer.serialize_i32(6),
7402 Self::Completed => serializer.serialize_i32(7),
7403 Self::Deleting => serializer.serialize_i32(8),
7404 Self::Stopping => serializer.serialize_i32(9),
7405 Self::Stopped => serializer.serialize_i32(10),
7406 Self::Deleted => serializer.serialize_i32(11),
7407 Self::Updating => serializer.serialize_i32(12),
7408 Self::Starting => serializer.serialize_i32(13),
7409 Self::Restarting => serializer.serialize_i32(14),
7410 Self::Resuming => serializer.serialize_i32(15),
7411 Self::UnknownValue(u) => u.0.serialize(serializer),
7412 }
7413 }
7414 }
7415
7416 impl<'de> serde::de::Deserialize<'de> for State {
7417 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7418 where
7419 D: serde::Deserializer<'de>,
7420 {
7421 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7422 ".google.cloud.clouddms.v1.MigrationJob.State",
7423 ))
7424 }
7425 }
7426
7427 #[derive(Clone, Debug, PartialEq)]
7443 #[non_exhaustive]
7444 pub enum Phase {
7445 Unspecified,
7447 FullDump,
7449 Cdc,
7451 PromoteInProgress,
7453 WaitingForSourceWritesToStop,
7455 PreparingTheDump,
7457 UnknownValue(phase::UnknownValue),
7462 }
7463
7464 #[doc(hidden)]
7465 pub mod phase {
7466 #[allow(unused_imports)]
7467 use super::*;
7468 #[derive(Clone, Debug, PartialEq)]
7469 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7470 }
7471
7472 impl Phase {
7473 pub fn value(&self) -> std::option::Option<i32> {
7478 match self {
7479 Self::Unspecified => std::option::Option::Some(0),
7480 Self::FullDump => std::option::Option::Some(1),
7481 Self::Cdc => std::option::Option::Some(2),
7482 Self::PromoteInProgress => std::option::Option::Some(3),
7483 Self::WaitingForSourceWritesToStop => std::option::Option::Some(4),
7484 Self::PreparingTheDump => std::option::Option::Some(5),
7485 Self::UnknownValue(u) => u.0.value(),
7486 }
7487 }
7488
7489 pub fn name(&self) -> std::option::Option<&str> {
7494 match self {
7495 Self::Unspecified => std::option::Option::Some("PHASE_UNSPECIFIED"),
7496 Self::FullDump => std::option::Option::Some("FULL_DUMP"),
7497 Self::Cdc => std::option::Option::Some("CDC"),
7498 Self::PromoteInProgress => std::option::Option::Some("PROMOTE_IN_PROGRESS"),
7499 Self::WaitingForSourceWritesToStop => {
7500 std::option::Option::Some("WAITING_FOR_SOURCE_WRITES_TO_STOP")
7501 }
7502 Self::PreparingTheDump => std::option::Option::Some("PREPARING_THE_DUMP"),
7503 Self::UnknownValue(u) => u.0.name(),
7504 }
7505 }
7506 }
7507
7508 impl std::default::Default for Phase {
7509 fn default() -> Self {
7510 use std::convert::From;
7511 Self::from(0)
7512 }
7513 }
7514
7515 impl std::fmt::Display for Phase {
7516 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7517 wkt::internal::display_enum(f, self.name(), self.value())
7518 }
7519 }
7520
7521 impl std::convert::From<i32> for Phase {
7522 fn from(value: i32) -> Self {
7523 match value {
7524 0 => Self::Unspecified,
7525 1 => Self::FullDump,
7526 2 => Self::Cdc,
7527 3 => Self::PromoteInProgress,
7528 4 => Self::WaitingForSourceWritesToStop,
7529 5 => Self::PreparingTheDump,
7530 _ => Self::UnknownValue(phase::UnknownValue(
7531 wkt::internal::UnknownEnumValue::Integer(value),
7532 )),
7533 }
7534 }
7535 }
7536
7537 impl std::convert::From<&str> for Phase {
7538 fn from(value: &str) -> Self {
7539 use std::string::ToString;
7540 match value {
7541 "PHASE_UNSPECIFIED" => Self::Unspecified,
7542 "FULL_DUMP" => Self::FullDump,
7543 "CDC" => Self::Cdc,
7544 "PROMOTE_IN_PROGRESS" => Self::PromoteInProgress,
7545 "WAITING_FOR_SOURCE_WRITES_TO_STOP" => Self::WaitingForSourceWritesToStop,
7546 "PREPARING_THE_DUMP" => Self::PreparingTheDump,
7547 _ => Self::UnknownValue(phase::UnknownValue(
7548 wkt::internal::UnknownEnumValue::String(value.to_string()),
7549 )),
7550 }
7551 }
7552 }
7553
7554 impl serde::ser::Serialize for Phase {
7555 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7556 where
7557 S: serde::Serializer,
7558 {
7559 match self {
7560 Self::Unspecified => serializer.serialize_i32(0),
7561 Self::FullDump => serializer.serialize_i32(1),
7562 Self::Cdc => serializer.serialize_i32(2),
7563 Self::PromoteInProgress => serializer.serialize_i32(3),
7564 Self::WaitingForSourceWritesToStop => serializer.serialize_i32(4),
7565 Self::PreparingTheDump => serializer.serialize_i32(5),
7566 Self::UnknownValue(u) => u.0.serialize(serializer),
7567 }
7568 }
7569 }
7570
7571 impl<'de> serde::de::Deserialize<'de> for Phase {
7572 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7573 where
7574 D: serde::Deserializer<'de>,
7575 {
7576 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Phase>::new(
7577 ".google.cloud.clouddms.v1.MigrationJob.Phase",
7578 ))
7579 }
7580 }
7581
7582 #[derive(Clone, Debug, PartialEq)]
7598 #[non_exhaustive]
7599 pub enum Type {
7600 Unspecified,
7602 OneTime,
7604 Continuous,
7606 UnknownValue(r#type::UnknownValue),
7611 }
7612
7613 #[doc(hidden)]
7614 pub mod r#type {
7615 #[allow(unused_imports)]
7616 use super::*;
7617 #[derive(Clone, Debug, PartialEq)]
7618 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7619 }
7620
7621 impl Type {
7622 pub fn value(&self) -> std::option::Option<i32> {
7627 match self {
7628 Self::Unspecified => std::option::Option::Some(0),
7629 Self::OneTime => std::option::Option::Some(1),
7630 Self::Continuous => std::option::Option::Some(2),
7631 Self::UnknownValue(u) => u.0.value(),
7632 }
7633 }
7634
7635 pub fn name(&self) -> std::option::Option<&str> {
7640 match self {
7641 Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
7642 Self::OneTime => std::option::Option::Some("ONE_TIME"),
7643 Self::Continuous => std::option::Option::Some("CONTINUOUS"),
7644 Self::UnknownValue(u) => u.0.name(),
7645 }
7646 }
7647 }
7648
7649 impl std::default::Default for Type {
7650 fn default() -> Self {
7651 use std::convert::From;
7652 Self::from(0)
7653 }
7654 }
7655
7656 impl std::fmt::Display for Type {
7657 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7658 wkt::internal::display_enum(f, self.name(), self.value())
7659 }
7660 }
7661
7662 impl std::convert::From<i32> for Type {
7663 fn from(value: i32) -> Self {
7664 match value {
7665 0 => Self::Unspecified,
7666 1 => Self::OneTime,
7667 2 => Self::Continuous,
7668 _ => Self::UnknownValue(r#type::UnknownValue(
7669 wkt::internal::UnknownEnumValue::Integer(value),
7670 )),
7671 }
7672 }
7673 }
7674
7675 impl std::convert::From<&str> for Type {
7676 fn from(value: &str) -> Self {
7677 use std::string::ToString;
7678 match value {
7679 "TYPE_UNSPECIFIED" => Self::Unspecified,
7680 "ONE_TIME" => Self::OneTime,
7681 "CONTINUOUS" => Self::Continuous,
7682 _ => Self::UnknownValue(r#type::UnknownValue(
7683 wkt::internal::UnknownEnumValue::String(value.to_string()),
7684 )),
7685 }
7686 }
7687 }
7688
7689 impl serde::ser::Serialize for Type {
7690 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7691 where
7692 S: serde::Serializer,
7693 {
7694 match self {
7695 Self::Unspecified => serializer.serialize_i32(0),
7696 Self::OneTime => serializer.serialize_i32(1),
7697 Self::Continuous => serializer.serialize_i32(2),
7698 Self::UnknownValue(u) => u.0.serialize(serializer),
7699 }
7700 }
7701 }
7702
7703 impl<'de> serde::de::Deserialize<'de> for Type {
7704 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7705 where
7706 D: serde::Deserializer<'de>,
7707 {
7708 deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
7709 ".google.cloud.clouddms.v1.MigrationJob.Type",
7710 ))
7711 }
7712 }
7713
7714 #[derive(Clone, Debug, PartialEq)]
7716 #[non_exhaustive]
7717 pub enum Connectivity {
7718 ReverseSshConnectivity(std::boxed::Box<crate::model::ReverseSshConnectivity>),
7721 VpcPeeringConnectivity(std::boxed::Box<crate::model::VpcPeeringConnectivity>),
7723 StaticIpConnectivity(std::boxed::Box<crate::model::StaticIpConnectivity>),
7725 }
7726}
7727
7728#[derive(Clone, Default, PartialEq)]
7730#[non_exhaustive]
7731pub struct ConversionWorkspaceInfo {
7732 pub name: std::string::String,
7734
7735 pub commit_id: std::string::String,
7737
7738 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7739}
7740
7741impl ConversionWorkspaceInfo {
7742 pub fn new() -> Self {
7743 std::default::Default::default()
7744 }
7745
7746 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7748 self.name = v.into();
7749 self
7750 }
7751
7752 pub fn set_commit_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7754 self.commit_id = v.into();
7755 self
7756 }
7757}
7758
7759impl wkt::message::Message for ConversionWorkspaceInfo {
7760 fn typename() -> &'static str {
7761 "type.googleapis.com/google.cloud.clouddms.v1.ConversionWorkspaceInfo"
7762 }
7763}
7764
7765#[derive(Clone, Default, PartialEq)]
7767#[non_exhaustive]
7768pub struct ConnectionProfile {
7769 pub name: std::string::String,
7772
7773 pub create_time: std::option::Option<wkt::Timestamp>,
7777
7778 pub update_time: std::option::Option<wkt::Timestamp>,
7782
7783 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
7789
7790 pub state: crate::model::connection_profile::State,
7792
7793 pub display_name: std::string::String,
7795
7796 pub error: std::option::Option<rpc::model::Status>,
7798
7799 pub provider: crate::model::DatabaseProvider,
7801
7802 pub connection_profile:
7804 std::option::Option<crate::model::connection_profile::ConnectionProfile>,
7805
7806 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7807}
7808
7809impl ConnectionProfile {
7810 pub fn new() -> Self {
7811 std::default::Default::default()
7812 }
7813
7814 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7816 self.name = v.into();
7817 self
7818 }
7819
7820 pub fn set_create_time<T>(mut self, v: T) -> Self
7822 where
7823 T: std::convert::Into<wkt::Timestamp>,
7824 {
7825 self.create_time = std::option::Option::Some(v.into());
7826 self
7827 }
7828
7829 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7831 where
7832 T: std::convert::Into<wkt::Timestamp>,
7833 {
7834 self.create_time = v.map(|x| x.into());
7835 self
7836 }
7837
7838 pub fn set_update_time<T>(mut self, v: T) -> Self
7840 where
7841 T: std::convert::Into<wkt::Timestamp>,
7842 {
7843 self.update_time = std::option::Option::Some(v.into());
7844 self
7845 }
7846
7847 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7849 where
7850 T: std::convert::Into<wkt::Timestamp>,
7851 {
7852 self.update_time = v.map(|x| x.into());
7853 self
7854 }
7855
7856 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
7858 where
7859 T: std::iter::IntoIterator<Item = (K, V)>,
7860 K: std::convert::Into<std::string::String>,
7861 V: std::convert::Into<std::string::String>,
7862 {
7863 use std::iter::Iterator;
7864 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7865 self
7866 }
7867
7868 pub fn set_state<T: std::convert::Into<crate::model::connection_profile::State>>(
7870 mut self,
7871 v: T,
7872 ) -> Self {
7873 self.state = v.into();
7874 self
7875 }
7876
7877 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7879 self.display_name = v.into();
7880 self
7881 }
7882
7883 pub fn set_error<T>(mut self, v: T) -> Self
7885 where
7886 T: std::convert::Into<rpc::model::Status>,
7887 {
7888 self.error = std::option::Option::Some(v.into());
7889 self
7890 }
7891
7892 pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
7894 where
7895 T: std::convert::Into<rpc::model::Status>,
7896 {
7897 self.error = v.map(|x| x.into());
7898 self
7899 }
7900
7901 pub fn set_provider<T: std::convert::Into<crate::model::DatabaseProvider>>(
7903 mut self,
7904 v: T,
7905 ) -> Self {
7906 self.provider = v.into();
7907 self
7908 }
7909
7910 pub fn set_connection_profile<
7915 T: std::convert::Into<
7916 std::option::Option<crate::model::connection_profile::ConnectionProfile>,
7917 >,
7918 >(
7919 mut self,
7920 v: T,
7921 ) -> Self {
7922 self.connection_profile = v.into();
7923 self
7924 }
7925
7926 pub fn mysql(
7930 &self,
7931 ) -> std::option::Option<&std::boxed::Box<crate::model::MySqlConnectionProfile>> {
7932 #[allow(unreachable_patterns)]
7933 self.connection_profile.as_ref().and_then(|v| match v {
7934 crate::model::connection_profile::ConnectionProfile::Mysql(v) => {
7935 std::option::Option::Some(v)
7936 }
7937 _ => std::option::Option::None,
7938 })
7939 }
7940
7941 pub fn set_mysql<
7947 T: std::convert::Into<std::boxed::Box<crate::model::MySqlConnectionProfile>>,
7948 >(
7949 mut self,
7950 v: T,
7951 ) -> Self {
7952 self.connection_profile = std::option::Option::Some(
7953 crate::model::connection_profile::ConnectionProfile::Mysql(v.into()),
7954 );
7955 self
7956 }
7957
7958 pub fn postgresql(
7962 &self,
7963 ) -> std::option::Option<&std::boxed::Box<crate::model::PostgreSqlConnectionProfile>> {
7964 #[allow(unreachable_patterns)]
7965 self.connection_profile.as_ref().and_then(|v| match v {
7966 crate::model::connection_profile::ConnectionProfile::Postgresql(v) => {
7967 std::option::Option::Some(v)
7968 }
7969 _ => std::option::Option::None,
7970 })
7971 }
7972
7973 pub fn set_postgresql<
7979 T: std::convert::Into<std::boxed::Box<crate::model::PostgreSqlConnectionProfile>>,
7980 >(
7981 mut self,
7982 v: T,
7983 ) -> Self {
7984 self.connection_profile = std::option::Option::Some(
7985 crate::model::connection_profile::ConnectionProfile::Postgresql(v.into()),
7986 );
7987 self
7988 }
7989
7990 pub fn oracle(
7994 &self,
7995 ) -> std::option::Option<&std::boxed::Box<crate::model::OracleConnectionProfile>> {
7996 #[allow(unreachable_patterns)]
7997 self.connection_profile.as_ref().and_then(|v| match v {
7998 crate::model::connection_profile::ConnectionProfile::Oracle(v) => {
7999 std::option::Option::Some(v)
8000 }
8001 _ => std::option::Option::None,
8002 })
8003 }
8004
8005 pub fn set_oracle<
8011 T: std::convert::Into<std::boxed::Box<crate::model::OracleConnectionProfile>>,
8012 >(
8013 mut self,
8014 v: T,
8015 ) -> Self {
8016 self.connection_profile = std::option::Option::Some(
8017 crate::model::connection_profile::ConnectionProfile::Oracle(v.into()),
8018 );
8019 self
8020 }
8021
8022 pub fn cloudsql(
8026 &self,
8027 ) -> std::option::Option<&std::boxed::Box<crate::model::CloudSqlConnectionProfile>> {
8028 #[allow(unreachable_patterns)]
8029 self.connection_profile.as_ref().and_then(|v| match v {
8030 crate::model::connection_profile::ConnectionProfile::Cloudsql(v) => {
8031 std::option::Option::Some(v)
8032 }
8033 _ => std::option::Option::None,
8034 })
8035 }
8036
8037 pub fn set_cloudsql<
8043 T: std::convert::Into<std::boxed::Box<crate::model::CloudSqlConnectionProfile>>,
8044 >(
8045 mut self,
8046 v: T,
8047 ) -> Self {
8048 self.connection_profile = std::option::Option::Some(
8049 crate::model::connection_profile::ConnectionProfile::Cloudsql(v.into()),
8050 );
8051 self
8052 }
8053
8054 pub fn alloydb(
8058 &self,
8059 ) -> std::option::Option<&std::boxed::Box<crate::model::AlloyDbConnectionProfile>> {
8060 #[allow(unreachable_patterns)]
8061 self.connection_profile.as_ref().and_then(|v| match v {
8062 crate::model::connection_profile::ConnectionProfile::Alloydb(v) => {
8063 std::option::Option::Some(v)
8064 }
8065 _ => std::option::Option::None,
8066 })
8067 }
8068
8069 pub fn set_alloydb<
8075 T: std::convert::Into<std::boxed::Box<crate::model::AlloyDbConnectionProfile>>,
8076 >(
8077 mut self,
8078 v: T,
8079 ) -> Self {
8080 self.connection_profile = std::option::Option::Some(
8081 crate::model::connection_profile::ConnectionProfile::Alloydb(v.into()),
8082 );
8083 self
8084 }
8085}
8086
8087impl wkt::message::Message for ConnectionProfile {
8088 fn typename() -> &'static str {
8089 "type.googleapis.com/google.cloud.clouddms.v1.ConnectionProfile"
8090 }
8091}
8092
8093pub mod connection_profile {
8095 #[allow(unused_imports)]
8096 use super::*;
8097
8098 #[derive(Clone, Debug, PartialEq)]
8114 #[non_exhaustive]
8115 pub enum State {
8116 Unspecified,
8118 Draft,
8120 Creating,
8122 Ready,
8124 Updating,
8126 Deleting,
8128 Deleted,
8130 Failed,
8132 UnknownValue(state::UnknownValue),
8137 }
8138
8139 #[doc(hidden)]
8140 pub mod state {
8141 #[allow(unused_imports)]
8142 use super::*;
8143 #[derive(Clone, Debug, PartialEq)]
8144 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8145 }
8146
8147 impl State {
8148 pub fn value(&self) -> std::option::Option<i32> {
8153 match self {
8154 Self::Unspecified => std::option::Option::Some(0),
8155 Self::Draft => std::option::Option::Some(1),
8156 Self::Creating => std::option::Option::Some(2),
8157 Self::Ready => std::option::Option::Some(3),
8158 Self::Updating => std::option::Option::Some(4),
8159 Self::Deleting => std::option::Option::Some(5),
8160 Self::Deleted => std::option::Option::Some(6),
8161 Self::Failed => std::option::Option::Some(7),
8162 Self::UnknownValue(u) => u.0.value(),
8163 }
8164 }
8165
8166 pub fn name(&self) -> std::option::Option<&str> {
8171 match self {
8172 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8173 Self::Draft => std::option::Option::Some("DRAFT"),
8174 Self::Creating => std::option::Option::Some("CREATING"),
8175 Self::Ready => std::option::Option::Some("READY"),
8176 Self::Updating => std::option::Option::Some("UPDATING"),
8177 Self::Deleting => std::option::Option::Some("DELETING"),
8178 Self::Deleted => std::option::Option::Some("DELETED"),
8179 Self::Failed => std::option::Option::Some("FAILED"),
8180 Self::UnknownValue(u) => u.0.name(),
8181 }
8182 }
8183 }
8184
8185 impl std::default::Default for State {
8186 fn default() -> Self {
8187 use std::convert::From;
8188 Self::from(0)
8189 }
8190 }
8191
8192 impl std::fmt::Display for State {
8193 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8194 wkt::internal::display_enum(f, self.name(), self.value())
8195 }
8196 }
8197
8198 impl std::convert::From<i32> for State {
8199 fn from(value: i32) -> Self {
8200 match value {
8201 0 => Self::Unspecified,
8202 1 => Self::Draft,
8203 2 => Self::Creating,
8204 3 => Self::Ready,
8205 4 => Self::Updating,
8206 5 => Self::Deleting,
8207 6 => Self::Deleted,
8208 7 => Self::Failed,
8209 _ => Self::UnknownValue(state::UnknownValue(
8210 wkt::internal::UnknownEnumValue::Integer(value),
8211 )),
8212 }
8213 }
8214 }
8215
8216 impl std::convert::From<&str> for State {
8217 fn from(value: &str) -> Self {
8218 use std::string::ToString;
8219 match value {
8220 "STATE_UNSPECIFIED" => Self::Unspecified,
8221 "DRAFT" => Self::Draft,
8222 "CREATING" => Self::Creating,
8223 "READY" => Self::Ready,
8224 "UPDATING" => Self::Updating,
8225 "DELETING" => Self::Deleting,
8226 "DELETED" => Self::Deleted,
8227 "FAILED" => Self::Failed,
8228 _ => Self::UnknownValue(state::UnknownValue(
8229 wkt::internal::UnknownEnumValue::String(value.to_string()),
8230 )),
8231 }
8232 }
8233 }
8234
8235 impl serde::ser::Serialize for State {
8236 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8237 where
8238 S: serde::Serializer,
8239 {
8240 match self {
8241 Self::Unspecified => serializer.serialize_i32(0),
8242 Self::Draft => serializer.serialize_i32(1),
8243 Self::Creating => serializer.serialize_i32(2),
8244 Self::Ready => serializer.serialize_i32(3),
8245 Self::Updating => serializer.serialize_i32(4),
8246 Self::Deleting => serializer.serialize_i32(5),
8247 Self::Deleted => serializer.serialize_i32(6),
8248 Self::Failed => serializer.serialize_i32(7),
8249 Self::UnknownValue(u) => u.0.serialize(serializer),
8250 }
8251 }
8252 }
8253
8254 impl<'de> serde::de::Deserialize<'de> for State {
8255 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8256 where
8257 D: serde::Deserializer<'de>,
8258 {
8259 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8260 ".google.cloud.clouddms.v1.ConnectionProfile.State",
8261 ))
8262 }
8263 }
8264
8265 #[derive(Clone, Debug, PartialEq)]
8267 #[non_exhaustive]
8268 pub enum ConnectionProfile {
8269 Mysql(std::boxed::Box<crate::model::MySqlConnectionProfile>),
8271 Postgresql(std::boxed::Box<crate::model::PostgreSqlConnectionProfile>),
8273 Oracle(std::boxed::Box<crate::model::OracleConnectionProfile>),
8275 Cloudsql(std::boxed::Box<crate::model::CloudSqlConnectionProfile>),
8277 Alloydb(std::boxed::Box<crate::model::AlloyDbConnectionProfile>),
8279 }
8280}
8281
8282#[derive(Clone, Default, PartialEq)]
8284#[non_exhaustive]
8285pub struct MigrationJobVerificationError {
8286 pub error_code: crate::model::migration_job_verification_error::ErrorCode,
8288
8289 pub error_message: std::string::String,
8292
8293 pub error_detail_message: std::string::String,
8295
8296 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8297}
8298
8299impl MigrationJobVerificationError {
8300 pub fn new() -> Self {
8301 std::default::Default::default()
8302 }
8303
8304 pub fn set_error_code<
8306 T: std::convert::Into<crate::model::migration_job_verification_error::ErrorCode>,
8307 >(
8308 mut self,
8309 v: T,
8310 ) -> Self {
8311 self.error_code = v.into();
8312 self
8313 }
8314
8315 pub fn set_error_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8317 self.error_message = v.into();
8318 self
8319 }
8320
8321 pub fn set_error_detail_message<T: std::convert::Into<std::string::String>>(
8323 mut self,
8324 v: T,
8325 ) -> Self {
8326 self.error_detail_message = v.into();
8327 self
8328 }
8329}
8330
8331impl wkt::message::Message for MigrationJobVerificationError {
8332 fn typename() -> &'static str {
8333 "type.googleapis.com/google.cloud.clouddms.v1.MigrationJobVerificationError"
8334 }
8335}
8336
8337pub mod migration_job_verification_error {
8339 #[allow(unused_imports)]
8340 use super::*;
8341
8342 #[derive(Clone, Debug, PartialEq)]
8358 #[non_exhaustive]
8359 pub enum ErrorCode {
8360 Unspecified,
8362 ConnectionFailure,
8364 AuthenticationFailure,
8366 InvalidConnectionProfileConfig,
8368 VersionIncompatibility,
8370 ConnectionProfileTypesIncompatibility,
8372 NoPglogicalInstalled,
8374 PglogicalNodeAlreadyExists,
8376 InvalidWalLevel,
8378 InvalidSharedPreloadLibrary,
8381 InsufficientMaxReplicationSlots,
8383 InsufficientMaxWalSenders,
8385 InsufficientMaxWorkerProcesses,
8387 UnsupportedExtensions,
8390 UnsupportedMigrationType,
8392 InvalidRdsLogicalReplication,
8394 UnsupportedGtidMode,
8396 UnsupportedTableDefinition,
8399 UnsupportedDefiner,
8401 CantRestartRunningMigration,
8403 SourceAlreadySetup,
8405 TablesWithLimitedSupport,
8408 UnsupportedDatabaseLocale,
8410 UnsupportedDatabaseFdwConfig,
8412 ErrorRdbms,
8414 SourceSizeExceedsThreshold,
8417 ExistingConflictingDatabases,
8420 ParallelImportInsufficientPrivilege,
8422 UnknownValue(error_code::UnknownValue),
8427 }
8428
8429 #[doc(hidden)]
8430 pub mod error_code {
8431 #[allow(unused_imports)]
8432 use super::*;
8433 #[derive(Clone, Debug, PartialEq)]
8434 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8435 }
8436
8437 impl ErrorCode {
8438 pub fn value(&self) -> std::option::Option<i32> {
8443 match self {
8444 Self::Unspecified => std::option::Option::Some(0),
8445 Self::ConnectionFailure => std::option::Option::Some(1),
8446 Self::AuthenticationFailure => std::option::Option::Some(2),
8447 Self::InvalidConnectionProfileConfig => std::option::Option::Some(3),
8448 Self::VersionIncompatibility => std::option::Option::Some(4),
8449 Self::ConnectionProfileTypesIncompatibility => std::option::Option::Some(5),
8450 Self::NoPglogicalInstalled => std::option::Option::Some(7),
8451 Self::PglogicalNodeAlreadyExists => std::option::Option::Some(8),
8452 Self::InvalidWalLevel => std::option::Option::Some(9),
8453 Self::InvalidSharedPreloadLibrary => std::option::Option::Some(10),
8454 Self::InsufficientMaxReplicationSlots => std::option::Option::Some(11),
8455 Self::InsufficientMaxWalSenders => std::option::Option::Some(12),
8456 Self::InsufficientMaxWorkerProcesses => std::option::Option::Some(13),
8457 Self::UnsupportedExtensions => std::option::Option::Some(14),
8458 Self::UnsupportedMigrationType => std::option::Option::Some(15),
8459 Self::InvalidRdsLogicalReplication => std::option::Option::Some(16),
8460 Self::UnsupportedGtidMode => std::option::Option::Some(17),
8461 Self::UnsupportedTableDefinition => std::option::Option::Some(18),
8462 Self::UnsupportedDefiner => std::option::Option::Some(19),
8463 Self::CantRestartRunningMigration => std::option::Option::Some(21),
8464 Self::SourceAlreadySetup => std::option::Option::Some(23),
8465 Self::TablesWithLimitedSupport => std::option::Option::Some(24),
8466 Self::UnsupportedDatabaseLocale => std::option::Option::Some(25),
8467 Self::UnsupportedDatabaseFdwConfig => std::option::Option::Some(26),
8468 Self::ErrorRdbms => std::option::Option::Some(27),
8469 Self::SourceSizeExceedsThreshold => std::option::Option::Some(28),
8470 Self::ExistingConflictingDatabases => std::option::Option::Some(29),
8471 Self::ParallelImportInsufficientPrivilege => std::option::Option::Some(30),
8472 Self::UnknownValue(u) => u.0.value(),
8473 }
8474 }
8475
8476 pub fn name(&self) -> std::option::Option<&str> {
8481 match self {
8482 Self::Unspecified => std::option::Option::Some("ERROR_CODE_UNSPECIFIED"),
8483 Self::ConnectionFailure => std::option::Option::Some("CONNECTION_FAILURE"),
8484 Self::AuthenticationFailure => std::option::Option::Some("AUTHENTICATION_FAILURE"),
8485 Self::InvalidConnectionProfileConfig => {
8486 std::option::Option::Some("INVALID_CONNECTION_PROFILE_CONFIG")
8487 }
8488 Self::VersionIncompatibility => {
8489 std::option::Option::Some("VERSION_INCOMPATIBILITY")
8490 }
8491 Self::ConnectionProfileTypesIncompatibility => {
8492 std::option::Option::Some("CONNECTION_PROFILE_TYPES_INCOMPATIBILITY")
8493 }
8494 Self::NoPglogicalInstalled => std::option::Option::Some("NO_PGLOGICAL_INSTALLED"),
8495 Self::PglogicalNodeAlreadyExists => {
8496 std::option::Option::Some("PGLOGICAL_NODE_ALREADY_EXISTS")
8497 }
8498 Self::InvalidWalLevel => std::option::Option::Some("INVALID_WAL_LEVEL"),
8499 Self::InvalidSharedPreloadLibrary => {
8500 std::option::Option::Some("INVALID_SHARED_PRELOAD_LIBRARY")
8501 }
8502 Self::InsufficientMaxReplicationSlots => {
8503 std::option::Option::Some("INSUFFICIENT_MAX_REPLICATION_SLOTS")
8504 }
8505 Self::InsufficientMaxWalSenders => {
8506 std::option::Option::Some("INSUFFICIENT_MAX_WAL_SENDERS")
8507 }
8508 Self::InsufficientMaxWorkerProcesses => {
8509 std::option::Option::Some("INSUFFICIENT_MAX_WORKER_PROCESSES")
8510 }
8511 Self::UnsupportedExtensions => std::option::Option::Some("UNSUPPORTED_EXTENSIONS"),
8512 Self::UnsupportedMigrationType => {
8513 std::option::Option::Some("UNSUPPORTED_MIGRATION_TYPE")
8514 }
8515 Self::InvalidRdsLogicalReplication => {
8516 std::option::Option::Some("INVALID_RDS_LOGICAL_REPLICATION")
8517 }
8518 Self::UnsupportedGtidMode => std::option::Option::Some("UNSUPPORTED_GTID_MODE"),
8519 Self::UnsupportedTableDefinition => {
8520 std::option::Option::Some("UNSUPPORTED_TABLE_DEFINITION")
8521 }
8522 Self::UnsupportedDefiner => std::option::Option::Some("UNSUPPORTED_DEFINER"),
8523 Self::CantRestartRunningMigration => {
8524 std::option::Option::Some("CANT_RESTART_RUNNING_MIGRATION")
8525 }
8526 Self::SourceAlreadySetup => std::option::Option::Some("SOURCE_ALREADY_SETUP"),
8527 Self::TablesWithLimitedSupport => {
8528 std::option::Option::Some("TABLES_WITH_LIMITED_SUPPORT")
8529 }
8530 Self::UnsupportedDatabaseLocale => {
8531 std::option::Option::Some("UNSUPPORTED_DATABASE_LOCALE")
8532 }
8533 Self::UnsupportedDatabaseFdwConfig => {
8534 std::option::Option::Some("UNSUPPORTED_DATABASE_FDW_CONFIG")
8535 }
8536 Self::ErrorRdbms => std::option::Option::Some("ERROR_RDBMS"),
8537 Self::SourceSizeExceedsThreshold => {
8538 std::option::Option::Some("SOURCE_SIZE_EXCEEDS_THRESHOLD")
8539 }
8540 Self::ExistingConflictingDatabases => {
8541 std::option::Option::Some("EXISTING_CONFLICTING_DATABASES")
8542 }
8543 Self::ParallelImportInsufficientPrivilege => {
8544 std::option::Option::Some("PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE")
8545 }
8546 Self::UnknownValue(u) => u.0.name(),
8547 }
8548 }
8549 }
8550
8551 impl std::default::Default for ErrorCode {
8552 fn default() -> Self {
8553 use std::convert::From;
8554 Self::from(0)
8555 }
8556 }
8557
8558 impl std::fmt::Display for ErrorCode {
8559 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8560 wkt::internal::display_enum(f, self.name(), self.value())
8561 }
8562 }
8563
8564 impl std::convert::From<i32> for ErrorCode {
8565 fn from(value: i32) -> Self {
8566 match value {
8567 0 => Self::Unspecified,
8568 1 => Self::ConnectionFailure,
8569 2 => Self::AuthenticationFailure,
8570 3 => Self::InvalidConnectionProfileConfig,
8571 4 => Self::VersionIncompatibility,
8572 5 => Self::ConnectionProfileTypesIncompatibility,
8573 7 => Self::NoPglogicalInstalled,
8574 8 => Self::PglogicalNodeAlreadyExists,
8575 9 => Self::InvalidWalLevel,
8576 10 => Self::InvalidSharedPreloadLibrary,
8577 11 => Self::InsufficientMaxReplicationSlots,
8578 12 => Self::InsufficientMaxWalSenders,
8579 13 => Self::InsufficientMaxWorkerProcesses,
8580 14 => Self::UnsupportedExtensions,
8581 15 => Self::UnsupportedMigrationType,
8582 16 => Self::InvalidRdsLogicalReplication,
8583 17 => Self::UnsupportedGtidMode,
8584 18 => Self::UnsupportedTableDefinition,
8585 19 => Self::UnsupportedDefiner,
8586 21 => Self::CantRestartRunningMigration,
8587 23 => Self::SourceAlreadySetup,
8588 24 => Self::TablesWithLimitedSupport,
8589 25 => Self::UnsupportedDatabaseLocale,
8590 26 => Self::UnsupportedDatabaseFdwConfig,
8591 27 => Self::ErrorRdbms,
8592 28 => Self::SourceSizeExceedsThreshold,
8593 29 => Self::ExistingConflictingDatabases,
8594 30 => Self::ParallelImportInsufficientPrivilege,
8595 _ => Self::UnknownValue(error_code::UnknownValue(
8596 wkt::internal::UnknownEnumValue::Integer(value),
8597 )),
8598 }
8599 }
8600 }
8601
8602 impl std::convert::From<&str> for ErrorCode {
8603 fn from(value: &str) -> Self {
8604 use std::string::ToString;
8605 match value {
8606 "ERROR_CODE_UNSPECIFIED" => Self::Unspecified,
8607 "CONNECTION_FAILURE" => Self::ConnectionFailure,
8608 "AUTHENTICATION_FAILURE" => Self::AuthenticationFailure,
8609 "INVALID_CONNECTION_PROFILE_CONFIG" => Self::InvalidConnectionProfileConfig,
8610 "VERSION_INCOMPATIBILITY" => Self::VersionIncompatibility,
8611 "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY" => {
8612 Self::ConnectionProfileTypesIncompatibility
8613 }
8614 "NO_PGLOGICAL_INSTALLED" => Self::NoPglogicalInstalled,
8615 "PGLOGICAL_NODE_ALREADY_EXISTS" => Self::PglogicalNodeAlreadyExists,
8616 "INVALID_WAL_LEVEL" => Self::InvalidWalLevel,
8617 "INVALID_SHARED_PRELOAD_LIBRARY" => Self::InvalidSharedPreloadLibrary,
8618 "INSUFFICIENT_MAX_REPLICATION_SLOTS" => Self::InsufficientMaxReplicationSlots,
8619 "INSUFFICIENT_MAX_WAL_SENDERS" => Self::InsufficientMaxWalSenders,
8620 "INSUFFICIENT_MAX_WORKER_PROCESSES" => Self::InsufficientMaxWorkerProcesses,
8621 "UNSUPPORTED_EXTENSIONS" => Self::UnsupportedExtensions,
8622 "UNSUPPORTED_MIGRATION_TYPE" => Self::UnsupportedMigrationType,
8623 "INVALID_RDS_LOGICAL_REPLICATION" => Self::InvalidRdsLogicalReplication,
8624 "UNSUPPORTED_GTID_MODE" => Self::UnsupportedGtidMode,
8625 "UNSUPPORTED_TABLE_DEFINITION" => Self::UnsupportedTableDefinition,
8626 "UNSUPPORTED_DEFINER" => Self::UnsupportedDefiner,
8627 "CANT_RESTART_RUNNING_MIGRATION" => Self::CantRestartRunningMigration,
8628 "SOURCE_ALREADY_SETUP" => Self::SourceAlreadySetup,
8629 "TABLES_WITH_LIMITED_SUPPORT" => Self::TablesWithLimitedSupport,
8630 "UNSUPPORTED_DATABASE_LOCALE" => Self::UnsupportedDatabaseLocale,
8631 "UNSUPPORTED_DATABASE_FDW_CONFIG" => Self::UnsupportedDatabaseFdwConfig,
8632 "ERROR_RDBMS" => Self::ErrorRdbms,
8633 "SOURCE_SIZE_EXCEEDS_THRESHOLD" => Self::SourceSizeExceedsThreshold,
8634 "EXISTING_CONFLICTING_DATABASES" => Self::ExistingConflictingDatabases,
8635 "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" => {
8636 Self::ParallelImportInsufficientPrivilege
8637 }
8638 _ => Self::UnknownValue(error_code::UnknownValue(
8639 wkt::internal::UnknownEnumValue::String(value.to_string()),
8640 )),
8641 }
8642 }
8643 }
8644
8645 impl serde::ser::Serialize for ErrorCode {
8646 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8647 where
8648 S: serde::Serializer,
8649 {
8650 match self {
8651 Self::Unspecified => serializer.serialize_i32(0),
8652 Self::ConnectionFailure => serializer.serialize_i32(1),
8653 Self::AuthenticationFailure => serializer.serialize_i32(2),
8654 Self::InvalidConnectionProfileConfig => serializer.serialize_i32(3),
8655 Self::VersionIncompatibility => serializer.serialize_i32(4),
8656 Self::ConnectionProfileTypesIncompatibility => serializer.serialize_i32(5),
8657 Self::NoPglogicalInstalled => serializer.serialize_i32(7),
8658 Self::PglogicalNodeAlreadyExists => serializer.serialize_i32(8),
8659 Self::InvalidWalLevel => serializer.serialize_i32(9),
8660 Self::InvalidSharedPreloadLibrary => serializer.serialize_i32(10),
8661 Self::InsufficientMaxReplicationSlots => serializer.serialize_i32(11),
8662 Self::InsufficientMaxWalSenders => serializer.serialize_i32(12),
8663 Self::InsufficientMaxWorkerProcesses => serializer.serialize_i32(13),
8664 Self::UnsupportedExtensions => serializer.serialize_i32(14),
8665 Self::UnsupportedMigrationType => serializer.serialize_i32(15),
8666 Self::InvalidRdsLogicalReplication => serializer.serialize_i32(16),
8667 Self::UnsupportedGtidMode => serializer.serialize_i32(17),
8668 Self::UnsupportedTableDefinition => serializer.serialize_i32(18),
8669 Self::UnsupportedDefiner => serializer.serialize_i32(19),
8670 Self::CantRestartRunningMigration => serializer.serialize_i32(21),
8671 Self::SourceAlreadySetup => serializer.serialize_i32(23),
8672 Self::TablesWithLimitedSupport => serializer.serialize_i32(24),
8673 Self::UnsupportedDatabaseLocale => serializer.serialize_i32(25),
8674 Self::UnsupportedDatabaseFdwConfig => serializer.serialize_i32(26),
8675 Self::ErrorRdbms => serializer.serialize_i32(27),
8676 Self::SourceSizeExceedsThreshold => serializer.serialize_i32(28),
8677 Self::ExistingConflictingDatabases => serializer.serialize_i32(29),
8678 Self::ParallelImportInsufficientPrivilege => serializer.serialize_i32(30),
8679 Self::UnknownValue(u) => u.0.serialize(serializer),
8680 }
8681 }
8682 }
8683
8684 impl<'de> serde::de::Deserialize<'de> for ErrorCode {
8685 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8686 where
8687 D: serde::Deserializer<'de>,
8688 {
8689 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ErrorCode>::new(
8690 ".google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode",
8691 ))
8692 }
8693 }
8694}
8695
8696#[derive(Clone, Default, PartialEq)]
8699#[non_exhaustive]
8700pub struct PrivateConnection {
8701 pub name: std::string::String,
8703
8704 pub create_time: std::option::Option<wkt::Timestamp>,
8706
8707 pub update_time: std::option::Option<wkt::Timestamp>,
8709
8710 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
8716
8717 pub display_name: std::string::String,
8719
8720 pub state: crate::model::private_connection::State,
8722
8723 pub error: std::option::Option<rpc::model::Status>,
8725
8726 pub connectivity: std::option::Option<crate::model::private_connection::Connectivity>,
8727
8728 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8729}
8730
8731impl PrivateConnection {
8732 pub fn new() -> Self {
8733 std::default::Default::default()
8734 }
8735
8736 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8738 self.name = v.into();
8739 self
8740 }
8741
8742 pub fn set_create_time<T>(mut self, v: T) -> Self
8744 where
8745 T: std::convert::Into<wkt::Timestamp>,
8746 {
8747 self.create_time = std::option::Option::Some(v.into());
8748 self
8749 }
8750
8751 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8753 where
8754 T: std::convert::Into<wkt::Timestamp>,
8755 {
8756 self.create_time = v.map(|x| x.into());
8757 self
8758 }
8759
8760 pub fn set_update_time<T>(mut self, v: T) -> Self
8762 where
8763 T: std::convert::Into<wkt::Timestamp>,
8764 {
8765 self.update_time = std::option::Option::Some(v.into());
8766 self
8767 }
8768
8769 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8771 where
8772 T: std::convert::Into<wkt::Timestamp>,
8773 {
8774 self.update_time = v.map(|x| x.into());
8775 self
8776 }
8777
8778 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
8780 where
8781 T: std::iter::IntoIterator<Item = (K, V)>,
8782 K: std::convert::Into<std::string::String>,
8783 V: std::convert::Into<std::string::String>,
8784 {
8785 use std::iter::Iterator;
8786 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
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_state<T: std::convert::Into<crate::model::private_connection::State>>(
8798 mut self,
8799 v: T,
8800 ) -> Self {
8801 self.state = v.into();
8802 self
8803 }
8804
8805 pub fn set_error<T>(mut self, v: T) -> Self
8807 where
8808 T: std::convert::Into<rpc::model::Status>,
8809 {
8810 self.error = std::option::Option::Some(v.into());
8811 self
8812 }
8813
8814 pub fn set_or_clear_error<T>(mut self, v: std::option::Option<T>) -> Self
8816 where
8817 T: std::convert::Into<rpc::model::Status>,
8818 {
8819 self.error = v.map(|x| x.into());
8820 self
8821 }
8822
8823 pub fn set_connectivity<
8828 T: std::convert::Into<std::option::Option<crate::model::private_connection::Connectivity>>,
8829 >(
8830 mut self,
8831 v: T,
8832 ) -> Self {
8833 self.connectivity = v.into();
8834 self
8835 }
8836
8837 pub fn vpc_peering_config(
8841 &self,
8842 ) -> std::option::Option<&std::boxed::Box<crate::model::VpcPeeringConfig>> {
8843 #[allow(unreachable_patterns)]
8844 self.connectivity.as_ref().and_then(|v| match v {
8845 crate::model::private_connection::Connectivity::VpcPeeringConfig(v) => {
8846 std::option::Option::Some(v)
8847 }
8848 _ => std::option::Option::None,
8849 })
8850 }
8851
8852 pub fn set_vpc_peering_config<
8858 T: std::convert::Into<std::boxed::Box<crate::model::VpcPeeringConfig>>,
8859 >(
8860 mut self,
8861 v: T,
8862 ) -> Self {
8863 self.connectivity = std::option::Option::Some(
8864 crate::model::private_connection::Connectivity::VpcPeeringConfig(v.into()),
8865 );
8866 self
8867 }
8868}
8869
8870impl wkt::message::Message for PrivateConnection {
8871 fn typename() -> &'static str {
8872 "type.googleapis.com/google.cloud.clouddms.v1.PrivateConnection"
8873 }
8874}
8875
8876pub mod private_connection {
8878 #[allow(unused_imports)]
8879 use super::*;
8880
8881 #[derive(Clone, Debug, PartialEq)]
8897 #[non_exhaustive]
8898 pub enum State {
8899 Unspecified,
8900 Creating,
8902 Created,
8904 Failed,
8906 Deleting,
8908 FailedToDelete,
8910 Deleted,
8912 UnknownValue(state::UnknownValue),
8917 }
8918
8919 #[doc(hidden)]
8920 pub mod state {
8921 #[allow(unused_imports)]
8922 use super::*;
8923 #[derive(Clone, Debug, PartialEq)]
8924 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8925 }
8926
8927 impl State {
8928 pub fn value(&self) -> std::option::Option<i32> {
8933 match self {
8934 Self::Unspecified => std::option::Option::Some(0),
8935 Self::Creating => std::option::Option::Some(1),
8936 Self::Created => std::option::Option::Some(2),
8937 Self::Failed => std::option::Option::Some(3),
8938 Self::Deleting => std::option::Option::Some(4),
8939 Self::FailedToDelete => std::option::Option::Some(5),
8940 Self::Deleted => std::option::Option::Some(6),
8941 Self::UnknownValue(u) => u.0.value(),
8942 }
8943 }
8944
8945 pub fn name(&self) -> std::option::Option<&str> {
8950 match self {
8951 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8952 Self::Creating => std::option::Option::Some("CREATING"),
8953 Self::Created => std::option::Option::Some("CREATED"),
8954 Self::Failed => std::option::Option::Some("FAILED"),
8955 Self::Deleting => std::option::Option::Some("DELETING"),
8956 Self::FailedToDelete => std::option::Option::Some("FAILED_TO_DELETE"),
8957 Self::Deleted => std::option::Option::Some("DELETED"),
8958 Self::UnknownValue(u) => u.0.name(),
8959 }
8960 }
8961 }
8962
8963 impl std::default::Default for State {
8964 fn default() -> Self {
8965 use std::convert::From;
8966 Self::from(0)
8967 }
8968 }
8969
8970 impl std::fmt::Display for State {
8971 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8972 wkt::internal::display_enum(f, self.name(), self.value())
8973 }
8974 }
8975
8976 impl std::convert::From<i32> for State {
8977 fn from(value: i32) -> Self {
8978 match value {
8979 0 => Self::Unspecified,
8980 1 => Self::Creating,
8981 2 => Self::Created,
8982 3 => Self::Failed,
8983 4 => Self::Deleting,
8984 5 => Self::FailedToDelete,
8985 6 => Self::Deleted,
8986 _ => Self::UnknownValue(state::UnknownValue(
8987 wkt::internal::UnknownEnumValue::Integer(value),
8988 )),
8989 }
8990 }
8991 }
8992
8993 impl std::convert::From<&str> for State {
8994 fn from(value: &str) -> Self {
8995 use std::string::ToString;
8996 match value {
8997 "STATE_UNSPECIFIED" => Self::Unspecified,
8998 "CREATING" => Self::Creating,
8999 "CREATED" => Self::Created,
9000 "FAILED" => Self::Failed,
9001 "DELETING" => Self::Deleting,
9002 "FAILED_TO_DELETE" => Self::FailedToDelete,
9003 "DELETED" => Self::Deleted,
9004 _ => Self::UnknownValue(state::UnknownValue(
9005 wkt::internal::UnknownEnumValue::String(value.to_string()),
9006 )),
9007 }
9008 }
9009 }
9010
9011 impl serde::ser::Serialize for State {
9012 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9013 where
9014 S: serde::Serializer,
9015 {
9016 match self {
9017 Self::Unspecified => serializer.serialize_i32(0),
9018 Self::Creating => serializer.serialize_i32(1),
9019 Self::Created => serializer.serialize_i32(2),
9020 Self::Failed => serializer.serialize_i32(3),
9021 Self::Deleting => serializer.serialize_i32(4),
9022 Self::FailedToDelete => serializer.serialize_i32(5),
9023 Self::Deleted => serializer.serialize_i32(6),
9024 Self::UnknownValue(u) => u.0.serialize(serializer),
9025 }
9026 }
9027 }
9028
9029 impl<'de> serde::de::Deserialize<'de> for State {
9030 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9031 where
9032 D: serde::Deserializer<'de>,
9033 {
9034 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9035 ".google.cloud.clouddms.v1.PrivateConnection.State",
9036 ))
9037 }
9038 }
9039
9040 #[derive(Clone, Debug, PartialEq)]
9041 #[non_exhaustive]
9042 pub enum Connectivity {
9043 VpcPeeringConfig(std::boxed::Box<crate::model::VpcPeeringConfig>),
9045 }
9046}
9047
9048#[derive(Clone, Default, PartialEq)]
9051#[non_exhaustive]
9052pub struct VpcPeeringConfig {
9053 pub vpc_name: std::string::String,
9056
9057 pub subnet: std::string::String,
9059
9060 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9061}
9062
9063impl VpcPeeringConfig {
9064 pub fn new() -> Self {
9065 std::default::Default::default()
9066 }
9067
9068 pub fn set_vpc_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9070 self.vpc_name = v.into();
9071 self
9072 }
9073
9074 pub fn set_subnet<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9076 self.subnet = v.into();
9077 self
9078 }
9079}
9080
9081impl wkt::message::Message for VpcPeeringConfig {
9082 fn typename() -> &'static str {
9083 "type.googleapis.com/google.cloud.clouddms.v1.VpcPeeringConfig"
9084 }
9085}
9086
9087#[derive(Clone, Default, PartialEq)]
9089#[non_exhaustive]
9090pub struct DatabaseEngineInfo {
9091 pub engine: crate::model::DatabaseEngine,
9093
9094 pub version: std::string::String,
9096
9097 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9098}
9099
9100impl DatabaseEngineInfo {
9101 pub fn new() -> Self {
9102 std::default::Default::default()
9103 }
9104
9105 pub fn set_engine<T: std::convert::Into<crate::model::DatabaseEngine>>(mut self, v: T) -> Self {
9107 self.engine = v.into();
9108 self
9109 }
9110
9111 pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9113 self.version = v.into();
9114 self
9115 }
9116}
9117
9118impl wkt::message::Message for DatabaseEngineInfo {
9119 fn typename() -> &'static str {
9120 "type.googleapis.com/google.cloud.clouddms.v1.DatabaseEngineInfo"
9121 }
9122}
9123
9124#[derive(Clone, Default, PartialEq)]
9126#[non_exhaustive]
9127pub struct ConversionWorkspace {
9128 pub name: std::string::String,
9131
9132 pub source: std::option::Option<crate::model::DatabaseEngineInfo>,
9134
9135 pub destination: std::option::Option<crate::model::DatabaseEngineInfo>,
9137
9138 pub global_settings: std::collections::HashMap<std::string::String, std::string::String>,
9144
9145 pub has_uncommitted_changes: bool,
9148
9149 pub latest_commit_id: std::string::String,
9151
9152 pub latest_commit_time: std::option::Option<wkt::Timestamp>,
9154
9155 pub create_time: std::option::Option<wkt::Timestamp>,
9157
9158 pub update_time: std::option::Option<wkt::Timestamp>,
9160
9161 pub display_name: std::string::String,
9163
9164 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9165}
9166
9167impl ConversionWorkspace {
9168 pub fn new() -> Self {
9169 std::default::Default::default()
9170 }
9171
9172 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9174 self.name = v.into();
9175 self
9176 }
9177
9178 pub fn set_source<T>(mut self, v: T) -> Self
9180 where
9181 T: std::convert::Into<crate::model::DatabaseEngineInfo>,
9182 {
9183 self.source = std::option::Option::Some(v.into());
9184 self
9185 }
9186
9187 pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
9189 where
9190 T: std::convert::Into<crate::model::DatabaseEngineInfo>,
9191 {
9192 self.source = v.map(|x| x.into());
9193 self
9194 }
9195
9196 pub fn set_destination<T>(mut self, v: T) -> Self
9198 where
9199 T: std::convert::Into<crate::model::DatabaseEngineInfo>,
9200 {
9201 self.destination = std::option::Option::Some(v.into());
9202 self
9203 }
9204
9205 pub fn set_or_clear_destination<T>(mut self, v: std::option::Option<T>) -> Self
9207 where
9208 T: std::convert::Into<crate::model::DatabaseEngineInfo>,
9209 {
9210 self.destination = v.map(|x| x.into());
9211 self
9212 }
9213
9214 pub fn set_global_settings<T, K, V>(mut self, v: T) -> Self
9216 where
9217 T: std::iter::IntoIterator<Item = (K, V)>,
9218 K: std::convert::Into<std::string::String>,
9219 V: std::convert::Into<std::string::String>,
9220 {
9221 use std::iter::Iterator;
9222 self.global_settings = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9223 self
9224 }
9225
9226 pub fn set_has_uncommitted_changes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9228 self.has_uncommitted_changes = v.into();
9229 self
9230 }
9231
9232 pub fn set_latest_commit_id<T: std::convert::Into<std::string::String>>(
9234 mut self,
9235 v: T,
9236 ) -> Self {
9237 self.latest_commit_id = v.into();
9238 self
9239 }
9240
9241 pub fn set_latest_commit_time<T>(mut self, v: T) -> Self
9243 where
9244 T: std::convert::Into<wkt::Timestamp>,
9245 {
9246 self.latest_commit_time = std::option::Option::Some(v.into());
9247 self
9248 }
9249
9250 pub fn set_or_clear_latest_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
9252 where
9253 T: std::convert::Into<wkt::Timestamp>,
9254 {
9255 self.latest_commit_time = v.map(|x| x.into());
9256 self
9257 }
9258
9259 pub fn set_create_time<T>(mut self, v: T) -> Self
9261 where
9262 T: std::convert::Into<wkt::Timestamp>,
9263 {
9264 self.create_time = std::option::Option::Some(v.into());
9265 self
9266 }
9267
9268 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9270 where
9271 T: std::convert::Into<wkt::Timestamp>,
9272 {
9273 self.create_time = v.map(|x| x.into());
9274 self
9275 }
9276
9277 pub fn set_update_time<T>(mut self, v: T) -> Self
9279 where
9280 T: std::convert::Into<wkt::Timestamp>,
9281 {
9282 self.update_time = std::option::Option::Some(v.into());
9283 self
9284 }
9285
9286 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9288 where
9289 T: std::convert::Into<wkt::Timestamp>,
9290 {
9291 self.update_time = v.map(|x| x.into());
9292 self
9293 }
9294
9295 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9297 self.display_name = v.into();
9298 self
9299 }
9300}
9301
9302impl wkt::message::Message for ConversionWorkspace {
9303 fn typename() -> &'static str {
9304 "type.googleapis.com/google.cloud.clouddms.v1.ConversionWorkspace"
9305 }
9306}
9307
9308#[derive(Clone, Default, PartialEq)]
9310#[non_exhaustive]
9311pub struct BackgroundJobLogEntry {
9312 pub id: std::string::String,
9314
9315 pub job_type: crate::model::BackgroundJobType,
9317
9318 pub start_time: std::option::Option<wkt::Timestamp>,
9320
9321 pub finish_time: std::option::Option<wkt::Timestamp>,
9323
9324 pub completion_state: crate::model::background_job_log_entry::JobCompletionState,
9327
9328 pub completion_comment: std::string::String,
9331
9332 pub request_autocommit: bool,
9335
9336 pub job_details: std::option::Option<crate::model::background_job_log_entry::JobDetails>,
9337
9338 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9339}
9340
9341impl BackgroundJobLogEntry {
9342 pub fn new() -> Self {
9343 std::default::Default::default()
9344 }
9345
9346 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9348 self.id = v.into();
9349 self
9350 }
9351
9352 pub fn set_job_type<T: std::convert::Into<crate::model::BackgroundJobType>>(
9354 mut self,
9355 v: T,
9356 ) -> Self {
9357 self.job_type = v.into();
9358 self
9359 }
9360
9361 pub fn set_start_time<T>(mut self, v: T) -> Self
9363 where
9364 T: std::convert::Into<wkt::Timestamp>,
9365 {
9366 self.start_time = std::option::Option::Some(v.into());
9367 self
9368 }
9369
9370 pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
9372 where
9373 T: std::convert::Into<wkt::Timestamp>,
9374 {
9375 self.start_time = v.map(|x| x.into());
9376 self
9377 }
9378
9379 pub fn set_finish_time<T>(mut self, v: T) -> Self
9381 where
9382 T: std::convert::Into<wkt::Timestamp>,
9383 {
9384 self.finish_time = std::option::Option::Some(v.into());
9385 self
9386 }
9387
9388 pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
9390 where
9391 T: std::convert::Into<wkt::Timestamp>,
9392 {
9393 self.finish_time = v.map(|x| x.into());
9394 self
9395 }
9396
9397 pub fn set_completion_state<
9399 T: std::convert::Into<crate::model::background_job_log_entry::JobCompletionState>,
9400 >(
9401 mut self,
9402 v: T,
9403 ) -> Self {
9404 self.completion_state = v.into();
9405 self
9406 }
9407
9408 pub fn set_completion_comment<T: std::convert::Into<std::string::String>>(
9410 mut self,
9411 v: T,
9412 ) -> Self {
9413 self.completion_comment = v.into();
9414 self
9415 }
9416
9417 pub fn set_request_autocommit<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9419 self.request_autocommit = v.into();
9420 self
9421 }
9422
9423 pub fn set_job_details<
9428 T: std::convert::Into<std::option::Option<crate::model::background_job_log_entry::JobDetails>>,
9429 >(
9430 mut self,
9431 v: T,
9432 ) -> Self {
9433 self.job_details = v.into();
9434 self
9435 }
9436
9437 pub fn seed_job_details(
9441 &self,
9442 ) -> std::option::Option<&std::boxed::Box<crate::model::background_job_log_entry::SeedJobDetails>>
9443 {
9444 #[allow(unreachable_patterns)]
9445 self.job_details.as_ref().and_then(|v| match v {
9446 crate::model::background_job_log_entry::JobDetails::SeedJobDetails(v) => {
9447 std::option::Option::Some(v)
9448 }
9449 _ => std::option::Option::None,
9450 })
9451 }
9452
9453 pub fn set_seed_job_details<
9459 T: std::convert::Into<std::boxed::Box<crate::model::background_job_log_entry::SeedJobDetails>>,
9460 >(
9461 mut self,
9462 v: T,
9463 ) -> Self {
9464 self.job_details = std::option::Option::Some(
9465 crate::model::background_job_log_entry::JobDetails::SeedJobDetails(v.into()),
9466 );
9467 self
9468 }
9469
9470 pub fn import_rules_job_details(
9474 &self,
9475 ) -> std::option::Option<
9476 &std::boxed::Box<crate::model::background_job_log_entry::ImportRulesJobDetails>,
9477 > {
9478 #[allow(unreachable_patterns)]
9479 self.job_details.as_ref().and_then(|v| match v {
9480 crate::model::background_job_log_entry::JobDetails::ImportRulesJobDetails(v) => {
9481 std::option::Option::Some(v)
9482 }
9483 _ => std::option::Option::None,
9484 })
9485 }
9486
9487 pub fn set_import_rules_job_details<
9493 T: std::convert::Into<
9494 std::boxed::Box<crate::model::background_job_log_entry::ImportRulesJobDetails>,
9495 >,
9496 >(
9497 mut self,
9498 v: T,
9499 ) -> Self {
9500 self.job_details = std::option::Option::Some(
9501 crate::model::background_job_log_entry::JobDetails::ImportRulesJobDetails(v.into()),
9502 );
9503 self
9504 }
9505
9506 pub fn convert_job_details(
9510 &self,
9511 ) -> std::option::Option<
9512 &std::boxed::Box<crate::model::background_job_log_entry::ConvertJobDetails>,
9513 > {
9514 #[allow(unreachable_patterns)]
9515 self.job_details.as_ref().and_then(|v| match v {
9516 crate::model::background_job_log_entry::JobDetails::ConvertJobDetails(v) => {
9517 std::option::Option::Some(v)
9518 }
9519 _ => std::option::Option::None,
9520 })
9521 }
9522
9523 pub fn set_convert_job_details<
9529 T: std::convert::Into<
9530 std::boxed::Box<crate::model::background_job_log_entry::ConvertJobDetails>,
9531 >,
9532 >(
9533 mut self,
9534 v: T,
9535 ) -> Self {
9536 self.job_details = std::option::Option::Some(
9537 crate::model::background_job_log_entry::JobDetails::ConvertJobDetails(v.into()),
9538 );
9539 self
9540 }
9541
9542 pub fn apply_job_details(
9546 &self,
9547 ) -> std::option::Option<
9548 &std::boxed::Box<crate::model::background_job_log_entry::ApplyJobDetails>,
9549 > {
9550 #[allow(unreachable_patterns)]
9551 self.job_details.as_ref().and_then(|v| match v {
9552 crate::model::background_job_log_entry::JobDetails::ApplyJobDetails(v) => {
9553 std::option::Option::Some(v)
9554 }
9555 _ => std::option::Option::None,
9556 })
9557 }
9558
9559 pub fn set_apply_job_details<
9565 T: std::convert::Into<
9566 std::boxed::Box<crate::model::background_job_log_entry::ApplyJobDetails>,
9567 >,
9568 >(
9569 mut self,
9570 v: T,
9571 ) -> Self {
9572 self.job_details = std::option::Option::Some(
9573 crate::model::background_job_log_entry::JobDetails::ApplyJobDetails(v.into()),
9574 );
9575 self
9576 }
9577}
9578
9579impl wkt::message::Message for BackgroundJobLogEntry {
9580 fn typename() -> &'static str {
9581 "type.googleapis.com/google.cloud.clouddms.v1.BackgroundJobLogEntry"
9582 }
9583}
9584
9585pub mod background_job_log_entry {
9587 #[allow(unused_imports)]
9588 use super::*;
9589
9590 #[derive(Clone, Default, PartialEq)]
9592 #[non_exhaustive]
9593 pub struct SeedJobDetails {
9594 pub connection_profile: std::string::String,
9596
9597 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9598 }
9599
9600 impl SeedJobDetails {
9601 pub fn new() -> Self {
9602 std::default::Default::default()
9603 }
9604
9605 pub fn set_connection_profile<T: std::convert::Into<std::string::String>>(
9607 mut self,
9608 v: T,
9609 ) -> Self {
9610 self.connection_profile = v.into();
9611 self
9612 }
9613 }
9614
9615 impl wkt::message::Message for SeedJobDetails {
9616 fn typename() -> &'static str {
9617 "type.googleapis.com/google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails"
9618 }
9619 }
9620
9621 #[derive(Clone, Default, PartialEq)]
9623 #[non_exhaustive]
9624 pub struct ImportRulesJobDetails {
9625 pub files: std::vec::Vec<std::string::String>,
9627
9628 pub file_format: crate::model::ImportRulesFileFormat,
9630
9631 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9632 }
9633
9634 impl ImportRulesJobDetails {
9635 pub fn new() -> Self {
9636 std::default::Default::default()
9637 }
9638
9639 pub fn set_files<T, V>(mut self, v: T) -> Self
9641 where
9642 T: std::iter::IntoIterator<Item = V>,
9643 V: std::convert::Into<std::string::String>,
9644 {
9645 use std::iter::Iterator;
9646 self.files = v.into_iter().map(|i| i.into()).collect();
9647 self
9648 }
9649
9650 pub fn set_file_format<T: std::convert::Into<crate::model::ImportRulesFileFormat>>(
9652 mut self,
9653 v: T,
9654 ) -> Self {
9655 self.file_format = v.into();
9656 self
9657 }
9658 }
9659
9660 impl wkt::message::Message for ImportRulesJobDetails {
9661 fn typename() -> &'static str {
9662 "type.googleapis.com/google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails"
9663 }
9664 }
9665
9666 #[derive(Clone, Default, PartialEq)]
9668 #[non_exhaustive]
9669 pub struct ConvertJobDetails {
9670 pub filter: std::string::String,
9672
9673 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9674 }
9675
9676 impl ConvertJobDetails {
9677 pub fn new() -> Self {
9678 std::default::Default::default()
9679 }
9680
9681 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9683 self.filter = v.into();
9684 self
9685 }
9686 }
9687
9688 impl wkt::message::Message for ConvertJobDetails {
9689 fn typename() -> &'static str {
9690 "type.googleapis.com/google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails"
9691 }
9692 }
9693
9694 #[derive(Clone, Default, PartialEq)]
9696 #[non_exhaustive]
9697 pub struct ApplyJobDetails {
9698 pub connection_profile: std::string::String,
9700
9701 pub filter: std::string::String,
9703
9704 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9705 }
9706
9707 impl ApplyJobDetails {
9708 pub fn new() -> Self {
9709 std::default::Default::default()
9710 }
9711
9712 pub fn set_connection_profile<T: std::convert::Into<std::string::String>>(
9714 mut self,
9715 v: T,
9716 ) -> Self {
9717 self.connection_profile = v.into();
9718 self
9719 }
9720
9721 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9723 self.filter = v.into();
9724 self
9725 }
9726 }
9727
9728 impl wkt::message::Message for ApplyJobDetails {
9729 fn typename() -> &'static str {
9730 "type.googleapis.com/google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails"
9731 }
9732 }
9733
9734 #[derive(Clone, Debug, PartialEq)]
9750 #[non_exhaustive]
9751 pub enum JobCompletionState {
9752 Unspecified,
9755 Succeeded,
9757 Failed,
9759 UnknownValue(job_completion_state::UnknownValue),
9764 }
9765
9766 #[doc(hidden)]
9767 pub mod job_completion_state {
9768 #[allow(unused_imports)]
9769 use super::*;
9770 #[derive(Clone, Debug, PartialEq)]
9771 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9772 }
9773
9774 impl JobCompletionState {
9775 pub fn value(&self) -> std::option::Option<i32> {
9780 match self {
9781 Self::Unspecified => std::option::Option::Some(0),
9782 Self::Succeeded => std::option::Option::Some(1),
9783 Self::Failed => std::option::Option::Some(2),
9784 Self::UnknownValue(u) => u.0.value(),
9785 }
9786 }
9787
9788 pub fn name(&self) -> std::option::Option<&str> {
9793 match self {
9794 Self::Unspecified => std::option::Option::Some("JOB_COMPLETION_STATE_UNSPECIFIED"),
9795 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
9796 Self::Failed => std::option::Option::Some("FAILED"),
9797 Self::UnknownValue(u) => u.0.name(),
9798 }
9799 }
9800 }
9801
9802 impl std::default::Default for JobCompletionState {
9803 fn default() -> Self {
9804 use std::convert::From;
9805 Self::from(0)
9806 }
9807 }
9808
9809 impl std::fmt::Display for JobCompletionState {
9810 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9811 wkt::internal::display_enum(f, self.name(), self.value())
9812 }
9813 }
9814
9815 impl std::convert::From<i32> for JobCompletionState {
9816 fn from(value: i32) -> Self {
9817 match value {
9818 0 => Self::Unspecified,
9819 1 => Self::Succeeded,
9820 2 => Self::Failed,
9821 _ => Self::UnknownValue(job_completion_state::UnknownValue(
9822 wkt::internal::UnknownEnumValue::Integer(value),
9823 )),
9824 }
9825 }
9826 }
9827
9828 impl std::convert::From<&str> for JobCompletionState {
9829 fn from(value: &str) -> Self {
9830 use std::string::ToString;
9831 match value {
9832 "JOB_COMPLETION_STATE_UNSPECIFIED" => Self::Unspecified,
9833 "SUCCEEDED" => Self::Succeeded,
9834 "FAILED" => Self::Failed,
9835 _ => Self::UnknownValue(job_completion_state::UnknownValue(
9836 wkt::internal::UnknownEnumValue::String(value.to_string()),
9837 )),
9838 }
9839 }
9840 }
9841
9842 impl serde::ser::Serialize for JobCompletionState {
9843 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9844 where
9845 S: serde::Serializer,
9846 {
9847 match self {
9848 Self::Unspecified => serializer.serialize_i32(0),
9849 Self::Succeeded => serializer.serialize_i32(1),
9850 Self::Failed => serializer.serialize_i32(2),
9851 Self::UnknownValue(u) => u.0.serialize(serializer),
9852 }
9853 }
9854 }
9855
9856 impl<'de> serde::de::Deserialize<'de> for JobCompletionState {
9857 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9858 where
9859 D: serde::Deserializer<'de>,
9860 {
9861 deserializer.deserialize_any(wkt::internal::EnumVisitor::<JobCompletionState>::new(
9862 ".google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState",
9863 ))
9864 }
9865 }
9866
9867 #[derive(Clone, Debug, PartialEq)]
9868 #[non_exhaustive]
9869 pub enum JobDetails {
9870 SeedJobDetails(std::boxed::Box<crate::model::background_job_log_entry::SeedJobDetails>),
9872 ImportRulesJobDetails(
9874 std::boxed::Box<crate::model::background_job_log_entry::ImportRulesJobDetails>,
9875 ),
9876 ConvertJobDetails(
9878 std::boxed::Box<crate::model::background_job_log_entry::ConvertJobDetails>,
9879 ),
9880 ApplyJobDetails(std::boxed::Box<crate::model::background_job_log_entry::ApplyJobDetails>),
9882 }
9883}
9884
9885#[derive(Clone, Default, PartialEq)]
9889#[non_exhaustive]
9890pub struct MappingRuleFilter {
9891 pub parent_entity: std::string::String,
9898
9899 pub entity_name_prefix: std::string::String,
9902
9903 pub entity_name_suffix: std::string::String,
9906
9907 pub entity_name_contains: std::string::String,
9910
9911 pub entities: std::vec::Vec<std::string::String>,
9914
9915 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9916}
9917
9918impl MappingRuleFilter {
9919 pub fn new() -> Self {
9920 std::default::Default::default()
9921 }
9922
9923 pub fn set_parent_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9925 self.parent_entity = v.into();
9926 self
9927 }
9928
9929 pub fn set_entity_name_prefix<T: std::convert::Into<std::string::String>>(
9931 mut self,
9932 v: T,
9933 ) -> Self {
9934 self.entity_name_prefix = v.into();
9935 self
9936 }
9937
9938 pub fn set_entity_name_suffix<T: std::convert::Into<std::string::String>>(
9940 mut self,
9941 v: T,
9942 ) -> Self {
9943 self.entity_name_suffix = v.into();
9944 self
9945 }
9946
9947 pub fn set_entity_name_contains<T: std::convert::Into<std::string::String>>(
9949 mut self,
9950 v: T,
9951 ) -> Self {
9952 self.entity_name_contains = v.into();
9953 self
9954 }
9955
9956 pub fn set_entities<T, V>(mut self, v: T) -> Self
9958 where
9959 T: std::iter::IntoIterator<Item = V>,
9960 V: std::convert::Into<std::string::String>,
9961 {
9962 use std::iter::Iterator;
9963 self.entities = v.into_iter().map(|i| i.into()).collect();
9964 self
9965 }
9966}
9967
9968impl wkt::message::Message for MappingRuleFilter {
9969 fn typename() -> &'static str {
9970 "type.googleapis.com/google.cloud.clouddms.v1.MappingRuleFilter"
9971 }
9972}
9973
9974#[derive(Clone, Default, PartialEq)]
9978#[non_exhaustive]
9979pub struct MappingRule {
9980 pub name: std::string::String,
9983
9984 pub display_name: std::string::String,
9986
9987 pub state: crate::model::mapping_rule::State,
9989
9990 pub rule_scope: crate::model::DatabaseEntityType,
9992
9993 pub filter: std::option::Option<crate::model::MappingRuleFilter>,
9995
9996 pub rule_order: i64,
9999
10000 pub revision_id: std::string::String,
10004
10005 pub revision_create_time: std::option::Option<wkt::Timestamp>,
10007
10008 pub details: std::option::Option<crate::model::mapping_rule::Details>,
10010
10011 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10012}
10013
10014impl MappingRule {
10015 pub fn new() -> Self {
10016 std::default::Default::default()
10017 }
10018
10019 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10021 self.name = v.into();
10022 self
10023 }
10024
10025 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10027 self.display_name = v.into();
10028 self
10029 }
10030
10031 pub fn set_state<T: std::convert::Into<crate::model::mapping_rule::State>>(
10033 mut self,
10034 v: T,
10035 ) -> Self {
10036 self.state = v.into();
10037 self
10038 }
10039
10040 pub fn set_rule_scope<T: std::convert::Into<crate::model::DatabaseEntityType>>(
10042 mut self,
10043 v: T,
10044 ) -> Self {
10045 self.rule_scope = v.into();
10046 self
10047 }
10048
10049 pub fn set_filter<T>(mut self, v: T) -> Self
10051 where
10052 T: std::convert::Into<crate::model::MappingRuleFilter>,
10053 {
10054 self.filter = std::option::Option::Some(v.into());
10055 self
10056 }
10057
10058 pub fn set_or_clear_filter<T>(mut self, v: std::option::Option<T>) -> Self
10060 where
10061 T: std::convert::Into<crate::model::MappingRuleFilter>,
10062 {
10063 self.filter = v.map(|x| x.into());
10064 self
10065 }
10066
10067 pub fn set_rule_order<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10069 self.rule_order = v.into();
10070 self
10071 }
10072
10073 pub fn set_revision_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10075 self.revision_id = v.into();
10076 self
10077 }
10078
10079 pub fn set_revision_create_time<T>(mut self, v: T) -> Self
10081 where
10082 T: std::convert::Into<wkt::Timestamp>,
10083 {
10084 self.revision_create_time = std::option::Option::Some(v.into());
10085 self
10086 }
10087
10088 pub fn set_or_clear_revision_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10090 where
10091 T: std::convert::Into<wkt::Timestamp>,
10092 {
10093 self.revision_create_time = v.map(|x| x.into());
10094 self
10095 }
10096
10097 pub fn set_details<
10102 T: std::convert::Into<std::option::Option<crate::model::mapping_rule::Details>>,
10103 >(
10104 mut self,
10105 v: T,
10106 ) -> Self {
10107 self.details = v.into();
10108 self
10109 }
10110
10111 pub fn single_entity_rename(
10115 &self,
10116 ) -> std::option::Option<&std::boxed::Box<crate::model::SingleEntityRename>> {
10117 #[allow(unreachable_patterns)]
10118 self.details.as_ref().and_then(|v| match v {
10119 crate::model::mapping_rule::Details::SingleEntityRename(v) => {
10120 std::option::Option::Some(v)
10121 }
10122 _ => std::option::Option::None,
10123 })
10124 }
10125
10126 pub fn set_single_entity_rename<
10132 T: std::convert::Into<std::boxed::Box<crate::model::SingleEntityRename>>,
10133 >(
10134 mut self,
10135 v: T,
10136 ) -> Self {
10137 self.details = std::option::Option::Some(
10138 crate::model::mapping_rule::Details::SingleEntityRename(v.into()),
10139 );
10140 self
10141 }
10142
10143 pub fn multi_entity_rename(
10147 &self,
10148 ) -> std::option::Option<&std::boxed::Box<crate::model::MultiEntityRename>> {
10149 #[allow(unreachable_patterns)]
10150 self.details.as_ref().and_then(|v| match v {
10151 crate::model::mapping_rule::Details::MultiEntityRename(v) => {
10152 std::option::Option::Some(v)
10153 }
10154 _ => std::option::Option::None,
10155 })
10156 }
10157
10158 pub fn set_multi_entity_rename<
10164 T: std::convert::Into<std::boxed::Box<crate::model::MultiEntityRename>>,
10165 >(
10166 mut self,
10167 v: T,
10168 ) -> Self {
10169 self.details = std::option::Option::Some(
10170 crate::model::mapping_rule::Details::MultiEntityRename(v.into()),
10171 );
10172 self
10173 }
10174
10175 pub fn entity_move(&self) -> std::option::Option<&std::boxed::Box<crate::model::EntityMove>> {
10179 #[allow(unreachable_patterns)]
10180 self.details.as_ref().and_then(|v| match v {
10181 crate::model::mapping_rule::Details::EntityMove(v) => std::option::Option::Some(v),
10182 _ => std::option::Option::None,
10183 })
10184 }
10185
10186 pub fn set_entity_move<T: std::convert::Into<std::boxed::Box<crate::model::EntityMove>>>(
10192 mut self,
10193 v: T,
10194 ) -> Self {
10195 self.details =
10196 std::option::Option::Some(crate::model::mapping_rule::Details::EntityMove(v.into()));
10197 self
10198 }
10199
10200 pub fn single_column_change(
10204 &self,
10205 ) -> std::option::Option<&std::boxed::Box<crate::model::SingleColumnChange>> {
10206 #[allow(unreachable_patterns)]
10207 self.details.as_ref().and_then(|v| match v {
10208 crate::model::mapping_rule::Details::SingleColumnChange(v) => {
10209 std::option::Option::Some(v)
10210 }
10211 _ => std::option::Option::None,
10212 })
10213 }
10214
10215 pub fn set_single_column_change<
10221 T: std::convert::Into<std::boxed::Box<crate::model::SingleColumnChange>>,
10222 >(
10223 mut self,
10224 v: T,
10225 ) -> Self {
10226 self.details = std::option::Option::Some(
10227 crate::model::mapping_rule::Details::SingleColumnChange(v.into()),
10228 );
10229 self
10230 }
10231
10232 pub fn multi_column_data_type_change(
10236 &self,
10237 ) -> std::option::Option<&std::boxed::Box<crate::model::MultiColumnDatatypeChange>> {
10238 #[allow(unreachable_patterns)]
10239 self.details.as_ref().and_then(|v| match v {
10240 crate::model::mapping_rule::Details::MultiColumnDataTypeChange(v) => {
10241 std::option::Option::Some(v)
10242 }
10243 _ => std::option::Option::None,
10244 })
10245 }
10246
10247 pub fn set_multi_column_data_type_change<
10253 T: std::convert::Into<std::boxed::Box<crate::model::MultiColumnDatatypeChange>>,
10254 >(
10255 mut self,
10256 v: T,
10257 ) -> Self {
10258 self.details = std::option::Option::Some(
10259 crate::model::mapping_rule::Details::MultiColumnDataTypeChange(v.into()),
10260 );
10261 self
10262 }
10263
10264 pub fn conditional_column_set_value(
10268 &self,
10269 ) -> std::option::Option<&std::boxed::Box<crate::model::ConditionalColumnSetValue>> {
10270 #[allow(unreachable_patterns)]
10271 self.details.as_ref().and_then(|v| match v {
10272 crate::model::mapping_rule::Details::ConditionalColumnSetValue(v) => {
10273 std::option::Option::Some(v)
10274 }
10275 _ => std::option::Option::None,
10276 })
10277 }
10278
10279 pub fn set_conditional_column_set_value<
10285 T: std::convert::Into<std::boxed::Box<crate::model::ConditionalColumnSetValue>>,
10286 >(
10287 mut self,
10288 v: T,
10289 ) -> Self {
10290 self.details = std::option::Option::Some(
10291 crate::model::mapping_rule::Details::ConditionalColumnSetValue(v.into()),
10292 );
10293 self
10294 }
10295
10296 pub fn convert_rowid_column(
10300 &self,
10301 ) -> std::option::Option<&std::boxed::Box<crate::model::ConvertRowIdToColumn>> {
10302 #[allow(unreachable_patterns)]
10303 self.details.as_ref().and_then(|v| match v {
10304 crate::model::mapping_rule::Details::ConvertRowidColumn(v) => {
10305 std::option::Option::Some(v)
10306 }
10307 _ => std::option::Option::None,
10308 })
10309 }
10310
10311 pub fn set_convert_rowid_column<
10317 T: std::convert::Into<std::boxed::Box<crate::model::ConvertRowIdToColumn>>,
10318 >(
10319 mut self,
10320 v: T,
10321 ) -> Self {
10322 self.details = std::option::Option::Some(
10323 crate::model::mapping_rule::Details::ConvertRowidColumn(v.into()),
10324 );
10325 self
10326 }
10327
10328 pub fn set_table_primary_key(
10332 &self,
10333 ) -> std::option::Option<&std::boxed::Box<crate::model::SetTablePrimaryKey>> {
10334 #[allow(unreachable_patterns)]
10335 self.details.as_ref().and_then(|v| match v {
10336 crate::model::mapping_rule::Details::SetTablePrimaryKey(v) => {
10337 std::option::Option::Some(v)
10338 }
10339 _ => std::option::Option::None,
10340 })
10341 }
10342
10343 pub fn set_set_table_primary_key<
10349 T: std::convert::Into<std::boxed::Box<crate::model::SetTablePrimaryKey>>,
10350 >(
10351 mut self,
10352 v: T,
10353 ) -> Self {
10354 self.details = std::option::Option::Some(
10355 crate::model::mapping_rule::Details::SetTablePrimaryKey(v.into()),
10356 );
10357 self
10358 }
10359
10360 pub fn single_package_change(
10364 &self,
10365 ) -> std::option::Option<&std::boxed::Box<crate::model::SinglePackageChange>> {
10366 #[allow(unreachable_patterns)]
10367 self.details.as_ref().and_then(|v| match v {
10368 crate::model::mapping_rule::Details::SinglePackageChange(v) => {
10369 std::option::Option::Some(v)
10370 }
10371 _ => std::option::Option::None,
10372 })
10373 }
10374
10375 pub fn set_single_package_change<
10381 T: std::convert::Into<std::boxed::Box<crate::model::SinglePackageChange>>,
10382 >(
10383 mut self,
10384 v: T,
10385 ) -> Self {
10386 self.details = std::option::Option::Some(
10387 crate::model::mapping_rule::Details::SinglePackageChange(v.into()),
10388 );
10389 self
10390 }
10391
10392 pub fn source_sql_change(
10396 &self,
10397 ) -> std::option::Option<&std::boxed::Box<crate::model::SourceSqlChange>> {
10398 #[allow(unreachable_patterns)]
10399 self.details.as_ref().and_then(|v| match v {
10400 crate::model::mapping_rule::Details::SourceSqlChange(v) => std::option::Option::Some(v),
10401 _ => std::option::Option::None,
10402 })
10403 }
10404
10405 pub fn set_source_sql_change<
10411 T: std::convert::Into<std::boxed::Box<crate::model::SourceSqlChange>>,
10412 >(
10413 mut self,
10414 v: T,
10415 ) -> Self {
10416 self.details = std::option::Option::Some(
10417 crate::model::mapping_rule::Details::SourceSqlChange(v.into()),
10418 );
10419 self
10420 }
10421
10422 pub fn filter_table_columns(
10426 &self,
10427 ) -> std::option::Option<&std::boxed::Box<crate::model::FilterTableColumns>> {
10428 #[allow(unreachable_patterns)]
10429 self.details.as_ref().and_then(|v| match v {
10430 crate::model::mapping_rule::Details::FilterTableColumns(v) => {
10431 std::option::Option::Some(v)
10432 }
10433 _ => std::option::Option::None,
10434 })
10435 }
10436
10437 pub fn set_filter_table_columns<
10443 T: std::convert::Into<std::boxed::Box<crate::model::FilterTableColumns>>,
10444 >(
10445 mut self,
10446 v: T,
10447 ) -> Self {
10448 self.details = std::option::Option::Some(
10449 crate::model::mapping_rule::Details::FilterTableColumns(v.into()),
10450 );
10451 self
10452 }
10453}
10454
10455impl wkt::message::Message for MappingRule {
10456 fn typename() -> &'static str {
10457 "type.googleapis.com/google.cloud.clouddms.v1.MappingRule"
10458 }
10459}
10460
10461pub mod mapping_rule {
10463 #[allow(unused_imports)]
10464 use super::*;
10465
10466 #[derive(Clone, Debug, PartialEq)]
10482 #[non_exhaustive]
10483 pub enum State {
10484 Unspecified,
10486 Enabled,
10488 Disabled,
10490 Deleted,
10492 UnknownValue(state::UnknownValue),
10497 }
10498
10499 #[doc(hidden)]
10500 pub mod state {
10501 #[allow(unused_imports)]
10502 use super::*;
10503 #[derive(Clone, Debug, PartialEq)]
10504 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10505 }
10506
10507 impl State {
10508 pub fn value(&self) -> std::option::Option<i32> {
10513 match self {
10514 Self::Unspecified => std::option::Option::Some(0),
10515 Self::Enabled => std::option::Option::Some(1),
10516 Self::Disabled => std::option::Option::Some(2),
10517 Self::Deleted => std::option::Option::Some(3),
10518 Self::UnknownValue(u) => u.0.value(),
10519 }
10520 }
10521
10522 pub fn name(&self) -> std::option::Option<&str> {
10527 match self {
10528 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10529 Self::Enabled => std::option::Option::Some("ENABLED"),
10530 Self::Disabled => std::option::Option::Some("DISABLED"),
10531 Self::Deleted => std::option::Option::Some("DELETED"),
10532 Self::UnknownValue(u) => u.0.name(),
10533 }
10534 }
10535 }
10536
10537 impl std::default::Default for State {
10538 fn default() -> Self {
10539 use std::convert::From;
10540 Self::from(0)
10541 }
10542 }
10543
10544 impl std::fmt::Display for State {
10545 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10546 wkt::internal::display_enum(f, self.name(), self.value())
10547 }
10548 }
10549
10550 impl std::convert::From<i32> for State {
10551 fn from(value: i32) -> Self {
10552 match value {
10553 0 => Self::Unspecified,
10554 1 => Self::Enabled,
10555 2 => Self::Disabled,
10556 3 => Self::Deleted,
10557 _ => Self::UnknownValue(state::UnknownValue(
10558 wkt::internal::UnknownEnumValue::Integer(value),
10559 )),
10560 }
10561 }
10562 }
10563
10564 impl std::convert::From<&str> for State {
10565 fn from(value: &str) -> Self {
10566 use std::string::ToString;
10567 match value {
10568 "STATE_UNSPECIFIED" => Self::Unspecified,
10569 "ENABLED" => Self::Enabled,
10570 "DISABLED" => Self::Disabled,
10571 "DELETED" => Self::Deleted,
10572 _ => Self::UnknownValue(state::UnknownValue(
10573 wkt::internal::UnknownEnumValue::String(value.to_string()),
10574 )),
10575 }
10576 }
10577 }
10578
10579 impl serde::ser::Serialize for State {
10580 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10581 where
10582 S: serde::Serializer,
10583 {
10584 match self {
10585 Self::Unspecified => serializer.serialize_i32(0),
10586 Self::Enabled => serializer.serialize_i32(1),
10587 Self::Disabled => serializer.serialize_i32(2),
10588 Self::Deleted => serializer.serialize_i32(3),
10589 Self::UnknownValue(u) => u.0.serialize(serializer),
10590 }
10591 }
10592 }
10593
10594 impl<'de> serde::de::Deserialize<'de> for State {
10595 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10596 where
10597 D: serde::Deserializer<'de>,
10598 {
10599 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10600 ".google.cloud.clouddms.v1.MappingRule.State",
10601 ))
10602 }
10603 }
10604
10605 #[derive(Clone, Debug, PartialEq)]
10607 #[non_exhaustive]
10608 pub enum Details {
10609 SingleEntityRename(std::boxed::Box<crate::model::SingleEntityRename>),
10611 MultiEntityRename(std::boxed::Box<crate::model::MultiEntityRename>),
10613 EntityMove(std::boxed::Box<crate::model::EntityMove>),
10616 SingleColumnChange(std::boxed::Box<crate::model::SingleColumnChange>),
10618 MultiColumnDataTypeChange(std::boxed::Box<crate::model::MultiColumnDatatypeChange>),
10621 ConditionalColumnSetValue(std::boxed::Box<crate::model::ConditionalColumnSetValue>),
10625 ConvertRowidColumn(std::boxed::Box<crate::model::ConvertRowIdToColumn>),
10628 SetTablePrimaryKey(std::boxed::Box<crate::model::SetTablePrimaryKey>),
10630 SinglePackageChange(std::boxed::Box<crate::model::SinglePackageChange>),
10632 SourceSqlChange(std::boxed::Box<crate::model::SourceSqlChange>),
10635 FilterTableColumns(std::boxed::Box<crate::model::FilterTableColumns>),
10638 }
10639}
10640
10641#[derive(Clone, Default, PartialEq)]
10650#[non_exhaustive]
10651pub struct SingleEntityRename {
10652 pub new_name: std::string::String,
10654
10655 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10656}
10657
10658impl SingleEntityRename {
10659 pub fn new() -> Self {
10660 std::default::Default::default()
10661 }
10662
10663 pub fn set_new_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10665 self.new_name = v.into();
10666 self
10667 }
10668}
10669
10670impl wkt::message::Message for SingleEntityRename {
10671 fn typename() -> &'static str {
10672 "type.googleapis.com/google.cloud.clouddms.v1.SingleEntityRename"
10673 }
10674}
10675
10676#[derive(Clone, Default, PartialEq)]
10684#[non_exhaustive]
10685pub struct MultiEntityRename {
10686 pub new_name_pattern: std::string::String,
10693
10694 pub source_name_transformation: crate::model::EntityNameTransformation,
10698
10699 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10700}
10701
10702impl MultiEntityRename {
10703 pub fn new() -> Self {
10704 std::default::Default::default()
10705 }
10706
10707 pub fn set_new_name_pattern<T: std::convert::Into<std::string::String>>(
10709 mut self,
10710 v: T,
10711 ) -> Self {
10712 self.new_name_pattern = v.into();
10713 self
10714 }
10715
10716 pub fn set_source_name_transformation<
10718 T: std::convert::Into<crate::model::EntityNameTransformation>,
10719 >(
10720 mut self,
10721 v: T,
10722 ) -> Self {
10723 self.source_name_transformation = v.into();
10724 self
10725 }
10726}
10727
10728impl wkt::message::Message for MultiEntityRename {
10729 fn typename() -> &'static str {
10730 "type.googleapis.com/google.cloud.clouddms.v1.MultiEntityRename"
10731 }
10732}
10733
10734#[derive(Clone, Default, PartialEq)]
10742#[non_exhaustive]
10743pub struct EntityMove {
10744 pub new_schema: std::string::String,
10746
10747 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10748}
10749
10750impl EntityMove {
10751 pub fn new() -> Self {
10752 std::default::Default::default()
10753 }
10754
10755 pub fn set_new_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10757 self.new_schema = v.into();
10758 self
10759 }
10760}
10761
10762impl wkt::message::Message for EntityMove {
10763 fn typename() -> &'static str {
10764 "type.googleapis.com/google.cloud.clouddms.v1.EntityMove"
10765 }
10766}
10767
10768#[derive(Clone, Default, PartialEq)]
10778#[non_exhaustive]
10779pub struct SingleColumnChange {
10780 pub data_type: std::string::String,
10782
10783 pub charset: std::string::String,
10785
10786 pub collation: std::string::String,
10788
10789 pub length: i64,
10791
10792 pub precision: i32,
10794
10795 pub scale: i32,
10797
10798 pub fractional_seconds_precision: i32,
10802
10803 pub array: bool,
10805
10806 pub array_length: i32,
10809
10810 pub nullable: bool,
10812
10813 pub auto_generated: bool,
10815
10816 pub udt: bool,
10818
10819 pub custom_features: std::option::Option<wkt::Struct>,
10821
10822 pub set_values: std::vec::Vec<std::string::String>,
10824
10825 pub comment: std::string::String,
10827
10828 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10829}
10830
10831impl SingleColumnChange {
10832 pub fn new() -> Self {
10833 std::default::Default::default()
10834 }
10835
10836 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10838 self.data_type = v.into();
10839 self
10840 }
10841
10842 pub fn set_charset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10844 self.charset = v.into();
10845 self
10846 }
10847
10848 pub fn set_collation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10850 self.collation = v.into();
10851 self
10852 }
10853
10854 pub fn set_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10856 self.length = v.into();
10857 self
10858 }
10859
10860 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10862 self.precision = v.into();
10863 self
10864 }
10865
10866 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10868 self.scale = v.into();
10869 self
10870 }
10871
10872 pub fn set_fractional_seconds_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10874 self.fractional_seconds_precision = v.into();
10875 self
10876 }
10877
10878 pub fn set_array<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10880 self.array = v.into();
10881 self
10882 }
10883
10884 pub fn set_array_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10886 self.array_length = v.into();
10887 self
10888 }
10889
10890 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10892 self.nullable = v.into();
10893 self
10894 }
10895
10896 pub fn set_auto_generated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10898 self.auto_generated = v.into();
10899 self
10900 }
10901
10902 pub fn set_udt<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10904 self.udt = v.into();
10905 self
10906 }
10907
10908 pub fn set_custom_features<T>(mut self, v: T) -> Self
10910 where
10911 T: std::convert::Into<wkt::Struct>,
10912 {
10913 self.custom_features = std::option::Option::Some(v.into());
10914 self
10915 }
10916
10917 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
10919 where
10920 T: std::convert::Into<wkt::Struct>,
10921 {
10922 self.custom_features = v.map(|x| x.into());
10923 self
10924 }
10925
10926 pub fn set_set_values<T, V>(mut self, v: T) -> Self
10928 where
10929 T: std::iter::IntoIterator<Item = V>,
10930 V: std::convert::Into<std::string::String>,
10931 {
10932 use std::iter::Iterator;
10933 self.set_values = v.into_iter().map(|i| i.into()).collect();
10934 self
10935 }
10936
10937 pub fn set_comment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10939 self.comment = v.into();
10940 self
10941 }
10942}
10943
10944impl wkt::message::Message for SingleColumnChange {
10945 fn typename() -> &'static str {
10946 "type.googleapis.com/google.cloud.clouddms.v1.SingleColumnChange"
10947 }
10948}
10949
10950#[derive(Clone, Default, PartialEq)]
10964#[non_exhaustive]
10965pub struct MultiColumnDatatypeChange {
10966 pub source_data_type_filter: std::string::String,
10968
10969 pub new_data_type: std::string::String,
10971
10972 pub override_length: i64,
10975
10976 pub override_scale: i32,
10979
10980 pub override_precision: i32,
10983
10984 pub override_fractional_seconds_precision: i32,
10988
10989 pub custom_features: std::option::Option<wkt::Struct>,
10991
10992 pub source_filter:
10994 std::option::Option<crate::model::multi_column_datatype_change::SourceFilter>,
10995
10996 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10997}
10998
10999impl MultiColumnDatatypeChange {
11000 pub fn new() -> Self {
11001 std::default::Default::default()
11002 }
11003
11004 pub fn set_source_data_type_filter<T: std::convert::Into<std::string::String>>(
11006 mut self,
11007 v: T,
11008 ) -> Self {
11009 self.source_data_type_filter = v.into();
11010 self
11011 }
11012
11013 pub fn set_new_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11015 self.new_data_type = v.into();
11016 self
11017 }
11018
11019 pub fn set_override_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11021 self.override_length = v.into();
11022 self
11023 }
11024
11025 pub fn set_override_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11027 self.override_scale = v.into();
11028 self
11029 }
11030
11031 pub fn set_override_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11033 self.override_precision = v.into();
11034 self
11035 }
11036
11037 pub fn set_override_fractional_seconds_precision<T: std::convert::Into<i32>>(
11039 mut self,
11040 v: T,
11041 ) -> Self {
11042 self.override_fractional_seconds_precision = v.into();
11043 self
11044 }
11045
11046 pub fn set_custom_features<T>(mut self, v: T) -> Self
11048 where
11049 T: std::convert::Into<wkt::Struct>,
11050 {
11051 self.custom_features = std::option::Option::Some(v.into());
11052 self
11053 }
11054
11055 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
11057 where
11058 T: std::convert::Into<wkt::Struct>,
11059 {
11060 self.custom_features = v.map(|x| x.into());
11061 self
11062 }
11063
11064 pub fn set_source_filter<
11069 T: std::convert::Into<
11070 std::option::Option<crate::model::multi_column_datatype_change::SourceFilter>,
11071 >,
11072 >(
11073 mut self,
11074 v: T,
11075 ) -> Self {
11076 self.source_filter = v.into();
11077 self
11078 }
11079
11080 pub fn source_text_filter(
11084 &self,
11085 ) -> std::option::Option<&std::boxed::Box<crate::model::SourceTextFilter>> {
11086 #[allow(unreachable_patterns)]
11087 self.source_filter.as_ref().and_then(|v| match v {
11088 crate::model::multi_column_datatype_change::SourceFilter::SourceTextFilter(v) => {
11089 std::option::Option::Some(v)
11090 }
11091 _ => std::option::Option::None,
11092 })
11093 }
11094
11095 pub fn set_source_text_filter<
11101 T: std::convert::Into<std::boxed::Box<crate::model::SourceTextFilter>>,
11102 >(
11103 mut self,
11104 v: T,
11105 ) -> Self {
11106 self.source_filter = std::option::Option::Some(
11107 crate::model::multi_column_datatype_change::SourceFilter::SourceTextFilter(v.into()),
11108 );
11109 self
11110 }
11111
11112 pub fn source_numeric_filter(
11116 &self,
11117 ) -> std::option::Option<&std::boxed::Box<crate::model::SourceNumericFilter>> {
11118 #[allow(unreachable_patterns)]
11119 self.source_filter.as_ref().and_then(|v| match v {
11120 crate::model::multi_column_datatype_change::SourceFilter::SourceNumericFilter(v) => {
11121 std::option::Option::Some(v)
11122 }
11123 _ => std::option::Option::None,
11124 })
11125 }
11126
11127 pub fn set_source_numeric_filter<
11133 T: std::convert::Into<std::boxed::Box<crate::model::SourceNumericFilter>>,
11134 >(
11135 mut self,
11136 v: T,
11137 ) -> Self {
11138 self.source_filter = std::option::Option::Some(
11139 crate::model::multi_column_datatype_change::SourceFilter::SourceNumericFilter(v.into()),
11140 );
11141 self
11142 }
11143}
11144
11145impl wkt::message::Message for MultiColumnDatatypeChange {
11146 fn typename() -> &'static str {
11147 "type.googleapis.com/google.cloud.clouddms.v1.MultiColumnDatatypeChange"
11148 }
11149}
11150
11151pub mod multi_column_datatype_change {
11153 #[allow(unused_imports)]
11154 use super::*;
11155
11156 #[derive(Clone, Debug, PartialEq)]
11158 #[non_exhaustive]
11159 pub enum SourceFilter {
11160 SourceTextFilter(std::boxed::Box<crate::model::SourceTextFilter>),
11162 SourceNumericFilter(std::boxed::Box<crate::model::SourceNumericFilter>),
11165 }
11166}
11167
11168#[derive(Clone, Default, PartialEq)]
11170#[non_exhaustive]
11171pub struct SourceTextFilter {
11172 pub source_min_length_filter: i64,
11175
11176 pub source_max_length_filter: i64,
11179
11180 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11181}
11182
11183impl SourceTextFilter {
11184 pub fn new() -> Self {
11185 std::default::Default::default()
11186 }
11187
11188 pub fn set_source_min_length_filter<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11190 self.source_min_length_filter = v.into();
11191 self
11192 }
11193
11194 pub fn set_source_max_length_filter<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
11196 self.source_max_length_filter = v.into();
11197 self
11198 }
11199}
11200
11201impl wkt::message::Message for SourceTextFilter {
11202 fn typename() -> &'static str {
11203 "type.googleapis.com/google.cloud.clouddms.v1.SourceTextFilter"
11204 }
11205}
11206
11207#[derive(Clone, Default, PartialEq)]
11209#[non_exhaustive]
11210pub struct SourceNumericFilter {
11211 pub source_min_scale_filter: i32,
11214
11215 pub source_max_scale_filter: i32,
11218
11219 pub source_min_precision_filter: i32,
11222
11223 pub source_max_precision_filter: i32,
11226
11227 pub numeric_filter_option: crate::model::NumericFilterOption,
11230
11231 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11232}
11233
11234impl SourceNumericFilter {
11235 pub fn new() -> Self {
11236 std::default::Default::default()
11237 }
11238
11239 pub fn set_source_min_scale_filter<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11241 self.source_min_scale_filter = v.into();
11242 self
11243 }
11244
11245 pub fn set_source_max_scale_filter<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11247 self.source_max_scale_filter = v.into();
11248 self
11249 }
11250
11251 pub fn set_source_min_precision_filter<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11253 self.source_min_precision_filter = v.into();
11254 self
11255 }
11256
11257 pub fn set_source_max_precision_filter<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11259 self.source_max_precision_filter = v.into();
11260 self
11261 }
11262
11263 pub fn set_numeric_filter_option<T: std::convert::Into<crate::model::NumericFilterOption>>(
11265 mut self,
11266 v: T,
11267 ) -> Self {
11268 self.numeric_filter_option = v.into();
11269 self
11270 }
11271}
11272
11273impl wkt::message::Message for SourceNumericFilter {
11274 fn typename() -> &'static str {
11275 "type.googleapis.com/google.cloud.clouddms.v1.SourceNumericFilter"
11276 }
11277}
11278
11279#[derive(Clone, Default, PartialEq)]
11286#[non_exhaustive]
11287pub struct ConditionalColumnSetValue {
11288 pub value_transformation: std::option::Option<crate::model::ValueTransformation>,
11290
11291 pub custom_features: std::option::Option<wkt::Struct>,
11293
11294 pub source_filter:
11295 std::option::Option<crate::model::conditional_column_set_value::SourceFilter>,
11296
11297 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11298}
11299
11300impl ConditionalColumnSetValue {
11301 pub fn new() -> Self {
11302 std::default::Default::default()
11303 }
11304
11305 pub fn set_value_transformation<T>(mut self, v: T) -> Self
11307 where
11308 T: std::convert::Into<crate::model::ValueTransformation>,
11309 {
11310 self.value_transformation = std::option::Option::Some(v.into());
11311 self
11312 }
11313
11314 pub fn set_or_clear_value_transformation<T>(mut self, v: std::option::Option<T>) -> Self
11316 where
11317 T: std::convert::Into<crate::model::ValueTransformation>,
11318 {
11319 self.value_transformation = v.map(|x| x.into());
11320 self
11321 }
11322
11323 pub fn set_custom_features<T>(mut self, v: T) -> Self
11325 where
11326 T: std::convert::Into<wkt::Struct>,
11327 {
11328 self.custom_features = std::option::Option::Some(v.into());
11329 self
11330 }
11331
11332 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
11334 where
11335 T: std::convert::Into<wkt::Struct>,
11336 {
11337 self.custom_features = v.map(|x| x.into());
11338 self
11339 }
11340
11341 pub fn set_source_filter<
11346 T: std::convert::Into<
11347 std::option::Option<crate::model::conditional_column_set_value::SourceFilter>,
11348 >,
11349 >(
11350 mut self,
11351 v: T,
11352 ) -> Self {
11353 self.source_filter = v.into();
11354 self
11355 }
11356
11357 pub fn source_text_filter(
11361 &self,
11362 ) -> std::option::Option<&std::boxed::Box<crate::model::SourceTextFilter>> {
11363 #[allow(unreachable_patterns)]
11364 self.source_filter.as_ref().and_then(|v| match v {
11365 crate::model::conditional_column_set_value::SourceFilter::SourceTextFilter(v) => {
11366 std::option::Option::Some(v)
11367 }
11368 _ => std::option::Option::None,
11369 })
11370 }
11371
11372 pub fn set_source_text_filter<
11378 T: std::convert::Into<std::boxed::Box<crate::model::SourceTextFilter>>,
11379 >(
11380 mut self,
11381 v: T,
11382 ) -> Self {
11383 self.source_filter = std::option::Option::Some(
11384 crate::model::conditional_column_set_value::SourceFilter::SourceTextFilter(v.into()),
11385 );
11386 self
11387 }
11388
11389 pub fn source_numeric_filter(
11393 &self,
11394 ) -> std::option::Option<&std::boxed::Box<crate::model::SourceNumericFilter>> {
11395 #[allow(unreachable_patterns)]
11396 self.source_filter.as_ref().and_then(|v| match v {
11397 crate::model::conditional_column_set_value::SourceFilter::SourceNumericFilter(v) => {
11398 std::option::Option::Some(v)
11399 }
11400 _ => std::option::Option::None,
11401 })
11402 }
11403
11404 pub fn set_source_numeric_filter<
11410 T: std::convert::Into<std::boxed::Box<crate::model::SourceNumericFilter>>,
11411 >(
11412 mut self,
11413 v: T,
11414 ) -> Self {
11415 self.source_filter = std::option::Option::Some(
11416 crate::model::conditional_column_set_value::SourceFilter::SourceNumericFilter(v.into()),
11417 );
11418 self
11419 }
11420}
11421
11422impl wkt::message::Message for ConditionalColumnSetValue {
11423 fn typename() -> &'static str {
11424 "type.googleapis.com/google.cloud.clouddms.v1.ConditionalColumnSetValue"
11425 }
11426}
11427
11428pub mod conditional_column_set_value {
11430 #[allow(unused_imports)]
11431 use super::*;
11432
11433 #[derive(Clone, Debug, PartialEq)]
11434 #[non_exhaustive]
11435 pub enum SourceFilter {
11436 SourceTextFilter(std::boxed::Box<crate::model::SourceTextFilter>),
11439 SourceNumericFilter(std::boxed::Box<crate::model::SourceNumericFilter>),
11442 }
11443}
11444
11445#[derive(Clone, Default, PartialEq)]
11448#[non_exhaustive]
11449pub struct ValueTransformation {
11450 pub filter: std::option::Option<crate::model::value_transformation::Filter>,
11451
11452 pub action: std::option::Option<crate::model::value_transformation::Action>,
11453
11454 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11455}
11456
11457impl ValueTransformation {
11458 pub fn new() -> Self {
11459 std::default::Default::default()
11460 }
11461
11462 pub fn set_filter<
11467 T: std::convert::Into<std::option::Option<crate::model::value_transformation::Filter>>,
11468 >(
11469 mut self,
11470 v: T,
11471 ) -> Self {
11472 self.filter = v.into();
11473 self
11474 }
11475
11476 pub fn is_null(&self) -> std::option::Option<&std::boxed::Box<wkt::Empty>> {
11480 #[allow(unreachable_patterns)]
11481 self.filter.as_ref().and_then(|v| match v {
11482 crate::model::value_transformation::Filter::IsNull(v) => std::option::Option::Some(v),
11483 _ => std::option::Option::None,
11484 })
11485 }
11486
11487 pub fn set_is_null<T: std::convert::Into<std::boxed::Box<wkt::Empty>>>(mut self, v: T) -> Self {
11493 self.filter =
11494 std::option::Option::Some(crate::model::value_transformation::Filter::IsNull(v.into()));
11495 self
11496 }
11497
11498 pub fn value_list(
11502 &self,
11503 ) -> std::option::Option<&std::boxed::Box<crate::model::ValueListFilter>> {
11504 #[allow(unreachable_patterns)]
11505 self.filter.as_ref().and_then(|v| match v {
11506 crate::model::value_transformation::Filter::ValueList(v) => {
11507 std::option::Option::Some(v)
11508 }
11509 _ => std::option::Option::None,
11510 })
11511 }
11512
11513 pub fn set_value_list<T: std::convert::Into<std::boxed::Box<crate::model::ValueListFilter>>>(
11519 mut self,
11520 v: T,
11521 ) -> Self {
11522 self.filter = std::option::Option::Some(
11523 crate::model::value_transformation::Filter::ValueList(v.into()),
11524 );
11525 self
11526 }
11527
11528 pub fn int_comparison(
11532 &self,
11533 ) -> std::option::Option<&std::boxed::Box<crate::model::IntComparisonFilter>> {
11534 #[allow(unreachable_patterns)]
11535 self.filter.as_ref().and_then(|v| match v {
11536 crate::model::value_transformation::Filter::IntComparison(v) => {
11537 std::option::Option::Some(v)
11538 }
11539 _ => std::option::Option::None,
11540 })
11541 }
11542
11543 pub fn set_int_comparison<
11549 T: std::convert::Into<std::boxed::Box<crate::model::IntComparisonFilter>>,
11550 >(
11551 mut self,
11552 v: T,
11553 ) -> Self {
11554 self.filter = std::option::Option::Some(
11555 crate::model::value_transformation::Filter::IntComparison(v.into()),
11556 );
11557 self
11558 }
11559
11560 pub fn double_comparison(
11564 &self,
11565 ) -> std::option::Option<&std::boxed::Box<crate::model::DoubleComparisonFilter>> {
11566 #[allow(unreachable_patterns)]
11567 self.filter.as_ref().and_then(|v| match v {
11568 crate::model::value_transformation::Filter::DoubleComparison(v) => {
11569 std::option::Option::Some(v)
11570 }
11571 _ => std::option::Option::None,
11572 })
11573 }
11574
11575 pub fn set_double_comparison<
11581 T: std::convert::Into<std::boxed::Box<crate::model::DoubleComparisonFilter>>,
11582 >(
11583 mut self,
11584 v: T,
11585 ) -> Self {
11586 self.filter = std::option::Option::Some(
11587 crate::model::value_transformation::Filter::DoubleComparison(v.into()),
11588 );
11589 self
11590 }
11591
11592 pub fn set_action<
11597 T: std::convert::Into<std::option::Option<crate::model::value_transformation::Action>>,
11598 >(
11599 mut self,
11600 v: T,
11601 ) -> Self {
11602 self.action = v.into();
11603 self
11604 }
11605
11606 pub fn assign_null(&self) -> std::option::Option<&std::boxed::Box<wkt::Empty>> {
11610 #[allow(unreachable_patterns)]
11611 self.action.as_ref().and_then(|v| match v {
11612 crate::model::value_transformation::Action::AssignNull(v) => {
11613 std::option::Option::Some(v)
11614 }
11615 _ => std::option::Option::None,
11616 })
11617 }
11618
11619 pub fn set_assign_null<T: std::convert::Into<std::boxed::Box<wkt::Empty>>>(
11625 mut self,
11626 v: T,
11627 ) -> Self {
11628 self.action = std::option::Option::Some(
11629 crate::model::value_transformation::Action::AssignNull(v.into()),
11630 );
11631 self
11632 }
11633
11634 pub fn assign_specific_value(
11638 &self,
11639 ) -> std::option::Option<&std::boxed::Box<crate::model::AssignSpecificValue>> {
11640 #[allow(unreachable_patterns)]
11641 self.action.as_ref().and_then(|v| match v {
11642 crate::model::value_transformation::Action::AssignSpecificValue(v) => {
11643 std::option::Option::Some(v)
11644 }
11645 _ => std::option::Option::None,
11646 })
11647 }
11648
11649 pub fn set_assign_specific_value<
11655 T: std::convert::Into<std::boxed::Box<crate::model::AssignSpecificValue>>,
11656 >(
11657 mut self,
11658 v: T,
11659 ) -> Self {
11660 self.action = std::option::Option::Some(
11661 crate::model::value_transformation::Action::AssignSpecificValue(v.into()),
11662 );
11663 self
11664 }
11665
11666 pub fn assign_min_value(&self) -> std::option::Option<&std::boxed::Box<wkt::Empty>> {
11670 #[allow(unreachable_patterns)]
11671 self.action.as_ref().and_then(|v| match v {
11672 crate::model::value_transformation::Action::AssignMinValue(v) => {
11673 std::option::Option::Some(v)
11674 }
11675 _ => std::option::Option::None,
11676 })
11677 }
11678
11679 pub fn set_assign_min_value<T: std::convert::Into<std::boxed::Box<wkt::Empty>>>(
11685 mut self,
11686 v: T,
11687 ) -> Self {
11688 self.action = std::option::Option::Some(
11689 crate::model::value_transformation::Action::AssignMinValue(v.into()),
11690 );
11691 self
11692 }
11693
11694 pub fn assign_max_value(&self) -> std::option::Option<&std::boxed::Box<wkt::Empty>> {
11698 #[allow(unreachable_patterns)]
11699 self.action.as_ref().and_then(|v| match v {
11700 crate::model::value_transformation::Action::AssignMaxValue(v) => {
11701 std::option::Option::Some(v)
11702 }
11703 _ => std::option::Option::None,
11704 })
11705 }
11706
11707 pub fn set_assign_max_value<T: std::convert::Into<std::boxed::Box<wkt::Empty>>>(
11713 mut self,
11714 v: T,
11715 ) -> Self {
11716 self.action = std::option::Option::Some(
11717 crate::model::value_transformation::Action::AssignMaxValue(v.into()),
11718 );
11719 self
11720 }
11721
11722 pub fn round_scale(&self) -> std::option::Option<&std::boxed::Box<crate::model::RoundToScale>> {
11726 #[allow(unreachable_patterns)]
11727 self.action.as_ref().and_then(|v| match v {
11728 crate::model::value_transformation::Action::RoundScale(v) => {
11729 std::option::Option::Some(v)
11730 }
11731 _ => std::option::Option::None,
11732 })
11733 }
11734
11735 pub fn set_round_scale<T: std::convert::Into<std::boxed::Box<crate::model::RoundToScale>>>(
11741 mut self,
11742 v: T,
11743 ) -> Self {
11744 self.action = std::option::Option::Some(
11745 crate::model::value_transformation::Action::RoundScale(v.into()),
11746 );
11747 self
11748 }
11749
11750 pub fn apply_hash(&self) -> std::option::Option<&std::boxed::Box<crate::model::ApplyHash>> {
11754 #[allow(unreachable_patterns)]
11755 self.action.as_ref().and_then(|v| match v {
11756 crate::model::value_transformation::Action::ApplyHash(v) => {
11757 std::option::Option::Some(v)
11758 }
11759 _ => std::option::Option::None,
11760 })
11761 }
11762
11763 pub fn set_apply_hash<T: std::convert::Into<std::boxed::Box<crate::model::ApplyHash>>>(
11769 mut self,
11770 v: T,
11771 ) -> Self {
11772 self.action = std::option::Option::Some(
11773 crate::model::value_transformation::Action::ApplyHash(v.into()),
11774 );
11775 self
11776 }
11777}
11778
11779impl wkt::message::Message for ValueTransformation {
11780 fn typename() -> &'static str {
11781 "type.googleapis.com/google.cloud.clouddms.v1.ValueTransformation"
11782 }
11783}
11784
11785pub mod value_transformation {
11787 #[allow(unused_imports)]
11788 use super::*;
11789
11790 #[derive(Clone, Debug, PartialEq)]
11791 #[non_exhaustive]
11792 pub enum Filter {
11793 IsNull(std::boxed::Box<wkt::Empty>),
11795 ValueList(std::boxed::Box<crate::model::ValueListFilter>),
11797 IntComparison(std::boxed::Box<crate::model::IntComparisonFilter>),
11800 DoubleComparison(std::boxed::Box<crate::model::DoubleComparisonFilter>),
11803 }
11804
11805 #[derive(Clone, Debug, PartialEq)]
11806 #[non_exhaustive]
11807 pub enum Action {
11808 AssignNull(std::boxed::Box<wkt::Empty>),
11810 AssignSpecificValue(std::boxed::Box<crate::model::AssignSpecificValue>),
11813 AssignMinValue(std::boxed::Box<wkt::Empty>),
11816 AssignMaxValue(std::boxed::Box<wkt::Empty>),
11819 RoundScale(std::boxed::Box<crate::model::RoundToScale>),
11821 ApplyHash(std::boxed::Box<crate::model::ApplyHash>),
11823 }
11824}
11825
11826#[derive(Clone, Default, PartialEq)]
11838#[non_exhaustive]
11839pub struct ConvertRowIdToColumn {
11840 pub only_if_no_primary_key: bool,
11842
11843 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11844}
11845
11846impl ConvertRowIdToColumn {
11847 pub fn new() -> Self {
11848 std::default::Default::default()
11849 }
11850
11851 pub fn set_only_if_no_primary_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11853 self.only_if_no_primary_key = v.into();
11854 self
11855 }
11856}
11857
11858impl wkt::message::Message for ConvertRowIdToColumn {
11859 fn typename() -> &'static str {
11860 "type.googleapis.com/google.cloud.clouddms.v1.ConvertRowIdToColumn"
11861 }
11862}
11863
11864#[derive(Clone, Default, PartialEq)]
11872#[non_exhaustive]
11873pub struct SetTablePrimaryKey {
11874 pub primary_key_columns: std::vec::Vec<std::string::String>,
11876
11877 pub primary_key: std::string::String,
11879
11880 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11881}
11882
11883impl SetTablePrimaryKey {
11884 pub fn new() -> Self {
11885 std::default::Default::default()
11886 }
11887
11888 pub fn set_primary_key_columns<T, V>(mut self, v: T) -> Self
11890 where
11891 T: std::iter::IntoIterator<Item = V>,
11892 V: std::convert::Into<std::string::String>,
11893 {
11894 use std::iter::Iterator;
11895 self.primary_key_columns = v.into_iter().map(|i| i.into()).collect();
11896 self
11897 }
11898
11899 pub fn set_primary_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11901 self.primary_key = v.into();
11902 self
11903 }
11904}
11905
11906impl wkt::message::Message for SetTablePrimaryKey {
11907 fn typename() -> &'static str {
11908 "type.googleapis.com/google.cloud.clouddms.v1.SetTablePrimaryKey"
11909 }
11910}
11911
11912#[derive(Clone, Default, PartialEq)]
11919#[non_exhaustive]
11920pub struct SinglePackageChange {
11921 pub package_description: std::string::String,
11923
11924 pub package_body: std::string::String,
11926
11927 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11928}
11929
11930impl SinglePackageChange {
11931 pub fn new() -> Self {
11932 std::default::Default::default()
11933 }
11934
11935 pub fn set_package_description<T: std::convert::Into<std::string::String>>(
11937 mut self,
11938 v: T,
11939 ) -> Self {
11940 self.package_description = v.into();
11941 self
11942 }
11943
11944 pub fn set_package_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11946 self.package_body = v.into();
11947 self
11948 }
11949}
11950
11951impl wkt::message::Message for SinglePackageChange {
11952 fn typename() -> &'static str {
11953 "type.googleapis.com/google.cloud.clouddms.v1.SinglePackageChange"
11954 }
11955}
11956
11957#[derive(Clone, Default, PartialEq)]
11964#[non_exhaustive]
11965pub struct SourceSqlChange {
11966 pub sql_code: std::string::String,
11968
11969 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11970}
11971
11972impl SourceSqlChange {
11973 pub fn new() -> Self {
11974 std::default::Default::default()
11975 }
11976
11977 pub fn set_sql_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11979 self.sql_code = v.into();
11980 self
11981 }
11982}
11983
11984impl wkt::message::Message for SourceSqlChange {
11985 fn typename() -> &'static str {
11986 "type.googleapis.com/google.cloud.clouddms.v1.SourceSqlChange"
11987 }
11988}
11989
11990#[derive(Clone, Default, PartialEq)]
12000#[non_exhaustive]
12001pub struct FilterTableColumns {
12002 pub include_columns: std::vec::Vec<std::string::String>,
12004
12005 pub exclude_columns: std::vec::Vec<std::string::String>,
12007
12008 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12009}
12010
12011impl FilterTableColumns {
12012 pub fn new() -> Self {
12013 std::default::Default::default()
12014 }
12015
12016 pub fn set_include_columns<T, V>(mut self, v: T) -> Self
12018 where
12019 T: std::iter::IntoIterator<Item = V>,
12020 V: std::convert::Into<std::string::String>,
12021 {
12022 use std::iter::Iterator;
12023 self.include_columns = v.into_iter().map(|i| i.into()).collect();
12024 self
12025 }
12026
12027 pub fn set_exclude_columns<T, V>(mut self, v: T) -> Self
12029 where
12030 T: std::iter::IntoIterator<Item = V>,
12031 V: std::convert::Into<std::string::String>,
12032 {
12033 use std::iter::Iterator;
12034 self.exclude_columns = v.into_iter().map(|i| i.into()).collect();
12035 self
12036 }
12037}
12038
12039impl wkt::message::Message for FilterTableColumns {
12040 fn typename() -> &'static str {
12041 "type.googleapis.com/google.cloud.clouddms.v1.FilterTableColumns"
12042 }
12043}
12044
12045#[derive(Clone, Default, PartialEq)]
12047#[non_exhaustive]
12048pub struct ValueListFilter {
12049 pub value_present_list: crate::model::ValuePresentInList,
12052
12053 pub values: std::vec::Vec<std::string::String>,
12055
12056 pub ignore_case: bool,
12059
12060 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12061}
12062
12063impl ValueListFilter {
12064 pub fn new() -> Self {
12065 std::default::Default::default()
12066 }
12067
12068 pub fn set_value_present_list<T: std::convert::Into<crate::model::ValuePresentInList>>(
12070 mut self,
12071 v: T,
12072 ) -> Self {
12073 self.value_present_list = v.into();
12074 self
12075 }
12076
12077 pub fn set_values<T, V>(mut self, v: T) -> Self
12079 where
12080 T: std::iter::IntoIterator<Item = V>,
12081 V: std::convert::Into<std::string::String>,
12082 {
12083 use std::iter::Iterator;
12084 self.values = v.into_iter().map(|i| i.into()).collect();
12085 self
12086 }
12087
12088 pub fn set_ignore_case<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12090 self.ignore_case = v.into();
12091 self
12092 }
12093}
12094
12095impl wkt::message::Message for ValueListFilter {
12096 fn typename() -> &'static str {
12097 "type.googleapis.com/google.cloud.clouddms.v1.ValueListFilter"
12098 }
12099}
12100
12101#[derive(Clone, Default, PartialEq)]
12104#[non_exhaustive]
12105pub struct IntComparisonFilter {
12106 pub value_comparison: crate::model::ValueComparison,
12108
12109 pub value: i64,
12111
12112 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12113}
12114
12115impl IntComparisonFilter {
12116 pub fn new() -> Self {
12117 std::default::Default::default()
12118 }
12119
12120 pub fn set_value_comparison<T: std::convert::Into<crate::model::ValueComparison>>(
12122 mut self,
12123 v: T,
12124 ) -> Self {
12125 self.value_comparison = v.into();
12126 self
12127 }
12128
12129 pub fn set_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12131 self.value = v.into();
12132 self
12133 }
12134}
12135
12136impl wkt::message::Message for IntComparisonFilter {
12137 fn typename() -> &'static str {
12138 "type.googleapis.com/google.cloud.clouddms.v1.IntComparisonFilter"
12139 }
12140}
12141
12142#[derive(Clone, Default, PartialEq)]
12145#[non_exhaustive]
12146pub struct DoubleComparisonFilter {
12147 pub value_comparison: crate::model::ValueComparison,
12149
12150 pub value: f64,
12152
12153 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12154}
12155
12156impl DoubleComparisonFilter {
12157 pub fn new() -> Self {
12158 std::default::Default::default()
12159 }
12160
12161 pub fn set_value_comparison<T: std::convert::Into<crate::model::ValueComparison>>(
12163 mut self,
12164 v: T,
12165 ) -> Self {
12166 self.value_comparison = v.into();
12167 self
12168 }
12169
12170 pub fn set_value<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
12172 self.value = v.into();
12173 self
12174 }
12175}
12176
12177impl wkt::message::Message for DoubleComparisonFilter {
12178 fn typename() -> &'static str {
12179 "type.googleapis.com/google.cloud.clouddms.v1.DoubleComparisonFilter"
12180 }
12181}
12182
12183#[derive(Clone, Default, PartialEq)]
12185#[non_exhaustive]
12186pub struct AssignSpecificValue {
12187 pub value: std::string::String,
12189
12190 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12191}
12192
12193impl AssignSpecificValue {
12194 pub fn new() -> Self {
12195 std::default::Default::default()
12196 }
12197
12198 pub fn set_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12200 self.value = v.into();
12201 self
12202 }
12203}
12204
12205impl wkt::message::Message for AssignSpecificValue {
12206 fn typename() -> &'static str {
12207 "type.googleapis.com/google.cloud.clouddms.v1.AssignSpecificValue"
12208 }
12209}
12210
12211#[derive(Clone, Default, PartialEq)]
12213#[non_exhaustive]
12214pub struct ApplyHash {
12215 pub hash_function: std::option::Option<crate::model::apply_hash::HashFunction>,
12216
12217 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12218}
12219
12220impl ApplyHash {
12221 pub fn new() -> Self {
12222 std::default::Default::default()
12223 }
12224
12225 pub fn set_hash_function<
12230 T: std::convert::Into<std::option::Option<crate::model::apply_hash::HashFunction>>,
12231 >(
12232 mut self,
12233 v: T,
12234 ) -> Self {
12235 self.hash_function = v.into();
12236 self
12237 }
12238
12239 pub fn uuid_from_bytes(&self) -> std::option::Option<&std::boxed::Box<wkt::Empty>> {
12243 #[allow(unreachable_patterns)]
12244 self.hash_function.as_ref().and_then(|v| match v {
12245 crate::model::apply_hash::HashFunction::UuidFromBytes(v) => {
12246 std::option::Option::Some(v)
12247 }
12248 _ => std::option::Option::None,
12249 })
12250 }
12251
12252 pub fn set_uuid_from_bytes<T: std::convert::Into<std::boxed::Box<wkt::Empty>>>(
12258 mut self,
12259 v: T,
12260 ) -> Self {
12261 self.hash_function = std::option::Option::Some(
12262 crate::model::apply_hash::HashFunction::UuidFromBytes(v.into()),
12263 );
12264 self
12265 }
12266}
12267
12268impl wkt::message::Message for ApplyHash {
12269 fn typename() -> &'static str {
12270 "type.googleapis.com/google.cloud.clouddms.v1.ApplyHash"
12271 }
12272}
12273
12274pub mod apply_hash {
12276 #[allow(unused_imports)]
12277 use super::*;
12278
12279 #[derive(Clone, Debug, PartialEq)]
12280 #[non_exhaustive]
12281 pub enum HashFunction {
12282 UuidFromBytes(std::boxed::Box<wkt::Empty>),
12284 }
12285}
12286
12287#[derive(Clone, Default, PartialEq)]
12291#[non_exhaustive]
12292pub struct RoundToScale {
12293 pub scale: i32,
12295
12296 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12297}
12298
12299impl RoundToScale {
12300 pub fn new() -> Self {
12301 std::default::Default::default()
12302 }
12303
12304 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12306 self.scale = v.into();
12307 self
12308 }
12309}
12310
12311impl wkt::message::Message for RoundToScale {
12312 fn typename() -> &'static str {
12313 "type.googleapis.com/google.cloud.clouddms.v1.RoundToScale"
12314 }
12315}
12316
12317#[derive(Clone, Default, PartialEq)]
12321#[non_exhaustive]
12322pub struct DatabaseEntity {
12323 pub short_name: std::string::String,
12325
12326 pub parent_entity: std::string::String,
12328
12329 pub tree: crate::model::database_entity::TreeType,
12331
12332 pub entity_type: crate::model::DatabaseEntityType,
12334
12335 pub mappings: std::vec::Vec<crate::model::EntityMapping>,
12342
12343 pub entity_ddl: std::vec::Vec<crate::model::EntityDdl>,
12347
12348 pub issues: std::vec::Vec<crate::model::EntityIssue>,
12350
12351 pub entity_body: std::option::Option<crate::model::database_entity::EntityBody>,
12353
12354 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12355}
12356
12357impl DatabaseEntity {
12358 pub fn new() -> Self {
12359 std::default::Default::default()
12360 }
12361
12362 pub fn set_short_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12364 self.short_name = v.into();
12365 self
12366 }
12367
12368 pub fn set_parent_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12370 self.parent_entity = v.into();
12371 self
12372 }
12373
12374 pub fn set_tree<T: std::convert::Into<crate::model::database_entity::TreeType>>(
12376 mut self,
12377 v: T,
12378 ) -> Self {
12379 self.tree = v.into();
12380 self
12381 }
12382
12383 pub fn set_entity_type<T: std::convert::Into<crate::model::DatabaseEntityType>>(
12385 mut self,
12386 v: T,
12387 ) -> Self {
12388 self.entity_type = v.into();
12389 self
12390 }
12391
12392 pub fn set_mappings<T, V>(mut self, v: T) -> Self
12394 where
12395 T: std::iter::IntoIterator<Item = V>,
12396 V: std::convert::Into<crate::model::EntityMapping>,
12397 {
12398 use std::iter::Iterator;
12399 self.mappings = v.into_iter().map(|i| i.into()).collect();
12400 self
12401 }
12402
12403 pub fn set_entity_ddl<T, V>(mut self, v: T) -> Self
12405 where
12406 T: std::iter::IntoIterator<Item = V>,
12407 V: std::convert::Into<crate::model::EntityDdl>,
12408 {
12409 use std::iter::Iterator;
12410 self.entity_ddl = v.into_iter().map(|i| i.into()).collect();
12411 self
12412 }
12413
12414 pub fn set_issues<T, V>(mut self, v: T) -> Self
12416 where
12417 T: std::iter::IntoIterator<Item = V>,
12418 V: std::convert::Into<crate::model::EntityIssue>,
12419 {
12420 use std::iter::Iterator;
12421 self.issues = v.into_iter().map(|i| i.into()).collect();
12422 self
12423 }
12424
12425 pub fn set_entity_body<
12430 T: std::convert::Into<std::option::Option<crate::model::database_entity::EntityBody>>,
12431 >(
12432 mut self,
12433 v: T,
12434 ) -> Self {
12435 self.entity_body = v.into();
12436 self
12437 }
12438
12439 pub fn database(
12443 &self,
12444 ) -> std::option::Option<&std::boxed::Box<crate::model::DatabaseInstanceEntity>> {
12445 #[allow(unreachable_patterns)]
12446 self.entity_body.as_ref().and_then(|v| match v {
12447 crate::model::database_entity::EntityBody::Database(v) => std::option::Option::Some(v),
12448 _ => std::option::Option::None,
12449 })
12450 }
12451
12452 pub fn set_database<
12458 T: std::convert::Into<std::boxed::Box<crate::model::DatabaseInstanceEntity>>,
12459 >(
12460 mut self,
12461 v: T,
12462 ) -> Self {
12463 self.entity_body = std::option::Option::Some(
12464 crate::model::database_entity::EntityBody::Database(v.into()),
12465 );
12466 self
12467 }
12468
12469 pub fn schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::SchemaEntity>> {
12473 #[allow(unreachable_patterns)]
12474 self.entity_body.as_ref().and_then(|v| match v {
12475 crate::model::database_entity::EntityBody::Schema(v) => std::option::Option::Some(v),
12476 _ => std::option::Option::None,
12477 })
12478 }
12479
12480 pub fn set_schema<T: std::convert::Into<std::boxed::Box<crate::model::SchemaEntity>>>(
12486 mut self,
12487 v: T,
12488 ) -> Self {
12489 self.entity_body =
12490 std::option::Option::Some(crate::model::database_entity::EntityBody::Schema(v.into()));
12491 self
12492 }
12493
12494 pub fn table(&self) -> std::option::Option<&std::boxed::Box<crate::model::TableEntity>> {
12498 #[allow(unreachable_patterns)]
12499 self.entity_body.as_ref().and_then(|v| match v {
12500 crate::model::database_entity::EntityBody::Table(v) => std::option::Option::Some(v),
12501 _ => std::option::Option::None,
12502 })
12503 }
12504
12505 pub fn set_table<T: std::convert::Into<std::boxed::Box<crate::model::TableEntity>>>(
12511 mut self,
12512 v: T,
12513 ) -> Self {
12514 self.entity_body =
12515 std::option::Option::Some(crate::model::database_entity::EntityBody::Table(v.into()));
12516 self
12517 }
12518
12519 pub fn view(&self) -> std::option::Option<&std::boxed::Box<crate::model::ViewEntity>> {
12523 #[allow(unreachable_patterns)]
12524 self.entity_body.as_ref().and_then(|v| match v {
12525 crate::model::database_entity::EntityBody::View(v) => std::option::Option::Some(v),
12526 _ => std::option::Option::None,
12527 })
12528 }
12529
12530 pub fn set_view<T: std::convert::Into<std::boxed::Box<crate::model::ViewEntity>>>(
12536 mut self,
12537 v: T,
12538 ) -> Self {
12539 self.entity_body =
12540 std::option::Option::Some(crate::model::database_entity::EntityBody::View(v.into()));
12541 self
12542 }
12543
12544 pub fn sequence(&self) -> std::option::Option<&std::boxed::Box<crate::model::SequenceEntity>> {
12548 #[allow(unreachable_patterns)]
12549 self.entity_body.as_ref().and_then(|v| match v {
12550 crate::model::database_entity::EntityBody::Sequence(v) => std::option::Option::Some(v),
12551 _ => std::option::Option::None,
12552 })
12553 }
12554
12555 pub fn set_sequence<T: std::convert::Into<std::boxed::Box<crate::model::SequenceEntity>>>(
12561 mut self,
12562 v: T,
12563 ) -> Self {
12564 self.entity_body = std::option::Option::Some(
12565 crate::model::database_entity::EntityBody::Sequence(v.into()),
12566 );
12567 self
12568 }
12569
12570 pub fn stored_procedure(
12574 &self,
12575 ) -> std::option::Option<&std::boxed::Box<crate::model::StoredProcedureEntity>> {
12576 #[allow(unreachable_patterns)]
12577 self.entity_body.as_ref().and_then(|v| match v {
12578 crate::model::database_entity::EntityBody::StoredProcedure(v) => {
12579 std::option::Option::Some(v)
12580 }
12581 _ => std::option::Option::None,
12582 })
12583 }
12584
12585 pub fn set_stored_procedure<
12591 T: std::convert::Into<std::boxed::Box<crate::model::StoredProcedureEntity>>,
12592 >(
12593 mut self,
12594 v: T,
12595 ) -> Self {
12596 self.entity_body = std::option::Option::Some(
12597 crate::model::database_entity::EntityBody::StoredProcedure(v.into()),
12598 );
12599 self
12600 }
12601
12602 pub fn database_function(
12606 &self,
12607 ) -> std::option::Option<&std::boxed::Box<crate::model::FunctionEntity>> {
12608 #[allow(unreachable_patterns)]
12609 self.entity_body.as_ref().and_then(|v| match v {
12610 crate::model::database_entity::EntityBody::DatabaseFunction(v) => {
12611 std::option::Option::Some(v)
12612 }
12613 _ => std::option::Option::None,
12614 })
12615 }
12616
12617 pub fn set_database_function<
12623 T: std::convert::Into<std::boxed::Box<crate::model::FunctionEntity>>,
12624 >(
12625 mut self,
12626 v: T,
12627 ) -> Self {
12628 self.entity_body = std::option::Option::Some(
12629 crate::model::database_entity::EntityBody::DatabaseFunction(v.into()),
12630 );
12631 self
12632 }
12633
12634 pub fn synonym(&self) -> std::option::Option<&std::boxed::Box<crate::model::SynonymEntity>> {
12638 #[allow(unreachable_patterns)]
12639 self.entity_body.as_ref().and_then(|v| match v {
12640 crate::model::database_entity::EntityBody::Synonym(v) => std::option::Option::Some(v),
12641 _ => std::option::Option::None,
12642 })
12643 }
12644
12645 pub fn set_synonym<T: std::convert::Into<std::boxed::Box<crate::model::SynonymEntity>>>(
12651 mut self,
12652 v: T,
12653 ) -> Self {
12654 self.entity_body =
12655 std::option::Option::Some(crate::model::database_entity::EntityBody::Synonym(v.into()));
12656 self
12657 }
12658
12659 pub fn database_package(
12663 &self,
12664 ) -> std::option::Option<&std::boxed::Box<crate::model::PackageEntity>> {
12665 #[allow(unreachable_patterns)]
12666 self.entity_body.as_ref().and_then(|v| match v {
12667 crate::model::database_entity::EntityBody::DatabasePackage(v) => {
12668 std::option::Option::Some(v)
12669 }
12670 _ => std::option::Option::None,
12671 })
12672 }
12673
12674 pub fn set_database_package<
12680 T: std::convert::Into<std::boxed::Box<crate::model::PackageEntity>>,
12681 >(
12682 mut self,
12683 v: T,
12684 ) -> Self {
12685 self.entity_body = std::option::Option::Some(
12686 crate::model::database_entity::EntityBody::DatabasePackage(v.into()),
12687 );
12688 self
12689 }
12690
12691 pub fn udt(&self) -> std::option::Option<&std::boxed::Box<crate::model::UDTEntity>> {
12695 #[allow(unreachable_patterns)]
12696 self.entity_body.as_ref().and_then(|v| match v {
12697 crate::model::database_entity::EntityBody::Udt(v) => std::option::Option::Some(v),
12698 _ => std::option::Option::None,
12699 })
12700 }
12701
12702 pub fn set_udt<T: std::convert::Into<std::boxed::Box<crate::model::UDTEntity>>>(
12708 mut self,
12709 v: T,
12710 ) -> Self {
12711 self.entity_body =
12712 std::option::Option::Some(crate::model::database_entity::EntityBody::Udt(v.into()));
12713 self
12714 }
12715
12716 pub fn materialized_view(
12720 &self,
12721 ) -> std::option::Option<&std::boxed::Box<crate::model::MaterializedViewEntity>> {
12722 #[allow(unreachable_patterns)]
12723 self.entity_body.as_ref().and_then(|v| match v {
12724 crate::model::database_entity::EntityBody::MaterializedView(v) => {
12725 std::option::Option::Some(v)
12726 }
12727 _ => std::option::Option::None,
12728 })
12729 }
12730
12731 pub fn set_materialized_view<
12737 T: std::convert::Into<std::boxed::Box<crate::model::MaterializedViewEntity>>,
12738 >(
12739 mut self,
12740 v: T,
12741 ) -> Self {
12742 self.entity_body = std::option::Option::Some(
12743 crate::model::database_entity::EntityBody::MaterializedView(v.into()),
12744 );
12745 self
12746 }
12747}
12748
12749impl wkt::message::Message for DatabaseEntity {
12750 fn typename() -> &'static str {
12751 "type.googleapis.com/google.cloud.clouddms.v1.DatabaseEntity"
12752 }
12753}
12754
12755pub mod database_entity {
12757 #[allow(unused_imports)]
12758 use super::*;
12759
12760 #[derive(Clone, Debug, PartialEq)]
12776 #[non_exhaustive]
12777 pub enum TreeType {
12778 Unspecified,
12780 Source,
12782 Draft,
12784 Destination,
12786 UnknownValue(tree_type::UnknownValue),
12791 }
12792
12793 #[doc(hidden)]
12794 pub mod tree_type {
12795 #[allow(unused_imports)]
12796 use super::*;
12797 #[derive(Clone, Debug, PartialEq)]
12798 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12799 }
12800
12801 impl TreeType {
12802 pub fn value(&self) -> std::option::Option<i32> {
12807 match self {
12808 Self::Unspecified => std::option::Option::Some(0),
12809 Self::Source => std::option::Option::Some(1),
12810 Self::Draft => std::option::Option::Some(2),
12811 Self::Destination => std::option::Option::Some(3),
12812 Self::UnknownValue(u) => u.0.value(),
12813 }
12814 }
12815
12816 pub fn name(&self) -> std::option::Option<&str> {
12821 match self {
12822 Self::Unspecified => std::option::Option::Some("TREE_TYPE_UNSPECIFIED"),
12823 Self::Source => std::option::Option::Some("SOURCE"),
12824 Self::Draft => std::option::Option::Some("DRAFT"),
12825 Self::Destination => std::option::Option::Some("DESTINATION"),
12826 Self::UnknownValue(u) => u.0.name(),
12827 }
12828 }
12829 }
12830
12831 impl std::default::Default for TreeType {
12832 fn default() -> Self {
12833 use std::convert::From;
12834 Self::from(0)
12835 }
12836 }
12837
12838 impl std::fmt::Display for TreeType {
12839 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12840 wkt::internal::display_enum(f, self.name(), self.value())
12841 }
12842 }
12843
12844 impl std::convert::From<i32> for TreeType {
12845 fn from(value: i32) -> Self {
12846 match value {
12847 0 => Self::Unspecified,
12848 1 => Self::Source,
12849 2 => Self::Draft,
12850 3 => Self::Destination,
12851 _ => Self::UnknownValue(tree_type::UnknownValue(
12852 wkt::internal::UnknownEnumValue::Integer(value),
12853 )),
12854 }
12855 }
12856 }
12857
12858 impl std::convert::From<&str> for TreeType {
12859 fn from(value: &str) -> Self {
12860 use std::string::ToString;
12861 match value {
12862 "TREE_TYPE_UNSPECIFIED" => Self::Unspecified,
12863 "SOURCE" => Self::Source,
12864 "DRAFT" => Self::Draft,
12865 "DESTINATION" => Self::Destination,
12866 _ => Self::UnknownValue(tree_type::UnknownValue(
12867 wkt::internal::UnknownEnumValue::String(value.to_string()),
12868 )),
12869 }
12870 }
12871 }
12872
12873 impl serde::ser::Serialize for TreeType {
12874 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12875 where
12876 S: serde::Serializer,
12877 {
12878 match self {
12879 Self::Unspecified => serializer.serialize_i32(0),
12880 Self::Source => serializer.serialize_i32(1),
12881 Self::Draft => serializer.serialize_i32(2),
12882 Self::Destination => serializer.serialize_i32(3),
12883 Self::UnknownValue(u) => u.0.serialize(serializer),
12884 }
12885 }
12886 }
12887
12888 impl<'de> serde::de::Deserialize<'de> for TreeType {
12889 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12890 where
12891 D: serde::Deserializer<'de>,
12892 {
12893 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TreeType>::new(
12894 ".google.cloud.clouddms.v1.DatabaseEntity.TreeType",
12895 ))
12896 }
12897 }
12898
12899 #[derive(Clone, Debug, PartialEq)]
12901 #[non_exhaustive]
12902 pub enum EntityBody {
12903 Database(std::boxed::Box<crate::model::DatabaseInstanceEntity>),
12905 Schema(std::boxed::Box<crate::model::SchemaEntity>),
12907 Table(std::boxed::Box<crate::model::TableEntity>),
12909 View(std::boxed::Box<crate::model::ViewEntity>),
12911 Sequence(std::boxed::Box<crate::model::SequenceEntity>),
12913 StoredProcedure(std::boxed::Box<crate::model::StoredProcedureEntity>),
12915 DatabaseFunction(std::boxed::Box<crate::model::FunctionEntity>),
12917 Synonym(std::boxed::Box<crate::model::SynonymEntity>),
12919 DatabasePackage(std::boxed::Box<crate::model::PackageEntity>),
12921 Udt(std::boxed::Box<crate::model::UDTEntity>),
12923 MaterializedView(std::boxed::Box<crate::model::MaterializedViewEntity>),
12925 }
12926}
12927
12928#[derive(Clone, Default, PartialEq)]
12930#[non_exhaustive]
12931pub struct DatabaseInstanceEntity {
12932 pub custom_features: std::option::Option<wkt::Struct>,
12934
12935 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12936}
12937
12938impl DatabaseInstanceEntity {
12939 pub fn new() -> Self {
12940 std::default::Default::default()
12941 }
12942
12943 pub fn set_custom_features<T>(mut self, v: T) -> Self
12945 where
12946 T: std::convert::Into<wkt::Struct>,
12947 {
12948 self.custom_features = std::option::Option::Some(v.into());
12949 self
12950 }
12951
12952 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
12954 where
12955 T: std::convert::Into<wkt::Struct>,
12956 {
12957 self.custom_features = v.map(|x| x.into());
12958 self
12959 }
12960}
12961
12962impl wkt::message::Message for DatabaseInstanceEntity {
12963 fn typename() -> &'static str {
12964 "type.googleapis.com/google.cloud.clouddms.v1.DatabaseInstanceEntity"
12965 }
12966}
12967
12968#[derive(Clone, Default, PartialEq)]
12974#[non_exhaustive]
12975pub struct SchemaEntity {
12976 pub custom_features: std::option::Option<wkt::Struct>,
12978
12979 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12980}
12981
12982impl SchemaEntity {
12983 pub fn new() -> Self {
12984 std::default::Default::default()
12985 }
12986
12987 pub fn set_custom_features<T>(mut self, v: T) -> Self
12989 where
12990 T: std::convert::Into<wkt::Struct>,
12991 {
12992 self.custom_features = std::option::Option::Some(v.into());
12993 self
12994 }
12995
12996 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
12998 where
12999 T: std::convert::Into<wkt::Struct>,
13000 {
13001 self.custom_features = v.map(|x| x.into());
13002 self
13003 }
13004}
13005
13006impl wkt::message::Message for SchemaEntity {
13007 fn typename() -> &'static str {
13008 "type.googleapis.com/google.cloud.clouddms.v1.SchemaEntity"
13009 }
13010}
13011
13012#[derive(Clone, Default, PartialEq)]
13014#[non_exhaustive]
13015pub struct TableEntity {
13016 pub columns: std::vec::Vec<crate::model::ColumnEntity>,
13018
13019 pub constraints: std::vec::Vec<crate::model::ConstraintEntity>,
13021
13022 pub indices: std::vec::Vec<crate::model::IndexEntity>,
13024
13025 pub triggers: std::vec::Vec<crate::model::TriggerEntity>,
13027
13028 pub custom_features: std::option::Option<wkt::Struct>,
13030
13031 pub comment: std::string::String,
13033
13034 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13035}
13036
13037impl TableEntity {
13038 pub fn new() -> Self {
13039 std::default::Default::default()
13040 }
13041
13042 pub fn set_columns<T, V>(mut self, v: T) -> Self
13044 where
13045 T: std::iter::IntoIterator<Item = V>,
13046 V: std::convert::Into<crate::model::ColumnEntity>,
13047 {
13048 use std::iter::Iterator;
13049 self.columns = v.into_iter().map(|i| i.into()).collect();
13050 self
13051 }
13052
13053 pub fn set_constraints<T, V>(mut self, v: T) -> Self
13055 where
13056 T: std::iter::IntoIterator<Item = V>,
13057 V: std::convert::Into<crate::model::ConstraintEntity>,
13058 {
13059 use std::iter::Iterator;
13060 self.constraints = v.into_iter().map(|i| i.into()).collect();
13061 self
13062 }
13063
13064 pub fn set_indices<T, V>(mut self, v: T) -> Self
13066 where
13067 T: std::iter::IntoIterator<Item = V>,
13068 V: std::convert::Into<crate::model::IndexEntity>,
13069 {
13070 use std::iter::Iterator;
13071 self.indices = v.into_iter().map(|i| i.into()).collect();
13072 self
13073 }
13074
13075 pub fn set_triggers<T, V>(mut self, v: T) -> Self
13077 where
13078 T: std::iter::IntoIterator<Item = V>,
13079 V: std::convert::Into<crate::model::TriggerEntity>,
13080 {
13081 use std::iter::Iterator;
13082 self.triggers = v.into_iter().map(|i| i.into()).collect();
13083 self
13084 }
13085
13086 pub fn set_custom_features<T>(mut self, v: T) -> Self
13088 where
13089 T: std::convert::Into<wkt::Struct>,
13090 {
13091 self.custom_features = std::option::Option::Some(v.into());
13092 self
13093 }
13094
13095 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13097 where
13098 T: std::convert::Into<wkt::Struct>,
13099 {
13100 self.custom_features = v.map(|x| x.into());
13101 self
13102 }
13103
13104 pub fn set_comment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13106 self.comment = v.into();
13107 self
13108 }
13109}
13110
13111impl wkt::message::Message for TableEntity {
13112 fn typename() -> &'static str {
13113 "type.googleapis.com/google.cloud.clouddms.v1.TableEntity"
13114 }
13115}
13116
13117#[derive(Clone, Default, PartialEq)]
13120#[non_exhaustive]
13121pub struct ColumnEntity {
13122 pub name: std::string::String,
13124
13125 pub data_type: std::string::String,
13127
13128 pub charset: std::string::String,
13130
13131 pub collation: std::string::String,
13133
13134 pub length: i64,
13136
13137 pub precision: i32,
13139
13140 pub scale: i32,
13142
13143 pub fractional_seconds_precision: i32,
13145
13146 pub array: bool,
13148
13149 pub array_length: i32,
13151
13152 pub nullable: bool,
13154
13155 pub auto_generated: bool,
13157
13158 pub udt: bool,
13160
13161 pub custom_features: std::option::Option<wkt::Struct>,
13163
13164 pub set_values: std::vec::Vec<std::string::String>,
13167
13168 pub comment: std::string::String,
13170
13171 pub ordinal_position: i32,
13173
13174 pub default_value: std::string::String,
13176
13177 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13178}
13179
13180impl ColumnEntity {
13181 pub fn new() -> Self {
13182 std::default::Default::default()
13183 }
13184
13185 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13187 self.name = v.into();
13188 self
13189 }
13190
13191 pub fn set_data_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13193 self.data_type = v.into();
13194 self
13195 }
13196
13197 pub fn set_charset<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13199 self.charset = v.into();
13200 self
13201 }
13202
13203 pub fn set_collation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13205 self.collation = v.into();
13206 self
13207 }
13208
13209 pub fn set_length<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13211 self.length = v.into();
13212 self
13213 }
13214
13215 pub fn set_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13217 self.precision = v.into();
13218 self
13219 }
13220
13221 pub fn set_scale<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13223 self.scale = v.into();
13224 self
13225 }
13226
13227 pub fn set_fractional_seconds_precision<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13229 self.fractional_seconds_precision = v.into();
13230 self
13231 }
13232
13233 pub fn set_array<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13235 self.array = v.into();
13236 self
13237 }
13238
13239 pub fn set_array_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13241 self.array_length = v.into();
13242 self
13243 }
13244
13245 pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13247 self.nullable = v.into();
13248 self
13249 }
13250
13251 pub fn set_auto_generated<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13253 self.auto_generated = v.into();
13254 self
13255 }
13256
13257 pub fn set_udt<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13259 self.udt = v.into();
13260 self
13261 }
13262
13263 pub fn set_custom_features<T>(mut self, v: T) -> Self
13265 where
13266 T: std::convert::Into<wkt::Struct>,
13267 {
13268 self.custom_features = std::option::Option::Some(v.into());
13269 self
13270 }
13271
13272 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13274 where
13275 T: std::convert::Into<wkt::Struct>,
13276 {
13277 self.custom_features = v.map(|x| x.into());
13278 self
13279 }
13280
13281 pub fn set_set_values<T, V>(mut self, v: T) -> Self
13283 where
13284 T: std::iter::IntoIterator<Item = V>,
13285 V: std::convert::Into<std::string::String>,
13286 {
13287 use std::iter::Iterator;
13288 self.set_values = v.into_iter().map(|i| i.into()).collect();
13289 self
13290 }
13291
13292 pub fn set_comment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13294 self.comment = v.into();
13295 self
13296 }
13297
13298 pub fn set_ordinal_position<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13300 self.ordinal_position = v.into();
13301 self
13302 }
13303
13304 pub fn set_default_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13306 self.default_value = v.into();
13307 self
13308 }
13309}
13310
13311impl wkt::message::Message for ColumnEntity {
13312 fn typename() -> &'static str {
13313 "type.googleapis.com/google.cloud.clouddms.v1.ColumnEntity"
13314 }
13315}
13316
13317#[derive(Clone, Default, PartialEq)]
13320#[non_exhaustive]
13321pub struct ConstraintEntity {
13322 pub name: std::string::String,
13324
13325 pub r#type: std::string::String,
13328
13329 pub table_columns: std::vec::Vec<std::string::String>,
13332
13333 pub custom_features: std::option::Option<wkt::Struct>,
13335
13336 pub reference_columns: std::vec::Vec<std::string::String>,
13340
13341 pub reference_table: std::string::String,
13345
13346 pub table_name: std::string::String,
13351
13352 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13353}
13354
13355impl ConstraintEntity {
13356 pub fn new() -> Self {
13357 std::default::Default::default()
13358 }
13359
13360 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13362 self.name = v.into();
13363 self
13364 }
13365
13366 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13368 self.r#type = v.into();
13369 self
13370 }
13371
13372 pub fn set_table_columns<T, V>(mut self, v: T) -> Self
13374 where
13375 T: std::iter::IntoIterator<Item = V>,
13376 V: std::convert::Into<std::string::String>,
13377 {
13378 use std::iter::Iterator;
13379 self.table_columns = v.into_iter().map(|i| i.into()).collect();
13380 self
13381 }
13382
13383 pub fn set_custom_features<T>(mut self, v: T) -> Self
13385 where
13386 T: std::convert::Into<wkt::Struct>,
13387 {
13388 self.custom_features = std::option::Option::Some(v.into());
13389 self
13390 }
13391
13392 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13394 where
13395 T: std::convert::Into<wkt::Struct>,
13396 {
13397 self.custom_features = v.map(|x| x.into());
13398 self
13399 }
13400
13401 pub fn set_reference_columns<T, V>(mut self, v: T) -> Self
13403 where
13404 T: std::iter::IntoIterator<Item = V>,
13405 V: std::convert::Into<std::string::String>,
13406 {
13407 use std::iter::Iterator;
13408 self.reference_columns = v.into_iter().map(|i| i.into()).collect();
13409 self
13410 }
13411
13412 pub fn set_reference_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13414 self.reference_table = v.into();
13415 self
13416 }
13417
13418 pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13420 self.table_name = v.into();
13421 self
13422 }
13423}
13424
13425impl wkt::message::Message for ConstraintEntity {
13426 fn typename() -> &'static str {
13427 "type.googleapis.com/google.cloud.clouddms.v1.ConstraintEntity"
13428 }
13429}
13430
13431#[derive(Clone, Default, PartialEq)]
13434#[non_exhaustive]
13435pub struct IndexEntity {
13436 pub name: std::string::String,
13438
13439 pub r#type: std::string::String,
13441
13442 pub table_columns: std::vec::Vec<std::string::String>,
13445
13446 pub unique: bool,
13448
13449 pub custom_features: std::option::Option<wkt::Struct>,
13451
13452 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13453}
13454
13455impl IndexEntity {
13456 pub fn new() -> Self {
13457 std::default::Default::default()
13458 }
13459
13460 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13462 self.name = v.into();
13463 self
13464 }
13465
13466 pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13468 self.r#type = v.into();
13469 self
13470 }
13471
13472 pub fn set_table_columns<T, V>(mut self, v: T) -> Self
13474 where
13475 T: std::iter::IntoIterator<Item = V>,
13476 V: std::convert::Into<std::string::String>,
13477 {
13478 use std::iter::Iterator;
13479 self.table_columns = v.into_iter().map(|i| i.into()).collect();
13480 self
13481 }
13482
13483 pub fn set_unique<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13485 self.unique = v.into();
13486 self
13487 }
13488
13489 pub fn set_custom_features<T>(mut self, v: T) -> Self
13491 where
13492 T: std::convert::Into<wkt::Struct>,
13493 {
13494 self.custom_features = std::option::Option::Some(v.into());
13495 self
13496 }
13497
13498 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13500 where
13501 T: std::convert::Into<wkt::Struct>,
13502 {
13503 self.custom_features = v.map(|x| x.into());
13504 self
13505 }
13506}
13507
13508impl wkt::message::Message for IndexEntity {
13509 fn typename() -> &'static str {
13510 "type.googleapis.com/google.cloud.clouddms.v1.IndexEntity"
13511 }
13512}
13513
13514#[derive(Clone, Default, PartialEq)]
13517#[non_exhaustive]
13518pub struct TriggerEntity {
13519 pub name: std::string::String,
13521
13522 pub triggering_events: std::vec::Vec<std::string::String>,
13525
13526 pub trigger_type: std::string::String,
13529
13530 pub sql_code: std::string::String,
13532
13533 pub custom_features: std::option::Option<wkt::Struct>,
13535
13536 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13537}
13538
13539impl TriggerEntity {
13540 pub fn new() -> Self {
13541 std::default::Default::default()
13542 }
13543
13544 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13546 self.name = v.into();
13547 self
13548 }
13549
13550 pub fn set_triggering_events<T, V>(mut self, v: T) -> Self
13552 where
13553 T: std::iter::IntoIterator<Item = V>,
13554 V: std::convert::Into<std::string::String>,
13555 {
13556 use std::iter::Iterator;
13557 self.triggering_events = v.into_iter().map(|i| i.into()).collect();
13558 self
13559 }
13560
13561 pub fn set_trigger_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13563 self.trigger_type = v.into();
13564 self
13565 }
13566
13567 pub fn set_sql_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13569 self.sql_code = v.into();
13570 self
13571 }
13572
13573 pub fn set_custom_features<T>(mut self, v: T) -> Self
13575 where
13576 T: std::convert::Into<wkt::Struct>,
13577 {
13578 self.custom_features = std::option::Option::Some(v.into());
13579 self
13580 }
13581
13582 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13584 where
13585 T: std::convert::Into<wkt::Struct>,
13586 {
13587 self.custom_features = v.map(|x| x.into());
13588 self
13589 }
13590}
13591
13592impl wkt::message::Message for TriggerEntity {
13593 fn typename() -> &'static str {
13594 "type.googleapis.com/google.cloud.clouddms.v1.TriggerEntity"
13595 }
13596}
13597
13598#[derive(Clone, Default, PartialEq)]
13600#[non_exhaustive]
13601pub struct ViewEntity {
13602 pub sql_code: std::string::String,
13604
13605 pub custom_features: std::option::Option<wkt::Struct>,
13607
13608 pub constraints: std::vec::Vec<crate::model::ConstraintEntity>,
13610
13611 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13612}
13613
13614impl ViewEntity {
13615 pub fn new() -> Self {
13616 std::default::Default::default()
13617 }
13618
13619 pub fn set_sql_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13621 self.sql_code = v.into();
13622 self
13623 }
13624
13625 pub fn set_custom_features<T>(mut self, v: T) -> Self
13627 where
13628 T: std::convert::Into<wkt::Struct>,
13629 {
13630 self.custom_features = std::option::Option::Some(v.into());
13631 self
13632 }
13633
13634 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13636 where
13637 T: std::convert::Into<wkt::Struct>,
13638 {
13639 self.custom_features = v.map(|x| x.into());
13640 self
13641 }
13642
13643 pub fn set_constraints<T, V>(mut self, v: T) -> Self
13645 where
13646 T: std::iter::IntoIterator<Item = V>,
13647 V: std::convert::Into<crate::model::ConstraintEntity>,
13648 {
13649 use std::iter::Iterator;
13650 self.constraints = v.into_iter().map(|i| i.into()).collect();
13651 self
13652 }
13653}
13654
13655impl wkt::message::Message for ViewEntity {
13656 fn typename() -> &'static str {
13657 "type.googleapis.com/google.cloud.clouddms.v1.ViewEntity"
13658 }
13659}
13660
13661#[derive(Clone, Default, PartialEq)]
13663#[non_exhaustive]
13664pub struct SequenceEntity {
13665 pub increment: i64,
13667
13668 pub start_value: ::bytes::Bytes,
13671
13672 pub max_value: ::bytes::Bytes,
13675
13676 pub min_value: ::bytes::Bytes,
13679
13680 pub cycle: bool,
13682
13683 pub cache: i64,
13685
13686 pub custom_features: std::option::Option<wkt::Struct>,
13688
13689 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13690}
13691
13692impl SequenceEntity {
13693 pub fn new() -> Self {
13694 std::default::Default::default()
13695 }
13696
13697 pub fn set_increment<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13699 self.increment = v.into();
13700 self
13701 }
13702
13703 pub fn set_start_value<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
13705 self.start_value = v.into();
13706 self
13707 }
13708
13709 pub fn set_max_value<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
13711 self.max_value = v.into();
13712 self
13713 }
13714
13715 pub fn set_min_value<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
13717 self.min_value = v.into();
13718 self
13719 }
13720
13721 pub fn set_cycle<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13723 self.cycle = v.into();
13724 self
13725 }
13726
13727 pub fn set_cache<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
13729 self.cache = v.into();
13730 self
13731 }
13732
13733 pub fn set_custom_features<T>(mut self, v: T) -> Self
13735 where
13736 T: std::convert::Into<wkt::Struct>,
13737 {
13738 self.custom_features = std::option::Option::Some(v.into());
13739 self
13740 }
13741
13742 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13744 where
13745 T: std::convert::Into<wkt::Struct>,
13746 {
13747 self.custom_features = v.map(|x| x.into());
13748 self
13749 }
13750}
13751
13752impl wkt::message::Message for SequenceEntity {
13753 fn typename() -> &'static str {
13754 "type.googleapis.com/google.cloud.clouddms.v1.SequenceEntity"
13755 }
13756}
13757
13758#[derive(Clone, Default, PartialEq)]
13760#[non_exhaustive]
13761pub struct StoredProcedureEntity {
13762 pub sql_code: std::string::String,
13764
13765 pub custom_features: std::option::Option<wkt::Struct>,
13767
13768 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13769}
13770
13771impl StoredProcedureEntity {
13772 pub fn new() -> Self {
13773 std::default::Default::default()
13774 }
13775
13776 pub fn set_sql_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13778 self.sql_code = v.into();
13779 self
13780 }
13781
13782 pub fn set_custom_features<T>(mut self, v: T) -> Self
13784 where
13785 T: std::convert::Into<wkt::Struct>,
13786 {
13787 self.custom_features = std::option::Option::Some(v.into());
13788 self
13789 }
13790
13791 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13793 where
13794 T: std::convert::Into<wkt::Struct>,
13795 {
13796 self.custom_features = v.map(|x| x.into());
13797 self
13798 }
13799}
13800
13801impl wkt::message::Message for StoredProcedureEntity {
13802 fn typename() -> &'static str {
13803 "type.googleapis.com/google.cloud.clouddms.v1.StoredProcedureEntity"
13804 }
13805}
13806
13807#[derive(Clone, Default, PartialEq)]
13809#[non_exhaustive]
13810pub struct FunctionEntity {
13811 pub sql_code: std::string::String,
13813
13814 pub custom_features: std::option::Option<wkt::Struct>,
13816
13817 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13818}
13819
13820impl FunctionEntity {
13821 pub fn new() -> Self {
13822 std::default::Default::default()
13823 }
13824
13825 pub fn set_sql_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13827 self.sql_code = v.into();
13828 self
13829 }
13830
13831 pub fn set_custom_features<T>(mut self, v: T) -> Self
13833 where
13834 T: std::convert::Into<wkt::Struct>,
13835 {
13836 self.custom_features = std::option::Option::Some(v.into());
13837 self
13838 }
13839
13840 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13842 where
13843 T: std::convert::Into<wkt::Struct>,
13844 {
13845 self.custom_features = v.map(|x| x.into());
13846 self
13847 }
13848}
13849
13850impl wkt::message::Message for FunctionEntity {
13851 fn typename() -> &'static str {
13852 "type.googleapis.com/google.cloud.clouddms.v1.FunctionEntity"
13853 }
13854}
13855
13856#[derive(Clone, Default, PartialEq)]
13858#[non_exhaustive]
13859pub struct MaterializedViewEntity {
13860 pub sql_code: std::string::String,
13862
13863 pub custom_features: std::option::Option<wkt::Struct>,
13865
13866 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13867}
13868
13869impl MaterializedViewEntity {
13870 pub fn new() -> Self {
13871 std::default::Default::default()
13872 }
13873
13874 pub fn set_sql_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13876 self.sql_code = v.into();
13877 self
13878 }
13879
13880 pub fn set_custom_features<T>(mut self, v: T) -> Self
13882 where
13883 T: std::convert::Into<wkt::Struct>,
13884 {
13885 self.custom_features = std::option::Option::Some(v.into());
13886 self
13887 }
13888
13889 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13891 where
13892 T: std::convert::Into<wkt::Struct>,
13893 {
13894 self.custom_features = v.map(|x| x.into());
13895 self
13896 }
13897}
13898
13899impl wkt::message::Message for MaterializedViewEntity {
13900 fn typename() -> &'static str {
13901 "type.googleapis.com/google.cloud.clouddms.v1.MaterializedViewEntity"
13902 }
13903}
13904
13905#[derive(Clone, Default, PartialEq)]
13907#[non_exhaustive]
13908pub struct SynonymEntity {
13909 pub source_entity: std::string::String,
13911
13912 pub source_type: crate::model::DatabaseEntityType,
13915
13916 pub custom_features: std::option::Option<wkt::Struct>,
13918
13919 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13920}
13921
13922impl SynonymEntity {
13923 pub fn new() -> Self {
13924 std::default::Default::default()
13925 }
13926
13927 pub fn set_source_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13929 self.source_entity = v.into();
13930 self
13931 }
13932
13933 pub fn set_source_type<T: std::convert::Into<crate::model::DatabaseEntityType>>(
13935 mut self,
13936 v: T,
13937 ) -> Self {
13938 self.source_type = v.into();
13939 self
13940 }
13941
13942 pub fn set_custom_features<T>(mut self, v: T) -> Self
13944 where
13945 T: std::convert::Into<wkt::Struct>,
13946 {
13947 self.custom_features = std::option::Option::Some(v.into());
13948 self
13949 }
13950
13951 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
13953 where
13954 T: std::convert::Into<wkt::Struct>,
13955 {
13956 self.custom_features = v.map(|x| x.into());
13957 self
13958 }
13959}
13960
13961impl wkt::message::Message for SynonymEntity {
13962 fn typename() -> &'static str {
13963 "type.googleapis.com/google.cloud.clouddms.v1.SynonymEntity"
13964 }
13965}
13966
13967#[derive(Clone, Default, PartialEq)]
13969#[non_exhaustive]
13970pub struct PackageEntity {
13971 pub package_sql_code: std::string::String,
13973
13974 pub package_body: std::string::String,
13977
13978 pub custom_features: std::option::Option<wkt::Struct>,
13980
13981 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13982}
13983
13984impl PackageEntity {
13985 pub fn new() -> Self {
13986 std::default::Default::default()
13987 }
13988
13989 pub fn set_package_sql_code<T: std::convert::Into<std::string::String>>(
13991 mut self,
13992 v: T,
13993 ) -> Self {
13994 self.package_sql_code = v.into();
13995 self
13996 }
13997
13998 pub fn set_package_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14000 self.package_body = v.into();
14001 self
14002 }
14003
14004 pub fn set_custom_features<T>(mut self, v: T) -> Self
14006 where
14007 T: std::convert::Into<wkt::Struct>,
14008 {
14009 self.custom_features = std::option::Option::Some(v.into());
14010 self
14011 }
14012
14013 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
14015 where
14016 T: std::convert::Into<wkt::Struct>,
14017 {
14018 self.custom_features = v.map(|x| x.into());
14019 self
14020 }
14021}
14022
14023impl wkt::message::Message for PackageEntity {
14024 fn typename() -> &'static str {
14025 "type.googleapis.com/google.cloud.clouddms.v1.PackageEntity"
14026 }
14027}
14028
14029#[derive(Clone, Default, PartialEq)]
14031#[non_exhaustive]
14032pub struct UDTEntity {
14033 pub udt_sql_code: std::string::String,
14035
14036 pub udt_body: std::string::String,
14038
14039 pub custom_features: std::option::Option<wkt::Struct>,
14041
14042 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14043}
14044
14045impl UDTEntity {
14046 pub fn new() -> Self {
14047 std::default::Default::default()
14048 }
14049
14050 pub fn set_udt_sql_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14052 self.udt_sql_code = v.into();
14053 self
14054 }
14055
14056 pub fn set_udt_body<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14058 self.udt_body = v.into();
14059 self
14060 }
14061
14062 pub fn set_custom_features<T>(mut self, v: T) -> Self
14064 where
14065 T: std::convert::Into<wkt::Struct>,
14066 {
14067 self.custom_features = std::option::Option::Some(v.into());
14068 self
14069 }
14070
14071 pub fn set_or_clear_custom_features<T>(mut self, v: std::option::Option<T>) -> Self
14073 where
14074 T: std::convert::Into<wkt::Struct>,
14075 {
14076 self.custom_features = v.map(|x| x.into());
14077 self
14078 }
14079}
14080
14081impl wkt::message::Message for UDTEntity {
14082 fn typename() -> &'static str {
14083 "type.googleapis.com/google.cloud.clouddms.v1.UDTEntity"
14084 }
14085}
14086
14087#[derive(Clone, Default, PartialEq)]
14089#[non_exhaustive]
14090pub struct EntityMapping {
14091 pub source_entity: std::string::String,
14095
14096 pub draft_entity: std::string::String,
14100
14101 pub source_type: crate::model::DatabaseEntityType,
14103
14104 pub draft_type: crate::model::DatabaseEntityType,
14106
14107 pub mapping_log: std::vec::Vec<crate::model::EntityMappingLogEntry>,
14113
14114 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14115}
14116
14117impl EntityMapping {
14118 pub fn new() -> Self {
14119 std::default::Default::default()
14120 }
14121
14122 pub fn set_source_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14124 self.source_entity = v.into();
14125 self
14126 }
14127
14128 pub fn set_draft_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14130 self.draft_entity = v.into();
14131 self
14132 }
14133
14134 pub fn set_source_type<T: std::convert::Into<crate::model::DatabaseEntityType>>(
14136 mut self,
14137 v: T,
14138 ) -> Self {
14139 self.source_type = v.into();
14140 self
14141 }
14142
14143 pub fn set_draft_type<T: std::convert::Into<crate::model::DatabaseEntityType>>(
14145 mut self,
14146 v: T,
14147 ) -> Self {
14148 self.draft_type = v.into();
14149 self
14150 }
14151
14152 pub fn set_mapping_log<T, V>(mut self, v: T) -> Self
14154 where
14155 T: std::iter::IntoIterator<Item = V>,
14156 V: std::convert::Into<crate::model::EntityMappingLogEntry>,
14157 {
14158 use std::iter::Iterator;
14159 self.mapping_log = v.into_iter().map(|i| i.into()).collect();
14160 self
14161 }
14162}
14163
14164impl wkt::message::Message for EntityMapping {
14165 fn typename() -> &'static str {
14166 "type.googleapis.com/google.cloud.clouddms.v1.EntityMapping"
14167 }
14168}
14169
14170#[derive(Clone, Default, PartialEq)]
14172#[non_exhaustive]
14173pub struct EntityMappingLogEntry {
14174 pub rule_id: std::string::String,
14176
14177 pub rule_revision_id: std::string::String,
14179
14180 pub mapping_comment: std::string::String,
14182
14183 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14184}
14185
14186impl EntityMappingLogEntry {
14187 pub fn new() -> Self {
14188 std::default::Default::default()
14189 }
14190
14191 pub fn set_rule_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14193 self.rule_id = v.into();
14194 self
14195 }
14196
14197 pub fn set_rule_revision_id<T: std::convert::Into<std::string::String>>(
14199 mut self,
14200 v: T,
14201 ) -> Self {
14202 self.rule_revision_id = v.into();
14203 self
14204 }
14205
14206 pub fn set_mapping_comment<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14208 self.mapping_comment = v.into();
14209 self
14210 }
14211}
14212
14213impl wkt::message::Message for EntityMappingLogEntry {
14214 fn typename() -> &'static str {
14215 "type.googleapis.com/google.cloud.clouddms.v1.EntityMappingLogEntry"
14216 }
14217}
14218
14219#[derive(Clone, Default, PartialEq)]
14221#[non_exhaustive]
14222pub struct EntityDdl {
14223 pub ddl_type: std::string::String,
14225
14226 pub entity: std::string::String,
14228
14229 pub ddl: std::string::String,
14231
14232 pub entity_type: crate::model::DatabaseEntityType,
14234
14235 pub issue_id: std::vec::Vec<std::string::String>,
14237
14238 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14239}
14240
14241impl EntityDdl {
14242 pub fn new() -> Self {
14243 std::default::Default::default()
14244 }
14245
14246 pub fn set_ddl_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14248 self.ddl_type = v.into();
14249 self
14250 }
14251
14252 pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14254 self.entity = v.into();
14255 self
14256 }
14257
14258 pub fn set_ddl<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14260 self.ddl = v.into();
14261 self
14262 }
14263
14264 pub fn set_entity_type<T: std::convert::Into<crate::model::DatabaseEntityType>>(
14266 mut self,
14267 v: T,
14268 ) -> Self {
14269 self.entity_type = v.into();
14270 self
14271 }
14272
14273 pub fn set_issue_id<T, V>(mut self, v: T) -> Self
14275 where
14276 T: std::iter::IntoIterator<Item = V>,
14277 V: std::convert::Into<std::string::String>,
14278 {
14279 use std::iter::Iterator;
14280 self.issue_id = v.into_iter().map(|i| i.into()).collect();
14281 self
14282 }
14283}
14284
14285impl wkt::message::Message for EntityDdl {
14286 fn typename() -> &'static str {
14287 "type.googleapis.com/google.cloud.clouddms.v1.EntityDdl"
14288 }
14289}
14290
14291#[derive(Clone, Default, PartialEq)]
14293#[non_exhaustive]
14294pub struct EntityIssue {
14295 pub id: std::string::String,
14297
14298 pub r#type: crate::model::entity_issue::IssueType,
14300
14301 pub severity: crate::model::entity_issue::IssueSeverity,
14303
14304 pub message: std::string::String,
14306
14307 pub code: std::string::String,
14309
14310 pub ddl: std::option::Option<std::string::String>,
14312
14313 pub position: std::option::Option<crate::model::entity_issue::Position>,
14315
14316 pub entity_type: crate::model::DatabaseEntityType,
14318
14319 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14320}
14321
14322impl EntityIssue {
14323 pub fn new() -> Self {
14324 std::default::Default::default()
14325 }
14326
14327 pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14329 self.id = v.into();
14330 self
14331 }
14332
14333 pub fn set_type<T: std::convert::Into<crate::model::entity_issue::IssueType>>(
14335 mut self,
14336 v: T,
14337 ) -> Self {
14338 self.r#type = v.into();
14339 self
14340 }
14341
14342 pub fn set_severity<T: std::convert::Into<crate::model::entity_issue::IssueSeverity>>(
14344 mut self,
14345 v: T,
14346 ) -> Self {
14347 self.severity = v.into();
14348 self
14349 }
14350
14351 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14353 self.message = v.into();
14354 self
14355 }
14356
14357 pub fn set_code<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14359 self.code = v.into();
14360 self
14361 }
14362
14363 pub fn set_ddl<T>(mut self, v: T) -> Self
14365 where
14366 T: std::convert::Into<std::string::String>,
14367 {
14368 self.ddl = std::option::Option::Some(v.into());
14369 self
14370 }
14371
14372 pub fn set_or_clear_ddl<T>(mut self, v: std::option::Option<T>) -> Self
14374 where
14375 T: std::convert::Into<std::string::String>,
14376 {
14377 self.ddl = v.map(|x| x.into());
14378 self
14379 }
14380
14381 pub fn set_position<T>(mut self, v: T) -> Self
14383 where
14384 T: std::convert::Into<crate::model::entity_issue::Position>,
14385 {
14386 self.position = std::option::Option::Some(v.into());
14387 self
14388 }
14389
14390 pub fn set_or_clear_position<T>(mut self, v: std::option::Option<T>) -> Self
14392 where
14393 T: std::convert::Into<crate::model::entity_issue::Position>,
14394 {
14395 self.position = v.map(|x| x.into());
14396 self
14397 }
14398
14399 pub fn set_entity_type<T: std::convert::Into<crate::model::DatabaseEntityType>>(
14401 mut self,
14402 v: T,
14403 ) -> Self {
14404 self.entity_type = v.into();
14405 self
14406 }
14407}
14408
14409impl wkt::message::Message for EntityIssue {
14410 fn typename() -> &'static str {
14411 "type.googleapis.com/google.cloud.clouddms.v1.EntityIssue"
14412 }
14413}
14414
14415pub mod entity_issue {
14417 #[allow(unused_imports)]
14418 use super::*;
14419
14420 #[derive(Clone, Default, PartialEq)]
14422 #[non_exhaustive]
14423 pub struct Position {
14424 pub line: i32,
14426
14427 pub column: i32,
14429
14430 pub offset: i32,
14432
14433 pub length: i32,
14435
14436 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14437 }
14438
14439 impl Position {
14440 pub fn new() -> Self {
14441 std::default::Default::default()
14442 }
14443
14444 pub fn set_line<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14446 self.line = v.into();
14447 self
14448 }
14449
14450 pub fn set_column<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14452 self.column = v.into();
14453 self
14454 }
14455
14456 pub fn set_offset<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14458 self.offset = v.into();
14459 self
14460 }
14461
14462 pub fn set_length<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14464 self.length = v.into();
14465 self
14466 }
14467 }
14468
14469 impl wkt::message::Message for Position {
14470 fn typename() -> &'static str {
14471 "type.googleapis.com/google.cloud.clouddms.v1.EntityIssue.Position"
14472 }
14473 }
14474
14475 #[derive(Clone, Debug, PartialEq)]
14491 #[non_exhaustive]
14492 pub enum IssueType {
14493 Unspecified,
14495 Ddl,
14497 Apply,
14499 Convert,
14501 UnknownValue(issue_type::UnknownValue),
14506 }
14507
14508 #[doc(hidden)]
14509 pub mod issue_type {
14510 #[allow(unused_imports)]
14511 use super::*;
14512 #[derive(Clone, Debug, PartialEq)]
14513 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14514 }
14515
14516 impl IssueType {
14517 pub fn value(&self) -> std::option::Option<i32> {
14522 match self {
14523 Self::Unspecified => std::option::Option::Some(0),
14524 Self::Ddl => std::option::Option::Some(1),
14525 Self::Apply => std::option::Option::Some(2),
14526 Self::Convert => std::option::Option::Some(3),
14527 Self::UnknownValue(u) => u.0.value(),
14528 }
14529 }
14530
14531 pub fn name(&self) -> std::option::Option<&str> {
14536 match self {
14537 Self::Unspecified => std::option::Option::Some("ISSUE_TYPE_UNSPECIFIED"),
14538 Self::Ddl => std::option::Option::Some("ISSUE_TYPE_DDL"),
14539 Self::Apply => std::option::Option::Some("ISSUE_TYPE_APPLY"),
14540 Self::Convert => std::option::Option::Some("ISSUE_TYPE_CONVERT"),
14541 Self::UnknownValue(u) => u.0.name(),
14542 }
14543 }
14544 }
14545
14546 impl std::default::Default for IssueType {
14547 fn default() -> Self {
14548 use std::convert::From;
14549 Self::from(0)
14550 }
14551 }
14552
14553 impl std::fmt::Display for IssueType {
14554 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14555 wkt::internal::display_enum(f, self.name(), self.value())
14556 }
14557 }
14558
14559 impl std::convert::From<i32> for IssueType {
14560 fn from(value: i32) -> Self {
14561 match value {
14562 0 => Self::Unspecified,
14563 1 => Self::Ddl,
14564 2 => Self::Apply,
14565 3 => Self::Convert,
14566 _ => Self::UnknownValue(issue_type::UnknownValue(
14567 wkt::internal::UnknownEnumValue::Integer(value),
14568 )),
14569 }
14570 }
14571 }
14572
14573 impl std::convert::From<&str> for IssueType {
14574 fn from(value: &str) -> Self {
14575 use std::string::ToString;
14576 match value {
14577 "ISSUE_TYPE_UNSPECIFIED" => Self::Unspecified,
14578 "ISSUE_TYPE_DDL" => Self::Ddl,
14579 "ISSUE_TYPE_APPLY" => Self::Apply,
14580 "ISSUE_TYPE_CONVERT" => Self::Convert,
14581 _ => Self::UnknownValue(issue_type::UnknownValue(
14582 wkt::internal::UnknownEnumValue::String(value.to_string()),
14583 )),
14584 }
14585 }
14586 }
14587
14588 impl serde::ser::Serialize for IssueType {
14589 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14590 where
14591 S: serde::Serializer,
14592 {
14593 match self {
14594 Self::Unspecified => serializer.serialize_i32(0),
14595 Self::Ddl => serializer.serialize_i32(1),
14596 Self::Apply => serializer.serialize_i32(2),
14597 Self::Convert => serializer.serialize_i32(3),
14598 Self::UnknownValue(u) => u.0.serialize(serializer),
14599 }
14600 }
14601 }
14602
14603 impl<'de> serde::de::Deserialize<'de> for IssueType {
14604 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14605 where
14606 D: serde::Deserializer<'de>,
14607 {
14608 deserializer.deserialize_any(wkt::internal::EnumVisitor::<IssueType>::new(
14609 ".google.cloud.clouddms.v1.EntityIssue.IssueType",
14610 ))
14611 }
14612 }
14613
14614 #[derive(Clone, Debug, PartialEq)]
14630 #[non_exhaustive]
14631 pub enum IssueSeverity {
14632 Unspecified,
14634 Info,
14636 Warning,
14638 Error,
14640 UnknownValue(issue_severity::UnknownValue),
14645 }
14646
14647 #[doc(hidden)]
14648 pub mod issue_severity {
14649 #[allow(unused_imports)]
14650 use super::*;
14651 #[derive(Clone, Debug, PartialEq)]
14652 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14653 }
14654
14655 impl IssueSeverity {
14656 pub fn value(&self) -> std::option::Option<i32> {
14661 match self {
14662 Self::Unspecified => std::option::Option::Some(0),
14663 Self::Info => std::option::Option::Some(1),
14664 Self::Warning => std::option::Option::Some(2),
14665 Self::Error => std::option::Option::Some(3),
14666 Self::UnknownValue(u) => u.0.value(),
14667 }
14668 }
14669
14670 pub fn name(&self) -> std::option::Option<&str> {
14675 match self {
14676 Self::Unspecified => std::option::Option::Some("ISSUE_SEVERITY_UNSPECIFIED"),
14677 Self::Info => std::option::Option::Some("ISSUE_SEVERITY_INFO"),
14678 Self::Warning => std::option::Option::Some("ISSUE_SEVERITY_WARNING"),
14679 Self::Error => std::option::Option::Some("ISSUE_SEVERITY_ERROR"),
14680 Self::UnknownValue(u) => u.0.name(),
14681 }
14682 }
14683 }
14684
14685 impl std::default::Default for IssueSeverity {
14686 fn default() -> Self {
14687 use std::convert::From;
14688 Self::from(0)
14689 }
14690 }
14691
14692 impl std::fmt::Display for IssueSeverity {
14693 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14694 wkt::internal::display_enum(f, self.name(), self.value())
14695 }
14696 }
14697
14698 impl std::convert::From<i32> for IssueSeverity {
14699 fn from(value: i32) -> Self {
14700 match value {
14701 0 => Self::Unspecified,
14702 1 => Self::Info,
14703 2 => Self::Warning,
14704 3 => Self::Error,
14705 _ => Self::UnknownValue(issue_severity::UnknownValue(
14706 wkt::internal::UnknownEnumValue::Integer(value),
14707 )),
14708 }
14709 }
14710 }
14711
14712 impl std::convert::From<&str> for IssueSeverity {
14713 fn from(value: &str) -> Self {
14714 use std::string::ToString;
14715 match value {
14716 "ISSUE_SEVERITY_UNSPECIFIED" => Self::Unspecified,
14717 "ISSUE_SEVERITY_INFO" => Self::Info,
14718 "ISSUE_SEVERITY_WARNING" => Self::Warning,
14719 "ISSUE_SEVERITY_ERROR" => Self::Error,
14720 _ => Self::UnknownValue(issue_severity::UnknownValue(
14721 wkt::internal::UnknownEnumValue::String(value.to_string()),
14722 )),
14723 }
14724 }
14725 }
14726
14727 impl serde::ser::Serialize for IssueSeverity {
14728 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14729 where
14730 S: serde::Serializer,
14731 {
14732 match self {
14733 Self::Unspecified => serializer.serialize_i32(0),
14734 Self::Info => serializer.serialize_i32(1),
14735 Self::Warning => serializer.serialize_i32(2),
14736 Self::Error => serializer.serialize_i32(3),
14737 Self::UnknownValue(u) => u.0.serialize(serializer),
14738 }
14739 }
14740 }
14741
14742 impl<'de> serde::de::Deserialize<'de> for IssueSeverity {
14743 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14744 where
14745 D: serde::Deserializer<'de>,
14746 {
14747 deserializer.deserialize_any(wkt::internal::EnumVisitor::<IssueSeverity>::new(
14748 ".google.cloud.clouddms.v1.EntityIssue.IssueSeverity",
14749 ))
14750 }
14751 }
14752}
14753
14754#[derive(Clone, Debug, PartialEq)]
14770#[non_exhaustive]
14771pub enum DatabaseEntityView {
14772 Unspecified,
14774 Basic,
14776 Full,
14778 RootSummary,
14784 UnknownValue(database_entity_view::UnknownValue),
14789}
14790
14791#[doc(hidden)]
14792pub mod database_entity_view {
14793 #[allow(unused_imports)]
14794 use super::*;
14795 #[derive(Clone, Debug, PartialEq)]
14796 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14797}
14798
14799impl DatabaseEntityView {
14800 pub fn value(&self) -> std::option::Option<i32> {
14805 match self {
14806 Self::Unspecified => std::option::Option::Some(0),
14807 Self::Basic => std::option::Option::Some(1),
14808 Self::Full => std::option::Option::Some(2),
14809 Self::RootSummary => std::option::Option::Some(3),
14810 Self::UnknownValue(u) => u.0.value(),
14811 }
14812 }
14813
14814 pub fn name(&self) -> std::option::Option<&str> {
14819 match self {
14820 Self::Unspecified => std::option::Option::Some("DATABASE_ENTITY_VIEW_UNSPECIFIED"),
14821 Self::Basic => std::option::Option::Some("DATABASE_ENTITY_VIEW_BASIC"),
14822 Self::Full => std::option::Option::Some("DATABASE_ENTITY_VIEW_FULL"),
14823 Self::RootSummary => std::option::Option::Some("DATABASE_ENTITY_VIEW_ROOT_SUMMARY"),
14824 Self::UnknownValue(u) => u.0.name(),
14825 }
14826 }
14827}
14828
14829impl std::default::Default for DatabaseEntityView {
14830 fn default() -> Self {
14831 use std::convert::From;
14832 Self::from(0)
14833 }
14834}
14835
14836impl std::fmt::Display for DatabaseEntityView {
14837 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14838 wkt::internal::display_enum(f, self.name(), self.value())
14839 }
14840}
14841
14842impl std::convert::From<i32> for DatabaseEntityView {
14843 fn from(value: i32) -> Self {
14844 match value {
14845 0 => Self::Unspecified,
14846 1 => Self::Basic,
14847 2 => Self::Full,
14848 3 => Self::RootSummary,
14849 _ => Self::UnknownValue(database_entity_view::UnknownValue(
14850 wkt::internal::UnknownEnumValue::Integer(value),
14851 )),
14852 }
14853 }
14854}
14855
14856impl std::convert::From<&str> for DatabaseEntityView {
14857 fn from(value: &str) -> Self {
14858 use std::string::ToString;
14859 match value {
14860 "DATABASE_ENTITY_VIEW_UNSPECIFIED" => Self::Unspecified,
14861 "DATABASE_ENTITY_VIEW_BASIC" => Self::Basic,
14862 "DATABASE_ENTITY_VIEW_FULL" => Self::Full,
14863 "DATABASE_ENTITY_VIEW_ROOT_SUMMARY" => Self::RootSummary,
14864 _ => Self::UnknownValue(database_entity_view::UnknownValue(
14865 wkt::internal::UnknownEnumValue::String(value.to_string()),
14866 )),
14867 }
14868 }
14869}
14870
14871impl serde::ser::Serialize for DatabaseEntityView {
14872 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14873 where
14874 S: serde::Serializer,
14875 {
14876 match self {
14877 Self::Unspecified => serializer.serialize_i32(0),
14878 Self::Basic => serializer.serialize_i32(1),
14879 Self::Full => serializer.serialize_i32(2),
14880 Self::RootSummary => serializer.serialize_i32(3),
14881 Self::UnknownValue(u) => u.0.serialize(serializer),
14882 }
14883 }
14884}
14885
14886impl<'de> serde::de::Deserialize<'de> for DatabaseEntityView {
14887 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14888 where
14889 D: serde::Deserializer<'de>,
14890 {
14891 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseEntityView>::new(
14892 ".google.cloud.clouddms.v1.DatabaseEntityView",
14893 ))
14894 }
14895}
14896
14897#[derive(Clone, Debug, PartialEq)]
14912#[non_exhaustive]
14913pub enum NetworkArchitecture {
14914 Unspecified,
14915 OldCsqlProducer,
14917 NewCsqlProducer,
14919 UnknownValue(network_architecture::UnknownValue),
14924}
14925
14926#[doc(hidden)]
14927pub mod network_architecture {
14928 #[allow(unused_imports)]
14929 use super::*;
14930 #[derive(Clone, Debug, PartialEq)]
14931 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14932}
14933
14934impl NetworkArchitecture {
14935 pub fn value(&self) -> std::option::Option<i32> {
14940 match self {
14941 Self::Unspecified => std::option::Option::Some(0),
14942 Self::OldCsqlProducer => std::option::Option::Some(1),
14943 Self::NewCsqlProducer => std::option::Option::Some(2),
14944 Self::UnknownValue(u) => u.0.value(),
14945 }
14946 }
14947
14948 pub fn name(&self) -> std::option::Option<&str> {
14953 match self {
14954 Self::Unspecified => std::option::Option::Some("NETWORK_ARCHITECTURE_UNSPECIFIED"),
14955 Self::OldCsqlProducer => {
14956 std::option::Option::Some("NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER")
14957 }
14958 Self::NewCsqlProducer => {
14959 std::option::Option::Some("NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER")
14960 }
14961 Self::UnknownValue(u) => u.0.name(),
14962 }
14963 }
14964}
14965
14966impl std::default::Default for NetworkArchitecture {
14967 fn default() -> Self {
14968 use std::convert::From;
14969 Self::from(0)
14970 }
14971}
14972
14973impl std::fmt::Display for NetworkArchitecture {
14974 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14975 wkt::internal::display_enum(f, self.name(), self.value())
14976 }
14977}
14978
14979impl std::convert::From<i32> for NetworkArchitecture {
14980 fn from(value: i32) -> Self {
14981 match value {
14982 0 => Self::Unspecified,
14983 1 => Self::OldCsqlProducer,
14984 2 => Self::NewCsqlProducer,
14985 _ => Self::UnknownValue(network_architecture::UnknownValue(
14986 wkt::internal::UnknownEnumValue::Integer(value),
14987 )),
14988 }
14989 }
14990}
14991
14992impl std::convert::From<&str> for NetworkArchitecture {
14993 fn from(value: &str) -> Self {
14994 use std::string::ToString;
14995 match value {
14996 "NETWORK_ARCHITECTURE_UNSPECIFIED" => Self::Unspecified,
14997 "NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER" => Self::OldCsqlProducer,
14998 "NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER" => Self::NewCsqlProducer,
14999 _ => Self::UnknownValue(network_architecture::UnknownValue(
15000 wkt::internal::UnknownEnumValue::String(value.to_string()),
15001 )),
15002 }
15003 }
15004}
15005
15006impl serde::ser::Serialize for NetworkArchitecture {
15007 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15008 where
15009 S: serde::Serializer,
15010 {
15011 match self {
15012 Self::Unspecified => serializer.serialize_i32(0),
15013 Self::OldCsqlProducer => serializer.serialize_i32(1),
15014 Self::NewCsqlProducer => serializer.serialize_i32(2),
15015 Self::UnknownValue(u) => u.0.serialize(serializer),
15016 }
15017 }
15018}
15019
15020impl<'de> serde::de::Deserialize<'de> for NetworkArchitecture {
15021 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15022 where
15023 D: serde::Deserializer<'de>,
15024 {
15025 deserializer.deserialize_any(wkt::internal::EnumVisitor::<NetworkArchitecture>::new(
15026 ".google.cloud.clouddms.v1.NetworkArchitecture",
15027 ))
15028 }
15029}
15030
15031#[derive(Clone, Debug, PartialEq)]
15047#[non_exhaustive]
15048pub enum DatabaseEngine {
15049 Unspecified,
15051 Mysql,
15053 Postgresql,
15055 Oracle,
15057 UnknownValue(database_engine::UnknownValue),
15062}
15063
15064#[doc(hidden)]
15065pub mod database_engine {
15066 #[allow(unused_imports)]
15067 use super::*;
15068 #[derive(Clone, Debug, PartialEq)]
15069 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15070}
15071
15072impl DatabaseEngine {
15073 pub fn value(&self) -> std::option::Option<i32> {
15078 match self {
15079 Self::Unspecified => std::option::Option::Some(0),
15080 Self::Mysql => std::option::Option::Some(1),
15081 Self::Postgresql => std::option::Option::Some(2),
15082 Self::Oracle => std::option::Option::Some(4),
15083 Self::UnknownValue(u) => u.0.value(),
15084 }
15085 }
15086
15087 pub fn name(&self) -> std::option::Option<&str> {
15092 match self {
15093 Self::Unspecified => std::option::Option::Some("DATABASE_ENGINE_UNSPECIFIED"),
15094 Self::Mysql => std::option::Option::Some("MYSQL"),
15095 Self::Postgresql => std::option::Option::Some("POSTGRESQL"),
15096 Self::Oracle => std::option::Option::Some("ORACLE"),
15097 Self::UnknownValue(u) => u.0.name(),
15098 }
15099 }
15100}
15101
15102impl std::default::Default for DatabaseEngine {
15103 fn default() -> Self {
15104 use std::convert::From;
15105 Self::from(0)
15106 }
15107}
15108
15109impl std::fmt::Display for DatabaseEngine {
15110 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15111 wkt::internal::display_enum(f, self.name(), self.value())
15112 }
15113}
15114
15115impl std::convert::From<i32> for DatabaseEngine {
15116 fn from(value: i32) -> Self {
15117 match value {
15118 0 => Self::Unspecified,
15119 1 => Self::Mysql,
15120 2 => Self::Postgresql,
15121 4 => Self::Oracle,
15122 _ => Self::UnknownValue(database_engine::UnknownValue(
15123 wkt::internal::UnknownEnumValue::Integer(value),
15124 )),
15125 }
15126 }
15127}
15128
15129impl std::convert::From<&str> for DatabaseEngine {
15130 fn from(value: &str) -> Self {
15131 use std::string::ToString;
15132 match value {
15133 "DATABASE_ENGINE_UNSPECIFIED" => Self::Unspecified,
15134 "MYSQL" => Self::Mysql,
15135 "POSTGRESQL" => Self::Postgresql,
15136 "ORACLE" => Self::Oracle,
15137 _ => Self::UnknownValue(database_engine::UnknownValue(
15138 wkt::internal::UnknownEnumValue::String(value.to_string()),
15139 )),
15140 }
15141 }
15142}
15143
15144impl serde::ser::Serialize for DatabaseEngine {
15145 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15146 where
15147 S: serde::Serializer,
15148 {
15149 match self {
15150 Self::Unspecified => serializer.serialize_i32(0),
15151 Self::Mysql => serializer.serialize_i32(1),
15152 Self::Postgresql => serializer.serialize_i32(2),
15153 Self::Oracle => serializer.serialize_i32(4),
15154 Self::UnknownValue(u) => u.0.serialize(serializer),
15155 }
15156 }
15157}
15158
15159impl<'de> serde::de::Deserialize<'de> for DatabaseEngine {
15160 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15161 where
15162 D: serde::Deserializer<'de>,
15163 {
15164 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseEngine>::new(
15165 ".google.cloud.clouddms.v1.DatabaseEngine",
15166 ))
15167 }
15168}
15169
15170#[derive(Clone, Debug, PartialEq)]
15186#[non_exhaustive]
15187pub enum DatabaseProvider {
15188 Unspecified,
15190 Cloudsql,
15192 Rds,
15194 Aurora,
15196 Alloydb,
15198 UnknownValue(database_provider::UnknownValue),
15203}
15204
15205#[doc(hidden)]
15206pub mod database_provider {
15207 #[allow(unused_imports)]
15208 use super::*;
15209 #[derive(Clone, Debug, PartialEq)]
15210 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15211}
15212
15213impl DatabaseProvider {
15214 pub fn value(&self) -> std::option::Option<i32> {
15219 match self {
15220 Self::Unspecified => std::option::Option::Some(0),
15221 Self::Cloudsql => std::option::Option::Some(1),
15222 Self::Rds => std::option::Option::Some(2),
15223 Self::Aurora => std::option::Option::Some(3),
15224 Self::Alloydb => std::option::Option::Some(4),
15225 Self::UnknownValue(u) => u.0.value(),
15226 }
15227 }
15228
15229 pub fn name(&self) -> std::option::Option<&str> {
15234 match self {
15235 Self::Unspecified => std::option::Option::Some("DATABASE_PROVIDER_UNSPECIFIED"),
15236 Self::Cloudsql => std::option::Option::Some("CLOUDSQL"),
15237 Self::Rds => std::option::Option::Some("RDS"),
15238 Self::Aurora => std::option::Option::Some("AURORA"),
15239 Self::Alloydb => std::option::Option::Some("ALLOYDB"),
15240 Self::UnknownValue(u) => u.0.name(),
15241 }
15242 }
15243}
15244
15245impl std::default::Default for DatabaseProvider {
15246 fn default() -> Self {
15247 use std::convert::From;
15248 Self::from(0)
15249 }
15250}
15251
15252impl std::fmt::Display for DatabaseProvider {
15253 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15254 wkt::internal::display_enum(f, self.name(), self.value())
15255 }
15256}
15257
15258impl std::convert::From<i32> for DatabaseProvider {
15259 fn from(value: i32) -> Self {
15260 match value {
15261 0 => Self::Unspecified,
15262 1 => Self::Cloudsql,
15263 2 => Self::Rds,
15264 3 => Self::Aurora,
15265 4 => Self::Alloydb,
15266 _ => Self::UnknownValue(database_provider::UnknownValue(
15267 wkt::internal::UnknownEnumValue::Integer(value),
15268 )),
15269 }
15270 }
15271}
15272
15273impl std::convert::From<&str> for DatabaseProvider {
15274 fn from(value: &str) -> Self {
15275 use std::string::ToString;
15276 match value {
15277 "DATABASE_PROVIDER_UNSPECIFIED" => Self::Unspecified,
15278 "CLOUDSQL" => Self::Cloudsql,
15279 "RDS" => Self::Rds,
15280 "AURORA" => Self::Aurora,
15281 "ALLOYDB" => Self::Alloydb,
15282 _ => Self::UnknownValue(database_provider::UnknownValue(
15283 wkt::internal::UnknownEnumValue::String(value.to_string()),
15284 )),
15285 }
15286 }
15287}
15288
15289impl serde::ser::Serialize for DatabaseProvider {
15290 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15291 where
15292 S: serde::Serializer,
15293 {
15294 match self {
15295 Self::Unspecified => serializer.serialize_i32(0),
15296 Self::Cloudsql => serializer.serialize_i32(1),
15297 Self::Rds => serializer.serialize_i32(2),
15298 Self::Aurora => serializer.serialize_i32(3),
15299 Self::Alloydb => serializer.serialize_i32(4),
15300 Self::UnknownValue(u) => u.0.serialize(serializer),
15301 }
15302 }
15303}
15304
15305impl<'de> serde::de::Deserialize<'de> for DatabaseProvider {
15306 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15307 where
15308 D: serde::Deserializer<'de>,
15309 {
15310 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseProvider>::new(
15311 ".google.cloud.clouddms.v1.DatabaseProvider",
15312 ))
15313 }
15314}
15315
15316#[derive(Clone, Debug, PartialEq)]
15333#[non_exhaustive]
15334pub enum ValuePresentInList {
15335 Unspecified,
15337 IfValueList,
15339 IfValueNotList,
15341 UnknownValue(value_present_in_list::UnknownValue),
15346}
15347
15348#[doc(hidden)]
15349pub mod value_present_in_list {
15350 #[allow(unused_imports)]
15351 use super::*;
15352 #[derive(Clone, Debug, PartialEq)]
15353 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15354}
15355
15356impl ValuePresentInList {
15357 pub fn value(&self) -> std::option::Option<i32> {
15362 match self {
15363 Self::Unspecified => std::option::Option::Some(0),
15364 Self::IfValueList => std::option::Option::Some(1),
15365 Self::IfValueNotList => std::option::Option::Some(2),
15366 Self::UnknownValue(u) => u.0.value(),
15367 }
15368 }
15369
15370 pub fn name(&self) -> std::option::Option<&str> {
15375 match self {
15376 Self::Unspecified => std::option::Option::Some("VALUE_PRESENT_IN_LIST_UNSPECIFIED"),
15377 Self::IfValueList => std::option::Option::Some("VALUE_PRESENT_IN_LIST_IF_VALUE_LIST"),
15378 Self::IfValueNotList => {
15379 std::option::Option::Some("VALUE_PRESENT_IN_LIST_IF_VALUE_NOT_LIST")
15380 }
15381 Self::UnknownValue(u) => u.0.name(),
15382 }
15383 }
15384}
15385
15386impl std::default::Default for ValuePresentInList {
15387 fn default() -> Self {
15388 use std::convert::From;
15389 Self::from(0)
15390 }
15391}
15392
15393impl std::fmt::Display for ValuePresentInList {
15394 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15395 wkt::internal::display_enum(f, self.name(), self.value())
15396 }
15397}
15398
15399impl std::convert::From<i32> for ValuePresentInList {
15400 fn from(value: i32) -> Self {
15401 match value {
15402 0 => Self::Unspecified,
15403 1 => Self::IfValueList,
15404 2 => Self::IfValueNotList,
15405 _ => Self::UnknownValue(value_present_in_list::UnknownValue(
15406 wkt::internal::UnknownEnumValue::Integer(value),
15407 )),
15408 }
15409 }
15410}
15411
15412impl std::convert::From<&str> for ValuePresentInList {
15413 fn from(value: &str) -> Self {
15414 use std::string::ToString;
15415 match value {
15416 "VALUE_PRESENT_IN_LIST_UNSPECIFIED" => Self::Unspecified,
15417 "VALUE_PRESENT_IN_LIST_IF_VALUE_LIST" => Self::IfValueList,
15418 "VALUE_PRESENT_IN_LIST_IF_VALUE_NOT_LIST" => Self::IfValueNotList,
15419 _ => Self::UnknownValue(value_present_in_list::UnknownValue(
15420 wkt::internal::UnknownEnumValue::String(value.to_string()),
15421 )),
15422 }
15423 }
15424}
15425
15426impl serde::ser::Serialize for ValuePresentInList {
15427 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15428 where
15429 S: serde::Serializer,
15430 {
15431 match self {
15432 Self::Unspecified => serializer.serialize_i32(0),
15433 Self::IfValueList => serializer.serialize_i32(1),
15434 Self::IfValueNotList => serializer.serialize_i32(2),
15435 Self::UnknownValue(u) => u.0.serialize(serializer),
15436 }
15437 }
15438}
15439
15440impl<'de> serde::de::Deserialize<'de> for ValuePresentInList {
15441 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15442 where
15443 D: serde::Deserializer<'de>,
15444 {
15445 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ValuePresentInList>::new(
15446 ".google.cloud.clouddms.v1.ValuePresentInList",
15447 ))
15448 }
15449}
15450
15451#[derive(Clone, Debug, PartialEq)]
15467#[non_exhaustive]
15468pub enum DatabaseEntityType {
15469 Unspecified,
15471 Schema,
15473 Table,
15475 Column,
15477 Constraint,
15479 Index,
15481 Trigger,
15483 View,
15485 Sequence,
15487 StoredProcedure,
15489 Function,
15491 Synonym,
15493 DatabasePackage,
15495 Udt,
15497 MaterializedView,
15499 Database,
15501 UnknownValue(database_entity_type::UnknownValue),
15506}
15507
15508#[doc(hidden)]
15509pub mod database_entity_type {
15510 #[allow(unused_imports)]
15511 use super::*;
15512 #[derive(Clone, Debug, PartialEq)]
15513 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15514}
15515
15516impl DatabaseEntityType {
15517 pub fn value(&self) -> std::option::Option<i32> {
15522 match self {
15523 Self::Unspecified => std::option::Option::Some(0),
15524 Self::Schema => std::option::Option::Some(1),
15525 Self::Table => std::option::Option::Some(2),
15526 Self::Column => std::option::Option::Some(3),
15527 Self::Constraint => std::option::Option::Some(4),
15528 Self::Index => std::option::Option::Some(5),
15529 Self::Trigger => std::option::Option::Some(6),
15530 Self::View => std::option::Option::Some(7),
15531 Self::Sequence => std::option::Option::Some(8),
15532 Self::StoredProcedure => std::option::Option::Some(9),
15533 Self::Function => std::option::Option::Some(10),
15534 Self::Synonym => std::option::Option::Some(11),
15535 Self::DatabasePackage => std::option::Option::Some(12),
15536 Self::Udt => std::option::Option::Some(13),
15537 Self::MaterializedView => std::option::Option::Some(14),
15538 Self::Database => std::option::Option::Some(15),
15539 Self::UnknownValue(u) => u.0.value(),
15540 }
15541 }
15542
15543 pub fn name(&self) -> std::option::Option<&str> {
15548 match self {
15549 Self::Unspecified => std::option::Option::Some("DATABASE_ENTITY_TYPE_UNSPECIFIED"),
15550 Self::Schema => std::option::Option::Some("DATABASE_ENTITY_TYPE_SCHEMA"),
15551 Self::Table => std::option::Option::Some("DATABASE_ENTITY_TYPE_TABLE"),
15552 Self::Column => std::option::Option::Some("DATABASE_ENTITY_TYPE_COLUMN"),
15553 Self::Constraint => std::option::Option::Some("DATABASE_ENTITY_TYPE_CONSTRAINT"),
15554 Self::Index => std::option::Option::Some("DATABASE_ENTITY_TYPE_INDEX"),
15555 Self::Trigger => std::option::Option::Some("DATABASE_ENTITY_TYPE_TRIGGER"),
15556 Self::View => std::option::Option::Some("DATABASE_ENTITY_TYPE_VIEW"),
15557 Self::Sequence => std::option::Option::Some("DATABASE_ENTITY_TYPE_SEQUENCE"),
15558 Self::StoredProcedure => {
15559 std::option::Option::Some("DATABASE_ENTITY_TYPE_STORED_PROCEDURE")
15560 }
15561 Self::Function => std::option::Option::Some("DATABASE_ENTITY_TYPE_FUNCTION"),
15562 Self::Synonym => std::option::Option::Some("DATABASE_ENTITY_TYPE_SYNONYM"),
15563 Self::DatabasePackage => {
15564 std::option::Option::Some("DATABASE_ENTITY_TYPE_DATABASE_PACKAGE")
15565 }
15566 Self::Udt => std::option::Option::Some("DATABASE_ENTITY_TYPE_UDT"),
15567 Self::MaterializedView => {
15568 std::option::Option::Some("DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW")
15569 }
15570 Self::Database => std::option::Option::Some("DATABASE_ENTITY_TYPE_DATABASE"),
15571 Self::UnknownValue(u) => u.0.name(),
15572 }
15573 }
15574}
15575
15576impl std::default::Default for DatabaseEntityType {
15577 fn default() -> Self {
15578 use std::convert::From;
15579 Self::from(0)
15580 }
15581}
15582
15583impl std::fmt::Display for DatabaseEntityType {
15584 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15585 wkt::internal::display_enum(f, self.name(), self.value())
15586 }
15587}
15588
15589impl std::convert::From<i32> for DatabaseEntityType {
15590 fn from(value: i32) -> Self {
15591 match value {
15592 0 => Self::Unspecified,
15593 1 => Self::Schema,
15594 2 => Self::Table,
15595 3 => Self::Column,
15596 4 => Self::Constraint,
15597 5 => Self::Index,
15598 6 => Self::Trigger,
15599 7 => Self::View,
15600 8 => Self::Sequence,
15601 9 => Self::StoredProcedure,
15602 10 => Self::Function,
15603 11 => Self::Synonym,
15604 12 => Self::DatabasePackage,
15605 13 => Self::Udt,
15606 14 => Self::MaterializedView,
15607 15 => Self::Database,
15608 _ => Self::UnknownValue(database_entity_type::UnknownValue(
15609 wkt::internal::UnknownEnumValue::Integer(value),
15610 )),
15611 }
15612 }
15613}
15614
15615impl std::convert::From<&str> for DatabaseEntityType {
15616 fn from(value: &str) -> Self {
15617 use std::string::ToString;
15618 match value {
15619 "DATABASE_ENTITY_TYPE_UNSPECIFIED" => Self::Unspecified,
15620 "DATABASE_ENTITY_TYPE_SCHEMA" => Self::Schema,
15621 "DATABASE_ENTITY_TYPE_TABLE" => Self::Table,
15622 "DATABASE_ENTITY_TYPE_COLUMN" => Self::Column,
15623 "DATABASE_ENTITY_TYPE_CONSTRAINT" => Self::Constraint,
15624 "DATABASE_ENTITY_TYPE_INDEX" => Self::Index,
15625 "DATABASE_ENTITY_TYPE_TRIGGER" => Self::Trigger,
15626 "DATABASE_ENTITY_TYPE_VIEW" => Self::View,
15627 "DATABASE_ENTITY_TYPE_SEQUENCE" => Self::Sequence,
15628 "DATABASE_ENTITY_TYPE_STORED_PROCEDURE" => Self::StoredProcedure,
15629 "DATABASE_ENTITY_TYPE_FUNCTION" => Self::Function,
15630 "DATABASE_ENTITY_TYPE_SYNONYM" => Self::Synonym,
15631 "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE" => Self::DatabasePackage,
15632 "DATABASE_ENTITY_TYPE_UDT" => Self::Udt,
15633 "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW" => Self::MaterializedView,
15634 "DATABASE_ENTITY_TYPE_DATABASE" => Self::Database,
15635 _ => Self::UnknownValue(database_entity_type::UnknownValue(
15636 wkt::internal::UnknownEnumValue::String(value.to_string()),
15637 )),
15638 }
15639 }
15640}
15641
15642impl serde::ser::Serialize for DatabaseEntityType {
15643 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15644 where
15645 S: serde::Serializer,
15646 {
15647 match self {
15648 Self::Unspecified => serializer.serialize_i32(0),
15649 Self::Schema => serializer.serialize_i32(1),
15650 Self::Table => serializer.serialize_i32(2),
15651 Self::Column => serializer.serialize_i32(3),
15652 Self::Constraint => serializer.serialize_i32(4),
15653 Self::Index => serializer.serialize_i32(5),
15654 Self::Trigger => serializer.serialize_i32(6),
15655 Self::View => serializer.serialize_i32(7),
15656 Self::Sequence => serializer.serialize_i32(8),
15657 Self::StoredProcedure => serializer.serialize_i32(9),
15658 Self::Function => serializer.serialize_i32(10),
15659 Self::Synonym => serializer.serialize_i32(11),
15660 Self::DatabasePackage => serializer.serialize_i32(12),
15661 Self::Udt => serializer.serialize_i32(13),
15662 Self::MaterializedView => serializer.serialize_i32(14),
15663 Self::Database => serializer.serialize_i32(15),
15664 Self::UnknownValue(u) => u.0.serialize(serializer),
15665 }
15666 }
15667}
15668
15669impl<'de> serde::de::Deserialize<'de> for DatabaseEntityType {
15670 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15671 where
15672 D: serde::Deserializer<'de>,
15673 {
15674 deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseEntityType>::new(
15675 ".google.cloud.clouddms.v1.DatabaseEntityType",
15676 ))
15677 }
15678}
15679
15680#[derive(Clone, Debug, PartialEq)]
15696#[non_exhaustive]
15697pub enum EntityNameTransformation {
15698 Unspecified,
15700 NoTransformation,
15702 LowerCase,
15704 UpperCase,
15706 CapitalizedCase,
15708 UnknownValue(entity_name_transformation::UnknownValue),
15713}
15714
15715#[doc(hidden)]
15716pub mod entity_name_transformation {
15717 #[allow(unused_imports)]
15718 use super::*;
15719 #[derive(Clone, Debug, PartialEq)]
15720 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15721}
15722
15723impl EntityNameTransformation {
15724 pub fn value(&self) -> std::option::Option<i32> {
15729 match self {
15730 Self::Unspecified => std::option::Option::Some(0),
15731 Self::NoTransformation => std::option::Option::Some(1),
15732 Self::LowerCase => std::option::Option::Some(2),
15733 Self::UpperCase => std::option::Option::Some(3),
15734 Self::CapitalizedCase => std::option::Option::Some(4),
15735 Self::UnknownValue(u) => u.0.value(),
15736 }
15737 }
15738
15739 pub fn name(&self) -> std::option::Option<&str> {
15744 match self {
15745 Self::Unspecified => {
15746 std::option::Option::Some("ENTITY_NAME_TRANSFORMATION_UNSPECIFIED")
15747 }
15748 Self::NoTransformation => {
15749 std::option::Option::Some("ENTITY_NAME_TRANSFORMATION_NO_TRANSFORMATION")
15750 }
15751 Self::LowerCase => std::option::Option::Some("ENTITY_NAME_TRANSFORMATION_LOWER_CASE"),
15752 Self::UpperCase => std::option::Option::Some("ENTITY_NAME_TRANSFORMATION_UPPER_CASE"),
15753 Self::CapitalizedCase => {
15754 std::option::Option::Some("ENTITY_NAME_TRANSFORMATION_CAPITALIZED_CASE")
15755 }
15756 Self::UnknownValue(u) => u.0.name(),
15757 }
15758 }
15759}
15760
15761impl std::default::Default for EntityNameTransformation {
15762 fn default() -> Self {
15763 use std::convert::From;
15764 Self::from(0)
15765 }
15766}
15767
15768impl std::fmt::Display for EntityNameTransformation {
15769 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15770 wkt::internal::display_enum(f, self.name(), self.value())
15771 }
15772}
15773
15774impl std::convert::From<i32> for EntityNameTransformation {
15775 fn from(value: i32) -> Self {
15776 match value {
15777 0 => Self::Unspecified,
15778 1 => Self::NoTransformation,
15779 2 => Self::LowerCase,
15780 3 => Self::UpperCase,
15781 4 => Self::CapitalizedCase,
15782 _ => Self::UnknownValue(entity_name_transformation::UnknownValue(
15783 wkt::internal::UnknownEnumValue::Integer(value),
15784 )),
15785 }
15786 }
15787}
15788
15789impl std::convert::From<&str> for EntityNameTransformation {
15790 fn from(value: &str) -> Self {
15791 use std::string::ToString;
15792 match value {
15793 "ENTITY_NAME_TRANSFORMATION_UNSPECIFIED" => Self::Unspecified,
15794 "ENTITY_NAME_TRANSFORMATION_NO_TRANSFORMATION" => Self::NoTransformation,
15795 "ENTITY_NAME_TRANSFORMATION_LOWER_CASE" => Self::LowerCase,
15796 "ENTITY_NAME_TRANSFORMATION_UPPER_CASE" => Self::UpperCase,
15797 "ENTITY_NAME_TRANSFORMATION_CAPITALIZED_CASE" => Self::CapitalizedCase,
15798 _ => Self::UnknownValue(entity_name_transformation::UnknownValue(
15799 wkt::internal::UnknownEnumValue::String(value.to_string()),
15800 )),
15801 }
15802 }
15803}
15804
15805impl serde::ser::Serialize for EntityNameTransformation {
15806 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15807 where
15808 S: serde::Serializer,
15809 {
15810 match self {
15811 Self::Unspecified => serializer.serialize_i32(0),
15812 Self::NoTransformation => serializer.serialize_i32(1),
15813 Self::LowerCase => serializer.serialize_i32(2),
15814 Self::UpperCase => serializer.serialize_i32(3),
15815 Self::CapitalizedCase => serializer.serialize_i32(4),
15816 Self::UnknownValue(u) => u.0.serialize(serializer),
15817 }
15818 }
15819}
15820
15821impl<'de> serde::de::Deserialize<'de> for EntityNameTransformation {
15822 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15823 where
15824 D: serde::Deserializer<'de>,
15825 {
15826 deserializer.deserialize_any(wkt::internal::EnumVisitor::<EntityNameTransformation>::new(
15827 ".google.cloud.clouddms.v1.EntityNameTransformation",
15828 ))
15829 }
15830}
15831
15832#[derive(Clone, Debug, PartialEq)]
15848#[non_exhaustive]
15849pub enum BackgroundJobType {
15850 Unspecified,
15852 SourceSeed,
15854 Convert,
15857 ApplyDestination,
15859 ImportRulesFile,
15862 UnknownValue(background_job_type::UnknownValue),
15867}
15868
15869#[doc(hidden)]
15870pub mod background_job_type {
15871 #[allow(unused_imports)]
15872 use super::*;
15873 #[derive(Clone, Debug, PartialEq)]
15874 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15875}
15876
15877impl BackgroundJobType {
15878 pub fn value(&self) -> std::option::Option<i32> {
15883 match self {
15884 Self::Unspecified => std::option::Option::Some(0),
15885 Self::SourceSeed => std::option::Option::Some(1),
15886 Self::Convert => std::option::Option::Some(2),
15887 Self::ApplyDestination => std::option::Option::Some(3),
15888 Self::ImportRulesFile => std::option::Option::Some(5),
15889 Self::UnknownValue(u) => u.0.value(),
15890 }
15891 }
15892
15893 pub fn name(&self) -> std::option::Option<&str> {
15898 match self {
15899 Self::Unspecified => std::option::Option::Some("BACKGROUND_JOB_TYPE_UNSPECIFIED"),
15900 Self::SourceSeed => std::option::Option::Some("BACKGROUND_JOB_TYPE_SOURCE_SEED"),
15901 Self::Convert => std::option::Option::Some("BACKGROUND_JOB_TYPE_CONVERT"),
15902 Self::ApplyDestination => {
15903 std::option::Option::Some("BACKGROUND_JOB_TYPE_APPLY_DESTINATION")
15904 }
15905 Self::ImportRulesFile => {
15906 std::option::Option::Some("BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE")
15907 }
15908 Self::UnknownValue(u) => u.0.name(),
15909 }
15910 }
15911}
15912
15913impl std::default::Default for BackgroundJobType {
15914 fn default() -> Self {
15915 use std::convert::From;
15916 Self::from(0)
15917 }
15918}
15919
15920impl std::fmt::Display for BackgroundJobType {
15921 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15922 wkt::internal::display_enum(f, self.name(), self.value())
15923 }
15924}
15925
15926impl std::convert::From<i32> for BackgroundJobType {
15927 fn from(value: i32) -> Self {
15928 match value {
15929 0 => Self::Unspecified,
15930 1 => Self::SourceSeed,
15931 2 => Self::Convert,
15932 3 => Self::ApplyDestination,
15933 5 => Self::ImportRulesFile,
15934 _ => Self::UnknownValue(background_job_type::UnknownValue(
15935 wkt::internal::UnknownEnumValue::Integer(value),
15936 )),
15937 }
15938 }
15939}
15940
15941impl std::convert::From<&str> for BackgroundJobType {
15942 fn from(value: &str) -> Self {
15943 use std::string::ToString;
15944 match value {
15945 "BACKGROUND_JOB_TYPE_UNSPECIFIED" => Self::Unspecified,
15946 "BACKGROUND_JOB_TYPE_SOURCE_SEED" => Self::SourceSeed,
15947 "BACKGROUND_JOB_TYPE_CONVERT" => Self::Convert,
15948 "BACKGROUND_JOB_TYPE_APPLY_DESTINATION" => Self::ApplyDestination,
15949 "BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE" => Self::ImportRulesFile,
15950 _ => Self::UnknownValue(background_job_type::UnknownValue(
15951 wkt::internal::UnknownEnumValue::String(value.to_string()),
15952 )),
15953 }
15954 }
15955}
15956
15957impl serde::ser::Serialize for BackgroundJobType {
15958 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15959 where
15960 S: serde::Serializer,
15961 {
15962 match self {
15963 Self::Unspecified => serializer.serialize_i32(0),
15964 Self::SourceSeed => serializer.serialize_i32(1),
15965 Self::Convert => serializer.serialize_i32(2),
15966 Self::ApplyDestination => serializer.serialize_i32(3),
15967 Self::ImportRulesFile => serializer.serialize_i32(5),
15968 Self::UnknownValue(u) => u.0.serialize(serializer),
15969 }
15970 }
15971}
15972
15973impl<'de> serde::de::Deserialize<'de> for BackgroundJobType {
15974 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15975 where
15976 D: serde::Deserializer<'de>,
15977 {
15978 deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackgroundJobType>::new(
15979 ".google.cloud.clouddms.v1.BackgroundJobType",
15980 ))
15981 }
15982}
15983
15984#[derive(Clone, Debug, PartialEq)]
16000#[non_exhaustive]
16001pub enum ImportRulesFileFormat {
16002 Unspecified,
16004 HarbourBridgeSessionFile,
16006 OratopgConfigFile,
16008 UnknownValue(import_rules_file_format::UnknownValue),
16013}
16014
16015#[doc(hidden)]
16016pub mod import_rules_file_format {
16017 #[allow(unused_imports)]
16018 use super::*;
16019 #[derive(Clone, Debug, PartialEq)]
16020 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16021}
16022
16023impl ImportRulesFileFormat {
16024 pub fn value(&self) -> std::option::Option<i32> {
16029 match self {
16030 Self::Unspecified => std::option::Option::Some(0),
16031 Self::HarbourBridgeSessionFile => std::option::Option::Some(1),
16032 Self::OratopgConfigFile => std::option::Option::Some(2),
16033 Self::UnknownValue(u) => u.0.value(),
16034 }
16035 }
16036
16037 pub fn name(&self) -> std::option::Option<&str> {
16042 match self {
16043 Self::Unspecified => std::option::Option::Some("IMPORT_RULES_FILE_FORMAT_UNSPECIFIED"),
16044 Self::HarbourBridgeSessionFile => {
16045 std::option::Option::Some("IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE")
16046 }
16047 Self::OratopgConfigFile => {
16048 std::option::Option::Some("IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE")
16049 }
16050 Self::UnknownValue(u) => u.0.name(),
16051 }
16052 }
16053}
16054
16055impl std::default::Default for ImportRulesFileFormat {
16056 fn default() -> Self {
16057 use std::convert::From;
16058 Self::from(0)
16059 }
16060}
16061
16062impl std::fmt::Display for ImportRulesFileFormat {
16063 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16064 wkt::internal::display_enum(f, self.name(), self.value())
16065 }
16066}
16067
16068impl std::convert::From<i32> for ImportRulesFileFormat {
16069 fn from(value: i32) -> Self {
16070 match value {
16071 0 => Self::Unspecified,
16072 1 => Self::HarbourBridgeSessionFile,
16073 2 => Self::OratopgConfigFile,
16074 _ => Self::UnknownValue(import_rules_file_format::UnknownValue(
16075 wkt::internal::UnknownEnumValue::Integer(value),
16076 )),
16077 }
16078 }
16079}
16080
16081impl std::convert::From<&str> for ImportRulesFileFormat {
16082 fn from(value: &str) -> Self {
16083 use std::string::ToString;
16084 match value {
16085 "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED" => Self::Unspecified,
16086 "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE" => {
16087 Self::HarbourBridgeSessionFile
16088 }
16089 "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE" => Self::OratopgConfigFile,
16090 _ => Self::UnknownValue(import_rules_file_format::UnknownValue(
16091 wkt::internal::UnknownEnumValue::String(value.to_string()),
16092 )),
16093 }
16094 }
16095}
16096
16097impl serde::ser::Serialize for ImportRulesFileFormat {
16098 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16099 where
16100 S: serde::Serializer,
16101 {
16102 match self {
16103 Self::Unspecified => serializer.serialize_i32(0),
16104 Self::HarbourBridgeSessionFile => serializer.serialize_i32(1),
16105 Self::OratopgConfigFile => serializer.serialize_i32(2),
16106 Self::UnknownValue(u) => u.0.serialize(serializer),
16107 }
16108 }
16109}
16110
16111impl<'de> serde::de::Deserialize<'de> for ImportRulesFileFormat {
16112 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16113 where
16114 D: serde::Deserializer<'de>,
16115 {
16116 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ImportRulesFileFormat>::new(
16117 ".google.cloud.clouddms.v1.ImportRulesFileFormat",
16118 ))
16119 }
16120}
16121
16122#[derive(Clone, Debug, PartialEq)]
16139#[non_exhaustive]
16140pub enum ValueComparison {
16141 Unspecified,
16143 IfValueSmallerThan,
16145 IfValueSmallerEqualThan,
16147 IfValueLargerThan,
16149 IfValueLargerEqualThan,
16151 UnknownValue(value_comparison::UnknownValue),
16156}
16157
16158#[doc(hidden)]
16159pub mod value_comparison {
16160 #[allow(unused_imports)]
16161 use super::*;
16162 #[derive(Clone, Debug, PartialEq)]
16163 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16164}
16165
16166impl ValueComparison {
16167 pub fn value(&self) -> std::option::Option<i32> {
16172 match self {
16173 Self::Unspecified => std::option::Option::Some(0),
16174 Self::IfValueSmallerThan => std::option::Option::Some(1),
16175 Self::IfValueSmallerEqualThan => std::option::Option::Some(2),
16176 Self::IfValueLargerThan => std::option::Option::Some(3),
16177 Self::IfValueLargerEqualThan => std::option::Option::Some(4),
16178 Self::UnknownValue(u) => u.0.value(),
16179 }
16180 }
16181
16182 pub fn name(&self) -> std::option::Option<&str> {
16187 match self {
16188 Self::Unspecified => std::option::Option::Some("VALUE_COMPARISON_UNSPECIFIED"),
16189 Self::IfValueSmallerThan => {
16190 std::option::Option::Some("VALUE_COMPARISON_IF_VALUE_SMALLER_THAN")
16191 }
16192 Self::IfValueSmallerEqualThan => {
16193 std::option::Option::Some("VALUE_COMPARISON_IF_VALUE_SMALLER_EQUAL_THAN")
16194 }
16195 Self::IfValueLargerThan => {
16196 std::option::Option::Some("VALUE_COMPARISON_IF_VALUE_LARGER_THAN")
16197 }
16198 Self::IfValueLargerEqualThan => {
16199 std::option::Option::Some("VALUE_COMPARISON_IF_VALUE_LARGER_EQUAL_THAN")
16200 }
16201 Self::UnknownValue(u) => u.0.name(),
16202 }
16203 }
16204}
16205
16206impl std::default::Default for ValueComparison {
16207 fn default() -> Self {
16208 use std::convert::From;
16209 Self::from(0)
16210 }
16211}
16212
16213impl std::fmt::Display for ValueComparison {
16214 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16215 wkt::internal::display_enum(f, self.name(), self.value())
16216 }
16217}
16218
16219impl std::convert::From<i32> for ValueComparison {
16220 fn from(value: i32) -> Self {
16221 match value {
16222 0 => Self::Unspecified,
16223 1 => Self::IfValueSmallerThan,
16224 2 => Self::IfValueSmallerEqualThan,
16225 3 => Self::IfValueLargerThan,
16226 4 => Self::IfValueLargerEqualThan,
16227 _ => Self::UnknownValue(value_comparison::UnknownValue(
16228 wkt::internal::UnknownEnumValue::Integer(value),
16229 )),
16230 }
16231 }
16232}
16233
16234impl std::convert::From<&str> for ValueComparison {
16235 fn from(value: &str) -> Self {
16236 use std::string::ToString;
16237 match value {
16238 "VALUE_COMPARISON_UNSPECIFIED" => Self::Unspecified,
16239 "VALUE_COMPARISON_IF_VALUE_SMALLER_THAN" => Self::IfValueSmallerThan,
16240 "VALUE_COMPARISON_IF_VALUE_SMALLER_EQUAL_THAN" => Self::IfValueSmallerEqualThan,
16241 "VALUE_COMPARISON_IF_VALUE_LARGER_THAN" => Self::IfValueLargerThan,
16242 "VALUE_COMPARISON_IF_VALUE_LARGER_EQUAL_THAN" => Self::IfValueLargerEqualThan,
16243 _ => Self::UnknownValue(value_comparison::UnknownValue(
16244 wkt::internal::UnknownEnumValue::String(value.to_string()),
16245 )),
16246 }
16247 }
16248}
16249
16250impl serde::ser::Serialize for ValueComparison {
16251 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16252 where
16253 S: serde::Serializer,
16254 {
16255 match self {
16256 Self::Unspecified => serializer.serialize_i32(0),
16257 Self::IfValueSmallerThan => serializer.serialize_i32(1),
16258 Self::IfValueSmallerEqualThan => serializer.serialize_i32(2),
16259 Self::IfValueLargerThan => serializer.serialize_i32(3),
16260 Self::IfValueLargerEqualThan => serializer.serialize_i32(4),
16261 Self::UnknownValue(u) => u.0.serialize(serializer),
16262 }
16263 }
16264}
16265
16266impl<'de> serde::de::Deserialize<'de> for ValueComparison {
16267 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16268 where
16269 D: serde::Deserializer<'de>,
16270 {
16271 deserializer.deserialize_any(wkt::internal::EnumVisitor::<ValueComparison>::new(
16272 ".google.cloud.clouddms.v1.ValueComparison",
16273 ))
16274 }
16275}
16276
16277#[derive(Clone, Debug, PartialEq)]
16293#[non_exhaustive]
16294pub enum NumericFilterOption {
16295 Unspecified,
16297 All,
16299 Limit,
16302 Limitless,
16305 UnknownValue(numeric_filter_option::UnknownValue),
16310}
16311
16312#[doc(hidden)]
16313pub mod numeric_filter_option {
16314 #[allow(unused_imports)]
16315 use super::*;
16316 #[derive(Clone, Debug, PartialEq)]
16317 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16318}
16319
16320impl NumericFilterOption {
16321 pub fn value(&self) -> std::option::Option<i32> {
16326 match self {
16327 Self::Unspecified => std::option::Option::Some(0),
16328 Self::All => std::option::Option::Some(1),
16329 Self::Limit => std::option::Option::Some(2),
16330 Self::Limitless => std::option::Option::Some(3),
16331 Self::UnknownValue(u) => u.0.value(),
16332 }
16333 }
16334
16335 pub fn name(&self) -> std::option::Option<&str> {
16340 match self {
16341 Self::Unspecified => std::option::Option::Some("NUMERIC_FILTER_OPTION_UNSPECIFIED"),
16342 Self::All => std::option::Option::Some("NUMERIC_FILTER_OPTION_ALL"),
16343 Self::Limit => std::option::Option::Some("NUMERIC_FILTER_OPTION_LIMIT"),
16344 Self::Limitless => std::option::Option::Some("NUMERIC_FILTER_OPTION_LIMITLESS"),
16345 Self::UnknownValue(u) => u.0.name(),
16346 }
16347 }
16348}
16349
16350impl std::default::Default for NumericFilterOption {
16351 fn default() -> Self {
16352 use std::convert::From;
16353 Self::from(0)
16354 }
16355}
16356
16357impl std::fmt::Display for NumericFilterOption {
16358 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16359 wkt::internal::display_enum(f, self.name(), self.value())
16360 }
16361}
16362
16363impl std::convert::From<i32> for NumericFilterOption {
16364 fn from(value: i32) -> Self {
16365 match value {
16366 0 => Self::Unspecified,
16367 1 => Self::All,
16368 2 => Self::Limit,
16369 3 => Self::Limitless,
16370 _ => Self::UnknownValue(numeric_filter_option::UnknownValue(
16371 wkt::internal::UnknownEnumValue::Integer(value),
16372 )),
16373 }
16374 }
16375}
16376
16377impl std::convert::From<&str> for NumericFilterOption {
16378 fn from(value: &str) -> Self {
16379 use std::string::ToString;
16380 match value {
16381 "NUMERIC_FILTER_OPTION_UNSPECIFIED" => Self::Unspecified,
16382 "NUMERIC_FILTER_OPTION_ALL" => Self::All,
16383 "NUMERIC_FILTER_OPTION_LIMIT" => Self::Limit,
16384 "NUMERIC_FILTER_OPTION_LIMITLESS" => Self::Limitless,
16385 _ => Self::UnknownValue(numeric_filter_option::UnknownValue(
16386 wkt::internal::UnknownEnumValue::String(value.to_string()),
16387 )),
16388 }
16389 }
16390}
16391
16392impl serde::ser::Serialize for NumericFilterOption {
16393 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16394 where
16395 S: serde::Serializer,
16396 {
16397 match self {
16398 Self::Unspecified => serializer.serialize_i32(0),
16399 Self::All => serializer.serialize_i32(1),
16400 Self::Limit => serializer.serialize_i32(2),
16401 Self::Limitless => serializer.serialize_i32(3),
16402 Self::UnknownValue(u) => u.0.serialize(serializer),
16403 }
16404 }
16405}
16406
16407impl<'de> serde::de::Deserialize<'de> for NumericFilterOption {
16408 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16409 where
16410 D: serde::Deserializer<'de>,
16411 {
16412 deserializer.deserialize_any(wkt::internal::EnumVisitor::<NumericFilterOption>::new(
16413 ".google.cloud.clouddms.v1.NumericFilterOption",
16414 ))
16415 }
16416}