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 gtype;
25extern crate iam_v1;
26extern crate lazy_static;
27extern crate location;
28extern crate reqwest;
29extern crate rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct DataEncryptionState {
45 pub kms_key_version_name: std::string::String,
48
49 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50}
51
52impl DataEncryptionState {
53 pub fn new() -> Self {
54 std::default::Default::default()
55 }
56
57 pub fn set_kms_key_version_name<T: std::convert::Into<std::string::String>>(
59 mut self,
60 v: T,
61 ) -> Self {
62 self.kms_key_version_name = v.into();
63 self
64 }
65}
66
67impl wkt::message::Message for DataEncryptionState {
68 fn typename() -> &'static str {
69 "type.googleapis.com/google.cloud.dataform.v1.DataEncryptionState"
70 }
71}
72
73#[derive(Clone, Default, PartialEq)]
75#[non_exhaustive]
76pub struct Repository {
77 pub name: std::string::String,
79
80 pub create_time: std::option::Option<wkt::Timestamp>,
82
83 pub display_name: std::string::String,
85
86 pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
88
89 pub npmrc_environment_variables_secret_version: std::string::String,
94
95 pub workspace_compilation_overrides:
100 std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
101
102 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
104
105 pub set_authenticated_user_admin: bool,
108
109 pub service_account: std::string::String,
111
112 pub kms_key_name: std::string::String,
118
119 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
122
123 pub internal_metadata: std::option::Option<std::string::String>,
127
128 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
129}
130
131impl Repository {
132 pub fn new() -> Self {
133 std::default::Default::default()
134 }
135
136 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
138 self.name = v.into();
139 self
140 }
141
142 pub fn set_create_time<T>(mut self, v: T) -> Self
144 where
145 T: std::convert::Into<wkt::Timestamp>,
146 {
147 self.create_time = std::option::Option::Some(v.into());
148 self
149 }
150
151 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
153 where
154 T: std::convert::Into<wkt::Timestamp>,
155 {
156 self.create_time = v.map(|x| x.into());
157 self
158 }
159
160 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
162 self.display_name = v.into();
163 self
164 }
165
166 pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
168 where
169 T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
170 {
171 self.git_remote_settings = std::option::Option::Some(v.into());
172 self
173 }
174
175 pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
177 where
178 T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
179 {
180 self.git_remote_settings = v.map(|x| x.into());
181 self
182 }
183
184 pub fn set_npmrc_environment_variables_secret_version<
186 T: std::convert::Into<std::string::String>,
187 >(
188 mut self,
189 v: T,
190 ) -> Self {
191 self.npmrc_environment_variables_secret_version = v.into();
192 self
193 }
194
195 pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
197 where
198 T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
199 {
200 self.workspace_compilation_overrides = std::option::Option::Some(v.into());
201 self
202 }
203
204 pub fn set_or_clear_workspace_compilation_overrides<T>(
206 mut self,
207 v: std::option::Option<T>,
208 ) -> Self
209 where
210 T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
211 {
212 self.workspace_compilation_overrides = v.map(|x| x.into());
213 self
214 }
215
216 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
218 where
219 T: std::iter::IntoIterator<Item = (K, V)>,
220 K: std::convert::Into<std::string::String>,
221 V: std::convert::Into<std::string::String>,
222 {
223 use std::iter::Iterator;
224 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
225 self
226 }
227
228 pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
230 self.set_authenticated_user_admin = v.into();
231 self
232 }
233
234 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
236 self.service_account = v.into();
237 self
238 }
239
240 pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
242 self.kms_key_name = v.into();
243 self
244 }
245
246 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
248 where
249 T: std::convert::Into<crate::model::DataEncryptionState>,
250 {
251 self.data_encryption_state = std::option::Option::Some(v.into());
252 self
253 }
254
255 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
257 where
258 T: std::convert::Into<crate::model::DataEncryptionState>,
259 {
260 self.data_encryption_state = v.map(|x| x.into());
261 self
262 }
263
264 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
266 where
267 T: std::convert::Into<std::string::String>,
268 {
269 self.internal_metadata = std::option::Option::Some(v.into());
270 self
271 }
272
273 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
275 where
276 T: std::convert::Into<std::string::String>,
277 {
278 self.internal_metadata = v.map(|x| x.into());
279 self
280 }
281}
282
283impl wkt::message::Message for Repository {
284 fn typename() -> &'static str {
285 "type.googleapis.com/google.cloud.dataform.v1.Repository"
286 }
287}
288
289pub mod repository {
291 #[allow(unused_imports)]
292 use super::*;
293
294 #[derive(Clone, Default, PartialEq)]
296 #[non_exhaustive]
297 pub struct GitRemoteSettings {
298 pub url: std::string::String,
300
301 pub default_branch: std::string::String,
303
304 pub authentication_token_secret_version: std::string::String,
308
309 pub ssh_authentication_config: std::option::Option<
311 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
312 >,
313
314 #[deprecated]
317 pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
318
319 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
320 }
321
322 impl GitRemoteSettings {
323 pub fn new() -> Self {
324 std::default::Default::default()
325 }
326
327 pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
329 self.url = v.into();
330 self
331 }
332
333 pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
335 mut self,
336 v: T,
337 ) -> Self {
338 self.default_branch = v.into();
339 self
340 }
341
342 pub fn set_authentication_token_secret_version<
344 T: std::convert::Into<std::string::String>,
345 >(
346 mut self,
347 v: T,
348 ) -> Self {
349 self.authentication_token_secret_version = v.into();
350 self
351 }
352
353 pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
355 where
356 T: std::convert::Into<
357 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
358 >,
359 {
360 self.ssh_authentication_config = std::option::Option::Some(v.into());
361 self
362 }
363
364 pub fn set_or_clear_ssh_authentication_config<T>(
366 mut self,
367 v: std::option::Option<T>,
368 ) -> Self
369 where
370 T: std::convert::Into<
371 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
372 >,
373 {
374 self.ssh_authentication_config = v.map(|x| x.into());
375 self
376 }
377
378 #[deprecated]
380 pub fn set_token_status<
381 T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
382 >(
383 mut self,
384 v: T,
385 ) -> Self {
386 self.token_status = v.into();
387 self
388 }
389 }
390
391 impl wkt::message::Message for GitRemoteSettings {
392 fn typename() -> &'static str {
393 "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
394 }
395 }
396
397 pub mod git_remote_settings {
399 #[allow(unused_imports)]
400 use super::*;
401
402 #[derive(Clone, Default, PartialEq)]
404 #[non_exhaustive]
405 pub struct SshAuthenticationConfig {
406 pub user_private_key_secret_version: std::string::String,
410
411 pub host_public_key: std::string::String,
414
415 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
416 }
417
418 impl SshAuthenticationConfig {
419 pub fn new() -> Self {
420 std::default::Default::default()
421 }
422
423 pub fn set_user_private_key_secret_version<
425 T: std::convert::Into<std::string::String>,
426 >(
427 mut self,
428 v: T,
429 ) -> Self {
430 self.user_private_key_secret_version = v.into();
431 self
432 }
433
434 pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
436 mut self,
437 v: T,
438 ) -> Self {
439 self.host_public_key = v.into();
440 self
441 }
442 }
443
444 impl wkt::message::Message for SshAuthenticationConfig {
445 fn typename() -> &'static str {
446 "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
447 }
448 }
449
450 #[derive(Clone, Debug, PartialEq)]
466 #[non_exhaustive]
467 pub enum TokenStatus {
468 Unspecified,
470 NotFound,
473 Invalid,
475 Valid,
477 UnknownValue(token_status::UnknownValue),
482 }
483
484 #[doc(hidden)]
485 pub mod token_status {
486 #[allow(unused_imports)]
487 use super::*;
488 #[derive(Clone, Debug, PartialEq)]
489 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
490 }
491
492 impl TokenStatus {
493 pub fn value(&self) -> std::option::Option<i32> {
498 match self {
499 Self::Unspecified => std::option::Option::Some(0),
500 Self::NotFound => std::option::Option::Some(1),
501 Self::Invalid => std::option::Option::Some(2),
502 Self::Valid => std::option::Option::Some(3),
503 Self::UnknownValue(u) => u.0.value(),
504 }
505 }
506
507 pub fn name(&self) -> std::option::Option<&str> {
512 match self {
513 Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
514 Self::NotFound => std::option::Option::Some("NOT_FOUND"),
515 Self::Invalid => std::option::Option::Some("INVALID"),
516 Self::Valid => std::option::Option::Some("VALID"),
517 Self::UnknownValue(u) => u.0.name(),
518 }
519 }
520 }
521
522 impl std::default::Default for TokenStatus {
523 fn default() -> Self {
524 use std::convert::From;
525 Self::from(0)
526 }
527 }
528
529 impl std::fmt::Display for TokenStatus {
530 fn fmt(
531 &self,
532 f: &mut std::fmt::Formatter<'_>,
533 ) -> std::result::Result<(), std::fmt::Error> {
534 wkt::internal::display_enum(f, self.name(), self.value())
535 }
536 }
537
538 impl std::convert::From<i32> for TokenStatus {
539 fn from(value: i32) -> Self {
540 match value {
541 0 => Self::Unspecified,
542 1 => Self::NotFound,
543 2 => Self::Invalid,
544 3 => Self::Valid,
545 _ => Self::UnknownValue(token_status::UnknownValue(
546 wkt::internal::UnknownEnumValue::Integer(value),
547 )),
548 }
549 }
550 }
551
552 impl std::convert::From<&str> for TokenStatus {
553 fn from(value: &str) -> Self {
554 use std::string::ToString;
555 match value {
556 "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
557 "NOT_FOUND" => Self::NotFound,
558 "INVALID" => Self::Invalid,
559 "VALID" => Self::Valid,
560 _ => Self::UnknownValue(token_status::UnknownValue(
561 wkt::internal::UnknownEnumValue::String(value.to_string()),
562 )),
563 }
564 }
565 }
566
567 impl serde::ser::Serialize for TokenStatus {
568 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
569 where
570 S: serde::Serializer,
571 {
572 match self {
573 Self::Unspecified => serializer.serialize_i32(0),
574 Self::NotFound => serializer.serialize_i32(1),
575 Self::Invalid => serializer.serialize_i32(2),
576 Self::Valid => serializer.serialize_i32(3),
577 Self::UnknownValue(u) => u.0.serialize(serializer),
578 }
579 }
580 }
581
582 impl<'de> serde::de::Deserialize<'de> for TokenStatus {
583 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
584 where
585 D: serde::Deserializer<'de>,
586 {
587 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
588 ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
589 ))
590 }
591 }
592 }
593
594 #[derive(Clone, Default, PartialEq)]
596 #[non_exhaustive]
597 pub struct WorkspaceCompilationOverrides {
598 pub default_database: std::string::String,
600
601 pub schema_suffix: std::string::String,
604
605 pub table_prefix: std::string::String,
607
608 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
609 }
610
611 impl WorkspaceCompilationOverrides {
612 pub fn new() -> Self {
613 std::default::Default::default()
614 }
615
616 pub fn set_default_database<T: std::convert::Into<std::string::String>>(
618 mut self,
619 v: T,
620 ) -> Self {
621 self.default_database = v.into();
622 self
623 }
624
625 pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
627 mut self,
628 v: T,
629 ) -> Self {
630 self.schema_suffix = v.into();
631 self
632 }
633
634 pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
636 mut self,
637 v: T,
638 ) -> Self {
639 self.table_prefix = v.into();
640 self
641 }
642 }
643
644 impl wkt::message::Message for WorkspaceCompilationOverrides {
645 fn typename() -> &'static str {
646 "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
647 }
648 }
649}
650
651#[derive(Clone, Default, PartialEq)]
653#[non_exhaustive]
654pub struct ListRepositoriesRequest {
655 pub parent: std::string::String,
658
659 pub page_size: i32,
663
664 pub page_token: std::string::String,
671
672 pub order_by: std::string::String,
676
677 pub filter: std::string::String,
679
680 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
681}
682
683impl ListRepositoriesRequest {
684 pub fn new() -> Self {
685 std::default::Default::default()
686 }
687
688 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
690 self.parent = v.into();
691 self
692 }
693
694 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
696 self.page_size = v.into();
697 self
698 }
699
700 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
702 self.page_token = v.into();
703 self
704 }
705
706 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
708 self.order_by = v.into();
709 self
710 }
711
712 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
714 self.filter = v.into();
715 self
716 }
717}
718
719impl wkt::message::Message for ListRepositoriesRequest {
720 fn typename() -> &'static str {
721 "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
722 }
723}
724
725#[derive(Clone, Default, PartialEq)]
727#[non_exhaustive]
728pub struct ListRepositoriesResponse {
729 pub repositories: std::vec::Vec<crate::model::Repository>,
731
732 pub next_page_token: std::string::String,
735
736 pub unreachable: std::vec::Vec<std::string::String>,
738
739 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
740}
741
742impl ListRepositoriesResponse {
743 pub fn new() -> Self {
744 std::default::Default::default()
745 }
746
747 pub fn set_repositories<T, V>(mut self, v: T) -> Self
749 where
750 T: std::iter::IntoIterator<Item = V>,
751 V: std::convert::Into<crate::model::Repository>,
752 {
753 use std::iter::Iterator;
754 self.repositories = v.into_iter().map(|i| i.into()).collect();
755 self
756 }
757
758 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
760 self.next_page_token = v.into();
761 self
762 }
763
764 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
766 where
767 T: std::iter::IntoIterator<Item = V>,
768 V: std::convert::Into<std::string::String>,
769 {
770 use std::iter::Iterator;
771 self.unreachable = v.into_iter().map(|i| i.into()).collect();
772 self
773 }
774}
775
776impl wkt::message::Message for ListRepositoriesResponse {
777 fn typename() -> &'static str {
778 "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
779 }
780}
781
782#[doc(hidden)]
783impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
784 type PageItem = crate::model::Repository;
785
786 fn items(self) -> std::vec::Vec<Self::PageItem> {
787 self.repositories
788 }
789
790 fn next_page_token(&self) -> std::string::String {
791 use std::clone::Clone;
792 self.next_page_token.clone()
793 }
794}
795
796#[derive(Clone, Default, PartialEq)]
798#[non_exhaustive]
799pub struct GetRepositoryRequest {
800 pub name: std::string::String,
802
803 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
804}
805
806impl GetRepositoryRequest {
807 pub fn new() -> Self {
808 std::default::Default::default()
809 }
810
811 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
813 self.name = v.into();
814 self
815 }
816}
817
818impl wkt::message::Message for GetRepositoryRequest {
819 fn typename() -> &'static str {
820 "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
821 }
822}
823
824#[derive(Clone, Default, PartialEq)]
826#[non_exhaustive]
827pub struct CreateRepositoryRequest {
828 pub parent: std::string::String,
831
832 pub repository: std::option::Option<crate::model::Repository>,
834
835 pub repository_id: std::string::String,
838
839 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
840}
841
842impl CreateRepositoryRequest {
843 pub fn new() -> Self {
844 std::default::Default::default()
845 }
846
847 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
849 self.parent = v.into();
850 self
851 }
852
853 pub fn set_repository<T>(mut self, v: T) -> Self
855 where
856 T: std::convert::Into<crate::model::Repository>,
857 {
858 self.repository = std::option::Option::Some(v.into());
859 self
860 }
861
862 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
864 where
865 T: std::convert::Into<crate::model::Repository>,
866 {
867 self.repository = v.map(|x| x.into());
868 self
869 }
870
871 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
873 self.repository_id = v.into();
874 self
875 }
876}
877
878impl wkt::message::Message for CreateRepositoryRequest {
879 fn typename() -> &'static str {
880 "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
881 }
882}
883
884#[derive(Clone, Default, PartialEq)]
886#[non_exhaustive]
887pub struct UpdateRepositoryRequest {
888 pub update_mask: std::option::Option<wkt::FieldMask>,
891
892 pub repository: std::option::Option<crate::model::Repository>,
894
895 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
896}
897
898impl UpdateRepositoryRequest {
899 pub fn new() -> Self {
900 std::default::Default::default()
901 }
902
903 pub fn set_update_mask<T>(mut self, v: T) -> Self
905 where
906 T: std::convert::Into<wkt::FieldMask>,
907 {
908 self.update_mask = std::option::Option::Some(v.into());
909 self
910 }
911
912 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
914 where
915 T: std::convert::Into<wkt::FieldMask>,
916 {
917 self.update_mask = v.map(|x| x.into());
918 self
919 }
920
921 pub fn set_repository<T>(mut self, v: T) -> Self
923 where
924 T: std::convert::Into<crate::model::Repository>,
925 {
926 self.repository = std::option::Option::Some(v.into());
927 self
928 }
929
930 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
932 where
933 T: std::convert::Into<crate::model::Repository>,
934 {
935 self.repository = v.map(|x| x.into());
936 self
937 }
938}
939
940impl wkt::message::Message for UpdateRepositoryRequest {
941 fn typename() -> &'static str {
942 "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
943 }
944}
945
946#[derive(Clone, Default, PartialEq)]
948#[non_exhaustive]
949pub struct DeleteRepositoryRequest {
950 pub name: std::string::String,
952
953 pub force: bool,
957
958 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
959}
960
961impl DeleteRepositoryRequest {
962 pub fn new() -> Self {
963 std::default::Default::default()
964 }
965
966 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
968 self.name = v.into();
969 self
970 }
971
972 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
974 self.force = v.into();
975 self
976 }
977}
978
979impl wkt::message::Message for DeleteRepositoryRequest {
980 fn typename() -> &'static str {
981 "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
982 }
983}
984
985#[derive(Clone, Default, PartialEq)]
987#[non_exhaustive]
988pub struct CommitRepositoryChangesRequest {
989 pub name: std::string::String,
991
992 pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
994
995 pub required_head_commit_sha: std::string::String,
999
1000 pub file_operations: std::collections::HashMap<
1003 std::string::String,
1004 crate::model::commit_repository_changes_request::FileOperation,
1005 >,
1006
1007 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1008}
1009
1010impl CommitRepositoryChangesRequest {
1011 pub fn new() -> Self {
1012 std::default::Default::default()
1013 }
1014
1015 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1017 self.name = v.into();
1018 self
1019 }
1020
1021 pub fn set_commit_metadata<T>(mut self, v: T) -> Self
1023 where
1024 T: std::convert::Into<crate::model::CommitMetadata>,
1025 {
1026 self.commit_metadata = std::option::Option::Some(v.into());
1027 self
1028 }
1029
1030 pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
1032 where
1033 T: std::convert::Into<crate::model::CommitMetadata>,
1034 {
1035 self.commit_metadata = v.map(|x| x.into());
1036 self
1037 }
1038
1039 pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
1041 mut self,
1042 v: T,
1043 ) -> Self {
1044 self.required_head_commit_sha = v.into();
1045 self
1046 }
1047
1048 pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
1050 where
1051 T: std::iter::IntoIterator<Item = (K, V)>,
1052 K: std::convert::Into<std::string::String>,
1053 V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
1054 {
1055 use std::iter::Iterator;
1056 self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1057 self
1058 }
1059}
1060
1061impl wkt::message::Message for CommitRepositoryChangesRequest {
1062 fn typename() -> &'static str {
1063 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
1064 }
1065}
1066
1067pub mod commit_repository_changes_request {
1069 #[allow(unused_imports)]
1070 use super::*;
1071
1072 #[derive(Clone, Default, PartialEq)]
1074 #[non_exhaustive]
1075 pub struct FileOperation {
1076 pub operation: std::option::Option<
1078 crate::model::commit_repository_changes_request::file_operation::Operation,
1079 >,
1080
1081 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1082 }
1083
1084 impl FileOperation {
1085 pub fn new() -> Self {
1086 std::default::Default::default()
1087 }
1088
1089 pub fn set_operation<
1094 T: std::convert::Into<
1095 std::option::Option<
1096 crate::model::commit_repository_changes_request::file_operation::Operation,
1097 >,
1098 >,
1099 >(
1100 mut self,
1101 v: T,
1102 ) -> Self {
1103 self.operation = v.into();
1104 self
1105 }
1106
1107 pub fn write_file(
1111 &self,
1112 ) -> std::option::Option<
1113 &std::boxed::Box<
1114 crate::model::commit_repository_changes_request::file_operation::WriteFile,
1115 >,
1116 > {
1117 #[allow(unreachable_patterns)]
1118 self.operation.as_ref().and_then(|v| match v {
1119 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
1120 _ => std::option::Option::None,
1121 })
1122 }
1123
1124 pub fn set_write_file<
1130 T: std::convert::Into<
1131 std::boxed::Box<
1132 crate::model::commit_repository_changes_request::file_operation::WriteFile,
1133 >,
1134 >,
1135 >(
1136 mut self,
1137 v: T,
1138 ) -> Self {
1139 self.operation = std::option::Option::Some(
1140 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
1141 v.into()
1142 )
1143 );
1144 self
1145 }
1146
1147 pub fn delete_file(
1151 &self,
1152 ) -> std::option::Option<
1153 &std::boxed::Box<
1154 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1155 >,
1156 > {
1157 #[allow(unreachable_patterns)]
1158 self.operation.as_ref().and_then(|v| match v {
1159 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
1160 _ => std::option::Option::None,
1161 })
1162 }
1163
1164 pub fn set_delete_file<
1170 T: std::convert::Into<
1171 std::boxed::Box<
1172 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1173 >,
1174 >,
1175 >(
1176 mut self,
1177 v: T,
1178 ) -> Self {
1179 self.operation = std::option::Option::Some(
1180 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
1181 v.into()
1182 )
1183 );
1184 self
1185 }
1186 }
1187
1188 impl wkt::message::Message for FileOperation {
1189 fn typename() -> &'static str {
1190 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
1191 }
1192 }
1193
1194 pub mod file_operation {
1196 #[allow(unused_imports)]
1197 use super::*;
1198
1199 #[derive(Clone, Default, PartialEq)]
1201 #[non_exhaustive]
1202 pub struct WriteFile {
1203 pub contents: ::bytes::Bytes,
1205
1206 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1207 }
1208
1209 impl WriteFile {
1210 pub fn new() -> Self {
1211 std::default::Default::default()
1212 }
1213
1214 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1216 self.contents = v.into();
1217 self
1218 }
1219 }
1220
1221 impl wkt::message::Message for WriteFile {
1222 fn typename() -> &'static str {
1223 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
1224 }
1225 }
1226
1227 #[derive(Clone, Default, PartialEq)]
1229 #[non_exhaustive]
1230 pub struct DeleteFile {
1231 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1232 }
1233
1234 impl DeleteFile {
1235 pub fn new() -> Self {
1236 std::default::Default::default()
1237 }
1238 }
1239
1240 impl wkt::message::Message for DeleteFile {
1241 fn typename() -> &'static str {
1242 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
1243 }
1244 }
1245
1246 #[derive(Clone, Debug, PartialEq)]
1248 #[non_exhaustive]
1249 pub enum Operation {
1250 WriteFile(
1252 std::boxed::Box<
1253 crate::model::commit_repository_changes_request::file_operation::WriteFile,
1254 >,
1255 ),
1256 DeleteFile(
1258 std::boxed::Box<
1259 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1260 >,
1261 ),
1262 }
1263 }
1264}
1265
1266#[derive(Clone, Default, PartialEq)]
1268#[non_exhaustive]
1269pub struct CommitRepositoryChangesResponse {
1270 pub commit_sha: std::string::String,
1272
1273 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1274}
1275
1276impl CommitRepositoryChangesResponse {
1277 pub fn new() -> Self {
1278 std::default::Default::default()
1279 }
1280
1281 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1283 self.commit_sha = v.into();
1284 self
1285 }
1286}
1287
1288impl wkt::message::Message for CommitRepositoryChangesResponse {
1289 fn typename() -> &'static str {
1290 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
1291 }
1292}
1293
1294#[derive(Clone, Default, PartialEq)]
1296#[non_exhaustive]
1297pub struct ReadRepositoryFileRequest {
1298 pub name: std::string::String,
1300
1301 pub commit_sha: std::string::String,
1304
1305 pub path: std::string::String,
1307
1308 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1309}
1310
1311impl ReadRepositoryFileRequest {
1312 pub fn new() -> Self {
1313 std::default::Default::default()
1314 }
1315
1316 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1318 self.name = v.into();
1319 self
1320 }
1321
1322 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1324 self.commit_sha = v.into();
1325 self
1326 }
1327
1328 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1330 self.path = v.into();
1331 self
1332 }
1333}
1334
1335impl wkt::message::Message for ReadRepositoryFileRequest {
1336 fn typename() -> &'static str {
1337 "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
1338 }
1339}
1340
1341#[derive(Clone, Default, PartialEq)]
1343#[non_exhaustive]
1344pub struct ReadRepositoryFileResponse {
1345 pub contents: ::bytes::Bytes,
1347
1348 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1349}
1350
1351impl ReadRepositoryFileResponse {
1352 pub fn new() -> Self {
1353 std::default::Default::default()
1354 }
1355
1356 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1358 self.contents = v.into();
1359 self
1360 }
1361}
1362
1363impl wkt::message::Message for ReadRepositoryFileResponse {
1364 fn typename() -> &'static str {
1365 "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
1366 }
1367}
1368
1369#[derive(Clone, Default, PartialEq)]
1371#[non_exhaustive]
1372pub struct QueryRepositoryDirectoryContentsRequest {
1373 pub name: std::string::String,
1375
1376 pub commit_sha: std::string::String,
1379
1380 pub path: std::string::String,
1383
1384 pub page_size: i32,
1388
1389 pub page_token: std::string::String,
1397
1398 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1399}
1400
1401impl QueryRepositoryDirectoryContentsRequest {
1402 pub fn new() -> Self {
1403 std::default::Default::default()
1404 }
1405
1406 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1408 self.name = v.into();
1409 self
1410 }
1411
1412 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1414 self.commit_sha = v.into();
1415 self
1416 }
1417
1418 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1420 self.path = v.into();
1421 self
1422 }
1423
1424 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1426 self.page_size = v.into();
1427 self
1428 }
1429
1430 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1432 self.page_token = v.into();
1433 self
1434 }
1435}
1436
1437impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
1438 fn typename() -> &'static str {
1439 "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
1440 }
1441}
1442
1443#[derive(Clone, Default, PartialEq)]
1445#[non_exhaustive]
1446pub struct QueryRepositoryDirectoryContentsResponse {
1447 pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
1449
1450 pub next_page_token: std::string::String,
1453
1454 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1455}
1456
1457impl QueryRepositoryDirectoryContentsResponse {
1458 pub fn new() -> Self {
1459 std::default::Default::default()
1460 }
1461
1462 pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
1464 where
1465 T: std::iter::IntoIterator<Item = V>,
1466 V: std::convert::Into<crate::model::DirectoryEntry>,
1467 {
1468 use std::iter::Iterator;
1469 self.directory_entries = v.into_iter().map(|i| i.into()).collect();
1470 self
1471 }
1472
1473 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1475 self.next_page_token = v.into();
1476 self
1477 }
1478}
1479
1480impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
1481 fn typename() -> &'static str {
1482 "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
1483 }
1484}
1485
1486#[doc(hidden)]
1487impl gax::paginator::internal::PageableResponse for QueryRepositoryDirectoryContentsResponse {
1488 type PageItem = crate::model::DirectoryEntry;
1489
1490 fn items(self) -> std::vec::Vec<Self::PageItem> {
1491 self.directory_entries
1492 }
1493
1494 fn next_page_token(&self) -> std::string::String {
1495 use std::clone::Clone;
1496 self.next_page_token.clone()
1497 }
1498}
1499
1500#[derive(Clone, Default, PartialEq)]
1502#[non_exhaustive]
1503pub struct FetchRepositoryHistoryRequest {
1504 pub name: std::string::String,
1506
1507 pub page_size: i32,
1511
1512 pub page_token: std::string::String,
1519
1520 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1521}
1522
1523impl FetchRepositoryHistoryRequest {
1524 pub fn new() -> Self {
1525 std::default::Default::default()
1526 }
1527
1528 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1530 self.name = v.into();
1531 self
1532 }
1533
1534 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1536 self.page_size = v.into();
1537 self
1538 }
1539
1540 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1542 self.page_token = v.into();
1543 self
1544 }
1545}
1546
1547impl wkt::message::Message for FetchRepositoryHistoryRequest {
1548 fn typename() -> &'static str {
1549 "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
1550 }
1551}
1552
1553#[derive(Clone, Default, PartialEq)]
1555#[non_exhaustive]
1556pub struct FetchRepositoryHistoryResponse {
1557 pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
1559
1560 pub next_page_token: std::string::String,
1563
1564 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1565}
1566
1567impl FetchRepositoryHistoryResponse {
1568 pub fn new() -> Self {
1569 std::default::Default::default()
1570 }
1571
1572 pub fn set_commits<T, V>(mut self, v: T) -> Self
1574 where
1575 T: std::iter::IntoIterator<Item = V>,
1576 V: std::convert::Into<crate::model::CommitLogEntry>,
1577 {
1578 use std::iter::Iterator;
1579 self.commits = v.into_iter().map(|i| i.into()).collect();
1580 self
1581 }
1582
1583 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1585 self.next_page_token = v.into();
1586 self
1587 }
1588}
1589
1590impl wkt::message::Message for FetchRepositoryHistoryResponse {
1591 fn typename() -> &'static str {
1592 "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
1593 }
1594}
1595
1596#[doc(hidden)]
1597impl gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
1598 type PageItem = crate::model::CommitLogEntry;
1599
1600 fn items(self) -> std::vec::Vec<Self::PageItem> {
1601 self.commits
1602 }
1603
1604 fn next_page_token(&self) -> std::string::String {
1605 use std::clone::Clone;
1606 self.next_page_token.clone()
1607 }
1608}
1609
1610#[derive(Clone, Default, PartialEq)]
1612#[non_exhaustive]
1613pub struct CommitLogEntry {
1614 pub commit_time: std::option::Option<wkt::Timestamp>,
1616
1617 pub commit_sha: std::string::String,
1619
1620 pub author: std::option::Option<crate::model::CommitAuthor>,
1622
1623 pub commit_message: std::string::String,
1625
1626 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1627}
1628
1629impl CommitLogEntry {
1630 pub fn new() -> Self {
1631 std::default::Default::default()
1632 }
1633
1634 pub fn set_commit_time<T>(mut self, v: T) -> Self
1636 where
1637 T: std::convert::Into<wkt::Timestamp>,
1638 {
1639 self.commit_time = std::option::Option::Some(v.into());
1640 self
1641 }
1642
1643 pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
1645 where
1646 T: std::convert::Into<wkt::Timestamp>,
1647 {
1648 self.commit_time = v.map(|x| x.into());
1649 self
1650 }
1651
1652 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1654 self.commit_sha = v.into();
1655 self
1656 }
1657
1658 pub fn set_author<T>(mut self, v: T) -> Self
1660 where
1661 T: std::convert::Into<crate::model::CommitAuthor>,
1662 {
1663 self.author = std::option::Option::Some(v.into());
1664 self
1665 }
1666
1667 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
1669 where
1670 T: std::convert::Into<crate::model::CommitAuthor>,
1671 {
1672 self.author = v.map(|x| x.into());
1673 self
1674 }
1675
1676 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1678 self.commit_message = v.into();
1679 self
1680 }
1681}
1682
1683impl wkt::message::Message for CommitLogEntry {
1684 fn typename() -> &'static str {
1685 "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
1686 }
1687}
1688
1689#[derive(Clone, Default, PartialEq)]
1691#[non_exhaustive]
1692pub struct CommitMetadata {
1693 pub author: std::option::Option<crate::model::CommitAuthor>,
1695
1696 pub commit_message: std::string::String,
1698
1699 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1700}
1701
1702impl CommitMetadata {
1703 pub fn new() -> Self {
1704 std::default::Default::default()
1705 }
1706
1707 pub fn set_author<T>(mut self, v: T) -> Self
1709 where
1710 T: std::convert::Into<crate::model::CommitAuthor>,
1711 {
1712 self.author = std::option::Option::Some(v.into());
1713 self
1714 }
1715
1716 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
1718 where
1719 T: std::convert::Into<crate::model::CommitAuthor>,
1720 {
1721 self.author = v.map(|x| x.into());
1722 self
1723 }
1724
1725 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1727 self.commit_message = v.into();
1728 self
1729 }
1730}
1731
1732impl wkt::message::Message for CommitMetadata {
1733 fn typename() -> &'static str {
1734 "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
1735 }
1736}
1737
1738#[derive(Clone, Default, PartialEq)]
1740#[non_exhaustive]
1741pub struct ComputeRepositoryAccessTokenStatusRequest {
1742 pub name: std::string::String,
1744
1745 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1746}
1747
1748impl ComputeRepositoryAccessTokenStatusRequest {
1749 pub fn new() -> Self {
1750 std::default::Default::default()
1751 }
1752
1753 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1755 self.name = v.into();
1756 self
1757 }
1758}
1759
1760impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
1761 fn typename() -> &'static str {
1762 "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
1763 }
1764}
1765
1766#[derive(Clone, Default, PartialEq)]
1768#[non_exhaustive]
1769pub struct ComputeRepositoryAccessTokenStatusResponse {
1770 pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
1772
1773 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1774}
1775
1776impl ComputeRepositoryAccessTokenStatusResponse {
1777 pub fn new() -> Self {
1778 std::default::Default::default()
1779 }
1780
1781 pub fn set_token_status<
1783 T: std::convert::Into<
1784 crate::model::compute_repository_access_token_status_response::TokenStatus,
1785 >,
1786 >(
1787 mut self,
1788 v: T,
1789 ) -> Self {
1790 self.token_status = v.into();
1791 self
1792 }
1793}
1794
1795impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
1796 fn typename() -> &'static str {
1797 "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
1798 }
1799}
1800
1801pub mod compute_repository_access_token_status_response {
1803 #[allow(unused_imports)]
1804 use super::*;
1805
1806 #[derive(Clone, Debug, PartialEq)]
1822 #[non_exhaustive]
1823 pub enum TokenStatus {
1824 Unspecified,
1826 NotFound,
1829 Invalid,
1831 Valid,
1833 UnknownValue(token_status::UnknownValue),
1838 }
1839
1840 #[doc(hidden)]
1841 pub mod token_status {
1842 #[allow(unused_imports)]
1843 use super::*;
1844 #[derive(Clone, Debug, PartialEq)]
1845 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1846 }
1847
1848 impl TokenStatus {
1849 pub fn value(&self) -> std::option::Option<i32> {
1854 match self {
1855 Self::Unspecified => std::option::Option::Some(0),
1856 Self::NotFound => std::option::Option::Some(1),
1857 Self::Invalid => std::option::Option::Some(2),
1858 Self::Valid => std::option::Option::Some(3),
1859 Self::UnknownValue(u) => u.0.value(),
1860 }
1861 }
1862
1863 pub fn name(&self) -> std::option::Option<&str> {
1868 match self {
1869 Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
1870 Self::NotFound => std::option::Option::Some("NOT_FOUND"),
1871 Self::Invalid => std::option::Option::Some("INVALID"),
1872 Self::Valid => std::option::Option::Some("VALID"),
1873 Self::UnknownValue(u) => u.0.name(),
1874 }
1875 }
1876 }
1877
1878 impl std::default::Default for TokenStatus {
1879 fn default() -> Self {
1880 use std::convert::From;
1881 Self::from(0)
1882 }
1883 }
1884
1885 impl std::fmt::Display for TokenStatus {
1886 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1887 wkt::internal::display_enum(f, self.name(), self.value())
1888 }
1889 }
1890
1891 impl std::convert::From<i32> for TokenStatus {
1892 fn from(value: i32) -> Self {
1893 match value {
1894 0 => Self::Unspecified,
1895 1 => Self::NotFound,
1896 2 => Self::Invalid,
1897 3 => Self::Valid,
1898 _ => Self::UnknownValue(token_status::UnknownValue(
1899 wkt::internal::UnknownEnumValue::Integer(value),
1900 )),
1901 }
1902 }
1903 }
1904
1905 impl std::convert::From<&str> for TokenStatus {
1906 fn from(value: &str) -> Self {
1907 use std::string::ToString;
1908 match value {
1909 "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
1910 "NOT_FOUND" => Self::NotFound,
1911 "INVALID" => Self::Invalid,
1912 "VALID" => Self::Valid,
1913 _ => Self::UnknownValue(token_status::UnknownValue(
1914 wkt::internal::UnknownEnumValue::String(value.to_string()),
1915 )),
1916 }
1917 }
1918 }
1919
1920 impl serde::ser::Serialize for TokenStatus {
1921 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1922 where
1923 S: serde::Serializer,
1924 {
1925 match self {
1926 Self::Unspecified => serializer.serialize_i32(0),
1927 Self::NotFound => serializer.serialize_i32(1),
1928 Self::Invalid => serializer.serialize_i32(2),
1929 Self::Valid => serializer.serialize_i32(3),
1930 Self::UnknownValue(u) => u.0.serialize(serializer),
1931 }
1932 }
1933 }
1934
1935 impl<'de> serde::de::Deserialize<'de> for TokenStatus {
1936 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1937 where
1938 D: serde::Deserializer<'de>,
1939 {
1940 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
1941 ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
1942 ))
1943 }
1944 }
1945}
1946
1947#[derive(Clone, Default, PartialEq)]
1949#[non_exhaustive]
1950pub struct FetchRemoteBranchesRequest {
1951 pub name: std::string::String,
1953
1954 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1955}
1956
1957impl FetchRemoteBranchesRequest {
1958 pub fn new() -> Self {
1959 std::default::Default::default()
1960 }
1961
1962 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1964 self.name = v.into();
1965 self
1966 }
1967}
1968
1969impl wkt::message::Message for FetchRemoteBranchesRequest {
1970 fn typename() -> &'static str {
1971 "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
1972 }
1973}
1974
1975#[derive(Clone, Default, PartialEq)]
1977#[non_exhaustive]
1978pub struct FetchRemoteBranchesResponse {
1979 pub branches: std::vec::Vec<std::string::String>,
1981
1982 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1983}
1984
1985impl FetchRemoteBranchesResponse {
1986 pub fn new() -> Self {
1987 std::default::Default::default()
1988 }
1989
1990 pub fn set_branches<T, V>(mut self, v: T) -> Self
1992 where
1993 T: std::iter::IntoIterator<Item = V>,
1994 V: std::convert::Into<std::string::String>,
1995 {
1996 use std::iter::Iterator;
1997 self.branches = v.into_iter().map(|i| i.into()).collect();
1998 self
1999 }
2000}
2001
2002impl wkt::message::Message for FetchRemoteBranchesResponse {
2003 fn typename() -> &'static str {
2004 "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
2005 }
2006}
2007
2008#[derive(Clone, Default, PartialEq)]
2010#[non_exhaustive]
2011pub struct Workspace {
2012 pub name: std::string::String,
2014
2015 pub create_time: std::option::Option<wkt::Timestamp>,
2017
2018 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
2021
2022 pub internal_metadata: std::option::Option<std::string::String>,
2026
2027 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2028}
2029
2030impl Workspace {
2031 pub fn new() -> Self {
2032 std::default::Default::default()
2033 }
2034
2035 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2037 self.name = v.into();
2038 self
2039 }
2040
2041 pub fn set_create_time<T>(mut self, v: T) -> Self
2043 where
2044 T: std::convert::Into<wkt::Timestamp>,
2045 {
2046 self.create_time = std::option::Option::Some(v.into());
2047 self
2048 }
2049
2050 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2052 where
2053 T: std::convert::Into<wkt::Timestamp>,
2054 {
2055 self.create_time = v.map(|x| x.into());
2056 self
2057 }
2058
2059 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
2061 where
2062 T: std::convert::Into<crate::model::DataEncryptionState>,
2063 {
2064 self.data_encryption_state = std::option::Option::Some(v.into());
2065 self
2066 }
2067
2068 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
2070 where
2071 T: std::convert::Into<crate::model::DataEncryptionState>,
2072 {
2073 self.data_encryption_state = v.map(|x| x.into());
2074 self
2075 }
2076
2077 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
2079 where
2080 T: std::convert::Into<std::string::String>,
2081 {
2082 self.internal_metadata = std::option::Option::Some(v.into());
2083 self
2084 }
2085
2086 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2088 where
2089 T: std::convert::Into<std::string::String>,
2090 {
2091 self.internal_metadata = v.map(|x| x.into());
2092 self
2093 }
2094}
2095
2096impl wkt::message::Message for Workspace {
2097 fn typename() -> &'static str {
2098 "type.googleapis.com/google.cloud.dataform.v1.Workspace"
2099 }
2100}
2101
2102#[derive(Clone, Default, PartialEq)]
2104#[non_exhaustive]
2105pub struct ListWorkspacesRequest {
2106 pub parent: std::string::String,
2109
2110 pub page_size: i32,
2114
2115 pub page_token: std::string::String,
2122
2123 pub order_by: std::string::String,
2127
2128 pub filter: std::string::String,
2130
2131 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2132}
2133
2134impl ListWorkspacesRequest {
2135 pub fn new() -> Self {
2136 std::default::Default::default()
2137 }
2138
2139 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2141 self.parent = v.into();
2142 self
2143 }
2144
2145 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2147 self.page_size = v.into();
2148 self
2149 }
2150
2151 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2153 self.page_token = v.into();
2154 self
2155 }
2156
2157 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2159 self.order_by = v.into();
2160 self
2161 }
2162
2163 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2165 self.filter = v.into();
2166 self
2167 }
2168}
2169
2170impl wkt::message::Message for ListWorkspacesRequest {
2171 fn typename() -> &'static str {
2172 "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
2173 }
2174}
2175
2176#[derive(Clone, Default, PartialEq)]
2178#[non_exhaustive]
2179pub struct ListWorkspacesResponse {
2180 pub workspaces: std::vec::Vec<crate::model::Workspace>,
2182
2183 pub next_page_token: std::string::String,
2186
2187 pub unreachable: std::vec::Vec<std::string::String>,
2189
2190 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2191}
2192
2193impl ListWorkspacesResponse {
2194 pub fn new() -> Self {
2195 std::default::Default::default()
2196 }
2197
2198 pub fn set_workspaces<T, V>(mut self, v: T) -> Self
2200 where
2201 T: std::iter::IntoIterator<Item = V>,
2202 V: std::convert::Into<crate::model::Workspace>,
2203 {
2204 use std::iter::Iterator;
2205 self.workspaces = v.into_iter().map(|i| i.into()).collect();
2206 self
2207 }
2208
2209 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2211 self.next_page_token = v.into();
2212 self
2213 }
2214
2215 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2217 where
2218 T: std::iter::IntoIterator<Item = V>,
2219 V: std::convert::Into<std::string::String>,
2220 {
2221 use std::iter::Iterator;
2222 self.unreachable = v.into_iter().map(|i| i.into()).collect();
2223 self
2224 }
2225}
2226
2227impl wkt::message::Message for ListWorkspacesResponse {
2228 fn typename() -> &'static str {
2229 "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
2230 }
2231}
2232
2233#[doc(hidden)]
2234impl gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
2235 type PageItem = crate::model::Workspace;
2236
2237 fn items(self) -> std::vec::Vec<Self::PageItem> {
2238 self.workspaces
2239 }
2240
2241 fn next_page_token(&self) -> std::string::String {
2242 use std::clone::Clone;
2243 self.next_page_token.clone()
2244 }
2245}
2246
2247#[derive(Clone, Default, PartialEq)]
2249#[non_exhaustive]
2250pub struct GetWorkspaceRequest {
2251 pub name: std::string::String,
2253
2254 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2255}
2256
2257impl GetWorkspaceRequest {
2258 pub fn new() -> Self {
2259 std::default::Default::default()
2260 }
2261
2262 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2264 self.name = v.into();
2265 self
2266 }
2267}
2268
2269impl wkt::message::Message for GetWorkspaceRequest {
2270 fn typename() -> &'static str {
2271 "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
2272 }
2273}
2274
2275#[derive(Clone, Default, PartialEq)]
2277#[non_exhaustive]
2278pub struct CreateWorkspaceRequest {
2279 pub parent: std::string::String,
2282
2283 pub workspace: std::option::Option<crate::model::Workspace>,
2285
2286 pub workspace_id: std::string::String,
2289
2290 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2291}
2292
2293impl CreateWorkspaceRequest {
2294 pub fn new() -> Self {
2295 std::default::Default::default()
2296 }
2297
2298 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2300 self.parent = v.into();
2301 self
2302 }
2303
2304 pub fn set_workspace<T>(mut self, v: T) -> Self
2306 where
2307 T: std::convert::Into<crate::model::Workspace>,
2308 {
2309 self.workspace = std::option::Option::Some(v.into());
2310 self
2311 }
2312
2313 pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
2315 where
2316 T: std::convert::Into<crate::model::Workspace>,
2317 {
2318 self.workspace = v.map(|x| x.into());
2319 self
2320 }
2321
2322 pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2324 self.workspace_id = v.into();
2325 self
2326 }
2327}
2328
2329impl wkt::message::Message for CreateWorkspaceRequest {
2330 fn typename() -> &'static str {
2331 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
2332 }
2333}
2334
2335#[derive(Clone, Default, PartialEq)]
2337#[non_exhaustive]
2338pub struct DeleteWorkspaceRequest {
2339 pub name: std::string::String,
2341
2342 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2343}
2344
2345impl DeleteWorkspaceRequest {
2346 pub fn new() -> Self {
2347 std::default::Default::default()
2348 }
2349
2350 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2352 self.name = v.into();
2353 self
2354 }
2355}
2356
2357impl wkt::message::Message for DeleteWorkspaceRequest {
2358 fn typename() -> &'static str {
2359 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
2360 }
2361}
2362
2363#[derive(Clone, Default, PartialEq)]
2365#[non_exhaustive]
2366pub struct CommitAuthor {
2367 pub name: std::string::String,
2369
2370 pub email_address: std::string::String,
2372
2373 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2374}
2375
2376impl CommitAuthor {
2377 pub fn new() -> Self {
2378 std::default::Default::default()
2379 }
2380
2381 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2383 self.name = v.into();
2384 self
2385 }
2386
2387 pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2389 self.email_address = v.into();
2390 self
2391 }
2392}
2393
2394impl wkt::message::Message for CommitAuthor {
2395 fn typename() -> &'static str {
2396 "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
2397 }
2398}
2399
2400#[derive(Clone, Default, PartialEq)]
2402#[non_exhaustive]
2403pub struct PullGitCommitsRequest {
2404 pub name: std::string::String,
2406
2407 pub remote_branch: std::string::String,
2410
2411 pub author: std::option::Option<crate::model::CommitAuthor>,
2414
2415 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2416}
2417
2418impl PullGitCommitsRequest {
2419 pub fn new() -> Self {
2420 std::default::Default::default()
2421 }
2422
2423 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2425 self.name = v.into();
2426 self
2427 }
2428
2429 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2431 self.remote_branch = v.into();
2432 self
2433 }
2434
2435 pub fn set_author<T>(mut self, v: T) -> Self
2437 where
2438 T: std::convert::Into<crate::model::CommitAuthor>,
2439 {
2440 self.author = std::option::Option::Some(v.into());
2441 self
2442 }
2443
2444 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2446 where
2447 T: std::convert::Into<crate::model::CommitAuthor>,
2448 {
2449 self.author = v.map(|x| x.into());
2450 self
2451 }
2452}
2453
2454impl wkt::message::Message for PullGitCommitsRequest {
2455 fn typename() -> &'static str {
2456 "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
2457 }
2458}
2459
2460#[derive(Clone, Default, PartialEq)]
2462#[non_exhaustive]
2463pub struct PullGitCommitsResponse {
2464 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2465}
2466
2467impl PullGitCommitsResponse {
2468 pub fn new() -> Self {
2469 std::default::Default::default()
2470 }
2471}
2472
2473impl wkt::message::Message for PullGitCommitsResponse {
2474 fn typename() -> &'static str {
2475 "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
2476 }
2477}
2478
2479#[derive(Clone, Default, PartialEq)]
2481#[non_exhaustive]
2482pub struct PushGitCommitsRequest {
2483 pub name: std::string::String,
2485
2486 pub remote_branch: std::string::String,
2490
2491 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2492}
2493
2494impl PushGitCommitsRequest {
2495 pub fn new() -> Self {
2496 std::default::Default::default()
2497 }
2498
2499 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2501 self.name = v.into();
2502 self
2503 }
2504
2505 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2507 self.remote_branch = v.into();
2508 self
2509 }
2510}
2511
2512impl wkt::message::Message for PushGitCommitsRequest {
2513 fn typename() -> &'static str {
2514 "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
2515 }
2516}
2517
2518#[derive(Clone, Default, PartialEq)]
2520#[non_exhaustive]
2521pub struct PushGitCommitsResponse {
2522 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2523}
2524
2525impl PushGitCommitsResponse {
2526 pub fn new() -> Self {
2527 std::default::Default::default()
2528 }
2529}
2530
2531impl wkt::message::Message for PushGitCommitsResponse {
2532 fn typename() -> &'static str {
2533 "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
2534 }
2535}
2536
2537#[derive(Clone, Default, PartialEq)]
2539#[non_exhaustive]
2540pub struct FetchFileGitStatusesRequest {
2541 pub name: std::string::String,
2543
2544 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2545}
2546
2547impl FetchFileGitStatusesRequest {
2548 pub fn new() -> Self {
2549 std::default::Default::default()
2550 }
2551
2552 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2554 self.name = v.into();
2555 self
2556 }
2557}
2558
2559impl wkt::message::Message for FetchFileGitStatusesRequest {
2560 fn typename() -> &'static str {
2561 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
2562 }
2563}
2564
2565#[derive(Clone, Default, PartialEq)]
2567#[non_exhaustive]
2568pub struct FetchFileGitStatusesResponse {
2569 pub uncommitted_file_changes:
2572 std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
2573
2574 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2575}
2576
2577impl FetchFileGitStatusesResponse {
2578 pub fn new() -> Self {
2579 std::default::Default::default()
2580 }
2581
2582 pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
2584 where
2585 T: std::iter::IntoIterator<Item = V>,
2586 V: std::convert::Into<
2587 crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
2588 >,
2589 {
2590 use std::iter::Iterator;
2591 self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
2592 self
2593 }
2594}
2595
2596impl wkt::message::Message for FetchFileGitStatusesResponse {
2597 fn typename() -> &'static str {
2598 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
2599 }
2600}
2601
2602pub mod fetch_file_git_statuses_response {
2604 #[allow(unused_imports)]
2605 use super::*;
2606
2607 #[derive(Clone, Default, PartialEq)]
2609 #[non_exhaustive]
2610 pub struct UncommittedFileChange {
2611 pub path: std::string::String,
2613
2614 pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
2616
2617 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2618 }
2619
2620 impl UncommittedFileChange {
2621 pub fn new() -> Self {
2622 std::default::Default::default()
2623 }
2624
2625 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2627 self.path = v.into();
2628 self
2629 }
2630
2631 pub fn set_state<
2633 T: std::convert::Into<
2634 crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
2635 >,
2636 >(
2637 mut self,
2638 v: T,
2639 ) -> Self {
2640 self.state = v.into();
2641 self
2642 }
2643 }
2644
2645 impl wkt::message::Message for UncommittedFileChange {
2646 fn typename() -> &'static str {
2647 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
2648 }
2649 }
2650
2651 pub mod uncommitted_file_change {
2653 #[allow(unused_imports)]
2654 use super::*;
2655
2656 #[derive(Clone, Debug, PartialEq)]
2672 #[non_exhaustive]
2673 pub enum State {
2674 Unspecified,
2676 Added,
2678 Deleted,
2680 Modified,
2682 HasConflicts,
2684 UnknownValue(state::UnknownValue),
2689 }
2690
2691 #[doc(hidden)]
2692 pub mod state {
2693 #[allow(unused_imports)]
2694 use super::*;
2695 #[derive(Clone, Debug, PartialEq)]
2696 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2697 }
2698
2699 impl State {
2700 pub fn value(&self) -> std::option::Option<i32> {
2705 match self {
2706 Self::Unspecified => std::option::Option::Some(0),
2707 Self::Added => std::option::Option::Some(1),
2708 Self::Deleted => std::option::Option::Some(2),
2709 Self::Modified => std::option::Option::Some(3),
2710 Self::HasConflicts => std::option::Option::Some(4),
2711 Self::UnknownValue(u) => u.0.value(),
2712 }
2713 }
2714
2715 pub fn name(&self) -> std::option::Option<&str> {
2720 match self {
2721 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
2722 Self::Added => std::option::Option::Some("ADDED"),
2723 Self::Deleted => std::option::Option::Some("DELETED"),
2724 Self::Modified => std::option::Option::Some("MODIFIED"),
2725 Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
2726 Self::UnknownValue(u) => u.0.name(),
2727 }
2728 }
2729 }
2730
2731 impl std::default::Default for State {
2732 fn default() -> Self {
2733 use std::convert::From;
2734 Self::from(0)
2735 }
2736 }
2737
2738 impl std::fmt::Display for State {
2739 fn fmt(
2740 &self,
2741 f: &mut std::fmt::Formatter<'_>,
2742 ) -> std::result::Result<(), std::fmt::Error> {
2743 wkt::internal::display_enum(f, self.name(), self.value())
2744 }
2745 }
2746
2747 impl std::convert::From<i32> for State {
2748 fn from(value: i32) -> Self {
2749 match value {
2750 0 => Self::Unspecified,
2751 1 => Self::Added,
2752 2 => Self::Deleted,
2753 3 => Self::Modified,
2754 4 => Self::HasConflicts,
2755 _ => Self::UnknownValue(state::UnknownValue(
2756 wkt::internal::UnknownEnumValue::Integer(value),
2757 )),
2758 }
2759 }
2760 }
2761
2762 impl std::convert::From<&str> for State {
2763 fn from(value: &str) -> Self {
2764 use std::string::ToString;
2765 match value {
2766 "STATE_UNSPECIFIED" => Self::Unspecified,
2767 "ADDED" => Self::Added,
2768 "DELETED" => Self::Deleted,
2769 "MODIFIED" => Self::Modified,
2770 "HAS_CONFLICTS" => Self::HasConflicts,
2771 _ => Self::UnknownValue(state::UnknownValue(
2772 wkt::internal::UnknownEnumValue::String(value.to_string()),
2773 )),
2774 }
2775 }
2776 }
2777
2778 impl serde::ser::Serialize for State {
2779 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2780 where
2781 S: serde::Serializer,
2782 {
2783 match self {
2784 Self::Unspecified => serializer.serialize_i32(0),
2785 Self::Added => serializer.serialize_i32(1),
2786 Self::Deleted => serializer.serialize_i32(2),
2787 Self::Modified => serializer.serialize_i32(3),
2788 Self::HasConflicts => serializer.serialize_i32(4),
2789 Self::UnknownValue(u) => u.0.serialize(serializer),
2790 }
2791 }
2792 }
2793
2794 impl<'de> serde::de::Deserialize<'de> for State {
2795 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2796 where
2797 D: serde::Deserializer<'de>,
2798 {
2799 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
2800 ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
2801 }
2802 }
2803 }
2804}
2805
2806#[derive(Clone, Default, PartialEq)]
2808#[non_exhaustive]
2809pub struct FetchGitAheadBehindRequest {
2810 pub name: std::string::String,
2812
2813 pub remote_branch: std::string::String,
2817
2818 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2819}
2820
2821impl FetchGitAheadBehindRequest {
2822 pub fn new() -> Self {
2823 std::default::Default::default()
2824 }
2825
2826 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2828 self.name = v.into();
2829 self
2830 }
2831
2832 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2834 self.remote_branch = v.into();
2835 self
2836 }
2837}
2838
2839impl wkt::message::Message for FetchGitAheadBehindRequest {
2840 fn typename() -> &'static str {
2841 "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
2842 }
2843}
2844
2845#[derive(Clone, Default, PartialEq)]
2847#[non_exhaustive]
2848pub struct FetchGitAheadBehindResponse {
2849 pub commits_ahead: i32,
2851
2852 pub commits_behind: i32,
2854
2855 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2856}
2857
2858impl FetchGitAheadBehindResponse {
2859 pub fn new() -> Self {
2860 std::default::Default::default()
2861 }
2862
2863 pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2865 self.commits_ahead = v.into();
2866 self
2867 }
2868
2869 pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2871 self.commits_behind = v.into();
2872 self
2873 }
2874}
2875
2876impl wkt::message::Message for FetchGitAheadBehindResponse {
2877 fn typename() -> &'static str {
2878 "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
2879 }
2880}
2881
2882#[derive(Clone, Default, PartialEq)]
2884#[non_exhaustive]
2885pub struct CommitWorkspaceChangesRequest {
2886 pub name: std::string::String,
2888
2889 pub author: std::option::Option<crate::model::CommitAuthor>,
2891
2892 pub commit_message: std::string::String,
2894
2895 pub paths: std::vec::Vec<std::string::String>,
2898
2899 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2900}
2901
2902impl CommitWorkspaceChangesRequest {
2903 pub fn new() -> Self {
2904 std::default::Default::default()
2905 }
2906
2907 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2909 self.name = v.into();
2910 self
2911 }
2912
2913 pub fn set_author<T>(mut self, v: T) -> Self
2915 where
2916 T: std::convert::Into<crate::model::CommitAuthor>,
2917 {
2918 self.author = std::option::Option::Some(v.into());
2919 self
2920 }
2921
2922 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2924 where
2925 T: std::convert::Into<crate::model::CommitAuthor>,
2926 {
2927 self.author = v.map(|x| x.into());
2928 self
2929 }
2930
2931 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2933 self.commit_message = v.into();
2934 self
2935 }
2936
2937 pub fn set_paths<T, V>(mut self, v: T) -> Self
2939 where
2940 T: std::iter::IntoIterator<Item = V>,
2941 V: std::convert::Into<std::string::String>,
2942 {
2943 use std::iter::Iterator;
2944 self.paths = v.into_iter().map(|i| i.into()).collect();
2945 self
2946 }
2947}
2948
2949impl wkt::message::Message for CommitWorkspaceChangesRequest {
2950 fn typename() -> &'static str {
2951 "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
2952 }
2953}
2954
2955#[derive(Clone, Default, PartialEq)]
2957#[non_exhaustive]
2958pub struct CommitWorkspaceChangesResponse {
2959 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2960}
2961
2962impl CommitWorkspaceChangesResponse {
2963 pub fn new() -> Self {
2964 std::default::Default::default()
2965 }
2966}
2967
2968impl wkt::message::Message for CommitWorkspaceChangesResponse {
2969 fn typename() -> &'static str {
2970 "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
2971 }
2972}
2973
2974#[derive(Clone, Default, PartialEq)]
2976#[non_exhaustive]
2977pub struct ResetWorkspaceChangesRequest {
2978 pub name: std::string::String,
2980
2981 pub paths: std::vec::Vec<std::string::String>,
2984
2985 pub clean: bool,
2987
2988 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2989}
2990
2991impl ResetWorkspaceChangesRequest {
2992 pub fn new() -> Self {
2993 std::default::Default::default()
2994 }
2995
2996 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2998 self.name = v.into();
2999 self
3000 }
3001
3002 pub fn set_paths<T, V>(mut self, v: T) -> Self
3004 where
3005 T: std::iter::IntoIterator<Item = V>,
3006 V: std::convert::Into<std::string::String>,
3007 {
3008 use std::iter::Iterator;
3009 self.paths = v.into_iter().map(|i| i.into()).collect();
3010 self
3011 }
3012
3013 pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3015 self.clean = v.into();
3016 self
3017 }
3018}
3019
3020impl wkt::message::Message for ResetWorkspaceChangesRequest {
3021 fn typename() -> &'static str {
3022 "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
3023 }
3024}
3025
3026#[derive(Clone, Default, PartialEq)]
3028#[non_exhaustive]
3029pub struct ResetWorkspaceChangesResponse {
3030 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3031}
3032
3033impl ResetWorkspaceChangesResponse {
3034 pub fn new() -> Self {
3035 std::default::Default::default()
3036 }
3037}
3038
3039impl wkt::message::Message for ResetWorkspaceChangesResponse {
3040 fn typename() -> &'static str {
3041 "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
3042 }
3043}
3044
3045#[derive(Clone, Default, PartialEq)]
3047#[non_exhaustive]
3048pub struct FetchFileDiffRequest {
3049 pub workspace: std::string::String,
3051
3052 pub path: std::string::String,
3055
3056 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3057}
3058
3059impl FetchFileDiffRequest {
3060 pub fn new() -> Self {
3061 std::default::Default::default()
3062 }
3063
3064 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3066 self.workspace = v.into();
3067 self
3068 }
3069
3070 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3072 self.path = v.into();
3073 self
3074 }
3075}
3076
3077impl wkt::message::Message for FetchFileDiffRequest {
3078 fn typename() -> &'static str {
3079 "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
3080 }
3081}
3082
3083#[derive(Clone, Default, PartialEq)]
3085#[non_exhaustive]
3086pub struct FetchFileDiffResponse {
3087 pub formatted_diff: std::string::String,
3089
3090 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3091}
3092
3093impl FetchFileDiffResponse {
3094 pub fn new() -> Self {
3095 std::default::Default::default()
3096 }
3097
3098 pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3100 self.formatted_diff = v.into();
3101 self
3102 }
3103}
3104
3105impl wkt::message::Message for FetchFileDiffResponse {
3106 fn typename() -> &'static str {
3107 "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
3108 }
3109}
3110
3111#[derive(Clone, Default, PartialEq)]
3113#[non_exhaustive]
3114pub struct QueryDirectoryContentsRequest {
3115 pub workspace: std::string::String,
3117
3118 pub path: std::string::String,
3121
3122 pub page_size: i32,
3126
3127 pub page_token: std::string::String,
3134
3135 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3136}
3137
3138impl QueryDirectoryContentsRequest {
3139 pub fn new() -> Self {
3140 std::default::Default::default()
3141 }
3142
3143 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3145 self.workspace = v.into();
3146 self
3147 }
3148
3149 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3151 self.path = v.into();
3152 self
3153 }
3154
3155 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3157 self.page_size = v.into();
3158 self
3159 }
3160
3161 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3163 self.page_token = v.into();
3164 self
3165 }
3166}
3167
3168impl wkt::message::Message for QueryDirectoryContentsRequest {
3169 fn typename() -> &'static str {
3170 "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
3171 }
3172}
3173
3174#[derive(Clone, Default, PartialEq)]
3176#[non_exhaustive]
3177pub struct QueryDirectoryContentsResponse {
3178 pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
3180
3181 pub next_page_token: std::string::String,
3184
3185 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3186}
3187
3188impl QueryDirectoryContentsResponse {
3189 pub fn new() -> Self {
3190 std::default::Default::default()
3191 }
3192
3193 pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
3195 where
3196 T: std::iter::IntoIterator<Item = V>,
3197 V: std::convert::Into<crate::model::DirectoryEntry>,
3198 {
3199 use std::iter::Iterator;
3200 self.directory_entries = v.into_iter().map(|i| i.into()).collect();
3201 self
3202 }
3203
3204 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3206 self.next_page_token = v.into();
3207 self
3208 }
3209}
3210
3211impl wkt::message::Message for QueryDirectoryContentsResponse {
3212 fn typename() -> &'static str {
3213 "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
3214 }
3215}
3216
3217#[doc(hidden)]
3218impl gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
3219 type PageItem = crate::model::DirectoryEntry;
3220
3221 fn items(self) -> std::vec::Vec<Self::PageItem> {
3222 self.directory_entries
3223 }
3224
3225 fn next_page_token(&self) -> std::string::String {
3226 use std::clone::Clone;
3227 self.next_page_token.clone()
3228 }
3229}
3230
3231#[derive(Clone, Default, PartialEq)]
3233#[non_exhaustive]
3234pub struct DirectoryEntry {
3235 pub entry: std::option::Option<crate::model::directory_entry::Entry>,
3237
3238 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3239}
3240
3241impl DirectoryEntry {
3242 pub fn new() -> Self {
3243 std::default::Default::default()
3244 }
3245
3246 pub fn set_entry<
3251 T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
3252 >(
3253 mut self,
3254 v: T,
3255 ) -> Self {
3256 self.entry = v.into();
3257 self
3258 }
3259
3260 pub fn file(&self) -> std::option::Option<&std::string::String> {
3264 #[allow(unreachable_patterns)]
3265 self.entry.as_ref().and_then(|v| match v {
3266 crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
3267 _ => std::option::Option::None,
3268 })
3269 }
3270
3271 pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3277 self.entry =
3278 std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
3279 self
3280 }
3281
3282 pub fn directory(&self) -> std::option::Option<&std::string::String> {
3286 #[allow(unreachable_patterns)]
3287 self.entry.as_ref().and_then(|v| match v {
3288 crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
3289 _ => std::option::Option::None,
3290 })
3291 }
3292
3293 pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3299 self.entry =
3300 std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
3301 self
3302 }
3303}
3304
3305impl wkt::message::Message for DirectoryEntry {
3306 fn typename() -> &'static str {
3307 "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
3308 }
3309}
3310
3311pub mod directory_entry {
3313 #[allow(unused_imports)]
3314 use super::*;
3315
3316 #[derive(Clone, Debug, PartialEq)]
3318 #[non_exhaustive]
3319 pub enum Entry {
3320 File(std::string::String),
3322 Directory(std::string::String),
3324 }
3325}
3326
3327#[derive(Clone, Default, PartialEq)]
3329#[non_exhaustive]
3330pub struct SearchFilesRequest {
3331 pub workspace: std::string::String,
3333
3334 pub page_size: i32,
3338
3339 pub page_token: std::string::String,
3346
3347 pub filter: std::string::String,
3351
3352 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3353}
3354
3355impl SearchFilesRequest {
3356 pub fn new() -> Self {
3357 std::default::Default::default()
3358 }
3359
3360 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3362 self.workspace = v.into();
3363 self
3364 }
3365
3366 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3368 self.page_size = v.into();
3369 self
3370 }
3371
3372 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3374 self.page_token = v.into();
3375 self
3376 }
3377
3378 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3380 self.filter = v.into();
3381 self
3382 }
3383}
3384
3385impl wkt::message::Message for SearchFilesRequest {
3386 fn typename() -> &'static str {
3387 "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
3388 }
3389}
3390
3391#[derive(Clone, Default, PartialEq)]
3393#[non_exhaustive]
3394pub struct SearchFilesResponse {
3395 pub search_results: std::vec::Vec<crate::model::SearchResult>,
3397
3398 pub next_page_token: std::string::String,
3401
3402 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3403}
3404
3405impl SearchFilesResponse {
3406 pub fn new() -> Self {
3407 std::default::Default::default()
3408 }
3409
3410 pub fn set_search_results<T, V>(mut self, v: T) -> Self
3412 where
3413 T: std::iter::IntoIterator<Item = V>,
3414 V: std::convert::Into<crate::model::SearchResult>,
3415 {
3416 use std::iter::Iterator;
3417 self.search_results = v.into_iter().map(|i| i.into()).collect();
3418 self
3419 }
3420
3421 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3423 self.next_page_token = v.into();
3424 self
3425 }
3426}
3427
3428impl wkt::message::Message for SearchFilesResponse {
3429 fn typename() -> &'static str {
3430 "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
3431 }
3432}
3433
3434#[doc(hidden)]
3435impl gax::paginator::internal::PageableResponse for SearchFilesResponse {
3436 type PageItem = crate::model::SearchResult;
3437
3438 fn items(self) -> std::vec::Vec<Self::PageItem> {
3439 self.search_results
3440 }
3441
3442 fn next_page_token(&self) -> std::string::String {
3443 use std::clone::Clone;
3444 self.next_page_token.clone()
3445 }
3446}
3447
3448#[derive(Clone, Default, PartialEq)]
3450#[non_exhaustive]
3451pub struct SearchResult {
3452 pub entry: std::option::Option<crate::model::search_result::Entry>,
3454
3455 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3456}
3457
3458impl SearchResult {
3459 pub fn new() -> Self {
3460 std::default::Default::default()
3461 }
3462
3463 pub fn set_entry<
3468 T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
3469 >(
3470 mut self,
3471 v: T,
3472 ) -> Self {
3473 self.entry = v.into();
3474 self
3475 }
3476
3477 pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
3481 #[allow(unreachable_patterns)]
3482 self.entry.as_ref().and_then(|v| match v {
3483 crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
3484 _ => std::option::Option::None,
3485 })
3486 }
3487
3488 pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
3494 mut self,
3495 v: T,
3496 ) -> Self {
3497 self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
3498 self
3499 }
3500
3501 pub fn directory(
3505 &self,
3506 ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
3507 #[allow(unreachable_patterns)]
3508 self.entry.as_ref().and_then(|v| match v {
3509 crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
3510 _ => std::option::Option::None,
3511 })
3512 }
3513
3514 pub fn set_directory<
3520 T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
3521 >(
3522 mut self,
3523 v: T,
3524 ) -> Self {
3525 self.entry =
3526 std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
3527 self
3528 }
3529}
3530
3531impl wkt::message::Message for SearchResult {
3532 fn typename() -> &'static str {
3533 "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
3534 }
3535}
3536
3537pub mod search_result {
3539 #[allow(unused_imports)]
3540 use super::*;
3541
3542 #[derive(Clone, Debug, PartialEq)]
3544 #[non_exhaustive]
3545 pub enum Entry {
3546 File(std::boxed::Box<crate::model::FileSearchResult>),
3548 Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
3550 }
3551}
3552
3553#[derive(Clone, Default, PartialEq)]
3555#[non_exhaustive]
3556pub struct FileSearchResult {
3557 pub path: std::string::String,
3559
3560 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3561}
3562
3563impl FileSearchResult {
3564 pub fn new() -> Self {
3565 std::default::Default::default()
3566 }
3567
3568 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3570 self.path = v.into();
3571 self
3572 }
3573}
3574
3575impl wkt::message::Message for FileSearchResult {
3576 fn typename() -> &'static str {
3577 "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
3578 }
3579}
3580
3581#[derive(Clone, Default, PartialEq)]
3583#[non_exhaustive]
3584pub struct DirectorySearchResult {
3585 pub path: std::string::String,
3587
3588 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3589}
3590
3591impl DirectorySearchResult {
3592 pub fn new() -> Self {
3593 std::default::Default::default()
3594 }
3595
3596 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3598 self.path = v.into();
3599 self
3600 }
3601}
3602
3603impl wkt::message::Message for DirectorySearchResult {
3604 fn typename() -> &'static str {
3605 "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
3606 }
3607}
3608
3609#[derive(Clone, Default, PartialEq)]
3611#[non_exhaustive]
3612pub struct MakeDirectoryRequest {
3613 pub workspace: std::string::String,
3615
3616 pub path: std::string::String,
3619
3620 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3621}
3622
3623impl MakeDirectoryRequest {
3624 pub fn new() -> Self {
3625 std::default::Default::default()
3626 }
3627
3628 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3630 self.workspace = v.into();
3631 self
3632 }
3633
3634 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3636 self.path = v.into();
3637 self
3638 }
3639}
3640
3641impl wkt::message::Message for MakeDirectoryRequest {
3642 fn typename() -> &'static str {
3643 "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
3644 }
3645}
3646
3647#[derive(Clone, Default, PartialEq)]
3649#[non_exhaustive]
3650pub struct MakeDirectoryResponse {
3651 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3652}
3653
3654impl MakeDirectoryResponse {
3655 pub fn new() -> Self {
3656 std::default::Default::default()
3657 }
3658}
3659
3660impl wkt::message::Message for MakeDirectoryResponse {
3661 fn typename() -> &'static str {
3662 "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
3663 }
3664}
3665
3666#[derive(Clone, Default, PartialEq)]
3668#[non_exhaustive]
3669pub struct RemoveDirectoryRequest {
3670 pub workspace: std::string::String,
3672
3673 pub path: std::string::String,
3676
3677 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3678}
3679
3680impl RemoveDirectoryRequest {
3681 pub fn new() -> Self {
3682 std::default::Default::default()
3683 }
3684
3685 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3687 self.workspace = v.into();
3688 self
3689 }
3690
3691 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3693 self.path = v.into();
3694 self
3695 }
3696}
3697
3698impl wkt::message::Message for RemoveDirectoryRequest {
3699 fn typename() -> &'static str {
3700 "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
3701 }
3702}
3703
3704#[derive(Clone, Default, PartialEq)]
3706#[non_exhaustive]
3707pub struct RemoveDirectoryResponse {
3708 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3709}
3710
3711impl RemoveDirectoryResponse {
3712 pub fn new() -> Self {
3713 std::default::Default::default()
3714 }
3715}
3716
3717impl wkt::message::Message for RemoveDirectoryResponse {
3718 fn typename() -> &'static str {
3719 "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
3720 }
3721}
3722
3723#[derive(Clone, Default, PartialEq)]
3725#[non_exhaustive]
3726pub struct MoveDirectoryRequest {
3727 pub workspace: std::string::String,
3729
3730 pub path: std::string::String,
3733
3734 pub new_path: std::string::String,
3737
3738 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3739}
3740
3741impl MoveDirectoryRequest {
3742 pub fn new() -> Self {
3743 std::default::Default::default()
3744 }
3745
3746 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3748 self.workspace = v.into();
3749 self
3750 }
3751
3752 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3754 self.path = v.into();
3755 self
3756 }
3757
3758 pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3760 self.new_path = v.into();
3761 self
3762 }
3763}
3764
3765impl wkt::message::Message for MoveDirectoryRequest {
3766 fn typename() -> &'static str {
3767 "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
3768 }
3769}
3770
3771#[derive(Clone, Default, PartialEq)]
3773#[non_exhaustive]
3774pub struct MoveDirectoryResponse {
3775 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3776}
3777
3778impl MoveDirectoryResponse {
3779 pub fn new() -> Self {
3780 std::default::Default::default()
3781 }
3782}
3783
3784impl wkt::message::Message for MoveDirectoryResponse {
3785 fn typename() -> &'static str {
3786 "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
3787 }
3788}
3789
3790#[derive(Clone, Default, PartialEq)]
3792#[non_exhaustive]
3793pub struct ReadFileRequest {
3794 pub workspace: std::string::String,
3796
3797 pub path: std::string::String,
3800
3801 pub revision: std::string::String,
3804
3805 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3806}
3807
3808impl ReadFileRequest {
3809 pub fn new() -> Self {
3810 std::default::Default::default()
3811 }
3812
3813 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3815 self.workspace = v.into();
3816 self
3817 }
3818
3819 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3821 self.path = v.into();
3822 self
3823 }
3824
3825 pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3827 self.revision = v.into();
3828 self
3829 }
3830}
3831
3832impl wkt::message::Message for ReadFileRequest {
3833 fn typename() -> &'static str {
3834 "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
3835 }
3836}
3837
3838#[derive(Clone, Default, PartialEq)]
3840#[non_exhaustive]
3841pub struct ReadFileResponse {
3842 pub file_contents: ::bytes::Bytes,
3844
3845 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3846}
3847
3848impl ReadFileResponse {
3849 pub fn new() -> Self {
3850 std::default::Default::default()
3851 }
3852
3853 pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3855 self.file_contents = v.into();
3856 self
3857 }
3858}
3859
3860impl wkt::message::Message for ReadFileResponse {
3861 fn typename() -> &'static str {
3862 "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
3863 }
3864}
3865
3866#[derive(Clone, Default, PartialEq)]
3868#[non_exhaustive]
3869pub struct RemoveFileRequest {
3870 pub workspace: std::string::String,
3872
3873 pub path: std::string::String,
3876
3877 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3878}
3879
3880impl RemoveFileRequest {
3881 pub fn new() -> Self {
3882 std::default::Default::default()
3883 }
3884
3885 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3887 self.workspace = v.into();
3888 self
3889 }
3890
3891 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3893 self.path = v.into();
3894 self
3895 }
3896}
3897
3898impl wkt::message::Message for RemoveFileRequest {
3899 fn typename() -> &'static str {
3900 "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
3901 }
3902}
3903
3904#[derive(Clone, Default, PartialEq)]
3906#[non_exhaustive]
3907pub struct RemoveFileResponse {
3908 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3909}
3910
3911impl RemoveFileResponse {
3912 pub fn new() -> Self {
3913 std::default::Default::default()
3914 }
3915}
3916
3917impl wkt::message::Message for RemoveFileResponse {
3918 fn typename() -> &'static str {
3919 "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
3920 }
3921}
3922
3923#[derive(Clone, Default, PartialEq)]
3925#[non_exhaustive]
3926pub struct MoveFileRequest {
3927 pub workspace: std::string::String,
3929
3930 pub path: std::string::String,
3933
3934 pub new_path: std::string::String,
3937
3938 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3939}
3940
3941impl MoveFileRequest {
3942 pub fn new() -> Self {
3943 std::default::Default::default()
3944 }
3945
3946 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3948 self.workspace = v.into();
3949 self
3950 }
3951
3952 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3954 self.path = v.into();
3955 self
3956 }
3957
3958 pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3960 self.new_path = v.into();
3961 self
3962 }
3963}
3964
3965impl wkt::message::Message for MoveFileRequest {
3966 fn typename() -> &'static str {
3967 "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
3968 }
3969}
3970
3971#[derive(Clone, Default, PartialEq)]
3973#[non_exhaustive]
3974pub struct MoveFileResponse {
3975 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3976}
3977
3978impl MoveFileResponse {
3979 pub fn new() -> Self {
3980 std::default::Default::default()
3981 }
3982}
3983
3984impl wkt::message::Message for MoveFileResponse {
3985 fn typename() -> &'static str {
3986 "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
3987 }
3988}
3989
3990#[derive(Clone, Default, PartialEq)]
3992#[non_exhaustive]
3993pub struct WriteFileRequest {
3994 pub workspace: std::string::String,
3996
3997 pub path: std::string::String,
3999
4000 pub contents: ::bytes::Bytes,
4002
4003 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4004}
4005
4006impl WriteFileRequest {
4007 pub fn new() -> Self {
4008 std::default::Default::default()
4009 }
4010
4011 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4013 self.workspace = v.into();
4014 self
4015 }
4016
4017 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4019 self.path = v.into();
4020 self
4021 }
4022
4023 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4025 self.contents = v.into();
4026 self
4027 }
4028}
4029
4030impl wkt::message::Message for WriteFileRequest {
4031 fn typename() -> &'static str {
4032 "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
4033 }
4034}
4035
4036#[derive(Clone, Default, PartialEq)]
4038#[non_exhaustive]
4039pub struct WriteFileResponse {
4040 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4041}
4042
4043impl WriteFileResponse {
4044 pub fn new() -> Self {
4045 std::default::Default::default()
4046 }
4047}
4048
4049impl wkt::message::Message for WriteFileResponse {
4050 fn typename() -> &'static str {
4051 "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
4052 }
4053}
4054
4055#[derive(Clone, Default, PartialEq)]
4057#[non_exhaustive]
4058pub struct InstallNpmPackagesRequest {
4059 pub workspace: std::string::String,
4061
4062 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4063}
4064
4065impl InstallNpmPackagesRequest {
4066 pub fn new() -> Self {
4067 std::default::Default::default()
4068 }
4069
4070 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4072 self.workspace = v.into();
4073 self
4074 }
4075}
4076
4077impl wkt::message::Message for InstallNpmPackagesRequest {
4078 fn typename() -> &'static str {
4079 "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
4080 }
4081}
4082
4083#[derive(Clone, Default, PartialEq)]
4085#[non_exhaustive]
4086pub struct InstallNpmPackagesResponse {
4087 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4088}
4089
4090impl InstallNpmPackagesResponse {
4091 pub fn new() -> Self {
4092 std::default::Default::default()
4093 }
4094}
4095
4096impl wkt::message::Message for InstallNpmPackagesResponse {
4097 fn typename() -> &'static str {
4098 "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
4099 }
4100}
4101
4102#[derive(Clone, Default, PartialEq)]
4104#[non_exhaustive]
4105pub struct ReleaseConfig {
4106 pub name: std::string::String,
4108
4109 pub git_commitish: std::string::String,
4116
4117 pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
4120
4121 pub cron_schedule: std::string::String,
4124
4125 pub time_zone: std::string::String,
4130
4131 pub recent_scheduled_release_records:
4135 std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
4136
4137 pub release_compilation_result: std::string::String,
4145
4146 pub disabled: bool,
4148
4149 pub internal_metadata: std::option::Option<std::string::String>,
4153
4154 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4155}
4156
4157impl ReleaseConfig {
4158 pub fn new() -> Self {
4159 std::default::Default::default()
4160 }
4161
4162 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4164 self.name = v.into();
4165 self
4166 }
4167
4168 pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4170 self.git_commitish = v.into();
4171 self
4172 }
4173
4174 pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
4176 where
4177 T: std::convert::Into<crate::model::CodeCompilationConfig>,
4178 {
4179 self.code_compilation_config = std::option::Option::Some(v.into());
4180 self
4181 }
4182
4183 pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
4185 where
4186 T: std::convert::Into<crate::model::CodeCompilationConfig>,
4187 {
4188 self.code_compilation_config = v.map(|x| x.into());
4189 self
4190 }
4191
4192 pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4194 self.cron_schedule = v.into();
4195 self
4196 }
4197
4198 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4200 self.time_zone = v.into();
4201 self
4202 }
4203
4204 pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
4206 where
4207 T: std::iter::IntoIterator<Item = V>,
4208 V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
4209 {
4210 use std::iter::Iterator;
4211 self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
4212 self
4213 }
4214
4215 pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
4217 mut self,
4218 v: T,
4219 ) -> Self {
4220 self.release_compilation_result = v.into();
4221 self
4222 }
4223
4224 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4226 self.disabled = v.into();
4227 self
4228 }
4229
4230 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
4232 where
4233 T: std::convert::Into<std::string::String>,
4234 {
4235 self.internal_metadata = std::option::Option::Some(v.into());
4236 self
4237 }
4238
4239 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
4241 where
4242 T: std::convert::Into<std::string::String>,
4243 {
4244 self.internal_metadata = v.map(|x| x.into());
4245 self
4246 }
4247}
4248
4249impl wkt::message::Message for ReleaseConfig {
4250 fn typename() -> &'static str {
4251 "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
4252 }
4253}
4254
4255pub mod release_config {
4257 #[allow(unused_imports)]
4258 use super::*;
4259
4260 #[derive(Clone, Default, PartialEq)]
4263 #[non_exhaustive]
4264 pub struct ScheduledReleaseRecord {
4265 pub release_time: std::option::Option<wkt::Timestamp>,
4267
4268 pub result:
4270 std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
4271
4272 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4273 }
4274
4275 impl ScheduledReleaseRecord {
4276 pub fn new() -> Self {
4277 std::default::Default::default()
4278 }
4279
4280 pub fn set_release_time<T>(mut self, v: T) -> Self
4282 where
4283 T: std::convert::Into<wkt::Timestamp>,
4284 {
4285 self.release_time = std::option::Option::Some(v.into());
4286 self
4287 }
4288
4289 pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
4291 where
4292 T: std::convert::Into<wkt::Timestamp>,
4293 {
4294 self.release_time = v.map(|x| x.into());
4295 self
4296 }
4297
4298 pub fn set_result<
4303 T: std::convert::Into<
4304 std::option::Option<
4305 crate::model::release_config::scheduled_release_record::Result,
4306 >,
4307 >,
4308 >(
4309 mut self,
4310 v: T,
4311 ) -> Self {
4312 self.result = v.into();
4313 self
4314 }
4315
4316 pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
4320 #[allow(unreachable_patterns)]
4321 self.result.as_ref().and_then(|v| match v {
4322 crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
4323 _ => std::option::Option::None,
4324 })
4325 }
4326
4327 pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
4333 mut self,
4334 v: T,
4335 ) -> Self {
4336 self.result = std::option::Option::Some(
4337 crate::model::release_config::scheduled_release_record::Result::CompilationResult(
4338 v.into(),
4339 ),
4340 );
4341 self
4342 }
4343
4344 pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
4348 #[allow(unreachable_patterns)]
4349 self.result.as_ref().and_then(|v| match v {
4350 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
4351 std::option::Option::Some(v)
4352 }
4353 _ => std::option::Option::None,
4354 })
4355 }
4356
4357 pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
4363 mut self,
4364 v: T,
4365 ) -> Self {
4366 self.result = std::option::Option::Some(
4367 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
4368 v.into(),
4369 ),
4370 );
4371 self
4372 }
4373 }
4374
4375 impl wkt::message::Message for ScheduledReleaseRecord {
4376 fn typename() -> &'static str {
4377 "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
4378 }
4379 }
4380
4381 pub mod scheduled_release_record {
4383 #[allow(unused_imports)]
4384 use super::*;
4385
4386 #[derive(Clone, Debug, PartialEq)]
4388 #[non_exhaustive]
4389 pub enum Result {
4390 CompilationResult(std::string::String),
4394 ErrorStatus(std::boxed::Box<rpc::model::Status>),
4397 }
4398 }
4399}
4400
4401#[derive(Clone, Default, PartialEq)]
4403#[non_exhaustive]
4404pub struct ListReleaseConfigsRequest {
4405 pub parent: std::string::String,
4408
4409 pub page_size: i32,
4413
4414 pub page_token: std::string::String,
4421
4422 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4423}
4424
4425impl ListReleaseConfigsRequest {
4426 pub fn new() -> Self {
4427 std::default::Default::default()
4428 }
4429
4430 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4432 self.parent = v.into();
4433 self
4434 }
4435
4436 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4438 self.page_size = v.into();
4439 self
4440 }
4441
4442 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4444 self.page_token = v.into();
4445 self
4446 }
4447}
4448
4449impl wkt::message::Message for ListReleaseConfigsRequest {
4450 fn typename() -> &'static str {
4451 "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
4452 }
4453}
4454
4455#[derive(Clone, Default, PartialEq)]
4457#[non_exhaustive]
4458pub struct ListReleaseConfigsResponse {
4459 pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
4461
4462 pub next_page_token: std::string::String,
4465
4466 pub unreachable: std::vec::Vec<std::string::String>,
4468
4469 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4470}
4471
4472impl ListReleaseConfigsResponse {
4473 pub fn new() -> Self {
4474 std::default::Default::default()
4475 }
4476
4477 pub fn set_release_configs<T, V>(mut self, v: T) -> Self
4479 where
4480 T: std::iter::IntoIterator<Item = V>,
4481 V: std::convert::Into<crate::model::ReleaseConfig>,
4482 {
4483 use std::iter::Iterator;
4484 self.release_configs = v.into_iter().map(|i| i.into()).collect();
4485 self
4486 }
4487
4488 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4490 self.next_page_token = v.into();
4491 self
4492 }
4493
4494 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4496 where
4497 T: std::iter::IntoIterator<Item = V>,
4498 V: std::convert::Into<std::string::String>,
4499 {
4500 use std::iter::Iterator;
4501 self.unreachable = v.into_iter().map(|i| i.into()).collect();
4502 self
4503 }
4504}
4505
4506impl wkt::message::Message for ListReleaseConfigsResponse {
4507 fn typename() -> &'static str {
4508 "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
4509 }
4510}
4511
4512#[doc(hidden)]
4513impl gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
4514 type PageItem = crate::model::ReleaseConfig;
4515
4516 fn items(self) -> std::vec::Vec<Self::PageItem> {
4517 self.release_configs
4518 }
4519
4520 fn next_page_token(&self) -> std::string::String {
4521 use std::clone::Clone;
4522 self.next_page_token.clone()
4523 }
4524}
4525
4526#[derive(Clone, Default, PartialEq)]
4528#[non_exhaustive]
4529pub struct GetReleaseConfigRequest {
4530 pub name: std::string::String,
4532
4533 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4534}
4535
4536impl GetReleaseConfigRequest {
4537 pub fn new() -> Self {
4538 std::default::Default::default()
4539 }
4540
4541 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4543 self.name = v.into();
4544 self
4545 }
4546}
4547
4548impl wkt::message::Message for GetReleaseConfigRequest {
4549 fn typename() -> &'static str {
4550 "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
4551 }
4552}
4553
4554#[derive(Clone, Default, PartialEq)]
4556#[non_exhaustive]
4557pub struct CreateReleaseConfigRequest {
4558 pub parent: std::string::String,
4561
4562 pub release_config: std::option::Option<crate::model::ReleaseConfig>,
4564
4565 pub release_config_id: std::string::String,
4568
4569 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4570}
4571
4572impl CreateReleaseConfigRequest {
4573 pub fn new() -> Self {
4574 std::default::Default::default()
4575 }
4576
4577 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4579 self.parent = v.into();
4580 self
4581 }
4582
4583 pub fn set_release_config<T>(mut self, v: T) -> Self
4585 where
4586 T: std::convert::Into<crate::model::ReleaseConfig>,
4587 {
4588 self.release_config = std::option::Option::Some(v.into());
4589 self
4590 }
4591
4592 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
4594 where
4595 T: std::convert::Into<crate::model::ReleaseConfig>,
4596 {
4597 self.release_config = v.map(|x| x.into());
4598 self
4599 }
4600
4601 pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
4603 mut self,
4604 v: T,
4605 ) -> Self {
4606 self.release_config_id = v.into();
4607 self
4608 }
4609}
4610
4611impl wkt::message::Message for CreateReleaseConfigRequest {
4612 fn typename() -> &'static str {
4613 "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
4614 }
4615}
4616
4617#[derive(Clone, Default, PartialEq)]
4619#[non_exhaustive]
4620pub struct UpdateReleaseConfigRequest {
4621 pub update_mask: std::option::Option<wkt::FieldMask>,
4624
4625 pub release_config: std::option::Option<crate::model::ReleaseConfig>,
4627
4628 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4629}
4630
4631impl UpdateReleaseConfigRequest {
4632 pub fn new() -> Self {
4633 std::default::Default::default()
4634 }
4635
4636 pub fn set_update_mask<T>(mut self, v: T) -> Self
4638 where
4639 T: std::convert::Into<wkt::FieldMask>,
4640 {
4641 self.update_mask = std::option::Option::Some(v.into());
4642 self
4643 }
4644
4645 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4647 where
4648 T: std::convert::Into<wkt::FieldMask>,
4649 {
4650 self.update_mask = v.map(|x| x.into());
4651 self
4652 }
4653
4654 pub fn set_release_config<T>(mut self, v: T) -> Self
4656 where
4657 T: std::convert::Into<crate::model::ReleaseConfig>,
4658 {
4659 self.release_config = std::option::Option::Some(v.into());
4660 self
4661 }
4662
4663 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
4665 where
4666 T: std::convert::Into<crate::model::ReleaseConfig>,
4667 {
4668 self.release_config = v.map(|x| x.into());
4669 self
4670 }
4671}
4672
4673impl wkt::message::Message for UpdateReleaseConfigRequest {
4674 fn typename() -> &'static str {
4675 "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
4676 }
4677}
4678
4679#[derive(Clone, Default, PartialEq)]
4681#[non_exhaustive]
4682pub struct DeleteReleaseConfigRequest {
4683 pub name: std::string::String,
4685
4686 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4687}
4688
4689impl DeleteReleaseConfigRequest {
4690 pub fn new() -> Self {
4691 std::default::Default::default()
4692 }
4693
4694 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4696 self.name = v.into();
4697 self
4698 }
4699}
4700
4701impl wkt::message::Message for DeleteReleaseConfigRequest {
4702 fn typename() -> &'static str {
4703 "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
4704 }
4705}
4706
4707#[derive(Clone, Default, PartialEq)]
4709#[non_exhaustive]
4710pub struct CompilationResult {
4711 pub name: std::string::String,
4713
4714 pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
4717
4718 pub resolved_git_commit_sha: std::string::String,
4721
4722 pub dataform_core_version: std::string::String,
4724
4725 pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
4727
4728 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
4730
4731 pub create_time: std::option::Option<wkt::Timestamp>,
4733
4734 pub internal_metadata: std::option::Option<std::string::String>,
4738
4739 pub source: std::option::Option<crate::model::compilation_result::Source>,
4741
4742 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4743}
4744
4745impl CompilationResult {
4746 pub fn new() -> Self {
4747 std::default::Default::default()
4748 }
4749
4750 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4752 self.name = v.into();
4753 self
4754 }
4755
4756 pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
4758 where
4759 T: std::convert::Into<crate::model::CodeCompilationConfig>,
4760 {
4761 self.code_compilation_config = std::option::Option::Some(v.into());
4762 self
4763 }
4764
4765 pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
4767 where
4768 T: std::convert::Into<crate::model::CodeCompilationConfig>,
4769 {
4770 self.code_compilation_config = v.map(|x| x.into());
4771 self
4772 }
4773
4774 pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
4776 mut self,
4777 v: T,
4778 ) -> Self {
4779 self.resolved_git_commit_sha = v.into();
4780 self
4781 }
4782
4783 pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
4785 mut self,
4786 v: T,
4787 ) -> Self {
4788 self.dataform_core_version = v.into();
4789 self
4790 }
4791
4792 pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
4794 where
4795 T: std::iter::IntoIterator<Item = V>,
4796 V: std::convert::Into<crate::model::compilation_result::CompilationError>,
4797 {
4798 use std::iter::Iterator;
4799 self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
4800 self
4801 }
4802
4803 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
4805 where
4806 T: std::convert::Into<crate::model::DataEncryptionState>,
4807 {
4808 self.data_encryption_state = std::option::Option::Some(v.into());
4809 self
4810 }
4811
4812 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
4814 where
4815 T: std::convert::Into<crate::model::DataEncryptionState>,
4816 {
4817 self.data_encryption_state = v.map(|x| x.into());
4818 self
4819 }
4820
4821 pub fn set_create_time<T>(mut self, v: T) -> Self
4823 where
4824 T: std::convert::Into<wkt::Timestamp>,
4825 {
4826 self.create_time = std::option::Option::Some(v.into());
4827 self
4828 }
4829
4830 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4832 where
4833 T: std::convert::Into<wkt::Timestamp>,
4834 {
4835 self.create_time = v.map(|x| x.into());
4836 self
4837 }
4838
4839 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
4841 where
4842 T: std::convert::Into<std::string::String>,
4843 {
4844 self.internal_metadata = std::option::Option::Some(v.into());
4845 self
4846 }
4847
4848 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
4850 where
4851 T: std::convert::Into<std::string::String>,
4852 {
4853 self.internal_metadata = v.map(|x| x.into());
4854 self
4855 }
4856
4857 pub fn set_source<
4862 T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
4863 >(
4864 mut self,
4865 v: T,
4866 ) -> Self {
4867 self.source = v.into();
4868 self
4869 }
4870
4871 pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
4875 #[allow(unreachable_patterns)]
4876 self.source.as_ref().and_then(|v| match v {
4877 crate::model::compilation_result::Source::GitCommitish(v) => {
4878 std::option::Option::Some(v)
4879 }
4880 _ => std::option::Option::None,
4881 })
4882 }
4883
4884 pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4890 self.source = std::option::Option::Some(
4891 crate::model::compilation_result::Source::GitCommitish(v.into()),
4892 );
4893 self
4894 }
4895
4896 pub fn workspace(&self) -> std::option::Option<&std::string::String> {
4900 #[allow(unreachable_patterns)]
4901 self.source.as_ref().and_then(|v| match v {
4902 crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
4903 _ => std::option::Option::None,
4904 })
4905 }
4906
4907 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4913 self.source = std::option::Option::Some(
4914 crate::model::compilation_result::Source::Workspace(v.into()),
4915 );
4916 self
4917 }
4918
4919 pub fn release_config(&self) -> std::option::Option<&std::string::String> {
4923 #[allow(unreachable_patterns)]
4924 self.source.as_ref().and_then(|v| match v {
4925 crate::model::compilation_result::Source::ReleaseConfig(v) => {
4926 std::option::Option::Some(v)
4927 }
4928 _ => std::option::Option::None,
4929 })
4930 }
4931
4932 pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4938 self.source = std::option::Option::Some(
4939 crate::model::compilation_result::Source::ReleaseConfig(v.into()),
4940 );
4941 self
4942 }
4943}
4944
4945impl wkt::message::Message for CompilationResult {
4946 fn typename() -> &'static str {
4947 "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
4948 }
4949}
4950
4951pub mod compilation_result {
4953 #[allow(unused_imports)]
4954 use super::*;
4955
4956 #[derive(Clone, Default, PartialEq)]
4958 #[non_exhaustive]
4959 pub struct CompilationError {
4960 pub message: std::string::String,
4962
4963 pub stack: std::string::String,
4965
4966 pub path: std::string::String,
4969
4970 pub action_target: std::option::Option<crate::model::Target>,
4973
4974 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4975 }
4976
4977 impl CompilationError {
4978 pub fn new() -> Self {
4979 std::default::Default::default()
4980 }
4981
4982 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4984 self.message = v.into();
4985 self
4986 }
4987
4988 pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4990 self.stack = v.into();
4991 self
4992 }
4993
4994 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4996 self.path = v.into();
4997 self
4998 }
4999
5000 pub fn set_action_target<T>(mut self, v: T) -> Self
5002 where
5003 T: std::convert::Into<crate::model::Target>,
5004 {
5005 self.action_target = std::option::Option::Some(v.into());
5006 self
5007 }
5008
5009 pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
5011 where
5012 T: std::convert::Into<crate::model::Target>,
5013 {
5014 self.action_target = v.map(|x| x.into());
5015 self
5016 }
5017 }
5018
5019 impl wkt::message::Message for CompilationError {
5020 fn typename() -> &'static str {
5021 "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
5022 }
5023 }
5024
5025 #[derive(Clone, Debug, PartialEq)]
5027 #[non_exhaustive]
5028 pub enum Source {
5029 GitCommitish(std::string::String),
5036 Workspace(std::string::String),
5039 ReleaseConfig(std::string::String),
5042 }
5043}
5044
5045#[derive(Clone, Default, PartialEq)]
5047#[non_exhaustive]
5048pub struct CodeCompilationConfig {
5049 pub default_database: std::string::String,
5051
5052 pub default_schema: std::string::String,
5054
5055 pub default_location: std::string::String,
5059
5060 pub assertion_schema: std::string::String,
5062
5063 pub vars: std::collections::HashMap<std::string::String, std::string::String>,
5066
5067 pub database_suffix: std::string::String,
5070
5071 pub schema_suffix: std::string::String,
5074
5075 pub table_prefix: std::string::String,
5077
5078 pub builtin_assertion_name_prefix: std::string::String,
5080
5081 pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
5083
5084 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5085}
5086
5087impl CodeCompilationConfig {
5088 pub fn new() -> Self {
5089 std::default::Default::default()
5090 }
5091
5092 pub fn set_default_database<T: std::convert::Into<std::string::String>>(
5094 mut self,
5095 v: T,
5096 ) -> Self {
5097 self.default_database = v.into();
5098 self
5099 }
5100
5101 pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5103 self.default_schema = v.into();
5104 self
5105 }
5106
5107 pub fn set_default_location<T: std::convert::Into<std::string::String>>(
5109 mut self,
5110 v: T,
5111 ) -> Self {
5112 self.default_location = v.into();
5113 self
5114 }
5115
5116 pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
5118 mut self,
5119 v: T,
5120 ) -> Self {
5121 self.assertion_schema = v.into();
5122 self
5123 }
5124
5125 pub fn set_vars<T, K, V>(mut self, v: T) -> Self
5127 where
5128 T: std::iter::IntoIterator<Item = (K, V)>,
5129 K: std::convert::Into<std::string::String>,
5130 V: std::convert::Into<std::string::String>,
5131 {
5132 use std::iter::Iterator;
5133 self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5134 self
5135 }
5136
5137 pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5139 self.database_suffix = v.into();
5140 self
5141 }
5142
5143 pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5145 self.schema_suffix = v.into();
5146 self
5147 }
5148
5149 pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5151 self.table_prefix = v.into();
5152 self
5153 }
5154
5155 pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
5157 mut self,
5158 v: T,
5159 ) -> Self {
5160 self.builtin_assertion_name_prefix = v.into();
5161 self
5162 }
5163
5164 pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
5166 where
5167 T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
5168 {
5169 self.default_notebook_runtime_options = std::option::Option::Some(v.into());
5170 self
5171 }
5172
5173 pub fn set_or_clear_default_notebook_runtime_options<T>(
5175 mut self,
5176 v: std::option::Option<T>,
5177 ) -> Self
5178 where
5179 T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
5180 {
5181 self.default_notebook_runtime_options = v.map(|x| x.into());
5182 self
5183 }
5184}
5185
5186impl wkt::message::Message for CodeCompilationConfig {
5187 fn typename() -> &'static str {
5188 "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
5189 }
5190}
5191
5192#[derive(Clone, Default, PartialEq)]
5194#[non_exhaustive]
5195pub struct NotebookRuntimeOptions {
5196 pub ai_platform_notebook_runtime_template: std::string::String,
5201
5202 pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
5204
5205 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5206}
5207
5208impl NotebookRuntimeOptions {
5209 pub fn new() -> Self {
5210 std::default::Default::default()
5211 }
5212
5213 pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
5215 mut self,
5216 v: T,
5217 ) -> Self {
5218 self.ai_platform_notebook_runtime_template = v.into();
5219 self
5220 }
5221
5222 pub fn set_execution_sink<
5227 T: std::convert::Into<
5228 std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
5229 >,
5230 >(
5231 mut self,
5232 v: T,
5233 ) -> Self {
5234 self.execution_sink = v.into();
5235 self
5236 }
5237
5238 pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
5242 #[allow(unreachable_patterns)]
5243 self.execution_sink.as_ref().and_then(|v| match v {
5244 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
5245 std::option::Option::Some(v)
5246 }
5247 _ => std::option::Option::None,
5248 })
5249 }
5250
5251 pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
5257 mut self,
5258 v: T,
5259 ) -> Self {
5260 self.execution_sink = std::option::Option::Some(
5261 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
5262 );
5263 self
5264 }
5265}
5266
5267impl wkt::message::Message for NotebookRuntimeOptions {
5268 fn typename() -> &'static str {
5269 "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
5270 }
5271}
5272
5273pub mod notebook_runtime_options {
5275 #[allow(unused_imports)]
5276 use super::*;
5277
5278 #[derive(Clone, Debug, PartialEq)]
5280 #[non_exhaustive]
5281 pub enum ExecutionSink {
5282 GcsOutputBucket(std::string::String),
5285 }
5286}
5287
5288#[derive(Clone, Default, PartialEq)]
5290#[non_exhaustive]
5291pub struct ListCompilationResultsRequest {
5292 pub parent: std::string::String,
5295
5296 pub page_size: i32,
5300
5301 pub page_token: std::string::String,
5308
5309 pub order_by: std::string::String,
5313
5314 pub filter: std::string::String,
5316
5317 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5318}
5319
5320impl ListCompilationResultsRequest {
5321 pub fn new() -> Self {
5322 std::default::Default::default()
5323 }
5324
5325 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5327 self.parent = v.into();
5328 self
5329 }
5330
5331 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5333 self.page_size = v.into();
5334 self
5335 }
5336
5337 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5339 self.page_token = v.into();
5340 self
5341 }
5342
5343 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5345 self.order_by = v.into();
5346 self
5347 }
5348
5349 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5351 self.filter = v.into();
5352 self
5353 }
5354}
5355
5356impl wkt::message::Message for ListCompilationResultsRequest {
5357 fn typename() -> &'static str {
5358 "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
5359 }
5360}
5361
5362#[derive(Clone, Default, PartialEq)]
5364#[non_exhaustive]
5365pub struct ListCompilationResultsResponse {
5366 pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
5368
5369 pub next_page_token: std::string::String,
5372
5373 pub unreachable: std::vec::Vec<std::string::String>,
5375
5376 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5377}
5378
5379impl ListCompilationResultsResponse {
5380 pub fn new() -> Self {
5381 std::default::Default::default()
5382 }
5383
5384 pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
5386 where
5387 T: std::iter::IntoIterator<Item = V>,
5388 V: std::convert::Into<crate::model::CompilationResult>,
5389 {
5390 use std::iter::Iterator;
5391 self.compilation_results = v.into_iter().map(|i| i.into()).collect();
5392 self
5393 }
5394
5395 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5397 self.next_page_token = v.into();
5398 self
5399 }
5400
5401 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5403 where
5404 T: std::iter::IntoIterator<Item = V>,
5405 V: std::convert::Into<std::string::String>,
5406 {
5407 use std::iter::Iterator;
5408 self.unreachable = v.into_iter().map(|i| i.into()).collect();
5409 self
5410 }
5411}
5412
5413impl wkt::message::Message for ListCompilationResultsResponse {
5414 fn typename() -> &'static str {
5415 "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
5416 }
5417}
5418
5419#[doc(hidden)]
5420impl gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
5421 type PageItem = crate::model::CompilationResult;
5422
5423 fn items(self) -> std::vec::Vec<Self::PageItem> {
5424 self.compilation_results
5425 }
5426
5427 fn next_page_token(&self) -> std::string::String {
5428 use std::clone::Clone;
5429 self.next_page_token.clone()
5430 }
5431}
5432
5433#[derive(Clone, Default, PartialEq)]
5435#[non_exhaustive]
5436pub struct GetCompilationResultRequest {
5437 pub name: std::string::String,
5439
5440 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5441}
5442
5443impl GetCompilationResultRequest {
5444 pub fn new() -> Self {
5445 std::default::Default::default()
5446 }
5447
5448 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5450 self.name = v.into();
5451 self
5452 }
5453}
5454
5455impl wkt::message::Message for GetCompilationResultRequest {
5456 fn typename() -> &'static str {
5457 "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
5458 }
5459}
5460
5461#[derive(Clone, Default, PartialEq)]
5463#[non_exhaustive]
5464pub struct CreateCompilationResultRequest {
5465 pub parent: std::string::String,
5468
5469 pub compilation_result: std::option::Option<crate::model::CompilationResult>,
5471
5472 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5473}
5474
5475impl CreateCompilationResultRequest {
5476 pub fn new() -> Self {
5477 std::default::Default::default()
5478 }
5479
5480 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5482 self.parent = v.into();
5483 self
5484 }
5485
5486 pub fn set_compilation_result<T>(mut self, v: T) -> Self
5488 where
5489 T: std::convert::Into<crate::model::CompilationResult>,
5490 {
5491 self.compilation_result = std::option::Option::Some(v.into());
5492 self
5493 }
5494
5495 pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
5497 where
5498 T: std::convert::Into<crate::model::CompilationResult>,
5499 {
5500 self.compilation_result = v.map(|x| x.into());
5501 self
5502 }
5503}
5504
5505impl wkt::message::Message for CreateCompilationResultRequest {
5506 fn typename() -> &'static str {
5507 "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
5508 }
5509}
5510
5511#[derive(Clone, Default, PartialEq)]
5514#[non_exhaustive]
5515pub struct Target {
5516 pub database: std::string::String,
5518
5519 pub schema: std::string::String,
5521
5522 pub name: std::string::String,
5524
5525 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5526}
5527
5528impl Target {
5529 pub fn new() -> Self {
5530 std::default::Default::default()
5531 }
5532
5533 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5535 self.database = v.into();
5536 self
5537 }
5538
5539 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5541 self.schema = v.into();
5542 self
5543 }
5544
5545 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5547 self.name = v.into();
5548 self
5549 }
5550}
5551
5552impl wkt::message::Message for Target {
5553 fn typename() -> &'static str {
5554 "type.googleapis.com/google.cloud.dataform.v1.Target"
5555 }
5556}
5557
5558#[derive(Clone, Default, PartialEq)]
5560#[non_exhaustive]
5561pub struct RelationDescriptor {
5562 pub description: std::string::String,
5564
5565 pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
5567
5568 pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
5570
5571 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5572}
5573
5574impl RelationDescriptor {
5575 pub fn new() -> Self {
5576 std::default::Default::default()
5577 }
5578
5579 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5581 self.description = v.into();
5582 self
5583 }
5584
5585 pub fn set_columns<T, V>(mut self, v: T) -> Self
5587 where
5588 T: std::iter::IntoIterator<Item = V>,
5589 V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
5590 {
5591 use std::iter::Iterator;
5592 self.columns = v.into_iter().map(|i| i.into()).collect();
5593 self
5594 }
5595
5596 pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
5598 where
5599 T: std::iter::IntoIterator<Item = (K, V)>,
5600 K: std::convert::Into<std::string::String>,
5601 V: std::convert::Into<std::string::String>,
5602 {
5603 use std::iter::Iterator;
5604 self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5605 self
5606 }
5607}
5608
5609impl wkt::message::Message for RelationDescriptor {
5610 fn typename() -> &'static str {
5611 "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
5612 }
5613}
5614
5615pub mod relation_descriptor {
5617 #[allow(unused_imports)]
5618 use super::*;
5619
5620 #[derive(Clone, Default, PartialEq)]
5622 #[non_exhaustive]
5623 pub struct ColumnDescriptor {
5624 pub path: std::vec::Vec<std::string::String>,
5627
5628 pub description: std::string::String,
5630
5631 pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
5633
5634 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5635 }
5636
5637 impl ColumnDescriptor {
5638 pub fn new() -> Self {
5639 std::default::Default::default()
5640 }
5641
5642 pub fn set_path<T, V>(mut self, v: T) -> Self
5644 where
5645 T: std::iter::IntoIterator<Item = V>,
5646 V: std::convert::Into<std::string::String>,
5647 {
5648 use std::iter::Iterator;
5649 self.path = v.into_iter().map(|i| i.into()).collect();
5650 self
5651 }
5652
5653 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5655 self.description = v.into();
5656 self
5657 }
5658
5659 pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
5661 where
5662 T: std::iter::IntoIterator<Item = V>,
5663 V: std::convert::Into<std::string::String>,
5664 {
5665 use std::iter::Iterator;
5666 self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
5667 self
5668 }
5669 }
5670
5671 impl wkt::message::Message for ColumnDescriptor {
5672 fn typename() -> &'static str {
5673 "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
5674 }
5675 }
5676}
5677
5678#[derive(Clone, Default, PartialEq)]
5680#[non_exhaustive]
5681pub struct CompilationResultAction {
5682 pub target: std::option::Option<crate::model::Target>,
5684
5685 pub canonical_target: std::option::Option<crate::model::Target>,
5688
5689 pub file_path: std::string::String,
5692
5693 pub internal_metadata: std::option::Option<std::string::String>,
5697
5698 pub compiled_object:
5700 std::option::Option<crate::model::compilation_result_action::CompiledObject>,
5701
5702 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5703}
5704
5705impl CompilationResultAction {
5706 pub fn new() -> Self {
5707 std::default::Default::default()
5708 }
5709
5710 pub fn set_target<T>(mut self, v: T) -> Self
5712 where
5713 T: std::convert::Into<crate::model::Target>,
5714 {
5715 self.target = std::option::Option::Some(v.into());
5716 self
5717 }
5718
5719 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
5721 where
5722 T: std::convert::Into<crate::model::Target>,
5723 {
5724 self.target = v.map(|x| x.into());
5725 self
5726 }
5727
5728 pub fn set_canonical_target<T>(mut self, v: T) -> Self
5730 where
5731 T: std::convert::Into<crate::model::Target>,
5732 {
5733 self.canonical_target = std::option::Option::Some(v.into());
5734 self
5735 }
5736
5737 pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
5739 where
5740 T: std::convert::Into<crate::model::Target>,
5741 {
5742 self.canonical_target = v.map(|x| x.into());
5743 self
5744 }
5745
5746 pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5748 self.file_path = v.into();
5749 self
5750 }
5751
5752 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
5754 where
5755 T: std::convert::Into<std::string::String>,
5756 {
5757 self.internal_metadata = std::option::Option::Some(v.into());
5758 self
5759 }
5760
5761 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5763 where
5764 T: std::convert::Into<std::string::String>,
5765 {
5766 self.internal_metadata = v.map(|x| x.into());
5767 self
5768 }
5769
5770 pub fn set_compiled_object<
5775 T: std::convert::Into<
5776 std::option::Option<crate::model::compilation_result_action::CompiledObject>,
5777 >,
5778 >(
5779 mut self,
5780 v: T,
5781 ) -> Self {
5782 self.compiled_object = v.into();
5783 self
5784 }
5785
5786 pub fn relation(
5790 &self,
5791 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
5792 {
5793 #[allow(unreachable_patterns)]
5794 self.compiled_object.as_ref().and_then(|v| match v {
5795 crate::model::compilation_result_action::CompiledObject::Relation(v) => {
5796 std::option::Option::Some(v)
5797 }
5798 _ => std::option::Option::None,
5799 })
5800 }
5801
5802 pub fn set_relation<
5808 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
5809 >(
5810 mut self,
5811 v: T,
5812 ) -> Self {
5813 self.compiled_object = std::option::Option::Some(
5814 crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
5815 );
5816 self
5817 }
5818
5819 pub fn operations(
5823 &self,
5824 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
5825 {
5826 #[allow(unreachable_patterns)]
5827 self.compiled_object.as_ref().and_then(|v| match v {
5828 crate::model::compilation_result_action::CompiledObject::Operations(v) => {
5829 std::option::Option::Some(v)
5830 }
5831 _ => std::option::Option::None,
5832 })
5833 }
5834
5835 pub fn set_operations<
5841 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
5842 >(
5843 mut self,
5844 v: T,
5845 ) -> Self {
5846 self.compiled_object = std::option::Option::Some(
5847 crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
5848 );
5849 self
5850 }
5851
5852 pub fn assertion(
5856 &self,
5857 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
5858 {
5859 #[allow(unreachable_patterns)]
5860 self.compiled_object.as_ref().and_then(|v| match v {
5861 crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
5862 std::option::Option::Some(v)
5863 }
5864 _ => std::option::Option::None,
5865 })
5866 }
5867
5868 pub fn set_assertion<
5874 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
5875 >(
5876 mut self,
5877 v: T,
5878 ) -> Self {
5879 self.compiled_object = std::option::Option::Some(
5880 crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
5881 );
5882 self
5883 }
5884
5885 pub fn declaration(
5889 &self,
5890 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
5891 {
5892 #[allow(unreachable_patterns)]
5893 self.compiled_object.as_ref().and_then(|v| match v {
5894 crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
5895 std::option::Option::Some(v)
5896 }
5897 _ => std::option::Option::None,
5898 })
5899 }
5900
5901 pub fn set_declaration<
5907 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
5908 >(
5909 mut self,
5910 v: T,
5911 ) -> Self {
5912 self.compiled_object = std::option::Option::Some(
5913 crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
5914 );
5915 self
5916 }
5917
5918 pub fn notebook(
5922 &self,
5923 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
5924 {
5925 #[allow(unreachable_patterns)]
5926 self.compiled_object.as_ref().and_then(|v| match v {
5927 crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
5928 std::option::Option::Some(v)
5929 }
5930 _ => std::option::Option::None,
5931 })
5932 }
5933
5934 pub fn set_notebook<
5940 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
5941 >(
5942 mut self,
5943 v: T,
5944 ) -> Self {
5945 self.compiled_object = std::option::Option::Some(
5946 crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
5947 );
5948 self
5949 }
5950
5951 pub fn data_preparation(
5955 &self,
5956 ) -> std::option::Option<
5957 &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
5958 > {
5959 #[allow(unreachable_patterns)]
5960 self.compiled_object.as_ref().and_then(|v| match v {
5961 crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
5962 std::option::Option::Some(v)
5963 }
5964 _ => std::option::Option::None,
5965 })
5966 }
5967
5968 pub fn set_data_preparation<
5974 T: std::convert::Into<
5975 std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
5976 >,
5977 >(
5978 mut self,
5979 v: T,
5980 ) -> Self {
5981 self.compiled_object = std::option::Option::Some(
5982 crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
5983 );
5984 self
5985 }
5986}
5987
5988impl wkt::message::Message for CompilationResultAction {
5989 fn typename() -> &'static str {
5990 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
5991 }
5992}
5993
5994pub mod compilation_result_action {
5996 #[allow(unused_imports)]
5997 use super::*;
5998
5999 #[derive(Clone, Default, PartialEq)]
6001 #[non_exhaustive]
6002 pub struct Relation {
6003 pub dependency_targets: std::vec::Vec<crate::model::Target>,
6005
6006 pub disabled: bool,
6008
6009 pub tags: std::vec::Vec<std::string::String>,
6011
6012 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6014
6015 pub relation_type: crate::model::compilation_result_action::relation::RelationType,
6017
6018 pub select_query: std::string::String,
6020
6021 pub pre_operations: std::vec::Vec<std::string::String>,
6023
6024 pub post_operations: std::vec::Vec<std::string::String>,
6026
6027 pub incremental_table_config: std::option::Option<
6030 crate::model::compilation_result_action::relation::IncrementalTableConfig,
6031 >,
6032
6033 pub partition_expression: std::string::String,
6035
6036 pub cluster_expressions: std::vec::Vec<std::string::String>,
6038
6039 pub partition_expiration_days: i32,
6041
6042 pub require_partition_filter: bool,
6045
6046 pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
6051
6052 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6053 }
6054
6055 impl Relation {
6056 pub fn new() -> Self {
6057 std::default::Default::default()
6058 }
6059
6060 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6062 where
6063 T: std::iter::IntoIterator<Item = V>,
6064 V: std::convert::Into<crate::model::Target>,
6065 {
6066 use std::iter::Iterator;
6067 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6068 self
6069 }
6070
6071 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6073 self.disabled = v.into();
6074 self
6075 }
6076
6077 pub fn set_tags<T, V>(mut self, v: T) -> Self
6079 where
6080 T: std::iter::IntoIterator<Item = V>,
6081 V: std::convert::Into<std::string::String>,
6082 {
6083 use std::iter::Iterator;
6084 self.tags = v.into_iter().map(|i| i.into()).collect();
6085 self
6086 }
6087
6088 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6090 where
6091 T: std::convert::Into<crate::model::RelationDescriptor>,
6092 {
6093 self.relation_descriptor = std::option::Option::Some(v.into());
6094 self
6095 }
6096
6097 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6099 where
6100 T: std::convert::Into<crate::model::RelationDescriptor>,
6101 {
6102 self.relation_descriptor = v.map(|x| x.into());
6103 self
6104 }
6105
6106 pub fn set_relation_type<
6108 T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
6109 >(
6110 mut self,
6111 v: T,
6112 ) -> Self {
6113 self.relation_type = v.into();
6114 self
6115 }
6116
6117 pub fn set_select_query<T: std::convert::Into<std::string::String>>(
6119 mut self,
6120 v: T,
6121 ) -> Self {
6122 self.select_query = v.into();
6123 self
6124 }
6125
6126 pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
6128 where
6129 T: std::iter::IntoIterator<Item = V>,
6130 V: std::convert::Into<std::string::String>,
6131 {
6132 use std::iter::Iterator;
6133 self.pre_operations = v.into_iter().map(|i| i.into()).collect();
6134 self
6135 }
6136
6137 pub fn set_post_operations<T, V>(mut self, v: T) -> Self
6139 where
6140 T: std::iter::IntoIterator<Item = V>,
6141 V: std::convert::Into<std::string::String>,
6142 {
6143 use std::iter::Iterator;
6144 self.post_operations = v.into_iter().map(|i| i.into()).collect();
6145 self
6146 }
6147
6148 pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
6150 where
6151 T: std::convert::Into<
6152 crate::model::compilation_result_action::relation::IncrementalTableConfig,
6153 >,
6154 {
6155 self.incremental_table_config = std::option::Option::Some(v.into());
6156 self
6157 }
6158
6159 pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
6161 where
6162 T: std::convert::Into<
6163 crate::model::compilation_result_action::relation::IncrementalTableConfig,
6164 >,
6165 {
6166 self.incremental_table_config = v.map(|x| x.into());
6167 self
6168 }
6169
6170 pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
6172 mut self,
6173 v: T,
6174 ) -> Self {
6175 self.partition_expression = v.into();
6176 self
6177 }
6178
6179 pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
6181 where
6182 T: std::iter::IntoIterator<Item = V>,
6183 V: std::convert::Into<std::string::String>,
6184 {
6185 use std::iter::Iterator;
6186 self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
6187 self
6188 }
6189
6190 pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6192 self.partition_expiration_days = v.into();
6193 self
6194 }
6195
6196 pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6198 self.require_partition_filter = v.into();
6199 self
6200 }
6201
6202 pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
6204 where
6205 T: std::iter::IntoIterator<Item = (K, V)>,
6206 K: std::convert::Into<std::string::String>,
6207 V: std::convert::Into<std::string::String>,
6208 {
6209 use std::iter::Iterator;
6210 self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6211 self
6212 }
6213 }
6214
6215 impl wkt::message::Message for Relation {
6216 fn typename() -> &'static str {
6217 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
6218 }
6219 }
6220
6221 pub mod relation {
6223 #[allow(unused_imports)]
6224 use super::*;
6225
6226 #[derive(Clone, Default, PartialEq)]
6228 #[non_exhaustive]
6229 pub struct IncrementalTableConfig {
6230 pub incremental_select_query: std::string::String,
6233
6234 pub refresh_disabled: bool,
6236
6237 pub unique_key_parts: std::vec::Vec<std::string::String>,
6242
6243 pub update_partition_filter: std::string::String,
6247
6248 pub incremental_pre_operations: std::vec::Vec<std::string::String>,
6251
6252 pub incremental_post_operations: std::vec::Vec<std::string::String>,
6255
6256 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6257 }
6258
6259 impl IncrementalTableConfig {
6260 pub fn new() -> Self {
6261 std::default::Default::default()
6262 }
6263
6264 pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
6266 mut self,
6267 v: T,
6268 ) -> Self {
6269 self.incremental_select_query = v.into();
6270 self
6271 }
6272
6273 pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6275 self.refresh_disabled = v.into();
6276 self
6277 }
6278
6279 pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
6281 where
6282 T: std::iter::IntoIterator<Item = V>,
6283 V: std::convert::Into<std::string::String>,
6284 {
6285 use std::iter::Iterator;
6286 self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
6287 self
6288 }
6289
6290 pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
6292 mut self,
6293 v: T,
6294 ) -> Self {
6295 self.update_partition_filter = v.into();
6296 self
6297 }
6298
6299 pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
6301 where
6302 T: std::iter::IntoIterator<Item = V>,
6303 V: std::convert::Into<std::string::String>,
6304 {
6305 use std::iter::Iterator;
6306 self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
6307 self
6308 }
6309
6310 pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
6312 where
6313 T: std::iter::IntoIterator<Item = V>,
6314 V: std::convert::Into<std::string::String>,
6315 {
6316 use std::iter::Iterator;
6317 self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
6318 self
6319 }
6320 }
6321
6322 impl wkt::message::Message for IncrementalTableConfig {
6323 fn typename() -> &'static str {
6324 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
6325 }
6326 }
6327
6328 #[derive(Clone, Debug, PartialEq)]
6344 #[non_exhaustive]
6345 pub enum RelationType {
6346 Unspecified,
6348 Table,
6350 View,
6352 IncrementalTable,
6354 MaterializedView,
6356 UnknownValue(relation_type::UnknownValue),
6361 }
6362
6363 #[doc(hidden)]
6364 pub mod relation_type {
6365 #[allow(unused_imports)]
6366 use super::*;
6367 #[derive(Clone, Debug, PartialEq)]
6368 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6369 }
6370
6371 impl RelationType {
6372 pub fn value(&self) -> std::option::Option<i32> {
6377 match self {
6378 Self::Unspecified => std::option::Option::Some(0),
6379 Self::Table => std::option::Option::Some(1),
6380 Self::View => std::option::Option::Some(2),
6381 Self::IncrementalTable => std::option::Option::Some(3),
6382 Self::MaterializedView => std::option::Option::Some(4),
6383 Self::UnknownValue(u) => u.0.value(),
6384 }
6385 }
6386
6387 pub fn name(&self) -> std::option::Option<&str> {
6392 match self {
6393 Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
6394 Self::Table => std::option::Option::Some("TABLE"),
6395 Self::View => std::option::Option::Some("VIEW"),
6396 Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
6397 Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
6398 Self::UnknownValue(u) => u.0.name(),
6399 }
6400 }
6401 }
6402
6403 impl std::default::Default for RelationType {
6404 fn default() -> Self {
6405 use std::convert::From;
6406 Self::from(0)
6407 }
6408 }
6409
6410 impl std::fmt::Display for RelationType {
6411 fn fmt(
6412 &self,
6413 f: &mut std::fmt::Formatter<'_>,
6414 ) -> std::result::Result<(), std::fmt::Error> {
6415 wkt::internal::display_enum(f, self.name(), self.value())
6416 }
6417 }
6418
6419 impl std::convert::From<i32> for RelationType {
6420 fn from(value: i32) -> Self {
6421 match value {
6422 0 => Self::Unspecified,
6423 1 => Self::Table,
6424 2 => Self::View,
6425 3 => Self::IncrementalTable,
6426 4 => Self::MaterializedView,
6427 _ => Self::UnknownValue(relation_type::UnknownValue(
6428 wkt::internal::UnknownEnumValue::Integer(value),
6429 )),
6430 }
6431 }
6432 }
6433
6434 impl std::convert::From<&str> for RelationType {
6435 fn from(value: &str) -> Self {
6436 use std::string::ToString;
6437 match value {
6438 "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
6439 "TABLE" => Self::Table,
6440 "VIEW" => Self::View,
6441 "INCREMENTAL_TABLE" => Self::IncrementalTable,
6442 "MATERIALIZED_VIEW" => Self::MaterializedView,
6443 _ => Self::UnknownValue(relation_type::UnknownValue(
6444 wkt::internal::UnknownEnumValue::String(value.to_string()),
6445 )),
6446 }
6447 }
6448 }
6449
6450 impl serde::ser::Serialize for RelationType {
6451 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6452 where
6453 S: serde::Serializer,
6454 {
6455 match self {
6456 Self::Unspecified => serializer.serialize_i32(0),
6457 Self::Table => serializer.serialize_i32(1),
6458 Self::View => serializer.serialize_i32(2),
6459 Self::IncrementalTable => serializer.serialize_i32(3),
6460 Self::MaterializedView => serializer.serialize_i32(4),
6461 Self::UnknownValue(u) => u.0.serialize(serializer),
6462 }
6463 }
6464 }
6465
6466 impl<'de> serde::de::Deserialize<'de> for RelationType {
6467 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6468 where
6469 D: serde::Deserializer<'de>,
6470 {
6471 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
6472 ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
6473 ))
6474 }
6475 }
6476 }
6477
6478 #[derive(Clone, Default, PartialEq)]
6480 #[non_exhaustive]
6481 pub struct Operations {
6482 pub dependency_targets: std::vec::Vec<crate::model::Target>,
6484
6485 pub disabled: bool,
6487
6488 pub tags: std::vec::Vec<std::string::String>,
6490
6491 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6494
6495 pub queries: std::vec::Vec<std::string::String>,
6498
6499 pub has_output: bool,
6501
6502 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6503 }
6504
6505 impl Operations {
6506 pub fn new() -> Self {
6507 std::default::Default::default()
6508 }
6509
6510 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6512 where
6513 T: std::iter::IntoIterator<Item = V>,
6514 V: std::convert::Into<crate::model::Target>,
6515 {
6516 use std::iter::Iterator;
6517 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6518 self
6519 }
6520
6521 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6523 self.disabled = v.into();
6524 self
6525 }
6526
6527 pub fn set_tags<T, V>(mut self, v: T) -> Self
6529 where
6530 T: std::iter::IntoIterator<Item = V>,
6531 V: std::convert::Into<std::string::String>,
6532 {
6533 use std::iter::Iterator;
6534 self.tags = v.into_iter().map(|i| i.into()).collect();
6535 self
6536 }
6537
6538 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6540 where
6541 T: std::convert::Into<crate::model::RelationDescriptor>,
6542 {
6543 self.relation_descriptor = std::option::Option::Some(v.into());
6544 self
6545 }
6546
6547 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6549 where
6550 T: std::convert::Into<crate::model::RelationDescriptor>,
6551 {
6552 self.relation_descriptor = v.map(|x| x.into());
6553 self
6554 }
6555
6556 pub fn set_queries<T, V>(mut self, v: T) -> Self
6558 where
6559 T: std::iter::IntoIterator<Item = V>,
6560 V: std::convert::Into<std::string::String>,
6561 {
6562 use std::iter::Iterator;
6563 self.queries = v.into_iter().map(|i| i.into()).collect();
6564 self
6565 }
6566
6567 pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6569 self.has_output = v.into();
6570 self
6571 }
6572 }
6573
6574 impl wkt::message::Message for Operations {
6575 fn typename() -> &'static str {
6576 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
6577 }
6578 }
6579
6580 #[derive(Clone, Default, PartialEq)]
6583 #[non_exhaustive]
6584 pub struct Assertion {
6585 pub dependency_targets: std::vec::Vec<crate::model::Target>,
6587
6588 pub parent_action: std::option::Option<crate::model::Target>,
6591
6592 pub disabled: bool,
6594
6595 pub tags: std::vec::Vec<std::string::String>,
6597
6598 pub select_query: std::string::String,
6601
6602 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6605
6606 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6607 }
6608
6609 impl Assertion {
6610 pub fn new() -> Self {
6611 std::default::Default::default()
6612 }
6613
6614 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6616 where
6617 T: std::iter::IntoIterator<Item = V>,
6618 V: std::convert::Into<crate::model::Target>,
6619 {
6620 use std::iter::Iterator;
6621 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6622 self
6623 }
6624
6625 pub fn set_parent_action<T>(mut self, v: T) -> Self
6627 where
6628 T: std::convert::Into<crate::model::Target>,
6629 {
6630 self.parent_action = std::option::Option::Some(v.into());
6631 self
6632 }
6633
6634 pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
6636 where
6637 T: std::convert::Into<crate::model::Target>,
6638 {
6639 self.parent_action = v.map(|x| x.into());
6640 self
6641 }
6642
6643 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6645 self.disabled = v.into();
6646 self
6647 }
6648
6649 pub fn set_tags<T, V>(mut self, v: T) -> Self
6651 where
6652 T: std::iter::IntoIterator<Item = V>,
6653 V: std::convert::Into<std::string::String>,
6654 {
6655 use std::iter::Iterator;
6656 self.tags = v.into_iter().map(|i| i.into()).collect();
6657 self
6658 }
6659
6660 pub fn set_select_query<T: std::convert::Into<std::string::String>>(
6662 mut self,
6663 v: T,
6664 ) -> Self {
6665 self.select_query = v.into();
6666 self
6667 }
6668
6669 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6671 where
6672 T: std::convert::Into<crate::model::RelationDescriptor>,
6673 {
6674 self.relation_descriptor = std::option::Option::Some(v.into());
6675 self
6676 }
6677
6678 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6680 where
6681 T: std::convert::Into<crate::model::RelationDescriptor>,
6682 {
6683 self.relation_descriptor = v.map(|x| x.into());
6684 self
6685 }
6686 }
6687
6688 impl wkt::message::Message for Assertion {
6689 fn typename() -> &'static str {
6690 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
6691 }
6692 }
6693
6694 #[derive(Clone, Default, PartialEq)]
6697 #[non_exhaustive]
6698 pub struct Declaration {
6699 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6702
6703 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6704 }
6705
6706 impl Declaration {
6707 pub fn new() -> Self {
6708 std::default::Default::default()
6709 }
6710
6711 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6713 where
6714 T: std::convert::Into<crate::model::RelationDescriptor>,
6715 {
6716 self.relation_descriptor = std::option::Option::Some(v.into());
6717 self
6718 }
6719
6720 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6722 where
6723 T: std::convert::Into<crate::model::RelationDescriptor>,
6724 {
6725 self.relation_descriptor = v.map(|x| x.into());
6726 self
6727 }
6728 }
6729
6730 impl wkt::message::Message for Declaration {
6731 fn typename() -> &'static str {
6732 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
6733 }
6734 }
6735
6736 #[derive(Clone, Default, PartialEq)]
6738 #[non_exhaustive]
6739 pub struct Notebook {
6740 pub dependency_targets: std::vec::Vec<crate::model::Target>,
6742
6743 pub disabled: bool,
6745
6746 pub contents: std::string::String,
6748
6749 pub tags: std::vec::Vec<std::string::String>,
6751
6752 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6753 }
6754
6755 impl Notebook {
6756 pub fn new() -> Self {
6757 std::default::Default::default()
6758 }
6759
6760 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6762 where
6763 T: std::iter::IntoIterator<Item = V>,
6764 V: std::convert::Into<crate::model::Target>,
6765 {
6766 use std::iter::Iterator;
6767 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6768 self
6769 }
6770
6771 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6773 self.disabled = v.into();
6774 self
6775 }
6776
6777 pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6779 self.contents = v.into();
6780 self
6781 }
6782
6783 pub fn set_tags<T, V>(mut self, v: T) -> Self
6785 where
6786 T: std::iter::IntoIterator<Item = V>,
6787 V: std::convert::Into<std::string::String>,
6788 {
6789 use std::iter::Iterator;
6790 self.tags = v.into_iter().map(|i| i.into()).collect();
6791 self
6792 }
6793 }
6794
6795 impl wkt::message::Message for Notebook {
6796 fn typename() -> &'static str {
6797 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
6798 }
6799 }
6800
6801 #[derive(Clone, Default, PartialEq)]
6803 #[non_exhaustive]
6804 pub struct DataPreparation {
6805 pub dependency_targets: std::vec::Vec<crate::model::Target>,
6807
6808 pub disabled: bool,
6810
6811 pub tags: std::vec::Vec<std::string::String>,
6813
6814 pub definition: std::option::Option<
6816 crate::model::compilation_result_action::data_preparation::Definition,
6817 >,
6818
6819 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6820 }
6821
6822 impl DataPreparation {
6823 pub fn new() -> Self {
6824 std::default::Default::default()
6825 }
6826
6827 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6829 where
6830 T: std::iter::IntoIterator<Item = V>,
6831 V: std::convert::Into<crate::model::Target>,
6832 {
6833 use std::iter::Iterator;
6834 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6835 self
6836 }
6837
6838 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6840 self.disabled = v.into();
6841 self
6842 }
6843
6844 pub fn set_tags<T, V>(mut self, v: T) -> Self
6846 where
6847 T: std::iter::IntoIterator<Item = V>,
6848 V: std::convert::Into<std::string::String>,
6849 {
6850 use std::iter::Iterator;
6851 self.tags = v.into_iter().map(|i| i.into()).collect();
6852 self
6853 }
6854
6855 pub fn set_definition<
6860 T: std::convert::Into<
6861 std::option::Option<
6862 crate::model::compilation_result_action::data_preparation::Definition,
6863 >,
6864 >,
6865 >(
6866 mut self,
6867 v: T,
6868 ) -> Self {
6869 self.definition = v.into();
6870 self
6871 }
6872
6873 pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
6877 #[allow(unreachable_patterns)]
6878 self.definition.as_ref().and_then(|v| match v {
6879 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
6880 _ => std::option::Option::None,
6881 })
6882 }
6883
6884 pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
6890 mut self,
6891 v: T,
6892 ) -> Self {
6893 self.definition = std::option::Option::Some(
6894 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
6895 v.into(),
6896 ),
6897 );
6898 self
6899 }
6900
6901 pub fn contents_sql(
6905 &self,
6906 ) -> std::option::Option<
6907 &std::boxed::Box<
6908 crate::model::compilation_result_action::data_preparation::SqlDefinition,
6909 >,
6910 > {
6911 #[allow(unreachable_patterns)]
6912 self.definition.as_ref().and_then(|v| match v {
6913 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
6914 _ => std::option::Option::None,
6915 })
6916 }
6917
6918 pub fn set_contents_sql<
6924 T: std::convert::Into<
6925 std::boxed::Box<
6926 crate::model::compilation_result_action::data_preparation::SqlDefinition,
6927 >,
6928 >,
6929 >(
6930 mut self,
6931 v: T,
6932 ) -> Self {
6933 self.definition = std::option::Option::Some(
6934 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
6935 v.into(),
6936 ),
6937 );
6938 self
6939 }
6940 }
6941
6942 impl wkt::message::Message for DataPreparation {
6943 fn typename() -> &'static str {
6944 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
6945 }
6946 }
6947
6948 pub mod data_preparation {
6950 #[allow(unused_imports)]
6951 use super::*;
6952
6953 #[derive(Clone, Default, PartialEq)]
6955 #[non_exhaustive]
6956 pub struct SqlDefinition {
6957 pub query: std::string::String,
6960
6961 pub error_table: std::option::Option<
6963 crate::model::compilation_result_action::data_preparation::ErrorTable,
6964 >,
6965
6966 pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
6968
6969 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6970 }
6971
6972 impl SqlDefinition {
6973 pub fn new() -> Self {
6974 std::default::Default::default()
6975 }
6976
6977 pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6979 self.query = v.into();
6980 self
6981 }
6982
6983 pub fn set_error_table<T>(mut self, v: T) -> Self
6985 where
6986 T: std::convert::Into<
6987 crate::model::compilation_result_action::data_preparation::ErrorTable,
6988 >,
6989 {
6990 self.error_table = std::option::Option::Some(v.into());
6991 self
6992 }
6993
6994 pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
6996 where
6997 T: std::convert::Into<
6998 crate::model::compilation_result_action::data_preparation::ErrorTable,
6999 >,
7000 {
7001 self.error_table = v.map(|x| x.into());
7002 self
7003 }
7004
7005 pub fn set_load<T>(mut self, v: T) -> Self
7007 where
7008 T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
7009 {
7010 self.load = std::option::Option::Some(v.into());
7011 self
7012 }
7013
7014 pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
7016 where
7017 T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
7018 {
7019 self.load = v.map(|x| x.into());
7020 self
7021 }
7022 }
7023
7024 impl wkt::message::Message for SqlDefinition {
7025 fn typename() -> &'static str {
7026 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
7027 }
7028 }
7029
7030 #[derive(Clone, Default, PartialEq)]
7033 #[non_exhaustive]
7034 pub struct ErrorTable {
7035 pub target: std::option::Option<crate::model::Target>,
7037
7038 pub retention_days: i32,
7041
7042 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7043 }
7044
7045 impl ErrorTable {
7046 pub fn new() -> Self {
7047 std::default::Default::default()
7048 }
7049
7050 pub fn set_target<T>(mut self, v: T) -> Self
7052 where
7053 T: std::convert::Into<crate::model::Target>,
7054 {
7055 self.target = std::option::Option::Some(v.into());
7056 self
7057 }
7058
7059 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
7061 where
7062 T: std::convert::Into<crate::model::Target>,
7063 {
7064 self.target = v.map(|x| x.into());
7065 self
7066 }
7067
7068 pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7070 self.retention_days = v.into();
7071 self
7072 }
7073 }
7074
7075 impl wkt::message::Message for ErrorTable {
7076 fn typename() -> &'static str {
7077 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
7078 }
7079 }
7080
7081 #[derive(Clone, Debug, PartialEq)]
7083 #[non_exhaustive]
7084 pub enum Definition {
7085 ContentsYaml(std::string::String),
7087 ContentsSql(
7090 std::boxed::Box<
7091 crate::model::compilation_result_action::data_preparation::SqlDefinition,
7092 >,
7093 ),
7094 }
7095 }
7096
7097 #[derive(Clone, Default, PartialEq)]
7099 #[non_exhaustive]
7100 pub struct LoadConfig {
7101 pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
7103
7104 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7105 }
7106
7107 impl LoadConfig {
7108 pub fn new() -> Self {
7109 std::default::Default::default()
7110 }
7111
7112 pub fn set_mode<
7117 T: std::convert::Into<
7118 std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
7119 >,
7120 >(
7121 mut self,
7122 v: T,
7123 ) -> Self {
7124 self.mode = v.into();
7125 self
7126 }
7127
7128 pub fn replace(
7132 &self,
7133 ) -> std::option::Option<
7134 &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7135 > {
7136 #[allow(unreachable_patterns)]
7137 self.mode.as_ref().and_then(|v| match v {
7138 crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
7139 std::option::Option::Some(v)
7140 }
7141 _ => std::option::Option::None,
7142 })
7143 }
7144
7145 pub fn set_replace<
7151 T: std::convert::Into<
7152 std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7153 >,
7154 >(
7155 mut self,
7156 v: T,
7157 ) -> Self {
7158 self.mode = std::option::Option::Some(
7159 crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
7160 );
7161 self
7162 }
7163
7164 pub fn append(
7168 &self,
7169 ) -> std::option::Option<
7170 &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7171 > {
7172 #[allow(unreachable_patterns)]
7173 self.mode.as_ref().and_then(|v| match v {
7174 crate::model::compilation_result_action::load_config::Mode::Append(v) => {
7175 std::option::Option::Some(v)
7176 }
7177 _ => std::option::Option::None,
7178 })
7179 }
7180
7181 pub fn set_append<
7187 T: std::convert::Into<
7188 std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7189 >,
7190 >(
7191 mut self,
7192 v: T,
7193 ) -> Self {
7194 self.mode = std::option::Option::Some(
7195 crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
7196 );
7197 self
7198 }
7199
7200 pub fn maximum(
7204 &self,
7205 ) -> std::option::Option<
7206 &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7207 > {
7208 #[allow(unreachable_patterns)]
7209 self.mode.as_ref().and_then(|v| match v {
7210 crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
7211 std::option::Option::Some(v)
7212 }
7213 _ => std::option::Option::None,
7214 })
7215 }
7216
7217 pub fn set_maximum<
7223 T: std::convert::Into<
7224 std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7225 >,
7226 >(
7227 mut self,
7228 v: T,
7229 ) -> Self {
7230 self.mode = std::option::Option::Some(
7231 crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
7232 );
7233 self
7234 }
7235
7236 pub fn unique(
7240 &self,
7241 ) -> std::option::Option<
7242 &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7243 > {
7244 #[allow(unreachable_patterns)]
7245 self.mode.as_ref().and_then(|v| match v {
7246 crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
7247 std::option::Option::Some(v)
7248 }
7249 _ => std::option::Option::None,
7250 })
7251 }
7252
7253 pub fn set_unique<
7259 T: std::convert::Into<
7260 std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7261 >,
7262 >(
7263 mut self,
7264 v: T,
7265 ) -> Self {
7266 self.mode = std::option::Option::Some(
7267 crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
7268 );
7269 self
7270 }
7271 }
7272
7273 impl wkt::message::Message for LoadConfig {
7274 fn typename() -> &'static str {
7275 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
7276 }
7277 }
7278
7279 pub mod load_config {
7281 #[allow(unused_imports)]
7282 use super::*;
7283
7284 #[derive(Clone, Debug, PartialEq)]
7286 #[non_exhaustive]
7287 pub enum Mode {
7288 Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
7290 Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
7292 Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
7295 Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
7298 }
7299 }
7300
7301 #[derive(Clone, Default, PartialEq)]
7303 #[non_exhaustive]
7304 pub struct SimpleLoadMode {
7305 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7306 }
7307
7308 impl SimpleLoadMode {
7309 pub fn new() -> Self {
7310 std::default::Default::default()
7311 }
7312 }
7313
7314 impl wkt::message::Message for SimpleLoadMode {
7315 fn typename() -> &'static str {
7316 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
7317 }
7318 }
7319
7320 #[derive(Clone, Default, PartialEq)]
7322 #[non_exhaustive]
7323 pub struct IncrementalLoadMode {
7324 pub column: std::string::String,
7326
7327 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7328 }
7329
7330 impl IncrementalLoadMode {
7331 pub fn new() -> Self {
7332 std::default::Default::default()
7333 }
7334
7335 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7337 self.column = v.into();
7338 self
7339 }
7340 }
7341
7342 impl wkt::message::Message for IncrementalLoadMode {
7343 fn typename() -> &'static str {
7344 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
7345 }
7346 }
7347
7348 #[derive(Clone, Debug, PartialEq)]
7350 #[non_exhaustive]
7351 pub enum CompiledObject {
7352 Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
7354 Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
7356 Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
7358 Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
7360 Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
7362 DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
7364 }
7365}
7366
7367#[derive(Clone, Default, PartialEq)]
7369#[non_exhaustive]
7370pub struct QueryCompilationResultActionsRequest {
7371 pub name: std::string::String,
7373
7374 pub page_size: i32,
7378
7379 pub page_token: std::string::String,
7387
7388 pub filter: std::string::String,
7391
7392 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7393}
7394
7395impl QueryCompilationResultActionsRequest {
7396 pub fn new() -> Self {
7397 std::default::Default::default()
7398 }
7399
7400 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7402 self.name = v.into();
7403 self
7404 }
7405
7406 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7408 self.page_size = v.into();
7409 self
7410 }
7411
7412 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7414 self.page_token = v.into();
7415 self
7416 }
7417
7418 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7420 self.filter = v.into();
7421 self
7422 }
7423}
7424
7425impl wkt::message::Message for QueryCompilationResultActionsRequest {
7426 fn typename() -> &'static str {
7427 "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
7428 }
7429}
7430
7431#[derive(Clone, Default, PartialEq)]
7433#[non_exhaustive]
7434pub struct QueryCompilationResultActionsResponse {
7435 pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
7437
7438 pub next_page_token: std::string::String,
7441
7442 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7443}
7444
7445impl QueryCompilationResultActionsResponse {
7446 pub fn new() -> Self {
7447 std::default::Default::default()
7448 }
7449
7450 pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
7452 where
7453 T: std::iter::IntoIterator<Item = V>,
7454 V: std::convert::Into<crate::model::CompilationResultAction>,
7455 {
7456 use std::iter::Iterator;
7457 self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
7458 self
7459 }
7460
7461 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7463 self.next_page_token = v.into();
7464 self
7465 }
7466}
7467
7468impl wkt::message::Message for QueryCompilationResultActionsResponse {
7469 fn typename() -> &'static str {
7470 "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
7471 }
7472}
7473
7474#[doc(hidden)]
7475impl gax::paginator::internal::PageableResponse for QueryCompilationResultActionsResponse {
7476 type PageItem = crate::model::CompilationResultAction;
7477
7478 fn items(self) -> std::vec::Vec<Self::PageItem> {
7479 self.compilation_result_actions
7480 }
7481
7482 fn next_page_token(&self) -> std::string::String {
7483 use std::clone::Clone;
7484 self.next_page_token.clone()
7485 }
7486}
7487
7488#[derive(Clone, Default, PartialEq)]
7490#[non_exhaustive]
7491pub struct WorkflowConfig {
7492 pub name: std::string::String,
7494
7495 pub release_config: std::string::String,
7499
7500 pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
7502
7503 pub cron_schedule: std::string::String,
7506
7507 pub time_zone: std::string::String,
7512
7513 pub recent_scheduled_execution_records:
7517 std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
7518
7519 pub disabled: bool,
7521
7522 pub create_time: std::option::Option<wkt::Timestamp>,
7524
7525 pub update_time: std::option::Option<wkt::Timestamp>,
7527
7528 pub internal_metadata: std::option::Option<std::string::String>,
7532
7533 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7534}
7535
7536impl WorkflowConfig {
7537 pub fn new() -> Self {
7538 std::default::Default::default()
7539 }
7540
7541 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7543 self.name = v.into();
7544 self
7545 }
7546
7547 pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7549 self.release_config = v.into();
7550 self
7551 }
7552
7553 pub fn set_invocation_config<T>(mut self, v: T) -> Self
7555 where
7556 T: std::convert::Into<crate::model::InvocationConfig>,
7557 {
7558 self.invocation_config = std::option::Option::Some(v.into());
7559 self
7560 }
7561
7562 pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
7564 where
7565 T: std::convert::Into<crate::model::InvocationConfig>,
7566 {
7567 self.invocation_config = v.map(|x| x.into());
7568 self
7569 }
7570
7571 pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7573 self.cron_schedule = v.into();
7574 self
7575 }
7576
7577 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7579 self.time_zone = v.into();
7580 self
7581 }
7582
7583 pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
7585 where
7586 T: std::iter::IntoIterator<Item = V>,
7587 V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
7588 {
7589 use std::iter::Iterator;
7590 self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
7591 self
7592 }
7593
7594 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7596 self.disabled = v.into();
7597 self
7598 }
7599
7600 pub fn set_create_time<T>(mut self, v: T) -> Self
7602 where
7603 T: std::convert::Into<wkt::Timestamp>,
7604 {
7605 self.create_time = std::option::Option::Some(v.into());
7606 self
7607 }
7608
7609 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7611 where
7612 T: std::convert::Into<wkt::Timestamp>,
7613 {
7614 self.create_time = v.map(|x| x.into());
7615 self
7616 }
7617
7618 pub fn set_update_time<T>(mut self, v: T) -> Self
7620 where
7621 T: std::convert::Into<wkt::Timestamp>,
7622 {
7623 self.update_time = std::option::Option::Some(v.into());
7624 self
7625 }
7626
7627 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7629 where
7630 T: std::convert::Into<wkt::Timestamp>,
7631 {
7632 self.update_time = v.map(|x| x.into());
7633 self
7634 }
7635
7636 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
7638 where
7639 T: std::convert::Into<std::string::String>,
7640 {
7641 self.internal_metadata = std::option::Option::Some(v.into());
7642 self
7643 }
7644
7645 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7647 where
7648 T: std::convert::Into<std::string::String>,
7649 {
7650 self.internal_metadata = v.map(|x| x.into());
7651 self
7652 }
7653}
7654
7655impl wkt::message::Message for WorkflowConfig {
7656 fn typename() -> &'static str {
7657 "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
7658 }
7659}
7660
7661pub mod workflow_config {
7663 #[allow(unused_imports)]
7664 use super::*;
7665
7666 #[derive(Clone, Default, PartialEq)]
7669 #[non_exhaustive]
7670 pub struct ScheduledExecutionRecord {
7671 pub execution_time: std::option::Option<wkt::Timestamp>,
7673
7674 pub result:
7676 std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
7677
7678 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7679 }
7680
7681 impl ScheduledExecutionRecord {
7682 pub fn new() -> Self {
7683 std::default::Default::default()
7684 }
7685
7686 pub fn set_execution_time<T>(mut self, v: T) -> Self
7688 where
7689 T: std::convert::Into<wkt::Timestamp>,
7690 {
7691 self.execution_time = std::option::Option::Some(v.into());
7692 self
7693 }
7694
7695 pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
7697 where
7698 T: std::convert::Into<wkt::Timestamp>,
7699 {
7700 self.execution_time = v.map(|x| x.into());
7701 self
7702 }
7703
7704 pub fn set_result<
7709 T: std::convert::Into<
7710 std::option::Option<
7711 crate::model::workflow_config::scheduled_execution_record::Result,
7712 >,
7713 >,
7714 >(
7715 mut self,
7716 v: T,
7717 ) -> Self {
7718 self.result = v.into();
7719 self
7720 }
7721
7722 pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
7726 #[allow(unreachable_patterns)]
7727 self.result.as_ref().and_then(|v| match v {
7728 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
7729 _ => std::option::Option::None,
7730 })
7731 }
7732
7733 pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
7739 mut self,
7740 v: T,
7741 ) -> Self {
7742 self.result = std::option::Option::Some(
7743 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
7744 v.into()
7745 )
7746 );
7747 self
7748 }
7749
7750 pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
7754 #[allow(unreachable_patterns)]
7755 self.result.as_ref().and_then(|v| match v {
7756 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
7757 v,
7758 ) => std::option::Option::Some(v),
7759 _ => std::option::Option::None,
7760 })
7761 }
7762
7763 pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
7769 mut self,
7770 v: T,
7771 ) -> Self {
7772 self.result = std::option::Option::Some(
7773 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
7774 v.into(),
7775 ),
7776 );
7777 self
7778 }
7779 }
7780
7781 impl wkt::message::Message for ScheduledExecutionRecord {
7782 fn typename() -> &'static str {
7783 "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
7784 }
7785 }
7786
7787 pub mod scheduled_execution_record {
7789 #[allow(unused_imports)]
7790 use super::*;
7791
7792 #[derive(Clone, Debug, PartialEq)]
7794 #[non_exhaustive]
7795 pub enum Result {
7796 WorkflowInvocation(std::string::String),
7800 ErrorStatus(std::boxed::Box<rpc::model::Status>),
7803 }
7804 }
7805}
7806
7807#[derive(Clone, Default, PartialEq)]
7811#[non_exhaustive]
7812pub struct InvocationConfig {
7813 pub included_targets: std::vec::Vec<crate::model::Target>,
7815
7816 pub included_tags: std::vec::Vec<std::string::String>,
7818
7819 pub transitive_dependencies_included: bool,
7822
7823 pub transitive_dependents_included: bool,
7826
7827 pub fully_refresh_incremental_tables_enabled: bool,
7829
7830 pub service_account: std::string::String,
7832
7833 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7834}
7835
7836impl InvocationConfig {
7837 pub fn new() -> Self {
7838 std::default::Default::default()
7839 }
7840
7841 pub fn set_included_targets<T, V>(mut self, v: T) -> Self
7843 where
7844 T: std::iter::IntoIterator<Item = V>,
7845 V: std::convert::Into<crate::model::Target>,
7846 {
7847 use std::iter::Iterator;
7848 self.included_targets = v.into_iter().map(|i| i.into()).collect();
7849 self
7850 }
7851
7852 pub fn set_included_tags<T, V>(mut self, v: T) -> Self
7854 where
7855 T: std::iter::IntoIterator<Item = V>,
7856 V: std::convert::Into<std::string::String>,
7857 {
7858 use std::iter::Iterator;
7859 self.included_tags = v.into_iter().map(|i| i.into()).collect();
7860 self
7861 }
7862
7863 pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
7865 mut self,
7866 v: T,
7867 ) -> Self {
7868 self.transitive_dependencies_included = v.into();
7869 self
7870 }
7871
7872 pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7874 self.transitive_dependents_included = v.into();
7875 self
7876 }
7877
7878 pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
7880 mut self,
7881 v: T,
7882 ) -> Self {
7883 self.fully_refresh_incremental_tables_enabled = v.into();
7884 self
7885 }
7886
7887 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7889 self.service_account = v.into();
7890 self
7891 }
7892}
7893
7894impl wkt::message::Message for InvocationConfig {
7895 fn typename() -> &'static str {
7896 "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
7897 }
7898}
7899
7900#[derive(Clone, Default, PartialEq)]
7902#[non_exhaustive]
7903pub struct ListWorkflowConfigsRequest {
7904 pub parent: std::string::String,
7907
7908 pub page_size: i32,
7912
7913 pub page_token: std::string::String,
7920
7921 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7922}
7923
7924impl ListWorkflowConfigsRequest {
7925 pub fn new() -> Self {
7926 std::default::Default::default()
7927 }
7928
7929 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7931 self.parent = v.into();
7932 self
7933 }
7934
7935 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7937 self.page_size = v.into();
7938 self
7939 }
7940
7941 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7943 self.page_token = v.into();
7944 self
7945 }
7946}
7947
7948impl wkt::message::Message for ListWorkflowConfigsRequest {
7949 fn typename() -> &'static str {
7950 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
7951 }
7952}
7953
7954#[derive(Clone, Default, PartialEq)]
7956#[non_exhaustive]
7957pub struct ListWorkflowConfigsResponse {
7958 pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
7960
7961 pub next_page_token: std::string::String,
7964
7965 pub unreachable: std::vec::Vec<std::string::String>,
7967
7968 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7969}
7970
7971impl ListWorkflowConfigsResponse {
7972 pub fn new() -> Self {
7973 std::default::Default::default()
7974 }
7975
7976 pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
7978 where
7979 T: std::iter::IntoIterator<Item = V>,
7980 V: std::convert::Into<crate::model::WorkflowConfig>,
7981 {
7982 use std::iter::Iterator;
7983 self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
7984 self
7985 }
7986
7987 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7989 self.next_page_token = v.into();
7990 self
7991 }
7992
7993 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7995 where
7996 T: std::iter::IntoIterator<Item = V>,
7997 V: std::convert::Into<std::string::String>,
7998 {
7999 use std::iter::Iterator;
8000 self.unreachable = v.into_iter().map(|i| i.into()).collect();
8001 self
8002 }
8003}
8004
8005impl wkt::message::Message for ListWorkflowConfigsResponse {
8006 fn typename() -> &'static str {
8007 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
8008 }
8009}
8010
8011#[doc(hidden)]
8012impl gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
8013 type PageItem = crate::model::WorkflowConfig;
8014
8015 fn items(self) -> std::vec::Vec<Self::PageItem> {
8016 self.workflow_configs
8017 }
8018
8019 fn next_page_token(&self) -> std::string::String {
8020 use std::clone::Clone;
8021 self.next_page_token.clone()
8022 }
8023}
8024
8025#[derive(Clone, Default, PartialEq)]
8027#[non_exhaustive]
8028pub struct GetWorkflowConfigRequest {
8029 pub name: std::string::String,
8031
8032 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8033}
8034
8035impl GetWorkflowConfigRequest {
8036 pub fn new() -> Self {
8037 std::default::Default::default()
8038 }
8039
8040 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8042 self.name = v.into();
8043 self
8044 }
8045}
8046
8047impl wkt::message::Message for GetWorkflowConfigRequest {
8048 fn typename() -> &'static str {
8049 "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
8050 }
8051}
8052
8053#[derive(Clone, Default, PartialEq)]
8055#[non_exhaustive]
8056pub struct CreateWorkflowConfigRequest {
8057 pub parent: std::string::String,
8060
8061 pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
8063
8064 pub workflow_config_id: std::string::String,
8067
8068 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8069}
8070
8071impl CreateWorkflowConfigRequest {
8072 pub fn new() -> Self {
8073 std::default::Default::default()
8074 }
8075
8076 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8078 self.parent = v.into();
8079 self
8080 }
8081
8082 pub fn set_workflow_config<T>(mut self, v: T) -> Self
8084 where
8085 T: std::convert::Into<crate::model::WorkflowConfig>,
8086 {
8087 self.workflow_config = std::option::Option::Some(v.into());
8088 self
8089 }
8090
8091 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
8093 where
8094 T: std::convert::Into<crate::model::WorkflowConfig>,
8095 {
8096 self.workflow_config = v.map(|x| x.into());
8097 self
8098 }
8099
8100 pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
8102 mut self,
8103 v: T,
8104 ) -> Self {
8105 self.workflow_config_id = v.into();
8106 self
8107 }
8108}
8109
8110impl wkt::message::Message for CreateWorkflowConfigRequest {
8111 fn typename() -> &'static str {
8112 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
8113 }
8114}
8115
8116#[derive(Clone, Default, PartialEq)]
8118#[non_exhaustive]
8119pub struct UpdateWorkflowConfigRequest {
8120 pub update_mask: std::option::Option<wkt::FieldMask>,
8123
8124 pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
8126
8127 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8128}
8129
8130impl UpdateWorkflowConfigRequest {
8131 pub fn new() -> Self {
8132 std::default::Default::default()
8133 }
8134
8135 pub fn set_update_mask<T>(mut self, v: T) -> Self
8137 where
8138 T: std::convert::Into<wkt::FieldMask>,
8139 {
8140 self.update_mask = std::option::Option::Some(v.into());
8141 self
8142 }
8143
8144 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8146 where
8147 T: std::convert::Into<wkt::FieldMask>,
8148 {
8149 self.update_mask = v.map(|x| x.into());
8150 self
8151 }
8152
8153 pub fn set_workflow_config<T>(mut self, v: T) -> Self
8155 where
8156 T: std::convert::Into<crate::model::WorkflowConfig>,
8157 {
8158 self.workflow_config = std::option::Option::Some(v.into());
8159 self
8160 }
8161
8162 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
8164 where
8165 T: std::convert::Into<crate::model::WorkflowConfig>,
8166 {
8167 self.workflow_config = v.map(|x| x.into());
8168 self
8169 }
8170}
8171
8172impl wkt::message::Message for UpdateWorkflowConfigRequest {
8173 fn typename() -> &'static str {
8174 "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
8175 }
8176}
8177
8178#[derive(Clone, Default, PartialEq)]
8180#[non_exhaustive]
8181pub struct DeleteWorkflowConfigRequest {
8182 pub name: std::string::String,
8184
8185 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8186}
8187
8188impl DeleteWorkflowConfigRequest {
8189 pub fn new() -> Self {
8190 std::default::Default::default()
8191 }
8192
8193 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8195 self.name = v.into();
8196 self
8197 }
8198}
8199
8200impl wkt::message::Message for DeleteWorkflowConfigRequest {
8201 fn typename() -> &'static str {
8202 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
8203 }
8204}
8205
8206#[derive(Clone, Default, PartialEq)]
8208#[non_exhaustive]
8209pub struct WorkflowInvocation {
8210 pub name: std::string::String,
8212
8213 pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
8215
8216 pub state: crate::model::workflow_invocation::State,
8218
8219 pub invocation_timing: std::option::Option<gtype::model::Interval>,
8221
8222 pub resolved_compilation_result: std::string::String,
8226
8227 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
8229
8230 pub internal_metadata: std::option::Option<std::string::String>,
8234
8235 pub compilation_source:
8237 std::option::Option<crate::model::workflow_invocation::CompilationSource>,
8238
8239 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8240}
8241
8242impl WorkflowInvocation {
8243 pub fn new() -> Self {
8244 std::default::Default::default()
8245 }
8246
8247 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8249 self.name = v.into();
8250 self
8251 }
8252
8253 pub fn set_invocation_config<T>(mut self, v: T) -> Self
8255 where
8256 T: std::convert::Into<crate::model::InvocationConfig>,
8257 {
8258 self.invocation_config = std::option::Option::Some(v.into());
8259 self
8260 }
8261
8262 pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
8264 where
8265 T: std::convert::Into<crate::model::InvocationConfig>,
8266 {
8267 self.invocation_config = v.map(|x| x.into());
8268 self
8269 }
8270
8271 pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
8273 mut self,
8274 v: T,
8275 ) -> Self {
8276 self.state = v.into();
8277 self
8278 }
8279
8280 pub fn set_invocation_timing<T>(mut self, v: T) -> Self
8282 where
8283 T: std::convert::Into<gtype::model::Interval>,
8284 {
8285 self.invocation_timing = std::option::Option::Some(v.into());
8286 self
8287 }
8288
8289 pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
8291 where
8292 T: std::convert::Into<gtype::model::Interval>,
8293 {
8294 self.invocation_timing = v.map(|x| x.into());
8295 self
8296 }
8297
8298 pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
8300 mut self,
8301 v: T,
8302 ) -> Self {
8303 self.resolved_compilation_result = v.into();
8304 self
8305 }
8306
8307 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
8309 where
8310 T: std::convert::Into<crate::model::DataEncryptionState>,
8311 {
8312 self.data_encryption_state = std::option::Option::Some(v.into());
8313 self
8314 }
8315
8316 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
8318 where
8319 T: std::convert::Into<crate::model::DataEncryptionState>,
8320 {
8321 self.data_encryption_state = v.map(|x| x.into());
8322 self
8323 }
8324
8325 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
8327 where
8328 T: std::convert::Into<std::string::String>,
8329 {
8330 self.internal_metadata = std::option::Option::Some(v.into());
8331 self
8332 }
8333
8334 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
8336 where
8337 T: std::convert::Into<std::string::String>,
8338 {
8339 self.internal_metadata = v.map(|x| x.into());
8340 self
8341 }
8342
8343 pub fn set_compilation_source<
8348 T: std::convert::Into<
8349 std::option::Option<crate::model::workflow_invocation::CompilationSource>,
8350 >,
8351 >(
8352 mut self,
8353 v: T,
8354 ) -> Self {
8355 self.compilation_source = v.into();
8356 self
8357 }
8358
8359 pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
8363 #[allow(unreachable_patterns)]
8364 self.compilation_source.as_ref().and_then(|v| match v {
8365 crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
8366 std::option::Option::Some(v)
8367 }
8368 _ => std::option::Option::None,
8369 })
8370 }
8371
8372 pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
8378 mut self,
8379 v: T,
8380 ) -> Self {
8381 self.compilation_source = std::option::Option::Some(
8382 crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
8383 );
8384 self
8385 }
8386
8387 pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
8391 #[allow(unreachable_patterns)]
8392 self.compilation_source.as_ref().and_then(|v| match v {
8393 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
8394 std::option::Option::Some(v)
8395 }
8396 _ => std::option::Option::None,
8397 })
8398 }
8399
8400 pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8406 self.compilation_source = std::option::Option::Some(
8407 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
8408 );
8409 self
8410 }
8411}
8412
8413impl wkt::message::Message for WorkflowInvocation {
8414 fn typename() -> &'static str {
8415 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
8416 }
8417}
8418
8419pub mod workflow_invocation {
8421 #[allow(unused_imports)]
8422 use super::*;
8423
8424 #[derive(Clone, Debug, PartialEq)]
8440 #[non_exhaustive]
8441 pub enum State {
8442 Unspecified,
8444 Running,
8446 Succeeded,
8448 Cancelled,
8450 Failed,
8452 Canceling,
8455 UnknownValue(state::UnknownValue),
8460 }
8461
8462 #[doc(hidden)]
8463 pub mod state {
8464 #[allow(unused_imports)]
8465 use super::*;
8466 #[derive(Clone, Debug, PartialEq)]
8467 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8468 }
8469
8470 impl State {
8471 pub fn value(&self) -> std::option::Option<i32> {
8476 match self {
8477 Self::Unspecified => std::option::Option::Some(0),
8478 Self::Running => std::option::Option::Some(1),
8479 Self::Succeeded => std::option::Option::Some(2),
8480 Self::Cancelled => std::option::Option::Some(3),
8481 Self::Failed => std::option::Option::Some(4),
8482 Self::Canceling => std::option::Option::Some(5),
8483 Self::UnknownValue(u) => u.0.value(),
8484 }
8485 }
8486
8487 pub fn name(&self) -> std::option::Option<&str> {
8492 match self {
8493 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8494 Self::Running => std::option::Option::Some("RUNNING"),
8495 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
8496 Self::Cancelled => std::option::Option::Some("CANCELLED"),
8497 Self::Failed => std::option::Option::Some("FAILED"),
8498 Self::Canceling => std::option::Option::Some("CANCELING"),
8499 Self::UnknownValue(u) => u.0.name(),
8500 }
8501 }
8502 }
8503
8504 impl std::default::Default for State {
8505 fn default() -> Self {
8506 use std::convert::From;
8507 Self::from(0)
8508 }
8509 }
8510
8511 impl std::fmt::Display for State {
8512 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8513 wkt::internal::display_enum(f, self.name(), self.value())
8514 }
8515 }
8516
8517 impl std::convert::From<i32> for State {
8518 fn from(value: i32) -> Self {
8519 match value {
8520 0 => Self::Unspecified,
8521 1 => Self::Running,
8522 2 => Self::Succeeded,
8523 3 => Self::Cancelled,
8524 4 => Self::Failed,
8525 5 => Self::Canceling,
8526 _ => Self::UnknownValue(state::UnknownValue(
8527 wkt::internal::UnknownEnumValue::Integer(value),
8528 )),
8529 }
8530 }
8531 }
8532
8533 impl std::convert::From<&str> for State {
8534 fn from(value: &str) -> Self {
8535 use std::string::ToString;
8536 match value {
8537 "STATE_UNSPECIFIED" => Self::Unspecified,
8538 "RUNNING" => Self::Running,
8539 "SUCCEEDED" => Self::Succeeded,
8540 "CANCELLED" => Self::Cancelled,
8541 "FAILED" => Self::Failed,
8542 "CANCELING" => Self::Canceling,
8543 _ => Self::UnknownValue(state::UnknownValue(
8544 wkt::internal::UnknownEnumValue::String(value.to_string()),
8545 )),
8546 }
8547 }
8548 }
8549
8550 impl serde::ser::Serialize for State {
8551 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8552 where
8553 S: serde::Serializer,
8554 {
8555 match self {
8556 Self::Unspecified => serializer.serialize_i32(0),
8557 Self::Running => serializer.serialize_i32(1),
8558 Self::Succeeded => serializer.serialize_i32(2),
8559 Self::Cancelled => serializer.serialize_i32(3),
8560 Self::Failed => serializer.serialize_i32(4),
8561 Self::Canceling => serializer.serialize_i32(5),
8562 Self::UnknownValue(u) => u.0.serialize(serializer),
8563 }
8564 }
8565 }
8566
8567 impl<'de> serde::de::Deserialize<'de> for State {
8568 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8569 where
8570 D: serde::Deserializer<'de>,
8571 {
8572 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8573 ".google.cloud.dataform.v1.WorkflowInvocation.State",
8574 ))
8575 }
8576 }
8577
8578 #[derive(Clone, Debug, PartialEq)]
8580 #[non_exhaustive]
8581 pub enum CompilationSource {
8582 CompilationResult(std::string::String),
8586 WorkflowConfig(std::string::String),
8589 }
8590}
8591
8592#[derive(Clone, Default, PartialEq)]
8594#[non_exhaustive]
8595pub struct ListWorkflowInvocationsRequest {
8596 pub parent: std::string::String,
8599
8600 pub page_size: i32,
8604
8605 pub page_token: std::string::String,
8612
8613 pub order_by: std::string::String,
8617
8618 pub filter: std::string::String,
8620
8621 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8622}
8623
8624impl ListWorkflowInvocationsRequest {
8625 pub fn new() -> Self {
8626 std::default::Default::default()
8627 }
8628
8629 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8631 self.parent = v.into();
8632 self
8633 }
8634
8635 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8637 self.page_size = v.into();
8638 self
8639 }
8640
8641 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8643 self.page_token = v.into();
8644 self
8645 }
8646
8647 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8649 self.order_by = v.into();
8650 self
8651 }
8652
8653 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8655 self.filter = v.into();
8656 self
8657 }
8658}
8659
8660impl wkt::message::Message for ListWorkflowInvocationsRequest {
8661 fn typename() -> &'static str {
8662 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
8663 }
8664}
8665
8666#[derive(Clone, Default, PartialEq)]
8668#[non_exhaustive]
8669pub struct ListWorkflowInvocationsResponse {
8670 pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
8672
8673 pub next_page_token: std::string::String,
8676
8677 pub unreachable: std::vec::Vec<std::string::String>,
8679
8680 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8681}
8682
8683impl ListWorkflowInvocationsResponse {
8684 pub fn new() -> Self {
8685 std::default::Default::default()
8686 }
8687
8688 pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
8690 where
8691 T: std::iter::IntoIterator<Item = V>,
8692 V: std::convert::Into<crate::model::WorkflowInvocation>,
8693 {
8694 use std::iter::Iterator;
8695 self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
8696 self
8697 }
8698
8699 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8701 self.next_page_token = v.into();
8702 self
8703 }
8704
8705 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
8707 where
8708 T: std::iter::IntoIterator<Item = V>,
8709 V: std::convert::Into<std::string::String>,
8710 {
8711 use std::iter::Iterator;
8712 self.unreachable = v.into_iter().map(|i| i.into()).collect();
8713 self
8714 }
8715}
8716
8717impl wkt::message::Message for ListWorkflowInvocationsResponse {
8718 fn typename() -> &'static str {
8719 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
8720 }
8721}
8722
8723#[doc(hidden)]
8724impl gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
8725 type PageItem = crate::model::WorkflowInvocation;
8726
8727 fn items(self) -> std::vec::Vec<Self::PageItem> {
8728 self.workflow_invocations
8729 }
8730
8731 fn next_page_token(&self) -> std::string::String {
8732 use std::clone::Clone;
8733 self.next_page_token.clone()
8734 }
8735}
8736
8737#[derive(Clone, Default, PartialEq)]
8739#[non_exhaustive]
8740pub struct GetWorkflowInvocationRequest {
8741 pub name: std::string::String,
8743
8744 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8745}
8746
8747impl GetWorkflowInvocationRequest {
8748 pub fn new() -> Self {
8749 std::default::Default::default()
8750 }
8751
8752 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8754 self.name = v.into();
8755 self
8756 }
8757}
8758
8759impl wkt::message::Message for GetWorkflowInvocationRequest {
8760 fn typename() -> &'static str {
8761 "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
8762 }
8763}
8764
8765#[derive(Clone, Default, PartialEq)]
8767#[non_exhaustive]
8768pub struct CreateWorkflowInvocationRequest {
8769 pub parent: std::string::String,
8772
8773 pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
8775
8776 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8777}
8778
8779impl CreateWorkflowInvocationRequest {
8780 pub fn new() -> Self {
8781 std::default::Default::default()
8782 }
8783
8784 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8786 self.parent = v.into();
8787 self
8788 }
8789
8790 pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
8792 where
8793 T: std::convert::Into<crate::model::WorkflowInvocation>,
8794 {
8795 self.workflow_invocation = std::option::Option::Some(v.into());
8796 self
8797 }
8798
8799 pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
8801 where
8802 T: std::convert::Into<crate::model::WorkflowInvocation>,
8803 {
8804 self.workflow_invocation = v.map(|x| x.into());
8805 self
8806 }
8807}
8808
8809impl wkt::message::Message for CreateWorkflowInvocationRequest {
8810 fn typename() -> &'static str {
8811 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
8812 }
8813}
8814
8815#[derive(Clone, Default, PartialEq)]
8817#[non_exhaustive]
8818pub struct DeleteWorkflowInvocationRequest {
8819 pub name: std::string::String,
8821
8822 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8823}
8824
8825impl DeleteWorkflowInvocationRequest {
8826 pub fn new() -> Self {
8827 std::default::Default::default()
8828 }
8829
8830 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8832 self.name = v.into();
8833 self
8834 }
8835}
8836
8837impl wkt::message::Message for DeleteWorkflowInvocationRequest {
8838 fn typename() -> &'static str {
8839 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
8840 }
8841}
8842
8843#[derive(Clone, Default, PartialEq)]
8845#[non_exhaustive]
8846pub struct CancelWorkflowInvocationRequest {
8847 pub name: std::string::String,
8849
8850 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8851}
8852
8853impl CancelWorkflowInvocationRequest {
8854 pub fn new() -> Self {
8855 std::default::Default::default()
8856 }
8857
8858 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8860 self.name = v.into();
8861 self
8862 }
8863}
8864
8865impl wkt::message::Message for CancelWorkflowInvocationRequest {
8866 fn typename() -> &'static str {
8867 "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
8868 }
8869}
8870
8871#[derive(Clone, Default, PartialEq)]
8873#[non_exhaustive]
8874pub struct CancelWorkflowInvocationResponse {
8875 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8876}
8877
8878impl CancelWorkflowInvocationResponse {
8879 pub fn new() -> Self {
8880 std::default::Default::default()
8881 }
8882}
8883
8884impl wkt::message::Message for CancelWorkflowInvocationResponse {
8885 fn typename() -> &'static str {
8886 "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
8887 }
8888}
8889
8890#[derive(Clone, Default, PartialEq)]
8892#[non_exhaustive]
8893pub struct WorkflowInvocationAction {
8894 pub target: std::option::Option<crate::model::Target>,
8897
8898 pub canonical_target: std::option::Option<crate::model::Target>,
8901
8902 pub state: crate::model::workflow_invocation_action::State,
8904
8905 pub failure_reason: std::string::String,
8908
8909 pub invocation_timing: std::option::Option<gtype::model::Interval>,
8915
8916 pub internal_metadata: std::option::Option<std::string::String>,
8920
8921 pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
8923
8924 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8925}
8926
8927impl WorkflowInvocationAction {
8928 pub fn new() -> Self {
8929 std::default::Default::default()
8930 }
8931
8932 pub fn set_target<T>(mut self, v: T) -> Self
8934 where
8935 T: std::convert::Into<crate::model::Target>,
8936 {
8937 self.target = std::option::Option::Some(v.into());
8938 self
8939 }
8940
8941 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
8943 where
8944 T: std::convert::Into<crate::model::Target>,
8945 {
8946 self.target = v.map(|x| x.into());
8947 self
8948 }
8949
8950 pub fn set_canonical_target<T>(mut self, v: T) -> Self
8952 where
8953 T: std::convert::Into<crate::model::Target>,
8954 {
8955 self.canonical_target = std::option::Option::Some(v.into());
8956 self
8957 }
8958
8959 pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
8961 where
8962 T: std::convert::Into<crate::model::Target>,
8963 {
8964 self.canonical_target = v.map(|x| x.into());
8965 self
8966 }
8967
8968 pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
8970 mut self,
8971 v: T,
8972 ) -> Self {
8973 self.state = v.into();
8974 self
8975 }
8976
8977 pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8979 self.failure_reason = v.into();
8980 self
8981 }
8982
8983 pub fn set_invocation_timing<T>(mut self, v: T) -> Self
8985 where
8986 T: std::convert::Into<gtype::model::Interval>,
8987 {
8988 self.invocation_timing = std::option::Option::Some(v.into());
8989 self
8990 }
8991
8992 pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
8994 where
8995 T: std::convert::Into<gtype::model::Interval>,
8996 {
8997 self.invocation_timing = v.map(|x| x.into());
8998 self
8999 }
9000
9001 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
9003 where
9004 T: std::convert::Into<std::string::String>,
9005 {
9006 self.internal_metadata = std::option::Option::Some(v.into());
9007 self
9008 }
9009
9010 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
9012 where
9013 T: std::convert::Into<std::string::String>,
9014 {
9015 self.internal_metadata = v.map(|x| x.into());
9016 self
9017 }
9018
9019 pub fn set_action<
9024 T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
9025 >(
9026 mut self,
9027 v: T,
9028 ) -> Self {
9029 self.action = v.into();
9030 self
9031 }
9032
9033 pub fn bigquery_action(
9037 &self,
9038 ) -> std::option::Option<
9039 &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
9040 > {
9041 #[allow(unreachable_patterns)]
9042 self.action.as_ref().and_then(|v| match v {
9043 crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
9044 std::option::Option::Some(v)
9045 }
9046 _ => std::option::Option::None,
9047 })
9048 }
9049
9050 pub fn set_bigquery_action<
9056 T: std::convert::Into<
9057 std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
9058 >,
9059 >(
9060 mut self,
9061 v: T,
9062 ) -> Self {
9063 self.action = std::option::Option::Some(
9064 crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
9065 );
9066 self
9067 }
9068
9069 pub fn notebook_action(
9073 &self,
9074 ) -> std::option::Option<
9075 &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
9076 > {
9077 #[allow(unreachable_patterns)]
9078 self.action.as_ref().and_then(|v| match v {
9079 crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
9080 std::option::Option::Some(v)
9081 }
9082 _ => std::option::Option::None,
9083 })
9084 }
9085
9086 pub fn set_notebook_action<
9092 T: std::convert::Into<
9093 std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
9094 >,
9095 >(
9096 mut self,
9097 v: T,
9098 ) -> Self {
9099 self.action = std::option::Option::Some(
9100 crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
9101 );
9102 self
9103 }
9104
9105 pub fn data_preparation_action(
9109 &self,
9110 ) -> std::option::Option<
9111 &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
9112 > {
9113 #[allow(unreachable_patterns)]
9114 self.action.as_ref().and_then(|v| match v {
9115 crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
9116 std::option::Option::Some(v)
9117 }
9118 _ => std::option::Option::None,
9119 })
9120 }
9121
9122 pub fn set_data_preparation_action<
9128 T: std::convert::Into<
9129 std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
9130 >,
9131 >(
9132 mut self,
9133 v: T,
9134 ) -> Self {
9135 self.action = std::option::Option::Some(
9136 crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
9137 );
9138 self
9139 }
9140}
9141
9142impl wkt::message::Message for WorkflowInvocationAction {
9143 fn typename() -> &'static str {
9144 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
9145 }
9146}
9147
9148pub mod workflow_invocation_action {
9150 #[allow(unused_imports)]
9151 use super::*;
9152
9153 #[derive(Clone, Default, PartialEq)]
9155 #[non_exhaustive]
9156 pub struct BigQueryAction {
9157 pub sql_script: std::string::String,
9159
9160 pub job_id: std::string::String,
9163
9164 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9165 }
9166
9167 impl BigQueryAction {
9168 pub fn new() -> Self {
9169 std::default::Default::default()
9170 }
9171
9172 pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9174 self.sql_script = v.into();
9175 self
9176 }
9177
9178 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9180 self.job_id = v.into();
9181 self
9182 }
9183 }
9184
9185 impl wkt::message::Message for BigQueryAction {
9186 fn typename() -> &'static str {
9187 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
9188 }
9189 }
9190
9191 #[derive(Clone, Default, PartialEq)]
9193 #[non_exhaustive]
9194 pub struct NotebookAction {
9195 pub contents: std::string::String,
9197
9198 pub job_id: std::string::String,
9202
9203 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9204 }
9205
9206 impl NotebookAction {
9207 pub fn new() -> Self {
9208 std::default::Default::default()
9209 }
9210
9211 pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9213 self.contents = v.into();
9214 self
9215 }
9216
9217 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9219 self.job_id = v.into();
9220 self
9221 }
9222 }
9223
9224 impl wkt::message::Message for NotebookAction {
9225 fn typename() -> &'static str {
9226 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
9227 }
9228 }
9229
9230 #[derive(Clone, Default, PartialEq)]
9232 #[non_exhaustive]
9233 pub struct DataPreparationAction {
9234 pub generated_sql: std::string::String,
9237
9238 pub job_id: std::string::String,
9241
9242 pub definition: std::option::Option<
9244 crate::model::workflow_invocation_action::data_preparation_action::Definition,
9245 >,
9246
9247 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9248 }
9249
9250 impl DataPreparationAction {
9251 pub fn new() -> Self {
9252 std::default::Default::default()
9253 }
9254
9255 pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
9257 mut self,
9258 v: T,
9259 ) -> Self {
9260 self.generated_sql = v.into();
9261 self
9262 }
9263
9264 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9266 self.job_id = v.into();
9267 self
9268 }
9269
9270 pub fn set_definition<T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::Definition>>>(mut self, v: T) -> Self
9275 {
9276 self.definition = v.into();
9277 self
9278 }
9279
9280 pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
9284 #[allow(unreachable_patterns)]
9285 self.definition.as_ref().and_then(|v| match v {
9286 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
9287 _ => std::option::Option::None,
9288 })
9289 }
9290
9291 pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
9297 mut self,
9298 v: T,
9299 ) -> Self {
9300 self.definition = std::option::Option::Some(
9301 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
9302 v.into()
9303 )
9304 );
9305 self
9306 }
9307
9308 pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
9312 #[allow(unreachable_patterns)]
9313 self.definition.as_ref().and_then(|v| match v {
9314 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
9315 _ => std::option::Option::None,
9316 })
9317 }
9318
9319 pub fn set_contents_sql<T: std::convert::Into<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>>(mut self, v: T) -> Self{
9325 self.definition = std::option::Option::Some(
9326 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
9327 v.into()
9328 )
9329 );
9330 self
9331 }
9332 }
9333
9334 impl wkt::message::Message for DataPreparationAction {
9335 fn typename() -> &'static str {
9336 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
9337 }
9338 }
9339
9340 pub mod data_preparation_action {
9342 #[allow(unused_imports)]
9343 use super::*;
9344
9345 #[derive(Clone, Default, PartialEq)]
9347 #[non_exhaustive]
9348 pub struct ActionSqlDefinition {
9349 pub query: std::string::String,
9352
9353 pub error_table: std::option::Option<
9355 crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
9356 >,
9357
9358 pub load_config: std::option::Option<
9360 crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
9361 >,
9362
9363 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9364 }
9365
9366 impl ActionSqlDefinition {
9367 pub fn new() -> Self {
9368 std::default::Default::default()
9369 }
9370
9371 pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9373 self.query = v.into();
9374 self
9375 }
9376
9377 pub fn set_error_table<T>(mut self, v: T) -> Self
9379 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
9380 {
9381 self.error_table = std::option::Option::Some(v.into());
9382 self
9383 }
9384
9385 pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
9387 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
9388 {
9389 self.error_table = v.map(|x| x.into());
9390 self
9391 }
9392
9393 pub fn set_load_config<T>(mut self, v: T) -> Self
9395 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
9396 {
9397 self.load_config = std::option::Option::Some(v.into());
9398 self
9399 }
9400
9401 pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
9403 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
9404 {
9405 self.load_config = v.map(|x| x.into());
9406 self
9407 }
9408 }
9409
9410 impl wkt::message::Message for ActionSqlDefinition {
9411 fn typename() -> &'static str {
9412 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
9413 }
9414 }
9415
9416 #[derive(Clone, Default, PartialEq)]
9419 #[non_exhaustive]
9420 pub struct ActionErrorTable {
9421 pub target: std::option::Option<crate::model::Target>,
9423
9424 pub retention_days: i32,
9427
9428 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9429 }
9430
9431 impl ActionErrorTable {
9432 pub fn new() -> Self {
9433 std::default::Default::default()
9434 }
9435
9436 pub fn set_target<T>(mut self, v: T) -> Self
9438 where
9439 T: std::convert::Into<crate::model::Target>,
9440 {
9441 self.target = std::option::Option::Some(v.into());
9442 self
9443 }
9444
9445 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
9447 where
9448 T: std::convert::Into<crate::model::Target>,
9449 {
9450 self.target = v.map(|x| x.into());
9451 self
9452 }
9453
9454 pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9456 self.retention_days = v.into();
9457 self
9458 }
9459 }
9460
9461 impl wkt::message::Message for ActionErrorTable {
9462 fn typename() -> &'static str {
9463 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
9464 }
9465 }
9466
9467 #[derive(Clone, Default, PartialEq)]
9469 #[non_exhaustive]
9470 pub struct ActionLoadConfig {
9471
9472 pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
9474
9475 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9476 }
9477
9478 impl ActionLoadConfig {
9479 pub fn new() -> Self {
9480 std::default::Default::default()
9481 }
9482
9483 pub fn set_mode<T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>>>(mut self, v: T) -> Self
9488 {
9489 self.mode = v.into();
9490 self
9491 }
9492
9493 pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
9497 #[allow(unreachable_patterns)]
9498 self.mode.as_ref().and_then(|v| match v {
9499 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
9500 _ => std::option::Option::None,
9501 })
9502 }
9503
9504 pub fn set_replace<T: std::convert::Into<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>>(mut self, v: T) -> Self{
9510 self.mode = std::option::Option::Some(
9511 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
9512 v.into()
9513 )
9514 );
9515 self
9516 }
9517
9518 pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
9522 #[allow(unreachable_patterns)]
9523 self.mode.as_ref().and_then(|v| match v {
9524 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
9525 _ => std::option::Option::None,
9526 })
9527 }
9528
9529 pub fn set_append<T: std::convert::Into<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>>(mut self, v: T) -> Self{
9535 self.mode = std::option::Option::Some(
9536 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
9537 v.into()
9538 )
9539 );
9540 self
9541 }
9542
9543 pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
9547 #[allow(unreachable_patterns)]
9548 self.mode.as_ref().and_then(|v| match v {
9549 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
9550 _ => std::option::Option::None,
9551 })
9552 }
9553
9554 pub fn set_maximum<T: std::convert::Into<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>>(mut self, v: T) -> Self{
9560 self.mode = std::option::Option::Some(
9561 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
9562 v.into()
9563 )
9564 );
9565 self
9566 }
9567
9568 pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
9572 #[allow(unreachable_patterns)]
9573 self.mode.as_ref().and_then(|v| match v {
9574 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
9575 _ => std::option::Option::None,
9576 })
9577 }
9578
9579 pub fn set_unique<T: std::convert::Into<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>>(mut self, v: T) -> Self{
9585 self.mode = std::option::Option::Some(
9586 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
9587 v.into()
9588 )
9589 );
9590 self
9591 }
9592 }
9593
9594 impl wkt::message::Message for ActionLoadConfig {
9595 fn typename() -> &'static str {
9596 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
9597 }
9598 }
9599
9600 pub mod action_load_config {
9602 #[allow(unused_imports)]
9603 use super::*;
9604
9605 #[derive(Clone, Debug, PartialEq)]
9607 #[non_exhaustive]
9608 pub enum Mode {
9609 Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
9611 Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
9613 Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
9616 Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
9619 }
9620 }
9621
9622 #[derive(Clone, Default, PartialEq)]
9624 #[non_exhaustive]
9625 pub struct ActionSimpleLoadMode {
9626 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9627 }
9628
9629 impl ActionSimpleLoadMode {
9630 pub fn new() -> Self {
9631 std::default::Default::default()
9632 }
9633 }
9634
9635 impl wkt::message::Message for ActionSimpleLoadMode {
9636 fn typename() -> &'static str {
9637 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
9638 }
9639 }
9640
9641 #[derive(Clone, Default, PartialEq)]
9643 #[non_exhaustive]
9644 pub struct ActionIncrementalLoadMode {
9645 pub column: std::string::String,
9647
9648 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9649 }
9650
9651 impl ActionIncrementalLoadMode {
9652 pub fn new() -> Self {
9653 std::default::Default::default()
9654 }
9655
9656 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9658 self.column = v.into();
9659 self
9660 }
9661 }
9662
9663 impl wkt::message::Message for ActionIncrementalLoadMode {
9664 fn typename() -> &'static str {
9665 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
9666 }
9667 }
9668
9669 #[derive(Clone, Debug, PartialEq)]
9671 #[non_exhaustive]
9672 pub enum Definition {
9673 ContentsYaml(std::string::String),
9676 ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
9679 }
9680 }
9681
9682 #[derive(Clone, Debug, PartialEq)]
9698 #[non_exhaustive]
9699 pub enum State {
9700 Pending,
9702 Running,
9704 Skipped,
9707 Disabled,
9710 Succeeded,
9712 Cancelled,
9714 Failed,
9716 UnknownValue(state::UnknownValue),
9721 }
9722
9723 #[doc(hidden)]
9724 pub mod state {
9725 #[allow(unused_imports)]
9726 use super::*;
9727 #[derive(Clone, Debug, PartialEq)]
9728 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9729 }
9730
9731 impl State {
9732 pub fn value(&self) -> std::option::Option<i32> {
9737 match self {
9738 Self::Pending => std::option::Option::Some(0),
9739 Self::Running => std::option::Option::Some(1),
9740 Self::Skipped => std::option::Option::Some(2),
9741 Self::Disabled => std::option::Option::Some(3),
9742 Self::Succeeded => std::option::Option::Some(4),
9743 Self::Cancelled => std::option::Option::Some(5),
9744 Self::Failed => std::option::Option::Some(6),
9745 Self::UnknownValue(u) => u.0.value(),
9746 }
9747 }
9748
9749 pub fn name(&self) -> std::option::Option<&str> {
9754 match self {
9755 Self::Pending => std::option::Option::Some("PENDING"),
9756 Self::Running => std::option::Option::Some("RUNNING"),
9757 Self::Skipped => std::option::Option::Some("SKIPPED"),
9758 Self::Disabled => std::option::Option::Some("DISABLED"),
9759 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
9760 Self::Cancelled => std::option::Option::Some("CANCELLED"),
9761 Self::Failed => std::option::Option::Some("FAILED"),
9762 Self::UnknownValue(u) => u.0.name(),
9763 }
9764 }
9765 }
9766
9767 impl std::default::Default for State {
9768 fn default() -> Self {
9769 use std::convert::From;
9770 Self::from(0)
9771 }
9772 }
9773
9774 impl std::fmt::Display for State {
9775 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9776 wkt::internal::display_enum(f, self.name(), self.value())
9777 }
9778 }
9779
9780 impl std::convert::From<i32> for State {
9781 fn from(value: i32) -> Self {
9782 match value {
9783 0 => Self::Pending,
9784 1 => Self::Running,
9785 2 => Self::Skipped,
9786 3 => Self::Disabled,
9787 4 => Self::Succeeded,
9788 5 => Self::Cancelled,
9789 6 => Self::Failed,
9790 _ => Self::UnknownValue(state::UnknownValue(
9791 wkt::internal::UnknownEnumValue::Integer(value),
9792 )),
9793 }
9794 }
9795 }
9796
9797 impl std::convert::From<&str> for State {
9798 fn from(value: &str) -> Self {
9799 use std::string::ToString;
9800 match value {
9801 "PENDING" => Self::Pending,
9802 "RUNNING" => Self::Running,
9803 "SKIPPED" => Self::Skipped,
9804 "DISABLED" => Self::Disabled,
9805 "SUCCEEDED" => Self::Succeeded,
9806 "CANCELLED" => Self::Cancelled,
9807 "FAILED" => Self::Failed,
9808 _ => Self::UnknownValue(state::UnknownValue(
9809 wkt::internal::UnknownEnumValue::String(value.to_string()),
9810 )),
9811 }
9812 }
9813 }
9814
9815 impl serde::ser::Serialize for State {
9816 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9817 where
9818 S: serde::Serializer,
9819 {
9820 match self {
9821 Self::Pending => serializer.serialize_i32(0),
9822 Self::Running => serializer.serialize_i32(1),
9823 Self::Skipped => serializer.serialize_i32(2),
9824 Self::Disabled => serializer.serialize_i32(3),
9825 Self::Succeeded => serializer.serialize_i32(4),
9826 Self::Cancelled => serializer.serialize_i32(5),
9827 Self::Failed => serializer.serialize_i32(6),
9828 Self::UnknownValue(u) => u.0.serialize(serializer),
9829 }
9830 }
9831 }
9832
9833 impl<'de> serde::de::Deserialize<'de> for State {
9834 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9835 where
9836 D: serde::Deserializer<'de>,
9837 {
9838 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9839 ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
9840 ))
9841 }
9842 }
9843
9844 #[derive(Clone, Debug, PartialEq)]
9846 #[non_exhaustive]
9847 pub enum Action {
9848 BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
9850 NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
9852 DataPreparationAction(
9854 std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
9855 ),
9856 }
9857}
9858
9859#[derive(Clone, Default, PartialEq)]
9861#[non_exhaustive]
9862pub struct QueryWorkflowInvocationActionsRequest {
9863 pub name: std::string::String,
9865
9866 pub page_size: i32,
9870
9871 pub page_token: std::string::String,
9879
9880 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9881}
9882
9883impl QueryWorkflowInvocationActionsRequest {
9884 pub fn new() -> Self {
9885 std::default::Default::default()
9886 }
9887
9888 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9890 self.name = v.into();
9891 self
9892 }
9893
9894 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9896 self.page_size = v.into();
9897 self
9898 }
9899
9900 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9902 self.page_token = v.into();
9903 self
9904 }
9905}
9906
9907impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
9908 fn typename() -> &'static str {
9909 "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
9910 }
9911}
9912
9913#[derive(Clone, Default, PartialEq)]
9915#[non_exhaustive]
9916pub struct QueryWorkflowInvocationActionsResponse {
9917 pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
9919
9920 pub next_page_token: std::string::String,
9923
9924 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9925}
9926
9927impl QueryWorkflowInvocationActionsResponse {
9928 pub fn new() -> Self {
9929 std::default::Default::default()
9930 }
9931
9932 pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
9934 where
9935 T: std::iter::IntoIterator<Item = V>,
9936 V: std::convert::Into<crate::model::WorkflowInvocationAction>,
9937 {
9938 use std::iter::Iterator;
9939 self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
9940 self
9941 }
9942
9943 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9945 self.next_page_token = v.into();
9946 self
9947 }
9948}
9949
9950impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
9951 fn typename() -> &'static str {
9952 "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
9953 }
9954}
9955
9956#[doc(hidden)]
9957impl gax::paginator::internal::PageableResponse for QueryWorkflowInvocationActionsResponse {
9958 type PageItem = crate::model::WorkflowInvocationAction;
9959
9960 fn items(self) -> std::vec::Vec<Self::PageItem> {
9961 self.workflow_invocation_actions
9962 }
9963
9964 fn next_page_token(&self) -> std::string::String {
9965 use std::clone::Clone;
9966 self.next_page_token.clone()
9967 }
9968}
9969
9970#[derive(Clone, Default, PartialEq)]
9972#[non_exhaustive]
9973pub struct Config {
9974 pub name: std::string::String,
9976
9977 pub default_kms_key_name: std::string::String,
9980
9981 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9982}
9983
9984impl Config {
9985 pub fn new() -> Self {
9986 std::default::Default::default()
9987 }
9988
9989 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9991 self.name = v.into();
9992 self
9993 }
9994
9995 pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
9997 mut self,
9998 v: T,
9999 ) -> Self {
10000 self.default_kms_key_name = v.into();
10001 self
10002 }
10003}
10004
10005impl wkt::message::Message for Config {
10006 fn typename() -> &'static str {
10007 "type.googleapis.com/google.cloud.dataform.v1.Config"
10008 }
10009}
10010
10011#[derive(Clone, Default, PartialEq)]
10013#[non_exhaustive]
10014pub struct GetConfigRequest {
10015 pub name: std::string::String,
10017
10018 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10019}
10020
10021impl GetConfigRequest {
10022 pub fn new() -> Self {
10023 std::default::Default::default()
10024 }
10025
10026 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10028 self.name = v.into();
10029 self
10030 }
10031}
10032
10033impl wkt::message::Message for GetConfigRequest {
10034 fn typename() -> &'static str {
10035 "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
10036 }
10037}
10038
10039#[derive(Clone, Default, PartialEq)]
10041#[non_exhaustive]
10042pub struct UpdateConfigRequest {
10043 pub config: std::option::Option<crate::model::Config>,
10045
10046 pub update_mask: std::option::Option<wkt::FieldMask>,
10048
10049 pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10050}
10051
10052impl UpdateConfigRequest {
10053 pub fn new() -> Self {
10054 std::default::Default::default()
10055 }
10056
10057 pub fn set_config<T>(mut self, v: T) -> Self
10059 where
10060 T: std::convert::Into<crate::model::Config>,
10061 {
10062 self.config = std::option::Option::Some(v.into());
10063 self
10064 }
10065
10066 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
10068 where
10069 T: std::convert::Into<crate::model::Config>,
10070 {
10071 self.config = v.map(|x| x.into());
10072 self
10073 }
10074
10075 pub fn set_update_mask<T>(mut self, v: T) -> Self
10077 where
10078 T: std::convert::Into<wkt::FieldMask>,
10079 {
10080 self.update_mask = std::option::Option::Some(v.into());
10081 self
10082 }
10083
10084 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10086 where
10087 T: std::convert::Into<wkt::FieldMask>,
10088 {
10089 self.update_mask = v.map(|x| x.into());
10090 self
10091 }
10092}
10093
10094impl wkt::message::Message for UpdateConfigRequest {
10095 fn typename() -> &'static str {
10096 "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
10097 }
10098}