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
37#[derive(Clone, Debug, Default, PartialEq)]
39#[non_exhaustive]
40pub struct DataEncryptionState {
41 pub kms_key_version_name: std::string::String,
44
45 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
46}
47
48impl DataEncryptionState {
49 pub fn new() -> Self {
50 std::default::Default::default()
51 }
52
53 pub fn set_kms_key_version_name<T: std::convert::Into<std::string::String>>(
55 mut self,
56 v: T,
57 ) -> Self {
58 self.kms_key_version_name = v.into();
59 self
60 }
61}
62
63impl wkt::message::Message for DataEncryptionState {
64 fn typename() -> &'static str {
65 "type.googleapis.com/google.cloud.dataform.v1.DataEncryptionState"
66 }
67}
68
69#[doc(hidden)]
70impl<'de> serde::de::Deserialize<'de> for DataEncryptionState {
71 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
72 where
73 D: serde::Deserializer<'de>,
74 {
75 #[allow(non_camel_case_types)]
76 #[doc(hidden)]
77 #[derive(PartialEq, Eq, Hash)]
78 enum __FieldTag {
79 __kms_key_version_name,
80 Unknown(std::string::String),
81 }
82 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
83 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
84 where
85 D: serde::Deserializer<'de>,
86 {
87 struct Visitor;
88 impl<'de> serde::de::Visitor<'de> for Visitor {
89 type Value = __FieldTag;
90 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
91 formatter.write_str("a field name for DataEncryptionState")
92 }
93 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
94 where
95 E: serde::de::Error,
96 {
97 use std::result::Result::Ok;
98 use std::string::ToString;
99 match value {
100 "kmsKeyVersionName" => Ok(__FieldTag::__kms_key_version_name),
101 "kms_key_version_name" => Ok(__FieldTag::__kms_key_version_name),
102 _ => Ok(__FieldTag::Unknown(value.to_string())),
103 }
104 }
105 }
106 deserializer.deserialize_identifier(Visitor)
107 }
108 }
109 struct Visitor;
110 impl<'de> serde::de::Visitor<'de> for Visitor {
111 type Value = DataEncryptionState;
112 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
113 formatter.write_str("struct DataEncryptionState")
114 }
115 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
116 where
117 A: serde::de::MapAccess<'de>,
118 {
119 #[allow(unused_imports)]
120 use serde::de::Error;
121 use std::option::Option::Some;
122 let mut fields = std::collections::HashSet::new();
123 let mut result = Self::Value::new();
124 while let Some(tag) = map.next_key::<__FieldTag>()? {
125 #[allow(clippy::match_single_binding)]
126 match tag {
127 __FieldTag::__kms_key_version_name => {
128 if !fields.insert(__FieldTag::__kms_key_version_name) {
129 return std::result::Result::Err(A::Error::duplicate_field(
130 "multiple values for kms_key_version_name",
131 ));
132 }
133 result.kms_key_version_name = map
134 .next_value::<std::option::Option<std::string::String>>()?
135 .unwrap_or_default();
136 }
137 __FieldTag::Unknown(key) => {
138 let value = map.next_value::<serde_json::Value>()?;
139 result._unknown_fields.insert(key, value);
140 }
141 }
142 }
143 std::result::Result::Ok(result)
144 }
145 }
146 deserializer.deserialize_any(Visitor)
147 }
148}
149
150#[doc(hidden)]
151impl serde::ser::Serialize for DataEncryptionState {
152 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
153 where
154 S: serde::ser::Serializer,
155 {
156 use serde::ser::SerializeMap;
157 #[allow(unused_imports)]
158 use std::option::Option::Some;
159 let mut state = serializer.serialize_map(std::option::Option::None)?;
160 if !self.kms_key_version_name.is_empty() {
161 state.serialize_entry("kmsKeyVersionName", &self.kms_key_version_name)?;
162 }
163 if !self._unknown_fields.is_empty() {
164 for (key, value) in self._unknown_fields.iter() {
165 state.serialize_entry(key, &value)?;
166 }
167 }
168 state.end()
169 }
170}
171
172#[derive(Clone, Debug, Default, PartialEq)]
174#[non_exhaustive]
175pub struct Repository {
176 pub name: std::string::String,
178
179 pub create_time: std::option::Option<wkt::Timestamp>,
181
182 pub display_name: std::string::String,
184
185 pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
187
188 pub npmrc_environment_variables_secret_version: std::string::String,
193
194 pub workspace_compilation_overrides:
199 std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
200
201 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
203
204 pub set_authenticated_user_admin: bool,
207
208 pub service_account: std::string::String,
210
211 pub kms_key_name: std::string::String,
217
218 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
221
222 pub internal_metadata: std::option::Option<std::string::String>,
226
227 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
228}
229
230impl Repository {
231 pub fn new() -> Self {
232 std::default::Default::default()
233 }
234
235 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
237 self.name = v.into();
238 self
239 }
240
241 pub fn set_create_time<T>(mut self, v: T) -> Self
243 where
244 T: std::convert::Into<wkt::Timestamp>,
245 {
246 self.create_time = std::option::Option::Some(v.into());
247 self
248 }
249
250 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
252 where
253 T: std::convert::Into<wkt::Timestamp>,
254 {
255 self.create_time = v.map(|x| x.into());
256 self
257 }
258
259 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
261 self.display_name = v.into();
262 self
263 }
264
265 pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
267 where
268 T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
269 {
270 self.git_remote_settings = std::option::Option::Some(v.into());
271 self
272 }
273
274 pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
276 where
277 T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
278 {
279 self.git_remote_settings = v.map(|x| x.into());
280 self
281 }
282
283 pub fn set_npmrc_environment_variables_secret_version<
285 T: std::convert::Into<std::string::String>,
286 >(
287 mut self,
288 v: T,
289 ) -> Self {
290 self.npmrc_environment_variables_secret_version = v.into();
291 self
292 }
293
294 pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
296 where
297 T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
298 {
299 self.workspace_compilation_overrides = std::option::Option::Some(v.into());
300 self
301 }
302
303 pub fn set_or_clear_workspace_compilation_overrides<T>(
305 mut self,
306 v: std::option::Option<T>,
307 ) -> Self
308 where
309 T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
310 {
311 self.workspace_compilation_overrides = v.map(|x| x.into());
312 self
313 }
314
315 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
317 where
318 T: std::iter::IntoIterator<Item = (K, V)>,
319 K: std::convert::Into<std::string::String>,
320 V: std::convert::Into<std::string::String>,
321 {
322 use std::iter::Iterator;
323 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
324 self
325 }
326
327 pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
329 self.set_authenticated_user_admin = v.into();
330 self
331 }
332
333 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
335 self.service_account = v.into();
336 self
337 }
338
339 pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
341 self.kms_key_name = v.into();
342 self
343 }
344
345 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
347 where
348 T: std::convert::Into<crate::model::DataEncryptionState>,
349 {
350 self.data_encryption_state = std::option::Option::Some(v.into());
351 self
352 }
353
354 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
356 where
357 T: std::convert::Into<crate::model::DataEncryptionState>,
358 {
359 self.data_encryption_state = v.map(|x| x.into());
360 self
361 }
362
363 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
365 where
366 T: std::convert::Into<std::string::String>,
367 {
368 self.internal_metadata = std::option::Option::Some(v.into());
369 self
370 }
371
372 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
374 where
375 T: std::convert::Into<std::string::String>,
376 {
377 self.internal_metadata = v.map(|x| x.into());
378 self
379 }
380}
381
382impl wkt::message::Message for Repository {
383 fn typename() -> &'static str {
384 "type.googleapis.com/google.cloud.dataform.v1.Repository"
385 }
386}
387
388#[doc(hidden)]
389impl<'de> serde::de::Deserialize<'de> for Repository {
390 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
391 where
392 D: serde::Deserializer<'de>,
393 {
394 #[allow(non_camel_case_types)]
395 #[doc(hidden)]
396 #[derive(PartialEq, Eq, Hash)]
397 enum __FieldTag {
398 __name,
399 __create_time,
400 __display_name,
401 __git_remote_settings,
402 __npmrc_environment_variables_secret_version,
403 __workspace_compilation_overrides,
404 __labels,
405 __set_authenticated_user_admin,
406 __service_account,
407 __kms_key_name,
408 __data_encryption_state,
409 __internal_metadata,
410 Unknown(std::string::String),
411 }
412 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
413 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
414 where
415 D: serde::Deserializer<'de>,
416 {
417 struct Visitor;
418 impl<'de> serde::de::Visitor<'de> for Visitor {
419 type Value = __FieldTag;
420 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
421 formatter.write_str("a field name for Repository")
422 }
423 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
424 where
425 E: serde::de::Error,
426 {
427 use std::result::Result::Ok;
428 use std::string::ToString;
429 match value {
430 "name" => Ok(__FieldTag::__name),
431 "createTime" => Ok(__FieldTag::__create_time),
432 "create_time" => Ok(__FieldTag::__create_time),
433 "displayName" => Ok(__FieldTag::__display_name),
434 "display_name" => Ok(__FieldTag::__display_name),
435 "gitRemoteSettings" => Ok(__FieldTag::__git_remote_settings),
436 "git_remote_settings" => Ok(__FieldTag::__git_remote_settings),
437 "npmrcEnvironmentVariablesSecretVersion" => {
438 Ok(__FieldTag::__npmrc_environment_variables_secret_version)
439 }
440 "npmrc_environment_variables_secret_version" => {
441 Ok(__FieldTag::__npmrc_environment_variables_secret_version)
442 }
443 "workspaceCompilationOverrides" => {
444 Ok(__FieldTag::__workspace_compilation_overrides)
445 }
446 "workspace_compilation_overrides" => {
447 Ok(__FieldTag::__workspace_compilation_overrides)
448 }
449 "labels" => Ok(__FieldTag::__labels),
450 "setAuthenticatedUserAdmin" => {
451 Ok(__FieldTag::__set_authenticated_user_admin)
452 }
453 "set_authenticated_user_admin" => {
454 Ok(__FieldTag::__set_authenticated_user_admin)
455 }
456 "serviceAccount" => Ok(__FieldTag::__service_account),
457 "service_account" => Ok(__FieldTag::__service_account),
458 "kmsKeyName" => Ok(__FieldTag::__kms_key_name),
459 "kms_key_name" => Ok(__FieldTag::__kms_key_name),
460 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
461 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
462 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
463 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
464 _ => Ok(__FieldTag::Unknown(value.to_string())),
465 }
466 }
467 }
468 deserializer.deserialize_identifier(Visitor)
469 }
470 }
471 struct Visitor;
472 impl<'de> serde::de::Visitor<'de> for Visitor {
473 type Value = Repository;
474 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
475 formatter.write_str("struct Repository")
476 }
477 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
478 where
479 A: serde::de::MapAccess<'de>,
480 {
481 #[allow(unused_imports)]
482 use serde::de::Error;
483 use std::option::Option::Some;
484 let mut fields = std::collections::HashSet::new();
485 let mut result = Self::Value::new();
486 while let Some(tag) = map.next_key::<__FieldTag>()? {
487 #[allow(clippy::match_single_binding)]
488 match tag {
489 __FieldTag::__name => {
490 if !fields.insert(__FieldTag::__name) {
491 return std::result::Result::Err(A::Error::duplicate_field(
492 "multiple values for name",
493 ));
494 }
495 result.name = map
496 .next_value::<std::option::Option<std::string::String>>()?
497 .unwrap_or_default();
498 }
499 __FieldTag::__create_time => {
500 if !fields.insert(__FieldTag::__create_time) {
501 return std::result::Result::Err(A::Error::duplicate_field(
502 "multiple values for create_time",
503 ));
504 }
505 result.create_time =
506 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
507 }
508 __FieldTag::__display_name => {
509 if !fields.insert(__FieldTag::__display_name) {
510 return std::result::Result::Err(A::Error::duplicate_field(
511 "multiple values for display_name",
512 ));
513 }
514 result.display_name = map
515 .next_value::<std::option::Option<std::string::String>>()?
516 .unwrap_or_default();
517 }
518 __FieldTag::__git_remote_settings => {
519 if !fields.insert(__FieldTag::__git_remote_settings) {
520 return std::result::Result::Err(A::Error::duplicate_field(
521 "multiple values for git_remote_settings",
522 ));
523 }
524 result.git_remote_settings =
525 map.next_value::<std::option::Option<
526 crate::model::repository::GitRemoteSettings,
527 >>()?;
528 }
529 __FieldTag::__npmrc_environment_variables_secret_version => {
530 if !fields
531 .insert(__FieldTag::__npmrc_environment_variables_secret_version)
532 {
533 return std::result::Result::Err(A::Error::duplicate_field(
534 "multiple values for npmrc_environment_variables_secret_version",
535 ));
536 }
537 result.npmrc_environment_variables_secret_version = map
538 .next_value::<std::option::Option<std::string::String>>()?
539 .unwrap_or_default();
540 }
541 __FieldTag::__workspace_compilation_overrides => {
542 if !fields.insert(__FieldTag::__workspace_compilation_overrides) {
543 return std::result::Result::Err(A::Error::duplicate_field(
544 "multiple values for workspace_compilation_overrides",
545 ));
546 }
547 result.workspace_compilation_overrides = map
548 .next_value::<std::option::Option<
549 crate::model::repository::WorkspaceCompilationOverrides,
550 >>()?;
551 }
552 __FieldTag::__labels => {
553 if !fields.insert(__FieldTag::__labels) {
554 return std::result::Result::Err(A::Error::duplicate_field(
555 "multiple values for labels",
556 ));
557 }
558 result.labels = map
559 .next_value::<std::option::Option<
560 std::collections::HashMap<
561 std::string::String,
562 std::string::String,
563 >,
564 >>()?
565 .unwrap_or_default();
566 }
567 __FieldTag::__set_authenticated_user_admin => {
568 if !fields.insert(__FieldTag::__set_authenticated_user_admin) {
569 return std::result::Result::Err(A::Error::duplicate_field(
570 "multiple values for set_authenticated_user_admin",
571 ));
572 }
573 result.set_authenticated_user_admin = map
574 .next_value::<std::option::Option<bool>>()?
575 .unwrap_or_default();
576 }
577 __FieldTag::__service_account => {
578 if !fields.insert(__FieldTag::__service_account) {
579 return std::result::Result::Err(A::Error::duplicate_field(
580 "multiple values for service_account",
581 ));
582 }
583 result.service_account = map
584 .next_value::<std::option::Option<std::string::String>>()?
585 .unwrap_or_default();
586 }
587 __FieldTag::__kms_key_name => {
588 if !fields.insert(__FieldTag::__kms_key_name) {
589 return std::result::Result::Err(A::Error::duplicate_field(
590 "multiple values for kms_key_name",
591 ));
592 }
593 result.kms_key_name = map
594 .next_value::<std::option::Option<std::string::String>>()?
595 .unwrap_or_default();
596 }
597 __FieldTag::__data_encryption_state => {
598 if !fields.insert(__FieldTag::__data_encryption_state) {
599 return std::result::Result::Err(A::Error::duplicate_field(
600 "multiple values for data_encryption_state",
601 ));
602 }
603 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
604 ;
605 }
606 __FieldTag::__internal_metadata => {
607 if !fields.insert(__FieldTag::__internal_metadata) {
608 return std::result::Result::Err(A::Error::duplicate_field(
609 "multiple values for internal_metadata",
610 ));
611 }
612 result.internal_metadata =
613 map.next_value::<std::option::Option<std::string::String>>()?;
614 }
615 __FieldTag::Unknown(key) => {
616 let value = map.next_value::<serde_json::Value>()?;
617 result._unknown_fields.insert(key, value);
618 }
619 }
620 }
621 std::result::Result::Ok(result)
622 }
623 }
624 deserializer.deserialize_any(Visitor)
625 }
626}
627
628#[doc(hidden)]
629impl serde::ser::Serialize for Repository {
630 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
631 where
632 S: serde::ser::Serializer,
633 {
634 use serde::ser::SerializeMap;
635 #[allow(unused_imports)]
636 use std::option::Option::Some;
637 let mut state = serializer.serialize_map(std::option::Option::None)?;
638 if !self.name.is_empty() {
639 state.serialize_entry("name", &self.name)?;
640 }
641 if self.create_time.is_some() {
642 state.serialize_entry("createTime", &self.create_time)?;
643 }
644 if !self.display_name.is_empty() {
645 state.serialize_entry("displayName", &self.display_name)?;
646 }
647 if self.git_remote_settings.is_some() {
648 state.serialize_entry("gitRemoteSettings", &self.git_remote_settings)?;
649 }
650 if !self.npmrc_environment_variables_secret_version.is_empty() {
651 state.serialize_entry(
652 "npmrcEnvironmentVariablesSecretVersion",
653 &self.npmrc_environment_variables_secret_version,
654 )?;
655 }
656 if self.workspace_compilation_overrides.is_some() {
657 state.serialize_entry(
658 "workspaceCompilationOverrides",
659 &self.workspace_compilation_overrides,
660 )?;
661 }
662 if !self.labels.is_empty() {
663 state.serialize_entry("labels", &self.labels)?;
664 }
665 if !wkt::internal::is_default(&self.set_authenticated_user_admin) {
666 state.serialize_entry(
667 "setAuthenticatedUserAdmin",
668 &self.set_authenticated_user_admin,
669 )?;
670 }
671 if !self.service_account.is_empty() {
672 state.serialize_entry("serviceAccount", &self.service_account)?;
673 }
674 if !self.kms_key_name.is_empty() {
675 state.serialize_entry("kmsKeyName", &self.kms_key_name)?;
676 }
677 if self.data_encryption_state.is_some() {
678 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
679 }
680 if self.internal_metadata.is_some() {
681 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
682 }
683 if !self._unknown_fields.is_empty() {
684 for (key, value) in self._unknown_fields.iter() {
685 state.serialize_entry(key, &value)?;
686 }
687 }
688 state.end()
689 }
690}
691
692pub mod repository {
694 #[allow(unused_imports)]
695 use super::*;
696
697 #[derive(Clone, Debug, Default, PartialEq)]
699 #[non_exhaustive]
700 pub struct GitRemoteSettings {
701 pub url: std::string::String,
703
704 pub default_branch: std::string::String,
706
707 pub authentication_token_secret_version: std::string::String,
711
712 pub ssh_authentication_config: std::option::Option<
714 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
715 >,
716
717 #[deprecated]
720 pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
721
722 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
723 }
724
725 impl GitRemoteSettings {
726 pub fn new() -> Self {
727 std::default::Default::default()
728 }
729
730 pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
732 self.url = v.into();
733 self
734 }
735
736 pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
738 mut self,
739 v: T,
740 ) -> Self {
741 self.default_branch = v.into();
742 self
743 }
744
745 pub fn set_authentication_token_secret_version<
747 T: std::convert::Into<std::string::String>,
748 >(
749 mut self,
750 v: T,
751 ) -> Self {
752 self.authentication_token_secret_version = v.into();
753 self
754 }
755
756 pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
758 where
759 T: std::convert::Into<
760 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
761 >,
762 {
763 self.ssh_authentication_config = std::option::Option::Some(v.into());
764 self
765 }
766
767 pub fn set_or_clear_ssh_authentication_config<T>(
769 mut self,
770 v: std::option::Option<T>,
771 ) -> Self
772 where
773 T: std::convert::Into<
774 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
775 >,
776 {
777 self.ssh_authentication_config = v.map(|x| x.into());
778 self
779 }
780
781 #[deprecated]
783 pub fn set_token_status<
784 T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
785 >(
786 mut self,
787 v: T,
788 ) -> Self {
789 self.token_status = v.into();
790 self
791 }
792 }
793
794 impl wkt::message::Message for GitRemoteSettings {
795 fn typename() -> &'static str {
796 "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
797 }
798 }
799
800 #[doc(hidden)]
801 impl<'de> serde::de::Deserialize<'de> for GitRemoteSettings {
802 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
803 where
804 D: serde::Deserializer<'de>,
805 {
806 #[allow(non_camel_case_types)]
807 #[doc(hidden)]
808 #[derive(PartialEq, Eq, Hash)]
809 enum __FieldTag {
810 __url,
811 __default_branch,
812 __authentication_token_secret_version,
813 __ssh_authentication_config,
814 __token_status,
815 Unknown(std::string::String),
816 }
817 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
818 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
819 where
820 D: serde::Deserializer<'de>,
821 {
822 struct Visitor;
823 impl<'de> serde::de::Visitor<'de> for Visitor {
824 type Value = __FieldTag;
825 fn expecting(
826 &self,
827 formatter: &mut std::fmt::Formatter,
828 ) -> std::fmt::Result {
829 formatter.write_str("a field name for GitRemoteSettings")
830 }
831 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
832 where
833 E: serde::de::Error,
834 {
835 use std::result::Result::Ok;
836 use std::string::ToString;
837 match value {
838 "url" => Ok(__FieldTag::__url),
839 "defaultBranch" => Ok(__FieldTag::__default_branch),
840 "default_branch" => Ok(__FieldTag::__default_branch),
841 "authenticationTokenSecretVersion" => {
842 Ok(__FieldTag::__authentication_token_secret_version)
843 }
844 "authentication_token_secret_version" => {
845 Ok(__FieldTag::__authentication_token_secret_version)
846 }
847 "sshAuthenticationConfig" => {
848 Ok(__FieldTag::__ssh_authentication_config)
849 }
850 "ssh_authentication_config" => {
851 Ok(__FieldTag::__ssh_authentication_config)
852 }
853 "tokenStatus" => Ok(__FieldTag::__token_status),
854 "token_status" => Ok(__FieldTag::__token_status),
855 _ => Ok(__FieldTag::Unknown(value.to_string())),
856 }
857 }
858 }
859 deserializer.deserialize_identifier(Visitor)
860 }
861 }
862 struct Visitor;
863 impl<'de> serde::de::Visitor<'de> for Visitor {
864 type Value = GitRemoteSettings;
865 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
866 formatter.write_str("struct GitRemoteSettings")
867 }
868 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
869 where
870 A: serde::de::MapAccess<'de>,
871 {
872 #[allow(unused_imports)]
873 use serde::de::Error;
874 use std::option::Option::Some;
875 let mut fields = std::collections::HashSet::new();
876 let mut result = Self::Value::new();
877 while let Some(tag) = map.next_key::<__FieldTag>()? {
878 #[allow(clippy::match_single_binding)]
879 match tag {
880 __FieldTag::__url => {
881 if !fields.insert(__FieldTag::__url) {
882 return std::result::Result::Err(A::Error::duplicate_field(
883 "multiple values for url",
884 ));
885 }
886 result.url = map
887 .next_value::<std::option::Option<std::string::String>>()?
888 .unwrap_or_default();
889 }
890 __FieldTag::__default_branch => {
891 if !fields.insert(__FieldTag::__default_branch) {
892 return std::result::Result::Err(A::Error::duplicate_field(
893 "multiple values for default_branch",
894 ));
895 }
896 result.default_branch = map
897 .next_value::<std::option::Option<std::string::String>>()?
898 .unwrap_or_default();
899 }
900 __FieldTag::__authentication_token_secret_version => {
901 if !fields.insert(__FieldTag::__authentication_token_secret_version)
902 {
903 return std::result::Result::Err(A::Error::duplicate_field(
904 "multiple values for authentication_token_secret_version",
905 ));
906 }
907 result.authentication_token_secret_version = map
908 .next_value::<std::option::Option<std::string::String>>()?
909 .unwrap_or_default();
910 }
911 __FieldTag::__ssh_authentication_config => {
912 if !fields.insert(__FieldTag::__ssh_authentication_config) {
913 return std::result::Result::Err(A::Error::duplicate_field(
914 "multiple values for ssh_authentication_config",
915 ));
916 }
917 result.ssh_authentication_config = map.next_value::<std::option::Option<crate::model::repository::git_remote_settings::SshAuthenticationConfig>>()?
918 ;
919 }
920 __FieldTag::__token_status => {
921 if !fields.insert(__FieldTag::__token_status) {
922 return std::result::Result::Err(A::Error::duplicate_field(
923 "multiple values for token_status",
924 ));
925 }
926 result.token_status = map
927 .next_value::<std::option::Option<
928 crate::model::repository::git_remote_settings::TokenStatus,
929 >>()?
930 .unwrap_or_default();
931 }
932 __FieldTag::Unknown(key) => {
933 let value = map.next_value::<serde_json::Value>()?;
934 result._unknown_fields.insert(key, value);
935 }
936 }
937 }
938 std::result::Result::Ok(result)
939 }
940 }
941 deserializer.deserialize_any(Visitor)
942 }
943 }
944
945 #[doc(hidden)]
946 impl serde::ser::Serialize for GitRemoteSettings {
947 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
948 where
949 S: serde::ser::Serializer,
950 {
951 use serde::ser::SerializeMap;
952 #[allow(unused_imports)]
953 use std::option::Option::Some;
954 let mut state = serializer.serialize_map(std::option::Option::None)?;
955 if !self.url.is_empty() {
956 state.serialize_entry("url", &self.url)?;
957 }
958 if !self.default_branch.is_empty() {
959 state.serialize_entry("defaultBranch", &self.default_branch)?;
960 }
961 if !self.authentication_token_secret_version.is_empty() {
962 state.serialize_entry(
963 "authenticationTokenSecretVersion",
964 &self.authentication_token_secret_version,
965 )?;
966 }
967 if self.ssh_authentication_config.is_some() {
968 state
969 .serialize_entry("sshAuthenticationConfig", &self.ssh_authentication_config)?;
970 }
971 if !wkt::internal::is_default(&self.token_status) {
972 state.serialize_entry("tokenStatus", &self.token_status)?;
973 }
974 if !self._unknown_fields.is_empty() {
975 for (key, value) in self._unknown_fields.iter() {
976 state.serialize_entry(key, &value)?;
977 }
978 }
979 state.end()
980 }
981 }
982
983 pub mod git_remote_settings {
985 #[allow(unused_imports)]
986 use super::*;
987
988 #[derive(Clone, Debug, Default, PartialEq)]
990 #[non_exhaustive]
991 pub struct SshAuthenticationConfig {
992 pub user_private_key_secret_version: std::string::String,
996
997 pub host_public_key: std::string::String,
1000
1001 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1002 }
1003
1004 impl SshAuthenticationConfig {
1005 pub fn new() -> Self {
1006 std::default::Default::default()
1007 }
1008
1009 pub fn set_user_private_key_secret_version<
1011 T: std::convert::Into<std::string::String>,
1012 >(
1013 mut self,
1014 v: T,
1015 ) -> Self {
1016 self.user_private_key_secret_version = v.into();
1017 self
1018 }
1019
1020 pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
1022 mut self,
1023 v: T,
1024 ) -> Self {
1025 self.host_public_key = v.into();
1026 self
1027 }
1028 }
1029
1030 impl wkt::message::Message for SshAuthenticationConfig {
1031 fn typename() -> &'static str {
1032 "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
1033 }
1034 }
1035
1036 #[doc(hidden)]
1037 impl<'de> serde::de::Deserialize<'de> for SshAuthenticationConfig {
1038 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1039 where
1040 D: serde::Deserializer<'de>,
1041 {
1042 #[allow(non_camel_case_types)]
1043 #[doc(hidden)]
1044 #[derive(PartialEq, Eq, Hash)]
1045 enum __FieldTag {
1046 __user_private_key_secret_version,
1047 __host_public_key,
1048 Unknown(std::string::String),
1049 }
1050 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1051 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1052 where
1053 D: serde::Deserializer<'de>,
1054 {
1055 struct Visitor;
1056 impl<'de> serde::de::Visitor<'de> for Visitor {
1057 type Value = __FieldTag;
1058 fn expecting(
1059 &self,
1060 formatter: &mut std::fmt::Formatter,
1061 ) -> std::fmt::Result {
1062 formatter.write_str("a field name for SshAuthenticationConfig")
1063 }
1064 fn visit_str<E>(
1065 self,
1066 value: &str,
1067 ) -> std::result::Result<Self::Value, E>
1068 where
1069 E: serde::de::Error,
1070 {
1071 use std::result::Result::Ok;
1072 use std::string::ToString;
1073 match value {
1074 "userPrivateKeySecretVersion" => {
1075 Ok(__FieldTag::__user_private_key_secret_version)
1076 }
1077 "user_private_key_secret_version" => {
1078 Ok(__FieldTag::__user_private_key_secret_version)
1079 }
1080 "hostPublicKey" => Ok(__FieldTag::__host_public_key),
1081 "host_public_key" => Ok(__FieldTag::__host_public_key),
1082 _ => Ok(__FieldTag::Unknown(value.to_string())),
1083 }
1084 }
1085 }
1086 deserializer.deserialize_identifier(Visitor)
1087 }
1088 }
1089 struct Visitor;
1090 impl<'de> serde::de::Visitor<'de> for Visitor {
1091 type Value = SshAuthenticationConfig;
1092 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1093 formatter.write_str("struct SshAuthenticationConfig")
1094 }
1095 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1096 where
1097 A: serde::de::MapAccess<'de>,
1098 {
1099 #[allow(unused_imports)]
1100 use serde::de::Error;
1101 use std::option::Option::Some;
1102 let mut fields = std::collections::HashSet::new();
1103 let mut result = Self::Value::new();
1104 while let Some(tag) = map.next_key::<__FieldTag>()? {
1105 #[allow(clippy::match_single_binding)]
1106 match tag {
1107 __FieldTag::__user_private_key_secret_version => {
1108 if !fields.insert(__FieldTag::__user_private_key_secret_version)
1109 {
1110 return std::result::Result::Err(
1111 A::Error::duplicate_field(
1112 "multiple values for user_private_key_secret_version",
1113 ),
1114 );
1115 }
1116 result.user_private_key_secret_version = map
1117 .next_value::<std::option::Option<std::string::String>>()?
1118 .unwrap_or_default();
1119 }
1120 __FieldTag::__host_public_key => {
1121 if !fields.insert(__FieldTag::__host_public_key) {
1122 return std::result::Result::Err(
1123 A::Error::duplicate_field(
1124 "multiple values for host_public_key",
1125 ),
1126 );
1127 }
1128 result.host_public_key = map
1129 .next_value::<std::option::Option<std::string::String>>()?
1130 .unwrap_or_default();
1131 }
1132 __FieldTag::Unknown(key) => {
1133 let value = map.next_value::<serde_json::Value>()?;
1134 result._unknown_fields.insert(key, value);
1135 }
1136 }
1137 }
1138 std::result::Result::Ok(result)
1139 }
1140 }
1141 deserializer.deserialize_any(Visitor)
1142 }
1143 }
1144
1145 #[doc(hidden)]
1146 impl serde::ser::Serialize for SshAuthenticationConfig {
1147 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1148 where
1149 S: serde::ser::Serializer,
1150 {
1151 use serde::ser::SerializeMap;
1152 #[allow(unused_imports)]
1153 use std::option::Option::Some;
1154 let mut state = serializer.serialize_map(std::option::Option::None)?;
1155 if !self.user_private_key_secret_version.is_empty() {
1156 state.serialize_entry(
1157 "userPrivateKeySecretVersion",
1158 &self.user_private_key_secret_version,
1159 )?;
1160 }
1161 if !self.host_public_key.is_empty() {
1162 state.serialize_entry("hostPublicKey", &self.host_public_key)?;
1163 }
1164 if !self._unknown_fields.is_empty() {
1165 for (key, value) in self._unknown_fields.iter() {
1166 state.serialize_entry(key, &value)?;
1167 }
1168 }
1169 state.end()
1170 }
1171 }
1172
1173 #[derive(Clone, Debug, PartialEq)]
1189 #[non_exhaustive]
1190 pub enum TokenStatus {
1191 Unspecified,
1193 NotFound,
1196 Invalid,
1198 Valid,
1200 UnknownValue(token_status::UnknownValue),
1205 }
1206
1207 #[doc(hidden)]
1208 pub mod token_status {
1209 #[allow(unused_imports)]
1210 use super::*;
1211 #[derive(Clone, Debug, PartialEq)]
1212 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1213 }
1214
1215 impl TokenStatus {
1216 pub fn value(&self) -> std::option::Option<i32> {
1221 match self {
1222 Self::Unspecified => std::option::Option::Some(0),
1223 Self::NotFound => std::option::Option::Some(1),
1224 Self::Invalid => std::option::Option::Some(2),
1225 Self::Valid => std::option::Option::Some(3),
1226 Self::UnknownValue(u) => u.0.value(),
1227 }
1228 }
1229
1230 pub fn name(&self) -> std::option::Option<&str> {
1235 match self {
1236 Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
1237 Self::NotFound => std::option::Option::Some("NOT_FOUND"),
1238 Self::Invalid => std::option::Option::Some("INVALID"),
1239 Self::Valid => std::option::Option::Some("VALID"),
1240 Self::UnknownValue(u) => u.0.name(),
1241 }
1242 }
1243 }
1244
1245 impl std::default::Default for TokenStatus {
1246 fn default() -> Self {
1247 use std::convert::From;
1248 Self::from(0)
1249 }
1250 }
1251
1252 impl std::fmt::Display for TokenStatus {
1253 fn fmt(
1254 &self,
1255 f: &mut std::fmt::Formatter<'_>,
1256 ) -> std::result::Result<(), std::fmt::Error> {
1257 wkt::internal::display_enum(f, self.name(), self.value())
1258 }
1259 }
1260
1261 impl std::convert::From<i32> for TokenStatus {
1262 fn from(value: i32) -> Self {
1263 match value {
1264 0 => Self::Unspecified,
1265 1 => Self::NotFound,
1266 2 => Self::Invalid,
1267 3 => Self::Valid,
1268 _ => Self::UnknownValue(token_status::UnknownValue(
1269 wkt::internal::UnknownEnumValue::Integer(value),
1270 )),
1271 }
1272 }
1273 }
1274
1275 impl std::convert::From<&str> for TokenStatus {
1276 fn from(value: &str) -> Self {
1277 use std::string::ToString;
1278 match value {
1279 "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
1280 "NOT_FOUND" => Self::NotFound,
1281 "INVALID" => Self::Invalid,
1282 "VALID" => Self::Valid,
1283 _ => Self::UnknownValue(token_status::UnknownValue(
1284 wkt::internal::UnknownEnumValue::String(value.to_string()),
1285 )),
1286 }
1287 }
1288 }
1289
1290 impl serde::ser::Serialize for TokenStatus {
1291 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1292 where
1293 S: serde::Serializer,
1294 {
1295 match self {
1296 Self::Unspecified => serializer.serialize_i32(0),
1297 Self::NotFound => serializer.serialize_i32(1),
1298 Self::Invalid => serializer.serialize_i32(2),
1299 Self::Valid => serializer.serialize_i32(3),
1300 Self::UnknownValue(u) => u.0.serialize(serializer),
1301 }
1302 }
1303 }
1304
1305 impl<'de> serde::de::Deserialize<'de> for TokenStatus {
1306 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1307 where
1308 D: serde::Deserializer<'de>,
1309 {
1310 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
1311 ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
1312 ))
1313 }
1314 }
1315 }
1316
1317 #[derive(Clone, Debug, Default, PartialEq)]
1319 #[non_exhaustive]
1320 pub struct WorkspaceCompilationOverrides {
1321 pub default_database: std::string::String,
1323
1324 pub schema_suffix: std::string::String,
1327
1328 pub table_prefix: std::string::String,
1330
1331 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1332 }
1333
1334 impl WorkspaceCompilationOverrides {
1335 pub fn new() -> Self {
1336 std::default::Default::default()
1337 }
1338
1339 pub fn set_default_database<T: std::convert::Into<std::string::String>>(
1341 mut self,
1342 v: T,
1343 ) -> Self {
1344 self.default_database = v.into();
1345 self
1346 }
1347
1348 pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
1350 mut self,
1351 v: T,
1352 ) -> Self {
1353 self.schema_suffix = v.into();
1354 self
1355 }
1356
1357 pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
1359 mut self,
1360 v: T,
1361 ) -> Self {
1362 self.table_prefix = v.into();
1363 self
1364 }
1365 }
1366
1367 impl wkt::message::Message for WorkspaceCompilationOverrides {
1368 fn typename() -> &'static str {
1369 "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
1370 }
1371 }
1372
1373 #[doc(hidden)]
1374 impl<'de> serde::de::Deserialize<'de> for WorkspaceCompilationOverrides {
1375 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1376 where
1377 D: serde::Deserializer<'de>,
1378 {
1379 #[allow(non_camel_case_types)]
1380 #[doc(hidden)]
1381 #[derive(PartialEq, Eq, Hash)]
1382 enum __FieldTag {
1383 __default_database,
1384 __schema_suffix,
1385 __table_prefix,
1386 Unknown(std::string::String),
1387 }
1388 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1389 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1390 where
1391 D: serde::Deserializer<'de>,
1392 {
1393 struct Visitor;
1394 impl<'de> serde::de::Visitor<'de> for Visitor {
1395 type Value = __FieldTag;
1396 fn expecting(
1397 &self,
1398 formatter: &mut std::fmt::Formatter,
1399 ) -> std::fmt::Result {
1400 formatter.write_str("a field name for WorkspaceCompilationOverrides")
1401 }
1402 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1403 where
1404 E: serde::de::Error,
1405 {
1406 use std::result::Result::Ok;
1407 use std::string::ToString;
1408 match value {
1409 "defaultDatabase" => Ok(__FieldTag::__default_database),
1410 "default_database" => Ok(__FieldTag::__default_database),
1411 "schemaSuffix" => Ok(__FieldTag::__schema_suffix),
1412 "schema_suffix" => Ok(__FieldTag::__schema_suffix),
1413 "tablePrefix" => Ok(__FieldTag::__table_prefix),
1414 "table_prefix" => Ok(__FieldTag::__table_prefix),
1415 _ => Ok(__FieldTag::Unknown(value.to_string())),
1416 }
1417 }
1418 }
1419 deserializer.deserialize_identifier(Visitor)
1420 }
1421 }
1422 struct Visitor;
1423 impl<'de> serde::de::Visitor<'de> for Visitor {
1424 type Value = WorkspaceCompilationOverrides;
1425 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1426 formatter.write_str("struct WorkspaceCompilationOverrides")
1427 }
1428 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1429 where
1430 A: serde::de::MapAccess<'de>,
1431 {
1432 #[allow(unused_imports)]
1433 use serde::de::Error;
1434 use std::option::Option::Some;
1435 let mut fields = std::collections::HashSet::new();
1436 let mut result = Self::Value::new();
1437 while let Some(tag) = map.next_key::<__FieldTag>()? {
1438 #[allow(clippy::match_single_binding)]
1439 match tag {
1440 __FieldTag::__default_database => {
1441 if !fields.insert(__FieldTag::__default_database) {
1442 return std::result::Result::Err(A::Error::duplicate_field(
1443 "multiple values for default_database",
1444 ));
1445 }
1446 result.default_database = map
1447 .next_value::<std::option::Option<std::string::String>>()?
1448 .unwrap_or_default();
1449 }
1450 __FieldTag::__schema_suffix => {
1451 if !fields.insert(__FieldTag::__schema_suffix) {
1452 return std::result::Result::Err(A::Error::duplicate_field(
1453 "multiple values for schema_suffix",
1454 ));
1455 }
1456 result.schema_suffix = map
1457 .next_value::<std::option::Option<std::string::String>>()?
1458 .unwrap_or_default();
1459 }
1460 __FieldTag::__table_prefix => {
1461 if !fields.insert(__FieldTag::__table_prefix) {
1462 return std::result::Result::Err(A::Error::duplicate_field(
1463 "multiple values for table_prefix",
1464 ));
1465 }
1466 result.table_prefix = map
1467 .next_value::<std::option::Option<std::string::String>>()?
1468 .unwrap_or_default();
1469 }
1470 __FieldTag::Unknown(key) => {
1471 let value = map.next_value::<serde_json::Value>()?;
1472 result._unknown_fields.insert(key, value);
1473 }
1474 }
1475 }
1476 std::result::Result::Ok(result)
1477 }
1478 }
1479 deserializer.deserialize_any(Visitor)
1480 }
1481 }
1482
1483 #[doc(hidden)]
1484 impl serde::ser::Serialize for WorkspaceCompilationOverrides {
1485 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1486 where
1487 S: serde::ser::Serializer,
1488 {
1489 use serde::ser::SerializeMap;
1490 #[allow(unused_imports)]
1491 use std::option::Option::Some;
1492 let mut state = serializer.serialize_map(std::option::Option::None)?;
1493 if !self.default_database.is_empty() {
1494 state.serialize_entry("defaultDatabase", &self.default_database)?;
1495 }
1496 if !self.schema_suffix.is_empty() {
1497 state.serialize_entry("schemaSuffix", &self.schema_suffix)?;
1498 }
1499 if !self.table_prefix.is_empty() {
1500 state.serialize_entry("tablePrefix", &self.table_prefix)?;
1501 }
1502 if !self._unknown_fields.is_empty() {
1503 for (key, value) in self._unknown_fields.iter() {
1504 state.serialize_entry(key, &value)?;
1505 }
1506 }
1507 state.end()
1508 }
1509 }
1510}
1511
1512#[derive(Clone, Debug, Default, PartialEq)]
1514#[non_exhaustive]
1515pub struct ListRepositoriesRequest {
1516 pub parent: std::string::String,
1519
1520 pub page_size: i32,
1524
1525 pub page_token: std::string::String,
1532
1533 pub order_by: std::string::String,
1537
1538 pub filter: std::string::String,
1540
1541 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1542}
1543
1544impl ListRepositoriesRequest {
1545 pub fn new() -> Self {
1546 std::default::Default::default()
1547 }
1548
1549 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1551 self.parent = v.into();
1552 self
1553 }
1554
1555 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1557 self.page_size = v.into();
1558 self
1559 }
1560
1561 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1563 self.page_token = v.into();
1564 self
1565 }
1566
1567 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1569 self.order_by = v.into();
1570 self
1571 }
1572
1573 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1575 self.filter = v.into();
1576 self
1577 }
1578}
1579
1580impl wkt::message::Message for ListRepositoriesRequest {
1581 fn typename() -> &'static str {
1582 "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
1583 }
1584}
1585
1586#[doc(hidden)]
1587impl<'de> serde::de::Deserialize<'de> for ListRepositoriesRequest {
1588 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1589 where
1590 D: serde::Deserializer<'de>,
1591 {
1592 #[allow(non_camel_case_types)]
1593 #[doc(hidden)]
1594 #[derive(PartialEq, Eq, Hash)]
1595 enum __FieldTag {
1596 __parent,
1597 __page_size,
1598 __page_token,
1599 __order_by,
1600 __filter,
1601 Unknown(std::string::String),
1602 }
1603 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1604 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1605 where
1606 D: serde::Deserializer<'de>,
1607 {
1608 struct Visitor;
1609 impl<'de> serde::de::Visitor<'de> for Visitor {
1610 type Value = __FieldTag;
1611 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1612 formatter.write_str("a field name for ListRepositoriesRequest")
1613 }
1614 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1615 where
1616 E: serde::de::Error,
1617 {
1618 use std::result::Result::Ok;
1619 use std::string::ToString;
1620 match value {
1621 "parent" => Ok(__FieldTag::__parent),
1622 "pageSize" => Ok(__FieldTag::__page_size),
1623 "page_size" => Ok(__FieldTag::__page_size),
1624 "pageToken" => Ok(__FieldTag::__page_token),
1625 "page_token" => Ok(__FieldTag::__page_token),
1626 "orderBy" => Ok(__FieldTag::__order_by),
1627 "order_by" => Ok(__FieldTag::__order_by),
1628 "filter" => Ok(__FieldTag::__filter),
1629 _ => Ok(__FieldTag::Unknown(value.to_string())),
1630 }
1631 }
1632 }
1633 deserializer.deserialize_identifier(Visitor)
1634 }
1635 }
1636 struct Visitor;
1637 impl<'de> serde::de::Visitor<'de> for Visitor {
1638 type Value = ListRepositoriesRequest;
1639 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1640 formatter.write_str("struct ListRepositoriesRequest")
1641 }
1642 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1643 where
1644 A: serde::de::MapAccess<'de>,
1645 {
1646 #[allow(unused_imports)]
1647 use serde::de::Error;
1648 use std::option::Option::Some;
1649 let mut fields = std::collections::HashSet::new();
1650 let mut result = Self::Value::new();
1651 while let Some(tag) = map.next_key::<__FieldTag>()? {
1652 #[allow(clippy::match_single_binding)]
1653 match tag {
1654 __FieldTag::__parent => {
1655 if !fields.insert(__FieldTag::__parent) {
1656 return std::result::Result::Err(A::Error::duplicate_field(
1657 "multiple values for parent",
1658 ));
1659 }
1660 result.parent = map
1661 .next_value::<std::option::Option<std::string::String>>()?
1662 .unwrap_or_default();
1663 }
1664 __FieldTag::__page_size => {
1665 if !fields.insert(__FieldTag::__page_size) {
1666 return std::result::Result::Err(A::Error::duplicate_field(
1667 "multiple values for page_size",
1668 ));
1669 }
1670 struct __With(std::option::Option<i32>);
1671 impl<'de> serde::de::Deserialize<'de> for __With {
1672 fn deserialize<D>(
1673 deserializer: D,
1674 ) -> std::result::Result<Self, D::Error>
1675 where
1676 D: serde::de::Deserializer<'de>,
1677 {
1678 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
1679 }
1680 }
1681 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
1682 }
1683 __FieldTag::__page_token => {
1684 if !fields.insert(__FieldTag::__page_token) {
1685 return std::result::Result::Err(A::Error::duplicate_field(
1686 "multiple values for page_token",
1687 ));
1688 }
1689 result.page_token = map
1690 .next_value::<std::option::Option<std::string::String>>()?
1691 .unwrap_or_default();
1692 }
1693 __FieldTag::__order_by => {
1694 if !fields.insert(__FieldTag::__order_by) {
1695 return std::result::Result::Err(A::Error::duplicate_field(
1696 "multiple values for order_by",
1697 ));
1698 }
1699 result.order_by = map
1700 .next_value::<std::option::Option<std::string::String>>()?
1701 .unwrap_or_default();
1702 }
1703 __FieldTag::__filter => {
1704 if !fields.insert(__FieldTag::__filter) {
1705 return std::result::Result::Err(A::Error::duplicate_field(
1706 "multiple values for filter",
1707 ));
1708 }
1709 result.filter = map
1710 .next_value::<std::option::Option<std::string::String>>()?
1711 .unwrap_or_default();
1712 }
1713 __FieldTag::Unknown(key) => {
1714 let value = map.next_value::<serde_json::Value>()?;
1715 result._unknown_fields.insert(key, value);
1716 }
1717 }
1718 }
1719 std::result::Result::Ok(result)
1720 }
1721 }
1722 deserializer.deserialize_any(Visitor)
1723 }
1724}
1725
1726#[doc(hidden)]
1727impl serde::ser::Serialize for ListRepositoriesRequest {
1728 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1729 where
1730 S: serde::ser::Serializer,
1731 {
1732 use serde::ser::SerializeMap;
1733 #[allow(unused_imports)]
1734 use std::option::Option::Some;
1735 let mut state = serializer.serialize_map(std::option::Option::None)?;
1736 if !self.parent.is_empty() {
1737 state.serialize_entry("parent", &self.parent)?;
1738 }
1739 if !wkt::internal::is_default(&self.page_size) {
1740 struct __With<'a>(&'a i32);
1741 impl<'a> serde::ser::Serialize for __With<'a> {
1742 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1743 where
1744 S: serde::ser::Serializer,
1745 {
1746 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
1747 }
1748 }
1749 state.serialize_entry("pageSize", &__With(&self.page_size))?;
1750 }
1751 if !self.page_token.is_empty() {
1752 state.serialize_entry("pageToken", &self.page_token)?;
1753 }
1754 if !self.order_by.is_empty() {
1755 state.serialize_entry("orderBy", &self.order_by)?;
1756 }
1757 if !self.filter.is_empty() {
1758 state.serialize_entry("filter", &self.filter)?;
1759 }
1760 if !self._unknown_fields.is_empty() {
1761 for (key, value) in self._unknown_fields.iter() {
1762 state.serialize_entry(key, &value)?;
1763 }
1764 }
1765 state.end()
1766 }
1767}
1768
1769#[derive(Clone, Debug, Default, PartialEq)]
1771#[non_exhaustive]
1772pub struct ListRepositoriesResponse {
1773 pub repositories: std::vec::Vec<crate::model::Repository>,
1775
1776 pub next_page_token: std::string::String,
1779
1780 pub unreachable: std::vec::Vec<std::string::String>,
1782
1783 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1784}
1785
1786impl ListRepositoriesResponse {
1787 pub fn new() -> Self {
1788 std::default::Default::default()
1789 }
1790
1791 pub fn set_repositories<T, V>(mut self, v: T) -> Self
1793 where
1794 T: std::iter::IntoIterator<Item = V>,
1795 V: std::convert::Into<crate::model::Repository>,
1796 {
1797 use std::iter::Iterator;
1798 self.repositories = v.into_iter().map(|i| i.into()).collect();
1799 self
1800 }
1801
1802 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1804 self.next_page_token = v.into();
1805 self
1806 }
1807
1808 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1810 where
1811 T: std::iter::IntoIterator<Item = V>,
1812 V: std::convert::Into<std::string::String>,
1813 {
1814 use std::iter::Iterator;
1815 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1816 self
1817 }
1818}
1819
1820impl wkt::message::Message for ListRepositoriesResponse {
1821 fn typename() -> &'static str {
1822 "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
1823 }
1824}
1825
1826#[doc(hidden)]
1827impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
1828 type PageItem = crate::model::Repository;
1829
1830 fn items(self) -> std::vec::Vec<Self::PageItem> {
1831 self.repositories
1832 }
1833
1834 fn next_page_token(&self) -> std::string::String {
1835 use std::clone::Clone;
1836 self.next_page_token.clone()
1837 }
1838}
1839
1840#[doc(hidden)]
1841impl<'de> serde::de::Deserialize<'de> for ListRepositoriesResponse {
1842 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1843 where
1844 D: serde::Deserializer<'de>,
1845 {
1846 #[allow(non_camel_case_types)]
1847 #[doc(hidden)]
1848 #[derive(PartialEq, Eq, Hash)]
1849 enum __FieldTag {
1850 __repositories,
1851 __next_page_token,
1852 __unreachable,
1853 Unknown(std::string::String),
1854 }
1855 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1856 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1857 where
1858 D: serde::Deserializer<'de>,
1859 {
1860 struct Visitor;
1861 impl<'de> serde::de::Visitor<'de> for Visitor {
1862 type Value = __FieldTag;
1863 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1864 formatter.write_str("a field name for ListRepositoriesResponse")
1865 }
1866 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1867 where
1868 E: serde::de::Error,
1869 {
1870 use std::result::Result::Ok;
1871 use std::string::ToString;
1872 match value {
1873 "repositories" => Ok(__FieldTag::__repositories),
1874 "nextPageToken" => Ok(__FieldTag::__next_page_token),
1875 "next_page_token" => Ok(__FieldTag::__next_page_token),
1876 "unreachable" => Ok(__FieldTag::__unreachable),
1877 _ => Ok(__FieldTag::Unknown(value.to_string())),
1878 }
1879 }
1880 }
1881 deserializer.deserialize_identifier(Visitor)
1882 }
1883 }
1884 struct Visitor;
1885 impl<'de> serde::de::Visitor<'de> for Visitor {
1886 type Value = ListRepositoriesResponse;
1887 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1888 formatter.write_str("struct ListRepositoriesResponse")
1889 }
1890 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1891 where
1892 A: serde::de::MapAccess<'de>,
1893 {
1894 #[allow(unused_imports)]
1895 use serde::de::Error;
1896 use std::option::Option::Some;
1897 let mut fields = std::collections::HashSet::new();
1898 let mut result = Self::Value::new();
1899 while let Some(tag) = map.next_key::<__FieldTag>()? {
1900 #[allow(clippy::match_single_binding)]
1901 match tag {
1902 __FieldTag::__repositories => {
1903 if !fields.insert(__FieldTag::__repositories) {
1904 return std::result::Result::Err(A::Error::duplicate_field(
1905 "multiple values for repositories",
1906 ));
1907 }
1908 result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.unwrap_or_default();
1909 }
1910 __FieldTag::__next_page_token => {
1911 if !fields.insert(__FieldTag::__next_page_token) {
1912 return std::result::Result::Err(A::Error::duplicate_field(
1913 "multiple values for next_page_token",
1914 ));
1915 }
1916 result.next_page_token = map
1917 .next_value::<std::option::Option<std::string::String>>()?
1918 .unwrap_or_default();
1919 }
1920 __FieldTag::__unreachable => {
1921 if !fields.insert(__FieldTag::__unreachable) {
1922 return std::result::Result::Err(A::Error::duplicate_field(
1923 "multiple values for unreachable",
1924 ));
1925 }
1926 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
1927 }
1928 __FieldTag::Unknown(key) => {
1929 let value = map.next_value::<serde_json::Value>()?;
1930 result._unknown_fields.insert(key, value);
1931 }
1932 }
1933 }
1934 std::result::Result::Ok(result)
1935 }
1936 }
1937 deserializer.deserialize_any(Visitor)
1938 }
1939}
1940
1941#[doc(hidden)]
1942impl serde::ser::Serialize for ListRepositoriesResponse {
1943 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1944 where
1945 S: serde::ser::Serializer,
1946 {
1947 use serde::ser::SerializeMap;
1948 #[allow(unused_imports)]
1949 use std::option::Option::Some;
1950 let mut state = serializer.serialize_map(std::option::Option::None)?;
1951 if !self.repositories.is_empty() {
1952 state.serialize_entry("repositories", &self.repositories)?;
1953 }
1954 if !self.next_page_token.is_empty() {
1955 state.serialize_entry("nextPageToken", &self.next_page_token)?;
1956 }
1957 if !self.unreachable.is_empty() {
1958 state.serialize_entry("unreachable", &self.unreachable)?;
1959 }
1960 if !self._unknown_fields.is_empty() {
1961 for (key, value) in self._unknown_fields.iter() {
1962 state.serialize_entry(key, &value)?;
1963 }
1964 }
1965 state.end()
1966 }
1967}
1968
1969#[derive(Clone, Debug, Default, PartialEq)]
1971#[non_exhaustive]
1972pub struct GetRepositoryRequest {
1973 pub name: std::string::String,
1975
1976 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1977}
1978
1979impl GetRepositoryRequest {
1980 pub fn new() -> Self {
1981 std::default::Default::default()
1982 }
1983
1984 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1986 self.name = v.into();
1987 self
1988 }
1989}
1990
1991impl wkt::message::Message for GetRepositoryRequest {
1992 fn typename() -> &'static str {
1993 "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
1994 }
1995}
1996
1997#[doc(hidden)]
1998impl<'de> serde::de::Deserialize<'de> for GetRepositoryRequest {
1999 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2000 where
2001 D: serde::Deserializer<'de>,
2002 {
2003 #[allow(non_camel_case_types)]
2004 #[doc(hidden)]
2005 #[derive(PartialEq, Eq, Hash)]
2006 enum __FieldTag {
2007 __name,
2008 Unknown(std::string::String),
2009 }
2010 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2011 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2012 where
2013 D: serde::Deserializer<'de>,
2014 {
2015 struct Visitor;
2016 impl<'de> serde::de::Visitor<'de> for Visitor {
2017 type Value = __FieldTag;
2018 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2019 formatter.write_str("a field name for GetRepositoryRequest")
2020 }
2021 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2022 where
2023 E: serde::de::Error,
2024 {
2025 use std::result::Result::Ok;
2026 use std::string::ToString;
2027 match value {
2028 "name" => Ok(__FieldTag::__name),
2029 _ => Ok(__FieldTag::Unknown(value.to_string())),
2030 }
2031 }
2032 }
2033 deserializer.deserialize_identifier(Visitor)
2034 }
2035 }
2036 struct Visitor;
2037 impl<'de> serde::de::Visitor<'de> for Visitor {
2038 type Value = GetRepositoryRequest;
2039 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2040 formatter.write_str("struct GetRepositoryRequest")
2041 }
2042 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2043 where
2044 A: serde::de::MapAccess<'de>,
2045 {
2046 #[allow(unused_imports)]
2047 use serde::de::Error;
2048 use std::option::Option::Some;
2049 let mut fields = std::collections::HashSet::new();
2050 let mut result = Self::Value::new();
2051 while let Some(tag) = map.next_key::<__FieldTag>()? {
2052 #[allow(clippy::match_single_binding)]
2053 match tag {
2054 __FieldTag::__name => {
2055 if !fields.insert(__FieldTag::__name) {
2056 return std::result::Result::Err(A::Error::duplicate_field(
2057 "multiple values for name",
2058 ));
2059 }
2060 result.name = map
2061 .next_value::<std::option::Option<std::string::String>>()?
2062 .unwrap_or_default();
2063 }
2064 __FieldTag::Unknown(key) => {
2065 let value = map.next_value::<serde_json::Value>()?;
2066 result._unknown_fields.insert(key, value);
2067 }
2068 }
2069 }
2070 std::result::Result::Ok(result)
2071 }
2072 }
2073 deserializer.deserialize_any(Visitor)
2074 }
2075}
2076
2077#[doc(hidden)]
2078impl serde::ser::Serialize for GetRepositoryRequest {
2079 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2080 where
2081 S: serde::ser::Serializer,
2082 {
2083 use serde::ser::SerializeMap;
2084 #[allow(unused_imports)]
2085 use std::option::Option::Some;
2086 let mut state = serializer.serialize_map(std::option::Option::None)?;
2087 if !self.name.is_empty() {
2088 state.serialize_entry("name", &self.name)?;
2089 }
2090 if !self._unknown_fields.is_empty() {
2091 for (key, value) in self._unknown_fields.iter() {
2092 state.serialize_entry(key, &value)?;
2093 }
2094 }
2095 state.end()
2096 }
2097}
2098
2099#[derive(Clone, Debug, Default, PartialEq)]
2101#[non_exhaustive]
2102pub struct CreateRepositoryRequest {
2103 pub parent: std::string::String,
2106
2107 pub repository: std::option::Option<crate::model::Repository>,
2109
2110 pub repository_id: std::string::String,
2113
2114 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2115}
2116
2117impl CreateRepositoryRequest {
2118 pub fn new() -> Self {
2119 std::default::Default::default()
2120 }
2121
2122 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2124 self.parent = v.into();
2125 self
2126 }
2127
2128 pub fn set_repository<T>(mut self, v: T) -> Self
2130 where
2131 T: std::convert::Into<crate::model::Repository>,
2132 {
2133 self.repository = std::option::Option::Some(v.into());
2134 self
2135 }
2136
2137 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
2139 where
2140 T: std::convert::Into<crate::model::Repository>,
2141 {
2142 self.repository = v.map(|x| x.into());
2143 self
2144 }
2145
2146 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2148 self.repository_id = v.into();
2149 self
2150 }
2151}
2152
2153impl wkt::message::Message for CreateRepositoryRequest {
2154 fn typename() -> &'static str {
2155 "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
2156 }
2157}
2158
2159#[doc(hidden)]
2160impl<'de> serde::de::Deserialize<'de> for CreateRepositoryRequest {
2161 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2162 where
2163 D: serde::Deserializer<'de>,
2164 {
2165 #[allow(non_camel_case_types)]
2166 #[doc(hidden)]
2167 #[derive(PartialEq, Eq, Hash)]
2168 enum __FieldTag {
2169 __parent,
2170 __repository,
2171 __repository_id,
2172 Unknown(std::string::String),
2173 }
2174 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2175 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2176 where
2177 D: serde::Deserializer<'de>,
2178 {
2179 struct Visitor;
2180 impl<'de> serde::de::Visitor<'de> for Visitor {
2181 type Value = __FieldTag;
2182 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2183 formatter.write_str("a field name for CreateRepositoryRequest")
2184 }
2185 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2186 where
2187 E: serde::de::Error,
2188 {
2189 use std::result::Result::Ok;
2190 use std::string::ToString;
2191 match value {
2192 "parent" => Ok(__FieldTag::__parent),
2193 "repository" => Ok(__FieldTag::__repository),
2194 "repositoryId" => Ok(__FieldTag::__repository_id),
2195 "repository_id" => Ok(__FieldTag::__repository_id),
2196 _ => Ok(__FieldTag::Unknown(value.to_string())),
2197 }
2198 }
2199 }
2200 deserializer.deserialize_identifier(Visitor)
2201 }
2202 }
2203 struct Visitor;
2204 impl<'de> serde::de::Visitor<'de> for Visitor {
2205 type Value = CreateRepositoryRequest;
2206 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2207 formatter.write_str("struct CreateRepositoryRequest")
2208 }
2209 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2210 where
2211 A: serde::de::MapAccess<'de>,
2212 {
2213 #[allow(unused_imports)]
2214 use serde::de::Error;
2215 use std::option::Option::Some;
2216 let mut fields = std::collections::HashSet::new();
2217 let mut result = Self::Value::new();
2218 while let Some(tag) = map.next_key::<__FieldTag>()? {
2219 #[allow(clippy::match_single_binding)]
2220 match tag {
2221 __FieldTag::__parent => {
2222 if !fields.insert(__FieldTag::__parent) {
2223 return std::result::Result::Err(A::Error::duplicate_field(
2224 "multiple values for parent",
2225 ));
2226 }
2227 result.parent = map
2228 .next_value::<std::option::Option<std::string::String>>()?
2229 .unwrap_or_default();
2230 }
2231 __FieldTag::__repository => {
2232 if !fields.insert(__FieldTag::__repository) {
2233 return std::result::Result::Err(A::Error::duplicate_field(
2234 "multiple values for repository",
2235 ));
2236 }
2237 result.repository =
2238 map.next_value::<std::option::Option<crate::model::Repository>>()?;
2239 }
2240 __FieldTag::__repository_id => {
2241 if !fields.insert(__FieldTag::__repository_id) {
2242 return std::result::Result::Err(A::Error::duplicate_field(
2243 "multiple values for repository_id",
2244 ));
2245 }
2246 result.repository_id = map
2247 .next_value::<std::option::Option<std::string::String>>()?
2248 .unwrap_or_default();
2249 }
2250 __FieldTag::Unknown(key) => {
2251 let value = map.next_value::<serde_json::Value>()?;
2252 result._unknown_fields.insert(key, value);
2253 }
2254 }
2255 }
2256 std::result::Result::Ok(result)
2257 }
2258 }
2259 deserializer.deserialize_any(Visitor)
2260 }
2261}
2262
2263#[doc(hidden)]
2264impl serde::ser::Serialize for CreateRepositoryRequest {
2265 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2266 where
2267 S: serde::ser::Serializer,
2268 {
2269 use serde::ser::SerializeMap;
2270 #[allow(unused_imports)]
2271 use std::option::Option::Some;
2272 let mut state = serializer.serialize_map(std::option::Option::None)?;
2273 if !self.parent.is_empty() {
2274 state.serialize_entry("parent", &self.parent)?;
2275 }
2276 if self.repository.is_some() {
2277 state.serialize_entry("repository", &self.repository)?;
2278 }
2279 if !self.repository_id.is_empty() {
2280 state.serialize_entry("repositoryId", &self.repository_id)?;
2281 }
2282 if !self._unknown_fields.is_empty() {
2283 for (key, value) in self._unknown_fields.iter() {
2284 state.serialize_entry(key, &value)?;
2285 }
2286 }
2287 state.end()
2288 }
2289}
2290
2291#[derive(Clone, Debug, Default, PartialEq)]
2293#[non_exhaustive]
2294pub struct UpdateRepositoryRequest {
2295 pub update_mask: std::option::Option<wkt::FieldMask>,
2298
2299 pub repository: std::option::Option<crate::model::Repository>,
2301
2302 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2303}
2304
2305impl UpdateRepositoryRequest {
2306 pub fn new() -> Self {
2307 std::default::Default::default()
2308 }
2309
2310 pub fn set_update_mask<T>(mut self, v: T) -> Self
2312 where
2313 T: std::convert::Into<wkt::FieldMask>,
2314 {
2315 self.update_mask = std::option::Option::Some(v.into());
2316 self
2317 }
2318
2319 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2321 where
2322 T: std::convert::Into<wkt::FieldMask>,
2323 {
2324 self.update_mask = v.map(|x| x.into());
2325 self
2326 }
2327
2328 pub fn set_repository<T>(mut self, v: T) -> Self
2330 where
2331 T: std::convert::Into<crate::model::Repository>,
2332 {
2333 self.repository = std::option::Option::Some(v.into());
2334 self
2335 }
2336
2337 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
2339 where
2340 T: std::convert::Into<crate::model::Repository>,
2341 {
2342 self.repository = v.map(|x| x.into());
2343 self
2344 }
2345}
2346
2347impl wkt::message::Message for UpdateRepositoryRequest {
2348 fn typename() -> &'static str {
2349 "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
2350 }
2351}
2352
2353#[doc(hidden)]
2354impl<'de> serde::de::Deserialize<'de> for UpdateRepositoryRequest {
2355 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2356 where
2357 D: serde::Deserializer<'de>,
2358 {
2359 #[allow(non_camel_case_types)]
2360 #[doc(hidden)]
2361 #[derive(PartialEq, Eq, Hash)]
2362 enum __FieldTag {
2363 __update_mask,
2364 __repository,
2365 Unknown(std::string::String),
2366 }
2367 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2368 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2369 where
2370 D: serde::Deserializer<'de>,
2371 {
2372 struct Visitor;
2373 impl<'de> serde::de::Visitor<'de> for Visitor {
2374 type Value = __FieldTag;
2375 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2376 formatter.write_str("a field name for UpdateRepositoryRequest")
2377 }
2378 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2379 where
2380 E: serde::de::Error,
2381 {
2382 use std::result::Result::Ok;
2383 use std::string::ToString;
2384 match value {
2385 "updateMask" => Ok(__FieldTag::__update_mask),
2386 "update_mask" => Ok(__FieldTag::__update_mask),
2387 "repository" => Ok(__FieldTag::__repository),
2388 _ => Ok(__FieldTag::Unknown(value.to_string())),
2389 }
2390 }
2391 }
2392 deserializer.deserialize_identifier(Visitor)
2393 }
2394 }
2395 struct Visitor;
2396 impl<'de> serde::de::Visitor<'de> for Visitor {
2397 type Value = UpdateRepositoryRequest;
2398 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2399 formatter.write_str("struct UpdateRepositoryRequest")
2400 }
2401 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2402 where
2403 A: serde::de::MapAccess<'de>,
2404 {
2405 #[allow(unused_imports)]
2406 use serde::de::Error;
2407 use std::option::Option::Some;
2408 let mut fields = std::collections::HashSet::new();
2409 let mut result = Self::Value::new();
2410 while let Some(tag) = map.next_key::<__FieldTag>()? {
2411 #[allow(clippy::match_single_binding)]
2412 match tag {
2413 __FieldTag::__update_mask => {
2414 if !fields.insert(__FieldTag::__update_mask) {
2415 return std::result::Result::Err(A::Error::duplicate_field(
2416 "multiple values for update_mask",
2417 ));
2418 }
2419 result.update_mask =
2420 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
2421 }
2422 __FieldTag::__repository => {
2423 if !fields.insert(__FieldTag::__repository) {
2424 return std::result::Result::Err(A::Error::duplicate_field(
2425 "multiple values for repository",
2426 ));
2427 }
2428 result.repository =
2429 map.next_value::<std::option::Option<crate::model::Repository>>()?;
2430 }
2431 __FieldTag::Unknown(key) => {
2432 let value = map.next_value::<serde_json::Value>()?;
2433 result._unknown_fields.insert(key, value);
2434 }
2435 }
2436 }
2437 std::result::Result::Ok(result)
2438 }
2439 }
2440 deserializer.deserialize_any(Visitor)
2441 }
2442}
2443
2444#[doc(hidden)]
2445impl serde::ser::Serialize for UpdateRepositoryRequest {
2446 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2447 where
2448 S: serde::ser::Serializer,
2449 {
2450 use serde::ser::SerializeMap;
2451 #[allow(unused_imports)]
2452 use std::option::Option::Some;
2453 let mut state = serializer.serialize_map(std::option::Option::None)?;
2454 if self.update_mask.is_some() {
2455 state.serialize_entry("updateMask", &self.update_mask)?;
2456 }
2457 if self.repository.is_some() {
2458 state.serialize_entry("repository", &self.repository)?;
2459 }
2460 if !self._unknown_fields.is_empty() {
2461 for (key, value) in self._unknown_fields.iter() {
2462 state.serialize_entry(key, &value)?;
2463 }
2464 }
2465 state.end()
2466 }
2467}
2468
2469#[derive(Clone, Debug, Default, PartialEq)]
2471#[non_exhaustive]
2472pub struct DeleteRepositoryRequest {
2473 pub name: std::string::String,
2475
2476 pub force: bool,
2480
2481 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2482}
2483
2484impl DeleteRepositoryRequest {
2485 pub fn new() -> Self {
2486 std::default::Default::default()
2487 }
2488
2489 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2491 self.name = v.into();
2492 self
2493 }
2494
2495 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2497 self.force = v.into();
2498 self
2499 }
2500}
2501
2502impl wkt::message::Message for DeleteRepositoryRequest {
2503 fn typename() -> &'static str {
2504 "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
2505 }
2506}
2507
2508#[doc(hidden)]
2509impl<'de> serde::de::Deserialize<'de> for DeleteRepositoryRequest {
2510 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2511 where
2512 D: serde::Deserializer<'de>,
2513 {
2514 #[allow(non_camel_case_types)]
2515 #[doc(hidden)]
2516 #[derive(PartialEq, Eq, Hash)]
2517 enum __FieldTag {
2518 __name,
2519 __force,
2520 Unknown(std::string::String),
2521 }
2522 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2523 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2524 where
2525 D: serde::Deserializer<'de>,
2526 {
2527 struct Visitor;
2528 impl<'de> serde::de::Visitor<'de> for Visitor {
2529 type Value = __FieldTag;
2530 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2531 formatter.write_str("a field name for DeleteRepositoryRequest")
2532 }
2533 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2534 where
2535 E: serde::de::Error,
2536 {
2537 use std::result::Result::Ok;
2538 use std::string::ToString;
2539 match value {
2540 "name" => Ok(__FieldTag::__name),
2541 "force" => Ok(__FieldTag::__force),
2542 _ => Ok(__FieldTag::Unknown(value.to_string())),
2543 }
2544 }
2545 }
2546 deserializer.deserialize_identifier(Visitor)
2547 }
2548 }
2549 struct Visitor;
2550 impl<'de> serde::de::Visitor<'de> for Visitor {
2551 type Value = DeleteRepositoryRequest;
2552 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2553 formatter.write_str("struct DeleteRepositoryRequest")
2554 }
2555 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2556 where
2557 A: serde::de::MapAccess<'de>,
2558 {
2559 #[allow(unused_imports)]
2560 use serde::de::Error;
2561 use std::option::Option::Some;
2562 let mut fields = std::collections::HashSet::new();
2563 let mut result = Self::Value::new();
2564 while let Some(tag) = map.next_key::<__FieldTag>()? {
2565 #[allow(clippy::match_single_binding)]
2566 match tag {
2567 __FieldTag::__name => {
2568 if !fields.insert(__FieldTag::__name) {
2569 return std::result::Result::Err(A::Error::duplicate_field(
2570 "multiple values for name",
2571 ));
2572 }
2573 result.name = map
2574 .next_value::<std::option::Option<std::string::String>>()?
2575 .unwrap_or_default();
2576 }
2577 __FieldTag::__force => {
2578 if !fields.insert(__FieldTag::__force) {
2579 return std::result::Result::Err(A::Error::duplicate_field(
2580 "multiple values for force",
2581 ));
2582 }
2583 result.force = map
2584 .next_value::<std::option::Option<bool>>()?
2585 .unwrap_or_default();
2586 }
2587 __FieldTag::Unknown(key) => {
2588 let value = map.next_value::<serde_json::Value>()?;
2589 result._unknown_fields.insert(key, value);
2590 }
2591 }
2592 }
2593 std::result::Result::Ok(result)
2594 }
2595 }
2596 deserializer.deserialize_any(Visitor)
2597 }
2598}
2599
2600#[doc(hidden)]
2601impl serde::ser::Serialize for DeleteRepositoryRequest {
2602 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2603 where
2604 S: serde::ser::Serializer,
2605 {
2606 use serde::ser::SerializeMap;
2607 #[allow(unused_imports)]
2608 use std::option::Option::Some;
2609 let mut state = serializer.serialize_map(std::option::Option::None)?;
2610 if !self.name.is_empty() {
2611 state.serialize_entry("name", &self.name)?;
2612 }
2613 if !wkt::internal::is_default(&self.force) {
2614 state.serialize_entry("force", &self.force)?;
2615 }
2616 if !self._unknown_fields.is_empty() {
2617 for (key, value) in self._unknown_fields.iter() {
2618 state.serialize_entry(key, &value)?;
2619 }
2620 }
2621 state.end()
2622 }
2623}
2624
2625#[derive(Clone, Debug, Default, PartialEq)]
2627#[non_exhaustive]
2628pub struct CommitRepositoryChangesRequest {
2629 pub name: std::string::String,
2631
2632 pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
2634
2635 pub required_head_commit_sha: std::string::String,
2639
2640 pub file_operations: std::collections::HashMap<
2643 std::string::String,
2644 crate::model::commit_repository_changes_request::FileOperation,
2645 >,
2646
2647 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2648}
2649
2650impl CommitRepositoryChangesRequest {
2651 pub fn new() -> Self {
2652 std::default::Default::default()
2653 }
2654
2655 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2657 self.name = v.into();
2658 self
2659 }
2660
2661 pub fn set_commit_metadata<T>(mut self, v: T) -> Self
2663 where
2664 T: std::convert::Into<crate::model::CommitMetadata>,
2665 {
2666 self.commit_metadata = std::option::Option::Some(v.into());
2667 self
2668 }
2669
2670 pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2672 where
2673 T: std::convert::Into<crate::model::CommitMetadata>,
2674 {
2675 self.commit_metadata = v.map(|x| x.into());
2676 self
2677 }
2678
2679 pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
2681 mut self,
2682 v: T,
2683 ) -> Self {
2684 self.required_head_commit_sha = v.into();
2685 self
2686 }
2687
2688 pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
2690 where
2691 T: std::iter::IntoIterator<Item = (K, V)>,
2692 K: std::convert::Into<std::string::String>,
2693 V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
2694 {
2695 use std::iter::Iterator;
2696 self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2697 self
2698 }
2699}
2700
2701impl wkt::message::Message for CommitRepositoryChangesRequest {
2702 fn typename() -> &'static str {
2703 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
2704 }
2705}
2706
2707#[doc(hidden)]
2708impl<'de> serde::de::Deserialize<'de> for CommitRepositoryChangesRequest {
2709 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2710 where
2711 D: serde::Deserializer<'de>,
2712 {
2713 #[allow(non_camel_case_types)]
2714 #[doc(hidden)]
2715 #[derive(PartialEq, Eq, Hash)]
2716 enum __FieldTag {
2717 __name,
2718 __commit_metadata,
2719 __required_head_commit_sha,
2720 __file_operations,
2721 Unknown(std::string::String),
2722 }
2723 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2724 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2725 where
2726 D: serde::Deserializer<'de>,
2727 {
2728 struct Visitor;
2729 impl<'de> serde::de::Visitor<'de> for Visitor {
2730 type Value = __FieldTag;
2731 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2732 formatter.write_str("a field name for CommitRepositoryChangesRequest")
2733 }
2734 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2735 where
2736 E: serde::de::Error,
2737 {
2738 use std::result::Result::Ok;
2739 use std::string::ToString;
2740 match value {
2741 "name" => Ok(__FieldTag::__name),
2742 "commitMetadata" => Ok(__FieldTag::__commit_metadata),
2743 "commit_metadata" => Ok(__FieldTag::__commit_metadata),
2744 "requiredHeadCommitSha" => Ok(__FieldTag::__required_head_commit_sha),
2745 "required_head_commit_sha" => {
2746 Ok(__FieldTag::__required_head_commit_sha)
2747 }
2748 "fileOperations" => Ok(__FieldTag::__file_operations),
2749 "file_operations" => Ok(__FieldTag::__file_operations),
2750 _ => Ok(__FieldTag::Unknown(value.to_string())),
2751 }
2752 }
2753 }
2754 deserializer.deserialize_identifier(Visitor)
2755 }
2756 }
2757 struct Visitor;
2758 impl<'de> serde::de::Visitor<'de> for Visitor {
2759 type Value = CommitRepositoryChangesRequest;
2760 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2761 formatter.write_str("struct CommitRepositoryChangesRequest")
2762 }
2763 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2764 where
2765 A: serde::de::MapAccess<'de>,
2766 {
2767 #[allow(unused_imports)]
2768 use serde::de::Error;
2769 use std::option::Option::Some;
2770 let mut fields = std::collections::HashSet::new();
2771 let mut result = Self::Value::new();
2772 while let Some(tag) = map.next_key::<__FieldTag>()? {
2773 #[allow(clippy::match_single_binding)]
2774 match tag {
2775 __FieldTag::__name => {
2776 if !fields.insert(__FieldTag::__name) {
2777 return std::result::Result::Err(A::Error::duplicate_field(
2778 "multiple values for name",
2779 ));
2780 }
2781 result.name = map
2782 .next_value::<std::option::Option<std::string::String>>()?
2783 .unwrap_or_default();
2784 }
2785 __FieldTag::__commit_metadata => {
2786 if !fields.insert(__FieldTag::__commit_metadata) {
2787 return std::result::Result::Err(A::Error::duplicate_field(
2788 "multiple values for commit_metadata",
2789 ));
2790 }
2791 result.commit_metadata = map
2792 .next_value::<std::option::Option<crate::model::CommitMetadata>>(
2793 )?;
2794 }
2795 __FieldTag::__required_head_commit_sha => {
2796 if !fields.insert(__FieldTag::__required_head_commit_sha) {
2797 return std::result::Result::Err(A::Error::duplicate_field(
2798 "multiple values for required_head_commit_sha",
2799 ));
2800 }
2801 result.required_head_commit_sha = map
2802 .next_value::<std::option::Option<std::string::String>>()?
2803 .unwrap_or_default();
2804 }
2805 __FieldTag::__file_operations => {
2806 if !fields.insert(__FieldTag::__file_operations) {
2807 return std::result::Result::Err(A::Error::duplicate_field(
2808 "multiple values for file_operations",
2809 ));
2810 }
2811 result.file_operations = map.next_value::<std::option::Option<std::collections::HashMap<std::string::String,crate::model::commit_repository_changes_request::FileOperation>>>()?.unwrap_or_default();
2812 }
2813 __FieldTag::Unknown(key) => {
2814 let value = map.next_value::<serde_json::Value>()?;
2815 result._unknown_fields.insert(key, value);
2816 }
2817 }
2818 }
2819 std::result::Result::Ok(result)
2820 }
2821 }
2822 deserializer.deserialize_any(Visitor)
2823 }
2824}
2825
2826#[doc(hidden)]
2827impl serde::ser::Serialize for CommitRepositoryChangesRequest {
2828 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2829 where
2830 S: serde::ser::Serializer,
2831 {
2832 use serde::ser::SerializeMap;
2833 #[allow(unused_imports)]
2834 use std::option::Option::Some;
2835 let mut state = serializer.serialize_map(std::option::Option::None)?;
2836 if !self.name.is_empty() {
2837 state.serialize_entry("name", &self.name)?;
2838 }
2839 if self.commit_metadata.is_some() {
2840 state.serialize_entry("commitMetadata", &self.commit_metadata)?;
2841 }
2842 if !self.required_head_commit_sha.is_empty() {
2843 state.serialize_entry("requiredHeadCommitSha", &self.required_head_commit_sha)?;
2844 }
2845 if !self.file_operations.is_empty() {
2846 state.serialize_entry("fileOperations", &self.file_operations)?;
2847 }
2848 if !self._unknown_fields.is_empty() {
2849 for (key, value) in self._unknown_fields.iter() {
2850 state.serialize_entry(key, &value)?;
2851 }
2852 }
2853 state.end()
2854 }
2855}
2856
2857pub mod commit_repository_changes_request {
2859 #[allow(unused_imports)]
2860 use super::*;
2861
2862 #[derive(Clone, Debug, Default, PartialEq)]
2864 #[non_exhaustive]
2865 pub struct FileOperation {
2866 pub operation: std::option::Option<
2868 crate::model::commit_repository_changes_request::file_operation::Operation,
2869 >,
2870
2871 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2872 }
2873
2874 impl FileOperation {
2875 pub fn new() -> Self {
2876 std::default::Default::default()
2877 }
2878
2879 pub fn set_operation<
2884 T: std::convert::Into<
2885 std::option::Option<
2886 crate::model::commit_repository_changes_request::file_operation::Operation,
2887 >,
2888 >,
2889 >(
2890 mut self,
2891 v: T,
2892 ) -> Self {
2893 self.operation = v.into();
2894 self
2895 }
2896
2897 pub fn write_file(
2901 &self,
2902 ) -> std::option::Option<
2903 &std::boxed::Box<
2904 crate::model::commit_repository_changes_request::file_operation::WriteFile,
2905 >,
2906 > {
2907 #[allow(unreachable_patterns)]
2908 self.operation.as_ref().and_then(|v| match v {
2909 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
2910 _ => std::option::Option::None,
2911 })
2912 }
2913
2914 pub fn set_write_file<
2920 T: std::convert::Into<
2921 std::boxed::Box<
2922 crate::model::commit_repository_changes_request::file_operation::WriteFile,
2923 >,
2924 >,
2925 >(
2926 mut self,
2927 v: T,
2928 ) -> Self {
2929 self.operation = std::option::Option::Some(
2930 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
2931 v.into()
2932 )
2933 );
2934 self
2935 }
2936
2937 pub fn delete_file(
2941 &self,
2942 ) -> std::option::Option<
2943 &std::boxed::Box<
2944 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
2945 >,
2946 > {
2947 #[allow(unreachable_patterns)]
2948 self.operation.as_ref().and_then(|v| match v {
2949 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
2950 _ => std::option::Option::None,
2951 })
2952 }
2953
2954 pub fn set_delete_file<
2960 T: std::convert::Into<
2961 std::boxed::Box<
2962 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
2963 >,
2964 >,
2965 >(
2966 mut self,
2967 v: T,
2968 ) -> Self {
2969 self.operation = std::option::Option::Some(
2970 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
2971 v.into()
2972 )
2973 );
2974 self
2975 }
2976 }
2977
2978 impl wkt::message::Message for FileOperation {
2979 fn typename() -> &'static str {
2980 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
2981 }
2982 }
2983
2984 #[doc(hidden)]
2985 impl<'de> serde::de::Deserialize<'de> for FileOperation {
2986 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2987 where
2988 D: serde::Deserializer<'de>,
2989 {
2990 #[allow(non_camel_case_types)]
2991 #[doc(hidden)]
2992 #[derive(PartialEq, Eq, Hash)]
2993 enum __FieldTag {
2994 __write_file,
2995 __delete_file,
2996 Unknown(std::string::String),
2997 }
2998 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2999 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3000 where
3001 D: serde::Deserializer<'de>,
3002 {
3003 struct Visitor;
3004 impl<'de> serde::de::Visitor<'de> for Visitor {
3005 type Value = __FieldTag;
3006 fn expecting(
3007 &self,
3008 formatter: &mut std::fmt::Formatter,
3009 ) -> std::fmt::Result {
3010 formatter.write_str("a field name for FileOperation")
3011 }
3012 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3013 where
3014 E: serde::de::Error,
3015 {
3016 use std::result::Result::Ok;
3017 use std::string::ToString;
3018 match value {
3019 "writeFile" => Ok(__FieldTag::__write_file),
3020 "write_file" => Ok(__FieldTag::__write_file),
3021 "deleteFile" => Ok(__FieldTag::__delete_file),
3022 "delete_file" => Ok(__FieldTag::__delete_file),
3023 _ => Ok(__FieldTag::Unknown(value.to_string())),
3024 }
3025 }
3026 }
3027 deserializer.deserialize_identifier(Visitor)
3028 }
3029 }
3030 struct Visitor;
3031 impl<'de> serde::de::Visitor<'de> for Visitor {
3032 type Value = FileOperation;
3033 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3034 formatter.write_str("struct FileOperation")
3035 }
3036 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3037 where
3038 A: serde::de::MapAccess<'de>,
3039 {
3040 #[allow(unused_imports)]
3041 use serde::de::Error;
3042 use std::option::Option::Some;
3043 let mut fields = std::collections::HashSet::new();
3044 let mut result = Self::Value::new();
3045 while let Some(tag) = map.next_key::<__FieldTag>()? {
3046 #[allow(clippy::match_single_binding)]
3047 match tag {
3048 __FieldTag::__write_file => {
3049 if !fields.insert(__FieldTag::__write_file) {
3050 return std::result::Result::Err(A::Error::duplicate_field(
3051 "multiple values for write_file",
3052 ));
3053 }
3054 if result.operation.is_some() {
3055 return std::result::Result::Err(A::Error::duplicate_field(
3056 "multiple values for `operation`, a oneof with full ID .google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.write_file, latest field was writeFile",
3057 ));
3058 }
3059 result.operation = std::option::Option::Some(
3060 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
3061 map.next_value::<std::option::Option<std::boxed::Box<crate::model::commit_repository_changes_request::file_operation::WriteFile>>>()?.unwrap_or_default()
3062 ),
3063 );
3064 }
3065 __FieldTag::__delete_file => {
3066 if !fields.insert(__FieldTag::__delete_file) {
3067 return std::result::Result::Err(A::Error::duplicate_field(
3068 "multiple values for delete_file",
3069 ));
3070 }
3071 if result.operation.is_some() {
3072 return std::result::Result::Err(A::Error::duplicate_field(
3073 "multiple values for `operation`, a oneof with full ID .google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.delete_file, latest field was deleteFile",
3074 ));
3075 }
3076 result.operation = std::option::Option::Some(
3077 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
3078 map.next_value::<std::option::Option<std::boxed::Box<crate::model::commit_repository_changes_request::file_operation::DeleteFile>>>()?.unwrap_or_default()
3079 ),
3080 );
3081 }
3082 __FieldTag::Unknown(key) => {
3083 let value = map.next_value::<serde_json::Value>()?;
3084 result._unknown_fields.insert(key, value);
3085 }
3086 }
3087 }
3088 std::result::Result::Ok(result)
3089 }
3090 }
3091 deserializer.deserialize_any(Visitor)
3092 }
3093 }
3094
3095 #[doc(hidden)]
3096 impl serde::ser::Serialize for FileOperation {
3097 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3098 where
3099 S: serde::ser::Serializer,
3100 {
3101 use serde::ser::SerializeMap;
3102 #[allow(unused_imports)]
3103 use std::option::Option::Some;
3104 let mut state = serializer.serialize_map(std::option::Option::None)?;
3105 if let Some(value) = self.write_file() {
3106 state.serialize_entry("writeFile", value)?;
3107 }
3108 if let Some(value) = self.delete_file() {
3109 state.serialize_entry("deleteFile", value)?;
3110 }
3111 if !self._unknown_fields.is_empty() {
3112 for (key, value) in self._unknown_fields.iter() {
3113 state.serialize_entry(key, &value)?;
3114 }
3115 }
3116 state.end()
3117 }
3118 }
3119
3120 pub mod file_operation {
3122 #[allow(unused_imports)]
3123 use super::*;
3124
3125 #[derive(Clone, Debug, Default, PartialEq)]
3127 #[non_exhaustive]
3128 pub struct WriteFile {
3129 pub contents: ::bytes::Bytes,
3131
3132 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3133 }
3134
3135 impl WriteFile {
3136 pub fn new() -> Self {
3137 std::default::Default::default()
3138 }
3139
3140 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3142 self.contents = v.into();
3143 self
3144 }
3145 }
3146
3147 impl wkt::message::Message for WriteFile {
3148 fn typename() -> &'static str {
3149 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
3150 }
3151 }
3152
3153 #[doc(hidden)]
3154 impl<'de> serde::de::Deserialize<'de> for WriteFile {
3155 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3156 where
3157 D: serde::Deserializer<'de>,
3158 {
3159 #[allow(non_camel_case_types)]
3160 #[doc(hidden)]
3161 #[derive(PartialEq, Eq, Hash)]
3162 enum __FieldTag {
3163 __contents,
3164 Unknown(std::string::String),
3165 }
3166 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3167 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3168 where
3169 D: serde::Deserializer<'de>,
3170 {
3171 struct Visitor;
3172 impl<'de> serde::de::Visitor<'de> for Visitor {
3173 type Value = __FieldTag;
3174 fn expecting(
3175 &self,
3176 formatter: &mut std::fmt::Formatter,
3177 ) -> std::fmt::Result {
3178 formatter.write_str("a field name for WriteFile")
3179 }
3180 fn visit_str<E>(
3181 self,
3182 value: &str,
3183 ) -> std::result::Result<Self::Value, E>
3184 where
3185 E: serde::de::Error,
3186 {
3187 use std::result::Result::Ok;
3188 use std::string::ToString;
3189 match value {
3190 "contents" => Ok(__FieldTag::__contents),
3191 _ => Ok(__FieldTag::Unknown(value.to_string())),
3192 }
3193 }
3194 }
3195 deserializer.deserialize_identifier(Visitor)
3196 }
3197 }
3198 struct Visitor;
3199 impl<'de> serde::de::Visitor<'de> for Visitor {
3200 type Value = WriteFile;
3201 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3202 formatter.write_str("struct WriteFile")
3203 }
3204 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3205 where
3206 A: serde::de::MapAccess<'de>,
3207 {
3208 #[allow(unused_imports)]
3209 use serde::de::Error;
3210 use std::option::Option::Some;
3211 let mut fields = std::collections::HashSet::new();
3212 let mut result = Self::Value::new();
3213 while let Some(tag) = map.next_key::<__FieldTag>()? {
3214 #[allow(clippy::match_single_binding)]
3215 match tag {
3216 __FieldTag::__contents => {
3217 if !fields.insert(__FieldTag::__contents) {
3218 return std::result::Result::Err(
3219 A::Error::duplicate_field(
3220 "multiple values for contents",
3221 ),
3222 );
3223 }
3224 struct __With(std::option::Option<::bytes::Bytes>);
3225 impl<'de> serde::de::Deserialize<'de> for __With {
3226 fn deserialize<D>(
3227 deserializer: D,
3228 ) -> std::result::Result<Self, D::Error>
3229 where
3230 D: serde::de::Deserializer<'de>,
3231 {
3232 serde_with::As::<
3233 std::option::Option<serde_with::base64::Base64>,
3234 >::deserialize(
3235 deserializer
3236 )
3237 .map(__With)
3238 }
3239 }
3240 result.contents =
3241 map.next_value::<__With>()?.0.unwrap_or_default();
3242 }
3243 __FieldTag::Unknown(key) => {
3244 let value = map.next_value::<serde_json::Value>()?;
3245 result._unknown_fields.insert(key, value);
3246 }
3247 }
3248 }
3249 std::result::Result::Ok(result)
3250 }
3251 }
3252 deserializer.deserialize_any(Visitor)
3253 }
3254 }
3255
3256 #[doc(hidden)]
3257 impl serde::ser::Serialize for WriteFile {
3258 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3259 where
3260 S: serde::ser::Serializer,
3261 {
3262 use serde::ser::SerializeMap;
3263 #[allow(unused_imports)]
3264 use std::option::Option::Some;
3265 let mut state = serializer.serialize_map(std::option::Option::None)?;
3266 if !self.contents.is_empty() {
3267 struct __With<'a>(&'a ::bytes::Bytes);
3268 impl<'a> serde::ser::Serialize for __With<'a> {
3269 fn serialize<S>(
3270 &self,
3271 serializer: S,
3272 ) -> std::result::Result<S::Ok, S::Error>
3273 where
3274 S: serde::ser::Serializer,
3275 {
3276 serde_with::As::<serde_with::base64::Base64>::serialize(
3277 self.0, serializer,
3278 )
3279 }
3280 }
3281 state.serialize_entry("contents", &__With(&self.contents))?;
3282 }
3283 if !self._unknown_fields.is_empty() {
3284 for (key, value) in self._unknown_fields.iter() {
3285 state.serialize_entry(key, &value)?;
3286 }
3287 }
3288 state.end()
3289 }
3290 }
3291
3292 #[derive(Clone, Debug, Default, PartialEq)]
3294 #[non_exhaustive]
3295 pub struct DeleteFile {
3296 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3297 }
3298
3299 impl DeleteFile {
3300 pub fn new() -> Self {
3301 std::default::Default::default()
3302 }
3303 }
3304
3305 impl wkt::message::Message for DeleteFile {
3306 fn typename() -> &'static str {
3307 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
3308 }
3309 }
3310
3311 #[doc(hidden)]
3312 impl<'de> serde::de::Deserialize<'de> for DeleteFile {
3313 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3314 where
3315 D: serde::Deserializer<'de>,
3316 {
3317 #[allow(non_camel_case_types)]
3318 #[doc(hidden)]
3319 #[derive(PartialEq, Eq, Hash)]
3320 enum __FieldTag {
3321 Unknown(std::string::String),
3322 }
3323 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3324 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3325 where
3326 D: serde::Deserializer<'de>,
3327 {
3328 struct Visitor;
3329 impl<'de> serde::de::Visitor<'de> for Visitor {
3330 type Value = __FieldTag;
3331 fn expecting(
3332 &self,
3333 formatter: &mut std::fmt::Formatter,
3334 ) -> std::fmt::Result {
3335 formatter.write_str("a field name for DeleteFile")
3336 }
3337 fn visit_str<E>(
3338 self,
3339 value: &str,
3340 ) -> std::result::Result<Self::Value, E>
3341 where
3342 E: serde::de::Error,
3343 {
3344 use std::result::Result::Ok;
3345 use std::string::ToString;
3346 Ok(__FieldTag::Unknown(value.to_string()))
3347 }
3348 }
3349 deserializer.deserialize_identifier(Visitor)
3350 }
3351 }
3352 struct Visitor;
3353 impl<'de> serde::de::Visitor<'de> for Visitor {
3354 type Value = DeleteFile;
3355 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3356 formatter.write_str("struct DeleteFile")
3357 }
3358 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3359 where
3360 A: serde::de::MapAccess<'de>,
3361 {
3362 #[allow(unused_imports)]
3363 use serde::de::Error;
3364 use std::option::Option::Some;
3365 let mut result = Self::Value::new();
3366 while let Some(tag) = map.next_key::<__FieldTag>()? {
3367 #[allow(clippy::match_single_binding)]
3368 match tag {
3369 __FieldTag::Unknown(key) => {
3370 let value = map.next_value::<serde_json::Value>()?;
3371 result._unknown_fields.insert(key, value);
3372 }
3373 }
3374 }
3375 std::result::Result::Ok(result)
3376 }
3377 }
3378 deserializer.deserialize_any(Visitor)
3379 }
3380 }
3381
3382 #[doc(hidden)]
3383 impl serde::ser::Serialize for DeleteFile {
3384 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3385 where
3386 S: serde::ser::Serializer,
3387 {
3388 use serde::ser::SerializeMap;
3389 #[allow(unused_imports)]
3390 use std::option::Option::Some;
3391 let mut state = serializer.serialize_map(std::option::Option::None)?;
3392 if !self._unknown_fields.is_empty() {
3393 for (key, value) in self._unknown_fields.iter() {
3394 state.serialize_entry(key, &value)?;
3395 }
3396 }
3397 state.end()
3398 }
3399 }
3400
3401 #[derive(Clone, Debug, PartialEq)]
3403 #[non_exhaustive]
3404 pub enum Operation {
3405 WriteFile(
3407 std::boxed::Box<
3408 crate::model::commit_repository_changes_request::file_operation::WriteFile,
3409 >,
3410 ),
3411 DeleteFile(
3413 std::boxed::Box<
3414 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
3415 >,
3416 ),
3417 }
3418 }
3419}
3420
3421#[derive(Clone, Debug, Default, PartialEq)]
3423#[non_exhaustive]
3424pub struct CommitRepositoryChangesResponse {
3425 pub commit_sha: std::string::String,
3427
3428 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3429}
3430
3431impl CommitRepositoryChangesResponse {
3432 pub fn new() -> Self {
3433 std::default::Default::default()
3434 }
3435
3436 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3438 self.commit_sha = v.into();
3439 self
3440 }
3441}
3442
3443impl wkt::message::Message for CommitRepositoryChangesResponse {
3444 fn typename() -> &'static str {
3445 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
3446 }
3447}
3448
3449#[doc(hidden)]
3450impl<'de> serde::de::Deserialize<'de> for CommitRepositoryChangesResponse {
3451 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3452 where
3453 D: serde::Deserializer<'de>,
3454 {
3455 #[allow(non_camel_case_types)]
3456 #[doc(hidden)]
3457 #[derive(PartialEq, Eq, Hash)]
3458 enum __FieldTag {
3459 __commit_sha,
3460 Unknown(std::string::String),
3461 }
3462 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3463 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3464 where
3465 D: serde::Deserializer<'de>,
3466 {
3467 struct Visitor;
3468 impl<'de> serde::de::Visitor<'de> for Visitor {
3469 type Value = __FieldTag;
3470 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3471 formatter.write_str("a field name for CommitRepositoryChangesResponse")
3472 }
3473 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3474 where
3475 E: serde::de::Error,
3476 {
3477 use std::result::Result::Ok;
3478 use std::string::ToString;
3479 match value {
3480 "commitSha" => Ok(__FieldTag::__commit_sha),
3481 "commit_sha" => Ok(__FieldTag::__commit_sha),
3482 _ => Ok(__FieldTag::Unknown(value.to_string())),
3483 }
3484 }
3485 }
3486 deserializer.deserialize_identifier(Visitor)
3487 }
3488 }
3489 struct Visitor;
3490 impl<'de> serde::de::Visitor<'de> for Visitor {
3491 type Value = CommitRepositoryChangesResponse;
3492 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3493 formatter.write_str("struct CommitRepositoryChangesResponse")
3494 }
3495 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3496 where
3497 A: serde::de::MapAccess<'de>,
3498 {
3499 #[allow(unused_imports)]
3500 use serde::de::Error;
3501 use std::option::Option::Some;
3502 let mut fields = std::collections::HashSet::new();
3503 let mut result = Self::Value::new();
3504 while let Some(tag) = map.next_key::<__FieldTag>()? {
3505 #[allow(clippy::match_single_binding)]
3506 match tag {
3507 __FieldTag::__commit_sha => {
3508 if !fields.insert(__FieldTag::__commit_sha) {
3509 return std::result::Result::Err(A::Error::duplicate_field(
3510 "multiple values for commit_sha",
3511 ));
3512 }
3513 result.commit_sha = map
3514 .next_value::<std::option::Option<std::string::String>>()?
3515 .unwrap_or_default();
3516 }
3517 __FieldTag::Unknown(key) => {
3518 let value = map.next_value::<serde_json::Value>()?;
3519 result._unknown_fields.insert(key, value);
3520 }
3521 }
3522 }
3523 std::result::Result::Ok(result)
3524 }
3525 }
3526 deserializer.deserialize_any(Visitor)
3527 }
3528}
3529
3530#[doc(hidden)]
3531impl serde::ser::Serialize for CommitRepositoryChangesResponse {
3532 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3533 where
3534 S: serde::ser::Serializer,
3535 {
3536 use serde::ser::SerializeMap;
3537 #[allow(unused_imports)]
3538 use std::option::Option::Some;
3539 let mut state = serializer.serialize_map(std::option::Option::None)?;
3540 if !self.commit_sha.is_empty() {
3541 state.serialize_entry("commitSha", &self.commit_sha)?;
3542 }
3543 if !self._unknown_fields.is_empty() {
3544 for (key, value) in self._unknown_fields.iter() {
3545 state.serialize_entry(key, &value)?;
3546 }
3547 }
3548 state.end()
3549 }
3550}
3551
3552#[derive(Clone, Debug, Default, PartialEq)]
3554#[non_exhaustive]
3555pub struct ReadRepositoryFileRequest {
3556 pub name: std::string::String,
3558
3559 pub commit_sha: std::string::String,
3562
3563 pub path: std::string::String,
3565
3566 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3567}
3568
3569impl ReadRepositoryFileRequest {
3570 pub fn new() -> Self {
3571 std::default::Default::default()
3572 }
3573
3574 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3576 self.name = v.into();
3577 self
3578 }
3579
3580 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3582 self.commit_sha = v.into();
3583 self
3584 }
3585
3586 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3588 self.path = v.into();
3589 self
3590 }
3591}
3592
3593impl wkt::message::Message for ReadRepositoryFileRequest {
3594 fn typename() -> &'static str {
3595 "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
3596 }
3597}
3598
3599#[doc(hidden)]
3600impl<'de> serde::de::Deserialize<'de> for ReadRepositoryFileRequest {
3601 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3602 where
3603 D: serde::Deserializer<'de>,
3604 {
3605 #[allow(non_camel_case_types)]
3606 #[doc(hidden)]
3607 #[derive(PartialEq, Eq, Hash)]
3608 enum __FieldTag {
3609 __name,
3610 __commit_sha,
3611 __path,
3612 Unknown(std::string::String),
3613 }
3614 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3615 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3616 where
3617 D: serde::Deserializer<'de>,
3618 {
3619 struct Visitor;
3620 impl<'de> serde::de::Visitor<'de> for Visitor {
3621 type Value = __FieldTag;
3622 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3623 formatter.write_str("a field name for ReadRepositoryFileRequest")
3624 }
3625 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3626 where
3627 E: serde::de::Error,
3628 {
3629 use std::result::Result::Ok;
3630 use std::string::ToString;
3631 match value {
3632 "name" => Ok(__FieldTag::__name),
3633 "commitSha" => Ok(__FieldTag::__commit_sha),
3634 "commit_sha" => Ok(__FieldTag::__commit_sha),
3635 "path" => Ok(__FieldTag::__path),
3636 _ => Ok(__FieldTag::Unknown(value.to_string())),
3637 }
3638 }
3639 }
3640 deserializer.deserialize_identifier(Visitor)
3641 }
3642 }
3643 struct Visitor;
3644 impl<'de> serde::de::Visitor<'de> for Visitor {
3645 type Value = ReadRepositoryFileRequest;
3646 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3647 formatter.write_str("struct ReadRepositoryFileRequest")
3648 }
3649 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3650 where
3651 A: serde::de::MapAccess<'de>,
3652 {
3653 #[allow(unused_imports)]
3654 use serde::de::Error;
3655 use std::option::Option::Some;
3656 let mut fields = std::collections::HashSet::new();
3657 let mut result = Self::Value::new();
3658 while let Some(tag) = map.next_key::<__FieldTag>()? {
3659 #[allow(clippy::match_single_binding)]
3660 match tag {
3661 __FieldTag::__name => {
3662 if !fields.insert(__FieldTag::__name) {
3663 return std::result::Result::Err(A::Error::duplicate_field(
3664 "multiple values for name",
3665 ));
3666 }
3667 result.name = map
3668 .next_value::<std::option::Option<std::string::String>>()?
3669 .unwrap_or_default();
3670 }
3671 __FieldTag::__commit_sha => {
3672 if !fields.insert(__FieldTag::__commit_sha) {
3673 return std::result::Result::Err(A::Error::duplicate_field(
3674 "multiple values for commit_sha",
3675 ));
3676 }
3677 result.commit_sha = map
3678 .next_value::<std::option::Option<std::string::String>>()?
3679 .unwrap_or_default();
3680 }
3681 __FieldTag::__path => {
3682 if !fields.insert(__FieldTag::__path) {
3683 return std::result::Result::Err(A::Error::duplicate_field(
3684 "multiple values for path",
3685 ));
3686 }
3687 result.path = map
3688 .next_value::<std::option::Option<std::string::String>>()?
3689 .unwrap_or_default();
3690 }
3691 __FieldTag::Unknown(key) => {
3692 let value = map.next_value::<serde_json::Value>()?;
3693 result._unknown_fields.insert(key, value);
3694 }
3695 }
3696 }
3697 std::result::Result::Ok(result)
3698 }
3699 }
3700 deserializer.deserialize_any(Visitor)
3701 }
3702}
3703
3704#[doc(hidden)]
3705impl serde::ser::Serialize for ReadRepositoryFileRequest {
3706 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3707 where
3708 S: serde::ser::Serializer,
3709 {
3710 use serde::ser::SerializeMap;
3711 #[allow(unused_imports)]
3712 use std::option::Option::Some;
3713 let mut state = serializer.serialize_map(std::option::Option::None)?;
3714 if !self.name.is_empty() {
3715 state.serialize_entry("name", &self.name)?;
3716 }
3717 if !self.commit_sha.is_empty() {
3718 state.serialize_entry("commitSha", &self.commit_sha)?;
3719 }
3720 if !self.path.is_empty() {
3721 state.serialize_entry("path", &self.path)?;
3722 }
3723 if !self._unknown_fields.is_empty() {
3724 for (key, value) in self._unknown_fields.iter() {
3725 state.serialize_entry(key, &value)?;
3726 }
3727 }
3728 state.end()
3729 }
3730}
3731
3732#[derive(Clone, Debug, Default, PartialEq)]
3734#[non_exhaustive]
3735pub struct ReadRepositoryFileResponse {
3736 pub contents: ::bytes::Bytes,
3738
3739 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3740}
3741
3742impl ReadRepositoryFileResponse {
3743 pub fn new() -> Self {
3744 std::default::Default::default()
3745 }
3746
3747 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3749 self.contents = v.into();
3750 self
3751 }
3752}
3753
3754impl wkt::message::Message for ReadRepositoryFileResponse {
3755 fn typename() -> &'static str {
3756 "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
3757 }
3758}
3759
3760#[doc(hidden)]
3761impl<'de> serde::de::Deserialize<'de> for ReadRepositoryFileResponse {
3762 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3763 where
3764 D: serde::Deserializer<'de>,
3765 {
3766 #[allow(non_camel_case_types)]
3767 #[doc(hidden)]
3768 #[derive(PartialEq, Eq, Hash)]
3769 enum __FieldTag {
3770 __contents,
3771 Unknown(std::string::String),
3772 }
3773 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3774 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3775 where
3776 D: serde::Deserializer<'de>,
3777 {
3778 struct Visitor;
3779 impl<'de> serde::de::Visitor<'de> for Visitor {
3780 type Value = __FieldTag;
3781 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3782 formatter.write_str("a field name for ReadRepositoryFileResponse")
3783 }
3784 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3785 where
3786 E: serde::de::Error,
3787 {
3788 use std::result::Result::Ok;
3789 use std::string::ToString;
3790 match value {
3791 "contents" => Ok(__FieldTag::__contents),
3792 _ => Ok(__FieldTag::Unknown(value.to_string())),
3793 }
3794 }
3795 }
3796 deserializer.deserialize_identifier(Visitor)
3797 }
3798 }
3799 struct Visitor;
3800 impl<'de> serde::de::Visitor<'de> for Visitor {
3801 type Value = ReadRepositoryFileResponse;
3802 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3803 formatter.write_str("struct ReadRepositoryFileResponse")
3804 }
3805 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3806 where
3807 A: serde::de::MapAccess<'de>,
3808 {
3809 #[allow(unused_imports)]
3810 use serde::de::Error;
3811 use std::option::Option::Some;
3812 let mut fields = std::collections::HashSet::new();
3813 let mut result = Self::Value::new();
3814 while let Some(tag) = map.next_key::<__FieldTag>()? {
3815 #[allow(clippy::match_single_binding)]
3816 match tag {
3817 __FieldTag::__contents => {
3818 if !fields.insert(__FieldTag::__contents) {
3819 return std::result::Result::Err(A::Error::duplicate_field(
3820 "multiple values for contents",
3821 ));
3822 }
3823 struct __With(std::option::Option<::bytes::Bytes>);
3824 impl<'de> serde::de::Deserialize<'de> for __With {
3825 fn deserialize<D>(
3826 deserializer: D,
3827 ) -> std::result::Result<Self, D::Error>
3828 where
3829 D: serde::de::Deserializer<'de>,
3830 {
3831 serde_with::As::< std::option::Option<serde_with::base64::Base64> >::deserialize(deserializer).map(__With)
3832 }
3833 }
3834 result.contents = map.next_value::<__With>()?.0.unwrap_or_default();
3835 }
3836 __FieldTag::Unknown(key) => {
3837 let value = map.next_value::<serde_json::Value>()?;
3838 result._unknown_fields.insert(key, value);
3839 }
3840 }
3841 }
3842 std::result::Result::Ok(result)
3843 }
3844 }
3845 deserializer.deserialize_any(Visitor)
3846 }
3847}
3848
3849#[doc(hidden)]
3850impl serde::ser::Serialize for ReadRepositoryFileResponse {
3851 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3852 where
3853 S: serde::ser::Serializer,
3854 {
3855 use serde::ser::SerializeMap;
3856 #[allow(unused_imports)]
3857 use std::option::Option::Some;
3858 let mut state = serializer.serialize_map(std::option::Option::None)?;
3859 if !self.contents.is_empty() {
3860 struct __With<'a>(&'a ::bytes::Bytes);
3861 impl<'a> serde::ser::Serialize for __With<'a> {
3862 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3863 where
3864 S: serde::ser::Serializer,
3865 {
3866 serde_with::As::<serde_with::base64::Base64>::serialize(self.0, serializer)
3867 }
3868 }
3869 state.serialize_entry("contents", &__With(&self.contents))?;
3870 }
3871 if !self._unknown_fields.is_empty() {
3872 for (key, value) in self._unknown_fields.iter() {
3873 state.serialize_entry(key, &value)?;
3874 }
3875 }
3876 state.end()
3877 }
3878}
3879
3880#[derive(Clone, Debug, Default, PartialEq)]
3882#[non_exhaustive]
3883pub struct QueryRepositoryDirectoryContentsRequest {
3884 pub name: std::string::String,
3886
3887 pub commit_sha: std::string::String,
3890
3891 pub path: std::string::String,
3894
3895 pub page_size: i32,
3899
3900 pub page_token: std::string::String,
3908
3909 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3910}
3911
3912impl QueryRepositoryDirectoryContentsRequest {
3913 pub fn new() -> Self {
3914 std::default::Default::default()
3915 }
3916
3917 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3919 self.name = v.into();
3920 self
3921 }
3922
3923 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3925 self.commit_sha = v.into();
3926 self
3927 }
3928
3929 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3931 self.path = v.into();
3932 self
3933 }
3934
3935 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3937 self.page_size = v.into();
3938 self
3939 }
3940
3941 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3943 self.page_token = v.into();
3944 self
3945 }
3946}
3947
3948impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
3949 fn typename() -> &'static str {
3950 "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
3951 }
3952}
3953
3954#[doc(hidden)]
3955impl<'de> serde::de::Deserialize<'de> for QueryRepositoryDirectoryContentsRequest {
3956 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3957 where
3958 D: serde::Deserializer<'de>,
3959 {
3960 #[allow(non_camel_case_types)]
3961 #[doc(hidden)]
3962 #[derive(PartialEq, Eq, Hash)]
3963 enum __FieldTag {
3964 __name,
3965 __commit_sha,
3966 __path,
3967 __page_size,
3968 __page_token,
3969 Unknown(std::string::String),
3970 }
3971 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3972 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3973 where
3974 D: serde::Deserializer<'de>,
3975 {
3976 struct Visitor;
3977 impl<'de> serde::de::Visitor<'de> for Visitor {
3978 type Value = __FieldTag;
3979 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3980 formatter
3981 .write_str("a field name for QueryRepositoryDirectoryContentsRequest")
3982 }
3983 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3984 where
3985 E: serde::de::Error,
3986 {
3987 use std::result::Result::Ok;
3988 use std::string::ToString;
3989 match value {
3990 "name" => Ok(__FieldTag::__name),
3991 "commitSha" => Ok(__FieldTag::__commit_sha),
3992 "commit_sha" => Ok(__FieldTag::__commit_sha),
3993 "path" => Ok(__FieldTag::__path),
3994 "pageSize" => Ok(__FieldTag::__page_size),
3995 "page_size" => Ok(__FieldTag::__page_size),
3996 "pageToken" => Ok(__FieldTag::__page_token),
3997 "page_token" => Ok(__FieldTag::__page_token),
3998 _ => Ok(__FieldTag::Unknown(value.to_string())),
3999 }
4000 }
4001 }
4002 deserializer.deserialize_identifier(Visitor)
4003 }
4004 }
4005 struct Visitor;
4006 impl<'de> serde::de::Visitor<'de> for Visitor {
4007 type Value = QueryRepositoryDirectoryContentsRequest;
4008 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4009 formatter.write_str("struct QueryRepositoryDirectoryContentsRequest")
4010 }
4011 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4012 where
4013 A: serde::de::MapAccess<'de>,
4014 {
4015 #[allow(unused_imports)]
4016 use serde::de::Error;
4017 use std::option::Option::Some;
4018 let mut fields = std::collections::HashSet::new();
4019 let mut result = Self::Value::new();
4020 while let Some(tag) = map.next_key::<__FieldTag>()? {
4021 #[allow(clippy::match_single_binding)]
4022 match tag {
4023 __FieldTag::__name => {
4024 if !fields.insert(__FieldTag::__name) {
4025 return std::result::Result::Err(A::Error::duplicate_field(
4026 "multiple values for name",
4027 ));
4028 }
4029 result.name = map
4030 .next_value::<std::option::Option<std::string::String>>()?
4031 .unwrap_or_default();
4032 }
4033 __FieldTag::__commit_sha => {
4034 if !fields.insert(__FieldTag::__commit_sha) {
4035 return std::result::Result::Err(A::Error::duplicate_field(
4036 "multiple values for commit_sha",
4037 ));
4038 }
4039 result.commit_sha = map
4040 .next_value::<std::option::Option<std::string::String>>()?
4041 .unwrap_or_default();
4042 }
4043 __FieldTag::__path => {
4044 if !fields.insert(__FieldTag::__path) {
4045 return std::result::Result::Err(A::Error::duplicate_field(
4046 "multiple values for path",
4047 ));
4048 }
4049 result.path = map
4050 .next_value::<std::option::Option<std::string::String>>()?
4051 .unwrap_or_default();
4052 }
4053 __FieldTag::__page_size => {
4054 if !fields.insert(__FieldTag::__page_size) {
4055 return std::result::Result::Err(A::Error::duplicate_field(
4056 "multiple values for page_size",
4057 ));
4058 }
4059 struct __With(std::option::Option<i32>);
4060 impl<'de> serde::de::Deserialize<'de> for __With {
4061 fn deserialize<D>(
4062 deserializer: D,
4063 ) -> std::result::Result<Self, D::Error>
4064 where
4065 D: serde::de::Deserializer<'de>,
4066 {
4067 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
4068 }
4069 }
4070 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
4071 }
4072 __FieldTag::__page_token => {
4073 if !fields.insert(__FieldTag::__page_token) {
4074 return std::result::Result::Err(A::Error::duplicate_field(
4075 "multiple values for page_token",
4076 ));
4077 }
4078 result.page_token = map
4079 .next_value::<std::option::Option<std::string::String>>()?
4080 .unwrap_or_default();
4081 }
4082 __FieldTag::Unknown(key) => {
4083 let value = map.next_value::<serde_json::Value>()?;
4084 result._unknown_fields.insert(key, value);
4085 }
4086 }
4087 }
4088 std::result::Result::Ok(result)
4089 }
4090 }
4091 deserializer.deserialize_any(Visitor)
4092 }
4093}
4094
4095#[doc(hidden)]
4096impl serde::ser::Serialize for QueryRepositoryDirectoryContentsRequest {
4097 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4098 where
4099 S: serde::ser::Serializer,
4100 {
4101 use serde::ser::SerializeMap;
4102 #[allow(unused_imports)]
4103 use std::option::Option::Some;
4104 let mut state = serializer.serialize_map(std::option::Option::None)?;
4105 if !self.name.is_empty() {
4106 state.serialize_entry("name", &self.name)?;
4107 }
4108 if !self.commit_sha.is_empty() {
4109 state.serialize_entry("commitSha", &self.commit_sha)?;
4110 }
4111 if !self.path.is_empty() {
4112 state.serialize_entry("path", &self.path)?;
4113 }
4114 if !wkt::internal::is_default(&self.page_size) {
4115 struct __With<'a>(&'a i32);
4116 impl<'a> serde::ser::Serialize for __With<'a> {
4117 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4118 where
4119 S: serde::ser::Serializer,
4120 {
4121 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
4122 }
4123 }
4124 state.serialize_entry("pageSize", &__With(&self.page_size))?;
4125 }
4126 if !self.page_token.is_empty() {
4127 state.serialize_entry("pageToken", &self.page_token)?;
4128 }
4129 if !self._unknown_fields.is_empty() {
4130 for (key, value) in self._unknown_fields.iter() {
4131 state.serialize_entry(key, &value)?;
4132 }
4133 }
4134 state.end()
4135 }
4136}
4137
4138#[derive(Clone, Debug, Default, PartialEq)]
4140#[non_exhaustive]
4141pub struct QueryRepositoryDirectoryContentsResponse {
4142 pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
4144
4145 pub next_page_token: std::string::String,
4148
4149 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4150}
4151
4152impl QueryRepositoryDirectoryContentsResponse {
4153 pub fn new() -> Self {
4154 std::default::Default::default()
4155 }
4156
4157 pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
4159 where
4160 T: std::iter::IntoIterator<Item = V>,
4161 V: std::convert::Into<crate::model::DirectoryEntry>,
4162 {
4163 use std::iter::Iterator;
4164 self.directory_entries = v.into_iter().map(|i| i.into()).collect();
4165 self
4166 }
4167
4168 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4170 self.next_page_token = v.into();
4171 self
4172 }
4173}
4174
4175impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
4176 fn typename() -> &'static str {
4177 "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
4178 }
4179}
4180
4181#[doc(hidden)]
4182impl gax::paginator::internal::PageableResponse for QueryRepositoryDirectoryContentsResponse {
4183 type PageItem = crate::model::DirectoryEntry;
4184
4185 fn items(self) -> std::vec::Vec<Self::PageItem> {
4186 self.directory_entries
4187 }
4188
4189 fn next_page_token(&self) -> std::string::String {
4190 use std::clone::Clone;
4191 self.next_page_token.clone()
4192 }
4193}
4194
4195#[doc(hidden)]
4196impl<'de> serde::de::Deserialize<'de> for QueryRepositoryDirectoryContentsResponse {
4197 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4198 where
4199 D: serde::Deserializer<'de>,
4200 {
4201 #[allow(non_camel_case_types)]
4202 #[doc(hidden)]
4203 #[derive(PartialEq, Eq, Hash)]
4204 enum __FieldTag {
4205 __directory_entries,
4206 __next_page_token,
4207 Unknown(std::string::String),
4208 }
4209 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4210 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4211 where
4212 D: serde::Deserializer<'de>,
4213 {
4214 struct Visitor;
4215 impl<'de> serde::de::Visitor<'de> for Visitor {
4216 type Value = __FieldTag;
4217 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4218 formatter
4219 .write_str("a field name for QueryRepositoryDirectoryContentsResponse")
4220 }
4221 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4222 where
4223 E: serde::de::Error,
4224 {
4225 use std::result::Result::Ok;
4226 use std::string::ToString;
4227 match value {
4228 "directoryEntries" => Ok(__FieldTag::__directory_entries),
4229 "directory_entries" => Ok(__FieldTag::__directory_entries),
4230 "nextPageToken" => Ok(__FieldTag::__next_page_token),
4231 "next_page_token" => Ok(__FieldTag::__next_page_token),
4232 _ => Ok(__FieldTag::Unknown(value.to_string())),
4233 }
4234 }
4235 }
4236 deserializer.deserialize_identifier(Visitor)
4237 }
4238 }
4239 struct Visitor;
4240 impl<'de> serde::de::Visitor<'de> for Visitor {
4241 type Value = QueryRepositoryDirectoryContentsResponse;
4242 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4243 formatter.write_str("struct QueryRepositoryDirectoryContentsResponse")
4244 }
4245 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4246 where
4247 A: serde::de::MapAccess<'de>,
4248 {
4249 #[allow(unused_imports)]
4250 use serde::de::Error;
4251 use std::option::Option::Some;
4252 let mut fields = std::collections::HashSet::new();
4253 let mut result = Self::Value::new();
4254 while let Some(tag) = map.next_key::<__FieldTag>()? {
4255 #[allow(clippy::match_single_binding)]
4256 match tag {
4257 __FieldTag::__directory_entries => {
4258 if !fields.insert(__FieldTag::__directory_entries) {
4259 return std::result::Result::Err(A::Error::duplicate_field(
4260 "multiple values for directory_entries",
4261 ));
4262 }
4263 result.directory_entries =
4264 map.next_value::<std::option::Option<
4265 std::vec::Vec<crate::model::DirectoryEntry>,
4266 >>()?
4267 .unwrap_or_default();
4268 }
4269 __FieldTag::__next_page_token => {
4270 if !fields.insert(__FieldTag::__next_page_token) {
4271 return std::result::Result::Err(A::Error::duplicate_field(
4272 "multiple values for next_page_token",
4273 ));
4274 }
4275 result.next_page_token = map
4276 .next_value::<std::option::Option<std::string::String>>()?
4277 .unwrap_or_default();
4278 }
4279 __FieldTag::Unknown(key) => {
4280 let value = map.next_value::<serde_json::Value>()?;
4281 result._unknown_fields.insert(key, value);
4282 }
4283 }
4284 }
4285 std::result::Result::Ok(result)
4286 }
4287 }
4288 deserializer.deserialize_any(Visitor)
4289 }
4290}
4291
4292#[doc(hidden)]
4293impl serde::ser::Serialize for QueryRepositoryDirectoryContentsResponse {
4294 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4295 where
4296 S: serde::ser::Serializer,
4297 {
4298 use serde::ser::SerializeMap;
4299 #[allow(unused_imports)]
4300 use std::option::Option::Some;
4301 let mut state = serializer.serialize_map(std::option::Option::None)?;
4302 if !self.directory_entries.is_empty() {
4303 state.serialize_entry("directoryEntries", &self.directory_entries)?;
4304 }
4305 if !self.next_page_token.is_empty() {
4306 state.serialize_entry("nextPageToken", &self.next_page_token)?;
4307 }
4308 if !self._unknown_fields.is_empty() {
4309 for (key, value) in self._unknown_fields.iter() {
4310 state.serialize_entry(key, &value)?;
4311 }
4312 }
4313 state.end()
4314 }
4315}
4316
4317#[derive(Clone, Debug, Default, PartialEq)]
4319#[non_exhaustive]
4320pub struct FetchRepositoryHistoryRequest {
4321 pub name: std::string::String,
4323
4324 pub page_size: i32,
4328
4329 pub page_token: std::string::String,
4336
4337 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4338}
4339
4340impl FetchRepositoryHistoryRequest {
4341 pub fn new() -> Self {
4342 std::default::Default::default()
4343 }
4344
4345 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4347 self.name = v.into();
4348 self
4349 }
4350
4351 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4353 self.page_size = v.into();
4354 self
4355 }
4356
4357 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4359 self.page_token = v.into();
4360 self
4361 }
4362}
4363
4364impl wkt::message::Message for FetchRepositoryHistoryRequest {
4365 fn typename() -> &'static str {
4366 "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
4367 }
4368}
4369
4370#[doc(hidden)]
4371impl<'de> serde::de::Deserialize<'de> for FetchRepositoryHistoryRequest {
4372 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4373 where
4374 D: serde::Deserializer<'de>,
4375 {
4376 #[allow(non_camel_case_types)]
4377 #[doc(hidden)]
4378 #[derive(PartialEq, Eq, Hash)]
4379 enum __FieldTag {
4380 __name,
4381 __page_size,
4382 __page_token,
4383 Unknown(std::string::String),
4384 }
4385 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4386 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4387 where
4388 D: serde::Deserializer<'de>,
4389 {
4390 struct Visitor;
4391 impl<'de> serde::de::Visitor<'de> for Visitor {
4392 type Value = __FieldTag;
4393 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4394 formatter.write_str("a field name for FetchRepositoryHistoryRequest")
4395 }
4396 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4397 where
4398 E: serde::de::Error,
4399 {
4400 use std::result::Result::Ok;
4401 use std::string::ToString;
4402 match value {
4403 "name" => Ok(__FieldTag::__name),
4404 "pageSize" => Ok(__FieldTag::__page_size),
4405 "page_size" => Ok(__FieldTag::__page_size),
4406 "pageToken" => Ok(__FieldTag::__page_token),
4407 "page_token" => Ok(__FieldTag::__page_token),
4408 _ => Ok(__FieldTag::Unknown(value.to_string())),
4409 }
4410 }
4411 }
4412 deserializer.deserialize_identifier(Visitor)
4413 }
4414 }
4415 struct Visitor;
4416 impl<'de> serde::de::Visitor<'de> for Visitor {
4417 type Value = FetchRepositoryHistoryRequest;
4418 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4419 formatter.write_str("struct FetchRepositoryHistoryRequest")
4420 }
4421 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4422 where
4423 A: serde::de::MapAccess<'de>,
4424 {
4425 #[allow(unused_imports)]
4426 use serde::de::Error;
4427 use std::option::Option::Some;
4428 let mut fields = std::collections::HashSet::new();
4429 let mut result = Self::Value::new();
4430 while let Some(tag) = map.next_key::<__FieldTag>()? {
4431 #[allow(clippy::match_single_binding)]
4432 match tag {
4433 __FieldTag::__name => {
4434 if !fields.insert(__FieldTag::__name) {
4435 return std::result::Result::Err(A::Error::duplicate_field(
4436 "multiple values for name",
4437 ));
4438 }
4439 result.name = map
4440 .next_value::<std::option::Option<std::string::String>>()?
4441 .unwrap_or_default();
4442 }
4443 __FieldTag::__page_size => {
4444 if !fields.insert(__FieldTag::__page_size) {
4445 return std::result::Result::Err(A::Error::duplicate_field(
4446 "multiple values for page_size",
4447 ));
4448 }
4449 struct __With(std::option::Option<i32>);
4450 impl<'de> serde::de::Deserialize<'de> for __With {
4451 fn deserialize<D>(
4452 deserializer: D,
4453 ) -> std::result::Result<Self, D::Error>
4454 where
4455 D: serde::de::Deserializer<'de>,
4456 {
4457 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
4458 }
4459 }
4460 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
4461 }
4462 __FieldTag::__page_token => {
4463 if !fields.insert(__FieldTag::__page_token) {
4464 return std::result::Result::Err(A::Error::duplicate_field(
4465 "multiple values for page_token",
4466 ));
4467 }
4468 result.page_token = map
4469 .next_value::<std::option::Option<std::string::String>>()?
4470 .unwrap_or_default();
4471 }
4472 __FieldTag::Unknown(key) => {
4473 let value = map.next_value::<serde_json::Value>()?;
4474 result._unknown_fields.insert(key, value);
4475 }
4476 }
4477 }
4478 std::result::Result::Ok(result)
4479 }
4480 }
4481 deserializer.deserialize_any(Visitor)
4482 }
4483}
4484
4485#[doc(hidden)]
4486impl serde::ser::Serialize for FetchRepositoryHistoryRequest {
4487 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4488 where
4489 S: serde::ser::Serializer,
4490 {
4491 use serde::ser::SerializeMap;
4492 #[allow(unused_imports)]
4493 use std::option::Option::Some;
4494 let mut state = serializer.serialize_map(std::option::Option::None)?;
4495 if !self.name.is_empty() {
4496 state.serialize_entry("name", &self.name)?;
4497 }
4498 if !wkt::internal::is_default(&self.page_size) {
4499 struct __With<'a>(&'a i32);
4500 impl<'a> serde::ser::Serialize for __With<'a> {
4501 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4502 where
4503 S: serde::ser::Serializer,
4504 {
4505 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
4506 }
4507 }
4508 state.serialize_entry("pageSize", &__With(&self.page_size))?;
4509 }
4510 if !self.page_token.is_empty() {
4511 state.serialize_entry("pageToken", &self.page_token)?;
4512 }
4513 if !self._unknown_fields.is_empty() {
4514 for (key, value) in self._unknown_fields.iter() {
4515 state.serialize_entry(key, &value)?;
4516 }
4517 }
4518 state.end()
4519 }
4520}
4521
4522#[derive(Clone, Debug, Default, PartialEq)]
4524#[non_exhaustive]
4525pub struct FetchRepositoryHistoryResponse {
4526 pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
4528
4529 pub next_page_token: std::string::String,
4532
4533 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4534}
4535
4536impl FetchRepositoryHistoryResponse {
4537 pub fn new() -> Self {
4538 std::default::Default::default()
4539 }
4540
4541 pub fn set_commits<T, V>(mut self, v: T) -> Self
4543 where
4544 T: std::iter::IntoIterator<Item = V>,
4545 V: std::convert::Into<crate::model::CommitLogEntry>,
4546 {
4547 use std::iter::Iterator;
4548 self.commits = v.into_iter().map(|i| i.into()).collect();
4549 self
4550 }
4551
4552 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4554 self.next_page_token = v.into();
4555 self
4556 }
4557}
4558
4559impl wkt::message::Message for FetchRepositoryHistoryResponse {
4560 fn typename() -> &'static str {
4561 "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
4562 }
4563}
4564
4565#[doc(hidden)]
4566impl gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
4567 type PageItem = crate::model::CommitLogEntry;
4568
4569 fn items(self) -> std::vec::Vec<Self::PageItem> {
4570 self.commits
4571 }
4572
4573 fn next_page_token(&self) -> std::string::String {
4574 use std::clone::Clone;
4575 self.next_page_token.clone()
4576 }
4577}
4578
4579#[doc(hidden)]
4580impl<'de> serde::de::Deserialize<'de> for FetchRepositoryHistoryResponse {
4581 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4582 where
4583 D: serde::Deserializer<'de>,
4584 {
4585 #[allow(non_camel_case_types)]
4586 #[doc(hidden)]
4587 #[derive(PartialEq, Eq, Hash)]
4588 enum __FieldTag {
4589 __commits,
4590 __next_page_token,
4591 Unknown(std::string::String),
4592 }
4593 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4594 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4595 where
4596 D: serde::Deserializer<'de>,
4597 {
4598 struct Visitor;
4599 impl<'de> serde::de::Visitor<'de> for Visitor {
4600 type Value = __FieldTag;
4601 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4602 formatter.write_str("a field name for FetchRepositoryHistoryResponse")
4603 }
4604 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4605 where
4606 E: serde::de::Error,
4607 {
4608 use std::result::Result::Ok;
4609 use std::string::ToString;
4610 match value {
4611 "commits" => Ok(__FieldTag::__commits),
4612 "nextPageToken" => Ok(__FieldTag::__next_page_token),
4613 "next_page_token" => Ok(__FieldTag::__next_page_token),
4614 _ => Ok(__FieldTag::Unknown(value.to_string())),
4615 }
4616 }
4617 }
4618 deserializer.deserialize_identifier(Visitor)
4619 }
4620 }
4621 struct Visitor;
4622 impl<'de> serde::de::Visitor<'de> for Visitor {
4623 type Value = FetchRepositoryHistoryResponse;
4624 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4625 formatter.write_str("struct FetchRepositoryHistoryResponse")
4626 }
4627 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4628 where
4629 A: serde::de::MapAccess<'de>,
4630 {
4631 #[allow(unused_imports)]
4632 use serde::de::Error;
4633 use std::option::Option::Some;
4634 let mut fields = std::collections::HashSet::new();
4635 let mut result = Self::Value::new();
4636 while let Some(tag) = map.next_key::<__FieldTag>()? {
4637 #[allow(clippy::match_single_binding)]
4638 match tag {
4639 __FieldTag::__commits => {
4640 if !fields.insert(__FieldTag::__commits) {
4641 return std::result::Result::Err(A::Error::duplicate_field(
4642 "multiple values for commits",
4643 ));
4644 }
4645 result.commits =
4646 map.next_value::<std::option::Option<
4647 std::vec::Vec<crate::model::CommitLogEntry>,
4648 >>()?
4649 .unwrap_or_default();
4650 }
4651 __FieldTag::__next_page_token => {
4652 if !fields.insert(__FieldTag::__next_page_token) {
4653 return std::result::Result::Err(A::Error::duplicate_field(
4654 "multiple values for next_page_token",
4655 ));
4656 }
4657 result.next_page_token = map
4658 .next_value::<std::option::Option<std::string::String>>()?
4659 .unwrap_or_default();
4660 }
4661 __FieldTag::Unknown(key) => {
4662 let value = map.next_value::<serde_json::Value>()?;
4663 result._unknown_fields.insert(key, value);
4664 }
4665 }
4666 }
4667 std::result::Result::Ok(result)
4668 }
4669 }
4670 deserializer.deserialize_any(Visitor)
4671 }
4672}
4673
4674#[doc(hidden)]
4675impl serde::ser::Serialize for FetchRepositoryHistoryResponse {
4676 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4677 where
4678 S: serde::ser::Serializer,
4679 {
4680 use serde::ser::SerializeMap;
4681 #[allow(unused_imports)]
4682 use std::option::Option::Some;
4683 let mut state = serializer.serialize_map(std::option::Option::None)?;
4684 if !self.commits.is_empty() {
4685 state.serialize_entry("commits", &self.commits)?;
4686 }
4687 if !self.next_page_token.is_empty() {
4688 state.serialize_entry("nextPageToken", &self.next_page_token)?;
4689 }
4690 if !self._unknown_fields.is_empty() {
4691 for (key, value) in self._unknown_fields.iter() {
4692 state.serialize_entry(key, &value)?;
4693 }
4694 }
4695 state.end()
4696 }
4697}
4698
4699#[derive(Clone, Debug, Default, PartialEq)]
4701#[non_exhaustive]
4702pub struct CommitLogEntry {
4703 pub commit_time: std::option::Option<wkt::Timestamp>,
4705
4706 pub commit_sha: std::string::String,
4708
4709 pub author: std::option::Option<crate::model::CommitAuthor>,
4711
4712 pub commit_message: std::string::String,
4714
4715 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4716}
4717
4718impl CommitLogEntry {
4719 pub fn new() -> Self {
4720 std::default::Default::default()
4721 }
4722
4723 pub fn set_commit_time<T>(mut self, v: T) -> Self
4725 where
4726 T: std::convert::Into<wkt::Timestamp>,
4727 {
4728 self.commit_time = std::option::Option::Some(v.into());
4729 self
4730 }
4731
4732 pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
4734 where
4735 T: std::convert::Into<wkt::Timestamp>,
4736 {
4737 self.commit_time = v.map(|x| x.into());
4738 self
4739 }
4740
4741 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4743 self.commit_sha = v.into();
4744 self
4745 }
4746
4747 pub fn set_author<T>(mut self, v: T) -> Self
4749 where
4750 T: std::convert::Into<crate::model::CommitAuthor>,
4751 {
4752 self.author = std::option::Option::Some(v.into());
4753 self
4754 }
4755
4756 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
4758 where
4759 T: std::convert::Into<crate::model::CommitAuthor>,
4760 {
4761 self.author = v.map(|x| x.into());
4762 self
4763 }
4764
4765 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4767 self.commit_message = v.into();
4768 self
4769 }
4770}
4771
4772impl wkt::message::Message for CommitLogEntry {
4773 fn typename() -> &'static str {
4774 "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
4775 }
4776}
4777
4778#[doc(hidden)]
4779impl<'de> serde::de::Deserialize<'de> for CommitLogEntry {
4780 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4781 where
4782 D: serde::Deserializer<'de>,
4783 {
4784 #[allow(non_camel_case_types)]
4785 #[doc(hidden)]
4786 #[derive(PartialEq, Eq, Hash)]
4787 enum __FieldTag {
4788 __commit_time,
4789 __commit_sha,
4790 __author,
4791 __commit_message,
4792 Unknown(std::string::String),
4793 }
4794 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4795 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4796 where
4797 D: serde::Deserializer<'de>,
4798 {
4799 struct Visitor;
4800 impl<'de> serde::de::Visitor<'de> for Visitor {
4801 type Value = __FieldTag;
4802 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4803 formatter.write_str("a field name for CommitLogEntry")
4804 }
4805 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4806 where
4807 E: serde::de::Error,
4808 {
4809 use std::result::Result::Ok;
4810 use std::string::ToString;
4811 match value {
4812 "commitTime" => Ok(__FieldTag::__commit_time),
4813 "commit_time" => Ok(__FieldTag::__commit_time),
4814 "commitSha" => Ok(__FieldTag::__commit_sha),
4815 "commit_sha" => Ok(__FieldTag::__commit_sha),
4816 "author" => Ok(__FieldTag::__author),
4817 "commitMessage" => Ok(__FieldTag::__commit_message),
4818 "commit_message" => Ok(__FieldTag::__commit_message),
4819 _ => Ok(__FieldTag::Unknown(value.to_string())),
4820 }
4821 }
4822 }
4823 deserializer.deserialize_identifier(Visitor)
4824 }
4825 }
4826 struct Visitor;
4827 impl<'de> serde::de::Visitor<'de> for Visitor {
4828 type Value = CommitLogEntry;
4829 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4830 formatter.write_str("struct CommitLogEntry")
4831 }
4832 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4833 where
4834 A: serde::de::MapAccess<'de>,
4835 {
4836 #[allow(unused_imports)]
4837 use serde::de::Error;
4838 use std::option::Option::Some;
4839 let mut fields = std::collections::HashSet::new();
4840 let mut result = Self::Value::new();
4841 while let Some(tag) = map.next_key::<__FieldTag>()? {
4842 #[allow(clippy::match_single_binding)]
4843 match tag {
4844 __FieldTag::__commit_time => {
4845 if !fields.insert(__FieldTag::__commit_time) {
4846 return std::result::Result::Err(A::Error::duplicate_field(
4847 "multiple values for commit_time",
4848 ));
4849 }
4850 result.commit_time =
4851 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
4852 }
4853 __FieldTag::__commit_sha => {
4854 if !fields.insert(__FieldTag::__commit_sha) {
4855 return std::result::Result::Err(A::Error::duplicate_field(
4856 "multiple values for commit_sha",
4857 ));
4858 }
4859 result.commit_sha = map
4860 .next_value::<std::option::Option<std::string::String>>()?
4861 .unwrap_or_default();
4862 }
4863 __FieldTag::__author => {
4864 if !fields.insert(__FieldTag::__author) {
4865 return std::result::Result::Err(A::Error::duplicate_field(
4866 "multiple values for author",
4867 ));
4868 }
4869 result.author = map
4870 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
4871 }
4872 __FieldTag::__commit_message => {
4873 if !fields.insert(__FieldTag::__commit_message) {
4874 return std::result::Result::Err(A::Error::duplicate_field(
4875 "multiple values for commit_message",
4876 ));
4877 }
4878 result.commit_message = map
4879 .next_value::<std::option::Option<std::string::String>>()?
4880 .unwrap_or_default();
4881 }
4882 __FieldTag::Unknown(key) => {
4883 let value = map.next_value::<serde_json::Value>()?;
4884 result._unknown_fields.insert(key, value);
4885 }
4886 }
4887 }
4888 std::result::Result::Ok(result)
4889 }
4890 }
4891 deserializer.deserialize_any(Visitor)
4892 }
4893}
4894
4895#[doc(hidden)]
4896impl serde::ser::Serialize for CommitLogEntry {
4897 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4898 where
4899 S: serde::ser::Serializer,
4900 {
4901 use serde::ser::SerializeMap;
4902 #[allow(unused_imports)]
4903 use std::option::Option::Some;
4904 let mut state = serializer.serialize_map(std::option::Option::None)?;
4905 if self.commit_time.is_some() {
4906 state.serialize_entry("commitTime", &self.commit_time)?;
4907 }
4908 if !self.commit_sha.is_empty() {
4909 state.serialize_entry("commitSha", &self.commit_sha)?;
4910 }
4911 if self.author.is_some() {
4912 state.serialize_entry("author", &self.author)?;
4913 }
4914 if !self.commit_message.is_empty() {
4915 state.serialize_entry("commitMessage", &self.commit_message)?;
4916 }
4917 if !self._unknown_fields.is_empty() {
4918 for (key, value) in self._unknown_fields.iter() {
4919 state.serialize_entry(key, &value)?;
4920 }
4921 }
4922 state.end()
4923 }
4924}
4925
4926#[derive(Clone, Debug, Default, PartialEq)]
4928#[non_exhaustive]
4929pub struct CommitMetadata {
4930 pub author: std::option::Option<crate::model::CommitAuthor>,
4932
4933 pub commit_message: std::string::String,
4935
4936 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4937}
4938
4939impl CommitMetadata {
4940 pub fn new() -> Self {
4941 std::default::Default::default()
4942 }
4943
4944 pub fn set_author<T>(mut self, v: T) -> Self
4946 where
4947 T: std::convert::Into<crate::model::CommitAuthor>,
4948 {
4949 self.author = std::option::Option::Some(v.into());
4950 self
4951 }
4952
4953 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
4955 where
4956 T: std::convert::Into<crate::model::CommitAuthor>,
4957 {
4958 self.author = v.map(|x| x.into());
4959 self
4960 }
4961
4962 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4964 self.commit_message = v.into();
4965 self
4966 }
4967}
4968
4969impl wkt::message::Message for CommitMetadata {
4970 fn typename() -> &'static str {
4971 "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
4972 }
4973}
4974
4975#[doc(hidden)]
4976impl<'de> serde::de::Deserialize<'de> for CommitMetadata {
4977 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4978 where
4979 D: serde::Deserializer<'de>,
4980 {
4981 #[allow(non_camel_case_types)]
4982 #[doc(hidden)]
4983 #[derive(PartialEq, Eq, Hash)]
4984 enum __FieldTag {
4985 __author,
4986 __commit_message,
4987 Unknown(std::string::String),
4988 }
4989 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4990 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4991 where
4992 D: serde::Deserializer<'de>,
4993 {
4994 struct Visitor;
4995 impl<'de> serde::de::Visitor<'de> for Visitor {
4996 type Value = __FieldTag;
4997 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4998 formatter.write_str("a field name for CommitMetadata")
4999 }
5000 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5001 where
5002 E: serde::de::Error,
5003 {
5004 use std::result::Result::Ok;
5005 use std::string::ToString;
5006 match value {
5007 "author" => Ok(__FieldTag::__author),
5008 "commitMessage" => Ok(__FieldTag::__commit_message),
5009 "commit_message" => Ok(__FieldTag::__commit_message),
5010 _ => Ok(__FieldTag::Unknown(value.to_string())),
5011 }
5012 }
5013 }
5014 deserializer.deserialize_identifier(Visitor)
5015 }
5016 }
5017 struct Visitor;
5018 impl<'de> serde::de::Visitor<'de> for Visitor {
5019 type Value = CommitMetadata;
5020 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5021 formatter.write_str("struct CommitMetadata")
5022 }
5023 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5024 where
5025 A: serde::de::MapAccess<'de>,
5026 {
5027 #[allow(unused_imports)]
5028 use serde::de::Error;
5029 use std::option::Option::Some;
5030 let mut fields = std::collections::HashSet::new();
5031 let mut result = Self::Value::new();
5032 while let Some(tag) = map.next_key::<__FieldTag>()? {
5033 #[allow(clippy::match_single_binding)]
5034 match tag {
5035 __FieldTag::__author => {
5036 if !fields.insert(__FieldTag::__author) {
5037 return std::result::Result::Err(A::Error::duplicate_field(
5038 "multiple values for author",
5039 ));
5040 }
5041 result.author = map
5042 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
5043 }
5044 __FieldTag::__commit_message => {
5045 if !fields.insert(__FieldTag::__commit_message) {
5046 return std::result::Result::Err(A::Error::duplicate_field(
5047 "multiple values for commit_message",
5048 ));
5049 }
5050 result.commit_message = map
5051 .next_value::<std::option::Option<std::string::String>>()?
5052 .unwrap_or_default();
5053 }
5054 __FieldTag::Unknown(key) => {
5055 let value = map.next_value::<serde_json::Value>()?;
5056 result._unknown_fields.insert(key, value);
5057 }
5058 }
5059 }
5060 std::result::Result::Ok(result)
5061 }
5062 }
5063 deserializer.deserialize_any(Visitor)
5064 }
5065}
5066
5067#[doc(hidden)]
5068impl serde::ser::Serialize for CommitMetadata {
5069 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5070 where
5071 S: serde::ser::Serializer,
5072 {
5073 use serde::ser::SerializeMap;
5074 #[allow(unused_imports)]
5075 use std::option::Option::Some;
5076 let mut state = serializer.serialize_map(std::option::Option::None)?;
5077 if self.author.is_some() {
5078 state.serialize_entry("author", &self.author)?;
5079 }
5080 if !self.commit_message.is_empty() {
5081 state.serialize_entry("commitMessage", &self.commit_message)?;
5082 }
5083 if !self._unknown_fields.is_empty() {
5084 for (key, value) in self._unknown_fields.iter() {
5085 state.serialize_entry(key, &value)?;
5086 }
5087 }
5088 state.end()
5089 }
5090}
5091
5092#[derive(Clone, Debug, Default, PartialEq)]
5094#[non_exhaustive]
5095pub struct ComputeRepositoryAccessTokenStatusRequest {
5096 pub name: std::string::String,
5098
5099 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5100}
5101
5102impl ComputeRepositoryAccessTokenStatusRequest {
5103 pub fn new() -> Self {
5104 std::default::Default::default()
5105 }
5106
5107 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5109 self.name = v.into();
5110 self
5111 }
5112}
5113
5114impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
5115 fn typename() -> &'static str {
5116 "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
5117 }
5118}
5119
5120#[doc(hidden)]
5121impl<'de> serde::de::Deserialize<'de> for ComputeRepositoryAccessTokenStatusRequest {
5122 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5123 where
5124 D: serde::Deserializer<'de>,
5125 {
5126 #[allow(non_camel_case_types)]
5127 #[doc(hidden)]
5128 #[derive(PartialEq, Eq, Hash)]
5129 enum __FieldTag {
5130 __name,
5131 Unknown(std::string::String),
5132 }
5133 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5134 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5135 where
5136 D: serde::Deserializer<'de>,
5137 {
5138 struct Visitor;
5139 impl<'de> serde::de::Visitor<'de> for Visitor {
5140 type Value = __FieldTag;
5141 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5142 formatter
5143 .write_str("a field name for ComputeRepositoryAccessTokenStatusRequest")
5144 }
5145 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5146 where
5147 E: serde::de::Error,
5148 {
5149 use std::result::Result::Ok;
5150 use std::string::ToString;
5151 match value {
5152 "name" => Ok(__FieldTag::__name),
5153 _ => Ok(__FieldTag::Unknown(value.to_string())),
5154 }
5155 }
5156 }
5157 deserializer.deserialize_identifier(Visitor)
5158 }
5159 }
5160 struct Visitor;
5161 impl<'de> serde::de::Visitor<'de> for Visitor {
5162 type Value = ComputeRepositoryAccessTokenStatusRequest;
5163 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5164 formatter.write_str("struct ComputeRepositoryAccessTokenStatusRequest")
5165 }
5166 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5167 where
5168 A: serde::de::MapAccess<'de>,
5169 {
5170 #[allow(unused_imports)]
5171 use serde::de::Error;
5172 use std::option::Option::Some;
5173 let mut fields = std::collections::HashSet::new();
5174 let mut result = Self::Value::new();
5175 while let Some(tag) = map.next_key::<__FieldTag>()? {
5176 #[allow(clippy::match_single_binding)]
5177 match tag {
5178 __FieldTag::__name => {
5179 if !fields.insert(__FieldTag::__name) {
5180 return std::result::Result::Err(A::Error::duplicate_field(
5181 "multiple values for name",
5182 ));
5183 }
5184 result.name = map
5185 .next_value::<std::option::Option<std::string::String>>()?
5186 .unwrap_or_default();
5187 }
5188 __FieldTag::Unknown(key) => {
5189 let value = map.next_value::<serde_json::Value>()?;
5190 result._unknown_fields.insert(key, value);
5191 }
5192 }
5193 }
5194 std::result::Result::Ok(result)
5195 }
5196 }
5197 deserializer.deserialize_any(Visitor)
5198 }
5199}
5200
5201#[doc(hidden)]
5202impl serde::ser::Serialize for ComputeRepositoryAccessTokenStatusRequest {
5203 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5204 where
5205 S: serde::ser::Serializer,
5206 {
5207 use serde::ser::SerializeMap;
5208 #[allow(unused_imports)]
5209 use std::option::Option::Some;
5210 let mut state = serializer.serialize_map(std::option::Option::None)?;
5211 if !self.name.is_empty() {
5212 state.serialize_entry("name", &self.name)?;
5213 }
5214 if !self._unknown_fields.is_empty() {
5215 for (key, value) in self._unknown_fields.iter() {
5216 state.serialize_entry(key, &value)?;
5217 }
5218 }
5219 state.end()
5220 }
5221}
5222
5223#[derive(Clone, Debug, Default, PartialEq)]
5225#[non_exhaustive]
5226pub struct ComputeRepositoryAccessTokenStatusResponse {
5227 pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
5229
5230 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5231}
5232
5233impl ComputeRepositoryAccessTokenStatusResponse {
5234 pub fn new() -> Self {
5235 std::default::Default::default()
5236 }
5237
5238 pub fn set_token_status<
5240 T: std::convert::Into<
5241 crate::model::compute_repository_access_token_status_response::TokenStatus,
5242 >,
5243 >(
5244 mut self,
5245 v: T,
5246 ) -> Self {
5247 self.token_status = v.into();
5248 self
5249 }
5250}
5251
5252impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
5253 fn typename() -> &'static str {
5254 "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
5255 }
5256}
5257
5258#[doc(hidden)]
5259impl<'de> serde::de::Deserialize<'de> for ComputeRepositoryAccessTokenStatusResponse {
5260 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5261 where
5262 D: serde::Deserializer<'de>,
5263 {
5264 #[allow(non_camel_case_types)]
5265 #[doc(hidden)]
5266 #[derive(PartialEq, Eq, Hash)]
5267 enum __FieldTag {
5268 __token_status,
5269 Unknown(std::string::String),
5270 }
5271 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5272 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5273 where
5274 D: serde::Deserializer<'de>,
5275 {
5276 struct Visitor;
5277 impl<'de> serde::de::Visitor<'de> for Visitor {
5278 type Value = __FieldTag;
5279 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5280 formatter.write_str(
5281 "a field name for ComputeRepositoryAccessTokenStatusResponse",
5282 )
5283 }
5284 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5285 where
5286 E: serde::de::Error,
5287 {
5288 use std::result::Result::Ok;
5289 use std::string::ToString;
5290 match value {
5291 "tokenStatus" => Ok(__FieldTag::__token_status),
5292 "token_status" => Ok(__FieldTag::__token_status),
5293 _ => Ok(__FieldTag::Unknown(value.to_string())),
5294 }
5295 }
5296 }
5297 deserializer.deserialize_identifier(Visitor)
5298 }
5299 }
5300 struct Visitor;
5301 impl<'de> serde::de::Visitor<'de> for Visitor {
5302 type Value = ComputeRepositoryAccessTokenStatusResponse;
5303 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5304 formatter.write_str("struct ComputeRepositoryAccessTokenStatusResponse")
5305 }
5306 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5307 where
5308 A: serde::de::MapAccess<'de>,
5309 {
5310 #[allow(unused_imports)]
5311 use serde::de::Error;
5312 use std::option::Option::Some;
5313 let mut fields = std::collections::HashSet::new();
5314 let mut result = Self::Value::new();
5315 while let Some(tag) = map.next_key::<__FieldTag>()? {
5316 #[allow(clippy::match_single_binding)]
5317 match tag {
5318 __FieldTag::__token_status => {
5319 if !fields.insert(__FieldTag::__token_status) {
5320 return std::result::Result::Err(A::Error::duplicate_field(
5321 "multiple values for token_status",
5322 ));
5323 }
5324 result.token_status = map.next_value::<std::option::Option<crate::model::compute_repository_access_token_status_response::TokenStatus>>()?.unwrap_or_default();
5325 }
5326 __FieldTag::Unknown(key) => {
5327 let value = map.next_value::<serde_json::Value>()?;
5328 result._unknown_fields.insert(key, value);
5329 }
5330 }
5331 }
5332 std::result::Result::Ok(result)
5333 }
5334 }
5335 deserializer.deserialize_any(Visitor)
5336 }
5337}
5338
5339#[doc(hidden)]
5340impl serde::ser::Serialize for ComputeRepositoryAccessTokenStatusResponse {
5341 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5342 where
5343 S: serde::ser::Serializer,
5344 {
5345 use serde::ser::SerializeMap;
5346 #[allow(unused_imports)]
5347 use std::option::Option::Some;
5348 let mut state = serializer.serialize_map(std::option::Option::None)?;
5349 if !wkt::internal::is_default(&self.token_status) {
5350 state.serialize_entry("tokenStatus", &self.token_status)?;
5351 }
5352 if !self._unknown_fields.is_empty() {
5353 for (key, value) in self._unknown_fields.iter() {
5354 state.serialize_entry(key, &value)?;
5355 }
5356 }
5357 state.end()
5358 }
5359}
5360
5361pub mod compute_repository_access_token_status_response {
5363 #[allow(unused_imports)]
5364 use super::*;
5365
5366 #[derive(Clone, Debug, PartialEq)]
5382 #[non_exhaustive]
5383 pub enum TokenStatus {
5384 Unspecified,
5386 NotFound,
5389 Invalid,
5391 Valid,
5393 UnknownValue(token_status::UnknownValue),
5398 }
5399
5400 #[doc(hidden)]
5401 pub mod token_status {
5402 #[allow(unused_imports)]
5403 use super::*;
5404 #[derive(Clone, Debug, PartialEq)]
5405 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5406 }
5407
5408 impl TokenStatus {
5409 pub fn value(&self) -> std::option::Option<i32> {
5414 match self {
5415 Self::Unspecified => std::option::Option::Some(0),
5416 Self::NotFound => std::option::Option::Some(1),
5417 Self::Invalid => std::option::Option::Some(2),
5418 Self::Valid => std::option::Option::Some(3),
5419 Self::UnknownValue(u) => u.0.value(),
5420 }
5421 }
5422
5423 pub fn name(&self) -> std::option::Option<&str> {
5428 match self {
5429 Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
5430 Self::NotFound => std::option::Option::Some("NOT_FOUND"),
5431 Self::Invalid => std::option::Option::Some("INVALID"),
5432 Self::Valid => std::option::Option::Some("VALID"),
5433 Self::UnknownValue(u) => u.0.name(),
5434 }
5435 }
5436 }
5437
5438 impl std::default::Default for TokenStatus {
5439 fn default() -> Self {
5440 use std::convert::From;
5441 Self::from(0)
5442 }
5443 }
5444
5445 impl std::fmt::Display for TokenStatus {
5446 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5447 wkt::internal::display_enum(f, self.name(), self.value())
5448 }
5449 }
5450
5451 impl std::convert::From<i32> for TokenStatus {
5452 fn from(value: i32) -> Self {
5453 match value {
5454 0 => Self::Unspecified,
5455 1 => Self::NotFound,
5456 2 => Self::Invalid,
5457 3 => Self::Valid,
5458 _ => Self::UnknownValue(token_status::UnknownValue(
5459 wkt::internal::UnknownEnumValue::Integer(value),
5460 )),
5461 }
5462 }
5463 }
5464
5465 impl std::convert::From<&str> for TokenStatus {
5466 fn from(value: &str) -> Self {
5467 use std::string::ToString;
5468 match value {
5469 "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
5470 "NOT_FOUND" => Self::NotFound,
5471 "INVALID" => Self::Invalid,
5472 "VALID" => Self::Valid,
5473 _ => Self::UnknownValue(token_status::UnknownValue(
5474 wkt::internal::UnknownEnumValue::String(value.to_string()),
5475 )),
5476 }
5477 }
5478 }
5479
5480 impl serde::ser::Serialize for TokenStatus {
5481 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5482 where
5483 S: serde::Serializer,
5484 {
5485 match self {
5486 Self::Unspecified => serializer.serialize_i32(0),
5487 Self::NotFound => serializer.serialize_i32(1),
5488 Self::Invalid => serializer.serialize_i32(2),
5489 Self::Valid => serializer.serialize_i32(3),
5490 Self::UnknownValue(u) => u.0.serialize(serializer),
5491 }
5492 }
5493 }
5494
5495 impl<'de> serde::de::Deserialize<'de> for TokenStatus {
5496 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5497 where
5498 D: serde::Deserializer<'de>,
5499 {
5500 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
5501 ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
5502 ))
5503 }
5504 }
5505}
5506
5507#[derive(Clone, Debug, Default, PartialEq)]
5509#[non_exhaustive]
5510pub struct FetchRemoteBranchesRequest {
5511 pub name: std::string::String,
5513
5514 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5515}
5516
5517impl FetchRemoteBranchesRequest {
5518 pub fn new() -> Self {
5519 std::default::Default::default()
5520 }
5521
5522 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5524 self.name = v.into();
5525 self
5526 }
5527}
5528
5529impl wkt::message::Message for FetchRemoteBranchesRequest {
5530 fn typename() -> &'static str {
5531 "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
5532 }
5533}
5534
5535#[doc(hidden)]
5536impl<'de> serde::de::Deserialize<'de> for FetchRemoteBranchesRequest {
5537 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5538 where
5539 D: serde::Deserializer<'de>,
5540 {
5541 #[allow(non_camel_case_types)]
5542 #[doc(hidden)]
5543 #[derive(PartialEq, Eq, Hash)]
5544 enum __FieldTag {
5545 __name,
5546 Unknown(std::string::String),
5547 }
5548 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5549 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5550 where
5551 D: serde::Deserializer<'de>,
5552 {
5553 struct Visitor;
5554 impl<'de> serde::de::Visitor<'de> for Visitor {
5555 type Value = __FieldTag;
5556 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5557 formatter.write_str("a field name for FetchRemoteBranchesRequest")
5558 }
5559 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5560 where
5561 E: serde::de::Error,
5562 {
5563 use std::result::Result::Ok;
5564 use std::string::ToString;
5565 match value {
5566 "name" => Ok(__FieldTag::__name),
5567 _ => Ok(__FieldTag::Unknown(value.to_string())),
5568 }
5569 }
5570 }
5571 deserializer.deserialize_identifier(Visitor)
5572 }
5573 }
5574 struct Visitor;
5575 impl<'de> serde::de::Visitor<'de> for Visitor {
5576 type Value = FetchRemoteBranchesRequest;
5577 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5578 formatter.write_str("struct FetchRemoteBranchesRequest")
5579 }
5580 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5581 where
5582 A: serde::de::MapAccess<'de>,
5583 {
5584 #[allow(unused_imports)]
5585 use serde::de::Error;
5586 use std::option::Option::Some;
5587 let mut fields = std::collections::HashSet::new();
5588 let mut result = Self::Value::new();
5589 while let Some(tag) = map.next_key::<__FieldTag>()? {
5590 #[allow(clippy::match_single_binding)]
5591 match tag {
5592 __FieldTag::__name => {
5593 if !fields.insert(__FieldTag::__name) {
5594 return std::result::Result::Err(A::Error::duplicate_field(
5595 "multiple values for name",
5596 ));
5597 }
5598 result.name = map
5599 .next_value::<std::option::Option<std::string::String>>()?
5600 .unwrap_or_default();
5601 }
5602 __FieldTag::Unknown(key) => {
5603 let value = map.next_value::<serde_json::Value>()?;
5604 result._unknown_fields.insert(key, value);
5605 }
5606 }
5607 }
5608 std::result::Result::Ok(result)
5609 }
5610 }
5611 deserializer.deserialize_any(Visitor)
5612 }
5613}
5614
5615#[doc(hidden)]
5616impl serde::ser::Serialize for FetchRemoteBranchesRequest {
5617 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5618 where
5619 S: serde::ser::Serializer,
5620 {
5621 use serde::ser::SerializeMap;
5622 #[allow(unused_imports)]
5623 use std::option::Option::Some;
5624 let mut state = serializer.serialize_map(std::option::Option::None)?;
5625 if !self.name.is_empty() {
5626 state.serialize_entry("name", &self.name)?;
5627 }
5628 if !self._unknown_fields.is_empty() {
5629 for (key, value) in self._unknown_fields.iter() {
5630 state.serialize_entry(key, &value)?;
5631 }
5632 }
5633 state.end()
5634 }
5635}
5636
5637#[derive(Clone, Debug, Default, PartialEq)]
5639#[non_exhaustive]
5640pub struct FetchRemoteBranchesResponse {
5641 pub branches: std::vec::Vec<std::string::String>,
5643
5644 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5645}
5646
5647impl FetchRemoteBranchesResponse {
5648 pub fn new() -> Self {
5649 std::default::Default::default()
5650 }
5651
5652 pub fn set_branches<T, V>(mut self, v: T) -> Self
5654 where
5655 T: std::iter::IntoIterator<Item = V>,
5656 V: std::convert::Into<std::string::String>,
5657 {
5658 use std::iter::Iterator;
5659 self.branches = v.into_iter().map(|i| i.into()).collect();
5660 self
5661 }
5662}
5663
5664impl wkt::message::Message for FetchRemoteBranchesResponse {
5665 fn typename() -> &'static str {
5666 "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
5667 }
5668}
5669
5670#[doc(hidden)]
5671impl<'de> serde::de::Deserialize<'de> for FetchRemoteBranchesResponse {
5672 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5673 where
5674 D: serde::Deserializer<'de>,
5675 {
5676 #[allow(non_camel_case_types)]
5677 #[doc(hidden)]
5678 #[derive(PartialEq, Eq, Hash)]
5679 enum __FieldTag {
5680 __branches,
5681 Unknown(std::string::String),
5682 }
5683 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5684 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5685 where
5686 D: serde::Deserializer<'de>,
5687 {
5688 struct Visitor;
5689 impl<'de> serde::de::Visitor<'de> for Visitor {
5690 type Value = __FieldTag;
5691 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5692 formatter.write_str("a field name for FetchRemoteBranchesResponse")
5693 }
5694 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5695 where
5696 E: serde::de::Error,
5697 {
5698 use std::result::Result::Ok;
5699 use std::string::ToString;
5700 match value {
5701 "branches" => Ok(__FieldTag::__branches),
5702 _ => Ok(__FieldTag::Unknown(value.to_string())),
5703 }
5704 }
5705 }
5706 deserializer.deserialize_identifier(Visitor)
5707 }
5708 }
5709 struct Visitor;
5710 impl<'de> serde::de::Visitor<'de> for Visitor {
5711 type Value = FetchRemoteBranchesResponse;
5712 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5713 formatter.write_str("struct FetchRemoteBranchesResponse")
5714 }
5715 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5716 where
5717 A: serde::de::MapAccess<'de>,
5718 {
5719 #[allow(unused_imports)]
5720 use serde::de::Error;
5721 use std::option::Option::Some;
5722 let mut fields = std::collections::HashSet::new();
5723 let mut result = Self::Value::new();
5724 while let Some(tag) = map.next_key::<__FieldTag>()? {
5725 #[allow(clippy::match_single_binding)]
5726 match tag {
5727 __FieldTag::__branches => {
5728 if !fields.insert(__FieldTag::__branches) {
5729 return std::result::Result::Err(A::Error::duplicate_field(
5730 "multiple values for branches",
5731 ));
5732 }
5733 result.branches = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
5734 }
5735 __FieldTag::Unknown(key) => {
5736 let value = map.next_value::<serde_json::Value>()?;
5737 result._unknown_fields.insert(key, value);
5738 }
5739 }
5740 }
5741 std::result::Result::Ok(result)
5742 }
5743 }
5744 deserializer.deserialize_any(Visitor)
5745 }
5746}
5747
5748#[doc(hidden)]
5749impl serde::ser::Serialize for FetchRemoteBranchesResponse {
5750 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5751 where
5752 S: serde::ser::Serializer,
5753 {
5754 use serde::ser::SerializeMap;
5755 #[allow(unused_imports)]
5756 use std::option::Option::Some;
5757 let mut state = serializer.serialize_map(std::option::Option::None)?;
5758 if !self.branches.is_empty() {
5759 state.serialize_entry("branches", &self.branches)?;
5760 }
5761 if !self._unknown_fields.is_empty() {
5762 for (key, value) in self._unknown_fields.iter() {
5763 state.serialize_entry(key, &value)?;
5764 }
5765 }
5766 state.end()
5767 }
5768}
5769
5770#[derive(Clone, Debug, Default, PartialEq)]
5772#[non_exhaustive]
5773pub struct Workspace {
5774 pub name: std::string::String,
5776
5777 pub create_time: std::option::Option<wkt::Timestamp>,
5779
5780 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
5783
5784 pub internal_metadata: std::option::Option<std::string::String>,
5788
5789 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5790}
5791
5792impl Workspace {
5793 pub fn new() -> Self {
5794 std::default::Default::default()
5795 }
5796
5797 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5799 self.name = v.into();
5800 self
5801 }
5802
5803 pub fn set_create_time<T>(mut self, v: T) -> Self
5805 where
5806 T: std::convert::Into<wkt::Timestamp>,
5807 {
5808 self.create_time = std::option::Option::Some(v.into());
5809 self
5810 }
5811
5812 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5814 where
5815 T: std::convert::Into<wkt::Timestamp>,
5816 {
5817 self.create_time = v.map(|x| x.into());
5818 self
5819 }
5820
5821 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
5823 where
5824 T: std::convert::Into<crate::model::DataEncryptionState>,
5825 {
5826 self.data_encryption_state = std::option::Option::Some(v.into());
5827 self
5828 }
5829
5830 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
5832 where
5833 T: std::convert::Into<crate::model::DataEncryptionState>,
5834 {
5835 self.data_encryption_state = v.map(|x| x.into());
5836 self
5837 }
5838
5839 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
5841 where
5842 T: std::convert::Into<std::string::String>,
5843 {
5844 self.internal_metadata = std::option::Option::Some(v.into());
5845 self
5846 }
5847
5848 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5850 where
5851 T: std::convert::Into<std::string::String>,
5852 {
5853 self.internal_metadata = v.map(|x| x.into());
5854 self
5855 }
5856}
5857
5858impl wkt::message::Message for Workspace {
5859 fn typename() -> &'static str {
5860 "type.googleapis.com/google.cloud.dataform.v1.Workspace"
5861 }
5862}
5863
5864#[doc(hidden)]
5865impl<'de> serde::de::Deserialize<'de> for Workspace {
5866 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5867 where
5868 D: serde::Deserializer<'de>,
5869 {
5870 #[allow(non_camel_case_types)]
5871 #[doc(hidden)]
5872 #[derive(PartialEq, Eq, Hash)]
5873 enum __FieldTag {
5874 __name,
5875 __create_time,
5876 __data_encryption_state,
5877 __internal_metadata,
5878 Unknown(std::string::String),
5879 }
5880 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5881 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5882 where
5883 D: serde::Deserializer<'de>,
5884 {
5885 struct Visitor;
5886 impl<'de> serde::de::Visitor<'de> for Visitor {
5887 type Value = __FieldTag;
5888 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5889 formatter.write_str("a field name for Workspace")
5890 }
5891 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5892 where
5893 E: serde::de::Error,
5894 {
5895 use std::result::Result::Ok;
5896 use std::string::ToString;
5897 match value {
5898 "name" => Ok(__FieldTag::__name),
5899 "createTime" => Ok(__FieldTag::__create_time),
5900 "create_time" => Ok(__FieldTag::__create_time),
5901 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
5902 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
5903 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
5904 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
5905 _ => Ok(__FieldTag::Unknown(value.to_string())),
5906 }
5907 }
5908 }
5909 deserializer.deserialize_identifier(Visitor)
5910 }
5911 }
5912 struct Visitor;
5913 impl<'de> serde::de::Visitor<'de> for Visitor {
5914 type Value = Workspace;
5915 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5916 formatter.write_str("struct Workspace")
5917 }
5918 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5919 where
5920 A: serde::de::MapAccess<'de>,
5921 {
5922 #[allow(unused_imports)]
5923 use serde::de::Error;
5924 use std::option::Option::Some;
5925 let mut fields = std::collections::HashSet::new();
5926 let mut result = Self::Value::new();
5927 while let Some(tag) = map.next_key::<__FieldTag>()? {
5928 #[allow(clippy::match_single_binding)]
5929 match tag {
5930 __FieldTag::__name => {
5931 if !fields.insert(__FieldTag::__name) {
5932 return std::result::Result::Err(A::Error::duplicate_field(
5933 "multiple values for name",
5934 ));
5935 }
5936 result.name = map
5937 .next_value::<std::option::Option<std::string::String>>()?
5938 .unwrap_or_default();
5939 }
5940 __FieldTag::__create_time => {
5941 if !fields.insert(__FieldTag::__create_time) {
5942 return std::result::Result::Err(A::Error::duplicate_field(
5943 "multiple values for create_time",
5944 ));
5945 }
5946 result.create_time =
5947 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
5948 }
5949 __FieldTag::__data_encryption_state => {
5950 if !fields.insert(__FieldTag::__data_encryption_state) {
5951 return std::result::Result::Err(A::Error::duplicate_field(
5952 "multiple values for data_encryption_state",
5953 ));
5954 }
5955 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
5956 ;
5957 }
5958 __FieldTag::__internal_metadata => {
5959 if !fields.insert(__FieldTag::__internal_metadata) {
5960 return std::result::Result::Err(A::Error::duplicate_field(
5961 "multiple values for internal_metadata",
5962 ));
5963 }
5964 result.internal_metadata =
5965 map.next_value::<std::option::Option<std::string::String>>()?;
5966 }
5967 __FieldTag::Unknown(key) => {
5968 let value = map.next_value::<serde_json::Value>()?;
5969 result._unknown_fields.insert(key, value);
5970 }
5971 }
5972 }
5973 std::result::Result::Ok(result)
5974 }
5975 }
5976 deserializer.deserialize_any(Visitor)
5977 }
5978}
5979
5980#[doc(hidden)]
5981impl serde::ser::Serialize for Workspace {
5982 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5983 where
5984 S: serde::ser::Serializer,
5985 {
5986 use serde::ser::SerializeMap;
5987 #[allow(unused_imports)]
5988 use std::option::Option::Some;
5989 let mut state = serializer.serialize_map(std::option::Option::None)?;
5990 if !self.name.is_empty() {
5991 state.serialize_entry("name", &self.name)?;
5992 }
5993 if self.create_time.is_some() {
5994 state.serialize_entry("createTime", &self.create_time)?;
5995 }
5996 if self.data_encryption_state.is_some() {
5997 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
5998 }
5999 if self.internal_metadata.is_some() {
6000 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
6001 }
6002 if !self._unknown_fields.is_empty() {
6003 for (key, value) in self._unknown_fields.iter() {
6004 state.serialize_entry(key, &value)?;
6005 }
6006 }
6007 state.end()
6008 }
6009}
6010
6011#[derive(Clone, Debug, Default, PartialEq)]
6013#[non_exhaustive]
6014pub struct ListWorkspacesRequest {
6015 pub parent: std::string::String,
6018
6019 pub page_size: i32,
6023
6024 pub page_token: std::string::String,
6031
6032 pub order_by: std::string::String,
6036
6037 pub filter: std::string::String,
6039
6040 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6041}
6042
6043impl ListWorkspacesRequest {
6044 pub fn new() -> Self {
6045 std::default::Default::default()
6046 }
6047
6048 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6050 self.parent = v.into();
6051 self
6052 }
6053
6054 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6056 self.page_size = v.into();
6057 self
6058 }
6059
6060 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6062 self.page_token = v.into();
6063 self
6064 }
6065
6066 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6068 self.order_by = v.into();
6069 self
6070 }
6071
6072 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6074 self.filter = v.into();
6075 self
6076 }
6077}
6078
6079impl wkt::message::Message for ListWorkspacesRequest {
6080 fn typename() -> &'static str {
6081 "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
6082 }
6083}
6084
6085#[doc(hidden)]
6086impl<'de> serde::de::Deserialize<'de> for ListWorkspacesRequest {
6087 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6088 where
6089 D: serde::Deserializer<'de>,
6090 {
6091 #[allow(non_camel_case_types)]
6092 #[doc(hidden)]
6093 #[derive(PartialEq, Eq, Hash)]
6094 enum __FieldTag {
6095 __parent,
6096 __page_size,
6097 __page_token,
6098 __order_by,
6099 __filter,
6100 Unknown(std::string::String),
6101 }
6102 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6103 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6104 where
6105 D: serde::Deserializer<'de>,
6106 {
6107 struct Visitor;
6108 impl<'de> serde::de::Visitor<'de> for Visitor {
6109 type Value = __FieldTag;
6110 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6111 formatter.write_str("a field name for ListWorkspacesRequest")
6112 }
6113 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6114 where
6115 E: serde::de::Error,
6116 {
6117 use std::result::Result::Ok;
6118 use std::string::ToString;
6119 match value {
6120 "parent" => Ok(__FieldTag::__parent),
6121 "pageSize" => Ok(__FieldTag::__page_size),
6122 "page_size" => Ok(__FieldTag::__page_size),
6123 "pageToken" => Ok(__FieldTag::__page_token),
6124 "page_token" => Ok(__FieldTag::__page_token),
6125 "orderBy" => Ok(__FieldTag::__order_by),
6126 "order_by" => Ok(__FieldTag::__order_by),
6127 "filter" => Ok(__FieldTag::__filter),
6128 _ => Ok(__FieldTag::Unknown(value.to_string())),
6129 }
6130 }
6131 }
6132 deserializer.deserialize_identifier(Visitor)
6133 }
6134 }
6135 struct Visitor;
6136 impl<'de> serde::de::Visitor<'de> for Visitor {
6137 type Value = ListWorkspacesRequest;
6138 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6139 formatter.write_str("struct ListWorkspacesRequest")
6140 }
6141 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6142 where
6143 A: serde::de::MapAccess<'de>,
6144 {
6145 #[allow(unused_imports)]
6146 use serde::de::Error;
6147 use std::option::Option::Some;
6148 let mut fields = std::collections::HashSet::new();
6149 let mut result = Self::Value::new();
6150 while let Some(tag) = map.next_key::<__FieldTag>()? {
6151 #[allow(clippy::match_single_binding)]
6152 match tag {
6153 __FieldTag::__parent => {
6154 if !fields.insert(__FieldTag::__parent) {
6155 return std::result::Result::Err(A::Error::duplicate_field(
6156 "multiple values for parent",
6157 ));
6158 }
6159 result.parent = map
6160 .next_value::<std::option::Option<std::string::String>>()?
6161 .unwrap_or_default();
6162 }
6163 __FieldTag::__page_size => {
6164 if !fields.insert(__FieldTag::__page_size) {
6165 return std::result::Result::Err(A::Error::duplicate_field(
6166 "multiple values for page_size",
6167 ));
6168 }
6169 struct __With(std::option::Option<i32>);
6170 impl<'de> serde::de::Deserialize<'de> for __With {
6171 fn deserialize<D>(
6172 deserializer: D,
6173 ) -> std::result::Result<Self, D::Error>
6174 where
6175 D: serde::de::Deserializer<'de>,
6176 {
6177 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
6178 }
6179 }
6180 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
6181 }
6182 __FieldTag::__page_token => {
6183 if !fields.insert(__FieldTag::__page_token) {
6184 return std::result::Result::Err(A::Error::duplicate_field(
6185 "multiple values for page_token",
6186 ));
6187 }
6188 result.page_token = map
6189 .next_value::<std::option::Option<std::string::String>>()?
6190 .unwrap_or_default();
6191 }
6192 __FieldTag::__order_by => {
6193 if !fields.insert(__FieldTag::__order_by) {
6194 return std::result::Result::Err(A::Error::duplicate_field(
6195 "multiple values for order_by",
6196 ));
6197 }
6198 result.order_by = map
6199 .next_value::<std::option::Option<std::string::String>>()?
6200 .unwrap_or_default();
6201 }
6202 __FieldTag::__filter => {
6203 if !fields.insert(__FieldTag::__filter) {
6204 return std::result::Result::Err(A::Error::duplicate_field(
6205 "multiple values for filter",
6206 ));
6207 }
6208 result.filter = map
6209 .next_value::<std::option::Option<std::string::String>>()?
6210 .unwrap_or_default();
6211 }
6212 __FieldTag::Unknown(key) => {
6213 let value = map.next_value::<serde_json::Value>()?;
6214 result._unknown_fields.insert(key, value);
6215 }
6216 }
6217 }
6218 std::result::Result::Ok(result)
6219 }
6220 }
6221 deserializer.deserialize_any(Visitor)
6222 }
6223}
6224
6225#[doc(hidden)]
6226impl serde::ser::Serialize for ListWorkspacesRequest {
6227 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6228 where
6229 S: serde::ser::Serializer,
6230 {
6231 use serde::ser::SerializeMap;
6232 #[allow(unused_imports)]
6233 use std::option::Option::Some;
6234 let mut state = serializer.serialize_map(std::option::Option::None)?;
6235 if !self.parent.is_empty() {
6236 state.serialize_entry("parent", &self.parent)?;
6237 }
6238 if !wkt::internal::is_default(&self.page_size) {
6239 struct __With<'a>(&'a i32);
6240 impl<'a> serde::ser::Serialize for __With<'a> {
6241 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6242 where
6243 S: serde::ser::Serializer,
6244 {
6245 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
6246 }
6247 }
6248 state.serialize_entry("pageSize", &__With(&self.page_size))?;
6249 }
6250 if !self.page_token.is_empty() {
6251 state.serialize_entry("pageToken", &self.page_token)?;
6252 }
6253 if !self.order_by.is_empty() {
6254 state.serialize_entry("orderBy", &self.order_by)?;
6255 }
6256 if !self.filter.is_empty() {
6257 state.serialize_entry("filter", &self.filter)?;
6258 }
6259 if !self._unknown_fields.is_empty() {
6260 for (key, value) in self._unknown_fields.iter() {
6261 state.serialize_entry(key, &value)?;
6262 }
6263 }
6264 state.end()
6265 }
6266}
6267
6268#[derive(Clone, Debug, Default, PartialEq)]
6270#[non_exhaustive]
6271pub struct ListWorkspacesResponse {
6272 pub workspaces: std::vec::Vec<crate::model::Workspace>,
6274
6275 pub next_page_token: std::string::String,
6278
6279 pub unreachable: std::vec::Vec<std::string::String>,
6281
6282 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6283}
6284
6285impl ListWorkspacesResponse {
6286 pub fn new() -> Self {
6287 std::default::Default::default()
6288 }
6289
6290 pub fn set_workspaces<T, V>(mut self, v: T) -> Self
6292 where
6293 T: std::iter::IntoIterator<Item = V>,
6294 V: std::convert::Into<crate::model::Workspace>,
6295 {
6296 use std::iter::Iterator;
6297 self.workspaces = v.into_iter().map(|i| i.into()).collect();
6298 self
6299 }
6300
6301 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6303 self.next_page_token = v.into();
6304 self
6305 }
6306
6307 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6309 where
6310 T: std::iter::IntoIterator<Item = V>,
6311 V: std::convert::Into<std::string::String>,
6312 {
6313 use std::iter::Iterator;
6314 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6315 self
6316 }
6317}
6318
6319impl wkt::message::Message for ListWorkspacesResponse {
6320 fn typename() -> &'static str {
6321 "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
6322 }
6323}
6324
6325#[doc(hidden)]
6326impl gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
6327 type PageItem = crate::model::Workspace;
6328
6329 fn items(self) -> std::vec::Vec<Self::PageItem> {
6330 self.workspaces
6331 }
6332
6333 fn next_page_token(&self) -> std::string::String {
6334 use std::clone::Clone;
6335 self.next_page_token.clone()
6336 }
6337}
6338
6339#[doc(hidden)]
6340impl<'de> serde::de::Deserialize<'de> for ListWorkspacesResponse {
6341 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6342 where
6343 D: serde::Deserializer<'de>,
6344 {
6345 #[allow(non_camel_case_types)]
6346 #[doc(hidden)]
6347 #[derive(PartialEq, Eq, Hash)]
6348 enum __FieldTag {
6349 __workspaces,
6350 __next_page_token,
6351 __unreachable,
6352 Unknown(std::string::String),
6353 }
6354 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6355 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6356 where
6357 D: serde::Deserializer<'de>,
6358 {
6359 struct Visitor;
6360 impl<'de> serde::de::Visitor<'de> for Visitor {
6361 type Value = __FieldTag;
6362 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6363 formatter.write_str("a field name for ListWorkspacesResponse")
6364 }
6365 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6366 where
6367 E: serde::de::Error,
6368 {
6369 use std::result::Result::Ok;
6370 use std::string::ToString;
6371 match value {
6372 "workspaces" => Ok(__FieldTag::__workspaces),
6373 "nextPageToken" => Ok(__FieldTag::__next_page_token),
6374 "next_page_token" => Ok(__FieldTag::__next_page_token),
6375 "unreachable" => Ok(__FieldTag::__unreachable),
6376 _ => Ok(__FieldTag::Unknown(value.to_string())),
6377 }
6378 }
6379 }
6380 deserializer.deserialize_identifier(Visitor)
6381 }
6382 }
6383 struct Visitor;
6384 impl<'de> serde::de::Visitor<'de> for Visitor {
6385 type Value = ListWorkspacesResponse;
6386 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6387 formatter.write_str("struct ListWorkspacesResponse")
6388 }
6389 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6390 where
6391 A: serde::de::MapAccess<'de>,
6392 {
6393 #[allow(unused_imports)]
6394 use serde::de::Error;
6395 use std::option::Option::Some;
6396 let mut fields = std::collections::HashSet::new();
6397 let mut result = Self::Value::new();
6398 while let Some(tag) = map.next_key::<__FieldTag>()? {
6399 #[allow(clippy::match_single_binding)]
6400 match tag {
6401 __FieldTag::__workspaces => {
6402 if !fields.insert(__FieldTag::__workspaces) {
6403 return std::result::Result::Err(A::Error::duplicate_field(
6404 "multiple values for workspaces",
6405 ));
6406 }
6407 result.workspaces = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Workspace>>>()?.unwrap_or_default();
6408 }
6409 __FieldTag::__next_page_token => {
6410 if !fields.insert(__FieldTag::__next_page_token) {
6411 return std::result::Result::Err(A::Error::duplicate_field(
6412 "multiple values for next_page_token",
6413 ));
6414 }
6415 result.next_page_token = map
6416 .next_value::<std::option::Option<std::string::String>>()?
6417 .unwrap_or_default();
6418 }
6419 __FieldTag::__unreachable => {
6420 if !fields.insert(__FieldTag::__unreachable) {
6421 return std::result::Result::Err(A::Error::duplicate_field(
6422 "multiple values for unreachable",
6423 ));
6424 }
6425 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
6426 }
6427 __FieldTag::Unknown(key) => {
6428 let value = map.next_value::<serde_json::Value>()?;
6429 result._unknown_fields.insert(key, value);
6430 }
6431 }
6432 }
6433 std::result::Result::Ok(result)
6434 }
6435 }
6436 deserializer.deserialize_any(Visitor)
6437 }
6438}
6439
6440#[doc(hidden)]
6441impl serde::ser::Serialize for ListWorkspacesResponse {
6442 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6443 where
6444 S: serde::ser::Serializer,
6445 {
6446 use serde::ser::SerializeMap;
6447 #[allow(unused_imports)]
6448 use std::option::Option::Some;
6449 let mut state = serializer.serialize_map(std::option::Option::None)?;
6450 if !self.workspaces.is_empty() {
6451 state.serialize_entry("workspaces", &self.workspaces)?;
6452 }
6453 if !self.next_page_token.is_empty() {
6454 state.serialize_entry("nextPageToken", &self.next_page_token)?;
6455 }
6456 if !self.unreachable.is_empty() {
6457 state.serialize_entry("unreachable", &self.unreachable)?;
6458 }
6459 if !self._unknown_fields.is_empty() {
6460 for (key, value) in self._unknown_fields.iter() {
6461 state.serialize_entry(key, &value)?;
6462 }
6463 }
6464 state.end()
6465 }
6466}
6467
6468#[derive(Clone, Debug, Default, PartialEq)]
6470#[non_exhaustive]
6471pub struct GetWorkspaceRequest {
6472 pub name: std::string::String,
6474
6475 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6476}
6477
6478impl GetWorkspaceRequest {
6479 pub fn new() -> Self {
6480 std::default::Default::default()
6481 }
6482
6483 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6485 self.name = v.into();
6486 self
6487 }
6488}
6489
6490impl wkt::message::Message for GetWorkspaceRequest {
6491 fn typename() -> &'static str {
6492 "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
6493 }
6494}
6495
6496#[doc(hidden)]
6497impl<'de> serde::de::Deserialize<'de> for GetWorkspaceRequest {
6498 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6499 where
6500 D: serde::Deserializer<'de>,
6501 {
6502 #[allow(non_camel_case_types)]
6503 #[doc(hidden)]
6504 #[derive(PartialEq, Eq, Hash)]
6505 enum __FieldTag {
6506 __name,
6507 Unknown(std::string::String),
6508 }
6509 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6510 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6511 where
6512 D: serde::Deserializer<'de>,
6513 {
6514 struct Visitor;
6515 impl<'de> serde::de::Visitor<'de> for Visitor {
6516 type Value = __FieldTag;
6517 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6518 formatter.write_str("a field name for GetWorkspaceRequest")
6519 }
6520 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6521 where
6522 E: serde::de::Error,
6523 {
6524 use std::result::Result::Ok;
6525 use std::string::ToString;
6526 match value {
6527 "name" => Ok(__FieldTag::__name),
6528 _ => Ok(__FieldTag::Unknown(value.to_string())),
6529 }
6530 }
6531 }
6532 deserializer.deserialize_identifier(Visitor)
6533 }
6534 }
6535 struct Visitor;
6536 impl<'de> serde::de::Visitor<'de> for Visitor {
6537 type Value = GetWorkspaceRequest;
6538 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6539 formatter.write_str("struct GetWorkspaceRequest")
6540 }
6541 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6542 where
6543 A: serde::de::MapAccess<'de>,
6544 {
6545 #[allow(unused_imports)]
6546 use serde::de::Error;
6547 use std::option::Option::Some;
6548 let mut fields = std::collections::HashSet::new();
6549 let mut result = Self::Value::new();
6550 while let Some(tag) = map.next_key::<__FieldTag>()? {
6551 #[allow(clippy::match_single_binding)]
6552 match tag {
6553 __FieldTag::__name => {
6554 if !fields.insert(__FieldTag::__name) {
6555 return std::result::Result::Err(A::Error::duplicate_field(
6556 "multiple values for name",
6557 ));
6558 }
6559 result.name = map
6560 .next_value::<std::option::Option<std::string::String>>()?
6561 .unwrap_or_default();
6562 }
6563 __FieldTag::Unknown(key) => {
6564 let value = map.next_value::<serde_json::Value>()?;
6565 result._unknown_fields.insert(key, value);
6566 }
6567 }
6568 }
6569 std::result::Result::Ok(result)
6570 }
6571 }
6572 deserializer.deserialize_any(Visitor)
6573 }
6574}
6575
6576#[doc(hidden)]
6577impl serde::ser::Serialize for GetWorkspaceRequest {
6578 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6579 where
6580 S: serde::ser::Serializer,
6581 {
6582 use serde::ser::SerializeMap;
6583 #[allow(unused_imports)]
6584 use std::option::Option::Some;
6585 let mut state = serializer.serialize_map(std::option::Option::None)?;
6586 if !self.name.is_empty() {
6587 state.serialize_entry("name", &self.name)?;
6588 }
6589 if !self._unknown_fields.is_empty() {
6590 for (key, value) in self._unknown_fields.iter() {
6591 state.serialize_entry(key, &value)?;
6592 }
6593 }
6594 state.end()
6595 }
6596}
6597
6598#[derive(Clone, Debug, Default, PartialEq)]
6600#[non_exhaustive]
6601pub struct CreateWorkspaceRequest {
6602 pub parent: std::string::String,
6605
6606 pub workspace: std::option::Option<crate::model::Workspace>,
6608
6609 pub workspace_id: std::string::String,
6612
6613 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6614}
6615
6616impl CreateWorkspaceRequest {
6617 pub fn new() -> Self {
6618 std::default::Default::default()
6619 }
6620
6621 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6623 self.parent = v.into();
6624 self
6625 }
6626
6627 pub fn set_workspace<T>(mut self, v: T) -> Self
6629 where
6630 T: std::convert::Into<crate::model::Workspace>,
6631 {
6632 self.workspace = std::option::Option::Some(v.into());
6633 self
6634 }
6635
6636 pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
6638 where
6639 T: std::convert::Into<crate::model::Workspace>,
6640 {
6641 self.workspace = v.map(|x| x.into());
6642 self
6643 }
6644
6645 pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6647 self.workspace_id = v.into();
6648 self
6649 }
6650}
6651
6652impl wkt::message::Message for CreateWorkspaceRequest {
6653 fn typename() -> &'static str {
6654 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
6655 }
6656}
6657
6658#[doc(hidden)]
6659impl<'de> serde::de::Deserialize<'de> for CreateWorkspaceRequest {
6660 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6661 where
6662 D: serde::Deserializer<'de>,
6663 {
6664 #[allow(non_camel_case_types)]
6665 #[doc(hidden)]
6666 #[derive(PartialEq, Eq, Hash)]
6667 enum __FieldTag {
6668 __parent,
6669 __workspace,
6670 __workspace_id,
6671 Unknown(std::string::String),
6672 }
6673 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6674 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6675 where
6676 D: serde::Deserializer<'de>,
6677 {
6678 struct Visitor;
6679 impl<'de> serde::de::Visitor<'de> for Visitor {
6680 type Value = __FieldTag;
6681 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6682 formatter.write_str("a field name for CreateWorkspaceRequest")
6683 }
6684 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6685 where
6686 E: serde::de::Error,
6687 {
6688 use std::result::Result::Ok;
6689 use std::string::ToString;
6690 match value {
6691 "parent" => Ok(__FieldTag::__parent),
6692 "workspace" => Ok(__FieldTag::__workspace),
6693 "workspaceId" => Ok(__FieldTag::__workspace_id),
6694 "workspace_id" => Ok(__FieldTag::__workspace_id),
6695 _ => Ok(__FieldTag::Unknown(value.to_string())),
6696 }
6697 }
6698 }
6699 deserializer.deserialize_identifier(Visitor)
6700 }
6701 }
6702 struct Visitor;
6703 impl<'de> serde::de::Visitor<'de> for Visitor {
6704 type Value = CreateWorkspaceRequest;
6705 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6706 formatter.write_str("struct CreateWorkspaceRequest")
6707 }
6708 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6709 where
6710 A: serde::de::MapAccess<'de>,
6711 {
6712 #[allow(unused_imports)]
6713 use serde::de::Error;
6714 use std::option::Option::Some;
6715 let mut fields = std::collections::HashSet::new();
6716 let mut result = Self::Value::new();
6717 while let Some(tag) = map.next_key::<__FieldTag>()? {
6718 #[allow(clippy::match_single_binding)]
6719 match tag {
6720 __FieldTag::__parent => {
6721 if !fields.insert(__FieldTag::__parent) {
6722 return std::result::Result::Err(A::Error::duplicate_field(
6723 "multiple values for parent",
6724 ));
6725 }
6726 result.parent = map
6727 .next_value::<std::option::Option<std::string::String>>()?
6728 .unwrap_or_default();
6729 }
6730 __FieldTag::__workspace => {
6731 if !fields.insert(__FieldTag::__workspace) {
6732 return std::result::Result::Err(A::Error::duplicate_field(
6733 "multiple values for workspace",
6734 ));
6735 }
6736 result.workspace =
6737 map.next_value::<std::option::Option<crate::model::Workspace>>()?;
6738 }
6739 __FieldTag::__workspace_id => {
6740 if !fields.insert(__FieldTag::__workspace_id) {
6741 return std::result::Result::Err(A::Error::duplicate_field(
6742 "multiple values for workspace_id",
6743 ));
6744 }
6745 result.workspace_id = map
6746 .next_value::<std::option::Option<std::string::String>>()?
6747 .unwrap_or_default();
6748 }
6749 __FieldTag::Unknown(key) => {
6750 let value = map.next_value::<serde_json::Value>()?;
6751 result._unknown_fields.insert(key, value);
6752 }
6753 }
6754 }
6755 std::result::Result::Ok(result)
6756 }
6757 }
6758 deserializer.deserialize_any(Visitor)
6759 }
6760}
6761
6762#[doc(hidden)]
6763impl serde::ser::Serialize for CreateWorkspaceRequest {
6764 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6765 where
6766 S: serde::ser::Serializer,
6767 {
6768 use serde::ser::SerializeMap;
6769 #[allow(unused_imports)]
6770 use std::option::Option::Some;
6771 let mut state = serializer.serialize_map(std::option::Option::None)?;
6772 if !self.parent.is_empty() {
6773 state.serialize_entry("parent", &self.parent)?;
6774 }
6775 if self.workspace.is_some() {
6776 state.serialize_entry("workspace", &self.workspace)?;
6777 }
6778 if !self.workspace_id.is_empty() {
6779 state.serialize_entry("workspaceId", &self.workspace_id)?;
6780 }
6781 if !self._unknown_fields.is_empty() {
6782 for (key, value) in self._unknown_fields.iter() {
6783 state.serialize_entry(key, &value)?;
6784 }
6785 }
6786 state.end()
6787 }
6788}
6789
6790#[derive(Clone, Debug, Default, PartialEq)]
6792#[non_exhaustive]
6793pub struct DeleteWorkspaceRequest {
6794 pub name: std::string::String,
6796
6797 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6798}
6799
6800impl DeleteWorkspaceRequest {
6801 pub fn new() -> Self {
6802 std::default::Default::default()
6803 }
6804
6805 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6807 self.name = v.into();
6808 self
6809 }
6810}
6811
6812impl wkt::message::Message for DeleteWorkspaceRequest {
6813 fn typename() -> &'static str {
6814 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
6815 }
6816}
6817
6818#[doc(hidden)]
6819impl<'de> serde::de::Deserialize<'de> for DeleteWorkspaceRequest {
6820 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6821 where
6822 D: serde::Deserializer<'de>,
6823 {
6824 #[allow(non_camel_case_types)]
6825 #[doc(hidden)]
6826 #[derive(PartialEq, Eq, Hash)]
6827 enum __FieldTag {
6828 __name,
6829 Unknown(std::string::String),
6830 }
6831 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6832 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6833 where
6834 D: serde::Deserializer<'de>,
6835 {
6836 struct Visitor;
6837 impl<'de> serde::de::Visitor<'de> for Visitor {
6838 type Value = __FieldTag;
6839 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6840 formatter.write_str("a field name for DeleteWorkspaceRequest")
6841 }
6842 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6843 where
6844 E: serde::de::Error,
6845 {
6846 use std::result::Result::Ok;
6847 use std::string::ToString;
6848 match value {
6849 "name" => Ok(__FieldTag::__name),
6850 _ => Ok(__FieldTag::Unknown(value.to_string())),
6851 }
6852 }
6853 }
6854 deserializer.deserialize_identifier(Visitor)
6855 }
6856 }
6857 struct Visitor;
6858 impl<'de> serde::de::Visitor<'de> for Visitor {
6859 type Value = DeleteWorkspaceRequest;
6860 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6861 formatter.write_str("struct DeleteWorkspaceRequest")
6862 }
6863 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6864 where
6865 A: serde::de::MapAccess<'de>,
6866 {
6867 #[allow(unused_imports)]
6868 use serde::de::Error;
6869 use std::option::Option::Some;
6870 let mut fields = std::collections::HashSet::new();
6871 let mut result = Self::Value::new();
6872 while let Some(tag) = map.next_key::<__FieldTag>()? {
6873 #[allow(clippy::match_single_binding)]
6874 match tag {
6875 __FieldTag::__name => {
6876 if !fields.insert(__FieldTag::__name) {
6877 return std::result::Result::Err(A::Error::duplicate_field(
6878 "multiple values for name",
6879 ));
6880 }
6881 result.name = map
6882 .next_value::<std::option::Option<std::string::String>>()?
6883 .unwrap_or_default();
6884 }
6885 __FieldTag::Unknown(key) => {
6886 let value = map.next_value::<serde_json::Value>()?;
6887 result._unknown_fields.insert(key, value);
6888 }
6889 }
6890 }
6891 std::result::Result::Ok(result)
6892 }
6893 }
6894 deserializer.deserialize_any(Visitor)
6895 }
6896}
6897
6898#[doc(hidden)]
6899impl serde::ser::Serialize for DeleteWorkspaceRequest {
6900 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6901 where
6902 S: serde::ser::Serializer,
6903 {
6904 use serde::ser::SerializeMap;
6905 #[allow(unused_imports)]
6906 use std::option::Option::Some;
6907 let mut state = serializer.serialize_map(std::option::Option::None)?;
6908 if !self.name.is_empty() {
6909 state.serialize_entry("name", &self.name)?;
6910 }
6911 if !self._unknown_fields.is_empty() {
6912 for (key, value) in self._unknown_fields.iter() {
6913 state.serialize_entry(key, &value)?;
6914 }
6915 }
6916 state.end()
6917 }
6918}
6919
6920#[derive(Clone, Debug, Default, PartialEq)]
6922#[non_exhaustive]
6923pub struct CommitAuthor {
6924 pub name: std::string::String,
6926
6927 pub email_address: std::string::String,
6929
6930 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6931}
6932
6933impl CommitAuthor {
6934 pub fn new() -> Self {
6935 std::default::Default::default()
6936 }
6937
6938 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6940 self.name = v.into();
6941 self
6942 }
6943
6944 pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6946 self.email_address = v.into();
6947 self
6948 }
6949}
6950
6951impl wkt::message::Message for CommitAuthor {
6952 fn typename() -> &'static str {
6953 "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
6954 }
6955}
6956
6957#[doc(hidden)]
6958impl<'de> serde::de::Deserialize<'de> for CommitAuthor {
6959 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6960 where
6961 D: serde::Deserializer<'de>,
6962 {
6963 #[allow(non_camel_case_types)]
6964 #[doc(hidden)]
6965 #[derive(PartialEq, Eq, Hash)]
6966 enum __FieldTag {
6967 __name,
6968 __email_address,
6969 Unknown(std::string::String),
6970 }
6971 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6972 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6973 where
6974 D: serde::Deserializer<'de>,
6975 {
6976 struct Visitor;
6977 impl<'de> serde::de::Visitor<'de> for Visitor {
6978 type Value = __FieldTag;
6979 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6980 formatter.write_str("a field name for CommitAuthor")
6981 }
6982 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6983 where
6984 E: serde::de::Error,
6985 {
6986 use std::result::Result::Ok;
6987 use std::string::ToString;
6988 match value {
6989 "name" => Ok(__FieldTag::__name),
6990 "emailAddress" => Ok(__FieldTag::__email_address),
6991 "email_address" => Ok(__FieldTag::__email_address),
6992 _ => Ok(__FieldTag::Unknown(value.to_string())),
6993 }
6994 }
6995 }
6996 deserializer.deserialize_identifier(Visitor)
6997 }
6998 }
6999 struct Visitor;
7000 impl<'de> serde::de::Visitor<'de> for Visitor {
7001 type Value = CommitAuthor;
7002 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7003 formatter.write_str("struct CommitAuthor")
7004 }
7005 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7006 where
7007 A: serde::de::MapAccess<'de>,
7008 {
7009 #[allow(unused_imports)]
7010 use serde::de::Error;
7011 use std::option::Option::Some;
7012 let mut fields = std::collections::HashSet::new();
7013 let mut result = Self::Value::new();
7014 while let Some(tag) = map.next_key::<__FieldTag>()? {
7015 #[allow(clippy::match_single_binding)]
7016 match tag {
7017 __FieldTag::__name => {
7018 if !fields.insert(__FieldTag::__name) {
7019 return std::result::Result::Err(A::Error::duplicate_field(
7020 "multiple values for name",
7021 ));
7022 }
7023 result.name = map
7024 .next_value::<std::option::Option<std::string::String>>()?
7025 .unwrap_or_default();
7026 }
7027 __FieldTag::__email_address => {
7028 if !fields.insert(__FieldTag::__email_address) {
7029 return std::result::Result::Err(A::Error::duplicate_field(
7030 "multiple values for email_address",
7031 ));
7032 }
7033 result.email_address = map
7034 .next_value::<std::option::Option<std::string::String>>()?
7035 .unwrap_or_default();
7036 }
7037 __FieldTag::Unknown(key) => {
7038 let value = map.next_value::<serde_json::Value>()?;
7039 result._unknown_fields.insert(key, value);
7040 }
7041 }
7042 }
7043 std::result::Result::Ok(result)
7044 }
7045 }
7046 deserializer.deserialize_any(Visitor)
7047 }
7048}
7049
7050#[doc(hidden)]
7051impl serde::ser::Serialize for CommitAuthor {
7052 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7053 where
7054 S: serde::ser::Serializer,
7055 {
7056 use serde::ser::SerializeMap;
7057 #[allow(unused_imports)]
7058 use std::option::Option::Some;
7059 let mut state = serializer.serialize_map(std::option::Option::None)?;
7060 if !self.name.is_empty() {
7061 state.serialize_entry("name", &self.name)?;
7062 }
7063 if !self.email_address.is_empty() {
7064 state.serialize_entry("emailAddress", &self.email_address)?;
7065 }
7066 if !self._unknown_fields.is_empty() {
7067 for (key, value) in self._unknown_fields.iter() {
7068 state.serialize_entry(key, &value)?;
7069 }
7070 }
7071 state.end()
7072 }
7073}
7074
7075#[derive(Clone, Debug, Default, PartialEq)]
7077#[non_exhaustive]
7078pub struct PullGitCommitsRequest {
7079 pub name: std::string::String,
7081
7082 pub remote_branch: std::string::String,
7085
7086 pub author: std::option::Option<crate::model::CommitAuthor>,
7089
7090 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7091}
7092
7093impl PullGitCommitsRequest {
7094 pub fn new() -> Self {
7095 std::default::Default::default()
7096 }
7097
7098 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7100 self.name = v.into();
7101 self
7102 }
7103
7104 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7106 self.remote_branch = v.into();
7107 self
7108 }
7109
7110 pub fn set_author<T>(mut self, v: T) -> Self
7112 where
7113 T: std::convert::Into<crate::model::CommitAuthor>,
7114 {
7115 self.author = std::option::Option::Some(v.into());
7116 self
7117 }
7118
7119 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
7121 where
7122 T: std::convert::Into<crate::model::CommitAuthor>,
7123 {
7124 self.author = v.map(|x| x.into());
7125 self
7126 }
7127}
7128
7129impl wkt::message::Message for PullGitCommitsRequest {
7130 fn typename() -> &'static str {
7131 "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
7132 }
7133}
7134
7135#[doc(hidden)]
7136impl<'de> serde::de::Deserialize<'de> for PullGitCommitsRequest {
7137 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7138 where
7139 D: serde::Deserializer<'de>,
7140 {
7141 #[allow(non_camel_case_types)]
7142 #[doc(hidden)]
7143 #[derive(PartialEq, Eq, Hash)]
7144 enum __FieldTag {
7145 __name,
7146 __remote_branch,
7147 __author,
7148 Unknown(std::string::String),
7149 }
7150 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7151 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7152 where
7153 D: serde::Deserializer<'de>,
7154 {
7155 struct Visitor;
7156 impl<'de> serde::de::Visitor<'de> for Visitor {
7157 type Value = __FieldTag;
7158 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7159 formatter.write_str("a field name for PullGitCommitsRequest")
7160 }
7161 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7162 where
7163 E: serde::de::Error,
7164 {
7165 use std::result::Result::Ok;
7166 use std::string::ToString;
7167 match value {
7168 "name" => Ok(__FieldTag::__name),
7169 "remoteBranch" => Ok(__FieldTag::__remote_branch),
7170 "remote_branch" => Ok(__FieldTag::__remote_branch),
7171 "author" => Ok(__FieldTag::__author),
7172 _ => Ok(__FieldTag::Unknown(value.to_string())),
7173 }
7174 }
7175 }
7176 deserializer.deserialize_identifier(Visitor)
7177 }
7178 }
7179 struct Visitor;
7180 impl<'de> serde::de::Visitor<'de> for Visitor {
7181 type Value = PullGitCommitsRequest;
7182 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7183 formatter.write_str("struct PullGitCommitsRequest")
7184 }
7185 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7186 where
7187 A: serde::de::MapAccess<'de>,
7188 {
7189 #[allow(unused_imports)]
7190 use serde::de::Error;
7191 use std::option::Option::Some;
7192 let mut fields = std::collections::HashSet::new();
7193 let mut result = Self::Value::new();
7194 while let Some(tag) = map.next_key::<__FieldTag>()? {
7195 #[allow(clippy::match_single_binding)]
7196 match tag {
7197 __FieldTag::__name => {
7198 if !fields.insert(__FieldTag::__name) {
7199 return std::result::Result::Err(A::Error::duplicate_field(
7200 "multiple values for name",
7201 ));
7202 }
7203 result.name = map
7204 .next_value::<std::option::Option<std::string::String>>()?
7205 .unwrap_or_default();
7206 }
7207 __FieldTag::__remote_branch => {
7208 if !fields.insert(__FieldTag::__remote_branch) {
7209 return std::result::Result::Err(A::Error::duplicate_field(
7210 "multiple values for remote_branch",
7211 ));
7212 }
7213 result.remote_branch = map
7214 .next_value::<std::option::Option<std::string::String>>()?
7215 .unwrap_or_default();
7216 }
7217 __FieldTag::__author => {
7218 if !fields.insert(__FieldTag::__author) {
7219 return std::result::Result::Err(A::Error::duplicate_field(
7220 "multiple values for author",
7221 ));
7222 }
7223 result.author = map
7224 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
7225 }
7226 __FieldTag::Unknown(key) => {
7227 let value = map.next_value::<serde_json::Value>()?;
7228 result._unknown_fields.insert(key, value);
7229 }
7230 }
7231 }
7232 std::result::Result::Ok(result)
7233 }
7234 }
7235 deserializer.deserialize_any(Visitor)
7236 }
7237}
7238
7239#[doc(hidden)]
7240impl serde::ser::Serialize for PullGitCommitsRequest {
7241 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7242 where
7243 S: serde::ser::Serializer,
7244 {
7245 use serde::ser::SerializeMap;
7246 #[allow(unused_imports)]
7247 use std::option::Option::Some;
7248 let mut state = serializer.serialize_map(std::option::Option::None)?;
7249 if !self.name.is_empty() {
7250 state.serialize_entry("name", &self.name)?;
7251 }
7252 if !self.remote_branch.is_empty() {
7253 state.serialize_entry("remoteBranch", &self.remote_branch)?;
7254 }
7255 if self.author.is_some() {
7256 state.serialize_entry("author", &self.author)?;
7257 }
7258 if !self._unknown_fields.is_empty() {
7259 for (key, value) in self._unknown_fields.iter() {
7260 state.serialize_entry(key, &value)?;
7261 }
7262 }
7263 state.end()
7264 }
7265}
7266
7267#[derive(Clone, Debug, Default, PartialEq)]
7269#[non_exhaustive]
7270pub struct PullGitCommitsResponse {
7271 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7272}
7273
7274impl PullGitCommitsResponse {
7275 pub fn new() -> Self {
7276 std::default::Default::default()
7277 }
7278}
7279
7280impl wkt::message::Message for PullGitCommitsResponse {
7281 fn typename() -> &'static str {
7282 "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
7283 }
7284}
7285
7286#[doc(hidden)]
7287impl<'de> serde::de::Deserialize<'de> for PullGitCommitsResponse {
7288 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7289 where
7290 D: serde::Deserializer<'de>,
7291 {
7292 #[allow(non_camel_case_types)]
7293 #[doc(hidden)]
7294 #[derive(PartialEq, Eq, Hash)]
7295 enum __FieldTag {
7296 Unknown(std::string::String),
7297 }
7298 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7299 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7300 where
7301 D: serde::Deserializer<'de>,
7302 {
7303 struct Visitor;
7304 impl<'de> serde::de::Visitor<'de> for Visitor {
7305 type Value = __FieldTag;
7306 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7307 formatter.write_str("a field name for PullGitCommitsResponse")
7308 }
7309 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7310 where
7311 E: serde::de::Error,
7312 {
7313 use std::result::Result::Ok;
7314 use std::string::ToString;
7315 Ok(__FieldTag::Unknown(value.to_string()))
7316 }
7317 }
7318 deserializer.deserialize_identifier(Visitor)
7319 }
7320 }
7321 struct Visitor;
7322 impl<'de> serde::de::Visitor<'de> for Visitor {
7323 type Value = PullGitCommitsResponse;
7324 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7325 formatter.write_str("struct PullGitCommitsResponse")
7326 }
7327 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7328 where
7329 A: serde::de::MapAccess<'de>,
7330 {
7331 #[allow(unused_imports)]
7332 use serde::de::Error;
7333 use std::option::Option::Some;
7334 let mut result = Self::Value::new();
7335 while let Some(tag) = map.next_key::<__FieldTag>()? {
7336 #[allow(clippy::match_single_binding)]
7337 match tag {
7338 __FieldTag::Unknown(key) => {
7339 let value = map.next_value::<serde_json::Value>()?;
7340 result._unknown_fields.insert(key, value);
7341 }
7342 }
7343 }
7344 std::result::Result::Ok(result)
7345 }
7346 }
7347 deserializer.deserialize_any(Visitor)
7348 }
7349}
7350
7351#[doc(hidden)]
7352impl serde::ser::Serialize for PullGitCommitsResponse {
7353 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7354 where
7355 S: serde::ser::Serializer,
7356 {
7357 use serde::ser::SerializeMap;
7358 #[allow(unused_imports)]
7359 use std::option::Option::Some;
7360 let mut state = serializer.serialize_map(std::option::Option::None)?;
7361 if !self._unknown_fields.is_empty() {
7362 for (key, value) in self._unknown_fields.iter() {
7363 state.serialize_entry(key, &value)?;
7364 }
7365 }
7366 state.end()
7367 }
7368}
7369
7370#[derive(Clone, Debug, Default, PartialEq)]
7372#[non_exhaustive]
7373pub struct PushGitCommitsRequest {
7374 pub name: std::string::String,
7376
7377 pub remote_branch: std::string::String,
7381
7382 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7383}
7384
7385impl PushGitCommitsRequest {
7386 pub fn new() -> Self {
7387 std::default::Default::default()
7388 }
7389
7390 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7392 self.name = v.into();
7393 self
7394 }
7395
7396 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7398 self.remote_branch = v.into();
7399 self
7400 }
7401}
7402
7403impl wkt::message::Message for PushGitCommitsRequest {
7404 fn typename() -> &'static str {
7405 "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
7406 }
7407}
7408
7409#[doc(hidden)]
7410impl<'de> serde::de::Deserialize<'de> for PushGitCommitsRequest {
7411 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7412 where
7413 D: serde::Deserializer<'de>,
7414 {
7415 #[allow(non_camel_case_types)]
7416 #[doc(hidden)]
7417 #[derive(PartialEq, Eq, Hash)]
7418 enum __FieldTag {
7419 __name,
7420 __remote_branch,
7421 Unknown(std::string::String),
7422 }
7423 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7424 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7425 where
7426 D: serde::Deserializer<'de>,
7427 {
7428 struct Visitor;
7429 impl<'de> serde::de::Visitor<'de> for Visitor {
7430 type Value = __FieldTag;
7431 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7432 formatter.write_str("a field name for PushGitCommitsRequest")
7433 }
7434 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7435 where
7436 E: serde::de::Error,
7437 {
7438 use std::result::Result::Ok;
7439 use std::string::ToString;
7440 match value {
7441 "name" => Ok(__FieldTag::__name),
7442 "remoteBranch" => Ok(__FieldTag::__remote_branch),
7443 "remote_branch" => Ok(__FieldTag::__remote_branch),
7444 _ => Ok(__FieldTag::Unknown(value.to_string())),
7445 }
7446 }
7447 }
7448 deserializer.deserialize_identifier(Visitor)
7449 }
7450 }
7451 struct Visitor;
7452 impl<'de> serde::de::Visitor<'de> for Visitor {
7453 type Value = PushGitCommitsRequest;
7454 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7455 formatter.write_str("struct PushGitCommitsRequest")
7456 }
7457 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7458 where
7459 A: serde::de::MapAccess<'de>,
7460 {
7461 #[allow(unused_imports)]
7462 use serde::de::Error;
7463 use std::option::Option::Some;
7464 let mut fields = std::collections::HashSet::new();
7465 let mut result = Self::Value::new();
7466 while let Some(tag) = map.next_key::<__FieldTag>()? {
7467 #[allow(clippy::match_single_binding)]
7468 match tag {
7469 __FieldTag::__name => {
7470 if !fields.insert(__FieldTag::__name) {
7471 return std::result::Result::Err(A::Error::duplicate_field(
7472 "multiple values for name",
7473 ));
7474 }
7475 result.name = map
7476 .next_value::<std::option::Option<std::string::String>>()?
7477 .unwrap_or_default();
7478 }
7479 __FieldTag::__remote_branch => {
7480 if !fields.insert(__FieldTag::__remote_branch) {
7481 return std::result::Result::Err(A::Error::duplicate_field(
7482 "multiple values for remote_branch",
7483 ));
7484 }
7485 result.remote_branch = map
7486 .next_value::<std::option::Option<std::string::String>>()?
7487 .unwrap_or_default();
7488 }
7489 __FieldTag::Unknown(key) => {
7490 let value = map.next_value::<serde_json::Value>()?;
7491 result._unknown_fields.insert(key, value);
7492 }
7493 }
7494 }
7495 std::result::Result::Ok(result)
7496 }
7497 }
7498 deserializer.deserialize_any(Visitor)
7499 }
7500}
7501
7502#[doc(hidden)]
7503impl serde::ser::Serialize for PushGitCommitsRequest {
7504 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7505 where
7506 S: serde::ser::Serializer,
7507 {
7508 use serde::ser::SerializeMap;
7509 #[allow(unused_imports)]
7510 use std::option::Option::Some;
7511 let mut state = serializer.serialize_map(std::option::Option::None)?;
7512 if !self.name.is_empty() {
7513 state.serialize_entry("name", &self.name)?;
7514 }
7515 if !self.remote_branch.is_empty() {
7516 state.serialize_entry("remoteBranch", &self.remote_branch)?;
7517 }
7518 if !self._unknown_fields.is_empty() {
7519 for (key, value) in self._unknown_fields.iter() {
7520 state.serialize_entry(key, &value)?;
7521 }
7522 }
7523 state.end()
7524 }
7525}
7526
7527#[derive(Clone, Debug, Default, PartialEq)]
7529#[non_exhaustive]
7530pub struct PushGitCommitsResponse {
7531 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7532}
7533
7534impl PushGitCommitsResponse {
7535 pub fn new() -> Self {
7536 std::default::Default::default()
7537 }
7538}
7539
7540impl wkt::message::Message for PushGitCommitsResponse {
7541 fn typename() -> &'static str {
7542 "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
7543 }
7544}
7545
7546#[doc(hidden)]
7547impl<'de> serde::de::Deserialize<'de> for PushGitCommitsResponse {
7548 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7549 where
7550 D: serde::Deserializer<'de>,
7551 {
7552 #[allow(non_camel_case_types)]
7553 #[doc(hidden)]
7554 #[derive(PartialEq, Eq, Hash)]
7555 enum __FieldTag {
7556 Unknown(std::string::String),
7557 }
7558 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7559 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7560 where
7561 D: serde::Deserializer<'de>,
7562 {
7563 struct Visitor;
7564 impl<'de> serde::de::Visitor<'de> for Visitor {
7565 type Value = __FieldTag;
7566 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7567 formatter.write_str("a field name for PushGitCommitsResponse")
7568 }
7569 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7570 where
7571 E: serde::de::Error,
7572 {
7573 use std::result::Result::Ok;
7574 use std::string::ToString;
7575 Ok(__FieldTag::Unknown(value.to_string()))
7576 }
7577 }
7578 deserializer.deserialize_identifier(Visitor)
7579 }
7580 }
7581 struct Visitor;
7582 impl<'de> serde::de::Visitor<'de> for Visitor {
7583 type Value = PushGitCommitsResponse;
7584 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7585 formatter.write_str("struct PushGitCommitsResponse")
7586 }
7587 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7588 where
7589 A: serde::de::MapAccess<'de>,
7590 {
7591 #[allow(unused_imports)]
7592 use serde::de::Error;
7593 use std::option::Option::Some;
7594 let mut result = Self::Value::new();
7595 while let Some(tag) = map.next_key::<__FieldTag>()? {
7596 #[allow(clippy::match_single_binding)]
7597 match tag {
7598 __FieldTag::Unknown(key) => {
7599 let value = map.next_value::<serde_json::Value>()?;
7600 result._unknown_fields.insert(key, value);
7601 }
7602 }
7603 }
7604 std::result::Result::Ok(result)
7605 }
7606 }
7607 deserializer.deserialize_any(Visitor)
7608 }
7609}
7610
7611#[doc(hidden)]
7612impl serde::ser::Serialize for PushGitCommitsResponse {
7613 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7614 where
7615 S: serde::ser::Serializer,
7616 {
7617 use serde::ser::SerializeMap;
7618 #[allow(unused_imports)]
7619 use std::option::Option::Some;
7620 let mut state = serializer.serialize_map(std::option::Option::None)?;
7621 if !self._unknown_fields.is_empty() {
7622 for (key, value) in self._unknown_fields.iter() {
7623 state.serialize_entry(key, &value)?;
7624 }
7625 }
7626 state.end()
7627 }
7628}
7629
7630#[derive(Clone, Debug, Default, PartialEq)]
7632#[non_exhaustive]
7633pub struct FetchFileGitStatusesRequest {
7634 pub name: std::string::String,
7636
7637 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7638}
7639
7640impl FetchFileGitStatusesRequest {
7641 pub fn new() -> Self {
7642 std::default::Default::default()
7643 }
7644
7645 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7647 self.name = v.into();
7648 self
7649 }
7650}
7651
7652impl wkt::message::Message for FetchFileGitStatusesRequest {
7653 fn typename() -> &'static str {
7654 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
7655 }
7656}
7657
7658#[doc(hidden)]
7659impl<'de> serde::de::Deserialize<'de> for FetchFileGitStatusesRequest {
7660 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7661 where
7662 D: serde::Deserializer<'de>,
7663 {
7664 #[allow(non_camel_case_types)]
7665 #[doc(hidden)]
7666 #[derive(PartialEq, Eq, Hash)]
7667 enum __FieldTag {
7668 __name,
7669 Unknown(std::string::String),
7670 }
7671 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7672 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7673 where
7674 D: serde::Deserializer<'de>,
7675 {
7676 struct Visitor;
7677 impl<'de> serde::de::Visitor<'de> for Visitor {
7678 type Value = __FieldTag;
7679 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7680 formatter.write_str("a field name for FetchFileGitStatusesRequest")
7681 }
7682 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7683 where
7684 E: serde::de::Error,
7685 {
7686 use std::result::Result::Ok;
7687 use std::string::ToString;
7688 match value {
7689 "name" => Ok(__FieldTag::__name),
7690 _ => Ok(__FieldTag::Unknown(value.to_string())),
7691 }
7692 }
7693 }
7694 deserializer.deserialize_identifier(Visitor)
7695 }
7696 }
7697 struct Visitor;
7698 impl<'de> serde::de::Visitor<'de> for Visitor {
7699 type Value = FetchFileGitStatusesRequest;
7700 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7701 formatter.write_str("struct FetchFileGitStatusesRequest")
7702 }
7703 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7704 where
7705 A: serde::de::MapAccess<'de>,
7706 {
7707 #[allow(unused_imports)]
7708 use serde::de::Error;
7709 use std::option::Option::Some;
7710 let mut fields = std::collections::HashSet::new();
7711 let mut result = Self::Value::new();
7712 while let Some(tag) = map.next_key::<__FieldTag>()? {
7713 #[allow(clippy::match_single_binding)]
7714 match tag {
7715 __FieldTag::__name => {
7716 if !fields.insert(__FieldTag::__name) {
7717 return std::result::Result::Err(A::Error::duplicate_field(
7718 "multiple values for name",
7719 ));
7720 }
7721 result.name = map
7722 .next_value::<std::option::Option<std::string::String>>()?
7723 .unwrap_or_default();
7724 }
7725 __FieldTag::Unknown(key) => {
7726 let value = map.next_value::<serde_json::Value>()?;
7727 result._unknown_fields.insert(key, value);
7728 }
7729 }
7730 }
7731 std::result::Result::Ok(result)
7732 }
7733 }
7734 deserializer.deserialize_any(Visitor)
7735 }
7736}
7737
7738#[doc(hidden)]
7739impl serde::ser::Serialize for FetchFileGitStatusesRequest {
7740 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7741 where
7742 S: serde::ser::Serializer,
7743 {
7744 use serde::ser::SerializeMap;
7745 #[allow(unused_imports)]
7746 use std::option::Option::Some;
7747 let mut state = serializer.serialize_map(std::option::Option::None)?;
7748 if !self.name.is_empty() {
7749 state.serialize_entry("name", &self.name)?;
7750 }
7751 if !self._unknown_fields.is_empty() {
7752 for (key, value) in self._unknown_fields.iter() {
7753 state.serialize_entry(key, &value)?;
7754 }
7755 }
7756 state.end()
7757 }
7758}
7759
7760#[derive(Clone, Debug, Default, PartialEq)]
7762#[non_exhaustive]
7763pub struct FetchFileGitStatusesResponse {
7764 pub uncommitted_file_changes:
7767 std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
7768
7769 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7770}
7771
7772impl FetchFileGitStatusesResponse {
7773 pub fn new() -> Self {
7774 std::default::Default::default()
7775 }
7776
7777 pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
7779 where
7780 T: std::iter::IntoIterator<Item = V>,
7781 V: std::convert::Into<
7782 crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
7783 >,
7784 {
7785 use std::iter::Iterator;
7786 self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
7787 self
7788 }
7789}
7790
7791impl wkt::message::Message for FetchFileGitStatusesResponse {
7792 fn typename() -> &'static str {
7793 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
7794 }
7795}
7796
7797#[doc(hidden)]
7798impl<'de> serde::de::Deserialize<'de> for FetchFileGitStatusesResponse {
7799 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7800 where
7801 D: serde::Deserializer<'de>,
7802 {
7803 #[allow(non_camel_case_types)]
7804 #[doc(hidden)]
7805 #[derive(PartialEq, Eq, Hash)]
7806 enum __FieldTag {
7807 __uncommitted_file_changes,
7808 Unknown(std::string::String),
7809 }
7810 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7811 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7812 where
7813 D: serde::Deserializer<'de>,
7814 {
7815 struct Visitor;
7816 impl<'de> serde::de::Visitor<'de> for Visitor {
7817 type Value = __FieldTag;
7818 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7819 formatter.write_str("a field name for FetchFileGitStatusesResponse")
7820 }
7821 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7822 where
7823 E: serde::de::Error,
7824 {
7825 use std::result::Result::Ok;
7826 use std::string::ToString;
7827 match value {
7828 "uncommittedFileChanges" => Ok(__FieldTag::__uncommitted_file_changes),
7829 "uncommitted_file_changes" => {
7830 Ok(__FieldTag::__uncommitted_file_changes)
7831 }
7832 _ => Ok(__FieldTag::Unknown(value.to_string())),
7833 }
7834 }
7835 }
7836 deserializer.deserialize_identifier(Visitor)
7837 }
7838 }
7839 struct Visitor;
7840 impl<'de> serde::de::Visitor<'de> for Visitor {
7841 type Value = FetchFileGitStatusesResponse;
7842 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7843 formatter.write_str("struct FetchFileGitStatusesResponse")
7844 }
7845 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7846 where
7847 A: serde::de::MapAccess<'de>,
7848 {
7849 #[allow(unused_imports)]
7850 use serde::de::Error;
7851 use std::option::Option::Some;
7852 let mut fields = std::collections::HashSet::new();
7853 let mut result = Self::Value::new();
7854 while let Some(tag) = map.next_key::<__FieldTag>()? {
7855 #[allow(clippy::match_single_binding)]
7856 match tag {
7857 __FieldTag::__uncommitted_file_changes => {
7858 if !fields.insert(__FieldTag::__uncommitted_file_changes) {
7859 return std::result::Result::Err(A::Error::duplicate_field(
7860 "multiple values for uncommitted_file_changes",
7861 ));
7862 }
7863 result.uncommitted_file_changes = map.next_value::<std::option::Option<std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>>>()?.unwrap_or_default();
7864 }
7865 __FieldTag::Unknown(key) => {
7866 let value = map.next_value::<serde_json::Value>()?;
7867 result._unknown_fields.insert(key, value);
7868 }
7869 }
7870 }
7871 std::result::Result::Ok(result)
7872 }
7873 }
7874 deserializer.deserialize_any(Visitor)
7875 }
7876}
7877
7878#[doc(hidden)]
7879impl serde::ser::Serialize for FetchFileGitStatusesResponse {
7880 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7881 where
7882 S: serde::ser::Serializer,
7883 {
7884 use serde::ser::SerializeMap;
7885 #[allow(unused_imports)]
7886 use std::option::Option::Some;
7887 let mut state = serializer.serialize_map(std::option::Option::None)?;
7888 if !self.uncommitted_file_changes.is_empty() {
7889 state.serialize_entry("uncommittedFileChanges", &self.uncommitted_file_changes)?;
7890 }
7891 if !self._unknown_fields.is_empty() {
7892 for (key, value) in self._unknown_fields.iter() {
7893 state.serialize_entry(key, &value)?;
7894 }
7895 }
7896 state.end()
7897 }
7898}
7899
7900pub mod fetch_file_git_statuses_response {
7902 #[allow(unused_imports)]
7903 use super::*;
7904
7905 #[derive(Clone, Debug, Default, PartialEq)]
7907 #[non_exhaustive]
7908 pub struct UncommittedFileChange {
7909 pub path: std::string::String,
7911
7912 pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
7914
7915 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7916 }
7917
7918 impl UncommittedFileChange {
7919 pub fn new() -> Self {
7920 std::default::Default::default()
7921 }
7922
7923 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7925 self.path = v.into();
7926 self
7927 }
7928
7929 pub fn set_state<
7931 T: std::convert::Into<
7932 crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
7933 >,
7934 >(
7935 mut self,
7936 v: T,
7937 ) -> Self {
7938 self.state = v.into();
7939 self
7940 }
7941 }
7942
7943 impl wkt::message::Message for UncommittedFileChange {
7944 fn typename() -> &'static str {
7945 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
7946 }
7947 }
7948
7949 #[doc(hidden)]
7950 impl<'de> serde::de::Deserialize<'de> for UncommittedFileChange {
7951 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7952 where
7953 D: serde::Deserializer<'de>,
7954 {
7955 #[allow(non_camel_case_types)]
7956 #[doc(hidden)]
7957 #[derive(PartialEq, Eq, Hash)]
7958 enum __FieldTag {
7959 __path,
7960 __state,
7961 Unknown(std::string::String),
7962 }
7963 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7964 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7965 where
7966 D: serde::Deserializer<'de>,
7967 {
7968 struct Visitor;
7969 impl<'de> serde::de::Visitor<'de> for Visitor {
7970 type Value = __FieldTag;
7971 fn expecting(
7972 &self,
7973 formatter: &mut std::fmt::Formatter,
7974 ) -> std::fmt::Result {
7975 formatter.write_str("a field name for UncommittedFileChange")
7976 }
7977 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7978 where
7979 E: serde::de::Error,
7980 {
7981 use std::result::Result::Ok;
7982 use std::string::ToString;
7983 match value {
7984 "path" => Ok(__FieldTag::__path),
7985 "state" => Ok(__FieldTag::__state),
7986 _ => Ok(__FieldTag::Unknown(value.to_string())),
7987 }
7988 }
7989 }
7990 deserializer.deserialize_identifier(Visitor)
7991 }
7992 }
7993 struct Visitor;
7994 impl<'de> serde::de::Visitor<'de> for Visitor {
7995 type Value = UncommittedFileChange;
7996 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7997 formatter.write_str("struct UncommittedFileChange")
7998 }
7999 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8000 where
8001 A: serde::de::MapAccess<'de>,
8002 {
8003 #[allow(unused_imports)]
8004 use serde::de::Error;
8005 use std::option::Option::Some;
8006 let mut fields = std::collections::HashSet::new();
8007 let mut result = Self::Value::new();
8008 while let Some(tag) = map.next_key::<__FieldTag>()? {
8009 #[allow(clippy::match_single_binding)]
8010 match tag {
8011 __FieldTag::__path => {
8012 if !fields.insert(__FieldTag::__path) {
8013 return std::result::Result::Err(A::Error::duplicate_field(
8014 "multiple values for path",
8015 ));
8016 }
8017 result.path = map
8018 .next_value::<std::option::Option<std::string::String>>()?
8019 .unwrap_or_default();
8020 }
8021 __FieldTag::__state => {
8022 if !fields.insert(__FieldTag::__state) {
8023 return std::result::Result::Err(A::Error::duplicate_field(
8024 "multiple values for state",
8025 ));
8026 }
8027 result.state = map.next_value::<std::option::Option<crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State>>()?.unwrap_or_default();
8028 }
8029 __FieldTag::Unknown(key) => {
8030 let value = map.next_value::<serde_json::Value>()?;
8031 result._unknown_fields.insert(key, value);
8032 }
8033 }
8034 }
8035 std::result::Result::Ok(result)
8036 }
8037 }
8038 deserializer.deserialize_any(Visitor)
8039 }
8040 }
8041
8042 #[doc(hidden)]
8043 impl serde::ser::Serialize for UncommittedFileChange {
8044 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8045 where
8046 S: serde::ser::Serializer,
8047 {
8048 use serde::ser::SerializeMap;
8049 #[allow(unused_imports)]
8050 use std::option::Option::Some;
8051 let mut state = serializer.serialize_map(std::option::Option::None)?;
8052 if !self.path.is_empty() {
8053 state.serialize_entry("path", &self.path)?;
8054 }
8055 if !wkt::internal::is_default(&self.state) {
8056 state.serialize_entry("state", &self.state)?;
8057 }
8058 if !self._unknown_fields.is_empty() {
8059 for (key, value) in self._unknown_fields.iter() {
8060 state.serialize_entry(key, &value)?;
8061 }
8062 }
8063 state.end()
8064 }
8065 }
8066
8067 pub mod uncommitted_file_change {
8069 #[allow(unused_imports)]
8070 use super::*;
8071
8072 #[derive(Clone, Debug, PartialEq)]
8088 #[non_exhaustive]
8089 pub enum State {
8090 Unspecified,
8092 Added,
8094 Deleted,
8096 Modified,
8098 HasConflicts,
8100 UnknownValue(state::UnknownValue),
8105 }
8106
8107 #[doc(hidden)]
8108 pub mod state {
8109 #[allow(unused_imports)]
8110 use super::*;
8111 #[derive(Clone, Debug, PartialEq)]
8112 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8113 }
8114
8115 impl State {
8116 pub fn value(&self) -> std::option::Option<i32> {
8121 match self {
8122 Self::Unspecified => std::option::Option::Some(0),
8123 Self::Added => std::option::Option::Some(1),
8124 Self::Deleted => std::option::Option::Some(2),
8125 Self::Modified => std::option::Option::Some(3),
8126 Self::HasConflicts => std::option::Option::Some(4),
8127 Self::UnknownValue(u) => u.0.value(),
8128 }
8129 }
8130
8131 pub fn name(&self) -> std::option::Option<&str> {
8136 match self {
8137 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8138 Self::Added => std::option::Option::Some("ADDED"),
8139 Self::Deleted => std::option::Option::Some("DELETED"),
8140 Self::Modified => std::option::Option::Some("MODIFIED"),
8141 Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
8142 Self::UnknownValue(u) => u.0.name(),
8143 }
8144 }
8145 }
8146
8147 impl std::default::Default for State {
8148 fn default() -> Self {
8149 use std::convert::From;
8150 Self::from(0)
8151 }
8152 }
8153
8154 impl std::fmt::Display for State {
8155 fn fmt(
8156 &self,
8157 f: &mut std::fmt::Formatter<'_>,
8158 ) -> std::result::Result<(), std::fmt::Error> {
8159 wkt::internal::display_enum(f, self.name(), self.value())
8160 }
8161 }
8162
8163 impl std::convert::From<i32> for State {
8164 fn from(value: i32) -> Self {
8165 match value {
8166 0 => Self::Unspecified,
8167 1 => Self::Added,
8168 2 => Self::Deleted,
8169 3 => Self::Modified,
8170 4 => Self::HasConflicts,
8171 _ => Self::UnknownValue(state::UnknownValue(
8172 wkt::internal::UnknownEnumValue::Integer(value),
8173 )),
8174 }
8175 }
8176 }
8177
8178 impl std::convert::From<&str> for State {
8179 fn from(value: &str) -> Self {
8180 use std::string::ToString;
8181 match value {
8182 "STATE_UNSPECIFIED" => Self::Unspecified,
8183 "ADDED" => Self::Added,
8184 "DELETED" => Self::Deleted,
8185 "MODIFIED" => Self::Modified,
8186 "HAS_CONFLICTS" => Self::HasConflicts,
8187 _ => Self::UnknownValue(state::UnknownValue(
8188 wkt::internal::UnknownEnumValue::String(value.to_string()),
8189 )),
8190 }
8191 }
8192 }
8193
8194 impl serde::ser::Serialize for State {
8195 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8196 where
8197 S: serde::Serializer,
8198 {
8199 match self {
8200 Self::Unspecified => serializer.serialize_i32(0),
8201 Self::Added => serializer.serialize_i32(1),
8202 Self::Deleted => serializer.serialize_i32(2),
8203 Self::Modified => serializer.serialize_i32(3),
8204 Self::HasConflicts => serializer.serialize_i32(4),
8205 Self::UnknownValue(u) => u.0.serialize(serializer),
8206 }
8207 }
8208 }
8209
8210 impl<'de> serde::de::Deserialize<'de> for State {
8211 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8212 where
8213 D: serde::Deserializer<'de>,
8214 {
8215 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8216 ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
8217 }
8218 }
8219 }
8220}
8221
8222#[derive(Clone, Debug, Default, PartialEq)]
8224#[non_exhaustive]
8225pub struct FetchGitAheadBehindRequest {
8226 pub name: std::string::String,
8228
8229 pub remote_branch: std::string::String,
8233
8234 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8235}
8236
8237impl FetchGitAheadBehindRequest {
8238 pub fn new() -> Self {
8239 std::default::Default::default()
8240 }
8241
8242 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8244 self.name = v.into();
8245 self
8246 }
8247
8248 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8250 self.remote_branch = v.into();
8251 self
8252 }
8253}
8254
8255impl wkt::message::Message for FetchGitAheadBehindRequest {
8256 fn typename() -> &'static str {
8257 "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
8258 }
8259}
8260
8261#[doc(hidden)]
8262impl<'de> serde::de::Deserialize<'de> for FetchGitAheadBehindRequest {
8263 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8264 where
8265 D: serde::Deserializer<'de>,
8266 {
8267 #[allow(non_camel_case_types)]
8268 #[doc(hidden)]
8269 #[derive(PartialEq, Eq, Hash)]
8270 enum __FieldTag {
8271 __name,
8272 __remote_branch,
8273 Unknown(std::string::String),
8274 }
8275 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8276 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8277 where
8278 D: serde::Deserializer<'de>,
8279 {
8280 struct Visitor;
8281 impl<'de> serde::de::Visitor<'de> for Visitor {
8282 type Value = __FieldTag;
8283 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8284 formatter.write_str("a field name for FetchGitAheadBehindRequest")
8285 }
8286 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8287 where
8288 E: serde::de::Error,
8289 {
8290 use std::result::Result::Ok;
8291 use std::string::ToString;
8292 match value {
8293 "name" => Ok(__FieldTag::__name),
8294 "remoteBranch" => Ok(__FieldTag::__remote_branch),
8295 "remote_branch" => Ok(__FieldTag::__remote_branch),
8296 _ => Ok(__FieldTag::Unknown(value.to_string())),
8297 }
8298 }
8299 }
8300 deserializer.deserialize_identifier(Visitor)
8301 }
8302 }
8303 struct Visitor;
8304 impl<'de> serde::de::Visitor<'de> for Visitor {
8305 type Value = FetchGitAheadBehindRequest;
8306 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8307 formatter.write_str("struct FetchGitAheadBehindRequest")
8308 }
8309 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8310 where
8311 A: serde::de::MapAccess<'de>,
8312 {
8313 #[allow(unused_imports)]
8314 use serde::de::Error;
8315 use std::option::Option::Some;
8316 let mut fields = std::collections::HashSet::new();
8317 let mut result = Self::Value::new();
8318 while let Some(tag) = map.next_key::<__FieldTag>()? {
8319 #[allow(clippy::match_single_binding)]
8320 match tag {
8321 __FieldTag::__name => {
8322 if !fields.insert(__FieldTag::__name) {
8323 return std::result::Result::Err(A::Error::duplicate_field(
8324 "multiple values for name",
8325 ));
8326 }
8327 result.name = map
8328 .next_value::<std::option::Option<std::string::String>>()?
8329 .unwrap_or_default();
8330 }
8331 __FieldTag::__remote_branch => {
8332 if !fields.insert(__FieldTag::__remote_branch) {
8333 return std::result::Result::Err(A::Error::duplicate_field(
8334 "multiple values for remote_branch",
8335 ));
8336 }
8337 result.remote_branch = map
8338 .next_value::<std::option::Option<std::string::String>>()?
8339 .unwrap_or_default();
8340 }
8341 __FieldTag::Unknown(key) => {
8342 let value = map.next_value::<serde_json::Value>()?;
8343 result._unknown_fields.insert(key, value);
8344 }
8345 }
8346 }
8347 std::result::Result::Ok(result)
8348 }
8349 }
8350 deserializer.deserialize_any(Visitor)
8351 }
8352}
8353
8354#[doc(hidden)]
8355impl serde::ser::Serialize for FetchGitAheadBehindRequest {
8356 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8357 where
8358 S: serde::ser::Serializer,
8359 {
8360 use serde::ser::SerializeMap;
8361 #[allow(unused_imports)]
8362 use std::option::Option::Some;
8363 let mut state = serializer.serialize_map(std::option::Option::None)?;
8364 if !self.name.is_empty() {
8365 state.serialize_entry("name", &self.name)?;
8366 }
8367 if !self.remote_branch.is_empty() {
8368 state.serialize_entry("remoteBranch", &self.remote_branch)?;
8369 }
8370 if !self._unknown_fields.is_empty() {
8371 for (key, value) in self._unknown_fields.iter() {
8372 state.serialize_entry(key, &value)?;
8373 }
8374 }
8375 state.end()
8376 }
8377}
8378
8379#[derive(Clone, Debug, Default, PartialEq)]
8381#[non_exhaustive]
8382pub struct FetchGitAheadBehindResponse {
8383 pub commits_ahead: i32,
8385
8386 pub commits_behind: i32,
8388
8389 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8390}
8391
8392impl FetchGitAheadBehindResponse {
8393 pub fn new() -> Self {
8394 std::default::Default::default()
8395 }
8396
8397 pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8399 self.commits_ahead = v.into();
8400 self
8401 }
8402
8403 pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8405 self.commits_behind = v.into();
8406 self
8407 }
8408}
8409
8410impl wkt::message::Message for FetchGitAheadBehindResponse {
8411 fn typename() -> &'static str {
8412 "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
8413 }
8414}
8415
8416#[doc(hidden)]
8417impl<'de> serde::de::Deserialize<'de> for FetchGitAheadBehindResponse {
8418 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8419 where
8420 D: serde::Deserializer<'de>,
8421 {
8422 #[allow(non_camel_case_types)]
8423 #[doc(hidden)]
8424 #[derive(PartialEq, Eq, Hash)]
8425 enum __FieldTag {
8426 __commits_ahead,
8427 __commits_behind,
8428 Unknown(std::string::String),
8429 }
8430 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8431 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8432 where
8433 D: serde::Deserializer<'de>,
8434 {
8435 struct Visitor;
8436 impl<'de> serde::de::Visitor<'de> for Visitor {
8437 type Value = __FieldTag;
8438 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8439 formatter.write_str("a field name for FetchGitAheadBehindResponse")
8440 }
8441 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8442 where
8443 E: serde::de::Error,
8444 {
8445 use std::result::Result::Ok;
8446 use std::string::ToString;
8447 match value {
8448 "commitsAhead" => Ok(__FieldTag::__commits_ahead),
8449 "commits_ahead" => Ok(__FieldTag::__commits_ahead),
8450 "commitsBehind" => Ok(__FieldTag::__commits_behind),
8451 "commits_behind" => Ok(__FieldTag::__commits_behind),
8452 _ => Ok(__FieldTag::Unknown(value.to_string())),
8453 }
8454 }
8455 }
8456 deserializer.deserialize_identifier(Visitor)
8457 }
8458 }
8459 struct Visitor;
8460 impl<'de> serde::de::Visitor<'de> for Visitor {
8461 type Value = FetchGitAheadBehindResponse;
8462 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8463 formatter.write_str("struct FetchGitAheadBehindResponse")
8464 }
8465 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8466 where
8467 A: serde::de::MapAccess<'de>,
8468 {
8469 #[allow(unused_imports)]
8470 use serde::de::Error;
8471 use std::option::Option::Some;
8472 let mut fields = std::collections::HashSet::new();
8473 let mut result = Self::Value::new();
8474 while let Some(tag) = map.next_key::<__FieldTag>()? {
8475 #[allow(clippy::match_single_binding)]
8476 match tag {
8477 __FieldTag::__commits_ahead => {
8478 if !fields.insert(__FieldTag::__commits_ahead) {
8479 return std::result::Result::Err(A::Error::duplicate_field(
8480 "multiple values for commits_ahead",
8481 ));
8482 }
8483 struct __With(std::option::Option<i32>);
8484 impl<'de> serde::de::Deserialize<'de> for __With {
8485 fn deserialize<D>(
8486 deserializer: D,
8487 ) -> std::result::Result<Self, D::Error>
8488 where
8489 D: serde::de::Deserializer<'de>,
8490 {
8491 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
8492 }
8493 }
8494 result.commits_ahead =
8495 map.next_value::<__With>()?.0.unwrap_or_default();
8496 }
8497 __FieldTag::__commits_behind => {
8498 if !fields.insert(__FieldTag::__commits_behind) {
8499 return std::result::Result::Err(A::Error::duplicate_field(
8500 "multiple values for commits_behind",
8501 ));
8502 }
8503 struct __With(std::option::Option<i32>);
8504 impl<'de> serde::de::Deserialize<'de> for __With {
8505 fn deserialize<D>(
8506 deserializer: D,
8507 ) -> std::result::Result<Self, D::Error>
8508 where
8509 D: serde::de::Deserializer<'de>,
8510 {
8511 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
8512 }
8513 }
8514 result.commits_behind =
8515 map.next_value::<__With>()?.0.unwrap_or_default();
8516 }
8517 __FieldTag::Unknown(key) => {
8518 let value = map.next_value::<serde_json::Value>()?;
8519 result._unknown_fields.insert(key, value);
8520 }
8521 }
8522 }
8523 std::result::Result::Ok(result)
8524 }
8525 }
8526 deserializer.deserialize_any(Visitor)
8527 }
8528}
8529
8530#[doc(hidden)]
8531impl serde::ser::Serialize for FetchGitAheadBehindResponse {
8532 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8533 where
8534 S: serde::ser::Serializer,
8535 {
8536 use serde::ser::SerializeMap;
8537 #[allow(unused_imports)]
8538 use std::option::Option::Some;
8539 let mut state = serializer.serialize_map(std::option::Option::None)?;
8540 if !wkt::internal::is_default(&self.commits_ahead) {
8541 struct __With<'a>(&'a i32);
8542 impl<'a> serde::ser::Serialize for __With<'a> {
8543 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8544 where
8545 S: serde::ser::Serializer,
8546 {
8547 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
8548 }
8549 }
8550 state.serialize_entry("commitsAhead", &__With(&self.commits_ahead))?;
8551 }
8552 if !wkt::internal::is_default(&self.commits_behind) {
8553 struct __With<'a>(&'a i32);
8554 impl<'a> serde::ser::Serialize for __With<'a> {
8555 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8556 where
8557 S: serde::ser::Serializer,
8558 {
8559 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
8560 }
8561 }
8562 state.serialize_entry("commitsBehind", &__With(&self.commits_behind))?;
8563 }
8564 if !self._unknown_fields.is_empty() {
8565 for (key, value) in self._unknown_fields.iter() {
8566 state.serialize_entry(key, &value)?;
8567 }
8568 }
8569 state.end()
8570 }
8571}
8572
8573#[derive(Clone, Debug, Default, PartialEq)]
8575#[non_exhaustive]
8576pub struct CommitWorkspaceChangesRequest {
8577 pub name: std::string::String,
8579
8580 pub author: std::option::Option<crate::model::CommitAuthor>,
8582
8583 pub commit_message: std::string::String,
8585
8586 pub paths: std::vec::Vec<std::string::String>,
8589
8590 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8591}
8592
8593impl CommitWorkspaceChangesRequest {
8594 pub fn new() -> Self {
8595 std::default::Default::default()
8596 }
8597
8598 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8600 self.name = v.into();
8601 self
8602 }
8603
8604 pub fn set_author<T>(mut self, v: T) -> Self
8606 where
8607 T: std::convert::Into<crate::model::CommitAuthor>,
8608 {
8609 self.author = std::option::Option::Some(v.into());
8610 self
8611 }
8612
8613 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
8615 where
8616 T: std::convert::Into<crate::model::CommitAuthor>,
8617 {
8618 self.author = v.map(|x| x.into());
8619 self
8620 }
8621
8622 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8624 self.commit_message = v.into();
8625 self
8626 }
8627
8628 pub fn set_paths<T, V>(mut self, v: T) -> Self
8630 where
8631 T: std::iter::IntoIterator<Item = V>,
8632 V: std::convert::Into<std::string::String>,
8633 {
8634 use std::iter::Iterator;
8635 self.paths = v.into_iter().map(|i| i.into()).collect();
8636 self
8637 }
8638}
8639
8640impl wkt::message::Message for CommitWorkspaceChangesRequest {
8641 fn typename() -> &'static str {
8642 "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
8643 }
8644}
8645
8646#[doc(hidden)]
8647impl<'de> serde::de::Deserialize<'de> for CommitWorkspaceChangesRequest {
8648 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8649 where
8650 D: serde::Deserializer<'de>,
8651 {
8652 #[allow(non_camel_case_types)]
8653 #[doc(hidden)]
8654 #[derive(PartialEq, Eq, Hash)]
8655 enum __FieldTag {
8656 __name,
8657 __author,
8658 __commit_message,
8659 __paths,
8660 Unknown(std::string::String),
8661 }
8662 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8663 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8664 where
8665 D: serde::Deserializer<'de>,
8666 {
8667 struct Visitor;
8668 impl<'de> serde::de::Visitor<'de> for Visitor {
8669 type Value = __FieldTag;
8670 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8671 formatter.write_str("a field name for CommitWorkspaceChangesRequest")
8672 }
8673 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8674 where
8675 E: serde::de::Error,
8676 {
8677 use std::result::Result::Ok;
8678 use std::string::ToString;
8679 match value {
8680 "name" => Ok(__FieldTag::__name),
8681 "author" => Ok(__FieldTag::__author),
8682 "commitMessage" => Ok(__FieldTag::__commit_message),
8683 "commit_message" => Ok(__FieldTag::__commit_message),
8684 "paths" => Ok(__FieldTag::__paths),
8685 _ => Ok(__FieldTag::Unknown(value.to_string())),
8686 }
8687 }
8688 }
8689 deserializer.deserialize_identifier(Visitor)
8690 }
8691 }
8692 struct Visitor;
8693 impl<'de> serde::de::Visitor<'de> for Visitor {
8694 type Value = CommitWorkspaceChangesRequest;
8695 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8696 formatter.write_str("struct CommitWorkspaceChangesRequest")
8697 }
8698 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8699 where
8700 A: serde::de::MapAccess<'de>,
8701 {
8702 #[allow(unused_imports)]
8703 use serde::de::Error;
8704 use std::option::Option::Some;
8705 let mut fields = std::collections::HashSet::new();
8706 let mut result = Self::Value::new();
8707 while let Some(tag) = map.next_key::<__FieldTag>()? {
8708 #[allow(clippy::match_single_binding)]
8709 match tag {
8710 __FieldTag::__name => {
8711 if !fields.insert(__FieldTag::__name) {
8712 return std::result::Result::Err(A::Error::duplicate_field(
8713 "multiple values for name",
8714 ));
8715 }
8716 result.name = map
8717 .next_value::<std::option::Option<std::string::String>>()?
8718 .unwrap_or_default();
8719 }
8720 __FieldTag::__author => {
8721 if !fields.insert(__FieldTag::__author) {
8722 return std::result::Result::Err(A::Error::duplicate_field(
8723 "multiple values for author",
8724 ));
8725 }
8726 result.author = map
8727 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
8728 }
8729 __FieldTag::__commit_message => {
8730 if !fields.insert(__FieldTag::__commit_message) {
8731 return std::result::Result::Err(A::Error::duplicate_field(
8732 "multiple values for commit_message",
8733 ));
8734 }
8735 result.commit_message = map
8736 .next_value::<std::option::Option<std::string::String>>()?
8737 .unwrap_or_default();
8738 }
8739 __FieldTag::__paths => {
8740 if !fields.insert(__FieldTag::__paths) {
8741 return std::result::Result::Err(A::Error::duplicate_field(
8742 "multiple values for paths",
8743 ));
8744 }
8745 result.paths = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
8746 }
8747 __FieldTag::Unknown(key) => {
8748 let value = map.next_value::<serde_json::Value>()?;
8749 result._unknown_fields.insert(key, value);
8750 }
8751 }
8752 }
8753 std::result::Result::Ok(result)
8754 }
8755 }
8756 deserializer.deserialize_any(Visitor)
8757 }
8758}
8759
8760#[doc(hidden)]
8761impl serde::ser::Serialize for CommitWorkspaceChangesRequest {
8762 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8763 where
8764 S: serde::ser::Serializer,
8765 {
8766 use serde::ser::SerializeMap;
8767 #[allow(unused_imports)]
8768 use std::option::Option::Some;
8769 let mut state = serializer.serialize_map(std::option::Option::None)?;
8770 if !self.name.is_empty() {
8771 state.serialize_entry("name", &self.name)?;
8772 }
8773 if self.author.is_some() {
8774 state.serialize_entry("author", &self.author)?;
8775 }
8776 if !self.commit_message.is_empty() {
8777 state.serialize_entry("commitMessage", &self.commit_message)?;
8778 }
8779 if !self.paths.is_empty() {
8780 state.serialize_entry("paths", &self.paths)?;
8781 }
8782 if !self._unknown_fields.is_empty() {
8783 for (key, value) in self._unknown_fields.iter() {
8784 state.serialize_entry(key, &value)?;
8785 }
8786 }
8787 state.end()
8788 }
8789}
8790
8791#[derive(Clone, Debug, Default, PartialEq)]
8793#[non_exhaustive]
8794pub struct CommitWorkspaceChangesResponse {
8795 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8796}
8797
8798impl CommitWorkspaceChangesResponse {
8799 pub fn new() -> Self {
8800 std::default::Default::default()
8801 }
8802}
8803
8804impl wkt::message::Message for CommitWorkspaceChangesResponse {
8805 fn typename() -> &'static str {
8806 "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
8807 }
8808}
8809
8810#[doc(hidden)]
8811impl<'de> serde::de::Deserialize<'de> for CommitWorkspaceChangesResponse {
8812 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8813 where
8814 D: serde::Deserializer<'de>,
8815 {
8816 #[allow(non_camel_case_types)]
8817 #[doc(hidden)]
8818 #[derive(PartialEq, Eq, Hash)]
8819 enum __FieldTag {
8820 Unknown(std::string::String),
8821 }
8822 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8823 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8824 where
8825 D: serde::Deserializer<'de>,
8826 {
8827 struct Visitor;
8828 impl<'de> serde::de::Visitor<'de> for Visitor {
8829 type Value = __FieldTag;
8830 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8831 formatter.write_str("a field name for CommitWorkspaceChangesResponse")
8832 }
8833 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8834 where
8835 E: serde::de::Error,
8836 {
8837 use std::result::Result::Ok;
8838 use std::string::ToString;
8839 Ok(__FieldTag::Unknown(value.to_string()))
8840 }
8841 }
8842 deserializer.deserialize_identifier(Visitor)
8843 }
8844 }
8845 struct Visitor;
8846 impl<'de> serde::de::Visitor<'de> for Visitor {
8847 type Value = CommitWorkspaceChangesResponse;
8848 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8849 formatter.write_str("struct CommitWorkspaceChangesResponse")
8850 }
8851 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8852 where
8853 A: serde::de::MapAccess<'de>,
8854 {
8855 #[allow(unused_imports)]
8856 use serde::de::Error;
8857 use std::option::Option::Some;
8858 let mut result = Self::Value::new();
8859 while let Some(tag) = map.next_key::<__FieldTag>()? {
8860 #[allow(clippy::match_single_binding)]
8861 match tag {
8862 __FieldTag::Unknown(key) => {
8863 let value = map.next_value::<serde_json::Value>()?;
8864 result._unknown_fields.insert(key, value);
8865 }
8866 }
8867 }
8868 std::result::Result::Ok(result)
8869 }
8870 }
8871 deserializer.deserialize_any(Visitor)
8872 }
8873}
8874
8875#[doc(hidden)]
8876impl serde::ser::Serialize for CommitWorkspaceChangesResponse {
8877 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8878 where
8879 S: serde::ser::Serializer,
8880 {
8881 use serde::ser::SerializeMap;
8882 #[allow(unused_imports)]
8883 use std::option::Option::Some;
8884 let mut state = serializer.serialize_map(std::option::Option::None)?;
8885 if !self._unknown_fields.is_empty() {
8886 for (key, value) in self._unknown_fields.iter() {
8887 state.serialize_entry(key, &value)?;
8888 }
8889 }
8890 state.end()
8891 }
8892}
8893
8894#[derive(Clone, Debug, Default, PartialEq)]
8896#[non_exhaustive]
8897pub struct ResetWorkspaceChangesRequest {
8898 pub name: std::string::String,
8900
8901 pub paths: std::vec::Vec<std::string::String>,
8904
8905 pub clean: bool,
8907
8908 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8909}
8910
8911impl ResetWorkspaceChangesRequest {
8912 pub fn new() -> Self {
8913 std::default::Default::default()
8914 }
8915
8916 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8918 self.name = v.into();
8919 self
8920 }
8921
8922 pub fn set_paths<T, V>(mut self, v: T) -> Self
8924 where
8925 T: std::iter::IntoIterator<Item = V>,
8926 V: std::convert::Into<std::string::String>,
8927 {
8928 use std::iter::Iterator;
8929 self.paths = v.into_iter().map(|i| i.into()).collect();
8930 self
8931 }
8932
8933 pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8935 self.clean = v.into();
8936 self
8937 }
8938}
8939
8940impl wkt::message::Message for ResetWorkspaceChangesRequest {
8941 fn typename() -> &'static str {
8942 "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
8943 }
8944}
8945
8946#[doc(hidden)]
8947impl<'de> serde::de::Deserialize<'de> for ResetWorkspaceChangesRequest {
8948 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8949 where
8950 D: serde::Deserializer<'de>,
8951 {
8952 #[allow(non_camel_case_types)]
8953 #[doc(hidden)]
8954 #[derive(PartialEq, Eq, Hash)]
8955 enum __FieldTag {
8956 __name,
8957 __paths,
8958 __clean,
8959 Unknown(std::string::String),
8960 }
8961 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8962 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8963 where
8964 D: serde::Deserializer<'de>,
8965 {
8966 struct Visitor;
8967 impl<'de> serde::de::Visitor<'de> for Visitor {
8968 type Value = __FieldTag;
8969 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8970 formatter.write_str("a field name for ResetWorkspaceChangesRequest")
8971 }
8972 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8973 where
8974 E: serde::de::Error,
8975 {
8976 use std::result::Result::Ok;
8977 use std::string::ToString;
8978 match value {
8979 "name" => Ok(__FieldTag::__name),
8980 "paths" => Ok(__FieldTag::__paths),
8981 "clean" => Ok(__FieldTag::__clean),
8982 _ => Ok(__FieldTag::Unknown(value.to_string())),
8983 }
8984 }
8985 }
8986 deserializer.deserialize_identifier(Visitor)
8987 }
8988 }
8989 struct Visitor;
8990 impl<'de> serde::de::Visitor<'de> for Visitor {
8991 type Value = ResetWorkspaceChangesRequest;
8992 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8993 formatter.write_str("struct ResetWorkspaceChangesRequest")
8994 }
8995 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8996 where
8997 A: serde::de::MapAccess<'de>,
8998 {
8999 #[allow(unused_imports)]
9000 use serde::de::Error;
9001 use std::option::Option::Some;
9002 let mut fields = std::collections::HashSet::new();
9003 let mut result = Self::Value::new();
9004 while let Some(tag) = map.next_key::<__FieldTag>()? {
9005 #[allow(clippy::match_single_binding)]
9006 match tag {
9007 __FieldTag::__name => {
9008 if !fields.insert(__FieldTag::__name) {
9009 return std::result::Result::Err(A::Error::duplicate_field(
9010 "multiple values for name",
9011 ));
9012 }
9013 result.name = map
9014 .next_value::<std::option::Option<std::string::String>>()?
9015 .unwrap_or_default();
9016 }
9017 __FieldTag::__paths => {
9018 if !fields.insert(__FieldTag::__paths) {
9019 return std::result::Result::Err(A::Error::duplicate_field(
9020 "multiple values for paths",
9021 ));
9022 }
9023 result.paths = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
9024 }
9025 __FieldTag::__clean => {
9026 if !fields.insert(__FieldTag::__clean) {
9027 return std::result::Result::Err(A::Error::duplicate_field(
9028 "multiple values for clean",
9029 ));
9030 }
9031 result.clean = map
9032 .next_value::<std::option::Option<bool>>()?
9033 .unwrap_or_default();
9034 }
9035 __FieldTag::Unknown(key) => {
9036 let value = map.next_value::<serde_json::Value>()?;
9037 result._unknown_fields.insert(key, value);
9038 }
9039 }
9040 }
9041 std::result::Result::Ok(result)
9042 }
9043 }
9044 deserializer.deserialize_any(Visitor)
9045 }
9046}
9047
9048#[doc(hidden)]
9049impl serde::ser::Serialize for ResetWorkspaceChangesRequest {
9050 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9051 where
9052 S: serde::ser::Serializer,
9053 {
9054 use serde::ser::SerializeMap;
9055 #[allow(unused_imports)]
9056 use std::option::Option::Some;
9057 let mut state = serializer.serialize_map(std::option::Option::None)?;
9058 if !self.name.is_empty() {
9059 state.serialize_entry("name", &self.name)?;
9060 }
9061 if !self.paths.is_empty() {
9062 state.serialize_entry("paths", &self.paths)?;
9063 }
9064 if !wkt::internal::is_default(&self.clean) {
9065 state.serialize_entry("clean", &self.clean)?;
9066 }
9067 if !self._unknown_fields.is_empty() {
9068 for (key, value) in self._unknown_fields.iter() {
9069 state.serialize_entry(key, &value)?;
9070 }
9071 }
9072 state.end()
9073 }
9074}
9075
9076#[derive(Clone, Debug, Default, PartialEq)]
9078#[non_exhaustive]
9079pub struct ResetWorkspaceChangesResponse {
9080 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9081}
9082
9083impl ResetWorkspaceChangesResponse {
9084 pub fn new() -> Self {
9085 std::default::Default::default()
9086 }
9087}
9088
9089impl wkt::message::Message for ResetWorkspaceChangesResponse {
9090 fn typename() -> &'static str {
9091 "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
9092 }
9093}
9094
9095#[doc(hidden)]
9096impl<'de> serde::de::Deserialize<'de> for ResetWorkspaceChangesResponse {
9097 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9098 where
9099 D: serde::Deserializer<'de>,
9100 {
9101 #[allow(non_camel_case_types)]
9102 #[doc(hidden)]
9103 #[derive(PartialEq, Eq, Hash)]
9104 enum __FieldTag {
9105 Unknown(std::string::String),
9106 }
9107 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9108 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9109 where
9110 D: serde::Deserializer<'de>,
9111 {
9112 struct Visitor;
9113 impl<'de> serde::de::Visitor<'de> for Visitor {
9114 type Value = __FieldTag;
9115 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9116 formatter.write_str("a field name for ResetWorkspaceChangesResponse")
9117 }
9118 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9119 where
9120 E: serde::de::Error,
9121 {
9122 use std::result::Result::Ok;
9123 use std::string::ToString;
9124 Ok(__FieldTag::Unknown(value.to_string()))
9125 }
9126 }
9127 deserializer.deserialize_identifier(Visitor)
9128 }
9129 }
9130 struct Visitor;
9131 impl<'de> serde::de::Visitor<'de> for Visitor {
9132 type Value = ResetWorkspaceChangesResponse;
9133 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9134 formatter.write_str("struct ResetWorkspaceChangesResponse")
9135 }
9136 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9137 where
9138 A: serde::de::MapAccess<'de>,
9139 {
9140 #[allow(unused_imports)]
9141 use serde::de::Error;
9142 use std::option::Option::Some;
9143 let mut result = Self::Value::new();
9144 while let Some(tag) = map.next_key::<__FieldTag>()? {
9145 #[allow(clippy::match_single_binding)]
9146 match tag {
9147 __FieldTag::Unknown(key) => {
9148 let value = map.next_value::<serde_json::Value>()?;
9149 result._unknown_fields.insert(key, value);
9150 }
9151 }
9152 }
9153 std::result::Result::Ok(result)
9154 }
9155 }
9156 deserializer.deserialize_any(Visitor)
9157 }
9158}
9159
9160#[doc(hidden)]
9161impl serde::ser::Serialize for ResetWorkspaceChangesResponse {
9162 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9163 where
9164 S: serde::ser::Serializer,
9165 {
9166 use serde::ser::SerializeMap;
9167 #[allow(unused_imports)]
9168 use std::option::Option::Some;
9169 let mut state = serializer.serialize_map(std::option::Option::None)?;
9170 if !self._unknown_fields.is_empty() {
9171 for (key, value) in self._unknown_fields.iter() {
9172 state.serialize_entry(key, &value)?;
9173 }
9174 }
9175 state.end()
9176 }
9177}
9178
9179#[derive(Clone, Debug, Default, PartialEq)]
9181#[non_exhaustive]
9182pub struct FetchFileDiffRequest {
9183 pub workspace: std::string::String,
9185
9186 pub path: std::string::String,
9189
9190 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9191}
9192
9193impl FetchFileDiffRequest {
9194 pub fn new() -> Self {
9195 std::default::Default::default()
9196 }
9197
9198 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9200 self.workspace = v.into();
9201 self
9202 }
9203
9204 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9206 self.path = v.into();
9207 self
9208 }
9209}
9210
9211impl wkt::message::Message for FetchFileDiffRequest {
9212 fn typename() -> &'static str {
9213 "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
9214 }
9215}
9216
9217#[doc(hidden)]
9218impl<'de> serde::de::Deserialize<'de> for FetchFileDiffRequest {
9219 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9220 where
9221 D: serde::Deserializer<'de>,
9222 {
9223 #[allow(non_camel_case_types)]
9224 #[doc(hidden)]
9225 #[derive(PartialEq, Eq, Hash)]
9226 enum __FieldTag {
9227 __workspace,
9228 __path,
9229 Unknown(std::string::String),
9230 }
9231 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9232 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9233 where
9234 D: serde::Deserializer<'de>,
9235 {
9236 struct Visitor;
9237 impl<'de> serde::de::Visitor<'de> for Visitor {
9238 type Value = __FieldTag;
9239 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9240 formatter.write_str("a field name for FetchFileDiffRequest")
9241 }
9242 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9243 where
9244 E: serde::de::Error,
9245 {
9246 use std::result::Result::Ok;
9247 use std::string::ToString;
9248 match value {
9249 "workspace" => Ok(__FieldTag::__workspace),
9250 "path" => Ok(__FieldTag::__path),
9251 _ => Ok(__FieldTag::Unknown(value.to_string())),
9252 }
9253 }
9254 }
9255 deserializer.deserialize_identifier(Visitor)
9256 }
9257 }
9258 struct Visitor;
9259 impl<'de> serde::de::Visitor<'de> for Visitor {
9260 type Value = FetchFileDiffRequest;
9261 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9262 formatter.write_str("struct FetchFileDiffRequest")
9263 }
9264 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9265 where
9266 A: serde::de::MapAccess<'de>,
9267 {
9268 #[allow(unused_imports)]
9269 use serde::de::Error;
9270 use std::option::Option::Some;
9271 let mut fields = std::collections::HashSet::new();
9272 let mut result = Self::Value::new();
9273 while let Some(tag) = map.next_key::<__FieldTag>()? {
9274 #[allow(clippy::match_single_binding)]
9275 match tag {
9276 __FieldTag::__workspace => {
9277 if !fields.insert(__FieldTag::__workspace) {
9278 return std::result::Result::Err(A::Error::duplicate_field(
9279 "multiple values for workspace",
9280 ));
9281 }
9282 result.workspace = map
9283 .next_value::<std::option::Option<std::string::String>>()?
9284 .unwrap_or_default();
9285 }
9286 __FieldTag::__path => {
9287 if !fields.insert(__FieldTag::__path) {
9288 return std::result::Result::Err(A::Error::duplicate_field(
9289 "multiple values for path",
9290 ));
9291 }
9292 result.path = map
9293 .next_value::<std::option::Option<std::string::String>>()?
9294 .unwrap_or_default();
9295 }
9296 __FieldTag::Unknown(key) => {
9297 let value = map.next_value::<serde_json::Value>()?;
9298 result._unknown_fields.insert(key, value);
9299 }
9300 }
9301 }
9302 std::result::Result::Ok(result)
9303 }
9304 }
9305 deserializer.deserialize_any(Visitor)
9306 }
9307}
9308
9309#[doc(hidden)]
9310impl serde::ser::Serialize for FetchFileDiffRequest {
9311 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9312 where
9313 S: serde::ser::Serializer,
9314 {
9315 use serde::ser::SerializeMap;
9316 #[allow(unused_imports)]
9317 use std::option::Option::Some;
9318 let mut state = serializer.serialize_map(std::option::Option::None)?;
9319 if !self.workspace.is_empty() {
9320 state.serialize_entry("workspace", &self.workspace)?;
9321 }
9322 if !self.path.is_empty() {
9323 state.serialize_entry("path", &self.path)?;
9324 }
9325 if !self._unknown_fields.is_empty() {
9326 for (key, value) in self._unknown_fields.iter() {
9327 state.serialize_entry(key, &value)?;
9328 }
9329 }
9330 state.end()
9331 }
9332}
9333
9334#[derive(Clone, Debug, Default, PartialEq)]
9336#[non_exhaustive]
9337pub struct FetchFileDiffResponse {
9338 pub formatted_diff: std::string::String,
9340
9341 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9342}
9343
9344impl FetchFileDiffResponse {
9345 pub fn new() -> Self {
9346 std::default::Default::default()
9347 }
9348
9349 pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9351 self.formatted_diff = v.into();
9352 self
9353 }
9354}
9355
9356impl wkt::message::Message for FetchFileDiffResponse {
9357 fn typename() -> &'static str {
9358 "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
9359 }
9360}
9361
9362#[doc(hidden)]
9363impl<'de> serde::de::Deserialize<'de> for FetchFileDiffResponse {
9364 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9365 where
9366 D: serde::Deserializer<'de>,
9367 {
9368 #[allow(non_camel_case_types)]
9369 #[doc(hidden)]
9370 #[derive(PartialEq, Eq, Hash)]
9371 enum __FieldTag {
9372 __formatted_diff,
9373 Unknown(std::string::String),
9374 }
9375 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9376 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9377 where
9378 D: serde::Deserializer<'de>,
9379 {
9380 struct Visitor;
9381 impl<'de> serde::de::Visitor<'de> for Visitor {
9382 type Value = __FieldTag;
9383 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9384 formatter.write_str("a field name for FetchFileDiffResponse")
9385 }
9386 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9387 where
9388 E: serde::de::Error,
9389 {
9390 use std::result::Result::Ok;
9391 use std::string::ToString;
9392 match value {
9393 "formattedDiff" => Ok(__FieldTag::__formatted_diff),
9394 "formatted_diff" => Ok(__FieldTag::__formatted_diff),
9395 _ => Ok(__FieldTag::Unknown(value.to_string())),
9396 }
9397 }
9398 }
9399 deserializer.deserialize_identifier(Visitor)
9400 }
9401 }
9402 struct Visitor;
9403 impl<'de> serde::de::Visitor<'de> for Visitor {
9404 type Value = FetchFileDiffResponse;
9405 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9406 formatter.write_str("struct FetchFileDiffResponse")
9407 }
9408 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9409 where
9410 A: serde::de::MapAccess<'de>,
9411 {
9412 #[allow(unused_imports)]
9413 use serde::de::Error;
9414 use std::option::Option::Some;
9415 let mut fields = std::collections::HashSet::new();
9416 let mut result = Self::Value::new();
9417 while let Some(tag) = map.next_key::<__FieldTag>()? {
9418 #[allow(clippy::match_single_binding)]
9419 match tag {
9420 __FieldTag::__formatted_diff => {
9421 if !fields.insert(__FieldTag::__formatted_diff) {
9422 return std::result::Result::Err(A::Error::duplicate_field(
9423 "multiple values for formatted_diff",
9424 ));
9425 }
9426 result.formatted_diff = map
9427 .next_value::<std::option::Option<std::string::String>>()?
9428 .unwrap_or_default();
9429 }
9430 __FieldTag::Unknown(key) => {
9431 let value = map.next_value::<serde_json::Value>()?;
9432 result._unknown_fields.insert(key, value);
9433 }
9434 }
9435 }
9436 std::result::Result::Ok(result)
9437 }
9438 }
9439 deserializer.deserialize_any(Visitor)
9440 }
9441}
9442
9443#[doc(hidden)]
9444impl serde::ser::Serialize for FetchFileDiffResponse {
9445 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9446 where
9447 S: serde::ser::Serializer,
9448 {
9449 use serde::ser::SerializeMap;
9450 #[allow(unused_imports)]
9451 use std::option::Option::Some;
9452 let mut state = serializer.serialize_map(std::option::Option::None)?;
9453 if !self.formatted_diff.is_empty() {
9454 state.serialize_entry("formattedDiff", &self.formatted_diff)?;
9455 }
9456 if !self._unknown_fields.is_empty() {
9457 for (key, value) in self._unknown_fields.iter() {
9458 state.serialize_entry(key, &value)?;
9459 }
9460 }
9461 state.end()
9462 }
9463}
9464
9465#[derive(Clone, Debug, Default, PartialEq)]
9467#[non_exhaustive]
9468pub struct QueryDirectoryContentsRequest {
9469 pub workspace: std::string::String,
9471
9472 pub path: std::string::String,
9475
9476 pub page_size: i32,
9480
9481 pub page_token: std::string::String,
9488
9489 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9490}
9491
9492impl QueryDirectoryContentsRequest {
9493 pub fn new() -> Self {
9494 std::default::Default::default()
9495 }
9496
9497 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9499 self.workspace = v.into();
9500 self
9501 }
9502
9503 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9505 self.path = v.into();
9506 self
9507 }
9508
9509 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9511 self.page_size = v.into();
9512 self
9513 }
9514
9515 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9517 self.page_token = v.into();
9518 self
9519 }
9520}
9521
9522impl wkt::message::Message for QueryDirectoryContentsRequest {
9523 fn typename() -> &'static str {
9524 "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
9525 }
9526}
9527
9528#[doc(hidden)]
9529impl<'de> serde::de::Deserialize<'de> for QueryDirectoryContentsRequest {
9530 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9531 where
9532 D: serde::Deserializer<'de>,
9533 {
9534 #[allow(non_camel_case_types)]
9535 #[doc(hidden)]
9536 #[derive(PartialEq, Eq, Hash)]
9537 enum __FieldTag {
9538 __workspace,
9539 __path,
9540 __page_size,
9541 __page_token,
9542 Unknown(std::string::String),
9543 }
9544 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9545 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9546 where
9547 D: serde::Deserializer<'de>,
9548 {
9549 struct Visitor;
9550 impl<'de> serde::de::Visitor<'de> for Visitor {
9551 type Value = __FieldTag;
9552 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9553 formatter.write_str("a field name for QueryDirectoryContentsRequest")
9554 }
9555 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9556 where
9557 E: serde::de::Error,
9558 {
9559 use std::result::Result::Ok;
9560 use std::string::ToString;
9561 match value {
9562 "workspace" => Ok(__FieldTag::__workspace),
9563 "path" => Ok(__FieldTag::__path),
9564 "pageSize" => Ok(__FieldTag::__page_size),
9565 "page_size" => Ok(__FieldTag::__page_size),
9566 "pageToken" => Ok(__FieldTag::__page_token),
9567 "page_token" => Ok(__FieldTag::__page_token),
9568 _ => Ok(__FieldTag::Unknown(value.to_string())),
9569 }
9570 }
9571 }
9572 deserializer.deserialize_identifier(Visitor)
9573 }
9574 }
9575 struct Visitor;
9576 impl<'de> serde::de::Visitor<'de> for Visitor {
9577 type Value = QueryDirectoryContentsRequest;
9578 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9579 formatter.write_str("struct QueryDirectoryContentsRequest")
9580 }
9581 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9582 where
9583 A: serde::de::MapAccess<'de>,
9584 {
9585 #[allow(unused_imports)]
9586 use serde::de::Error;
9587 use std::option::Option::Some;
9588 let mut fields = std::collections::HashSet::new();
9589 let mut result = Self::Value::new();
9590 while let Some(tag) = map.next_key::<__FieldTag>()? {
9591 #[allow(clippy::match_single_binding)]
9592 match tag {
9593 __FieldTag::__workspace => {
9594 if !fields.insert(__FieldTag::__workspace) {
9595 return std::result::Result::Err(A::Error::duplicate_field(
9596 "multiple values for workspace",
9597 ));
9598 }
9599 result.workspace = map
9600 .next_value::<std::option::Option<std::string::String>>()?
9601 .unwrap_or_default();
9602 }
9603 __FieldTag::__path => {
9604 if !fields.insert(__FieldTag::__path) {
9605 return std::result::Result::Err(A::Error::duplicate_field(
9606 "multiple values for path",
9607 ));
9608 }
9609 result.path = map
9610 .next_value::<std::option::Option<std::string::String>>()?
9611 .unwrap_or_default();
9612 }
9613 __FieldTag::__page_size => {
9614 if !fields.insert(__FieldTag::__page_size) {
9615 return std::result::Result::Err(A::Error::duplicate_field(
9616 "multiple values for page_size",
9617 ));
9618 }
9619 struct __With(std::option::Option<i32>);
9620 impl<'de> serde::de::Deserialize<'de> for __With {
9621 fn deserialize<D>(
9622 deserializer: D,
9623 ) -> std::result::Result<Self, D::Error>
9624 where
9625 D: serde::de::Deserializer<'de>,
9626 {
9627 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
9628 }
9629 }
9630 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
9631 }
9632 __FieldTag::__page_token => {
9633 if !fields.insert(__FieldTag::__page_token) {
9634 return std::result::Result::Err(A::Error::duplicate_field(
9635 "multiple values for page_token",
9636 ));
9637 }
9638 result.page_token = map
9639 .next_value::<std::option::Option<std::string::String>>()?
9640 .unwrap_or_default();
9641 }
9642 __FieldTag::Unknown(key) => {
9643 let value = map.next_value::<serde_json::Value>()?;
9644 result._unknown_fields.insert(key, value);
9645 }
9646 }
9647 }
9648 std::result::Result::Ok(result)
9649 }
9650 }
9651 deserializer.deserialize_any(Visitor)
9652 }
9653}
9654
9655#[doc(hidden)]
9656impl serde::ser::Serialize for QueryDirectoryContentsRequest {
9657 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9658 where
9659 S: serde::ser::Serializer,
9660 {
9661 use serde::ser::SerializeMap;
9662 #[allow(unused_imports)]
9663 use std::option::Option::Some;
9664 let mut state = serializer.serialize_map(std::option::Option::None)?;
9665 if !self.workspace.is_empty() {
9666 state.serialize_entry("workspace", &self.workspace)?;
9667 }
9668 if !self.path.is_empty() {
9669 state.serialize_entry("path", &self.path)?;
9670 }
9671 if !wkt::internal::is_default(&self.page_size) {
9672 struct __With<'a>(&'a i32);
9673 impl<'a> serde::ser::Serialize for __With<'a> {
9674 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9675 where
9676 S: serde::ser::Serializer,
9677 {
9678 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
9679 }
9680 }
9681 state.serialize_entry("pageSize", &__With(&self.page_size))?;
9682 }
9683 if !self.page_token.is_empty() {
9684 state.serialize_entry("pageToken", &self.page_token)?;
9685 }
9686 if !self._unknown_fields.is_empty() {
9687 for (key, value) in self._unknown_fields.iter() {
9688 state.serialize_entry(key, &value)?;
9689 }
9690 }
9691 state.end()
9692 }
9693}
9694
9695#[derive(Clone, Debug, Default, PartialEq)]
9697#[non_exhaustive]
9698pub struct QueryDirectoryContentsResponse {
9699 pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
9701
9702 pub next_page_token: std::string::String,
9705
9706 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9707}
9708
9709impl QueryDirectoryContentsResponse {
9710 pub fn new() -> Self {
9711 std::default::Default::default()
9712 }
9713
9714 pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
9716 where
9717 T: std::iter::IntoIterator<Item = V>,
9718 V: std::convert::Into<crate::model::DirectoryEntry>,
9719 {
9720 use std::iter::Iterator;
9721 self.directory_entries = v.into_iter().map(|i| i.into()).collect();
9722 self
9723 }
9724
9725 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9727 self.next_page_token = v.into();
9728 self
9729 }
9730}
9731
9732impl wkt::message::Message for QueryDirectoryContentsResponse {
9733 fn typename() -> &'static str {
9734 "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
9735 }
9736}
9737
9738#[doc(hidden)]
9739impl gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
9740 type PageItem = crate::model::DirectoryEntry;
9741
9742 fn items(self) -> std::vec::Vec<Self::PageItem> {
9743 self.directory_entries
9744 }
9745
9746 fn next_page_token(&self) -> std::string::String {
9747 use std::clone::Clone;
9748 self.next_page_token.clone()
9749 }
9750}
9751
9752#[doc(hidden)]
9753impl<'de> serde::de::Deserialize<'de> for QueryDirectoryContentsResponse {
9754 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9755 where
9756 D: serde::Deserializer<'de>,
9757 {
9758 #[allow(non_camel_case_types)]
9759 #[doc(hidden)]
9760 #[derive(PartialEq, Eq, Hash)]
9761 enum __FieldTag {
9762 __directory_entries,
9763 __next_page_token,
9764 Unknown(std::string::String),
9765 }
9766 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9767 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9768 where
9769 D: serde::Deserializer<'de>,
9770 {
9771 struct Visitor;
9772 impl<'de> serde::de::Visitor<'de> for Visitor {
9773 type Value = __FieldTag;
9774 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9775 formatter.write_str("a field name for QueryDirectoryContentsResponse")
9776 }
9777 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9778 where
9779 E: serde::de::Error,
9780 {
9781 use std::result::Result::Ok;
9782 use std::string::ToString;
9783 match value {
9784 "directoryEntries" => Ok(__FieldTag::__directory_entries),
9785 "directory_entries" => Ok(__FieldTag::__directory_entries),
9786 "nextPageToken" => Ok(__FieldTag::__next_page_token),
9787 "next_page_token" => Ok(__FieldTag::__next_page_token),
9788 _ => Ok(__FieldTag::Unknown(value.to_string())),
9789 }
9790 }
9791 }
9792 deserializer.deserialize_identifier(Visitor)
9793 }
9794 }
9795 struct Visitor;
9796 impl<'de> serde::de::Visitor<'de> for Visitor {
9797 type Value = QueryDirectoryContentsResponse;
9798 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9799 formatter.write_str("struct QueryDirectoryContentsResponse")
9800 }
9801 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9802 where
9803 A: serde::de::MapAccess<'de>,
9804 {
9805 #[allow(unused_imports)]
9806 use serde::de::Error;
9807 use std::option::Option::Some;
9808 let mut fields = std::collections::HashSet::new();
9809 let mut result = Self::Value::new();
9810 while let Some(tag) = map.next_key::<__FieldTag>()? {
9811 #[allow(clippy::match_single_binding)]
9812 match tag {
9813 __FieldTag::__directory_entries => {
9814 if !fields.insert(__FieldTag::__directory_entries) {
9815 return std::result::Result::Err(A::Error::duplicate_field(
9816 "multiple values for directory_entries",
9817 ));
9818 }
9819 result.directory_entries =
9820 map.next_value::<std::option::Option<
9821 std::vec::Vec<crate::model::DirectoryEntry>,
9822 >>()?
9823 .unwrap_or_default();
9824 }
9825 __FieldTag::__next_page_token => {
9826 if !fields.insert(__FieldTag::__next_page_token) {
9827 return std::result::Result::Err(A::Error::duplicate_field(
9828 "multiple values for next_page_token",
9829 ));
9830 }
9831 result.next_page_token = map
9832 .next_value::<std::option::Option<std::string::String>>()?
9833 .unwrap_or_default();
9834 }
9835 __FieldTag::Unknown(key) => {
9836 let value = map.next_value::<serde_json::Value>()?;
9837 result._unknown_fields.insert(key, value);
9838 }
9839 }
9840 }
9841 std::result::Result::Ok(result)
9842 }
9843 }
9844 deserializer.deserialize_any(Visitor)
9845 }
9846}
9847
9848#[doc(hidden)]
9849impl serde::ser::Serialize for QueryDirectoryContentsResponse {
9850 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9851 where
9852 S: serde::ser::Serializer,
9853 {
9854 use serde::ser::SerializeMap;
9855 #[allow(unused_imports)]
9856 use std::option::Option::Some;
9857 let mut state = serializer.serialize_map(std::option::Option::None)?;
9858 if !self.directory_entries.is_empty() {
9859 state.serialize_entry("directoryEntries", &self.directory_entries)?;
9860 }
9861 if !self.next_page_token.is_empty() {
9862 state.serialize_entry("nextPageToken", &self.next_page_token)?;
9863 }
9864 if !self._unknown_fields.is_empty() {
9865 for (key, value) in self._unknown_fields.iter() {
9866 state.serialize_entry(key, &value)?;
9867 }
9868 }
9869 state.end()
9870 }
9871}
9872
9873#[derive(Clone, Debug, Default, PartialEq)]
9875#[non_exhaustive]
9876pub struct DirectoryEntry {
9877 pub entry: std::option::Option<crate::model::directory_entry::Entry>,
9879
9880 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9881}
9882
9883impl DirectoryEntry {
9884 pub fn new() -> Self {
9885 std::default::Default::default()
9886 }
9887
9888 pub fn set_entry<
9893 T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
9894 >(
9895 mut self,
9896 v: T,
9897 ) -> Self {
9898 self.entry = v.into();
9899 self
9900 }
9901
9902 pub fn file(&self) -> std::option::Option<&std::string::String> {
9906 #[allow(unreachable_patterns)]
9907 self.entry.as_ref().and_then(|v| match v {
9908 crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
9909 _ => std::option::Option::None,
9910 })
9911 }
9912
9913 pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9919 self.entry =
9920 std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
9921 self
9922 }
9923
9924 pub fn directory(&self) -> std::option::Option<&std::string::String> {
9928 #[allow(unreachable_patterns)]
9929 self.entry.as_ref().and_then(|v| match v {
9930 crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
9931 _ => std::option::Option::None,
9932 })
9933 }
9934
9935 pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9941 self.entry =
9942 std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
9943 self
9944 }
9945}
9946
9947impl wkt::message::Message for DirectoryEntry {
9948 fn typename() -> &'static str {
9949 "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
9950 }
9951}
9952
9953#[doc(hidden)]
9954impl<'de> serde::de::Deserialize<'de> for DirectoryEntry {
9955 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9956 where
9957 D: serde::Deserializer<'de>,
9958 {
9959 #[allow(non_camel_case_types)]
9960 #[doc(hidden)]
9961 #[derive(PartialEq, Eq, Hash)]
9962 enum __FieldTag {
9963 __file,
9964 __directory,
9965 Unknown(std::string::String),
9966 }
9967 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9968 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9969 where
9970 D: serde::Deserializer<'de>,
9971 {
9972 struct Visitor;
9973 impl<'de> serde::de::Visitor<'de> for Visitor {
9974 type Value = __FieldTag;
9975 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9976 formatter.write_str("a field name for DirectoryEntry")
9977 }
9978 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9979 where
9980 E: serde::de::Error,
9981 {
9982 use std::result::Result::Ok;
9983 use std::string::ToString;
9984 match value {
9985 "file" => Ok(__FieldTag::__file),
9986 "directory" => Ok(__FieldTag::__directory),
9987 _ => Ok(__FieldTag::Unknown(value.to_string())),
9988 }
9989 }
9990 }
9991 deserializer.deserialize_identifier(Visitor)
9992 }
9993 }
9994 struct Visitor;
9995 impl<'de> serde::de::Visitor<'de> for Visitor {
9996 type Value = DirectoryEntry;
9997 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9998 formatter.write_str("struct DirectoryEntry")
9999 }
10000 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10001 where
10002 A: serde::de::MapAccess<'de>,
10003 {
10004 #[allow(unused_imports)]
10005 use serde::de::Error;
10006 use std::option::Option::Some;
10007 let mut fields = std::collections::HashSet::new();
10008 let mut result = Self::Value::new();
10009 while let Some(tag) = map.next_key::<__FieldTag>()? {
10010 #[allow(clippy::match_single_binding)]
10011 match tag {
10012 __FieldTag::__file => {
10013 if !fields.insert(__FieldTag::__file) {
10014 return std::result::Result::Err(A::Error::duplicate_field(
10015 "multiple values for file",
10016 ));
10017 }
10018 if result.entry.is_some() {
10019 return std::result::Result::Err(A::Error::duplicate_field(
10020 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.DirectoryEntry.file, latest field was file",
10021 ));
10022 }
10023 result.entry = std::option::Option::Some(
10024 crate::model::directory_entry::Entry::File(
10025 map.next_value::<std::option::Option<std::string::String>>()?
10026 .unwrap_or_default(),
10027 ),
10028 );
10029 }
10030 __FieldTag::__directory => {
10031 if !fields.insert(__FieldTag::__directory) {
10032 return std::result::Result::Err(A::Error::duplicate_field(
10033 "multiple values for directory",
10034 ));
10035 }
10036 if result.entry.is_some() {
10037 return std::result::Result::Err(A::Error::duplicate_field(
10038 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.DirectoryEntry.directory, latest field was directory",
10039 ));
10040 }
10041 result.entry = std::option::Option::Some(
10042 crate::model::directory_entry::Entry::Directory(
10043 map.next_value::<std::option::Option<std::string::String>>()?
10044 .unwrap_or_default(),
10045 ),
10046 );
10047 }
10048 __FieldTag::Unknown(key) => {
10049 let value = map.next_value::<serde_json::Value>()?;
10050 result._unknown_fields.insert(key, value);
10051 }
10052 }
10053 }
10054 std::result::Result::Ok(result)
10055 }
10056 }
10057 deserializer.deserialize_any(Visitor)
10058 }
10059}
10060
10061#[doc(hidden)]
10062impl serde::ser::Serialize for DirectoryEntry {
10063 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10064 where
10065 S: serde::ser::Serializer,
10066 {
10067 use serde::ser::SerializeMap;
10068 #[allow(unused_imports)]
10069 use std::option::Option::Some;
10070 let mut state = serializer.serialize_map(std::option::Option::None)?;
10071 if let Some(value) = self.file() {
10072 state.serialize_entry("file", value)?;
10073 }
10074 if let Some(value) = self.directory() {
10075 state.serialize_entry("directory", value)?;
10076 }
10077 if !self._unknown_fields.is_empty() {
10078 for (key, value) in self._unknown_fields.iter() {
10079 state.serialize_entry(key, &value)?;
10080 }
10081 }
10082 state.end()
10083 }
10084}
10085
10086pub mod directory_entry {
10088 #[allow(unused_imports)]
10089 use super::*;
10090
10091 #[derive(Clone, Debug, PartialEq)]
10093 #[non_exhaustive]
10094 pub enum Entry {
10095 File(std::string::String),
10097 Directory(std::string::String),
10099 }
10100}
10101
10102#[derive(Clone, Debug, Default, PartialEq)]
10104#[non_exhaustive]
10105pub struct SearchFilesRequest {
10106 pub workspace: std::string::String,
10108
10109 pub page_size: i32,
10113
10114 pub page_token: std::string::String,
10121
10122 pub filter: std::string::String,
10126
10127 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10128}
10129
10130impl SearchFilesRequest {
10131 pub fn new() -> Self {
10132 std::default::Default::default()
10133 }
10134
10135 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10137 self.workspace = v.into();
10138 self
10139 }
10140
10141 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10143 self.page_size = v.into();
10144 self
10145 }
10146
10147 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10149 self.page_token = v.into();
10150 self
10151 }
10152
10153 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10155 self.filter = v.into();
10156 self
10157 }
10158}
10159
10160impl wkt::message::Message for SearchFilesRequest {
10161 fn typename() -> &'static str {
10162 "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
10163 }
10164}
10165
10166#[doc(hidden)]
10167impl<'de> serde::de::Deserialize<'de> for SearchFilesRequest {
10168 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10169 where
10170 D: serde::Deserializer<'de>,
10171 {
10172 #[allow(non_camel_case_types)]
10173 #[doc(hidden)]
10174 #[derive(PartialEq, Eq, Hash)]
10175 enum __FieldTag {
10176 __workspace,
10177 __page_size,
10178 __page_token,
10179 __filter,
10180 Unknown(std::string::String),
10181 }
10182 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10183 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10184 where
10185 D: serde::Deserializer<'de>,
10186 {
10187 struct Visitor;
10188 impl<'de> serde::de::Visitor<'de> for Visitor {
10189 type Value = __FieldTag;
10190 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10191 formatter.write_str("a field name for SearchFilesRequest")
10192 }
10193 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10194 where
10195 E: serde::de::Error,
10196 {
10197 use std::result::Result::Ok;
10198 use std::string::ToString;
10199 match value {
10200 "workspace" => Ok(__FieldTag::__workspace),
10201 "pageSize" => Ok(__FieldTag::__page_size),
10202 "page_size" => Ok(__FieldTag::__page_size),
10203 "pageToken" => Ok(__FieldTag::__page_token),
10204 "page_token" => Ok(__FieldTag::__page_token),
10205 "filter" => Ok(__FieldTag::__filter),
10206 _ => Ok(__FieldTag::Unknown(value.to_string())),
10207 }
10208 }
10209 }
10210 deserializer.deserialize_identifier(Visitor)
10211 }
10212 }
10213 struct Visitor;
10214 impl<'de> serde::de::Visitor<'de> for Visitor {
10215 type Value = SearchFilesRequest;
10216 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10217 formatter.write_str("struct SearchFilesRequest")
10218 }
10219 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10220 where
10221 A: serde::de::MapAccess<'de>,
10222 {
10223 #[allow(unused_imports)]
10224 use serde::de::Error;
10225 use std::option::Option::Some;
10226 let mut fields = std::collections::HashSet::new();
10227 let mut result = Self::Value::new();
10228 while let Some(tag) = map.next_key::<__FieldTag>()? {
10229 #[allow(clippy::match_single_binding)]
10230 match tag {
10231 __FieldTag::__workspace => {
10232 if !fields.insert(__FieldTag::__workspace) {
10233 return std::result::Result::Err(A::Error::duplicate_field(
10234 "multiple values for workspace",
10235 ));
10236 }
10237 result.workspace = map
10238 .next_value::<std::option::Option<std::string::String>>()?
10239 .unwrap_or_default();
10240 }
10241 __FieldTag::__page_size => {
10242 if !fields.insert(__FieldTag::__page_size) {
10243 return std::result::Result::Err(A::Error::duplicate_field(
10244 "multiple values for page_size",
10245 ));
10246 }
10247 struct __With(std::option::Option<i32>);
10248 impl<'de> serde::de::Deserialize<'de> for __With {
10249 fn deserialize<D>(
10250 deserializer: D,
10251 ) -> std::result::Result<Self, D::Error>
10252 where
10253 D: serde::de::Deserializer<'de>,
10254 {
10255 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
10256 }
10257 }
10258 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
10259 }
10260 __FieldTag::__page_token => {
10261 if !fields.insert(__FieldTag::__page_token) {
10262 return std::result::Result::Err(A::Error::duplicate_field(
10263 "multiple values for page_token",
10264 ));
10265 }
10266 result.page_token = map
10267 .next_value::<std::option::Option<std::string::String>>()?
10268 .unwrap_or_default();
10269 }
10270 __FieldTag::__filter => {
10271 if !fields.insert(__FieldTag::__filter) {
10272 return std::result::Result::Err(A::Error::duplicate_field(
10273 "multiple values for filter",
10274 ));
10275 }
10276 result.filter = map
10277 .next_value::<std::option::Option<std::string::String>>()?
10278 .unwrap_or_default();
10279 }
10280 __FieldTag::Unknown(key) => {
10281 let value = map.next_value::<serde_json::Value>()?;
10282 result._unknown_fields.insert(key, value);
10283 }
10284 }
10285 }
10286 std::result::Result::Ok(result)
10287 }
10288 }
10289 deserializer.deserialize_any(Visitor)
10290 }
10291}
10292
10293#[doc(hidden)]
10294impl serde::ser::Serialize for SearchFilesRequest {
10295 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10296 where
10297 S: serde::ser::Serializer,
10298 {
10299 use serde::ser::SerializeMap;
10300 #[allow(unused_imports)]
10301 use std::option::Option::Some;
10302 let mut state = serializer.serialize_map(std::option::Option::None)?;
10303 if !self.workspace.is_empty() {
10304 state.serialize_entry("workspace", &self.workspace)?;
10305 }
10306 if !wkt::internal::is_default(&self.page_size) {
10307 struct __With<'a>(&'a i32);
10308 impl<'a> serde::ser::Serialize for __With<'a> {
10309 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10310 where
10311 S: serde::ser::Serializer,
10312 {
10313 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
10314 }
10315 }
10316 state.serialize_entry("pageSize", &__With(&self.page_size))?;
10317 }
10318 if !self.page_token.is_empty() {
10319 state.serialize_entry("pageToken", &self.page_token)?;
10320 }
10321 if !self.filter.is_empty() {
10322 state.serialize_entry("filter", &self.filter)?;
10323 }
10324 if !self._unknown_fields.is_empty() {
10325 for (key, value) in self._unknown_fields.iter() {
10326 state.serialize_entry(key, &value)?;
10327 }
10328 }
10329 state.end()
10330 }
10331}
10332
10333#[derive(Clone, Debug, Default, PartialEq)]
10335#[non_exhaustive]
10336pub struct SearchFilesResponse {
10337 pub search_results: std::vec::Vec<crate::model::SearchResult>,
10339
10340 pub next_page_token: std::string::String,
10343
10344 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10345}
10346
10347impl SearchFilesResponse {
10348 pub fn new() -> Self {
10349 std::default::Default::default()
10350 }
10351
10352 pub fn set_search_results<T, V>(mut self, v: T) -> Self
10354 where
10355 T: std::iter::IntoIterator<Item = V>,
10356 V: std::convert::Into<crate::model::SearchResult>,
10357 {
10358 use std::iter::Iterator;
10359 self.search_results = v.into_iter().map(|i| i.into()).collect();
10360 self
10361 }
10362
10363 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10365 self.next_page_token = v.into();
10366 self
10367 }
10368}
10369
10370impl wkt::message::Message for SearchFilesResponse {
10371 fn typename() -> &'static str {
10372 "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
10373 }
10374}
10375
10376#[doc(hidden)]
10377impl gax::paginator::internal::PageableResponse for SearchFilesResponse {
10378 type PageItem = crate::model::SearchResult;
10379
10380 fn items(self) -> std::vec::Vec<Self::PageItem> {
10381 self.search_results
10382 }
10383
10384 fn next_page_token(&self) -> std::string::String {
10385 use std::clone::Clone;
10386 self.next_page_token.clone()
10387 }
10388}
10389
10390#[doc(hidden)]
10391impl<'de> serde::de::Deserialize<'de> for SearchFilesResponse {
10392 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10393 where
10394 D: serde::Deserializer<'de>,
10395 {
10396 #[allow(non_camel_case_types)]
10397 #[doc(hidden)]
10398 #[derive(PartialEq, Eq, Hash)]
10399 enum __FieldTag {
10400 __search_results,
10401 __next_page_token,
10402 Unknown(std::string::String),
10403 }
10404 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10405 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10406 where
10407 D: serde::Deserializer<'de>,
10408 {
10409 struct Visitor;
10410 impl<'de> serde::de::Visitor<'de> for Visitor {
10411 type Value = __FieldTag;
10412 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10413 formatter.write_str("a field name for SearchFilesResponse")
10414 }
10415 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10416 where
10417 E: serde::de::Error,
10418 {
10419 use std::result::Result::Ok;
10420 use std::string::ToString;
10421 match value {
10422 "searchResults" => Ok(__FieldTag::__search_results),
10423 "search_results" => Ok(__FieldTag::__search_results),
10424 "nextPageToken" => Ok(__FieldTag::__next_page_token),
10425 "next_page_token" => Ok(__FieldTag::__next_page_token),
10426 _ => Ok(__FieldTag::Unknown(value.to_string())),
10427 }
10428 }
10429 }
10430 deserializer.deserialize_identifier(Visitor)
10431 }
10432 }
10433 struct Visitor;
10434 impl<'de> serde::de::Visitor<'de> for Visitor {
10435 type Value = SearchFilesResponse;
10436 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10437 formatter.write_str("struct SearchFilesResponse")
10438 }
10439 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10440 where
10441 A: serde::de::MapAccess<'de>,
10442 {
10443 #[allow(unused_imports)]
10444 use serde::de::Error;
10445 use std::option::Option::Some;
10446 let mut fields = std::collections::HashSet::new();
10447 let mut result = Self::Value::new();
10448 while let Some(tag) = map.next_key::<__FieldTag>()? {
10449 #[allow(clippy::match_single_binding)]
10450 match tag {
10451 __FieldTag::__search_results => {
10452 if !fields.insert(__FieldTag::__search_results) {
10453 return std::result::Result::Err(A::Error::duplicate_field(
10454 "multiple values for search_results",
10455 ));
10456 }
10457 result.search_results = map.next_value::<std::option::Option<std::vec::Vec<crate::model::SearchResult>>>()?.unwrap_or_default();
10458 }
10459 __FieldTag::__next_page_token => {
10460 if !fields.insert(__FieldTag::__next_page_token) {
10461 return std::result::Result::Err(A::Error::duplicate_field(
10462 "multiple values for next_page_token",
10463 ));
10464 }
10465 result.next_page_token = map
10466 .next_value::<std::option::Option<std::string::String>>()?
10467 .unwrap_or_default();
10468 }
10469 __FieldTag::Unknown(key) => {
10470 let value = map.next_value::<serde_json::Value>()?;
10471 result._unknown_fields.insert(key, value);
10472 }
10473 }
10474 }
10475 std::result::Result::Ok(result)
10476 }
10477 }
10478 deserializer.deserialize_any(Visitor)
10479 }
10480}
10481
10482#[doc(hidden)]
10483impl serde::ser::Serialize for SearchFilesResponse {
10484 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10485 where
10486 S: serde::ser::Serializer,
10487 {
10488 use serde::ser::SerializeMap;
10489 #[allow(unused_imports)]
10490 use std::option::Option::Some;
10491 let mut state = serializer.serialize_map(std::option::Option::None)?;
10492 if !self.search_results.is_empty() {
10493 state.serialize_entry("searchResults", &self.search_results)?;
10494 }
10495 if !self.next_page_token.is_empty() {
10496 state.serialize_entry("nextPageToken", &self.next_page_token)?;
10497 }
10498 if !self._unknown_fields.is_empty() {
10499 for (key, value) in self._unknown_fields.iter() {
10500 state.serialize_entry(key, &value)?;
10501 }
10502 }
10503 state.end()
10504 }
10505}
10506
10507#[derive(Clone, Debug, Default, PartialEq)]
10509#[non_exhaustive]
10510pub struct SearchResult {
10511 pub entry: std::option::Option<crate::model::search_result::Entry>,
10513
10514 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10515}
10516
10517impl SearchResult {
10518 pub fn new() -> Self {
10519 std::default::Default::default()
10520 }
10521
10522 pub fn set_entry<
10527 T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
10528 >(
10529 mut self,
10530 v: T,
10531 ) -> Self {
10532 self.entry = v.into();
10533 self
10534 }
10535
10536 pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
10540 #[allow(unreachable_patterns)]
10541 self.entry.as_ref().and_then(|v| match v {
10542 crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
10543 _ => std::option::Option::None,
10544 })
10545 }
10546
10547 pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
10553 mut self,
10554 v: T,
10555 ) -> Self {
10556 self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
10557 self
10558 }
10559
10560 pub fn directory(
10564 &self,
10565 ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
10566 #[allow(unreachable_patterns)]
10567 self.entry.as_ref().and_then(|v| match v {
10568 crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
10569 _ => std::option::Option::None,
10570 })
10571 }
10572
10573 pub fn set_directory<
10579 T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
10580 >(
10581 mut self,
10582 v: T,
10583 ) -> Self {
10584 self.entry =
10585 std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
10586 self
10587 }
10588}
10589
10590impl wkt::message::Message for SearchResult {
10591 fn typename() -> &'static str {
10592 "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
10593 }
10594}
10595
10596#[doc(hidden)]
10597impl<'de> serde::de::Deserialize<'de> for SearchResult {
10598 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10599 where
10600 D: serde::Deserializer<'de>,
10601 {
10602 #[allow(non_camel_case_types)]
10603 #[doc(hidden)]
10604 #[derive(PartialEq, Eq, Hash)]
10605 enum __FieldTag {
10606 __file,
10607 __directory,
10608 Unknown(std::string::String),
10609 }
10610 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10611 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10612 where
10613 D: serde::Deserializer<'de>,
10614 {
10615 struct Visitor;
10616 impl<'de> serde::de::Visitor<'de> for Visitor {
10617 type Value = __FieldTag;
10618 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10619 formatter.write_str("a field name for SearchResult")
10620 }
10621 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10622 where
10623 E: serde::de::Error,
10624 {
10625 use std::result::Result::Ok;
10626 use std::string::ToString;
10627 match value {
10628 "file" => Ok(__FieldTag::__file),
10629 "directory" => Ok(__FieldTag::__directory),
10630 _ => Ok(__FieldTag::Unknown(value.to_string())),
10631 }
10632 }
10633 }
10634 deserializer.deserialize_identifier(Visitor)
10635 }
10636 }
10637 struct Visitor;
10638 impl<'de> serde::de::Visitor<'de> for Visitor {
10639 type Value = SearchResult;
10640 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10641 formatter.write_str("struct SearchResult")
10642 }
10643 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10644 where
10645 A: serde::de::MapAccess<'de>,
10646 {
10647 #[allow(unused_imports)]
10648 use serde::de::Error;
10649 use std::option::Option::Some;
10650 let mut fields = std::collections::HashSet::new();
10651 let mut result = Self::Value::new();
10652 while let Some(tag) = map.next_key::<__FieldTag>()? {
10653 #[allow(clippy::match_single_binding)]
10654 match tag {
10655 __FieldTag::__file => {
10656 if !fields.insert(__FieldTag::__file) {
10657 return std::result::Result::Err(A::Error::duplicate_field(
10658 "multiple values for file",
10659 ));
10660 }
10661 if result.entry.is_some() {
10662 return std::result::Result::Err(A::Error::duplicate_field(
10663 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.SearchResult.file, latest field was file",
10664 ));
10665 }
10666 result.entry = std::option::Option::Some(
10667 crate::model::search_result::Entry::File(
10668 map.next_value::<std::option::Option<
10669 std::boxed::Box<crate::model::FileSearchResult>,
10670 >>()?
10671 .unwrap_or_default(),
10672 ),
10673 );
10674 }
10675 __FieldTag::__directory => {
10676 if !fields.insert(__FieldTag::__directory) {
10677 return std::result::Result::Err(A::Error::duplicate_field(
10678 "multiple values for directory",
10679 ));
10680 }
10681 if result.entry.is_some() {
10682 return std::result::Result::Err(A::Error::duplicate_field(
10683 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.SearchResult.directory, latest field was directory",
10684 ));
10685 }
10686 result.entry = std::option::Option::Some(
10687 crate::model::search_result::Entry::Directory(
10688 map.next_value::<std::option::Option<
10689 std::boxed::Box<crate::model::DirectorySearchResult>,
10690 >>()?
10691 .unwrap_or_default(),
10692 ),
10693 );
10694 }
10695 __FieldTag::Unknown(key) => {
10696 let value = map.next_value::<serde_json::Value>()?;
10697 result._unknown_fields.insert(key, value);
10698 }
10699 }
10700 }
10701 std::result::Result::Ok(result)
10702 }
10703 }
10704 deserializer.deserialize_any(Visitor)
10705 }
10706}
10707
10708#[doc(hidden)]
10709impl serde::ser::Serialize for SearchResult {
10710 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10711 where
10712 S: serde::ser::Serializer,
10713 {
10714 use serde::ser::SerializeMap;
10715 #[allow(unused_imports)]
10716 use std::option::Option::Some;
10717 let mut state = serializer.serialize_map(std::option::Option::None)?;
10718 if let Some(value) = self.file() {
10719 state.serialize_entry("file", value)?;
10720 }
10721 if let Some(value) = self.directory() {
10722 state.serialize_entry("directory", value)?;
10723 }
10724 if !self._unknown_fields.is_empty() {
10725 for (key, value) in self._unknown_fields.iter() {
10726 state.serialize_entry(key, &value)?;
10727 }
10728 }
10729 state.end()
10730 }
10731}
10732
10733pub mod search_result {
10735 #[allow(unused_imports)]
10736 use super::*;
10737
10738 #[derive(Clone, Debug, PartialEq)]
10740 #[non_exhaustive]
10741 pub enum Entry {
10742 File(std::boxed::Box<crate::model::FileSearchResult>),
10744 Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
10746 }
10747}
10748
10749#[derive(Clone, Debug, Default, PartialEq)]
10751#[non_exhaustive]
10752pub struct FileSearchResult {
10753 pub path: std::string::String,
10755
10756 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10757}
10758
10759impl FileSearchResult {
10760 pub fn new() -> Self {
10761 std::default::Default::default()
10762 }
10763
10764 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10766 self.path = v.into();
10767 self
10768 }
10769}
10770
10771impl wkt::message::Message for FileSearchResult {
10772 fn typename() -> &'static str {
10773 "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
10774 }
10775}
10776
10777#[doc(hidden)]
10778impl<'de> serde::de::Deserialize<'de> for FileSearchResult {
10779 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10780 where
10781 D: serde::Deserializer<'de>,
10782 {
10783 #[allow(non_camel_case_types)]
10784 #[doc(hidden)]
10785 #[derive(PartialEq, Eq, Hash)]
10786 enum __FieldTag {
10787 __path,
10788 Unknown(std::string::String),
10789 }
10790 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10791 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10792 where
10793 D: serde::Deserializer<'de>,
10794 {
10795 struct Visitor;
10796 impl<'de> serde::de::Visitor<'de> for Visitor {
10797 type Value = __FieldTag;
10798 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10799 formatter.write_str("a field name for FileSearchResult")
10800 }
10801 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10802 where
10803 E: serde::de::Error,
10804 {
10805 use std::result::Result::Ok;
10806 use std::string::ToString;
10807 match value {
10808 "path" => Ok(__FieldTag::__path),
10809 _ => Ok(__FieldTag::Unknown(value.to_string())),
10810 }
10811 }
10812 }
10813 deserializer.deserialize_identifier(Visitor)
10814 }
10815 }
10816 struct Visitor;
10817 impl<'de> serde::de::Visitor<'de> for Visitor {
10818 type Value = FileSearchResult;
10819 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10820 formatter.write_str("struct FileSearchResult")
10821 }
10822 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10823 where
10824 A: serde::de::MapAccess<'de>,
10825 {
10826 #[allow(unused_imports)]
10827 use serde::de::Error;
10828 use std::option::Option::Some;
10829 let mut fields = std::collections::HashSet::new();
10830 let mut result = Self::Value::new();
10831 while let Some(tag) = map.next_key::<__FieldTag>()? {
10832 #[allow(clippy::match_single_binding)]
10833 match tag {
10834 __FieldTag::__path => {
10835 if !fields.insert(__FieldTag::__path) {
10836 return std::result::Result::Err(A::Error::duplicate_field(
10837 "multiple values for path",
10838 ));
10839 }
10840 result.path = map
10841 .next_value::<std::option::Option<std::string::String>>()?
10842 .unwrap_or_default();
10843 }
10844 __FieldTag::Unknown(key) => {
10845 let value = map.next_value::<serde_json::Value>()?;
10846 result._unknown_fields.insert(key, value);
10847 }
10848 }
10849 }
10850 std::result::Result::Ok(result)
10851 }
10852 }
10853 deserializer.deserialize_any(Visitor)
10854 }
10855}
10856
10857#[doc(hidden)]
10858impl serde::ser::Serialize for FileSearchResult {
10859 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10860 where
10861 S: serde::ser::Serializer,
10862 {
10863 use serde::ser::SerializeMap;
10864 #[allow(unused_imports)]
10865 use std::option::Option::Some;
10866 let mut state = serializer.serialize_map(std::option::Option::None)?;
10867 if !self.path.is_empty() {
10868 state.serialize_entry("path", &self.path)?;
10869 }
10870 if !self._unknown_fields.is_empty() {
10871 for (key, value) in self._unknown_fields.iter() {
10872 state.serialize_entry(key, &value)?;
10873 }
10874 }
10875 state.end()
10876 }
10877}
10878
10879#[derive(Clone, Debug, Default, PartialEq)]
10881#[non_exhaustive]
10882pub struct DirectorySearchResult {
10883 pub path: std::string::String,
10885
10886 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10887}
10888
10889impl DirectorySearchResult {
10890 pub fn new() -> Self {
10891 std::default::Default::default()
10892 }
10893
10894 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10896 self.path = v.into();
10897 self
10898 }
10899}
10900
10901impl wkt::message::Message for DirectorySearchResult {
10902 fn typename() -> &'static str {
10903 "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
10904 }
10905}
10906
10907#[doc(hidden)]
10908impl<'de> serde::de::Deserialize<'de> for DirectorySearchResult {
10909 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10910 where
10911 D: serde::Deserializer<'de>,
10912 {
10913 #[allow(non_camel_case_types)]
10914 #[doc(hidden)]
10915 #[derive(PartialEq, Eq, Hash)]
10916 enum __FieldTag {
10917 __path,
10918 Unknown(std::string::String),
10919 }
10920 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10921 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10922 where
10923 D: serde::Deserializer<'de>,
10924 {
10925 struct Visitor;
10926 impl<'de> serde::de::Visitor<'de> for Visitor {
10927 type Value = __FieldTag;
10928 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10929 formatter.write_str("a field name for DirectorySearchResult")
10930 }
10931 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10932 where
10933 E: serde::de::Error,
10934 {
10935 use std::result::Result::Ok;
10936 use std::string::ToString;
10937 match value {
10938 "path" => Ok(__FieldTag::__path),
10939 _ => Ok(__FieldTag::Unknown(value.to_string())),
10940 }
10941 }
10942 }
10943 deserializer.deserialize_identifier(Visitor)
10944 }
10945 }
10946 struct Visitor;
10947 impl<'de> serde::de::Visitor<'de> for Visitor {
10948 type Value = DirectorySearchResult;
10949 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10950 formatter.write_str("struct DirectorySearchResult")
10951 }
10952 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10953 where
10954 A: serde::de::MapAccess<'de>,
10955 {
10956 #[allow(unused_imports)]
10957 use serde::de::Error;
10958 use std::option::Option::Some;
10959 let mut fields = std::collections::HashSet::new();
10960 let mut result = Self::Value::new();
10961 while let Some(tag) = map.next_key::<__FieldTag>()? {
10962 #[allow(clippy::match_single_binding)]
10963 match tag {
10964 __FieldTag::__path => {
10965 if !fields.insert(__FieldTag::__path) {
10966 return std::result::Result::Err(A::Error::duplicate_field(
10967 "multiple values for path",
10968 ));
10969 }
10970 result.path = map
10971 .next_value::<std::option::Option<std::string::String>>()?
10972 .unwrap_or_default();
10973 }
10974 __FieldTag::Unknown(key) => {
10975 let value = map.next_value::<serde_json::Value>()?;
10976 result._unknown_fields.insert(key, value);
10977 }
10978 }
10979 }
10980 std::result::Result::Ok(result)
10981 }
10982 }
10983 deserializer.deserialize_any(Visitor)
10984 }
10985}
10986
10987#[doc(hidden)]
10988impl serde::ser::Serialize for DirectorySearchResult {
10989 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10990 where
10991 S: serde::ser::Serializer,
10992 {
10993 use serde::ser::SerializeMap;
10994 #[allow(unused_imports)]
10995 use std::option::Option::Some;
10996 let mut state = serializer.serialize_map(std::option::Option::None)?;
10997 if !self.path.is_empty() {
10998 state.serialize_entry("path", &self.path)?;
10999 }
11000 if !self._unknown_fields.is_empty() {
11001 for (key, value) in self._unknown_fields.iter() {
11002 state.serialize_entry(key, &value)?;
11003 }
11004 }
11005 state.end()
11006 }
11007}
11008
11009#[derive(Clone, Debug, Default, PartialEq)]
11011#[non_exhaustive]
11012pub struct MakeDirectoryRequest {
11013 pub workspace: std::string::String,
11015
11016 pub path: std::string::String,
11019
11020 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11021}
11022
11023impl MakeDirectoryRequest {
11024 pub fn new() -> Self {
11025 std::default::Default::default()
11026 }
11027
11028 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11030 self.workspace = v.into();
11031 self
11032 }
11033
11034 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11036 self.path = v.into();
11037 self
11038 }
11039}
11040
11041impl wkt::message::Message for MakeDirectoryRequest {
11042 fn typename() -> &'static str {
11043 "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
11044 }
11045}
11046
11047#[doc(hidden)]
11048impl<'de> serde::de::Deserialize<'de> for MakeDirectoryRequest {
11049 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11050 where
11051 D: serde::Deserializer<'de>,
11052 {
11053 #[allow(non_camel_case_types)]
11054 #[doc(hidden)]
11055 #[derive(PartialEq, Eq, Hash)]
11056 enum __FieldTag {
11057 __workspace,
11058 __path,
11059 Unknown(std::string::String),
11060 }
11061 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11062 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11063 where
11064 D: serde::Deserializer<'de>,
11065 {
11066 struct Visitor;
11067 impl<'de> serde::de::Visitor<'de> for Visitor {
11068 type Value = __FieldTag;
11069 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11070 formatter.write_str("a field name for MakeDirectoryRequest")
11071 }
11072 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11073 where
11074 E: serde::de::Error,
11075 {
11076 use std::result::Result::Ok;
11077 use std::string::ToString;
11078 match value {
11079 "workspace" => Ok(__FieldTag::__workspace),
11080 "path" => Ok(__FieldTag::__path),
11081 _ => Ok(__FieldTag::Unknown(value.to_string())),
11082 }
11083 }
11084 }
11085 deserializer.deserialize_identifier(Visitor)
11086 }
11087 }
11088 struct Visitor;
11089 impl<'de> serde::de::Visitor<'de> for Visitor {
11090 type Value = MakeDirectoryRequest;
11091 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11092 formatter.write_str("struct MakeDirectoryRequest")
11093 }
11094 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11095 where
11096 A: serde::de::MapAccess<'de>,
11097 {
11098 #[allow(unused_imports)]
11099 use serde::de::Error;
11100 use std::option::Option::Some;
11101 let mut fields = std::collections::HashSet::new();
11102 let mut result = Self::Value::new();
11103 while let Some(tag) = map.next_key::<__FieldTag>()? {
11104 #[allow(clippy::match_single_binding)]
11105 match tag {
11106 __FieldTag::__workspace => {
11107 if !fields.insert(__FieldTag::__workspace) {
11108 return std::result::Result::Err(A::Error::duplicate_field(
11109 "multiple values for workspace",
11110 ));
11111 }
11112 result.workspace = map
11113 .next_value::<std::option::Option<std::string::String>>()?
11114 .unwrap_or_default();
11115 }
11116 __FieldTag::__path => {
11117 if !fields.insert(__FieldTag::__path) {
11118 return std::result::Result::Err(A::Error::duplicate_field(
11119 "multiple values for path",
11120 ));
11121 }
11122 result.path = map
11123 .next_value::<std::option::Option<std::string::String>>()?
11124 .unwrap_or_default();
11125 }
11126 __FieldTag::Unknown(key) => {
11127 let value = map.next_value::<serde_json::Value>()?;
11128 result._unknown_fields.insert(key, value);
11129 }
11130 }
11131 }
11132 std::result::Result::Ok(result)
11133 }
11134 }
11135 deserializer.deserialize_any(Visitor)
11136 }
11137}
11138
11139#[doc(hidden)]
11140impl serde::ser::Serialize for MakeDirectoryRequest {
11141 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11142 where
11143 S: serde::ser::Serializer,
11144 {
11145 use serde::ser::SerializeMap;
11146 #[allow(unused_imports)]
11147 use std::option::Option::Some;
11148 let mut state = serializer.serialize_map(std::option::Option::None)?;
11149 if !self.workspace.is_empty() {
11150 state.serialize_entry("workspace", &self.workspace)?;
11151 }
11152 if !self.path.is_empty() {
11153 state.serialize_entry("path", &self.path)?;
11154 }
11155 if !self._unknown_fields.is_empty() {
11156 for (key, value) in self._unknown_fields.iter() {
11157 state.serialize_entry(key, &value)?;
11158 }
11159 }
11160 state.end()
11161 }
11162}
11163
11164#[derive(Clone, Debug, Default, PartialEq)]
11166#[non_exhaustive]
11167pub struct MakeDirectoryResponse {
11168 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11169}
11170
11171impl MakeDirectoryResponse {
11172 pub fn new() -> Self {
11173 std::default::Default::default()
11174 }
11175}
11176
11177impl wkt::message::Message for MakeDirectoryResponse {
11178 fn typename() -> &'static str {
11179 "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
11180 }
11181}
11182
11183#[doc(hidden)]
11184impl<'de> serde::de::Deserialize<'de> for MakeDirectoryResponse {
11185 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11186 where
11187 D: serde::Deserializer<'de>,
11188 {
11189 #[allow(non_camel_case_types)]
11190 #[doc(hidden)]
11191 #[derive(PartialEq, Eq, Hash)]
11192 enum __FieldTag {
11193 Unknown(std::string::String),
11194 }
11195 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11196 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11197 where
11198 D: serde::Deserializer<'de>,
11199 {
11200 struct Visitor;
11201 impl<'de> serde::de::Visitor<'de> for Visitor {
11202 type Value = __FieldTag;
11203 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11204 formatter.write_str("a field name for MakeDirectoryResponse")
11205 }
11206 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11207 where
11208 E: serde::de::Error,
11209 {
11210 use std::result::Result::Ok;
11211 use std::string::ToString;
11212 Ok(__FieldTag::Unknown(value.to_string()))
11213 }
11214 }
11215 deserializer.deserialize_identifier(Visitor)
11216 }
11217 }
11218 struct Visitor;
11219 impl<'de> serde::de::Visitor<'de> for Visitor {
11220 type Value = MakeDirectoryResponse;
11221 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11222 formatter.write_str("struct MakeDirectoryResponse")
11223 }
11224 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11225 where
11226 A: serde::de::MapAccess<'de>,
11227 {
11228 #[allow(unused_imports)]
11229 use serde::de::Error;
11230 use std::option::Option::Some;
11231 let mut result = Self::Value::new();
11232 while let Some(tag) = map.next_key::<__FieldTag>()? {
11233 #[allow(clippy::match_single_binding)]
11234 match tag {
11235 __FieldTag::Unknown(key) => {
11236 let value = map.next_value::<serde_json::Value>()?;
11237 result._unknown_fields.insert(key, value);
11238 }
11239 }
11240 }
11241 std::result::Result::Ok(result)
11242 }
11243 }
11244 deserializer.deserialize_any(Visitor)
11245 }
11246}
11247
11248#[doc(hidden)]
11249impl serde::ser::Serialize for MakeDirectoryResponse {
11250 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11251 where
11252 S: serde::ser::Serializer,
11253 {
11254 use serde::ser::SerializeMap;
11255 #[allow(unused_imports)]
11256 use std::option::Option::Some;
11257 let mut state = serializer.serialize_map(std::option::Option::None)?;
11258 if !self._unknown_fields.is_empty() {
11259 for (key, value) in self._unknown_fields.iter() {
11260 state.serialize_entry(key, &value)?;
11261 }
11262 }
11263 state.end()
11264 }
11265}
11266
11267#[derive(Clone, Debug, Default, PartialEq)]
11269#[non_exhaustive]
11270pub struct RemoveDirectoryRequest {
11271 pub workspace: std::string::String,
11273
11274 pub path: std::string::String,
11277
11278 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11279}
11280
11281impl RemoveDirectoryRequest {
11282 pub fn new() -> Self {
11283 std::default::Default::default()
11284 }
11285
11286 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11288 self.workspace = v.into();
11289 self
11290 }
11291
11292 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11294 self.path = v.into();
11295 self
11296 }
11297}
11298
11299impl wkt::message::Message for RemoveDirectoryRequest {
11300 fn typename() -> &'static str {
11301 "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
11302 }
11303}
11304
11305#[doc(hidden)]
11306impl<'de> serde::de::Deserialize<'de> for RemoveDirectoryRequest {
11307 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11308 where
11309 D: serde::Deserializer<'de>,
11310 {
11311 #[allow(non_camel_case_types)]
11312 #[doc(hidden)]
11313 #[derive(PartialEq, Eq, Hash)]
11314 enum __FieldTag {
11315 __workspace,
11316 __path,
11317 Unknown(std::string::String),
11318 }
11319 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11320 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11321 where
11322 D: serde::Deserializer<'de>,
11323 {
11324 struct Visitor;
11325 impl<'de> serde::de::Visitor<'de> for Visitor {
11326 type Value = __FieldTag;
11327 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11328 formatter.write_str("a field name for RemoveDirectoryRequest")
11329 }
11330 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11331 where
11332 E: serde::de::Error,
11333 {
11334 use std::result::Result::Ok;
11335 use std::string::ToString;
11336 match value {
11337 "workspace" => Ok(__FieldTag::__workspace),
11338 "path" => Ok(__FieldTag::__path),
11339 _ => Ok(__FieldTag::Unknown(value.to_string())),
11340 }
11341 }
11342 }
11343 deserializer.deserialize_identifier(Visitor)
11344 }
11345 }
11346 struct Visitor;
11347 impl<'de> serde::de::Visitor<'de> for Visitor {
11348 type Value = RemoveDirectoryRequest;
11349 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11350 formatter.write_str("struct RemoveDirectoryRequest")
11351 }
11352 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11353 where
11354 A: serde::de::MapAccess<'de>,
11355 {
11356 #[allow(unused_imports)]
11357 use serde::de::Error;
11358 use std::option::Option::Some;
11359 let mut fields = std::collections::HashSet::new();
11360 let mut result = Self::Value::new();
11361 while let Some(tag) = map.next_key::<__FieldTag>()? {
11362 #[allow(clippy::match_single_binding)]
11363 match tag {
11364 __FieldTag::__workspace => {
11365 if !fields.insert(__FieldTag::__workspace) {
11366 return std::result::Result::Err(A::Error::duplicate_field(
11367 "multiple values for workspace",
11368 ));
11369 }
11370 result.workspace = map
11371 .next_value::<std::option::Option<std::string::String>>()?
11372 .unwrap_or_default();
11373 }
11374 __FieldTag::__path => {
11375 if !fields.insert(__FieldTag::__path) {
11376 return std::result::Result::Err(A::Error::duplicate_field(
11377 "multiple values for path",
11378 ));
11379 }
11380 result.path = map
11381 .next_value::<std::option::Option<std::string::String>>()?
11382 .unwrap_or_default();
11383 }
11384 __FieldTag::Unknown(key) => {
11385 let value = map.next_value::<serde_json::Value>()?;
11386 result._unknown_fields.insert(key, value);
11387 }
11388 }
11389 }
11390 std::result::Result::Ok(result)
11391 }
11392 }
11393 deserializer.deserialize_any(Visitor)
11394 }
11395}
11396
11397#[doc(hidden)]
11398impl serde::ser::Serialize for RemoveDirectoryRequest {
11399 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11400 where
11401 S: serde::ser::Serializer,
11402 {
11403 use serde::ser::SerializeMap;
11404 #[allow(unused_imports)]
11405 use std::option::Option::Some;
11406 let mut state = serializer.serialize_map(std::option::Option::None)?;
11407 if !self.workspace.is_empty() {
11408 state.serialize_entry("workspace", &self.workspace)?;
11409 }
11410 if !self.path.is_empty() {
11411 state.serialize_entry("path", &self.path)?;
11412 }
11413 if !self._unknown_fields.is_empty() {
11414 for (key, value) in self._unknown_fields.iter() {
11415 state.serialize_entry(key, &value)?;
11416 }
11417 }
11418 state.end()
11419 }
11420}
11421
11422#[derive(Clone, Debug, Default, PartialEq)]
11424#[non_exhaustive]
11425pub struct RemoveDirectoryResponse {
11426 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11427}
11428
11429impl RemoveDirectoryResponse {
11430 pub fn new() -> Self {
11431 std::default::Default::default()
11432 }
11433}
11434
11435impl wkt::message::Message for RemoveDirectoryResponse {
11436 fn typename() -> &'static str {
11437 "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
11438 }
11439}
11440
11441#[doc(hidden)]
11442impl<'de> serde::de::Deserialize<'de> for RemoveDirectoryResponse {
11443 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11444 where
11445 D: serde::Deserializer<'de>,
11446 {
11447 #[allow(non_camel_case_types)]
11448 #[doc(hidden)]
11449 #[derive(PartialEq, Eq, Hash)]
11450 enum __FieldTag {
11451 Unknown(std::string::String),
11452 }
11453 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11454 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11455 where
11456 D: serde::Deserializer<'de>,
11457 {
11458 struct Visitor;
11459 impl<'de> serde::de::Visitor<'de> for Visitor {
11460 type Value = __FieldTag;
11461 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11462 formatter.write_str("a field name for RemoveDirectoryResponse")
11463 }
11464 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11465 where
11466 E: serde::de::Error,
11467 {
11468 use std::result::Result::Ok;
11469 use std::string::ToString;
11470 Ok(__FieldTag::Unknown(value.to_string()))
11471 }
11472 }
11473 deserializer.deserialize_identifier(Visitor)
11474 }
11475 }
11476 struct Visitor;
11477 impl<'de> serde::de::Visitor<'de> for Visitor {
11478 type Value = RemoveDirectoryResponse;
11479 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11480 formatter.write_str("struct RemoveDirectoryResponse")
11481 }
11482 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11483 where
11484 A: serde::de::MapAccess<'de>,
11485 {
11486 #[allow(unused_imports)]
11487 use serde::de::Error;
11488 use std::option::Option::Some;
11489 let mut result = Self::Value::new();
11490 while let Some(tag) = map.next_key::<__FieldTag>()? {
11491 #[allow(clippy::match_single_binding)]
11492 match tag {
11493 __FieldTag::Unknown(key) => {
11494 let value = map.next_value::<serde_json::Value>()?;
11495 result._unknown_fields.insert(key, value);
11496 }
11497 }
11498 }
11499 std::result::Result::Ok(result)
11500 }
11501 }
11502 deserializer.deserialize_any(Visitor)
11503 }
11504}
11505
11506#[doc(hidden)]
11507impl serde::ser::Serialize for RemoveDirectoryResponse {
11508 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11509 where
11510 S: serde::ser::Serializer,
11511 {
11512 use serde::ser::SerializeMap;
11513 #[allow(unused_imports)]
11514 use std::option::Option::Some;
11515 let mut state = serializer.serialize_map(std::option::Option::None)?;
11516 if !self._unknown_fields.is_empty() {
11517 for (key, value) in self._unknown_fields.iter() {
11518 state.serialize_entry(key, &value)?;
11519 }
11520 }
11521 state.end()
11522 }
11523}
11524
11525#[derive(Clone, Debug, Default, PartialEq)]
11527#[non_exhaustive]
11528pub struct MoveDirectoryRequest {
11529 pub workspace: std::string::String,
11531
11532 pub path: std::string::String,
11535
11536 pub new_path: std::string::String,
11539
11540 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11541}
11542
11543impl MoveDirectoryRequest {
11544 pub fn new() -> Self {
11545 std::default::Default::default()
11546 }
11547
11548 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11550 self.workspace = v.into();
11551 self
11552 }
11553
11554 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11556 self.path = v.into();
11557 self
11558 }
11559
11560 pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11562 self.new_path = v.into();
11563 self
11564 }
11565}
11566
11567impl wkt::message::Message for MoveDirectoryRequest {
11568 fn typename() -> &'static str {
11569 "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
11570 }
11571}
11572
11573#[doc(hidden)]
11574impl<'de> serde::de::Deserialize<'de> for MoveDirectoryRequest {
11575 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11576 where
11577 D: serde::Deserializer<'de>,
11578 {
11579 #[allow(non_camel_case_types)]
11580 #[doc(hidden)]
11581 #[derive(PartialEq, Eq, Hash)]
11582 enum __FieldTag {
11583 __workspace,
11584 __path,
11585 __new_path,
11586 Unknown(std::string::String),
11587 }
11588 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11589 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11590 where
11591 D: serde::Deserializer<'de>,
11592 {
11593 struct Visitor;
11594 impl<'de> serde::de::Visitor<'de> for Visitor {
11595 type Value = __FieldTag;
11596 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11597 formatter.write_str("a field name for MoveDirectoryRequest")
11598 }
11599 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11600 where
11601 E: serde::de::Error,
11602 {
11603 use std::result::Result::Ok;
11604 use std::string::ToString;
11605 match value {
11606 "workspace" => Ok(__FieldTag::__workspace),
11607 "path" => Ok(__FieldTag::__path),
11608 "newPath" => Ok(__FieldTag::__new_path),
11609 "new_path" => Ok(__FieldTag::__new_path),
11610 _ => Ok(__FieldTag::Unknown(value.to_string())),
11611 }
11612 }
11613 }
11614 deserializer.deserialize_identifier(Visitor)
11615 }
11616 }
11617 struct Visitor;
11618 impl<'de> serde::de::Visitor<'de> for Visitor {
11619 type Value = MoveDirectoryRequest;
11620 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11621 formatter.write_str("struct MoveDirectoryRequest")
11622 }
11623 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11624 where
11625 A: serde::de::MapAccess<'de>,
11626 {
11627 #[allow(unused_imports)]
11628 use serde::de::Error;
11629 use std::option::Option::Some;
11630 let mut fields = std::collections::HashSet::new();
11631 let mut result = Self::Value::new();
11632 while let Some(tag) = map.next_key::<__FieldTag>()? {
11633 #[allow(clippy::match_single_binding)]
11634 match tag {
11635 __FieldTag::__workspace => {
11636 if !fields.insert(__FieldTag::__workspace) {
11637 return std::result::Result::Err(A::Error::duplicate_field(
11638 "multiple values for workspace",
11639 ));
11640 }
11641 result.workspace = map
11642 .next_value::<std::option::Option<std::string::String>>()?
11643 .unwrap_or_default();
11644 }
11645 __FieldTag::__path => {
11646 if !fields.insert(__FieldTag::__path) {
11647 return std::result::Result::Err(A::Error::duplicate_field(
11648 "multiple values for path",
11649 ));
11650 }
11651 result.path = map
11652 .next_value::<std::option::Option<std::string::String>>()?
11653 .unwrap_or_default();
11654 }
11655 __FieldTag::__new_path => {
11656 if !fields.insert(__FieldTag::__new_path) {
11657 return std::result::Result::Err(A::Error::duplicate_field(
11658 "multiple values for new_path",
11659 ));
11660 }
11661 result.new_path = map
11662 .next_value::<std::option::Option<std::string::String>>()?
11663 .unwrap_or_default();
11664 }
11665 __FieldTag::Unknown(key) => {
11666 let value = map.next_value::<serde_json::Value>()?;
11667 result._unknown_fields.insert(key, value);
11668 }
11669 }
11670 }
11671 std::result::Result::Ok(result)
11672 }
11673 }
11674 deserializer.deserialize_any(Visitor)
11675 }
11676}
11677
11678#[doc(hidden)]
11679impl serde::ser::Serialize for MoveDirectoryRequest {
11680 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11681 where
11682 S: serde::ser::Serializer,
11683 {
11684 use serde::ser::SerializeMap;
11685 #[allow(unused_imports)]
11686 use std::option::Option::Some;
11687 let mut state = serializer.serialize_map(std::option::Option::None)?;
11688 if !self.workspace.is_empty() {
11689 state.serialize_entry("workspace", &self.workspace)?;
11690 }
11691 if !self.path.is_empty() {
11692 state.serialize_entry("path", &self.path)?;
11693 }
11694 if !self.new_path.is_empty() {
11695 state.serialize_entry("newPath", &self.new_path)?;
11696 }
11697 if !self._unknown_fields.is_empty() {
11698 for (key, value) in self._unknown_fields.iter() {
11699 state.serialize_entry(key, &value)?;
11700 }
11701 }
11702 state.end()
11703 }
11704}
11705
11706#[derive(Clone, Debug, Default, PartialEq)]
11708#[non_exhaustive]
11709pub struct MoveDirectoryResponse {
11710 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11711}
11712
11713impl MoveDirectoryResponse {
11714 pub fn new() -> Self {
11715 std::default::Default::default()
11716 }
11717}
11718
11719impl wkt::message::Message for MoveDirectoryResponse {
11720 fn typename() -> &'static str {
11721 "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
11722 }
11723}
11724
11725#[doc(hidden)]
11726impl<'de> serde::de::Deserialize<'de> for MoveDirectoryResponse {
11727 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11728 where
11729 D: serde::Deserializer<'de>,
11730 {
11731 #[allow(non_camel_case_types)]
11732 #[doc(hidden)]
11733 #[derive(PartialEq, Eq, Hash)]
11734 enum __FieldTag {
11735 Unknown(std::string::String),
11736 }
11737 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11738 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11739 where
11740 D: serde::Deserializer<'de>,
11741 {
11742 struct Visitor;
11743 impl<'de> serde::de::Visitor<'de> for Visitor {
11744 type Value = __FieldTag;
11745 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11746 formatter.write_str("a field name for MoveDirectoryResponse")
11747 }
11748 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11749 where
11750 E: serde::de::Error,
11751 {
11752 use std::result::Result::Ok;
11753 use std::string::ToString;
11754 Ok(__FieldTag::Unknown(value.to_string()))
11755 }
11756 }
11757 deserializer.deserialize_identifier(Visitor)
11758 }
11759 }
11760 struct Visitor;
11761 impl<'de> serde::de::Visitor<'de> for Visitor {
11762 type Value = MoveDirectoryResponse;
11763 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11764 formatter.write_str("struct MoveDirectoryResponse")
11765 }
11766 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11767 where
11768 A: serde::de::MapAccess<'de>,
11769 {
11770 #[allow(unused_imports)]
11771 use serde::de::Error;
11772 use std::option::Option::Some;
11773 let mut result = Self::Value::new();
11774 while let Some(tag) = map.next_key::<__FieldTag>()? {
11775 #[allow(clippy::match_single_binding)]
11776 match tag {
11777 __FieldTag::Unknown(key) => {
11778 let value = map.next_value::<serde_json::Value>()?;
11779 result._unknown_fields.insert(key, value);
11780 }
11781 }
11782 }
11783 std::result::Result::Ok(result)
11784 }
11785 }
11786 deserializer.deserialize_any(Visitor)
11787 }
11788}
11789
11790#[doc(hidden)]
11791impl serde::ser::Serialize for MoveDirectoryResponse {
11792 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11793 where
11794 S: serde::ser::Serializer,
11795 {
11796 use serde::ser::SerializeMap;
11797 #[allow(unused_imports)]
11798 use std::option::Option::Some;
11799 let mut state = serializer.serialize_map(std::option::Option::None)?;
11800 if !self._unknown_fields.is_empty() {
11801 for (key, value) in self._unknown_fields.iter() {
11802 state.serialize_entry(key, &value)?;
11803 }
11804 }
11805 state.end()
11806 }
11807}
11808
11809#[derive(Clone, Debug, Default, PartialEq)]
11811#[non_exhaustive]
11812pub struct ReadFileRequest {
11813 pub workspace: std::string::String,
11815
11816 pub path: std::string::String,
11819
11820 pub revision: std::string::String,
11823
11824 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11825}
11826
11827impl ReadFileRequest {
11828 pub fn new() -> Self {
11829 std::default::Default::default()
11830 }
11831
11832 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11834 self.workspace = v.into();
11835 self
11836 }
11837
11838 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11840 self.path = v.into();
11841 self
11842 }
11843
11844 pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11846 self.revision = v.into();
11847 self
11848 }
11849}
11850
11851impl wkt::message::Message for ReadFileRequest {
11852 fn typename() -> &'static str {
11853 "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
11854 }
11855}
11856
11857#[doc(hidden)]
11858impl<'de> serde::de::Deserialize<'de> for ReadFileRequest {
11859 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11860 where
11861 D: serde::Deserializer<'de>,
11862 {
11863 #[allow(non_camel_case_types)]
11864 #[doc(hidden)]
11865 #[derive(PartialEq, Eq, Hash)]
11866 enum __FieldTag {
11867 __workspace,
11868 __path,
11869 __revision,
11870 Unknown(std::string::String),
11871 }
11872 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11873 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11874 where
11875 D: serde::Deserializer<'de>,
11876 {
11877 struct Visitor;
11878 impl<'de> serde::de::Visitor<'de> for Visitor {
11879 type Value = __FieldTag;
11880 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11881 formatter.write_str("a field name for ReadFileRequest")
11882 }
11883 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11884 where
11885 E: serde::de::Error,
11886 {
11887 use std::result::Result::Ok;
11888 use std::string::ToString;
11889 match value {
11890 "workspace" => Ok(__FieldTag::__workspace),
11891 "path" => Ok(__FieldTag::__path),
11892 "revision" => Ok(__FieldTag::__revision),
11893 _ => Ok(__FieldTag::Unknown(value.to_string())),
11894 }
11895 }
11896 }
11897 deserializer.deserialize_identifier(Visitor)
11898 }
11899 }
11900 struct Visitor;
11901 impl<'de> serde::de::Visitor<'de> for Visitor {
11902 type Value = ReadFileRequest;
11903 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11904 formatter.write_str("struct ReadFileRequest")
11905 }
11906 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11907 where
11908 A: serde::de::MapAccess<'de>,
11909 {
11910 #[allow(unused_imports)]
11911 use serde::de::Error;
11912 use std::option::Option::Some;
11913 let mut fields = std::collections::HashSet::new();
11914 let mut result = Self::Value::new();
11915 while let Some(tag) = map.next_key::<__FieldTag>()? {
11916 #[allow(clippy::match_single_binding)]
11917 match tag {
11918 __FieldTag::__workspace => {
11919 if !fields.insert(__FieldTag::__workspace) {
11920 return std::result::Result::Err(A::Error::duplicate_field(
11921 "multiple values for workspace",
11922 ));
11923 }
11924 result.workspace = map
11925 .next_value::<std::option::Option<std::string::String>>()?
11926 .unwrap_or_default();
11927 }
11928 __FieldTag::__path => {
11929 if !fields.insert(__FieldTag::__path) {
11930 return std::result::Result::Err(A::Error::duplicate_field(
11931 "multiple values for path",
11932 ));
11933 }
11934 result.path = map
11935 .next_value::<std::option::Option<std::string::String>>()?
11936 .unwrap_or_default();
11937 }
11938 __FieldTag::__revision => {
11939 if !fields.insert(__FieldTag::__revision) {
11940 return std::result::Result::Err(A::Error::duplicate_field(
11941 "multiple values for revision",
11942 ));
11943 }
11944 result.revision = map
11945 .next_value::<std::option::Option<std::string::String>>()?
11946 .unwrap_or_default();
11947 }
11948 __FieldTag::Unknown(key) => {
11949 let value = map.next_value::<serde_json::Value>()?;
11950 result._unknown_fields.insert(key, value);
11951 }
11952 }
11953 }
11954 std::result::Result::Ok(result)
11955 }
11956 }
11957 deserializer.deserialize_any(Visitor)
11958 }
11959}
11960
11961#[doc(hidden)]
11962impl serde::ser::Serialize for ReadFileRequest {
11963 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11964 where
11965 S: serde::ser::Serializer,
11966 {
11967 use serde::ser::SerializeMap;
11968 #[allow(unused_imports)]
11969 use std::option::Option::Some;
11970 let mut state = serializer.serialize_map(std::option::Option::None)?;
11971 if !self.workspace.is_empty() {
11972 state.serialize_entry("workspace", &self.workspace)?;
11973 }
11974 if !self.path.is_empty() {
11975 state.serialize_entry("path", &self.path)?;
11976 }
11977 if !self.revision.is_empty() {
11978 state.serialize_entry("revision", &self.revision)?;
11979 }
11980 if !self._unknown_fields.is_empty() {
11981 for (key, value) in self._unknown_fields.iter() {
11982 state.serialize_entry(key, &value)?;
11983 }
11984 }
11985 state.end()
11986 }
11987}
11988
11989#[derive(Clone, Debug, Default, PartialEq)]
11991#[non_exhaustive]
11992pub struct ReadFileResponse {
11993 pub file_contents: ::bytes::Bytes,
11995
11996 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11997}
11998
11999impl ReadFileResponse {
12000 pub fn new() -> Self {
12001 std::default::Default::default()
12002 }
12003
12004 pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
12006 self.file_contents = v.into();
12007 self
12008 }
12009}
12010
12011impl wkt::message::Message for ReadFileResponse {
12012 fn typename() -> &'static str {
12013 "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
12014 }
12015}
12016
12017#[doc(hidden)]
12018impl<'de> serde::de::Deserialize<'de> for ReadFileResponse {
12019 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12020 where
12021 D: serde::Deserializer<'de>,
12022 {
12023 #[allow(non_camel_case_types)]
12024 #[doc(hidden)]
12025 #[derive(PartialEq, Eq, Hash)]
12026 enum __FieldTag {
12027 __file_contents,
12028 Unknown(std::string::String),
12029 }
12030 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12031 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12032 where
12033 D: serde::Deserializer<'de>,
12034 {
12035 struct Visitor;
12036 impl<'de> serde::de::Visitor<'de> for Visitor {
12037 type Value = __FieldTag;
12038 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12039 formatter.write_str("a field name for ReadFileResponse")
12040 }
12041 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12042 where
12043 E: serde::de::Error,
12044 {
12045 use std::result::Result::Ok;
12046 use std::string::ToString;
12047 match value {
12048 "fileContents" => Ok(__FieldTag::__file_contents),
12049 "file_contents" => Ok(__FieldTag::__file_contents),
12050 _ => Ok(__FieldTag::Unknown(value.to_string())),
12051 }
12052 }
12053 }
12054 deserializer.deserialize_identifier(Visitor)
12055 }
12056 }
12057 struct Visitor;
12058 impl<'de> serde::de::Visitor<'de> for Visitor {
12059 type Value = ReadFileResponse;
12060 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12061 formatter.write_str("struct ReadFileResponse")
12062 }
12063 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12064 where
12065 A: serde::de::MapAccess<'de>,
12066 {
12067 #[allow(unused_imports)]
12068 use serde::de::Error;
12069 use std::option::Option::Some;
12070 let mut fields = std::collections::HashSet::new();
12071 let mut result = Self::Value::new();
12072 while let Some(tag) = map.next_key::<__FieldTag>()? {
12073 #[allow(clippy::match_single_binding)]
12074 match tag {
12075 __FieldTag::__file_contents => {
12076 if !fields.insert(__FieldTag::__file_contents) {
12077 return std::result::Result::Err(A::Error::duplicate_field(
12078 "multiple values for file_contents",
12079 ));
12080 }
12081 struct __With(std::option::Option<::bytes::Bytes>);
12082 impl<'de> serde::de::Deserialize<'de> for __With {
12083 fn deserialize<D>(
12084 deserializer: D,
12085 ) -> std::result::Result<Self, D::Error>
12086 where
12087 D: serde::de::Deserializer<'de>,
12088 {
12089 serde_with::As::< std::option::Option<serde_with::base64::Base64> >::deserialize(deserializer).map(__With)
12090 }
12091 }
12092 result.file_contents =
12093 map.next_value::<__With>()?.0.unwrap_or_default();
12094 }
12095 __FieldTag::Unknown(key) => {
12096 let value = map.next_value::<serde_json::Value>()?;
12097 result._unknown_fields.insert(key, value);
12098 }
12099 }
12100 }
12101 std::result::Result::Ok(result)
12102 }
12103 }
12104 deserializer.deserialize_any(Visitor)
12105 }
12106}
12107
12108#[doc(hidden)]
12109impl serde::ser::Serialize for ReadFileResponse {
12110 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12111 where
12112 S: serde::ser::Serializer,
12113 {
12114 use serde::ser::SerializeMap;
12115 #[allow(unused_imports)]
12116 use std::option::Option::Some;
12117 let mut state = serializer.serialize_map(std::option::Option::None)?;
12118 if !self.file_contents.is_empty() {
12119 struct __With<'a>(&'a ::bytes::Bytes);
12120 impl<'a> serde::ser::Serialize for __With<'a> {
12121 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12122 where
12123 S: serde::ser::Serializer,
12124 {
12125 serde_with::As::<serde_with::base64::Base64>::serialize(self.0, serializer)
12126 }
12127 }
12128 state.serialize_entry("fileContents", &__With(&self.file_contents))?;
12129 }
12130 if !self._unknown_fields.is_empty() {
12131 for (key, value) in self._unknown_fields.iter() {
12132 state.serialize_entry(key, &value)?;
12133 }
12134 }
12135 state.end()
12136 }
12137}
12138
12139#[derive(Clone, Debug, Default, PartialEq)]
12141#[non_exhaustive]
12142pub struct RemoveFileRequest {
12143 pub workspace: std::string::String,
12145
12146 pub path: std::string::String,
12149
12150 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12151}
12152
12153impl RemoveFileRequest {
12154 pub fn new() -> Self {
12155 std::default::Default::default()
12156 }
12157
12158 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12160 self.workspace = v.into();
12161 self
12162 }
12163
12164 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12166 self.path = v.into();
12167 self
12168 }
12169}
12170
12171impl wkt::message::Message for RemoveFileRequest {
12172 fn typename() -> &'static str {
12173 "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
12174 }
12175}
12176
12177#[doc(hidden)]
12178impl<'de> serde::de::Deserialize<'de> for RemoveFileRequest {
12179 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12180 where
12181 D: serde::Deserializer<'de>,
12182 {
12183 #[allow(non_camel_case_types)]
12184 #[doc(hidden)]
12185 #[derive(PartialEq, Eq, Hash)]
12186 enum __FieldTag {
12187 __workspace,
12188 __path,
12189 Unknown(std::string::String),
12190 }
12191 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12192 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12193 where
12194 D: serde::Deserializer<'de>,
12195 {
12196 struct Visitor;
12197 impl<'de> serde::de::Visitor<'de> for Visitor {
12198 type Value = __FieldTag;
12199 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12200 formatter.write_str("a field name for RemoveFileRequest")
12201 }
12202 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12203 where
12204 E: serde::de::Error,
12205 {
12206 use std::result::Result::Ok;
12207 use std::string::ToString;
12208 match value {
12209 "workspace" => Ok(__FieldTag::__workspace),
12210 "path" => Ok(__FieldTag::__path),
12211 _ => Ok(__FieldTag::Unknown(value.to_string())),
12212 }
12213 }
12214 }
12215 deserializer.deserialize_identifier(Visitor)
12216 }
12217 }
12218 struct Visitor;
12219 impl<'de> serde::de::Visitor<'de> for Visitor {
12220 type Value = RemoveFileRequest;
12221 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12222 formatter.write_str("struct RemoveFileRequest")
12223 }
12224 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12225 where
12226 A: serde::de::MapAccess<'de>,
12227 {
12228 #[allow(unused_imports)]
12229 use serde::de::Error;
12230 use std::option::Option::Some;
12231 let mut fields = std::collections::HashSet::new();
12232 let mut result = Self::Value::new();
12233 while let Some(tag) = map.next_key::<__FieldTag>()? {
12234 #[allow(clippy::match_single_binding)]
12235 match tag {
12236 __FieldTag::__workspace => {
12237 if !fields.insert(__FieldTag::__workspace) {
12238 return std::result::Result::Err(A::Error::duplicate_field(
12239 "multiple values for workspace",
12240 ));
12241 }
12242 result.workspace = map
12243 .next_value::<std::option::Option<std::string::String>>()?
12244 .unwrap_or_default();
12245 }
12246 __FieldTag::__path => {
12247 if !fields.insert(__FieldTag::__path) {
12248 return std::result::Result::Err(A::Error::duplicate_field(
12249 "multiple values for path",
12250 ));
12251 }
12252 result.path = map
12253 .next_value::<std::option::Option<std::string::String>>()?
12254 .unwrap_or_default();
12255 }
12256 __FieldTag::Unknown(key) => {
12257 let value = map.next_value::<serde_json::Value>()?;
12258 result._unknown_fields.insert(key, value);
12259 }
12260 }
12261 }
12262 std::result::Result::Ok(result)
12263 }
12264 }
12265 deserializer.deserialize_any(Visitor)
12266 }
12267}
12268
12269#[doc(hidden)]
12270impl serde::ser::Serialize for RemoveFileRequest {
12271 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12272 where
12273 S: serde::ser::Serializer,
12274 {
12275 use serde::ser::SerializeMap;
12276 #[allow(unused_imports)]
12277 use std::option::Option::Some;
12278 let mut state = serializer.serialize_map(std::option::Option::None)?;
12279 if !self.workspace.is_empty() {
12280 state.serialize_entry("workspace", &self.workspace)?;
12281 }
12282 if !self.path.is_empty() {
12283 state.serialize_entry("path", &self.path)?;
12284 }
12285 if !self._unknown_fields.is_empty() {
12286 for (key, value) in self._unknown_fields.iter() {
12287 state.serialize_entry(key, &value)?;
12288 }
12289 }
12290 state.end()
12291 }
12292}
12293
12294#[derive(Clone, Debug, Default, PartialEq)]
12296#[non_exhaustive]
12297pub struct RemoveFileResponse {
12298 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12299}
12300
12301impl RemoveFileResponse {
12302 pub fn new() -> Self {
12303 std::default::Default::default()
12304 }
12305}
12306
12307impl wkt::message::Message for RemoveFileResponse {
12308 fn typename() -> &'static str {
12309 "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
12310 }
12311}
12312
12313#[doc(hidden)]
12314impl<'de> serde::de::Deserialize<'de> for RemoveFileResponse {
12315 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12316 where
12317 D: serde::Deserializer<'de>,
12318 {
12319 #[allow(non_camel_case_types)]
12320 #[doc(hidden)]
12321 #[derive(PartialEq, Eq, Hash)]
12322 enum __FieldTag {
12323 Unknown(std::string::String),
12324 }
12325 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12326 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12327 where
12328 D: serde::Deserializer<'de>,
12329 {
12330 struct Visitor;
12331 impl<'de> serde::de::Visitor<'de> for Visitor {
12332 type Value = __FieldTag;
12333 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12334 formatter.write_str("a field name for RemoveFileResponse")
12335 }
12336 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12337 where
12338 E: serde::de::Error,
12339 {
12340 use std::result::Result::Ok;
12341 use std::string::ToString;
12342 Ok(__FieldTag::Unknown(value.to_string()))
12343 }
12344 }
12345 deserializer.deserialize_identifier(Visitor)
12346 }
12347 }
12348 struct Visitor;
12349 impl<'de> serde::de::Visitor<'de> for Visitor {
12350 type Value = RemoveFileResponse;
12351 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12352 formatter.write_str("struct RemoveFileResponse")
12353 }
12354 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12355 where
12356 A: serde::de::MapAccess<'de>,
12357 {
12358 #[allow(unused_imports)]
12359 use serde::de::Error;
12360 use std::option::Option::Some;
12361 let mut result = Self::Value::new();
12362 while let Some(tag) = map.next_key::<__FieldTag>()? {
12363 #[allow(clippy::match_single_binding)]
12364 match tag {
12365 __FieldTag::Unknown(key) => {
12366 let value = map.next_value::<serde_json::Value>()?;
12367 result._unknown_fields.insert(key, value);
12368 }
12369 }
12370 }
12371 std::result::Result::Ok(result)
12372 }
12373 }
12374 deserializer.deserialize_any(Visitor)
12375 }
12376}
12377
12378#[doc(hidden)]
12379impl serde::ser::Serialize for RemoveFileResponse {
12380 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12381 where
12382 S: serde::ser::Serializer,
12383 {
12384 use serde::ser::SerializeMap;
12385 #[allow(unused_imports)]
12386 use std::option::Option::Some;
12387 let mut state = serializer.serialize_map(std::option::Option::None)?;
12388 if !self._unknown_fields.is_empty() {
12389 for (key, value) in self._unknown_fields.iter() {
12390 state.serialize_entry(key, &value)?;
12391 }
12392 }
12393 state.end()
12394 }
12395}
12396
12397#[derive(Clone, Debug, Default, PartialEq)]
12399#[non_exhaustive]
12400pub struct MoveFileRequest {
12401 pub workspace: std::string::String,
12403
12404 pub path: std::string::String,
12407
12408 pub new_path: std::string::String,
12411
12412 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12413}
12414
12415impl MoveFileRequest {
12416 pub fn new() -> Self {
12417 std::default::Default::default()
12418 }
12419
12420 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12422 self.workspace = v.into();
12423 self
12424 }
12425
12426 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12428 self.path = v.into();
12429 self
12430 }
12431
12432 pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12434 self.new_path = v.into();
12435 self
12436 }
12437}
12438
12439impl wkt::message::Message for MoveFileRequest {
12440 fn typename() -> &'static str {
12441 "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
12442 }
12443}
12444
12445#[doc(hidden)]
12446impl<'de> serde::de::Deserialize<'de> for MoveFileRequest {
12447 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12448 where
12449 D: serde::Deserializer<'de>,
12450 {
12451 #[allow(non_camel_case_types)]
12452 #[doc(hidden)]
12453 #[derive(PartialEq, Eq, Hash)]
12454 enum __FieldTag {
12455 __workspace,
12456 __path,
12457 __new_path,
12458 Unknown(std::string::String),
12459 }
12460 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12461 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12462 where
12463 D: serde::Deserializer<'de>,
12464 {
12465 struct Visitor;
12466 impl<'de> serde::de::Visitor<'de> for Visitor {
12467 type Value = __FieldTag;
12468 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12469 formatter.write_str("a field name for MoveFileRequest")
12470 }
12471 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12472 where
12473 E: serde::de::Error,
12474 {
12475 use std::result::Result::Ok;
12476 use std::string::ToString;
12477 match value {
12478 "workspace" => Ok(__FieldTag::__workspace),
12479 "path" => Ok(__FieldTag::__path),
12480 "newPath" => Ok(__FieldTag::__new_path),
12481 "new_path" => Ok(__FieldTag::__new_path),
12482 _ => Ok(__FieldTag::Unknown(value.to_string())),
12483 }
12484 }
12485 }
12486 deserializer.deserialize_identifier(Visitor)
12487 }
12488 }
12489 struct Visitor;
12490 impl<'de> serde::de::Visitor<'de> for Visitor {
12491 type Value = MoveFileRequest;
12492 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12493 formatter.write_str("struct MoveFileRequest")
12494 }
12495 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12496 where
12497 A: serde::de::MapAccess<'de>,
12498 {
12499 #[allow(unused_imports)]
12500 use serde::de::Error;
12501 use std::option::Option::Some;
12502 let mut fields = std::collections::HashSet::new();
12503 let mut result = Self::Value::new();
12504 while let Some(tag) = map.next_key::<__FieldTag>()? {
12505 #[allow(clippy::match_single_binding)]
12506 match tag {
12507 __FieldTag::__workspace => {
12508 if !fields.insert(__FieldTag::__workspace) {
12509 return std::result::Result::Err(A::Error::duplicate_field(
12510 "multiple values for workspace",
12511 ));
12512 }
12513 result.workspace = map
12514 .next_value::<std::option::Option<std::string::String>>()?
12515 .unwrap_or_default();
12516 }
12517 __FieldTag::__path => {
12518 if !fields.insert(__FieldTag::__path) {
12519 return std::result::Result::Err(A::Error::duplicate_field(
12520 "multiple values for path",
12521 ));
12522 }
12523 result.path = map
12524 .next_value::<std::option::Option<std::string::String>>()?
12525 .unwrap_or_default();
12526 }
12527 __FieldTag::__new_path => {
12528 if !fields.insert(__FieldTag::__new_path) {
12529 return std::result::Result::Err(A::Error::duplicate_field(
12530 "multiple values for new_path",
12531 ));
12532 }
12533 result.new_path = map
12534 .next_value::<std::option::Option<std::string::String>>()?
12535 .unwrap_or_default();
12536 }
12537 __FieldTag::Unknown(key) => {
12538 let value = map.next_value::<serde_json::Value>()?;
12539 result._unknown_fields.insert(key, value);
12540 }
12541 }
12542 }
12543 std::result::Result::Ok(result)
12544 }
12545 }
12546 deserializer.deserialize_any(Visitor)
12547 }
12548}
12549
12550#[doc(hidden)]
12551impl serde::ser::Serialize for MoveFileRequest {
12552 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12553 where
12554 S: serde::ser::Serializer,
12555 {
12556 use serde::ser::SerializeMap;
12557 #[allow(unused_imports)]
12558 use std::option::Option::Some;
12559 let mut state = serializer.serialize_map(std::option::Option::None)?;
12560 if !self.workspace.is_empty() {
12561 state.serialize_entry("workspace", &self.workspace)?;
12562 }
12563 if !self.path.is_empty() {
12564 state.serialize_entry("path", &self.path)?;
12565 }
12566 if !self.new_path.is_empty() {
12567 state.serialize_entry("newPath", &self.new_path)?;
12568 }
12569 if !self._unknown_fields.is_empty() {
12570 for (key, value) in self._unknown_fields.iter() {
12571 state.serialize_entry(key, &value)?;
12572 }
12573 }
12574 state.end()
12575 }
12576}
12577
12578#[derive(Clone, Debug, Default, PartialEq)]
12580#[non_exhaustive]
12581pub struct MoveFileResponse {
12582 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12583}
12584
12585impl MoveFileResponse {
12586 pub fn new() -> Self {
12587 std::default::Default::default()
12588 }
12589}
12590
12591impl wkt::message::Message for MoveFileResponse {
12592 fn typename() -> &'static str {
12593 "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
12594 }
12595}
12596
12597#[doc(hidden)]
12598impl<'de> serde::de::Deserialize<'de> for MoveFileResponse {
12599 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12600 where
12601 D: serde::Deserializer<'de>,
12602 {
12603 #[allow(non_camel_case_types)]
12604 #[doc(hidden)]
12605 #[derive(PartialEq, Eq, Hash)]
12606 enum __FieldTag {
12607 Unknown(std::string::String),
12608 }
12609 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12610 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12611 where
12612 D: serde::Deserializer<'de>,
12613 {
12614 struct Visitor;
12615 impl<'de> serde::de::Visitor<'de> for Visitor {
12616 type Value = __FieldTag;
12617 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12618 formatter.write_str("a field name for MoveFileResponse")
12619 }
12620 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12621 where
12622 E: serde::de::Error,
12623 {
12624 use std::result::Result::Ok;
12625 use std::string::ToString;
12626 Ok(__FieldTag::Unknown(value.to_string()))
12627 }
12628 }
12629 deserializer.deserialize_identifier(Visitor)
12630 }
12631 }
12632 struct Visitor;
12633 impl<'de> serde::de::Visitor<'de> for Visitor {
12634 type Value = MoveFileResponse;
12635 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12636 formatter.write_str("struct MoveFileResponse")
12637 }
12638 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12639 where
12640 A: serde::de::MapAccess<'de>,
12641 {
12642 #[allow(unused_imports)]
12643 use serde::de::Error;
12644 use std::option::Option::Some;
12645 let mut result = Self::Value::new();
12646 while let Some(tag) = map.next_key::<__FieldTag>()? {
12647 #[allow(clippy::match_single_binding)]
12648 match tag {
12649 __FieldTag::Unknown(key) => {
12650 let value = map.next_value::<serde_json::Value>()?;
12651 result._unknown_fields.insert(key, value);
12652 }
12653 }
12654 }
12655 std::result::Result::Ok(result)
12656 }
12657 }
12658 deserializer.deserialize_any(Visitor)
12659 }
12660}
12661
12662#[doc(hidden)]
12663impl serde::ser::Serialize for MoveFileResponse {
12664 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12665 where
12666 S: serde::ser::Serializer,
12667 {
12668 use serde::ser::SerializeMap;
12669 #[allow(unused_imports)]
12670 use std::option::Option::Some;
12671 let mut state = serializer.serialize_map(std::option::Option::None)?;
12672 if !self._unknown_fields.is_empty() {
12673 for (key, value) in self._unknown_fields.iter() {
12674 state.serialize_entry(key, &value)?;
12675 }
12676 }
12677 state.end()
12678 }
12679}
12680
12681#[derive(Clone, Debug, Default, PartialEq)]
12683#[non_exhaustive]
12684pub struct WriteFileRequest {
12685 pub workspace: std::string::String,
12687
12688 pub path: std::string::String,
12690
12691 pub contents: ::bytes::Bytes,
12693
12694 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12695}
12696
12697impl WriteFileRequest {
12698 pub fn new() -> Self {
12699 std::default::Default::default()
12700 }
12701
12702 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12704 self.workspace = v.into();
12705 self
12706 }
12707
12708 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12710 self.path = v.into();
12711 self
12712 }
12713
12714 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
12716 self.contents = v.into();
12717 self
12718 }
12719}
12720
12721impl wkt::message::Message for WriteFileRequest {
12722 fn typename() -> &'static str {
12723 "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
12724 }
12725}
12726
12727#[doc(hidden)]
12728impl<'de> serde::de::Deserialize<'de> for WriteFileRequest {
12729 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12730 where
12731 D: serde::Deserializer<'de>,
12732 {
12733 #[allow(non_camel_case_types)]
12734 #[doc(hidden)]
12735 #[derive(PartialEq, Eq, Hash)]
12736 enum __FieldTag {
12737 __workspace,
12738 __path,
12739 __contents,
12740 Unknown(std::string::String),
12741 }
12742 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12743 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12744 where
12745 D: serde::Deserializer<'de>,
12746 {
12747 struct Visitor;
12748 impl<'de> serde::de::Visitor<'de> for Visitor {
12749 type Value = __FieldTag;
12750 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12751 formatter.write_str("a field name for WriteFileRequest")
12752 }
12753 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12754 where
12755 E: serde::de::Error,
12756 {
12757 use std::result::Result::Ok;
12758 use std::string::ToString;
12759 match value {
12760 "workspace" => Ok(__FieldTag::__workspace),
12761 "path" => Ok(__FieldTag::__path),
12762 "contents" => Ok(__FieldTag::__contents),
12763 _ => Ok(__FieldTag::Unknown(value.to_string())),
12764 }
12765 }
12766 }
12767 deserializer.deserialize_identifier(Visitor)
12768 }
12769 }
12770 struct Visitor;
12771 impl<'de> serde::de::Visitor<'de> for Visitor {
12772 type Value = WriteFileRequest;
12773 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12774 formatter.write_str("struct WriteFileRequest")
12775 }
12776 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12777 where
12778 A: serde::de::MapAccess<'de>,
12779 {
12780 #[allow(unused_imports)]
12781 use serde::de::Error;
12782 use std::option::Option::Some;
12783 let mut fields = std::collections::HashSet::new();
12784 let mut result = Self::Value::new();
12785 while let Some(tag) = map.next_key::<__FieldTag>()? {
12786 #[allow(clippy::match_single_binding)]
12787 match tag {
12788 __FieldTag::__workspace => {
12789 if !fields.insert(__FieldTag::__workspace) {
12790 return std::result::Result::Err(A::Error::duplicate_field(
12791 "multiple values for workspace",
12792 ));
12793 }
12794 result.workspace = map
12795 .next_value::<std::option::Option<std::string::String>>()?
12796 .unwrap_or_default();
12797 }
12798 __FieldTag::__path => {
12799 if !fields.insert(__FieldTag::__path) {
12800 return std::result::Result::Err(A::Error::duplicate_field(
12801 "multiple values for path",
12802 ));
12803 }
12804 result.path = map
12805 .next_value::<std::option::Option<std::string::String>>()?
12806 .unwrap_or_default();
12807 }
12808 __FieldTag::__contents => {
12809 if !fields.insert(__FieldTag::__contents) {
12810 return std::result::Result::Err(A::Error::duplicate_field(
12811 "multiple values for contents",
12812 ));
12813 }
12814 struct __With(std::option::Option<::bytes::Bytes>);
12815 impl<'de> serde::de::Deserialize<'de> for __With {
12816 fn deserialize<D>(
12817 deserializer: D,
12818 ) -> std::result::Result<Self, D::Error>
12819 where
12820 D: serde::de::Deserializer<'de>,
12821 {
12822 serde_with::As::< std::option::Option<serde_with::base64::Base64> >::deserialize(deserializer).map(__With)
12823 }
12824 }
12825 result.contents = map.next_value::<__With>()?.0.unwrap_or_default();
12826 }
12827 __FieldTag::Unknown(key) => {
12828 let value = map.next_value::<serde_json::Value>()?;
12829 result._unknown_fields.insert(key, value);
12830 }
12831 }
12832 }
12833 std::result::Result::Ok(result)
12834 }
12835 }
12836 deserializer.deserialize_any(Visitor)
12837 }
12838}
12839
12840#[doc(hidden)]
12841impl serde::ser::Serialize for WriteFileRequest {
12842 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12843 where
12844 S: serde::ser::Serializer,
12845 {
12846 use serde::ser::SerializeMap;
12847 #[allow(unused_imports)]
12848 use std::option::Option::Some;
12849 let mut state = serializer.serialize_map(std::option::Option::None)?;
12850 if !self.workspace.is_empty() {
12851 state.serialize_entry("workspace", &self.workspace)?;
12852 }
12853 if !self.path.is_empty() {
12854 state.serialize_entry("path", &self.path)?;
12855 }
12856 if !self.contents.is_empty() {
12857 struct __With<'a>(&'a ::bytes::Bytes);
12858 impl<'a> serde::ser::Serialize for __With<'a> {
12859 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12860 where
12861 S: serde::ser::Serializer,
12862 {
12863 serde_with::As::<serde_with::base64::Base64>::serialize(self.0, serializer)
12864 }
12865 }
12866 state.serialize_entry("contents", &__With(&self.contents))?;
12867 }
12868 if !self._unknown_fields.is_empty() {
12869 for (key, value) in self._unknown_fields.iter() {
12870 state.serialize_entry(key, &value)?;
12871 }
12872 }
12873 state.end()
12874 }
12875}
12876
12877#[derive(Clone, Debug, Default, PartialEq)]
12879#[non_exhaustive]
12880pub struct WriteFileResponse {
12881 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12882}
12883
12884impl WriteFileResponse {
12885 pub fn new() -> Self {
12886 std::default::Default::default()
12887 }
12888}
12889
12890impl wkt::message::Message for WriteFileResponse {
12891 fn typename() -> &'static str {
12892 "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
12893 }
12894}
12895
12896#[doc(hidden)]
12897impl<'de> serde::de::Deserialize<'de> for WriteFileResponse {
12898 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12899 where
12900 D: serde::Deserializer<'de>,
12901 {
12902 #[allow(non_camel_case_types)]
12903 #[doc(hidden)]
12904 #[derive(PartialEq, Eq, Hash)]
12905 enum __FieldTag {
12906 Unknown(std::string::String),
12907 }
12908 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12909 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12910 where
12911 D: serde::Deserializer<'de>,
12912 {
12913 struct Visitor;
12914 impl<'de> serde::de::Visitor<'de> for Visitor {
12915 type Value = __FieldTag;
12916 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12917 formatter.write_str("a field name for WriteFileResponse")
12918 }
12919 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12920 where
12921 E: serde::de::Error,
12922 {
12923 use std::result::Result::Ok;
12924 use std::string::ToString;
12925 Ok(__FieldTag::Unknown(value.to_string()))
12926 }
12927 }
12928 deserializer.deserialize_identifier(Visitor)
12929 }
12930 }
12931 struct Visitor;
12932 impl<'de> serde::de::Visitor<'de> for Visitor {
12933 type Value = WriteFileResponse;
12934 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12935 formatter.write_str("struct WriteFileResponse")
12936 }
12937 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12938 where
12939 A: serde::de::MapAccess<'de>,
12940 {
12941 #[allow(unused_imports)]
12942 use serde::de::Error;
12943 use std::option::Option::Some;
12944 let mut result = Self::Value::new();
12945 while let Some(tag) = map.next_key::<__FieldTag>()? {
12946 #[allow(clippy::match_single_binding)]
12947 match tag {
12948 __FieldTag::Unknown(key) => {
12949 let value = map.next_value::<serde_json::Value>()?;
12950 result._unknown_fields.insert(key, value);
12951 }
12952 }
12953 }
12954 std::result::Result::Ok(result)
12955 }
12956 }
12957 deserializer.deserialize_any(Visitor)
12958 }
12959}
12960
12961#[doc(hidden)]
12962impl serde::ser::Serialize for WriteFileResponse {
12963 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12964 where
12965 S: serde::ser::Serializer,
12966 {
12967 use serde::ser::SerializeMap;
12968 #[allow(unused_imports)]
12969 use std::option::Option::Some;
12970 let mut state = serializer.serialize_map(std::option::Option::None)?;
12971 if !self._unknown_fields.is_empty() {
12972 for (key, value) in self._unknown_fields.iter() {
12973 state.serialize_entry(key, &value)?;
12974 }
12975 }
12976 state.end()
12977 }
12978}
12979
12980#[derive(Clone, Debug, Default, PartialEq)]
12982#[non_exhaustive]
12983pub struct InstallNpmPackagesRequest {
12984 pub workspace: std::string::String,
12986
12987 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12988}
12989
12990impl InstallNpmPackagesRequest {
12991 pub fn new() -> Self {
12992 std::default::Default::default()
12993 }
12994
12995 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12997 self.workspace = v.into();
12998 self
12999 }
13000}
13001
13002impl wkt::message::Message for InstallNpmPackagesRequest {
13003 fn typename() -> &'static str {
13004 "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
13005 }
13006}
13007
13008#[doc(hidden)]
13009impl<'de> serde::de::Deserialize<'de> for InstallNpmPackagesRequest {
13010 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13011 where
13012 D: serde::Deserializer<'de>,
13013 {
13014 #[allow(non_camel_case_types)]
13015 #[doc(hidden)]
13016 #[derive(PartialEq, Eq, Hash)]
13017 enum __FieldTag {
13018 __workspace,
13019 Unknown(std::string::String),
13020 }
13021 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13022 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13023 where
13024 D: serde::Deserializer<'de>,
13025 {
13026 struct Visitor;
13027 impl<'de> serde::de::Visitor<'de> for Visitor {
13028 type Value = __FieldTag;
13029 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13030 formatter.write_str("a field name for InstallNpmPackagesRequest")
13031 }
13032 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13033 where
13034 E: serde::de::Error,
13035 {
13036 use std::result::Result::Ok;
13037 use std::string::ToString;
13038 match value {
13039 "workspace" => Ok(__FieldTag::__workspace),
13040 _ => Ok(__FieldTag::Unknown(value.to_string())),
13041 }
13042 }
13043 }
13044 deserializer.deserialize_identifier(Visitor)
13045 }
13046 }
13047 struct Visitor;
13048 impl<'de> serde::de::Visitor<'de> for Visitor {
13049 type Value = InstallNpmPackagesRequest;
13050 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13051 formatter.write_str("struct InstallNpmPackagesRequest")
13052 }
13053 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13054 where
13055 A: serde::de::MapAccess<'de>,
13056 {
13057 #[allow(unused_imports)]
13058 use serde::de::Error;
13059 use std::option::Option::Some;
13060 let mut fields = std::collections::HashSet::new();
13061 let mut result = Self::Value::new();
13062 while let Some(tag) = map.next_key::<__FieldTag>()? {
13063 #[allow(clippy::match_single_binding)]
13064 match tag {
13065 __FieldTag::__workspace => {
13066 if !fields.insert(__FieldTag::__workspace) {
13067 return std::result::Result::Err(A::Error::duplicate_field(
13068 "multiple values for workspace",
13069 ));
13070 }
13071 result.workspace = map
13072 .next_value::<std::option::Option<std::string::String>>()?
13073 .unwrap_or_default();
13074 }
13075 __FieldTag::Unknown(key) => {
13076 let value = map.next_value::<serde_json::Value>()?;
13077 result._unknown_fields.insert(key, value);
13078 }
13079 }
13080 }
13081 std::result::Result::Ok(result)
13082 }
13083 }
13084 deserializer.deserialize_any(Visitor)
13085 }
13086}
13087
13088#[doc(hidden)]
13089impl serde::ser::Serialize for InstallNpmPackagesRequest {
13090 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13091 where
13092 S: serde::ser::Serializer,
13093 {
13094 use serde::ser::SerializeMap;
13095 #[allow(unused_imports)]
13096 use std::option::Option::Some;
13097 let mut state = serializer.serialize_map(std::option::Option::None)?;
13098 if !self.workspace.is_empty() {
13099 state.serialize_entry("workspace", &self.workspace)?;
13100 }
13101 if !self._unknown_fields.is_empty() {
13102 for (key, value) in self._unknown_fields.iter() {
13103 state.serialize_entry(key, &value)?;
13104 }
13105 }
13106 state.end()
13107 }
13108}
13109
13110#[derive(Clone, Debug, Default, PartialEq)]
13112#[non_exhaustive]
13113pub struct InstallNpmPackagesResponse {
13114 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13115}
13116
13117impl InstallNpmPackagesResponse {
13118 pub fn new() -> Self {
13119 std::default::Default::default()
13120 }
13121}
13122
13123impl wkt::message::Message for InstallNpmPackagesResponse {
13124 fn typename() -> &'static str {
13125 "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
13126 }
13127}
13128
13129#[doc(hidden)]
13130impl<'de> serde::de::Deserialize<'de> for InstallNpmPackagesResponse {
13131 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13132 where
13133 D: serde::Deserializer<'de>,
13134 {
13135 #[allow(non_camel_case_types)]
13136 #[doc(hidden)]
13137 #[derive(PartialEq, Eq, Hash)]
13138 enum __FieldTag {
13139 Unknown(std::string::String),
13140 }
13141 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13142 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13143 where
13144 D: serde::Deserializer<'de>,
13145 {
13146 struct Visitor;
13147 impl<'de> serde::de::Visitor<'de> for Visitor {
13148 type Value = __FieldTag;
13149 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13150 formatter.write_str("a field name for InstallNpmPackagesResponse")
13151 }
13152 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13153 where
13154 E: serde::de::Error,
13155 {
13156 use std::result::Result::Ok;
13157 use std::string::ToString;
13158 Ok(__FieldTag::Unknown(value.to_string()))
13159 }
13160 }
13161 deserializer.deserialize_identifier(Visitor)
13162 }
13163 }
13164 struct Visitor;
13165 impl<'de> serde::de::Visitor<'de> for Visitor {
13166 type Value = InstallNpmPackagesResponse;
13167 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13168 formatter.write_str("struct InstallNpmPackagesResponse")
13169 }
13170 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13171 where
13172 A: serde::de::MapAccess<'de>,
13173 {
13174 #[allow(unused_imports)]
13175 use serde::de::Error;
13176 use std::option::Option::Some;
13177 let mut result = Self::Value::new();
13178 while let Some(tag) = map.next_key::<__FieldTag>()? {
13179 #[allow(clippy::match_single_binding)]
13180 match tag {
13181 __FieldTag::Unknown(key) => {
13182 let value = map.next_value::<serde_json::Value>()?;
13183 result._unknown_fields.insert(key, value);
13184 }
13185 }
13186 }
13187 std::result::Result::Ok(result)
13188 }
13189 }
13190 deserializer.deserialize_any(Visitor)
13191 }
13192}
13193
13194#[doc(hidden)]
13195impl serde::ser::Serialize for InstallNpmPackagesResponse {
13196 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13197 where
13198 S: serde::ser::Serializer,
13199 {
13200 use serde::ser::SerializeMap;
13201 #[allow(unused_imports)]
13202 use std::option::Option::Some;
13203 let mut state = serializer.serialize_map(std::option::Option::None)?;
13204 if !self._unknown_fields.is_empty() {
13205 for (key, value) in self._unknown_fields.iter() {
13206 state.serialize_entry(key, &value)?;
13207 }
13208 }
13209 state.end()
13210 }
13211}
13212
13213#[derive(Clone, Debug, Default, PartialEq)]
13215#[non_exhaustive]
13216pub struct ReleaseConfig {
13217 pub name: std::string::String,
13219
13220 pub git_commitish: std::string::String,
13227
13228 pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
13231
13232 pub cron_schedule: std::string::String,
13235
13236 pub time_zone: std::string::String,
13241
13242 pub recent_scheduled_release_records:
13246 std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
13247
13248 pub release_compilation_result: std::string::String,
13256
13257 pub disabled: bool,
13259
13260 pub internal_metadata: std::option::Option<std::string::String>,
13264
13265 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13266}
13267
13268impl ReleaseConfig {
13269 pub fn new() -> Self {
13270 std::default::Default::default()
13271 }
13272
13273 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13275 self.name = v.into();
13276 self
13277 }
13278
13279 pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13281 self.git_commitish = v.into();
13282 self
13283 }
13284
13285 pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
13287 where
13288 T: std::convert::Into<crate::model::CodeCompilationConfig>,
13289 {
13290 self.code_compilation_config = std::option::Option::Some(v.into());
13291 self
13292 }
13293
13294 pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
13296 where
13297 T: std::convert::Into<crate::model::CodeCompilationConfig>,
13298 {
13299 self.code_compilation_config = v.map(|x| x.into());
13300 self
13301 }
13302
13303 pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13305 self.cron_schedule = v.into();
13306 self
13307 }
13308
13309 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13311 self.time_zone = v.into();
13312 self
13313 }
13314
13315 pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
13317 where
13318 T: std::iter::IntoIterator<Item = V>,
13319 V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
13320 {
13321 use std::iter::Iterator;
13322 self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
13323 self
13324 }
13325
13326 pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
13328 mut self,
13329 v: T,
13330 ) -> Self {
13331 self.release_compilation_result = v.into();
13332 self
13333 }
13334
13335 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13337 self.disabled = v.into();
13338 self
13339 }
13340
13341 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
13343 where
13344 T: std::convert::Into<std::string::String>,
13345 {
13346 self.internal_metadata = std::option::Option::Some(v.into());
13347 self
13348 }
13349
13350 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13352 where
13353 T: std::convert::Into<std::string::String>,
13354 {
13355 self.internal_metadata = v.map(|x| x.into());
13356 self
13357 }
13358}
13359
13360impl wkt::message::Message for ReleaseConfig {
13361 fn typename() -> &'static str {
13362 "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
13363 }
13364}
13365
13366#[doc(hidden)]
13367impl<'de> serde::de::Deserialize<'de> for ReleaseConfig {
13368 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13369 where
13370 D: serde::Deserializer<'de>,
13371 {
13372 #[allow(non_camel_case_types)]
13373 #[doc(hidden)]
13374 #[derive(PartialEq, Eq, Hash)]
13375 enum __FieldTag {
13376 __name,
13377 __git_commitish,
13378 __code_compilation_config,
13379 __cron_schedule,
13380 __time_zone,
13381 __recent_scheduled_release_records,
13382 __release_compilation_result,
13383 __disabled,
13384 __internal_metadata,
13385 Unknown(std::string::String),
13386 }
13387 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13388 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13389 where
13390 D: serde::Deserializer<'de>,
13391 {
13392 struct Visitor;
13393 impl<'de> serde::de::Visitor<'de> for Visitor {
13394 type Value = __FieldTag;
13395 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13396 formatter.write_str("a field name for ReleaseConfig")
13397 }
13398 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13399 where
13400 E: serde::de::Error,
13401 {
13402 use std::result::Result::Ok;
13403 use std::string::ToString;
13404 match value {
13405 "name" => Ok(__FieldTag::__name),
13406 "gitCommitish" => Ok(__FieldTag::__git_commitish),
13407 "git_commitish" => Ok(__FieldTag::__git_commitish),
13408 "codeCompilationConfig" => Ok(__FieldTag::__code_compilation_config),
13409 "code_compilation_config" => Ok(__FieldTag::__code_compilation_config),
13410 "cronSchedule" => Ok(__FieldTag::__cron_schedule),
13411 "cron_schedule" => Ok(__FieldTag::__cron_schedule),
13412 "timeZone" => Ok(__FieldTag::__time_zone),
13413 "time_zone" => Ok(__FieldTag::__time_zone),
13414 "recentScheduledReleaseRecords" => {
13415 Ok(__FieldTag::__recent_scheduled_release_records)
13416 }
13417 "recent_scheduled_release_records" => {
13418 Ok(__FieldTag::__recent_scheduled_release_records)
13419 }
13420 "releaseCompilationResult" => {
13421 Ok(__FieldTag::__release_compilation_result)
13422 }
13423 "release_compilation_result" => {
13424 Ok(__FieldTag::__release_compilation_result)
13425 }
13426 "disabled" => Ok(__FieldTag::__disabled),
13427 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
13428 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
13429 _ => Ok(__FieldTag::Unknown(value.to_string())),
13430 }
13431 }
13432 }
13433 deserializer.deserialize_identifier(Visitor)
13434 }
13435 }
13436 struct Visitor;
13437 impl<'de> serde::de::Visitor<'de> for Visitor {
13438 type Value = ReleaseConfig;
13439 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13440 formatter.write_str("struct ReleaseConfig")
13441 }
13442 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13443 where
13444 A: serde::de::MapAccess<'de>,
13445 {
13446 #[allow(unused_imports)]
13447 use serde::de::Error;
13448 use std::option::Option::Some;
13449 let mut fields = std::collections::HashSet::new();
13450 let mut result = Self::Value::new();
13451 while let Some(tag) = map.next_key::<__FieldTag>()? {
13452 #[allow(clippy::match_single_binding)]
13453 match tag {
13454 __FieldTag::__name => {
13455 if !fields.insert(__FieldTag::__name) {
13456 return std::result::Result::Err(A::Error::duplicate_field(
13457 "multiple values for name",
13458 ));
13459 }
13460 result.name = map
13461 .next_value::<std::option::Option<std::string::String>>()?
13462 .unwrap_or_default();
13463 }
13464 __FieldTag::__git_commitish => {
13465 if !fields.insert(__FieldTag::__git_commitish) {
13466 return std::result::Result::Err(A::Error::duplicate_field(
13467 "multiple values for git_commitish",
13468 ));
13469 }
13470 result.git_commitish = map
13471 .next_value::<std::option::Option<std::string::String>>()?
13472 .unwrap_or_default();
13473 }
13474 __FieldTag::__code_compilation_config => {
13475 if !fields.insert(__FieldTag::__code_compilation_config) {
13476 return std::result::Result::Err(A::Error::duplicate_field(
13477 "multiple values for code_compilation_config",
13478 ));
13479 }
13480 result.code_compilation_config = map.next_value::<std::option::Option<crate::model::CodeCompilationConfig>>()?
13481 ;
13482 }
13483 __FieldTag::__cron_schedule => {
13484 if !fields.insert(__FieldTag::__cron_schedule) {
13485 return std::result::Result::Err(A::Error::duplicate_field(
13486 "multiple values for cron_schedule",
13487 ));
13488 }
13489 result.cron_schedule = map
13490 .next_value::<std::option::Option<std::string::String>>()?
13491 .unwrap_or_default();
13492 }
13493 __FieldTag::__time_zone => {
13494 if !fields.insert(__FieldTag::__time_zone) {
13495 return std::result::Result::Err(A::Error::duplicate_field(
13496 "multiple values for time_zone",
13497 ));
13498 }
13499 result.time_zone = map
13500 .next_value::<std::option::Option<std::string::String>>()?
13501 .unwrap_or_default();
13502 }
13503 __FieldTag::__recent_scheduled_release_records => {
13504 if !fields.insert(__FieldTag::__recent_scheduled_release_records) {
13505 return std::result::Result::Err(A::Error::duplicate_field(
13506 "multiple values for recent_scheduled_release_records",
13507 ));
13508 }
13509 result.recent_scheduled_release_records = map
13510 .next_value::<std::option::Option<
13511 std::vec::Vec<
13512 crate::model::release_config::ScheduledReleaseRecord,
13513 >,
13514 >>()?
13515 .unwrap_or_default();
13516 }
13517 __FieldTag::__release_compilation_result => {
13518 if !fields.insert(__FieldTag::__release_compilation_result) {
13519 return std::result::Result::Err(A::Error::duplicate_field(
13520 "multiple values for release_compilation_result",
13521 ));
13522 }
13523 result.release_compilation_result = map
13524 .next_value::<std::option::Option<std::string::String>>()?
13525 .unwrap_or_default();
13526 }
13527 __FieldTag::__disabled => {
13528 if !fields.insert(__FieldTag::__disabled) {
13529 return std::result::Result::Err(A::Error::duplicate_field(
13530 "multiple values for disabled",
13531 ));
13532 }
13533 result.disabled = map
13534 .next_value::<std::option::Option<bool>>()?
13535 .unwrap_or_default();
13536 }
13537 __FieldTag::__internal_metadata => {
13538 if !fields.insert(__FieldTag::__internal_metadata) {
13539 return std::result::Result::Err(A::Error::duplicate_field(
13540 "multiple values for internal_metadata",
13541 ));
13542 }
13543 result.internal_metadata =
13544 map.next_value::<std::option::Option<std::string::String>>()?;
13545 }
13546 __FieldTag::Unknown(key) => {
13547 let value = map.next_value::<serde_json::Value>()?;
13548 result._unknown_fields.insert(key, value);
13549 }
13550 }
13551 }
13552 std::result::Result::Ok(result)
13553 }
13554 }
13555 deserializer.deserialize_any(Visitor)
13556 }
13557}
13558
13559#[doc(hidden)]
13560impl serde::ser::Serialize for ReleaseConfig {
13561 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13562 where
13563 S: serde::ser::Serializer,
13564 {
13565 use serde::ser::SerializeMap;
13566 #[allow(unused_imports)]
13567 use std::option::Option::Some;
13568 let mut state = serializer.serialize_map(std::option::Option::None)?;
13569 if !self.name.is_empty() {
13570 state.serialize_entry("name", &self.name)?;
13571 }
13572 if !self.git_commitish.is_empty() {
13573 state.serialize_entry("gitCommitish", &self.git_commitish)?;
13574 }
13575 if self.code_compilation_config.is_some() {
13576 state.serialize_entry("codeCompilationConfig", &self.code_compilation_config)?;
13577 }
13578 if !self.cron_schedule.is_empty() {
13579 state.serialize_entry("cronSchedule", &self.cron_schedule)?;
13580 }
13581 if !self.time_zone.is_empty() {
13582 state.serialize_entry("timeZone", &self.time_zone)?;
13583 }
13584 if !self.recent_scheduled_release_records.is_empty() {
13585 state.serialize_entry(
13586 "recentScheduledReleaseRecords",
13587 &self.recent_scheduled_release_records,
13588 )?;
13589 }
13590 if !self.release_compilation_result.is_empty() {
13591 state.serialize_entry("releaseCompilationResult", &self.release_compilation_result)?;
13592 }
13593 if !wkt::internal::is_default(&self.disabled) {
13594 state.serialize_entry("disabled", &self.disabled)?;
13595 }
13596 if self.internal_metadata.is_some() {
13597 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
13598 }
13599 if !self._unknown_fields.is_empty() {
13600 for (key, value) in self._unknown_fields.iter() {
13601 state.serialize_entry(key, &value)?;
13602 }
13603 }
13604 state.end()
13605 }
13606}
13607
13608pub mod release_config {
13610 #[allow(unused_imports)]
13611 use super::*;
13612
13613 #[derive(Clone, Debug, Default, PartialEq)]
13616 #[non_exhaustive]
13617 pub struct ScheduledReleaseRecord {
13618 pub release_time: std::option::Option<wkt::Timestamp>,
13620
13621 pub result:
13623 std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
13624
13625 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13626 }
13627
13628 impl ScheduledReleaseRecord {
13629 pub fn new() -> Self {
13630 std::default::Default::default()
13631 }
13632
13633 pub fn set_release_time<T>(mut self, v: T) -> Self
13635 where
13636 T: std::convert::Into<wkt::Timestamp>,
13637 {
13638 self.release_time = std::option::Option::Some(v.into());
13639 self
13640 }
13641
13642 pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
13644 where
13645 T: std::convert::Into<wkt::Timestamp>,
13646 {
13647 self.release_time = v.map(|x| x.into());
13648 self
13649 }
13650
13651 pub fn set_result<
13656 T: std::convert::Into<
13657 std::option::Option<
13658 crate::model::release_config::scheduled_release_record::Result,
13659 >,
13660 >,
13661 >(
13662 mut self,
13663 v: T,
13664 ) -> Self {
13665 self.result = v.into();
13666 self
13667 }
13668
13669 pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
13673 #[allow(unreachable_patterns)]
13674 self.result.as_ref().and_then(|v| match v {
13675 crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
13676 _ => std::option::Option::None,
13677 })
13678 }
13679
13680 pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
13686 mut self,
13687 v: T,
13688 ) -> Self {
13689 self.result = std::option::Option::Some(
13690 crate::model::release_config::scheduled_release_record::Result::CompilationResult(
13691 v.into(),
13692 ),
13693 );
13694 self
13695 }
13696
13697 pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
13701 #[allow(unreachable_patterns)]
13702 self.result.as_ref().and_then(|v| match v {
13703 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
13704 std::option::Option::Some(v)
13705 }
13706 _ => std::option::Option::None,
13707 })
13708 }
13709
13710 pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
13716 mut self,
13717 v: T,
13718 ) -> Self {
13719 self.result = std::option::Option::Some(
13720 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
13721 v.into(),
13722 ),
13723 );
13724 self
13725 }
13726 }
13727
13728 impl wkt::message::Message for ScheduledReleaseRecord {
13729 fn typename() -> &'static str {
13730 "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
13731 }
13732 }
13733
13734 #[doc(hidden)]
13735 impl<'de> serde::de::Deserialize<'de> for ScheduledReleaseRecord {
13736 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13737 where
13738 D: serde::Deserializer<'de>,
13739 {
13740 #[allow(non_camel_case_types)]
13741 #[doc(hidden)]
13742 #[derive(PartialEq, Eq, Hash)]
13743 enum __FieldTag {
13744 __compilation_result,
13745 __error_status,
13746 __release_time,
13747 Unknown(std::string::String),
13748 }
13749 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13750 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13751 where
13752 D: serde::Deserializer<'de>,
13753 {
13754 struct Visitor;
13755 impl<'de> serde::de::Visitor<'de> for Visitor {
13756 type Value = __FieldTag;
13757 fn expecting(
13758 &self,
13759 formatter: &mut std::fmt::Formatter,
13760 ) -> std::fmt::Result {
13761 formatter.write_str("a field name for ScheduledReleaseRecord")
13762 }
13763 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13764 where
13765 E: serde::de::Error,
13766 {
13767 use std::result::Result::Ok;
13768 use std::string::ToString;
13769 match value {
13770 "compilationResult" => Ok(__FieldTag::__compilation_result),
13771 "compilation_result" => Ok(__FieldTag::__compilation_result),
13772 "errorStatus" => Ok(__FieldTag::__error_status),
13773 "error_status" => Ok(__FieldTag::__error_status),
13774 "releaseTime" => Ok(__FieldTag::__release_time),
13775 "release_time" => Ok(__FieldTag::__release_time),
13776 _ => Ok(__FieldTag::Unknown(value.to_string())),
13777 }
13778 }
13779 }
13780 deserializer.deserialize_identifier(Visitor)
13781 }
13782 }
13783 struct Visitor;
13784 impl<'de> serde::de::Visitor<'de> for Visitor {
13785 type Value = ScheduledReleaseRecord;
13786 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13787 formatter.write_str("struct ScheduledReleaseRecord")
13788 }
13789 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13790 where
13791 A: serde::de::MapAccess<'de>,
13792 {
13793 #[allow(unused_imports)]
13794 use serde::de::Error;
13795 use std::option::Option::Some;
13796 let mut fields = std::collections::HashSet::new();
13797 let mut result = Self::Value::new();
13798 while let Some(tag) = map.next_key::<__FieldTag>()? {
13799 #[allow(clippy::match_single_binding)]
13800 match tag {
13801 __FieldTag::__compilation_result => {
13802 if !fields.insert(__FieldTag::__compilation_result) {
13803 return std::result::Result::Err(A::Error::duplicate_field(
13804 "multiple values for compilation_result",
13805 ));
13806 }
13807 if result.result.is_some() {
13808 return std::result::Result::Err(A::Error::duplicate_field(
13809 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord.compilation_result, latest field was compilationResult",
13810 ));
13811 }
13812 result.result = std::option::Option::Some(
13813 crate::model::release_config::scheduled_release_record::Result::CompilationResult(
13814 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
13815 ),
13816 );
13817 }
13818 __FieldTag::__error_status => {
13819 if !fields.insert(__FieldTag::__error_status) {
13820 return std::result::Result::Err(A::Error::duplicate_field(
13821 "multiple values for error_status",
13822 ));
13823 }
13824 if result.result.is_some() {
13825 return std::result::Result::Err(A::Error::duplicate_field(
13826 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord.error_status, latest field was errorStatus",
13827 ));
13828 }
13829 result.result = std::option::Option::Some(
13830 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
13831 map.next_value::<std::option::Option<std::boxed::Box<rpc::model::Status>>>()?.unwrap_or_default()
13832 ),
13833 );
13834 }
13835 __FieldTag::__release_time => {
13836 if !fields.insert(__FieldTag::__release_time) {
13837 return std::result::Result::Err(A::Error::duplicate_field(
13838 "multiple values for release_time",
13839 ));
13840 }
13841 result.release_time =
13842 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
13843 }
13844 __FieldTag::Unknown(key) => {
13845 let value = map.next_value::<serde_json::Value>()?;
13846 result._unknown_fields.insert(key, value);
13847 }
13848 }
13849 }
13850 std::result::Result::Ok(result)
13851 }
13852 }
13853 deserializer.deserialize_any(Visitor)
13854 }
13855 }
13856
13857 #[doc(hidden)]
13858 impl serde::ser::Serialize for ScheduledReleaseRecord {
13859 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13860 where
13861 S: serde::ser::Serializer,
13862 {
13863 use serde::ser::SerializeMap;
13864 #[allow(unused_imports)]
13865 use std::option::Option::Some;
13866 let mut state = serializer.serialize_map(std::option::Option::None)?;
13867 if let Some(value) = self.compilation_result() {
13868 state.serialize_entry("compilationResult", value)?;
13869 }
13870 if let Some(value) = self.error_status() {
13871 state.serialize_entry("errorStatus", value)?;
13872 }
13873 if self.release_time.is_some() {
13874 state.serialize_entry("releaseTime", &self.release_time)?;
13875 }
13876 if !self._unknown_fields.is_empty() {
13877 for (key, value) in self._unknown_fields.iter() {
13878 state.serialize_entry(key, &value)?;
13879 }
13880 }
13881 state.end()
13882 }
13883 }
13884
13885 pub mod scheduled_release_record {
13887 #[allow(unused_imports)]
13888 use super::*;
13889
13890 #[derive(Clone, Debug, PartialEq)]
13892 #[non_exhaustive]
13893 pub enum Result {
13894 CompilationResult(std::string::String),
13898 ErrorStatus(std::boxed::Box<rpc::model::Status>),
13901 }
13902 }
13903}
13904
13905#[derive(Clone, Debug, Default, PartialEq)]
13907#[non_exhaustive]
13908pub struct ListReleaseConfigsRequest {
13909 pub parent: std::string::String,
13912
13913 pub page_size: i32,
13917
13918 pub page_token: std::string::String,
13925
13926 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13927}
13928
13929impl ListReleaseConfigsRequest {
13930 pub fn new() -> Self {
13931 std::default::Default::default()
13932 }
13933
13934 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13936 self.parent = v.into();
13937 self
13938 }
13939
13940 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13942 self.page_size = v.into();
13943 self
13944 }
13945
13946 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13948 self.page_token = v.into();
13949 self
13950 }
13951}
13952
13953impl wkt::message::Message for ListReleaseConfigsRequest {
13954 fn typename() -> &'static str {
13955 "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
13956 }
13957}
13958
13959#[doc(hidden)]
13960impl<'de> serde::de::Deserialize<'de> for ListReleaseConfigsRequest {
13961 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13962 where
13963 D: serde::Deserializer<'de>,
13964 {
13965 #[allow(non_camel_case_types)]
13966 #[doc(hidden)]
13967 #[derive(PartialEq, Eq, Hash)]
13968 enum __FieldTag {
13969 __parent,
13970 __page_size,
13971 __page_token,
13972 Unknown(std::string::String),
13973 }
13974 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13975 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13976 where
13977 D: serde::Deserializer<'de>,
13978 {
13979 struct Visitor;
13980 impl<'de> serde::de::Visitor<'de> for Visitor {
13981 type Value = __FieldTag;
13982 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13983 formatter.write_str("a field name for ListReleaseConfigsRequest")
13984 }
13985 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13986 where
13987 E: serde::de::Error,
13988 {
13989 use std::result::Result::Ok;
13990 use std::string::ToString;
13991 match value {
13992 "parent" => Ok(__FieldTag::__parent),
13993 "pageSize" => Ok(__FieldTag::__page_size),
13994 "page_size" => Ok(__FieldTag::__page_size),
13995 "pageToken" => Ok(__FieldTag::__page_token),
13996 "page_token" => Ok(__FieldTag::__page_token),
13997 _ => Ok(__FieldTag::Unknown(value.to_string())),
13998 }
13999 }
14000 }
14001 deserializer.deserialize_identifier(Visitor)
14002 }
14003 }
14004 struct Visitor;
14005 impl<'de> serde::de::Visitor<'de> for Visitor {
14006 type Value = ListReleaseConfigsRequest;
14007 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14008 formatter.write_str("struct ListReleaseConfigsRequest")
14009 }
14010 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14011 where
14012 A: serde::de::MapAccess<'de>,
14013 {
14014 #[allow(unused_imports)]
14015 use serde::de::Error;
14016 use std::option::Option::Some;
14017 let mut fields = std::collections::HashSet::new();
14018 let mut result = Self::Value::new();
14019 while let Some(tag) = map.next_key::<__FieldTag>()? {
14020 #[allow(clippy::match_single_binding)]
14021 match tag {
14022 __FieldTag::__parent => {
14023 if !fields.insert(__FieldTag::__parent) {
14024 return std::result::Result::Err(A::Error::duplicate_field(
14025 "multiple values for parent",
14026 ));
14027 }
14028 result.parent = map
14029 .next_value::<std::option::Option<std::string::String>>()?
14030 .unwrap_or_default();
14031 }
14032 __FieldTag::__page_size => {
14033 if !fields.insert(__FieldTag::__page_size) {
14034 return std::result::Result::Err(A::Error::duplicate_field(
14035 "multiple values for page_size",
14036 ));
14037 }
14038 struct __With(std::option::Option<i32>);
14039 impl<'de> serde::de::Deserialize<'de> for __With {
14040 fn deserialize<D>(
14041 deserializer: D,
14042 ) -> std::result::Result<Self, D::Error>
14043 where
14044 D: serde::de::Deserializer<'de>,
14045 {
14046 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
14047 }
14048 }
14049 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
14050 }
14051 __FieldTag::__page_token => {
14052 if !fields.insert(__FieldTag::__page_token) {
14053 return std::result::Result::Err(A::Error::duplicate_field(
14054 "multiple values for page_token",
14055 ));
14056 }
14057 result.page_token = map
14058 .next_value::<std::option::Option<std::string::String>>()?
14059 .unwrap_or_default();
14060 }
14061 __FieldTag::Unknown(key) => {
14062 let value = map.next_value::<serde_json::Value>()?;
14063 result._unknown_fields.insert(key, value);
14064 }
14065 }
14066 }
14067 std::result::Result::Ok(result)
14068 }
14069 }
14070 deserializer.deserialize_any(Visitor)
14071 }
14072}
14073
14074#[doc(hidden)]
14075impl serde::ser::Serialize for ListReleaseConfigsRequest {
14076 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14077 where
14078 S: serde::ser::Serializer,
14079 {
14080 use serde::ser::SerializeMap;
14081 #[allow(unused_imports)]
14082 use std::option::Option::Some;
14083 let mut state = serializer.serialize_map(std::option::Option::None)?;
14084 if !self.parent.is_empty() {
14085 state.serialize_entry("parent", &self.parent)?;
14086 }
14087 if !wkt::internal::is_default(&self.page_size) {
14088 struct __With<'a>(&'a i32);
14089 impl<'a> serde::ser::Serialize for __With<'a> {
14090 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14091 where
14092 S: serde::ser::Serializer,
14093 {
14094 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
14095 }
14096 }
14097 state.serialize_entry("pageSize", &__With(&self.page_size))?;
14098 }
14099 if !self.page_token.is_empty() {
14100 state.serialize_entry("pageToken", &self.page_token)?;
14101 }
14102 if !self._unknown_fields.is_empty() {
14103 for (key, value) in self._unknown_fields.iter() {
14104 state.serialize_entry(key, &value)?;
14105 }
14106 }
14107 state.end()
14108 }
14109}
14110
14111#[derive(Clone, Debug, Default, PartialEq)]
14113#[non_exhaustive]
14114pub struct ListReleaseConfigsResponse {
14115 pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
14117
14118 pub next_page_token: std::string::String,
14121
14122 pub unreachable: std::vec::Vec<std::string::String>,
14124
14125 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14126}
14127
14128impl ListReleaseConfigsResponse {
14129 pub fn new() -> Self {
14130 std::default::Default::default()
14131 }
14132
14133 pub fn set_release_configs<T, V>(mut self, v: T) -> Self
14135 where
14136 T: std::iter::IntoIterator<Item = V>,
14137 V: std::convert::Into<crate::model::ReleaseConfig>,
14138 {
14139 use std::iter::Iterator;
14140 self.release_configs = v.into_iter().map(|i| i.into()).collect();
14141 self
14142 }
14143
14144 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14146 self.next_page_token = v.into();
14147 self
14148 }
14149
14150 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
14152 where
14153 T: std::iter::IntoIterator<Item = V>,
14154 V: std::convert::Into<std::string::String>,
14155 {
14156 use std::iter::Iterator;
14157 self.unreachable = v.into_iter().map(|i| i.into()).collect();
14158 self
14159 }
14160}
14161
14162impl wkt::message::Message for ListReleaseConfigsResponse {
14163 fn typename() -> &'static str {
14164 "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
14165 }
14166}
14167
14168#[doc(hidden)]
14169impl gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
14170 type PageItem = crate::model::ReleaseConfig;
14171
14172 fn items(self) -> std::vec::Vec<Self::PageItem> {
14173 self.release_configs
14174 }
14175
14176 fn next_page_token(&self) -> std::string::String {
14177 use std::clone::Clone;
14178 self.next_page_token.clone()
14179 }
14180}
14181
14182#[doc(hidden)]
14183impl<'de> serde::de::Deserialize<'de> for ListReleaseConfigsResponse {
14184 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14185 where
14186 D: serde::Deserializer<'de>,
14187 {
14188 #[allow(non_camel_case_types)]
14189 #[doc(hidden)]
14190 #[derive(PartialEq, Eq, Hash)]
14191 enum __FieldTag {
14192 __release_configs,
14193 __next_page_token,
14194 __unreachable,
14195 Unknown(std::string::String),
14196 }
14197 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14198 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14199 where
14200 D: serde::Deserializer<'de>,
14201 {
14202 struct Visitor;
14203 impl<'de> serde::de::Visitor<'de> for Visitor {
14204 type Value = __FieldTag;
14205 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14206 formatter.write_str("a field name for ListReleaseConfigsResponse")
14207 }
14208 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14209 where
14210 E: serde::de::Error,
14211 {
14212 use std::result::Result::Ok;
14213 use std::string::ToString;
14214 match value {
14215 "releaseConfigs" => Ok(__FieldTag::__release_configs),
14216 "release_configs" => Ok(__FieldTag::__release_configs),
14217 "nextPageToken" => Ok(__FieldTag::__next_page_token),
14218 "next_page_token" => Ok(__FieldTag::__next_page_token),
14219 "unreachable" => Ok(__FieldTag::__unreachable),
14220 _ => Ok(__FieldTag::Unknown(value.to_string())),
14221 }
14222 }
14223 }
14224 deserializer.deserialize_identifier(Visitor)
14225 }
14226 }
14227 struct Visitor;
14228 impl<'de> serde::de::Visitor<'de> for Visitor {
14229 type Value = ListReleaseConfigsResponse;
14230 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14231 formatter.write_str("struct ListReleaseConfigsResponse")
14232 }
14233 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14234 where
14235 A: serde::de::MapAccess<'de>,
14236 {
14237 #[allow(unused_imports)]
14238 use serde::de::Error;
14239 use std::option::Option::Some;
14240 let mut fields = std::collections::HashSet::new();
14241 let mut result = Self::Value::new();
14242 while let Some(tag) = map.next_key::<__FieldTag>()? {
14243 #[allow(clippy::match_single_binding)]
14244 match tag {
14245 __FieldTag::__release_configs => {
14246 if !fields.insert(__FieldTag::__release_configs) {
14247 return std::result::Result::Err(A::Error::duplicate_field(
14248 "multiple values for release_configs",
14249 ));
14250 }
14251 result.release_configs = map.next_value::<std::option::Option<std::vec::Vec<crate::model::ReleaseConfig>>>()?.unwrap_or_default();
14252 }
14253 __FieldTag::__next_page_token => {
14254 if !fields.insert(__FieldTag::__next_page_token) {
14255 return std::result::Result::Err(A::Error::duplicate_field(
14256 "multiple values for next_page_token",
14257 ));
14258 }
14259 result.next_page_token = map
14260 .next_value::<std::option::Option<std::string::String>>()?
14261 .unwrap_or_default();
14262 }
14263 __FieldTag::__unreachable => {
14264 if !fields.insert(__FieldTag::__unreachable) {
14265 return std::result::Result::Err(A::Error::duplicate_field(
14266 "multiple values for unreachable",
14267 ));
14268 }
14269 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
14270 }
14271 __FieldTag::Unknown(key) => {
14272 let value = map.next_value::<serde_json::Value>()?;
14273 result._unknown_fields.insert(key, value);
14274 }
14275 }
14276 }
14277 std::result::Result::Ok(result)
14278 }
14279 }
14280 deserializer.deserialize_any(Visitor)
14281 }
14282}
14283
14284#[doc(hidden)]
14285impl serde::ser::Serialize for ListReleaseConfigsResponse {
14286 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14287 where
14288 S: serde::ser::Serializer,
14289 {
14290 use serde::ser::SerializeMap;
14291 #[allow(unused_imports)]
14292 use std::option::Option::Some;
14293 let mut state = serializer.serialize_map(std::option::Option::None)?;
14294 if !self.release_configs.is_empty() {
14295 state.serialize_entry("releaseConfigs", &self.release_configs)?;
14296 }
14297 if !self.next_page_token.is_empty() {
14298 state.serialize_entry("nextPageToken", &self.next_page_token)?;
14299 }
14300 if !self.unreachable.is_empty() {
14301 state.serialize_entry("unreachable", &self.unreachable)?;
14302 }
14303 if !self._unknown_fields.is_empty() {
14304 for (key, value) in self._unknown_fields.iter() {
14305 state.serialize_entry(key, &value)?;
14306 }
14307 }
14308 state.end()
14309 }
14310}
14311
14312#[derive(Clone, Debug, Default, PartialEq)]
14314#[non_exhaustive]
14315pub struct GetReleaseConfigRequest {
14316 pub name: std::string::String,
14318
14319 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14320}
14321
14322impl GetReleaseConfigRequest {
14323 pub fn new() -> Self {
14324 std::default::Default::default()
14325 }
14326
14327 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14329 self.name = v.into();
14330 self
14331 }
14332}
14333
14334impl wkt::message::Message for GetReleaseConfigRequest {
14335 fn typename() -> &'static str {
14336 "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
14337 }
14338}
14339
14340#[doc(hidden)]
14341impl<'de> serde::de::Deserialize<'de> for GetReleaseConfigRequest {
14342 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14343 where
14344 D: serde::Deserializer<'de>,
14345 {
14346 #[allow(non_camel_case_types)]
14347 #[doc(hidden)]
14348 #[derive(PartialEq, Eq, Hash)]
14349 enum __FieldTag {
14350 __name,
14351 Unknown(std::string::String),
14352 }
14353 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14354 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14355 where
14356 D: serde::Deserializer<'de>,
14357 {
14358 struct Visitor;
14359 impl<'de> serde::de::Visitor<'de> for Visitor {
14360 type Value = __FieldTag;
14361 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14362 formatter.write_str("a field name for GetReleaseConfigRequest")
14363 }
14364 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14365 where
14366 E: serde::de::Error,
14367 {
14368 use std::result::Result::Ok;
14369 use std::string::ToString;
14370 match value {
14371 "name" => Ok(__FieldTag::__name),
14372 _ => Ok(__FieldTag::Unknown(value.to_string())),
14373 }
14374 }
14375 }
14376 deserializer.deserialize_identifier(Visitor)
14377 }
14378 }
14379 struct Visitor;
14380 impl<'de> serde::de::Visitor<'de> for Visitor {
14381 type Value = GetReleaseConfigRequest;
14382 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14383 formatter.write_str("struct GetReleaseConfigRequest")
14384 }
14385 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14386 where
14387 A: serde::de::MapAccess<'de>,
14388 {
14389 #[allow(unused_imports)]
14390 use serde::de::Error;
14391 use std::option::Option::Some;
14392 let mut fields = std::collections::HashSet::new();
14393 let mut result = Self::Value::new();
14394 while let Some(tag) = map.next_key::<__FieldTag>()? {
14395 #[allow(clippy::match_single_binding)]
14396 match tag {
14397 __FieldTag::__name => {
14398 if !fields.insert(__FieldTag::__name) {
14399 return std::result::Result::Err(A::Error::duplicate_field(
14400 "multiple values for name",
14401 ));
14402 }
14403 result.name = map
14404 .next_value::<std::option::Option<std::string::String>>()?
14405 .unwrap_or_default();
14406 }
14407 __FieldTag::Unknown(key) => {
14408 let value = map.next_value::<serde_json::Value>()?;
14409 result._unknown_fields.insert(key, value);
14410 }
14411 }
14412 }
14413 std::result::Result::Ok(result)
14414 }
14415 }
14416 deserializer.deserialize_any(Visitor)
14417 }
14418}
14419
14420#[doc(hidden)]
14421impl serde::ser::Serialize for GetReleaseConfigRequest {
14422 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14423 where
14424 S: serde::ser::Serializer,
14425 {
14426 use serde::ser::SerializeMap;
14427 #[allow(unused_imports)]
14428 use std::option::Option::Some;
14429 let mut state = serializer.serialize_map(std::option::Option::None)?;
14430 if !self.name.is_empty() {
14431 state.serialize_entry("name", &self.name)?;
14432 }
14433 if !self._unknown_fields.is_empty() {
14434 for (key, value) in self._unknown_fields.iter() {
14435 state.serialize_entry(key, &value)?;
14436 }
14437 }
14438 state.end()
14439 }
14440}
14441
14442#[derive(Clone, Debug, Default, PartialEq)]
14444#[non_exhaustive]
14445pub struct CreateReleaseConfigRequest {
14446 pub parent: std::string::String,
14449
14450 pub release_config: std::option::Option<crate::model::ReleaseConfig>,
14452
14453 pub release_config_id: std::string::String,
14456
14457 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14458}
14459
14460impl CreateReleaseConfigRequest {
14461 pub fn new() -> Self {
14462 std::default::Default::default()
14463 }
14464
14465 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14467 self.parent = v.into();
14468 self
14469 }
14470
14471 pub fn set_release_config<T>(mut self, v: T) -> Self
14473 where
14474 T: std::convert::Into<crate::model::ReleaseConfig>,
14475 {
14476 self.release_config = std::option::Option::Some(v.into());
14477 self
14478 }
14479
14480 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
14482 where
14483 T: std::convert::Into<crate::model::ReleaseConfig>,
14484 {
14485 self.release_config = v.map(|x| x.into());
14486 self
14487 }
14488
14489 pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
14491 mut self,
14492 v: T,
14493 ) -> Self {
14494 self.release_config_id = v.into();
14495 self
14496 }
14497}
14498
14499impl wkt::message::Message for CreateReleaseConfigRequest {
14500 fn typename() -> &'static str {
14501 "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
14502 }
14503}
14504
14505#[doc(hidden)]
14506impl<'de> serde::de::Deserialize<'de> for CreateReleaseConfigRequest {
14507 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14508 where
14509 D: serde::Deserializer<'de>,
14510 {
14511 #[allow(non_camel_case_types)]
14512 #[doc(hidden)]
14513 #[derive(PartialEq, Eq, Hash)]
14514 enum __FieldTag {
14515 __parent,
14516 __release_config,
14517 __release_config_id,
14518 Unknown(std::string::String),
14519 }
14520 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14521 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14522 where
14523 D: serde::Deserializer<'de>,
14524 {
14525 struct Visitor;
14526 impl<'de> serde::de::Visitor<'de> for Visitor {
14527 type Value = __FieldTag;
14528 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14529 formatter.write_str("a field name for CreateReleaseConfigRequest")
14530 }
14531 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14532 where
14533 E: serde::de::Error,
14534 {
14535 use std::result::Result::Ok;
14536 use std::string::ToString;
14537 match value {
14538 "parent" => Ok(__FieldTag::__parent),
14539 "releaseConfig" => Ok(__FieldTag::__release_config),
14540 "release_config" => Ok(__FieldTag::__release_config),
14541 "releaseConfigId" => Ok(__FieldTag::__release_config_id),
14542 "release_config_id" => Ok(__FieldTag::__release_config_id),
14543 _ => Ok(__FieldTag::Unknown(value.to_string())),
14544 }
14545 }
14546 }
14547 deserializer.deserialize_identifier(Visitor)
14548 }
14549 }
14550 struct Visitor;
14551 impl<'de> serde::de::Visitor<'de> for Visitor {
14552 type Value = CreateReleaseConfigRequest;
14553 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14554 formatter.write_str("struct CreateReleaseConfigRequest")
14555 }
14556 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14557 where
14558 A: serde::de::MapAccess<'de>,
14559 {
14560 #[allow(unused_imports)]
14561 use serde::de::Error;
14562 use std::option::Option::Some;
14563 let mut fields = std::collections::HashSet::new();
14564 let mut result = Self::Value::new();
14565 while let Some(tag) = map.next_key::<__FieldTag>()? {
14566 #[allow(clippy::match_single_binding)]
14567 match tag {
14568 __FieldTag::__parent => {
14569 if !fields.insert(__FieldTag::__parent) {
14570 return std::result::Result::Err(A::Error::duplicate_field(
14571 "multiple values for parent",
14572 ));
14573 }
14574 result.parent = map
14575 .next_value::<std::option::Option<std::string::String>>()?
14576 .unwrap_or_default();
14577 }
14578 __FieldTag::__release_config => {
14579 if !fields.insert(__FieldTag::__release_config) {
14580 return std::result::Result::Err(A::Error::duplicate_field(
14581 "multiple values for release_config",
14582 ));
14583 }
14584 result.release_config = map
14585 .next_value::<std::option::Option<crate::model::ReleaseConfig>>()?;
14586 }
14587 __FieldTag::__release_config_id => {
14588 if !fields.insert(__FieldTag::__release_config_id) {
14589 return std::result::Result::Err(A::Error::duplicate_field(
14590 "multiple values for release_config_id",
14591 ));
14592 }
14593 result.release_config_id = map
14594 .next_value::<std::option::Option<std::string::String>>()?
14595 .unwrap_or_default();
14596 }
14597 __FieldTag::Unknown(key) => {
14598 let value = map.next_value::<serde_json::Value>()?;
14599 result._unknown_fields.insert(key, value);
14600 }
14601 }
14602 }
14603 std::result::Result::Ok(result)
14604 }
14605 }
14606 deserializer.deserialize_any(Visitor)
14607 }
14608}
14609
14610#[doc(hidden)]
14611impl serde::ser::Serialize for CreateReleaseConfigRequest {
14612 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14613 where
14614 S: serde::ser::Serializer,
14615 {
14616 use serde::ser::SerializeMap;
14617 #[allow(unused_imports)]
14618 use std::option::Option::Some;
14619 let mut state = serializer.serialize_map(std::option::Option::None)?;
14620 if !self.parent.is_empty() {
14621 state.serialize_entry("parent", &self.parent)?;
14622 }
14623 if self.release_config.is_some() {
14624 state.serialize_entry("releaseConfig", &self.release_config)?;
14625 }
14626 if !self.release_config_id.is_empty() {
14627 state.serialize_entry("releaseConfigId", &self.release_config_id)?;
14628 }
14629 if !self._unknown_fields.is_empty() {
14630 for (key, value) in self._unknown_fields.iter() {
14631 state.serialize_entry(key, &value)?;
14632 }
14633 }
14634 state.end()
14635 }
14636}
14637
14638#[derive(Clone, Debug, Default, PartialEq)]
14640#[non_exhaustive]
14641pub struct UpdateReleaseConfigRequest {
14642 pub update_mask: std::option::Option<wkt::FieldMask>,
14645
14646 pub release_config: std::option::Option<crate::model::ReleaseConfig>,
14648
14649 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14650}
14651
14652impl UpdateReleaseConfigRequest {
14653 pub fn new() -> Self {
14654 std::default::Default::default()
14655 }
14656
14657 pub fn set_update_mask<T>(mut self, v: T) -> Self
14659 where
14660 T: std::convert::Into<wkt::FieldMask>,
14661 {
14662 self.update_mask = std::option::Option::Some(v.into());
14663 self
14664 }
14665
14666 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14668 where
14669 T: std::convert::Into<wkt::FieldMask>,
14670 {
14671 self.update_mask = v.map(|x| x.into());
14672 self
14673 }
14674
14675 pub fn set_release_config<T>(mut self, v: T) -> Self
14677 where
14678 T: std::convert::Into<crate::model::ReleaseConfig>,
14679 {
14680 self.release_config = std::option::Option::Some(v.into());
14681 self
14682 }
14683
14684 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
14686 where
14687 T: std::convert::Into<crate::model::ReleaseConfig>,
14688 {
14689 self.release_config = v.map(|x| x.into());
14690 self
14691 }
14692}
14693
14694impl wkt::message::Message for UpdateReleaseConfigRequest {
14695 fn typename() -> &'static str {
14696 "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
14697 }
14698}
14699
14700#[doc(hidden)]
14701impl<'de> serde::de::Deserialize<'de> for UpdateReleaseConfigRequest {
14702 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14703 where
14704 D: serde::Deserializer<'de>,
14705 {
14706 #[allow(non_camel_case_types)]
14707 #[doc(hidden)]
14708 #[derive(PartialEq, Eq, Hash)]
14709 enum __FieldTag {
14710 __update_mask,
14711 __release_config,
14712 Unknown(std::string::String),
14713 }
14714 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14715 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14716 where
14717 D: serde::Deserializer<'de>,
14718 {
14719 struct Visitor;
14720 impl<'de> serde::de::Visitor<'de> for Visitor {
14721 type Value = __FieldTag;
14722 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14723 formatter.write_str("a field name for UpdateReleaseConfigRequest")
14724 }
14725 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14726 where
14727 E: serde::de::Error,
14728 {
14729 use std::result::Result::Ok;
14730 use std::string::ToString;
14731 match value {
14732 "updateMask" => Ok(__FieldTag::__update_mask),
14733 "update_mask" => Ok(__FieldTag::__update_mask),
14734 "releaseConfig" => Ok(__FieldTag::__release_config),
14735 "release_config" => Ok(__FieldTag::__release_config),
14736 _ => Ok(__FieldTag::Unknown(value.to_string())),
14737 }
14738 }
14739 }
14740 deserializer.deserialize_identifier(Visitor)
14741 }
14742 }
14743 struct Visitor;
14744 impl<'de> serde::de::Visitor<'de> for Visitor {
14745 type Value = UpdateReleaseConfigRequest;
14746 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14747 formatter.write_str("struct UpdateReleaseConfigRequest")
14748 }
14749 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14750 where
14751 A: serde::de::MapAccess<'de>,
14752 {
14753 #[allow(unused_imports)]
14754 use serde::de::Error;
14755 use std::option::Option::Some;
14756 let mut fields = std::collections::HashSet::new();
14757 let mut result = Self::Value::new();
14758 while let Some(tag) = map.next_key::<__FieldTag>()? {
14759 #[allow(clippy::match_single_binding)]
14760 match tag {
14761 __FieldTag::__update_mask => {
14762 if !fields.insert(__FieldTag::__update_mask) {
14763 return std::result::Result::Err(A::Error::duplicate_field(
14764 "multiple values for update_mask",
14765 ));
14766 }
14767 result.update_mask =
14768 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
14769 }
14770 __FieldTag::__release_config => {
14771 if !fields.insert(__FieldTag::__release_config) {
14772 return std::result::Result::Err(A::Error::duplicate_field(
14773 "multiple values for release_config",
14774 ));
14775 }
14776 result.release_config = map
14777 .next_value::<std::option::Option<crate::model::ReleaseConfig>>()?;
14778 }
14779 __FieldTag::Unknown(key) => {
14780 let value = map.next_value::<serde_json::Value>()?;
14781 result._unknown_fields.insert(key, value);
14782 }
14783 }
14784 }
14785 std::result::Result::Ok(result)
14786 }
14787 }
14788 deserializer.deserialize_any(Visitor)
14789 }
14790}
14791
14792#[doc(hidden)]
14793impl serde::ser::Serialize for UpdateReleaseConfigRequest {
14794 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14795 where
14796 S: serde::ser::Serializer,
14797 {
14798 use serde::ser::SerializeMap;
14799 #[allow(unused_imports)]
14800 use std::option::Option::Some;
14801 let mut state = serializer.serialize_map(std::option::Option::None)?;
14802 if self.update_mask.is_some() {
14803 state.serialize_entry("updateMask", &self.update_mask)?;
14804 }
14805 if self.release_config.is_some() {
14806 state.serialize_entry("releaseConfig", &self.release_config)?;
14807 }
14808 if !self._unknown_fields.is_empty() {
14809 for (key, value) in self._unknown_fields.iter() {
14810 state.serialize_entry(key, &value)?;
14811 }
14812 }
14813 state.end()
14814 }
14815}
14816
14817#[derive(Clone, Debug, Default, PartialEq)]
14819#[non_exhaustive]
14820pub struct DeleteReleaseConfigRequest {
14821 pub name: std::string::String,
14823
14824 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14825}
14826
14827impl DeleteReleaseConfigRequest {
14828 pub fn new() -> Self {
14829 std::default::Default::default()
14830 }
14831
14832 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14834 self.name = v.into();
14835 self
14836 }
14837}
14838
14839impl wkt::message::Message for DeleteReleaseConfigRequest {
14840 fn typename() -> &'static str {
14841 "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
14842 }
14843}
14844
14845#[doc(hidden)]
14846impl<'de> serde::de::Deserialize<'de> for DeleteReleaseConfigRequest {
14847 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14848 where
14849 D: serde::Deserializer<'de>,
14850 {
14851 #[allow(non_camel_case_types)]
14852 #[doc(hidden)]
14853 #[derive(PartialEq, Eq, Hash)]
14854 enum __FieldTag {
14855 __name,
14856 Unknown(std::string::String),
14857 }
14858 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14859 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14860 where
14861 D: serde::Deserializer<'de>,
14862 {
14863 struct Visitor;
14864 impl<'de> serde::de::Visitor<'de> for Visitor {
14865 type Value = __FieldTag;
14866 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14867 formatter.write_str("a field name for DeleteReleaseConfigRequest")
14868 }
14869 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14870 where
14871 E: serde::de::Error,
14872 {
14873 use std::result::Result::Ok;
14874 use std::string::ToString;
14875 match value {
14876 "name" => Ok(__FieldTag::__name),
14877 _ => Ok(__FieldTag::Unknown(value.to_string())),
14878 }
14879 }
14880 }
14881 deserializer.deserialize_identifier(Visitor)
14882 }
14883 }
14884 struct Visitor;
14885 impl<'de> serde::de::Visitor<'de> for Visitor {
14886 type Value = DeleteReleaseConfigRequest;
14887 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14888 formatter.write_str("struct DeleteReleaseConfigRequest")
14889 }
14890 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14891 where
14892 A: serde::de::MapAccess<'de>,
14893 {
14894 #[allow(unused_imports)]
14895 use serde::de::Error;
14896 use std::option::Option::Some;
14897 let mut fields = std::collections::HashSet::new();
14898 let mut result = Self::Value::new();
14899 while let Some(tag) = map.next_key::<__FieldTag>()? {
14900 #[allow(clippy::match_single_binding)]
14901 match tag {
14902 __FieldTag::__name => {
14903 if !fields.insert(__FieldTag::__name) {
14904 return std::result::Result::Err(A::Error::duplicate_field(
14905 "multiple values for name",
14906 ));
14907 }
14908 result.name = map
14909 .next_value::<std::option::Option<std::string::String>>()?
14910 .unwrap_or_default();
14911 }
14912 __FieldTag::Unknown(key) => {
14913 let value = map.next_value::<serde_json::Value>()?;
14914 result._unknown_fields.insert(key, value);
14915 }
14916 }
14917 }
14918 std::result::Result::Ok(result)
14919 }
14920 }
14921 deserializer.deserialize_any(Visitor)
14922 }
14923}
14924
14925#[doc(hidden)]
14926impl serde::ser::Serialize for DeleteReleaseConfigRequest {
14927 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14928 where
14929 S: serde::ser::Serializer,
14930 {
14931 use serde::ser::SerializeMap;
14932 #[allow(unused_imports)]
14933 use std::option::Option::Some;
14934 let mut state = serializer.serialize_map(std::option::Option::None)?;
14935 if !self.name.is_empty() {
14936 state.serialize_entry("name", &self.name)?;
14937 }
14938 if !self._unknown_fields.is_empty() {
14939 for (key, value) in self._unknown_fields.iter() {
14940 state.serialize_entry(key, &value)?;
14941 }
14942 }
14943 state.end()
14944 }
14945}
14946
14947#[derive(Clone, Debug, Default, PartialEq)]
14949#[non_exhaustive]
14950pub struct CompilationResult {
14951 pub name: std::string::String,
14953
14954 pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
14957
14958 pub resolved_git_commit_sha: std::string::String,
14961
14962 pub dataform_core_version: std::string::String,
14964
14965 pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
14967
14968 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
14970
14971 pub create_time: std::option::Option<wkt::Timestamp>,
14973
14974 pub internal_metadata: std::option::Option<std::string::String>,
14978
14979 pub source: std::option::Option<crate::model::compilation_result::Source>,
14981
14982 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14983}
14984
14985impl CompilationResult {
14986 pub fn new() -> Self {
14987 std::default::Default::default()
14988 }
14989
14990 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14992 self.name = v.into();
14993 self
14994 }
14995
14996 pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
14998 where
14999 T: std::convert::Into<crate::model::CodeCompilationConfig>,
15000 {
15001 self.code_compilation_config = std::option::Option::Some(v.into());
15002 self
15003 }
15004
15005 pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
15007 where
15008 T: std::convert::Into<crate::model::CodeCompilationConfig>,
15009 {
15010 self.code_compilation_config = v.map(|x| x.into());
15011 self
15012 }
15013
15014 pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
15016 mut self,
15017 v: T,
15018 ) -> Self {
15019 self.resolved_git_commit_sha = v.into();
15020 self
15021 }
15022
15023 pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
15025 mut self,
15026 v: T,
15027 ) -> Self {
15028 self.dataform_core_version = v.into();
15029 self
15030 }
15031
15032 pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
15034 where
15035 T: std::iter::IntoIterator<Item = V>,
15036 V: std::convert::Into<crate::model::compilation_result::CompilationError>,
15037 {
15038 use std::iter::Iterator;
15039 self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
15040 self
15041 }
15042
15043 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
15045 where
15046 T: std::convert::Into<crate::model::DataEncryptionState>,
15047 {
15048 self.data_encryption_state = std::option::Option::Some(v.into());
15049 self
15050 }
15051
15052 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
15054 where
15055 T: std::convert::Into<crate::model::DataEncryptionState>,
15056 {
15057 self.data_encryption_state = v.map(|x| x.into());
15058 self
15059 }
15060
15061 pub fn set_create_time<T>(mut self, v: T) -> Self
15063 where
15064 T: std::convert::Into<wkt::Timestamp>,
15065 {
15066 self.create_time = std::option::Option::Some(v.into());
15067 self
15068 }
15069
15070 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15072 where
15073 T: std::convert::Into<wkt::Timestamp>,
15074 {
15075 self.create_time = v.map(|x| x.into());
15076 self
15077 }
15078
15079 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
15081 where
15082 T: std::convert::Into<std::string::String>,
15083 {
15084 self.internal_metadata = std::option::Option::Some(v.into());
15085 self
15086 }
15087
15088 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
15090 where
15091 T: std::convert::Into<std::string::String>,
15092 {
15093 self.internal_metadata = v.map(|x| x.into());
15094 self
15095 }
15096
15097 pub fn set_source<
15102 T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
15103 >(
15104 mut self,
15105 v: T,
15106 ) -> Self {
15107 self.source = v.into();
15108 self
15109 }
15110
15111 pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
15115 #[allow(unreachable_patterns)]
15116 self.source.as_ref().and_then(|v| match v {
15117 crate::model::compilation_result::Source::GitCommitish(v) => {
15118 std::option::Option::Some(v)
15119 }
15120 _ => std::option::Option::None,
15121 })
15122 }
15123
15124 pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15130 self.source = std::option::Option::Some(
15131 crate::model::compilation_result::Source::GitCommitish(v.into()),
15132 );
15133 self
15134 }
15135
15136 pub fn workspace(&self) -> std::option::Option<&std::string::String> {
15140 #[allow(unreachable_patterns)]
15141 self.source.as_ref().and_then(|v| match v {
15142 crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
15143 _ => std::option::Option::None,
15144 })
15145 }
15146
15147 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15153 self.source = std::option::Option::Some(
15154 crate::model::compilation_result::Source::Workspace(v.into()),
15155 );
15156 self
15157 }
15158
15159 pub fn release_config(&self) -> std::option::Option<&std::string::String> {
15163 #[allow(unreachable_patterns)]
15164 self.source.as_ref().and_then(|v| match v {
15165 crate::model::compilation_result::Source::ReleaseConfig(v) => {
15166 std::option::Option::Some(v)
15167 }
15168 _ => std::option::Option::None,
15169 })
15170 }
15171
15172 pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15178 self.source = std::option::Option::Some(
15179 crate::model::compilation_result::Source::ReleaseConfig(v.into()),
15180 );
15181 self
15182 }
15183}
15184
15185impl wkt::message::Message for CompilationResult {
15186 fn typename() -> &'static str {
15187 "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
15188 }
15189}
15190
15191#[doc(hidden)]
15192impl<'de> serde::de::Deserialize<'de> for CompilationResult {
15193 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15194 where
15195 D: serde::Deserializer<'de>,
15196 {
15197 #[allow(non_camel_case_types)]
15198 #[doc(hidden)]
15199 #[derive(PartialEq, Eq, Hash)]
15200 enum __FieldTag {
15201 __git_commitish,
15202 __workspace,
15203 __release_config,
15204 __name,
15205 __code_compilation_config,
15206 __resolved_git_commit_sha,
15207 __dataform_core_version,
15208 __compilation_errors,
15209 __data_encryption_state,
15210 __create_time,
15211 __internal_metadata,
15212 Unknown(std::string::String),
15213 }
15214 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15215 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15216 where
15217 D: serde::Deserializer<'de>,
15218 {
15219 struct Visitor;
15220 impl<'de> serde::de::Visitor<'de> for Visitor {
15221 type Value = __FieldTag;
15222 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15223 formatter.write_str("a field name for CompilationResult")
15224 }
15225 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15226 where
15227 E: serde::de::Error,
15228 {
15229 use std::result::Result::Ok;
15230 use std::string::ToString;
15231 match value {
15232 "gitCommitish" => Ok(__FieldTag::__git_commitish),
15233 "git_commitish" => Ok(__FieldTag::__git_commitish),
15234 "workspace" => Ok(__FieldTag::__workspace),
15235 "releaseConfig" => Ok(__FieldTag::__release_config),
15236 "release_config" => Ok(__FieldTag::__release_config),
15237 "name" => Ok(__FieldTag::__name),
15238 "codeCompilationConfig" => Ok(__FieldTag::__code_compilation_config),
15239 "code_compilation_config" => Ok(__FieldTag::__code_compilation_config),
15240 "resolvedGitCommitSha" => Ok(__FieldTag::__resolved_git_commit_sha),
15241 "resolved_git_commit_sha" => Ok(__FieldTag::__resolved_git_commit_sha),
15242 "dataformCoreVersion" => Ok(__FieldTag::__dataform_core_version),
15243 "dataform_core_version" => Ok(__FieldTag::__dataform_core_version),
15244 "compilationErrors" => Ok(__FieldTag::__compilation_errors),
15245 "compilation_errors" => Ok(__FieldTag::__compilation_errors),
15246 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
15247 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
15248 "createTime" => Ok(__FieldTag::__create_time),
15249 "create_time" => Ok(__FieldTag::__create_time),
15250 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
15251 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
15252 _ => Ok(__FieldTag::Unknown(value.to_string())),
15253 }
15254 }
15255 }
15256 deserializer.deserialize_identifier(Visitor)
15257 }
15258 }
15259 struct Visitor;
15260 impl<'de> serde::de::Visitor<'de> for Visitor {
15261 type Value = CompilationResult;
15262 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15263 formatter.write_str("struct CompilationResult")
15264 }
15265 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15266 where
15267 A: serde::de::MapAccess<'de>,
15268 {
15269 #[allow(unused_imports)]
15270 use serde::de::Error;
15271 use std::option::Option::Some;
15272 let mut fields = std::collections::HashSet::new();
15273 let mut result = Self::Value::new();
15274 while let Some(tag) = map.next_key::<__FieldTag>()? {
15275 #[allow(clippy::match_single_binding)]
15276 match tag {
15277 __FieldTag::__git_commitish => {
15278 if !fields.insert(__FieldTag::__git_commitish) {
15279 return std::result::Result::Err(A::Error::duplicate_field(
15280 "multiple values for git_commitish",
15281 ));
15282 }
15283 if result.source.is_some() {
15284 return std::result::Result::Err(A::Error::duplicate_field(
15285 "multiple values for `source`, a oneof with full ID .google.cloud.dataform.v1.CompilationResult.git_commitish, latest field was gitCommitish",
15286 ));
15287 }
15288 result.source = std::option::Option::Some(
15289 crate::model::compilation_result::Source::GitCommitish(
15290 map.next_value::<std::option::Option<std::string::String>>()?
15291 .unwrap_or_default(),
15292 ),
15293 );
15294 }
15295 __FieldTag::__workspace => {
15296 if !fields.insert(__FieldTag::__workspace) {
15297 return std::result::Result::Err(A::Error::duplicate_field(
15298 "multiple values for workspace",
15299 ));
15300 }
15301 if result.source.is_some() {
15302 return std::result::Result::Err(A::Error::duplicate_field(
15303 "multiple values for `source`, a oneof with full ID .google.cloud.dataform.v1.CompilationResult.workspace, latest field was workspace",
15304 ));
15305 }
15306 result.source = std::option::Option::Some(
15307 crate::model::compilation_result::Source::Workspace(
15308 map.next_value::<std::option::Option<std::string::String>>()?
15309 .unwrap_or_default(),
15310 ),
15311 );
15312 }
15313 __FieldTag::__release_config => {
15314 if !fields.insert(__FieldTag::__release_config) {
15315 return std::result::Result::Err(A::Error::duplicate_field(
15316 "multiple values for release_config",
15317 ));
15318 }
15319 if result.source.is_some() {
15320 return std::result::Result::Err(A::Error::duplicate_field(
15321 "multiple values for `source`, a oneof with full ID .google.cloud.dataform.v1.CompilationResult.release_config, latest field was releaseConfig",
15322 ));
15323 }
15324 result.source = std::option::Option::Some(
15325 crate::model::compilation_result::Source::ReleaseConfig(
15326 map.next_value::<std::option::Option<std::string::String>>()?
15327 .unwrap_or_default(),
15328 ),
15329 );
15330 }
15331 __FieldTag::__name => {
15332 if !fields.insert(__FieldTag::__name) {
15333 return std::result::Result::Err(A::Error::duplicate_field(
15334 "multiple values for name",
15335 ));
15336 }
15337 result.name = map
15338 .next_value::<std::option::Option<std::string::String>>()?
15339 .unwrap_or_default();
15340 }
15341 __FieldTag::__code_compilation_config => {
15342 if !fields.insert(__FieldTag::__code_compilation_config) {
15343 return std::result::Result::Err(A::Error::duplicate_field(
15344 "multiple values for code_compilation_config",
15345 ));
15346 }
15347 result.code_compilation_config = map.next_value::<std::option::Option<crate::model::CodeCompilationConfig>>()?
15348 ;
15349 }
15350 __FieldTag::__resolved_git_commit_sha => {
15351 if !fields.insert(__FieldTag::__resolved_git_commit_sha) {
15352 return std::result::Result::Err(A::Error::duplicate_field(
15353 "multiple values for resolved_git_commit_sha",
15354 ));
15355 }
15356 result.resolved_git_commit_sha = map
15357 .next_value::<std::option::Option<std::string::String>>()?
15358 .unwrap_or_default();
15359 }
15360 __FieldTag::__dataform_core_version => {
15361 if !fields.insert(__FieldTag::__dataform_core_version) {
15362 return std::result::Result::Err(A::Error::duplicate_field(
15363 "multiple values for dataform_core_version",
15364 ));
15365 }
15366 result.dataform_core_version = map
15367 .next_value::<std::option::Option<std::string::String>>()?
15368 .unwrap_or_default();
15369 }
15370 __FieldTag::__compilation_errors => {
15371 if !fields.insert(__FieldTag::__compilation_errors) {
15372 return std::result::Result::Err(A::Error::duplicate_field(
15373 "multiple values for compilation_errors",
15374 ));
15375 }
15376 result.compilation_errors = map
15377 .next_value::<std::option::Option<
15378 std::vec::Vec<
15379 crate::model::compilation_result::CompilationError,
15380 >,
15381 >>()?
15382 .unwrap_or_default();
15383 }
15384 __FieldTag::__data_encryption_state => {
15385 if !fields.insert(__FieldTag::__data_encryption_state) {
15386 return std::result::Result::Err(A::Error::duplicate_field(
15387 "multiple values for data_encryption_state",
15388 ));
15389 }
15390 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
15391 ;
15392 }
15393 __FieldTag::__create_time => {
15394 if !fields.insert(__FieldTag::__create_time) {
15395 return std::result::Result::Err(A::Error::duplicate_field(
15396 "multiple values for create_time",
15397 ));
15398 }
15399 result.create_time =
15400 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
15401 }
15402 __FieldTag::__internal_metadata => {
15403 if !fields.insert(__FieldTag::__internal_metadata) {
15404 return std::result::Result::Err(A::Error::duplicate_field(
15405 "multiple values for internal_metadata",
15406 ));
15407 }
15408 result.internal_metadata =
15409 map.next_value::<std::option::Option<std::string::String>>()?;
15410 }
15411 __FieldTag::Unknown(key) => {
15412 let value = map.next_value::<serde_json::Value>()?;
15413 result._unknown_fields.insert(key, value);
15414 }
15415 }
15416 }
15417 std::result::Result::Ok(result)
15418 }
15419 }
15420 deserializer.deserialize_any(Visitor)
15421 }
15422}
15423
15424#[doc(hidden)]
15425impl serde::ser::Serialize for CompilationResult {
15426 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15427 where
15428 S: serde::ser::Serializer,
15429 {
15430 use serde::ser::SerializeMap;
15431 #[allow(unused_imports)]
15432 use std::option::Option::Some;
15433 let mut state = serializer.serialize_map(std::option::Option::None)?;
15434 if let Some(value) = self.git_commitish() {
15435 state.serialize_entry("gitCommitish", value)?;
15436 }
15437 if let Some(value) = self.workspace() {
15438 state.serialize_entry("workspace", value)?;
15439 }
15440 if let Some(value) = self.release_config() {
15441 state.serialize_entry("releaseConfig", value)?;
15442 }
15443 if !self.name.is_empty() {
15444 state.serialize_entry("name", &self.name)?;
15445 }
15446 if self.code_compilation_config.is_some() {
15447 state.serialize_entry("codeCompilationConfig", &self.code_compilation_config)?;
15448 }
15449 if !self.resolved_git_commit_sha.is_empty() {
15450 state.serialize_entry("resolvedGitCommitSha", &self.resolved_git_commit_sha)?;
15451 }
15452 if !self.dataform_core_version.is_empty() {
15453 state.serialize_entry("dataformCoreVersion", &self.dataform_core_version)?;
15454 }
15455 if !self.compilation_errors.is_empty() {
15456 state.serialize_entry("compilationErrors", &self.compilation_errors)?;
15457 }
15458 if self.data_encryption_state.is_some() {
15459 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
15460 }
15461 if self.create_time.is_some() {
15462 state.serialize_entry("createTime", &self.create_time)?;
15463 }
15464 if self.internal_metadata.is_some() {
15465 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
15466 }
15467 if !self._unknown_fields.is_empty() {
15468 for (key, value) in self._unknown_fields.iter() {
15469 state.serialize_entry(key, &value)?;
15470 }
15471 }
15472 state.end()
15473 }
15474}
15475
15476pub mod compilation_result {
15478 #[allow(unused_imports)]
15479 use super::*;
15480
15481 #[derive(Clone, Debug, Default, PartialEq)]
15483 #[non_exhaustive]
15484 pub struct CompilationError {
15485 pub message: std::string::String,
15487
15488 pub stack: std::string::String,
15490
15491 pub path: std::string::String,
15494
15495 pub action_target: std::option::Option<crate::model::Target>,
15498
15499 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15500 }
15501
15502 impl CompilationError {
15503 pub fn new() -> Self {
15504 std::default::Default::default()
15505 }
15506
15507 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15509 self.message = v.into();
15510 self
15511 }
15512
15513 pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15515 self.stack = v.into();
15516 self
15517 }
15518
15519 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15521 self.path = v.into();
15522 self
15523 }
15524
15525 pub fn set_action_target<T>(mut self, v: T) -> Self
15527 where
15528 T: std::convert::Into<crate::model::Target>,
15529 {
15530 self.action_target = std::option::Option::Some(v.into());
15531 self
15532 }
15533
15534 pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
15536 where
15537 T: std::convert::Into<crate::model::Target>,
15538 {
15539 self.action_target = v.map(|x| x.into());
15540 self
15541 }
15542 }
15543
15544 impl wkt::message::Message for CompilationError {
15545 fn typename() -> &'static str {
15546 "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
15547 }
15548 }
15549
15550 #[doc(hidden)]
15551 impl<'de> serde::de::Deserialize<'de> for CompilationError {
15552 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15553 where
15554 D: serde::Deserializer<'de>,
15555 {
15556 #[allow(non_camel_case_types)]
15557 #[doc(hidden)]
15558 #[derive(PartialEq, Eq, Hash)]
15559 enum __FieldTag {
15560 __message,
15561 __stack,
15562 __path,
15563 __action_target,
15564 Unknown(std::string::String),
15565 }
15566 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15567 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15568 where
15569 D: serde::Deserializer<'de>,
15570 {
15571 struct Visitor;
15572 impl<'de> serde::de::Visitor<'de> for Visitor {
15573 type Value = __FieldTag;
15574 fn expecting(
15575 &self,
15576 formatter: &mut std::fmt::Formatter,
15577 ) -> std::fmt::Result {
15578 formatter.write_str("a field name for CompilationError")
15579 }
15580 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15581 where
15582 E: serde::de::Error,
15583 {
15584 use std::result::Result::Ok;
15585 use std::string::ToString;
15586 match value {
15587 "message" => Ok(__FieldTag::__message),
15588 "stack" => Ok(__FieldTag::__stack),
15589 "path" => Ok(__FieldTag::__path),
15590 "actionTarget" => Ok(__FieldTag::__action_target),
15591 "action_target" => Ok(__FieldTag::__action_target),
15592 _ => Ok(__FieldTag::Unknown(value.to_string())),
15593 }
15594 }
15595 }
15596 deserializer.deserialize_identifier(Visitor)
15597 }
15598 }
15599 struct Visitor;
15600 impl<'de> serde::de::Visitor<'de> for Visitor {
15601 type Value = CompilationError;
15602 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15603 formatter.write_str("struct CompilationError")
15604 }
15605 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15606 where
15607 A: serde::de::MapAccess<'de>,
15608 {
15609 #[allow(unused_imports)]
15610 use serde::de::Error;
15611 use std::option::Option::Some;
15612 let mut fields = std::collections::HashSet::new();
15613 let mut result = Self::Value::new();
15614 while let Some(tag) = map.next_key::<__FieldTag>()? {
15615 #[allow(clippy::match_single_binding)]
15616 match tag {
15617 __FieldTag::__message => {
15618 if !fields.insert(__FieldTag::__message) {
15619 return std::result::Result::Err(A::Error::duplicate_field(
15620 "multiple values for message",
15621 ));
15622 }
15623 result.message = map
15624 .next_value::<std::option::Option<std::string::String>>()?
15625 .unwrap_or_default();
15626 }
15627 __FieldTag::__stack => {
15628 if !fields.insert(__FieldTag::__stack) {
15629 return std::result::Result::Err(A::Error::duplicate_field(
15630 "multiple values for stack",
15631 ));
15632 }
15633 result.stack = map
15634 .next_value::<std::option::Option<std::string::String>>()?
15635 .unwrap_or_default();
15636 }
15637 __FieldTag::__path => {
15638 if !fields.insert(__FieldTag::__path) {
15639 return std::result::Result::Err(A::Error::duplicate_field(
15640 "multiple values for path",
15641 ));
15642 }
15643 result.path = map
15644 .next_value::<std::option::Option<std::string::String>>()?
15645 .unwrap_or_default();
15646 }
15647 __FieldTag::__action_target => {
15648 if !fields.insert(__FieldTag::__action_target) {
15649 return std::result::Result::Err(A::Error::duplicate_field(
15650 "multiple values for action_target",
15651 ));
15652 }
15653 result.action_target =
15654 map.next_value::<std::option::Option<crate::model::Target>>()?;
15655 }
15656 __FieldTag::Unknown(key) => {
15657 let value = map.next_value::<serde_json::Value>()?;
15658 result._unknown_fields.insert(key, value);
15659 }
15660 }
15661 }
15662 std::result::Result::Ok(result)
15663 }
15664 }
15665 deserializer.deserialize_any(Visitor)
15666 }
15667 }
15668
15669 #[doc(hidden)]
15670 impl serde::ser::Serialize for CompilationError {
15671 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15672 where
15673 S: serde::ser::Serializer,
15674 {
15675 use serde::ser::SerializeMap;
15676 #[allow(unused_imports)]
15677 use std::option::Option::Some;
15678 let mut state = serializer.serialize_map(std::option::Option::None)?;
15679 if !self.message.is_empty() {
15680 state.serialize_entry("message", &self.message)?;
15681 }
15682 if !self.stack.is_empty() {
15683 state.serialize_entry("stack", &self.stack)?;
15684 }
15685 if !self.path.is_empty() {
15686 state.serialize_entry("path", &self.path)?;
15687 }
15688 if self.action_target.is_some() {
15689 state.serialize_entry("actionTarget", &self.action_target)?;
15690 }
15691 if !self._unknown_fields.is_empty() {
15692 for (key, value) in self._unknown_fields.iter() {
15693 state.serialize_entry(key, &value)?;
15694 }
15695 }
15696 state.end()
15697 }
15698 }
15699
15700 #[derive(Clone, Debug, PartialEq)]
15702 #[non_exhaustive]
15703 pub enum Source {
15704 GitCommitish(std::string::String),
15711 Workspace(std::string::String),
15714 ReleaseConfig(std::string::String),
15717 }
15718}
15719
15720#[derive(Clone, Debug, Default, PartialEq)]
15722#[non_exhaustive]
15723pub struct CodeCompilationConfig {
15724 pub default_database: std::string::String,
15726
15727 pub default_schema: std::string::String,
15729
15730 pub default_location: std::string::String,
15734
15735 pub assertion_schema: std::string::String,
15737
15738 pub vars: std::collections::HashMap<std::string::String, std::string::String>,
15741
15742 pub database_suffix: std::string::String,
15745
15746 pub schema_suffix: std::string::String,
15749
15750 pub table_prefix: std::string::String,
15752
15753 pub builtin_assertion_name_prefix: std::string::String,
15755
15756 pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
15758
15759 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15760}
15761
15762impl CodeCompilationConfig {
15763 pub fn new() -> Self {
15764 std::default::Default::default()
15765 }
15766
15767 pub fn set_default_database<T: std::convert::Into<std::string::String>>(
15769 mut self,
15770 v: T,
15771 ) -> Self {
15772 self.default_database = v.into();
15773 self
15774 }
15775
15776 pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15778 self.default_schema = v.into();
15779 self
15780 }
15781
15782 pub fn set_default_location<T: std::convert::Into<std::string::String>>(
15784 mut self,
15785 v: T,
15786 ) -> Self {
15787 self.default_location = v.into();
15788 self
15789 }
15790
15791 pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
15793 mut self,
15794 v: T,
15795 ) -> Self {
15796 self.assertion_schema = v.into();
15797 self
15798 }
15799
15800 pub fn set_vars<T, K, V>(mut self, v: T) -> Self
15802 where
15803 T: std::iter::IntoIterator<Item = (K, V)>,
15804 K: std::convert::Into<std::string::String>,
15805 V: std::convert::Into<std::string::String>,
15806 {
15807 use std::iter::Iterator;
15808 self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
15809 self
15810 }
15811
15812 pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15814 self.database_suffix = v.into();
15815 self
15816 }
15817
15818 pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15820 self.schema_suffix = v.into();
15821 self
15822 }
15823
15824 pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15826 self.table_prefix = v.into();
15827 self
15828 }
15829
15830 pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
15832 mut self,
15833 v: T,
15834 ) -> Self {
15835 self.builtin_assertion_name_prefix = v.into();
15836 self
15837 }
15838
15839 pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
15841 where
15842 T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
15843 {
15844 self.default_notebook_runtime_options = std::option::Option::Some(v.into());
15845 self
15846 }
15847
15848 pub fn set_or_clear_default_notebook_runtime_options<T>(
15850 mut self,
15851 v: std::option::Option<T>,
15852 ) -> Self
15853 where
15854 T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
15855 {
15856 self.default_notebook_runtime_options = v.map(|x| x.into());
15857 self
15858 }
15859}
15860
15861impl wkt::message::Message for CodeCompilationConfig {
15862 fn typename() -> &'static str {
15863 "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
15864 }
15865}
15866
15867#[doc(hidden)]
15868impl<'de> serde::de::Deserialize<'de> for CodeCompilationConfig {
15869 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15870 where
15871 D: serde::Deserializer<'de>,
15872 {
15873 #[allow(non_camel_case_types)]
15874 #[doc(hidden)]
15875 #[derive(PartialEq, Eq, Hash)]
15876 enum __FieldTag {
15877 __default_database,
15878 __default_schema,
15879 __default_location,
15880 __assertion_schema,
15881 __vars,
15882 __database_suffix,
15883 __schema_suffix,
15884 __table_prefix,
15885 __builtin_assertion_name_prefix,
15886 __default_notebook_runtime_options,
15887 Unknown(std::string::String),
15888 }
15889 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15890 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15891 where
15892 D: serde::Deserializer<'de>,
15893 {
15894 struct Visitor;
15895 impl<'de> serde::de::Visitor<'de> for Visitor {
15896 type Value = __FieldTag;
15897 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15898 formatter.write_str("a field name for CodeCompilationConfig")
15899 }
15900 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15901 where
15902 E: serde::de::Error,
15903 {
15904 use std::result::Result::Ok;
15905 use std::string::ToString;
15906 match value {
15907 "defaultDatabase" => Ok(__FieldTag::__default_database),
15908 "default_database" => Ok(__FieldTag::__default_database),
15909 "defaultSchema" => Ok(__FieldTag::__default_schema),
15910 "default_schema" => Ok(__FieldTag::__default_schema),
15911 "defaultLocation" => Ok(__FieldTag::__default_location),
15912 "default_location" => Ok(__FieldTag::__default_location),
15913 "assertionSchema" => Ok(__FieldTag::__assertion_schema),
15914 "assertion_schema" => Ok(__FieldTag::__assertion_schema),
15915 "vars" => Ok(__FieldTag::__vars),
15916 "databaseSuffix" => Ok(__FieldTag::__database_suffix),
15917 "database_suffix" => Ok(__FieldTag::__database_suffix),
15918 "schemaSuffix" => Ok(__FieldTag::__schema_suffix),
15919 "schema_suffix" => Ok(__FieldTag::__schema_suffix),
15920 "tablePrefix" => Ok(__FieldTag::__table_prefix),
15921 "table_prefix" => Ok(__FieldTag::__table_prefix),
15922 "builtinAssertionNamePrefix" => {
15923 Ok(__FieldTag::__builtin_assertion_name_prefix)
15924 }
15925 "builtin_assertion_name_prefix" => {
15926 Ok(__FieldTag::__builtin_assertion_name_prefix)
15927 }
15928 "defaultNotebookRuntimeOptions" => {
15929 Ok(__FieldTag::__default_notebook_runtime_options)
15930 }
15931 "default_notebook_runtime_options" => {
15932 Ok(__FieldTag::__default_notebook_runtime_options)
15933 }
15934 _ => Ok(__FieldTag::Unknown(value.to_string())),
15935 }
15936 }
15937 }
15938 deserializer.deserialize_identifier(Visitor)
15939 }
15940 }
15941 struct Visitor;
15942 impl<'de> serde::de::Visitor<'de> for Visitor {
15943 type Value = CodeCompilationConfig;
15944 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15945 formatter.write_str("struct CodeCompilationConfig")
15946 }
15947 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15948 where
15949 A: serde::de::MapAccess<'de>,
15950 {
15951 #[allow(unused_imports)]
15952 use serde::de::Error;
15953 use std::option::Option::Some;
15954 let mut fields = std::collections::HashSet::new();
15955 let mut result = Self::Value::new();
15956 while let Some(tag) = map.next_key::<__FieldTag>()? {
15957 #[allow(clippy::match_single_binding)]
15958 match tag {
15959 __FieldTag::__default_database => {
15960 if !fields.insert(__FieldTag::__default_database) {
15961 return std::result::Result::Err(A::Error::duplicate_field(
15962 "multiple values for default_database",
15963 ));
15964 }
15965 result.default_database = map
15966 .next_value::<std::option::Option<std::string::String>>()?
15967 .unwrap_or_default();
15968 }
15969 __FieldTag::__default_schema => {
15970 if !fields.insert(__FieldTag::__default_schema) {
15971 return std::result::Result::Err(A::Error::duplicate_field(
15972 "multiple values for default_schema",
15973 ));
15974 }
15975 result.default_schema = map
15976 .next_value::<std::option::Option<std::string::String>>()?
15977 .unwrap_or_default();
15978 }
15979 __FieldTag::__default_location => {
15980 if !fields.insert(__FieldTag::__default_location) {
15981 return std::result::Result::Err(A::Error::duplicate_field(
15982 "multiple values for default_location",
15983 ));
15984 }
15985 result.default_location = map
15986 .next_value::<std::option::Option<std::string::String>>()?
15987 .unwrap_or_default();
15988 }
15989 __FieldTag::__assertion_schema => {
15990 if !fields.insert(__FieldTag::__assertion_schema) {
15991 return std::result::Result::Err(A::Error::duplicate_field(
15992 "multiple values for assertion_schema",
15993 ));
15994 }
15995 result.assertion_schema = map
15996 .next_value::<std::option::Option<std::string::String>>()?
15997 .unwrap_or_default();
15998 }
15999 __FieldTag::__vars => {
16000 if !fields.insert(__FieldTag::__vars) {
16001 return std::result::Result::Err(A::Error::duplicate_field(
16002 "multiple values for vars",
16003 ));
16004 }
16005 result.vars = map
16006 .next_value::<std::option::Option<
16007 std::collections::HashMap<
16008 std::string::String,
16009 std::string::String,
16010 >,
16011 >>()?
16012 .unwrap_or_default();
16013 }
16014 __FieldTag::__database_suffix => {
16015 if !fields.insert(__FieldTag::__database_suffix) {
16016 return std::result::Result::Err(A::Error::duplicate_field(
16017 "multiple values for database_suffix",
16018 ));
16019 }
16020 result.database_suffix = map
16021 .next_value::<std::option::Option<std::string::String>>()?
16022 .unwrap_or_default();
16023 }
16024 __FieldTag::__schema_suffix => {
16025 if !fields.insert(__FieldTag::__schema_suffix) {
16026 return std::result::Result::Err(A::Error::duplicate_field(
16027 "multiple values for schema_suffix",
16028 ));
16029 }
16030 result.schema_suffix = map
16031 .next_value::<std::option::Option<std::string::String>>()?
16032 .unwrap_or_default();
16033 }
16034 __FieldTag::__table_prefix => {
16035 if !fields.insert(__FieldTag::__table_prefix) {
16036 return std::result::Result::Err(A::Error::duplicate_field(
16037 "multiple values for table_prefix",
16038 ));
16039 }
16040 result.table_prefix = map
16041 .next_value::<std::option::Option<std::string::String>>()?
16042 .unwrap_or_default();
16043 }
16044 __FieldTag::__builtin_assertion_name_prefix => {
16045 if !fields.insert(__FieldTag::__builtin_assertion_name_prefix) {
16046 return std::result::Result::Err(A::Error::duplicate_field(
16047 "multiple values for builtin_assertion_name_prefix",
16048 ));
16049 }
16050 result.builtin_assertion_name_prefix = map
16051 .next_value::<std::option::Option<std::string::String>>()?
16052 .unwrap_or_default();
16053 }
16054 __FieldTag::__default_notebook_runtime_options => {
16055 if !fields.insert(__FieldTag::__default_notebook_runtime_options) {
16056 return std::result::Result::Err(A::Error::duplicate_field(
16057 "multiple values for default_notebook_runtime_options",
16058 ));
16059 }
16060 result.default_notebook_runtime_options = map.next_value::<std::option::Option<crate::model::NotebookRuntimeOptions>>()?
16061 ;
16062 }
16063 __FieldTag::Unknown(key) => {
16064 let value = map.next_value::<serde_json::Value>()?;
16065 result._unknown_fields.insert(key, value);
16066 }
16067 }
16068 }
16069 std::result::Result::Ok(result)
16070 }
16071 }
16072 deserializer.deserialize_any(Visitor)
16073 }
16074}
16075
16076#[doc(hidden)]
16077impl serde::ser::Serialize for CodeCompilationConfig {
16078 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16079 where
16080 S: serde::ser::Serializer,
16081 {
16082 use serde::ser::SerializeMap;
16083 #[allow(unused_imports)]
16084 use std::option::Option::Some;
16085 let mut state = serializer.serialize_map(std::option::Option::None)?;
16086 if !self.default_database.is_empty() {
16087 state.serialize_entry("defaultDatabase", &self.default_database)?;
16088 }
16089 if !self.default_schema.is_empty() {
16090 state.serialize_entry("defaultSchema", &self.default_schema)?;
16091 }
16092 if !self.default_location.is_empty() {
16093 state.serialize_entry("defaultLocation", &self.default_location)?;
16094 }
16095 if !self.assertion_schema.is_empty() {
16096 state.serialize_entry("assertionSchema", &self.assertion_schema)?;
16097 }
16098 if !self.vars.is_empty() {
16099 state.serialize_entry("vars", &self.vars)?;
16100 }
16101 if !self.database_suffix.is_empty() {
16102 state.serialize_entry("databaseSuffix", &self.database_suffix)?;
16103 }
16104 if !self.schema_suffix.is_empty() {
16105 state.serialize_entry("schemaSuffix", &self.schema_suffix)?;
16106 }
16107 if !self.table_prefix.is_empty() {
16108 state.serialize_entry("tablePrefix", &self.table_prefix)?;
16109 }
16110 if !self.builtin_assertion_name_prefix.is_empty() {
16111 state.serialize_entry(
16112 "builtinAssertionNamePrefix",
16113 &self.builtin_assertion_name_prefix,
16114 )?;
16115 }
16116 if self.default_notebook_runtime_options.is_some() {
16117 state.serialize_entry(
16118 "defaultNotebookRuntimeOptions",
16119 &self.default_notebook_runtime_options,
16120 )?;
16121 }
16122 if !self._unknown_fields.is_empty() {
16123 for (key, value) in self._unknown_fields.iter() {
16124 state.serialize_entry(key, &value)?;
16125 }
16126 }
16127 state.end()
16128 }
16129}
16130
16131#[derive(Clone, Debug, Default, PartialEq)]
16133#[non_exhaustive]
16134pub struct NotebookRuntimeOptions {
16135 pub ai_platform_notebook_runtime_template: std::string::String,
16140
16141 pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
16143
16144 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16145}
16146
16147impl NotebookRuntimeOptions {
16148 pub fn new() -> Self {
16149 std::default::Default::default()
16150 }
16151
16152 pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
16154 mut self,
16155 v: T,
16156 ) -> Self {
16157 self.ai_platform_notebook_runtime_template = v.into();
16158 self
16159 }
16160
16161 pub fn set_execution_sink<
16166 T: std::convert::Into<
16167 std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
16168 >,
16169 >(
16170 mut self,
16171 v: T,
16172 ) -> Self {
16173 self.execution_sink = v.into();
16174 self
16175 }
16176
16177 pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
16181 #[allow(unreachable_patterns)]
16182 self.execution_sink.as_ref().and_then(|v| match v {
16183 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
16184 std::option::Option::Some(v)
16185 }
16186 _ => std::option::Option::None,
16187 })
16188 }
16189
16190 pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
16196 mut self,
16197 v: T,
16198 ) -> Self {
16199 self.execution_sink = std::option::Option::Some(
16200 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
16201 );
16202 self
16203 }
16204}
16205
16206impl wkt::message::Message for NotebookRuntimeOptions {
16207 fn typename() -> &'static str {
16208 "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
16209 }
16210}
16211
16212#[doc(hidden)]
16213impl<'de> serde::de::Deserialize<'de> for NotebookRuntimeOptions {
16214 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16215 where
16216 D: serde::Deserializer<'de>,
16217 {
16218 #[allow(non_camel_case_types)]
16219 #[doc(hidden)]
16220 #[derive(PartialEq, Eq, Hash)]
16221 enum __FieldTag {
16222 __gcs_output_bucket,
16223 __ai_platform_notebook_runtime_template,
16224 Unknown(std::string::String),
16225 }
16226 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
16227 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16228 where
16229 D: serde::Deserializer<'de>,
16230 {
16231 struct Visitor;
16232 impl<'de> serde::de::Visitor<'de> for Visitor {
16233 type Value = __FieldTag;
16234 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16235 formatter.write_str("a field name for NotebookRuntimeOptions")
16236 }
16237 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
16238 where
16239 E: serde::de::Error,
16240 {
16241 use std::result::Result::Ok;
16242 use std::string::ToString;
16243 match value {
16244 "gcsOutputBucket" => Ok(__FieldTag::__gcs_output_bucket),
16245 "gcs_output_bucket" => Ok(__FieldTag::__gcs_output_bucket),
16246 "aiPlatformNotebookRuntimeTemplate" => {
16247 Ok(__FieldTag::__ai_platform_notebook_runtime_template)
16248 }
16249 "ai_platform_notebook_runtime_template" => {
16250 Ok(__FieldTag::__ai_platform_notebook_runtime_template)
16251 }
16252 _ => Ok(__FieldTag::Unknown(value.to_string())),
16253 }
16254 }
16255 }
16256 deserializer.deserialize_identifier(Visitor)
16257 }
16258 }
16259 struct Visitor;
16260 impl<'de> serde::de::Visitor<'de> for Visitor {
16261 type Value = NotebookRuntimeOptions;
16262 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16263 formatter.write_str("struct NotebookRuntimeOptions")
16264 }
16265 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
16266 where
16267 A: serde::de::MapAccess<'de>,
16268 {
16269 #[allow(unused_imports)]
16270 use serde::de::Error;
16271 use std::option::Option::Some;
16272 let mut fields = std::collections::HashSet::new();
16273 let mut result = Self::Value::new();
16274 while let Some(tag) = map.next_key::<__FieldTag>()? {
16275 #[allow(clippy::match_single_binding)]
16276 match tag {
16277 __FieldTag::__gcs_output_bucket => {
16278 if !fields.insert(__FieldTag::__gcs_output_bucket) {
16279 return std::result::Result::Err(A::Error::duplicate_field(
16280 "multiple values for gcs_output_bucket",
16281 ));
16282 }
16283 if result.execution_sink.is_some() {
16284 return std::result::Result::Err(A::Error::duplicate_field(
16285 "multiple values for `execution_sink`, a oneof with full ID .google.cloud.dataform.v1.NotebookRuntimeOptions.gcs_output_bucket, latest field was gcsOutputBucket",
16286 ));
16287 }
16288 result.execution_sink = std::option::Option::Some(
16289 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(
16290 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
16291 ),
16292 );
16293 }
16294 __FieldTag::__ai_platform_notebook_runtime_template => {
16295 if !fields.insert(__FieldTag::__ai_platform_notebook_runtime_template) {
16296 return std::result::Result::Err(A::Error::duplicate_field(
16297 "multiple values for ai_platform_notebook_runtime_template",
16298 ));
16299 }
16300 result.ai_platform_notebook_runtime_template = map
16301 .next_value::<std::option::Option<std::string::String>>()?
16302 .unwrap_or_default();
16303 }
16304 __FieldTag::Unknown(key) => {
16305 let value = map.next_value::<serde_json::Value>()?;
16306 result._unknown_fields.insert(key, value);
16307 }
16308 }
16309 }
16310 std::result::Result::Ok(result)
16311 }
16312 }
16313 deserializer.deserialize_any(Visitor)
16314 }
16315}
16316
16317#[doc(hidden)]
16318impl serde::ser::Serialize for NotebookRuntimeOptions {
16319 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16320 where
16321 S: serde::ser::Serializer,
16322 {
16323 use serde::ser::SerializeMap;
16324 #[allow(unused_imports)]
16325 use std::option::Option::Some;
16326 let mut state = serializer.serialize_map(std::option::Option::None)?;
16327 if let Some(value) = self.gcs_output_bucket() {
16328 state.serialize_entry("gcsOutputBucket", value)?;
16329 }
16330 if !self.ai_platform_notebook_runtime_template.is_empty() {
16331 state.serialize_entry(
16332 "aiPlatformNotebookRuntimeTemplate",
16333 &self.ai_platform_notebook_runtime_template,
16334 )?;
16335 }
16336 if !self._unknown_fields.is_empty() {
16337 for (key, value) in self._unknown_fields.iter() {
16338 state.serialize_entry(key, &value)?;
16339 }
16340 }
16341 state.end()
16342 }
16343}
16344
16345pub mod notebook_runtime_options {
16347 #[allow(unused_imports)]
16348 use super::*;
16349
16350 #[derive(Clone, Debug, PartialEq)]
16352 #[non_exhaustive]
16353 pub enum ExecutionSink {
16354 GcsOutputBucket(std::string::String),
16357 }
16358}
16359
16360#[derive(Clone, Debug, Default, PartialEq)]
16362#[non_exhaustive]
16363pub struct ListCompilationResultsRequest {
16364 pub parent: std::string::String,
16367
16368 pub page_size: i32,
16372
16373 pub page_token: std::string::String,
16380
16381 pub order_by: std::string::String,
16385
16386 pub filter: std::string::String,
16388
16389 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16390}
16391
16392impl ListCompilationResultsRequest {
16393 pub fn new() -> Self {
16394 std::default::Default::default()
16395 }
16396
16397 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16399 self.parent = v.into();
16400 self
16401 }
16402
16403 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16405 self.page_size = v.into();
16406 self
16407 }
16408
16409 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16411 self.page_token = v.into();
16412 self
16413 }
16414
16415 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16417 self.order_by = v.into();
16418 self
16419 }
16420
16421 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16423 self.filter = v.into();
16424 self
16425 }
16426}
16427
16428impl wkt::message::Message for ListCompilationResultsRequest {
16429 fn typename() -> &'static str {
16430 "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
16431 }
16432}
16433
16434#[doc(hidden)]
16435impl<'de> serde::de::Deserialize<'de> for ListCompilationResultsRequest {
16436 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16437 where
16438 D: serde::Deserializer<'de>,
16439 {
16440 #[allow(non_camel_case_types)]
16441 #[doc(hidden)]
16442 #[derive(PartialEq, Eq, Hash)]
16443 enum __FieldTag {
16444 __parent,
16445 __page_size,
16446 __page_token,
16447 __order_by,
16448 __filter,
16449 Unknown(std::string::String),
16450 }
16451 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
16452 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16453 where
16454 D: serde::Deserializer<'de>,
16455 {
16456 struct Visitor;
16457 impl<'de> serde::de::Visitor<'de> for Visitor {
16458 type Value = __FieldTag;
16459 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16460 formatter.write_str("a field name for ListCompilationResultsRequest")
16461 }
16462 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
16463 where
16464 E: serde::de::Error,
16465 {
16466 use std::result::Result::Ok;
16467 use std::string::ToString;
16468 match value {
16469 "parent" => Ok(__FieldTag::__parent),
16470 "pageSize" => Ok(__FieldTag::__page_size),
16471 "page_size" => Ok(__FieldTag::__page_size),
16472 "pageToken" => Ok(__FieldTag::__page_token),
16473 "page_token" => Ok(__FieldTag::__page_token),
16474 "orderBy" => Ok(__FieldTag::__order_by),
16475 "order_by" => Ok(__FieldTag::__order_by),
16476 "filter" => Ok(__FieldTag::__filter),
16477 _ => Ok(__FieldTag::Unknown(value.to_string())),
16478 }
16479 }
16480 }
16481 deserializer.deserialize_identifier(Visitor)
16482 }
16483 }
16484 struct Visitor;
16485 impl<'de> serde::de::Visitor<'de> for Visitor {
16486 type Value = ListCompilationResultsRequest;
16487 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16488 formatter.write_str("struct ListCompilationResultsRequest")
16489 }
16490 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
16491 where
16492 A: serde::de::MapAccess<'de>,
16493 {
16494 #[allow(unused_imports)]
16495 use serde::de::Error;
16496 use std::option::Option::Some;
16497 let mut fields = std::collections::HashSet::new();
16498 let mut result = Self::Value::new();
16499 while let Some(tag) = map.next_key::<__FieldTag>()? {
16500 #[allow(clippy::match_single_binding)]
16501 match tag {
16502 __FieldTag::__parent => {
16503 if !fields.insert(__FieldTag::__parent) {
16504 return std::result::Result::Err(A::Error::duplicate_field(
16505 "multiple values for parent",
16506 ));
16507 }
16508 result.parent = map
16509 .next_value::<std::option::Option<std::string::String>>()?
16510 .unwrap_or_default();
16511 }
16512 __FieldTag::__page_size => {
16513 if !fields.insert(__FieldTag::__page_size) {
16514 return std::result::Result::Err(A::Error::duplicate_field(
16515 "multiple values for page_size",
16516 ));
16517 }
16518 struct __With(std::option::Option<i32>);
16519 impl<'de> serde::de::Deserialize<'de> for __With {
16520 fn deserialize<D>(
16521 deserializer: D,
16522 ) -> std::result::Result<Self, D::Error>
16523 where
16524 D: serde::de::Deserializer<'de>,
16525 {
16526 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
16527 }
16528 }
16529 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
16530 }
16531 __FieldTag::__page_token => {
16532 if !fields.insert(__FieldTag::__page_token) {
16533 return std::result::Result::Err(A::Error::duplicate_field(
16534 "multiple values for page_token",
16535 ));
16536 }
16537 result.page_token = map
16538 .next_value::<std::option::Option<std::string::String>>()?
16539 .unwrap_or_default();
16540 }
16541 __FieldTag::__order_by => {
16542 if !fields.insert(__FieldTag::__order_by) {
16543 return std::result::Result::Err(A::Error::duplicate_field(
16544 "multiple values for order_by",
16545 ));
16546 }
16547 result.order_by = map
16548 .next_value::<std::option::Option<std::string::String>>()?
16549 .unwrap_or_default();
16550 }
16551 __FieldTag::__filter => {
16552 if !fields.insert(__FieldTag::__filter) {
16553 return std::result::Result::Err(A::Error::duplicate_field(
16554 "multiple values for filter",
16555 ));
16556 }
16557 result.filter = map
16558 .next_value::<std::option::Option<std::string::String>>()?
16559 .unwrap_or_default();
16560 }
16561 __FieldTag::Unknown(key) => {
16562 let value = map.next_value::<serde_json::Value>()?;
16563 result._unknown_fields.insert(key, value);
16564 }
16565 }
16566 }
16567 std::result::Result::Ok(result)
16568 }
16569 }
16570 deserializer.deserialize_any(Visitor)
16571 }
16572}
16573
16574#[doc(hidden)]
16575impl serde::ser::Serialize for ListCompilationResultsRequest {
16576 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16577 where
16578 S: serde::ser::Serializer,
16579 {
16580 use serde::ser::SerializeMap;
16581 #[allow(unused_imports)]
16582 use std::option::Option::Some;
16583 let mut state = serializer.serialize_map(std::option::Option::None)?;
16584 if !self.parent.is_empty() {
16585 state.serialize_entry("parent", &self.parent)?;
16586 }
16587 if !wkt::internal::is_default(&self.page_size) {
16588 struct __With<'a>(&'a i32);
16589 impl<'a> serde::ser::Serialize for __With<'a> {
16590 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16591 where
16592 S: serde::ser::Serializer,
16593 {
16594 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
16595 }
16596 }
16597 state.serialize_entry("pageSize", &__With(&self.page_size))?;
16598 }
16599 if !self.page_token.is_empty() {
16600 state.serialize_entry("pageToken", &self.page_token)?;
16601 }
16602 if !self.order_by.is_empty() {
16603 state.serialize_entry("orderBy", &self.order_by)?;
16604 }
16605 if !self.filter.is_empty() {
16606 state.serialize_entry("filter", &self.filter)?;
16607 }
16608 if !self._unknown_fields.is_empty() {
16609 for (key, value) in self._unknown_fields.iter() {
16610 state.serialize_entry(key, &value)?;
16611 }
16612 }
16613 state.end()
16614 }
16615}
16616
16617#[derive(Clone, Debug, Default, PartialEq)]
16619#[non_exhaustive]
16620pub struct ListCompilationResultsResponse {
16621 pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
16623
16624 pub next_page_token: std::string::String,
16627
16628 pub unreachable: std::vec::Vec<std::string::String>,
16630
16631 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16632}
16633
16634impl ListCompilationResultsResponse {
16635 pub fn new() -> Self {
16636 std::default::Default::default()
16637 }
16638
16639 pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
16641 where
16642 T: std::iter::IntoIterator<Item = V>,
16643 V: std::convert::Into<crate::model::CompilationResult>,
16644 {
16645 use std::iter::Iterator;
16646 self.compilation_results = v.into_iter().map(|i| i.into()).collect();
16647 self
16648 }
16649
16650 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16652 self.next_page_token = v.into();
16653 self
16654 }
16655
16656 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
16658 where
16659 T: std::iter::IntoIterator<Item = V>,
16660 V: std::convert::Into<std::string::String>,
16661 {
16662 use std::iter::Iterator;
16663 self.unreachable = v.into_iter().map(|i| i.into()).collect();
16664 self
16665 }
16666}
16667
16668impl wkt::message::Message for ListCompilationResultsResponse {
16669 fn typename() -> &'static str {
16670 "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
16671 }
16672}
16673
16674#[doc(hidden)]
16675impl gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
16676 type PageItem = crate::model::CompilationResult;
16677
16678 fn items(self) -> std::vec::Vec<Self::PageItem> {
16679 self.compilation_results
16680 }
16681
16682 fn next_page_token(&self) -> std::string::String {
16683 use std::clone::Clone;
16684 self.next_page_token.clone()
16685 }
16686}
16687
16688#[doc(hidden)]
16689impl<'de> serde::de::Deserialize<'de> for ListCompilationResultsResponse {
16690 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16691 where
16692 D: serde::Deserializer<'de>,
16693 {
16694 #[allow(non_camel_case_types)]
16695 #[doc(hidden)]
16696 #[derive(PartialEq, Eq, Hash)]
16697 enum __FieldTag {
16698 __compilation_results,
16699 __next_page_token,
16700 __unreachable,
16701 Unknown(std::string::String),
16702 }
16703 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
16704 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16705 where
16706 D: serde::Deserializer<'de>,
16707 {
16708 struct Visitor;
16709 impl<'de> serde::de::Visitor<'de> for Visitor {
16710 type Value = __FieldTag;
16711 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16712 formatter.write_str("a field name for ListCompilationResultsResponse")
16713 }
16714 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
16715 where
16716 E: serde::de::Error,
16717 {
16718 use std::result::Result::Ok;
16719 use std::string::ToString;
16720 match value {
16721 "compilationResults" => Ok(__FieldTag::__compilation_results),
16722 "compilation_results" => Ok(__FieldTag::__compilation_results),
16723 "nextPageToken" => Ok(__FieldTag::__next_page_token),
16724 "next_page_token" => Ok(__FieldTag::__next_page_token),
16725 "unreachable" => Ok(__FieldTag::__unreachable),
16726 _ => Ok(__FieldTag::Unknown(value.to_string())),
16727 }
16728 }
16729 }
16730 deserializer.deserialize_identifier(Visitor)
16731 }
16732 }
16733 struct Visitor;
16734 impl<'de> serde::de::Visitor<'de> for Visitor {
16735 type Value = ListCompilationResultsResponse;
16736 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16737 formatter.write_str("struct ListCompilationResultsResponse")
16738 }
16739 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
16740 where
16741 A: serde::de::MapAccess<'de>,
16742 {
16743 #[allow(unused_imports)]
16744 use serde::de::Error;
16745 use std::option::Option::Some;
16746 let mut fields = std::collections::HashSet::new();
16747 let mut result = Self::Value::new();
16748 while let Some(tag) = map.next_key::<__FieldTag>()? {
16749 #[allow(clippy::match_single_binding)]
16750 match tag {
16751 __FieldTag::__compilation_results => {
16752 if !fields.insert(__FieldTag::__compilation_results) {
16753 return std::result::Result::Err(A::Error::duplicate_field(
16754 "multiple values for compilation_results",
16755 ));
16756 }
16757 result.compilation_results =
16758 map.next_value::<std::option::Option<
16759 std::vec::Vec<crate::model::CompilationResult>,
16760 >>()?
16761 .unwrap_or_default();
16762 }
16763 __FieldTag::__next_page_token => {
16764 if !fields.insert(__FieldTag::__next_page_token) {
16765 return std::result::Result::Err(A::Error::duplicate_field(
16766 "multiple values for next_page_token",
16767 ));
16768 }
16769 result.next_page_token = map
16770 .next_value::<std::option::Option<std::string::String>>()?
16771 .unwrap_or_default();
16772 }
16773 __FieldTag::__unreachable => {
16774 if !fields.insert(__FieldTag::__unreachable) {
16775 return std::result::Result::Err(A::Error::duplicate_field(
16776 "multiple values for unreachable",
16777 ));
16778 }
16779 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
16780 }
16781 __FieldTag::Unknown(key) => {
16782 let value = map.next_value::<serde_json::Value>()?;
16783 result._unknown_fields.insert(key, value);
16784 }
16785 }
16786 }
16787 std::result::Result::Ok(result)
16788 }
16789 }
16790 deserializer.deserialize_any(Visitor)
16791 }
16792}
16793
16794#[doc(hidden)]
16795impl serde::ser::Serialize for ListCompilationResultsResponse {
16796 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16797 where
16798 S: serde::ser::Serializer,
16799 {
16800 use serde::ser::SerializeMap;
16801 #[allow(unused_imports)]
16802 use std::option::Option::Some;
16803 let mut state = serializer.serialize_map(std::option::Option::None)?;
16804 if !self.compilation_results.is_empty() {
16805 state.serialize_entry("compilationResults", &self.compilation_results)?;
16806 }
16807 if !self.next_page_token.is_empty() {
16808 state.serialize_entry("nextPageToken", &self.next_page_token)?;
16809 }
16810 if !self.unreachable.is_empty() {
16811 state.serialize_entry("unreachable", &self.unreachable)?;
16812 }
16813 if !self._unknown_fields.is_empty() {
16814 for (key, value) in self._unknown_fields.iter() {
16815 state.serialize_entry(key, &value)?;
16816 }
16817 }
16818 state.end()
16819 }
16820}
16821
16822#[derive(Clone, Debug, Default, PartialEq)]
16824#[non_exhaustive]
16825pub struct GetCompilationResultRequest {
16826 pub name: std::string::String,
16828
16829 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16830}
16831
16832impl GetCompilationResultRequest {
16833 pub fn new() -> Self {
16834 std::default::Default::default()
16835 }
16836
16837 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16839 self.name = v.into();
16840 self
16841 }
16842}
16843
16844impl wkt::message::Message for GetCompilationResultRequest {
16845 fn typename() -> &'static str {
16846 "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
16847 }
16848}
16849
16850#[doc(hidden)]
16851impl<'de> serde::de::Deserialize<'de> for GetCompilationResultRequest {
16852 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16853 where
16854 D: serde::Deserializer<'de>,
16855 {
16856 #[allow(non_camel_case_types)]
16857 #[doc(hidden)]
16858 #[derive(PartialEq, Eq, Hash)]
16859 enum __FieldTag {
16860 __name,
16861 Unknown(std::string::String),
16862 }
16863 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
16864 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16865 where
16866 D: serde::Deserializer<'de>,
16867 {
16868 struct Visitor;
16869 impl<'de> serde::de::Visitor<'de> for Visitor {
16870 type Value = __FieldTag;
16871 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16872 formatter.write_str("a field name for GetCompilationResultRequest")
16873 }
16874 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
16875 where
16876 E: serde::de::Error,
16877 {
16878 use std::result::Result::Ok;
16879 use std::string::ToString;
16880 match value {
16881 "name" => Ok(__FieldTag::__name),
16882 _ => Ok(__FieldTag::Unknown(value.to_string())),
16883 }
16884 }
16885 }
16886 deserializer.deserialize_identifier(Visitor)
16887 }
16888 }
16889 struct Visitor;
16890 impl<'de> serde::de::Visitor<'de> for Visitor {
16891 type Value = GetCompilationResultRequest;
16892 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16893 formatter.write_str("struct GetCompilationResultRequest")
16894 }
16895 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
16896 where
16897 A: serde::de::MapAccess<'de>,
16898 {
16899 #[allow(unused_imports)]
16900 use serde::de::Error;
16901 use std::option::Option::Some;
16902 let mut fields = std::collections::HashSet::new();
16903 let mut result = Self::Value::new();
16904 while let Some(tag) = map.next_key::<__FieldTag>()? {
16905 #[allow(clippy::match_single_binding)]
16906 match tag {
16907 __FieldTag::__name => {
16908 if !fields.insert(__FieldTag::__name) {
16909 return std::result::Result::Err(A::Error::duplicate_field(
16910 "multiple values for name",
16911 ));
16912 }
16913 result.name = map
16914 .next_value::<std::option::Option<std::string::String>>()?
16915 .unwrap_or_default();
16916 }
16917 __FieldTag::Unknown(key) => {
16918 let value = map.next_value::<serde_json::Value>()?;
16919 result._unknown_fields.insert(key, value);
16920 }
16921 }
16922 }
16923 std::result::Result::Ok(result)
16924 }
16925 }
16926 deserializer.deserialize_any(Visitor)
16927 }
16928}
16929
16930#[doc(hidden)]
16931impl serde::ser::Serialize for GetCompilationResultRequest {
16932 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16933 where
16934 S: serde::ser::Serializer,
16935 {
16936 use serde::ser::SerializeMap;
16937 #[allow(unused_imports)]
16938 use std::option::Option::Some;
16939 let mut state = serializer.serialize_map(std::option::Option::None)?;
16940 if !self.name.is_empty() {
16941 state.serialize_entry("name", &self.name)?;
16942 }
16943 if !self._unknown_fields.is_empty() {
16944 for (key, value) in self._unknown_fields.iter() {
16945 state.serialize_entry(key, &value)?;
16946 }
16947 }
16948 state.end()
16949 }
16950}
16951
16952#[derive(Clone, Debug, Default, PartialEq)]
16954#[non_exhaustive]
16955pub struct CreateCompilationResultRequest {
16956 pub parent: std::string::String,
16959
16960 pub compilation_result: std::option::Option<crate::model::CompilationResult>,
16962
16963 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16964}
16965
16966impl CreateCompilationResultRequest {
16967 pub fn new() -> Self {
16968 std::default::Default::default()
16969 }
16970
16971 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16973 self.parent = v.into();
16974 self
16975 }
16976
16977 pub fn set_compilation_result<T>(mut self, v: T) -> Self
16979 where
16980 T: std::convert::Into<crate::model::CompilationResult>,
16981 {
16982 self.compilation_result = std::option::Option::Some(v.into());
16983 self
16984 }
16985
16986 pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
16988 where
16989 T: std::convert::Into<crate::model::CompilationResult>,
16990 {
16991 self.compilation_result = v.map(|x| x.into());
16992 self
16993 }
16994}
16995
16996impl wkt::message::Message for CreateCompilationResultRequest {
16997 fn typename() -> &'static str {
16998 "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
16999 }
17000}
17001
17002#[doc(hidden)]
17003impl<'de> serde::de::Deserialize<'de> for CreateCompilationResultRequest {
17004 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17005 where
17006 D: serde::Deserializer<'de>,
17007 {
17008 #[allow(non_camel_case_types)]
17009 #[doc(hidden)]
17010 #[derive(PartialEq, Eq, Hash)]
17011 enum __FieldTag {
17012 __parent,
17013 __compilation_result,
17014 Unknown(std::string::String),
17015 }
17016 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17017 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17018 where
17019 D: serde::Deserializer<'de>,
17020 {
17021 struct Visitor;
17022 impl<'de> serde::de::Visitor<'de> for Visitor {
17023 type Value = __FieldTag;
17024 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17025 formatter.write_str("a field name for CreateCompilationResultRequest")
17026 }
17027 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17028 where
17029 E: serde::de::Error,
17030 {
17031 use std::result::Result::Ok;
17032 use std::string::ToString;
17033 match value {
17034 "parent" => Ok(__FieldTag::__parent),
17035 "compilationResult" => Ok(__FieldTag::__compilation_result),
17036 "compilation_result" => Ok(__FieldTag::__compilation_result),
17037 _ => Ok(__FieldTag::Unknown(value.to_string())),
17038 }
17039 }
17040 }
17041 deserializer.deserialize_identifier(Visitor)
17042 }
17043 }
17044 struct Visitor;
17045 impl<'de> serde::de::Visitor<'de> for Visitor {
17046 type Value = CreateCompilationResultRequest;
17047 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17048 formatter.write_str("struct CreateCompilationResultRequest")
17049 }
17050 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
17051 where
17052 A: serde::de::MapAccess<'de>,
17053 {
17054 #[allow(unused_imports)]
17055 use serde::de::Error;
17056 use std::option::Option::Some;
17057 let mut fields = std::collections::HashSet::new();
17058 let mut result = Self::Value::new();
17059 while let Some(tag) = map.next_key::<__FieldTag>()? {
17060 #[allow(clippy::match_single_binding)]
17061 match tag {
17062 __FieldTag::__parent => {
17063 if !fields.insert(__FieldTag::__parent) {
17064 return std::result::Result::Err(A::Error::duplicate_field(
17065 "multiple values for parent",
17066 ));
17067 }
17068 result.parent = map
17069 .next_value::<std::option::Option<std::string::String>>()?
17070 .unwrap_or_default();
17071 }
17072 __FieldTag::__compilation_result => {
17073 if !fields.insert(__FieldTag::__compilation_result) {
17074 return std::result::Result::Err(A::Error::duplicate_field(
17075 "multiple values for compilation_result",
17076 ));
17077 }
17078 result.compilation_result = map
17079 .next_value::<std::option::Option<crate::model::CompilationResult>>(
17080 )?;
17081 }
17082 __FieldTag::Unknown(key) => {
17083 let value = map.next_value::<serde_json::Value>()?;
17084 result._unknown_fields.insert(key, value);
17085 }
17086 }
17087 }
17088 std::result::Result::Ok(result)
17089 }
17090 }
17091 deserializer.deserialize_any(Visitor)
17092 }
17093}
17094
17095#[doc(hidden)]
17096impl serde::ser::Serialize for CreateCompilationResultRequest {
17097 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17098 where
17099 S: serde::ser::Serializer,
17100 {
17101 use serde::ser::SerializeMap;
17102 #[allow(unused_imports)]
17103 use std::option::Option::Some;
17104 let mut state = serializer.serialize_map(std::option::Option::None)?;
17105 if !self.parent.is_empty() {
17106 state.serialize_entry("parent", &self.parent)?;
17107 }
17108 if self.compilation_result.is_some() {
17109 state.serialize_entry("compilationResult", &self.compilation_result)?;
17110 }
17111 if !self._unknown_fields.is_empty() {
17112 for (key, value) in self._unknown_fields.iter() {
17113 state.serialize_entry(key, &value)?;
17114 }
17115 }
17116 state.end()
17117 }
17118}
17119
17120#[derive(Clone, Debug, Default, PartialEq)]
17123#[non_exhaustive]
17124pub struct Target {
17125 pub database: std::string::String,
17127
17128 pub schema: std::string::String,
17130
17131 pub name: std::string::String,
17133
17134 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17135}
17136
17137impl Target {
17138 pub fn new() -> Self {
17139 std::default::Default::default()
17140 }
17141
17142 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17144 self.database = v.into();
17145 self
17146 }
17147
17148 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17150 self.schema = v.into();
17151 self
17152 }
17153
17154 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17156 self.name = v.into();
17157 self
17158 }
17159}
17160
17161impl wkt::message::Message for Target {
17162 fn typename() -> &'static str {
17163 "type.googleapis.com/google.cloud.dataform.v1.Target"
17164 }
17165}
17166
17167#[doc(hidden)]
17168impl<'de> serde::de::Deserialize<'de> for Target {
17169 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17170 where
17171 D: serde::Deserializer<'de>,
17172 {
17173 #[allow(non_camel_case_types)]
17174 #[doc(hidden)]
17175 #[derive(PartialEq, Eq, Hash)]
17176 enum __FieldTag {
17177 __database,
17178 __schema,
17179 __name,
17180 Unknown(std::string::String),
17181 }
17182 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17183 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17184 where
17185 D: serde::Deserializer<'de>,
17186 {
17187 struct Visitor;
17188 impl<'de> serde::de::Visitor<'de> for Visitor {
17189 type Value = __FieldTag;
17190 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17191 formatter.write_str("a field name for Target")
17192 }
17193 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17194 where
17195 E: serde::de::Error,
17196 {
17197 use std::result::Result::Ok;
17198 use std::string::ToString;
17199 match value {
17200 "database" => Ok(__FieldTag::__database),
17201 "schema" => Ok(__FieldTag::__schema),
17202 "name" => Ok(__FieldTag::__name),
17203 _ => Ok(__FieldTag::Unknown(value.to_string())),
17204 }
17205 }
17206 }
17207 deserializer.deserialize_identifier(Visitor)
17208 }
17209 }
17210 struct Visitor;
17211 impl<'de> serde::de::Visitor<'de> for Visitor {
17212 type Value = Target;
17213 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17214 formatter.write_str("struct Target")
17215 }
17216 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
17217 where
17218 A: serde::de::MapAccess<'de>,
17219 {
17220 #[allow(unused_imports)]
17221 use serde::de::Error;
17222 use std::option::Option::Some;
17223 let mut fields = std::collections::HashSet::new();
17224 let mut result = Self::Value::new();
17225 while let Some(tag) = map.next_key::<__FieldTag>()? {
17226 #[allow(clippy::match_single_binding)]
17227 match tag {
17228 __FieldTag::__database => {
17229 if !fields.insert(__FieldTag::__database) {
17230 return std::result::Result::Err(A::Error::duplicate_field(
17231 "multiple values for database",
17232 ));
17233 }
17234 result.database = map
17235 .next_value::<std::option::Option<std::string::String>>()?
17236 .unwrap_or_default();
17237 }
17238 __FieldTag::__schema => {
17239 if !fields.insert(__FieldTag::__schema) {
17240 return std::result::Result::Err(A::Error::duplicate_field(
17241 "multiple values for schema",
17242 ));
17243 }
17244 result.schema = map
17245 .next_value::<std::option::Option<std::string::String>>()?
17246 .unwrap_or_default();
17247 }
17248 __FieldTag::__name => {
17249 if !fields.insert(__FieldTag::__name) {
17250 return std::result::Result::Err(A::Error::duplicate_field(
17251 "multiple values for name",
17252 ));
17253 }
17254 result.name = map
17255 .next_value::<std::option::Option<std::string::String>>()?
17256 .unwrap_or_default();
17257 }
17258 __FieldTag::Unknown(key) => {
17259 let value = map.next_value::<serde_json::Value>()?;
17260 result._unknown_fields.insert(key, value);
17261 }
17262 }
17263 }
17264 std::result::Result::Ok(result)
17265 }
17266 }
17267 deserializer.deserialize_any(Visitor)
17268 }
17269}
17270
17271#[doc(hidden)]
17272impl serde::ser::Serialize for Target {
17273 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17274 where
17275 S: serde::ser::Serializer,
17276 {
17277 use serde::ser::SerializeMap;
17278 #[allow(unused_imports)]
17279 use std::option::Option::Some;
17280 let mut state = serializer.serialize_map(std::option::Option::None)?;
17281 if !self.database.is_empty() {
17282 state.serialize_entry("database", &self.database)?;
17283 }
17284 if !self.schema.is_empty() {
17285 state.serialize_entry("schema", &self.schema)?;
17286 }
17287 if !self.name.is_empty() {
17288 state.serialize_entry("name", &self.name)?;
17289 }
17290 if !self._unknown_fields.is_empty() {
17291 for (key, value) in self._unknown_fields.iter() {
17292 state.serialize_entry(key, &value)?;
17293 }
17294 }
17295 state.end()
17296 }
17297}
17298
17299#[derive(Clone, Debug, Default, PartialEq)]
17301#[non_exhaustive]
17302pub struct RelationDescriptor {
17303 pub description: std::string::String,
17305
17306 pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
17308
17309 pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
17311
17312 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17313}
17314
17315impl RelationDescriptor {
17316 pub fn new() -> Self {
17317 std::default::Default::default()
17318 }
17319
17320 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17322 self.description = v.into();
17323 self
17324 }
17325
17326 pub fn set_columns<T, V>(mut self, v: T) -> Self
17328 where
17329 T: std::iter::IntoIterator<Item = V>,
17330 V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
17331 {
17332 use std::iter::Iterator;
17333 self.columns = v.into_iter().map(|i| i.into()).collect();
17334 self
17335 }
17336
17337 pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
17339 where
17340 T: std::iter::IntoIterator<Item = (K, V)>,
17341 K: std::convert::Into<std::string::String>,
17342 V: std::convert::Into<std::string::String>,
17343 {
17344 use std::iter::Iterator;
17345 self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17346 self
17347 }
17348}
17349
17350impl wkt::message::Message for RelationDescriptor {
17351 fn typename() -> &'static str {
17352 "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
17353 }
17354}
17355
17356#[doc(hidden)]
17357impl<'de> serde::de::Deserialize<'de> for RelationDescriptor {
17358 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17359 where
17360 D: serde::Deserializer<'de>,
17361 {
17362 #[allow(non_camel_case_types)]
17363 #[doc(hidden)]
17364 #[derive(PartialEq, Eq, Hash)]
17365 enum __FieldTag {
17366 __description,
17367 __columns,
17368 __bigquery_labels,
17369 Unknown(std::string::String),
17370 }
17371 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17372 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17373 where
17374 D: serde::Deserializer<'de>,
17375 {
17376 struct Visitor;
17377 impl<'de> serde::de::Visitor<'de> for Visitor {
17378 type Value = __FieldTag;
17379 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17380 formatter.write_str("a field name for RelationDescriptor")
17381 }
17382 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17383 where
17384 E: serde::de::Error,
17385 {
17386 use std::result::Result::Ok;
17387 use std::string::ToString;
17388 match value {
17389 "description" => Ok(__FieldTag::__description),
17390 "columns" => Ok(__FieldTag::__columns),
17391 "bigqueryLabels" => Ok(__FieldTag::__bigquery_labels),
17392 "bigquery_labels" => Ok(__FieldTag::__bigquery_labels),
17393 _ => Ok(__FieldTag::Unknown(value.to_string())),
17394 }
17395 }
17396 }
17397 deserializer.deserialize_identifier(Visitor)
17398 }
17399 }
17400 struct Visitor;
17401 impl<'de> serde::de::Visitor<'de> for Visitor {
17402 type Value = RelationDescriptor;
17403 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17404 formatter.write_str("struct RelationDescriptor")
17405 }
17406 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
17407 where
17408 A: serde::de::MapAccess<'de>,
17409 {
17410 #[allow(unused_imports)]
17411 use serde::de::Error;
17412 use std::option::Option::Some;
17413 let mut fields = std::collections::HashSet::new();
17414 let mut result = Self::Value::new();
17415 while let Some(tag) = map.next_key::<__FieldTag>()? {
17416 #[allow(clippy::match_single_binding)]
17417 match tag {
17418 __FieldTag::__description => {
17419 if !fields.insert(__FieldTag::__description) {
17420 return std::result::Result::Err(A::Error::duplicate_field(
17421 "multiple values for description",
17422 ));
17423 }
17424 result.description = map
17425 .next_value::<std::option::Option<std::string::String>>()?
17426 .unwrap_or_default();
17427 }
17428 __FieldTag::__columns => {
17429 if !fields.insert(__FieldTag::__columns) {
17430 return std::result::Result::Err(A::Error::duplicate_field(
17431 "multiple values for columns",
17432 ));
17433 }
17434 result.columns = map
17435 .next_value::<std::option::Option<
17436 std::vec::Vec<
17437 crate::model::relation_descriptor::ColumnDescriptor,
17438 >,
17439 >>()?
17440 .unwrap_or_default();
17441 }
17442 __FieldTag::__bigquery_labels => {
17443 if !fields.insert(__FieldTag::__bigquery_labels) {
17444 return std::result::Result::Err(A::Error::duplicate_field(
17445 "multiple values for bigquery_labels",
17446 ));
17447 }
17448 result.bigquery_labels = map
17449 .next_value::<std::option::Option<
17450 std::collections::HashMap<
17451 std::string::String,
17452 std::string::String,
17453 >,
17454 >>()?
17455 .unwrap_or_default();
17456 }
17457 __FieldTag::Unknown(key) => {
17458 let value = map.next_value::<serde_json::Value>()?;
17459 result._unknown_fields.insert(key, value);
17460 }
17461 }
17462 }
17463 std::result::Result::Ok(result)
17464 }
17465 }
17466 deserializer.deserialize_any(Visitor)
17467 }
17468}
17469
17470#[doc(hidden)]
17471impl serde::ser::Serialize for RelationDescriptor {
17472 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17473 where
17474 S: serde::ser::Serializer,
17475 {
17476 use serde::ser::SerializeMap;
17477 #[allow(unused_imports)]
17478 use std::option::Option::Some;
17479 let mut state = serializer.serialize_map(std::option::Option::None)?;
17480 if !self.description.is_empty() {
17481 state.serialize_entry("description", &self.description)?;
17482 }
17483 if !self.columns.is_empty() {
17484 state.serialize_entry("columns", &self.columns)?;
17485 }
17486 if !self.bigquery_labels.is_empty() {
17487 state.serialize_entry("bigqueryLabels", &self.bigquery_labels)?;
17488 }
17489 if !self._unknown_fields.is_empty() {
17490 for (key, value) in self._unknown_fields.iter() {
17491 state.serialize_entry(key, &value)?;
17492 }
17493 }
17494 state.end()
17495 }
17496}
17497
17498pub mod relation_descriptor {
17500 #[allow(unused_imports)]
17501 use super::*;
17502
17503 #[derive(Clone, Debug, Default, PartialEq)]
17505 #[non_exhaustive]
17506 pub struct ColumnDescriptor {
17507 pub path: std::vec::Vec<std::string::String>,
17510
17511 pub description: std::string::String,
17513
17514 pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
17516
17517 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17518 }
17519
17520 impl ColumnDescriptor {
17521 pub fn new() -> Self {
17522 std::default::Default::default()
17523 }
17524
17525 pub fn set_path<T, V>(mut self, v: T) -> Self
17527 where
17528 T: std::iter::IntoIterator<Item = V>,
17529 V: std::convert::Into<std::string::String>,
17530 {
17531 use std::iter::Iterator;
17532 self.path = v.into_iter().map(|i| i.into()).collect();
17533 self
17534 }
17535
17536 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17538 self.description = v.into();
17539 self
17540 }
17541
17542 pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
17544 where
17545 T: std::iter::IntoIterator<Item = V>,
17546 V: std::convert::Into<std::string::String>,
17547 {
17548 use std::iter::Iterator;
17549 self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
17550 self
17551 }
17552 }
17553
17554 impl wkt::message::Message for ColumnDescriptor {
17555 fn typename() -> &'static str {
17556 "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
17557 }
17558 }
17559
17560 #[doc(hidden)]
17561 impl<'de> serde::de::Deserialize<'de> for ColumnDescriptor {
17562 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17563 where
17564 D: serde::Deserializer<'de>,
17565 {
17566 #[allow(non_camel_case_types)]
17567 #[doc(hidden)]
17568 #[derive(PartialEq, Eq, Hash)]
17569 enum __FieldTag {
17570 __path,
17571 __description,
17572 __bigquery_policy_tags,
17573 Unknown(std::string::String),
17574 }
17575 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17576 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17577 where
17578 D: serde::Deserializer<'de>,
17579 {
17580 struct Visitor;
17581 impl<'de> serde::de::Visitor<'de> for Visitor {
17582 type Value = __FieldTag;
17583 fn expecting(
17584 &self,
17585 formatter: &mut std::fmt::Formatter,
17586 ) -> std::fmt::Result {
17587 formatter.write_str("a field name for ColumnDescriptor")
17588 }
17589 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17590 where
17591 E: serde::de::Error,
17592 {
17593 use std::result::Result::Ok;
17594 use std::string::ToString;
17595 match value {
17596 "path" => Ok(__FieldTag::__path),
17597 "description" => Ok(__FieldTag::__description),
17598 "bigqueryPolicyTags" => Ok(__FieldTag::__bigquery_policy_tags),
17599 "bigquery_policy_tags" => Ok(__FieldTag::__bigquery_policy_tags),
17600 _ => Ok(__FieldTag::Unknown(value.to_string())),
17601 }
17602 }
17603 }
17604 deserializer.deserialize_identifier(Visitor)
17605 }
17606 }
17607 struct Visitor;
17608 impl<'de> serde::de::Visitor<'de> for Visitor {
17609 type Value = ColumnDescriptor;
17610 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17611 formatter.write_str("struct ColumnDescriptor")
17612 }
17613 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
17614 where
17615 A: serde::de::MapAccess<'de>,
17616 {
17617 #[allow(unused_imports)]
17618 use serde::de::Error;
17619 use std::option::Option::Some;
17620 let mut fields = std::collections::HashSet::new();
17621 let mut result = Self::Value::new();
17622 while let Some(tag) = map.next_key::<__FieldTag>()? {
17623 #[allow(clippy::match_single_binding)]
17624 match tag {
17625 __FieldTag::__path => {
17626 if !fields.insert(__FieldTag::__path) {
17627 return std::result::Result::Err(A::Error::duplicate_field(
17628 "multiple values for path",
17629 ));
17630 }
17631 result.path = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
17632 }
17633 __FieldTag::__description => {
17634 if !fields.insert(__FieldTag::__description) {
17635 return std::result::Result::Err(A::Error::duplicate_field(
17636 "multiple values for description",
17637 ));
17638 }
17639 result.description = map
17640 .next_value::<std::option::Option<std::string::String>>()?
17641 .unwrap_or_default();
17642 }
17643 __FieldTag::__bigquery_policy_tags => {
17644 if !fields.insert(__FieldTag::__bigquery_policy_tags) {
17645 return std::result::Result::Err(A::Error::duplicate_field(
17646 "multiple values for bigquery_policy_tags",
17647 ));
17648 }
17649 result.bigquery_policy_tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
17650 }
17651 __FieldTag::Unknown(key) => {
17652 let value = map.next_value::<serde_json::Value>()?;
17653 result._unknown_fields.insert(key, value);
17654 }
17655 }
17656 }
17657 std::result::Result::Ok(result)
17658 }
17659 }
17660 deserializer.deserialize_any(Visitor)
17661 }
17662 }
17663
17664 #[doc(hidden)]
17665 impl serde::ser::Serialize for ColumnDescriptor {
17666 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17667 where
17668 S: serde::ser::Serializer,
17669 {
17670 use serde::ser::SerializeMap;
17671 #[allow(unused_imports)]
17672 use std::option::Option::Some;
17673 let mut state = serializer.serialize_map(std::option::Option::None)?;
17674 if !self.path.is_empty() {
17675 state.serialize_entry("path", &self.path)?;
17676 }
17677 if !self.description.is_empty() {
17678 state.serialize_entry("description", &self.description)?;
17679 }
17680 if !self.bigquery_policy_tags.is_empty() {
17681 state.serialize_entry("bigqueryPolicyTags", &self.bigquery_policy_tags)?;
17682 }
17683 if !self._unknown_fields.is_empty() {
17684 for (key, value) in self._unknown_fields.iter() {
17685 state.serialize_entry(key, &value)?;
17686 }
17687 }
17688 state.end()
17689 }
17690 }
17691}
17692
17693#[derive(Clone, Debug, Default, PartialEq)]
17695#[non_exhaustive]
17696pub struct CompilationResultAction {
17697 pub target: std::option::Option<crate::model::Target>,
17699
17700 pub canonical_target: std::option::Option<crate::model::Target>,
17703
17704 pub file_path: std::string::String,
17707
17708 pub internal_metadata: std::option::Option<std::string::String>,
17712
17713 pub compiled_object:
17715 std::option::Option<crate::model::compilation_result_action::CompiledObject>,
17716
17717 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17718}
17719
17720impl CompilationResultAction {
17721 pub fn new() -> Self {
17722 std::default::Default::default()
17723 }
17724
17725 pub fn set_target<T>(mut self, v: T) -> Self
17727 where
17728 T: std::convert::Into<crate::model::Target>,
17729 {
17730 self.target = std::option::Option::Some(v.into());
17731 self
17732 }
17733
17734 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
17736 where
17737 T: std::convert::Into<crate::model::Target>,
17738 {
17739 self.target = v.map(|x| x.into());
17740 self
17741 }
17742
17743 pub fn set_canonical_target<T>(mut self, v: T) -> Self
17745 where
17746 T: std::convert::Into<crate::model::Target>,
17747 {
17748 self.canonical_target = std::option::Option::Some(v.into());
17749 self
17750 }
17751
17752 pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
17754 where
17755 T: std::convert::Into<crate::model::Target>,
17756 {
17757 self.canonical_target = v.map(|x| x.into());
17758 self
17759 }
17760
17761 pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17763 self.file_path = v.into();
17764 self
17765 }
17766
17767 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
17769 where
17770 T: std::convert::Into<std::string::String>,
17771 {
17772 self.internal_metadata = std::option::Option::Some(v.into());
17773 self
17774 }
17775
17776 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
17778 where
17779 T: std::convert::Into<std::string::String>,
17780 {
17781 self.internal_metadata = v.map(|x| x.into());
17782 self
17783 }
17784
17785 pub fn set_compiled_object<
17790 T: std::convert::Into<
17791 std::option::Option<crate::model::compilation_result_action::CompiledObject>,
17792 >,
17793 >(
17794 mut self,
17795 v: T,
17796 ) -> Self {
17797 self.compiled_object = v.into();
17798 self
17799 }
17800
17801 pub fn relation(
17805 &self,
17806 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
17807 {
17808 #[allow(unreachable_patterns)]
17809 self.compiled_object.as_ref().and_then(|v| match v {
17810 crate::model::compilation_result_action::CompiledObject::Relation(v) => {
17811 std::option::Option::Some(v)
17812 }
17813 _ => std::option::Option::None,
17814 })
17815 }
17816
17817 pub fn set_relation<
17823 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
17824 >(
17825 mut self,
17826 v: T,
17827 ) -> Self {
17828 self.compiled_object = std::option::Option::Some(
17829 crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
17830 );
17831 self
17832 }
17833
17834 pub fn operations(
17838 &self,
17839 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
17840 {
17841 #[allow(unreachable_patterns)]
17842 self.compiled_object.as_ref().and_then(|v| match v {
17843 crate::model::compilation_result_action::CompiledObject::Operations(v) => {
17844 std::option::Option::Some(v)
17845 }
17846 _ => std::option::Option::None,
17847 })
17848 }
17849
17850 pub fn set_operations<
17856 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
17857 >(
17858 mut self,
17859 v: T,
17860 ) -> Self {
17861 self.compiled_object = std::option::Option::Some(
17862 crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
17863 );
17864 self
17865 }
17866
17867 pub fn assertion(
17871 &self,
17872 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
17873 {
17874 #[allow(unreachable_patterns)]
17875 self.compiled_object.as_ref().and_then(|v| match v {
17876 crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
17877 std::option::Option::Some(v)
17878 }
17879 _ => std::option::Option::None,
17880 })
17881 }
17882
17883 pub fn set_assertion<
17889 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
17890 >(
17891 mut self,
17892 v: T,
17893 ) -> Self {
17894 self.compiled_object = std::option::Option::Some(
17895 crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
17896 );
17897 self
17898 }
17899
17900 pub fn declaration(
17904 &self,
17905 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
17906 {
17907 #[allow(unreachable_patterns)]
17908 self.compiled_object.as_ref().and_then(|v| match v {
17909 crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
17910 std::option::Option::Some(v)
17911 }
17912 _ => std::option::Option::None,
17913 })
17914 }
17915
17916 pub fn set_declaration<
17922 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
17923 >(
17924 mut self,
17925 v: T,
17926 ) -> Self {
17927 self.compiled_object = std::option::Option::Some(
17928 crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
17929 );
17930 self
17931 }
17932
17933 pub fn notebook(
17937 &self,
17938 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
17939 {
17940 #[allow(unreachable_patterns)]
17941 self.compiled_object.as_ref().and_then(|v| match v {
17942 crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
17943 std::option::Option::Some(v)
17944 }
17945 _ => std::option::Option::None,
17946 })
17947 }
17948
17949 pub fn set_notebook<
17955 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
17956 >(
17957 mut self,
17958 v: T,
17959 ) -> Self {
17960 self.compiled_object = std::option::Option::Some(
17961 crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
17962 );
17963 self
17964 }
17965
17966 pub fn data_preparation(
17970 &self,
17971 ) -> std::option::Option<
17972 &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
17973 > {
17974 #[allow(unreachable_patterns)]
17975 self.compiled_object.as_ref().and_then(|v| match v {
17976 crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
17977 std::option::Option::Some(v)
17978 }
17979 _ => std::option::Option::None,
17980 })
17981 }
17982
17983 pub fn set_data_preparation<
17989 T: std::convert::Into<
17990 std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
17991 >,
17992 >(
17993 mut self,
17994 v: T,
17995 ) -> Self {
17996 self.compiled_object = std::option::Option::Some(
17997 crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
17998 );
17999 self
18000 }
18001}
18002
18003impl wkt::message::Message for CompilationResultAction {
18004 fn typename() -> &'static str {
18005 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
18006 }
18007}
18008
18009#[doc(hidden)]
18010impl<'de> serde::de::Deserialize<'de> for CompilationResultAction {
18011 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18012 where
18013 D: serde::Deserializer<'de>,
18014 {
18015 #[allow(non_camel_case_types)]
18016 #[doc(hidden)]
18017 #[derive(PartialEq, Eq, Hash)]
18018 enum __FieldTag {
18019 __relation,
18020 __operations,
18021 __assertion,
18022 __declaration,
18023 __notebook,
18024 __data_preparation,
18025 __target,
18026 __canonical_target,
18027 __file_path,
18028 __internal_metadata,
18029 Unknown(std::string::String),
18030 }
18031 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
18032 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18033 where
18034 D: serde::Deserializer<'de>,
18035 {
18036 struct Visitor;
18037 impl<'de> serde::de::Visitor<'de> for Visitor {
18038 type Value = __FieldTag;
18039 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18040 formatter.write_str("a field name for CompilationResultAction")
18041 }
18042 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
18043 where
18044 E: serde::de::Error,
18045 {
18046 use std::result::Result::Ok;
18047 use std::string::ToString;
18048 match value {
18049 "relation" => Ok(__FieldTag::__relation),
18050 "operations" => Ok(__FieldTag::__operations),
18051 "assertion" => Ok(__FieldTag::__assertion),
18052 "declaration" => Ok(__FieldTag::__declaration),
18053 "notebook" => Ok(__FieldTag::__notebook),
18054 "dataPreparation" => Ok(__FieldTag::__data_preparation),
18055 "data_preparation" => Ok(__FieldTag::__data_preparation),
18056 "target" => Ok(__FieldTag::__target),
18057 "canonicalTarget" => Ok(__FieldTag::__canonical_target),
18058 "canonical_target" => Ok(__FieldTag::__canonical_target),
18059 "filePath" => Ok(__FieldTag::__file_path),
18060 "file_path" => Ok(__FieldTag::__file_path),
18061 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
18062 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
18063 _ => Ok(__FieldTag::Unknown(value.to_string())),
18064 }
18065 }
18066 }
18067 deserializer.deserialize_identifier(Visitor)
18068 }
18069 }
18070 struct Visitor;
18071 impl<'de> serde::de::Visitor<'de> for Visitor {
18072 type Value = CompilationResultAction;
18073 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18074 formatter.write_str("struct CompilationResultAction")
18075 }
18076 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
18077 where
18078 A: serde::de::MapAccess<'de>,
18079 {
18080 #[allow(unused_imports)]
18081 use serde::de::Error;
18082 use std::option::Option::Some;
18083 let mut fields = std::collections::HashSet::new();
18084 let mut result = Self::Value::new();
18085 while let Some(tag) = map.next_key::<__FieldTag>()? {
18086 #[allow(clippy::match_single_binding)]
18087 match tag {
18088 __FieldTag::__relation => {
18089 if !fields.insert(__FieldTag::__relation) {
18090 return std::result::Result::Err(A::Error::duplicate_field(
18091 "multiple values for relation",
18092 ));
18093 }
18094 if result.compiled_object.is_some() {
18095 return std::result::Result::Err(A::Error::duplicate_field(
18096 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.relation, latest field was relation",
18097 ));
18098 }
18099 result.compiled_object = std::option::Option::Some(
18100 crate::model::compilation_result_action::CompiledObject::Relation(
18101 map.next_value::<std::option::Option<
18102 std::boxed::Box<
18103 crate::model::compilation_result_action::Relation,
18104 >,
18105 >>()?
18106 .unwrap_or_default(),
18107 ),
18108 );
18109 }
18110 __FieldTag::__operations => {
18111 if !fields.insert(__FieldTag::__operations) {
18112 return std::result::Result::Err(A::Error::duplicate_field(
18113 "multiple values for operations",
18114 ));
18115 }
18116 if result.compiled_object.is_some() {
18117 return std::result::Result::Err(A::Error::duplicate_field(
18118 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.operations, latest field was operations",
18119 ));
18120 }
18121 result.compiled_object = std::option::Option::Some(
18122 crate::model::compilation_result_action::CompiledObject::Operations(
18123 map.next_value::<std::option::Option<
18124 std::boxed::Box<
18125 crate::model::compilation_result_action::Operations,
18126 >,
18127 >>()?
18128 .unwrap_or_default(),
18129 ),
18130 );
18131 }
18132 __FieldTag::__assertion => {
18133 if !fields.insert(__FieldTag::__assertion) {
18134 return std::result::Result::Err(A::Error::duplicate_field(
18135 "multiple values for assertion",
18136 ));
18137 }
18138 if result.compiled_object.is_some() {
18139 return std::result::Result::Err(A::Error::duplicate_field(
18140 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.assertion, latest field was assertion",
18141 ));
18142 }
18143 result.compiled_object = std::option::Option::Some(
18144 crate::model::compilation_result_action::CompiledObject::Assertion(
18145 map.next_value::<std::option::Option<
18146 std::boxed::Box<
18147 crate::model::compilation_result_action::Assertion,
18148 >,
18149 >>()?
18150 .unwrap_or_default(),
18151 ),
18152 );
18153 }
18154 __FieldTag::__declaration => {
18155 if !fields.insert(__FieldTag::__declaration) {
18156 return std::result::Result::Err(A::Error::duplicate_field(
18157 "multiple values for declaration",
18158 ));
18159 }
18160 if result.compiled_object.is_some() {
18161 return std::result::Result::Err(A::Error::duplicate_field(
18162 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.declaration, latest field was declaration",
18163 ));
18164 }
18165 result.compiled_object = std::option::Option::Some(
18166 crate::model::compilation_result_action::CompiledObject::Declaration(
18167 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::Declaration>>>()?.unwrap_or_default()
18168 ),
18169 );
18170 }
18171 __FieldTag::__notebook => {
18172 if !fields.insert(__FieldTag::__notebook) {
18173 return std::result::Result::Err(A::Error::duplicate_field(
18174 "multiple values for notebook",
18175 ));
18176 }
18177 if result.compiled_object.is_some() {
18178 return std::result::Result::Err(A::Error::duplicate_field(
18179 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.notebook, latest field was notebook",
18180 ));
18181 }
18182 result.compiled_object = std::option::Option::Some(
18183 crate::model::compilation_result_action::CompiledObject::Notebook(
18184 map.next_value::<std::option::Option<
18185 std::boxed::Box<
18186 crate::model::compilation_result_action::Notebook,
18187 >,
18188 >>()?
18189 .unwrap_or_default(),
18190 ),
18191 );
18192 }
18193 __FieldTag::__data_preparation => {
18194 if !fields.insert(__FieldTag::__data_preparation) {
18195 return std::result::Result::Err(A::Error::duplicate_field(
18196 "multiple values for data_preparation",
18197 ));
18198 }
18199 if result.compiled_object.is_some() {
18200 return std::result::Result::Err(A::Error::duplicate_field(
18201 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.data_preparation, latest field was dataPreparation",
18202 ));
18203 }
18204 result.compiled_object = std::option::Option::Some(
18205 crate::model::compilation_result_action::CompiledObject::DataPreparation(
18206 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::DataPreparation>>>()?.unwrap_or_default()
18207 ),
18208 );
18209 }
18210 __FieldTag::__target => {
18211 if !fields.insert(__FieldTag::__target) {
18212 return std::result::Result::Err(A::Error::duplicate_field(
18213 "multiple values for target",
18214 ));
18215 }
18216 result.target =
18217 map.next_value::<std::option::Option<crate::model::Target>>()?;
18218 }
18219 __FieldTag::__canonical_target => {
18220 if !fields.insert(__FieldTag::__canonical_target) {
18221 return std::result::Result::Err(A::Error::duplicate_field(
18222 "multiple values for canonical_target",
18223 ));
18224 }
18225 result.canonical_target =
18226 map.next_value::<std::option::Option<crate::model::Target>>()?;
18227 }
18228 __FieldTag::__file_path => {
18229 if !fields.insert(__FieldTag::__file_path) {
18230 return std::result::Result::Err(A::Error::duplicate_field(
18231 "multiple values for file_path",
18232 ));
18233 }
18234 result.file_path = map
18235 .next_value::<std::option::Option<std::string::String>>()?
18236 .unwrap_or_default();
18237 }
18238 __FieldTag::__internal_metadata => {
18239 if !fields.insert(__FieldTag::__internal_metadata) {
18240 return std::result::Result::Err(A::Error::duplicate_field(
18241 "multiple values for internal_metadata",
18242 ));
18243 }
18244 result.internal_metadata =
18245 map.next_value::<std::option::Option<std::string::String>>()?;
18246 }
18247 __FieldTag::Unknown(key) => {
18248 let value = map.next_value::<serde_json::Value>()?;
18249 result._unknown_fields.insert(key, value);
18250 }
18251 }
18252 }
18253 std::result::Result::Ok(result)
18254 }
18255 }
18256 deserializer.deserialize_any(Visitor)
18257 }
18258}
18259
18260#[doc(hidden)]
18261impl serde::ser::Serialize for CompilationResultAction {
18262 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18263 where
18264 S: serde::ser::Serializer,
18265 {
18266 use serde::ser::SerializeMap;
18267 #[allow(unused_imports)]
18268 use std::option::Option::Some;
18269 let mut state = serializer.serialize_map(std::option::Option::None)?;
18270 if let Some(value) = self.relation() {
18271 state.serialize_entry("relation", value)?;
18272 }
18273 if let Some(value) = self.operations() {
18274 state.serialize_entry("operations", value)?;
18275 }
18276 if let Some(value) = self.assertion() {
18277 state.serialize_entry("assertion", value)?;
18278 }
18279 if let Some(value) = self.declaration() {
18280 state.serialize_entry("declaration", value)?;
18281 }
18282 if let Some(value) = self.notebook() {
18283 state.serialize_entry("notebook", value)?;
18284 }
18285 if let Some(value) = self.data_preparation() {
18286 state.serialize_entry("dataPreparation", value)?;
18287 }
18288 if self.target.is_some() {
18289 state.serialize_entry("target", &self.target)?;
18290 }
18291 if self.canonical_target.is_some() {
18292 state.serialize_entry("canonicalTarget", &self.canonical_target)?;
18293 }
18294 if !self.file_path.is_empty() {
18295 state.serialize_entry("filePath", &self.file_path)?;
18296 }
18297 if self.internal_metadata.is_some() {
18298 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
18299 }
18300 if !self._unknown_fields.is_empty() {
18301 for (key, value) in self._unknown_fields.iter() {
18302 state.serialize_entry(key, &value)?;
18303 }
18304 }
18305 state.end()
18306 }
18307}
18308
18309pub mod compilation_result_action {
18311 #[allow(unused_imports)]
18312 use super::*;
18313
18314 #[derive(Clone, Debug, Default, PartialEq)]
18316 #[non_exhaustive]
18317 pub struct Relation {
18318 pub dependency_targets: std::vec::Vec<crate::model::Target>,
18320
18321 pub disabled: bool,
18323
18324 pub tags: std::vec::Vec<std::string::String>,
18326
18327 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
18329
18330 pub relation_type: crate::model::compilation_result_action::relation::RelationType,
18332
18333 pub select_query: std::string::String,
18335
18336 pub pre_operations: std::vec::Vec<std::string::String>,
18338
18339 pub post_operations: std::vec::Vec<std::string::String>,
18341
18342 pub incremental_table_config: std::option::Option<
18345 crate::model::compilation_result_action::relation::IncrementalTableConfig,
18346 >,
18347
18348 pub partition_expression: std::string::String,
18350
18351 pub cluster_expressions: std::vec::Vec<std::string::String>,
18353
18354 pub partition_expiration_days: i32,
18356
18357 pub require_partition_filter: bool,
18360
18361 pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
18366
18367 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18368 }
18369
18370 impl Relation {
18371 pub fn new() -> Self {
18372 std::default::Default::default()
18373 }
18374
18375 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
18377 where
18378 T: std::iter::IntoIterator<Item = V>,
18379 V: std::convert::Into<crate::model::Target>,
18380 {
18381 use std::iter::Iterator;
18382 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
18383 self
18384 }
18385
18386 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18388 self.disabled = v.into();
18389 self
18390 }
18391
18392 pub fn set_tags<T, V>(mut self, v: T) -> Self
18394 where
18395 T: std::iter::IntoIterator<Item = V>,
18396 V: std::convert::Into<std::string::String>,
18397 {
18398 use std::iter::Iterator;
18399 self.tags = v.into_iter().map(|i| i.into()).collect();
18400 self
18401 }
18402
18403 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
18405 where
18406 T: std::convert::Into<crate::model::RelationDescriptor>,
18407 {
18408 self.relation_descriptor = std::option::Option::Some(v.into());
18409 self
18410 }
18411
18412 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
18414 where
18415 T: std::convert::Into<crate::model::RelationDescriptor>,
18416 {
18417 self.relation_descriptor = v.map(|x| x.into());
18418 self
18419 }
18420
18421 pub fn set_relation_type<
18423 T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
18424 >(
18425 mut self,
18426 v: T,
18427 ) -> Self {
18428 self.relation_type = v.into();
18429 self
18430 }
18431
18432 pub fn set_select_query<T: std::convert::Into<std::string::String>>(
18434 mut self,
18435 v: T,
18436 ) -> Self {
18437 self.select_query = v.into();
18438 self
18439 }
18440
18441 pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
18443 where
18444 T: std::iter::IntoIterator<Item = V>,
18445 V: std::convert::Into<std::string::String>,
18446 {
18447 use std::iter::Iterator;
18448 self.pre_operations = v.into_iter().map(|i| i.into()).collect();
18449 self
18450 }
18451
18452 pub fn set_post_operations<T, V>(mut self, v: T) -> Self
18454 where
18455 T: std::iter::IntoIterator<Item = V>,
18456 V: std::convert::Into<std::string::String>,
18457 {
18458 use std::iter::Iterator;
18459 self.post_operations = v.into_iter().map(|i| i.into()).collect();
18460 self
18461 }
18462
18463 pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
18465 where
18466 T: std::convert::Into<
18467 crate::model::compilation_result_action::relation::IncrementalTableConfig,
18468 >,
18469 {
18470 self.incremental_table_config = std::option::Option::Some(v.into());
18471 self
18472 }
18473
18474 pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
18476 where
18477 T: std::convert::Into<
18478 crate::model::compilation_result_action::relation::IncrementalTableConfig,
18479 >,
18480 {
18481 self.incremental_table_config = v.map(|x| x.into());
18482 self
18483 }
18484
18485 pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
18487 mut self,
18488 v: T,
18489 ) -> Self {
18490 self.partition_expression = v.into();
18491 self
18492 }
18493
18494 pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
18496 where
18497 T: std::iter::IntoIterator<Item = V>,
18498 V: std::convert::Into<std::string::String>,
18499 {
18500 use std::iter::Iterator;
18501 self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
18502 self
18503 }
18504
18505 pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18507 self.partition_expiration_days = v.into();
18508 self
18509 }
18510
18511 pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18513 self.require_partition_filter = v.into();
18514 self
18515 }
18516
18517 pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
18519 where
18520 T: std::iter::IntoIterator<Item = (K, V)>,
18521 K: std::convert::Into<std::string::String>,
18522 V: std::convert::Into<std::string::String>,
18523 {
18524 use std::iter::Iterator;
18525 self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
18526 self
18527 }
18528 }
18529
18530 impl wkt::message::Message for Relation {
18531 fn typename() -> &'static str {
18532 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
18533 }
18534 }
18535
18536 #[doc(hidden)]
18537 impl<'de> serde::de::Deserialize<'de> for Relation {
18538 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18539 where
18540 D: serde::Deserializer<'de>,
18541 {
18542 #[allow(non_camel_case_types)]
18543 #[doc(hidden)]
18544 #[derive(PartialEq, Eq, Hash)]
18545 enum __FieldTag {
18546 __dependency_targets,
18547 __disabled,
18548 __tags,
18549 __relation_descriptor,
18550 __relation_type,
18551 __select_query,
18552 __pre_operations,
18553 __post_operations,
18554 __incremental_table_config,
18555 __partition_expression,
18556 __cluster_expressions,
18557 __partition_expiration_days,
18558 __require_partition_filter,
18559 __additional_options,
18560 Unknown(std::string::String),
18561 }
18562 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
18563 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18564 where
18565 D: serde::Deserializer<'de>,
18566 {
18567 struct Visitor;
18568 impl<'de> serde::de::Visitor<'de> for Visitor {
18569 type Value = __FieldTag;
18570 fn expecting(
18571 &self,
18572 formatter: &mut std::fmt::Formatter,
18573 ) -> std::fmt::Result {
18574 formatter.write_str("a field name for Relation")
18575 }
18576 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
18577 where
18578 E: serde::de::Error,
18579 {
18580 use std::result::Result::Ok;
18581 use std::string::ToString;
18582 match value {
18583 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
18584 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
18585 "disabled" => Ok(__FieldTag::__disabled),
18586 "tags" => Ok(__FieldTag::__tags),
18587 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
18588 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
18589 "relationType" => Ok(__FieldTag::__relation_type),
18590 "relation_type" => Ok(__FieldTag::__relation_type),
18591 "selectQuery" => Ok(__FieldTag::__select_query),
18592 "select_query" => Ok(__FieldTag::__select_query),
18593 "preOperations" => Ok(__FieldTag::__pre_operations),
18594 "pre_operations" => Ok(__FieldTag::__pre_operations),
18595 "postOperations" => Ok(__FieldTag::__post_operations),
18596 "post_operations" => Ok(__FieldTag::__post_operations),
18597 "incrementalTableConfig" => {
18598 Ok(__FieldTag::__incremental_table_config)
18599 }
18600 "incremental_table_config" => {
18601 Ok(__FieldTag::__incremental_table_config)
18602 }
18603 "partitionExpression" => Ok(__FieldTag::__partition_expression),
18604 "partition_expression" => Ok(__FieldTag::__partition_expression),
18605 "clusterExpressions" => Ok(__FieldTag::__cluster_expressions),
18606 "cluster_expressions" => Ok(__FieldTag::__cluster_expressions),
18607 "partitionExpirationDays" => {
18608 Ok(__FieldTag::__partition_expiration_days)
18609 }
18610 "partition_expiration_days" => {
18611 Ok(__FieldTag::__partition_expiration_days)
18612 }
18613 "requirePartitionFilter" => {
18614 Ok(__FieldTag::__require_partition_filter)
18615 }
18616 "require_partition_filter" => {
18617 Ok(__FieldTag::__require_partition_filter)
18618 }
18619 "additionalOptions" => Ok(__FieldTag::__additional_options),
18620 "additional_options" => Ok(__FieldTag::__additional_options),
18621 _ => Ok(__FieldTag::Unknown(value.to_string())),
18622 }
18623 }
18624 }
18625 deserializer.deserialize_identifier(Visitor)
18626 }
18627 }
18628 struct Visitor;
18629 impl<'de> serde::de::Visitor<'de> for Visitor {
18630 type Value = Relation;
18631 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18632 formatter.write_str("struct Relation")
18633 }
18634 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
18635 where
18636 A: serde::de::MapAccess<'de>,
18637 {
18638 #[allow(unused_imports)]
18639 use serde::de::Error;
18640 use std::option::Option::Some;
18641 let mut fields = std::collections::HashSet::new();
18642 let mut result = Self::Value::new();
18643 while let Some(tag) = map.next_key::<__FieldTag>()? {
18644 #[allow(clippy::match_single_binding)]
18645 match tag {
18646 __FieldTag::__dependency_targets => {
18647 if !fields.insert(__FieldTag::__dependency_targets) {
18648 return std::result::Result::Err(A::Error::duplicate_field(
18649 "multiple values for dependency_targets",
18650 ));
18651 }
18652 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
18653 }
18654 __FieldTag::__disabled => {
18655 if !fields.insert(__FieldTag::__disabled) {
18656 return std::result::Result::Err(A::Error::duplicate_field(
18657 "multiple values for disabled",
18658 ));
18659 }
18660 result.disabled = map
18661 .next_value::<std::option::Option<bool>>()?
18662 .unwrap_or_default();
18663 }
18664 __FieldTag::__tags => {
18665 if !fields.insert(__FieldTag::__tags) {
18666 return std::result::Result::Err(A::Error::duplicate_field(
18667 "multiple values for tags",
18668 ));
18669 }
18670 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
18671 }
18672 __FieldTag::__relation_descriptor => {
18673 if !fields.insert(__FieldTag::__relation_descriptor) {
18674 return std::result::Result::Err(A::Error::duplicate_field(
18675 "multiple values for relation_descriptor",
18676 ));
18677 }
18678 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
18679 ;
18680 }
18681 __FieldTag::__relation_type => {
18682 if !fields.insert(__FieldTag::__relation_type) {
18683 return std::result::Result::Err(A::Error::duplicate_field(
18684 "multiple values for relation_type",
18685 ));
18686 }
18687 result.relation_type = map.next_value::<std::option::Option<crate::model::compilation_result_action::relation::RelationType>>()?.unwrap_or_default();
18688 }
18689 __FieldTag::__select_query => {
18690 if !fields.insert(__FieldTag::__select_query) {
18691 return std::result::Result::Err(A::Error::duplicate_field(
18692 "multiple values for select_query",
18693 ));
18694 }
18695 result.select_query = map
18696 .next_value::<std::option::Option<std::string::String>>()?
18697 .unwrap_or_default();
18698 }
18699 __FieldTag::__pre_operations => {
18700 if !fields.insert(__FieldTag::__pre_operations) {
18701 return std::result::Result::Err(A::Error::duplicate_field(
18702 "multiple values for pre_operations",
18703 ));
18704 }
18705 result.pre_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
18706 }
18707 __FieldTag::__post_operations => {
18708 if !fields.insert(__FieldTag::__post_operations) {
18709 return std::result::Result::Err(A::Error::duplicate_field(
18710 "multiple values for post_operations",
18711 ));
18712 }
18713 result.post_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
18714 }
18715 __FieldTag::__incremental_table_config => {
18716 if !fields.insert(__FieldTag::__incremental_table_config) {
18717 return std::result::Result::Err(A::Error::duplicate_field(
18718 "multiple values for incremental_table_config",
18719 ));
18720 }
18721 result.incremental_table_config = map.next_value::<std::option::Option<crate::model::compilation_result_action::relation::IncrementalTableConfig>>()?
18722 ;
18723 }
18724 __FieldTag::__partition_expression => {
18725 if !fields.insert(__FieldTag::__partition_expression) {
18726 return std::result::Result::Err(A::Error::duplicate_field(
18727 "multiple values for partition_expression",
18728 ));
18729 }
18730 result.partition_expression = map
18731 .next_value::<std::option::Option<std::string::String>>()?
18732 .unwrap_or_default();
18733 }
18734 __FieldTag::__cluster_expressions => {
18735 if !fields.insert(__FieldTag::__cluster_expressions) {
18736 return std::result::Result::Err(A::Error::duplicate_field(
18737 "multiple values for cluster_expressions",
18738 ));
18739 }
18740 result.cluster_expressions = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
18741 }
18742 __FieldTag::__partition_expiration_days => {
18743 if !fields.insert(__FieldTag::__partition_expiration_days) {
18744 return std::result::Result::Err(A::Error::duplicate_field(
18745 "multiple values for partition_expiration_days",
18746 ));
18747 }
18748 struct __With(std::option::Option<i32>);
18749 impl<'de> serde::de::Deserialize<'de> for __With {
18750 fn deserialize<D>(
18751 deserializer: D,
18752 ) -> std::result::Result<Self, D::Error>
18753 where
18754 D: serde::de::Deserializer<'de>,
18755 {
18756 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
18757 }
18758 }
18759 result.partition_expiration_days =
18760 map.next_value::<__With>()?.0.unwrap_or_default();
18761 }
18762 __FieldTag::__require_partition_filter => {
18763 if !fields.insert(__FieldTag::__require_partition_filter) {
18764 return std::result::Result::Err(A::Error::duplicate_field(
18765 "multiple values for require_partition_filter",
18766 ));
18767 }
18768 result.require_partition_filter = map
18769 .next_value::<std::option::Option<bool>>()?
18770 .unwrap_or_default();
18771 }
18772 __FieldTag::__additional_options => {
18773 if !fields.insert(__FieldTag::__additional_options) {
18774 return std::result::Result::Err(A::Error::duplicate_field(
18775 "multiple values for additional_options",
18776 ));
18777 }
18778 result.additional_options = map
18779 .next_value::<std::option::Option<
18780 std::collections::HashMap<
18781 std::string::String,
18782 std::string::String,
18783 >,
18784 >>()?
18785 .unwrap_or_default();
18786 }
18787 __FieldTag::Unknown(key) => {
18788 let value = map.next_value::<serde_json::Value>()?;
18789 result._unknown_fields.insert(key, value);
18790 }
18791 }
18792 }
18793 std::result::Result::Ok(result)
18794 }
18795 }
18796 deserializer.deserialize_any(Visitor)
18797 }
18798 }
18799
18800 #[doc(hidden)]
18801 impl serde::ser::Serialize for Relation {
18802 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18803 where
18804 S: serde::ser::Serializer,
18805 {
18806 use serde::ser::SerializeMap;
18807 #[allow(unused_imports)]
18808 use std::option::Option::Some;
18809 let mut state = serializer.serialize_map(std::option::Option::None)?;
18810 if !self.dependency_targets.is_empty() {
18811 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
18812 }
18813 if !wkt::internal::is_default(&self.disabled) {
18814 state.serialize_entry("disabled", &self.disabled)?;
18815 }
18816 if !self.tags.is_empty() {
18817 state.serialize_entry("tags", &self.tags)?;
18818 }
18819 if self.relation_descriptor.is_some() {
18820 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
18821 }
18822 if !wkt::internal::is_default(&self.relation_type) {
18823 state.serialize_entry("relationType", &self.relation_type)?;
18824 }
18825 if !self.select_query.is_empty() {
18826 state.serialize_entry("selectQuery", &self.select_query)?;
18827 }
18828 if !self.pre_operations.is_empty() {
18829 state.serialize_entry("preOperations", &self.pre_operations)?;
18830 }
18831 if !self.post_operations.is_empty() {
18832 state.serialize_entry("postOperations", &self.post_operations)?;
18833 }
18834 if self.incremental_table_config.is_some() {
18835 state.serialize_entry("incrementalTableConfig", &self.incremental_table_config)?;
18836 }
18837 if !self.partition_expression.is_empty() {
18838 state.serialize_entry("partitionExpression", &self.partition_expression)?;
18839 }
18840 if !self.cluster_expressions.is_empty() {
18841 state.serialize_entry("clusterExpressions", &self.cluster_expressions)?;
18842 }
18843 if !wkt::internal::is_default(&self.partition_expiration_days) {
18844 struct __With<'a>(&'a i32);
18845 impl<'a> serde::ser::Serialize for __With<'a> {
18846 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18847 where
18848 S: serde::ser::Serializer,
18849 {
18850 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
18851 }
18852 }
18853 state.serialize_entry(
18854 "partitionExpirationDays",
18855 &__With(&self.partition_expiration_days),
18856 )?;
18857 }
18858 if !wkt::internal::is_default(&self.require_partition_filter) {
18859 state.serialize_entry("requirePartitionFilter", &self.require_partition_filter)?;
18860 }
18861 if !self.additional_options.is_empty() {
18862 state.serialize_entry("additionalOptions", &self.additional_options)?;
18863 }
18864 if !self._unknown_fields.is_empty() {
18865 for (key, value) in self._unknown_fields.iter() {
18866 state.serialize_entry(key, &value)?;
18867 }
18868 }
18869 state.end()
18870 }
18871 }
18872
18873 pub mod relation {
18875 #[allow(unused_imports)]
18876 use super::*;
18877
18878 #[derive(Clone, Debug, Default, PartialEq)]
18880 #[non_exhaustive]
18881 pub struct IncrementalTableConfig {
18882 pub incremental_select_query: std::string::String,
18885
18886 pub refresh_disabled: bool,
18888
18889 pub unique_key_parts: std::vec::Vec<std::string::String>,
18894
18895 pub update_partition_filter: std::string::String,
18899
18900 pub incremental_pre_operations: std::vec::Vec<std::string::String>,
18903
18904 pub incremental_post_operations: std::vec::Vec<std::string::String>,
18907
18908 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18909 }
18910
18911 impl IncrementalTableConfig {
18912 pub fn new() -> Self {
18913 std::default::Default::default()
18914 }
18915
18916 pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
18918 mut self,
18919 v: T,
18920 ) -> Self {
18921 self.incremental_select_query = v.into();
18922 self
18923 }
18924
18925 pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
18927 self.refresh_disabled = v.into();
18928 self
18929 }
18930
18931 pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
18933 where
18934 T: std::iter::IntoIterator<Item = V>,
18935 V: std::convert::Into<std::string::String>,
18936 {
18937 use std::iter::Iterator;
18938 self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
18939 self
18940 }
18941
18942 pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
18944 mut self,
18945 v: T,
18946 ) -> Self {
18947 self.update_partition_filter = v.into();
18948 self
18949 }
18950
18951 pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
18953 where
18954 T: std::iter::IntoIterator<Item = V>,
18955 V: std::convert::Into<std::string::String>,
18956 {
18957 use std::iter::Iterator;
18958 self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
18959 self
18960 }
18961
18962 pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
18964 where
18965 T: std::iter::IntoIterator<Item = V>,
18966 V: std::convert::Into<std::string::String>,
18967 {
18968 use std::iter::Iterator;
18969 self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
18970 self
18971 }
18972 }
18973
18974 impl wkt::message::Message for IncrementalTableConfig {
18975 fn typename() -> &'static str {
18976 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
18977 }
18978 }
18979
18980 #[doc(hidden)]
18981 impl<'de> serde::de::Deserialize<'de> for IncrementalTableConfig {
18982 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18983 where
18984 D: serde::Deserializer<'de>,
18985 {
18986 #[allow(non_camel_case_types)]
18987 #[doc(hidden)]
18988 #[derive(PartialEq, Eq, Hash)]
18989 enum __FieldTag {
18990 __incremental_select_query,
18991 __refresh_disabled,
18992 __unique_key_parts,
18993 __update_partition_filter,
18994 __incremental_pre_operations,
18995 __incremental_post_operations,
18996 Unknown(std::string::String),
18997 }
18998 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
18999 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19000 where
19001 D: serde::Deserializer<'de>,
19002 {
19003 struct Visitor;
19004 impl<'de> serde::de::Visitor<'de> for Visitor {
19005 type Value = __FieldTag;
19006 fn expecting(
19007 &self,
19008 formatter: &mut std::fmt::Formatter,
19009 ) -> std::fmt::Result {
19010 formatter.write_str("a field name for IncrementalTableConfig")
19011 }
19012 fn visit_str<E>(
19013 self,
19014 value: &str,
19015 ) -> std::result::Result<Self::Value, E>
19016 where
19017 E: serde::de::Error,
19018 {
19019 use std::result::Result::Ok;
19020 use std::string::ToString;
19021 match value {
19022 "incrementalSelectQuery" => {
19023 Ok(__FieldTag::__incremental_select_query)
19024 }
19025 "incremental_select_query" => {
19026 Ok(__FieldTag::__incremental_select_query)
19027 }
19028 "refreshDisabled" => Ok(__FieldTag::__refresh_disabled),
19029 "refresh_disabled" => Ok(__FieldTag::__refresh_disabled),
19030 "uniqueKeyParts" => Ok(__FieldTag::__unique_key_parts),
19031 "unique_key_parts" => Ok(__FieldTag::__unique_key_parts),
19032 "updatePartitionFilter" => {
19033 Ok(__FieldTag::__update_partition_filter)
19034 }
19035 "update_partition_filter" => {
19036 Ok(__FieldTag::__update_partition_filter)
19037 }
19038 "incrementalPreOperations" => {
19039 Ok(__FieldTag::__incremental_pre_operations)
19040 }
19041 "incremental_pre_operations" => {
19042 Ok(__FieldTag::__incremental_pre_operations)
19043 }
19044 "incrementalPostOperations" => {
19045 Ok(__FieldTag::__incremental_post_operations)
19046 }
19047 "incremental_post_operations" => {
19048 Ok(__FieldTag::__incremental_post_operations)
19049 }
19050 _ => Ok(__FieldTag::Unknown(value.to_string())),
19051 }
19052 }
19053 }
19054 deserializer.deserialize_identifier(Visitor)
19055 }
19056 }
19057 struct Visitor;
19058 impl<'de> serde::de::Visitor<'de> for Visitor {
19059 type Value = IncrementalTableConfig;
19060 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19061 formatter.write_str("struct IncrementalTableConfig")
19062 }
19063 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
19064 where
19065 A: serde::de::MapAccess<'de>,
19066 {
19067 #[allow(unused_imports)]
19068 use serde::de::Error;
19069 use std::option::Option::Some;
19070 let mut fields = std::collections::HashSet::new();
19071 let mut result = Self::Value::new();
19072 while let Some(tag) = map.next_key::<__FieldTag>()? {
19073 #[allow(clippy::match_single_binding)]
19074 match tag {
19075 __FieldTag::__incremental_select_query => {
19076 if !fields.insert(__FieldTag::__incremental_select_query) {
19077 return std::result::Result::Err(
19078 A::Error::duplicate_field(
19079 "multiple values for incremental_select_query",
19080 ),
19081 );
19082 }
19083 result.incremental_select_query = map
19084 .next_value::<std::option::Option<std::string::String>>()?
19085 .unwrap_or_default();
19086 }
19087 __FieldTag::__refresh_disabled => {
19088 if !fields.insert(__FieldTag::__refresh_disabled) {
19089 return std::result::Result::Err(
19090 A::Error::duplicate_field(
19091 "multiple values for refresh_disabled",
19092 ),
19093 );
19094 }
19095 result.refresh_disabled = map
19096 .next_value::<std::option::Option<bool>>()?
19097 .unwrap_or_default();
19098 }
19099 __FieldTag::__unique_key_parts => {
19100 if !fields.insert(__FieldTag::__unique_key_parts) {
19101 return std::result::Result::Err(
19102 A::Error::duplicate_field(
19103 "multiple values for unique_key_parts",
19104 ),
19105 );
19106 }
19107 result.unique_key_parts = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19108 }
19109 __FieldTag::__update_partition_filter => {
19110 if !fields.insert(__FieldTag::__update_partition_filter) {
19111 return std::result::Result::Err(
19112 A::Error::duplicate_field(
19113 "multiple values for update_partition_filter",
19114 ),
19115 );
19116 }
19117 result.update_partition_filter = map
19118 .next_value::<std::option::Option<std::string::String>>()?
19119 .unwrap_or_default();
19120 }
19121 __FieldTag::__incremental_pre_operations => {
19122 if !fields.insert(__FieldTag::__incremental_pre_operations) {
19123 return std::result::Result::Err(
19124 A::Error::duplicate_field(
19125 "multiple values for incremental_pre_operations",
19126 ),
19127 );
19128 }
19129 result.incremental_pre_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19130 }
19131 __FieldTag::__incremental_post_operations => {
19132 if !fields.insert(__FieldTag::__incremental_post_operations) {
19133 return std::result::Result::Err(
19134 A::Error::duplicate_field(
19135 "multiple values for incremental_post_operations",
19136 ),
19137 );
19138 }
19139 result.incremental_post_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19140 }
19141 __FieldTag::Unknown(key) => {
19142 let value = map.next_value::<serde_json::Value>()?;
19143 result._unknown_fields.insert(key, value);
19144 }
19145 }
19146 }
19147 std::result::Result::Ok(result)
19148 }
19149 }
19150 deserializer.deserialize_any(Visitor)
19151 }
19152 }
19153
19154 #[doc(hidden)]
19155 impl serde::ser::Serialize for IncrementalTableConfig {
19156 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19157 where
19158 S: serde::ser::Serializer,
19159 {
19160 use serde::ser::SerializeMap;
19161 #[allow(unused_imports)]
19162 use std::option::Option::Some;
19163 let mut state = serializer.serialize_map(std::option::Option::None)?;
19164 if !self.incremental_select_query.is_empty() {
19165 state.serialize_entry(
19166 "incrementalSelectQuery",
19167 &self.incremental_select_query,
19168 )?;
19169 }
19170 if !wkt::internal::is_default(&self.refresh_disabled) {
19171 state.serialize_entry("refreshDisabled", &self.refresh_disabled)?;
19172 }
19173 if !self.unique_key_parts.is_empty() {
19174 state.serialize_entry("uniqueKeyParts", &self.unique_key_parts)?;
19175 }
19176 if !self.update_partition_filter.is_empty() {
19177 state
19178 .serialize_entry("updatePartitionFilter", &self.update_partition_filter)?;
19179 }
19180 if !self.incremental_pre_operations.is_empty() {
19181 state.serialize_entry(
19182 "incrementalPreOperations",
19183 &self.incremental_pre_operations,
19184 )?;
19185 }
19186 if !self.incremental_post_operations.is_empty() {
19187 state.serialize_entry(
19188 "incrementalPostOperations",
19189 &self.incremental_post_operations,
19190 )?;
19191 }
19192 if !self._unknown_fields.is_empty() {
19193 for (key, value) in self._unknown_fields.iter() {
19194 state.serialize_entry(key, &value)?;
19195 }
19196 }
19197 state.end()
19198 }
19199 }
19200
19201 #[derive(Clone, Debug, PartialEq)]
19217 #[non_exhaustive]
19218 pub enum RelationType {
19219 Unspecified,
19221 Table,
19223 View,
19225 IncrementalTable,
19227 MaterializedView,
19229 UnknownValue(relation_type::UnknownValue),
19234 }
19235
19236 #[doc(hidden)]
19237 pub mod relation_type {
19238 #[allow(unused_imports)]
19239 use super::*;
19240 #[derive(Clone, Debug, PartialEq)]
19241 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19242 }
19243
19244 impl RelationType {
19245 pub fn value(&self) -> std::option::Option<i32> {
19250 match self {
19251 Self::Unspecified => std::option::Option::Some(0),
19252 Self::Table => std::option::Option::Some(1),
19253 Self::View => std::option::Option::Some(2),
19254 Self::IncrementalTable => std::option::Option::Some(3),
19255 Self::MaterializedView => std::option::Option::Some(4),
19256 Self::UnknownValue(u) => u.0.value(),
19257 }
19258 }
19259
19260 pub fn name(&self) -> std::option::Option<&str> {
19265 match self {
19266 Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
19267 Self::Table => std::option::Option::Some("TABLE"),
19268 Self::View => std::option::Option::Some("VIEW"),
19269 Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
19270 Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
19271 Self::UnknownValue(u) => u.0.name(),
19272 }
19273 }
19274 }
19275
19276 impl std::default::Default for RelationType {
19277 fn default() -> Self {
19278 use std::convert::From;
19279 Self::from(0)
19280 }
19281 }
19282
19283 impl std::fmt::Display for RelationType {
19284 fn fmt(
19285 &self,
19286 f: &mut std::fmt::Formatter<'_>,
19287 ) -> std::result::Result<(), std::fmt::Error> {
19288 wkt::internal::display_enum(f, self.name(), self.value())
19289 }
19290 }
19291
19292 impl std::convert::From<i32> for RelationType {
19293 fn from(value: i32) -> Self {
19294 match value {
19295 0 => Self::Unspecified,
19296 1 => Self::Table,
19297 2 => Self::View,
19298 3 => Self::IncrementalTable,
19299 4 => Self::MaterializedView,
19300 _ => Self::UnknownValue(relation_type::UnknownValue(
19301 wkt::internal::UnknownEnumValue::Integer(value),
19302 )),
19303 }
19304 }
19305 }
19306
19307 impl std::convert::From<&str> for RelationType {
19308 fn from(value: &str) -> Self {
19309 use std::string::ToString;
19310 match value {
19311 "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
19312 "TABLE" => Self::Table,
19313 "VIEW" => Self::View,
19314 "INCREMENTAL_TABLE" => Self::IncrementalTable,
19315 "MATERIALIZED_VIEW" => Self::MaterializedView,
19316 _ => Self::UnknownValue(relation_type::UnknownValue(
19317 wkt::internal::UnknownEnumValue::String(value.to_string()),
19318 )),
19319 }
19320 }
19321 }
19322
19323 impl serde::ser::Serialize for RelationType {
19324 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19325 where
19326 S: serde::Serializer,
19327 {
19328 match self {
19329 Self::Unspecified => serializer.serialize_i32(0),
19330 Self::Table => serializer.serialize_i32(1),
19331 Self::View => serializer.serialize_i32(2),
19332 Self::IncrementalTable => serializer.serialize_i32(3),
19333 Self::MaterializedView => serializer.serialize_i32(4),
19334 Self::UnknownValue(u) => u.0.serialize(serializer),
19335 }
19336 }
19337 }
19338
19339 impl<'de> serde::de::Deserialize<'de> for RelationType {
19340 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19341 where
19342 D: serde::Deserializer<'de>,
19343 {
19344 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
19345 ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
19346 ))
19347 }
19348 }
19349 }
19350
19351 #[derive(Clone, Debug, Default, PartialEq)]
19353 #[non_exhaustive]
19354 pub struct Operations {
19355 pub dependency_targets: std::vec::Vec<crate::model::Target>,
19357
19358 pub disabled: bool,
19360
19361 pub tags: std::vec::Vec<std::string::String>,
19363
19364 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
19367
19368 pub queries: std::vec::Vec<std::string::String>,
19371
19372 pub has_output: bool,
19374
19375 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19376 }
19377
19378 impl Operations {
19379 pub fn new() -> Self {
19380 std::default::Default::default()
19381 }
19382
19383 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
19385 where
19386 T: std::iter::IntoIterator<Item = V>,
19387 V: std::convert::Into<crate::model::Target>,
19388 {
19389 use std::iter::Iterator;
19390 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
19391 self
19392 }
19393
19394 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19396 self.disabled = v.into();
19397 self
19398 }
19399
19400 pub fn set_tags<T, V>(mut self, v: T) -> Self
19402 where
19403 T: std::iter::IntoIterator<Item = V>,
19404 V: std::convert::Into<std::string::String>,
19405 {
19406 use std::iter::Iterator;
19407 self.tags = v.into_iter().map(|i| i.into()).collect();
19408 self
19409 }
19410
19411 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
19413 where
19414 T: std::convert::Into<crate::model::RelationDescriptor>,
19415 {
19416 self.relation_descriptor = std::option::Option::Some(v.into());
19417 self
19418 }
19419
19420 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
19422 where
19423 T: std::convert::Into<crate::model::RelationDescriptor>,
19424 {
19425 self.relation_descriptor = v.map(|x| x.into());
19426 self
19427 }
19428
19429 pub fn set_queries<T, V>(mut self, v: T) -> Self
19431 where
19432 T: std::iter::IntoIterator<Item = V>,
19433 V: std::convert::Into<std::string::String>,
19434 {
19435 use std::iter::Iterator;
19436 self.queries = v.into_iter().map(|i| i.into()).collect();
19437 self
19438 }
19439
19440 pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19442 self.has_output = v.into();
19443 self
19444 }
19445 }
19446
19447 impl wkt::message::Message for Operations {
19448 fn typename() -> &'static str {
19449 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
19450 }
19451 }
19452
19453 #[doc(hidden)]
19454 impl<'de> serde::de::Deserialize<'de> for Operations {
19455 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19456 where
19457 D: serde::Deserializer<'de>,
19458 {
19459 #[allow(non_camel_case_types)]
19460 #[doc(hidden)]
19461 #[derive(PartialEq, Eq, Hash)]
19462 enum __FieldTag {
19463 __dependency_targets,
19464 __disabled,
19465 __tags,
19466 __relation_descriptor,
19467 __queries,
19468 __has_output,
19469 Unknown(std::string::String),
19470 }
19471 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
19472 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19473 where
19474 D: serde::Deserializer<'de>,
19475 {
19476 struct Visitor;
19477 impl<'de> serde::de::Visitor<'de> for Visitor {
19478 type Value = __FieldTag;
19479 fn expecting(
19480 &self,
19481 formatter: &mut std::fmt::Formatter,
19482 ) -> std::fmt::Result {
19483 formatter.write_str("a field name for Operations")
19484 }
19485 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
19486 where
19487 E: serde::de::Error,
19488 {
19489 use std::result::Result::Ok;
19490 use std::string::ToString;
19491 match value {
19492 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
19493 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
19494 "disabled" => Ok(__FieldTag::__disabled),
19495 "tags" => Ok(__FieldTag::__tags),
19496 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
19497 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
19498 "queries" => Ok(__FieldTag::__queries),
19499 "hasOutput" => Ok(__FieldTag::__has_output),
19500 "has_output" => Ok(__FieldTag::__has_output),
19501 _ => Ok(__FieldTag::Unknown(value.to_string())),
19502 }
19503 }
19504 }
19505 deserializer.deserialize_identifier(Visitor)
19506 }
19507 }
19508 struct Visitor;
19509 impl<'de> serde::de::Visitor<'de> for Visitor {
19510 type Value = Operations;
19511 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19512 formatter.write_str("struct Operations")
19513 }
19514 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
19515 where
19516 A: serde::de::MapAccess<'de>,
19517 {
19518 #[allow(unused_imports)]
19519 use serde::de::Error;
19520 use std::option::Option::Some;
19521 let mut fields = std::collections::HashSet::new();
19522 let mut result = Self::Value::new();
19523 while let Some(tag) = map.next_key::<__FieldTag>()? {
19524 #[allow(clippy::match_single_binding)]
19525 match tag {
19526 __FieldTag::__dependency_targets => {
19527 if !fields.insert(__FieldTag::__dependency_targets) {
19528 return std::result::Result::Err(A::Error::duplicate_field(
19529 "multiple values for dependency_targets",
19530 ));
19531 }
19532 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
19533 }
19534 __FieldTag::__disabled => {
19535 if !fields.insert(__FieldTag::__disabled) {
19536 return std::result::Result::Err(A::Error::duplicate_field(
19537 "multiple values for disabled",
19538 ));
19539 }
19540 result.disabled = map
19541 .next_value::<std::option::Option<bool>>()?
19542 .unwrap_or_default();
19543 }
19544 __FieldTag::__tags => {
19545 if !fields.insert(__FieldTag::__tags) {
19546 return std::result::Result::Err(A::Error::duplicate_field(
19547 "multiple values for tags",
19548 ));
19549 }
19550 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19551 }
19552 __FieldTag::__relation_descriptor => {
19553 if !fields.insert(__FieldTag::__relation_descriptor) {
19554 return std::result::Result::Err(A::Error::duplicate_field(
19555 "multiple values for relation_descriptor",
19556 ));
19557 }
19558 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
19559 ;
19560 }
19561 __FieldTag::__queries => {
19562 if !fields.insert(__FieldTag::__queries) {
19563 return std::result::Result::Err(A::Error::duplicate_field(
19564 "multiple values for queries",
19565 ));
19566 }
19567 result.queries = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19568 }
19569 __FieldTag::__has_output => {
19570 if !fields.insert(__FieldTag::__has_output) {
19571 return std::result::Result::Err(A::Error::duplicate_field(
19572 "multiple values for has_output",
19573 ));
19574 }
19575 result.has_output = map
19576 .next_value::<std::option::Option<bool>>()?
19577 .unwrap_or_default();
19578 }
19579 __FieldTag::Unknown(key) => {
19580 let value = map.next_value::<serde_json::Value>()?;
19581 result._unknown_fields.insert(key, value);
19582 }
19583 }
19584 }
19585 std::result::Result::Ok(result)
19586 }
19587 }
19588 deserializer.deserialize_any(Visitor)
19589 }
19590 }
19591
19592 #[doc(hidden)]
19593 impl serde::ser::Serialize for Operations {
19594 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19595 where
19596 S: serde::ser::Serializer,
19597 {
19598 use serde::ser::SerializeMap;
19599 #[allow(unused_imports)]
19600 use std::option::Option::Some;
19601 let mut state = serializer.serialize_map(std::option::Option::None)?;
19602 if !self.dependency_targets.is_empty() {
19603 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
19604 }
19605 if !wkt::internal::is_default(&self.disabled) {
19606 state.serialize_entry("disabled", &self.disabled)?;
19607 }
19608 if !self.tags.is_empty() {
19609 state.serialize_entry("tags", &self.tags)?;
19610 }
19611 if self.relation_descriptor.is_some() {
19612 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
19613 }
19614 if !self.queries.is_empty() {
19615 state.serialize_entry("queries", &self.queries)?;
19616 }
19617 if !wkt::internal::is_default(&self.has_output) {
19618 state.serialize_entry("hasOutput", &self.has_output)?;
19619 }
19620 if !self._unknown_fields.is_empty() {
19621 for (key, value) in self._unknown_fields.iter() {
19622 state.serialize_entry(key, &value)?;
19623 }
19624 }
19625 state.end()
19626 }
19627 }
19628
19629 #[derive(Clone, Debug, Default, PartialEq)]
19632 #[non_exhaustive]
19633 pub struct Assertion {
19634 pub dependency_targets: std::vec::Vec<crate::model::Target>,
19636
19637 pub parent_action: std::option::Option<crate::model::Target>,
19640
19641 pub disabled: bool,
19643
19644 pub tags: std::vec::Vec<std::string::String>,
19646
19647 pub select_query: std::string::String,
19650
19651 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
19654
19655 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19656 }
19657
19658 impl Assertion {
19659 pub fn new() -> Self {
19660 std::default::Default::default()
19661 }
19662
19663 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
19665 where
19666 T: std::iter::IntoIterator<Item = V>,
19667 V: std::convert::Into<crate::model::Target>,
19668 {
19669 use std::iter::Iterator;
19670 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
19671 self
19672 }
19673
19674 pub fn set_parent_action<T>(mut self, v: T) -> Self
19676 where
19677 T: std::convert::Into<crate::model::Target>,
19678 {
19679 self.parent_action = std::option::Option::Some(v.into());
19680 self
19681 }
19682
19683 pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
19685 where
19686 T: std::convert::Into<crate::model::Target>,
19687 {
19688 self.parent_action = v.map(|x| x.into());
19689 self
19690 }
19691
19692 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19694 self.disabled = v.into();
19695 self
19696 }
19697
19698 pub fn set_tags<T, V>(mut self, v: T) -> Self
19700 where
19701 T: std::iter::IntoIterator<Item = V>,
19702 V: std::convert::Into<std::string::String>,
19703 {
19704 use std::iter::Iterator;
19705 self.tags = v.into_iter().map(|i| i.into()).collect();
19706 self
19707 }
19708
19709 pub fn set_select_query<T: std::convert::Into<std::string::String>>(
19711 mut self,
19712 v: T,
19713 ) -> Self {
19714 self.select_query = v.into();
19715 self
19716 }
19717
19718 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
19720 where
19721 T: std::convert::Into<crate::model::RelationDescriptor>,
19722 {
19723 self.relation_descriptor = std::option::Option::Some(v.into());
19724 self
19725 }
19726
19727 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
19729 where
19730 T: std::convert::Into<crate::model::RelationDescriptor>,
19731 {
19732 self.relation_descriptor = v.map(|x| x.into());
19733 self
19734 }
19735 }
19736
19737 impl wkt::message::Message for Assertion {
19738 fn typename() -> &'static str {
19739 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
19740 }
19741 }
19742
19743 #[doc(hidden)]
19744 impl<'de> serde::de::Deserialize<'de> for Assertion {
19745 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19746 where
19747 D: serde::Deserializer<'de>,
19748 {
19749 #[allow(non_camel_case_types)]
19750 #[doc(hidden)]
19751 #[derive(PartialEq, Eq, Hash)]
19752 enum __FieldTag {
19753 __dependency_targets,
19754 __parent_action,
19755 __disabled,
19756 __tags,
19757 __select_query,
19758 __relation_descriptor,
19759 Unknown(std::string::String),
19760 }
19761 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
19762 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19763 where
19764 D: serde::Deserializer<'de>,
19765 {
19766 struct Visitor;
19767 impl<'de> serde::de::Visitor<'de> for Visitor {
19768 type Value = __FieldTag;
19769 fn expecting(
19770 &self,
19771 formatter: &mut std::fmt::Formatter,
19772 ) -> std::fmt::Result {
19773 formatter.write_str("a field name for Assertion")
19774 }
19775 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
19776 where
19777 E: serde::de::Error,
19778 {
19779 use std::result::Result::Ok;
19780 use std::string::ToString;
19781 match value {
19782 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
19783 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
19784 "parentAction" => Ok(__FieldTag::__parent_action),
19785 "parent_action" => Ok(__FieldTag::__parent_action),
19786 "disabled" => Ok(__FieldTag::__disabled),
19787 "tags" => Ok(__FieldTag::__tags),
19788 "selectQuery" => Ok(__FieldTag::__select_query),
19789 "select_query" => Ok(__FieldTag::__select_query),
19790 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
19791 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
19792 _ => Ok(__FieldTag::Unknown(value.to_string())),
19793 }
19794 }
19795 }
19796 deserializer.deserialize_identifier(Visitor)
19797 }
19798 }
19799 struct Visitor;
19800 impl<'de> serde::de::Visitor<'de> for Visitor {
19801 type Value = Assertion;
19802 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19803 formatter.write_str("struct Assertion")
19804 }
19805 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
19806 where
19807 A: serde::de::MapAccess<'de>,
19808 {
19809 #[allow(unused_imports)]
19810 use serde::de::Error;
19811 use std::option::Option::Some;
19812 let mut fields = std::collections::HashSet::new();
19813 let mut result = Self::Value::new();
19814 while let Some(tag) = map.next_key::<__FieldTag>()? {
19815 #[allow(clippy::match_single_binding)]
19816 match tag {
19817 __FieldTag::__dependency_targets => {
19818 if !fields.insert(__FieldTag::__dependency_targets) {
19819 return std::result::Result::Err(A::Error::duplicate_field(
19820 "multiple values for dependency_targets",
19821 ));
19822 }
19823 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
19824 }
19825 __FieldTag::__parent_action => {
19826 if !fields.insert(__FieldTag::__parent_action) {
19827 return std::result::Result::Err(A::Error::duplicate_field(
19828 "multiple values for parent_action",
19829 ));
19830 }
19831 result.parent_action =
19832 map.next_value::<std::option::Option<crate::model::Target>>()?;
19833 }
19834 __FieldTag::__disabled => {
19835 if !fields.insert(__FieldTag::__disabled) {
19836 return std::result::Result::Err(A::Error::duplicate_field(
19837 "multiple values for disabled",
19838 ));
19839 }
19840 result.disabled = map
19841 .next_value::<std::option::Option<bool>>()?
19842 .unwrap_or_default();
19843 }
19844 __FieldTag::__tags => {
19845 if !fields.insert(__FieldTag::__tags) {
19846 return std::result::Result::Err(A::Error::duplicate_field(
19847 "multiple values for tags",
19848 ));
19849 }
19850 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19851 }
19852 __FieldTag::__select_query => {
19853 if !fields.insert(__FieldTag::__select_query) {
19854 return std::result::Result::Err(A::Error::duplicate_field(
19855 "multiple values for select_query",
19856 ));
19857 }
19858 result.select_query = map
19859 .next_value::<std::option::Option<std::string::String>>()?
19860 .unwrap_or_default();
19861 }
19862 __FieldTag::__relation_descriptor => {
19863 if !fields.insert(__FieldTag::__relation_descriptor) {
19864 return std::result::Result::Err(A::Error::duplicate_field(
19865 "multiple values for relation_descriptor",
19866 ));
19867 }
19868 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
19869 ;
19870 }
19871 __FieldTag::Unknown(key) => {
19872 let value = map.next_value::<serde_json::Value>()?;
19873 result._unknown_fields.insert(key, value);
19874 }
19875 }
19876 }
19877 std::result::Result::Ok(result)
19878 }
19879 }
19880 deserializer.deserialize_any(Visitor)
19881 }
19882 }
19883
19884 #[doc(hidden)]
19885 impl serde::ser::Serialize for Assertion {
19886 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19887 where
19888 S: serde::ser::Serializer,
19889 {
19890 use serde::ser::SerializeMap;
19891 #[allow(unused_imports)]
19892 use std::option::Option::Some;
19893 let mut state = serializer.serialize_map(std::option::Option::None)?;
19894 if !self.dependency_targets.is_empty() {
19895 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
19896 }
19897 if self.parent_action.is_some() {
19898 state.serialize_entry("parentAction", &self.parent_action)?;
19899 }
19900 if !wkt::internal::is_default(&self.disabled) {
19901 state.serialize_entry("disabled", &self.disabled)?;
19902 }
19903 if !self.tags.is_empty() {
19904 state.serialize_entry("tags", &self.tags)?;
19905 }
19906 if !self.select_query.is_empty() {
19907 state.serialize_entry("selectQuery", &self.select_query)?;
19908 }
19909 if self.relation_descriptor.is_some() {
19910 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
19911 }
19912 if !self._unknown_fields.is_empty() {
19913 for (key, value) in self._unknown_fields.iter() {
19914 state.serialize_entry(key, &value)?;
19915 }
19916 }
19917 state.end()
19918 }
19919 }
19920
19921 #[derive(Clone, Debug, Default, PartialEq)]
19924 #[non_exhaustive]
19925 pub struct Declaration {
19926 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
19929
19930 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19931 }
19932
19933 impl Declaration {
19934 pub fn new() -> Self {
19935 std::default::Default::default()
19936 }
19937
19938 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
19940 where
19941 T: std::convert::Into<crate::model::RelationDescriptor>,
19942 {
19943 self.relation_descriptor = std::option::Option::Some(v.into());
19944 self
19945 }
19946
19947 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
19949 where
19950 T: std::convert::Into<crate::model::RelationDescriptor>,
19951 {
19952 self.relation_descriptor = v.map(|x| x.into());
19953 self
19954 }
19955 }
19956
19957 impl wkt::message::Message for Declaration {
19958 fn typename() -> &'static str {
19959 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
19960 }
19961 }
19962
19963 #[doc(hidden)]
19964 impl<'de> serde::de::Deserialize<'de> for Declaration {
19965 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19966 where
19967 D: serde::Deserializer<'de>,
19968 {
19969 #[allow(non_camel_case_types)]
19970 #[doc(hidden)]
19971 #[derive(PartialEq, Eq, Hash)]
19972 enum __FieldTag {
19973 __relation_descriptor,
19974 Unknown(std::string::String),
19975 }
19976 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
19977 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19978 where
19979 D: serde::Deserializer<'de>,
19980 {
19981 struct Visitor;
19982 impl<'de> serde::de::Visitor<'de> for Visitor {
19983 type Value = __FieldTag;
19984 fn expecting(
19985 &self,
19986 formatter: &mut std::fmt::Formatter,
19987 ) -> std::fmt::Result {
19988 formatter.write_str("a field name for Declaration")
19989 }
19990 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
19991 where
19992 E: serde::de::Error,
19993 {
19994 use std::result::Result::Ok;
19995 use std::string::ToString;
19996 match value {
19997 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
19998 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
19999 _ => Ok(__FieldTag::Unknown(value.to_string())),
20000 }
20001 }
20002 }
20003 deserializer.deserialize_identifier(Visitor)
20004 }
20005 }
20006 struct Visitor;
20007 impl<'de> serde::de::Visitor<'de> for Visitor {
20008 type Value = Declaration;
20009 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20010 formatter.write_str("struct Declaration")
20011 }
20012 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
20013 where
20014 A: serde::de::MapAccess<'de>,
20015 {
20016 #[allow(unused_imports)]
20017 use serde::de::Error;
20018 use std::option::Option::Some;
20019 let mut fields = std::collections::HashSet::new();
20020 let mut result = Self::Value::new();
20021 while let Some(tag) = map.next_key::<__FieldTag>()? {
20022 #[allow(clippy::match_single_binding)]
20023 match tag {
20024 __FieldTag::__relation_descriptor => {
20025 if !fields.insert(__FieldTag::__relation_descriptor) {
20026 return std::result::Result::Err(A::Error::duplicate_field(
20027 "multiple values for relation_descriptor",
20028 ));
20029 }
20030 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
20031 ;
20032 }
20033 __FieldTag::Unknown(key) => {
20034 let value = map.next_value::<serde_json::Value>()?;
20035 result._unknown_fields.insert(key, value);
20036 }
20037 }
20038 }
20039 std::result::Result::Ok(result)
20040 }
20041 }
20042 deserializer.deserialize_any(Visitor)
20043 }
20044 }
20045
20046 #[doc(hidden)]
20047 impl serde::ser::Serialize for Declaration {
20048 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20049 where
20050 S: serde::ser::Serializer,
20051 {
20052 use serde::ser::SerializeMap;
20053 #[allow(unused_imports)]
20054 use std::option::Option::Some;
20055 let mut state = serializer.serialize_map(std::option::Option::None)?;
20056 if self.relation_descriptor.is_some() {
20057 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
20058 }
20059 if !self._unknown_fields.is_empty() {
20060 for (key, value) in self._unknown_fields.iter() {
20061 state.serialize_entry(key, &value)?;
20062 }
20063 }
20064 state.end()
20065 }
20066 }
20067
20068 #[derive(Clone, Debug, Default, PartialEq)]
20070 #[non_exhaustive]
20071 pub struct Notebook {
20072 pub dependency_targets: std::vec::Vec<crate::model::Target>,
20074
20075 pub disabled: bool,
20077
20078 pub contents: std::string::String,
20080
20081 pub tags: std::vec::Vec<std::string::String>,
20083
20084 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20085 }
20086
20087 impl Notebook {
20088 pub fn new() -> Self {
20089 std::default::Default::default()
20090 }
20091
20092 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
20094 where
20095 T: std::iter::IntoIterator<Item = V>,
20096 V: std::convert::Into<crate::model::Target>,
20097 {
20098 use std::iter::Iterator;
20099 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
20100 self
20101 }
20102
20103 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20105 self.disabled = v.into();
20106 self
20107 }
20108
20109 pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20111 self.contents = v.into();
20112 self
20113 }
20114
20115 pub fn set_tags<T, V>(mut self, v: T) -> Self
20117 where
20118 T: std::iter::IntoIterator<Item = V>,
20119 V: std::convert::Into<std::string::String>,
20120 {
20121 use std::iter::Iterator;
20122 self.tags = v.into_iter().map(|i| i.into()).collect();
20123 self
20124 }
20125 }
20126
20127 impl wkt::message::Message for Notebook {
20128 fn typename() -> &'static str {
20129 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
20130 }
20131 }
20132
20133 #[doc(hidden)]
20134 impl<'de> serde::de::Deserialize<'de> for Notebook {
20135 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20136 where
20137 D: serde::Deserializer<'de>,
20138 {
20139 #[allow(non_camel_case_types)]
20140 #[doc(hidden)]
20141 #[derive(PartialEq, Eq, Hash)]
20142 enum __FieldTag {
20143 __dependency_targets,
20144 __disabled,
20145 __contents,
20146 __tags,
20147 Unknown(std::string::String),
20148 }
20149 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
20150 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20151 where
20152 D: serde::Deserializer<'de>,
20153 {
20154 struct Visitor;
20155 impl<'de> serde::de::Visitor<'de> for Visitor {
20156 type Value = __FieldTag;
20157 fn expecting(
20158 &self,
20159 formatter: &mut std::fmt::Formatter,
20160 ) -> std::fmt::Result {
20161 formatter.write_str("a field name for Notebook")
20162 }
20163 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
20164 where
20165 E: serde::de::Error,
20166 {
20167 use std::result::Result::Ok;
20168 use std::string::ToString;
20169 match value {
20170 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
20171 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
20172 "disabled" => Ok(__FieldTag::__disabled),
20173 "contents" => Ok(__FieldTag::__contents),
20174 "tags" => Ok(__FieldTag::__tags),
20175 _ => Ok(__FieldTag::Unknown(value.to_string())),
20176 }
20177 }
20178 }
20179 deserializer.deserialize_identifier(Visitor)
20180 }
20181 }
20182 struct Visitor;
20183 impl<'de> serde::de::Visitor<'de> for Visitor {
20184 type Value = Notebook;
20185 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20186 formatter.write_str("struct Notebook")
20187 }
20188 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
20189 where
20190 A: serde::de::MapAccess<'de>,
20191 {
20192 #[allow(unused_imports)]
20193 use serde::de::Error;
20194 use std::option::Option::Some;
20195 let mut fields = std::collections::HashSet::new();
20196 let mut result = Self::Value::new();
20197 while let Some(tag) = map.next_key::<__FieldTag>()? {
20198 #[allow(clippy::match_single_binding)]
20199 match tag {
20200 __FieldTag::__dependency_targets => {
20201 if !fields.insert(__FieldTag::__dependency_targets) {
20202 return std::result::Result::Err(A::Error::duplicate_field(
20203 "multiple values for dependency_targets",
20204 ));
20205 }
20206 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
20207 }
20208 __FieldTag::__disabled => {
20209 if !fields.insert(__FieldTag::__disabled) {
20210 return std::result::Result::Err(A::Error::duplicate_field(
20211 "multiple values for disabled",
20212 ));
20213 }
20214 result.disabled = map
20215 .next_value::<std::option::Option<bool>>()?
20216 .unwrap_or_default();
20217 }
20218 __FieldTag::__contents => {
20219 if !fields.insert(__FieldTag::__contents) {
20220 return std::result::Result::Err(A::Error::duplicate_field(
20221 "multiple values for contents",
20222 ));
20223 }
20224 result.contents = map
20225 .next_value::<std::option::Option<std::string::String>>()?
20226 .unwrap_or_default();
20227 }
20228 __FieldTag::__tags => {
20229 if !fields.insert(__FieldTag::__tags) {
20230 return std::result::Result::Err(A::Error::duplicate_field(
20231 "multiple values for tags",
20232 ));
20233 }
20234 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
20235 }
20236 __FieldTag::Unknown(key) => {
20237 let value = map.next_value::<serde_json::Value>()?;
20238 result._unknown_fields.insert(key, value);
20239 }
20240 }
20241 }
20242 std::result::Result::Ok(result)
20243 }
20244 }
20245 deserializer.deserialize_any(Visitor)
20246 }
20247 }
20248
20249 #[doc(hidden)]
20250 impl serde::ser::Serialize for Notebook {
20251 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20252 where
20253 S: serde::ser::Serializer,
20254 {
20255 use serde::ser::SerializeMap;
20256 #[allow(unused_imports)]
20257 use std::option::Option::Some;
20258 let mut state = serializer.serialize_map(std::option::Option::None)?;
20259 if !self.dependency_targets.is_empty() {
20260 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
20261 }
20262 if !wkt::internal::is_default(&self.disabled) {
20263 state.serialize_entry("disabled", &self.disabled)?;
20264 }
20265 if !self.contents.is_empty() {
20266 state.serialize_entry("contents", &self.contents)?;
20267 }
20268 if !self.tags.is_empty() {
20269 state.serialize_entry("tags", &self.tags)?;
20270 }
20271 if !self._unknown_fields.is_empty() {
20272 for (key, value) in self._unknown_fields.iter() {
20273 state.serialize_entry(key, &value)?;
20274 }
20275 }
20276 state.end()
20277 }
20278 }
20279
20280 #[derive(Clone, Debug, Default, PartialEq)]
20282 #[non_exhaustive]
20283 pub struct DataPreparation {
20284 pub dependency_targets: std::vec::Vec<crate::model::Target>,
20286
20287 pub disabled: bool,
20289
20290 pub tags: std::vec::Vec<std::string::String>,
20292
20293 pub definition: std::option::Option<
20295 crate::model::compilation_result_action::data_preparation::Definition,
20296 >,
20297
20298 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20299 }
20300
20301 impl DataPreparation {
20302 pub fn new() -> Self {
20303 std::default::Default::default()
20304 }
20305
20306 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
20308 where
20309 T: std::iter::IntoIterator<Item = V>,
20310 V: std::convert::Into<crate::model::Target>,
20311 {
20312 use std::iter::Iterator;
20313 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
20314 self
20315 }
20316
20317 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20319 self.disabled = v.into();
20320 self
20321 }
20322
20323 pub fn set_tags<T, V>(mut self, v: T) -> Self
20325 where
20326 T: std::iter::IntoIterator<Item = V>,
20327 V: std::convert::Into<std::string::String>,
20328 {
20329 use std::iter::Iterator;
20330 self.tags = v.into_iter().map(|i| i.into()).collect();
20331 self
20332 }
20333
20334 pub fn set_definition<
20339 T: std::convert::Into<
20340 std::option::Option<
20341 crate::model::compilation_result_action::data_preparation::Definition,
20342 >,
20343 >,
20344 >(
20345 mut self,
20346 v: T,
20347 ) -> Self {
20348 self.definition = v.into();
20349 self
20350 }
20351
20352 pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
20356 #[allow(unreachable_patterns)]
20357 self.definition.as_ref().and_then(|v| match v {
20358 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
20359 _ => std::option::Option::None,
20360 })
20361 }
20362
20363 pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
20369 mut self,
20370 v: T,
20371 ) -> Self {
20372 self.definition = std::option::Option::Some(
20373 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
20374 v.into(),
20375 ),
20376 );
20377 self
20378 }
20379
20380 pub fn contents_sql(
20384 &self,
20385 ) -> std::option::Option<
20386 &std::boxed::Box<
20387 crate::model::compilation_result_action::data_preparation::SqlDefinition,
20388 >,
20389 > {
20390 #[allow(unreachable_patterns)]
20391 self.definition.as_ref().and_then(|v| match v {
20392 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
20393 _ => std::option::Option::None,
20394 })
20395 }
20396
20397 pub fn set_contents_sql<
20403 T: std::convert::Into<
20404 std::boxed::Box<
20405 crate::model::compilation_result_action::data_preparation::SqlDefinition,
20406 >,
20407 >,
20408 >(
20409 mut self,
20410 v: T,
20411 ) -> Self {
20412 self.definition = std::option::Option::Some(
20413 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
20414 v.into(),
20415 ),
20416 );
20417 self
20418 }
20419 }
20420
20421 impl wkt::message::Message for DataPreparation {
20422 fn typename() -> &'static str {
20423 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
20424 }
20425 }
20426
20427 #[doc(hidden)]
20428 impl<'de> serde::de::Deserialize<'de> for DataPreparation {
20429 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20430 where
20431 D: serde::Deserializer<'de>,
20432 {
20433 #[allow(non_camel_case_types)]
20434 #[doc(hidden)]
20435 #[derive(PartialEq, Eq, Hash)]
20436 enum __FieldTag {
20437 __contents_yaml,
20438 __contents_sql,
20439 __dependency_targets,
20440 __disabled,
20441 __tags,
20442 Unknown(std::string::String),
20443 }
20444 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
20445 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20446 where
20447 D: serde::Deserializer<'de>,
20448 {
20449 struct Visitor;
20450 impl<'de> serde::de::Visitor<'de> for Visitor {
20451 type Value = __FieldTag;
20452 fn expecting(
20453 &self,
20454 formatter: &mut std::fmt::Formatter,
20455 ) -> std::fmt::Result {
20456 formatter.write_str("a field name for DataPreparation")
20457 }
20458 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
20459 where
20460 E: serde::de::Error,
20461 {
20462 use std::result::Result::Ok;
20463 use std::string::ToString;
20464 match value {
20465 "contentsYaml" => Ok(__FieldTag::__contents_yaml),
20466 "contents_yaml" => Ok(__FieldTag::__contents_yaml),
20467 "contentsSql" => Ok(__FieldTag::__contents_sql),
20468 "contents_sql" => Ok(__FieldTag::__contents_sql),
20469 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
20470 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
20471 "disabled" => Ok(__FieldTag::__disabled),
20472 "tags" => Ok(__FieldTag::__tags),
20473 _ => Ok(__FieldTag::Unknown(value.to_string())),
20474 }
20475 }
20476 }
20477 deserializer.deserialize_identifier(Visitor)
20478 }
20479 }
20480 struct Visitor;
20481 impl<'de> serde::de::Visitor<'de> for Visitor {
20482 type Value = DataPreparation;
20483 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20484 formatter.write_str("struct DataPreparation")
20485 }
20486 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
20487 where
20488 A: serde::de::MapAccess<'de>,
20489 {
20490 #[allow(unused_imports)]
20491 use serde::de::Error;
20492 use std::option::Option::Some;
20493 let mut fields = std::collections::HashSet::new();
20494 let mut result = Self::Value::new();
20495 while let Some(tag) = map.next_key::<__FieldTag>()? {
20496 #[allow(clippy::match_single_binding)]
20497 match tag {
20498 __FieldTag::__contents_yaml => {
20499 if !fields.insert(__FieldTag::__contents_yaml) {
20500 return std::result::Result::Err(A::Error::duplicate_field(
20501 "multiple values for contents_yaml",
20502 ));
20503 }
20504 if result.definition.is_some() {
20505 return std::result::Result::Err(A::Error::duplicate_field(
20506 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.DataPreparation.contents_yaml, latest field was contentsYaml",
20507 ));
20508 }
20509 result.definition = std::option::Option::Some(
20510 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
20511 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
20512 ),
20513 );
20514 }
20515 __FieldTag::__contents_sql => {
20516 if !fields.insert(__FieldTag::__contents_sql) {
20517 return std::result::Result::Err(A::Error::duplicate_field(
20518 "multiple values for contents_sql",
20519 ));
20520 }
20521 if result.definition.is_some() {
20522 return std::result::Result::Err(A::Error::duplicate_field(
20523 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.DataPreparation.contents_sql, latest field was contentsSql",
20524 ));
20525 }
20526 result.definition = std::option::Option::Some(
20527 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
20528 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::data_preparation::SqlDefinition>>>()?.unwrap_or_default()
20529 ),
20530 );
20531 }
20532 __FieldTag::__dependency_targets => {
20533 if !fields.insert(__FieldTag::__dependency_targets) {
20534 return std::result::Result::Err(A::Error::duplicate_field(
20535 "multiple values for dependency_targets",
20536 ));
20537 }
20538 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
20539 }
20540 __FieldTag::__disabled => {
20541 if !fields.insert(__FieldTag::__disabled) {
20542 return std::result::Result::Err(A::Error::duplicate_field(
20543 "multiple values for disabled",
20544 ));
20545 }
20546 result.disabled = map
20547 .next_value::<std::option::Option<bool>>()?
20548 .unwrap_or_default();
20549 }
20550 __FieldTag::__tags => {
20551 if !fields.insert(__FieldTag::__tags) {
20552 return std::result::Result::Err(A::Error::duplicate_field(
20553 "multiple values for tags",
20554 ));
20555 }
20556 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
20557 }
20558 __FieldTag::Unknown(key) => {
20559 let value = map.next_value::<serde_json::Value>()?;
20560 result._unknown_fields.insert(key, value);
20561 }
20562 }
20563 }
20564 std::result::Result::Ok(result)
20565 }
20566 }
20567 deserializer.deserialize_any(Visitor)
20568 }
20569 }
20570
20571 #[doc(hidden)]
20572 impl serde::ser::Serialize for DataPreparation {
20573 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20574 where
20575 S: serde::ser::Serializer,
20576 {
20577 use serde::ser::SerializeMap;
20578 #[allow(unused_imports)]
20579 use std::option::Option::Some;
20580 let mut state = serializer.serialize_map(std::option::Option::None)?;
20581 if let Some(value) = self.contents_yaml() {
20582 state.serialize_entry("contentsYaml", value)?;
20583 }
20584 if let Some(value) = self.contents_sql() {
20585 state.serialize_entry("contentsSql", value)?;
20586 }
20587 if !self.dependency_targets.is_empty() {
20588 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
20589 }
20590 if !wkt::internal::is_default(&self.disabled) {
20591 state.serialize_entry("disabled", &self.disabled)?;
20592 }
20593 if !self.tags.is_empty() {
20594 state.serialize_entry("tags", &self.tags)?;
20595 }
20596 if !self._unknown_fields.is_empty() {
20597 for (key, value) in self._unknown_fields.iter() {
20598 state.serialize_entry(key, &value)?;
20599 }
20600 }
20601 state.end()
20602 }
20603 }
20604
20605 pub mod data_preparation {
20607 #[allow(unused_imports)]
20608 use super::*;
20609
20610 #[derive(Clone, Debug, Default, PartialEq)]
20612 #[non_exhaustive]
20613 pub struct SqlDefinition {
20614 pub query: std::string::String,
20617
20618 pub error_table: std::option::Option<
20620 crate::model::compilation_result_action::data_preparation::ErrorTable,
20621 >,
20622
20623 pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
20625
20626 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20627 }
20628
20629 impl SqlDefinition {
20630 pub fn new() -> Self {
20631 std::default::Default::default()
20632 }
20633
20634 pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
20636 self.query = v.into();
20637 self
20638 }
20639
20640 pub fn set_error_table<T>(mut self, v: T) -> Self
20642 where
20643 T: std::convert::Into<
20644 crate::model::compilation_result_action::data_preparation::ErrorTable,
20645 >,
20646 {
20647 self.error_table = std::option::Option::Some(v.into());
20648 self
20649 }
20650
20651 pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
20653 where
20654 T: std::convert::Into<
20655 crate::model::compilation_result_action::data_preparation::ErrorTable,
20656 >,
20657 {
20658 self.error_table = v.map(|x| x.into());
20659 self
20660 }
20661
20662 pub fn set_load<T>(mut self, v: T) -> Self
20664 where
20665 T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
20666 {
20667 self.load = std::option::Option::Some(v.into());
20668 self
20669 }
20670
20671 pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
20673 where
20674 T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
20675 {
20676 self.load = v.map(|x| x.into());
20677 self
20678 }
20679 }
20680
20681 impl wkt::message::Message for SqlDefinition {
20682 fn typename() -> &'static str {
20683 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
20684 }
20685 }
20686
20687 #[doc(hidden)]
20688 impl<'de> serde::de::Deserialize<'de> for SqlDefinition {
20689 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20690 where
20691 D: serde::Deserializer<'de>,
20692 {
20693 #[allow(non_camel_case_types)]
20694 #[doc(hidden)]
20695 #[derive(PartialEq, Eq, Hash)]
20696 enum __FieldTag {
20697 __query,
20698 __error_table,
20699 __load,
20700 Unknown(std::string::String),
20701 }
20702 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
20703 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20704 where
20705 D: serde::Deserializer<'de>,
20706 {
20707 struct Visitor;
20708 impl<'de> serde::de::Visitor<'de> for Visitor {
20709 type Value = __FieldTag;
20710 fn expecting(
20711 &self,
20712 formatter: &mut std::fmt::Formatter,
20713 ) -> std::fmt::Result {
20714 formatter.write_str("a field name for SqlDefinition")
20715 }
20716 fn visit_str<E>(
20717 self,
20718 value: &str,
20719 ) -> std::result::Result<Self::Value, E>
20720 where
20721 E: serde::de::Error,
20722 {
20723 use std::result::Result::Ok;
20724 use std::string::ToString;
20725 match value {
20726 "query" => Ok(__FieldTag::__query),
20727 "errorTable" => Ok(__FieldTag::__error_table),
20728 "error_table" => Ok(__FieldTag::__error_table),
20729 "load" => Ok(__FieldTag::__load),
20730 _ => Ok(__FieldTag::Unknown(value.to_string())),
20731 }
20732 }
20733 }
20734 deserializer.deserialize_identifier(Visitor)
20735 }
20736 }
20737 struct Visitor;
20738 impl<'de> serde::de::Visitor<'de> for Visitor {
20739 type Value = SqlDefinition;
20740 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20741 formatter.write_str("struct SqlDefinition")
20742 }
20743 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
20744 where
20745 A: serde::de::MapAccess<'de>,
20746 {
20747 #[allow(unused_imports)]
20748 use serde::de::Error;
20749 use std::option::Option::Some;
20750 let mut fields = std::collections::HashSet::new();
20751 let mut result = Self::Value::new();
20752 while let Some(tag) = map.next_key::<__FieldTag>()? {
20753 #[allow(clippy::match_single_binding)]
20754 match tag {
20755 __FieldTag::__query => {
20756 if !fields.insert(__FieldTag::__query) {
20757 return std::result::Result::Err(
20758 A::Error::duplicate_field("multiple values for query"),
20759 );
20760 }
20761 result.query = map
20762 .next_value::<std::option::Option<std::string::String>>()?
20763 .unwrap_or_default();
20764 }
20765 __FieldTag::__error_table => {
20766 if !fields.insert(__FieldTag::__error_table) {
20767 return std::result::Result::Err(
20768 A::Error::duplicate_field(
20769 "multiple values for error_table",
20770 ),
20771 );
20772 }
20773 result.error_table = map.next_value::<std::option::Option<crate::model::compilation_result_action::data_preparation::ErrorTable>>()?
20774 ;
20775 }
20776 __FieldTag::__load => {
20777 if !fields.insert(__FieldTag::__load) {
20778 return std::result::Result::Err(
20779 A::Error::duplicate_field("multiple values for load"),
20780 );
20781 }
20782 result.load = map.next_value::<std::option::Option<
20783 crate::model::compilation_result_action::LoadConfig,
20784 >>()?;
20785 }
20786 __FieldTag::Unknown(key) => {
20787 let value = map.next_value::<serde_json::Value>()?;
20788 result._unknown_fields.insert(key, value);
20789 }
20790 }
20791 }
20792 std::result::Result::Ok(result)
20793 }
20794 }
20795 deserializer.deserialize_any(Visitor)
20796 }
20797 }
20798
20799 #[doc(hidden)]
20800 impl serde::ser::Serialize for SqlDefinition {
20801 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20802 where
20803 S: serde::ser::Serializer,
20804 {
20805 use serde::ser::SerializeMap;
20806 #[allow(unused_imports)]
20807 use std::option::Option::Some;
20808 let mut state = serializer.serialize_map(std::option::Option::None)?;
20809 if !self.query.is_empty() {
20810 state.serialize_entry("query", &self.query)?;
20811 }
20812 if self.error_table.is_some() {
20813 state.serialize_entry("errorTable", &self.error_table)?;
20814 }
20815 if self.load.is_some() {
20816 state.serialize_entry("load", &self.load)?;
20817 }
20818 if !self._unknown_fields.is_empty() {
20819 for (key, value) in self._unknown_fields.iter() {
20820 state.serialize_entry(key, &value)?;
20821 }
20822 }
20823 state.end()
20824 }
20825 }
20826
20827 #[derive(Clone, Debug, Default, PartialEq)]
20830 #[non_exhaustive]
20831 pub struct ErrorTable {
20832 pub target: std::option::Option<crate::model::Target>,
20834
20835 pub retention_days: i32,
20838
20839 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20840 }
20841
20842 impl ErrorTable {
20843 pub fn new() -> Self {
20844 std::default::Default::default()
20845 }
20846
20847 pub fn set_target<T>(mut self, v: T) -> Self
20849 where
20850 T: std::convert::Into<crate::model::Target>,
20851 {
20852 self.target = std::option::Option::Some(v.into());
20853 self
20854 }
20855
20856 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
20858 where
20859 T: std::convert::Into<crate::model::Target>,
20860 {
20861 self.target = v.map(|x| x.into());
20862 self
20863 }
20864
20865 pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
20867 self.retention_days = v.into();
20868 self
20869 }
20870 }
20871
20872 impl wkt::message::Message for ErrorTable {
20873 fn typename() -> &'static str {
20874 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
20875 }
20876 }
20877
20878 #[doc(hidden)]
20879 impl<'de> serde::de::Deserialize<'de> for ErrorTable {
20880 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20881 where
20882 D: serde::Deserializer<'de>,
20883 {
20884 #[allow(non_camel_case_types)]
20885 #[doc(hidden)]
20886 #[derive(PartialEq, Eq, Hash)]
20887 enum __FieldTag {
20888 __target,
20889 __retention_days,
20890 Unknown(std::string::String),
20891 }
20892 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
20893 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20894 where
20895 D: serde::Deserializer<'de>,
20896 {
20897 struct Visitor;
20898 impl<'de> serde::de::Visitor<'de> for Visitor {
20899 type Value = __FieldTag;
20900 fn expecting(
20901 &self,
20902 formatter: &mut std::fmt::Formatter,
20903 ) -> std::fmt::Result {
20904 formatter.write_str("a field name for ErrorTable")
20905 }
20906 fn visit_str<E>(
20907 self,
20908 value: &str,
20909 ) -> std::result::Result<Self::Value, E>
20910 where
20911 E: serde::de::Error,
20912 {
20913 use std::result::Result::Ok;
20914 use std::string::ToString;
20915 match value {
20916 "target" => Ok(__FieldTag::__target),
20917 "retentionDays" => Ok(__FieldTag::__retention_days),
20918 "retention_days" => Ok(__FieldTag::__retention_days),
20919 _ => Ok(__FieldTag::Unknown(value.to_string())),
20920 }
20921 }
20922 }
20923 deserializer.deserialize_identifier(Visitor)
20924 }
20925 }
20926 struct Visitor;
20927 impl<'de> serde::de::Visitor<'de> for Visitor {
20928 type Value = ErrorTable;
20929 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20930 formatter.write_str("struct ErrorTable")
20931 }
20932 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
20933 where
20934 A: serde::de::MapAccess<'de>,
20935 {
20936 #[allow(unused_imports)]
20937 use serde::de::Error;
20938 use std::option::Option::Some;
20939 let mut fields = std::collections::HashSet::new();
20940 let mut result = Self::Value::new();
20941 while let Some(tag) = map.next_key::<__FieldTag>()? {
20942 #[allow(clippy::match_single_binding)]
20943 match tag {
20944 __FieldTag::__target => {
20945 if !fields.insert(__FieldTag::__target) {
20946 return std::result::Result::Err(
20947 A::Error::duplicate_field("multiple values for target"),
20948 );
20949 }
20950 result.target = map
20951 .next_value::<std::option::Option<crate::model::Target>>(
20952 )?;
20953 }
20954 __FieldTag::__retention_days => {
20955 if !fields.insert(__FieldTag::__retention_days) {
20956 return std::result::Result::Err(
20957 A::Error::duplicate_field(
20958 "multiple values for retention_days",
20959 ),
20960 );
20961 }
20962 struct __With(std::option::Option<i32>);
20963 impl<'de> serde::de::Deserialize<'de> for __With {
20964 fn deserialize<D>(
20965 deserializer: D,
20966 ) -> std::result::Result<Self, D::Error>
20967 where
20968 D: serde::de::Deserializer<'de>,
20969 {
20970 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
20971 }
20972 }
20973 result.retention_days =
20974 map.next_value::<__With>()?.0.unwrap_or_default();
20975 }
20976 __FieldTag::Unknown(key) => {
20977 let value = map.next_value::<serde_json::Value>()?;
20978 result._unknown_fields.insert(key, value);
20979 }
20980 }
20981 }
20982 std::result::Result::Ok(result)
20983 }
20984 }
20985 deserializer.deserialize_any(Visitor)
20986 }
20987 }
20988
20989 #[doc(hidden)]
20990 impl serde::ser::Serialize for ErrorTable {
20991 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20992 where
20993 S: serde::ser::Serializer,
20994 {
20995 use serde::ser::SerializeMap;
20996 #[allow(unused_imports)]
20997 use std::option::Option::Some;
20998 let mut state = serializer.serialize_map(std::option::Option::None)?;
20999 if self.target.is_some() {
21000 state.serialize_entry("target", &self.target)?;
21001 }
21002 if !wkt::internal::is_default(&self.retention_days) {
21003 struct __With<'a>(&'a i32);
21004 impl<'a> serde::ser::Serialize for __With<'a> {
21005 fn serialize<S>(
21006 &self,
21007 serializer: S,
21008 ) -> std::result::Result<S::Ok, S::Error>
21009 where
21010 S: serde::ser::Serializer,
21011 {
21012 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
21013 }
21014 }
21015 state.serialize_entry("retentionDays", &__With(&self.retention_days))?;
21016 }
21017 if !self._unknown_fields.is_empty() {
21018 for (key, value) in self._unknown_fields.iter() {
21019 state.serialize_entry(key, &value)?;
21020 }
21021 }
21022 state.end()
21023 }
21024 }
21025
21026 #[derive(Clone, Debug, PartialEq)]
21028 #[non_exhaustive]
21029 pub enum Definition {
21030 ContentsYaml(std::string::String),
21032 ContentsSql(
21035 std::boxed::Box<
21036 crate::model::compilation_result_action::data_preparation::SqlDefinition,
21037 >,
21038 ),
21039 }
21040 }
21041
21042 #[derive(Clone, Debug, Default, PartialEq)]
21044 #[non_exhaustive]
21045 pub struct LoadConfig {
21046 pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
21048
21049 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21050 }
21051
21052 impl LoadConfig {
21053 pub fn new() -> Self {
21054 std::default::Default::default()
21055 }
21056
21057 pub fn set_mode<
21062 T: std::convert::Into<
21063 std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
21064 >,
21065 >(
21066 mut self,
21067 v: T,
21068 ) -> Self {
21069 self.mode = v.into();
21070 self
21071 }
21072
21073 pub fn replace(
21077 &self,
21078 ) -> std::option::Option<
21079 &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
21080 > {
21081 #[allow(unreachable_patterns)]
21082 self.mode.as_ref().and_then(|v| match v {
21083 crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
21084 std::option::Option::Some(v)
21085 }
21086 _ => std::option::Option::None,
21087 })
21088 }
21089
21090 pub fn set_replace<
21096 T: std::convert::Into<
21097 std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
21098 >,
21099 >(
21100 mut self,
21101 v: T,
21102 ) -> Self {
21103 self.mode = std::option::Option::Some(
21104 crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
21105 );
21106 self
21107 }
21108
21109 pub fn append(
21113 &self,
21114 ) -> std::option::Option<
21115 &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
21116 > {
21117 #[allow(unreachable_patterns)]
21118 self.mode.as_ref().and_then(|v| match v {
21119 crate::model::compilation_result_action::load_config::Mode::Append(v) => {
21120 std::option::Option::Some(v)
21121 }
21122 _ => std::option::Option::None,
21123 })
21124 }
21125
21126 pub fn set_append<
21132 T: std::convert::Into<
21133 std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
21134 >,
21135 >(
21136 mut self,
21137 v: T,
21138 ) -> Self {
21139 self.mode = std::option::Option::Some(
21140 crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
21141 );
21142 self
21143 }
21144
21145 pub fn maximum(
21149 &self,
21150 ) -> std::option::Option<
21151 &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
21152 > {
21153 #[allow(unreachable_patterns)]
21154 self.mode.as_ref().and_then(|v| match v {
21155 crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
21156 std::option::Option::Some(v)
21157 }
21158 _ => std::option::Option::None,
21159 })
21160 }
21161
21162 pub fn set_maximum<
21168 T: std::convert::Into<
21169 std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
21170 >,
21171 >(
21172 mut self,
21173 v: T,
21174 ) -> Self {
21175 self.mode = std::option::Option::Some(
21176 crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
21177 );
21178 self
21179 }
21180
21181 pub fn unique(
21185 &self,
21186 ) -> std::option::Option<
21187 &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
21188 > {
21189 #[allow(unreachable_patterns)]
21190 self.mode.as_ref().and_then(|v| match v {
21191 crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
21192 std::option::Option::Some(v)
21193 }
21194 _ => std::option::Option::None,
21195 })
21196 }
21197
21198 pub fn set_unique<
21204 T: std::convert::Into<
21205 std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
21206 >,
21207 >(
21208 mut self,
21209 v: T,
21210 ) -> Self {
21211 self.mode = std::option::Option::Some(
21212 crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
21213 );
21214 self
21215 }
21216 }
21217
21218 impl wkt::message::Message for LoadConfig {
21219 fn typename() -> &'static str {
21220 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
21221 }
21222 }
21223
21224 #[doc(hidden)]
21225 impl<'de> serde::de::Deserialize<'de> for LoadConfig {
21226 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21227 where
21228 D: serde::Deserializer<'de>,
21229 {
21230 #[allow(non_camel_case_types)]
21231 #[doc(hidden)]
21232 #[derive(PartialEq, Eq, Hash)]
21233 enum __FieldTag {
21234 __replace,
21235 __append,
21236 __maximum,
21237 __unique,
21238 Unknown(std::string::String),
21239 }
21240 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21241 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21242 where
21243 D: serde::Deserializer<'de>,
21244 {
21245 struct Visitor;
21246 impl<'de> serde::de::Visitor<'de> for Visitor {
21247 type Value = __FieldTag;
21248 fn expecting(
21249 &self,
21250 formatter: &mut std::fmt::Formatter,
21251 ) -> std::fmt::Result {
21252 formatter.write_str("a field name for LoadConfig")
21253 }
21254 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21255 where
21256 E: serde::de::Error,
21257 {
21258 use std::result::Result::Ok;
21259 use std::string::ToString;
21260 match value {
21261 "replace" => Ok(__FieldTag::__replace),
21262 "append" => Ok(__FieldTag::__append),
21263 "maximum" => Ok(__FieldTag::__maximum),
21264 "unique" => Ok(__FieldTag::__unique),
21265 _ => Ok(__FieldTag::Unknown(value.to_string())),
21266 }
21267 }
21268 }
21269 deserializer.deserialize_identifier(Visitor)
21270 }
21271 }
21272 struct Visitor;
21273 impl<'de> serde::de::Visitor<'de> for Visitor {
21274 type Value = LoadConfig;
21275 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21276 formatter.write_str("struct LoadConfig")
21277 }
21278 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21279 where
21280 A: serde::de::MapAccess<'de>,
21281 {
21282 #[allow(unused_imports)]
21283 use serde::de::Error;
21284 use std::option::Option::Some;
21285 let mut fields = std::collections::HashSet::new();
21286 let mut result = Self::Value::new();
21287 while let Some(tag) = map.next_key::<__FieldTag>()? {
21288 #[allow(clippy::match_single_binding)]
21289 match tag {
21290 __FieldTag::__replace => {
21291 if !fields.insert(__FieldTag::__replace) {
21292 return std::result::Result::Err(A::Error::duplicate_field(
21293 "multiple values for replace",
21294 ));
21295 }
21296 if result.mode.is_some() {
21297 return std::result::Result::Err(A::Error::duplicate_field(
21298 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.replace, latest field was replace",
21299 ));
21300 }
21301 result.mode = std::option::Option::Some(
21302 crate::model::compilation_result_action::load_config::Mode::Replace(
21303 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>>>()?.unwrap_or_default()
21304 ),
21305 );
21306 }
21307 __FieldTag::__append => {
21308 if !fields.insert(__FieldTag::__append) {
21309 return std::result::Result::Err(A::Error::duplicate_field(
21310 "multiple values for append",
21311 ));
21312 }
21313 if result.mode.is_some() {
21314 return std::result::Result::Err(A::Error::duplicate_field(
21315 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.append, latest field was append",
21316 ));
21317 }
21318 result.mode = std::option::Option::Some(
21319 crate::model::compilation_result_action::load_config::Mode::Append(
21320 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>>>()?.unwrap_or_default()
21321 ),
21322 );
21323 }
21324 __FieldTag::__maximum => {
21325 if !fields.insert(__FieldTag::__maximum) {
21326 return std::result::Result::Err(A::Error::duplicate_field(
21327 "multiple values for maximum",
21328 ));
21329 }
21330 if result.mode.is_some() {
21331 return std::result::Result::Err(A::Error::duplicate_field(
21332 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.maximum, latest field was maximum",
21333 ));
21334 }
21335 result.mode = std::option::Option::Some(
21336 crate::model::compilation_result_action::load_config::Mode::Maximum(
21337 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>>>()?.unwrap_or_default()
21338 ),
21339 );
21340 }
21341 __FieldTag::__unique => {
21342 if !fields.insert(__FieldTag::__unique) {
21343 return std::result::Result::Err(A::Error::duplicate_field(
21344 "multiple values for unique",
21345 ));
21346 }
21347 if result.mode.is_some() {
21348 return std::result::Result::Err(A::Error::duplicate_field(
21349 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.unique, latest field was unique",
21350 ));
21351 }
21352 result.mode = std::option::Option::Some(
21353 crate::model::compilation_result_action::load_config::Mode::Unique(
21354 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>>>()?.unwrap_or_default()
21355 ),
21356 );
21357 }
21358 __FieldTag::Unknown(key) => {
21359 let value = map.next_value::<serde_json::Value>()?;
21360 result._unknown_fields.insert(key, value);
21361 }
21362 }
21363 }
21364 std::result::Result::Ok(result)
21365 }
21366 }
21367 deserializer.deserialize_any(Visitor)
21368 }
21369 }
21370
21371 #[doc(hidden)]
21372 impl serde::ser::Serialize for LoadConfig {
21373 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21374 where
21375 S: serde::ser::Serializer,
21376 {
21377 use serde::ser::SerializeMap;
21378 #[allow(unused_imports)]
21379 use std::option::Option::Some;
21380 let mut state = serializer.serialize_map(std::option::Option::None)?;
21381 if let Some(value) = self.replace() {
21382 state.serialize_entry("replace", value)?;
21383 }
21384 if let Some(value) = self.append() {
21385 state.serialize_entry("append", value)?;
21386 }
21387 if let Some(value) = self.maximum() {
21388 state.serialize_entry("maximum", value)?;
21389 }
21390 if let Some(value) = self.unique() {
21391 state.serialize_entry("unique", value)?;
21392 }
21393 if !self._unknown_fields.is_empty() {
21394 for (key, value) in self._unknown_fields.iter() {
21395 state.serialize_entry(key, &value)?;
21396 }
21397 }
21398 state.end()
21399 }
21400 }
21401
21402 pub mod load_config {
21404 #[allow(unused_imports)]
21405 use super::*;
21406
21407 #[derive(Clone, Debug, PartialEq)]
21409 #[non_exhaustive]
21410 pub enum Mode {
21411 Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
21413 Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
21415 Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
21418 Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
21421 }
21422 }
21423
21424 #[derive(Clone, Debug, Default, PartialEq)]
21426 #[non_exhaustive]
21427 pub struct SimpleLoadMode {
21428 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21429 }
21430
21431 impl SimpleLoadMode {
21432 pub fn new() -> Self {
21433 std::default::Default::default()
21434 }
21435 }
21436
21437 impl wkt::message::Message for SimpleLoadMode {
21438 fn typename() -> &'static str {
21439 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
21440 }
21441 }
21442
21443 #[doc(hidden)]
21444 impl<'de> serde::de::Deserialize<'de> for SimpleLoadMode {
21445 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21446 where
21447 D: serde::Deserializer<'de>,
21448 {
21449 #[allow(non_camel_case_types)]
21450 #[doc(hidden)]
21451 #[derive(PartialEq, Eq, Hash)]
21452 enum __FieldTag {
21453 Unknown(std::string::String),
21454 }
21455 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21456 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21457 where
21458 D: serde::Deserializer<'de>,
21459 {
21460 struct Visitor;
21461 impl<'de> serde::de::Visitor<'de> for Visitor {
21462 type Value = __FieldTag;
21463 fn expecting(
21464 &self,
21465 formatter: &mut std::fmt::Formatter,
21466 ) -> std::fmt::Result {
21467 formatter.write_str("a field name for SimpleLoadMode")
21468 }
21469 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21470 where
21471 E: serde::de::Error,
21472 {
21473 use std::result::Result::Ok;
21474 use std::string::ToString;
21475 Ok(__FieldTag::Unknown(value.to_string()))
21476 }
21477 }
21478 deserializer.deserialize_identifier(Visitor)
21479 }
21480 }
21481 struct Visitor;
21482 impl<'de> serde::de::Visitor<'de> for Visitor {
21483 type Value = SimpleLoadMode;
21484 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21485 formatter.write_str("struct SimpleLoadMode")
21486 }
21487 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21488 where
21489 A: serde::de::MapAccess<'de>,
21490 {
21491 #[allow(unused_imports)]
21492 use serde::de::Error;
21493 use std::option::Option::Some;
21494 let mut result = Self::Value::new();
21495 while let Some(tag) = map.next_key::<__FieldTag>()? {
21496 #[allow(clippy::match_single_binding)]
21497 match tag {
21498 __FieldTag::Unknown(key) => {
21499 let value = map.next_value::<serde_json::Value>()?;
21500 result._unknown_fields.insert(key, value);
21501 }
21502 }
21503 }
21504 std::result::Result::Ok(result)
21505 }
21506 }
21507 deserializer.deserialize_any(Visitor)
21508 }
21509 }
21510
21511 #[doc(hidden)]
21512 impl serde::ser::Serialize for SimpleLoadMode {
21513 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21514 where
21515 S: serde::ser::Serializer,
21516 {
21517 use serde::ser::SerializeMap;
21518 #[allow(unused_imports)]
21519 use std::option::Option::Some;
21520 let mut state = serializer.serialize_map(std::option::Option::None)?;
21521 if !self._unknown_fields.is_empty() {
21522 for (key, value) in self._unknown_fields.iter() {
21523 state.serialize_entry(key, &value)?;
21524 }
21525 }
21526 state.end()
21527 }
21528 }
21529
21530 #[derive(Clone, Debug, Default, PartialEq)]
21532 #[non_exhaustive]
21533 pub struct IncrementalLoadMode {
21534 pub column: std::string::String,
21536
21537 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21538 }
21539
21540 impl IncrementalLoadMode {
21541 pub fn new() -> Self {
21542 std::default::Default::default()
21543 }
21544
21545 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21547 self.column = v.into();
21548 self
21549 }
21550 }
21551
21552 impl wkt::message::Message for IncrementalLoadMode {
21553 fn typename() -> &'static str {
21554 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
21555 }
21556 }
21557
21558 #[doc(hidden)]
21559 impl<'de> serde::de::Deserialize<'de> for IncrementalLoadMode {
21560 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21561 where
21562 D: serde::Deserializer<'de>,
21563 {
21564 #[allow(non_camel_case_types)]
21565 #[doc(hidden)]
21566 #[derive(PartialEq, Eq, Hash)]
21567 enum __FieldTag {
21568 __column,
21569 Unknown(std::string::String),
21570 }
21571 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21572 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21573 where
21574 D: serde::Deserializer<'de>,
21575 {
21576 struct Visitor;
21577 impl<'de> serde::de::Visitor<'de> for Visitor {
21578 type Value = __FieldTag;
21579 fn expecting(
21580 &self,
21581 formatter: &mut std::fmt::Formatter,
21582 ) -> std::fmt::Result {
21583 formatter.write_str("a field name for IncrementalLoadMode")
21584 }
21585 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21586 where
21587 E: serde::de::Error,
21588 {
21589 use std::result::Result::Ok;
21590 use std::string::ToString;
21591 match value {
21592 "column" => Ok(__FieldTag::__column),
21593 _ => Ok(__FieldTag::Unknown(value.to_string())),
21594 }
21595 }
21596 }
21597 deserializer.deserialize_identifier(Visitor)
21598 }
21599 }
21600 struct Visitor;
21601 impl<'de> serde::de::Visitor<'de> for Visitor {
21602 type Value = IncrementalLoadMode;
21603 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21604 formatter.write_str("struct IncrementalLoadMode")
21605 }
21606 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21607 where
21608 A: serde::de::MapAccess<'de>,
21609 {
21610 #[allow(unused_imports)]
21611 use serde::de::Error;
21612 use std::option::Option::Some;
21613 let mut fields = std::collections::HashSet::new();
21614 let mut result = Self::Value::new();
21615 while let Some(tag) = map.next_key::<__FieldTag>()? {
21616 #[allow(clippy::match_single_binding)]
21617 match tag {
21618 __FieldTag::__column => {
21619 if !fields.insert(__FieldTag::__column) {
21620 return std::result::Result::Err(A::Error::duplicate_field(
21621 "multiple values for column",
21622 ));
21623 }
21624 result.column = map
21625 .next_value::<std::option::Option<std::string::String>>()?
21626 .unwrap_or_default();
21627 }
21628 __FieldTag::Unknown(key) => {
21629 let value = map.next_value::<serde_json::Value>()?;
21630 result._unknown_fields.insert(key, value);
21631 }
21632 }
21633 }
21634 std::result::Result::Ok(result)
21635 }
21636 }
21637 deserializer.deserialize_any(Visitor)
21638 }
21639 }
21640
21641 #[doc(hidden)]
21642 impl serde::ser::Serialize for IncrementalLoadMode {
21643 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21644 where
21645 S: serde::ser::Serializer,
21646 {
21647 use serde::ser::SerializeMap;
21648 #[allow(unused_imports)]
21649 use std::option::Option::Some;
21650 let mut state = serializer.serialize_map(std::option::Option::None)?;
21651 if !self.column.is_empty() {
21652 state.serialize_entry("column", &self.column)?;
21653 }
21654 if !self._unknown_fields.is_empty() {
21655 for (key, value) in self._unknown_fields.iter() {
21656 state.serialize_entry(key, &value)?;
21657 }
21658 }
21659 state.end()
21660 }
21661 }
21662
21663 #[derive(Clone, Debug, PartialEq)]
21665 #[non_exhaustive]
21666 pub enum CompiledObject {
21667 Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
21669 Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
21671 Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
21673 Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
21675 Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
21677 DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
21679 }
21680}
21681
21682#[derive(Clone, Debug, Default, PartialEq)]
21684#[non_exhaustive]
21685pub struct QueryCompilationResultActionsRequest {
21686 pub name: std::string::String,
21688
21689 pub page_size: i32,
21693
21694 pub page_token: std::string::String,
21702
21703 pub filter: std::string::String,
21706
21707 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21708}
21709
21710impl QueryCompilationResultActionsRequest {
21711 pub fn new() -> Self {
21712 std::default::Default::default()
21713 }
21714
21715 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21717 self.name = v.into();
21718 self
21719 }
21720
21721 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
21723 self.page_size = v.into();
21724 self
21725 }
21726
21727 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21729 self.page_token = v.into();
21730 self
21731 }
21732
21733 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21735 self.filter = v.into();
21736 self
21737 }
21738}
21739
21740impl wkt::message::Message for QueryCompilationResultActionsRequest {
21741 fn typename() -> &'static str {
21742 "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
21743 }
21744}
21745
21746#[doc(hidden)]
21747impl<'de> serde::de::Deserialize<'de> for QueryCompilationResultActionsRequest {
21748 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21749 where
21750 D: serde::Deserializer<'de>,
21751 {
21752 #[allow(non_camel_case_types)]
21753 #[doc(hidden)]
21754 #[derive(PartialEq, Eq, Hash)]
21755 enum __FieldTag {
21756 __name,
21757 __page_size,
21758 __page_token,
21759 __filter,
21760 Unknown(std::string::String),
21761 }
21762 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21763 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21764 where
21765 D: serde::Deserializer<'de>,
21766 {
21767 struct Visitor;
21768 impl<'de> serde::de::Visitor<'de> for Visitor {
21769 type Value = __FieldTag;
21770 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21771 formatter.write_str("a field name for QueryCompilationResultActionsRequest")
21772 }
21773 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21774 where
21775 E: serde::de::Error,
21776 {
21777 use std::result::Result::Ok;
21778 use std::string::ToString;
21779 match value {
21780 "name" => Ok(__FieldTag::__name),
21781 "pageSize" => Ok(__FieldTag::__page_size),
21782 "page_size" => Ok(__FieldTag::__page_size),
21783 "pageToken" => Ok(__FieldTag::__page_token),
21784 "page_token" => Ok(__FieldTag::__page_token),
21785 "filter" => Ok(__FieldTag::__filter),
21786 _ => Ok(__FieldTag::Unknown(value.to_string())),
21787 }
21788 }
21789 }
21790 deserializer.deserialize_identifier(Visitor)
21791 }
21792 }
21793 struct Visitor;
21794 impl<'de> serde::de::Visitor<'de> for Visitor {
21795 type Value = QueryCompilationResultActionsRequest;
21796 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21797 formatter.write_str("struct QueryCompilationResultActionsRequest")
21798 }
21799 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21800 where
21801 A: serde::de::MapAccess<'de>,
21802 {
21803 #[allow(unused_imports)]
21804 use serde::de::Error;
21805 use std::option::Option::Some;
21806 let mut fields = std::collections::HashSet::new();
21807 let mut result = Self::Value::new();
21808 while let Some(tag) = map.next_key::<__FieldTag>()? {
21809 #[allow(clippy::match_single_binding)]
21810 match tag {
21811 __FieldTag::__name => {
21812 if !fields.insert(__FieldTag::__name) {
21813 return std::result::Result::Err(A::Error::duplicate_field(
21814 "multiple values for name",
21815 ));
21816 }
21817 result.name = map
21818 .next_value::<std::option::Option<std::string::String>>()?
21819 .unwrap_or_default();
21820 }
21821 __FieldTag::__page_size => {
21822 if !fields.insert(__FieldTag::__page_size) {
21823 return std::result::Result::Err(A::Error::duplicate_field(
21824 "multiple values for page_size",
21825 ));
21826 }
21827 struct __With(std::option::Option<i32>);
21828 impl<'de> serde::de::Deserialize<'de> for __With {
21829 fn deserialize<D>(
21830 deserializer: D,
21831 ) -> std::result::Result<Self, D::Error>
21832 where
21833 D: serde::de::Deserializer<'de>,
21834 {
21835 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
21836 }
21837 }
21838 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
21839 }
21840 __FieldTag::__page_token => {
21841 if !fields.insert(__FieldTag::__page_token) {
21842 return std::result::Result::Err(A::Error::duplicate_field(
21843 "multiple values for page_token",
21844 ));
21845 }
21846 result.page_token = map
21847 .next_value::<std::option::Option<std::string::String>>()?
21848 .unwrap_or_default();
21849 }
21850 __FieldTag::__filter => {
21851 if !fields.insert(__FieldTag::__filter) {
21852 return std::result::Result::Err(A::Error::duplicate_field(
21853 "multiple values for filter",
21854 ));
21855 }
21856 result.filter = map
21857 .next_value::<std::option::Option<std::string::String>>()?
21858 .unwrap_or_default();
21859 }
21860 __FieldTag::Unknown(key) => {
21861 let value = map.next_value::<serde_json::Value>()?;
21862 result._unknown_fields.insert(key, value);
21863 }
21864 }
21865 }
21866 std::result::Result::Ok(result)
21867 }
21868 }
21869 deserializer.deserialize_any(Visitor)
21870 }
21871}
21872
21873#[doc(hidden)]
21874impl serde::ser::Serialize for QueryCompilationResultActionsRequest {
21875 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21876 where
21877 S: serde::ser::Serializer,
21878 {
21879 use serde::ser::SerializeMap;
21880 #[allow(unused_imports)]
21881 use std::option::Option::Some;
21882 let mut state = serializer.serialize_map(std::option::Option::None)?;
21883 if !self.name.is_empty() {
21884 state.serialize_entry("name", &self.name)?;
21885 }
21886 if !wkt::internal::is_default(&self.page_size) {
21887 struct __With<'a>(&'a i32);
21888 impl<'a> serde::ser::Serialize for __With<'a> {
21889 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21890 where
21891 S: serde::ser::Serializer,
21892 {
21893 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
21894 }
21895 }
21896 state.serialize_entry("pageSize", &__With(&self.page_size))?;
21897 }
21898 if !self.page_token.is_empty() {
21899 state.serialize_entry("pageToken", &self.page_token)?;
21900 }
21901 if !self.filter.is_empty() {
21902 state.serialize_entry("filter", &self.filter)?;
21903 }
21904 if !self._unknown_fields.is_empty() {
21905 for (key, value) in self._unknown_fields.iter() {
21906 state.serialize_entry(key, &value)?;
21907 }
21908 }
21909 state.end()
21910 }
21911}
21912
21913#[derive(Clone, Debug, Default, PartialEq)]
21915#[non_exhaustive]
21916pub struct QueryCompilationResultActionsResponse {
21917 pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
21919
21920 pub next_page_token: std::string::String,
21923
21924 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21925}
21926
21927impl QueryCompilationResultActionsResponse {
21928 pub fn new() -> Self {
21929 std::default::Default::default()
21930 }
21931
21932 pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
21934 where
21935 T: std::iter::IntoIterator<Item = V>,
21936 V: std::convert::Into<crate::model::CompilationResultAction>,
21937 {
21938 use std::iter::Iterator;
21939 self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
21940 self
21941 }
21942
21943 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21945 self.next_page_token = v.into();
21946 self
21947 }
21948}
21949
21950impl wkt::message::Message for QueryCompilationResultActionsResponse {
21951 fn typename() -> &'static str {
21952 "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
21953 }
21954}
21955
21956#[doc(hidden)]
21957impl gax::paginator::internal::PageableResponse for QueryCompilationResultActionsResponse {
21958 type PageItem = crate::model::CompilationResultAction;
21959
21960 fn items(self) -> std::vec::Vec<Self::PageItem> {
21961 self.compilation_result_actions
21962 }
21963
21964 fn next_page_token(&self) -> std::string::String {
21965 use std::clone::Clone;
21966 self.next_page_token.clone()
21967 }
21968}
21969
21970#[doc(hidden)]
21971impl<'de> serde::de::Deserialize<'de> for QueryCompilationResultActionsResponse {
21972 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21973 where
21974 D: serde::Deserializer<'de>,
21975 {
21976 #[allow(non_camel_case_types)]
21977 #[doc(hidden)]
21978 #[derive(PartialEq, Eq, Hash)]
21979 enum __FieldTag {
21980 __compilation_result_actions,
21981 __next_page_token,
21982 Unknown(std::string::String),
21983 }
21984 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21985 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21986 where
21987 D: serde::Deserializer<'de>,
21988 {
21989 struct Visitor;
21990 impl<'de> serde::de::Visitor<'de> for Visitor {
21991 type Value = __FieldTag;
21992 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21993 formatter
21994 .write_str("a field name for QueryCompilationResultActionsResponse")
21995 }
21996 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21997 where
21998 E: serde::de::Error,
21999 {
22000 use std::result::Result::Ok;
22001 use std::string::ToString;
22002 match value {
22003 "compilationResultActions" => {
22004 Ok(__FieldTag::__compilation_result_actions)
22005 }
22006 "compilation_result_actions" => {
22007 Ok(__FieldTag::__compilation_result_actions)
22008 }
22009 "nextPageToken" => Ok(__FieldTag::__next_page_token),
22010 "next_page_token" => Ok(__FieldTag::__next_page_token),
22011 _ => Ok(__FieldTag::Unknown(value.to_string())),
22012 }
22013 }
22014 }
22015 deserializer.deserialize_identifier(Visitor)
22016 }
22017 }
22018 struct Visitor;
22019 impl<'de> serde::de::Visitor<'de> for Visitor {
22020 type Value = QueryCompilationResultActionsResponse;
22021 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22022 formatter.write_str("struct QueryCompilationResultActionsResponse")
22023 }
22024 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22025 where
22026 A: serde::de::MapAccess<'de>,
22027 {
22028 #[allow(unused_imports)]
22029 use serde::de::Error;
22030 use std::option::Option::Some;
22031 let mut fields = std::collections::HashSet::new();
22032 let mut result = Self::Value::new();
22033 while let Some(tag) = map.next_key::<__FieldTag>()? {
22034 #[allow(clippy::match_single_binding)]
22035 match tag {
22036 __FieldTag::__compilation_result_actions => {
22037 if !fields.insert(__FieldTag::__compilation_result_actions) {
22038 return std::result::Result::Err(A::Error::duplicate_field(
22039 "multiple values for compilation_result_actions",
22040 ));
22041 }
22042 result.compilation_result_actions = map
22043 .next_value::<std::option::Option<
22044 std::vec::Vec<crate::model::CompilationResultAction>,
22045 >>()?
22046 .unwrap_or_default();
22047 }
22048 __FieldTag::__next_page_token => {
22049 if !fields.insert(__FieldTag::__next_page_token) {
22050 return std::result::Result::Err(A::Error::duplicate_field(
22051 "multiple values for next_page_token",
22052 ));
22053 }
22054 result.next_page_token = map
22055 .next_value::<std::option::Option<std::string::String>>()?
22056 .unwrap_or_default();
22057 }
22058 __FieldTag::Unknown(key) => {
22059 let value = map.next_value::<serde_json::Value>()?;
22060 result._unknown_fields.insert(key, value);
22061 }
22062 }
22063 }
22064 std::result::Result::Ok(result)
22065 }
22066 }
22067 deserializer.deserialize_any(Visitor)
22068 }
22069}
22070
22071#[doc(hidden)]
22072impl serde::ser::Serialize for QueryCompilationResultActionsResponse {
22073 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22074 where
22075 S: serde::ser::Serializer,
22076 {
22077 use serde::ser::SerializeMap;
22078 #[allow(unused_imports)]
22079 use std::option::Option::Some;
22080 let mut state = serializer.serialize_map(std::option::Option::None)?;
22081 if !self.compilation_result_actions.is_empty() {
22082 state.serialize_entry("compilationResultActions", &self.compilation_result_actions)?;
22083 }
22084 if !self.next_page_token.is_empty() {
22085 state.serialize_entry("nextPageToken", &self.next_page_token)?;
22086 }
22087 if !self._unknown_fields.is_empty() {
22088 for (key, value) in self._unknown_fields.iter() {
22089 state.serialize_entry(key, &value)?;
22090 }
22091 }
22092 state.end()
22093 }
22094}
22095
22096#[derive(Clone, Debug, Default, PartialEq)]
22098#[non_exhaustive]
22099pub struct WorkflowConfig {
22100 pub name: std::string::String,
22102
22103 pub release_config: std::string::String,
22107
22108 pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
22110
22111 pub cron_schedule: std::string::String,
22114
22115 pub time_zone: std::string::String,
22120
22121 pub recent_scheduled_execution_records:
22125 std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
22126
22127 pub disabled: bool,
22129
22130 pub create_time: std::option::Option<wkt::Timestamp>,
22132
22133 pub update_time: std::option::Option<wkt::Timestamp>,
22135
22136 pub internal_metadata: std::option::Option<std::string::String>,
22140
22141 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22142}
22143
22144impl WorkflowConfig {
22145 pub fn new() -> Self {
22146 std::default::Default::default()
22147 }
22148
22149 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22151 self.name = v.into();
22152 self
22153 }
22154
22155 pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22157 self.release_config = v.into();
22158 self
22159 }
22160
22161 pub fn set_invocation_config<T>(mut self, v: T) -> Self
22163 where
22164 T: std::convert::Into<crate::model::InvocationConfig>,
22165 {
22166 self.invocation_config = std::option::Option::Some(v.into());
22167 self
22168 }
22169
22170 pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
22172 where
22173 T: std::convert::Into<crate::model::InvocationConfig>,
22174 {
22175 self.invocation_config = v.map(|x| x.into());
22176 self
22177 }
22178
22179 pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22181 self.cron_schedule = v.into();
22182 self
22183 }
22184
22185 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22187 self.time_zone = v.into();
22188 self
22189 }
22190
22191 pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
22193 where
22194 T: std::iter::IntoIterator<Item = V>,
22195 V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
22196 {
22197 use std::iter::Iterator;
22198 self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
22199 self
22200 }
22201
22202 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22204 self.disabled = v.into();
22205 self
22206 }
22207
22208 pub fn set_create_time<T>(mut self, v: T) -> Self
22210 where
22211 T: std::convert::Into<wkt::Timestamp>,
22212 {
22213 self.create_time = std::option::Option::Some(v.into());
22214 self
22215 }
22216
22217 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
22219 where
22220 T: std::convert::Into<wkt::Timestamp>,
22221 {
22222 self.create_time = v.map(|x| x.into());
22223 self
22224 }
22225
22226 pub fn set_update_time<T>(mut self, v: T) -> Self
22228 where
22229 T: std::convert::Into<wkt::Timestamp>,
22230 {
22231 self.update_time = std::option::Option::Some(v.into());
22232 self
22233 }
22234
22235 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
22237 where
22238 T: std::convert::Into<wkt::Timestamp>,
22239 {
22240 self.update_time = v.map(|x| x.into());
22241 self
22242 }
22243
22244 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
22246 where
22247 T: std::convert::Into<std::string::String>,
22248 {
22249 self.internal_metadata = std::option::Option::Some(v.into());
22250 self
22251 }
22252
22253 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
22255 where
22256 T: std::convert::Into<std::string::String>,
22257 {
22258 self.internal_metadata = v.map(|x| x.into());
22259 self
22260 }
22261}
22262
22263impl wkt::message::Message for WorkflowConfig {
22264 fn typename() -> &'static str {
22265 "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
22266 }
22267}
22268
22269#[doc(hidden)]
22270impl<'de> serde::de::Deserialize<'de> for WorkflowConfig {
22271 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22272 where
22273 D: serde::Deserializer<'de>,
22274 {
22275 #[allow(non_camel_case_types)]
22276 #[doc(hidden)]
22277 #[derive(PartialEq, Eq, Hash)]
22278 enum __FieldTag {
22279 __name,
22280 __release_config,
22281 __invocation_config,
22282 __cron_schedule,
22283 __time_zone,
22284 __recent_scheduled_execution_records,
22285 __disabled,
22286 __create_time,
22287 __update_time,
22288 __internal_metadata,
22289 Unknown(std::string::String),
22290 }
22291 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22292 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22293 where
22294 D: serde::Deserializer<'de>,
22295 {
22296 struct Visitor;
22297 impl<'de> serde::de::Visitor<'de> for Visitor {
22298 type Value = __FieldTag;
22299 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22300 formatter.write_str("a field name for WorkflowConfig")
22301 }
22302 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
22303 where
22304 E: serde::de::Error,
22305 {
22306 use std::result::Result::Ok;
22307 use std::string::ToString;
22308 match value {
22309 "name" => Ok(__FieldTag::__name),
22310 "releaseConfig" => Ok(__FieldTag::__release_config),
22311 "release_config" => Ok(__FieldTag::__release_config),
22312 "invocationConfig" => Ok(__FieldTag::__invocation_config),
22313 "invocation_config" => Ok(__FieldTag::__invocation_config),
22314 "cronSchedule" => Ok(__FieldTag::__cron_schedule),
22315 "cron_schedule" => Ok(__FieldTag::__cron_schedule),
22316 "timeZone" => Ok(__FieldTag::__time_zone),
22317 "time_zone" => Ok(__FieldTag::__time_zone),
22318 "recentScheduledExecutionRecords" => {
22319 Ok(__FieldTag::__recent_scheduled_execution_records)
22320 }
22321 "recent_scheduled_execution_records" => {
22322 Ok(__FieldTag::__recent_scheduled_execution_records)
22323 }
22324 "disabled" => Ok(__FieldTag::__disabled),
22325 "createTime" => Ok(__FieldTag::__create_time),
22326 "create_time" => Ok(__FieldTag::__create_time),
22327 "updateTime" => Ok(__FieldTag::__update_time),
22328 "update_time" => Ok(__FieldTag::__update_time),
22329 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
22330 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
22331 _ => Ok(__FieldTag::Unknown(value.to_string())),
22332 }
22333 }
22334 }
22335 deserializer.deserialize_identifier(Visitor)
22336 }
22337 }
22338 struct Visitor;
22339 impl<'de> serde::de::Visitor<'de> for Visitor {
22340 type Value = WorkflowConfig;
22341 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22342 formatter.write_str("struct WorkflowConfig")
22343 }
22344 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22345 where
22346 A: serde::de::MapAccess<'de>,
22347 {
22348 #[allow(unused_imports)]
22349 use serde::de::Error;
22350 use std::option::Option::Some;
22351 let mut fields = std::collections::HashSet::new();
22352 let mut result = Self::Value::new();
22353 while let Some(tag) = map.next_key::<__FieldTag>()? {
22354 #[allow(clippy::match_single_binding)]
22355 match tag {
22356 __FieldTag::__name => {
22357 if !fields.insert(__FieldTag::__name) {
22358 return std::result::Result::Err(A::Error::duplicate_field(
22359 "multiple values for name",
22360 ));
22361 }
22362 result.name = map
22363 .next_value::<std::option::Option<std::string::String>>()?
22364 .unwrap_or_default();
22365 }
22366 __FieldTag::__release_config => {
22367 if !fields.insert(__FieldTag::__release_config) {
22368 return std::result::Result::Err(A::Error::duplicate_field(
22369 "multiple values for release_config",
22370 ));
22371 }
22372 result.release_config = map
22373 .next_value::<std::option::Option<std::string::String>>()?
22374 .unwrap_or_default();
22375 }
22376 __FieldTag::__invocation_config => {
22377 if !fields.insert(__FieldTag::__invocation_config) {
22378 return std::result::Result::Err(A::Error::duplicate_field(
22379 "multiple values for invocation_config",
22380 ));
22381 }
22382 result.invocation_config = map
22383 .next_value::<std::option::Option<crate::model::InvocationConfig>>(
22384 )?;
22385 }
22386 __FieldTag::__cron_schedule => {
22387 if !fields.insert(__FieldTag::__cron_schedule) {
22388 return std::result::Result::Err(A::Error::duplicate_field(
22389 "multiple values for cron_schedule",
22390 ));
22391 }
22392 result.cron_schedule = map
22393 .next_value::<std::option::Option<std::string::String>>()?
22394 .unwrap_or_default();
22395 }
22396 __FieldTag::__time_zone => {
22397 if !fields.insert(__FieldTag::__time_zone) {
22398 return std::result::Result::Err(A::Error::duplicate_field(
22399 "multiple values for time_zone",
22400 ));
22401 }
22402 result.time_zone = map
22403 .next_value::<std::option::Option<std::string::String>>()?
22404 .unwrap_or_default();
22405 }
22406 __FieldTag::__recent_scheduled_execution_records => {
22407 if !fields.insert(__FieldTag::__recent_scheduled_execution_records) {
22408 return std::result::Result::Err(A::Error::duplicate_field(
22409 "multiple values for recent_scheduled_execution_records",
22410 ));
22411 }
22412 result.recent_scheduled_execution_records = map
22413 .next_value::<std::option::Option<
22414 std::vec::Vec<
22415 crate::model::workflow_config::ScheduledExecutionRecord,
22416 >,
22417 >>()?
22418 .unwrap_or_default();
22419 }
22420 __FieldTag::__disabled => {
22421 if !fields.insert(__FieldTag::__disabled) {
22422 return std::result::Result::Err(A::Error::duplicate_field(
22423 "multiple values for disabled",
22424 ));
22425 }
22426 result.disabled = map
22427 .next_value::<std::option::Option<bool>>()?
22428 .unwrap_or_default();
22429 }
22430 __FieldTag::__create_time => {
22431 if !fields.insert(__FieldTag::__create_time) {
22432 return std::result::Result::Err(A::Error::duplicate_field(
22433 "multiple values for create_time",
22434 ));
22435 }
22436 result.create_time =
22437 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
22438 }
22439 __FieldTag::__update_time => {
22440 if !fields.insert(__FieldTag::__update_time) {
22441 return std::result::Result::Err(A::Error::duplicate_field(
22442 "multiple values for update_time",
22443 ));
22444 }
22445 result.update_time =
22446 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
22447 }
22448 __FieldTag::__internal_metadata => {
22449 if !fields.insert(__FieldTag::__internal_metadata) {
22450 return std::result::Result::Err(A::Error::duplicate_field(
22451 "multiple values for internal_metadata",
22452 ));
22453 }
22454 result.internal_metadata =
22455 map.next_value::<std::option::Option<std::string::String>>()?;
22456 }
22457 __FieldTag::Unknown(key) => {
22458 let value = map.next_value::<serde_json::Value>()?;
22459 result._unknown_fields.insert(key, value);
22460 }
22461 }
22462 }
22463 std::result::Result::Ok(result)
22464 }
22465 }
22466 deserializer.deserialize_any(Visitor)
22467 }
22468}
22469
22470#[doc(hidden)]
22471impl serde::ser::Serialize for WorkflowConfig {
22472 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22473 where
22474 S: serde::ser::Serializer,
22475 {
22476 use serde::ser::SerializeMap;
22477 #[allow(unused_imports)]
22478 use std::option::Option::Some;
22479 let mut state = serializer.serialize_map(std::option::Option::None)?;
22480 if !self.name.is_empty() {
22481 state.serialize_entry("name", &self.name)?;
22482 }
22483 if !self.release_config.is_empty() {
22484 state.serialize_entry("releaseConfig", &self.release_config)?;
22485 }
22486 if self.invocation_config.is_some() {
22487 state.serialize_entry("invocationConfig", &self.invocation_config)?;
22488 }
22489 if !self.cron_schedule.is_empty() {
22490 state.serialize_entry("cronSchedule", &self.cron_schedule)?;
22491 }
22492 if !self.time_zone.is_empty() {
22493 state.serialize_entry("timeZone", &self.time_zone)?;
22494 }
22495 if !self.recent_scheduled_execution_records.is_empty() {
22496 state.serialize_entry(
22497 "recentScheduledExecutionRecords",
22498 &self.recent_scheduled_execution_records,
22499 )?;
22500 }
22501 if !wkt::internal::is_default(&self.disabled) {
22502 state.serialize_entry("disabled", &self.disabled)?;
22503 }
22504 if self.create_time.is_some() {
22505 state.serialize_entry("createTime", &self.create_time)?;
22506 }
22507 if self.update_time.is_some() {
22508 state.serialize_entry("updateTime", &self.update_time)?;
22509 }
22510 if self.internal_metadata.is_some() {
22511 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
22512 }
22513 if !self._unknown_fields.is_empty() {
22514 for (key, value) in self._unknown_fields.iter() {
22515 state.serialize_entry(key, &value)?;
22516 }
22517 }
22518 state.end()
22519 }
22520}
22521
22522pub mod workflow_config {
22524 #[allow(unused_imports)]
22525 use super::*;
22526
22527 #[derive(Clone, Debug, Default, PartialEq)]
22530 #[non_exhaustive]
22531 pub struct ScheduledExecutionRecord {
22532 pub execution_time: std::option::Option<wkt::Timestamp>,
22534
22535 pub result:
22537 std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
22538
22539 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22540 }
22541
22542 impl ScheduledExecutionRecord {
22543 pub fn new() -> Self {
22544 std::default::Default::default()
22545 }
22546
22547 pub fn set_execution_time<T>(mut self, v: T) -> Self
22549 where
22550 T: std::convert::Into<wkt::Timestamp>,
22551 {
22552 self.execution_time = std::option::Option::Some(v.into());
22553 self
22554 }
22555
22556 pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
22558 where
22559 T: std::convert::Into<wkt::Timestamp>,
22560 {
22561 self.execution_time = v.map(|x| x.into());
22562 self
22563 }
22564
22565 pub fn set_result<
22570 T: std::convert::Into<
22571 std::option::Option<
22572 crate::model::workflow_config::scheduled_execution_record::Result,
22573 >,
22574 >,
22575 >(
22576 mut self,
22577 v: T,
22578 ) -> Self {
22579 self.result = v.into();
22580 self
22581 }
22582
22583 pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
22587 #[allow(unreachable_patterns)]
22588 self.result.as_ref().and_then(|v| match v {
22589 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
22590 _ => std::option::Option::None,
22591 })
22592 }
22593
22594 pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
22600 mut self,
22601 v: T,
22602 ) -> Self {
22603 self.result = std::option::Option::Some(
22604 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
22605 v.into()
22606 )
22607 );
22608 self
22609 }
22610
22611 pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
22615 #[allow(unreachable_patterns)]
22616 self.result.as_ref().and_then(|v| match v {
22617 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
22618 v,
22619 ) => std::option::Option::Some(v),
22620 _ => std::option::Option::None,
22621 })
22622 }
22623
22624 pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
22630 mut self,
22631 v: T,
22632 ) -> Self {
22633 self.result = std::option::Option::Some(
22634 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
22635 v.into(),
22636 ),
22637 );
22638 self
22639 }
22640 }
22641
22642 impl wkt::message::Message for ScheduledExecutionRecord {
22643 fn typename() -> &'static str {
22644 "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
22645 }
22646 }
22647
22648 #[doc(hidden)]
22649 impl<'de> serde::de::Deserialize<'de> for ScheduledExecutionRecord {
22650 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22651 where
22652 D: serde::Deserializer<'de>,
22653 {
22654 #[allow(non_camel_case_types)]
22655 #[doc(hidden)]
22656 #[derive(PartialEq, Eq, Hash)]
22657 enum __FieldTag {
22658 __workflow_invocation,
22659 __error_status,
22660 __execution_time,
22661 Unknown(std::string::String),
22662 }
22663 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22664 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22665 where
22666 D: serde::Deserializer<'de>,
22667 {
22668 struct Visitor;
22669 impl<'de> serde::de::Visitor<'de> for Visitor {
22670 type Value = __FieldTag;
22671 fn expecting(
22672 &self,
22673 formatter: &mut std::fmt::Formatter,
22674 ) -> std::fmt::Result {
22675 formatter.write_str("a field name for ScheduledExecutionRecord")
22676 }
22677 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
22678 where
22679 E: serde::de::Error,
22680 {
22681 use std::result::Result::Ok;
22682 use std::string::ToString;
22683 match value {
22684 "workflowInvocation" => Ok(__FieldTag::__workflow_invocation),
22685 "workflow_invocation" => Ok(__FieldTag::__workflow_invocation),
22686 "errorStatus" => Ok(__FieldTag::__error_status),
22687 "error_status" => Ok(__FieldTag::__error_status),
22688 "executionTime" => Ok(__FieldTag::__execution_time),
22689 "execution_time" => Ok(__FieldTag::__execution_time),
22690 _ => Ok(__FieldTag::Unknown(value.to_string())),
22691 }
22692 }
22693 }
22694 deserializer.deserialize_identifier(Visitor)
22695 }
22696 }
22697 struct Visitor;
22698 impl<'de> serde::de::Visitor<'de> for Visitor {
22699 type Value = ScheduledExecutionRecord;
22700 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22701 formatter.write_str("struct ScheduledExecutionRecord")
22702 }
22703 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22704 where
22705 A: serde::de::MapAccess<'de>,
22706 {
22707 #[allow(unused_imports)]
22708 use serde::de::Error;
22709 use std::option::Option::Some;
22710 let mut fields = std::collections::HashSet::new();
22711 let mut result = Self::Value::new();
22712 while let Some(tag) = map.next_key::<__FieldTag>()? {
22713 #[allow(clippy::match_single_binding)]
22714 match tag {
22715 __FieldTag::__workflow_invocation => {
22716 if !fields.insert(__FieldTag::__workflow_invocation) {
22717 return std::result::Result::Err(A::Error::duplicate_field(
22718 "multiple values for workflow_invocation",
22719 ));
22720 }
22721 if result.result.is_some() {
22722 return std::result::Result::Err(A::Error::duplicate_field(
22723 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord.workflow_invocation, latest field was workflowInvocation",
22724 ));
22725 }
22726 result.result = std::option::Option::Some(
22727 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
22728 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
22729 ),
22730 );
22731 }
22732 __FieldTag::__error_status => {
22733 if !fields.insert(__FieldTag::__error_status) {
22734 return std::result::Result::Err(A::Error::duplicate_field(
22735 "multiple values for error_status",
22736 ));
22737 }
22738 if result.result.is_some() {
22739 return std::result::Result::Err(A::Error::duplicate_field(
22740 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord.error_status, latest field was errorStatus",
22741 ));
22742 }
22743 result.result = std::option::Option::Some(
22744 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
22745 map.next_value::<std::option::Option<std::boxed::Box<rpc::model::Status>>>()?.unwrap_or_default()
22746 ),
22747 );
22748 }
22749 __FieldTag::__execution_time => {
22750 if !fields.insert(__FieldTag::__execution_time) {
22751 return std::result::Result::Err(A::Error::duplicate_field(
22752 "multiple values for execution_time",
22753 ));
22754 }
22755 result.execution_time =
22756 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
22757 }
22758 __FieldTag::Unknown(key) => {
22759 let value = map.next_value::<serde_json::Value>()?;
22760 result._unknown_fields.insert(key, value);
22761 }
22762 }
22763 }
22764 std::result::Result::Ok(result)
22765 }
22766 }
22767 deserializer.deserialize_any(Visitor)
22768 }
22769 }
22770
22771 #[doc(hidden)]
22772 impl serde::ser::Serialize for ScheduledExecutionRecord {
22773 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22774 where
22775 S: serde::ser::Serializer,
22776 {
22777 use serde::ser::SerializeMap;
22778 #[allow(unused_imports)]
22779 use std::option::Option::Some;
22780 let mut state = serializer.serialize_map(std::option::Option::None)?;
22781 if let Some(value) = self.workflow_invocation() {
22782 state.serialize_entry("workflowInvocation", value)?;
22783 }
22784 if let Some(value) = self.error_status() {
22785 state.serialize_entry("errorStatus", value)?;
22786 }
22787 if self.execution_time.is_some() {
22788 state.serialize_entry("executionTime", &self.execution_time)?;
22789 }
22790 if !self._unknown_fields.is_empty() {
22791 for (key, value) in self._unknown_fields.iter() {
22792 state.serialize_entry(key, &value)?;
22793 }
22794 }
22795 state.end()
22796 }
22797 }
22798
22799 pub mod scheduled_execution_record {
22801 #[allow(unused_imports)]
22802 use super::*;
22803
22804 #[derive(Clone, Debug, PartialEq)]
22806 #[non_exhaustive]
22807 pub enum Result {
22808 WorkflowInvocation(std::string::String),
22812 ErrorStatus(std::boxed::Box<rpc::model::Status>),
22815 }
22816 }
22817}
22818
22819#[derive(Clone, Debug, Default, PartialEq)]
22823#[non_exhaustive]
22824pub struct InvocationConfig {
22825 pub included_targets: std::vec::Vec<crate::model::Target>,
22827
22828 pub included_tags: std::vec::Vec<std::string::String>,
22830
22831 pub transitive_dependencies_included: bool,
22834
22835 pub transitive_dependents_included: bool,
22838
22839 pub fully_refresh_incremental_tables_enabled: bool,
22841
22842 pub service_account: std::string::String,
22844
22845 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22846}
22847
22848impl InvocationConfig {
22849 pub fn new() -> Self {
22850 std::default::Default::default()
22851 }
22852
22853 pub fn set_included_targets<T, V>(mut self, v: T) -> Self
22855 where
22856 T: std::iter::IntoIterator<Item = V>,
22857 V: std::convert::Into<crate::model::Target>,
22858 {
22859 use std::iter::Iterator;
22860 self.included_targets = v.into_iter().map(|i| i.into()).collect();
22861 self
22862 }
22863
22864 pub fn set_included_tags<T, V>(mut self, v: T) -> Self
22866 where
22867 T: std::iter::IntoIterator<Item = V>,
22868 V: std::convert::Into<std::string::String>,
22869 {
22870 use std::iter::Iterator;
22871 self.included_tags = v.into_iter().map(|i| i.into()).collect();
22872 self
22873 }
22874
22875 pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
22877 mut self,
22878 v: T,
22879 ) -> Self {
22880 self.transitive_dependencies_included = v.into();
22881 self
22882 }
22883
22884 pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
22886 self.transitive_dependents_included = v.into();
22887 self
22888 }
22889
22890 pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
22892 mut self,
22893 v: T,
22894 ) -> Self {
22895 self.fully_refresh_incremental_tables_enabled = v.into();
22896 self
22897 }
22898
22899 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22901 self.service_account = v.into();
22902 self
22903 }
22904}
22905
22906impl wkt::message::Message for InvocationConfig {
22907 fn typename() -> &'static str {
22908 "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
22909 }
22910}
22911
22912#[doc(hidden)]
22913impl<'de> serde::de::Deserialize<'de> for InvocationConfig {
22914 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22915 where
22916 D: serde::Deserializer<'de>,
22917 {
22918 #[allow(non_camel_case_types)]
22919 #[doc(hidden)]
22920 #[derive(PartialEq, Eq, Hash)]
22921 enum __FieldTag {
22922 __included_targets,
22923 __included_tags,
22924 __transitive_dependencies_included,
22925 __transitive_dependents_included,
22926 __fully_refresh_incremental_tables_enabled,
22927 __service_account,
22928 Unknown(std::string::String),
22929 }
22930 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22931 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22932 where
22933 D: serde::Deserializer<'de>,
22934 {
22935 struct Visitor;
22936 impl<'de> serde::de::Visitor<'de> for Visitor {
22937 type Value = __FieldTag;
22938 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22939 formatter.write_str("a field name for InvocationConfig")
22940 }
22941 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
22942 where
22943 E: serde::de::Error,
22944 {
22945 use std::result::Result::Ok;
22946 use std::string::ToString;
22947 match value {
22948 "includedTargets" => Ok(__FieldTag::__included_targets),
22949 "included_targets" => Ok(__FieldTag::__included_targets),
22950 "includedTags" => Ok(__FieldTag::__included_tags),
22951 "included_tags" => Ok(__FieldTag::__included_tags),
22952 "transitiveDependenciesIncluded" => {
22953 Ok(__FieldTag::__transitive_dependencies_included)
22954 }
22955 "transitive_dependencies_included" => {
22956 Ok(__FieldTag::__transitive_dependencies_included)
22957 }
22958 "transitiveDependentsIncluded" => {
22959 Ok(__FieldTag::__transitive_dependents_included)
22960 }
22961 "transitive_dependents_included" => {
22962 Ok(__FieldTag::__transitive_dependents_included)
22963 }
22964 "fullyRefreshIncrementalTablesEnabled" => {
22965 Ok(__FieldTag::__fully_refresh_incremental_tables_enabled)
22966 }
22967 "fully_refresh_incremental_tables_enabled" => {
22968 Ok(__FieldTag::__fully_refresh_incremental_tables_enabled)
22969 }
22970 "serviceAccount" => Ok(__FieldTag::__service_account),
22971 "service_account" => Ok(__FieldTag::__service_account),
22972 _ => Ok(__FieldTag::Unknown(value.to_string())),
22973 }
22974 }
22975 }
22976 deserializer.deserialize_identifier(Visitor)
22977 }
22978 }
22979 struct Visitor;
22980 impl<'de> serde::de::Visitor<'de> for Visitor {
22981 type Value = InvocationConfig;
22982 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22983 formatter.write_str("struct InvocationConfig")
22984 }
22985 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22986 where
22987 A: serde::de::MapAccess<'de>,
22988 {
22989 #[allow(unused_imports)]
22990 use serde::de::Error;
22991 use std::option::Option::Some;
22992 let mut fields = std::collections::HashSet::new();
22993 let mut result = Self::Value::new();
22994 while let Some(tag) = map.next_key::<__FieldTag>()? {
22995 #[allow(clippy::match_single_binding)]
22996 match tag {
22997 __FieldTag::__included_targets => {
22998 if !fields.insert(__FieldTag::__included_targets) {
22999 return std::result::Result::Err(A::Error::duplicate_field(
23000 "multiple values for included_targets",
23001 ));
23002 }
23003 result.included_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
23004 }
23005 __FieldTag::__included_tags => {
23006 if !fields.insert(__FieldTag::__included_tags) {
23007 return std::result::Result::Err(A::Error::duplicate_field(
23008 "multiple values for included_tags",
23009 ));
23010 }
23011 result.included_tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
23012 }
23013 __FieldTag::__transitive_dependencies_included => {
23014 if !fields.insert(__FieldTag::__transitive_dependencies_included) {
23015 return std::result::Result::Err(A::Error::duplicate_field(
23016 "multiple values for transitive_dependencies_included",
23017 ));
23018 }
23019 result.transitive_dependencies_included = map
23020 .next_value::<std::option::Option<bool>>()?
23021 .unwrap_or_default();
23022 }
23023 __FieldTag::__transitive_dependents_included => {
23024 if !fields.insert(__FieldTag::__transitive_dependents_included) {
23025 return std::result::Result::Err(A::Error::duplicate_field(
23026 "multiple values for transitive_dependents_included",
23027 ));
23028 }
23029 result.transitive_dependents_included = map
23030 .next_value::<std::option::Option<bool>>()?
23031 .unwrap_or_default();
23032 }
23033 __FieldTag::__fully_refresh_incremental_tables_enabled => {
23034 if !fields
23035 .insert(__FieldTag::__fully_refresh_incremental_tables_enabled)
23036 {
23037 return std::result::Result::Err(A::Error::duplicate_field(
23038 "multiple values for fully_refresh_incremental_tables_enabled",
23039 ));
23040 }
23041 result.fully_refresh_incremental_tables_enabled = map
23042 .next_value::<std::option::Option<bool>>()?
23043 .unwrap_or_default();
23044 }
23045 __FieldTag::__service_account => {
23046 if !fields.insert(__FieldTag::__service_account) {
23047 return std::result::Result::Err(A::Error::duplicate_field(
23048 "multiple values for service_account",
23049 ));
23050 }
23051 result.service_account = map
23052 .next_value::<std::option::Option<std::string::String>>()?
23053 .unwrap_or_default();
23054 }
23055 __FieldTag::Unknown(key) => {
23056 let value = map.next_value::<serde_json::Value>()?;
23057 result._unknown_fields.insert(key, value);
23058 }
23059 }
23060 }
23061 std::result::Result::Ok(result)
23062 }
23063 }
23064 deserializer.deserialize_any(Visitor)
23065 }
23066}
23067
23068#[doc(hidden)]
23069impl serde::ser::Serialize for InvocationConfig {
23070 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23071 where
23072 S: serde::ser::Serializer,
23073 {
23074 use serde::ser::SerializeMap;
23075 #[allow(unused_imports)]
23076 use std::option::Option::Some;
23077 let mut state = serializer.serialize_map(std::option::Option::None)?;
23078 if !self.included_targets.is_empty() {
23079 state.serialize_entry("includedTargets", &self.included_targets)?;
23080 }
23081 if !self.included_tags.is_empty() {
23082 state.serialize_entry("includedTags", &self.included_tags)?;
23083 }
23084 if !wkt::internal::is_default(&self.transitive_dependencies_included) {
23085 state.serialize_entry(
23086 "transitiveDependenciesIncluded",
23087 &self.transitive_dependencies_included,
23088 )?;
23089 }
23090 if !wkt::internal::is_default(&self.transitive_dependents_included) {
23091 state.serialize_entry(
23092 "transitiveDependentsIncluded",
23093 &self.transitive_dependents_included,
23094 )?;
23095 }
23096 if !wkt::internal::is_default(&self.fully_refresh_incremental_tables_enabled) {
23097 state.serialize_entry(
23098 "fullyRefreshIncrementalTablesEnabled",
23099 &self.fully_refresh_incremental_tables_enabled,
23100 )?;
23101 }
23102 if !self.service_account.is_empty() {
23103 state.serialize_entry("serviceAccount", &self.service_account)?;
23104 }
23105 if !self._unknown_fields.is_empty() {
23106 for (key, value) in self._unknown_fields.iter() {
23107 state.serialize_entry(key, &value)?;
23108 }
23109 }
23110 state.end()
23111 }
23112}
23113
23114#[derive(Clone, Debug, Default, PartialEq)]
23116#[non_exhaustive]
23117pub struct ListWorkflowConfigsRequest {
23118 pub parent: std::string::String,
23121
23122 pub page_size: i32,
23126
23127 pub page_token: std::string::String,
23134
23135 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23136}
23137
23138impl ListWorkflowConfigsRequest {
23139 pub fn new() -> Self {
23140 std::default::Default::default()
23141 }
23142
23143 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23145 self.parent = v.into();
23146 self
23147 }
23148
23149 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23151 self.page_size = v.into();
23152 self
23153 }
23154
23155 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23157 self.page_token = v.into();
23158 self
23159 }
23160}
23161
23162impl wkt::message::Message for ListWorkflowConfigsRequest {
23163 fn typename() -> &'static str {
23164 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
23165 }
23166}
23167
23168#[doc(hidden)]
23169impl<'de> serde::de::Deserialize<'de> for ListWorkflowConfigsRequest {
23170 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23171 where
23172 D: serde::Deserializer<'de>,
23173 {
23174 #[allow(non_camel_case_types)]
23175 #[doc(hidden)]
23176 #[derive(PartialEq, Eq, Hash)]
23177 enum __FieldTag {
23178 __parent,
23179 __page_size,
23180 __page_token,
23181 Unknown(std::string::String),
23182 }
23183 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23184 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23185 where
23186 D: serde::Deserializer<'de>,
23187 {
23188 struct Visitor;
23189 impl<'de> serde::de::Visitor<'de> for Visitor {
23190 type Value = __FieldTag;
23191 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23192 formatter.write_str("a field name for ListWorkflowConfigsRequest")
23193 }
23194 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23195 where
23196 E: serde::de::Error,
23197 {
23198 use std::result::Result::Ok;
23199 use std::string::ToString;
23200 match value {
23201 "parent" => Ok(__FieldTag::__parent),
23202 "pageSize" => Ok(__FieldTag::__page_size),
23203 "page_size" => Ok(__FieldTag::__page_size),
23204 "pageToken" => Ok(__FieldTag::__page_token),
23205 "page_token" => Ok(__FieldTag::__page_token),
23206 _ => Ok(__FieldTag::Unknown(value.to_string())),
23207 }
23208 }
23209 }
23210 deserializer.deserialize_identifier(Visitor)
23211 }
23212 }
23213 struct Visitor;
23214 impl<'de> serde::de::Visitor<'de> for Visitor {
23215 type Value = ListWorkflowConfigsRequest;
23216 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23217 formatter.write_str("struct ListWorkflowConfigsRequest")
23218 }
23219 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23220 where
23221 A: serde::de::MapAccess<'de>,
23222 {
23223 #[allow(unused_imports)]
23224 use serde::de::Error;
23225 use std::option::Option::Some;
23226 let mut fields = std::collections::HashSet::new();
23227 let mut result = Self::Value::new();
23228 while let Some(tag) = map.next_key::<__FieldTag>()? {
23229 #[allow(clippy::match_single_binding)]
23230 match tag {
23231 __FieldTag::__parent => {
23232 if !fields.insert(__FieldTag::__parent) {
23233 return std::result::Result::Err(A::Error::duplicate_field(
23234 "multiple values for parent",
23235 ));
23236 }
23237 result.parent = map
23238 .next_value::<std::option::Option<std::string::String>>()?
23239 .unwrap_or_default();
23240 }
23241 __FieldTag::__page_size => {
23242 if !fields.insert(__FieldTag::__page_size) {
23243 return std::result::Result::Err(A::Error::duplicate_field(
23244 "multiple values for page_size",
23245 ));
23246 }
23247 struct __With(std::option::Option<i32>);
23248 impl<'de> serde::de::Deserialize<'de> for __With {
23249 fn deserialize<D>(
23250 deserializer: D,
23251 ) -> std::result::Result<Self, D::Error>
23252 where
23253 D: serde::de::Deserializer<'de>,
23254 {
23255 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
23256 }
23257 }
23258 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
23259 }
23260 __FieldTag::__page_token => {
23261 if !fields.insert(__FieldTag::__page_token) {
23262 return std::result::Result::Err(A::Error::duplicate_field(
23263 "multiple values for page_token",
23264 ));
23265 }
23266 result.page_token = map
23267 .next_value::<std::option::Option<std::string::String>>()?
23268 .unwrap_or_default();
23269 }
23270 __FieldTag::Unknown(key) => {
23271 let value = map.next_value::<serde_json::Value>()?;
23272 result._unknown_fields.insert(key, value);
23273 }
23274 }
23275 }
23276 std::result::Result::Ok(result)
23277 }
23278 }
23279 deserializer.deserialize_any(Visitor)
23280 }
23281}
23282
23283#[doc(hidden)]
23284impl serde::ser::Serialize for ListWorkflowConfigsRequest {
23285 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23286 where
23287 S: serde::ser::Serializer,
23288 {
23289 use serde::ser::SerializeMap;
23290 #[allow(unused_imports)]
23291 use std::option::Option::Some;
23292 let mut state = serializer.serialize_map(std::option::Option::None)?;
23293 if !self.parent.is_empty() {
23294 state.serialize_entry("parent", &self.parent)?;
23295 }
23296 if !wkt::internal::is_default(&self.page_size) {
23297 struct __With<'a>(&'a i32);
23298 impl<'a> serde::ser::Serialize for __With<'a> {
23299 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23300 where
23301 S: serde::ser::Serializer,
23302 {
23303 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
23304 }
23305 }
23306 state.serialize_entry("pageSize", &__With(&self.page_size))?;
23307 }
23308 if !self.page_token.is_empty() {
23309 state.serialize_entry("pageToken", &self.page_token)?;
23310 }
23311 if !self._unknown_fields.is_empty() {
23312 for (key, value) in self._unknown_fields.iter() {
23313 state.serialize_entry(key, &value)?;
23314 }
23315 }
23316 state.end()
23317 }
23318}
23319
23320#[derive(Clone, Debug, Default, PartialEq)]
23322#[non_exhaustive]
23323pub struct ListWorkflowConfigsResponse {
23324 pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
23326
23327 pub next_page_token: std::string::String,
23330
23331 pub unreachable: std::vec::Vec<std::string::String>,
23333
23334 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23335}
23336
23337impl ListWorkflowConfigsResponse {
23338 pub fn new() -> Self {
23339 std::default::Default::default()
23340 }
23341
23342 pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
23344 where
23345 T: std::iter::IntoIterator<Item = V>,
23346 V: std::convert::Into<crate::model::WorkflowConfig>,
23347 {
23348 use std::iter::Iterator;
23349 self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
23350 self
23351 }
23352
23353 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23355 self.next_page_token = v.into();
23356 self
23357 }
23358
23359 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
23361 where
23362 T: std::iter::IntoIterator<Item = V>,
23363 V: std::convert::Into<std::string::String>,
23364 {
23365 use std::iter::Iterator;
23366 self.unreachable = v.into_iter().map(|i| i.into()).collect();
23367 self
23368 }
23369}
23370
23371impl wkt::message::Message for ListWorkflowConfigsResponse {
23372 fn typename() -> &'static str {
23373 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
23374 }
23375}
23376
23377#[doc(hidden)]
23378impl gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
23379 type PageItem = crate::model::WorkflowConfig;
23380
23381 fn items(self) -> std::vec::Vec<Self::PageItem> {
23382 self.workflow_configs
23383 }
23384
23385 fn next_page_token(&self) -> std::string::String {
23386 use std::clone::Clone;
23387 self.next_page_token.clone()
23388 }
23389}
23390
23391#[doc(hidden)]
23392impl<'de> serde::de::Deserialize<'de> for ListWorkflowConfigsResponse {
23393 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23394 where
23395 D: serde::Deserializer<'de>,
23396 {
23397 #[allow(non_camel_case_types)]
23398 #[doc(hidden)]
23399 #[derive(PartialEq, Eq, Hash)]
23400 enum __FieldTag {
23401 __workflow_configs,
23402 __next_page_token,
23403 __unreachable,
23404 Unknown(std::string::String),
23405 }
23406 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23407 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23408 where
23409 D: serde::Deserializer<'de>,
23410 {
23411 struct Visitor;
23412 impl<'de> serde::de::Visitor<'de> for Visitor {
23413 type Value = __FieldTag;
23414 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23415 formatter.write_str("a field name for ListWorkflowConfigsResponse")
23416 }
23417 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23418 where
23419 E: serde::de::Error,
23420 {
23421 use std::result::Result::Ok;
23422 use std::string::ToString;
23423 match value {
23424 "workflowConfigs" => Ok(__FieldTag::__workflow_configs),
23425 "workflow_configs" => Ok(__FieldTag::__workflow_configs),
23426 "nextPageToken" => Ok(__FieldTag::__next_page_token),
23427 "next_page_token" => Ok(__FieldTag::__next_page_token),
23428 "unreachable" => Ok(__FieldTag::__unreachable),
23429 _ => Ok(__FieldTag::Unknown(value.to_string())),
23430 }
23431 }
23432 }
23433 deserializer.deserialize_identifier(Visitor)
23434 }
23435 }
23436 struct Visitor;
23437 impl<'de> serde::de::Visitor<'de> for Visitor {
23438 type Value = ListWorkflowConfigsResponse;
23439 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23440 formatter.write_str("struct ListWorkflowConfigsResponse")
23441 }
23442 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23443 where
23444 A: serde::de::MapAccess<'de>,
23445 {
23446 #[allow(unused_imports)]
23447 use serde::de::Error;
23448 use std::option::Option::Some;
23449 let mut fields = std::collections::HashSet::new();
23450 let mut result = Self::Value::new();
23451 while let Some(tag) = map.next_key::<__FieldTag>()? {
23452 #[allow(clippy::match_single_binding)]
23453 match tag {
23454 __FieldTag::__workflow_configs => {
23455 if !fields.insert(__FieldTag::__workflow_configs) {
23456 return std::result::Result::Err(A::Error::duplicate_field(
23457 "multiple values for workflow_configs",
23458 ));
23459 }
23460 result.workflow_configs =
23461 map.next_value::<std::option::Option<
23462 std::vec::Vec<crate::model::WorkflowConfig>,
23463 >>()?
23464 .unwrap_or_default();
23465 }
23466 __FieldTag::__next_page_token => {
23467 if !fields.insert(__FieldTag::__next_page_token) {
23468 return std::result::Result::Err(A::Error::duplicate_field(
23469 "multiple values for next_page_token",
23470 ));
23471 }
23472 result.next_page_token = map
23473 .next_value::<std::option::Option<std::string::String>>()?
23474 .unwrap_or_default();
23475 }
23476 __FieldTag::__unreachable => {
23477 if !fields.insert(__FieldTag::__unreachable) {
23478 return std::result::Result::Err(A::Error::duplicate_field(
23479 "multiple values for unreachable",
23480 ));
23481 }
23482 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
23483 }
23484 __FieldTag::Unknown(key) => {
23485 let value = map.next_value::<serde_json::Value>()?;
23486 result._unknown_fields.insert(key, value);
23487 }
23488 }
23489 }
23490 std::result::Result::Ok(result)
23491 }
23492 }
23493 deserializer.deserialize_any(Visitor)
23494 }
23495}
23496
23497#[doc(hidden)]
23498impl serde::ser::Serialize for ListWorkflowConfigsResponse {
23499 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23500 where
23501 S: serde::ser::Serializer,
23502 {
23503 use serde::ser::SerializeMap;
23504 #[allow(unused_imports)]
23505 use std::option::Option::Some;
23506 let mut state = serializer.serialize_map(std::option::Option::None)?;
23507 if !self.workflow_configs.is_empty() {
23508 state.serialize_entry("workflowConfigs", &self.workflow_configs)?;
23509 }
23510 if !self.next_page_token.is_empty() {
23511 state.serialize_entry("nextPageToken", &self.next_page_token)?;
23512 }
23513 if !self.unreachable.is_empty() {
23514 state.serialize_entry("unreachable", &self.unreachable)?;
23515 }
23516 if !self._unknown_fields.is_empty() {
23517 for (key, value) in self._unknown_fields.iter() {
23518 state.serialize_entry(key, &value)?;
23519 }
23520 }
23521 state.end()
23522 }
23523}
23524
23525#[derive(Clone, Debug, Default, PartialEq)]
23527#[non_exhaustive]
23528pub struct GetWorkflowConfigRequest {
23529 pub name: std::string::String,
23531
23532 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23533}
23534
23535impl GetWorkflowConfigRequest {
23536 pub fn new() -> Self {
23537 std::default::Default::default()
23538 }
23539
23540 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23542 self.name = v.into();
23543 self
23544 }
23545}
23546
23547impl wkt::message::Message for GetWorkflowConfigRequest {
23548 fn typename() -> &'static str {
23549 "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
23550 }
23551}
23552
23553#[doc(hidden)]
23554impl<'de> serde::de::Deserialize<'de> for GetWorkflowConfigRequest {
23555 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23556 where
23557 D: serde::Deserializer<'de>,
23558 {
23559 #[allow(non_camel_case_types)]
23560 #[doc(hidden)]
23561 #[derive(PartialEq, Eq, Hash)]
23562 enum __FieldTag {
23563 __name,
23564 Unknown(std::string::String),
23565 }
23566 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23567 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23568 where
23569 D: serde::Deserializer<'de>,
23570 {
23571 struct Visitor;
23572 impl<'de> serde::de::Visitor<'de> for Visitor {
23573 type Value = __FieldTag;
23574 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23575 formatter.write_str("a field name for GetWorkflowConfigRequest")
23576 }
23577 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23578 where
23579 E: serde::de::Error,
23580 {
23581 use std::result::Result::Ok;
23582 use std::string::ToString;
23583 match value {
23584 "name" => Ok(__FieldTag::__name),
23585 _ => Ok(__FieldTag::Unknown(value.to_string())),
23586 }
23587 }
23588 }
23589 deserializer.deserialize_identifier(Visitor)
23590 }
23591 }
23592 struct Visitor;
23593 impl<'de> serde::de::Visitor<'de> for Visitor {
23594 type Value = GetWorkflowConfigRequest;
23595 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23596 formatter.write_str("struct GetWorkflowConfigRequest")
23597 }
23598 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23599 where
23600 A: serde::de::MapAccess<'de>,
23601 {
23602 #[allow(unused_imports)]
23603 use serde::de::Error;
23604 use std::option::Option::Some;
23605 let mut fields = std::collections::HashSet::new();
23606 let mut result = Self::Value::new();
23607 while let Some(tag) = map.next_key::<__FieldTag>()? {
23608 #[allow(clippy::match_single_binding)]
23609 match tag {
23610 __FieldTag::__name => {
23611 if !fields.insert(__FieldTag::__name) {
23612 return std::result::Result::Err(A::Error::duplicate_field(
23613 "multiple values for name",
23614 ));
23615 }
23616 result.name = map
23617 .next_value::<std::option::Option<std::string::String>>()?
23618 .unwrap_or_default();
23619 }
23620 __FieldTag::Unknown(key) => {
23621 let value = map.next_value::<serde_json::Value>()?;
23622 result._unknown_fields.insert(key, value);
23623 }
23624 }
23625 }
23626 std::result::Result::Ok(result)
23627 }
23628 }
23629 deserializer.deserialize_any(Visitor)
23630 }
23631}
23632
23633#[doc(hidden)]
23634impl serde::ser::Serialize for GetWorkflowConfigRequest {
23635 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23636 where
23637 S: serde::ser::Serializer,
23638 {
23639 use serde::ser::SerializeMap;
23640 #[allow(unused_imports)]
23641 use std::option::Option::Some;
23642 let mut state = serializer.serialize_map(std::option::Option::None)?;
23643 if !self.name.is_empty() {
23644 state.serialize_entry("name", &self.name)?;
23645 }
23646 if !self._unknown_fields.is_empty() {
23647 for (key, value) in self._unknown_fields.iter() {
23648 state.serialize_entry(key, &value)?;
23649 }
23650 }
23651 state.end()
23652 }
23653}
23654
23655#[derive(Clone, Debug, Default, PartialEq)]
23657#[non_exhaustive]
23658pub struct CreateWorkflowConfigRequest {
23659 pub parent: std::string::String,
23662
23663 pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
23665
23666 pub workflow_config_id: std::string::String,
23669
23670 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23671}
23672
23673impl CreateWorkflowConfigRequest {
23674 pub fn new() -> Self {
23675 std::default::Default::default()
23676 }
23677
23678 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23680 self.parent = v.into();
23681 self
23682 }
23683
23684 pub fn set_workflow_config<T>(mut self, v: T) -> Self
23686 where
23687 T: std::convert::Into<crate::model::WorkflowConfig>,
23688 {
23689 self.workflow_config = std::option::Option::Some(v.into());
23690 self
23691 }
23692
23693 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
23695 where
23696 T: std::convert::Into<crate::model::WorkflowConfig>,
23697 {
23698 self.workflow_config = v.map(|x| x.into());
23699 self
23700 }
23701
23702 pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
23704 mut self,
23705 v: T,
23706 ) -> Self {
23707 self.workflow_config_id = v.into();
23708 self
23709 }
23710}
23711
23712impl wkt::message::Message for CreateWorkflowConfigRequest {
23713 fn typename() -> &'static str {
23714 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
23715 }
23716}
23717
23718#[doc(hidden)]
23719impl<'de> serde::de::Deserialize<'de> for CreateWorkflowConfigRequest {
23720 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23721 where
23722 D: serde::Deserializer<'de>,
23723 {
23724 #[allow(non_camel_case_types)]
23725 #[doc(hidden)]
23726 #[derive(PartialEq, Eq, Hash)]
23727 enum __FieldTag {
23728 __parent,
23729 __workflow_config,
23730 __workflow_config_id,
23731 Unknown(std::string::String),
23732 }
23733 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23734 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23735 where
23736 D: serde::Deserializer<'de>,
23737 {
23738 struct Visitor;
23739 impl<'de> serde::de::Visitor<'de> for Visitor {
23740 type Value = __FieldTag;
23741 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23742 formatter.write_str("a field name for CreateWorkflowConfigRequest")
23743 }
23744 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23745 where
23746 E: serde::de::Error,
23747 {
23748 use std::result::Result::Ok;
23749 use std::string::ToString;
23750 match value {
23751 "parent" => Ok(__FieldTag::__parent),
23752 "workflowConfig" => Ok(__FieldTag::__workflow_config),
23753 "workflow_config" => Ok(__FieldTag::__workflow_config),
23754 "workflowConfigId" => Ok(__FieldTag::__workflow_config_id),
23755 "workflow_config_id" => Ok(__FieldTag::__workflow_config_id),
23756 _ => Ok(__FieldTag::Unknown(value.to_string())),
23757 }
23758 }
23759 }
23760 deserializer.deserialize_identifier(Visitor)
23761 }
23762 }
23763 struct Visitor;
23764 impl<'de> serde::de::Visitor<'de> for Visitor {
23765 type Value = CreateWorkflowConfigRequest;
23766 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23767 formatter.write_str("struct CreateWorkflowConfigRequest")
23768 }
23769 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23770 where
23771 A: serde::de::MapAccess<'de>,
23772 {
23773 #[allow(unused_imports)]
23774 use serde::de::Error;
23775 use std::option::Option::Some;
23776 let mut fields = std::collections::HashSet::new();
23777 let mut result = Self::Value::new();
23778 while let Some(tag) = map.next_key::<__FieldTag>()? {
23779 #[allow(clippy::match_single_binding)]
23780 match tag {
23781 __FieldTag::__parent => {
23782 if !fields.insert(__FieldTag::__parent) {
23783 return std::result::Result::Err(A::Error::duplicate_field(
23784 "multiple values for parent",
23785 ));
23786 }
23787 result.parent = map
23788 .next_value::<std::option::Option<std::string::String>>()?
23789 .unwrap_or_default();
23790 }
23791 __FieldTag::__workflow_config => {
23792 if !fields.insert(__FieldTag::__workflow_config) {
23793 return std::result::Result::Err(A::Error::duplicate_field(
23794 "multiple values for workflow_config",
23795 ));
23796 }
23797 result.workflow_config = map
23798 .next_value::<std::option::Option<crate::model::WorkflowConfig>>(
23799 )?;
23800 }
23801 __FieldTag::__workflow_config_id => {
23802 if !fields.insert(__FieldTag::__workflow_config_id) {
23803 return std::result::Result::Err(A::Error::duplicate_field(
23804 "multiple values for workflow_config_id",
23805 ));
23806 }
23807 result.workflow_config_id = map
23808 .next_value::<std::option::Option<std::string::String>>()?
23809 .unwrap_or_default();
23810 }
23811 __FieldTag::Unknown(key) => {
23812 let value = map.next_value::<serde_json::Value>()?;
23813 result._unknown_fields.insert(key, value);
23814 }
23815 }
23816 }
23817 std::result::Result::Ok(result)
23818 }
23819 }
23820 deserializer.deserialize_any(Visitor)
23821 }
23822}
23823
23824#[doc(hidden)]
23825impl serde::ser::Serialize for CreateWorkflowConfigRequest {
23826 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23827 where
23828 S: serde::ser::Serializer,
23829 {
23830 use serde::ser::SerializeMap;
23831 #[allow(unused_imports)]
23832 use std::option::Option::Some;
23833 let mut state = serializer.serialize_map(std::option::Option::None)?;
23834 if !self.parent.is_empty() {
23835 state.serialize_entry("parent", &self.parent)?;
23836 }
23837 if self.workflow_config.is_some() {
23838 state.serialize_entry("workflowConfig", &self.workflow_config)?;
23839 }
23840 if !self.workflow_config_id.is_empty() {
23841 state.serialize_entry("workflowConfigId", &self.workflow_config_id)?;
23842 }
23843 if !self._unknown_fields.is_empty() {
23844 for (key, value) in self._unknown_fields.iter() {
23845 state.serialize_entry(key, &value)?;
23846 }
23847 }
23848 state.end()
23849 }
23850}
23851
23852#[derive(Clone, Debug, Default, PartialEq)]
23854#[non_exhaustive]
23855pub struct UpdateWorkflowConfigRequest {
23856 pub update_mask: std::option::Option<wkt::FieldMask>,
23859
23860 pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
23862
23863 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23864}
23865
23866impl UpdateWorkflowConfigRequest {
23867 pub fn new() -> Self {
23868 std::default::Default::default()
23869 }
23870
23871 pub fn set_update_mask<T>(mut self, v: T) -> Self
23873 where
23874 T: std::convert::Into<wkt::FieldMask>,
23875 {
23876 self.update_mask = std::option::Option::Some(v.into());
23877 self
23878 }
23879
23880 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
23882 where
23883 T: std::convert::Into<wkt::FieldMask>,
23884 {
23885 self.update_mask = v.map(|x| x.into());
23886 self
23887 }
23888
23889 pub fn set_workflow_config<T>(mut self, v: T) -> Self
23891 where
23892 T: std::convert::Into<crate::model::WorkflowConfig>,
23893 {
23894 self.workflow_config = std::option::Option::Some(v.into());
23895 self
23896 }
23897
23898 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
23900 where
23901 T: std::convert::Into<crate::model::WorkflowConfig>,
23902 {
23903 self.workflow_config = v.map(|x| x.into());
23904 self
23905 }
23906}
23907
23908impl wkt::message::Message for UpdateWorkflowConfigRequest {
23909 fn typename() -> &'static str {
23910 "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
23911 }
23912}
23913
23914#[doc(hidden)]
23915impl<'de> serde::de::Deserialize<'de> for UpdateWorkflowConfigRequest {
23916 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23917 where
23918 D: serde::Deserializer<'de>,
23919 {
23920 #[allow(non_camel_case_types)]
23921 #[doc(hidden)]
23922 #[derive(PartialEq, Eq, Hash)]
23923 enum __FieldTag {
23924 __update_mask,
23925 __workflow_config,
23926 Unknown(std::string::String),
23927 }
23928 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23929 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23930 where
23931 D: serde::Deserializer<'de>,
23932 {
23933 struct Visitor;
23934 impl<'de> serde::de::Visitor<'de> for Visitor {
23935 type Value = __FieldTag;
23936 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23937 formatter.write_str("a field name for UpdateWorkflowConfigRequest")
23938 }
23939 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23940 where
23941 E: serde::de::Error,
23942 {
23943 use std::result::Result::Ok;
23944 use std::string::ToString;
23945 match value {
23946 "updateMask" => Ok(__FieldTag::__update_mask),
23947 "update_mask" => Ok(__FieldTag::__update_mask),
23948 "workflowConfig" => Ok(__FieldTag::__workflow_config),
23949 "workflow_config" => Ok(__FieldTag::__workflow_config),
23950 _ => Ok(__FieldTag::Unknown(value.to_string())),
23951 }
23952 }
23953 }
23954 deserializer.deserialize_identifier(Visitor)
23955 }
23956 }
23957 struct Visitor;
23958 impl<'de> serde::de::Visitor<'de> for Visitor {
23959 type Value = UpdateWorkflowConfigRequest;
23960 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23961 formatter.write_str("struct UpdateWorkflowConfigRequest")
23962 }
23963 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23964 where
23965 A: serde::de::MapAccess<'de>,
23966 {
23967 #[allow(unused_imports)]
23968 use serde::de::Error;
23969 use std::option::Option::Some;
23970 let mut fields = std::collections::HashSet::new();
23971 let mut result = Self::Value::new();
23972 while let Some(tag) = map.next_key::<__FieldTag>()? {
23973 #[allow(clippy::match_single_binding)]
23974 match tag {
23975 __FieldTag::__update_mask => {
23976 if !fields.insert(__FieldTag::__update_mask) {
23977 return std::result::Result::Err(A::Error::duplicate_field(
23978 "multiple values for update_mask",
23979 ));
23980 }
23981 result.update_mask =
23982 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
23983 }
23984 __FieldTag::__workflow_config => {
23985 if !fields.insert(__FieldTag::__workflow_config) {
23986 return std::result::Result::Err(A::Error::duplicate_field(
23987 "multiple values for workflow_config",
23988 ));
23989 }
23990 result.workflow_config = map
23991 .next_value::<std::option::Option<crate::model::WorkflowConfig>>(
23992 )?;
23993 }
23994 __FieldTag::Unknown(key) => {
23995 let value = map.next_value::<serde_json::Value>()?;
23996 result._unknown_fields.insert(key, value);
23997 }
23998 }
23999 }
24000 std::result::Result::Ok(result)
24001 }
24002 }
24003 deserializer.deserialize_any(Visitor)
24004 }
24005}
24006
24007#[doc(hidden)]
24008impl serde::ser::Serialize for UpdateWorkflowConfigRequest {
24009 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24010 where
24011 S: serde::ser::Serializer,
24012 {
24013 use serde::ser::SerializeMap;
24014 #[allow(unused_imports)]
24015 use std::option::Option::Some;
24016 let mut state = serializer.serialize_map(std::option::Option::None)?;
24017 if self.update_mask.is_some() {
24018 state.serialize_entry("updateMask", &self.update_mask)?;
24019 }
24020 if self.workflow_config.is_some() {
24021 state.serialize_entry("workflowConfig", &self.workflow_config)?;
24022 }
24023 if !self._unknown_fields.is_empty() {
24024 for (key, value) in self._unknown_fields.iter() {
24025 state.serialize_entry(key, &value)?;
24026 }
24027 }
24028 state.end()
24029 }
24030}
24031
24032#[derive(Clone, Debug, Default, PartialEq)]
24034#[non_exhaustive]
24035pub struct DeleteWorkflowConfigRequest {
24036 pub name: std::string::String,
24038
24039 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24040}
24041
24042impl DeleteWorkflowConfigRequest {
24043 pub fn new() -> Self {
24044 std::default::Default::default()
24045 }
24046
24047 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24049 self.name = v.into();
24050 self
24051 }
24052}
24053
24054impl wkt::message::Message for DeleteWorkflowConfigRequest {
24055 fn typename() -> &'static str {
24056 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
24057 }
24058}
24059
24060#[doc(hidden)]
24061impl<'de> serde::de::Deserialize<'de> for DeleteWorkflowConfigRequest {
24062 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24063 where
24064 D: serde::Deserializer<'de>,
24065 {
24066 #[allow(non_camel_case_types)]
24067 #[doc(hidden)]
24068 #[derive(PartialEq, Eq, Hash)]
24069 enum __FieldTag {
24070 __name,
24071 Unknown(std::string::String),
24072 }
24073 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
24074 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24075 where
24076 D: serde::Deserializer<'de>,
24077 {
24078 struct Visitor;
24079 impl<'de> serde::de::Visitor<'de> for Visitor {
24080 type Value = __FieldTag;
24081 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24082 formatter.write_str("a field name for DeleteWorkflowConfigRequest")
24083 }
24084 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
24085 where
24086 E: serde::de::Error,
24087 {
24088 use std::result::Result::Ok;
24089 use std::string::ToString;
24090 match value {
24091 "name" => Ok(__FieldTag::__name),
24092 _ => Ok(__FieldTag::Unknown(value.to_string())),
24093 }
24094 }
24095 }
24096 deserializer.deserialize_identifier(Visitor)
24097 }
24098 }
24099 struct Visitor;
24100 impl<'de> serde::de::Visitor<'de> for Visitor {
24101 type Value = DeleteWorkflowConfigRequest;
24102 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24103 formatter.write_str("struct DeleteWorkflowConfigRequest")
24104 }
24105 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
24106 where
24107 A: serde::de::MapAccess<'de>,
24108 {
24109 #[allow(unused_imports)]
24110 use serde::de::Error;
24111 use std::option::Option::Some;
24112 let mut fields = std::collections::HashSet::new();
24113 let mut result = Self::Value::new();
24114 while let Some(tag) = map.next_key::<__FieldTag>()? {
24115 #[allow(clippy::match_single_binding)]
24116 match tag {
24117 __FieldTag::__name => {
24118 if !fields.insert(__FieldTag::__name) {
24119 return std::result::Result::Err(A::Error::duplicate_field(
24120 "multiple values for name",
24121 ));
24122 }
24123 result.name = map
24124 .next_value::<std::option::Option<std::string::String>>()?
24125 .unwrap_or_default();
24126 }
24127 __FieldTag::Unknown(key) => {
24128 let value = map.next_value::<serde_json::Value>()?;
24129 result._unknown_fields.insert(key, value);
24130 }
24131 }
24132 }
24133 std::result::Result::Ok(result)
24134 }
24135 }
24136 deserializer.deserialize_any(Visitor)
24137 }
24138}
24139
24140#[doc(hidden)]
24141impl serde::ser::Serialize for DeleteWorkflowConfigRequest {
24142 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24143 where
24144 S: serde::ser::Serializer,
24145 {
24146 use serde::ser::SerializeMap;
24147 #[allow(unused_imports)]
24148 use std::option::Option::Some;
24149 let mut state = serializer.serialize_map(std::option::Option::None)?;
24150 if !self.name.is_empty() {
24151 state.serialize_entry("name", &self.name)?;
24152 }
24153 if !self._unknown_fields.is_empty() {
24154 for (key, value) in self._unknown_fields.iter() {
24155 state.serialize_entry(key, &value)?;
24156 }
24157 }
24158 state.end()
24159 }
24160}
24161
24162#[derive(Clone, Debug, Default, PartialEq)]
24164#[non_exhaustive]
24165pub struct WorkflowInvocation {
24166 pub name: std::string::String,
24168
24169 pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
24171
24172 pub state: crate::model::workflow_invocation::State,
24174
24175 pub invocation_timing: std::option::Option<gtype::model::Interval>,
24177
24178 pub resolved_compilation_result: std::string::String,
24182
24183 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
24185
24186 pub internal_metadata: std::option::Option<std::string::String>,
24190
24191 pub compilation_source:
24193 std::option::Option<crate::model::workflow_invocation::CompilationSource>,
24194
24195 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24196}
24197
24198impl WorkflowInvocation {
24199 pub fn new() -> Self {
24200 std::default::Default::default()
24201 }
24202
24203 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24205 self.name = v.into();
24206 self
24207 }
24208
24209 pub fn set_invocation_config<T>(mut self, v: T) -> Self
24211 where
24212 T: std::convert::Into<crate::model::InvocationConfig>,
24213 {
24214 self.invocation_config = std::option::Option::Some(v.into());
24215 self
24216 }
24217
24218 pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
24220 where
24221 T: std::convert::Into<crate::model::InvocationConfig>,
24222 {
24223 self.invocation_config = v.map(|x| x.into());
24224 self
24225 }
24226
24227 pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
24229 mut self,
24230 v: T,
24231 ) -> Self {
24232 self.state = v.into();
24233 self
24234 }
24235
24236 pub fn set_invocation_timing<T>(mut self, v: T) -> Self
24238 where
24239 T: std::convert::Into<gtype::model::Interval>,
24240 {
24241 self.invocation_timing = std::option::Option::Some(v.into());
24242 self
24243 }
24244
24245 pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
24247 where
24248 T: std::convert::Into<gtype::model::Interval>,
24249 {
24250 self.invocation_timing = v.map(|x| x.into());
24251 self
24252 }
24253
24254 pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
24256 mut self,
24257 v: T,
24258 ) -> Self {
24259 self.resolved_compilation_result = v.into();
24260 self
24261 }
24262
24263 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
24265 where
24266 T: std::convert::Into<crate::model::DataEncryptionState>,
24267 {
24268 self.data_encryption_state = std::option::Option::Some(v.into());
24269 self
24270 }
24271
24272 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
24274 where
24275 T: std::convert::Into<crate::model::DataEncryptionState>,
24276 {
24277 self.data_encryption_state = v.map(|x| x.into());
24278 self
24279 }
24280
24281 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
24283 where
24284 T: std::convert::Into<std::string::String>,
24285 {
24286 self.internal_metadata = std::option::Option::Some(v.into());
24287 self
24288 }
24289
24290 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
24292 where
24293 T: std::convert::Into<std::string::String>,
24294 {
24295 self.internal_metadata = v.map(|x| x.into());
24296 self
24297 }
24298
24299 pub fn set_compilation_source<
24304 T: std::convert::Into<
24305 std::option::Option<crate::model::workflow_invocation::CompilationSource>,
24306 >,
24307 >(
24308 mut self,
24309 v: T,
24310 ) -> Self {
24311 self.compilation_source = v.into();
24312 self
24313 }
24314
24315 pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
24319 #[allow(unreachable_patterns)]
24320 self.compilation_source.as_ref().and_then(|v| match v {
24321 crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
24322 std::option::Option::Some(v)
24323 }
24324 _ => std::option::Option::None,
24325 })
24326 }
24327
24328 pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
24334 mut self,
24335 v: T,
24336 ) -> Self {
24337 self.compilation_source = std::option::Option::Some(
24338 crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
24339 );
24340 self
24341 }
24342
24343 pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
24347 #[allow(unreachable_patterns)]
24348 self.compilation_source.as_ref().and_then(|v| match v {
24349 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
24350 std::option::Option::Some(v)
24351 }
24352 _ => std::option::Option::None,
24353 })
24354 }
24355
24356 pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24362 self.compilation_source = std::option::Option::Some(
24363 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
24364 );
24365 self
24366 }
24367}
24368
24369impl wkt::message::Message for WorkflowInvocation {
24370 fn typename() -> &'static str {
24371 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
24372 }
24373}
24374
24375#[doc(hidden)]
24376impl<'de> serde::de::Deserialize<'de> for WorkflowInvocation {
24377 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24378 where
24379 D: serde::Deserializer<'de>,
24380 {
24381 #[allow(non_camel_case_types)]
24382 #[doc(hidden)]
24383 #[derive(PartialEq, Eq, Hash)]
24384 enum __FieldTag {
24385 __compilation_result,
24386 __workflow_config,
24387 __name,
24388 __invocation_config,
24389 __state,
24390 __invocation_timing,
24391 __resolved_compilation_result,
24392 __data_encryption_state,
24393 __internal_metadata,
24394 Unknown(std::string::String),
24395 }
24396 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
24397 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24398 where
24399 D: serde::Deserializer<'de>,
24400 {
24401 struct Visitor;
24402 impl<'de> serde::de::Visitor<'de> for Visitor {
24403 type Value = __FieldTag;
24404 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24405 formatter.write_str("a field name for WorkflowInvocation")
24406 }
24407 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
24408 where
24409 E: serde::de::Error,
24410 {
24411 use std::result::Result::Ok;
24412 use std::string::ToString;
24413 match value {
24414 "compilationResult" => Ok(__FieldTag::__compilation_result),
24415 "compilation_result" => Ok(__FieldTag::__compilation_result),
24416 "workflowConfig" => Ok(__FieldTag::__workflow_config),
24417 "workflow_config" => Ok(__FieldTag::__workflow_config),
24418 "name" => Ok(__FieldTag::__name),
24419 "invocationConfig" => Ok(__FieldTag::__invocation_config),
24420 "invocation_config" => Ok(__FieldTag::__invocation_config),
24421 "state" => Ok(__FieldTag::__state),
24422 "invocationTiming" => Ok(__FieldTag::__invocation_timing),
24423 "invocation_timing" => Ok(__FieldTag::__invocation_timing),
24424 "resolvedCompilationResult" => {
24425 Ok(__FieldTag::__resolved_compilation_result)
24426 }
24427 "resolved_compilation_result" => {
24428 Ok(__FieldTag::__resolved_compilation_result)
24429 }
24430 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
24431 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
24432 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
24433 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
24434 _ => Ok(__FieldTag::Unknown(value.to_string())),
24435 }
24436 }
24437 }
24438 deserializer.deserialize_identifier(Visitor)
24439 }
24440 }
24441 struct Visitor;
24442 impl<'de> serde::de::Visitor<'de> for Visitor {
24443 type Value = WorkflowInvocation;
24444 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24445 formatter.write_str("struct WorkflowInvocation")
24446 }
24447 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
24448 where
24449 A: serde::de::MapAccess<'de>,
24450 {
24451 #[allow(unused_imports)]
24452 use serde::de::Error;
24453 use std::option::Option::Some;
24454 let mut fields = std::collections::HashSet::new();
24455 let mut result = Self::Value::new();
24456 while let Some(tag) = map.next_key::<__FieldTag>()? {
24457 #[allow(clippy::match_single_binding)]
24458 match tag {
24459 __FieldTag::__compilation_result => {
24460 if !fields.insert(__FieldTag::__compilation_result) {
24461 return std::result::Result::Err(A::Error::duplicate_field(
24462 "multiple values for compilation_result",
24463 ));
24464 }
24465 if result.compilation_source.is_some() {
24466 return std::result::Result::Err(A::Error::duplicate_field(
24467 "multiple values for `compilation_source`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocation.compilation_result, latest field was compilationResult",
24468 ));
24469 }
24470 result.compilation_source = std::option::Option::Some(
24471 crate::model::workflow_invocation::CompilationSource::CompilationResult(
24472 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
24473 ),
24474 );
24475 }
24476 __FieldTag::__workflow_config => {
24477 if !fields.insert(__FieldTag::__workflow_config) {
24478 return std::result::Result::Err(A::Error::duplicate_field(
24479 "multiple values for workflow_config",
24480 ));
24481 }
24482 if result.compilation_source.is_some() {
24483 return std::result::Result::Err(A::Error::duplicate_field(
24484 "multiple values for `compilation_source`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocation.workflow_config, latest field was workflowConfig",
24485 ));
24486 }
24487 result.compilation_source = std::option::Option::Some(
24488 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(
24489 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
24490 ),
24491 );
24492 }
24493 __FieldTag::__name => {
24494 if !fields.insert(__FieldTag::__name) {
24495 return std::result::Result::Err(A::Error::duplicate_field(
24496 "multiple values for name",
24497 ));
24498 }
24499 result.name = map
24500 .next_value::<std::option::Option<std::string::String>>()?
24501 .unwrap_or_default();
24502 }
24503 __FieldTag::__invocation_config => {
24504 if !fields.insert(__FieldTag::__invocation_config) {
24505 return std::result::Result::Err(A::Error::duplicate_field(
24506 "multiple values for invocation_config",
24507 ));
24508 }
24509 result.invocation_config = map
24510 .next_value::<std::option::Option<crate::model::InvocationConfig>>(
24511 )?;
24512 }
24513 __FieldTag::__state => {
24514 if !fields.insert(__FieldTag::__state) {
24515 return std::result::Result::Err(A::Error::duplicate_field(
24516 "multiple values for state",
24517 ));
24518 }
24519 result.state = map.next_value::<std::option::Option<crate::model::workflow_invocation::State>>()?.unwrap_or_default();
24520 }
24521 __FieldTag::__invocation_timing => {
24522 if !fields.insert(__FieldTag::__invocation_timing) {
24523 return std::result::Result::Err(A::Error::duplicate_field(
24524 "multiple values for invocation_timing",
24525 ));
24526 }
24527 result.invocation_timing =
24528 map.next_value::<std::option::Option<gtype::model::Interval>>()?;
24529 }
24530 __FieldTag::__resolved_compilation_result => {
24531 if !fields.insert(__FieldTag::__resolved_compilation_result) {
24532 return std::result::Result::Err(A::Error::duplicate_field(
24533 "multiple values for resolved_compilation_result",
24534 ));
24535 }
24536 result.resolved_compilation_result = map
24537 .next_value::<std::option::Option<std::string::String>>()?
24538 .unwrap_or_default();
24539 }
24540 __FieldTag::__data_encryption_state => {
24541 if !fields.insert(__FieldTag::__data_encryption_state) {
24542 return std::result::Result::Err(A::Error::duplicate_field(
24543 "multiple values for data_encryption_state",
24544 ));
24545 }
24546 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
24547 ;
24548 }
24549 __FieldTag::__internal_metadata => {
24550 if !fields.insert(__FieldTag::__internal_metadata) {
24551 return std::result::Result::Err(A::Error::duplicate_field(
24552 "multiple values for internal_metadata",
24553 ));
24554 }
24555 result.internal_metadata =
24556 map.next_value::<std::option::Option<std::string::String>>()?;
24557 }
24558 __FieldTag::Unknown(key) => {
24559 let value = map.next_value::<serde_json::Value>()?;
24560 result._unknown_fields.insert(key, value);
24561 }
24562 }
24563 }
24564 std::result::Result::Ok(result)
24565 }
24566 }
24567 deserializer.deserialize_any(Visitor)
24568 }
24569}
24570
24571#[doc(hidden)]
24572impl serde::ser::Serialize for WorkflowInvocation {
24573 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24574 where
24575 S: serde::ser::Serializer,
24576 {
24577 use serde::ser::SerializeMap;
24578 #[allow(unused_imports)]
24579 use std::option::Option::Some;
24580 let mut state = serializer.serialize_map(std::option::Option::None)?;
24581 if let Some(value) = self.compilation_result() {
24582 state.serialize_entry("compilationResult", value)?;
24583 }
24584 if let Some(value) = self.workflow_config() {
24585 state.serialize_entry("workflowConfig", value)?;
24586 }
24587 if !self.name.is_empty() {
24588 state.serialize_entry("name", &self.name)?;
24589 }
24590 if self.invocation_config.is_some() {
24591 state.serialize_entry("invocationConfig", &self.invocation_config)?;
24592 }
24593 if !wkt::internal::is_default(&self.state) {
24594 state.serialize_entry("state", &self.state)?;
24595 }
24596 if self.invocation_timing.is_some() {
24597 state.serialize_entry("invocationTiming", &self.invocation_timing)?;
24598 }
24599 if !self.resolved_compilation_result.is_empty() {
24600 state.serialize_entry(
24601 "resolvedCompilationResult",
24602 &self.resolved_compilation_result,
24603 )?;
24604 }
24605 if self.data_encryption_state.is_some() {
24606 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
24607 }
24608 if self.internal_metadata.is_some() {
24609 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
24610 }
24611 if !self._unknown_fields.is_empty() {
24612 for (key, value) in self._unknown_fields.iter() {
24613 state.serialize_entry(key, &value)?;
24614 }
24615 }
24616 state.end()
24617 }
24618}
24619
24620pub mod workflow_invocation {
24622 #[allow(unused_imports)]
24623 use super::*;
24624
24625 #[derive(Clone, Debug, PartialEq)]
24641 #[non_exhaustive]
24642 pub enum State {
24643 Unspecified,
24645 Running,
24647 Succeeded,
24649 Cancelled,
24651 Failed,
24653 Canceling,
24656 UnknownValue(state::UnknownValue),
24661 }
24662
24663 #[doc(hidden)]
24664 pub mod state {
24665 #[allow(unused_imports)]
24666 use super::*;
24667 #[derive(Clone, Debug, PartialEq)]
24668 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
24669 }
24670
24671 impl State {
24672 pub fn value(&self) -> std::option::Option<i32> {
24677 match self {
24678 Self::Unspecified => std::option::Option::Some(0),
24679 Self::Running => std::option::Option::Some(1),
24680 Self::Succeeded => std::option::Option::Some(2),
24681 Self::Cancelled => std::option::Option::Some(3),
24682 Self::Failed => std::option::Option::Some(4),
24683 Self::Canceling => std::option::Option::Some(5),
24684 Self::UnknownValue(u) => u.0.value(),
24685 }
24686 }
24687
24688 pub fn name(&self) -> std::option::Option<&str> {
24693 match self {
24694 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
24695 Self::Running => std::option::Option::Some("RUNNING"),
24696 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
24697 Self::Cancelled => std::option::Option::Some("CANCELLED"),
24698 Self::Failed => std::option::Option::Some("FAILED"),
24699 Self::Canceling => std::option::Option::Some("CANCELING"),
24700 Self::UnknownValue(u) => u.0.name(),
24701 }
24702 }
24703 }
24704
24705 impl std::default::Default for State {
24706 fn default() -> Self {
24707 use std::convert::From;
24708 Self::from(0)
24709 }
24710 }
24711
24712 impl std::fmt::Display for State {
24713 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
24714 wkt::internal::display_enum(f, self.name(), self.value())
24715 }
24716 }
24717
24718 impl std::convert::From<i32> for State {
24719 fn from(value: i32) -> Self {
24720 match value {
24721 0 => Self::Unspecified,
24722 1 => Self::Running,
24723 2 => Self::Succeeded,
24724 3 => Self::Cancelled,
24725 4 => Self::Failed,
24726 5 => Self::Canceling,
24727 _ => Self::UnknownValue(state::UnknownValue(
24728 wkt::internal::UnknownEnumValue::Integer(value),
24729 )),
24730 }
24731 }
24732 }
24733
24734 impl std::convert::From<&str> for State {
24735 fn from(value: &str) -> Self {
24736 use std::string::ToString;
24737 match value {
24738 "STATE_UNSPECIFIED" => Self::Unspecified,
24739 "RUNNING" => Self::Running,
24740 "SUCCEEDED" => Self::Succeeded,
24741 "CANCELLED" => Self::Cancelled,
24742 "FAILED" => Self::Failed,
24743 "CANCELING" => Self::Canceling,
24744 _ => Self::UnknownValue(state::UnknownValue(
24745 wkt::internal::UnknownEnumValue::String(value.to_string()),
24746 )),
24747 }
24748 }
24749 }
24750
24751 impl serde::ser::Serialize for State {
24752 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24753 where
24754 S: serde::Serializer,
24755 {
24756 match self {
24757 Self::Unspecified => serializer.serialize_i32(0),
24758 Self::Running => serializer.serialize_i32(1),
24759 Self::Succeeded => serializer.serialize_i32(2),
24760 Self::Cancelled => serializer.serialize_i32(3),
24761 Self::Failed => serializer.serialize_i32(4),
24762 Self::Canceling => serializer.serialize_i32(5),
24763 Self::UnknownValue(u) => u.0.serialize(serializer),
24764 }
24765 }
24766 }
24767
24768 impl<'de> serde::de::Deserialize<'de> for State {
24769 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24770 where
24771 D: serde::Deserializer<'de>,
24772 {
24773 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
24774 ".google.cloud.dataform.v1.WorkflowInvocation.State",
24775 ))
24776 }
24777 }
24778
24779 #[derive(Clone, Debug, PartialEq)]
24781 #[non_exhaustive]
24782 pub enum CompilationSource {
24783 CompilationResult(std::string::String),
24787 WorkflowConfig(std::string::String),
24790 }
24791}
24792
24793#[derive(Clone, Debug, Default, PartialEq)]
24795#[non_exhaustive]
24796pub struct ListWorkflowInvocationsRequest {
24797 pub parent: std::string::String,
24800
24801 pub page_size: i32,
24805
24806 pub page_token: std::string::String,
24813
24814 pub order_by: std::string::String,
24818
24819 pub filter: std::string::String,
24821
24822 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24823}
24824
24825impl ListWorkflowInvocationsRequest {
24826 pub fn new() -> Self {
24827 std::default::Default::default()
24828 }
24829
24830 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24832 self.parent = v.into();
24833 self
24834 }
24835
24836 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24838 self.page_size = v.into();
24839 self
24840 }
24841
24842 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24844 self.page_token = v.into();
24845 self
24846 }
24847
24848 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24850 self.order_by = v.into();
24851 self
24852 }
24853
24854 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24856 self.filter = v.into();
24857 self
24858 }
24859}
24860
24861impl wkt::message::Message for ListWorkflowInvocationsRequest {
24862 fn typename() -> &'static str {
24863 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
24864 }
24865}
24866
24867#[doc(hidden)]
24868impl<'de> serde::de::Deserialize<'de> for ListWorkflowInvocationsRequest {
24869 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24870 where
24871 D: serde::Deserializer<'de>,
24872 {
24873 #[allow(non_camel_case_types)]
24874 #[doc(hidden)]
24875 #[derive(PartialEq, Eq, Hash)]
24876 enum __FieldTag {
24877 __parent,
24878 __page_size,
24879 __page_token,
24880 __order_by,
24881 __filter,
24882 Unknown(std::string::String),
24883 }
24884 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
24885 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24886 where
24887 D: serde::Deserializer<'de>,
24888 {
24889 struct Visitor;
24890 impl<'de> serde::de::Visitor<'de> for Visitor {
24891 type Value = __FieldTag;
24892 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24893 formatter.write_str("a field name for ListWorkflowInvocationsRequest")
24894 }
24895 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
24896 where
24897 E: serde::de::Error,
24898 {
24899 use std::result::Result::Ok;
24900 use std::string::ToString;
24901 match value {
24902 "parent" => Ok(__FieldTag::__parent),
24903 "pageSize" => Ok(__FieldTag::__page_size),
24904 "page_size" => Ok(__FieldTag::__page_size),
24905 "pageToken" => Ok(__FieldTag::__page_token),
24906 "page_token" => Ok(__FieldTag::__page_token),
24907 "orderBy" => Ok(__FieldTag::__order_by),
24908 "order_by" => Ok(__FieldTag::__order_by),
24909 "filter" => Ok(__FieldTag::__filter),
24910 _ => Ok(__FieldTag::Unknown(value.to_string())),
24911 }
24912 }
24913 }
24914 deserializer.deserialize_identifier(Visitor)
24915 }
24916 }
24917 struct Visitor;
24918 impl<'de> serde::de::Visitor<'de> for Visitor {
24919 type Value = ListWorkflowInvocationsRequest;
24920 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24921 formatter.write_str("struct ListWorkflowInvocationsRequest")
24922 }
24923 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
24924 where
24925 A: serde::de::MapAccess<'de>,
24926 {
24927 #[allow(unused_imports)]
24928 use serde::de::Error;
24929 use std::option::Option::Some;
24930 let mut fields = std::collections::HashSet::new();
24931 let mut result = Self::Value::new();
24932 while let Some(tag) = map.next_key::<__FieldTag>()? {
24933 #[allow(clippy::match_single_binding)]
24934 match tag {
24935 __FieldTag::__parent => {
24936 if !fields.insert(__FieldTag::__parent) {
24937 return std::result::Result::Err(A::Error::duplicate_field(
24938 "multiple values for parent",
24939 ));
24940 }
24941 result.parent = map
24942 .next_value::<std::option::Option<std::string::String>>()?
24943 .unwrap_or_default();
24944 }
24945 __FieldTag::__page_size => {
24946 if !fields.insert(__FieldTag::__page_size) {
24947 return std::result::Result::Err(A::Error::duplicate_field(
24948 "multiple values for page_size",
24949 ));
24950 }
24951 struct __With(std::option::Option<i32>);
24952 impl<'de> serde::de::Deserialize<'de> for __With {
24953 fn deserialize<D>(
24954 deserializer: D,
24955 ) -> std::result::Result<Self, D::Error>
24956 where
24957 D: serde::de::Deserializer<'de>,
24958 {
24959 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
24960 }
24961 }
24962 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
24963 }
24964 __FieldTag::__page_token => {
24965 if !fields.insert(__FieldTag::__page_token) {
24966 return std::result::Result::Err(A::Error::duplicate_field(
24967 "multiple values for page_token",
24968 ));
24969 }
24970 result.page_token = map
24971 .next_value::<std::option::Option<std::string::String>>()?
24972 .unwrap_or_default();
24973 }
24974 __FieldTag::__order_by => {
24975 if !fields.insert(__FieldTag::__order_by) {
24976 return std::result::Result::Err(A::Error::duplicate_field(
24977 "multiple values for order_by",
24978 ));
24979 }
24980 result.order_by = map
24981 .next_value::<std::option::Option<std::string::String>>()?
24982 .unwrap_or_default();
24983 }
24984 __FieldTag::__filter => {
24985 if !fields.insert(__FieldTag::__filter) {
24986 return std::result::Result::Err(A::Error::duplicate_field(
24987 "multiple values for filter",
24988 ));
24989 }
24990 result.filter = map
24991 .next_value::<std::option::Option<std::string::String>>()?
24992 .unwrap_or_default();
24993 }
24994 __FieldTag::Unknown(key) => {
24995 let value = map.next_value::<serde_json::Value>()?;
24996 result._unknown_fields.insert(key, value);
24997 }
24998 }
24999 }
25000 std::result::Result::Ok(result)
25001 }
25002 }
25003 deserializer.deserialize_any(Visitor)
25004 }
25005}
25006
25007#[doc(hidden)]
25008impl serde::ser::Serialize for ListWorkflowInvocationsRequest {
25009 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25010 where
25011 S: serde::ser::Serializer,
25012 {
25013 use serde::ser::SerializeMap;
25014 #[allow(unused_imports)]
25015 use std::option::Option::Some;
25016 let mut state = serializer.serialize_map(std::option::Option::None)?;
25017 if !self.parent.is_empty() {
25018 state.serialize_entry("parent", &self.parent)?;
25019 }
25020 if !wkt::internal::is_default(&self.page_size) {
25021 struct __With<'a>(&'a i32);
25022 impl<'a> serde::ser::Serialize for __With<'a> {
25023 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25024 where
25025 S: serde::ser::Serializer,
25026 {
25027 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
25028 }
25029 }
25030 state.serialize_entry("pageSize", &__With(&self.page_size))?;
25031 }
25032 if !self.page_token.is_empty() {
25033 state.serialize_entry("pageToken", &self.page_token)?;
25034 }
25035 if !self.order_by.is_empty() {
25036 state.serialize_entry("orderBy", &self.order_by)?;
25037 }
25038 if !self.filter.is_empty() {
25039 state.serialize_entry("filter", &self.filter)?;
25040 }
25041 if !self._unknown_fields.is_empty() {
25042 for (key, value) in self._unknown_fields.iter() {
25043 state.serialize_entry(key, &value)?;
25044 }
25045 }
25046 state.end()
25047 }
25048}
25049
25050#[derive(Clone, Debug, Default, PartialEq)]
25052#[non_exhaustive]
25053pub struct ListWorkflowInvocationsResponse {
25054 pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
25056
25057 pub next_page_token: std::string::String,
25060
25061 pub unreachable: std::vec::Vec<std::string::String>,
25063
25064 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25065}
25066
25067impl ListWorkflowInvocationsResponse {
25068 pub fn new() -> Self {
25069 std::default::Default::default()
25070 }
25071
25072 pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
25074 where
25075 T: std::iter::IntoIterator<Item = V>,
25076 V: std::convert::Into<crate::model::WorkflowInvocation>,
25077 {
25078 use std::iter::Iterator;
25079 self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
25080 self
25081 }
25082
25083 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25085 self.next_page_token = v.into();
25086 self
25087 }
25088
25089 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
25091 where
25092 T: std::iter::IntoIterator<Item = V>,
25093 V: std::convert::Into<std::string::String>,
25094 {
25095 use std::iter::Iterator;
25096 self.unreachable = v.into_iter().map(|i| i.into()).collect();
25097 self
25098 }
25099}
25100
25101impl wkt::message::Message for ListWorkflowInvocationsResponse {
25102 fn typename() -> &'static str {
25103 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
25104 }
25105}
25106
25107#[doc(hidden)]
25108impl gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
25109 type PageItem = crate::model::WorkflowInvocation;
25110
25111 fn items(self) -> std::vec::Vec<Self::PageItem> {
25112 self.workflow_invocations
25113 }
25114
25115 fn next_page_token(&self) -> std::string::String {
25116 use std::clone::Clone;
25117 self.next_page_token.clone()
25118 }
25119}
25120
25121#[doc(hidden)]
25122impl<'de> serde::de::Deserialize<'de> for ListWorkflowInvocationsResponse {
25123 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25124 where
25125 D: serde::Deserializer<'de>,
25126 {
25127 #[allow(non_camel_case_types)]
25128 #[doc(hidden)]
25129 #[derive(PartialEq, Eq, Hash)]
25130 enum __FieldTag {
25131 __workflow_invocations,
25132 __next_page_token,
25133 __unreachable,
25134 Unknown(std::string::String),
25135 }
25136 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25137 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25138 where
25139 D: serde::Deserializer<'de>,
25140 {
25141 struct Visitor;
25142 impl<'de> serde::de::Visitor<'de> for Visitor {
25143 type Value = __FieldTag;
25144 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25145 formatter.write_str("a field name for ListWorkflowInvocationsResponse")
25146 }
25147 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25148 where
25149 E: serde::de::Error,
25150 {
25151 use std::result::Result::Ok;
25152 use std::string::ToString;
25153 match value {
25154 "workflowInvocations" => Ok(__FieldTag::__workflow_invocations),
25155 "workflow_invocations" => Ok(__FieldTag::__workflow_invocations),
25156 "nextPageToken" => Ok(__FieldTag::__next_page_token),
25157 "next_page_token" => Ok(__FieldTag::__next_page_token),
25158 "unreachable" => Ok(__FieldTag::__unreachable),
25159 _ => Ok(__FieldTag::Unknown(value.to_string())),
25160 }
25161 }
25162 }
25163 deserializer.deserialize_identifier(Visitor)
25164 }
25165 }
25166 struct Visitor;
25167 impl<'de> serde::de::Visitor<'de> for Visitor {
25168 type Value = ListWorkflowInvocationsResponse;
25169 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25170 formatter.write_str("struct ListWorkflowInvocationsResponse")
25171 }
25172 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25173 where
25174 A: serde::de::MapAccess<'de>,
25175 {
25176 #[allow(unused_imports)]
25177 use serde::de::Error;
25178 use std::option::Option::Some;
25179 let mut fields = std::collections::HashSet::new();
25180 let mut result = Self::Value::new();
25181 while let Some(tag) = map.next_key::<__FieldTag>()? {
25182 #[allow(clippy::match_single_binding)]
25183 match tag {
25184 __FieldTag::__workflow_invocations => {
25185 if !fields.insert(__FieldTag::__workflow_invocations) {
25186 return std::result::Result::Err(A::Error::duplicate_field(
25187 "multiple values for workflow_invocations",
25188 ));
25189 }
25190 result.workflow_invocations = map
25191 .next_value::<std::option::Option<
25192 std::vec::Vec<crate::model::WorkflowInvocation>,
25193 >>()?
25194 .unwrap_or_default();
25195 }
25196 __FieldTag::__next_page_token => {
25197 if !fields.insert(__FieldTag::__next_page_token) {
25198 return std::result::Result::Err(A::Error::duplicate_field(
25199 "multiple values for next_page_token",
25200 ));
25201 }
25202 result.next_page_token = map
25203 .next_value::<std::option::Option<std::string::String>>()?
25204 .unwrap_or_default();
25205 }
25206 __FieldTag::__unreachable => {
25207 if !fields.insert(__FieldTag::__unreachable) {
25208 return std::result::Result::Err(A::Error::duplicate_field(
25209 "multiple values for unreachable",
25210 ));
25211 }
25212 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
25213 }
25214 __FieldTag::Unknown(key) => {
25215 let value = map.next_value::<serde_json::Value>()?;
25216 result._unknown_fields.insert(key, value);
25217 }
25218 }
25219 }
25220 std::result::Result::Ok(result)
25221 }
25222 }
25223 deserializer.deserialize_any(Visitor)
25224 }
25225}
25226
25227#[doc(hidden)]
25228impl serde::ser::Serialize for ListWorkflowInvocationsResponse {
25229 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25230 where
25231 S: serde::ser::Serializer,
25232 {
25233 use serde::ser::SerializeMap;
25234 #[allow(unused_imports)]
25235 use std::option::Option::Some;
25236 let mut state = serializer.serialize_map(std::option::Option::None)?;
25237 if !self.workflow_invocations.is_empty() {
25238 state.serialize_entry("workflowInvocations", &self.workflow_invocations)?;
25239 }
25240 if !self.next_page_token.is_empty() {
25241 state.serialize_entry("nextPageToken", &self.next_page_token)?;
25242 }
25243 if !self.unreachable.is_empty() {
25244 state.serialize_entry("unreachable", &self.unreachable)?;
25245 }
25246 if !self._unknown_fields.is_empty() {
25247 for (key, value) in self._unknown_fields.iter() {
25248 state.serialize_entry(key, &value)?;
25249 }
25250 }
25251 state.end()
25252 }
25253}
25254
25255#[derive(Clone, Debug, Default, PartialEq)]
25257#[non_exhaustive]
25258pub struct GetWorkflowInvocationRequest {
25259 pub name: std::string::String,
25261
25262 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25263}
25264
25265impl GetWorkflowInvocationRequest {
25266 pub fn new() -> Self {
25267 std::default::Default::default()
25268 }
25269
25270 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25272 self.name = v.into();
25273 self
25274 }
25275}
25276
25277impl wkt::message::Message for GetWorkflowInvocationRequest {
25278 fn typename() -> &'static str {
25279 "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
25280 }
25281}
25282
25283#[doc(hidden)]
25284impl<'de> serde::de::Deserialize<'de> for GetWorkflowInvocationRequest {
25285 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25286 where
25287 D: serde::Deserializer<'de>,
25288 {
25289 #[allow(non_camel_case_types)]
25290 #[doc(hidden)]
25291 #[derive(PartialEq, Eq, Hash)]
25292 enum __FieldTag {
25293 __name,
25294 Unknown(std::string::String),
25295 }
25296 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25297 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25298 where
25299 D: serde::Deserializer<'de>,
25300 {
25301 struct Visitor;
25302 impl<'de> serde::de::Visitor<'de> for Visitor {
25303 type Value = __FieldTag;
25304 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25305 formatter.write_str("a field name for GetWorkflowInvocationRequest")
25306 }
25307 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25308 where
25309 E: serde::de::Error,
25310 {
25311 use std::result::Result::Ok;
25312 use std::string::ToString;
25313 match value {
25314 "name" => Ok(__FieldTag::__name),
25315 _ => Ok(__FieldTag::Unknown(value.to_string())),
25316 }
25317 }
25318 }
25319 deserializer.deserialize_identifier(Visitor)
25320 }
25321 }
25322 struct Visitor;
25323 impl<'de> serde::de::Visitor<'de> for Visitor {
25324 type Value = GetWorkflowInvocationRequest;
25325 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25326 formatter.write_str("struct GetWorkflowInvocationRequest")
25327 }
25328 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25329 where
25330 A: serde::de::MapAccess<'de>,
25331 {
25332 #[allow(unused_imports)]
25333 use serde::de::Error;
25334 use std::option::Option::Some;
25335 let mut fields = std::collections::HashSet::new();
25336 let mut result = Self::Value::new();
25337 while let Some(tag) = map.next_key::<__FieldTag>()? {
25338 #[allow(clippy::match_single_binding)]
25339 match tag {
25340 __FieldTag::__name => {
25341 if !fields.insert(__FieldTag::__name) {
25342 return std::result::Result::Err(A::Error::duplicate_field(
25343 "multiple values for name",
25344 ));
25345 }
25346 result.name = map
25347 .next_value::<std::option::Option<std::string::String>>()?
25348 .unwrap_or_default();
25349 }
25350 __FieldTag::Unknown(key) => {
25351 let value = map.next_value::<serde_json::Value>()?;
25352 result._unknown_fields.insert(key, value);
25353 }
25354 }
25355 }
25356 std::result::Result::Ok(result)
25357 }
25358 }
25359 deserializer.deserialize_any(Visitor)
25360 }
25361}
25362
25363#[doc(hidden)]
25364impl serde::ser::Serialize for GetWorkflowInvocationRequest {
25365 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25366 where
25367 S: serde::ser::Serializer,
25368 {
25369 use serde::ser::SerializeMap;
25370 #[allow(unused_imports)]
25371 use std::option::Option::Some;
25372 let mut state = serializer.serialize_map(std::option::Option::None)?;
25373 if !self.name.is_empty() {
25374 state.serialize_entry("name", &self.name)?;
25375 }
25376 if !self._unknown_fields.is_empty() {
25377 for (key, value) in self._unknown_fields.iter() {
25378 state.serialize_entry(key, &value)?;
25379 }
25380 }
25381 state.end()
25382 }
25383}
25384
25385#[derive(Clone, Debug, Default, PartialEq)]
25387#[non_exhaustive]
25388pub struct CreateWorkflowInvocationRequest {
25389 pub parent: std::string::String,
25392
25393 pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
25395
25396 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25397}
25398
25399impl CreateWorkflowInvocationRequest {
25400 pub fn new() -> Self {
25401 std::default::Default::default()
25402 }
25403
25404 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25406 self.parent = v.into();
25407 self
25408 }
25409
25410 pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
25412 where
25413 T: std::convert::Into<crate::model::WorkflowInvocation>,
25414 {
25415 self.workflow_invocation = std::option::Option::Some(v.into());
25416 self
25417 }
25418
25419 pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
25421 where
25422 T: std::convert::Into<crate::model::WorkflowInvocation>,
25423 {
25424 self.workflow_invocation = v.map(|x| x.into());
25425 self
25426 }
25427}
25428
25429impl wkt::message::Message for CreateWorkflowInvocationRequest {
25430 fn typename() -> &'static str {
25431 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
25432 }
25433}
25434
25435#[doc(hidden)]
25436impl<'de> serde::de::Deserialize<'de> for CreateWorkflowInvocationRequest {
25437 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25438 where
25439 D: serde::Deserializer<'de>,
25440 {
25441 #[allow(non_camel_case_types)]
25442 #[doc(hidden)]
25443 #[derive(PartialEq, Eq, Hash)]
25444 enum __FieldTag {
25445 __parent,
25446 __workflow_invocation,
25447 Unknown(std::string::String),
25448 }
25449 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25450 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25451 where
25452 D: serde::Deserializer<'de>,
25453 {
25454 struct Visitor;
25455 impl<'de> serde::de::Visitor<'de> for Visitor {
25456 type Value = __FieldTag;
25457 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25458 formatter.write_str("a field name for CreateWorkflowInvocationRequest")
25459 }
25460 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25461 where
25462 E: serde::de::Error,
25463 {
25464 use std::result::Result::Ok;
25465 use std::string::ToString;
25466 match value {
25467 "parent" => Ok(__FieldTag::__parent),
25468 "workflowInvocation" => Ok(__FieldTag::__workflow_invocation),
25469 "workflow_invocation" => Ok(__FieldTag::__workflow_invocation),
25470 _ => Ok(__FieldTag::Unknown(value.to_string())),
25471 }
25472 }
25473 }
25474 deserializer.deserialize_identifier(Visitor)
25475 }
25476 }
25477 struct Visitor;
25478 impl<'de> serde::de::Visitor<'de> for Visitor {
25479 type Value = CreateWorkflowInvocationRequest;
25480 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25481 formatter.write_str("struct CreateWorkflowInvocationRequest")
25482 }
25483 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25484 where
25485 A: serde::de::MapAccess<'de>,
25486 {
25487 #[allow(unused_imports)]
25488 use serde::de::Error;
25489 use std::option::Option::Some;
25490 let mut fields = std::collections::HashSet::new();
25491 let mut result = Self::Value::new();
25492 while let Some(tag) = map.next_key::<__FieldTag>()? {
25493 #[allow(clippy::match_single_binding)]
25494 match tag {
25495 __FieldTag::__parent => {
25496 if !fields.insert(__FieldTag::__parent) {
25497 return std::result::Result::Err(A::Error::duplicate_field(
25498 "multiple values for parent",
25499 ));
25500 }
25501 result.parent = map
25502 .next_value::<std::option::Option<std::string::String>>()?
25503 .unwrap_or_default();
25504 }
25505 __FieldTag::__workflow_invocation => {
25506 if !fields.insert(__FieldTag::__workflow_invocation) {
25507 return std::result::Result::Err(A::Error::duplicate_field(
25508 "multiple values for workflow_invocation",
25509 ));
25510 }
25511 result.workflow_invocation = map.next_value::<std::option::Option<crate::model::WorkflowInvocation>>()?
25512 ;
25513 }
25514 __FieldTag::Unknown(key) => {
25515 let value = map.next_value::<serde_json::Value>()?;
25516 result._unknown_fields.insert(key, value);
25517 }
25518 }
25519 }
25520 std::result::Result::Ok(result)
25521 }
25522 }
25523 deserializer.deserialize_any(Visitor)
25524 }
25525}
25526
25527#[doc(hidden)]
25528impl serde::ser::Serialize for CreateWorkflowInvocationRequest {
25529 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25530 where
25531 S: serde::ser::Serializer,
25532 {
25533 use serde::ser::SerializeMap;
25534 #[allow(unused_imports)]
25535 use std::option::Option::Some;
25536 let mut state = serializer.serialize_map(std::option::Option::None)?;
25537 if !self.parent.is_empty() {
25538 state.serialize_entry("parent", &self.parent)?;
25539 }
25540 if self.workflow_invocation.is_some() {
25541 state.serialize_entry("workflowInvocation", &self.workflow_invocation)?;
25542 }
25543 if !self._unknown_fields.is_empty() {
25544 for (key, value) in self._unknown_fields.iter() {
25545 state.serialize_entry(key, &value)?;
25546 }
25547 }
25548 state.end()
25549 }
25550}
25551
25552#[derive(Clone, Debug, Default, PartialEq)]
25554#[non_exhaustive]
25555pub struct DeleteWorkflowInvocationRequest {
25556 pub name: std::string::String,
25558
25559 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25560}
25561
25562impl DeleteWorkflowInvocationRequest {
25563 pub fn new() -> Self {
25564 std::default::Default::default()
25565 }
25566
25567 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25569 self.name = v.into();
25570 self
25571 }
25572}
25573
25574impl wkt::message::Message for DeleteWorkflowInvocationRequest {
25575 fn typename() -> &'static str {
25576 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
25577 }
25578}
25579
25580#[doc(hidden)]
25581impl<'de> serde::de::Deserialize<'de> for DeleteWorkflowInvocationRequest {
25582 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25583 where
25584 D: serde::Deserializer<'de>,
25585 {
25586 #[allow(non_camel_case_types)]
25587 #[doc(hidden)]
25588 #[derive(PartialEq, Eq, Hash)]
25589 enum __FieldTag {
25590 __name,
25591 Unknown(std::string::String),
25592 }
25593 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25594 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25595 where
25596 D: serde::Deserializer<'de>,
25597 {
25598 struct Visitor;
25599 impl<'de> serde::de::Visitor<'de> for Visitor {
25600 type Value = __FieldTag;
25601 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25602 formatter.write_str("a field name for DeleteWorkflowInvocationRequest")
25603 }
25604 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25605 where
25606 E: serde::de::Error,
25607 {
25608 use std::result::Result::Ok;
25609 use std::string::ToString;
25610 match value {
25611 "name" => Ok(__FieldTag::__name),
25612 _ => Ok(__FieldTag::Unknown(value.to_string())),
25613 }
25614 }
25615 }
25616 deserializer.deserialize_identifier(Visitor)
25617 }
25618 }
25619 struct Visitor;
25620 impl<'de> serde::de::Visitor<'de> for Visitor {
25621 type Value = DeleteWorkflowInvocationRequest;
25622 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25623 formatter.write_str("struct DeleteWorkflowInvocationRequest")
25624 }
25625 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25626 where
25627 A: serde::de::MapAccess<'de>,
25628 {
25629 #[allow(unused_imports)]
25630 use serde::de::Error;
25631 use std::option::Option::Some;
25632 let mut fields = std::collections::HashSet::new();
25633 let mut result = Self::Value::new();
25634 while let Some(tag) = map.next_key::<__FieldTag>()? {
25635 #[allow(clippy::match_single_binding)]
25636 match tag {
25637 __FieldTag::__name => {
25638 if !fields.insert(__FieldTag::__name) {
25639 return std::result::Result::Err(A::Error::duplicate_field(
25640 "multiple values for name",
25641 ));
25642 }
25643 result.name = map
25644 .next_value::<std::option::Option<std::string::String>>()?
25645 .unwrap_or_default();
25646 }
25647 __FieldTag::Unknown(key) => {
25648 let value = map.next_value::<serde_json::Value>()?;
25649 result._unknown_fields.insert(key, value);
25650 }
25651 }
25652 }
25653 std::result::Result::Ok(result)
25654 }
25655 }
25656 deserializer.deserialize_any(Visitor)
25657 }
25658}
25659
25660#[doc(hidden)]
25661impl serde::ser::Serialize for DeleteWorkflowInvocationRequest {
25662 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25663 where
25664 S: serde::ser::Serializer,
25665 {
25666 use serde::ser::SerializeMap;
25667 #[allow(unused_imports)]
25668 use std::option::Option::Some;
25669 let mut state = serializer.serialize_map(std::option::Option::None)?;
25670 if !self.name.is_empty() {
25671 state.serialize_entry("name", &self.name)?;
25672 }
25673 if !self._unknown_fields.is_empty() {
25674 for (key, value) in self._unknown_fields.iter() {
25675 state.serialize_entry(key, &value)?;
25676 }
25677 }
25678 state.end()
25679 }
25680}
25681
25682#[derive(Clone, Debug, Default, PartialEq)]
25684#[non_exhaustive]
25685pub struct CancelWorkflowInvocationRequest {
25686 pub name: std::string::String,
25688
25689 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25690}
25691
25692impl CancelWorkflowInvocationRequest {
25693 pub fn new() -> Self {
25694 std::default::Default::default()
25695 }
25696
25697 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25699 self.name = v.into();
25700 self
25701 }
25702}
25703
25704impl wkt::message::Message for CancelWorkflowInvocationRequest {
25705 fn typename() -> &'static str {
25706 "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
25707 }
25708}
25709
25710#[doc(hidden)]
25711impl<'de> serde::de::Deserialize<'de> for CancelWorkflowInvocationRequest {
25712 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25713 where
25714 D: serde::Deserializer<'de>,
25715 {
25716 #[allow(non_camel_case_types)]
25717 #[doc(hidden)]
25718 #[derive(PartialEq, Eq, Hash)]
25719 enum __FieldTag {
25720 __name,
25721 Unknown(std::string::String),
25722 }
25723 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25724 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25725 where
25726 D: serde::Deserializer<'de>,
25727 {
25728 struct Visitor;
25729 impl<'de> serde::de::Visitor<'de> for Visitor {
25730 type Value = __FieldTag;
25731 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25732 formatter.write_str("a field name for CancelWorkflowInvocationRequest")
25733 }
25734 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25735 where
25736 E: serde::de::Error,
25737 {
25738 use std::result::Result::Ok;
25739 use std::string::ToString;
25740 match value {
25741 "name" => Ok(__FieldTag::__name),
25742 _ => Ok(__FieldTag::Unknown(value.to_string())),
25743 }
25744 }
25745 }
25746 deserializer.deserialize_identifier(Visitor)
25747 }
25748 }
25749 struct Visitor;
25750 impl<'de> serde::de::Visitor<'de> for Visitor {
25751 type Value = CancelWorkflowInvocationRequest;
25752 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25753 formatter.write_str("struct CancelWorkflowInvocationRequest")
25754 }
25755 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25756 where
25757 A: serde::de::MapAccess<'de>,
25758 {
25759 #[allow(unused_imports)]
25760 use serde::de::Error;
25761 use std::option::Option::Some;
25762 let mut fields = std::collections::HashSet::new();
25763 let mut result = Self::Value::new();
25764 while let Some(tag) = map.next_key::<__FieldTag>()? {
25765 #[allow(clippy::match_single_binding)]
25766 match tag {
25767 __FieldTag::__name => {
25768 if !fields.insert(__FieldTag::__name) {
25769 return std::result::Result::Err(A::Error::duplicate_field(
25770 "multiple values for name",
25771 ));
25772 }
25773 result.name = map
25774 .next_value::<std::option::Option<std::string::String>>()?
25775 .unwrap_or_default();
25776 }
25777 __FieldTag::Unknown(key) => {
25778 let value = map.next_value::<serde_json::Value>()?;
25779 result._unknown_fields.insert(key, value);
25780 }
25781 }
25782 }
25783 std::result::Result::Ok(result)
25784 }
25785 }
25786 deserializer.deserialize_any(Visitor)
25787 }
25788}
25789
25790#[doc(hidden)]
25791impl serde::ser::Serialize for CancelWorkflowInvocationRequest {
25792 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25793 where
25794 S: serde::ser::Serializer,
25795 {
25796 use serde::ser::SerializeMap;
25797 #[allow(unused_imports)]
25798 use std::option::Option::Some;
25799 let mut state = serializer.serialize_map(std::option::Option::None)?;
25800 if !self.name.is_empty() {
25801 state.serialize_entry("name", &self.name)?;
25802 }
25803 if !self._unknown_fields.is_empty() {
25804 for (key, value) in self._unknown_fields.iter() {
25805 state.serialize_entry(key, &value)?;
25806 }
25807 }
25808 state.end()
25809 }
25810}
25811
25812#[derive(Clone, Debug, Default, PartialEq)]
25814#[non_exhaustive]
25815pub struct CancelWorkflowInvocationResponse {
25816 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25817}
25818
25819impl CancelWorkflowInvocationResponse {
25820 pub fn new() -> Self {
25821 std::default::Default::default()
25822 }
25823}
25824
25825impl wkt::message::Message for CancelWorkflowInvocationResponse {
25826 fn typename() -> &'static str {
25827 "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
25828 }
25829}
25830
25831#[doc(hidden)]
25832impl<'de> serde::de::Deserialize<'de> for CancelWorkflowInvocationResponse {
25833 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25834 where
25835 D: serde::Deserializer<'de>,
25836 {
25837 #[allow(non_camel_case_types)]
25838 #[doc(hidden)]
25839 #[derive(PartialEq, Eq, Hash)]
25840 enum __FieldTag {
25841 Unknown(std::string::String),
25842 }
25843 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25844 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25845 where
25846 D: serde::Deserializer<'de>,
25847 {
25848 struct Visitor;
25849 impl<'de> serde::de::Visitor<'de> for Visitor {
25850 type Value = __FieldTag;
25851 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25852 formatter.write_str("a field name for CancelWorkflowInvocationResponse")
25853 }
25854 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25855 where
25856 E: serde::de::Error,
25857 {
25858 use std::result::Result::Ok;
25859 use std::string::ToString;
25860 Ok(__FieldTag::Unknown(value.to_string()))
25861 }
25862 }
25863 deserializer.deserialize_identifier(Visitor)
25864 }
25865 }
25866 struct Visitor;
25867 impl<'de> serde::de::Visitor<'de> for Visitor {
25868 type Value = CancelWorkflowInvocationResponse;
25869 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25870 formatter.write_str("struct CancelWorkflowInvocationResponse")
25871 }
25872 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25873 where
25874 A: serde::de::MapAccess<'de>,
25875 {
25876 #[allow(unused_imports)]
25877 use serde::de::Error;
25878 use std::option::Option::Some;
25879 let mut result = Self::Value::new();
25880 while let Some(tag) = map.next_key::<__FieldTag>()? {
25881 #[allow(clippy::match_single_binding)]
25882 match tag {
25883 __FieldTag::Unknown(key) => {
25884 let value = map.next_value::<serde_json::Value>()?;
25885 result._unknown_fields.insert(key, value);
25886 }
25887 }
25888 }
25889 std::result::Result::Ok(result)
25890 }
25891 }
25892 deserializer.deserialize_any(Visitor)
25893 }
25894}
25895
25896#[doc(hidden)]
25897impl serde::ser::Serialize for CancelWorkflowInvocationResponse {
25898 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25899 where
25900 S: serde::ser::Serializer,
25901 {
25902 use serde::ser::SerializeMap;
25903 #[allow(unused_imports)]
25904 use std::option::Option::Some;
25905 let mut state = serializer.serialize_map(std::option::Option::None)?;
25906 if !self._unknown_fields.is_empty() {
25907 for (key, value) in self._unknown_fields.iter() {
25908 state.serialize_entry(key, &value)?;
25909 }
25910 }
25911 state.end()
25912 }
25913}
25914
25915#[derive(Clone, Debug, Default, PartialEq)]
25917#[non_exhaustive]
25918pub struct WorkflowInvocationAction {
25919 pub target: std::option::Option<crate::model::Target>,
25922
25923 pub canonical_target: std::option::Option<crate::model::Target>,
25926
25927 pub state: crate::model::workflow_invocation_action::State,
25929
25930 pub failure_reason: std::string::String,
25933
25934 pub invocation_timing: std::option::Option<gtype::model::Interval>,
25940
25941 pub internal_metadata: std::option::Option<std::string::String>,
25945
25946 pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
25948
25949 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25950}
25951
25952impl WorkflowInvocationAction {
25953 pub fn new() -> Self {
25954 std::default::Default::default()
25955 }
25956
25957 pub fn set_target<T>(mut self, v: T) -> Self
25959 where
25960 T: std::convert::Into<crate::model::Target>,
25961 {
25962 self.target = std::option::Option::Some(v.into());
25963 self
25964 }
25965
25966 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
25968 where
25969 T: std::convert::Into<crate::model::Target>,
25970 {
25971 self.target = v.map(|x| x.into());
25972 self
25973 }
25974
25975 pub fn set_canonical_target<T>(mut self, v: T) -> Self
25977 where
25978 T: std::convert::Into<crate::model::Target>,
25979 {
25980 self.canonical_target = std::option::Option::Some(v.into());
25981 self
25982 }
25983
25984 pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
25986 where
25987 T: std::convert::Into<crate::model::Target>,
25988 {
25989 self.canonical_target = v.map(|x| x.into());
25990 self
25991 }
25992
25993 pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
25995 mut self,
25996 v: T,
25997 ) -> Self {
25998 self.state = v.into();
25999 self
26000 }
26001
26002 pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26004 self.failure_reason = v.into();
26005 self
26006 }
26007
26008 pub fn set_invocation_timing<T>(mut self, v: T) -> Self
26010 where
26011 T: std::convert::Into<gtype::model::Interval>,
26012 {
26013 self.invocation_timing = std::option::Option::Some(v.into());
26014 self
26015 }
26016
26017 pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
26019 where
26020 T: std::convert::Into<gtype::model::Interval>,
26021 {
26022 self.invocation_timing = v.map(|x| x.into());
26023 self
26024 }
26025
26026 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
26028 where
26029 T: std::convert::Into<std::string::String>,
26030 {
26031 self.internal_metadata = std::option::Option::Some(v.into());
26032 self
26033 }
26034
26035 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
26037 where
26038 T: std::convert::Into<std::string::String>,
26039 {
26040 self.internal_metadata = v.map(|x| x.into());
26041 self
26042 }
26043
26044 pub fn set_action<
26049 T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
26050 >(
26051 mut self,
26052 v: T,
26053 ) -> Self {
26054 self.action = v.into();
26055 self
26056 }
26057
26058 pub fn bigquery_action(
26062 &self,
26063 ) -> std::option::Option<
26064 &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
26065 > {
26066 #[allow(unreachable_patterns)]
26067 self.action.as_ref().and_then(|v| match v {
26068 crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
26069 std::option::Option::Some(v)
26070 }
26071 _ => std::option::Option::None,
26072 })
26073 }
26074
26075 pub fn set_bigquery_action<
26081 T: std::convert::Into<
26082 std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
26083 >,
26084 >(
26085 mut self,
26086 v: T,
26087 ) -> Self {
26088 self.action = std::option::Option::Some(
26089 crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
26090 );
26091 self
26092 }
26093
26094 pub fn notebook_action(
26098 &self,
26099 ) -> std::option::Option<
26100 &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
26101 > {
26102 #[allow(unreachable_patterns)]
26103 self.action.as_ref().and_then(|v| match v {
26104 crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
26105 std::option::Option::Some(v)
26106 }
26107 _ => std::option::Option::None,
26108 })
26109 }
26110
26111 pub fn set_notebook_action<
26117 T: std::convert::Into<
26118 std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
26119 >,
26120 >(
26121 mut self,
26122 v: T,
26123 ) -> Self {
26124 self.action = std::option::Option::Some(
26125 crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
26126 );
26127 self
26128 }
26129
26130 pub fn data_preparation_action(
26134 &self,
26135 ) -> std::option::Option<
26136 &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
26137 > {
26138 #[allow(unreachable_patterns)]
26139 self.action.as_ref().and_then(|v| match v {
26140 crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
26141 std::option::Option::Some(v)
26142 }
26143 _ => std::option::Option::None,
26144 })
26145 }
26146
26147 pub fn set_data_preparation_action<
26153 T: std::convert::Into<
26154 std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
26155 >,
26156 >(
26157 mut self,
26158 v: T,
26159 ) -> Self {
26160 self.action = std::option::Option::Some(
26161 crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
26162 );
26163 self
26164 }
26165}
26166
26167impl wkt::message::Message for WorkflowInvocationAction {
26168 fn typename() -> &'static str {
26169 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
26170 }
26171}
26172
26173#[doc(hidden)]
26174impl<'de> serde::de::Deserialize<'de> for WorkflowInvocationAction {
26175 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26176 where
26177 D: serde::Deserializer<'de>,
26178 {
26179 #[allow(non_camel_case_types)]
26180 #[doc(hidden)]
26181 #[derive(PartialEq, Eq, Hash)]
26182 enum __FieldTag {
26183 __bigquery_action,
26184 __notebook_action,
26185 __data_preparation_action,
26186 __target,
26187 __canonical_target,
26188 __state,
26189 __failure_reason,
26190 __invocation_timing,
26191 __internal_metadata,
26192 Unknown(std::string::String),
26193 }
26194 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
26195 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26196 where
26197 D: serde::Deserializer<'de>,
26198 {
26199 struct Visitor;
26200 impl<'de> serde::de::Visitor<'de> for Visitor {
26201 type Value = __FieldTag;
26202 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26203 formatter.write_str("a field name for WorkflowInvocationAction")
26204 }
26205 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
26206 where
26207 E: serde::de::Error,
26208 {
26209 use std::result::Result::Ok;
26210 use std::string::ToString;
26211 match value {
26212 "bigqueryAction" => Ok(__FieldTag::__bigquery_action),
26213 "bigquery_action" => Ok(__FieldTag::__bigquery_action),
26214 "notebookAction" => Ok(__FieldTag::__notebook_action),
26215 "notebook_action" => Ok(__FieldTag::__notebook_action),
26216 "dataPreparationAction" => Ok(__FieldTag::__data_preparation_action),
26217 "data_preparation_action" => Ok(__FieldTag::__data_preparation_action),
26218 "target" => Ok(__FieldTag::__target),
26219 "canonicalTarget" => Ok(__FieldTag::__canonical_target),
26220 "canonical_target" => Ok(__FieldTag::__canonical_target),
26221 "state" => Ok(__FieldTag::__state),
26222 "failureReason" => Ok(__FieldTag::__failure_reason),
26223 "failure_reason" => Ok(__FieldTag::__failure_reason),
26224 "invocationTiming" => Ok(__FieldTag::__invocation_timing),
26225 "invocation_timing" => Ok(__FieldTag::__invocation_timing),
26226 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
26227 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
26228 _ => Ok(__FieldTag::Unknown(value.to_string())),
26229 }
26230 }
26231 }
26232 deserializer.deserialize_identifier(Visitor)
26233 }
26234 }
26235 struct Visitor;
26236 impl<'de> serde::de::Visitor<'de> for Visitor {
26237 type Value = WorkflowInvocationAction;
26238 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26239 formatter.write_str("struct WorkflowInvocationAction")
26240 }
26241 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
26242 where
26243 A: serde::de::MapAccess<'de>,
26244 {
26245 #[allow(unused_imports)]
26246 use serde::de::Error;
26247 use std::option::Option::Some;
26248 let mut fields = std::collections::HashSet::new();
26249 let mut result = Self::Value::new();
26250 while let Some(tag) = map.next_key::<__FieldTag>()? {
26251 #[allow(clippy::match_single_binding)]
26252 match tag {
26253 __FieldTag::__bigquery_action => {
26254 if !fields.insert(__FieldTag::__bigquery_action) {
26255 return std::result::Result::Err(A::Error::duplicate_field(
26256 "multiple values for bigquery_action",
26257 ));
26258 }
26259 if result.action.is_some() {
26260 return std::result::Result::Err(A::Error::duplicate_field(
26261 "multiple values for `action`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.bigquery_action, latest field was bigqueryAction",
26262 ));
26263 }
26264 result.action = std::option::Option::Some(
26265 crate::model::workflow_invocation_action::Action::BigqueryAction(
26266 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>>>()?.unwrap_or_default()
26267 ),
26268 );
26269 }
26270 __FieldTag::__notebook_action => {
26271 if !fields.insert(__FieldTag::__notebook_action) {
26272 return std::result::Result::Err(A::Error::duplicate_field(
26273 "multiple values for notebook_action",
26274 ));
26275 }
26276 if result.action.is_some() {
26277 return std::result::Result::Err(A::Error::duplicate_field(
26278 "multiple values for `action`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.notebook_action, latest field was notebookAction",
26279 ));
26280 }
26281 result.action = std::option::Option::Some(
26282 crate::model::workflow_invocation_action::Action::NotebookAction(
26283 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>>>()?.unwrap_or_default()
26284 ),
26285 );
26286 }
26287 __FieldTag::__data_preparation_action => {
26288 if !fields.insert(__FieldTag::__data_preparation_action) {
26289 return std::result::Result::Err(A::Error::duplicate_field(
26290 "multiple values for data_preparation_action",
26291 ));
26292 }
26293 if result.action.is_some() {
26294 return std::result::Result::Err(A::Error::duplicate_field(
26295 "multiple values for `action`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.data_preparation_action, latest field was dataPreparationAction",
26296 ));
26297 }
26298 result.action = std::option::Option::Some(
26299 crate::model::workflow_invocation_action::Action::DataPreparationAction(
26300 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>>>()?.unwrap_or_default()
26301 ),
26302 );
26303 }
26304 __FieldTag::__target => {
26305 if !fields.insert(__FieldTag::__target) {
26306 return std::result::Result::Err(A::Error::duplicate_field(
26307 "multiple values for target",
26308 ));
26309 }
26310 result.target =
26311 map.next_value::<std::option::Option<crate::model::Target>>()?;
26312 }
26313 __FieldTag::__canonical_target => {
26314 if !fields.insert(__FieldTag::__canonical_target) {
26315 return std::result::Result::Err(A::Error::duplicate_field(
26316 "multiple values for canonical_target",
26317 ));
26318 }
26319 result.canonical_target =
26320 map.next_value::<std::option::Option<crate::model::Target>>()?;
26321 }
26322 __FieldTag::__state => {
26323 if !fields.insert(__FieldTag::__state) {
26324 return std::result::Result::Err(A::Error::duplicate_field(
26325 "multiple values for state",
26326 ));
26327 }
26328 result.state = map
26329 .next_value::<std::option::Option<
26330 crate::model::workflow_invocation_action::State,
26331 >>()?
26332 .unwrap_or_default();
26333 }
26334 __FieldTag::__failure_reason => {
26335 if !fields.insert(__FieldTag::__failure_reason) {
26336 return std::result::Result::Err(A::Error::duplicate_field(
26337 "multiple values for failure_reason",
26338 ));
26339 }
26340 result.failure_reason = map
26341 .next_value::<std::option::Option<std::string::String>>()?
26342 .unwrap_or_default();
26343 }
26344 __FieldTag::__invocation_timing => {
26345 if !fields.insert(__FieldTag::__invocation_timing) {
26346 return std::result::Result::Err(A::Error::duplicate_field(
26347 "multiple values for invocation_timing",
26348 ));
26349 }
26350 result.invocation_timing =
26351 map.next_value::<std::option::Option<gtype::model::Interval>>()?;
26352 }
26353 __FieldTag::__internal_metadata => {
26354 if !fields.insert(__FieldTag::__internal_metadata) {
26355 return std::result::Result::Err(A::Error::duplicate_field(
26356 "multiple values for internal_metadata",
26357 ));
26358 }
26359 result.internal_metadata =
26360 map.next_value::<std::option::Option<std::string::String>>()?;
26361 }
26362 __FieldTag::Unknown(key) => {
26363 let value = map.next_value::<serde_json::Value>()?;
26364 result._unknown_fields.insert(key, value);
26365 }
26366 }
26367 }
26368 std::result::Result::Ok(result)
26369 }
26370 }
26371 deserializer.deserialize_any(Visitor)
26372 }
26373}
26374
26375#[doc(hidden)]
26376impl serde::ser::Serialize for WorkflowInvocationAction {
26377 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26378 where
26379 S: serde::ser::Serializer,
26380 {
26381 use serde::ser::SerializeMap;
26382 #[allow(unused_imports)]
26383 use std::option::Option::Some;
26384 let mut state = serializer.serialize_map(std::option::Option::None)?;
26385 if let Some(value) = self.bigquery_action() {
26386 state.serialize_entry("bigqueryAction", value)?;
26387 }
26388 if let Some(value) = self.notebook_action() {
26389 state.serialize_entry("notebookAction", value)?;
26390 }
26391 if let Some(value) = self.data_preparation_action() {
26392 state.serialize_entry("dataPreparationAction", value)?;
26393 }
26394 if self.target.is_some() {
26395 state.serialize_entry("target", &self.target)?;
26396 }
26397 if self.canonical_target.is_some() {
26398 state.serialize_entry("canonicalTarget", &self.canonical_target)?;
26399 }
26400 if !wkt::internal::is_default(&self.state) {
26401 state.serialize_entry("state", &self.state)?;
26402 }
26403 if !self.failure_reason.is_empty() {
26404 state.serialize_entry("failureReason", &self.failure_reason)?;
26405 }
26406 if self.invocation_timing.is_some() {
26407 state.serialize_entry("invocationTiming", &self.invocation_timing)?;
26408 }
26409 if self.internal_metadata.is_some() {
26410 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
26411 }
26412 if !self._unknown_fields.is_empty() {
26413 for (key, value) in self._unknown_fields.iter() {
26414 state.serialize_entry(key, &value)?;
26415 }
26416 }
26417 state.end()
26418 }
26419}
26420
26421pub mod workflow_invocation_action {
26423 #[allow(unused_imports)]
26424 use super::*;
26425
26426 #[derive(Clone, Debug, Default, PartialEq)]
26428 #[non_exhaustive]
26429 pub struct BigQueryAction {
26430 pub sql_script: std::string::String,
26432
26433 pub job_id: std::string::String,
26436
26437 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26438 }
26439
26440 impl BigQueryAction {
26441 pub fn new() -> Self {
26442 std::default::Default::default()
26443 }
26444
26445 pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26447 self.sql_script = v.into();
26448 self
26449 }
26450
26451 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26453 self.job_id = v.into();
26454 self
26455 }
26456 }
26457
26458 impl wkt::message::Message for BigQueryAction {
26459 fn typename() -> &'static str {
26460 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
26461 }
26462 }
26463
26464 #[doc(hidden)]
26465 impl<'de> serde::de::Deserialize<'de> for BigQueryAction {
26466 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26467 where
26468 D: serde::Deserializer<'de>,
26469 {
26470 #[allow(non_camel_case_types)]
26471 #[doc(hidden)]
26472 #[derive(PartialEq, Eq, Hash)]
26473 enum __FieldTag {
26474 __sql_script,
26475 __job_id,
26476 Unknown(std::string::String),
26477 }
26478 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
26479 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26480 where
26481 D: serde::Deserializer<'de>,
26482 {
26483 struct Visitor;
26484 impl<'de> serde::de::Visitor<'de> for Visitor {
26485 type Value = __FieldTag;
26486 fn expecting(
26487 &self,
26488 formatter: &mut std::fmt::Formatter,
26489 ) -> std::fmt::Result {
26490 formatter.write_str("a field name for BigQueryAction")
26491 }
26492 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
26493 where
26494 E: serde::de::Error,
26495 {
26496 use std::result::Result::Ok;
26497 use std::string::ToString;
26498 match value {
26499 "sqlScript" => Ok(__FieldTag::__sql_script),
26500 "sql_script" => Ok(__FieldTag::__sql_script),
26501 "jobId" => Ok(__FieldTag::__job_id),
26502 "job_id" => Ok(__FieldTag::__job_id),
26503 _ => Ok(__FieldTag::Unknown(value.to_string())),
26504 }
26505 }
26506 }
26507 deserializer.deserialize_identifier(Visitor)
26508 }
26509 }
26510 struct Visitor;
26511 impl<'de> serde::de::Visitor<'de> for Visitor {
26512 type Value = BigQueryAction;
26513 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26514 formatter.write_str("struct BigQueryAction")
26515 }
26516 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
26517 where
26518 A: serde::de::MapAccess<'de>,
26519 {
26520 #[allow(unused_imports)]
26521 use serde::de::Error;
26522 use std::option::Option::Some;
26523 let mut fields = std::collections::HashSet::new();
26524 let mut result = Self::Value::new();
26525 while let Some(tag) = map.next_key::<__FieldTag>()? {
26526 #[allow(clippy::match_single_binding)]
26527 match tag {
26528 __FieldTag::__sql_script => {
26529 if !fields.insert(__FieldTag::__sql_script) {
26530 return std::result::Result::Err(A::Error::duplicate_field(
26531 "multiple values for sql_script",
26532 ));
26533 }
26534 result.sql_script = map
26535 .next_value::<std::option::Option<std::string::String>>()?
26536 .unwrap_or_default();
26537 }
26538 __FieldTag::__job_id => {
26539 if !fields.insert(__FieldTag::__job_id) {
26540 return std::result::Result::Err(A::Error::duplicate_field(
26541 "multiple values for job_id",
26542 ));
26543 }
26544 result.job_id = map
26545 .next_value::<std::option::Option<std::string::String>>()?
26546 .unwrap_or_default();
26547 }
26548 __FieldTag::Unknown(key) => {
26549 let value = map.next_value::<serde_json::Value>()?;
26550 result._unknown_fields.insert(key, value);
26551 }
26552 }
26553 }
26554 std::result::Result::Ok(result)
26555 }
26556 }
26557 deserializer.deserialize_any(Visitor)
26558 }
26559 }
26560
26561 #[doc(hidden)]
26562 impl serde::ser::Serialize for BigQueryAction {
26563 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26564 where
26565 S: serde::ser::Serializer,
26566 {
26567 use serde::ser::SerializeMap;
26568 #[allow(unused_imports)]
26569 use std::option::Option::Some;
26570 let mut state = serializer.serialize_map(std::option::Option::None)?;
26571 if !self.sql_script.is_empty() {
26572 state.serialize_entry("sqlScript", &self.sql_script)?;
26573 }
26574 if !self.job_id.is_empty() {
26575 state.serialize_entry("jobId", &self.job_id)?;
26576 }
26577 if !self._unknown_fields.is_empty() {
26578 for (key, value) in self._unknown_fields.iter() {
26579 state.serialize_entry(key, &value)?;
26580 }
26581 }
26582 state.end()
26583 }
26584 }
26585
26586 #[derive(Clone, Debug, Default, PartialEq)]
26588 #[non_exhaustive]
26589 pub struct NotebookAction {
26590 pub contents: std::string::String,
26592
26593 pub job_id: std::string::String,
26597
26598 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26599 }
26600
26601 impl NotebookAction {
26602 pub fn new() -> Self {
26603 std::default::Default::default()
26604 }
26605
26606 pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26608 self.contents = v.into();
26609 self
26610 }
26611
26612 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26614 self.job_id = v.into();
26615 self
26616 }
26617 }
26618
26619 impl wkt::message::Message for NotebookAction {
26620 fn typename() -> &'static str {
26621 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
26622 }
26623 }
26624
26625 #[doc(hidden)]
26626 impl<'de> serde::de::Deserialize<'de> for NotebookAction {
26627 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26628 where
26629 D: serde::Deserializer<'de>,
26630 {
26631 #[allow(non_camel_case_types)]
26632 #[doc(hidden)]
26633 #[derive(PartialEq, Eq, Hash)]
26634 enum __FieldTag {
26635 __contents,
26636 __job_id,
26637 Unknown(std::string::String),
26638 }
26639 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
26640 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26641 where
26642 D: serde::Deserializer<'de>,
26643 {
26644 struct Visitor;
26645 impl<'de> serde::de::Visitor<'de> for Visitor {
26646 type Value = __FieldTag;
26647 fn expecting(
26648 &self,
26649 formatter: &mut std::fmt::Formatter,
26650 ) -> std::fmt::Result {
26651 formatter.write_str("a field name for NotebookAction")
26652 }
26653 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
26654 where
26655 E: serde::de::Error,
26656 {
26657 use std::result::Result::Ok;
26658 use std::string::ToString;
26659 match value {
26660 "contents" => Ok(__FieldTag::__contents),
26661 "jobId" => Ok(__FieldTag::__job_id),
26662 "job_id" => Ok(__FieldTag::__job_id),
26663 _ => Ok(__FieldTag::Unknown(value.to_string())),
26664 }
26665 }
26666 }
26667 deserializer.deserialize_identifier(Visitor)
26668 }
26669 }
26670 struct Visitor;
26671 impl<'de> serde::de::Visitor<'de> for Visitor {
26672 type Value = NotebookAction;
26673 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26674 formatter.write_str("struct NotebookAction")
26675 }
26676 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
26677 where
26678 A: serde::de::MapAccess<'de>,
26679 {
26680 #[allow(unused_imports)]
26681 use serde::de::Error;
26682 use std::option::Option::Some;
26683 let mut fields = std::collections::HashSet::new();
26684 let mut result = Self::Value::new();
26685 while let Some(tag) = map.next_key::<__FieldTag>()? {
26686 #[allow(clippy::match_single_binding)]
26687 match tag {
26688 __FieldTag::__contents => {
26689 if !fields.insert(__FieldTag::__contents) {
26690 return std::result::Result::Err(A::Error::duplicate_field(
26691 "multiple values for contents",
26692 ));
26693 }
26694 result.contents = map
26695 .next_value::<std::option::Option<std::string::String>>()?
26696 .unwrap_or_default();
26697 }
26698 __FieldTag::__job_id => {
26699 if !fields.insert(__FieldTag::__job_id) {
26700 return std::result::Result::Err(A::Error::duplicate_field(
26701 "multiple values for job_id",
26702 ));
26703 }
26704 result.job_id = map
26705 .next_value::<std::option::Option<std::string::String>>()?
26706 .unwrap_or_default();
26707 }
26708 __FieldTag::Unknown(key) => {
26709 let value = map.next_value::<serde_json::Value>()?;
26710 result._unknown_fields.insert(key, value);
26711 }
26712 }
26713 }
26714 std::result::Result::Ok(result)
26715 }
26716 }
26717 deserializer.deserialize_any(Visitor)
26718 }
26719 }
26720
26721 #[doc(hidden)]
26722 impl serde::ser::Serialize for NotebookAction {
26723 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26724 where
26725 S: serde::ser::Serializer,
26726 {
26727 use serde::ser::SerializeMap;
26728 #[allow(unused_imports)]
26729 use std::option::Option::Some;
26730 let mut state = serializer.serialize_map(std::option::Option::None)?;
26731 if !self.contents.is_empty() {
26732 state.serialize_entry("contents", &self.contents)?;
26733 }
26734 if !self.job_id.is_empty() {
26735 state.serialize_entry("jobId", &self.job_id)?;
26736 }
26737 if !self._unknown_fields.is_empty() {
26738 for (key, value) in self._unknown_fields.iter() {
26739 state.serialize_entry(key, &value)?;
26740 }
26741 }
26742 state.end()
26743 }
26744 }
26745
26746 #[derive(Clone, Debug, Default, PartialEq)]
26748 #[non_exhaustive]
26749 pub struct DataPreparationAction {
26750 pub generated_sql: std::string::String,
26753
26754 pub job_id: std::string::String,
26757
26758 pub definition: std::option::Option<
26760 crate::model::workflow_invocation_action::data_preparation_action::Definition,
26761 >,
26762
26763 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26764 }
26765
26766 impl DataPreparationAction {
26767 pub fn new() -> Self {
26768 std::default::Default::default()
26769 }
26770
26771 pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
26773 mut self,
26774 v: T,
26775 ) -> Self {
26776 self.generated_sql = v.into();
26777 self
26778 }
26779
26780 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26782 self.job_id = v.into();
26783 self
26784 }
26785
26786 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
26791 {
26792 self.definition = v.into();
26793 self
26794 }
26795
26796 pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
26800 #[allow(unreachable_patterns)]
26801 self.definition.as_ref().and_then(|v| match v {
26802 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
26803 _ => std::option::Option::None,
26804 })
26805 }
26806
26807 pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
26813 mut self,
26814 v: T,
26815 ) -> Self {
26816 self.definition = std::option::Option::Some(
26817 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
26818 v.into()
26819 )
26820 );
26821 self
26822 }
26823
26824 pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
26828 #[allow(unreachable_patterns)]
26829 self.definition.as_ref().and_then(|v| match v {
26830 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
26831 _ => std::option::Option::None,
26832 })
26833 }
26834
26835 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{
26841 self.definition = std::option::Option::Some(
26842 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
26843 v.into()
26844 )
26845 );
26846 self
26847 }
26848 }
26849
26850 impl wkt::message::Message for DataPreparationAction {
26851 fn typename() -> &'static str {
26852 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
26853 }
26854 }
26855
26856 #[doc(hidden)]
26857 impl<'de> serde::de::Deserialize<'de> for DataPreparationAction {
26858 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26859 where
26860 D: serde::Deserializer<'de>,
26861 {
26862 #[allow(non_camel_case_types)]
26863 #[doc(hidden)]
26864 #[derive(PartialEq, Eq, Hash)]
26865 enum __FieldTag {
26866 __contents_yaml,
26867 __contents_sql,
26868 __generated_sql,
26869 __job_id,
26870 Unknown(std::string::String),
26871 }
26872 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
26873 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26874 where
26875 D: serde::Deserializer<'de>,
26876 {
26877 struct Visitor;
26878 impl<'de> serde::de::Visitor<'de> for Visitor {
26879 type Value = __FieldTag;
26880 fn expecting(
26881 &self,
26882 formatter: &mut std::fmt::Formatter,
26883 ) -> std::fmt::Result {
26884 formatter.write_str("a field name for DataPreparationAction")
26885 }
26886 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
26887 where
26888 E: serde::de::Error,
26889 {
26890 use std::result::Result::Ok;
26891 use std::string::ToString;
26892 match value {
26893 "contentsYaml" => Ok(__FieldTag::__contents_yaml),
26894 "contents_yaml" => Ok(__FieldTag::__contents_yaml),
26895 "contentsSql" => Ok(__FieldTag::__contents_sql),
26896 "contents_sql" => Ok(__FieldTag::__contents_sql),
26897 "generatedSql" => Ok(__FieldTag::__generated_sql),
26898 "generated_sql" => Ok(__FieldTag::__generated_sql),
26899 "jobId" => Ok(__FieldTag::__job_id),
26900 "job_id" => Ok(__FieldTag::__job_id),
26901 _ => Ok(__FieldTag::Unknown(value.to_string())),
26902 }
26903 }
26904 }
26905 deserializer.deserialize_identifier(Visitor)
26906 }
26907 }
26908 struct Visitor;
26909 impl<'de> serde::de::Visitor<'de> for Visitor {
26910 type Value = DataPreparationAction;
26911 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26912 formatter.write_str("struct DataPreparationAction")
26913 }
26914 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
26915 where
26916 A: serde::de::MapAccess<'de>,
26917 {
26918 #[allow(unused_imports)]
26919 use serde::de::Error;
26920 use std::option::Option::Some;
26921 let mut fields = std::collections::HashSet::new();
26922 let mut result = Self::Value::new();
26923 while let Some(tag) = map.next_key::<__FieldTag>()? {
26924 #[allow(clippy::match_single_binding)]
26925 match tag {
26926 __FieldTag::__contents_yaml => {
26927 if !fields.insert(__FieldTag::__contents_yaml) {
26928 return std::result::Result::Err(A::Error::duplicate_field(
26929 "multiple values for contents_yaml",
26930 ));
26931 }
26932 if result.definition.is_some() {
26933 return std::result::Result::Err(A::Error::duplicate_field(
26934 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.contents_yaml, latest field was contentsYaml",
26935 ));
26936 }
26937 result.definition = std::option::Option::Some(
26938 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
26939 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
26940 ),
26941 );
26942 }
26943 __FieldTag::__contents_sql => {
26944 if !fields.insert(__FieldTag::__contents_sql) {
26945 return std::result::Result::Err(A::Error::duplicate_field(
26946 "multiple values for contents_sql",
26947 ));
26948 }
26949 if result.definition.is_some() {
26950 return std::result::Result::Err(A::Error::duplicate_field(
26951 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.contents_sql, latest field was contentsSql",
26952 ));
26953 }
26954 result.definition = std::option::Option::Some(
26955 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
26956 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>>()?.unwrap_or_default()
26957 ),
26958 );
26959 }
26960 __FieldTag::__generated_sql => {
26961 if !fields.insert(__FieldTag::__generated_sql) {
26962 return std::result::Result::Err(A::Error::duplicate_field(
26963 "multiple values for generated_sql",
26964 ));
26965 }
26966 result.generated_sql = map
26967 .next_value::<std::option::Option<std::string::String>>()?
26968 .unwrap_or_default();
26969 }
26970 __FieldTag::__job_id => {
26971 if !fields.insert(__FieldTag::__job_id) {
26972 return std::result::Result::Err(A::Error::duplicate_field(
26973 "multiple values for job_id",
26974 ));
26975 }
26976 result.job_id = map
26977 .next_value::<std::option::Option<std::string::String>>()?
26978 .unwrap_or_default();
26979 }
26980 __FieldTag::Unknown(key) => {
26981 let value = map.next_value::<serde_json::Value>()?;
26982 result._unknown_fields.insert(key, value);
26983 }
26984 }
26985 }
26986 std::result::Result::Ok(result)
26987 }
26988 }
26989 deserializer.deserialize_any(Visitor)
26990 }
26991 }
26992
26993 #[doc(hidden)]
26994 impl serde::ser::Serialize for DataPreparationAction {
26995 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26996 where
26997 S: serde::ser::Serializer,
26998 {
26999 use serde::ser::SerializeMap;
27000 #[allow(unused_imports)]
27001 use std::option::Option::Some;
27002 let mut state = serializer.serialize_map(std::option::Option::None)?;
27003 if let Some(value) = self.contents_yaml() {
27004 state.serialize_entry("contentsYaml", value)?;
27005 }
27006 if let Some(value) = self.contents_sql() {
27007 state.serialize_entry("contentsSql", value)?;
27008 }
27009 if !self.generated_sql.is_empty() {
27010 state.serialize_entry("generatedSql", &self.generated_sql)?;
27011 }
27012 if !self.job_id.is_empty() {
27013 state.serialize_entry("jobId", &self.job_id)?;
27014 }
27015 if !self._unknown_fields.is_empty() {
27016 for (key, value) in self._unknown_fields.iter() {
27017 state.serialize_entry(key, &value)?;
27018 }
27019 }
27020 state.end()
27021 }
27022 }
27023
27024 pub mod data_preparation_action {
27026 #[allow(unused_imports)]
27027 use super::*;
27028
27029 #[derive(Clone, Debug, Default, PartialEq)]
27031 #[non_exhaustive]
27032 pub struct ActionSqlDefinition {
27033 pub query: std::string::String,
27036
27037 pub error_table: std::option::Option<
27039 crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
27040 >,
27041
27042 pub load_config: std::option::Option<
27044 crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
27045 >,
27046
27047 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27048 }
27049
27050 impl ActionSqlDefinition {
27051 pub fn new() -> Self {
27052 std::default::Default::default()
27053 }
27054
27055 pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27057 self.query = v.into();
27058 self
27059 }
27060
27061 pub fn set_error_table<T>(mut self, v: T) -> Self
27063 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
27064 {
27065 self.error_table = std::option::Option::Some(v.into());
27066 self
27067 }
27068
27069 pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
27071 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
27072 {
27073 self.error_table = v.map(|x| x.into());
27074 self
27075 }
27076
27077 pub fn set_load_config<T>(mut self, v: T) -> Self
27079 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
27080 {
27081 self.load_config = std::option::Option::Some(v.into());
27082 self
27083 }
27084
27085 pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
27087 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
27088 {
27089 self.load_config = v.map(|x| x.into());
27090 self
27091 }
27092 }
27093
27094 impl wkt::message::Message for ActionSqlDefinition {
27095 fn typename() -> &'static str {
27096 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
27097 }
27098 }
27099
27100 #[doc(hidden)]
27101 impl<'de> serde::de::Deserialize<'de> for ActionSqlDefinition {
27102 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27103 where
27104 D: serde::Deserializer<'de>,
27105 {
27106 #[allow(non_camel_case_types)]
27107 #[doc(hidden)]
27108 #[derive(PartialEq, Eq, Hash)]
27109 enum __FieldTag {
27110 __query,
27111 __error_table,
27112 __load_config,
27113 Unknown(std::string::String),
27114 }
27115 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27116 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27117 where
27118 D: serde::Deserializer<'de>,
27119 {
27120 struct Visitor;
27121 impl<'de> serde::de::Visitor<'de> for Visitor {
27122 type Value = __FieldTag;
27123 fn expecting(
27124 &self,
27125 formatter: &mut std::fmt::Formatter,
27126 ) -> std::fmt::Result {
27127 formatter.write_str("a field name for ActionSqlDefinition")
27128 }
27129 fn visit_str<E>(
27130 self,
27131 value: &str,
27132 ) -> std::result::Result<Self::Value, E>
27133 where
27134 E: serde::de::Error,
27135 {
27136 use std::result::Result::Ok;
27137 use std::string::ToString;
27138 match value {
27139 "query" => Ok(__FieldTag::__query),
27140 "errorTable" => Ok(__FieldTag::__error_table),
27141 "error_table" => Ok(__FieldTag::__error_table),
27142 "loadConfig" => Ok(__FieldTag::__load_config),
27143 "load_config" => Ok(__FieldTag::__load_config),
27144 _ => Ok(__FieldTag::Unknown(value.to_string())),
27145 }
27146 }
27147 }
27148 deserializer.deserialize_identifier(Visitor)
27149 }
27150 }
27151 struct Visitor;
27152 impl<'de> serde::de::Visitor<'de> for Visitor {
27153 type Value = ActionSqlDefinition;
27154 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27155 formatter.write_str("struct ActionSqlDefinition")
27156 }
27157 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27158 where
27159 A: serde::de::MapAccess<'de>,
27160 {
27161 #[allow(unused_imports)]
27162 use serde::de::Error;
27163 use std::option::Option::Some;
27164 let mut fields = std::collections::HashSet::new();
27165 let mut result = Self::Value::new();
27166 while let Some(tag) = map.next_key::<__FieldTag>()? {
27167 #[allow(clippy::match_single_binding)]
27168 match tag {
27169 __FieldTag::__query => {
27170 if !fields.insert(__FieldTag::__query) {
27171 return std::result::Result::Err(
27172 A::Error::duplicate_field("multiple values for query"),
27173 );
27174 }
27175 result.query = map
27176 .next_value::<std::option::Option<std::string::String>>()?
27177 .unwrap_or_default();
27178 }
27179 __FieldTag::__error_table => {
27180 if !fields.insert(__FieldTag::__error_table) {
27181 return std::result::Result::Err(
27182 A::Error::duplicate_field(
27183 "multiple values for error_table",
27184 ),
27185 );
27186 }
27187 result.error_table = map.next_value::<std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>>()?
27188 ;
27189 }
27190 __FieldTag::__load_config => {
27191 if !fields.insert(__FieldTag::__load_config) {
27192 return std::result::Result::Err(
27193 A::Error::duplicate_field(
27194 "multiple values for load_config",
27195 ),
27196 );
27197 }
27198 result.load_config = map.next_value::<std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>>()?
27199 ;
27200 }
27201 __FieldTag::Unknown(key) => {
27202 let value = map.next_value::<serde_json::Value>()?;
27203 result._unknown_fields.insert(key, value);
27204 }
27205 }
27206 }
27207 std::result::Result::Ok(result)
27208 }
27209 }
27210 deserializer.deserialize_any(Visitor)
27211 }
27212 }
27213
27214 #[doc(hidden)]
27215 impl serde::ser::Serialize for ActionSqlDefinition {
27216 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27217 where
27218 S: serde::ser::Serializer,
27219 {
27220 use serde::ser::SerializeMap;
27221 #[allow(unused_imports)]
27222 use std::option::Option::Some;
27223 let mut state = serializer.serialize_map(std::option::Option::None)?;
27224 if !self.query.is_empty() {
27225 state.serialize_entry("query", &self.query)?;
27226 }
27227 if self.error_table.is_some() {
27228 state.serialize_entry("errorTable", &self.error_table)?;
27229 }
27230 if self.load_config.is_some() {
27231 state.serialize_entry("loadConfig", &self.load_config)?;
27232 }
27233 if !self._unknown_fields.is_empty() {
27234 for (key, value) in self._unknown_fields.iter() {
27235 state.serialize_entry(key, &value)?;
27236 }
27237 }
27238 state.end()
27239 }
27240 }
27241
27242 #[derive(Clone, Debug, Default, PartialEq)]
27245 #[non_exhaustive]
27246 pub struct ActionErrorTable {
27247 pub target: std::option::Option<crate::model::Target>,
27249
27250 pub retention_days: i32,
27253
27254 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27255 }
27256
27257 impl ActionErrorTable {
27258 pub fn new() -> Self {
27259 std::default::Default::default()
27260 }
27261
27262 pub fn set_target<T>(mut self, v: T) -> Self
27264 where
27265 T: std::convert::Into<crate::model::Target>,
27266 {
27267 self.target = std::option::Option::Some(v.into());
27268 self
27269 }
27270
27271 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
27273 where
27274 T: std::convert::Into<crate::model::Target>,
27275 {
27276 self.target = v.map(|x| x.into());
27277 self
27278 }
27279
27280 pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
27282 self.retention_days = v.into();
27283 self
27284 }
27285 }
27286
27287 impl wkt::message::Message for ActionErrorTable {
27288 fn typename() -> &'static str {
27289 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
27290 }
27291 }
27292
27293 #[doc(hidden)]
27294 impl<'de> serde::de::Deserialize<'de> for ActionErrorTable {
27295 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27296 where
27297 D: serde::Deserializer<'de>,
27298 {
27299 #[allow(non_camel_case_types)]
27300 #[doc(hidden)]
27301 #[derive(PartialEq, Eq, Hash)]
27302 enum __FieldTag {
27303 __target,
27304 __retention_days,
27305 Unknown(std::string::String),
27306 }
27307 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27308 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27309 where
27310 D: serde::Deserializer<'de>,
27311 {
27312 struct Visitor;
27313 impl<'de> serde::de::Visitor<'de> for Visitor {
27314 type Value = __FieldTag;
27315 fn expecting(
27316 &self,
27317 formatter: &mut std::fmt::Formatter,
27318 ) -> std::fmt::Result {
27319 formatter.write_str("a field name for ActionErrorTable")
27320 }
27321 fn visit_str<E>(
27322 self,
27323 value: &str,
27324 ) -> std::result::Result<Self::Value, E>
27325 where
27326 E: serde::de::Error,
27327 {
27328 use std::result::Result::Ok;
27329 use std::string::ToString;
27330 match value {
27331 "target" => Ok(__FieldTag::__target),
27332 "retentionDays" => Ok(__FieldTag::__retention_days),
27333 "retention_days" => Ok(__FieldTag::__retention_days),
27334 _ => Ok(__FieldTag::Unknown(value.to_string())),
27335 }
27336 }
27337 }
27338 deserializer.deserialize_identifier(Visitor)
27339 }
27340 }
27341 struct Visitor;
27342 impl<'de> serde::de::Visitor<'de> for Visitor {
27343 type Value = ActionErrorTable;
27344 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27345 formatter.write_str("struct ActionErrorTable")
27346 }
27347 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27348 where
27349 A: serde::de::MapAccess<'de>,
27350 {
27351 #[allow(unused_imports)]
27352 use serde::de::Error;
27353 use std::option::Option::Some;
27354 let mut fields = std::collections::HashSet::new();
27355 let mut result = Self::Value::new();
27356 while let Some(tag) = map.next_key::<__FieldTag>()? {
27357 #[allow(clippy::match_single_binding)]
27358 match tag {
27359 __FieldTag::__target => {
27360 if !fields.insert(__FieldTag::__target) {
27361 return std::result::Result::Err(
27362 A::Error::duplicate_field("multiple values for target"),
27363 );
27364 }
27365 result.target = map
27366 .next_value::<std::option::Option<crate::model::Target>>(
27367 )?;
27368 }
27369 __FieldTag::__retention_days => {
27370 if !fields.insert(__FieldTag::__retention_days) {
27371 return std::result::Result::Err(
27372 A::Error::duplicate_field(
27373 "multiple values for retention_days",
27374 ),
27375 );
27376 }
27377 struct __With(std::option::Option<i32>);
27378 impl<'de> serde::de::Deserialize<'de> for __With {
27379 fn deserialize<D>(
27380 deserializer: D,
27381 ) -> std::result::Result<Self, D::Error>
27382 where
27383 D: serde::de::Deserializer<'de>,
27384 {
27385 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
27386 }
27387 }
27388 result.retention_days =
27389 map.next_value::<__With>()?.0.unwrap_or_default();
27390 }
27391 __FieldTag::Unknown(key) => {
27392 let value = map.next_value::<serde_json::Value>()?;
27393 result._unknown_fields.insert(key, value);
27394 }
27395 }
27396 }
27397 std::result::Result::Ok(result)
27398 }
27399 }
27400 deserializer.deserialize_any(Visitor)
27401 }
27402 }
27403
27404 #[doc(hidden)]
27405 impl serde::ser::Serialize for ActionErrorTable {
27406 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27407 where
27408 S: serde::ser::Serializer,
27409 {
27410 use serde::ser::SerializeMap;
27411 #[allow(unused_imports)]
27412 use std::option::Option::Some;
27413 let mut state = serializer.serialize_map(std::option::Option::None)?;
27414 if self.target.is_some() {
27415 state.serialize_entry("target", &self.target)?;
27416 }
27417 if !wkt::internal::is_default(&self.retention_days) {
27418 struct __With<'a>(&'a i32);
27419 impl<'a> serde::ser::Serialize for __With<'a> {
27420 fn serialize<S>(
27421 &self,
27422 serializer: S,
27423 ) -> std::result::Result<S::Ok, S::Error>
27424 where
27425 S: serde::ser::Serializer,
27426 {
27427 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
27428 }
27429 }
27430 state.serialize_entry("retentionDays", &__With(&self.retention_days))?;
27431 }
27432 if !self._unknown_fields.is_empty() {
27433 for (key, value) in self._unknown_fields.iter() {
27434 state.serialize_entry(key, &value)?;
27435 }
27436 }
27437 state.end()
27438 }
27439 }
27440
27441 #[derive(Clone, Debug, Default, PartialEq)]
27443 #[non_exhaustive]
27444 pub struct ActionLoadConfig {
27445
27446 pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
27448
27449 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27450 }
27451
27452 impl ActionLoadConfig {
27453 pub fn new() -> Self {
27454 std::default::Default::default()
27455 }
27456
27457 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
27462 {
27463 self.mode = v.into();
27464 self
27465 }
27466
27467 pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
27471 #[allow(unreachable_patterns)]
27472 self.mode.as_ref().and_then(|v| match v {
27473 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
27474 _ => std::option::Option::None,
27475 })
27476 }
27477
27478 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{
27484 self.mode = std::option::Option::Some(
27485 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
27486 v.into()
27487 )
27488 );
27489 self
27490 }
27491
27492 pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
27496 #[allow(unreachable_patterns)]
27497 self.mode.as_ref().and_then(|v| match v {
27498 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
27499 _ => std::option::Option::None,
27500 })
27501 }
27502
27503 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{
27509 self.mode = std::option::Option::Some(
27510 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
27511 v.into()
27512 )
27513 );
27514 self
27515 }
27516
27517 pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
27521 #[allow(unreachable_patterns)]
27522 self.mode.as_ref().and_then(|v| match v {
27523 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
27524 _ => std::option::Option::None,
27525 })
27526 }
27527
27528 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{
27534 self.mode = std::option::Option::Some(
27535 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
27536 v.into()
27537 )
27538 );
27539 self
27540 }
27541
27542 pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
27546 #[allow(unreachable_patterns)]
27547 self.mode.as_ref().and_then(|v| match v {
27548 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
27549 _ => std::option::Option::None,
27550 })
27551 }
27552
27553 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{
27559 self.mode = std::option::Option::Some(
27560 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
27561 v.into()
27562 )
27563 );
27564 self
27565 }
27566 }
27567
27568 impl wkt::message::Message for ActionLoadConfig {
27569 fn typename() -> &'static str {
27570 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
27571 }
27572 }
27573
27574 #[doc(hidden)]
27575 impl<'de> serde::de::Deserialize<'de> for ActionLoadConfig {
27576 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27577 where
27578 D: serde::Deserializer<'de>,
27579 {
27580 #[allow(non_camel_case_types)]
27581 #[doc(hidden)]
27582 #[derive(PartialEq, Eq, Hash)]
27583 enum __FieldTag {
27584 __replace,
27585 __append,
27586 __maximum,
27587 __unique,
27588 Unknown(std::string::String),
27589 }
27590 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27591 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27592 where
27593 D: serde::Deserializer<'de>,
27594 {
27595 struct Visitor;
27596 impl<'de> serde::de::Visitor<'de> for Visitor {
27597 type Value = __FieldTag;
27598 fn expecting(
27599 &self,
27600 formatter: &mut std::fmt::Formatter,
27601 ) -> std::fmt::Result {
27602 formatter.write_str("a field name for ActionLoadConfig")
27603 }
27604 fn visit_str<E>(
27605 self,
27606 value: &str,
27607 ) -> std::result::Result<Self::Value, E>
27608 where
27609 E: serde::de::Error,
27610 {
27611 use std::result::Result::Ok;
27612 use std::string::ToString;
27613 match value {
27614 "replace" => Ok(__FieldTag::__replace),
27615 "append" => Ok(__FieldTag::__append),
27616 "maximum" => Ok(__FieldTag::__maximum),
27617 "unique" => Ok(__FieldTag::__unique),
27618 _ => Ok(__FieldTag::Unknown(value.to_string())),
27619 }
27620 }
27621 }
27622 deserializer.deserialize_identifier(Visitor)
27623 }
27624 }
27625 struct Visitor;
27626 impl<'de> serde::de::Visitor<'de> for Visitor {
27627 type Value = ActionLoadConfig;
27628 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27629 formatter.write_str("struct ActionLoadConfig")
27630 }
27631 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27632 where
27633 A: serde::de::MapAccess<'de>,
27634 {
27635 #[allow(unused_imports)]
27636 use serde::de::Error;
27637 use std::option::Option::Some;
27638 let mut fields = std::collections::HashSet::new();
27639 let mut result = Self::Value::new();
27640 while let Some(tag) = map.next_key::<__FieldTag>()? {
27641 #[allow(clippy::match_single_binding)]
27642 match tag {
27643 __FieldTag::__replace => {
27644 if !fields.insert(__FieldTag::__replace) {
27645 return std::result::Result::Err(
27646 A::Error::duplicate_field(
27647 "multiple values for replace",
27648 ),
27649 );
27650 }
27651 if result.mode.is_some() {
27652 return std::result::Result::Err(
27653 A::Error::duplicate_field(
27654 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.replace, latest field was replace",
27655 ),
27656 );
27657 }
27658 result.mode = std::option::Option::Some(
27659 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
27660 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>>()?.unwrap_or_default()
27661 ),
27662 );
27663 }
27664 __FieldTag::__append => {
27665 if !fields.insert(__FieldTag::__append) {
27666 return std::result::Result::Err(
27667 A::Error::duplicate_field("multiple values for append"),
27668 );
27669 }
27670 if result.mode.is_some() {
27671 return std::result::Result::Err(
27672 A::Error::duplicate_field(
27673 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.append, latest field was append",
27674 ),
27675 );
27676 }
27677 result.mode = std::option::Option::Some(
27678 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
27679 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>>()?.unwrap_or_default()
27680 ),
27681 );
27682 }
27683 __FieldTag::__maximum => {
27684 if !fields.insert(__FieldTag::__maximum) {
27685 return std::result::Result::Err(
27686 A::Error::duplicate_field(
27687 "multiple values for maximum",
27688 ),
27689 );
27690 }
27691 if result.mode.is_some() {
27692 return std::result::Result::Err(
27693 A::Error::duplicate_field(
27694 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.maximum, latest field was maximum",
27695 ),
27696 );
27697 }
27698 result.mode = std::option::Option::Some(
27699 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
27700 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>>()?.unwrap_or_default()
27701 ),
27702 );
27703 }
27704 __FieldTag::__unique => {
27705 if !fields.insert(__FieldTag::__unique) {
27706 return std::result::Result::Err(
27707 A::Error::duplicate_field("multiple values for unique"),
27708 );
27709 }
27710 if result.mode.is_some() {
27711 return std::result::Result::Err(
27712 A::Error::duplicate_field(
27713 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.unique, latest field was unique",
27714 ),
27715 );
27716 }
27717 result.mode = std::option::Option::Some(
27718 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
27719 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>>()?.unwrap_or_default()
27720 ),
27721 );
27722 }
27723 __FieldTag::Unknown(key) => {
27724 let value = map.next_value::<serde_json::Value>()?;
27725 result._unknown_fields.insert(key, value);
27726 }
27727 }
27728 }
27729 std::result::Result::Ok(result)
27730 }
27731 }
27732 deserializer.deserialize_any(Visitor)
27733 }
27734 }
27735
27736 #[doc(hidden)]
27737 impl serde::ser::Serialize for ActionLoadConfig {
27738 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27739 where
27740 S: serde::ser::Serializer,
27741 {
27742 use serde::ser::SerializeMap;
27743 #[allow(unused_imports)]
27744 use std::option::Option::Some;
27745 let mut state = serializer.serialize_map(std::option::Option::None)?;
27746 if let Some(value) = self.replace() {
27747 state.serialize_entry("replace", value)?;
27748 }
27749 if let Some(value) = self.append() {
27750 state.serialize_entry("append", value)?;
27751 }
27752 if let Some(value) = self.maximum() {
27753 state.serialize_entry("maximum", value)?;
27754 }
27755 if let Some(value) = self.unique() {
27756 state.serialize_entry("unique", value)?;
27757 }
27758 if !self._unknown_fields.is_empty() {
27759 for (key, value) in self._unknown_fields.iter() {
27760 state.serialize_entry(key, &value)?;
27761 }
27762 }
27763 state.end()
27764 }
27765 }
27766
27767 pub mod action_load_config {
27769 #[allow(unused_imports)]
27770 use super::*;
27771
27772 #[derive(Clone, Debug, PartialEq)]
27774 #[non_exhaustive]
27775 pub enum Mode {
27776 Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
27778 Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
27780 Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
27783 Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
27786 }
27787 }
27788
27789 #[derive(Clone, Debug, Default, PartialEq)]
27791 #[non_exhaustive]
27792 pub struct ActionSimpleLoadMode {
27793 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27794 }
27795
27796 impl ActionSimpleLoadMode {
27797 pub fn new() -> Self {
27798 std::default::Default::default()
27799 }
27800 }
27801
27802 impl wkt::message::Message for ActionSimpleLoadMode {
27803 fn typename() -> &'static str {
27804 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
27805 }
27806 }
27807
27808 #[doc(hidden)]
27809 impl<'de> serde::de::Deserialize<'de> for ActionSimpleLoadMode {
27810 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27811 where
27812 D: serde::Deserializer<'de>,
27813 {
27814 #[allow(non_camel_case_types)]
27815 #[doc(hidden)]
27816 #[derive(PartialEq, Eq, Hash)]
27817 enum __FieldTag {
27818 Unknown(std::string::String),
27819 }
27820 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27821 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27822 where
27823 D: serde::Deserializer<'de>,
27824 {
27825 struct Visitor;
27826 impl<'de> serde::de::Visitor<'de> for Visitor {
27827 type Value = __FieldTag;
27828 fn expecting(
27829 &self,
27830 formatter: &mut std::fmt::Formatter,
27831 ) -> std::fmt::Result {
27832 formatter.write_str("a field name for ActionSimpleLoadMode")
27833 }
27834 fn visit_str<E>(
27835 self,
27836 value: &str,
27837 ) -> std::result::Result<Self::Value, E>
27838 where
27839 E: serde::de::Error,
27840 {
27841 use std::result::Result::Ok;
27842 use std::string::ToString;
27843 Ok(__FieldTag::Unknown(value.to_string()))
27844 }
27845 }
27846 deserializer.deserialize_identifier(Visitor)
27847 }
27848 }
27849 struct Visitor;
27850 impl<'de> serde::de::Visitor<'de> for Visitor {
27851 type Value = ActionSimpleLoadMode;
27852 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27853 formatter.write_str("struct ActionSimpleLoadMode")
27854 }
27855 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27856 where
27857 A: serde::de::MapAccess<'de>,
27858 {
27859 #[allow(unused_imports)]
27860 use serde::de::Error;
27861 use std::option::Option::Some;
27862 let mut result = Self::Value::new();
27863 while let Some(tag) = map.next_key::<__FieldTag>()? {
27864 #[allow(clippy::match_single_binding)]
27865 match tag {
27866 __FieldTag::Unknown(key) => {
27867 let value = map.next_value::<serde_json::Value>()?;
27868 result._unknown_fields.insert(key, value);
27869 }
27870 }
27871 }
27872 std::result::Result::Ok(result)
27873 }
27874 }
27875 deserializer.deserialize_any(Visitor)
27876 }
27877 }
27878
27879 #[doc(hidden)]
27880 impl serde::ser::Serialize for ActionSimpleLoadMode {
27881 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27882 where
27883 S: serde::ser::Serializer,
27884 {
27885 use serde::ser::SerializeMap;
27886 #[allow(unused_imports)]
27887 use std::option::Option::Some;
27888 let mut state = serializer.serialize_map(std::option::Option::None)?;
27889 if !self._unknown_fields.is_empty() {
27890 for (key, value) in self._unknown_fields.iter() {
27891 state.serialize_entry(key, &value)?;
27892 }
27893 }
27894 state.end()
27895 }
27896 }
27897
27898 #[derive(Clone, Debug, Default, PartialEq)]
27900 #[non_exhaustive]
27901 pub struct ActionIncrementalLoadMode {
27902 pub column: std::string::String,
27904
27905 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27906 }
27907
27908 impl ActionIncrementalLoadMode {
27909 pub fn new() -> Self {
27910 std::default::Default::default()
27911 }
27912
27913 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27915 self.column = v.into();
27916 self
27917 }
27918 }
27919
27920 impl wkt::message::Message for ActionIncrementalLoadMode {
27921 fn typename() -> &'static str {
27922 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
27923 }
27924 }
27925
27926 #[doc(hidden)]
27927 impl<'de> serde::de::Deserialize<'de> for ActionIncrementalLoadMode {
27928 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27929 where
27930 D: serde::Deserializer<'de>,
27931 {
27932 #[allow(non_camel_case_types)]
27933 #[doc(hidden)]
27934 #[derive(PartialEq, Eq, Hash)]
27935 enum __FieldTag {
27936 __column,
27937 Unknown(std::string::String),
27938 }
27939 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27940 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27941 where
27942 D: serde::Deserializer<'de>,
27943 {
27944 struct Visitor;
27945 impl<'de> serde::de::Visitor<'de> for Visitor {
27946 type Value = __FieldTag;
27947 fn expecting(
27948 &self,
27949 formatter: &mut std::fmt::Formatter,
27950 ) -> std::fmt::Result {
27951 formatter.write_str("a field name for ActionIncrementalLoadMode")
27952 }
27953 fn visit_str<E>(
27954 self,
27955 value: &str,
27956 ) -> std::result::Result<Self::Value, E>
27957 where
27958 E: serde::de::Error,
27959 {
27960 use std::result::Result::Ok;
27961 use std::string::ToString;
27962 match value {
27963 "column" => Ok(__FieldTag::__column),
27964 _ => Ok(__FieldTag::Unknown(value.to_string())),
27965 }
27966 }
27967 }
27968 deserializer.deserialize_identifier(Visitor)
27969 }
27970 }
27971 struct Visitor;
27972 impl<'de> serde::de::Visitor<'de> for Visitor {
27973 type Value = ActionIncrementalLoadMode;
27974 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27975 formatter.write_str("struct ActionIncrementalLoadMode")
27976 }
27977 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27978 where
27979 A: serde::de::MapAccess<'de>,
27980 {
27981 #[allow(unused_imports)]
27982 use serde::de::Error;
27983 use std::option::Option::Some;
27984 let mut fields = std::collections::HashSet::new();
27985 let mut result = Self::Value::new();
27986 while let Some(tag) = map.next_key::<__FieldTag>()? {
27987 #[allow(clippy::match_single_binding)]
27988 match tag {
27989 __FieldTag::__column => {
27990 if !fields.insert(__FieldTag::__column) {
27991 return std::result::Result::Err(
27992 A::Error::duplicate_field("multiple values for column"),
27993 );
27994 }
27995 result.column = map
27996 .next_value::<std::option::Option<std::string::String>>()?
27997 .unwrap_or_default();
27998 }
27999 __FieldTag::Unknown(key) => {
28000 let value = map.next_value::<serde_json::Value>()?;
28001 result._unknown_fields.insert(key, value);
28002 }
28003 }
28004 }
28005 std::result::Result::Ok(result)
28006 }
28007 }
28008 deserializer.deserialize_any(Visitor)
28009 }
28010 }
28011
28012 #[doc(hidden)]
28013 impl serde::ser::Serialize for ActionIncrementalLoadMode {
28014 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28015 where
28016 S: serde::ser::Serializer,
28017 {
28018 use serde::ser::SerializeMap;
28019 #[allow(unused_imports)]
28020 use std::option::Option::Some;
28021 let mut state = serializer.serialize_map(std::option::Option::None)?;
28022 if !self.column.is_empty() {
28023 state.serialize_entry("column", &self.column)?;
28024 }
28025 if !self._unknown_fields.is_empty() {
28026 for (key, value) in self._unknown_fields.iter() {
28027 state.serialize_entry(key, &value)?;
28028 }
28029 }
28030 state.end()
28031 }
28032 }
28033
28034 #[derive(Clone, Debug, PartialEq)]
28036 #[non_exhaustive]
28037 pub enum Definition {
28038 ContentsYaml(std::string::String),
28041 ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
28044 }
28045 }
28046
28047 #[derive(Clone, Debug, PartialEq)]
28063 #[non_exhaustive]
28064 pub enum State {
28065 Pending,
28067 Running,
28069 Skipped,
28072 Disabled,
28075 Succeeded,
28077 Cancelled,
28079 Failed,
28081 UnknownValue(state::UnknownValue),
28086 }
28087
28088 #[doc(hidden)]
28089 pub mod state {
28090 #[allow(unused_imports)]
28091 use super::*;
28092 #[derive(Clone, Debug, PartialEq)]
28093 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
28094 }
28095
28096 impl State {
28097 pub fn value(&self) -> std::option::Option<i32> {
28102 match self {
28103 Self::Pending => std::option::Option::Some(0),
28104 Self::Running => std::option::Option::Some(1),
28105 Self::Skipped => std::option::Option::Some(2),
28106 Self::Disabled => std::option::Option::Some(3),
28107 Self::Succeeded => std::option::Option::Some(4),
28108 Self::Cancelled => std::option::Option::Some(5),
28109 Self::Failed => std::option::Option::Some(6),
28110 Self::UnknownValue(u) => u.0.value(),
28111 }
28112 }
28113
28114 pub fn name(&self) -> std::option::Option<&str> {
28119 match self {
28120 Self::Pending => std::option::Option::Some("PENDING"),
28121 Self::Running => std::option::Option::Some("RUNNING"),
28122 Self::Skipped => std::option::Option::Some("SKIPPED"),
28123 Self::Disabled => std::option::Option::Some("DISABLED"),
28124 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
28125 Self::Cancelled => std::option::Option::Some("CANCELLED"),
28126 Self::Failed => std::option::Option::Some("FAILED"),
28127 Self::UnknownValue(u) => u.0.name(),
28128 }
28129 }
28130 }
28131
28132 impl std::default::Default for State {
28133 fn default() -> Self {
28134 use std::convert::From;
28135 Self::from(0)
28136 }
28137 }
28138
28139 impl std::fmt::Display for State {
28140 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
28141 wkt::internal::display_enum(f, self.name(), self.value())
28142 }
28143 }
28144
28145 impl std::convert::From<i32> for State {
28146 fn from(value: i32) -> Self {
28147 match value {
28148 0 => Self::Pending,
28149 1 => Self::Running,
28150 2 => Self::Skipped,
28151 3 => Self::Disabled,
28152 4 => Self::Succeeded,
28153 5 => Self::Cancelled,
28154 6 => Self::Failed,
28155 _ => Self::UnknownValue(state::UnknownValue(
28156 wkt::internal::UnknownEnumValue::Integer(value),
28157 )),
28158 }
28159 }
28160 }
28161
28162 impl std::convert::From<&str> for State {
28163 fn from(value: &str) -> Self {
28164 use std::string::ToString;
28165 match value {
28166 "PENDING" => Self::Pending,
28167 "RUNNING" => Self::Running,
28168 "SKIPPED" => Self::Skipped,
28169 "DISABLED" => Self::Disabled,
28170 "SUCCEEDED" => Self::Succeeded,
28171 "CANCELLED" => Self::Cancelled,
28172 "FAILED" => Self::Failed,
28173 _ => Self::UnknownValue(state::UnknownValue(
28174 wkt::internal::UnknownEnumValue::String(value.to_string()),
28175 )),
28176 }
28177 }
28178 }
28179
28180 impl serde::ser::Serialize for State {
28181 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28182 where
28183 S: serde::Serializer,
28184 {
28185 match self {
28186 Self::Pending => serializer.serialize_i32(0),
28187 Self::Running => serializer.serialize_i32(1),
28188 Self::Skipped => serializer.serialize_i32(2),
28189 Self::Disabled => serializer.serialize_i32(3),
28190 Self::Succeeded => serializer.serialize_i32(4),
28191 Self::Cancelled => serializer.serialize_i32(5),
28192 Self::Failed => serializer.serialize_i32(6),
28193 Self::UnknownValue(u) => u.0.serialize(serializer),
28194 }
28195 }
28196 }
28197
28198 impl<'de> serde::de::Deserialize<'de> for State {
28199 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28200 where
28201 D: serde::Deserializer<'de>,
28202 {
28203 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
28204 ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
28205 ))
28206 }
28207 }
28208
28209 #[derive(Clone, Debug, PartialEq)]
28211 #[non_exhaustive]
28212 pub enum Action {
28213 BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
28215 NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
28217 DataPreparationAction(
28219 std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
28220 ),
28221 }
28222}
28223
28224#[derive(Clone, Debug, Default, PartialEq)]
28226#[non_exhaustive]
28227pub struct QueryWorkflowInvocationActionsRequest {
28228 pub name: std::string::String,
28230
28231 pub page_size: i32,
28235
28236 pub page_token: std::string::String,
28244
28245 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28246}
28247
28248impl QueryWorkflowInvocationActionsRequest {
28249 pub fn new() -> Self {
28250 std::default::Default::default()
28251 }
28252
28253 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28255 self.name = v.into();
28256 self
28257 }
28258
28259 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
28261 self.page_size = v.into();
28262 self
28263 }
28264
28265 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28267 self.page_token = v.into();
28268 self
28269 }
28270}
28271
28272impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
28273 fn typename() -> &'static str {
28274 "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
28275 }
28276}
28277
28278#[doc(hidden)]
28279impl<'de> serde::de::Deserialize<'de> for QueryWorkflowInvocationActionsRequest {
28280 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28281 where
28282 D: serde::Deserializer<'de>,
28283 {
28284 #[allow(non_camel_case_types)]
28285 #[doc(hidden)]
28286 #[derive(PartialEq, Eq, Hash)]
28287 enum __FieldTag {
28288 __name,
28289 __page_size,
28290 __page_token,
28291 Unknown(std::string::String),
28292 }
28293 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28294 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28295 where
28296 D: serde::Deserializer<'de>,
28297 {
28298 struct Visitor;
28299 impl<'de> serde::de::Visitor<'de> for Visitor {
28300 type Value = __FieldTag;
28301 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28302 formatter
28303 .write_str("a field name for QueryWorkflowInvocationActionsRequest")
28304 }
28305 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28306 where
28307 E: serde::de::Error,
28308 {
28309 use std::result::Result::Ok;
28310 use std::string::ToString;
28311 match value {
28312 "name" => Ok(__FieldTag::__name),
28313 "pageSize" => Ok(__FieldTag::__page_size),
28314 "page_size" => Ok(__FieldTag::__page_size),
28315 "pageToken" => Ok(__FieldTag::__page_token),
28316 "page_token" => Ok(__FieldTag::__page_token),
28317 _ => Ok(__FieldTag::Unknown(value.to_string())),
28318 }
28319 }
28320 }
28321 deserializer.deserialize_identifier(Visitor)
28322 }
28323 }
28324 struct Visitor;
28325 impl<'de> serde::de::Visitor<'de> for Visitor {
28326 type Value = QueryWorkflowInvocationActionsRequest;
28327 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28328 formatter.write_str("struct QueryWorkflowInvocationActionsRequest")
28329 }
28330 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28331 where
28332 A: serde::de::MapAccess<'de>,
28333 {
28334 #[allow(unused_imports)]
28335 use serde::de::Error;
28336 use std::option::Option::Some;
28337 let mut fields = std::collections::HashSet::new();
28338 let mut result = Self::Value::new();
28339 while let Some(tag) = map.next_key::<__FieldTag>()? {
28340 #[allow(clippy::match_single_binding)]
28341 match tag {
28342 __FieldTag::__name => {
28343 if !fields.insert(__FieldTag::__name) {
28344 return std::result::Result::Err(A::Error::duplicate_field(
28345 "multiple values for name",
28346 ));
28347 }
28348 result.name = map
28349 .next_value::<std::option::Option<std::string::String>>()?
28350 .unwrap_or_default();
28351 }
28352 __FieldTag::__page_size => {
28353 if !fields.insert(__FieldTag::__page_size) {
28354 return std::result::Result::Err(A::Error::duplicate_field(
28355 "multiple values for page_size",
28356 ));
28357 }
28358 struct __With(std::option::Option<i32>);
28359 impl<'de> serde::de::Deserialize<'de> for __With {
28360 fn deserialize<D>(
28361 deserializer: D,
28362 ) -> std::result::Result<Self, D::Error>
28363 where
28364 D: serde::de::Deserializer<'de>,
28365 {
28366 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
28367 }
28368 }
28369 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
28370 }
28371 __FieldTag::__page_token => {
28372 if !fields.insert(__FieldTag::__page_token) {
28373 return std::result::Result::Err(A::Error::duplicate_field(
28374 "multiple values for page_token",
28375 ));
28376 }
28377 result.page_token = map
28378 .next_value::<std::option::Option<std::string::String>>()?
28379 .unwrap_or_default();
28380 }
28381 __FieldTag::Unknown(key) => {
28382 let value = map.next_value::<serde_json::Value>()?;
28383 result._unknown_fields.insert(key, value);
28384 }
28385 }
28386 }
28387 std::result::Result::Ok(result)
28388 }
28389 }
28390 deserializer.deserialize_any(Visitor)
28391 }
28392}
28393
28394#[doc(hidden)]
28395impl serde::ser::Serialize for QueryWorkflowInvocationActionsRequest {
28396 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28397 where
28398 S: serde::ser::Serializer,
28399 {
28400 use serde::ser::SerializeMap;
28401 #[allow(unused_imports)]
28402 use std::option::Option::Some;
28403 let mut state = serializer.serialize_map(std::option::Option::None)?;
28404 if !self.name.is_empty() {
28405 state.serialize_entry("name", &self.name)?;
28406 }
28407 if !wkt::internal::is_default(&self.page_size) {
28408 struct __With<'a>(&'a i32);
28409 impl<'a> serde::ser::Serialize for __With<'a> {
28410 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28411 where
28412 S: serde::ser::Serializer,
28413 {
28414 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
28415 }
28416 }
28417 state.serialize_entry("pageSize", &__With(&self.page_size))?;
28418 }
28419 if !self.page_token.is_empty() {
28420 state.serialize_entry("pageToken", &self.page_token)?;
28421 }
28422 if !self._unknown_fields.is_empty() {
28423 for (key, value) in self._unknown_fields.iter() {
28424 state.serialize_entry(key, &value)?;
28425 }
28426 }
28427 state.end()
28428 }
28429}
28430
28431#[derive(Clone, Debug, Default, PartialEq)]
28433#[non_exhaustive]
28434pub struct QueryWorkflowInvocationActionsResponse {
28435 pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
28437
28438 pub next_page_token: std::string::String,
28441
28442 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28443}
28444
28445impl QueryWorkflowInvocationActionsResponse {
28446 pub fn new() -> Self {
28447 std::default::Default::default()
28448 }
28449
28450 pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
28452 where
28453 T: std::iter::IntoIterator<Item = V>,
28454 V: std::convert::Into<crate::model::WorkflowInvocationAction>,
28455 {
28456 use std::iter::Iterator;
28457 self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
28458 self
28459 }
28460
28461 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28463 self.next_page_token = v.into();
28464 self
28465 }
28466}
28467
28468impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
28469 fn typename() -> &'static str {
28470 "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
28471 }
28472}
28473
28474#[doc(hidden)]
28475impl gax::paginator::internal::PageableResponse for QueryWorkflowInvocationActionsResponse {
28476 type PageItem = crate::model::WorkflowInvocationAction;
28477
28478 fn items(self) -> std::vec::Vec<Self::PageItem> {
28479 self.workflow_invocation_actions
28480 }
28481
28482 fn next_page_token(&self) -> std::string::String {
28483 use std::clone::Clone;
28484 self.next_page_token.clone()
28485 }
28486}
28487
28488#[doc(hidden)]
28489impl<'de> serde::de::Deserialize<'de> for QueryWorkflowInvocationActionsResponse {
28490 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28491 where
28492 D: serde::Deserializer<'de>,
28493 {
28494 #[allow(non_camel_case_types)]
28495 #[doc(hidden)]
28496 #[derive(PartialEq, Eq, Hash)]
28497 enum __FieldTag {
28498 __workflow_invocation_actions,
28499 __next_page_token,
28500 Unknown(std::string::String),
28501 }
28502 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28503 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28504 where
28505 D: serde::Deserializer<'de>,
28506 {
28507 struct Visitor;
28508 impl<'de> serde::de::Visitor<'de> for Visitor {
28509 type Value = __FieldTag;
28510 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28511 formatter
28512 .write_str("a field name for QueryWorkflowInvocationActionsResponse")
28513 }
28514 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28515 where
28516 E: serde::de::Error,
28517 {
28518 use std::result::Result::Ok;
28519 use std::string::ToString;
28520 match value {
28521 "workflowInvocationActions" => {
28522 Ok(__FieldTag::__workflow_invocation_actions)
28523 }
28524 "workflow_invocation_actions" => {
28525 Ok(__FieldTag::__workflow_invocation_actions)
28526 }
28527 "nextPageToken" => Ok(__FieldTag::__next_page_token),
28528 "next_page_token" => Ok(__FieldTag::__next_page_token),
28529 _ => Ok(__FieldTag::Unknown(value.to_string())),
28530 }
28531 }
28532 }
28533 deserializer.deserialize_identifier(Visitor)
28534 }
28535 }
28536 struct Visitor;
28537 impl<'de> serde::de::Visitor<'de> for Visitor {
28538 type Value = QueryWorkflowInvocationActionsResponse;
28539 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28540 formatter.write_str("struct QueryWorkflowInvocationActionsResponse")
28541 }
28542 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28543 where
28544 A: serde::de::MapAccess<'de>,
28545 {
28546 #[allow(unused_imports)]
28547 use serde::de::Error;
28548 use std::option::Option::Some;
28549 let mut fields = std::collections::HashSet::new();
28550 let mut result = Self::Value::new();
28551 while let Some(tag) = map.next_key::<__FieldTag>()? {
28552 #[allow(clippy::match_single_binding)]
28553 match tag {
28554 __FieldTag::__workflow_invocation_actions => {
28555 if !fields.insert(__FieldTag::__workflow_invocation_actions) {
28556 return std::result::Result::Err(A::Error::duplicate_field(
28557 "multiple values for workflow_invocation_actions",
28558 ));
28559 }
28560 result.workflow_invocation_actions = map
28561 .next_value::<std::option::Option<
28562 std::vec::Vec<crate::model::WorkflowInvocationAction>,
28563 >>()?
28564 .unwrap_or_default();
28565 }
28566 __FieldTag::__next_page_token => {
28567 if !fields.insert(__FieldTag::__next_page_token) {
28568 return std::result::Result::Err(A::Error::duplicate_field(
28569 "multiple values for next_page_token",
28570 ));
28571 }
28572 result.next_page_token = map
28573 .next_value::<std::option::Option<std::string::String>>()?
28574 .unwrap_or_default();
28575 }
28576 __FieldTag::Unknown(key) => {
28577 let value = map.next_value::<serde_json::Value>()?;
28578 result._unknown_fields.insert(key, value);
28579 }
28580 }
28581 }
28582 std::result::Result::Ok(result)
28583 }
28584 }
28585 deserializer.deserialize_any(Visitor)
28586 }
28587}
28588
28589#[doc(hidden)]
28590impl serde::ser::Serialize for QueryWorkflowInvocationActionsResponse {
28591 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28592 where
28593 S: serde::ser::Serializer,
28594 {
28595 use serde::ser::SerializeMap;
28596 #[allow(unused_imports)]
28597 use std::option::Option::Some;
28598 let mut state = serializer.serialize_map(std::option::Option::None)?;
28599 if !self.workflow_invocation_actions.is_empty() {
28600 state.serialize_entry(
28601 "workflowInvocationActions",
28602 &self.workflow_invocation_actions,
28603 )?;
28604 }
28605 if !self.next_page_token.is_empty() {
28606 state.serialize_entry("nextPageToken", &self.next_page_token)?;
28607 }
28608 if !self._unknown_fields.is_empty() {
28609 for (key, value) in self._unknown_fields.iter() {
28610 state.serialize_entry(key, &value)?;
28611 }
28612 }
28613 state.end()
28614 }
28615}
28616
28617#[derive(Clone, Debug, Default, PartialEq)]
28619#[non_exhaustive]
28620pub struct Config {
28621 pub name: std::string::String,
28623
28624 pub default_kms_key_name: std::string::String,
28627
28628 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28629}
28630
28631impl Config {
28632 pub fn new() -> Self {
28633 std::default::Default::default()
28634 }
28635
28636 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28638 self.name = v.into();
28639 self
28640 }
28641
28642 pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
28644 mut self,
28645 v: T,
28646 ) -> Self {
28647 self.default_kms_key_name = v.into();
28648 self
28649 }
28650}
28651
28652impl wkt::message::Message for Config {
28653 fn typename() -> &'static str {
28654 "type.googleapis.com/google.cloud.dataform.v1.Config"
28655 }
28656}
28657
28658#[doc(hidden)]
28659impl<'de> serde::de::Deserialize<'de> for Config {
28660 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28661 where
28662 D: serde::Deserializer<'de>,
28663 {
28664 #[allow(non_camel_case_types)]
28665 #[doc(hidden)]
28666 #[derive(PartialEq, Eq, Hash)]
28667 enum __FieldTag {
28668 __name,
28669 __default_kms_key_name,
28670 Unknown(std::string::String),
28671 }
28672 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28673 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28674 where
28675 D: serde::Deserializer<'de>,
28676 {
28677 struct Visitor;
28678 impl<'de> serde::de::Visitor<'de> for Visitor {
28679 type Value = __FieldTag;
28680 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28681 formatter.write_str("a field name for Config")
28682 }
28683 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28684 where
28685 E: serde::de::Error,
28686 {
28687 use std::result::Result::Ok;
28688 use std::string::ToString;
28689 match value {
28690 "name" => Ok(__FieldTag::__name),
28691 "defaultKmsKeyName" => Ok(__FieldTag::__default_kms_key_name),
28692 "default_kms_key_name" => Ok(__FieldTag::__default_kms_key_name),
28693 _ => Ok(__FieldTag::Unknown(value.to_string())),
28694 }
28695 }
28696 }
28697 deserializer.deserialize_identifier(Visitor)
28698 }
28699 }
28700 struct Visitor;
28701 impl<'de> serde::de::Visitor<'de> for Visitor {
28702 type Value = Config;
28703 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28704 formatter.write_str("struct Config")
28705 }
28706 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28707 where
28708 A: serde::de::MapAccess<'de>,
28709 {
28710 #[allow(unused_imports)]
28711 use serde::de::Error;
28712 use std::option::Option::Some;
28713 let mut fields = std::collections::HashSet::new();
28714 let mut result = Self::Value::new();
28715 while let Some(tag) = map.next_key::<__FieldTag>()? {
28716 #[allow(clippy::match_single_binding)]
28717 match tag {
28718 __FieldTag::__name => {
28719 if !fields.insert(__FieldTag::__name) {
28720 return std::result::Result::Err(A::Error::duplicate_field(
28721 "multiple values for name",
28722 ));
28723 }
28724 result.name = map
28725 .next_value::<std::option::Option<std::string::String>>()?
28726 .unwrap_or_default();
28727 }
28728 __FieldTag::__default_kms_key_name => {
28729 if !fields.insert(__FieldTag::__default_kms_key_name) {
28730 return std::result::Result::Err(A::Error::duplicate_field(
28731 "multiple values for default_kms_key_name",
28732 ));
28733 }
28734 result.default_kms_key_name = map
28735 .next_value::<std::option::Option<std::string::String>>()?
28736 .unwrap_or_default();
28737 }
28738 __FieldTag::Unknown(key) => {
28739 let value = map.next_value::<serde_json::Value>()?;
28740 result._unknown_fields.insert(key, value);
28741 }
28742 }
28743 }
28744 std::result::Result::Ok(result)
28745 }
28746 }
28747 deserializer.deserialize_any(Visitor)
28748 }
28749}
28750
28751#[doc(hidden)]
28752impl serde::ser::Serialize for Config {
28753 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28754 where
28755 S: serde::ser::Serializer,
28756 {
28757 use serde::ser::SerializeMap;
28758 #[allow(unused_imports)]
28759 use std::option::Option::Some;
28760 let mut state = serializer.serialize_map(std::option::Option::None)?;
28761 if !self.name.is_empty() {
28762 state.serialize_entry("name", &self.name)?;
28763 }
28764 if !self.default_kms_key_name.is_empty() {
28765 state.serialize_entry("defaultKmsKeyName", &self.default_kms_key_name)?;
28766 }
28767 if !self._unknown_fields.is_empty() {
28768 for (key, value) in self._unknown_fields.iter() {
28769 state.serialize_entry(key, &value)?;
28770 }
28771 }
28772 state.end()
28773 }
28774}
28775
28776#[derive(Clone, Debug, Default, PartialEq)]
28778#[non_exhaustive]
28779pub struct GetConfigRequest {
28780 pub name: std::string::String,
28782
28783 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28784}
28785
28786impl GetConfigRequest {
28787 pub fn new() -> Self {
28788 std::default::Default::default()
28789 }
28790
28791 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28793 self.name = v.into();
28794 self
28795 }
28796}
28797
28798impl wkt::message::Message for GetConfigRequest {
28799 fn typename() -> &'static str {
28800 "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
28801 }
28802}
28803
28804#[doc(hidden)]
28805impl<'de> serde::de::Deserialize<'de> for GetConfigRequest {
28806 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28807 where
28808 D: serde::Deserializer<'de>,
28809 {
28810 #[allow(non_camel_case_types)]
28811 #[doc(hidden)]
28812 #[derive(PartialEq, Eq, Hash)]
28813 enum __FieldTag {
28814 __name,
28815 Unknown(std::string::String),
28816 }
28817 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28818 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28819 where
28820 D: serde::Deserializer<'de>,
28821 {
28822 struct Visitor;
28823 impl<'de> serde::de::Visitor<'de> for Visitor {
28824 type Value = __FieldTag;
28825 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28826 formatter.write_str("a field name for GetConfigRequest")
28827 }
28828 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28829 where
28830 E: serde::de::Error,
28831 {
28832 use std::result::Result::Ok;
28833 use std::string::ToString;
28834 match value {
28835 "name" => Ok(__FieldTag::__name),
28836 _ => Ok(__FieldTag::Unknown(value.to_string())),
28837 }
28838 }
28839 }
28840 deserializer.deserialize_identifier(Visitor)
28841 }
28842 }
28843 struct Visitor;
28844 impl<'de> serde::de::Visitor<'de> for Visitor {
28845 type Value = GetConfigRequest;
28846 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28847 formatter.write_str("struct GetConfigRequest")
28848 }
28849 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28850 where
28851 A: serde::de::MapAccess<'de>,
28852 {
28853 #[allow(unused_imports)]
28854 use serde::de::Error;
28855 use std::option::Option::Some;
28856 let mut fields = std::collections::HashSet::new();
28857 let mut result = Self::Value::new();
28858 while let Some(tag) = map.next_key::<__FieldTag>()? {
28859 #[allow(clippy::match_single_binding)]
28860 match tag {
28861 __FieldTag::__name => {
28862 if !fields.insert(__FieldTag::__name) {
28863 return std::result::Result::Err(A::Error::duplicate_field(
28864 "multiple values for name",
28865 ));
28866 }
28867 result.name = map
28868 .next_value::<std::option::Option<std::string::String>>()?
28869 .unwrap_or_default();
28870 }
28871 __FieldTag::Unknown(key) => {
28872 let value = map.next_value::<serde_json::Value>()?;
28873 result._unknown_fields.insert(key, value);
28874 }
28875 }
28876 }
28877 std::result::Result::Ok(result)
28878 }
28879 }
28880 deserializer.deserialize_any(Visitor)
28881 }
28882}
28883
28884#[doc(hidden)]
28885impl serde::ser::Serialize for GetConfigRequest {
28886 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28887 where
28888 S: serde::ser::Serializer,
28889 {
28890 use serde::ser::SerializeMap;
28891 #[allow(unused_imports)]
28892 use std::option::Option::Some;
28893 let mut state = serializer.serialize_map(std::option::Option::None)?;
28894 if !self.name.is_empty() {
28895 state.serialize_entry("name", &self.name)?;
28896 }
28897 if !self._unknown_fields.is_empty() {
28898 for (key, value) in self._unknown_fields.iter() {
28899 state.serialize_entry(key, &value)?;
28900 }
28901 }
28902 state.end()
28903 }
28904}
28905
28906#[derive(Clone, Debug, Default, PartialEq)]
28908#[non_exhaustive]
28909pub struct UpdateConfigRequest {
28910 pub config: std::option::Option<crate::model::Config>,
28912
28913 pub update_mask: std::option::Option<wkt::FieldMask>,
28915
28916 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28917}
28918
28919impl UpdateConfigRequest {
28920 pub fn new() -> Self {
28921 std::default::Default::default()
28922 }
28923
28924 pub fn set_config<T>(mut self, v: T) -> Self
28926 where
28927 T: std::convert::Into<crate::model::Config>,
28928 {
28929 self.config = std::option::Option::Some(v.into());
28930 self
28931 }
28932
28933 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
28935 where
28936 T: std::convert::Into<crate::model::Config>,
28937 {
28938 self.config = v.map(|x| x.into());
28939 self
28940 }
28941
28942 pub fn set_update_mask<T>(mut self, v: T) -> Self
28944 where
28945 T: std::convert::Into<wkt::FieldMask>,
28946 {
28947 self.update_mask = std::option::Option::Some(v.into());
28948 self
28949 }
28950
28951 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
28953 where
28954 T: std::convert::Into<wkt::FieldMask>,
28955 {
28956 self.update_mask = v.map(|x| x.into());
28957 self
28958 }
28959}
28960
28961impl wkt::message::Message for UpdateConfigRequest {
28962 fn typename() -> &'static str {
28963 "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
28964 }
28965}
28966
28967#[doc(hidden)]
28968impl<'de> serde::de::Deserialize<'de> for UpdateConfigRequest {
28969 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28970 where
28971 D: serde::Deserializer<'de>,
28972 {
28973 #[allow(non_camel_case_types)]
28974 #[doc(hidden)]
28975 #[derive(PartialEq, Eq, Hash)]
28976 enum __FieldTag {
28977 __config,
28978 __update_mask,
28979 Unknown(std::string::String),
28980 }
28981 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28982 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28983 where
28984 D: serde::Deserializer<'de>,
28985 {
28986 struct Visitor;
28987 impl<'de> serde::de::Visitor<'de> for Visitor {
28988 type Value = __FieldTag;
28989 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28990 formatter.write_str("a field name for UpdateConfigRequest")
28991 }
28992 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28993 where
28994 E: serde::de::Error,
28995 {
28996 use std::result::Result::Ok;
28997 use std::string::ToString;
28998 match value {
28999 "config" => Ok(__FieldTag::__config),
29000 "updateMask" => Ok(__FieldTag::__update_mask),
29001 "update_mask" => Ok(__FieldTag::__update_mask),
29002 _ => Ok(__FieldTag::Unknown(value.to_string())),
29003 }
29004 }
29005 }
29006 deserializer.deserialize_identifier(Visitor)
29007 }
29008 }
29009 struct Visitor;
29010 impl<'de> serde::de::Visitor<'de> for Visitor {
29011 type Value = UpdateConfigRequest;
29012 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29013 formatter.write_str("struct UpdateConfigRequest")
29014 }
29015 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
29016 where
29017 A: serde::de::MapAccess<'de>,
29018 {
29019 #[allow(unused_imports)]
29020 use serde::de::Error;
29021 use std::option::Option::Some;
29022 let mut fields = std::collections::HashSet::new();
29023 let mut result = Self::Value::new();
29024 while let Some(tag) = map.next_key::<__FieldTag>()? {
29025 #[allow(clippy::match_single_binding)]
29026 match tag {
29027 __FieldTag::__config => {
29028 if !fields.insert(__FieldTag::__config) {
29029 return std::result::Result::Err(A::Error::duplicate_field(
29030 "multiple values for config",
29031 ));
29032 }
29033 result.config =
29034 map.next_value::<std::option::Option<crate::model::Config>>()?;
29035 }
29036 __FieldTag::__update_mask => {
29037 if !fields.insert(__FieldTag::__update_mask) {
29038 return std::result::Result::Err(A::Error::duplicate_field(
29039 "multiple values for update_mask",
29040 ));
29041 }
29042 result.update_mask =
29043 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
29044 }
29045 __FieldTag::Unknown(key) => {
29046 let value = map.next_value::<serde_json::Value>()?;
29047 result._unknown_fields.insert(key, value);
29048 }
29049 }
29050 }
29051 std::result::Result::Ok(result)
29052 }
29053 }
29054 deserializer.deserialize_any(Visitor)
29055 }
29056}
29057
29058#[doc(hidden)]
29059impl serde::ser::Serialize for UpdateConfigRequest {
29060 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29061 where
29062 S: serde::ser::Serializer,
29063 {
29064 use serde::ser::SerializeMap;
29065 #[allow(unused_imports)]
29066 use std::option::Option::Some;
29067 let mut state = serializer.serialize_map(std::option::Option::None)?;
29068 if self.config.is_some() {
29069 state.serialize_entry("config", &self.config)?;
29070 }
29071 if self.update_mask.is_some() {
29072 state.serialize_entry("updateMask", &self.update_mask)?;
29073 }
29074 if !self._unknown_fields.is_empty() {
29075 for (key, value) in self._unknown_fields.iter() {
29076 state.serialize_entry(key, &value)?;
29077 }
29078 }
29079 state.end()
29080 }
29081}