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, 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
172impl std::fmt::Debug for DataEncryptionState {
173 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
174 let mut debug_struct = f.debug_struct("DataEncryptionState");
175 debug_struct.field("kms_key_version_name", &self.kms_key_version_name);
176 if !self._unknown_fields.is_empty() {
177 debug_struct.field("_unknown_fields", &self._unknown_fields);
178 }
179 debug_struct.finish()
180 }
181}
182
183#[derive(Clone, Default, PartialEq)]
185#[non_exhaustive]
186pub struct Repository {
187 pub name: std::string::String,
189
190 pub create_time: std::option::Option<wkt::Timestamp>,
192
193 pub display_name: std::string::String,
195
196 pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
198
199 pub npmrc_environment_variables_secret_version: std::string::String,
204
205 pub workspace_compilation_overrides:
210 std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
211
212 pub labels: std::collections::HashMap<std::string::String, std::string::String>,
214
215 pub set_authenticated_user_admin: bool,
218
219 pub service_account: std::string::String,
221
222 pub kms_key_name: std::string::String,
228
229 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
232
233 pub internal_metadata: std::option::Option<std::string::String>,
237
238 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
239}
240
241impl Repository {
242 pub fn new() -> Self {
243 std::default::Default::default()
244 }
245
246 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
248 self.name = v.into();
249 self
250 }
251
252 pub fn set_create_time<T>(mut self, v: T) -> Self
254 where
255 T: std::convert::Into<wkt::Timestamp>,
256 {
257 self.create_time = std::option::Option::Some(v.into());
258 self
259 }
260
261 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
263 where
264 T: std::convert::Into<wkt::Timestamp>,
265 {
266 self.create_time = v.map(|x| x.into());
267 self
268 }
269
270 pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
272 self.display_name = v.into();
273 self
274 }
275
276 pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
278 where
279 T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
280 {
281 self.git_remote_settings = std::option::Option::Some(v.into());
282 self
283 }
284
285 pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
287 where
288 T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
289 {
290 self.git_remote_settings = v.map(|x| x.into());
291 self
292 }
293
294 pub fn set_npmrc_environment_variables_secret_version<
296 T: std::convert::Into<std::string::String>,
297 >(
298 mut self,
299 v: T,
300 ) -> Self {
301 self.npmrc_environment_variables_secret_version = v.into();
302 self
303 }
304
305 pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
307 where
308 T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
309 {
310 self.workspace_compilation_overrides = std::option::Option::Some(v.into());
311 self
312 }
313
314 pub fn set_or_clear_workspace_compilation_overrides<T>(
316 mut self,
317 v: std::option::Option<T>,
318 ) -> Self
319 where
320 T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
321 {
322 self.workspace_compilation_overrides = v.map(|x| x.into());
323 self
324 }
325
326 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
328 where
329 T: std::iter::IntoIterator<Item = (K, V)>,
330 K: std::convert::Into<std::string::String>,
331 V: std::convert::Into<std::string::String>,
332 {
333 use std::iter::Iterator;
334 self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
335 self
336 }
337
338 pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
340 self.set_authenticated_user_admin = v.into();
341 self
342 }
343
344 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
346 self.service_account = v.into();
347 self
348 }
349
350 pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
352 self.kms_key_name = v.into();
353 self
354 }
355
356 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
358 where
359 T: std::convert::Into<crate::model::DataEncryptionState>,
360 {
361 self.data_encryption_state = std::option::Option::Some(v.into());
362 self
363 }
364
365 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
367 where
368 T: std::convert::Into<crate::model::DataEncryptionState>,
369 {
370 self.data_encryption_state = v.map(|x| x.into());
371 self
372 }
373
374 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
376 where
377 T: std::convert::Into<std::string::String>,
378 {
379 self.internal_metadata = std::option::Option::Some(v.into());
380 self
381 }
382
383 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
385 where
386 T: std::convert::Into<std::string::String>,
387 {
388 self.internal_metadata = v.map(|x| x.into());
389 self
390 }
391}
392
393impl wkt::message::Message for Repository {
394 fn typename() -> &'static str {
395 "type.googleapis.com/google.cloud.dataform.v1.Repository"
396 }
397}
398
399#[doc(hidden)]
400impl<'de> serde::de::Deserialize<'de> for Repository {
401 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
402 where
403 D: serde::Deserializer<'de>,
404 {
405 #[allow(non_camel_case_types)]
406 #[doc(hidden)]
407 #[derive(PartialEq, Eq, Hash)]
408 enum __FieldTag {
409 __name,
410 __create_time,
411 __display_name,
412 __git_remote_settings,
413 __npmrc_environment_variables_secret_version,
414 __workspace_compilation_overrides,
415 __labels,
416 __set_authenticated_user_admin,
417 __service_account,
418 __kms_key_name,
419 __data_encryption_state,
420 __internal_metadata,
421 Unknown(std::string::String),
422 }
423 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
424 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
425 where
426 D: serde::Deserializer<'de>,
427 {
428 struct Visitor;
429 impl<'de> serde::de::Visitor<'de> for Visitor {
430 type Value = __FieldTag;
431 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
432 formatter.write_str("a field name for Repository")
433 }
434 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
435 where
436 E: serde::de::Error,
437 {
438 use std::result::Result::Ok;
439 use std::string::ToString;
440 match value {
441 "name" => Ok(__FieldTag::__name),
442 "createTime" => Ok(__FieldTag::__create_time),
443 "create_time" => Ok(__FieldTag::__create_time),
444 "displayName" => Ok(__FieldTag::__display_name),
445 "display_name" => Ok(__FieldTag::__display_name),
446 "gitRemoteSettings" => Ok(__FieldTag::__git_remote_settings),
447 "git_remote_settings" => Ok(__FieldTag::__git_remote_settings),
448 "npmrcEnvironmentVariablesSecretVersion" => {
449 Ok(__FieldTag::__npmrc_environment_variables_secret_version)
450 }
451 "npmrc_environment_variables_secret_version" => {
452 Ok(__FieldTag::__npmrc_environment_variables_secret_version)
453 }
454 "workspaceCompilationOverrides" => {
455 Ok(__FieldTag::__workspace_compilation_overrides)
456 }
457 "workspace_compilation_overrides" => {
458 Ok(__FieldTag::__workspace_compilation_overrides)
459 }
460 "labels" => Ok(__FieldTag::__labels),
461 "setAuthenticatedUserAdmin" => {
462 Ok(__FieldTag::__set_authenticated_user_admin)
463 }
464 "set_authenticated_user_admin" => {
465 Ok(__FieldTag::__set_authenticated_user_admin)
466 }
467 "serviceAccount" => Ok(__FieldTag::__service_account),
468 "service_account" => Ok(__FieldTag::__service_account),
469 "kmsKeyName" => Ok(__FieldTag::__kms_key_name),
470 "kms_key_name" => Ok(__FieldTag::__kms_key_name),
471 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
472 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
473 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
474 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
475 _ => Ok(__FieldTag::Unknown(value.to_string())),
476 }
477 }
478 }
479 deserializer.deserialize_identifier(Visitor)
480 }
481 }
482 struct Visitor;
483 impl<'de> serde::de::Visitor<'de> for Visitor {
484 type Value = Repository;
485 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
486 formatter.write_str("struct Repository")
487 }
488 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
489 where
490 A: serde::de::MapAccess<'de>,
491 {
492 #[allow(unused_imports)]
493 use serde::de::Error;
494 use std::option::Option::Some;
495 let mut fields = std::collections::HashSet::new();
496 let mut result = Self::Value::new();
497 while let Some(tag) = map.next_key::<__FieldTag>()? {
498 #[allow(clippy::match_single_binding)]
499 match tag {
500 __FieldTag::__name => {
501 if !fields.insert(__FieldTag::__name) {
502 return std::result::Result::Err(A::Error::duplicate_field(
503 "multiple values for name",
504 ));
505 }
506 result.name = map
507 .next_value::<std::option::Option<std::string::String>>()?
508 .unwrap_or_default();
509 }
510 __FieldTag::__create_time => {
511 if !fields.insert(__FieldTag::__create_time) {
512 return std::result::Result::Err(A::Error::duplicate_field(
513 "multiple values for create_time",
514 ));
515 }
516 result.create_time =
517 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
518 }
519 __FieldTag::__display_name => {
520 if !fields.insert(__FieldTag::__display_name) {
521 return std::result::Result::Err(A::Error::duplicate_field(
522 "multiple values for display_name",
523 ));
524 }
525 result.display_name = map
526 .next_value::<std::option::Option<std::string::String>>()?
527 .unwrap_or_default();
528 }
529 __FieldTag::__git_remote_settings => {
530 if !fields.insert(__FieldTag::__git_remote_settings) {
531 return std::result::Result::Err(A::Error::duplicate_field(
532 "multiple values for git_remote_settings",
533 ));
534 }
535 result.git_remote_settings =
536 map.next_value::<std::option::Option<
537 crate::model::repository::GitRemoteSettings,
538 >>()?;
539 }
540 __FieldTag::__npmrc_environment_variables_secret_version => {
541 if !fields
542 .insert(__FieldTag::__npmrc_environment_variables_secret_version)
543 {
544 return std::result::Result::Err(A::Error::duplicate_field(
545 "multiple values for npmrc_environment_variables_secret_version",
546 ));
547 }
548 result.npmrc_environment_variables_secret_version = map
549 .next_value::<std::option::Option<std::string::String>>()?
550 .unwrap_or_default();
551 }
552 __FieldTag::__workspace_compilation_overrides => {
553 if !fields.insert(__FieldTag::__workspace_compilation_overrides) {
554 return std::result::Result::Err(A::Error::duplicate_field(
555 "multiple values for workspace_compilation_overrides",
556 ));
557 }
558 result.workspace_compilation_overrides = map
559 .next_value::<std::option::Option<
560 crate::model::repository::WorkspaceCompilationOverrides,
561 >>()?;
562 }
563 __FieldTag::__labels => {
564 if !fields.insert(__FieldTag::__labels) {
565 return std::result::Result::Err(A::Error::duplicate_field(
566 "multiple values for labels",
567 ));
568 }
569 result.labels = map
570 .next_value::<std::option::Option<
571 std::collections::HashMap<
572 std::string::String,
573 std::string::String,
574 >,
575 >>()?
576 .unwrap_or_default();
577 }
578 __FieldTag::__set_authenticated_user_admin => {
579 if !fields.insert(__FieldTag::__set_authenticated_user_admin) {
580 return std::result::Result::Err(A::Error::duplicate_field(
581 "multiple values for set_authenticated_user_admin",
582 ));
583 }
584 result.set_authenticated_user_admin = map
585 .next_value::<std::option::Option<bool>>()?
586 .unwrap_or_default();
587 }
588 __FieldTag::__service_account => {
589 if !fields.insert(__FieldTag::__service_account) {
590 return std::result::Result::Err(A::Error::duplicate_field(
591 "multiple values for service_account",
592 ));
593 }
594 result.service_account = map
595 .next_value::<std::option::Option<std::string::String>>()?
596 .unwrap_or_default();
597 }
598 __FieldTag::__kms_key_name => {
599 if !fields.insert(__FieldTag::__kms_key_name) {
600 return std::result::Result::Err(A::Error::duplicate_field(
601 "multiple values for kms_key_name",
602 ));
603 }
604 result.kms_key_name = map
605 .next_value::<std::option::Option<std::string::String>>()?
606 .unwrap_or_default();
607 }
608 __FieldTag::__data_encryption_state => {
609 if !fields.insert(__FieldTag::__data_encryption_state) {
610 return std::result::Result::Err(A::Error::duplicate_field(
611 "multiple values for data_encryption_state",
612 ));
613 }
614 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
615 ;
616 }
617 __FieldTag::__internal_metadata => {
618 if !fields.insert(__FieldTag::__internal_metadata) {
619 return std::result::Result::Err(A::Error::duplicate_field(
620 "multiple values for internal_metadata",
621 ));
622 }
623 result.internal_metadata =
624 map.next_value::<std::option::Option<std::string::String>>()?;
625 }
626 __FieldTag::Unknown(key) => {
627 let value = map.next_value::<serde_json::Value>()?;
628 result._unknown_fields.insert(key, value);
629 }
630 }
631 }
632 std::result::Result::Ok(result)
633 }
634 }
635 deserializer.deserialize_any(Visitor)
636 }
637}
638
639#[doc(hidden)]
640impl serde::ser::Serialize for Repository {
641 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
642 where
643 S: serde::ser::Serializer,
644 {
645 use serde::ser::SerializeMap;
646 #[allow(unused_imports)]
647 use std::option::Option::Some;
648 let mut state = serializer.serialize_map(std::option::Option::None)?;
649 if !self.name.is_empty() {
650 state.serialize_entry("name", &self.name)?;
651 }
652 if self.create_time.is_some() {
653 state.serialize_entry("createTime", &self.create_time)?;
654 }
655 if !self.display_name.is_empty() {
656 state.serialize_entry("displayName", &self.display_name)?;
657 }
658 if self.git_remote_settings.is_some() {
659 state.serialize_entry("gitRemoteSettings", &self.git_remote_settings)?;
660 }
661 if !self.npmrc_environment_variables_secret_version.is_empty() {
662 state.serialize_entry(
663 "npmrcEnvironmentVariablesSecretVersion",
664 &self.npmrc_environment_variables_secret_version,
665 )?;
666 }
667 if self.workspace_compilation_overrides.is_some() {
668 state.serialize_entry(
669 "workspaceCompilationOverrides",
670 &self.workspace_compilation_overrides,
671 )?;
672 }
673 if !self.labels.is_empty() {
674 state.serialize_entry("labels", &self.labels)?;
675 }
676 if !wkt::internal::is_default(&self.set_authenticated_user_admin) {
677 state.serialize_entry(
678 "setAuthenticatedUserAdmin",
679 &self.set_authenticated_user_admin,
680 )?;
681 }
682 if !self.service_account.is_empty() {
683 state.serialize_entry("serviceAccount", &self.service_account)?;
684 }
685 if !self.kms_key_name.is_empty() {
686 state.serialize_entry("kmsKeyName", &self.kms_key_name)?;
687 }
688 if self.data_encryption_state.is_some() {
689 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
690 }
691 if self.internal_metadata.is_some() {
692 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
693 }
694 if !self._unknown_fields.is_empty() {
695 for (key, value) in self._unknown_fields.iter() {
696 state.serialize_entry(key, &value)?;
697 }
698 }
699 state.end()
700 }
701}
702
703impl std::fmt::Debug for Repository {
704 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
705 let mut debug_struct = f.debug_struct("Repository");
706 debug_struct.field("name", &self.name);
707 debug_struct.field("create_time", &self.create_time);
708 debug_struct.field("display_name", &self.display_name);
709 debug_struct.field("git_remote_settings", &self.git_remote_settings);
710 debug_struct.field(
711 "npmrc_environment_variables_secret_version",
712 &self.npmrc_environment_variables_secret_version,
713 );
714 debug_struct.field(
715 "workspace_compilation_overrides",
716 &self.workspace_compilation_overrides,
717 );
718 debug_struct.field("labels", &self.labels);
719 debug_struct.field(
720 "set_authenticated_user_admin",
721 &self.set_authenticated_user_admin,
722 );
723 debug_struct.field("service_account", &self.service_account);
724 debug_struct.field("kms_key_name", &self.kms_key_name);
725 debug_struct.field("data_encryption_state", &self.data_encryption_state);
726 debug_struct.field("internal_metadata", &self.internal_metadata);
727 if !self._unknown_fields.is_empty() {
728 debug_struct.field("_unknown_fields", &self._unknown_fields);
729 }
730 debug_struct.finish()
731 }
732}
733
734pub mod repository {
736 #[allow(unused_imports)]
737 use super::*;
738
739 #[derive(Clone, Default, PartialEq)]
741 #[non_exhaustive]
742 pub struct GitRemoteSettings {
743 pub url: std::string::String,
745
746 pub default_branch: std::string::String,
748
749 pub authentication_token_secret_version: std::string::String,
753
754 pub ssh_authentication_config: std::option::Option<
756 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
757 >,
758
759 #[deprecated]
762 pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
763
764 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
765 }
766
767 impl GitRemoteSettings {
768 pub fn new() -> Self {
769 std::default::Default::default()
770 }
771
772 pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
774 self.url = v.into();
775 self
776 }
777
778 pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
780 mut self,
781 v: T,
782 ) -> Self {
783 self.default_branch = v.into();
784 self
785 }
786
787 pub fn set_authentication_token_secret_version<
789 T: std::convert::Into<std::string::String>,
790 >(
791 mut self,
792 v: T,
793 ) -> Self {
794 self.authentication_token_secret_version = v.into();
795 self
796 }
797
798 pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
800 where
801 T: std::convert::Into<
802 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
803 >,
804 {
805 self.ssh_authentication_config = std::option::Option::Some(v.into());
806 self
807 }
808
809 pub fn set_or_clear_ssh_authentication_config<T>(
811 mut self,
812 v: std::option::Option<T>,
813 ) -> Self
814 where
815 T: std::convert::Into<
816 crate::model::repository::git_remote_settings::SshAuthenticationConfig,
817 >,
818 {
819 self.ssh_authentication_config = v.map(|x| x.into());
820 self
821 }
822
823 #[deprecated]
825 pub fn set_token_status<
826 T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
827 >(
828 mut self,
829 v: T,
830 ) -> Self {
831 self.token_status = v.into();
832 self
833 }
834 }
835
836 impl wkt::message::Message for GitRemoteSettings {
837 fn typename() -> &'static str {
838 "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
839 }
840 }
841
842 #[doc(hidden)]
843 impl<'de> serde::de::Deserialize<'de> for GitRemoteSettings {
844 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
845 where
846 D: serde::Deserializer<'de>,
847 {
848 #[allow(non_camel_case_types)]
849 #[doc(hidden)]
850 #[derive(PartialEq, Eq, Hash)]
851 enum __FieldTag {
852 __url,
853 __default_branch,
854 __authentication_token_secret_version,
855 __ssh_authentication_config,
856 __token_status,
857 Unknown(std::string::String),
858 }
859 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
860 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
861 where
862 D: serde::Deserializer<'de>,
863 {
864 struct Visitor;
865 impl<'de> serde::de::Visitor<'de> for Visitor {
866 type Value = __FieldTag;
867 fn expecting(
868 &self,
869 formatter: &mut std::fmt::Formatter,
870 ) -> std::fmt::Result {
871 formatter.write_str("a field name for GitRemoteSettings")
872 }
873 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
874 where
875 E: serde::de::Error,
876 {
877 use std::result::Result::Ok;
878 use std::string::ToString;
879 match value {
880 "url" => Ok(__FieldTag::__url),
881 "defaultBranch" => Ok(__FieldTag::__default_branch),
882 "default_branch" => Ok(__FieldTag::__default_branch),
883 "authenticationTokenSecretVersion" => {
884 Ok(__FieldTag::__authentication_token_secret_version)
885 }
886 "authentication_token_secret_version" => {
887 Ok(__FieldTag::__authentication_token_secret_version)
888 }
889 "sshAuthenticationConfig" => {
890 Ok(__FieldTag::__ssh_authentication_config)
891 }
892 "ssh_authentication_config" => {
893 Ok(__FieldTag::__ssh_authentication_config)
894 }
895 "tokenStatus" => Ok(__FieldTag::__token_status),
896 "token_status" => Ok(__FieldTag::__token_status),
897 _ => Ok(__FieldTag::Unknown(value.to_string())),
898 }
899 }
900 }
901 deserializer.deserialize_identifier(Visitor)
902 }
903 }
904 struct Visitor;
905 impl<'de> serde::de::Visitor<'de> for Visitor {
906 type Value = GitRemoteSettings;
907 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
908 formatter.write_str("struct GitRemoteSettings")
909 }
910 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
911 where
912 A: serde::de::MapAccess<'de>,
913 {
914 #[allow(unused_imports)]
915 use serde::de::Error;
916 use std::option::Option::Some;
917 let mut fields = std::collections::HashSet::new();
918 let mut result = Self::Value::new();
919 while let Some(tag) = map.next_key::<__FieldTag>()? {
920 #[allow(clippy::match_single_binding)]
921 match tag {
922 __FieldTag::__url => {
923 if !fields.insert(__FieldTag::__url) {
924 return std::result::Result::Err(A::Error::duplicate_field(
925 "multiple values for url",
926 ));
927 }
928 result.url = map
929 .next_value::<std::option::Option<std::string::String>>()?
930 .unwrap_or_default();
931 }
932 __FieldTag::__default_branch => {
933 if !fields.insert(__FieldTag::__default_branch) {
934 return std::result::Result::Err(A::Error::duplicate_field(
935 "multiple values for default_branch",
936 ));
937 }
938 result.default_branch = map
939 .next_value::<std::option::Option<std::string::String>>()?
940 .unwrap_or_default();
941 }
942 __FieldTag::__authentication_token_secret_version => {
943 if !fields.insert(__FieldTag::__authentication_token_secret_version)
944 {
945 return std::result::Result::Err(A::Error::duplicate_field(
946 "multiple values for authentication_token_secret_version",
947 ));
948 }
949 result.authentication_token_secret_version = map
950 .next_value::<std::option::Option<std::string::String>>()?
951 .unwrap_or_default();
952 }
953 __FieldTag::__ssh_authentication_config => {
954 if !fields.insert(__FieldTag::__ssh_authentication_config) {
955 return std::result::Result::Err(A::Error::duplicate_field(
956 "multiple values for ssh_authentication_config",
957 ));
958 }
959 result.ssh_authentication_config = map.next_value::<std::option::Option<crate::model::repository::git_remote_settings::SshAuthenticationConfig>>()?
960 ;
961 }
962 __FieldTag::__token_status => {
963 if !fields.insert(__FieldTag::__token_status) {
964 return std::result::Result::Err(A::Error::duplicate_field(
965 "multiple values for token_status",
966 ));
967 }
968 result.token_status = map
969 .next_value::<std::option::Option<
970 crate::model::repository::git_remote_settings::TokenStatus,
971 >>()?
972 .unwrap_or_default();
973 }
974 __FieldTag::Unknown(key) => {
975 let value = map.next_value::<serde_json::Value>()?;
976 result._unknown_fields.insert(key, value);
977 }
978 }
979 }
980 std::result::Result::Ok(result)
981 }
982 }
983 deserializer.deserialize_any(Visitor)
984 }
985 }
986
987 #[doc(hidden)]
988 impl serde::ser::Serialize for GitRemoteSettings {
989 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
990 where
991 S: serde::ser::Serializer,
992 {
993 use serde::ser::SerializeMap;
994 #[allow(unused_imports)]
995 use std::option::Option::Some;
996 let mut state = serializer.serialize_map(std::option::Option::None)?;
997 if !self.url.is_empty() {
998 state.serialize_entry("url", &self.url)?;
999 }
1000 if !self.default_branch.is_empty() {
1001 state.serialize_entry("defaultBranch", &self.default_branch)?;
1002 }
1003 if !self.authentication_token_secret_version.is_empty() {
1004 state.serialize_entry(
1005 "authenticationTokenSecretVersion",
1006 &self.authentication_token_secret_version,
1007 )?;
1008 }
1009 if self.ssh_authentication_config.is_some() {
1010 state
1011 .serialize_entry("sshAuthenticationConfig", &self.ssh_authentication_config)?;
1012 }
1013 if !wkt::internal::is_default(&self.token_status) {
1014 state.serialize_entry("tokenStatus", &self.token_status)?;
1015 }
1016 if !self._unknown_fields.is_empty() {
1017 for (key, value) in self._unknown_fields.iter() {
1018 state.serialize_entry(key, &value)?;
1019 }
1020 }
1021 state.end()
1022 }
1023 }
1024
1025 impl std::fmt::Debug for GitRemoteSettings {
1026 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1027 let mut debug_struct = f.debug_struct("GitRemoteSettings");
1028 debug_struct.field("url", &self.url);
1029 debug_struct.field("default_branch", &self.default_branch);
1030 debug_struct.field(
1031 "authentication_token_secret_version",
1032 &self.authentication_token_secret_version,
1033 );
1034 debug_struct.field("ssh_authentication_config", &self.ssh_authentication_config);
1035 debug_struct.field("token_status", &self.token_status);
1036 if !self._unknown_fields.is_empty() {
1037 debug_struct.field("_unknown_fields", &self._unknown_fields);
1038 }
1039 debug_struct.finish()
1040 }
1041 }
1042
1043 pub mod git_remote_settings {
1045 #[allow(unused_imports)]
1046 use super::*;
1047
1048 #[derive(Clone, Default, PartialEq)]
1050 #[non_exhaustive]
1051 pub struct SshAuthenticationConfig {
1052 pub user_private_key_secret_version: std::string::String,
1056
1057 pub host_public_key: std::string::String,
1060
1061 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1062 }
1063
1064 impl SshAuthenticationConfig {
1065 pub fn new() -> Self {
1066 std::default::Default::default()
1067 }
1068
1069 pub fn set_user_private_key_secret_version<
1071 T: std::convert::Into<std::string::String>,
1072 >(
1073 mut self,
1074 v: T,
1075 ) -> Self {
1076 self.user_private_key_secret_version = v.into();
1077 self
1078 }
1079
1080 pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
1082 mut self,
1083 v: T,
1084 ) -> Self {
1085 self.host_public_key = v.into();
1086 self
1087 }
1088 }
1089
1090 impl wkt::message::Message for SshAuthenticationConfig {
1091 fn typename() -> &'static str {
1092 "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
1093 }
1094 }
1095
1096 #[doc(hidden)]
1097 impl<'de> serde::de::Deserialize<'de> for SshAuthenticationConfig {
1098 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1099 where
1100 D: serde::Deserializer<'de>,
1101 {
1102 #[allow(non_camel_case_types)]
1103 #[doc(hidden)]
1104 #[derive(PartialEq, Eq, Hash)]
1105 enum __FieldTag {
1106 __user_private_key_secret_version,
1107 __host_public_key,
1108 Unknown(std::string::String),
1109 }
1110 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1111 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1112 where
1113 D: serde::Deserializer<'de>,
1114 {
1115 struct Visitor;
1116 impl<'de> serde::de::Visitor<'de> for Visitor {
1117 type Value = __FieldTag;
1118 fn expecting(
1119 &self,
1120 formatter: &mut std::fmt::Formatter,
1121 ) -> std::fmt::Result {
1122 formatter.write_str("a field name for SshAuthenticationConfig")
1123 }
1124 fn visit_str<E>(
1125 self,
1126 value: &str,
1127 ) -> std::result::Result<Self::Value, E>
1128 where
1129 E: serde::de::Error,
1130 {
1131 use std::result::Result::Ok;
1132 use std::string::ToString;
1133 match value {
1134 "userPrivateKeySecretVersion" => {
1135 Ok(__FieldTag::__user_private_key_secret_version)
1136 }
1137 "user_private_key_secret_version" => {
1138 Ok(__FieldTag::__user_private_key_secret_version)
1139 }
1140 "hostPublicKey" => Ok(__FieldTag::__host_public_key),
1141 "host_public_key" => Ok(__FieldTag::__host_public_key),
1142 _ => Ok(__FieldTag::Unknown(value.to_string())),
1143 }
1144 }
1145 }
1146 deserializer.deserialize_identifier(Visitor)
1147 }
1148 }
1149 struct Visitor;
1150 impl<'de> serde::de::Visitor<'de> for Visitor {
1151 type Value = SshAuthenticationConfig;
1152 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1153 formatter.write_str("struct SshAuthenticationConfig")
1154 }
1155 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1156 where
1157 A: serde::de::MapAccess<'de>,
1158 {
1159 #[allow(unused_imports)]
1160 use serde::de::Error;
1161 use std::option::Option::Some;
1162 let mut fields = std::collections::HashSet::new();
1163 let mut result = Self::Value::new();
1164 while let Some(tag) = map.next_key::<__FieldTag>()? {
1165 #[allow(clippy::match_single_binding)]
1166 match tag {
1167 __FieldTag::__user_private_key_secret_version => {
1168 if !fields.insert(__FieldTag::__user_private_key_secret_version)
1169 {
1170 return std::result::Result::Err(
1171 A::Error::duplicate_field(
1172 "multiple values for user_private_key_secret_version",
1173 ),
1174 );
1175 }
1176 result.user_private_key_secret_version = map
1177 .next_value::<std::option::Option<std::string::String>>()?
1178 .unwrap_or_default();
1179 }
1180 __FieldTag::__host_public_key => {
1181 if !fields.insert(__FieldTag::__host_public_key) {
1182 return std::result::Result::Err(
1183 A::Error::duplicate_field(
1184 "multiple values for host_public_key",
1185 ),
1186 );
1187 }
1188 result.host_public_key = map
1189 .next_value::<std::option::Option<std::string::String>>()?
1190 .unwrap_or_default();
1191 }
1192 __FieldTag::Unknown(key) => {
1193 let value = map.next_value::<serde_json::Value>()?;
1194 result._unknown_fields.insert(key, value);
1195 }
1196 }
1197 }
1198 std::result::Result::Ok(result)
1199 }
1200 }
1201 deserializer.deserialize_any(Visitor)
1202 }
1203 }
1204
1205 #[doc(hidden)]
1206 impl serde::ser::Serialize for SshAuthenticationConfig {
1207 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1208 where
1209 S: serde::ser::Serializer,
1210 {
1211 use serde::ser::SerializeMap;
1212 #[allow(unused_imports)]
1213 use std::option::Option::Some;
1214 let mut state = serializer.serialize_map(std::option::Option::None)?;
1215 if !self.user_private_key_secret_version.is_empty() {
1216 state.serialize_entry(
1217 "userPrivateKeySecretVersion",
1218 &self.user_private_key_secret_version,
1219 )?;
1220 }
1221 if !self.host_public_key.is_empty() {
1222 state.serialize_entry("hostPublicKey", &self.host_public_key)?;
1223 }
1224 if !self._unknown_fields.is_empty() {
1225 for (key, value) in self._unknown_fields.iter() {
1226 state.serialize_entry(key, &value)?;
1227 }
1228 }
1229 state.end()
1230 }
1231 }
1232
1233 impl std::fmt::Debug for SshAuthenticationConfig {
1234 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1235 let mut debug_struct = f.debug_struct("SshAuthenticationConfig");
1236 debug_struct.field(
1237 "user_private_key_secret_version",
1238 &self.user_private_key_secret_version,
1239 );
1240 debug_struct.field("host_public_key", &self.host_public_key);
1241 if !self._unknown_fields.is_empty() {
1242 debug_struct.field("_unknown_fields", &self._unknown_fields);
1243 }
1244 debug_struct.finish()
1245 }
1246 }
1247
1248 #[derive(Clone, Debug, PartialEq)]
1264 #[non_exhaustive]
1265 pub enum TokenStatus {
1266 Unspecified,
1268 NotFound,
1271 Invalid,
1273 Valid,
1275 UnknownValue(token_status::UnknownValue),
1280 }
1281
1282 #[doc(hidden)]
1283 pub mod token_status {
1284 #[allow(unused_imports)]
1285 use super::*;
1286 #[derive(Clone, Debug, PartialEq)]
1287 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1288 }
1289
1290 impl TokenStatus {
1291 pub fn value(&self) -> std::option::Option<i32> {
1296 match self {
1297 Self::Unspecified => std::option::Option::Some(0),
1298 Self::NotFound => std::option::Option::Some(1),
1299 Self::Invalid => std::option::Option::Some(2),
1300 Self::Valid => std::option::Option::Some(3),
1301 Self::UnknownValue(u) => u.0.value(),
1302 }
1303 }
1304
1305 pub fn name(&self) -> std::option::Option<&str> {
1310 match self {
1311 Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
1312 Self::NotFound => std::option::Option::Some("NOT_FOUND"),
1313 Self::Invalid => std::option::Option::Some("INVALID"),
1314 Self::Valid => std::option::Option::Some("VALID"),
1315 Self::UnknownValue(u) => u.0.name(),
1316 }
1317 }
1318 }
1319
1320 impl std::default::Default for TokenStatus {
1321 fn default() -> Self {
1322 use std::convert::From;
1323 Self::from(0)
1324 }
1325 }
1326
1327 impl std::fmt::Display for TokenStatus {
1328 fn fmt(
1329 &self,
1330 f: &mut std::fmt::Formatter<'_>,
1331 ) -> std::result::Result<(), std::fmt::Error> {
1332 wkt::internal::display_enum(f, self.name(), self.value())
1333 }
1334 }
1335
1336 impl std::convert::From<i32> for TokenStatus {
1337 fn from(value: i32) -> Self {
1338 match value {
1339 0 => Self::Unspecified,
1340 1 => Self::NotFound,
1341 2 => Self::Invalid,
1342 3 => Self::Valid,
1343 _ => Self::UnknownValue(token_status::UnknownValue(
1344 wkt::internal::UnknownEnumValue::Integer(value),
1345 )),
1346 }
1347 }
1348 }
1349
1350 impl std::convert::From<&str> for TokenStatus {
1351 fn from(value: &str) -> Self {
1352 use std::string::ToString;
1353 match value {
1354 "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
1355 "NOT_FOUND" => Self::NotFound,
1356 "INVALID" => Self::Invalid,
1357 "VALID" => Self::Valid,
1358 _ => Self::UnknownValue(token_status::UnknownValue(
1359 wkt::internal::UnknownEnumValue::String(value.to_string()),
1360 )),
1361 }
1362 }
1363 }
1364
1365 impl serde::ser::Serialize for TokenStatus {
1366 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1367 where
1368 S: serde::Serializer,
1369 {
1370 match self {
1371 Self::Unspecified => serializer.serialize_i32(0),
1372 Self::NotFound => serializer.serialize_i32(1),
1373 Self::Invalid => serializer.serialize_i32(2),
1374 Self::Valid => serializer.serialize_i32(3),
1375 Self::UnknownValue(u) => u.0.serialize(serializer),
1376 }
1377 }
1378 }
1379
1380 impl<'de> serde::de::Deserialize<'de> for TokenStatus {
1381 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1382 where
1383 D: serde::Deserializer<'de>,
1384 {
1385 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
1386 ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
1387 ))
1388 }
1389 }
1390 }
1391
1392 #[derive(Clone, Default, PartialEq)]
1394 #[non_exhaustive]
1395 pub struct WorkspaceCompilationOverrides {
1396 pub default_database: std::string::String,
1398
1399 pub schema_suffix: std::string::String,
1402
1403 pub table_prefix: std::string::String,
1405
1406 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1407 }
1408
1409 impl WorkspaceCompilationOverrides {
1410 pub fn new() -> Self {
1411 std::default::Default::default()
1412 }
1413
1414 pub fn set_default_database<T: std::convert::Into<std::string::String>>(
1416 mut self,
1417 v: T,
1418 ) -> Self {
1419 self.default_database = v.into();
1420 self
1421 }
1422
1423 pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
1425 mut self,
1426 v: T,
1427 ) -> Self {
1428 self.schema_suffix = v.into();
1429 self
1430 }
1431
1432 pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
1434 mut self,
1435 v: T,
1436 ) -> Self {
1437 self.table_prefix = v.into();
1438 self
1439 }
1440 }
1441
1442 impl wkt::message::Message for WorkspaceCompilationOverrides {
1443 fn typename() -> &'static str {
1444 "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
1445 }
1446 }
1447
1448 #[doc(hidden)]
1449 impl<'de> serde::de::Deserialize<'de> for WorkspaceCompilationOverrides {
1450 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1451 where
1452 D: serde::Deserializer<'de>,
1453 {
1454 #[allow(non_camel_case_types)]
1455 #[doc(hidden)]
1456 #[derive(PartialEq, Eq, Hash)]
1457 enum __FieldTag {
1458 __default_database,
1459 __schema_suffix,
1460 __table_prefix,
1461 Unknown(std::string::String),
1462 }
1463 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1464 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1465 where
1466 D: serde::Deserializer<'de>,
1467 {
1468 struct Visitor;
1469 impl<'de> serde::de::Visitor<'de> for Visitor {
1470 type Value = __FieldTag;
1471 fn expecting(
1472 &self,
1473 formatter: &mut std::fmt::Formatter,
1474 ) -> std::fmt::Result {
1475 formatter.write_str("a field name for WorkspaceCompilationOverrides")
1476 }
1477 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1478 where
1479 E: serde::de::Error,
1480 {
1481 use std::result::Result::Ok;
1482 use std::string::ToString;
1483 match value {
1484 "defaultDatabase" => Ok(__FieldTag::__default_database),
1485 "default_database" => Ok(__FieldTag::__default_database),
1486 "schemaSuffix" => Ok(__FieldTag::__schema_suffix),
1487 "schema_suffix" => Ok(__FieldTag::__schema_suffix),
1488 "tablePrefix" => Ok(__FieldTag::__table_prefix),
1489 "table_prefix" => Ok(__FieldTag::__table_prefix),
1490 _ => Ok(__FieldTag::Unknown(value.to_string())),
1491 }
1492 }
1493 }
1494 deserializer.deserialize_identifier(Visitor)
1495 }
1496 }
1497 struct Visitor;
1498 impl<'de> serde::de::Visitor<'de> for Visitor {
1499 type Value = WorkspaceCompilationOverrides;
1500 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1501 formatter.write_str("struct WorkspaceCompilationOverrides")
1502 }
1503 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1504 where
1505 A: serde::de::MapAccess<'de>,
1506 {
1507 #[allow(unused_imports)]
1508 use serde::de::Error;
1509 use std::option::Option::Some;
1510 let mut fields = std::collections::HashSet::new();
1511 let mut result = Self::Value::new();
1512 while let Some(tag) = map.next_key::<__FieldTag>()? {
1513 #[allow(clippy::match_single_binding)]
1514 match tag {
1515 __FieldTag::__default_database => {
1516 if !fields.insert(__FieldTag::__default_database) {
1517 return std::result::Result::Err(A::Error::duplicate_field(
1518 "multiple values for default_database",
1519 ));
1520 }
1521 result.default_database = map
1522 .next_value::<std::option::Option<std::string::String>>()?
1523 .unwrap_or_default();
1524 }
1525 __FieldTag::__schema_suffix => {
1526 if !fields.insert(__FieldTag::__schema_suffix) {
1527 return std::result::Result::Err(A::Error::duplicate_field(
1528 "multiple values for schema_suffix",
1529 ));
1530 }
1531 result.schema_suffix = map
1532 .next_value::<std::option::Option<std::string::String>>()?
1533 .unwrap_or_default();
1534 }
1535 __FieldTag::__table_prefix => {
1536 if !fields.insert(__FieldTag::__table_prefix) {
1537 return std::result::Result::Err(A::Error::duplicate_field(
1538 "multiple values for table_prefix",
1539 ));
1540 }
1541 result.table_prefix = map
1542 .next_value::<std::option::Option<std::string::String>>()?
1543 .unwrap_or_default();
1544 }
1545 __FieldTag::Unknown(key) => {
1546 let value = map.next_value::<serde_json::Value>()?;
1547 result._unknown_fields.insert(key, value);
1548 }
1549 }
1550 }
1551 std::result::Result::Ok(result)
1552 }
1553 }
1554 deserializer.deserialize_any(Visitor)
1555 }
1556 }
1557
1558 #[doc(hidden)]
1559 impl serde::ser::Serialize for WorkspaceCompilationOverrides {
1560 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1561 where
1562 S: serde::ser::Serializer,
1563 {
1564 use serde::ser::SerializeMap;
1565 #[allow(unused_imports)]
1566 use std::option::Option::Some;
1567 let mut state = serializer.serialize_map(std::option::Option::None)?;
1568 if !self.default_database.is_empty() {
1569 state.serialize_entry("defaultDatabase", &self.default_database)?;
1570 }
1571 if !self.schema_suffix.is_empty() {
1572 state.serialize_entry("schemaSuffix", &self.schema_suffix)?;
1573 }
1574 if !self.table_prefix.is_empty() {
1575 state.serialize_entry("tablePrefix", &self.table_prefix)?;
1576 }
1577 if !self._unknown_fields.is_empty() {
1578 for (key, value) in self._unknown_fields.iter() {
1579 state.serialize_entry(key, &value)?;
1580 }
1581 }
1582 state.end()
1583 }
1584 }
1585
1586 impl std::fmt::Debug for WorkspaceCompilationOverrides {
1587 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1588 let mut debug_struct = f.debug_struct("WorkspaceCompilationOverrides");
1589 debug_struct.field("default_database", &self.default_database);
1590 debug_struct.field("schema_suffix", &self.schema_suffix);
1591 debug_struct.field("table_prefix", &self.table_prefix);
1592 if !self._unknown_fields.is_empty() {
1593 debug_struct.field("_unknown_fields", &self._unknown_fields);
1594 }
1595 debug_struct.finish()
1596 }
1597 }
1598}
1599
1600#[derive(Clone, Default, PartialEq)]
1602#[non_exhaustive]
1603pub struct ListRepositoriesRequest {
1604 pub parent: std::string::String,
1607
1608 pub page_size: i32,
1612
1613 pub page_token: std::string::String,
1620
1621 pub order_by: std::string::String,
1625
1626 pub filter: std::string::String,
1628
1629 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1630}
1631
1632impl ListRepositoriesRequest {
1633 pub fn new() -> Self {
1634 std::default::Default::default()
1635 }
1636
1637 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1639 self.parent = v.into();
1640 self
1641 }
1642
1643 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1645 self.page_size = v.into();
1646 self
1647 }
1648
1649 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1651 self.page_token = v.into();
1652 self
1653 }
1654
1655 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1657 self.order_by = v.into();
1658 self
1659 }
1660
1661 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1663 self.filter = v.into();
1664 self
1665 }
1666}
1667
1668impl wkt::message::Message for ListRepositoriesRequest {
1669 fn typename() -> &'static str {
1670 "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
1671 }
1672}
1673
1674#[doc(hidden)]
1675impl<'de> serde::de::Deserialize<'de> for ListRepositoriesRequest {
1676 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1677 where
1678 D: serde::Deserializer<'de>,
1679 {
1680 #[allow(non_camel_case_types)]
1681 #[doc(hidden)]
1682 #[derive(PartialEq, Eq, Hash)]
1683 enum __FieldTag {
1684 __parent,
1685 __page_size,
1686 __page_token,
1687 __order_by,
1688 __filter,
1689 Unknown(std::string::String),
1690 }
1691 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1692 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1693 where
1694 D: serde::Deserializer<'de>,
1695 {
1696 struct Visitor;
1697 impl<'de> serde::de::Visitor<'de> for Visitor {
1698 type Value = __FieldTag;
1699 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1700 formatter.write_str("a field name for ListRepositoriesRequest")
1701 }
1702 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1703 where
1704 E: serde::de::Error,
1705 {
1706 use std::result::Result::Ok;
1707 use std::string::ToString;
1708 match value {
1709 "parent" => Ok(__FieldTag::__parent),
1710 "pageSize" => Ok(__FieldTag::__page_size),
1711 "page_size" => Ok(__FieldTag::__page_size),
1712 "pageToken" => Ok(__FieldTag::__page_token),
1713 "page_token" => Ok(__FieldTag::__page_token),
1714 "orderBy" => Ok(__FieldTag::__order_by),
1715 "order_by" => Ok(__FieldTag::__order_by),
1716 "filter" => Ok(__FieldTag::__filter),
1717 _ => Ok(__FieldTag::Unknown(value.to_string())),
1718 }
1719 }
1720 }
1721 deserializer.deserialize_identifier(Visitor)
1722 }
1723 }
1724 struct Visitor;
1725 impl<'de> serde::de::Visitor<'de> for Visitor {
1726 type Value = ListRepositoriesRequest;
1727 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1728 formatter.write_str("struct ListRepositoriesRequest")
1729 }
1730 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1731 where
1732 A: serde::de::MapAccess<'de>,
1733 {
1734 #[allow(unused_imports)]
1735 use serde::de::Error;
1736 use std::option::Option::Some;
1737 let mut fields = std::collections::HashSet::new();
1738 let mut result = Self::Value::new();
1739 while let Some(tag) = map.next_key::<__FieldTag>()? {
1740 #[allow(clippy::match_single_binding)]
1741 match tag {
1742 __FieldTag::__parent => {
1743 if !fields.insert(__FieldTag::__parent) {
1744 return std::result::Result::Err(A::Error::duplicate_field(
1745 "multiple values for parent",
1746 ));
1747 }
1748 result.parent = map
1749 .next_value::<std::option::Option<std::string::String>>()?
1750 .unwrap_or_default();
1751 }
1752 __FieldTag::__page_size => {
1753 if !fields.insert(__FieldTag::__page_size) {
1754 return std::result::Result::Err(A::Error::duplicate_field(
1755 "multiple values for page_size",
1756 ));
1757 }
1758 struct __With(std::option::Option<i32>);
1759 impl<'de> serde::de::Deserialize<'de> for __With {
1760 fn deserialize<D>(
1761 deserializer: D,
1762 ) -> std::result::Result<Self, D::Error>
1763 where
1764 D: serde::de::Deserializer<'de>,
1765 {
1766 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
1767 }
1768 }
1769 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
1770 }
1771 __FieldTag::__page_token => {
1772 if !fields.insert(__FieldTag::__page_token) {
1773 return std::result::Result::Err(A::Error::duplicate_field(
1774 "multiple values for page_token",
1775 ));
1776 }
1777 result.page_token = map
1778 .next_value::<std::option::Option<std::string::String>>()?
1779 .unwrap_or_default();
1780 }
1781 __FieldTag::__order_by => {
1782 if !fields.insert(__FieldTag::__order_by) {
1783 return std::result::Result::Err(A::Error::duplicate_field(
1784 "multiple values for order_by",
1785 ));
1786 }
1787 result.order_by = map
1788 .next_value::<std::option::Option<std::string::String>>()?
1789 .unwrap_or_default();
1790 }
1791 __FieldTag::__filter => {
1792 if !fields.insert(__FieldTag::__filter) {
1793 return std::result::Result::Err(A::Error::duplicate_field(
1794 "multiple values for filter",
1795 ));
1796 }
1797 result.filter = map
1798 .next_value::<std::option::Option<std::string::String>>()?
1799 .unwrap_or_default();
1800 }
1801 __FieldTag::Unknown(key) => {
1802 let value = map.next_value::<serde_json::Value>()?;
1803 result._unknown_fields.insert(key, value);
1804 }
1805 }
1806 }
1807 std::result::Result::Ok(result)
1808 }
1809 }
1810 deserializer.deserialize_any(Visitor)
1811 }
1812}
1813
1814#[doc(hidden)]
1815impl serde::ser::Serialize for ListRepositoriesRequest {
1816 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1817 where
1818 S: serde::ser::Serializer,
1819 {
1820 use serde::ser::SerializeMap;
1821 #[allow(unused_imports)]
1822 use std::option::Option::Some;
1823 let mut state = serializer.serialize_map(std::option::Option::None)?;
1824 if !self.parent.is_empty() {
1825 state.serialize_entry("parent", &self.parent)?;
1826 }
1827 if !wkt::internal::is_default(&self.page_size) {
1828 struct __With<'a>(&'a i32);
1829 impl<'a> serde::ser::Serialize for __With<'a> {
1830 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1831 where
1832 S: serde::ser::Serializer,
1833 {
1834 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
1835 }
1836 }
1837 state.serialize_entry("pageSize", &__With(&self.page_size))?;
1838 }
1839 if !self.page_token.is_empty() {
1840 state.serialize_entry("pageToken", &self.page_token)?;
1841 }
1842 if !self.order_by.is_empty() {
1843 state.serialize_entry("orderBy", &self.order_by)?;
1844 }
1845 if !self.filter.is_empty() {
1846 state.serialize_entry("filter", &self.filter)?;
1847 }
1848 if !self._unknown_fields.is_empty() {
1849 for (key, value) in self._unknown_fields.iter() {
1850 state.serialize_entry(key, &value)?;
1851 }
1852 }
1853 state.end()
1854 }
1855}
1856
1857impl std::fmt::Debug for ListRepositoriesRequest {
1858 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1859 let mut debug_struct = f.debug_struct("ListRepositoriesRequest");
1860 debug_struct.field("parent", &self.parent);
1861 debug_struct.field("page_size", &self.page_size);
1862 debug_struct.field("page_token", &self.page_token);
1863 debug_struct.field("order_by", &self.order_by);
1864 debug_struct.field("filter", &self.filter);
1865 if !self._unknown_fields.is_empty() {
1866 debug_struct.field("_unknown_fields", &self._unknown_fields);
1867 }
1868 debug_struct.finish()
1869 }
1870}
1871
1872#[derive(Clone, Default, PartialEq)]
1874#[non_exhaustive]
1875pub struct ListRepositoriesResponse {
1876 pub repositories: std::vec::Vec<crate::model::Repository>,
1878
1879 pub next_page_token: std::string::String,
1882
1883 pub unreachable: std::vec::Vec<std::string::String>,
1885
1886 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1887}
1888
1889impl ListRepositoriesResponse {
1890 pub fn new() -> Self {
1891 std::default::Default::default()
1892 }
1893
1894 pub fn set_repositories<T, V>(mut self, v: T) -> Self
1896 where
1897 T: std::iter::IntoIterator<Item = V>,
1898 V: std::convert::Into<crate::model::Repository>,
1899 {
1900 use std::iter::Iterator;
1901 self.repositories = v.into_iter().map(|i| i.into()).collect();
1902 self
1903 }
1904
1905 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1907 self.next_page_token = v.into();
1908 self
1909 }
1910
1911 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1913 where
1914 T: std::iter::IntoIterator<Item = V>,
1915 V: std::convert::Into<std::string::String>,
1916 {
1917 use std::iter::Iterator;
1918 self.unreachable = v.into_iter().map(|i| i.into()).collect();
1919 self
1920 }
1921}
1922
1923impl wkt::message::Message for ListRepositoriesResponse {
1924 fn typename() -> &'static str {
1925 "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
1926 }
1927}
1928
1929#[doc(hidden)]
1930impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
1931 type PageItem = crate::model::Repository;
1932
1933 fn items(self) -> std::vec::Vec<Self::PageItem> {
1934 self.repositories
1935 }
1936
1937 fn next_page_token(&self) -> std::string::String {
1938 use std::clone::Clone;
1939 self.next_page_token.clone()
1940 }
1941}
1942
1943#[doc(hidden)]
1944impl<'de> serde::de::Deserialize<'de> for ListRepositoriesResponse {
1945 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1946 where
1947 D: serde::Deserializer<'de>,
1948 {
1949 #[allow(non_camel_case_types)]
1950 #[doc(hidden)]
1951 #[derive(PartialEq, Eq, Hash)]
1952 enum __FieldTag {
1953 __repositories,
1954 __next_page_token,
1955 __unreachable,
1956 Unknown(std::string::String),
1957 }
1958 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
1959 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1960 where
1961 D: serde::Deserializer<'de>,
1962 {
1963 struct Visitor;
1964 impl<'de> serde::de::Visitor<'de> for Visitor {
1965 type Value = __FieldTag;
1966 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1967 formatter.write_str("a field name for ListRepositoriesResponse")
1968 }
1969 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
1970 where
1971 E: serde::de::Error,
1972 {
1973 use std::result::Result::Ok;
1974 use std::string::ToString;
1975 match value {
1976 "repositories" => Ok(__FieldTag::__repositories),
1977 "nextPageToken" => Ok(__FieldTag::__next_page_token),
1978 "next_page_token" => Ok(__FieldTag::__next_page_token),
1979 "unreachable" => Ok(__FieldTag::__unreachable),
1980 _ => Ok(__FieldTag::Unknown(value.to_string())),
1981 }
1982 }
1983 }
1984 deserializer.deserialize_identifier(Visitor)
1985 }
1986 }
1987 struct Visitor;
1988 impl<'de> serde::de::Visitor<'de> for Visitor {
1989 type Value = ListRepositoriesResponse;
1990 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
1991 formatter.write_str("struct ListRepositoriesResponse")
1992 }
1993 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
1994 where
1995 A: serde::de::MapAccess<'de>,
1996 {
1997 #[allow(unused_imports)]
1998 use serde::de::Error;
1999 use std::option::Option::Some;
2000 let mut fields = std::collections::HashSet::new();
2001 let mut result = Self::Value::new();
2002 while let Some(tag) = map.next_key::<__FieldTag>()? {
2003 #[allow(clippy::match_single_binding)]
2004 match tag {
2005 __FieldTag::__repositories => {
2006 if !fields.insert(__FieldTag::__repositories) {
2007 return std::result::Result::Err(A::Error::duplicate_field(
2008 "multiple values for repositories",
2009 ));
2010 }
2011 result.repositories = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Repository>>>()?.unwrap_or_default();
2012 }
2013 __FieldTag::__next_page_token => {
2014 if !fields.insert(__FieldTag::__next_page_token) {
2015 return std::result::Result::Err(A::Error::duplicate_field(
2016 "multiple values for next_page_token",
2017 ));
2018 }
2019 result.next_page_token = map
2020 .next_value::<std::option::Option<std::string::String>>()?
2021 .unwrap_or_default();
2022 }
2023 __FieldTag::__unreachable => {
2024 if !fields.insert(__FieldTag::__unreachable) {
2025 return std::result::Result::Err(A::Error::duplicate_field(
2026 "multiple values for unreachable",
2027 ));
2028 }
2029 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
2030 }
2031 __FieldTag::Unknown(key) => {
2032 let value = map.next_value::<serde_json::Value>()?;
2033 result._unknown_fields.insert(key, value);
2034 }
2035 }
2036 }
2037 std::result::Result::Ok(result)
2038 }
2039 }
2040 deserializer.deserialize_any(Visitor)
2041 }
2042}
2043
2044#[doc(hidden)]
2045impl serde::ser::Serialize for ListRepositoriesResponse {
2046 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2047 where
2048 S: serde::ser::Serializer,
2049 {
2050 use serde::ser::SerializeMap;
2051 #[allow(unused_imports)]
2052 use std::option::Option::Some;
2053 let mut state = serializer.serialize_map(std::option::Option::None)?;
2054 if !self.repositories.is_empty() {
2055 state.serialize_entry("repositories", &self.repositories)?;
2056 }
2057 if !self.next_page_token.is_empty() {
2058 state.serialize_entry("nextPageToken", &self.next_page_token)?;
2059 }
2060 if !self.unreachable.is_empty() {
2061 state.serialize_entry("unreachable", &self.unreachable)?;
2062 }
2063 if !self._unknown_fields.is_empty() {
2064 for (key, value) in self._unknown_fields.iter() {
2065 state.serialize_entry(key, &value)?;
2066 }
2067 }
2068 state.end()
2069 }
2070}
2071
2072impl std::fmt::Debug for ListRepositoriesResponse {
2073 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2074 let mut debug_struct = f.debug_struct("ListRepositoriesResponse");
2075 debug_struct.field("repositories", &self.repositories);
2076 debug_struct.field("next_page_token", &self.next_page_token);
2077 debug_struct.field("unreachable", &self.unreachable);
2078 if !self._unknown_fields.is_empty() {
2079 debug_struct.field("_unknown_fields", &self._unknown_fields);
2080 }
2081 debug_struct.finish()
2082 }
2083}
2084
2085#[derive(Clone, Default, PartialEq)]
2087#[non_exhaustive]
2088pub struct GetRepositoryRequest {
2089 pub name: std::string::String,
2091
2092 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2093}
2094
2095impl GetRepositoryRequest {
2096 pub fn new() -> Self {
2097 std::default::Default::default()
2098 }
2099
2100 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2102 self.name = v.into();
2103 self
2104 }
2105}
2106
2107impl wkt::message::Message for GetRepositoryRequest {
2108 fn typename() -> &'static str {
2109 "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
2110 }
2111}
2112
2113#[doc(hidden)]
2114impl<'de> serde::de::Deserialize<'de> for GetRepositoryRequest {
2115 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2116 where
2117 D: serde::Deserializer<'de>,
2118 {
2119 #[allow(non_camel_case_types)]
2120 #[doc(hidden)]
2121 #[derive(PartialEq, Eq, Hash)]
2122 enum __FieldTag {
2123 __name,
2124 Unknown(std::string::String),
2125 }
2126 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2127 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2128 where
2129 D: serde::Deserializer<'de>,
2130 {
2131 struct Visitor;
2132 impl<'de> serde::de::Visitor<'de> for Visitor {
2133 type Value = __FieldTag;
2134 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2135 formatter.write_str("a field name for GetRepositoryRequest")
2136 }
2137 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2138 where
2139 E: serde::de::Error,
2140 {
2141 use std::result::Result::Ok;
2142 use std::string::ToString;
2143 match value {
2144 "name" => Ok(__FieldTag::__name),
2145 _ => Ok(__FieldTag::Unknown(value.to_string())),
2146 }
2147 }
2148 }
2149 deserializer.deserialize_identifier(Visitor)
2150 }
2151 }
2152 struct Visitor;
2153 impl<'de> serde::de::Visitor<'de> for Visitor {
2154 type Value = GetRepositoryRequest;
2155 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2156 formatter.write_str("struct GetRepositoryRequest")
2157 }
2158 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2159 where
2160 A: serde::de::MapAccess<'de>,
2161 {
2162 #[allow(unused_imports)]
2163 use serde::de::Error;
2164 use std::option::Option::Some;
2165 let mut fields = std::collections::HashSet::new();
2166 let mut result = Self::Value::new();
2167 while let Some(tag) = map.next_key::<__FieldTag>()? {
2168 #[allow(clippy::match_single_binding)]
2169 match tag {
2170 __FieldTag::__name => {
2171 if !fields.insert(__FieldTag::__name) {
2172 return std::result::Result::Err(A::Error::duplicate_field(
2173 "multiple values for name",
2174 ));
2175 }
2176 result.name = map
2177 .next_value::<std::option::Option<std::string::String>>()?
2178 .unwrap_or_default();
2179 }
2180 __FieldTag::Unknown(key) => {
2181 let value = map.next_value::<serde_json::Value>()?;
2182 result._unknown_fields.insert(key, value);
2183 }
2184 }
2185 }
2186 std::result::Result::Ok(result)
2187 }
2188 }
2189 deserializer.deserialize_any(Visitor)
2190 }
2191}
2192
2193#[doc(hidden)]
2194impl serde::ser::Serialize for GetRepositoryRequest {
2195 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2196 where
2197 S: serde::ser::Serializer,
2198 {
2199 use serde::ser::SerializeMap;
2200 #[allow(unused_imports)]
2201 use std::option::Option::Some;
2202 let mut state = serializer.serialize_map(std::option::Option::None)?;
2203 if !self.name.is_empty() {
2204 state.serialize_entry("name", &self.name)?;
2205 }
2206 if !self._unknown_fields.is_empty() {
2207 for (key, value) in self._unknown_fields.iter() {
2208 state.serialize_entry(key, &value)?;
2209 }
2210 }
2211 state.end()
2212 }
2213}
2214
2215impl std::fmt::Debug for GetRepositoryRequest {
2216 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2217 let mut debug_struct = f.debug_struct("GetRepositoryRequest");
2218 debug_struct.field("name", &self.name);
2219 if !self._unknown_fields.is_empty() {
2220 debug_struct.field("_unknown_fields", &self._unknown_fields);
2221 }
2222 debug_struct.finish()
2223 }
2224}
2225
2226#[derive(Clone, Default, PartialEq)]
2228#[non_exhaustive]
2229pub struct CreateRepositoryRequest {
2230 pub parent: std::string::String,
2233
2234 pub repository: std::option::Option<crate::model::Repository>,
2236
2237 pub repository_id: std::string::String,
2240
2241 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2242}
2243
2244impl CreateRepositoryRequest {
2245 pub fn new() -> Self {
2246 std::default::Default::default()
2247 }
2248
2249 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2251 self.parent = v.into();
2252 self
2253 }
2254
2255 pub fn set_repository<T>(mut self, v: T) -> Self
2257 where
2258 T: std::convert::Into<crate::model::Repository>,
2259 {
2260 self.repository = std::option::Option::Some(v.into());
2261 self
2262 }
2263
2264 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
2266 where
2267 T: std::convert::Into<crate::model::Repository>,
2268 {
2269 self.repository = v.map(|x| x.into());
2270 self
2271 }
2272
2273 pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2275 self.repository_id = v.into();
2276 self
2277 }
2278}
2279
2280impl wkt::message::Message for CreateRepositoryRequest {
2281 fn typename() -> &'static str {
2282 "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
2283 }
2284}
2285
2286#[doc(hidden)]
2287impl<'de> serde::de::Deserialize<'de> for CreateRepositoryRequest {
2288 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2289 where
2290 D: serde::Deserializer<'de>,
2291 {
2292 #[allow(non_camel_case_types)]
2293 #[doc(hidden)]
2294 #[derive(PartialEq, Eq, Hash)]
2295 enum __FieldTag {
2296 __parent,
2297 __repository,
2298 __repository_id,
2299 Unknown(std::string::String),
2300 }
2301 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2302 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2303 where
2304 D: serde::Deserializer<'de>,
2305 {
2306 struct Visitor;
2307 impl<'de> serde::de::Visitor<'de> for Visitor {
2308 type Value = __FieldTag;
2309 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2310 formatter.write_str("a field name for CreateRepositoryRequest")
2311 }
2312 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2313 where
2314 E: serde::de::Error,
2315 {
2316 use std::result::Result::Ok;
2317 use std::string::ToString;
2318 match value {
2319 "parent" => Ok(__FieldTag::__parent),
2320 "repository" => Ok(__FieldTag::__repository),
2321 "repositoryId" => Ok(__FieldTag::__repository_id),
2322 "repository_id" => Ok(__FieldTag::__repository_id),
2323 _ => Ok(__FieldTag::Unknown(value.to_string())),
2324 }
2325 }
2326 }
2327 deserializer.deserialize_identifier(Visitor)
2328 }
2329 }
2330 struct Visitor;
2331 impl<'de> serde::de::Visitor<'de> for Visitor {
2332 type Value = CreateRepositoryRequest;
2333 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2334 formatter.write_str("struct CreateRepositoryRequest")
2335 }
2336 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2337 where
2338 A: serde::de::MapAccess<'de>,
2339 {
2340 #[allow(unused_imports)]
2341 use serde::de::Error;
2342 use std::option::Option::Some;
2343 let mut fields = std::collections::HashSet::new();
2344 let mut result = Self::Value::new();
2345 while let Some(tag) = map.next_key::<__FieldTag>()? {
2346 #[allow(clippy::match_single_binding)]
2347 match tag {
2348 __FieldTag::__parent => {
2349 if !fields.insert(__FieldTag::__parent) {
2350 return std::result::Result::Err(A::Error::duplicate_field(
2351 "multiple values for parent",
2352 ));
2353 }
2354 result.parent = map
2355 .next_value::<std::option::Option<std::string::String>>()?
2356 .unwrap_or_default();
2357 }
2358 __FieldTag::__repository => {
2359 if !fields.insert(__FieldTag::__repository) {
2360 return std::result::Result::Err(A::Error::duplicate_field(
2361 "multiple values for repository",
2362 ));
2363 }
2364 result.repository =
2365 map.next_value::<std::option::Option<crate::model::Repository>>()?;
2366 }
2367 __FieldTag::__repository_id => {
2368 if !fields.insert(__FieldTag::__repository_id) {
2369 return std::result::Result::Err(A::Error::duplicate_field(
2370 "multiple values for repository_id",
2371 ));
2372 }
2373 result.repository_id = map
2374 .next_value::<std::option::Option<std::string::String>>()?
2375 .unwrap_or_default();
2376 }
2377 __FieldTag::Unknown(key) => {
2378 let value = map.next_value::<serde_json::Value>()?;
2379 result._unknown_fields.insert(key, value);
2380 }
2381 }
2382 }
2383 std::result::Result::Ok(result)
2384 }
2385 }
2386 deserializer.deserialize_any(Visitor)
2387 }
2388}
2389
2390#[doc(hidden)]
2391impl serde::ser::Serialize for CreateRepositoryRequest {
2392 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2393 where
2394 S: serde::ser::Serializer,
2395 {
2396 use serde::ser::SerializeMap;
2397 #[allow(unused_imports)]
2398 use std::option::Option::Some;
2399 let mut state = serializer.serialize_map(std::option::Option::None)?;
2400 if !self.parent.is_empty() {
2401 state.serialize_entry("parent", &self.parent)?;
2402 }
2403 if self.repository.is_some() {
2404 state.serialize_entry("repository", &self.repository)?;
2405 }
2406 if !self.repository_id.is_empty() {
2407 state.serialize_entry("repositoryId", &self.repository_id)?;
2408 }
2409 if !self._unknown_fields.is_empty() {
2410 for (key, value) in self._unknown_fields.iter() {
2411 state.serialize_entry(key, &value)?;
2412 }
2413 }
2414 state.end()
2415 }
2416}
2417
2418impl std::fmt::Debug for CreateRepositoryRequest {
2419 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2420 let mut debug_struct = f.debug_struct("CreateRepositoryRequest");
2421 debug_struct.field("parent", &self.parent);
2422 debug_struct.field("repository", &self.repository);
2423 debug_struct.field("repository_id", &self.repository_id);
2424 if !self._unknown_fields.is_empty() {
2425 debug_struct.field("_unknown_fields", &self._unknown_fields);
2426 }
2427 debug_struct.finish()
2428 }
2429}
2430
2431#[derive(Clone, Default, PartialEq)]
2433#[non_exhaustive]
2434pub struct UpdateRepositoryRequest {
2435 pub update_mask: std::option::Option<wkt::FieldMask>,
2438
2439 pub repository: std::option::Option<crate::model::Repository>,
2441
2442 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2443}
2444
2445impl UpdateRepositoryRequest {
2446 pub fn new() -> Self {
2447 std::default::Default::default()
2448 }
2449
2450 pub fn set_update_mask<T>(mut self, v: T) -> Self
2452 where
2453 T: std::convert::Into<wkt::FieldMask>,
2454 {
2455 self.update_mask = std::option::Option::Some(v.into());
2456 self
2457 }
2458
2459 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2461 where
2462 T: std::convert::Into<wkt::FieldMask>,
2463 {
2464 self.update_mask = v.map(|x| x.into());
2465 self
2466 }
2467
2468 pub fn set_repository<T>(mut self, v: T) -> Self
2470 where
2471 T: std::convert::Into<crate::model::Repository>,
2472 {
2473 self.repository = std::option::Option::Some(v.into());
2474 self
2475 }
2476
2477 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
2479 where
2480 T: std::convert::Into<crate::model::Repository>,
2481 {
2482 self.repository = v.map(|x| x.into());
2483 self
2484 }
2485}
2486
2487impl wkt::message::Message for UpdateRepositoryRequest {
2488 fn typename() -> &'static str {
2489 "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
2490 }
2491}
2492
2493#[doc(hidden)]
2494impl<'de> serde::de::Deserialize<'de> for UpdateRepositoryRequest {
2495 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2496 where
2497 D: serde::Deserializer<'de>,
2498 {
2499 #[allow(non_camel_case_types)]
2500 #[doc(hidden)]
2501 #[derive(PartialEq, Eq, Hash)]
2502 enum __FieldTag {
2503 __update_mask,
2504 __repository,
2505 Unknown(std::string::String),
2506 }
2507 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2508 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2509 where
2510 D: serde::Deserializer<'de>,
2511 {
2512 struct Visitor;
2513 impl<'de> serde::de::Visitor<'de> for Visitor {
2514 type Value = __FieldTag;
2515 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2516 formatter.write_str("a field name for UpdateRepositoryRequest")
2517 }
2518 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2519 where
2520 E: serde::de::Error,
2521 {
2522 use std::result::Result::Ok;
2523 use std::string::ToString;
2524 match value {
2525 "updateMask" => Ok(__FieldTag::__update_mask),
2526 "update_mask" => Ok(__FieldTag::__update_mask),
2527 "repository" => Ok(__FieldTag::__repository),
2528 _ => Ok(__FieldTag::Unknown(value.to_string())),
2529 }
2530 }
2531 }
2532 deserializer.deserialize_identifier(Visitor)
2533 }
2534 }
2535 struct Visitor;
2536 impl<'de> serde::de::Visitor<'de> for Visitor {
2537 type Value = UpdateRepositoryRequest;
2538 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2539 formatter.write_str("struct UpdateRepositoryRequest")
2540 }
2541 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2542 where
2543 A: serde::de::MapAccess<'de>,
2544 {
2545 #[allow(unused_imports)]
2546 use serde::de::Error;
2547 use std::option::Option::Some;
2548 let mut fields = std::collections::HashSet::new();
2549 let mut result = Self::Value::new();
2550 while let Some(tag) = map.next_key::<__FieldTag>()? {
2551 #[allow(clippy::match_single_binding)]
2552 match tag {
2553 __FieldTag::__update_mask => {
2554 if !fields.insert(__FieldTag::__update_mask) {
2555 return std::result::Result::Err(A::Error::duplicate_field(
2556 "multiple values for update_mask",
2557 ));
2558 }
2559 result.update_mask =
2560 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
2561 }
2562 __FieldTag::__repository => {
2563 if !fields.insert(__FieldTag::__repository) {
2564 return std::result::Result::Err(A::Error::duplicate_field(
2565 "multiple values for repository",
2566 ));
2567 }
2568 result.repository =
2569 map.next_value::<std::option::Option<crate::model::Repository>>()?;
2570 }
2571 __FieldTag::Unknown(key) => {
2572 let value = map.next_value::<serde_json::Value>()?;
2573 result._unknown_fields.insert(key, value);
2574 }
2575 }
2576 }
2577 std::result::Result::Ok(result)
2578 }
2579 }
2580 deserializer.deserialize_any(Visitor)
2581 }
2582}
2583
2584#[doc(hidden)]
2585impl serde::ser::Serialize for UpdateRepositoryRequest {
2586 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2587 where
2588 S: serde::ser::Serializer,
2589 {
2590 use serde::ser::SerializeMap;
2591 #[allow(unused_imports)]
2592 use std::option::Option::Some;
2593 let mut state = serializer.serialize_map(std::option::Option::None)?;
2594 if self.update_mask.is_some() {
2595 state.serialize_entry("updateMask", &self.update_mask)?;
2596 }
2597 if self.repository.is_some() {
2598 state.serialize_entry("repository", &self.repository)?;
2599 }
2600 if !self._unknown_fields.is_empty() {
2601 for (key, value) in self._unknown_fields.iter() {
2602 state.serialize_entry(key, &value)?;
2603 }
2604 }
2605 state.end()
2606 }
2607}
2608
2609impl std::fmt::Debug for UpdateRepositoryRequest {
2610 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2611 let mut debug_struct = f.debug_struct("UpdateRepositoryRequest");
2612 debug_struct.field("update_mask", &self.update_mask);
2613 debug_struct.field("repository", &self.repository);
2614 if !self._unknown_fields.is_empty() {
2615 debug_struct.field("_unknown_fields", &self._unknown_fields);
2616 }
2617 debug_struct.finish()
2618 }
2619}
2620
2621#[derive(Clone, Default, PartialEq)]
2623#[non_exhaustive]
2624pub struct DeleteRepositoryRequest {
2625 pub name: std::string::String,
2627
2628 pub force: bool,
2632
2633 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2634}
2635
2636impl DeleteRepositoryRequest {
2637 pub fn new() -> Self {
2638 std::default::Default::default()
2639 }
2640
2641 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2643 self.name = v.into();
2644 self
2645 }
2646
2647 pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2649 self.force = v.into();
2650 self
2651 }
2652}
2653
2654impl wkt::message::Message for DeleteRepositoryRequest {
2655 fn typename() -> &'static str {
2656 "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
2657 }
2658}
2659
2660#[doc(hidden)]
2661impl<'de> serde::de::Deserialize<'de> for DeleteRepositoryRequest {
2662 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2663 where
2664 D: serde::Deserializer<'de>,
2665 {
2666 #[allow(non_camel_case_types)]
2667 #[doc(hidden)]
2668 #[derive(PartialEq, Eq, Hash)]
2669 enum __FieldTag {
2670 __name,
2671 __force,
2672 Unknown(std::string::String),
2673 }
2674 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2675 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2676 where
2677 D: serde::Deserializer<'de>,
2678 {
2679 struct Visitor;
2680 impl<'de> serde::de::Visitor<'de> for Visitor {
2681 type Value = __FieldTag;
2682 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2683 formatter.write_str("a field name for DeleteRepositoryRequest")
2684 }
2685 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2686 where
2687 E: serde::de::Error,
2688 {
2689 use std::result::Result::Ok;
2690 use std::string::ToString;
2691 match value {
2692 "name" => Ok(__FieldTag::__name),
2693 "force" => Ok(__FieldTag::__force),
2694 _ => Ok(__FieldTag::Unknown(value.to_string())),
2695 }
2696 }
2697 }
2698 deserializer.deserialize_identifier(Visitor)
2699 }
2700 }
2701 struct Visitor;
2702 impl<'de> serde::de::Visitor<'de> for Visitor {
2703 type Value = DeleteRepositoryRequest;
2704 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2705 formatter.write_str("struct DeleteRepositoryRequest")
2706 }
2707 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2708 where
2709 A: serde::de::MapAccess<'de>,
2710 {
2711 #[allow(unused_imports)]
2712 use serde::de::Error;
2713 use std::option::Option::Some;
2714 let mut fields = std::collections::HashSet::new();
2715 let mut result = Self::Value::new();
2716 while let Some(tag) = map.next_key::<__FieldTag>()? {
2717 #[allow(clippy::match_single_binding)]
2718 match tag {
2719 __FieldTag::__name => {
2720 if !fields.insert(__FieldTag::__name) {
2721 return std::result::Result::Err(A::Error::duplicate_field(
2722 "multiple values for name",
2723 ));
2724 }
2725 result.name = map
2726 .next_value::<std::option::Option<std::string::String>>()?
2727 .unwrap_or_default();
2728 }
2729 __FieldTag::__force => {
2730 if !fields.insert(__FieldTag::__force) {
2731 return std::result::Result::Err(A::Error::duplicate_field(
2732 "multiple values for force",
2733 ));
2734 }
2735 result.force = map
2736 .next_value::<std::option::Option<bool>>()?
2737 .unwrap_or_default();
2738 }
2739 __FieldTag::Unknown(key) => {
2740 let value = map.next_value::<serde_json::Value>()?;
2741 result._unknown_fields.insert(key, value);
2742 }
2743 }
2744 }
2745 std::result::Result::Ok(result)
2746 }
2747 }
2748 deserializer.deserialize_any(Visitor)
2749 }
2750}
2751
2752#[doc(hidden)]
2753impl serde::ser::Serialize for DeleteRepositoryRequest {
2754 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2755 where
2756 S: serde::ser::Serializer,
2757 {
2758 use serde::ser::SerializeMap;
2759 #[allow(unused_imports)]
2760 use std::option::Option::Some;
2761 let mut state = serializer.serialize_map(std::option::Option::None)?;
2762 if !self.name.is_empty() {
2763 state.serialize_entry("name", &self.name)?;
2764 }
2765 if !wkt::internal::is_default(&self.force) {
2766 state.serialize_entry("force", &self.force)?;
2767 }
2768 if !self._unknown_fields.is_empty() {
2769 for (key, value) in self._unknown_fields.iter() {
2770 state.serialize_entry(key, &value)?;
2771 }
2772 }
2773 state.end()
2774 }
2775}
2776
2777impl std::fmt::Debug for DeleteRepositoryRequest {
2778 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2779 let mut debug_struct = f.debug_struct("DeleteRepositoryRequest");
2780 debug_struct.field("name", &self.name);
2781 debug_struct.field("force", &self.force);
2782 if !self._unknown_fields.is_empty() {
2783 debug_struct.field("_unknown_fields", &self._unknown_fields);
2784 }
2785 debug_struct.finish()
2786 }
2787}
2788
2789#[derive(Clone, Default, PartialEq)]
2791#[non_exhaustive]
2792pub struct CommitRepositoryChangesRequest {
2793 pub name: std::string::String,
2795
2796 pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
2798
2799 pub required_head_commit_sha: std::string::String,
2803
2804 pub file_operations: std::collections::HashMap<
2807 std::string::String,
2808 crate::model::commit_repository_changes_request::FileOperation,
2809 >,
2810
2811 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2812}
2813
2814impl CommitRepositoryChangesRequest {
2815 pub fn new() -> Self {
2816 std::default::Default::default()
2817 }
2818
2819 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2821 self.name = v.into();
2822 self
2823 }
2824
2825 pub fn set_commit_metadata<T>(mut self, v: T) -> Self
2827 where
2828 T: std::convert::Into<crate::model::CommitMetadata>,
2829 {
2830 self.commit_metadata = std::option::Option::Some(v.into());
2831 self
2832 }
2833
2834 pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2836 where
2837 T: std::convert::Into<crate::model::CommitMetadata>,
2838 {
2839 self.commit_metadata = v.map(|x| x.into());
2840 self
2841 }
2842
2843 pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
2845 mut self,
2846 v: T,
2847 ) -> Self {
2848 self.required_head_commit_sha = v.into();
2849 self
2850 }
2851
2852 pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
2854 where
2855 T: std::iter::IntoIterator<Item = (K, V)>,
2856 K: std::convert::Into<std::string::String>,
2857 V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
2858 {
2859 use std::iter::Iterator;
2860 self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2861 self
2862 }
2863}
2864
2865impl wkt::message::Message for CommitRepositoryChangesRequest {
2866 fn typename() -> &'static str {
2867 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
2868 }
2869}
2870
2871#[doc(hidden)]
2872impl<'de> serde::de::Deserialize<'de> for CommitRepositoryChangesRequest {
2873 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2874 where
2875 D: serde::Deserializer<'de>,
2876 {
2877 #[allow(non_camel_case_types)]
2878 #[doc(hidden)]
2879 #[derive(PartialEq, Eq, Hash)]
2880 enum __FieldTag {
2881 __name,
2882 __commit_metadata,
2883 __required_head_commit_sha,
2884 __file_operations,
2885 Unknown(std::string::String),
2886 }
2887 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
2888 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2889 where
2890 D: serde::Deserializer<'de>,
2891 {
2892 struct Visitor;
2893 impl<'de> serde::de::Visitor<'de> for Visitor {
2894 type Value = __FieldTag;
2895 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2896 formatter.write_str("a field name for CommitRepositoryChangesRequest")
2897 }
2898 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
2899 where
2900 E: serde::de::Error,
2901 {
2902 use std::result::Result::Ok;
2903 use std::string::ToString;
2904 match value {
2905 "name" => Ok(__FieldTag::__name),
2906 "commitMetadata" => Ok(__FieldTag::__commit_metadata),
2907 "commit_metadata" => Ok(__FieldTag::__commit_metadata),
2908 "requiredHeadCommitSha" => Ok(__FieldTag::__required_head_commit_sha),
2909 "required_head_commit_sha" => {
2910 Ok(__FieldTag::__required_head_commit_sha)
2911 }
2912 "fileOperations" => Ok(__FieldTag::__file_operations),
2913 "file_operations" => Ok(__FieldTag::__file_operations),
2914 _ => Ok(__FieldTag::Unknown(value.to_string())),
2915 }
2916 }
2917 }
2918 deserializer.deserialize_identifier(Visitor)
2919 }
2920 }
2921 struct Visitor;
2922 impl<'de> serde::de::Visitor<'de> for Visitor {
2923 type Value = CommitRepositoryChangesRequest;
2924 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
2925 formatter.write_str("struct CommitRepositoryChangesRequest")
2926 }
2927 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
2928 where
2929 A: serde::de::MapAccess<'de>,
2930 {
2931 #[allow(unused_imports)]
2932 use serde::de::Error;
2933 use std::option::Option::Some;
2934 let mut fields = std::collections::HashSet::new();
2935 let mut result = Self::Value::new();
2936 while let Some(tag) = map.next_key::<__FieldTag>()? {
2937 #[allow(clippy::match_single_binding)]
2938 match tag {
2939 __FieldTag::__name => {
2940 if !fields.insert(__FieldTag::__name) {
2941 return std::result::Result::Err(A::Error::duplicate_field(
2942 "multiple values for name",
2943 ));
2944 }
2945 result.name = map
2946 .next_value::<std::option::Option<std::string::String>>()?
2947 .unwrap_or_default();
2948 }
2949 __FieldTag::__commit_metadata => {
2950 if !fields.insert(__FieldTag::__commit_metadata) {
2951 return std::result::Result::Err(A::Error::duplicate_field(
2952 "multiple values for commit_metadata",
2953 ));
2954 }
2955 result.commit_metadata = map
2956 .next_value::<std::option::Option<crate::model::CommitMetadata>>(
2957 )?;
2958 }
2959 __FieldTag::__required_head_commit_sha => {
2960 if !fields.insert(__FieldTag::__required_head_commit_sha) {
2961 return std::result::Result::Err(A::Error::duplicate_field(
2962 "multiple values for required_head_commit_sha",
2963 ));
2964 }
2965 result.required_head_commit_sha = map
2966 .next_value::<std::option::Option<std::string::String>>()?
2967 .unwrap_or_default();
2968 }
2969 __FieldTag::__file_operations => {
2970 if !fields.insert(__FieldTag::__file_operations) {
2971 return std::result::Result::Err(A::Error::duplicate_field(
2972 "multiple values for file_operations",
2973 ));
2974 }
2975 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();
2976 }
2977 __FieldTag::Unknown(key) => {
2978 let value = map.next_value::<serde_json::Value>()?;
2979 result._unknown_fields.insert(key, value);
2980 }
2981 }
2982 }
2983 std::result::Result::Ok(result)
2984 }
2985 }
2986 deserializer.deserialize_any(Visitor)
2987 }
2988}
2989
2990#[doc(hidden)]
2991impl serde::ser::Serialize for CommitRepositoryChangesRequest {
2992 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2993 where
2994 S: serde::ser::Serializer,
2995 {
2996 use serde::ser::SerializeMap;
2997 #[allow(unused_imports)]
2998 use std::option::Option::Some;
2999 let mut state = serializer.serialize_map(std::option::Option::None)?;
3000 if !self.name.is_empty() {
3001 state.serialize_entry("name", &self.name)?;
3002 }
3003 if self.commit_metadata.is_some() {
3004 state.serialize_entry("commitMetadata", &self.commit_metadata)?;
3005 }
3006 if !self.required_head_commit_sha.is_empty() {
3007 state.serialize_entry("requiredHeadCommitSha", &self.required_head_commit_sha)?;
3008 }
3009 if !self.file_operations.is_empty() {
3010 state.serialize_entry("fileOperations", &self.file_operations)?;
3011 }
3012 if !self._unknown_fields.is_empty() {
3013 for (key, value) in self._unknown_fields.iter() {
3014 state.serialize_entry(key, &value)?;
3015 }
3016 }
3017 state.end()
3018 }
3019}
3020
3021impl std::fmt::Debug for CommitRepositoryChangesRequest {
3022 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3023 let mut debug_struct = f.debug_struct("CommitRepositoryChangesRequest");
3024 debug_struct.field("name", &self.name);
3025 debug_struct.field("commit_metadata", &self.commit_metadata);
3026 debug_struct.field("required_head_commit_sha", &self.required_head_commit_sha);
3027 debug_struct.field("file_operations", &self.file_operations);
3028 if !self._unknown_fields.is_empty() {
3029 debug_struct.field("_unknown_fields", &self._unknown_fields);
3030 }
3031 debug_struct.finish()
3032 }
3033}
3034
3035pub mod commit_repository_changes_request {
3037 #[allow(unused_imports)]
3038 use super::*;
3039
3040 #[derive(Clone, Default, PartialEq)]
3042 #[non_exhaustive]
3043 pub struct FileOperation {
3044 pub operation: std::option::Option<
3046 crate::model::commit_repository_changes_request::file_operation::Operation,
3047 >,
3048
3049 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3050 }
3051
3052 impl FileOperation {
3053 pub fn new() -> Self {
3054 std::default::Default::default()
3055 }
3056
3057 pub fn set_operation<
3062 T: std::convert::Into<
3063 std::option::Option<
3064 crate::model::commit_repository_changes_request::file_operation::Operation,
3065 >,
3066 >,
3067 >(
3068 mut self,
3069 v: T,
3070 ) -> Self {
3071 self.operation = v.into();
3072 self
3073 }
3074
3075 pub fn write_file(
3079 &self,
3080 ) -> std::option::Option<
3081 &std::boxed::Box<
3082 crate::model::commit_repository_changes_request::file_operation::WriteFile,
3083 >,
3084 > {
3085 #[allow(unreachable_patterns)]
3086 self.operation.as_ref().and_then(|v| match v {
3087 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
3088 _ => std::option::Option::None,
3089 })
3090 }
3091
3092 pub fn set_write_file<
3098 T: std::convert::Into<
3099 std::boxed::Box<
3100 crate::model::commit_repository_changes_request::file_operation::WriteFile,
3101 >,
3102 >,
3103 >(
3104 mut self,
3105 v: T,
3106 ) -> Self {
3107 self.operation = std::option::Option::Some(
3108 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
3109 v.into()
3110 )
3111 );
3112 self
3113 }
3114
3115 pub fn delete_file(
3119 &self,
3120 ) -> std::option::Option<
3121 &std::boxed::Box<
3122 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
3123 >,
3124 > {
3125 #[allow(unreachable_patterns)]
3126 self.operation.as_ref().and_then(|v| match v {
3127 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
3128 _ => std::option::Option::None,
3129 })
3130 }
3131
3132 pub fn set_delete_file<
3138 T: std::convert::Into<
3139 std::boxed::Box<
3140 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
3141 >,
3142 >,
3143 >(
3144 mut self,
3145 v: T,
3146 ) -> Self {
3147 self.operation = std::option::Option::Some(
3148 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
3149 v.into()
3150 )
3151 );
3152 self
3153 }
3154 }
3155
3156 impl wkt::message::Message for FileOperation {
3157 fn typename() -> &'static str {
3158 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
3159 }
3160 }
3161
3162 #[doc(hidden)]
3163 impl<'de> serde::de::Deserialize<'de> for FileOperation {
3164 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3165 where
3166 D: serde::Deserializer<'de>,
3167 {
3168 #[allow(non_camel_case_types)]
3169 #[doc(hidden)]
3170 #[derive(PartialEq, Eq, Hash)]
3171 enum __FieldTag {
3172 __write_file,
3173 __delete_file,
3174 Unknown(std::string::String),
3175 }
3176 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3177 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3178 where
3179 D: serde::Deserializer<'de>,
3180 {
3181 struct Visitor;
3182 impl<'de> serde::de::Visitor<'de> for Visitor {
3183 type Value = __FieldTag;
3184 fn expecting(
3185 &self,
3186 formatter: &mut std::fmt::Formatter,
3187 ) -> std::fmt::Result {
3188 formatter.write_str("a field name for FileOperation")
3189 }
3190 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3191 where
3192 E: serde::de::Error,
3193 {
3194 use std::result::Result::Ok;
3195 use std::string::ToString;
3196 match value {
3197 "writeFile" => Ok(__FieldTag::__write_file),
3198 "write_file" => Ok(__FieldTag::__write_file),
3199 "deleteFile" => Ok(__FieldTag::__delete_file),
3200 "delete_file" => Ok(__FieldTag::__delete_file),
3201 _ => Ok(__FieldTag::Unknown(value.to_string())),
3202 }
3203 }
3204 }
3205 deserializer.deserialize_identifier(Visitor)
3206 }
3207 }
3208 struct Visitor;
3209 impl<'de> serde::de::Visitor<'de> for Visitor {
3210 type Value = FileOperation;
3211 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3212 formatter.write_str("struct FileOperation")
3213 }
3214 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3215 where
3216 A: serde::de::MapAccess<'de>,
3217 {
3218 #[allow(unused_imports)]
3219 use serde::de::Error;
3220 use std::option::Option::Some;
3221 let mut fields = std::collections::HashSet::new();
3222 let mut result = Self::Value::new();
3223 while let Some(tag) = map.next_key::<__FieldTag>()? {
3224 #[allow(clippy::match_single_binding)]
3225 match tag {
3226 __FieldTag::__write_file => {
3227 if !fields.insert(__FieldTag::__write_file) {
3228 return std::result::Result::Err(A::Error::duplicate_field(
3229 "multiple values for write_file",
3230 ));
3231 }
3232 if result.operation.is_some() {
3233 return std::result::Result::Err(A::Error::duplicate_field(
3234 "multiple values for `operation`, a oneof with full ID .google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.write_file, latest field was writeFile",
3235 ));
3236 }
3237 result.operation = std::option::Option::Some(
3238 crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
3239 map.next_value::<std::option::Option<std::boxed::Box<crate::model::commit_repository_changes_request::file_operation::WriteFile>>>()?.unwrap_or_default()
3240 ),
3241 );
3242 }
3243 __FieldTag::__delete_file => {
3244 if !fields.insert(__FieldTag::__delete_file) {
3245 return std::result::Result::Err(A::Error::duplicate_field(
3246 "multiple values for delete_file",
3247 ));
3248 }
3249 if result.operation.is_some() {
3250 return std::result::Result::Err(A::Error::duplicate_field(
3251 "multiple values for `operation`, a oneof with full ID .google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.delete_file, latest field was deleteFile",
3252 ));
3253 }
3254 result.operation = std::option::Option::Some(
3255 crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
3256 map.next_value::<std::option::Option<std::boxed::Box<crate::model::commit_repository_changes_request::file_operation::DeleteFile>>>()?.unwrap_or_default()
3257 ),
3258 );
3259 }
3260 __FieldTag::Unknown(key) => {
3261 let value = map.next_value::<serde_json::Value>()?;
3262 result._unknown_fields.insert(key, value);
3263 }
3264 }
3265 }
3266 std::result::Result::Ok(result)
3267 }
3268 }
3269 deserializer.deserialize_any(Visitor)
3270 }
3271 }
3272
3273 #[doc(hidden)]
3274 impl serde::ser::Serialize for FileOperation {
3275 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3276 where
3277 S: serde::ser::Serializer,
3278 {
3279 use serde::ser::SerializeMap;
3280 #[allow(unused_imports)]
3281 use std::option::Option::Some;
3282 let mut state = serializer.serialize_map(std::option::Option::None)?;
3283 if let Some(value) = self.write_file() {
3284 state.serialize_entry("writeFile", value)?;
3285 }
3286 if let Some(value) = self.delete_file() {
3287 state.serialize_entry("deleteFile", value)?;
3288 }
3289 if !self._unknown_fields.is_empty() {
3290 for (key, value) in self._unknown_fields.iter() {
3291 state.serialize_entry(key, &value)?;
3292 }
3293 }
3294 state.end()
3295 }
3296 }
3297
3298 impl std::fmt::Debug for FileOperation {
3299 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3300 let mut debug_struct = f.debug_struct("FileOperation");
3301 debug_struct.field("operation", &self.operation);
3302 if !self._unknown_fields.is_empty() {
3303 debug_struct.field("_unknown_fields", &self._unknown_fields);
3304 }
3305 debug_struct.finish()
3306 }
3307 }
3308
3309 pub mod file_operation {
3311 #[allow(unused_imports)]
3312 use super::*;
3313
3314 #[derive(Clone, Default, PartialEq)]
3316 #[non_exhaustive]
3317 pub struct WriteFile {
3318 pub contents: ::bytes::Bytes,
3320
3321 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3322 }
3323
3324 impl WriteFile {
3325 pub fn new() -> Self {
3326 std::default::Default::default()
3327 }
3328
3329 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3331 self.contents = v.into();
3332 self
3333 }
3334 }
3335
3336 impl wkt::message::Message for WriteFile {
3337 fn typename() -> &'static str {
3338 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
3339 }
3340 }
3341
3342 #[doc(hidden)]
3343 impl<'de> serde::de::Deserialize<'de> for WriteFile {
3344 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3345 where
3346 D: serde::Deserializer<'de>,
3347 {
3348 #[allow(non_camel_case_types)]
3349 #[doc(hidden)]
3350 #[derive(PartialEq, Eq, Hash)]
3351 enum __FieldTag {
3352 __contents,
3353 Unknown(std::string::String),
3354 }
3355 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3356 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3357 where
3358 D: serde::Deserializer<'de>,
3359 {
3360 struct Visitor;
3361 impl<'de> serde::de::Visitor<'de> for Visitor {
3362 type Value = __FieldTag;
3363 fn expecting(
3364 &self,
3365 formatter: &mut std::fmt::Formatter,
3366 ) -> std::fmt::Result {
3367 formatter.write_str("a field name for WriteFile")
3368 }
3369 fn visit_str<E>(
3370 self,
3371 value: &str,
3372 ) -> std::result::Result<Self::Value, E>
3373 where
3374 E: serde::de::Error,
3375 {
3376 use std::result::Result::Ok;
3377 use std::string::ToString;
3378 match value {
3379 "contents" => Ok(__FieldTag::__contents),
3380 _ => Ok(__FieldTag::Unknown(value.to_string())),
3381 }
3382 }
3383 }
3384 deserializer.deserialize_identifier(Visitor)
3385 }
3386 }
3387 struct Visitor;
3388 impl<'de> serde::de::Visitor<'de> for Visitor {
3389 type Value = WriteFile;
3390 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3391 formatter.write_str("struct WriteFile")
3392 }
3393 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3394 where
3395 A: serde::de::MapAccess<'de>,
3396 {
3397 #[allow(unused_imports)]
3398 use serde::de::Error;
3399 use std::option::Option::Some;
3400 let mut fields = std::collections::HashSet::new();
3401 let mut result = Self::Value::new();
3402 while let Some(tag) = map.next_key::<__FieldTag>()? {
3403 #[allow(clippy::match_single_binding)]
3404 match tag {
3405 __FieldTag::__contents => {
3406 if !fields.insert(__FieldTag::__contents) {
3407 return std::result::Result::Err(
3408 A::Error::duplicate_field(
3409 "multiple values for contents",
3410 ),
3411 );
3412 }
3413 struct __With(std::option::Option<::bytes::Bytes>);
3414 impl<'de> serde::de::Deserialize<'de> for __With {
3415 fn deserialize<D>(
3416 deserializer: D,
3417 ) -> std::result::Result<Self, D::Error>
3418 where
3419 D: serde::de::Deserializer<'de>,
3420 {
3421 serde_with::As::<
3422 std::option::Option<serde_with::base64::Base64>,
3423 >::deserialize(
3424 deserializer
3425 )
3426 .map(__With)
3427 }
3428 }
3429 result.contents =
3430 map.next_value::<__With>()?.0.unwrap_or_default();
3431 }
3432 __FieldTag::Unknown(key) => {
3433 let value = map.next_value::<serde_json::Value>()?;
3434 result._unknown_fields.insert(key, value);
3435 }
3436 }
3437 }
3438 std::result::Result::Ok(result)
3439 }
3440 }
3441 deserializer.deserialize_any(Visitor)
3442 }
3443 }
3444
3445 #[doc(hidden)]
3446 impl serde::ser::Serialize for WriteFile {
3447 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3448 where
3449 S: serde::ser::Serializer,
3450 {
3451 use serde::ser::SerializeMap;
3452 #[allow(unused_imports)]
3453 use std::option::Option::Some;
3454 let mut state = serializer.serialize_map(std::option::Option::None)?;
3455 if !self.contents.is_empty() {
3456 struct __With<'a>(&'a ::bytes::Bytes);
3457 impl<'a> serde::ser::Serialize for __With<'a> {
3458 fn serialize<S>(
3459 &self,
3460 serializer: S,
3461 ) -> std::result::Result<S::Ok, S::Error>
3462 where
3463 S: serde::ser::Serializer,
3464 {
3465 serde_with::As::<serde_with::base64::Base64>::serialize(
3466 self.0, serializer,
3467 )
3468 }
3469 }
3470 state.serialize_entry("contents", &__With(&self.contents))?;
3471 }
3472 if !self._unknown_fields.is_empty() {
3473 for (key, value) in self._unknown_fields.iter() {
3474 state.serialize_entry(key, &value)?;
3475 }
3476 }
3477 state.end()
3478 }
3479 }
3480
3481 impl std::fmt::Debug for WriteFile {
3482 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3483 let mut debug_struct = f.debug_struct("WriteFile");
3484 debug_struct.field("contents", &self.contents);
3485 if !self._unknown_fields.is_empty() {
3486 debug_struct.field("_unknown_fields", &self._unknown_fields);
3487 }
3488 debug_struct.finish()
3489 }
3490 }
3491
3492 #[derive(Clone, Default, PartialEq)]
3494 #[non_exhaustive]
3495 pub struct DeleteFile {
3496 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3497 }
3498
3499 impl DeleteFile {
3500 pub fn new() -> Self {
3501 std::default::Default::default()
3502 }
3503 }
3504
3505 impl wkt::message::Message for DeleteFile {
3506 fn typename() -> &'static str {
3507 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
3508 }
3509 }
3510
3511 #[doc(hidden)]
3512 impl<'de> serde::de::Deserialize<'de> for DeleteFile {
3513 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3514 where
3515 D: serde::Deserializer<'de>,
3516 {
3517 #[allow(non_camel_case_types)]
3518 #[doc(hidden)]
3519 #[derive(PartialEq, Eq, Hash)]
3520 enum __FieldTag {
3521 Unknown(std::string::String),
3522 }
3523 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3524 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3525 where
3526 D: serde::Deserializer<'de>,
3527 {
3528 struct Visitor;
3529 impl<'de> serde::de::Visitor<'de> for Visitor {
3530 type Value = __FieldTag;
3531 fn expecting(
3532 &self,
3533 formatter: &mut std::fmt::Formatter,
3534 ) -> std::fmt::Result {
3535 formatter.write_str("a field name for DeleteFile")
3536 }
3537 fn visit_str<E>(
3538 self,
3539 value: &str,
3540 ) -> std::result::Result<Self::Value, E>
3541 where
3542 E: serde::de::Error,
3543 {
3544 use std::result::Result::Ok;
3545 use std::string::ToString;
3546 Ok(__FieldTag::Unknown(value.to_string()))
3547 }
3548 }
3549 deserializer.deserialize_identifier(Visitor)
3550 }
3551 }
3552 struct Visitor;
3553 impl<'de> serde::de::Visitor<'de> for Visitor {
3554 type Value = DeleteFile;
3555 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3556 formatter.write_str("struct DeleteFile")
3557 }
3558 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3559 where
3560 A: serde::de::MapAccess<'de>,
3561 {
3562 #[allow(unused_imports)]
3563 use serde::de::Error;
3564 use std::option::Option::Some;
3565 let mut result = Self::Value::new();
3566 while let Some(tag) = map.next_key::<__FieldTag>()? {
3567 #[allow(clippy::match_single_binding)]
3568 match tag {
3569 __FieldTag::Unknown(key) => {
3570 let value = map.next_value::<serde_json::Value>()?;
3571 result._unknown_fields.insert(key, value);
3572 }
3573 }
3574 }
3575 std::result::Result::Ok(result)
3576 }
3577 }
3578 deserializer.deserialize_any(Visitor)
3579 }
3580 }
3581
3582 #[doc(hidden)]
3583 impl serde::ser::Serialize for DeleteFile {
3584 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3585 where
3586 S: serde::ser::Serializer,
3587 {
3588 use serde::ser::SerializeMap;
3589 #[allow(unused_imports)]
3590 use std::option::Option::Some;
3591 let mut state = serializer.serialize_map(std::option::Option::None)?;
3592 if !self._unknown_fields.is_empty() {
3593 for (key, value) in self._unknown_fields.iter() {
3594 state.serialize_entry(key, &value)?;
3595 }
3596 }
3597 state.end()
3598 }
3599 }
3600
3601 impl std::fmt::Debug for DeleteFile {
3602 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3603 let mut debug_struct = f.debug_struct("DeleteFile");
3604 if !self._unknown_fields.is_empty() {
3605 debug_struct.field("_unknown_fields", &self._unknown_fields);
3606 }
3607 debug_struct.finish()
3608 }
3609 }
3610
3611 #[derive(Clone, Debug, PartialEq)]
3613 #[non_exhaustive]
3614 pub enum Operation {
3615 WriteFile(
3617 std::boxed::Box<
3618 crate::model::commit_repository_changes_request::file_operation::WriteFile,
3619 >,
3620 ),
3621 DeleteFile(
3623 std::boxed::Box<
3624 crate::model::commit_repository_changes_request::file_operation::DeleteFile,
3625 >,
3626 ),
3627 }
3628 }
3629}
3630
3631#[derive(Clone, Default, PartialEq)]
3633#[non_exhaustive]
3634pub struct CommitRepositoryChangesResponse {
3635 pub commit_sha: std::string::String,
3637
3638 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3639}
3640
3641impl CommitRepositoryChangesResponse {
3642 pub fn new() -> Self {
3643 std::default::Default::default()
3644 }
3645
3646 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3648 self.commit_sha = v.into();
3649 self
3650 }
3651}
3652
3653impl wkt::message::Message for CommitRepositoryChangesResponse {
3654 fn typename() -> &'static str {
3655 "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
3656 }
3657}
3658
3659#[doc(hidden)]
3660impl<'de> serde::de::Deserialize<'de> for CommitRepositoryChangesResponse {
3661 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3662 where
3663 D: serde::Deserializer<'de>,
3664 {
3665 #[allow(non_camel_case_types)]
3666 #[doc(hidden)]
3667 #[derive(PartialEq, Eq, Hash)]
3668 enum __FieldTag {
3669 __commit_sha,
3670 Unknown(std::string::String),
3671 }
3672 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3673 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3674 where
3675 D: serde::Deserializer<'de>,
3676 {
3677 struct Visitor;
3678 impl<'de> serde::de::Visitor<'de> for Visitor {
3679 type Value = __FieldTag;
3680 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3681 formatter.write_str("a field name for CommitRepositoryChangesResponse")
3682 }
3683 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3684 where
3685 E: serde::de::Error,
3686 {
3687 use std::result::Result::Ok;
3688 use std::string::ToString;
3689 match value {
3690 "commitSha" => Ok(__FieldTag::__commit_sha),
3691 "commit_sha" => Ok(__FieldTag::__commit_sha),
3692 _ => Ok(__FieldTag::Unknown(value.to_string())),
3693 }
3694 }
3695 }
3696 deserializer.deserialize_identifier(Visitor)
3697 }
3698 }
3699 struct Visitor;
3700 impl<'de> serde::de::Visitor<'de> for Visitor {
3701 type Value = CommitRepositoryChangesResponse;
3702 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3703 formatter.write_str("struct CommitRepositoryChangesResponse")
3704 }
3705 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3706 where
3707 A: serde::de::MapAccess<'de>,
3708 {
3709 #[allow(unused_imports)]
3710 use serde::de::Error;
3711 use std::option::Option::Some;
3712 let mut fields = std::collections::HashSet::new();
3713 let mut result = Self::Value::new();
3714 while let Some(tag) = map.next_key::<__FieldTag>()? {
3715 #[allow(clippy::match_single_binding)]
3716 match tag {
3717 __FieldTag::__commit_sha => {
3718 if !fields.insert(__FieldTag::__commit_sha) {
3719 return std::result::Result::Err(A::Error::duplicate_field(
3720 "multiple values for commit_sha",
3721 ));
3722 }
3723 result.commit_sha = map
3724 .next_value::<std::option::Option<std::string::String>>()?
3725 .unwrap_or_default();
3726 }
3727 __FieldTag::Unknown(key) => {
3728 let value = map.next_value::<serde_json::Value>()?;
3729 result._unknown_fields.insert(key, value);
3730 }
3731 }
3732 }
3733 std::result::Result::Ok(result)
3734 }
3735 }
3736 deserializer.deserialize_any(Visitor)
3737 }
3738}
3739
3740#[doc(hidden)]
3741impl serde::ser::Serialize for CommitRepositoryChangesResponse {
3742 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3743 where
3744 S: serde::ser::Serializer,
3745 {
3746 use serde::ser::SerializeMap;
3747 #[allow(unused_imports)]
3748 use std::option::Option::Some;
3749 let mut state = serializer.serialize_map(std::option::Option::None)?;
3750 if !self.commit_sha.is_empty() {
3751 state.serialize_entry("commitSha", &self.commit_sha)?;
3752 }
3753 if !self._unknown_fields.is_empty() {
3754 for (key, value) in self._unknown_fields.iter() {
3755 state.serialize_entry(key, &value)?;
3756 }
3757 }
3758 state.end()
3759 }
3760}
3761
3762impl std::fmt::Debug for CommitRepositoryChangesResponse {
3763 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3764 let mut debug_struct = f.debug_struct("CommitRepositoryChangesResponse");
3765 debug_struct.field("commit_sha", &self.commit_sha);
3766 if !self._unknown_fields.is_empty() {
3767 debug_struct.field("_unknown_fields", &self._unknown_fields);
3768 }
3769 debug_struct.finish()
3770 }
3771}
3772
3773#[derive(Clone, Default, PartialEq)]
3775#[non_exhaustive]
3776pub struct ReadRepositoryFileRequest {
3777 pub name: std::string::String,
3779
3780 pub commit_sha: std::string::String,
3783
3784 pub path: std::string::String,
3786
3787 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3788}
3789
3790impl ReadRepositoryFileRequest {
3791 pub fn new() -> Self {
3792 std::default::Default::default()
3793 }
3794
3795 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3797 self.name = v.into();
3798 self
3799 }
3800
3801 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3803 self.commit_sha = v.into();
3804 self
3805 }
3806
3807 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3809 self.path = v.into();
3810 self
3811 }
3812}
3813
3814impl wkt::message::Message for ReadRepositoryFileRequest {
3815 fn typename() -> &'static str {
3816 "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
3817 }
3818}
3819
3820#[doc(hidden)]
3821impl<'de> serde::de::Deserialize<'de> for ReadRepositoryFileRequest {
3822 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3823 where
3824 D: serde::Deserializer<'de>,
3825 {
3826 #[allow(non_camel_case_types)]
3827 #[doc(hidden)]
3828 #[derive(PartialEq, Eq, Hash)]
3829 enum __FieldTag {
3830 __name,
3831 __commit_sha,
3832 __path,
3833 Unknown(std::string::String),
3834 }
3835 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
3836 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3837 where
3838 D: serde::Deserializer<'de>,
3839 {
3840 struct Visitor;
3841 impl<'de> serde::de::Visitor<'de> for Visitor {
3842 type Value = __FieldTag;
3843 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3844 formatter.write_str("a field name for ReadRepositoryFileRequest")
3845 }
3846 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
3847 where
3848 E: serde::de::Error,
3849 {
3850 use std::result::Result::Ok;
3851 use std::string::ToString;
3852 match value {
3853 "name" => Ok(__FieldTag::__name),
3854 "commitSha" => Ok(__FieldTag::__commit_sha),
3855 "commit_sha" => Ok(__FieldTag::__commit_sha),
3856 "path" => Ok(__FieldTag::__path),
3857 _ => Ok(__FieldTag::Unknown(value.to_string())),
3858 }
3859 }
3860 }
3861 deserializer.deserialize_identifier(Visitor)
3862 }
3863 }
3864 struct Visitor;
3865 impl<'de> serde::de::Visitor<'de> for Visitor {
3866 type Value = ReadRepositoryFileRequest;
3867 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
3868 formatter.write_str("struct ReadRepositoryFileRequest")
3869 }
3870 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
3871 where
3872 A: serde::de::MapAccess<'de>,
3873 {
3874 #[allow(unused_imports)]
3875 use serde::de::Error;
3876 use std::option::Option::Some;
3877 let mut fields = std::collections::HashSet::new();
3878 let mut result = Self::Value::new();
3879 while let Some(tag) = map.next_key::<__FieldTag>()? {
3880 #[allow(clippy::match_single_binding)]
3881 match tag {
3882 __FieldTag::__name => {
3883 if !fields.insert(__FieldTag::__name) {
3884 return std::result::Result::Err(A::Error::duplicate_field(
3885 "multiple values for name",
3886 ));
3887 }
3888 result.name = map
3889 .next_value::<std::option::Option<std::string::String>>()?
3890 .unwrap_or_default();
3891 }
3892 __FieldTag::__commit_sha => {
3893 if !fields.insert(__FieldTag::__commit_sha) {
3894 return std::result::Result::Err(A::Error::duplicate_field(
3895 "multiple values for commit_sha",
3896 ));
3897 }
3898 result.commit_sha = map
3899 .next_value::<std::option::Option<std::string::String>>()?
3900 .unwrap_or_default();
3901 }
3902 __FieldTag::__path => {
3903 if !fields.insert(__FieldTag::__path) {
3904 return std::result::Result::Err(A::Error::duplicate_field(
3905 "multiple values for path",
3906 ));
3907 }
3908 result.path = map
3909 .next_value::<std::option::Option<std::string::String>>()?
3910 .unwrap_or_default();
3911 }
3912 __FieldTag::Unknown(key) => {
3913 let value = map.next_value::<serde_json::Value>()?;
3914 result._unknown_fields.insert(key, value);
3915 }
3916 }
3917 }
3918 std::result::Result::Ok(result)
3919 }
3920 }
3921 deserializer.deserialize_any(Visitor)
3922 }
3923}
3924
3925#[doc(hidden)]
3926impl serde::ser::Serialize for ReadRepositoryFileRequest {
3927 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3928 where
3929 S: serde::ser::Serializer,
3930 {
3931 use serde::ser::SerializeMap;
3932 #[allow(unused_imports)]
3933 use std::option::Option::Some;
3934 let mut state = serializer.serialize_map(std::option::Option::None)?;
3935 if !self.name.is_empty() {
3936 state.serialize_entry("name", &self.name)?;
3937 }
3938 if !self.commit_sha.is_empty() {
3939 state.serialize_entry("commitSha", &self.commit_sha)?;
3940 }
3941 if !self.path.is_empty() {
3942 state.serialize_entry("path", &self.path)?;
3943 }
3944 if !self._unknown_fields.is_empty() {
3945 for (key, value) in self._unknown_fields.iter() {
3946 state.serialize_entry(key, &value)?;
3947 }
3948 }
3949 state.end()
3950 }
3951}
3952
3953impl std::fmt::Debug for ReadRepositoryFileRequest {
3954 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3955 let mut debug_struct = f.debug_struct("ReadRepositoryFileRequest");
3956 debug_struct.field("name", &self.name);
3957 debug_struct.field("commit_sha", &self.commit_sha);
3958 debug_struct.field("path", &self.path);
3959 if !self._unknown_fields.is_empty() {
3960 debug_struct.field("_unknown_fields", &self._unknown_fields);
3961 }
3962 debug_struct.finish()
3963 }
3964}
3965
3966#[derive(Clone, Default, PartialEq)]
3968#[non_exhaustive]
3969pub struct ReadRepositoryFileResponse {
3970 pub contents: ::bytes::Bytes,
3972
3973 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3974}
3975
3976impl ReadRepositoryFileResponse {
3977 pub fn new() -> Self {
3978 std::default::Default::default()
3979 }
3980
3981 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3983 self.contents = v.into();
3984 self
3985 }
3986}
3987
3988impl wkt::message::Message for ReadRepositoryFileResponse {
3989 fn typename() -> &'static str {
3990 "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
3991 }
3992}
3993
3994#[doc(hidden)]
3995impl<'de> serde::de::Deserialize<'de> for ReadRepositoryFileResponse {
3996 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3997 where
3998 D: serde::Deserializer<'de>,
3999 {
4000 #[allow(non_camel_case_types)]
4001 #[doc(hidden)]
4002 #[derive(PartialEq, Eq, Hash)]
4003 enum __FieldTag {
4004 __contents,
4005 Unknown(std::string::String),
4006 }
4007 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4008 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4009 where
4010 D: serde::Deserializer<'de>,
4011 {
4012 struct Visitor;
4013 impl<'de> serde::de::Visitor<'de> for Visitor {
4014 type Value = __FieldTag;
4015 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4016 formatter.write_str("a field name for ReadRepositoryFileResponse")
4017 }
4018 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4019 where
4020 E: serde::de::Error,
4021 {
4022 use std::result::Result::Ok;
4023 use std::string::ToString;
4024 match value {
4025 "contents" => Ok(__FieldTag::__contents),
4026 _ => Ok(__FieldTag::Unknown(value.to_string())),
4027 }
4028 }
4029 }
4030 deserializer.deserialize_identifier(Visitor)
4031 }
4032 }
4033 struct Visitor;
4034 impl<'de> serde::de::Visitor<'de> for Visitor {
4035 type Value = ReadRepositoryFileResponse;
4036 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4037 formatter.write_str("struct ReadRepositoryFileResponse")
4038 }
4039 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4040 where
4041 A: serde::de::MapAccess<'de>,
4042 {
4043 #[allow(unused_imports)]
4044 use serde::de::Error;
4045 use std::option::Option::Some;
4046 let mut fields = std::collections::HashSet::new();
4047 let mut result = Self::Value::new();
4048 while let Some(tag) = map.next_key::<__FieldTag>()? {
4049 #[allow(clippy::match_single_binding)]
4050 match tag {
4051 __FieldTag::__contents => {
4052 if !fields.insert(__FieldTag::__contents) {
4053 return std::result::Result::Err(A::Error::duplicate_field(
4054 "multiple values for contents",
4055 ));
4056 }
4057 struct __With(std::option::Option<::bytes::Bytes>);
4058 impl<'de> serde::de::Deserialize<'de> for __With {
4059 fn deserialize<D>(
4060 deserializer: D,
4061 ) -> std::result::Result<Self, D::Error>
4062 where
4063 D: serde::de::Deserializer<'de>,
4064 {
4065 serde_with::As::< std::option::Option<serde_with::base64::Base64> >::deserialize(deserializer).map(__With)
4066 }
4067 }
4068 result.contents = map.next_value::<__With>()?.0.unwrap_or_default();
4069 }
4070 __FieldTag::Unknown(key) => {
4071 let value = map.next_value::<serde_json::Value>()?;
4072 result._unknown_fields.insert(key, value);
4073 }
4074 }
4075 }
4076 std::result::Result::Ok(result)
4077 }
4078 }
4079 deserializer.deserialize_any(Visitor)
4080 }
4081}
4082
4083#[doc(hidden)]
4084impl serde::ser::Serialize for ReadRepositoryFileResponse {
4085 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4086 where
4087 S: serde::ser::Serializer,
4088 {
4089 use serde::ser::SerializeMap;
4090 #[allow(unused_imports)]
4091 use std::option::Option::Some;
4092 let mut state = serializer.serialize_map(std::option::Option::None)?;
4093 if !self.contents.is_empty() {
4094 struct __With<'a>(&'a ::bytes::Bytes);
4095 impl<'a> serde::ser::Serialize for __With<'a> {
4096 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4097 where
4098 S: serde::ser::Serializer,
4099 {
4100 serde_with::As::<serde_with::base64::Base64>::serialize(self.0, serializer)
4101 }
4102 }
4103 state.serialize_entry("contents", &__With(&self.contents))?;
4104 }
4105 if !self._unknown_fields.is_empty() {
4106 for (key, value) in self._unknown_fields.iter() {
4107 state.serialize_entry(key, &value)?;
4108 }
4109 }
4110 state.end()
4111 }
4112}
4113
4114impl std::fmt::Debug for ReadRepositoryFileResponse {
4115 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4116 let mut debug_struct = f.debug_struct("ReadRepositoryFileResponse");
4117 debug_struct.field("contents", &self.contents);
4118 if !self._unknown_fields.is_empty() {
4119 debug_struct.field("_unknown_fields", &self._unknown_fields);
4120 }
4121 debug_struct.finish()
4122 }
4123}
4124
4125#[derive(Clone, Default, PartialEq)]
4127#[non_exhaustive]
4128pub struct QueryRepositoryDirectoryContentsRequest {
4129 pub name: std::string::String,
4131
4132 pub commit_sha: std::string::String,
4135
4136 pub path: std::string::String,
4139
4140 pub page_size: i32,
4144
4145 pub page_token: std::string::String,
4153
4154 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4155}
4156
4157impl QueryRepositoryDirectoryContentsRequest {
4158 pub fn new() -> Self {
4159 std::default::Default::default()
4160 }
4161
4162 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4164 self.name = v.into();
4165 self
4166 }
4167
4168 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4170 self.commit_sha = v.into();
4171 self
4172 }
4173
4174 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4176 self.path = v.into();
4177 self
4178 }
4179
4180 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4182 self.page_size = v.into();
4183 self
4184 }
4185
4186 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4188 self.page_token = v.into();
4189 self
4190 }
4191}
4192
4193impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
4194 fn typename() -> &'static str {
4195 "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
4196 }
4197}
4198
4199#[doc(hidden)]
4200impl<'de> serde::de::Deserialize<'de> for QueryRepositoryDirectoryContentsRequest {
4201 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4202 where
4203 D: serde::Deserializer<'de>,
4204 {
4205 #[allow(non_camel_case_types)]
4206 #[doc(hidden)]
4207 #[derive(PartialEq, Eq, Hash)]
4208 enum __FieldTag {
4209 __name,
4210 __commit_sha,
4211 __path,
4212 __page_size,
4213 __page_token,
4214 Unknown(std::string::String),
4215 }
4216 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4217 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4218 where
4219 D: serde::Deserializer<'de>,
4220 {
4221 struct Visitor;
4222 impl<'de> serde::de::Visitor<'de> for Visitor {
4223 type Value = __FieldTag;
4224 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4225 formatter
4226 .write_str("a field name for QueryRepositoryDirectoryContentsRequest")
4227 }
4228 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4229 where
4230 E: serde::de::Error,
4231 {
4232 use std::result::Result::Ok;
4233 use std::string::ToString;
4234 match value {
4235 "name" => Ok(__FieldTag::__name),
4236 "commitSha" => Ok(__FieldTag::__commit_sha),
4237 "commit_sha" => Ok(__FieldTag::__commit_sha),
4238 "path" => Ok(__FieldTag::__path),
4239 "pageSize" => Ok(__FieldTag::__page_size),
4240 "page_size" => Ok(__FieldTag::__page_size),
4241 "pageToken" => Ok(__FieldTag::__page_token),
4242 "page_token" => Ok(__FieldTag::__page_token),
4243 _ => Ok(__FieldTag::Unknown(value.to_string())),
4244 }
4245 }
4246 }
4247 deserializer.deserialize_identifier(Visitor)
4248 }
4249 }
4250 struct Visitor;
4251 impl<'de> serde::de::Visitor<'de> for Visitor {
4252 type Value = QueryRepositoryDirectoryContentsRequest;
4253 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4254 formatter.write_str("struct QueryRepositoryDirectoryContentsRequest")
4255 }
4256 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4257 where
4258 A: serde::de::MapAccess<'de>,
4259 {
4260 #[allow(unused_imports)]
4261 use serde::de::Error;
4262 use std::option::Option::Some;
4263 let mut fields = std::collections::HashSet::new();
4264 let mut result = Self::Value::new();
4265 while let Some(tag) = map.next_key::<__FieldTag>()? {
4266 #[allow(clippy::match_single_binding)]
4267 match tag {
4268 __FieldTag::__name => {
4269 if !fields.insert(__FieldTag::__name) {
4270 return std::result::Result::Err(A::Error::duplicate_field(
4271 "multiple values for name",
4272 ));
4273 }
4274 result.name = map
4275 .next_value::<std::option::Option<std::string::String>>()?
4276 .unwrap_or_default();
4277 }
4278 __FieldTag::__commit_sha => {
4279 if !fields.insert(__FieldTag::__commit_sha) {
4280 return std::result::Result::Err(A::Error::duplicate_field(
4281 "multiple values for commit_sha",
4282 ));
4283 }
4284 result.commit_sha = map
4285 .next_value::<std::option::Option<std::string::String>>()?
4286 .unwrap_or_default();
4287 }
4288 __FieldTag::__path => {
4289 if !fields.insert(__FieldTag::__path) {
4290 return std::result::Result::Err(A::Error::duplicate_field(
4291 "multiple values for path",
4292 ));
4293 }
4294 result.path = map
4295 .next_value::<std::option::Option<std::string::String>>()?
4296 .unwrap_or_default();
4297 }
4298 __FieldTag::__page_size => {
4299 if !fields.insert(__FieldTag::__page_size) {
4300 return std::result::Result::Err(A::Error::duplicate_field(
4301 "multiple values for page_size",
4302 ));
4303 }
4304 struct __With(std::option::Option<i32>);
4305 impl<'de> serde::de::Deserialize<'de> for __With {
4306 fn deserialize<D>(
4307 deserializer: D,
4308 ) -> std::result::Result<Self, D::Error>
4309 where
4310 D: serde::de::Deserializer<'de>,
4311 {
4312 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
4313 }
4314 }
4315 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
4316 }
4317 __FieldTag::__page_token => {
4318 if !fields.insert(__FieldTag::__page_token) {
4319 return std::result::Result::Err(A::Error::duplicate_field(
4320 "multiple values for page_token",
4321 ));
4322 }
4323 result.page_token = map
4324 .next_value::<std::option::Option<std::string::String>>()?
4325 .unwrap_or_default();
4326 }
4327 __FieldTag::Unknown(key) => {
4328 let value = map.next_value::<serde_json::Value>()?;
4329 result._unknown_fields.insert(key, value);
4330 }
4331 }
4332 }
4333 std::result::Result::Ok(result)
4334 }
4335 }
4336 deserializer.deserialize_any(Visitor)
4337 }
4338}
4339
4340#[doc(hidden)]
4341impl serde::ser::Serialize for QueryRepositoryDirectoryContentsRequest {
4342 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4343 where
4344 S: serde::ser::Serializer,
4345 {
4346 use serde::ser::SerializeMap;
4347 #[allow(unused_imports)]
4348 use std::option::Option::Some;
4349 let mut state = serializer.serialize_map(std::option::Option::None)?;
4350 if !self.name.is_empty() {
4351 state.serialize_entry("name", &self.name)?;
4352 }
4353 if !self.commit_sha.is_empty() {
4354 state.serialize_entry("commitSha", &self.commit_sha)?;
4355 }
4356 if !self.path.is_empty() {
4357 state.serialize_entry("path", &self.path)?;
4358 }
4359 if !wkt::internal::is_default(&self.page_size) {
4360 struct __With<'a>(&'a i32);
4361 impl<'a> serde::ser::Serialize for __With<'a> {
4362 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4363 where
4364 S: serde::ser::Serializer,
4365 {
4366 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
4367 }
4368 }
4369 state.serialize_entry("pageSize", &__With(&self.page_size))?;
4370 }
4371 if !self.page_token.is_empty() {
4372 state.serialize_entry("pageToken", &self.page_token)?;
4373 }
4374 if !self._unknown_fields.is_empty() {
4375 for (key, value) in self._unknown_fields.iter() {
4376 state.serialize_entry(key, &value)?;
4377 }
4378 }
4379 state.end()
4380 }
4381}
4382
4383impl std::fmt::Debug for QueryRepositoryDirectoryContentsRequest {
4384 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4385 let mut debug_struct = f.debug_struct("QueryRepositoryDirectoryContentsRequest");
4386 debug_struct.field("name", &self.name);
4387 debug_struct.field("commit_sha", &self.commit_sha);
4388 debug_struct.field("path", &self.path);
4389 debug_struct.field("page_size", &self.page_size);
4390 debug_struct.field("page_token", &self.page_token);
4391 if !self._unknown_fields.is_empty() {
4392 debug_struct.field("_unknown_fields", &self._unknown_fields);
4393 }
4394 debug_struct.finish()
4395 }
4396}
4397
4398#[derive(Clone, Default, PartialEq)]
4400#[non_exhaustive]
4401pub struct QueryRepositoryDirectoryContentsResponse {
4402 pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
4404
4405 pub next_page_token: std::string::String,
4408
4409 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4410}
4411
4412impl QueryRepositoryDirectoryContentsResponse {
4413 pub fn new() -> Self {
4414 std::default::Default::default()
4415 }
4416
4417 pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
4419 where
4420 T: std::iter::IntoIterator<Item = V>,
4421 V: std::convert::Into<crate::model::DirectoryEntry>,
4422 {
4423 use std::iter::Iterator;
4424 self.directory_entries = v.into_iter().map(|i| i.into()).collect();
4425 self
4426 }
4427
4428 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4430 self.next_page_token = v.into();
4431 self
4432 }
4433}
4434
4435impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
4436 fn typename() -> &'static str {
4437 "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
4438 }
4439}
4440
4441#[doc(hidden)]
4442impl gax::paginator::internal::PageableResponse for QueryRepositoryDirectoryContentsResponse {
4443 type PageItem = crate::model::DirectoryEntry;
4444
4445 fn items(self) -> std::vec::Vec<Self::PageItem> {
4446 self.directory_entries
4447 }
4448
4449 fn next_page_token(&self) -> std::string::String {
4450 use std::clone::Clone;
4451 self.next_page_token.clone()
4452 }
4453}
4454
4455#[doc(hidden)]
4456impl<'de> serde::de::Deserialize<'de> for QueryRepositoryDirectoryContentsResponse {
4457 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4458 where
4459 D: serde::Deserializer<'de>,
4460 {
4461 #[allow(non_camel_case_types)]
4462 #[doc(hidden)]
4463 #[derive(PartialEq, Eq, Hash)]
4464 enum __FieldTag {
4465 __directory_entries,
4466 __next_page_token,
4467 Unknown(std::string::String),
4468 }
4469 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4470 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4471 where
4472 D: serde::Deserializer<'de>,
4473 {
4474 struct Visitor;
4475 impl<'de> serde::de::Visitor<'de> for Visitor {
4476 type Value = __FieldTag;
4477 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4478 formatter
4479 .write_str("a field name for QueryRepositoryDirectoryContentsResponse")
4480 }
4481 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4482 where
4483 E: serde::de::Error,
4484 {
4485 use std::result::Result::Ok;
4486 use std::string::ToString;
4487 match value {
4488 "directoryEntries" => Ok(__FieldTag::__directory_entries),
4489 "directory_entries" => Ok(__FieldTag::__directory_entries),
4490 "nextPageToken" => Ok(__FieldTag::__next_page_token),
4491 "next_page_token" => Ok(__FieldTag::__next_page_token),
4492 _ => Ok(__FieldTag::Unknown(value.to_string())),
4493 }
4494 }
4495 }
4496 deserializer.deserialize_identifier(Visitor)
4497 }
4498 }
4499 struct Visitor;
4500 impl<'de> serde::de::Visitor<'de> for Visitor {
4501 type Value = QueryRepositoryDirectoryContentsResponse;
4502 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4503 formatter.write_str("struct QueryRepositoryDirectoryContentsResponse")
4504 }
4505 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4506 where
4507 A: serde::de::MapAccess<'de>,
4508 {
4509 #[allow(unused_imports)]
4510 use serde::de::Error;
4511 use std::option::Option::Some;
4512 let mut fields = std::collections::HashSet::new();
4513 let mut result = Self::Value::new();
4514 while let Some(tag) = map.next_key::<__FieldTag>()? {
4515 #[allow(clippy::match_single_binding)]
4516 match tag {
4517 __FieldTag::__directory_entries => {
4518 if !fields.insert(__FieldTag::__directory_entries) {
4519 return std::result::Result::Err(A::Error::duplicate_field(
4520 "multiple values for directory_entries",
4521 ));
4522 }
4523 result.directory_entries =
4524 map.next_value::<std::option::Option<
4525 std::vec::Vec<crate::model::DirectoryEntry>,
4526 >>()?
4527 .unwrap_or_default();
4528 }
4529 __FieldTag::__next_page_token => {
4530 if !fields.insert(__FieldTag::__next_page_token) {
4531 return std::result::Result::Err(A::Error::duplicate_field(
4532 "multiple values for next_page_token",
4533 ));
4534 }
4535 result.next_page_token = map
4536 .next_value::<std::option::Option<std::string::String>>()?
4537 .unwrap_or_default();
4538 }
4539 __FieldTag::Unknown(key) => {
4540 let value = map.next_value::<serde_json::Value>()?;
4541 result._unknown_fields.insert(key, value);
4542 }
4543 }
4544 }
4545 std::result::Result::Ok(result)
4546 }
4547 }
4548 deserializer.deserialize_any(Visitor)
4549 }
4550}
4551
4552#[doc(hidden)]
4553impl serde::ser::Serialize for QueryRepositoryDirectoryContentsResponse {
4554 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4555 where
4556 S: serde::ser::Serializer,
4557 {
4558 use serde::ser::SerializeMap;
4559 #[allow(unused_imports)]
4560 use std::option::Option::Some;
4561 let mut state = serializer.serialize_map(std::option::Option::None)?;
4562 if !self.directory_entries.is_empty() {
4563 state.serialize_entry("directoryEntries", &self.directory_entries)?;
4564 }
4565 if !self.next_page_token.is_empty() {
4566 state.serialize_entry("nextPageToken", &self.next_page_token)?;
4567 }
4568 if !self._unknown_fields.is_empty() {
4569 for (key, value) in self._unknown_fields.iter() {
4570 state.serialize_entry(key, &value)?;
4571 }
4572 }
4573 state.end()
4574 }
4575}
4576
4577impl std::fmt::Debug for QueryRepositoryDirectoryContentsResponse {
4578 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4579 let mut debug_struct = f.debug_struct("QueryRepositoryDirectoryContentsResponse");
4580 debug_struct.field("directory_entries", &self.directory_entries);
4581 debug_struct.field("next_page_token", &self.next_page_token);
4582 if !self._unknown_fields.is_empty() {
4583 debug_struct.field("_unknown_fields", &self._unknown_fields);
4584 }
4585 debug_struct.finish()
4586 }
4587}
4588
4589#[derive(Clone, Default, PartialEq)]
4591#[non_exhaustive]
4592pub struct FetchRepositoryHistoryRequest {
4593 pub name: std::string::String,
4595
4596 pub page_size: i32,
4600
4601 pub page_token: std::string::String,
4608
4609 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4610}
4611
4612impl FetchRepositoryHistoryRequest {
4613 pub fn new() -> Self {
4614 std::default::Default::default()
4615 }
4616
4617 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4619 self.name = v.into();
4620 self
4621 }
4622
4623 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4625 self.page_size = v.into();
4626 self
4627 }
4628
4629 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4631 self.page_token = v.into();
4632 self
4633 }
4634}
4635
4636impl wkt::message::Message for FetchRepositoryHistoryRequest {
4637 fn typename() -> &'static str {
4638 "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
4639 }
4640}
4641
4642#[doc(hidden)]
4643impl<'de> serde::de::Deserialize<'de> for FetchRepositoryHistoryRequest {
4644 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4645 where
4646 D: serde::Deserializer<'de>,
4647 {
4648 #[allow(non_camel_case_types)]
4649 #[doc(hidden)]
4650 #[derive(PartialEq, Eq, Hash)]
4651 enum __FieldTag {
4652 __name,
4653 __page_size,
4654 __page_token,
4655 Unknown(std::string::String),
4656 }
4657 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4658 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4659 where
4660 D: serde::Deserializer<'de>,
4661 {
4662 struct Visitor;
4663 impl<'de> serde::de::Visitor<'de> for Visitor {
4664 type Value = __FieldTag;
4665 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4666 formatter.write_str("a field name for FetchRepositoryHistoryRequest")
4667 }
4668 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4669 where
4670 E: serde::de::Error,
4671 {
4672 use std::result::Result::Ok;
4673 use std::string::ToString;
4674 match value {
4675 "name" => Ok(__FieldTag::__name),
4676 "pageSize" => Ok(__FieldTag::__page_size),
4677 "page_size" => Ok(__FieldTag::__page_size),
4678 "pageToken" => Ok(__FieldTag::__page_token),
4679 "page_token" => Ok(__FieldTag::__page_token),
4680 _ => Ok(__FieldTag::Unknown(value.to_string())),
4681 }
4682 }
4683 }
4684 deserializer.deserialize_identifier(Visitor)
4685 }
4686 }
4687 struct Visitor;
4688 impl<'de> serde::de::Visitor<'de> for Visitor {
4689 type Value = FetchRepositoryHistoryRequest;
4690 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4691 formatter.write_str("struct FetchRepositoryHistoryRequest")
4692 }
4693 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4694 where
4695 A: serde::de::MapAccess<'de>,
4696 {
4697 #[allow(unused_imports)]
4698 use serde::de::Error;
4699 use std::option::Option::Some;
4700 let mut fields = std::collections::HashSet::new();
4701 let mut result = Self::Value::new();
4702 while let Some(tag) = map.next_key::<__FieldTag>()? {
4703 #[allow(clippy::match_single_binding)]
4704 match tag {
4705 __FieldTag::__name => {
4706 if !fields.insert(__FieldTag::__name) {
4707 return std::result::Result::Err(A::Error::duplicate_field(
4708 "multiple values for name",
4709 ));
4710 }
4711 result.name = map
4712 .next_value::<std::option::Option<std::string::String>>()?
4713 .unwrap_or_default();
4714 }
4715 __FieldTag::__page_size => {
4716 if !fields.insert(__FieldTag::__page_size) {
4717 return std::result::Result::Err(A::Error::duplicate_field(
4718 "multiple values for page_size",
4719 ));
4720 }
4721 struct __With(std::option::Option<i32>);
4722 impl<'de> serde::de::Deserialize<'de> for __With {
4723 fn deserialize<D>(
4724 deserializer: D,
4725 ) -> std::result::Result<Self, D::Error>
4726 where
4727 D: serde::de::Deserializer<'de>,
4728 {
4729 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
4730 }
4731 }
4732 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
4733 }
4734 __FieldTag::__page_token => {
4735 if !fields.insert(__FieldTag::__page_token) {
4736 return std::result::Result::Err(A::Error::duplicate_field(
4737 "multiple values for page_token",
4738 ));
4739 }
4740 result.page_token = map
4741 .next_value::<std::option::Option<std::string::String>>()?
4742 .unwrap_or_default();
4743 }
4744 __FieldTag::Unknown(key) => {
4745 let value = map.next_value::<serde_json::Value>()?;
4746 result._unknown_fields.insert(key, value);
4747 }
4748 }
4749 }
4750 std::result::Result::Ok(result)
4751 }
4752 }
4753 deserializer.deserialize_any(Visitor)
4754 }
4755}
4756
4757#[doc(hidden)]
4758impl serde::ser::Serialize for FetchRepositoryHistoryRequest {
4759 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4760 where
4761 S: serde::ser::Serializer,
4762 {
4763 use serde::ser::SerializeMap;
4764 #[allow(unused_imports)]
4765 use std::option::Option::Some;
4766 let mut state = serializer.serialize_map(std::option::Option::None)?;
4767 if !self.name.is_empty() {
4768 state.serialize_entry("name", &self.name)?;
4769 }
4770 if !wkt::internal::is_default(&self.page_size) {
4771 struct __With<'a>(&'a i32);
4772 impl<'a> serde::ser::Serialize for __With<'a> {
4773 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4774 where
4775 S: serde::ser::Serializer,
4776 {
4777 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
4778 }
4779 }
4780 state.serialize_entry("pageSize", &__With(&self.page_size))?;
4781 }
4782 if !self.page_token.is_empty() {
4783 state.serialize_entry("pageToken", &self.page_token)?;
4784 }
4785 if !self._unknown_fields.is_empty() {
4786 for (key, value) in self._unknown_fields.iter() {
4787 state.serialize_entry(key, &value)?;
4788 }
4789 }
4790 state.end()
4791 }
4792}
4793
4794impl std::fmt::Debug for FetchRepositoryHistoryRequest {
4795 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4796 let mut debug_struct = f.debug_struct("FetchRepositoryHistoryRequest");
4797 debug_struct.field("name", &self.name);
4798 debug_struct.field("page_size", &self.page_size);
4799 debug_struct.field("page_token", &self.page_token);
4800 if !self._unknown_fields.is_empty() {
4801 debug_struct.field("_unknown_fields", &self._unknown_fields);
4802 }
4803 debug_struct.finish()
4804 }
4805}
4806
4807#[derive(Clone, Default, PartialEq)]
4809#[non_exhaustive]
4810pub struct FetchRepositoryHistoryResponse {
4811 pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
4813
4814 pub next_page_token: std::string::String,
4817
4818 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4819}
4820
4821impl FetchRepositoryHistoryResponse {
4822 pub fn new() -> Self {
4823 std::default::Default::default()
4824 }
4825
4826 pub fn set_commits<T, V>(mut self, v: T) -> Self
4828 where
4829 T: std::iter::IntoIterator<Item = V>,
4830 V: std::convert::Into<crate::model::CommitLogEntry>,
4831 {
4832 use std::iter::Iterator;
4833 self.commits = v.into_iter().map(|i| i.into()).collect();
4834 self
4835 }
4836
4837 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4839 self.next_page_token = v.into();
4840 self
4841 }
4842}
4843
4844impl wkt::message::Message for FetchRepositoryHistoryResponse {
4845 fn typename() -> &'static str {
4846 "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
4847 }
4848}
4849
4850#[doc(hidden)]
4851impl gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
4852 type PageItem = crate::model::CommitLogEntry;
4853
4854 fn items(self) -> std::vec::Vec<Self::PageItem> {
4855 self.commits
4856 }
4857
4858 fn next_page_token(&self) -> std::string::String {
4859 use std::clone::Clone;
4860 self.next_page_token.clone()
4861 }
4862}
4863
4864#[doc(hidden)]
4865impl<'de> serde::de::Deserialize<'de> for FetchRepositoryHistoryResponse {
4866 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4867 where
4868 D: serde::Deserializer<'de>,
4869 {
4870 #[allow(non_camel_case_types)]
4871 #[doc(hidden)]
4872 #[derive(PartialEq, Eq, Hash)]
4873 enum __FieldTag {
4874 __commits,
4875 __next_page_token,
4876 Unknown(std::string::String),
4877 }
4878 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
4879 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4880 where
4881 D: serde::Deserializer<'de>,
4882 {
4883 struct Visitor;
4884 impl<'de> serde::de::Visitor<'de> for Visitor {
4885 type Value = __FieldTag;
4886 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4887 formatter.write_str("a field name for FetchRepositoryHistoryResponse")
4888 }
4889 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
4890 where
4891 E: serde::de::Error,
4892 {
4893 use std::result::Result::Ok;
4894 use std::string::ToString;
4895 match value {
4896 "commits" => Ok(__FieldTag::__commits),
4897 "nextPageToken" => Ok(__FieldTag::__next_page_token),
4898 "next_page_token" => Ok(__FieldTag::__next_page_token),
4899 _ => Ok(__FieldTag::Unknown(value.to_string())),
4900 }
4901 }
4902 }
4903 deserializer.deserialize_identifier(Visitor)
4904 }
4905 }
4906 struct Visitor;
4907 impl<'de> serde::de::Visitor<'de> for Visitor {
4908 type Value = FetchRepositoryHistoryResponse;
4909 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
4910 formatter.write_str("struct FetchRepositoryHistoryResponse")
4911 }
4912 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
4913 where
4914 A: serde::de::MapAccess<'de>,
4915 {
4916 #[allow(unused_imports)]
4917 use serde::de::Error;
4918 use std::option::Option::Some;
4919 let mut fields = std::collections::HashSet::new();
4920 let mut result = Self::Value::new();
4921 while let Some(tag) = map.next_key::<__FieldTag>()? {
4922 #[allow(clippy::match_single_binding)]
4923 match tag {
4924 __FieldTag::__commits => {
4925 if !fields.insert(__FieldTag::__commits) {
4926 return std::result::Result::Err(A::Error::duplicate_field(
4927 "multiple values for commits",
4928 ));
4929 }
4930 result.commits =
4931 map.next_value::<std::option::Option<
4932 std::vec::Vec<crate::model::CommitLogEntry>,
4933 >>()?
4934 .unwrap_or_default();
4935 }
4936 __FieldTag::__next_page_token => {
4937 if !fields.insert(__FieldTag::__next_page_token) {
4938 return std::result::Result::Err(A::Error::duplicate_field(
4939 "multiple values for next_page_token",
4940 ));
4941 }
4942 result.next_page_token = map
4943 .next_value::<std::option::Option<std::string::String>>()?
4944 .unwrap_or_default();
4945 }
4946 __FieldTag::Unknown(key) => {
4947 let value = map.next_value::<serde_json::Value>()?;
4948 result._unknown_fields.insert(key, value);
4949 }
4950 }
4951 }
4952 std::result::Result::Ok(result)
4953 }
4954 }
4955 deserializer.deserialize_any(Visitor)
4956 }
4957}
4958
4959#[doc(hidden)]
4960impl serde::ser::Serialize for FetchRepositoryHistoryResponse {
4961 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4962 where
4963 S: serde::ser::Serializer,
4964 {
4965 use serde::ser::SerializeMap;
4966 #[allow(unused_imports)]
4967 use std::option::Option::Some;
4968 let mut state = serializer.serialize_map(std::option::Option::None)?;
4969 if !self.commits.is_empty() {
4970 state.serialize_entry("commits", &self.commits)?;
4971 }
4972 if !self.next_page_token.is_empty() {
4973 state.serialize_entry("nextPageToken", &self.next_page_token)?;
4974 }
4975 if !self._unknown_fields.is_empty() {
4976 for (key, value) in self._unknown_fields.iter() {
4977 state.serialize_entry(key, &value)?;
4978 }
4979 }
4980 state.end()
4981 }
4982}
4983
4984impl std::fmt::Debug for FetchRepositoryHistoryResponse {
4985 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4986 let mut debug_struct = f.debug_struct("FetchRepositoryHistoryResponse");
4987 debug_struct.field("commits", &self.commits);
4988 debug_struct.field("next_page_token", &self.next_page_token);
4989 if !self._unknown_fields.is_empty() {
4990 debug_struct.field("_unknown_fields", &self._unknown_fields);
4991 }
4992 debug_struct.finish()
4993 }
4994}
4995
4996#[derive(Clone, Default, PartialEq)]
4998#[non_exhaustive]
4999pub struct CommitLogEntry {
5000 pub commit_time: std::option::Option<wkt::Timestamp>,
5002
5003 pub commit_sha: std::string::String,
5005
5006 pub author: std::option::Option<crate::model::CommitAuthor>,
5008
5009 pub commit_message: std::string::String,
5011
5012 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5013}
5014
5015impl CommitLogEntry {
5016 pub fn new() -> Self {
5017 std::default::Default::default()
5018 }
5019
5020 pub fn set_commit_time<T>(mut self, v: T) -> Self
5022 where
5023 T: std::convert::Into<wkt::Timestamp>,
5024 {
5025 self.commit_time = std::option::Option::Some(v.into());
5026 self
5027 }
5028
5029 pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
5031 where
5032 T: std::convert::Into<wkt::Timestamp>,
5033 {
5034 self.commit_time = v.map(|x| x.into());
5035 self
5036 }
5037
5038 pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5040 self.commit_sha = v.into();
5041 self
5042 }
5043
5044 pub fn set_author<T>(mut self, v: T) -> Self
5046 where
5047 T: std::convert::Into<crate::model::CommitAuthor>,
5048 {
5049 self.author = std::option::Option::Some(v.into());
5050 self
5051 }
5052
5053 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
5055 where
5056 T: std::convert::Into<crate::model::CommitAuthor>,
5057 {
5058 self.author = v.map(|x| x.into());
5059 self
5060 }
5061
5062 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5064 self.commit_message = v.into();
5065 self
5066 }
5067}
5068
5069impl wkt::message::Message for CommitLogEntry {
5070 fn typename() -> &'static str {
5071 "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
5072 }
5073}
5074
5075#[doc(hidden)]
5076impl<'de> serde::de::Deserialize<'de> for CommitLogEntry {
5077 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5078 where
5079 D: serde::Deserializer<'de>,
5080 {
5081 #[allow(non_camel_case_types)]
5082 #[doc(hidden)]
5083 #[derive(PartialEq, Eq, Hash)]
5084 enum __FieldTag {
5085 __commit_time,
5086 __commit_sha,
5087 __author,
5088 __commit_message,
5089 Unknown(std::string::String),
5090 }
5091 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5092 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5093 where
5094 D: serde::Deserializer<'de>,
5095 {
5096 struct Visitor;
5097 impl<'de> serde::de::Visitor<'de> for Visitor {
5098 type Value = __FieldTag;
5099 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5100 formatter.write_str("a field name for CommitLogEntry")
5101 }
5102 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5103 where
5104 E: serde::de::Error,
5105 {
5106 use std::result::Result::Ok;
5107 use std::string::ToString;
5108 match value {
5109 "commitTime" => Ok(__FieldTag::__commit_time),
5110 "commit_time" => Ok(__FieldTag::__commit_time),
5111 "commitSha" => Ok(__FieldTag::__commit_sha),
5112 "commit_sha" => Ok(__FieldTag::__commit_sha),
5113 "author" => Ok(__FieldTag::__author),
5114 "commitMessage" => Ok(__FieldTag::__commit_message),
5115 "commit_message" => Ok(__FieldTag::__commit_message),
5116 _ => Ok(__FieldTag::Unknown(value.to_string())),
5117 }
5118 }
5119 }
5120 deserializer.deserialize_identifier(Visitor)
5121 }
5122 }
5123 struct Visitor;
5124 impl<'de> serde::de::Visitor<'de> for Visitor {
5125 type Value = CommitLogEntry;
5126 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5127 formatter.write_str("struct CommitLogEntry")
5128 }
5129 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5130 where
5131 A: serde::de::MapAccess<'de>,
5132 {
5133 #[allow(unused_imports)]
5134 use serde::de::Error;
5135 use std::option::Option::Some;
5136 let mut fields = std::collections::HashSet::new();
5137 let mut result = Self::Value::new();
5138 while let Some(tag) = map.next_key::<__FieldTag>()? {
5139 #[allow(clippy::match_single_binding)]
5140 match tag {
5141 __FieldTag::__commit_time => {
5142 if !fields.insert(__FieldTag::__commit_time) {
5143 return std::result::Result::Err(A::Error::duplicate_field(
5144 "multiple values for commit_time",
5145 ));
5146 }
5147 result.commit_time =
5148 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
5149 }
5150 __FieldTag::__commit_sha => {
5151 if !fields.insert(__FieldTag::__commit_sha) {
5152 return std::result::Result::Err(A::Error::duplicate_field(
5153 "multiple values for commit_sha",
5154 ));
5155 }
5156 result.commit_sha = map
5157 .next_value::<std::option::Option<std::string::String>>()?
5158 .unwrap_or_default();
5159 }
5160 __FieldTag::__author => {
5161 if !fields.insert(__FieldTag::__author) {
5162 return std::result::Result::Err(A::Error::duplicate_field(
5163 "multiple values for author",
5164 ));
5165 }
5166 result.author = map
5167 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
5168 }
5169 __FieldTag::__commit_message => {
5170 if !fields.insert(__FieldTag::__commit_message) {
5171 return std::result::Result::Err(A::Error::duplicate_field(
5172 "multiple values for commit_message",
5173 ));
5174 }
5175 result.commit_message = map
5176 .next_value::<std::option::Option<std::string::String>>()?
5177 .unwrap_or_default();
5178 }
5179 __FieldTag::Unknown(key) => {
5180 let value = map.next_value::<serde_json::Value>()?;
5181 result._unknown_fields.insert(key, value);
5182 }
5183 }
5184 }
5185 std::result::Result::Ok(result)
5186 }
5187 }
5188 deserializer.deserialize_any(Visitor)
5189 }
5190}
5191
5192#[doc(hidden)]
5193impl serde::ser::Serialize for CommitLogEntry {
5194 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5195 where
5196 S: serde::ser::Serializer,
5197 {
5198 use serde::ser::SerializeMap;
5199 #[allow(unused_imports)]
5200 use std::option::Option::Some;
5201 let mut state = serializer.serialize_map(std::option::Option::None)?;
5202 if self.commit_time.is_some() {
5203 state.serialize_entry("commitTime", &self.commit_time)?;
5204 }
5205 if !self.commit_sha.is_empty() {
5206 state.serialize_entry("commitSha", &self.commit_sha)?;
5207 }
5208 if self.author.is_some() {
5209 state.serialize_entry("author", &self.author)?;
5210 }
5211 if !self.commit_message.is_empty() {
5212 state.serialize_entry("commitMessage", &self.commit_message)?;
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
5223impl std::fmt::Debug for CommitLogEntry {
5224 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5225 let mut debug_struct = f.debug_struct("CommitLogEntry");
5226 debug_struct.field("commit_time", &self.commit_time);
5227 debug_struct.field("commit_sha", &self.commit_sha);
5228 debug_struct.field("author", &self.author);
5229 debug_struct.field("commit_message", &self.commit_message);
5230 if !self._unknown_fields.is_empty() {
5231 debug_struct.field("_unknown_fields", &self._unknown_fields);
5232 }
5233 debug_struct.finish()
5234 }
5235}
5236
5237#[derive(Clone, Default, PartialEq)]
5239#[non_exhaustive]
5240pub struct CommitMetadata {
5241 pub author: std::option::Option<crate::model::CommitAuthor>,
5243
5244 pub commit_message: std::string::String,
5246
5247 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5248}
5249
5250impl CommitMetadata {
5251 pub fn new() -> Self {
5252 std::default::Default::default()
5253 }
5254
5255 pub fn set_author<T>(mut self, v: T) -> Self
5257 where
5258 T: std::convert::Into<crate::model::CommitAuthor>,
5259 {
5260 self.author = std::option::Option::Some(v.into());
5261 self
5262 }
5263
5264 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
5266 where
5267 T: std::convert::Into<crate::model::CommitAuthor>,
5268 {
5269 self.author = v.map(|x| x.into());
5270 self
5271 }
5272
5273 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5275 self.commit_message = v.into();
5276 self
5277 }
5278}
5279
5280impl wkt::message::Message for CommitMetadata {
5281 fn typename() -> &'static str {
5282 "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
5283 }
5284}
5285
5286#[doc(hidden)]
5287impl<'de> serde::de::Deserialize<'de> for CommitMetadata {
5288 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5289 where
5290 D: serde::Deserializer<'de>,
5291 {
5292 #[allow(non_camel_case_types)]
5293 #[doc(hidden)]
5294 #[derive(PartialEq, Eq, Hash)]
5295 enum __FieldTag {
5296 __author,
5297 __commit_message,
5298 Unknown(std::string::String),
5299 }
5300 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5301 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5302 where
5303 D: serde::Deserializer<'de>,
5304 {
5305 struct Visitor;
5306 impl<'de> serde::de::Visitor<'de> for Visitor {
5307 type Value = __FieldTag;
5308 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5309 formatter.write_str("a field name for CommitMetadata")
5310 }
5311 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5312 where
5313 E: serde::de::Error,
5314 {
5315 use std::result::Result::Ok;
5316 use std::string::ToString;
5317 match value {
5318 "author" => Ok(__FieldTag::__author),
5319 "commitMessage" => Ok(__FieldTag::__commit_message),
5320 "commit_message" => Ok(__FieldTag::__commit_message),
5321 _ => Ok(__FieldTag::Unknown(value.to_string())),
5322 }
5323 }
5324 }
5325 deserializer.deserialize_identifier(Visitor)
5326 }
5327 }
5328 struct Visitor;
5329 impl<'de> serde::de::Visitor<'de> for Visitor {
5330 type Value = CommitMetadata;
5331 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5332 formatter.write_str("struct CommitMetadata")
5333 }
5334 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5335 where
5336 A: serde::de::MapAccess<'de>,
5337 {
5338 #[allow(unused_imports)]
5339 use serde::de::Error;
5340 use std::option::Option::Some;
5341 let mut fields = std::collections::HashSet::new();
5342 let mut result = Self::Value::new();
5343 while let Some(tag) = map.next_key::<__FieldTag>()? {
5344 #[allow(clippy::match_single_binding)]
5345 match tag {
5346 __FieldTag::__author => {
5347 if !fields.insert(__FieldTag::__author) {
5348 return std::result::Result::Err(A::Error::duplicate_field(
5349 "multiple values for author",
5350 ));
5351 }
5352 result.author = map
5353 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
5354 }
5355 __FieldTag::__commit_message => {
5356 if !fields.insert(__FieldTag::__commit_message) {
5357 return std::result::Result::Err(A::Error::duplicate_field(
5358 "multiple values for commit_message",
5359 ));
5360 }
5361 result.commit_message = map
5362 .next_value::<std::option::Option<std::string::String>>()?
5363 .unwrap_or_default();
5364 }
5365 __FieldTag::Unknown(key) => {
5366 let value = map.next_value::<serde_json::Value>()?;
5367 result._unknown_fields.insert(key, value);
5368 }
5369 }
5370 }
5371 std::result::Result::Ok(result)
5372 }
5373 }
5374 deserializer.deserialize_any(Visitor)
5375 }
5376}
5377
5378#[doc(hidden)]
5379impl serde::ser::Serialize for CommitMetadata {
5380 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5381 where
5382 S: serde::ser::Serializer,
5383 {
5384 use serde::ser::SerializeMap;
5385 #[allow(unused_imports)]
5386 use std::option::Option::Some;
5387 let mut state = serializer.serialize_map(std::option::Option::None)?;
5388 if self.author.is_some() {
5389 state.serialize_entry("author", &self.author)?;
5390 }
5391 if !self.commit_message.is_empty() {
5392 state.serialize_entry("commitMessage", &self.commit_message)?;
5393 }
5394 if !self._unknown_fields.is_empty() {
5395 for (key, value) in self._unknown_fields.iter() {
5396 state.serialize_entry(key, &value)?;
5397 }
5398 }
5399 state.end()
5400 }
5401}
5402
5403impl std::fmt::Debug for CommitMetadata {
5404 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5405 let mut debug_struct = f.debug_struct("CommitMetadata");
5406 debug_struct.field("author", &self.author);
5407 debug_struct.field("commit_message", &self.commit_message);
5408 if !self._unknown_fields.is_empty() {
5409 debug_struct.field("_unknown_fields", &self._unknown_fields);
5410 }
5411 debug_struct.finish()
5412 }
5413}
5414
5415#[derive(Clone, Default, PartialEq)]
5417#[non_exhaustive]
5418pub struct ComputeRepositoryAccessTokenStatusRequest {
5419 pub name: std::string::String,
5421
5422 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5423}
5424
5425impl ComputeRepositoryAccessTokenStatusRequest {
5426 pub fn new() -> Self {
5427 std::default::Default::default()
5428 }
5429
5430 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5432 self.name = v.into();
5433 self
5434 }
5435}
5436
5437impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
5438 fn typename() -> &'static str {
5439 "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
5440 }
5441}
5442
5443#[doc(hidden)]
5444impl<'de> serde::de::Deserialize<'de> for ComputeRepositoryAccessTokenStatusRequest {
5445 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5446 where
5447 D: serde::Deserializer<'de>,
5448 {
5449 #[allow(non_camel_case_types)]
5450 #[doc(hidden)]
5451 #[derive(PartialEq, Eq, Hash)]
5452 enum __FieldTag {
5453 __name,
5454 Unknown(std::string::String),
5455 }
5456 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5457 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5458 where
5459 D: serde::Deserializer<'de>,
5460 {
5461 struct Visitor;
5462 impl<'de> serde::de::Visitor<'de> for Visitor {
5463 type Value = __FieldTag;
5464 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5465 formatter
5466 .write_str("a field name for ComputeRepositoryAccessTokenStatusRequest")
5467 }
5468 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5469 where
5470 E: serde::de::Error,
5471 {
5472 use std::result::Result::Ok;
5473 use std::string::ToString;
5474 match value {
5475 "name" => Ok(__FieldTag::__name),
5476 _ => Ok(__FieldTag::Unknown(value.to_string())),
5477 }
5478 }
5479 }
5480 deserializer.deserialize_identifier(Visitor)
5481 }
5482 }
5483 struct Visitor;
5484 impl<'de> serde::de::Visitor<'de> for Visitor {
5485 type Value = ComputeRepositoryAccessTokenStatusRequest;
5486 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5487 formatter.write_str("struct ComputeRepositoryAccessTokenStatusRequest")
5488 }
5489 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5490 where
5491 A: serde::de::MapAccess<'de>,
5492 {
5493 #[allow(unused_imports)]
5494 use serde::de::Error;
5495 use std::option::Option::Some;
5496 let mut fields = std::collections::HashSet::new();
5497 let mut result = Self::Value::new();
5498 while let Some(tag) = map.next_key::<__FieldTag>()? {
5499 #[allow(clippy::match_single_binding)]
5500 match tag {
5501 __FieldTag::__name => {
5502 if !fields.insert(__FieldTag::__name) {
5503 return std::result::Result::Err(A::Error::duplicate_field(
5504 "multiple values for name",
5505 ));
5506 }
5507 result.name = map
5508 .next_value::<std::option::Option<std::string::String>>()?
5509 .unwrap_or_default();
5510 }
5511 __FieldTag::Unknown(key) => {
5512 let value = map.next_value::<serde_json::Value>()?;
5513 result._unknown_fields.insert(key, value);
5514 }
5515 }
5516 }
5517 std::result::Result::Ok(result)
5518 }
5519 }
5520 deserializer.deserialize_any(Visitor)
5521 }
5522}
5523
5524#[doc(hidden)]
5525impl serde::ser::Serialize for ComputeRepositoryAccessTokenStatusRequest {
5526 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5527 where
5528 S: serde::ser::Serializer,
5529 {
5530 use serde::ser::SerializeMap;
5531 #[allow(unused_imports)]
5532 use std::option::Option::Some;
5533 let mut state = serializer.serialize_map(std::option::Option::None)?;
5534 if !self.name.is_empty() {
5535 state.serialize_entry("name", &self.name)?;
5536 }
5537 if !self._unknown_fields.is_empty() {
5538 for (key, value) in self._unknown_fields.iter() {
5539 state.serialize_entry(key, &value)?;
5540 }
5541 }
5542 state.end()
5543 }
5544}
5545
5546impl std::fmt::Debug for ComputeRepositoryAccessTokenStatusRequest {
5547 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5548 let mut debug_struct = f.debug_struct("ComputeRepositoryAccessTokenStatusRequest");
5549 debug_struct.field("name", &self.name);
5550 if !self._unknown_fields.is_empty() {
5551 debug_struct.field("_unknown_fields", &self._unknown_fields);
5552 }
5553 debug_struct.finish()
5554 }
5555}
5556
5557#[derive(Clone, Default, PartialEq)]
5559#[non_exhaustive]
5560pub struct ComputeRepositoryAccessTokenStatusResponse {
5561 pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
5563
5564 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5565}
5566
5567impl ComputeRepositoryAccessTokenStatusResponse {
5568 pub fn new() -> Self {
5569 std::default::Default::default()
5570 }
5571
5572 pub fn set_token_status<
5574 T: std::convert::Into<
5575 crate::model::compute_repository_access_token_status_response::TokenStatus,
5576 >,
5577 >(
5578 mut self,
5579 v: T,
5580 ) -> Self {
5581 self.token_status = v.into();
5582 self
5583 }
5584}
5585
5586impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
5587 fn typename() -> &'static str {
5588 "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
5589 }
5590}
5591
5592#[doc(hidden)]
5593impl<'de> serde::de::Deserialize<'de> for ComputeRepositoryAccessTokenStatusResponse {
5594 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5595 where
5596 D: serde::Deserializer<'de>,
5597 {
5598 #[allow(non_camel_case_types)]
5599 #[doc(hidden)]
5600 #[derive(PartialEq, Eq, Hash)]
5601 enum __FieldTag {
5602 __token_status,
5603 Unknown(std::string::String),
5604 }
5605 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5606 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5607 where
5608 D: serde::Deserializer<'de>,
5609 {
5610 struct Visitor;
5611 impl<'de> serde::de::Visitor<'de> for Visitor {
5612 type Value = __FieldTag;
5613 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5614 formatter.write_str(
5615 "a field name for ComputeRepositoryAccessTokenStatusResponse",
5616 )
5617 }
5618 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5619 where
5620 E: serde::de::Error,
5621 {
5622 use std::result::Result::Ok;
5623 use std::string::ToString;
5624 match value {
5625 "tokenStatus" => Ok(__FieldTag::__token_status),
5626 "token_status" => Ok(__FieldTag::__token_status),
5627 _ => Ok(__FieldTag::Unknown(value.to_string())),
5628 }
5629 }
5630 }
5631 deserializer.deserialize_identifier(Visitor)
5632 }
5633 }
5634 struct Visitor;
5635 impl<'de> serde::de::Visitor<'de> for Visitor {
5636 type Value = ComputeRepositoryAccessTokenStatusResponse;
5637 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5638 formatter.write_str("struct ComputeRepositoryAccessTokenStatusResponse")
5639 }
5640 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5641 where
5642 A: serde::de::MapAccess<'de>,
5643 {
5644 #[allow(unused_imports)]
5645 use serde::de::Error;
5646 use std::option::Option::Some;
5647 let mut fields = std::collections::HashSet::new();
5648 let mut result = Self::Value::new();
5649 while let Some(tag) = map.next_key::<__FieldTag>()? {
5650 #[allow(clippy::match_single_binding)]
5651 match tag {
5652 __FieldTag::__token_status => {
5653 if !fields.insert(__FieldTag::__token_status) {
5654 return std::result::Result::Err(A::Error::duplicate_field(
5655 "multiple values for token_status",
5656 ));
5657 }
5658 result.token_status = map.next_value::<std::option::Option<crate::model::compute_repository_access_token_status_response::TokenStatus>>()?.unwrap_or_default();
5659 }
5660 __FieldTag::Unknown(key) => {
5661 let value = map.next_value::<serde_json::Value>()?;
5662 result._unknown_fields.insert(key, value);
5663 }
5664 }
5665 }
5666 std::result::Result::Ok(result)
5667 }
5668 }
5669 deserializer.deserialize_any(Visitor)
5670 }
5671}
5672
5673#[doc(hidden)]
5674impl serde::ser::Serialize for ComputeRepositoryAccessTokenStatusResponse {
5675 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5676 where
5677 S: serde::ser::Serializer,
5678 {
5679 use serde::ser::SerializeMap;
5680 #[allow(unused_imports)]
5681 use std::option::Option::Some;
5682 let mut state = serializer.serialize_map(std::option::Option::None)?;
5683 if !wkt::internal::is_default(&self.token_status) {
5684 state.serialize_entry("tokenStatus", &self.token_status)?;
5685 }
5686 if !self._unknown_fields.is_empty() {
5687 for (key, value) in self._unknown_fields.iter() {
5688 state.serialize_entry(key, &value)?;
5689 }
5690 }
5691 state.end()
5692 }
5693}
5694
5695impl std::fmt::Debug for ComputeRepositoryAccessTokenStatusResponse {
5696 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5697 let mut debug_struct = f.debug_struct("ComputeRepositoryAccessTokenStatusResponse");
5698 debug_struct.field("token_status", &self.token_status);
5699 if !self._unknown_fields.is_empty() {
5700 debug_struct.field("_unknown_fields", &self._unknown_fields);
5701 }
5702 debug_struct.finish()
5703 }
5704}
5705
5706pub mod compute_repository_access_token_status_response {
5708 #[allow(unused_imports)]
5709 use super::*;
5710
5711 #[derive(Clone, Debug, PartialEq)]
5727 #[non_exhaustive]
5728 pub enum TokenStatus {
5729 Unspecified,
5731 NotFound,
5734 Invalid,
5736 Valid,
5738 UnknownValue(token_status::UnknownValue),
5743 }
5744
5745 #[doc(hidden)]
5746 pub mod token_status {
5747 #[allow(unused_imports)]
5748 use super::*;
5749 #[derive(Clone, Debug, PartialEq)]
5750 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5751 }
5752
5753 impl TokenStatus {
5754 pub fn value(&self) -> std::option::Option<i32> {
5759 match self {
5760 Self::Unspecified => std::option::Option::Some(0),
5761 Self::NotFound => std::option::Option::Some(1),
5762 Self::Invalid => std::option::Option::Some(2),
5763 Self::Valid => std::option::Option::Some(3),
5764 Self::UnknownValue(u) => u.0.value(),
5765 }
5766 }
5767
5768 pub fn name(&self) -> std::option::Option<&str> {
5773 match self {
5774 Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
5775 Self::NotFound => std::option::Option::Some("NOT_FOUND"),
5776 Self::Invalid => std::option::Option::Some("INVALID"),
5777 Self::Valid => std::option::Option::Some("VALID"),
5778 Self::UnknownValue(u) => u.0.name(),
5779 }
5780 }
5781 }
5782
5783 impl std::default::Default for TokenStatus {
5784 fn default() -> Self {
5785 use std::convert::From;
5786 Self::from(0)
5787 }
5788 }
5789
5790 impl std::fmt::Display for TokenStatus {
5791 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
5792 wkt::internal::display_enum(f, self.name(), self.value())
5793 }
5794 }
5795
5796 impl std::convert::From<i32> for TokenStatus {
5797 fn from(value: i32) -> Self {
5798 match value {
5799 0 => Self::Unspecified,
5800 1 => Self::NotFound,
5801 2 => Self::Invalid,
5802 3 => Self::Valid,
5803 _ => Self::UnknownValue(token_status::UnknownValue(
5804 wkt::internal::UnknownEnumValue::Integer(value),
5805 )),
5806 }
5807 }
5808 }
5809
5810 impl std::convert::From<&str> for TokenStatus {
5811 fn from(value: &str) -> Self {
5812 use std::string::ToString;
5813 match value {
5814 "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
5815 "NOT_FOUND" => Self::NotFound,
5816 "INVALID" => Self::Invalid,
5817 "VALID" => Self::Valid,
5818 _ => Self::UnknownValue(token_status::UnknownValue(
5819 wkt::internal::UnknownEnumValue::String(value.to_string()),
5820 )),
5821 }
5822 }
5823 }
5824
5825 impl serde::ser::Serialize for TokenStatus {
5826 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5827 where
5828 S: serde::Serializer,
5829 {
5830 match self {
5831 Self::Unspecified => serializer.serialize_i32(0),
5832 Self::NotFound => serializer.serialize_i32(1),
5833 Self::Invalid => serializer.serialize_i32(2),
5834 Self::Valid => serializer.serialize_i32(3),
5835 Self::UnknownValue(u) => u.0.serialize(serializer),
5836 }
5837 }
5838 }
5839
5840 impl<'de> serde::de::Deserialize<'de> for TokenStatus {
5841 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5842 where
5843 D: serde::Deserializer<'de>,
5844 {
5845 deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
5846 ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
5847 ))
5848 }
5849 }
5850}
5851
5852#[derive(Clone, Default, PartialEq)]
5854#[non_exhaustive]
5855pub struct FetchRemoteBranchesRequest {
5856 pub name: std::string::String,
5858
5859 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5860}
5861
5862impl FetchRemoteBranchesRequest {
5863 pub fn new() -> Self {
5864 std::default::Default::default()
5865 }
5866
5867 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5869 self.name = v.into();
5870 self
5871 }
5872}
5873
5874impl wkt::message::Message for FetchRemoteBranchesRequest {
5875 fn typename() -> &'static str {
5876 "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
5877 }
5878}
5879
5880#[doc(hidden)]
5881impl<'de> serde::de::Deserialize<'de> for FetchRemoteBranchesRequest {
5882 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5883 where
5884 D: serde::Deserializer<'de>,
5885 {
5886 #[allow(non_camel_case_types)]
5887 #[doc(hidden)]
5888 #[derive(PartialEq, Eq, Hash)]
5889 enum __FieldTag {
5890 __name,
5891 Unknown(std::string::String),
5892 }
5893 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
5894 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
5895 where
5896 D: serde::Deserializer<'de>,
5897 {
5898 struct Visitor;
5899 impl<'de> serde::de::Visitor<'de> for Visitor {
5900 type Value = __FieldTag;
5901 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5902 formatter.write_str("a field name for FetchRemoteBranchesRequest")
5903 }
5904 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
5905 where
5906 E: serde::de::Error,
5907 {
5908 use std::result::Result::Ok;
5909 use std::string::ToString;
5910 match value {
5911 "name" => Ok(__FieldTag::__name),
5912 _ => Ok(__FieldTag::Unknown(value.to_string())),
5913 }
5914 }
5915 }
5916 deserializer.deserialize_identifier(Visitor)
5917 }
5918 }
5919 struct Visitor;
5920 impl<'de> serde::de::Visitor<'de> for Visitor {
5921 type Value = FetchRemoteBranchesRequest;
5922 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
5923 formatter.write_str("struct FetchRemoteBranchesRequest")
5924 }
5925 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
5926 where
5927 A: serde::de::MapAccess<'de>,
5928 {
5929 #[allow(unused_imports)]
5930 use serde::de::Error;
5931 use std::option::Option::Some;
5932 let mut fields = std::collections::HashSet::new();
5933 let mut result = Self::Value::new();
5934 while let Some(tag) = map.next_key::<__FieldTag>()? {
5935 #[allow(clippy::match_single_binding)]
5936 match tag {
5937 __FieldTag::__name => {
5938 if !fields.insert(__FieldTag::__name) {
5939 return std::result::Result::Err(A::Error::duplicate_field(
5940 "multiple values for name",
5941 ));
5942 }
5943 result.name = map
5944 .next_value::<std::option::Option<std::string::String>>()?
5945 .unwrap_or_default();
5946 }
5947 __FieldTag::Unknown(key) => {
5948 let value = map.next_value::<serde_json::Value>()?;
5949 result._unknown_fields.insert(key, value);
5950 }
5951 }
5952 }
5953 std::result::Result::Ok(result)
5954 }
5955 }
5956 deserializer.deserialize_any(Visitor)
5957 }
5958}
5959
5960#[doc(hidden)]
5961impl serde::ser::Serialize for FetchRemoteBranchesRequest {
5962 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
5963 where
5964 S: serde::ser::Serializer,
5965 {
5966 use serde::ser::SerializeMap;
5967 #[allow(unused_imports)]
5968 use std::option::Option::Some;
5969 let mut state = serializer.serialize_map(std::option::Option::None)?;
5970 if !self.name.is_empty() {
5971 state.serialize_entry("name", &self.name)?;
5972 }
5973 if !self._unknown_fields.is_empty() {
5974 for (key, value) in self._unknown_fields.iter() {
5975 state.serialize_entry(key, &value)?;
5976 }
5977 }
5978 state.end()
5979 }
5980}
5981
5982impl std::fmt::Debug for FetchRemoteBranchesRequest {
5983 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5984 let mut debug_struct = f.debug_struct("FetchRemoteBranchesRequest");
5985 debug_struct.field("name", &self.name);
5986 if !self._unknown_fields.is_empty() {
5987 debug_struct.field("_unknown_fields", &self._unknown_fields);
5988 }
5989 debug_struct.finish()
5990 }
5991}
5992
5993#[derive(Clone, Default, PartialEq)]
5995#[non_exhaustive]
5996pub struct FetchRemoteBranchesResponse {
5997 pub branches: std::vec::Vec<std::string::String>,
5999
6000 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6001}
6002
6003impl FetchRemoteBranchesResponse {
6004 pub fn new() -> Self {
6005 std::default::Default::default()
6006 }
6007
6008 pub fn set_branches<T, V>(mut self, v: T) -> Self
6010 where
6011 T: std::iter::IntoIterator<Item = V>,
6012 V: std::convert::Into<std::string::String>,
6013 {
6014 use std::iter::Iterator;
6015 self.branches = v.into_iter().map(|i| i.into()).collect();
6016 self
6017 }
6018}
6019
6020impl wkt::message::Message for FetchRemoteBranchesResponse {
6021 fn typename() -> &'static str {
6022 "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
6023 }
6024}
6025
6026#[doc(hidden)]
6027impl<'de> serde::de::Deserialize<'de> for FetchRemoteBranchesResponse {
6028 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6029 where
6030 D: serde::Deserializer<'de>,
6031 {
6032 #[allow(non_camel_case_types)]
6033 #[doc(hidden)]
6034 #[derive(PartialEq, Eq, Hash)]
6035 enum __FieldTag {
6036 __branches,
6037 Unknown(std::string::String),
6038 }
6039 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6040 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6041 where
6042 D: serde::Deserializer<'de>,
6043 {
6044 struct Visitor;
6045 impl<'de> serde::de::Visitor<'de> for Visitor {
6046 type Value = __FieldTag;
6047 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6048 formatter.write_str("a field name for FetchRemoteBranchesResponse")
6049 }
6050 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6051 where
6052 E: serde::de::Error,
6053 {
6054 use std::result::Result::Ok;
6055 use std::string::ToString;
6056 match value {
6057 "branches" => Ok(__FieldTag::__branches),
6058 _ => Ok(__FieldTag::Unknown(value.to_string())),
6059 }
6060 }
6061 }
6062 deserializer.deserialize_identifier(Visitor)
6063 }
6064 }
6065 struct Visitor;
6066 impl<'de> serde::de::Visitor<'de> for Visitor {
6067 type Value = FetchRemoteBranchesResponse;
6068 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6069 formatter.write_str("struct FetchRemoteBranchesResponse")
6070 }
6071 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6072 where
6073 A: serde::de::MapAccess<'de>,
6074 {
6075 #[allow(unused_imports)]
6076 use serde::de::Error;
6077 use std::option::Option::Some;
6078 let mut fields = std::collections::HashSet::new();
6079 let mut result = Self::Value::new();
6080 while let Some(tag) = map.next_key::<__FieldTag>()? {
6081 #[allow(clippy::match_single_binding)]
6082 match tag {
6083 __FieldTag::__branches => {
6084 if !fields.insert(__FieldTag::__branches) {
6085 return std::result::Result::Err(A::Error::duplicate_field(
6086 "multiple values for branches",
6087 ));
6088 }
6089 result.branches = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
6090 }
6091 __FieldTag::Unknown(key) => {
6092 let value = map.next_value::<serde_json::Value>()?;
6093 result._unknown_fields.insert(key, value);
6094 }
6095 }
6096 }
6097 std::result::Result::Ok(result)
6098 }
6099 }
6100 deserializer.deserialize_any(Visitor)
6101 }
6102}
6103
6104#[doc(hidden)]
6105impl serde::ser::Serialize for FetchRemoteBranchesResponse {
6106 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6107 where
6108 S: serde::ser::Serializer,
6109 {
6110 use serde::ser::SerializeMap;
6111 #[allow(unused_imports)]
6112 use std::option::Option::Some;
6113 let mut state = serializer.serialize_map(std::option::Option::None)?;
6114 if !self.branches.is_empty() {
6115 state.serialize_entry("branches", &self.branches)?;
6116 }
6117 if !self._unknown_fields.is_empty() {
6118 for (key, value) in self._unknown_fields.iter() {
6119 state.serialize_entry(key, &value)?;
6120 }
6121 }
6122 state.end()
6123 }
6124}
6125
6126impl std::fmt::Debug for FetchRemoteBranchesResponse {
6127 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6128 let mut debug_struct = f.debug_struct("FetchRemoteBranchesResponse");
6129 debug_struct.field("branches", &self.branches);
6130 if !self._unknown_fields.is_empty() {
6131 debug_struct.field("_unknown_fields", &self._unknown_fields);
6132 }
6133 debug_struct.finish()
6134 }
6135}
6136
6137#[derive(Clone, Default, PartialEq)]
6139#[non_exhaustive]
6140pub struct Workspace {
6141 pub name: std::string::String,
6143
6144 pub create_time: std::option::Option<wkt::Timestamp>,
6146
6147 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
6150
6151 pub internal_metadata: std::option::Option<std::string::String>,
6155
6156 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6157}
6158
6159impl Workspace {
6160 pub fn new() -> Self {
6161 std::default::Default::default()
6162 }
6163
6164 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6166 self.name = v.into();
6167 self
6168 }
6169
6170 pub fn set_create_time<T>(mut self, v: T) -> Self
6172 where
6173 T: std::convert::Into<wkt::Timestamp>,
6174 {
6175 self.create_time = std::option::Option::Some(v.into());
6176 self
6177 }
6178
6179 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6181 where
6182 T: std::convert::Into<wkt::Timestamp>,
6183 {
6184 self.create_time = v.map(|x| x.into());
6185 self
6186 }
6187
6188 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
6190 where
6191 T: std::convert::Into<crate::model::DataEncryptionState>,
6192 {
6193 self.data_encryption_state = std::option::Option::Some(v.into());
6194 self
6195 }
6196
6197 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
6199 where
6200 T: std::convert::Into<crate::model::DataEncryptionState>,
6201 {
6202 self.data_encryption_state = v.map(|x| x.into());
6203 self
6204 }
6205
6206 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
6208 where
6209 T: std::convert::Into<std::string::String>,
6210 {
6211 self.internal_metadata = std::option::Option::Some(v.into());
6212 self
6213 }
6214
6215 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6217 where
6218 T: std::convert::Into<std::string::String>,
6219 {
6220 self.internal_metadata = v.map(|x| x.into());
6221 self
6222 }
6223}
6224
6225impl wkt::message::Message for Workspace {
6226 fn typename() -> &'static str {
6227 "type.googleapis.com/google.cloud.dataform.v1.Workspace"
6228 }
6229}
6230
6231#[doc(hidden)]
6232impl<'de> serde::de::Deserialize<'de> for Workspace {
6233 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6234 where
6235 D: serde::Deserializer<'de>,
6236 {
6237 #[allow(non_camel_case_types)]
6238 #[doc(hidden)]
6239 #[derive(PartialEq, Eq, Hash)]
6240 enum __FieldTag {
6241 __name,
6242 __create_time,
6243 __data_encryption_state,
6244 __internal_metadata,
6245 Unknown(std::string::String),
6246 }
6247 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6248 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6249 where
6250 D: serde::Deserializer<'de>,
6251 {
6252 struct Visitor;
6253 impl<'de> serde::de::Visitor<'de> for Visitor {
6254 type Value = __FieldTag;
6255 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6256 formatter.write_str("a field name for Workspace")
6257 }
6258 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6259 where
6260 E: serde::de::Error,
6261 {
6262 use std::result::Result::Ok;
6263 use std::string::ToString;
6264 match value {
6265 "name" => Ok(__FieldTag::__name),
6266 "createTime" => Ok(__FieldTag::__create_time),
6267 "create_time" => Ok(__FieldTag::__create_time),
6268 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
6269 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
6270 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
6271 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
6272 _ => Ok(__FieldTag::Unknown(value.to_string())),
6273 }
6274 }
6275 }
6276 deserializer.deserialize_identifier(Visitor)
6277 }
6278 }
6279 struct Visitor;
6280 impl<'de> serde::de::Visitor<'de> for Visitor {
6281 type Value = Workspace;
6282 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6283 formatter.write_str("struct Workspace")
6284 }
6285 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6286 where
6287 A: serde::de::MapAccess<'de>,
6288 {
6289 #[allow(unused_imports)]
6290 use serde::de::Error;
6291 use std::option::Option::Some;
6292 let mut fields = std::collections::HashSet::new();
6293 let mut result = Self::Value::new();
6294 while let Some(tag) = map.next_key::<__FieldTag>()? {
6295 #[allow(clippy::match_single_binding)]
6296 match tag {
6297 __FieldTag::__name => {
6298 if !fields.insert(__FieldTag::__name) {
6299 return std::result::Result::Err(A::Error::duplicate_field(
6300 "multiple values for name",
6301 ));
6302 }
6303 result.name = map
6304 .next_value::<std::option::Option<std::string::String>>()?
6305 .unwrap_or_default();
6306 }
6307 __FieldTag::__create_time => {
6308 if !fields.insert(__FieldTag::__create_time) {
6309 return std::result::Result::Err(A::Error::duplicate_field(
6310 "multiple values for create_time",
6311 ));
6312 }
6313 result.create_time =
6314 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
6315 }
6316 __FieldTag::__data_encryption_state => {
6317 if !fields.insert(__FieldTag::__data_encryption_state) {
6318 return std::result::Result::Err(A::Error::duplicate_field(
6319 "multiple values for data_encryption_state",
6320 ));
6321 }
6322 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
6323 ;
6324 }
6325 __FieldTag::__internal_metadata => {
6326 if !fields.insert(__FieldTag::__internal_metadata) {
6327 return std::result::Result::Err(A::Error::duplicate_field(
6328 "multiple values for internal_metadata",
6329 ));
6330 }
6331 result.internal_metadata =
6332 map.next_value::<std::option::Option<std::string::String>>()?;
6333 }
6334 __FieldTag::Unknown(key) => {
6335 let value = map.next_value::<serde_json::Value>()?;
6336 result._unknown_fields.insert(key, value);
6337 }
6338 }
6339 }
6340 std::result::Result::Ok(result)
6341 }
6342 }
6343 deserializer.deserialize_any(Visitor)
6344 }
6345}
6346
6347#[doc(hidden)]
6348impl serde::ser::Serialize for Workspace {
6349 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6350 where
6351 S: serde::ser::Serializer,
6352 {
6353 use serde::ser::SerializeMap;
6354 #[allow(unused_imports)]
6355 use std::option::Option::Some;
6356 let mut state = serializer.serialize_map(std::option::Option::None)?;
6357 if !self.name.is_empty() {
6358 state.serialize_entry("name", &self.name)?;
6359 }
6360 if self.create_time.is_some() {
6361 state.serialize_entry("createTime", &self.create_time)?;
6362 }
6363 if self.data_encryption_state.is_some() {
6364 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
6365 }
6366 if self.internal_metadata.is_some() {
6367 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
6368 }
6369 if !self._unknown_fields.is_empty() {
6370 for (key, value) in self._unknown_fields.iter() {
6371 state.serialize_entry(key, &value)?;
6372 }
6373 }
6374 state.end()
6375 }
6376}
6377
6378impl std::fmt::Debug for Workspace {
6379 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6380 let mut debug_struct = f.debug_struct("Workspace");
6381 debug_struct.field("name", &self.name);
6382 debug_struct.field("create_time", &self.create_time);
6383 debug_struct.field("data_encryption_state", &self.data_encryption_state);
6384 debug_struct.field("internal_metadata", &self.internal_metadata);
6385 if !self._unknown_fields.is_empty() {
6386 debug_struct.field("_unknown_fields", &self._unknown_fields);
6387 }
6388 debug_struct.finish()
6389 }
6390}
6391
6392#[derive(Clone, Default, PartialEq)]
6394#[non_exhaustive]
6395pub struct ListWorkspacesRequest {
6396 pub parent: std::string::String,
6399
6400 pub page_size: i32,
6404
6405 pub page_token: std::string::String,
6412
6413 pub order_by: std::string::String,
6417
6418 pub filter: std::string::String,
6420
6421 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6422}
6423
6424impl ListWorkspacesRequest {
6425 pub fn new() -> Self {
6426 std::default::Default::default()
6427 }
6428
6429 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6431 self.parent = v.into();
6432 self
6433 }
6434
6435 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6437 self.page_size = v.into();
6438 self
6439 }
6440
6441 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6443 self.page_token = v.into();
6444 self
6445 }
6446
6447 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6449 self.order_by = v.into();
6450 self
6451 }
6452
6453 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6455 self.filter = v.into();
6456 self
6457 }
6458}
6459
6460impl wkt::message::Message for ListWorkspacesRequest {
6461 fn typename() -> &'static str {
6462 "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
6463 }
6464}
6465
6466#[doc(hidden)]
6467impl<'de> serde::de::Deserialize<'de> for ListWorkspacesRequest {
6468 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6469 where
6470 D: serde::Deserializer<'de>,
6471 {
6472 #[allow(non_camel_case_types)]
6473 #[doc(hidden)]
6474 #[derive(PartialEq, Eq, Hash)]
6475 enum __FieldTag {
6476 __parent,
6477 __page_size,
6478 __page_token,
6479 __order_by,
6480 __filter,
6481 Unknown(std::string::String),
6482 }
6483 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6484 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6485 where
6486 D: serde::Deserializer<'de>,
6487 {
6488 struct Visitor;
6489 impl<'de> serde::de::Visitor<'de> for Visitor {
6490 type Value = __FieldTag;
6491 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6492 formatter.write_str("a field name for ListWorkspacesRequest")
6493 }
6494 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6495 where
6496 E: serde::de::Error,
6497 {
6498 use std::result::Result::Ok;
6499 use std::string::ToString;
6500 match value {
6501 "parent" => Ok(__FieldTag::__parent),
6502 "pageSize" => Ok(__FieldTag::__page_size),
6503 "page_size" => Ok(__FieldTag::__page_size),
6504 "pageToken" => Ok(__FieldTag::__page_token),
6505 "page_token" => Ok(__FieldTag::__page_token),
6506 "orderBy" => Ok(__FieldTag::__order_by),
6507 "order_by" => Ok(__FieldTag::__order_by),
6508 "filter" => Ok(__FieldTag::__filter),
6509 _ => Ok(__FieldTag::Unknown(value.to_string())),
6510 }
6511 }
6512 }
6513 deserializer.deserialize_identifier(Visitor)
6514 }
6515 }
6516 struct Visitor;
6517 impl<'de> serde::de::Visitor<'de> for Visitor {
6518 type Value = ListWorkspacesRequest;
6519 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6520 formatter.write_str("struct ListWorkspacesRequest")
6521 }
6522 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6523 where
6524 A: serde::de::MapAccess<'de>,
6525 {
6526 #[allow(unused_imports)]
6527 use serde::de::Error;
6528 use std::option::Option::Some;
6529 let mut fields = std::collections::HashSet::new();
6530 let mut result = Self::Value::new();
6531 while let Some(tag) = map.next_key::<__FieldTag>()? {
6532 #[allow(clippy::match_single_binding)]
6533 match tag {
6534 __FieldTag::__parent => {
6535 if !fields.insert(__FieldTag::__parent) {
6536 return std::result::Result::Err(A::Error::duplicate_field(
6537 "multiple values for parent",
6538 ));
6539 }
6540 result.parent = map
6541 .next_value::<std::option::Option<std::string::String>>()?
6542 .unwrap_or_default();
6543 }
6544 __FieldTag::__page_size => {
6545 if !fields.insert(__FieldTag::__page_size) {
6546 return std::result::Result::Err(A::Error::duplicate_field(
6547 "multiple values for page_size",
6548 ));
6549 }
6550 struct __With(std::option::Option<i32>);
6551 impl<'de> serde::de::Deserialize<'de> for __With {
6552 fn deserialize<D>(
6553 deserializer: D,
6554 ) -> std::result::Result<Self, D::Error>
6555 where
6556 D: serde::de::Deserializer<'de>,
6557 {
6558 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
6559 }
6560 }
6561 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
6562 }
6563 __FieldTag::__page_token => {
6564 if !fields.insert(__FieldTag::__page_token) {
6565 return std::result::Result::Err(A::Error::duplicate_field(
6566 "multiple values for page_token",
6567 ));
6568 }
6569 result.page_token = map
6570 .next_value::<std::option::Option<std::string::String>>()?
6571 .unwrap_or_default();
6572 }
6573 __FieldTag::__order_by => {
6574 if !fields.insert(__FieldTag::__order_by) {
6575 return std::result::Result::Err(A::Error::duplicate_field(
6576 "multiple values for order_by",
6577 ));
6578 }
6579 result.order_by = map
6580 .next_value::<std::option::Option<std::string::String>>()?
6581 .unwrap_or_default();
6582 }
6583 __FieldTag::__filter => {
6584 if !fields.insert(__FieldTag::__filter) {
6585 return std::result::Result::Err(A::Error::duplicate_field(
6586 "multiple values for filter",
6587 ));
6588 }
6589 result.filter = map
6590 .next_value::<std::option::Option<std::string::String>>()?
6591 .unwrap_or_default();
6592 }
6593 __FieldTag::Unknown(key) => {
6594 let value = map.next_value::<serde_json::Value>()?;
6595 result._unknown_fields.insert(key, value);
6596 }
6597 }
6598 }
6599 std::result::Result::Ok(result)
6600 }
6601 }
6602 deserializer.deserialize_any(Visitor)
6603 }
6604}
6605
6606#[doc(hidden)]
6607impl serde::ser::Serialize for ListWorkspacesRequest {
6608 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6609 where
6610 S: serde::ser::Serializer,
6611 {
6612 use serde::ser::SerializeMap;
6613 #[allow(unused_imports)]
6614 use std::option::Option::Some;
6615 let mut state = serializer.serialize_map(std::option::Option::None)?;
6616 if !self.parent.is_empty() {
6617 state.serialize_entry("parent", &self.parent)?;
6618 }
6619 if !wkt::internal::is_default(&self.page_size) {
6620 struct __With<'a>(&'a i32);
6621 impl<'a> serde::ser::Serialize for __With<'a> {
6622 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6623 where
6624 S: serde::ser::Serializer,
6625 {
6626 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
6627 }
6628 }
6629 state.serialize_entry("pageSize", &__With(&self.page_size))?;
6630 }
6631 if !self.page_token.is_empty() {
6632 state.serialize_entry("pageToken", &self.page_token)?;
6633 }
6634 if !self.order_by.is_empty() {
6635 state.serialize_entry("orderBy", &self.order_by)?;
6636 }
6637 if !self.filter.is_empty() {
6638 state.serialize_entry("filter", &self.filter)?;
6639 }
6640 if !self._unknown_fields.is_empty() {
6641 for (key, value) in self._unknown_fields.iter() {
6642 state.serialize_entry(key, &value)?;
6643 }
6644 }
6645 state.end()
6646 }
6647}
6648
6649impl std::fmt::Debug for ListWorkspacesRequest {
6650 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6651 let mut debug_struct = f.debug_struct("ListWorkspacesRequest");
6652 debug_struct.field("parent", &self.parent);
6653 debug_struct.field("page_size", &self.page_size);
6654 debug_struct.field("page_token", &self.page_token);
6655 debug_struct.field("order_by", &self.order_by);
6656 debug_struct.field("filter", &self.filter);
6657 if !self._unknown_fields.is_empty() {
6658 debug_struct.field("_unknown_fields", &self._unknown_fields);
6659 }
6660 debug_struct.finish()
6661 }
6662}
6663
6664#[derive(Clone, Default, PartialEq)]
6666#[non_exhaustive]
6667pub struct ListWorkspacesResponse {
6668 pub workspaces: std::vec::Vec<crate::model::Workspace>,
6670
6671 pub next_page_token: std::string::String,
6674
6675 pub unreachable: std::vec::Vec<std::string::String>,
6677
6678 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6679}
6680
6681impl ListWorkspacesResponse {
6682 pub fn new() -> Self {
6683 std::default::Default::default()
6684 }
6685
6686 pub fn set_workspaces<T, V>(mut self, v: T) -> Self
6688 where
6689 T: std::iter::IntoIterator<Item = V>,
6690 V: std::convert::Into<crate::model::Workspace>,
6691 {
6692 use std::iter::Iterator;
6693 self.workspaces = v.into_iter().map(|i| i.into()).collect();
6694 self
6695 }
6696
6697 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6699 self.next_page_token = v.into();
6700 self
6701 }
6702
6703 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6705 where
6706 T: std::iter::IntoIterator<Item = V>,
6707 V: std::convert::Into<std::string::String>,
6708 {
6709 use std::iter::Iterator;
6710 self.unreachable = v.into_iter().map(|i| i.into()).collect();
6711 self
6712 }
6713}
6714
6715impl wkt::message::Message for ListWorkspacesResponse {
6716 fn typename() -> &'static str {
6717 "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
6718 }
6719}
6720
6721#[doc(hidden)]
6722impl gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
6723 type PageItem = crate::model::Workspace;
6724
6725 fn items(self) -> std::vec::Vec<Self::PageItem> {
6726 self.workspaces
6727 }
6728
6729 fn next_page_token(&self) -> std::string::String {
6730 use std::clone::Clone;
6731 self.next_page_token.clone()
6732 }
6733}
6734
6735#[doc(hidden)]
6736impl<'de> serde::de::Deserialize<'de> for ListWorkspacesResponse {
6737 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6738 where
6739 D: serde::Deserializer<'de>,
6740 {
6741 #[allow(non_camel_case_types)]
6742 #[doc(hidden)]
6743 #[derive(PartialEq, Eq, Hash)]
6744 enum __FieldTag {
6745 __workspaces,
6746 __next_page_token,
6747 __unreachable,
6748 Unknown(std::string::String),
6749 }
6750 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6751 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6752 where
6753 D: serde::Deserializer<'de>,
6754 {
6755 struct Visitor;
6756 impl<'de> serde::de::Visitor<'de> for Visitor {
6757 type Value = __FieldTag;
6758 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6759 formatter.write_str("a field name for ListWorkspacesResponse")
6760 }
6761 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6762 where
6763 E: serde::de::Error,
6764 {
6765 use std::result::Result::Ok;
6766 use std::string::ToString;
6767 match value {
6768 "workspaces" => Ok(__FieldTag::__workspaces),
6769 "nextPageToken" => Ok(__FieldTag::__next_page_token),
6770 "next_page_token" => Ok(__FieldTag::__next_page_token),
6771 "unreachable" => Ok(__FieldTag::__unreachable),
6772 _ => Ok(__FieldTag::Unknown(value.to_string())),
6773 }
6774 }
6775 }
6776 deserializer.deserialize_identifier(Visitor)
6777 }
6778 }
6779 struct Visitor;
6780 impl<'de> serde::de::Visitor<'de> for Visitor {
6781 type Value = ListWorkspacesResponse;
6782 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6783 formatter.write_str("struct ListWorkspacesResponse")
6784 }
6785 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6786 where
6787 A: serde::de::MapAccess<'de>,
6788 {
6789 #[allow(unused_imports)]
6790 use serde::de::Error;
6791 use std::option::Option::Some;
6792 let mut fields = std::collections::HashSet::new();
6793 let mut result = Self::Value::new();
6794 while let Some(tag) = map.next_key::<__FieldTag>()? {
6795 #[allow(clippy::match_single_binding)]
6796 match tag {
6797 __FieldTag::__workspaces => {
6798 if !fields.insert(__FieldTag::__workspaces) {
6799 return std::result::Result::Err(A::Error::duplicate_field(
6800 "multiple values for workspaces",
6801 ));
6802 }
6803 result.workspaces = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Workspace>>>()?.unwrap_or_default();
6804 }
6805 __FieldTag::__next_page_token => {
6806 if !fields.insert(__FieldTag::__next_page_token) {
6807 return std::result::Result::Err(A::Error::duplicate_field(
6808 "multiple values for next_page_token",
6809 ));
6810 }
6811 result.next_page_token = map
6812 .next_value::<std::option::Option<std::string::String>>()?
6813 .unwrap_or_default();
6814 }
6815 __FieldTag::__unreachable => {
6816 if !fields.insert(__FieldTag::__unreachable) {
6817 return std::result::Result::Err(A::Error::duplicate_field(
6818 "multiple values for unreachable",
6819 ));
6820 }
6821 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
6822 }
6823 __FieldTag::Unknown(key) => {
6824 let value = map.next_value::<serde_json::Value>()?;
6825 result._unknown_fields.insert(key, value);
6826 }
6827 }
6828 }
6829 std::result::Result::Ok(result)
6830 }
6831 }
6832 deserializer.deserialize_any(Visitor)
6833 }
6834}
6835
6836#[doc(hidden)]
6837impl serde::ser::Serialize for ListWorkspacesResponse {
6838 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6839 where
6840 S: serde::ser::Serializer,
6841 {
6842 use serde::ser::SerializeMap;
6843 #[allow(unused_imports)]
6844 use std::option::Option::Some;
6845 let mut state = serializer.serialize_map(std::option::Option::None)?;
6846 if !self.workspaces.is_empty() {
6847 state.serialize_entry("workspaces", &self.workspaces)?;
6848 }
6849 if !self.next_page_token.is_empty() {
6850 state.serialize_entry("nextPageToken", &self.next_page_token)?;
6851 }
6852 if !self.unreachable.is_empty() {
6853 state.serialize_entry("unreachable", &self.unreachable)?;
6854 }
6855 if !self._unknown_fields.is_empty() {
6856 for (key, value) in self._unknown_fields.iter() {
6857 state.serialize_entry(key, &value)?;
6858 }
6859 }
6860 state.end()
6861 }
6862}
6863
6864impl std::fmt::Debug for ListWorkspacesResponse {
6865 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6866 let mut debug_struct = f.debug_struct("ListWorkspacesResponse");
6867 debug_struct.field("workspaces", &self.workspaces);
6868 debug_struct.field("next_page_token", &self.next_page_token);
6869 debug_struct.field("unreachable", &self.unreachable);
6870 if !self._unknown_fields.is_empty() {
6871 debug_struct.field("_unknown_fields", &self._unknown_fields);
6872 }
6873 debug_struct.finish()
6874 }
6875}
6876
6877#[derive(Clone, Default, PartialEq)]
6879#[non_exhaustive]
6880pub struct GetWorkspaceRequest {
6881 pub name: std::string::String,
6883
6884 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6885}
6886
6887impl GetWorkspaceRequest {
6888 pub fn new() -> Self {
6889 std::default::Default::default()
6890 }
6891
6892 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6894 self.name = v.into();
6895 self
6896 }
6897}
6898
6899impl wkt::message::Message for GetWorkspaceRequest {
6900 fn typename() -> &'static str {
6901 "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
6902 }
6903}
6904
6905#[doc(hidden)]
6906impl<'de> serde::de::Deserialize<'de> for GetWorkspaceRequest {
6907 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6908 where
6909 D: serde::Deserializer<'de>,
6910 {
6911 #[allow(non_camel_case_types)]
6912 #[doc(hidden)]
6913 #[derive(PartialEq, Eq, Hash)]
6914 enum __FieldTag {
6915 __name,
6916 Unknown(std::string::String),
6917 }
6918 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
6919 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6920 where
6921 D: serde::Deserializer<'de>,
6922 {
6923 struct Visitor;
6924 impl<'de> serde::de::Visitor<'de> for Visitor {
6925 type Value = __FieldTag;
6926 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6927 formatter.write_str("a field name for GetWorkspaceRequest")
6928 }
6929 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
6930 where
6931 E: serde::de::Error,
6932 {
6933 use std::result::Result::Ok;
6934 use std::string::ToString;
6935 match value {
6936 "name" => Ok(__FieldTag::__name),
6937 _ => Ok(__FieldTag::Unknown(value.to_string())),
6938 }
6939 }
6940 }
6941 deserializer.deserialize_identifier(Visitor)
6942 }
6943 }
6944 struct Visitor;
6945 impl<'de> serde::de::Visitor<'de> for Visitor {
6946 type Value = GetWorkspaceRequest;
6947 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
6948 formatter.write_str("struct GetWorkspaceRequest")
6949 }
6950 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
6951 where
6952 A: serde::de::MapAccess<'de>,
6953 {
6954 #[allow(unused_imports)]
6955 use serde::de::Error;
6956 use std::option::Option::Some;
6957 let mut fields = std::collections::HashSet::new();
6958 let mut result = Self::Value::new();
6959 while let Some(tag) = map.next_key::<__FieldTag>()? {
6960 #[allow(clippy::match_single_binding)]
6961 match tag {
6962 __FieldTag::__name => {
6963 if !fields.insert(__FieldTag::__name) {
6964 return std::result::Result::Err(A::Error::duplicate_field(
6965 "multiple values for name",
6966 ));
6967 }
6968 result.name = map
6969 .next_value::<std::option::Option<std::string::String>>()?
6970 .unwrap_or_default();
6971 }
6972 __FieldTag::Unknown(key) => {
6973 let value = map.next_value::<serde_json::Value>()?;
6974 result._unknown_fields.insert(key, value);
6975 }
6976 }
6977 }
6978 std::result::Result::Ok(result)
6979 }
6980 }
6981 deserializer.deserialize_any(Visitor)
6982 }
6983}
6984
6985#[doc(hidden)]
6986impl serde::ser::Serialize for GetWorkspaceRequest {
6987 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6988 where
6989 S: serde::ser::Serializer,
6990 {
6991 use serde::ser::SerializeMap;
6992 #[allow(unused_imports)]
6993 use std::option::Option::Some;
6994 let mut state = serializer.serialize_map(std::option::Option::None)?;
6995 if !self.name.is_empty() {
6996 state.serialize_entry("name", &self.name)?;
6997 }
6998 if !self._unknown_fields.is_empty() {
6999 for (key, value) in self._unknown_fields.iter() {
7000 state.serialize_entry(key, &value)?;
7001 }
7002 }
7003 state.end()
7004 }
7005}
7006
7007impl std::fmt::Debug for GetWorkspaceRequest {
7008 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7009 let mut debug_struct = f.debug_struct("GetWorkspaceRequest");
7010 debug_struct.field("name", &self.name);
7011 if !self._unknown_fields.is_empty() {
7012 debug_struct.field("_unknown_fields", &self._unknown_fields);
7013 }
7014 debug_struct.finish()
7015 }
7016}
7017
7018#[derive(Clone, Default, PartialEq)]
7020#[non_exhaustive]
7021pub struct CreateWorkspaceRequest {
7022 pub parent: std::string::String,
7025
7026 pub workspace: std::option::Option<crate::model::Workspace>,
7028
7029 pub workspace_id: std::string::String,
7032
7033 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7034}
7035
7036impl CreateWorkspaceRequest {
7037 pub fn new() -> Self {
7038 std::default::Default::default()
7039 }
7040
7041 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7043 self.parent = v.into();
7044 self
7045 }
7046
7047 pub fn set_workspace<T>(mut self, v: T) -> Self
7049 where
7050 T: std::convert::Into<crate::model::Workspace>,
7051 {
7052 self.workspace = std::option::Option::Some(v.into());
7053 self
7054 }
7055
7056 pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
7058 where
7059 T: std::convert::Into<crate::model::Workspace>,
7060 {
7061 self.workspace = v.map(|x| x.into());
7062 self
7063 }
7064
7065 pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7067 self.workspace_id = v.into();
7068 self
7069 }
7070}
7071
7072impl wkt::message::Message for CreateWorkspaceRequest {
7073 fn typename() -> &'static str {
7074 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
7075 }
7076}
7077
7078#[doc(hidden)]
7079impl<'de> serde::de::Deserialize<'de> for CreateWorkspaceRequest {
7080 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7081 where
7082 D: serde::Deserializer<'de>,
7083 {
7084 #[allow(non_camel_case_types)]
7085 #[doc(hidden)]
7086 #[derive(PartialEq, Eq, Hash)]
7087 enum __FieldTag {
7088 __parent,
7089 __workspace,
7090 __workspace_id,
7091 Unknown(std::string::String),
7092 }
7093 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7094 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7095 where
7096 D: serde::Deserializer<'de>,
7097 {
7098 struct Visitor;
7099 impl<'de> serde::de::Visitor<'de> for Visitor {
7100 type Value = __FieldTag;
7101 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7102 formatter.write_str("a field name for CreateWorkspaceRequest")
7103 }
7104 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7105 where
7106 E: serde::de::Error,
7107 {
7108 use std::result::Result::Ok;
7109 use std::string::ToString;
7110 match value {
7111 "parent" => Ok(__FieldTag::__parent),
7112 "workspace" => Ok(__FieldTag::__workspace),
7113 "workspaceId" => Ok(__FieldTag::__workspace_id),
7114 "workspace_id" => Ok(__FieldTag::__workspace_id),
7115 _ => Ok(__FieldTag::Unknown(value.to_string())),
7116 }
7117 }
7118 }
7119 deserializer.deserialize_identifier(Visitor)
7120 }
7121 }
7122 struct Visitor;
7123 impl<'de> serde::de::Visitor<'de> for Visitor {
7124 type Value = CreateWorkspaceRequest;
7125 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7126 formatter.write_str("struct CreateWorkspaceRequest")
7127 }
7128 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7129 where
7130 A: serde::de::MapAccess<'de>,
7131 {
7132 #[allow(unused_imports)]
7133 use serde::de::Error;
7134 use std::option::Option::Some;
7135 let mut fields = std::collections::HashSet::new();
7136 let mut result = Self::Value::new();
7137 while let Some(tag) = map.next_key::<__FieldTag>()? {
7138 #[allow(clippy::match_single_binding)]
7139 match tag {
7140 __FieldTag::__parent => {
7141 if !fields.insert(__FieldTag::__parent) {
7142 return std::result::Result::Err(A::Error::duplicate_field(
7143 "multiple values for parent",
7144 ));
7145 }
7146 result.parent = map
7147 .next_value::<std::option::Option<std::string::String>>()?
7148 .unwrap_or_default();
7149 }
7150 __FieldTag::__workspace => {
7151 if !fields.insert(__FieldTag::__workspace) {
7152 return std::result::Result::Err(A::Error::duplicate_field(
7153 "multiple values for workspace",
7154 ));
7155 }
7156 result.workspace =
7157 map.next_value::<std::option::Option<crate::model::Workspace>>()?;
7158 }
7159 __FieldTag::__workspace_id => {
7160 if !fields.insert(__FieldTag::__workspace_id) {
7161 return std::result::Result::Err(A::Error::duplicate_field(
7162 "multiple values for workspace_id",
7163 ));
7164 }
7165 result.workspace_id = map
7166 .next_value::<std::option::Option<std::string::String>>()?
7167 .unwrap_or_default();
7168 }
7169 __FieldTag::Unknown(key) => {
7170 let value = map.next_value::<serde_json::Value>()?;
7171 result._unknown_fields.insert(key, value);
7172 }
7173 }
7174 }
7175 std::result::Result::Ok(result)
7176 }
7177 }
7178 deserializer.deserialize_any(Visitor)
7179 }
7180}
7181
7182#[doc(hidden)]
7183impl serde::ser::Serialize for CreateWorkspaceRequest {
7184 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7185 where
7186 S: serde::ser::Serializer,
7187 {
7188 use serde::ser::SerializeMap;
7189 #[allow(unused_imports)]
7190 use std::option::Option::Some;
7191 let mut state = serializer.serialize_map(std::option::Option::None)?;
7192 if !self.parent.is_empty() {
7193 state.serialize_entry("parent", &self.parent)?;
7194 }
7195 if self.workspace.is_some() {
7196 state.serialize_entry("workspace", &self.workspace)?;
7197 }
7198 if !self.workspace_id.is_empty() {
7199 state.serialize_entry("workspaceId", &self.workspace_id)?;
7200 }
7201 if !self._unknown_fields.is_empty() {
7202 for (key, value) in self._unknown_fields.iter() {
7203 state.serialize_entry(key, &value)?;
7204 }
7205 }
7206 state.end()
7207 }
7208}
7209
7210impl std::fmt::Debug for CreateWorkspaceRequest {
7211 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7212 let mut debug_struct = f.debug_struct("CreateWorkspaceRequest");
7213 debug_struct.field("parent", &self.parent);
7214 debug_struct.field("workspace", &self.workspace);
7215 debug_struct.field("workspace_id", &self.workspace_id);
7216 if !self._unknown_fields.is_empty() {
7217 debug_struct.field("_unknown_fields", &self._unknown_fields);
7218 }
7219 debug_struct.finish()
7220 }
7221}
7222
7223#[derive(Clone, Default, PartialEq)]
7225#[non_exhaustive]
7226pub struct DeleteWorkspaceRequest {
7227 pub name: std::string::String,
7229
7230 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7231}
7232
7233impl DeleteWorkspaceRequest {
7234 pub fn new() -> Self {
7235 std::default::Default::default()
7236 }
7237
7238 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7240 self.name = v.into();
7241 self
7242 }
7243}
7244
7245impl wkt::message::Message for DeleteWorkspaceRequest {
7246 fn typename() -> &'static str {
7247 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
7248 }
7249}
7250
7251#[doc(hidden)]
7252impl<'de> serde::de::Deserialize<'de> for DeleteWorkspaceRequest {
7253 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7254 where
7255 D: serde::Deserializer<'de>,
7256 {
7257 #[allow(non_camel_case_types)]
7258 #[doc(hidden)]
7259 #[derive(PartialEq, Eq, Hash)]
7260 enum __FieldTag {
7261 __name,
7262 Unknown(std::string::String),
7263 }
7264 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7265 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7266 where
7267 D: serde::Deserializer<'de>,
7268 {
7269 struct Visitor;
7270 impl<'de> serde::de::Visitor<'de> for Visitor {
7271 type Value = __FieldTag;
7272 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7273 formatter.write_str("a field name for DeleteWorkspaceRequest")
7274 }
7275 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7276 where
7277 E: serde::de::Error,
7278 {
7279 use std::result::Result::Ok;
7280 use std::string::ToString;
7281 match value {
7282 "name" => Ok(__FieldTag::__name),
7283 _ => Ok(__FieldTag::Unknown(value.to_string())),
7284 }
7285 }
7286 }
7287 deserializer.deserialize_identifier(Visitor)
7288 }
7289 }
7290 struct Visitor;
7291 impl<'de> serde::de::Visitor<'de> for Visitor {
7292 type Value = DeleteWorkspaceRequest;
7293 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7294 formatter.write_str("struct DeleteWorkspaceRequest")
7295 }
7296 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7297 where
7298 A: serde::de::MapAccess<'de>,
7299 {
7300 #[allow(unused_imports)]
7301 use serde::de::Error;
7302 use std::option::Option::Some;
7303 let mut fields = std::collections::HashSet::new();
7304 let mut result = Self::Value::new();
7305 while let Some(tag) = map.next_key::<__FieldTag>()? {
7306 #[allow(clippy::match_single_binding)]
7307 match tag {
7308 __FieldTag::__name => {
7309 if !fields.insert(__FieldTag::__name) {
7310 return std::result::Result::Err(A::Error::duplicate_field(
7311 "multiple values for name",
7312 ));
7313 }
7314 result.name = map
7315 .next_value::<std::option::Option<std::string::String>>()?
7316 .unwrap_or_default();
7317 }
7318 __FieldTag::Unknown(key) => {
7319 let value = map.next_value::<serde_json::Value>()?;
7320 result._unknown_fields.insert(key, value);
7321 }
7322 }
7323 }
7324 std::result::Result::Ok(result)
7325 }
7326 }
7327 deserializer.deserialize_any(Visitor)
7328 }
7329}
7330
7331#[doc(hidden)]
7332impl serde::ser::Serialize for DeleteWorkspaceRequest {
7333 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7334 where
7335 S: serde::ser::Serializer,
7336 {
7337 use serde::ser::SerializeMap;
7338 #[allow(unused_imports)]
7339 use std::option::Option::Some;
7340 let mut state = serializer.serialize_map(std::option::Option::None)?;
7341 if !self.name.is_empty() {
7342 state.serialize_entry("name", &self.name)?;
7343 }
7344 if !self._unknown_fields.is_empty() {
7345 for (key, value) in self._unknown_fields.iter() {
7346 state.serialize_entry(key, &value)?;
7347 }
7348 }
7349 state.end()
7350 }
7351}
7352
7353impl std::fmt::Debug for DeleteWorkspaceRequest {
7354 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7355 let mut debug_struct = f.debug_struct("DeleteWorkspaceRequest");
7356 debug_struct.field("name", &self.name);
7357 if !self._unknown_fields.is_empty() {
7358 debug_struct.field("_unknown_fields", &self._unknown_fields);
7359 }
7360 debug_struct.finish()
7361 }
7362}
7363
7364#[derive(Clone, Default, PartialEq)]
7366#[non_exhaustive]
7367pub struct CommitAuthor {
7368 pub name: std::string::String,
7370
7371 pub email_address: std::string::String,
7373
7374 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7375}
7376
7377impl CommitAuthor {
7378 pub fn new() -> Self {
7379 std::default::Default::default()
7380 }
7381
7382 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7384 self.name = v.into();
7385 self
7386 }
7387
7388 pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7390 self.email_address = v.into();
7391 self
7392 }
7393}
7394
7395impl wkt::message::Message for CommitAuthor {
7396 fn typename() -> &'static str {
7397 "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
7398 }
7399}
7400
7401#[doc(hidden)]
7402impl<'de> serde::de::Deserialize<'de> for CommitAuthor {
7403 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7404 where
7405 D: serde::Deserializer<'de>,
7406 {
7407 #[allow(non_camel_case_types)]
7408 #[doc(hidden)]
7409 #[derive(PartialEq, Eq, Hash)]
7410 enum __FieldTag {
7411 __name,
7412 __email_address,
7413 Unknown(std::string::String),
7414 }
7415 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7416 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7417 where
7418 D: serde::Deserializer<'de>,
7419 {
7420 struct Visitor;
7421 impl<'de> serde::de::Visitor<'de> for Visitor {
7422 type Value = __FieldTag;
7423 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7424 formatter.write_str("a field name for CommitAuthor")
7425 }
7426 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7427 where
7428 E: serde::de::Error,
7429 {
7430 use std::result::Result::Ok;
7431 use std::string::ToString;
7432 match value {
7433 "name" => Ok(__FieldTag::__name),
7434 "emailAddress" => Ok(__FieldTag::__email_address),
7435 "email_address" => Ok(__FieldTag::__email_address),
7436 _ => Ok(__FieldTag::Unknown(value.to_string())),
7437 }
7438 }
7439 }
7440 deserializer.deserialize_identifier(Visitor)
7441 }
7442 }
7443 struct Visitor;
7444 impl<'de> serde::de::Visitor<'de> for Visitor {
7445 type Value = CommitAuthor;
7446 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7447 formatter.write_str("struct CommitAuthor")
7448 }
7449 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7450 where
7451 A: serde::de::MapAccess<'de>,
7452 {
7453 #[allow(unused_imports)]
7454 use serde::de::Error;
7455 use std::option::Option::Some;
7456 let mut fields = std::collections::HashSet::new();
7457 let mut result = Self::Value::new();
7458 while let Some(tag) = map.next_key::<__FieldTag>()? {
7459 #[allow(clippy::match_single_binding)]
7460 match tag {
7461 __FieldTag::__name => {
7462 if !fields.insert(__FieldTag::__name) {
7463 return std::result::Result::Err(A::Error::duplicate_field(
7464 "multiple values for name",
7465 ));
7466 }
7467 result.name = map
7468 .next_value::<std::option::Option<std::string::String>>()?
7469 .unwrap_or_default();
7470 }
7471 __FieldTag::__email_address => {
7472 if !fields.insert(__FieldTag::__email_address) {
7473 return std::result::Result::Err(A::Error::duplicate_field(
7474 "multiple values for email_address",
7475 ));
7476 }
7477 result.email_address = map
7478 .next_value::<std::option::Option<std::string::String>>()?
7479 .unwrap_or_default();
7480 }
7481 __FieldTag::Unknown(key) => {
7482 let value = map.next_value::<serde_json::Value>()?;
7483 result._unknown_fields.insert(key, value);
7484 }
7485 }
7486 }
7487 std::result::Result::Ok(result)
7488 }
7489 }
7490 deserializer.deserialize_any(Visitor)
7491 }
7492}
7493
7494#[doc(hidden)]
7495impl serde::ser::Serialize for CommitAuthor {
7496 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7497 where
7498 S: serde::ser::Serializer,
7499 {
7500 use serde::ser::SerializeMap;
7501 #[allow(unused_imports)]
7502 use std::option::Option::Some;
7503 let mut state = serializer.serialize_map(std::option::Option::None)?;
7504 if !self.name.is_empty() {
7505 state.serialize_entry("name", &self.name)?;
7506 }
7507 if !self.email_address.is_empty() {
7508 state.serialize_entry("emailAddress", &self.email_address)?;
7509 }
7510 if !self._unknown_fields.is_empty() {
7511 for (key, value) in self._unknown_fields.iter() {
7512 state.serialize_entry(key, &value)?;
7513 }
7514 }
7515 state.end()
7516 }
7517}
7518
7519impl std::fmt::Debug for CommitAuthor {
7520 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7521 let mut debug_struct = f.debug_struct("CommitAuthor");
7522 debug_struct.field("name", &self.name);
7523 debug_struct.field("email_address", &self.email_address);
7524 if !self._unknown_fields.is_empty() {
7525 debug_struct.field("_unknown_fields", &self._unknown_fields);
7526 }
7527 debug_struct.finish()
7528 }
7529}
7530
7531#[derive(Clone, Default, PartialEq)]
7533#[non_exhaustive]
7534pub struct PullGitCommitsRequest {
7535 pub name: std::string::String,
7537
7538 pub remote_branch: std::string::String,
7541
7542 pub author: std::option::Option<crate::model::CommitAuthor>,
7545
7546 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7547}
7548
7549impl PullGitCommitsRequest {
7550 pub fn new() -> Self {
7551 std::default::Default::default()
7552 }
7553
7554 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7556 self.name = v.into();
7557 self
7558 }
7559
7560 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7562 self.remote_branch = v.into();
7563 self
7564 }
7565
7566 pub fn set_author<T>(mut self, v: T) -> Self
7568 where
7569 T: std::convert::Into<crate::model::CommitAuthor>,
7570 {
7571 self.author = std::option::Option::Some(v.into());
7572 self
7573 }
7574
7575 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
7577 where
7578 T: std::convert::Into<crate::model::CommitAuthor>,
7579 {
7580 self.author = v.map(|x| x.into());
7581 self
7582 }
7583}
7584
7585impl wkt::message::Message for PullGitCommitsRequest {
7586 fn typename() -> &'static str {
7587 "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
7588 }
7589}
7590
7591#[doc(hidden)]
7592impl<'de> serde::de::Deserialize<'de> for PullGitCommitsRequest {
7593 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7594 where
7595 D: serde::Deserializer<'de>,
7596 {
7597 #[allow(non_camel_case_types)]
7598 #[doc(hidden)]
7599 #[derive(PartialEq, Eq, Hash)]
7600 enum __FieldTag {
7601 __name,
7602 __remote_branch,
7603 __author,
7604 Unknown(std::string::String),
7605 }
7606 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7607 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7608 where
7609 D: serde::Deserializer<'de>,
7610 {
7611 struct Visitor;
7612 impl<'de> serde::de::Visitor<'de> for Visitor {
7613 type Value = __FieldTag;
7614 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7615 formatter.write_str("a field name for PullGitCommitsRequest")
7616 }
7617 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7618 where
7619 E: serde::de::Error,
7620 {
7621 use std::result::Result::Ok;
7622 use std::string::ToString;
7623 match value {
7624 "name" => Ok(__FieldTag::__name),
7625 "remoteBranch" => Ok(__FieldTag::__remote_branch),
7626 "remote_branch" => Ok(__FieldTag::__remote_branch),
7627 "author" => Ok(__FieldTag::__author),
7628 _ => Ok(__FieldTag::Unknown(value.to_string())),
7629 }
7630 }
7631 }
7632 deserializer.deserialize_identifier(Visitor)
7633 }
7634 }
7635 struct Visitor;
7636 impl<'de> serde::de::Visitor<'de> for Visitor {
7637 type Value = PullGitCommitsRequest;
7638 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7639 formatter.write_str("struct PullGitCommitsRequest")
7640 }
7641 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7642 where
7643 A: serde::de::MapAccess<'de>,
7644 {
7645 #[allow(unused_imports)]
7646 use serde::de::Error;
7647 use std::option::Option::Some;
7648 let mut fields = std::collections::HashSet::new();
7649 let mut result = Self::Value::new();
7650 while let Some(tag) = map.next_key::<__FieldTag>()? {
7651 #[allow(clippy::match_single_binding)]
7652 match tag {
7653 __FieldTag::__name => {
7654 if !fields.insert(__FieldTag::__name) {
7655 return std::result::Result::Err(A::Error::duplicate_field(
7656 "multiple values for name",
7657 ));
7658 }
7659 result.name = map
7660 .next_value::<std::option::Option<std::string::String>>()?
7661 .unwrap_or_default();
7662 }
7663 __FieldTag::__remote_branch => {
7664 if !fields.insert(__FieldTag::__remote_branch) {
7665 return std::result::Result::Err(A::Error::duplicate_field(
7666 "multiple values for remote_branch",
7667 ));
7668 }
7669 result.remote_branch = map
7670 .next_value::<std::option::Option<std::string::String>>()?
7671 .unwrap_or_default();
7672 }
7673 __FieldTag::__author => {
7674 if !fields.insert(__FieldTag::__author) {
7675 return std::result::Result::Err(A::Error::duplicate_field(
7676 "multiple values for author",
7677 ));
7678 }
7679 result.author = map
7680 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
7681 }
7682 __FieldTag::Unknown(key) => {
7683 let value = map.next_value::<serde_json::Value>()?;
7684 result._unknown_fields.insert(key, value);
7685 }
7686 }
7687 }
7688 std::result::Result::Ok(result)
7689 }
7690 }
7691 deserializer.deserialize_any(Visitor)
7692 }
7693}
7694
7695#[doc(hidden)]
7696impl serde::ser::Serialize for PullGitCommitsRequest {
7697 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7698 where
7699 S: serde::ser::Serializer,
7700 {
7701 use serde::ser::SerializeMap;
7702 #[allow(unused_imports)]
7703 use std::option::Option::Some;
7704 let mut state = serializer.serialize_map(std::option::Option::None)?;
7705 if !self.name.is_empty() {
7706 state.serialize_entry("name", &self.name)?;
7707 }
7708 if !self.remote_branch.is_empty() {
7709 state.serialize_entry("remoteBranch", &self.remote_branch)?;
7710 }
7711 if self.author.is_some() {
7712 state.serialize_entry("author", &self.author)?;
7713 }
7714 if !self._unknown_fields.is_empty() {
7715 for (key, value) in self._unknown_fields.iter() {
7716 state.serialize_entry(key, &value)?;
7717 }
7718 }
7719 state.end()
7720 }
7721}
7722
7723impl std::fmt::Debug for PullGitCommitsRequest {
7724 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7725 let mut debug_struct = f.debug_struct("PullGitCommitsRequest");
7726 debug_struct.field("name", &self.name);
7727 debug_struct.field("remote_branch", &self.remote_branch);
7728 debug_struct.field("author", &self.author);
7729 if !self._unknown_fields.is_empty() {
7730 debug_struct.field("_unknown_fields", &self._unknown_fields);
7731 }
7732 debug_struct.finish()
7733 }
7734}
7735
7736#[derive(Clone, Default, PartialEq)]
7738#[non_exhaustive]
7739pub struct PullGitCommitsResponse {
7740 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7741}
7742
7743impl PullGitCommitsResponse {
7744 pub fn new() -> Self {
7745 std::default::Default::default()
7746 }
7747}
7748
7749impl wkt::message::Message for PullGitCommitsResponse {
7750 fn typename() -> &'static str {
7751 "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
7752 }
7753}
7754
7755#[doc(hidden)]
7756impl<'de> serde::de::Deserialize<'de> for PullGitCommitsResponse {
7757 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7758 where
7759 D: serde::Deserializer<'de>,
7760 {
7761 #[allow(non_camel_case_types)]
7762 #[doc(hidden)]
7763 #[derive(PartialEq, Eq, Hash)]
7764 enum __FieldTag {
7765 Unknown(std::string::String),
7766 }
7767 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7768 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7769 where
7770 D: serde::Deserializer<'de>,
7771 {
7772 struct Visitor;
7773 impl<'de> serde::de::Visitor<'de> for Visitor {
7774 type Value = __FieldTag;
7775 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7776 formatter.write_str("a field name for PullGitCommitsResponse")
7777 }
7778 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7779 where
7780 E: serde::de::Error,
7781 {
7782 use std::result::Result::Ok;
7783 use std::string::ToString;
7784 Ok(__FieldTag::Unknown(value.to_string()))
7785 }
7786 }
7787 deserializer.deserialize_identifier(Visitor)
7788 }
7789 }
7790 struct Visitor;
7791 impl<'de> serde::de::Visitor<'de> for Visitor {
7792 type Value = PullGitCommitsResponse;
7793 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7794 formatter.write_str("struct PullGitCommitsResponse")
7795 }
7796 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7797 where
7798 A: serde::de::MapAccess<'de>,
7799 {
7800 #[allow(unused_imports)]
7801 use serde::de::Error;
7802 use std::option::Option::Some;
7803 let mut result = Self::Value::new();
7804 while let Some(tag) = map.next_key::<__FieldTag>()? {
7805 #[allow(clippy::match_single_binding)]
7806 match tag {
7807 __FieldTag::Unknown(key) => {
7808 let value = map.next_value::<serde_json::Value>()?;
7809 result._unknown_fields.insert(key, value);
7810 }
7811 }
7812 }
7813 std::result::Result::Ok(result)
7814 }
7815 }
7816 deserializer.deserialize_any(Visitor)
7817 }
7818}
7819
7820#[doc(hidden)]
7821impl serde::ser::Serialize for PullGitCommitsResponse {
7822 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7823 where
7824 S: serde::ser::Serializer,
7825 {
7826 use serde::ser::SerializeMap;
7827 #[allow(unused_imports)]
7828 use std::option::Option::Some;
7829 let mut state = serializer.serialize_map(std::option::Option::None)?;
7830 if !self._unknown_fields.is_empty() {
7831 for (key, value) in self._unknown_fields.iter() {
7832 state.serialize_entry(key, &value)?;
7833 }
7834 }
7835 state.end()
7836 }
7837}
7838
7839impl std::fmt::Debug for PullGitCommitsResponse {
7840 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7841 let mut debug_struct = f.debug_struct("PullGitCommitsResponse");
7842 if !self._unknown_fields.is_empty() {
7843 debug_struct.field("_unknown_fields", &self._unknown_fields);
7844 }
7845 debug_struct.finish()
7846 }
7847}
7848
7849#[derive(Clone, Default, PartialEq)]
7851#[non_exhaustive]
7852pub struct PushGitCommitsRequest {
7853 pub name: std::string::String,
7855
7856 pub remote_branch: std::string::String,
7860
7861 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7862}
7863
7864impl PushGitCommitsRequest {
7865 pub fn new() -> Self {
7866 std::default::Default::default()
7867 }
7868
7869 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7871 self.name = v.into();
7872 self
7873 }
7874
7875 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7877 self.remote_branch = v.into();
7878 self
7879 }
7880}
7881
7882impl wkt::message::Message for PushGitCommitsRequest {
7883 fn typename() -> &'static str {
7884 "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
7885 }
7886}
7887
7888#[doc(hidden)]
7889impl<'de> serde::de::Deserialize<'de> for PushGitCommitsRequest {
7890 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7891 where
7892 D: serde::Deserializer<'de>,
7893 {
7894 #[allow(non_camel_case_types)]
7895 #[doc(hidden)]
7896 #[derive(PartialEq, Eq, Hash)]
7897 enum __FieldTag {
7898 __name,
7899 __remote_branch,
7900 Unknown(std::string::String),
7901 }
7902 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
7903 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7904 where
7905 D: serde::Deserializer<'de>,
7906 {
7907 struct Visitor;
7908 impl<'de> serde::de::Visitor<'de> for Visitor {
7909 type Value = __FieldTag;
7910 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7911 formatter.write_str("a field name for PushGitCommitsRequest")
7912 }
7913 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
7914 where
7915 E: serde::de::Error,
7916 {
7917 use std::result::Result::Ok;
7918 use std::string::ToString;
7919 match value {
7920 "name" => Ok(__FieldTag::__name),
7921 "remoteBranch" => Ok(__FieldTag::__remote_branch),
7922 "remote_branch" => Ok(__FieldTag::__remote_branch),
7923 _ => Ok(__FieldTag::Unknown(value.to_string())),
7924 }
7925 }
7926 }
7927 deserializer.deserialize_identifier(Visitor)
7928 }
7929 }
7930 struct Visitor;
7931 impl<'de> serde::de::Visitor<'de> for Visitor {
7932 type Value = PushGitCommitsRequest;
7933 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
7934 formatter.write_str("struct PushGitCommitsRequest")
7935 }
7936 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
7937 where
7938 A: serde::de::MapAccess<'de>,
7939 {
7940 #[allow(unused_imports)]
7941 use serde::de::Error;
7942 use std::option::Option::Some;
7943 let mut fields = std::collections::HashSet::new();
7944 let mut result = Self::Value::new();
7945 while let Some(tag) = map.next_key::<__FieldTag>()? {
7946 #[allow(clippy::match_single_binding)]
7947 match tag {
7948 __FieldTag::__name => {
7949 if !fields.insert(__FieldTag::__name) {
7950 return std::result::Result::Err(A::Error::duplicate_field(
7951 "multiple values for name",
7952 ));
7953 }
7954 result.name = map
7955 .next_value::<std::option::Option<std::string::String>>()?
7956 .unwrap_or_default();
7957 }
7958 __FieldTag::__remote_branch => {
7959 if !fields.insert(__FieldTag::__remote_branch) {
7960 return std::result::Result::Err(A::Error::duplicate_field(
7961 "multiple values for remote_branch",
7962 ));
7963 }
7964 result.remote_branch = map
7965 .next_value::<std::option::Option<std::string::String>>()?
7966 .unwrap_or_default();
7967 }
7968 __FieldTag::Unknown(key) => {
7969 let value = map.next_value::<serde_json::Value>()?;
7970 result._unknown_fields.insert(key, value);
7971 }
7972 }
7973 }
7974 std::result::Result::Ok(result)
7975 }
7976 }
7977 deserializer.deserialize_any(Visitor)
7978 }
7979}
7980
7981#[doc(hidden)]
7982impl serde::ser::Serialize for PushGitCommitsRequest {
7983 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7984 where
7985 S: serde::ser::Serializer,
7986 {
7987 use serde::ser::SerializeMap;
7988 #[allow(unused_imports)]
7989 use std::option::Option::Some;
7990 let mut state = serializer.serialize_map(std::option::Option::None)?;
7991 if !self.name.is_empty() {
7992 state.serialize_entry("name", &self.name)?;
7993 }
7994 if !self.remote_branch.is_empty() {
7995 state.serialize_entry("remoteBranch", &self.remote_branch)?;
7996 }
7997 if !self._unknown_fields.is_empty() {
7998 for (key, value) in self._unknown_fields.iter() {
7999 state.serialize_entry(key, &value)?;
8000 }
8001 }
8002 state.end()
8003 }
8004}
8005
8006impl std::fmt::Debug for PushGitCommitsRequest {
8007 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8008 let mut debug_struct = f.debug_struct("PushGitCommitsRequest");
8009 debug_struct.field("name", &self.name);
8010 debug_struct.field("remote_branch", &self.remote_branch);
8011 if !self._unknown_fields.is_empty() {
8012 debug_struct.field("_unknown_fields", &self._unknown_fields);
8013 }
8014 debug_struct.finish()
8015 }
8016}
8017
8018#[derive(Clone, Default, PartialEq)]
8020#[non_exhaustive]
8021pub struct PushGitCommitsResponse {
8022 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8023}
8024
8025impl PushGitCommitsResponse {
8026 pub fn new() -> Self {
8027 std::default::Default::default()
8028 }
8029}
8030
8031impl wkt::message::Message for PushGitCommitsResponse {
8032 fn typename() -> &'static str {
8033 "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
8034 }
8035}
8036
8037#[doc(hidden)]
8038impl<'de> serde::de::Deserialize<'de> for PushGitCommitsResponse {
8039 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8040 where
8041 D: serde::Deserializer<'de>,
8042 {
8043 #[allow(non_camel_case_types)]
8044 #[doc(hidden)]
8045 #[derive(PartialEq, Eq, Hash)]
8046 enum __FieldTag {
8047 Unknown(std::string::String),
8048 }
8049 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8050 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8051 where
8052 D: serde::Deserializer<'de>,
8053 {
8054 struct Visitor;
8055 impl<'de> serde::de::Visitor<'de> for Visitor {
8056 type Value = __FieldTag;
8057 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8058 formatter.write_str("a field name for PushGitCommitsResponse")
8059 }
8060 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8061 where
8062 E: serde::de::Error,
8063 {
8064 use std::result::Result::Ok;
8065 use std::string::ToString;
8066 Ok(__FieldTag::Unknown(value.to_string()))
8067 }
8068 }
8069 deserializer.deserialize_identifier(Visitor)
8070 }
8071 }
8072 struct Visitor;
8073 impl<'de> serde::de::Visitor<'de> for Visitor {
8074 type Value = PushGitCommitsResponse;
8075 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8076 formatter.write_str("struct PushGitCommitsResponse")
8077 }
8078 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8079 where
8080 A: serde::de::MapAccess<'de>,
8081 {
8082 #[allow(unused_imports)]
8083 use serde::de::Error;
8084 use std::option::Option::Some;
8085 let mut result = Self::Value::new();
8086 while let Some(tag) = map.next_key::<__FieldTag>()? {
8087 #[allow(clippy::match_single_binding)]
8088 match tag {
8089 __FieldTag::Unknown(key) => {
8090 let value = map.next_value::<serde_json::Value>()?;
8091 result._unknown_fields.insert(key, value);
8092 }
8093 }
8094 }
8095 std::result::Result::Ok(result)
8096 }
8097 }
8098 deserializer.deserialize_any(Visitor)
8099 }
8100}
8101
8102#[doc(hidden)]
8103impl serde::ser::Serialize for PushGitCommitsResponse {
8104 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8105 where
8106 S: serde::ser::Serializer,
8107 {
8108 use serde::ser::SerializeMap;
8109 #[allow(unused_imports)]
8110 use std::option::Option::Some;
8111 let mut state = serializer.serialize_map(std::option::Option::None)?;
8112 if !self._unknown_fields.is_empty() {
8113 for (key, value) in self._unknown_fields.iter() {
8114 state.serialize_entry(key, &value)?;
8115 }
8116 }
8117 state.end()
8118 }
8119}
8120
8121impl std::fmt::Debug for PushGitCommitsResponse {
8122 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8123 let mut debug_struct = f.debug_struct("PushGitCommitsResponse");
8124 if !self._unknown_fields.is_empty() {
8125 debug_struct.field("_unknown_fields", &self._unknown_fields);
8126 }
8127 debug_struct.finish()
8128 }
8129}
8130
8131#[derive(Clone, Default, PartialEq)]
8133#[non_exhaustive]
8134pub struct FetchFileGitStatusesRequest {
8135 pub name: std::string::String,
8137
8138 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8139}
8140
8141impl FetchFileGitStatusesRequest {
8142 pub fn new() -> Self {
8143 std::default::Default::default()
8144 }
8145
8146 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8148 self.name = v.into();
8149 self
8150 }
8151}
8152
8153impl wkt::message::Message for FetchFileGitStatusesRequest {
8154 fn typename() -> &'static str {
8155 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
8156 }
8157}
8158
8159#[doc(hidden)]
8160impl<'de> serde::de::Deserialize<'de> for FetchFileGitStatusesRequest {
8161 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8162 where
8163 D: serde::Deserializer<'de>,
8164 {
8165 #[allow(non_camel_case_types)]
8166 #[doc(hidden)]
8167 #[derive(PartialEq, Eq, Hash)]
8168 enum __FieldTag {
8169 __name,
8170 Unknown(std::string::String),
8171 }
8172 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8173 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8174 where
8175 D: serde::Deserializer<'de>,
8176 {
8177 struct Visitor;
8178 impl<'de> serde::de::Visitor<'de> for Visitor {
8179 type Value = __FieldTag;
8180 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8181 formatter.write_str("a field name for FetchFileGitStatusesRequest")
8182 }
8183 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8184 where
8185 E: serde::de::Error,
8186 {
8187 use std::result::Result::Ok;
8188 use std::string::ToString;
8189 match value {
8190 "name" => Ok(__FieldTag::__name),
8191 _ => Ok(__FieldTag::Unknown(value.to_string())),
8192 }
8193 }
8194 }
8195 deserializer.deserialize_identifier(Visitor)
8196 }
8197 }
8198 struct Visitor;
8199 impl<'de> serde::de::Visitor<'de> for Visitor {
8200 type Value = FetchFileGitStatusesRequest;
8201 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8202 formatter.write_str("struct FetchFileGitStatusesRequest")
8203 }
8204 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8205 where
8206 A: serde::de::MapAccess<'de>,
8207 {
8208 #[allow(unused_imports)]
8209 use serde::de::Error;
8210 use std::option::Option::Some;
8211 let mut fields = std::collections::HashSet::new();
8212 let mut result = Self::Value::new();
8213 while let Some(tag) = map.next_key::<__FieldTag>()? {
8214 #[allow(clippy::match_single_binding)]
8215 match tag {
8216 __FieldTag::__name => {
8217 if !fields.insert(__FieldTag::__name) {
8218 return std::result::Result::Err(A::Error::duplicate_field(
8219 "multiple values for name",
8220 ));
8221 }
8222 result.name = map
8223 .next_value::<std::option::Option<std::string::String>>()?
8224 .unwrap_or_default();
8225 }
8226 __FieldTag::Unknown(key) => {
8227 let value = map.next_value::<serde_json::Value>()?;
8228 result._unknown_fields.insert(key, value);
8229 }
8230 }
8231 }
8232 std::result::Result::Ok(result)
8233 }
8234 }
8235 deserializer.deserialize_any(Visitor)
8236 }
8237}
8238
8239#[doc(hidden)]
8240impl serde::ser::Serialize for FetchFileGitStatusesRequest {
8241 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8242 where
8243 S: serde::ser::Serializer,
8244 {
8245 use serde::ser::SerializeMap;
8246 #[allow(unused_imports)]
8247 use std::option::Option::Some;
8248 let mut state = serializer.serialize_map(std::option::Option::None)?;
8249 if !self.name.is_empty() {
8250 state.serialize_entry("name", &self.name)?;
8251 }
8252 if !self._unknown_fields.is_empty() {
8253 for (key, value) in self._unknown_fields.iter() {
8254 state.serialize_entry(key, &value)?;
8255 }
8256 }
8257 state.end()
8258 }
8259}
8260
8261impl std::fmt::Debug for FetchFileGitStatusesRequest {
8262 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8263 let mut debug_struct = f.debug_struct("FetchFileGitStatusesRequest");
8264 debug_struct.field("name", &self.name);
8265 if !self._unknown_fields.is_empty() {
8266 debug_struct.field("_unknown_fields", &self._unknown_fields);
8267 }
8268 debug_struct.finish()
8269 }
8270}
8271
8272#[derive(Clone, Default, PartialEq)]
8274#[non_exhaustive]
8275pub struct FetchFileGitStatusesResponse {
8276 pub uncommitted_file_changes:
8279 std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
8280
8281 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8282}
8283
8284impl FetchFileGitStatusesResponse {
8285 pub fn new() -> Self {
8286 std::default::Default::default()
8287 }
8288
8289 pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
8291 where
8292 T: std::iter::IntoIterator<Item = V>,
8293 V: std::convert::Into<
8294 crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
8295 >,
8296 {
8297 use std::iter::Iterator;
8298 self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
8299 self
8300 }
8301}
8302
8303impl wkt::message::Message for FetchFileGitStatusesResponse {
8304 fn typename() -> &'static str {
8305 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
8306 }
8307}
8308
8309#[doc(hidden)]
8310impl<'de> serde::de::Deserialize<'de> for FetchFileGitStatusesResponse {
8311 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8312 where
8313 D: serde::Deserializer<'de>,
8314 {
8315 #[allow(non_camel_case_types)]
8316 #[doc(hidden)]
8317 #[derive(PartialEq, Eq, Hash)]
8318 enum __FieldTag {
8319 __uncommitted_file_changes,
8320 Unknown(std::string::String),
8321 }
8322 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8323 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8324 where
8325 D: serde::Deserializer<'de>,
8326 {
8327 struct Visitor;
8328 impl<'de> serde::de::Visitor<'de> for Visitor {
8329 type Value = __FieldTag;
8330 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8331 formatter.write_str("a field name for FetchFileGitStatusesResponse")
8332 }
8333 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8334 where
8335 E: serde::de::Error,
8336 {
8337 use std::result::Result::Ok;
8338 use std::string::ToString;
8339 match value {
8340 "uncommittedFileChanges" => Ok(__FieldTag::__uncommitted_file_changes),
8341 "uncommitted_file_changes" => {
8342 Ok(__FieldTag::__uncommitted_file_changes)
8343 }
8344 _ => Ok(__FieldTag::Unknown(value.to_string())),
8345 }
8346 }
8347 }
8348 deserializer.deserialize_identifier(Visitor)
8349 }
8350 }
8351 struct Visitor;
8352 impl<'de> serde::de::Visitor<'de> for Visitor {
8353 type Value = FetchFileGitStatusesResponse;
8354 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8355 formatter.write_str("struct FetchFileGitStatusesResponse")
8356 }
8357 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8358 where
8359 A: serde::de::MapAccess<'de>,
8360 {
8361 #[allow(unused_imports)]
8362 use serde::de::Error;
8363 use std::option::Option::Some;
8364 let mut fields = std::collections::HashSet::new();
8365 let mut result = Self::Value::new();
8366 while let Some(tag) = map.next_key::<__FieldTag>()? {
8367 #[allow(clippy::match_single_binding)]
8368 match tag {
8369 __FieldTag::__uncommitted_file_changes => {
8370 if !fields.insert(__FieldTag::__uncommitted_file_changes) {
8371 return std::result::Result::Err(A::Error::duplicate_field(
8372 "multiple values for uncommitted_file_changes",
8373 ));
8374 }
8375 result.uncommitted_file_changes = map.next_value::<std::option::Option<std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>>>()?.unwrap_or_default();
8376 }
8377 __FieldTag::Unknown(key) => {
8378 let value = map.next_value::<serde_json::Value>()?;
8379 result._unknown_fields.insert(key, value);
8380 }
8381 }
8382 }
8383 std::result::Result::Ok(result)
8384 }
8385 }
8386 deserializer.deserialize_any(Visitor)
8387 }
8388}
8389
8390#[doc(hidden)]
8391impl serde::ser::Serialize for FetchFileGitStatusesResponse {
8392 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8393 where
8394 S: serde::ser::Serializer,
8395 {
8396 use serde::ser::SerializeMap;
8397 #[allow(unused_imports)]
8398 use std::option::Option::Some;
8399 let mut state = serializer.serialize_map(std::option::Option::None)?;
8400 if !self.uncommitted_file_changes.is_empty() {
8401 state.serialize_entry("uncommittedFileChanges", &self.uncommitted_file_changes)?;
8402 }
8403 if !self._unknown_fields.is_empty() {
8404 for (key, value) in self._unknown_fields.iter() {
8405 state.serialize_entry(key, &value)?;
8406 }
8407 }
8408 state.end()
8409 }
8410}
8411
8412impl std::fmt::Debug for FetchFileGitStatusesResponse {
8413 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8414 let mut debug_struct = f.debug_struct("FetchFileGitStatusesResponse");
8415 debug_struct.field("uncommitted_file_changes", &self.uncommitted_file_changes);
8416 if !self._unknown_fields.is_empty() {
8417 debug_struct.field("_unknown_fields", &self._unknown_fields);
8418 }
8419 debug_struct.finish()
8420 }
8421}
8422
8423pub mod fetch_file_git_statuses_response {
8425 #[allow(unused_imports)]
8426 use super::*;
8427
8428 #[derive(Clone, Default, PartialEq)]
8430 #[non_exhaustive]
8431 pub struct UncommittedFileChange {
8432 pub path: std::string::String,
8434
8435 pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
8437
8438 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8439 }
8440
8441 impl UncommittedFileChange {
8442 pub fn new() -> Self {
8443 std::default::Default::default()
8444 }
8445
8446 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8448 self.path = v.into();
8449 self
8450 }
8451
8452 pub fn set_state<
8454 T: std::convert::Into<
8455 crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
8456 >,
8457 >(
8458 mut self,
8459 v: T,
8460 ) -> Self {
8461 self.state = v.into();
8462 self
8463 }
8464 }
8465
8466 impl wkt::message::Message for UncommittedFileChange {
8467 fn typename() -> &'static str {
8468 "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
8469 }
8470 }
8471
8472 #[doc(hidden)]
8473 impl<'de> serde::de::Deserialize<'de> for UncommittedFileChange {
8474 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8475 where
8476 D: serde::Deserializer<'de>,
8477 {
8478 #[allow(non_camel_case_types)]
8479 #[doc(hidden)]
8480 #[derive(PartialEq, Eq, Hash)]
8481 enum __FieldTag {
8482 __path,
8483 __state,
8484 Unknown(std::string::String),
8485 }
8486 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8487 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8488 where
8489 D: serde::Deserializer<'de>,
8490 {
8491 struct Visitor;
8492 impl<'de> serde::de::Visitor<'de> for Visitor {
8493 type Value = __FieldTag;
8494 fn expecting(
8495 &self,
8496 formatter: &mut std::fmt::Formatter,
8497 ) -> std::fmt::Result {
8498 formatter.write_str("a field name for UncommittedFileChange")
8499 }
8500 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8501 where
8502 E: serde::de::Error,
8503 {
8504 use std::result::Result::Ok;
8505 use std::string::ToString;
8506 match value {
8507 "path" => Ok(__FieldTag::__path),
8508 "state" => Ok(__FieldTag::__state),
8509 _ => Ok(__FieldTag::Unknown(value.to_string())),
8510 }
8511 }
8512 }
8513 deserializer.deserialize_identifier(Visitor)
8514 }
8515 }
8516 struct Visitor;
8517 impl<'de> serde::de::Visitor<'de> for Visitor {
8518 type Value = UncommittedFileChange;
8519 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8520 formatter.write_str("struct UncommittedFileChange")
8521 }
8522 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8523 where
8524 A: serde::de::MapAccess<'de>,
8525 {
8526 #[allow(unused_imports)]
8527 use serde::de::Error;
8528 use std::option::Option::Some;
8529 let mut fields = std::collections::HashSet::new();
8530 let mut result = Self::Value::new();
8531 while let Some(tag) = map.next_key::<__FieldTag>()? {
8532 #[allow(clippy::match_single_binding)]
8533 match tag {
8534 __FieldTag::__path => {
8535 if !fields.insert(__FieldTag::__path) {
8536 return std::result::Result::Err(A::Error::duplicate_field(
8537 "multiple values for path",
8538 ));
8539 }
8540 result.path = map
8541 .next_value::<std::option::Option<std::string::String>>()?
8542 .unwrap_or_default();
8543 }
8544 __FieldTag::__state => {
8545 if !fields.insert(__FieldTag::__state) {
8546 return std::result::Result::Err(A::Error::duplicate_field(
8547 "multiple values for state",
8548 ));
8549 }
8550 result.state = map.next_value::<std::option::Option<crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State>>()?.unwrap_or_default();
8551 }
8552 __FieldTag::Unknown(key) => {
8553 let value = map.next_value::<serde_json::Value>()?;
8554 result._unknown_fields.insert(key, value);
8555 }
8556 }
8557 }
8558 std::result::Result::Ok(result)
8559 }
8560 }
8561 deserializer.deserialize_any(Visitor)
8562 }
8563 }
8564
8565 #[doc(hidden)]
8566 impl serde::ser::Serialize for UncommittedFileChange {
8567 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8568 where
8569 S: serde::ser::Serializer,
8570 {
8571 use serde::ser::SerializeMap;
8572 #[allow(unused_imports)]
8573 use std::option::Option::Some;
8574 let mut state = serializer.serialize_map(std::option::Option::None)?;
8575 if !self.path.is_empty() {
8576 state.serialize_entry("path", &self.path)?;
8577 }
8578 if !wkt::internal::is_default(&self.state) {
8579 state.serialize_entry("state", &self.state)?;
8580 }
8581 if !self._unknown_fields.is_empty() {
8582 for (key, value) in self._unknown_fields.iter() {
8583 state.serialize_entry(key, &value)?;
8584 }
8585 }
8586 state.end()
8587 }
8588 }
8589
8590 impl std::fmt::Debug for UncommittedFileChange {
8591 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8592 let mut debug_struct = f.debug_struct("UncommittedFileChange");
8593 debug_struct.field("path", &self.path);
8594 debug_struct.field("state", &self.state);
8595 if !self._unknown_fields.is_empty() {
8596 debug_struct.field("_unknown_fields", &self._unknown_fields);
8597 }
8598 debug_struct.finish()
8599 }
8600 }
8601
8602 pub mod uncommitted_file_change {
8604 #[allow(unused_imports)]
8605 use super::*;
8606
8607 #[derive(Clone, Debug, PartialEq)]
8623 #[non_exhaustive]
8624 pub enum State {
8625 Unspecified,
8627 Added,
8629 Deleted,
8631 Modified,
8633 HasConflicts,
8635 UnknownValue(state::UnknownValue),
8640 }
8641
8642 #[doc(hidden)]
8643 pub mod state {
8644 #[allow(unused_imports)]
8645 use super::*;
8646 #[derive(Clone, Debug, PartialEq)]
8647 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8648 }
8649
8650 impl State {
8651 pub fn value(&self) -> std::option::Option<i32> {
8656 match self {
8657 Self::Unspecified => std::option::Option::Some(0),
8658 Self::Added => std::option::Option::Some(1),
8659 Self::Deleted => std::option::Option::Some(2),
8660 Self::Modified => std::option::Option::Some(3),
8661 Self::HasConflicts => std::option::Option::Some(4),
8662 Self::UnknownValue(u) => u.0.value(),
8663 }
8664 }
8665
8666 pub fn name(&self) -> std::option::Option<&str> {
8671 match self {
8672 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8673 Self::Added => std::option::Option::Some("ADDED"),
8674 Self::Deleted => std::option::Option::Some("DELETED"),
8675 Self::Modified => std::option::Option::Some("MODIFIED"),
8676 Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
8677 Self::UnknownValue(u) => u.0.name(),
8678 }
8679 }
8680 }
8681
8682 impl std::default::Default for State {
8683 fn default() -> Self {
8684 use std::convert::From;
8685 Self::from(0)
8686 }
8687 }
8688
8689 impl std::fmt::Display for State {
8690 fn fmt(
8691 &self,
8692 f: &mut std::fmt::Formatter<'_>,
8693 ) -> std::result::Result<(), std::fmt::Error> {
8694 wkt::internal::display_enum(f, self.name(), self.value())
8695 }
8696 }
8697
8698 impl std::convert::From<i32> for State {
8699 fn from(value: i32) -> Self {
8700 match value {
8701 0 => Self::Unspecified,
8702 1 => Self::Added,
8703 2 => Self::Deleted,
8704 3 => Self::Modified,
8705 4 => Self::HasConflicts,
8706 _ => Self::UnknownValue(state::UnknownValue(
8707 wkt::internal::UnknownEnumValue::Integer(value),
8708 )),
8709 }
8710 }
8711 }
8712
8713 impl std::convert::From<&str> for State {
8714 fn from(value: &str) -> Self {
8715 use std::string::ToString;
8716 match value {
8717 "STATE_UNSPECIFIED" => Self::Unspecified,
8718 "ADDED" => Self::Added,
8719 "DELETED" => Self::Deleted,
8720 "MODIFIED" => Self::Modified,
8721 "HAS_CONFLICTS" => Self::HasConflicts,
8722 _ => Self::UnknownValue(state::UnknownValue(
8723 wkt::internal::UnknownEnumValue::String(value.to_string()),
8724 )),
8725 }
8726 }
8727 }
8728
8729 impl serde::ser::Serialize for State {
8730 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8731 where
8732 S: serde::Serializer,
8733 {
8734 match self {
8735 Self::Unspecified => serializer.serialize_i32(0),
8736 Self::Added => serializer.serialize_i32(1),
8737 Self::Deleted => serializer.serialize_i32(2),
8738 Self::Modified => serializer.serialize_i32(3),
8739 Self::HasConflicts => serializer.serialize_i32(4),
8740 Self::UnknownValue(u) => u.0.serialize(serializer),
8741 }
8742 }
8743 }
8744
8745 impl<'de> serde::de::Deserialize<'de> for State {
8746 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8747 where
8748 D: serde::Deserializer<'de>,
8749 {
8750 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8751 ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
8752 }
8753 }
8754 }
8755}
8756
8757#[derive(Clone, Default, PartialEq)]
8759#[non_exhaustive]
8760pub struct FetchGitAheadBehindRequest {
8761 pub name: std::string::String,
8763
8764 pub remote_branch: std::string::String,
8768
8769 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8770}
8771
8772impl FetchGitAheadBehindRequest {
8773 pub fn new() -> Self {
8774 std::default::Default::default()
8775 }
8776
8777 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8779 self.name = v.into();
8780 self
8781 }
8782
8783 pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8785 self.remote_branch = v.into();
8786 self
8787 }
8788}
8789
8790impl wkt::message::Message for FetchGitAheadBehindRequest {
8791 fn typename() -> &'static str {
8792 "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
8793 }
8794}
8795
8796#[doc(hidden)]
8797impl<'de> serde::de::Deserialize<'de> for FetchGitAheadBehindRequest {
8798 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8799 where
8800 D: serde::Deserializer<'de>,
8801 {
8802 #[allow(non_camel_case_types)]
8803 #[doc(hidden)]
8804 #[derive(PartialEq, Eq, Hash)]
8805 enum __FieldTag {
8806 __name,
8807 __remote_branch,
8808 Unknown(std::string::String),
8809 }
8810 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8811 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8812 where
8813 D: serde::Deserializer<'de>,
8814 {
8815 struct Visitor;
8816 impl<'de> serde::de::Visitor<'de> for Visitor {
8817 type Value = __FieldTag;
8818 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8819 formatter.write_str("a field name for FetchGitAheadBehindRequest")
8820 }
8821 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8822 where
8823 E: serde::de::Error,
8824 {
8825 use std::result::Result::Ok;
8826 use std::string::ToString;
8827 match value {
8828 "name" => Ok(__FieldTag::__name),
8829 "remoteBranch" => Ok(__FieldTag::__remote_branch),
8830 "remote_branch" => Ok(__FieldTag::__remote_branch),
8831 _ => Ok(__FieldTag::Unknown(value.to_string())),
8832 }
8833 }
8834 }
8835 deserializer.deserialize_identifier(Visitor)
8836 }
8837 }
8838 struct Visitor;
8839 impl<'de> serde::de::Visitor<'de> for Visitor {
8840 type Value = FetchGitAheadBehindRequest;
8841 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8842 formatter.write_str("struct FetchGitAheadBehindRequest")
8843 }
8844 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
8845 where
8846 A: serde::de::MapAccess<'de>,
8847 {
8848 #[allow(unused_imports)]
8849 use serde::de::Error;
8850 use std::option::Option::Some;
8851 let mut fields = std::collections::HashSet::new();
8852 let mut result = Self::Value::new();
8853 while let Some(tag) = map.next_key::<__FieldTag>()? {
8854 #[allow(clippy::match_single_binding)]
8855 match tag {
8856 __FieldTag::__name => {
8857 if !fields.insert(__FieldTag::__name) {
8858 return std::result::Result::Err(A::Error::duplicate_field(
8859 "multiple values for name",
8860 ));
8861 }
8862 result.name = map
8863 .next_value::<std::option::Option<std::string::String>>()?
8864 .unwrap_or_default();
8865 }
8866 __FieldTag::__remote_branch => {
8867 if !fields.insert(__FieldTag::__remote_branch) {
8868 return std::result::Result::Err(A::Error::duplicate_field(
8869 "multiple values for remote_branch",
8870 ));
8871 }
8872 result.remote_branch = map
8873 .next_value::<std::option::Option<std::string::String>>()?
8874 .unwrap_or_default();
8875 }
8876 __FieldTag::Unknown(key) => {
8877 let value = map.next_value::<serde_json::Value>()?;
8878 result._unknown_fields.insert(key, value);
8879 }
8880 }
8881 }
8882 std::result::Result::Ok(result)
8883 }
8884 }
8885 deserializer.deserialize_any(Visitor)
8886 }
8887}
8888
8889#[doc(hidden)]
8890impl serde::ser::Serialize for FetchGitAheadBehindRequest {
8891 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8892 where
8893 S: serde::ser::Serializer,
8894 {
8895 use serde::ser::SerializeMap;
8896 #[allow(unused_imports)]
8897 use std::option::Option::Some;
8898 let mut state = serializer.serialize_map(std::option::Option::None)?;
8899 if !self.name.is_empty() {
8900 state.serialize_entry("name", &self.name)?;
8901 }
8902 if !self.remote_branch.is_empty() {
8903 state.serialize_entry("remoteBranch", &self.remote_branch)?;
8904 }
8905 if !self._unknown_fields.is_empty() {
8906 for (key, value) in self._unknown_fields.iter() {
8907 state.serialize_entry(key, &value)?;
8908 }
8909 }
8910 state.end()
8911 }
8912}
8913
8914impl std::fmt::Debug for FetchGitAheadBehindRequest {
8915 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8916 let mut debug_struct = f.debug_struct("FetchGitAheadBehindRequest");
8917 debug_struct.field("name", &self.name);
8918 debug_struct.field("remote_branch", &self.remote_branch);
8919 if !self._unknown_fields.is_empty() {
8920 debug_struct.field("_unknown_fields", &self._unknown_fields);
8921 }
8922 debug_struct.finish()
8923 }
8924}
8925
8926#[derive(Clone, Default, PartialEq)]
8928#[non_exhaustive]
8929pub struct FetchGitAheadBehindResponse {
8930 pub commits_ahead: i32,
8932
8933 pub commits_behind: i32,
8935
8936 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8937}
8938
8939impl FetchGitAheadBehindResponse {
8940 pub fn new() -> Self {
8941 std::default::Default::default()
8942 }
8943
8944 pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8946 self.commits_ahead = v.into();
8947 self
8948 }
8949
8950 pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8952 self.commits_behind = v.into();
8953 self
8954 }
8955}
8956
8957impl wkt::message::Message for FetchGitAheadBehindResponse {
8958 fn typename() -> &'static str {
8959 "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
8960 }
8961}
8962
8963#[doc(hidden)]
8964impl<'de> serde::de::Deserialize<'de> for FetchGitAheadBehindResponse {
8965 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8966 where
8967 D: serde::Deserializer<'de>,
8968 {
8969 #[allow(non_camel_case_types)]
8970 #[doc(hidden)]
8971 #[derive(PartialEq, Eq, Hash)]
8972 enum __FieldTag {
8973 __commits_ahead,
8974 __commits_behind,
8975 Unknown(std::string::String),
8976 }
8977 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
8978 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8979 where
8980 D: serde::Deserializer<'de>,
8981 {
8982 struct Visitor;
8983 impl<'de> serde::de::Visitor<'de> for Visitor {
8984 type Value = __FieldTag;
8985 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
8986 formatter.write_str("a field name for FetchGitAheadBehindResponse")
8987 }
8988 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
8989 where
8990 E: serde::de::Error,
8991 {
8992 use std::result::Result::Ok;
8993 use std::string::ToString;
8994 match value {
8995 "commitsAhead" => Ok(__FieldTag::__commits_ahead),
8996 "commits_ahead" => Ok(__FieldTag::__commits_ahead),
8997 "commitsBehind" => Ok(__FieldTag::__commits_behind),
8998 "commits_behind" => Ok(__FieldTag::__commits_behind),
8999 _ => Ok(__FieldTag::Unknown(value.to_string())),
9000 }
9001 }
9002 }
9003 deserializer.deserialize_identifier(Visitor)
9004 }
9005 }
9006 struct Visitor;
9007 impl<'de> serde::de::Visitor<'de> for Visitor {
9008 type Value = FetchGitAheadBehindResponse;
9009 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9010 formatter.write_str("struct FetchGitAheadBehindResponse")
9011 }
9012 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9013 where
9014 A: serde::de::MapAccess<'de>,
9015 {
9016 #[allow(unused_imports)]
9017 use serde::de::Error;
9018 use std::option::Option::Some;
9019 let mut fields = std::collections::HashSet::new();
9020 let mut result = Self::Value::new();
9021 while let Some(tag) = map.next_key::<__FieldTag>()? {
9022 #[allow(clippy::match_single_binding)]
9023 match tag {
9024 __FieldTag::__commits_ahead => {
9025 if !fields.insert(__FieldTag::__commits_ahead) {
9026 return std::result::Result::Err(A::Error::duplicate_field(
9027 "multiple values for commits_ahead",
9028 ));
9029 }
9030 struct __With(std::option::Option<i32>);
9031 impl<'de> serde::de::Deserialize<'de> for __With {
9032 fn deserialize<D>(
9033 deserializer: D,
9034 ) -> std::result::Result<Self, D::Error>
9035 where
9036 D: serde::de::Deserializer<'de>,
9037 {
9038 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
9039 }
9040 }
9041 result.commits_ahead =
9042 map.next_value::<__With>()?.0.unwrap_or_default();
9043 }
9044 __FieldTag::__commits_behind => {
9045 if !fields.insert(__FieldTag::__commits_behind) {
9046 return std::result::Result::Err(A::Error::duplicate_field(
9047 "multiple values for commits_behind",
9048 ));
9049 }
9050 struct __With(std::option::Option<i32>);
9051 impl<'de> serde::de::Deserialize<'de> for __With {
9052 fn deserialize<D>(
9053 deserializer: D,
9054 ) -> std::result::Result<Self, D::Error>
9055 where
9056 D: serde::de::Deserializer<'de>,
9057 {
9058 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
9059 }
9060 }
9061 result.commits_behind =
9062 map.next_value::<__With>()?.0.unwrap_or_default();
9063 }
9064 __FieldTag::Unknown(key) => {
9065 let value = map.next_value::<serde_json::Value>()?;
9066 result._unknown_fields.insert(key, value);
9067 }
9068 }
9069 }
9070 std::result::Result::Ok(result)
9071 }
9072 }
9073 deserializer.deserialize_any(Visitor)
9074 }
9075}
9076
9077#[doc(hidden)]
9078impl serde::ser::Serialize for FetchGitAheadBehindResponse {
9079 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9080 where
9081 S: serde::ser::Serializer,
9082 {
9083 use serde::ser::SerializeMap;
9084 #[allow(unused_imports)]
9085 use std::option::Option::Some;
9086 let mut state = serializer.serialize_map(std::option::Option::None)?;
9087 if !wkt::internal::is_default(&self.commits_ahead) {
9088 struct __With<'a>(&'a i32);
9089 impl<'a> serde::ser::Serialize for __With<'a> {
9090 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9091 where
9092 S: serde::ser::Serializer,
9093 {
9094 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
9095 }
9096 }
9097 state.serialize_entry("commitsAhead", &__With(&self.commits_ahead))?;
9098 }
9099 if !wkt::internal::is_default(&self.commits_behind) {
9100 struct __With<'a>(&'a i32);
9101 impl<'a> serde::ser::Serialize for __With<'a> {
9102 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9103 where
9104 S: serde::ser::Serializer,
9105 {
9106 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
9107 }
9108 }
9109 state.serialize_entry("commitsBehind", &__With(&self.commits_behind))?;
9110 }
9111 if !self._unknown_fields.is_empty() {
9112 for (key, value) in self._unknown_fields.iter() {
9113 state.serialize_entry(key, &value)?;
9114 }
9115 }
9116 state.end()
9117 }
9118}
9119
9120impl std::fmt::Debug for FetchGitAheadBehindResponse {
9121 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9122 let mut debug_struct = f.debug_struct("FetchGitAheadBehindResponse");
9123 debug_struct.field("commits_ahead", &self.commits_ahead);
9124 debug_struct.field("commits_behind", &self.commits_behind);
9125 if !self._unknown_fields.is_empty() {
9126 debug_struct.field("_unknown_fields", &self._unknown_fields);
9127 }
9128 debug_struct.finish()
9129 }
9130}
9131
9132#[derive(Clone, Default, PartialEq)]
9134#[non_exhaustive]
9135pub struct CommitWorkspaceChangesRequest {
9136 pub name: std::string::String,
9138
9139 pub author: std::option::Option<crate::model::CommitAuthor>,
9141
9142 pub commit_message: std::string::String,
9144
9145 pub paths: std::vec::Vec<std::string::String>,
9148
9149 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9150}
9151
9152impl CommitWorkspaceChangesRequest {
9153 pub fn new() -> Self {
9154 std::default::Default::default()
9155 }
9156
9157 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9159 self.name = v.into();
9160 self
9161 }
9162
9163 pub fn set_author<T>(mut self, v: T) -> Self
9165 where
9166 T: std::convert::Into<crate::model::CommitAuthor>,
9167 {
9168 self.author = std::option::Option::Some(v.into());
9169 self
9170 }
9171
9172 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
9174 where
9175 T: std::convert::Into<crate::model::CommitAuthor>,
9176 {
9177 self.author = v.map(|x| x.into());
9178 self
9179 }
9180
9181 pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9183 self.commit_message = v.into();
9184 self
9185 }
9186
9187 pub fn set_paths<T, V>(mut self, v: T) -> Self
9189 where
9190 T: std::iter::IntoIterator<Item = V>,
9191 V: std::convert::Into<std::string::String>,
9192 {
9193 use std::iter::Iterator;
9194 self.paths = v.into_iter().map(|i| i.into()).collect();
9195 self
9196 }
9197}
9198
9199impl wkt::message::Message for CommitWorkspaceChangesRequest {
9200 fn typename() -> &'static str {
9201 "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
9202 }
9203}
9204
9205#[doc(hidden)]
9206impl<'de> serde::de::Deserialize<'de> for CommitWorkspaceChangesRequest {
9207 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9208 where
9209 D: serde::Deserializer<'de>,
9210 {
9211 #[allow(non_camel_case_types)]
9212 #[doc(hidden)]
9213 #[derive(PartialEq, Eq, Hash)]
9214 enum __FieldTag {
9215 __name,
9216 __author,
9217 __commit_message,
9218 __paths,
9219 Unknown(std::string::String),
9220 }
9221 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9222 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9223 where
9224 D: serde::Deserializer<'de>,
9225 {
9226 struct Visitor;
9227 impl<'de> serde::de::Visitor<'de> for Visitor {
9228 type Value = __FieldTag;
9229 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9230 formatter.write_str("a field name for CommitWorkspaceChangesRequest")
9231 }
9232 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9233 where
9234 E: serde::de::Error,
9235 {
9236 use std::result::Result::Ok;
9237 use std::string::ToString;
9238 match value {
9239 "name" => Ok(__FieldTag::__name),
9240 "author" => Ok(__FieldTag::__author),
9241 "commitMessage" => Ok(__FieldTag::__commit_message),
9242 "commit_message" => Ok(__FieldTag::__commit_message),
9243 "paths" => Ok(__FieldTag::__paths),
9244 _ => Ok(__FieldTag::Unknown(value.to_string())),
9245 }
9246 }
9247 }
9248 deserializer.deserialize_identifier(Visitor)
9249 }
9250 }
9251 struct Visitor;
9252 impl<'de> serde::de::Visitor<'de> for Visitor {
9253 type Value = CommitWorkspaceChangesRequest;
9254 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9255 formatter.write_str("struct CommitWorkspaceChangesRequest")
9256 }
9257 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9258 where
9259 A: serde::de::MapAccess<'de>,
9260 {
9261 #[allow(unused_imports)]
9262 use serde::de::Error;
9263 use std::option::Option::Some;
9264 let mut fields = std::collections::HashSet::new();
9265 let mut result = Self::Value::new();
9266 while let Some(tag) = map.next_key::<__FieldTag>()? {
9267 #[allow(clippy::match_single_binding)]
9268 match tag {
9269 __FieldTag::__name => {
9270 if !fields.insert(__FieldTag::__name) {
9271 return std::result::Result::Err(A::Error::duplicate_field(
9272 "multiple values for name",
9273 ));
9274 }
9275 result.name = map
9276 .next_value::<std::option::Option<std::string::String>>()?
9277 .unwrap_or_default();
9278 }
9279 __FieldTag::__author => {
9280 if !fields.insert(__FieldTag::__author) {
9281 return std::result::Result::Err(A::Error::duplicate_field(
9282 "multiple values for author",
9283 ));
9284 }
9285 result.author = map
9286 .next_value::<std::option::Option<crate::model::CommitAuthor>>()?;
9287 }
9288 __FieldTag::__commit_message => {
9289 if !fields.insert(__FieldTag::__commit_message) {
9290 return std::result::Result::Err(A::Error::duplicate_field(
9291 "multiple values for commit_message",
9292 ));
9293 }
9294 result.commit_message = map
9295 .next_value::<std::option::Option<std::string::String>>()?
9296 .unwrap_or_default();
9297 }
9298 __FieldTag::__paths => {
9299 if !fields.insert(__FieldTag::__paths) {
9300 return std::result::Result::Err(A::Error::duplicate_field(
9301 "multiple values for paths",
9302 ));
9303 }
9304 result.paths = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
9305 }
9306 __FieldTag::Unknown(key) => {
9307 let value = map.next_value::<serde_json::Value>()?;
9308 result._unknown_fields.insert(key, value);
9309 }
9310 }
9311 }
9312 std::result::Result::Ok(result)
9313 }
9314 }
9315 deserializer.deserialize_any(Visitor)
9316 }
9317}
9318
9319#[doc(hidden)]
9320impl serde::ser::Serialize for CommitWorkspaceChangesRequest {
9321 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9322 where
9323 S: serde::ser::Serializer,
9324 {
9325 use serde::ser::SerializeMap;
9326 #[allow(unused_imports)]
9327 use std::option::Option::Some;
9328 let mut state = serializer.serialize_map(std::option::Option::None)?;
9329 if !self.name.is_empty() {
9330 state.serialize_entry("name", &self.name)?;
9331 }
9332 if self.author.is_some() {
9333 state.serialize_entry("author", &self.author)?;
9334 }
9335 if !self.commit_message.is_empty() {
9336 state.serialize_entry("commitMessage", &self.commit_message)?;
9337 }
9338 if !self.paths.is_empty() {
9339 state.serialize_entry("paths", &self.paths)?;
9340 }
9341 if !self._unknown_fields.is_empty() {
9342 for (key, value) in self._unknown_fields.iter() {
9343 state.serialize_entry(key, &value)?;
9344 }
9345 }
9346 state.end()
9347 }
9348}
9349
9350impl std::fmt::Debug for CommitWorkspaceChangesRequest {
9351 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9352 let mut debug_struct = f.debug_struct("CommitWorkspaceChangesRequest");
9353 debug_struct.field("name", &self.name);
9354 debug_struct.field("author", &self.author);
9355 debug_struct.field("commit_message", &self.commit_message);
9356 debug_struct.field("paths", &self.paths);
9357 if !self._unknown_fields.is_empty() {
9358 debug_struct.field("_unknown_fields", &self._unknown_fields);
9359 }
9360 debug_struct.finish()
9361 }
9362}
9363
9364#[derive(Clone, Default, PartialEq)]
9366#[non_exhaustive]
9367pub struct CommitWorkspaceChangesResponse {
9368 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9369}
9370
9371impl CommitWorkspaceChangesResponse {
9372 pub fn new() -> Self {
9373 std::default::Default::default()
9374 }
9375}
9376
9377impl wkt::message::Message for CommitWorkspaceChangesResponse {
9378 fn typename() -> &'static str {
9379 "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
9380 }
9381}
9382
9383#[doc(hidden)]
9384impl<'de> serde::de::Deserialize<'de> for CommitWorkspaceChangesResponse {
9385 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9386 where
9387 D: serde::Deserializer<'de>,
9388 {
9389 #[allow(non_camel_case_types)]
9390 #[doc(hidden)]
9391 #[derive(PartialEq, Eq, Hash)]
9392 enum __FieldTag {
9393 Unknown(std::string::String),
9394 }
9395 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9396 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9397 where
9398 D: serde::Deserializer<'de>,
9399 {
9400 struct Visitor;
9401 impl<'de> serde::de::Visitor<'de> for Visitor {
9402 type Value = __FieldTag;
9403 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9404 formatter.write_str("a field name for CommitWorkspaceChangesResponse")
9405 }
9406 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9407 where
9408 E: serde::de::Error,
9409 {
9410 use std::result::Result::Ok;
9411 use std::string::ToString;
9412 Ok(__FieldTag::Unknown(value.to_string()))
9413 }
9414 }
9415 deserializer.deserialize_identifier(Visitor)
9416 }
9417 }
9418 struct Visitor;
9419 impl<'de> serde::de::Visitor<'de> for Visitor {
9420 type Value = CommitWorkspaceChangesResponse;
9421 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9422 formatter.write_str("struct CommitWorkspaceChangesResponse")
9423 }
9424 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9425 where
9426 A: serde::de::MapAccess<'de>,
9427 {
9428 #[allow(unused_imports)]
9429 use serde::de::Error;
9430 use std::option::Option::Some;
9431 let mut result = Self::Value::new();
9432 while let Some(tag) = map.next_key::<__FieldTag>()? {
9433 #[allow(clippy::match_single_binding)]
9434 match tag {
9435 __FieldTag::Unknown(key) => {
9436 let value = map.next_value::<serde_json::Value>()?;
9437 result._unknown_fields.insert(key, value);
9438 }
9439 }
9440 }
9441 std::result::Result::Ok(result)
9442 }
9443 }
9444 deserializer.deserialize_any(Visitor)
9445 }
9446}
9447
9448#[doc(hidden)]
9449impl serde::ser::Serialize for CommitWorkspaceChangesResponse {
9450 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9451 where
9452 S: serde::ser::Serializer,
9453 {
9454 use serde::ser::SerializeMap;
9455 #[allow(unused_imports)]
9456 use std::option::Option::Some;
9457 let mut state = serializer.serialize_map(std::option::Option::None)?;
9458 if !self._unknown_fields.is_empty() {
9459 for (key, value) in self._unknown_fields.iter() {
9460 state.serialize_entry(key, &value)?;
9461 }
9462 }
9463 state.end()
9464 }
9465}
9466
9467impl std::fmt::Debug for CommitWorkspaceChangesResponse {
9468 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9469 let mut debug_struct = f.debug_struct("CommitWorkspaceChangesResponse");
9470 if !self._unknown_fields.is_empty() {
9471 debug_struct.field("_unknown_fields", &self._unknown_fields);
9472 }
9473 debug_struct.finish()
9474 }
9475}
9476
9477#[derive(Clone, Default, PartialEq)]
9479#[non_exhaustive]
9480pub struct ResetWorkspaceChangesRequest {
9481 pub name: std::string::String,
9483
9484 pub paths: std::vec::Vec<std::string::String>,
9487
9488 pub clean: bool,
9490
9491 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9492}
9493
9494impl ResetWorkspaceChangesRequest {
9495 pub fn new() -> Self {
9496 std::default::Default::default()
9497 }
9498
9499 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9501 self.name = v.into();
9502 self
9503 }
9504
9505 pub fn set_paths<T, V>(mut self, v: T) -> Self
9507 where
9508 T: std::iter::IntoIterator<Item = V>,
9509 V: std::convert::Into<std::string::String>,
9510 {
9511 use std::iter::Iterator;
9512 self.paths = v.into_iter().map(|i| i.into()).collect();
9513 self
9514 }
9515
9516 pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9518 self.clean = v.into();
9519 self
9520 }
9521}
9522
9523impl wkt::message::Message for ResetWorkspaceChangesRequest {
9524 fn typename() -> &'static str {
9525 "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
9526 }
9527}
9528
9529#[doc(hidden)]
9530impl<'de> serde::de::Deserialize<'de> for ResetWorkspaceChangesRequest {
9531 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9532 where
9533 D: serde::Deserializer<'de>,
9534 {
9535 #[allow(non_camel_case_types)]
9536 #[doc(hidden)]
9537 #[derive(PartialEq, Eq, Hash)]
9538 enum __FieldTag {
9539 __name,
9540 __paths,
9541 __clean,
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 ResetWorkspaceChangesRequest")
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 "name" => Ok(__FieldTag::__name),
9563 "paths" => Ok(__FieldTag::__paths),
9564 "clean" => Ok(__FieldTag::__clean),
9565 _ => Ok(__FieldTag::Unknown(value.to_string())),
9566 }
9567 }
9568 }
9569 deserializer.deserialize_identifier(Visitor)
9570 }
9571 }
9572 struct Visitor;
9573 impl<'de> serde::de::Visitor<'de> for Visitor {
9574 type Value = ResetWorkspaceChangesRequest;
9575 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9576 formatter.write_str("struct ResetWorkspaceChangesRequest")
9577 }
9578 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9579 where
9580 A: serde::de::MapAccess<'de>,
9581 {
9582 #[allow(unused_imports)]
9583 use serde::de::Error;
9584 use std::option::Option::Some;
9585 let mut fields = std::collections::HashSet::new();
9586 let mut result = Self::Value::new();
9587 while let Some(tag) = map.next_key::<__FieldTag>()? {
9588 #[allow(clippy::match_single_binding)]
9589 match tag {
9590 __FieldTag::__name => {
9591 if !fields.insert(__FieldTag::__name) {
9592 return std::result::Result::Err(A::Error::duplicate_field(
9593 "multiple values for name",
9594 ));
9595 }
9596 result.name = map
9597 .next_value::<std::option::Option<std::string::String>>()?
9598 .unwrap_or_default();
9599 }
9600 __FieldTag::__paths => {
9601 if !fields.insert(__FieldTag::__paths) {
9602 return std::result::Result::Err(A::Error::duplicate_field(
9603 "multiple values for paths",
9604 ));
9605 }
9606 result.paths = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
9607 }
9608 __FieldTag::__clean => {
9609 if !fields.insert(__FieldTag::__clean) {
9610 return std::result::Result::Err(A::Error::duplicate_field(
9611 "multiple values for clean",
9612 ));
9613 }
9614 result.clean = map
9615 .next_value::<std::option::Option<bool>>()?
9616 .unwrap_or_default();
9617 }
9618 __FieldTag::Unknown(key) => {
9619 let value = map.next_value::<serde_json::Value>()?;
9620 result._unknown_fields.insert(key, value);
9621 }
9622 }
9623 }
9624 std::result::Result::Ok(result)
9625 }
9626 }
9627 deserializer.deserialize_any(Visitor)
9628 }
9629}
9630
9631#[doc(hidden)]
9632impl serde::ser::Serialize for ResetWorkspaceChangesRequest {
9633 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9634 where
9635 S: serde::ser::Serializer,
9636 {
9637 use serde::ser::SerializeMap;
9638 #[allow(unused_imports)]
9639 use std::option::Option::Some;
9640 let mut state = serializer.serialize_map(std::option::Option::None)?;
9641 if !self.name.is_empty() {
9642 state.serialize_entry("name", &self.name)?;
9643 }
9644 if !self.paths.is_empty() {
9645 state.serialize_entry("paths", &self.paths)?;
9646 }
9647 if !wkt::internal::is_default(&self.clean) {
9648 state.serialize_entry("clean", &self.clean)?;
9649 }
9650 if !self._unknown_fields.is_empty() {
9651 for (key, value) in self._unknown_fields.iter() {
9652 state.serialize_entry(key, &value)?;
9653 }
9654 }
9655 state.end()
9656 }
9657}
9658
9659impl std::fmt::Debug for ResetWorkspaceChangesRequest {
9660 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9661 let mut debug_struct = f.debug_struct("ResetWorkspaceChangesRequest");
9662 debug_struct.field("name", &self.name);
9663 debug_struct.field("paths", &self.paths);
9664 debug_struct.field("clean", &self.clean);
9665 if !self._unknown_fields.is_empty() {
9666 debug_struct.field("_unknown_fields", &self._unknown_fields);
9667 }
9668 debug_struct.finish()
9669 }
9670}
9671
9672#[derive(Clone, Default, PartialEq)]
9674#[non_exhaustive]
9675pub struct ResetWorkspaceChangesResponse {
9676 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9677}
9678
9679impl ResetWorkspaceChangesResponse {
9680 pub fn new() -> Self {
9681 std::default::Default::default()
9682 }
9683}
9684
9685impl wkt::message::Message for ResetWorkspaceChangesResponse {
9686 fn typename() -> &'static str {
9687 "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
9688 }
9689}
9690
9691#[doc(hidden)]
9692impl<'de> serde::de::Deserialize<'de> for ResetWorkspaceChangesResponse {
9693 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9694 where
9695 D: serde::Deserializer<'de>,
9696 {
9697 #[allow(non_camel_case_types)]
9698 #[doc(hidden)]
9699 #[derive(PartialEq, Eq, Hash)]
9700 enum __FieldTag {
9701 Unknown(std::string::String),
9702 }
9703 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9704 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9705 where
9706 D: serde::Deserializer<'de>,
9707 {
9708 struct Visitor;
9709 impl<'de> serde::de::Visitor<'de> for Visitor {
9710 type Value = __FieldTag;
9711 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9712 formatter.write_str("a field name for ResetWorkspaceChangesResponse")
9713 }
9714 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9715 where
9716 E: serde::de::Error,
9717 {
9718 use std::result::Result::Ok;
9719 use std::string::ToString;
9720 Ok(__FieldTag::Unknown(value.to_string()))
9721 }
9722 }
9723 deserializer.deserialize_identifier(Visitor)
9724 }
9725 }
9726 struct Visitor;
9727 impl<'de> serde::de::Visitor<'de> for Visitor {
9728 type Value = ResetWorkspaceChangesResponse;
9729 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9730 formatter.write_str("struct ResetWorkspaceChangesResponse")
9731 }
9732 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9733 where
9734 A: serde::de::MapAccess<'de>,
9735 {
9736 #[allow(unused_imports)]
9737 use serde::de::Error;
9738 use std::option::Option::Some;
9739 let mut result = Self::Value::new();
9740 while let Some(tag) = map.next_key::<__FieldTag>()? {
9741 #[allow(clippy::match_single_binding)]
9742 match tag {
9743 __FieldTag::Unknown(key) => {
9744 let value = map.next_value::<serde_json::Value>()?;
9745 result._unknown_fields.insert(key, value);
9746 }
9747 }
9748 }
9749 std::result::Result::Ok(result)
9750 }
9751 }
9752 deserializer.deserialize_any(Visitor)
9753 }
9754}
9755
9756#[doc(hidden)]
9757impl serde::ser::Serialize for ResetWorkspaceChangesResponse {
9758 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9759 where
9760 S: serde::ser::Serializer,
9761 {
9762 use serde::ser::SerializeMap;
9763 #[allow(unused_imports)]
9764 use std::option::Option::Some;
9765 let mut state = serializer.serialize_map(std::option::Option::None)?;
9766 if !self._unknown_fields.is_empty() {
9767 for (key, value) in self._unknown_fields.iter() {
9768 state.serialize_entry(key, &value)?;
9769 }
9770 }
9771 state.end()
9772 }
9773}
9774
9775impl std::fmt::Debug for ResetWorkspaceChangesResponse {
9776 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9777 let mut debug_struct = f.debug_struct("ResetWorkspaceChangesResponse");
9778 if !self._unknown_fields.is_empty() {
9779 debug_struct.field("_unknown_fields", &self._unknown_fields);
9780 }
9781 debug_struct.finish()
9782 }
9783}
9784
9785#[derive(Clone, Default, PartialEq)]
9787#[non_exhaustive]
9788pub struct FetchFileDiffRequest {
9789 pub workspace: std::string::String,
9791
9792 pub path: std::string::String,
9795
9796 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9797}
9798
9799impl FetchFileDiffRequest {
9800 pub fn new() -> Self {
9801 std::default::Default::default()
9802 }
9803
9804 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9806 self.workspace = v.into();
9807 self
9808 }
9809
9810 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9812 self.path = v.into();
9813 self
9814 }
9815}
9816
9817impl wkt::message::Message for FetchFileDiffRequest {
9818 fn typename() -> &'static str {
9819 "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
9820 }
9821}
9822
9823#[doc(hidden)]
9824impl<'de> serde::de::Deserialize<'de> for FetchFileDiffRequest {
9825 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9826 where
9827 D: serde::Deserializer<'de>,
9828 {
9829 #[allow(non_camel_case_types)]
9830 #[doc(hidden)]
9831 #[derive(PartialEq, Eq, Hash)]
9832 enum __FieldTag {
9833 __workspace,
9834 __path,
9835 Unknown(std::string::String),
9836 }
9837 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9838 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9839 where
9840 D: serde::Deserializer<'de>,
9841 {
9842 struct Visitor;
9843 impl<'de> serde::de::Visitor<'de> for Visitor {
9844 type Value = __FieldTag;
9845 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9846 formatter.write_str("a field name for FetchFileDiffRequest")
9847 }
9848 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
9849 where
9850 E: serde::de::Error,
9851 {
9852 use std::result::Result::Ok;
9853 use std::string::ToString;
9854 match value {
9855 "workspace" => Ok(__FieldTag::__workspace),
9856 "path" => Ok(__FieldTag::__path),
9857 _ => Ok(__FieldTag::Unknown(value.to_string())),
9858 }
9859 }
9860 }
9861 deserializer.deserialize_identifier(Visitor)
9862 }
9863 }
9864 struct Visitor;
9865 impl<'de> serde::de::Visitor<'de> for Visitor {
9866 type Value = FetchFileDiffRequest;
9867 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
9868 formatter.write_str("struct FetchFileDiffRequest")
9869 }
9870 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
9871 where
9872 A: serde::de::MapAccess<'de>,
9873 {
9874 #[allow(unused_imports)]
9875 use serde::de::Error;
9876 use std::option::Option::Some;
9877 let mut fields = std::collections::HashSet::new();
9878 let mut result = Self::Value::new();
9879 while let Some(tag) = map.next_key::<__FieldTag>()? {
9880 #[allow(clippy::match_single_binding)]
9881 match tag {
9882 __FieldTag::__workspace => {
9883 if !fields.insert(__FieldTag::__workspace) {
9884 return std::result::Result::Err(A::Error::duplicate_field(
9885 "multiple values for workspace",
9886 ));
9887 }
9888 result.workspace = map
9889 .next_value::<std::option::Option<std::string::String>>()?
9890 .unwrap_or_default();
9891 }
9892 __FieldTag::__path => {
9893 if !fields.insert(__FieldTag::__path) {
9894 return std::result::Result::Err(A::Error::duplicate_field(
9895 "multiple values for path",
9896 ));
9897 }
9898 result.path = map
9899 .next_value::<std::option::Option<std::string::String>>()?
9900 .unwrap_or_default();
9901 }
9902 __FieldTag::Unknown(key) => {
9903 let value = map.next_value::<serde_json::Value>()?;
9904 result._unknown_fields.insert(key, value);
9905 }
9906 }
9907 }
9908 std::result::Result::Ok(result)
9909 }
9910 }
9911 deserializer.deserialize_any(Visitor)
9912 }
9913}
9914
9915#[doc(hidden)]
9916impl serde::ser::Serialize for FetchFileDiffRequest {
9917 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9918 where
9919 S: serde::ser::Serializer,
9920 {
9921 use serde::ser::SerializeMap;
9922 #[allow(unused_imports)]
9923 use std::option::Option::Some;
9924 let mut state = serializer.serialize_map(std::option::Option::None)?;
9925 if !self.workspace.is_empty() {
9926 state.serialize_entry("workspace", &self.workspace)?;
9927 }
9928 if !self.path.is_empty() {
9929 state.serialize_entry("path", &self.path)?;
9930 }
9931 if !self._unknown_fields.is_empty() {
9932 for (key, value) in self._unknown_fields.iter() {
9933 state.serialize_entry(key, &value)?;
9934 }
9935 }
9936 state.end()
9937 }
9938}
9939
9940impl std::fmt::Debug for FetchFileDiffRequest {
9941 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9942 let mut debug_struct = f.debug_struct("FetchFileDiffRequest");
9943 debug_struct.field("workspace", &self.workspace);
9944 debug_struct.field("path", &self.path);
9945 if !self._unknown_fields.is_empty() {
9946 debug_struct.field("_unknown_fields", &self._unknown_fields);
9947 }
9948 debug_struct.finish()
9949 }
9950}
9951
9952#[derive(Clone, Default, PartialEq)]
9954#[non_exhaustive]
9955pub struct FetchFileDiffResponse {
9956 pub formatted_diff: std::string::String,
9958
9959 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9960}
9961
9962impl FetchFileDiffResponse {
9963 pub fn new() -> Self {
9964 std::default::Default::default()
9965 }
9966
9967 pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9969 self.formatted_diff = v.into();
9970 self
9971 }
9972}
9973
9974impl wkt::message::Message for FetchFileDiffResponse {
9975 fn typename() -> &'static str {
9976 "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
9977 }
9978}
9979
9980#[doc(hidden)]
9981impl<'de> serde::de::Deserialize<'de> for FetchFileDiffResponse {
9982 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9983 where
9984 D: serde::Deserializer<'de>,
9985 {
9986 #[allow(non_camel_case_types)]
9987 #[doc(hidden)]
9988 #[derive(PartialEq, Eq, Hash)]
9989 enum __FieldTag {
9990 __formatted_diff,
9991 Unknown(std::string::String),
9992 }
9993 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
9994 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9995 where
9996 D: serde::Deserializer<'de>,
9997 {
9998 struct Visitor;
9999 impl<'de> serde::de::Visitor<'de> for Visitor {
10000 type Value = __FieldTag;
10001 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10002 formatter.write_str("a field name for FetchFileDiffResponse")
10003 }
10004 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10005 where
10006 E: serde::de::Error,
10007 {
10008 use std::result::Result::Ok;
10009 use std::string::ToString;
10010 match value {
10011 "formattedDiff" => Ok(__FieldTag::__formatted_diff),
10012 "formatted_diff" => Ok(__FieldTag::__formatted_diff),
10013 _ => Ok(__FieldTag::Unknown(value.to_string())),
10014 }
10015 }
10016 }
10017 deserializer.deserialize_identifier(Visitor)
10018 }
10019 }
10020 struct Visitor;
10021 impl<'de> serde::de::Visitor<'de> for Visitor {
10022 type Value = FetchFileDiffResponse;
10023 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10024 formatter.write_str("struct FetchFileDiffResponse")
10025 }
10026 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10027 where
10028 A: serde::de::MapAccess<'de>,
10029 {
10030 #[allow(unused_imports)]
10031 use serde::de::Error;
10032 use std::option::Option::Some;
10033 let mut fields = std::collections::HashSet::new();
10034 let mut result = Self::Value::new();
10035 while let Some(tag) = map.next_key::<__FieldTag>()? {
10036 #[allow(clippy::match_single_binding)]
10037 match tag {
10038 __FieldTag::__formatted_diff => {
10039 if !fields.insert(__FieldTag::__formatted_diff) {
10040 return std::result::Result::Err(A::Error::duplicate_field(
10041 "multiple values for formatted_diff",
10042 ));
10043 }
10044 result.formatted_diff = map
10045 .next_value::<std::option::Option<std::string::String>>()?
10046 .unwrap_or_default();
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 FetchFileDiffResponse {
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 !self.formatted_diff.is_empty() {
10072 state.serialize_entry("formattedDiff", &self.formatted_diff)?;
10073 }
10074 if !self._unknown_fields.is_empty() {
10075 for (key, value) in self._unknown_fields.iter() {
10076 state.serialize_entry(key, &value)?;
10077 }
10078 }
10079 state.end()
10080 }
10081}
10082
10083impl std::fmt::Debug for FetchFileDiffResponse {
10084 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10085 let mut debug_struct = f.debug_struct("FetchFileDiffResponse");
10086 debug_struct.field("formatted_diff", &self.formatted_diff);
10087 if !self._unknown_fields.is_empty() {
10088 debug_struct.field("_unknown_fields", &self._unknown_fields);
10089 }
10090 debug_struct.finish()
10091 }
10092}
10093
10094#[derive(Clone, Default, PartialEq)]
10096#[non_exhaustive]
10097pub struct QueryDirectoryContentsRequest {
10098 pub workspace: std::string::String,
10100
10101 pub path: std::string::String,
10104
10105 pub page_size: i32,
10109
10110 pub page_token: std::string::String,
10117
10118 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10119}
10120
10121impl QueryDirectoryContentsRequest {
10122 pub fn new() -> Self {
10123 std::default::Default::default()
10124 }
10125
10126 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10128 self.workspace = v.into();
10129 self
10130 }
10131
10132 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10134 self.path = v.into();
10135 self
10136 }
10137
10138 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10140 self.page_size = v.into();
10141 self
10142 }
10143
10144 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10146 self.page_token = v.into();
10147 self
10148 }
10149}
10150
10151impl wkt::message::Message for QueryDirectoryContentsRequest {
10152 fn typename() -> &'static str {
10153 "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
10154 }
10155}
10156
10157#[doc(hidden)]
10158impl<'de> serde::de::Deserialize<'de> for QueryDirectoryContentsRequest {
10159 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10160 where
10161 D: serde::Deserializer<'de>,
10162 {
10163 #[allow(non_camel_case_types)]
10164 #[doc(hidden)]
10165 #[derive(PartialEq, Eq, Hash)]
10166 enum __FieldTag {
10167 __workspace,
10168 __path,
10169 __page_size,
10170 __page_token,
10171 Unknown(std::string::String),
10172 }
10173 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10174 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10175 where
10176 D: serde::Deserializer<'de>,
10177 {
10178 struct Visitor;
10179 impl<'de> serde::de::Visitor<'de> for Visitor {
10180 type Value = __FieldTag;
10181 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10182 formatter.write_str("a field name for QueryDirectoryContentsRequest")
10183 }
10184 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10185 where
10186 E: serde::de::Error,
10187 {
10188 use std::result::Result::Ok;
10189 use std::string::ToString;
10190 match value {
10191 "workspace" => Ok(__FieldTag::__workspace),
10192 "path" => Ok(__FieldTag::__path),
10193 "pageSize" => Ok(__FieldTag::__page_size),
10194 "page_size" => Ok(__FieldTag::__page_size),
10195 "pageToken" => Ok(__FieldTag::__page_token),
10196 "page_token" => Ok(__FieldTag::__page_token),
10197 _ => Ok(__FieldTag::Unknown(value.to_string())),
10198 }
10199 }
10200 }
10201 deserializer.deserialize_identifier(Visitor)
10202 }
10203 }
10204 struct Visitor;
10205 impl<'de> serde::de::Visitor<'de> for Visitor {
10206 type Value = QueryDirectoryContentsRequest;
10207 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10208 formatter.write_str("struct QueryDirectoryContentsRequest")
10209 }
10210 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10211 where
10212 A: serde::de::MapAccess<'de>,
10213 {
10214 #[allow(unused_imports)]
10215 use serde::de::Error;
10216 use std::option::Option::Some;
10217 let mut fields = std::collections::HashSet::new();
10218 let mut result = Self::Value::new();
10219 while let Some(tag) = map.next_key::<__FieldTag>()? {
10220 #[allow(clippy::match_single_binding)]
10221 match tag {
10222 __FieldTag::__workspace => {
10223 if !fields.insert(__FieldTag::__workspace) {
10224 return std::result::Result::Err(A::Error::duplicate_field(
10225 "multiple values for workspace",
10226 ));
10227 }
10228 result.workspace = map
10229 .next_value::<std::option::Option<std::string::String>>()?
10230 .unwrap_or_default();
10231 }
10232 __FieldTag::__path => {
10233 if !fields.insert(__FieldTag::__path) {
10234 return std::result::Result::Err(A::Error::duplicate_field(
10235 "multiple values for path",
10236 ));
10237 }
10238 result.path = map
10239 .next_value::<std::option::Option<std::string::String>>()?
10240 .unwrap_or_default();
10241 }
10242 __FieldTag::__page_size => {
10243 if !fields.insert(__FieldTag::__page_size) {
10244 return std::result::Result::Err(A::Error::duplicate_field(
10245 "multiple values for page_size",
10246 ));
10247 }
10248 struct __With(std::option::Option<i32>);
10249 impl<'de> serde::de::Deserialize<'de> for __With {
10250 fn deserialize<D>(
10251 deserializer: D,
10252 ) -> std::result::Result<Self, D::Error>
10253 where
10254 D: serde::de::Deserializer<'de>,
10255 {
10256 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
10257 }
10258 }
10259 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
10260 }
10261 __FieldTag::__page_token => {
10262 if !fields.insert(__FieldTag::__page_token) {
10263 return std::result::Result::Err(A::Error::duplicate_field(
10264 "multiple values for page_token",
10265 ));
10266 }
10267 result.page_token = map
10268 .next_value::<std::option::Option<std::string::String>>()?
10269 .unwrap_or_default();
10270 }
10271 __FieldTag::Unknown(key) => {
10272 let value = map.next_value::<serde_json::Value>()?;
10273 result._unknown_fields.insert(key, value);
10274 }
10275 }
10276 }
10277 std::result::Result::Ok(result)
10278 }
10279 }
10280 deserializer.deserialize_any(Visitor)
10281 }
10282}
10283
10284#[doc(hidden)]
10285impl serde::ser::Serialize for QueryDirectoryContentsRequest {
10286 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10287 where
10288 S: serde::ser::Serializer,
10289 {
10290 use serde::ser::SerializeMap;
10291 #[allow(unused_imports)]
10292 use std::option::Option::Some;
10293 let mut state = serializer.serialize_map(std::option::Option::None)?;
10294 if !self.workspace.is_empty() {
10295 state.serialize_entry("workspace", &self.workspace)?;
10296 }
10297 if !self.path.is_empty() {
10298 state.serialize_entry("path", &self.path)?;
10299 }
10300 if !wkt::internal::is_default(&self.page_size) {
10301 struct __With<'a>(&'a i32);
10302 impl<'a> serde::ser::Serialize for __With<'a> {
10303 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10304 where
10305 S: serde::ser::Serializer,
10306 {
10307 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
10308 }
10309 }
10310 state.serialize_entry("pageSize", &__With(&self.page_size))?;
10311 }
10312 if !self.page_token.is_empty() {
10313 state.serialize_entry("pageToken", &self.page_token)?;
10314 }
10315 if !self._unknown_fields.is_empty() {
10316 for (key, value) in self._unknown_fields.iter() {
10317 state.serialize_entry(key, &value)?;
10318 }
10319 }
10320 state.end()
10321 }
10322}
10323
10324impl std::fmt::Debug for QueryDirectoryContentsRequest {
10325 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10326 let mut debug_struct = f.debug_struct("QueryDirectoryContentsRequest");
10327 debug_struct.field("workspace", &self.workspace);
10328 debug_struct.field("path", &self.path);
10329 debug_struct.field("page_size", &self.page_size);
10330 debug_struct.field("page_token", &self.page_token);
10331 if !self._unknown_fields.is_empty() {
10332 debug_struct.field("_unknown_fields", &self._unknown_fields);
10333 }
10334 debug_struct.finish()
10335 }
10336}
10337
10338#[derive(Clone, Default, PartialEq)]
10340#[non_exhaustive]
10341pub struct QueryDirectoryContentsResponse {
10342 pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
10344
10345 pub next_page_token: std::string::String,
10348
10349 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10350}
10351
10352impl QueryDirectoryContentsResponse {
10353 pub fn new() -> Self {
10354 std::default::Default::default()
10355 }
10356
10357 pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
10359 where
10360 T: std::iter::IntoIterator<Item = V>,
10361 V: std::convert::Into<crate::model::DirectoryEntry>,
10362 {
10363 use std::iter::Iterator;
10364 self.directory_entries = v.into_iter().map(|i| i.into()).collect();
10365 self
10366 }
10367
10368 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10370 self.next_page_token = v.into();
10371 self
10372 }
10373}
10374
10375impl wkt::message::Message for QueryDirectoryContentsResponse {
10376 fn typename() -> &'static str {
10377 "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
10378 }
10379}
10380
10381#[doc(hidden)]
10382impl gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
10383 type PageItem = crate::model::DirectoryEntry;
10384
10385 fn items(self) -> std::vec::Vec<Self::PageItem> {
10386 self.directory_entries
10387 }
10388
10389 fn next_page_token(&self) -> std::string::String {
10390 use std::clone::Clone;
10391 self.next_page_token.clone()
10392 }
10393}
10394
10395#[doc(hidden)]
10396impl<'de> serde::de::Deserialize<'de> for QueryDirectoryContentsResponse {
10397 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10398 where
10399 D: serde::Deserializer<'de>,
10400 {
10401 #[allow(non_camel_case_types)]
10402 #[doc(hidden)]
10403 #[derive(PartialEq, Eq, Hash)]
10404 enum __FieldTag {
10405 __directory_entries,
10406 __next_page_token,
10407 Unknown(std::string::String),
10408 }
10409 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10410 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10411 where
10412 D: serde::Deserializer<'de>,
10413 {
10414 struct Visitor;
10415 impl<'de> serde::de::Visitor<'de> for Visitor {
10416 type Value = __FieldTag;
10417 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10418 formatter.write_str("a field name for QueryDirectoryContentsResponse")
10419 }
10420 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10421 where
10422 E: serde::de::Error,
10423 {
10424 use std::result::Result::Ok;
10425 use std::string::ToString;
10426 match value {
10427 "directoryEntries" => Ok(__FieldTag::__directory_entries),
10428 "directory_entries" => Ok(__FieldTag::__directory_entries),
10429 "nextPageToken" => Ok(__FieldTag::__next_page_token),
10430 "next_page_token" => Ok(__FieldTag::__next_page_token),
10431 _ => Ok(__FieldTag::Unknown(value.to_string())),
10432 }
10433 }
10434 }
10435 deserializer.deserialize_identifier(Visitor)
10436 }
10437 }
10438 struct Visitor;
10439 impl<'de> serde::de::Visitor<'de> for Visitor {
10440 type Value = QueryDirectoryContentsResponse;
10441 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10442 formatter.write_str("struct QueryDirectoryContentsResponse")
10443 }
10444 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10445 where
10446 A: serde::de::MapAccess<'de>,
10447 {
10448 #[allow(unused_imports)]
10449 use serde::de::Error;
10450 use std::option::Option::Some;
10451 let mut fields = std::collections::HashSet::new();
10452 let mut result = Self::Value::new();
10453 while let Some(tag) = map.next_key::<__FieldTag>()? {
10454 #[allow(clippy::match_single_binding)]
10455 match tag {
10456 __FieldTag::__directory_entries => {
10457 if !fields.insert(__FieldTag::__directory_entries) {
10458 return std::result::Result::Err(A::Error::duplicate_field(
10459 "multiple values for directory_entries",
10460 ));
10461 }
10462 result.directory_entries =
10463 map.next_value::<std::option::Option<
10464 std::vec::Vec<crate::model::DirectoryEntry>,
10465 >>()?
10466 .unwrap_or_default();
10467 }
10468 __FieldTag::__next_page_token => {
10469 if !fields.insert(__FieldTag::__next_page_token) {
10470 return std::result::Result::Err(A::Error::duplicate_field(
10471 "multiple values for next_page_token",
10472 ));
10473 }
10474 result.next_page_token = map
10475 .next_value::<std::option::Option<std::string::String>>()?
10476 .unwrap_or_default();
10477 }
10478 __FieldTag::Unknown(key) => {
10479 let value = map.next_value::<serde_json::Value>()?;
10480 result._unknown_fields.insert(key, value);
10481 }
10482 }
10483 }
10484 std::result::Result::Ok(result)
10485 }
10486 }
10487 deserializer.deserialize_any(Visitor)
10488 }
10489}
10490
10491#[doc(hidden)]
10492impl serde::ser::Serialize for QueryDirectoryContentsResponse {
10493 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10494 where
10495 S: serde::ser::Serializer,
10496 {
10497 use serde::ser::SerializeMap;
10498 #[allow(unused_imports)]
10499 use std::option::Option::Some;
10500 let mut state = serializer.serialize_map(std::option::Option::None)?;
10501 if !self.directory_entries.is_empty() {
10502 state.serialize_entry("directoryEntries", &self.directory_entries)?;
10503 }
10504 if !self.next_page_token.is_empty() {
10505 state.serialize_entry("nextPageToken", &self.next_page_token)?;
10506 }
10507 if !self._unknown_fields.is_empty() {
10508 for (key, value) in self._unknown_fields.iter() {
10509 state.serialize_entry(key, &value)?;
10510 }
10511 }
10512 state.end()
10513 }
10514}
10515
10516impl std::fmt::Debug for QueryDirectoryContentsResponse {
10517 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10518 let mut debug_struct = f.debug_struct("QueryDirectoryContentsResponse");
10519 debug_struct.field("directory_entries", &self.directory_entries);
10520 debug_struct.field("next_page_token", &self.next_page_token);
10521 if !self._unknown_fields.is_empty() {
10522 debug_struct.field("_unknown_fields", &self._unknown_fields);
10523 }
10524 debug_struct.finish()
10525 }
10526}
10527
10528#[derive(Clone, Default, PartialEq)]
10530#[non_exhaustive]
10531pub struct DirectoryEntry {
10532 pub entry: std::option::Option<crate::model::directory_entry::Entry>,
10534
10535 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10536}
10537
10538impl DirectoryEntry {
10539 pub fn new() -> Self {
10540 std::default::Default::default()
10541 }
10542
10543 pub fn set_entry<
10548 T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
10549 >(
10550 mut self,
10551 v: T,
10552 ) -> Self {
10553 self.entry = v.into();
10554 self
10555 }
10556
10557 pub fn file(&self) -> std::option::Option<&std::string::String> {
10561 #[allow(unreachable_patterns)]
10562 self.entry.as_ref().and_then(|v| match v {
10563 crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
10564 _ => std::option::Option::None,
10565 })
10566 }
10567
10568 pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10574 self.entry =
10575 std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
10576 self
10577 }
10578
10579 pub fn directory(&self) -> std::option::Option<&std::string::String> {
10583 #[allow(unreachable_patterns)]
10584 self.entry.as_ref().and_then(|v| match v {
10585 crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
10586 _ => std::option::Option::None,
10587 })
10588 }
10589
10590 pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10596 self.entry =
10597 std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
10598 self
10599 }
10600}
10601
10602impl wkt::message::Message for DirectoryEntry {
10603 fn typename() -> &'static str {
10604 "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
10605 }
10606}
10607
10608#[doc(hidden)]
10609impl<'de> serde::de::Deserialize<'de> for DirectoryEntry {
10610 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10611 where
10612 D: serde::Deserializer<'de>,
10613 {
10614 #[allow(non_camel_case_types)]
10615 #[doc(hidden)]
10616 #[derive(PartialEq, Eq, Hash)]
10617 enum __FieldTag {
10618 __file,
10619 __directory,
10620 Unknown(std::string::String),
10621 }
10622 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10623 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10624 where
10625 D: serde::Deserializer<'de>,
10626 {
10627 struct Visitor;
10628 impl<'de> serde::de::Visitor<'de> for Visitor {
10629 type Value = __FieldTag;
10630 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10631 formatter.write_str("a field name for DirectoryEntry")
10632 }
10633 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10634 where
10635 E: serde::de::Error,
10636 {
10637 use std::result::Result::Ok;
10638 use std::string::ToString;
10639 match value {
10640 "file" => Ok(__FieldTag::__file),
10641 "directory" => Ok(__FieldTag::__directory),
10642 _ => Ok(__FieldTag::Unknown(value.to_string())),
10643 }
10644 }
10645 }
10646 deserializer.deserialize_identifier(Visitor)
10647 }
10648 }
10649 struct Visitor;
10650 impl<'de> serde::de::Visitor<'de> for Visitor {
10651 type Value = DirectoryEntry;
10652 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10653 formatter.write_str("struct DirectoryEntry")
10654 }
10655 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10656 where
10657 A: serde::de::MapAccess<'de>,
10658 {
10659 #[allow(unused_imports)]
10660 use serde::de::Error;
10661 use std::option::Option::Some;
10662 let mut fields = std::collections::HashSet::new();
10663 let mut result = Self::Value::new();
10664 while let Some(tag) = map.next_key::<__FieldTag>()? {
10665 #[allow(clippy::match_single_binding)]
10666 match tag {
10667 __FieldTag::__file => {
10668 if !fields.insert(__FieldTag::__file) {
10669 return std::result::Result::Err(A::Error::duplicate_field(
10670 "multiple values for file",
10671 ));
10672 }
10673 if result.entry.is_some() {
10674 return std::result::Result::Err(A::Error::duplicate_field(
10675 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.DirectoryEntry.file, latest field was file",
10676 ));
10677 }
10678 result.entry = std::option::Option::Some(
10679 crate::model::directory_entry::Entry::File(
10680 map.next_value::<std::option::Option<std::string::String>>()?
10681 .unwrap_or_default(),
10682 ),
10683 );
10684 }
10685 __FieldTag::__directory => {
10686 if !fields.insert(__FieldTag::__directory) {
10687 return std::result::Result::Err(A::Error::duplicate_field(
10688 "multiple values for directory",
10689 ));
10690 }
10691 if result.entry.is_some() {
10692 return std::result::Result::Err(A::Error::duplicate_field(
10693 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.DirectoryEntry.directory, latest field was directory",
10694 ));
10695 }
10696 result.entry = std::option::Option::Some(
10697 crate::model::directory_entry::Entry::Directory(
10698 map.next_value::<std::option::Option<std::string::String>>()?
10699 .unwrap_or_default(),
10700 ),
10701 );
10702 }
10703 __FieldTag::Unknown(key) => {
10704 let value = map.next_value::<serde_json::Value>()?;
10705 result._unknown_fields.insert(key, value);
10706 }
10707 }
10708 }
10709 std::result::Result::Ok(result)
10710 }
10711 }
10712 deserializer.deserialize_any(Visitor)
10713 }
10714}
10715
10716#[doc(hidden)]
10717impl serde::ser::Serialize for DirectoryEntry {
10718 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10719 where
10720 S: serde::ser::Serializer,
10721 {
10722 use serde::ser::SerializeMap;
10723 #[allow(unused_imports)]
10724 use std::option::Option::Some;
10725 let mut state = serializer.serialize_map(std::option::Option::None)?;
10726 if let Some(value) = self.file() {
10727 state.serialize_entry("file", value)?;
10728 }
10729 if let Some(value) = self.directory() {
10730 state.serialize_entry("directory", value)?;
10731 }
10732 if !self._unknown_fields.is_empty() {
10733 for (key, value) in self._unknown_fields.iter() {
10734 state.serialize_entry(key, &value)?;
10735 }
10736 }
10737 state.end()
10738 }
10739}
10740
10741impl std::fmt::Debug for DirectoryEntry {
10742 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10743 let mut debug_struct = f.debug_struct("DirectoryEntry");
10744 debug_struct.field("entry", &self.entry);
10745 if !self._unknown_fields.is_empty() {
10746 debug_struct.field("_unknown_fields", &self._unknown_fields);
10747 }
10748 debug_struct.finish()
10749 }
10750}
10751
10752pub mod directory_entry {
10754 #[allow(unused_imports)]
10755 use super::*;
10756
10757 #[derive(Clone, Debug, PartialEq)]
10759 #[non_exhaustive]
10760 pub enum Entry {
10761 File(std::string::String),
10763 Directory(std::string::String),
10765 }
10766}
10767
10768#[derive(Clone, Default, PartialEq)]
10770#[non_exhaustive]
10771pub struct SearchFilesRequest {
10772 pub workspace: std::string::String,
10774
10775 pub page_size: i32,
10779
10780 pub page_token: std::string::String,
10787
10788 pub filter: std::string::String,
10792
10793 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10794}
10795
10796impl SearchFilesRequest {
10797 pub fn new() -> Self {
10798 std::default::Default::default()
10799 }
10800
10801 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10803 self.workspace = v.into();
10804 self
10805 }
10806
10807 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10809 self.page_size = v.into();
10810 self
10811 }
10812
10813 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10815 self.page_token = v.into();
10816 self
10817 }
10818
10819 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10821 self.filter = v.into();
10822 self
10823 }
10824}
10825
10826impl wkt::message::Message for SearchFilesRequest {
10827 fn typename() -> &'static str {
10828 "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
10829 }
10830}
10831
10832#[doc(hidden)]
10833impl<'de> serde::de::Deserialize<'de> for SearchFilesRequest {
10834 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10835 where
10836 D: serde::Deserializer<'de>,
10837 {
10838 #[allow(non_camel_case_types)]
10839 #[doc(hidden)]
10840 #[derive(PartialEq, Eq, Hash)]
10841 enum __FieldTag {
10842 __workspace,
10843 __page_size,
10844 __page_token,
10845 __filter,
10846 Unknown(std::string::String),
10847 }
10848 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
10849 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10850 where
10851 D: serde::Deserializer<'de>,
10852 {
10853 struct Visitor;
10854 impl<'de> serde::de::Visitor<'de> for Visitor {
10855 type Value = __FieldTag;
10856 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10857 formatter.write_str("a field name for SearchFilesRequest")
10858 }
10859 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
10860 where
10861 E: serde::de::Error,
10862 {
10863 use std::result::Result::Ok;
10864 use std::string::ToString;
10865 match value {
10866 "workspace" => Ok(__FieldTag::__workspace),
10867 "pageSize" => Ok(__FieldTag::__page_size),
10868 "page_size" => Ok(__FieldTag::__page_size),
10869 "pageToken" => Ok(__FieldTag::__page_token),
10870 "page_token" => Ok(__FieldTag::__page_token),
10871 "filter" => Ok(__FieldTag::__filter),
10872 _ => Ok(__FieldTag::Unknown(value.to_string())),
10873 }
10874 }
10875 }
10876 deserializer.deserialize_identifier(Visitor)
10877 }
10878 }
10879 struct Visitor;
10880 impl<'de> serde::de::Visitor<'de> for Visitor {
10881 type Value = SearchFilesRequest;
10882 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
10883 formatter.write_str("struct SearchFilesRequest")
10884 }
10885 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
10886 where
10887 A: serde::de::MapAccess<'de>,
10888 {
10889 #[allow(unused_imports)]
10890 use serde::de::Error;
10891 use std::option::Option::Some;
10892 let mut fields = std::collections::HashSet::new();
10893 let mut result = Self::Value::new();
10894 while let Some(tag) = map.next_key::<__FieldTag>()? {
10895 #[allow(clippy::match_single_binding)]
10896 match tag {
10897 __FieldTag::__workspace => {
10898 if !fields.insert(__FieldTag::__workspace) {
10899 return std::result::Result::Err(A::Error::duplicate_field(
10900 "multiple values for workspace",
10901 ));
10902 }
10903 result.workspace = map
10904 .next_value::<std::option::Option<std::string::String>>()?
10905 .unwrap_or_default();
10906 }
10907 __FieldTag::__page_size => {
10908 if !fields.insert(__FieldTag::__page_size) {
10909 return std::result::Result::Err(A::Error::duplicate_field(
10910 "multiple values for page_size",
10911 ));
10912 }
10913 struct __With(std::option::Option<i32>);
10914 impl<'de> serde::de::Deserialize<'de> for __With {
10915 fn deserialize<D>(
10916 deserializer: D,
10917 ) -> std::result::Result<Self, D::Error>
10918 where
10919 D: serde::de::Deserializer<'de>,
10920 {
10921 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
10922 }
10923 }
10924 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
10925 }
10926 __FieldTag::__page_token => {
10927 if !fields.insert(__FieldTag::__page_token) {
10928 return std::result::Result::Err(A::Error::duplicate_field(
10929 "multiple values for page_token",
10930 ));
10931 }
10932 result.page_token = map
10933 .next_value::<std::option::Option<std::string::String>>()?
10934 .unwrap_or_default();
10935 }
10936 __FieldTag::__filter => {
10937 if !fields.insert(__FieldTag::__filter) {
10938 return std::result::Result::Err(A::Error::duplicate_field(
10939 "multiple values for filter",
10940 ));
10941 }
10942 result.filter = map
10943 .next_value::<std::option::Option<std::string::String>>()?
10944 .unwrap_or_default();
10945 }
10946 __FieldTag::Unknown(key) => {
10947 let value = map.next_value::<serde_json::Value>()?;
10948 result._unknown_fields.insert(key, value);
10949 }
10950 }
10951 }
10952 std::result::Result::Ok(result)
10953 }
10954 }
10955 deserializer.deserialize_any(Visitor)
10956 }
10957}
10958
10959#[doc(hidden)]
10960impl serde::ser::Serialize for SearchFilesRequest {
10961 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10962 where
10963 S: serde::ser::Serializer,
10964 {
10965 use serde::ser::SerializeMap;
10966 #[allow(unused_imports)]
10967 use std::option::Option::Some;
10968 let mut state = serializer.serialize_map(std::option::Option::None)?;
10969 if !self.workspace.is_empty() {
10970 state.serialize_entry("workspace", &self.workspace)?;
10971 }
10972 if !wkt::internal::is_default(&self.page_size) {
10973 struct __With<'a>(&'a i32);
10974 impl<'a> serde::ser::Serialize for __With<'a> {
10975 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10976 where
10977 S: serde::ser::Serializer,
10978 {
10979 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
10980 }
10981 }
10982 state.serialize_entry("pageSize", &__With(&self.page_size))?;
10983 }
10984 if !self.page_token.is_empty() {
10985 state.serialize_entry("pageToken", &self.page_token)?;
10986 }
10987 if !self.filter.is_empty() {
10988 state.serialize_entry("filter", &self.filter)?;
10989 }
10990 if !self._unknown_fields.is_empty() {
10991 for (key, value) in self._unknown_fields.iter() {
10992 state.serialize_entry(key, &value)?;
10993 }
10994 }
10995 state.end()
10996 }
10997}
10998
10999impl std::fmt::Debug for SearchFilesRequest {
11000 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11001 let mut debug_struct = f.debug_struct("SearchFilesRequest");
11002 debug_struct.field("workspace", &self.workspace);
11003 debug_struct.field("page_size", &self.page_size);
11004 debug_struct.field("page_token", &self.page_token);
11005 debug_struct.field("filter", &self.filter);
11006 if !self._unknown_fields.is_empty() {
11007 debug_struct.field("_unknown_fields", &self._unknown_fields);
11008 }
11009 debug_struct.finish()
11010 }
11011}
11012
11013#[derive(Clone, Default, PartialEq)]
11015#[non_exhaustive]
11016pub struct SearchFilesResponse {
11017 pub search_results: std::vec::Vec<crate::model::SearchResult>,
11019
11020 pub next_page_token: std::string::String,
11023
11024 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11025}
11026
11027impl SearchFilesResponse {
11028 pub fn new() -> Self {
11029 std::default::Default::default()
11030 }
11031
11032 pub fn set_search_results<T, V>(mut self, v: T) -> Self
11034 where
11035 T: std::iter::IntoIterator<Item = V>,
11036 V: std::convert::Into<crate::model::SearchResult>,
11037 {
11038 use std::iter::Iterator;
11039 self.search_results = v.into_iter().map(|i| i.into()).collect();
11040 self
11041 }
11042
11043 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11045 self.next_page_token = v.into();
11046 self
11047 }
11048}
11049
11050impl wkt::message::Message for SearchFilesResponse {
11051 fn typename() -> &'static str {
11052 "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
11053 }
11054}
11055
11056#[doc(hidden)]
11057impl gax::paginator::internal::PageableResponse for SearchFilesResponse {
11058 type PageItem = crate::model::SearchResult;
11059
11060 fn items(self) -> std::vec::Vec<Self::PageItem> {
11061 self.search_results
11062 }
11063
11064 fn next_page_token(&self) -> std::string::String {
11065 use std::clone::Clone;
11066 self.next_page_token.clone()
11067 }
11068}
11069
11070#[doc(hidden)]
11071impl<'de> serde::de::Deserialize<'de> for SearchFilesResponse {
11072 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11073 where
11074 D: serde::Deserializer<'de>,
11075 {
11076 #[allow(non_camel_case_types)]
11077 #[doc(hidden)]
11078 #[derive(PartialEq, Eq, Hash)]
11079 enum __FieldTag {
11080 __search_results,
11081 __next_page_token,
11082 Unknown(std::string::String),
11083 }
11084 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11085 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11086 where
11087 D: serde::Deserializer<'de>,
11088 {
11089 struct Visitor;
11090 impl<'de> serde::de::Visitor<'de> for Visitor {
11091 type Value = __FieldTag;
11092 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11093 formatter.write_str("a field name for SearchFilesResponse")
11094 }
11095 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11096 where
11097 E: serde::de::Error,
11098 {
11099 use std::result::Result::Ok;
11100 use std::string::ToString;
11101 match value {
11102 "searchResults" => Ok(__FieldTag::__search_results),
11103 "search_results" => Ok(__FieldTag::__search_results),
11104 "nextPageToken" => Ok(__FieldTag::__next_page_token),
11105 "next_page_token" => Ok(__FieldTag::__next_page_token),
11106 _ => Ok(__FieldTag::Unknown(value.to_string())),
11107 }
11108 }
11109 }
11110 deserializer.deserialize_identifier(Visitor)
11111 }
11112 }
11113 struct Visitor;
11114 impl<'de> serde::de::Visitor<'de> for Visitor {
11115 type Value = SearchFilesResponse;
11116 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11117 formatter.write_str("struct SearchFilesResponse")
11118 }
11119 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11120 where
11121 A: serde::de::MapAccess<'de>,
11122 {
11123 #[allow(unused_imports)]
11124 use serde::de::Error;
11125 use std::option::Option::Some;
11126 let mut fields = std::collections::HashSet::new();
11127 let mut result = Self::Value::new();
11128 while let Some(tag) = map.next_key::<__FieldTag>()? {
11129 #[allow(clippy::match_single_binding)]
11130 match tag {
11131 __FieldTag::__search_results => {
11132 if !fields.insert(__FieldTag::__search_results) {
11133 return std::result::Result::Err(A::Error::duplicate_field(
11134 "multiple values for search_results",
11135 ));
11136 }
11137 result.search_results = map.next_value::<std::option::Option<std::vec::Vec<crate::model::SearchResult>>>()?.unwrap_or_default();
11138 }
11139 __FieldTag::__next_page_token => {
11140 if !fields.insert(__FieldTag::__next_page_token) {
11141 return std::result::Result::Err(A::Error::duplicate_field(
11142 "multiple values for next_page_token",
11143 ));
11144 }
11145 result.next_page_token = map
11146 .next_value::<std::option::Option<std::string::String>>()?
11147 .unwrap_or_default();
11148 }
11149 __FieldTag::Unknown(key) => {
11150 let value = map.next_value::<serde_json::Value>()?;
11151 result._unknown_fields.insert(key, value);
11152 }
11153 }
11154 }
11155 std::result::Result::Ok(result)
11156 }
11157 }
11158 deserializer.deserialize_any(Visitor)
11159 }
11160}
11161
11162#[doc(hidden)]
11163impl serde::ser::Serialize for SearchFilesResponse {
11164 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11165 where
11166 S: serde::ser::Serializer,
11167 {
11168 use serde::ser::SerializeMap;
11169 #[allow(unused_imports)]
11170 use std::option::Option::Some;
11171 let mut state = serializer.serialize_map(std::option::Option::None)?;
11172 if !self.search_results.is_empty() {
11173 state.serialize_entry("searchResults", &self.search_results)?;
11174 }
11175 if !self.next_page_token.is_empty() {
11176 state.serialize_entry("nextPageToken", &self.next_page_token)?;
11177 }
11178 if !self._unknown_fields.is_empty() {
11179 for (key, value) in self._unknown_fields.iter() {
11180 state.serialize_entry(key, &value)?;
11181 }
11182 }
11183 state.end()
11184 }
11185}
11186
11187impl std::fmt::Debug for SearchFilesResponse {
11188 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11189 let mut debug_struct = f.debug_struct("SearchFilesResponse");
11190 debug_struct.field("search_results", &self.search_results);
11191 debug_struct.field("next_page_token", &self.next_page_token);
11192 if !self._unknown_fields.is_empty() {
11193 debug_struct.field("_unknown_fields", &self._unknown_fields);
11194 }
11195 debug_struct.finish()
11196 }
11197}
11198
11199#[derive(Clone, Default, PartialEq)]
11201#[non_exhaustive]
11202pub struct SearchResult {
11203 pub entry: std::option::Option<crate::model::search_result::Entry>,
11205
11206 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11207}
11208
11209impl SearchResult {
11210 pub fn new() -> Self {
11211 std::default::Default::default()
11212 }
11213
11214 pub fn set_entry<
11219 T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
11220 >(
11221 mut self,
11222 v: T,
11223 ) -> Self {
11224 self.entry = v.into();
11225 self
11226 }
11227
11228 pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
11232 #[allow(unreachable_patterns)]
11233 self.entry.as_ref().and_then(|v| match v {
11234 crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
11235 _ => std::option::Option::None,
11236 })
11237 }
11238
11239 pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
11245 mut self,
11246 v: T,
11247 ) -> Self {
11248 self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
11249 self
11250 }
11251
11252 pub fn directory(
11256 &self,
11257 ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
11258 #[allow(unreachable_patterns)]
11259 self.entry.as_ref().and_then(|v| match v {
11260 crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
11261 _ => std::option::Option::None,
11262 })
11263 }
11264
11265 pub fn set_directory<
11271 T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
11272 >(
11273 mut self,
11274 v: T,
11275 ) -> Self {
11276 self.entry =
11277 std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
11278 self
11279 }
11280}
11281
11282impl wkt::message::Message for SearchResult {
11283 fn typename() -> &'static str {
11284 "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
11285 }
11286}
11287
11288#[doc(hidden)]
11289impl<'de> serde::de::Deserialize<'de> for SearchResult {
11290 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11291 where
11292 D: serde::Deserializer<'de>,
11293 {
11294 #[allow(non_camel_case_types)]
11295 #[doc(hidden)]
11296 #[derive(PartialEq, Eq, Hash)]
11297 enum __FieldTag {
11298 __file,
11299 __directory,
11300 Unknown(std::string::String),
11301 }
11302 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11303 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11304 where
11305 D: serde::Deserializer<'de>,
11306 {
11307 struct Visitor;
11308 impl<'de> serde::de::Visitor<'de> for Visitor {
11309 type Value = __FieldTag;
11310 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11311 formatter.write_str("a field name for SearchResult")
11312 }
11313 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11314 where
11315 E: serde::de::Error,
11316 {
11317 use std::result::Result::Ok;
11318 use std::string::ToString;
11319 match value {
11320 "file" => Ok(__FieldTag::__file),
11321 "directory" => Ok(__FieldTag::__directory),
11322 _ => Ok(__FieldTag::Unknown(value.to_string())),
11323 }
11324 }
11325 }
11326 deserializer.deserialize_identifier(Visitor)
11327 }
11328 }
11329 struct Visitor;
11330 impl<'de> serde::de::Visitor<'de> for Visitor {
11331 type Value = SearchResult;
11332 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11333 formatter.write_str("struct SearchResult")
11334 }
11335 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11336 where
11337 A: serde::de::MapAccess<'de>,
11338 {
11339 #[allow(unused_imports)]
11340 use serde::de::Error;
11341 use std::option::Option::Some;
11342 let mut fields = std::collections::HashSet::new();
11343 let mut result = Self::Value::new();
11344 while let Some(tag) = map.next_key::<__FieldTag>()? {
11345 #[allow(clippy::match_single_binding)]
11346 match tag {
11347 __FieldTag::__file => {
11348 if !fields.insert(__FieldTag::__file) {
11349 return std::result::Result::Err(A::Error::duplicate_field(
11350 "multiple values for file",
11351 ));
11352 }
11353 if result.entry.is_some() {
11354 return std::result::Result::Err(A::Error::duplicate_field(
11355 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.SearchResult.file, latest field was file",
11356 ));
11357 }
11358 result.entry = std::option::Option::Some(
11359 crate::model::search_result::Entry::File(
11360 map.next_value::<std::option::Option<
11361 std::boxed::Box<crate::model::FileSearchResult>,
11362 >>()?
11363 .unwrap_or_default(),
11364 ),
11365 );
11366 }
11367 __FieldTag::__directory => {
11368 if !fields.insert(__FieldTag::__directory) {
11369 return std::result::Result::Err(A::Error::duplicate_field(
11370 "multiple values for directory",
11371 ));
11372 }
11373 if result.entry.is_some() {
11374 return std::result::Result::Err(A::Error::duplicate_field(
11375 "multiple values for `entry`, a oneof with full ID .google.cloud.dataform.v1.SearchResult.directory, latest field was directory",
11376 ));
11377 }
11378 result.entry = std::option::Option::Some(
11379 crate::model::search_result::Entry::Directory(
11380 map.next_value::<std::option::Option<
11381 std::boxed::Box<crate::model::DirectorySearchResult>,
11382 >>()?
11383 .unwrap_or_default(),
11384 ),
11385 );
11386 }
11387 __FieldTag::Unknown(key) => {
11388 let value = map.next_value::<serde_json::Value>()?;
11389 result._unknown_fields.insert(key, value);
11390 }
11391 }
11392 }
11393 std::result::Result::Ok(result)
11394 }
11395 }
11396 deserializer.deserialize_any(Visitor)
11397 }
11398}
11399
11400#[doc(hidden)]
11401impl serde::ser::Serialize for SearchResult {
11402 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11403 where
11404 S: serde::ser::Serializer,
11405 {
11406 use serde::ser::SerializeMap;
11407 #[allow(unused_imports)]
11408 use std::option::Option::Some;
11409 let mut state = serializer.serialize_map(std::option::Option::None)?;
11410 if let Some(value) = self.file() {
11411 state.serialize_entry("file", value)?;
11412 }
11413 if let Some(value) = self.directory() {
11414 state.serialize_entry("directory", value)?;
11415 }
11416 if !self._unknown_fields.is_empty() {
11417 for (key, value) in self._unknown_fields.iter() {
11418 state.serialize_entry(key, &value)?;
11419 }
11420 }
11421 state.end()
11422 }
11423}
11424
11425impl std::fmt::Debug for SearchResult {
11426 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11427 let mut debug_struct = f.debug_struct("SearchResult");
11428 debug_struct.field("entry", &self.entry);
11429 if !self._unknown_fields.is_empty() {
11430 debug_struct.field("_unknown_fields", &self._unknown_fields);
11431 }
11432 debug_struct.finish()
11433 }
11434}
11435
11436pub mod search_result {
11438 #[allow(unused_imports)]
11439 use super::*;
11440
11441 #[derive(Clone, Debug, PartialEq)]
11443 #[non_exhaustive]
11444 pub enum Entry {
11445 File(std::boxed::Box<crate::model::FileSearchResult>),
11447 Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
11449 }
11450}
11451
11452#[derive(Clone, Default, PartialEq)]
11454#[non_exhaustive]
11455pub struct FileSearchResult {
11456 pub path: std::string::String,
11458
11459 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11460}
11461
11462impl FileSearchResult {
11463 pub fn new() -> Self {
11464 std::default::Default::default()
11465 }
11466
11467 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11469 self.path = v.into();
11470 self
11471 }
11472}
11473
11474impl wkt::message::Message for FileSearchResult {
11475 fn typename() -> &'static str {
11476 "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
11477 }
11478}
11479
11480#[doc(hidden)]
11481impl<'de> serde::de::Deserialize<'de> for FileSearchResult {
11482 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11483 where
11484 D: serde::Deserializer<'de>,
11485 {
11486 #[allow(non_camel_case_types)]
11487 #[doc(hidden)]
11488 #[derive(PartialEq, Eq, Hash)]
11489 enum __FieldTag {
11490 __path,
11491 Unknown(std::string::String),
11492 }
11493 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11494 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11495 where
11496 D: serde::Deserializer<'de>,
11497 {
11498 struct Visitor;
11499 impl<'de> serde::de::Visitor<'de> for Visitor {
11500 type Value = __FieldTag;
11501 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11502 formatter.write_str("a field name for FileSearchResult")
11503 }
11504 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11505 where
11506 E: serde::de::Error,
11507 {
11508 use std::result::Result::Ok;
11509 use std::string::ToString;
11510 match value {
11511 "path" => Ok(__FieldTag::__path),
11512 _ => Ok(__FieldTag::Unknown(value.to_string())),
11513 }
11514 }
11515 }
11516 deserializer.deserialize_identifier(Visitor)
11517 }
11518 }
11519 struct Visitor;
11520 impl<'de> serde::de::Visitor<'de> for Visitor {
11521 type Value = FileSearchResult;
11522 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11523 formatter.write_str("struct FileSearchResult")
11524 }
11525 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11526 where
11527 A: serde::de::MapAccess<'de>,
11528 {
11529 #[allow(unused_imports)]
11530 use serde::de::Error;
11531 use std::option::Option::Some;
11532 let mut fields = std::collections::HashSet::new();
11533 let mut result = Self::Value::new();
11534 while let Some(tag) = map.next_key::<__FieldTag>()? {
11535 #[allow(clippy::match_single_binding)]
11536 match tag {
11537 __FieldTag::__path => {
11538 if !fields.insert(__FieldTag::__path) {
11539 return std::result::Result::Err(A::Error::duplicate_field(
11540 "multiple values for path",
11541 ));
11542 }
11543 result.path = map
11544 .next_value::<std::option::Option<std::string::String>>()?
11545 .unwrap_or_default();
11546 }
11547 __FieldTag::Unknown(key) => {
11548 let value = map.next_value::<serde_json::Value>()?;
11549 result._unknown_fields.insert(key, value);
11550 }
11551 }
11552 }
11553 std::result::Result::Ok(result)
11554 }
11555 }
11556 deserializer.deserialize_any(Visitor)
11557 }
11558}
11559
11560#[doc(hidden)]
11561impl serde::ser::Serialize for FileSearchResult {
11562 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11563 where
11564 S: serde::ser::Serializer,
11565 {
11566 use serde::ser::SerializeMap;
11567 #[allow(unused_imports)]
11568 use std::option::Option::Some;
11569 let mut state = serializer.serialize_map(std::option::Option::None)?;
11570 if !self.path.is_empty() {
11571 state.serialize_entry("path", &self.path)?;
11572 }
11573 if !self._unknown_fields.is_empty() {
11574 for (key, value) in self._unknown_fields.iter() {
11575 state.serialize_entry(key, &value)?;
11576 }
11577 }
11578 state.end()
11579 }
11580}
11581
11582impl std::fmt::Debug for FileSearchResult {
11583 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11584 let mut debug_struct = f.debug_struct("FileSearchResult");
11585 debug_struct.field("path", &self.path);
11586 if !self._unknown_fields.is_empty() {
11587 debug_struct.field("_unknown_fields", &self._unknown_fields);
11588 }
11589 debug_struct.finish()
11590 }
11591}
11592
11593#[derive(Clone, Default, PartialEq)]
11595#[non_exhaustive]
11596pub struct DirectorySearchResult {
11597 pub path: std::string::String,
11599
11600 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11601}
11602
11603impl DirectorySearchResult {
11604 pub fn new() -> Self {
11605 std::default::Default::default()
11606 }
11607
11608 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11610 self.path = v.into();
11611 self
11612 }
11613}
11614
11615impl wkt::message::Message for DirectorySearchResult {
11616 fn typename() -> &'static str {
11617 "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
11618 }
11619}
11620
11621#[doc(hidden)]
11622impl<'de> serde::de::Deserialize<'de> for DirectorySearchResult {
11623 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11624 where
11625 D: serde::Deserializer<'de>,
11626 {
11627 #[allow(non_camel_case_types)]
11628 #[doc(hidden)]
11629 #[derive(PartialEq, Eq, Hash)]
11630 enum __FieldTag {
11631 __path,
11632 Unknown(std::string::String),
11633 }
11634 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11635 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11636 where
11637 D: serde::Deserializer<'de>,
11638 {
11639 struct Visitor;
11640 impl<'de> serde::de::Visitor<'de> for Visitor {
11641 type Value = __FieldTag;
11642 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11643 formatter.write_str("a field name for DirectorySearchResult")
11644 }
11645 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11646 where
11647 E: serde::de::Error,
11648 {
11649 use std::result::Result::Ok;
11650 use std::string::ToString;
11651 match value {
11652 "path" => Ok(__FieldTag::__path),
11653 _ => Ok(__FieldTag::Unknown(value.to_string())),
11654 }
11655 }
11656 }
11657 deserializer.deserialize_identifier(Visitor)
11658 }
11659 }
11660 struct Visitor;
11661 impl<'de> serde::de::Visitor<'de> for Visitor {
11662 type Value = DirectorySearchResult;
11663 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11664 formatter.write_str("struct DirectorySearchResult")
11665 }
11666 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11667 where
11668 A: serde::de::MapAccess<'de>,
11669 {
11670 #[allow(unused_imports)]
11671 use serde::de::Error;
11672 use std::option::Option::Some;
11673 let mut fields = std::collections::HashSet::new();
11674 let mut result = Self::Value::new();
11675 while let Some(tag) = map.next_key::<__FieldTag>()? {
11676 #[allow(clippy::match_single_binding)]
11677 match tag {
11678 __FieldTag::__path => {
11679 if !fields.insert(__FieldTag::__path) {
11680 return std::result::Result::Err(A::Error::duplicate_field(
11681 "multiple values for path",
11682 ));
11683 }
11684 result.path = map
11685 .next_value::<std::option::Option<std::string::String>>()?
11686 .unwrap_or_default();
11687 }
11688 __FieldTag::Unknown(key) => {
11689 let value = map.next_value::<serde_json::Value>()?;
11690 result._unknown_fields.insert(key, value);
11691 }
11692 }
11693 }
11694 std::result::Result::Ok(result)
11695 }
11696 }
11697 deserializer.deserialize_any(Visitor)
11698 }
11699}
11700
11701#[doc(hidden)]
11702impl serde::ser::Serialize for DirectorySearchResult {
11703 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11704 where
11705 S: serde::ser::Serializer,
11706 {
11707 use serde::ser::SerializeMap;
11708 #[allow(unused_imports)]
11709 use std::option::Option::Some;
11710 let mut state = serializer.serialize_map(std::option::Option::None)?;
11711 if !self.path.is_empty() {
11712 state.serialize_entry("path", &self.path)?;
11713 }
11714 if !self._unknown_fields.is_empty() {
11715 for (key, value) in self._unknown_fields.iter() {
11716 state.serialize_entry(key, &value)?;
11717 }
11718 }
11719 state.end()
11720 }
11721}
11722
11723impl std::fmt::Debug for DirectorySearchResult {
11724 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11725 let mut debug_struct = f.debug_struct("DirectorySearchResult");
11726 debug_struct.field("path", &self.path);
11727 if !self._unknown_fields.is_empty() {
11728 debug_struct.field("_unknown_fields", &self._unknown_fields);
11729 }
11730 debug_struct.finish()
11731 }
11732}
11733
11734#[derive(Clone, Default, PartialEq)]
11736#[non_exhaustive]
11737pub struct MakeDirectoryRequest {
11738 pub workspace: std::string::String,
11740
11741 pub path: std::string::String,
11744
11745 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11746}
11747
11748impl MakeDirectoryRequest {
11749 pub fn new() -> Self {
11750 std::default::Default::default()
11751 }
11752
11753 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11755 self.workspace = v.into();
11756 self
11757 }
11758
11759 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11761 self.path = v.into();
11762 self
11763 }
11764}
11765
11766impl wkt::message::Message for MakeDirectoryRequest {
11767 fn typename() -> &'static str {
11768 "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
11769 }
11770}
11771
11772#[doc(hidden)]
11773impl<'de> serde::de::Deserialize<'de> for MakeDirectoryRequest {
11774 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11775 where
11776 D: serde::Deserializer<'de>,
11777 {
11778 #[allow(non_camel_case_types)]
11779 #[doc(hidden)]
11780 #[derive(PartialEq, Eq, Hash)]
11781 enum __FieldTag {
11782 __workspace,
11783 __path,
11784 Unknown(std::string::String),
11785 }
11786 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11787 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11788 where
11789 D: serde::Deserializer<'de>,
11790 {
11791 struct Visitor;
11792 impl<'de> serde::de::Visitor<'de> for Visitor {
11793 type Value = __FieldTag;
11794 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11795 formatter.write_str("a field name for MakeDirectoryRequest")
11796 }
11797 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11798 where
11799 E: serde::de::Error,
11800 {
11801 use std::result::Result::Ok;
11802 use std::string::ToString;
11803 match value {
11804 "workspace" => Ok(__FieldTag::__workspace),
11805 "path" => Ok(__FieldTag::__path),
11806 _ => Ok(__FieldTag::Unknown(value.to_string())),
11807 }
11808 }
11809 }
11810 deserializer.deserialize_identifier(Visitor)
11811 }
11812 }
11813 struct Visitor;
11814 impl<'de> serde::de::Visitor<'de> for Visitor {
11815 type Value = MakeDirectoryRequest;
11816 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11817 formatter.write_str("struct MakeDirectoryRequest")
11818 }
11819 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11820 where
11821 A: serde::de::MapAccess<'de>,
11822 {
11823 #[allow(unused_imports)]
11824 use serde::de::Error;
11825 use std::option::Option::Some;
11826 let mut fields = std::collections::HashSet::new();
11827 let mut result = Self::Value::new();
11828 while let Some(tag) = map.next_key::<__FieldTag>()? {
11829 #[allow(clippy::match_single_binding)]
11830 match tag {
11831 __FieldTag::__workspace => {
11832 if !fields.insert(__FieldTag::__workspace) {
11833 return std::result::Result::Err(A::Error::duplicate_field(
11834 "multiple values for workspace",
11835 ));
11836 }
11837 result.workspace = map
11838 .next_value::<std::option::Option<std::string::String>>()?
11839 .unwrap_or_default();
11840 }
11841 __FieldTag::__path => {
11842 if !fields.insert(__FieldTag::__path) {
11843 return std::result::Result::Err(A::Error::duplicate_field(
11844 "multiple values for path",
11845 ));
11846 }
11847 result.path = map
11848 .next_value::<std::option::Option<std::string::String>>()?
11849 .unwrap_or_default();
11850 }
11851 __FieldTag::Unknown(key) => {
11852 let value = map.next_value::<serde_json::Value>()?;
11853 result._unknown_fields.insert(key, value);
11854 }
11855 }
11856 }
11857 std::result::Result::Ok(result)
11858 }
11859 }
11860 deserializer.deserialize_any(Visitor)
11861 }
11862}
11863
11864#[doc(hidden)]
11865impl serde::ser::Serialize for MakeDirectoryRequest {
11866 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11867 where
11868 S: serde::ser::Serializer,
11869 {
11870 use serde::ser::SerializeMap;
11871 #[allow(unused_imports)]
11872 use std::option::Option::Some;
11873 let mut state = serializer.serialize_map(std::option::Option::None)?;
11874 if !self.workspace.is_empty() {
11875 state.serialize_entry("workspace", &self.workspace)?;
11876 }
11877 if !self.path.is_empty() {
11878 state.serialize_entry("path", &self.path)?;
11879 }
11880 if !self._unknown_fields.is_empty() {
11881 for (key, value) in self._unknown_fields.iter() {
11882 state.serialize_entry(key, &value)?;
11883 }
11884 }
11885 state.end()
11886 }
11887}
11888
11889impl std::fmt::Debug for MakeDirectoryRequest {
11890 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11891 let mut debug_struct = f.debug_struct("MakeDirectoryRequest");
11892 debug_struct.field("workspace", &self.workspace);
11893 debug_struct.field("path", &self.path);
11894 if !self._unknown_fields.is_empty() {
11895 debug_struct.field("_unknown_fields", &self._unknown_fields);
11896 }
11897 debug_struct.finish()
11898 }
11899}
11900
11901#[derive(Clone, Default, PartialEq)]
11903#[non_exhaustive]
11904pub struct MakeDirectoryResponse {
11905 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11906}
11907
11908impl MakeDirectoryResponse {
11909 pub fn new() -> Self {
11910 std::default::Default::default()
11911 }
11912}
11913
11914impl wkt::message::Message for MakeDirectoryResponse {
11915 fn typename() -> &'static str {
11916 "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
11917 }
11918}
11919
11920#[doc(hidden)]
11921impl<'de> serde::de::Deserialize<'de> for MakeDirectoryResponse {
11922 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11923 where
11924 D: serde::Deserializer<'de>,
11925 {
11926 #[allow(non_camel_case_types)]
11927 #[doc(hidden)]
11928 #[derive(PartialEq, Eq, Hash)]
11929 enum __FieldTag {
11930 Unknown(std::string::String),
11931 }
11932 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
11933 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11934 where
11935 D: serde::Deserializer<'de>,
11936 {
11937 struct Visitor;
11938 impl<'de> serde::de::Visitor<'de> for Visitor {
11939 type Value = __FieldTag;
11940 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11941 formatter.write_str("a field name for MakeDirectoryResponse")
11942 }
11943 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
11944 where
11945 E: serde::de::Error,
11946 {
11947 use std::result::Result::Ok;
11948 use std::string::ToString;
11949 Ok(__FieldTag::Unknown(value.to_string()))
11950 }
11951 }
11952 deserializer.deserialize_identifier(Visitor)
11953 }
11954 }
11955 struct Visitor;
11956 impl<'de> serde::de::Visitor<'de> for Visitor {
11957 type Value = MakeDirectoryResponse;
11958 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
11959 formatter.write_str("struct MakeDirectoryResponse")
11960 }
11961 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
11962 where
11963 A: serde::de::MapAccess<'de>,
11964 {
11965 #[allow(unused_imports)]
11966 use serde::de::Error;
11967 use std::option::Option::Some;
11968 let mut result = Self::Value::new();
11969 while let Some(tag) = map.next_key::<__FieldTag>()? {
11970 #[allow(clippy::match_single_binding)]
11971 match tag {
11972 __FieldTag::Unknown(key) => {
11973 let value = map.next_value::<serde_json::Value>()?;
11974 result._unknown_fields.insert(key, value);
11975 }
11976 }
11977 }
11978 std::result::Result::Ok(result)
11979 }
11980 }
11981 deserializer.deserialize_any(Visitor)
11982 }
11983}
11984
11985#[doc(hidden)]
11986impl serde::ser::Serialize for MakeDirectoryResponse {
11987 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11988 where
11989 S: serde::ser::Serializer,
11990 {
11991 use serde::ser::SerializeMap;
11992 #[allow(unused_imports)]
11993 use std::option::Option::Some;
11994 let mut state = serializer.serialize_map(std::option::Option::None)?;
11995 if !self._unknown_fields.is_empty() {
11996 for (key, value) in self._unknown_fields.iter() {
11997 state.serialize_entry(key, &value)?;
11998 }
11999 }
12000 state.end()
12001 }
12002}
12003
12004impl std::fmt::Debug for MakeDirectoryResponse {
12005 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12006 let mut debug_struct = f.debug_struct("MakeDirectoryResponse");
12007 if !self._unknown_fields.is_empty() {
12008 debug_struct.field("_unknown_fields", &self._unknown_fields);
12009 }
12010 debug_struct.finish()
12011 }
12012}
12013
12014#[derive(Clone, Default, PartialEq)]
12016#[non_exhaustive]
12017pub struct RemoveDirectoryRequest {
12018 pub workspace: std::string::String,
12020
12021 pub path: std::string::String,
12024
12025 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12026}
12027
12028impl RemoveDirectoryRequest {
12029 pub fn new() -> Self {
12030 std::default::Default::default()
12031 }
12032
12033 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12035 self.workspace = v.into();
12036 self
12037 }
12038
12039 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12041 self.path = v.into();
12042 self
12043 }
12044}
12045
12046impl wkt::message::Message for RemoveDirectoryRequest {
12047 fn typename() -> &'static str {
12048 "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
12049 }
12050}
12051
12052#[doc(hidden)]
12053impl<'de> serde::de::Deserialize<'de> for RemoveDirectoryRequest {
12054 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12055 where
12056 D: serde::Deserializer<'de>,
12057 {
12058 #[allow(non_camel_case_types)]
12059 #[doc(hidden)]
12060 #[derive(PartialEq, Eq, Hash)]
12061 enum __FieldTag {
12062 __workspace,
12063 __path,
12064 Unknown(std::string::String),
12065 }
12066 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12067 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12068 where
12069 D: serde::Deserializer<'de>,
12070 {
12071 struct Visitor;
12072 impl<'de> serde::de::Visitor<'de> for Visitor {
12073 type Value = __FieldTag;
12074 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12075 formatter.write_str("a field name for RemoveDirectoryRequest")
12076 }
12077 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12078 where
12079 E: serde::de::Error,
12080 {
12081 use std::result::Result::Ok;
12082 use std::string::ToString;
12083 match value {
12084 "workspace" => Ok(__FieldTag::__workspace),
12085 "path" => Ok(__FieldTag::__path),
12086 _ => Ok(__FieldTag::Unknown(value.to_string())),
12087 }
12088 }
12089 }
12090 deserializer.deserialize_identifier(Visitor)
12091 }
12092 }
12093 struct Visitor;
12094 impl<'de> serde::de::Visitor<'de> for Visitor {
12095 type Value = RemoveDirectoryRequest;
12096 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12097 formatter.write_str("struct RemoveDirectoryRequest")
12098 }
12099 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12100 where
12101 A: serde::de::MapAccess<'de>,
12102 {
12103 #[allow(unused_imports)]
12104 use serde::de::Error;
12105 use std::option::Option::Some;
12106 let mut fields = std::collections::HashSet::new();
12107 let mut result = Self::Value::new();
12108 while let Some(tag) = map.next_key::<__FieldTag>()? {
12109 #[allow(clippy::match_single_binding)]
12110 match tag {
12111 __FieldTag::__workspace => {
12112 if !fields.insert(__FieldTag::__workspace) {
12113 return std::result::Result::Err(A::Error::duplicate_field(
12114 "multiple values for workspace",
12115 ));
12116 }
12117 result.workspace = map
12118 .next_value::<std::option::Option<std::string::String>>()?
12119 .unwrap_or_default();
12120 }
12121 __FieldTag::__path => {
12122 if !fields.insert(__FieldTag::__path) {
12123 return std::result::Result::Err(A::Error::duplicate_field(
12124 "multiple values for path",
12125 ));
12126 }
12127 result.path = map
12128 .next_value::<std::option::Option<std::string::String>>()?
12129 .unwrap_or_default();
12130 }
12131 __FieldTag::Unknown(key) => {
12132 let value = map.next_value::<serde_json::Value>()?;
12133 result._unknown_fields.insert(key, value);
12134 }
12135 }
12136 }
12137 std::result::Result::Ok(result)
12138 }
12139 }
12140 deserializer.deserialize_any(Visitor)
12141 }
12142}
12143
12144#[doc(hidden)]
12145impl serde::ser::Serialize for RemoveDirectoryRequest {
12146 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12147 where
12148 S: serde::ser::Serializer,
12149 {
12150 use serde::ser::SerializeMap;
12151 #[allow(unused_imports)]
12152 use std::option::Option::Some;
12153 let mut state = serializer.serialize_map(std::option::Option::None)?;
12154 if !self.workspace.is_empty() {
12155 state.serialize_entry("workspace", &self.workspace)?;
12156 }
12157 if !self.path.is_empty() {
12158 state.serialize_entry("path", &self.path)?;
12159 }
12160 if !self._unknown_fields.is_empty() {
12161 for (key, value) in self._unknown_fields.iter() {
12162 state.serialize_entry(key, &value)?;
12163 }
12164 }
12165 state.end()
12166 }
12167}
12168
12169impl std::fmt::Debug for RemoveDirectoryRequest {
12170 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12171 let mut debug_struct = f.debug_struct("RemoveDirectoryRequest");
12172 debug_struct.field("workspace", &self.workspace);
12173 debug_struct.field("path", &self.path);
12174 if !self._unknown_fields.is_empty() {
12175 debug_struct.field("_unknown_fields", &self._unknown_fields);
12176 }
12177 debug_struct.finish()
12178 }
12179}
12180
12181#[derive(Clone, Default, PartialEq)]
12183#[non_exhaustive]
12184pub struct RemoveDirectoryResponse {
12185 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12186}
12187
12188impl RemoveDirectoryResponse {
12189 pub fn new() -> Self {
12190 std::default::Default::default()
12191 }
12192}
12193
12194impl wkt::message::Message for RemoveDirectoryResponse {
12195 fn typename() -> &'static str {
12196 "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
12197 }
12198}
12199
12200#[doc(hidden)]
12201impl<'de> serde::de::Deserialize<'de> for RemoveDirectoryResponse {
12202 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12203 where
12204 D: serde::Deserializer<'de>,
12205 {
12206 #[allow(non_camel_case_types)]
12207 #[doc(hidden)]
12208 #[derive(PartialEq, Eq, Hash)]
12209 enum __FieldTag {
12210 Unknown(std::string::String),
12211 }
12212 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12213 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12214 where
12215 D: serde::Deserializer<'de>,
12216 {
12217 struct Visitor;
12218 impl<'de> serde::de::Visitor<'de> for Visitor {
12219 type Value = __FieldTag;
12220 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12221 formatter.write_str("a field name for RemoveDirectoryResponse")
12222 }
12223 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12224 where
12225 E: serde::de::Error,
12226 {
12227 use std::result::Result::Ok;
12228 use std::string::ToString;
12229 Ok(__FieldTag::Unknown(value.to_string()))
12230 }
12231 }
12232 deserializer.deserialize_identifier(Visitor)
12233 }
12234 }
12235 struct Visitor;
12236 impl<'de> serde::de::Visitor<'de> for Visitor {
12237 type Value = RemoveDirectoryResponse;
12238 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12239 formatter.write_str("struct RemoveDirectoryResponse")
12240 }
12241 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12242 where
12243 A: serde::de::MapAccess<'de>,
12244 {
12245 #[allow(unused_imports)]
12246 use serde::de::Error;
12247 use std::option::Option::Some;
12248 let mut result = Self::Value::new();
12249 while let Some(tag) = map.next_key::<__FieldTag>()? {
12250 #[allow(clippy::match_single_binding)]
12251 match tag {
12252 __FieldTag::Unknown(key) => {
12253 let value = map.next_value::<serde_json::Value>()?;
12254 result._unknown_fields.insert(key, value);
12255 }
12256 }
12257 }
12258 std::result::Result::Ok(result)
12259 }
12260 }
12261 deserializer.deserialize_any(Visitor)
12262 }
12263}
12264
12265#[doc(hidden)]
12266impl serde::ser::Serialize for RemoveDirectoryResponse {
12267 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12268 where
12269 S: serde::ser::Serializer,
12270 {
12271 use serde::ser::SerializeMap;
12272 #[allow(unused_imports)]
12273 use std::option::Option::Some;
12274 let mut state = serializer.serialize_map(std::option::Option::None)?;
12275 if !self._unknown_fields.is_empty() {
12276 for (key, value) in self._unknown_fields.iter() {
12277 state.serialize_entry(key, &value)?;
12278 }
12279 }
12280 state.end()
12281 }
12282}
12283
12284impl std::fmt::Debug for RemoveDirectoryResponse {
12285 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12286 let mut debug_struct = f.debug_struct("RemoveDirectoryResponse");
12287 if !self._unknown_fields.is_empty() {
12288 debug_struct.field("_unknown_fields", &self._unknown_fields);
12289 }
12290 debug_struct.finish()
12291 }
12292}
12293
12294#[derive(Clone, Default, PartialEq)]
12296#[non_exhaustive]
12297pub struct MoveDirectoryRequest {
12298 pub workspace: std::string::String,
12300
12301 pub path: std::string::String,
12304
12305 pub new_path: std::string::String,
12308
12309 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12310}
12311
12312impl MoveDirectoryRequest {
12313 pub fn new() -> Self {
12314 std::default::Default::default()
12315 }
12316
12317 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12319 self.workspace = v.into();
12320 self
12321 }
12322
12323 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12325 self.path = v.into();
12326 self
12327 }
12328
12329 pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12331 self.new_path = v.into();
12332 self
12333 }
12334}
12335
12336impl wkt::message::Message for MoveDirectoryRequest {
12337 fn typename() -> &'static str {
12338 "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
12339 }
12340}
12341
12342#[doc(hidden)]
12343impl<'de> serde::de::Deserialize<'de> for MoveDirectoryRequest {
12344 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12345 where
12346 D: serde::Deserializer<'de>,
12347 {
12348 #[allow(non_camel_case_types)]
12349 #[doc(hidden)]
12350 #[derive(PartialEq, Eq, Hash)]
12351 enum __FieldTag {
12352 __workspace,
12353 __path,
12354 __new_path,
12355 Unknown(std::string::String),
12356 }
12357 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12358 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12359 where
12360 D: serde::Deserializer<'de>,
12361 {
12362 struct Visitor;
12363 impl<'de> serde::de::Visitor<'de> for Visitor {
12364 type Value = __FieldTag;
12365 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12366 formatter.write_str("a field name for MoveDirectoryRequest")
12367 }
12368 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12369 where
12370 E: serde::de::Error,
12371 {
12372 use std::result::Result::Ok;
12373 use std::string::ToString;
12374 match value {
12375 "workspace" => Ok(__FieldTag::__workspace),
12376 "path" => Ok(__FieldTag::__path),
12377 "newPath" => Ok(__FieldTag::__new_path),
12378 "new_path" => Ok(__FieldTag::__new_path),
12379 _ => Ok(__FieldTag::Unknown(value.to_string())),
12380 }
12381 }
12382 }
12383 deserializer.deserialize_identifier(Visitor)
12384 }
12385 }
12386 struct Visitor;
12387 impl<'de> serde::de::Visitor<'de> for Visitor {
12388 type Value = MoveDirectoryRequest;
12389 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12390 formatter.write_str("struct MoveDirectoryRequest")
12391 }
12392 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12393 where
12394 A: serde::de::MapAccess<'de>,
12395 {
12396 #[allow(unused_imports)]
12397 use serde::de::Error;
12398 use std::option::Option::Some;
12399 let mut fields = std::collections::HashSet::new();
12400 let mut result = Self::Value::new();
12401 while let Some(tag) = map.next_key::<__FieldTag>()? {
12402 #[allow(clippy::match_single_binding)]
12403 match tag {
12404 __FieldTag::__workspace => {
12405 if !fields.insert(__FieldTag::__workspace) {
12406 return std::result::Result::Err(A::Error::duplicate_field(
12407 "multiple values for workspace",
12408 ));
12409 }
12410 result.workspace = map
12411 .next_value::<std::option::Option<std::string::String>>()?
12412 .unwrap_or_default();
12413 }
12414 __FieldTag::__path => {
12415 if !fields.insert(__FieldTag::__path) {
12416 return std::result::Result::Err(A::Error::duplicate_field(
12417 "multiple values for path",
12418 ));
12419 }
12420 result.path = map
12421 .next_value::<std::option::Option<std::string::String>>()?
12422 .unwrap_or_default();
12423 }
12424 __FieldTag::__new_path => {
12425 if !fields.insert(__FieldTag::__new_path) {
12426 return std::result::Result::Err(A::Error::duplicate_field(
12427 "multiple values for new_path",
12428 ));
12429 }
12430 result.new_path = map
12431 .next_value::<std::option::Option<std::string::String>>()?
12432 .unwrap_or_default();
12433 }
12434 __FieldTag::Unknown(key) => {
12435 let value = map.next_value::<serde_json::Value>()?;
12436 result._unknown_fields.insert(key, value);
12437 }
12438 }
12439 }
12440 std::result::Result::Ok(result)
12441 }
12442 }
12443 deserializer.deserialize_any(Visitor)
12444 }
12445}
12446
12447#[doc(hidden)]
12448impl serde::ser::Serialize for MoveDirectoryRequest {
12449 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12450 where
12451 S: serde::ser::Serializer,
12452 {
12453 use serde::ser::SerializeMap;
12454 #[allow(unused_imports)]
12455 use std::option::Option::Some;
12456 let mut state = serializer.serialize_map(std::option::Option::None)?;
12457 if !self.workspace.is_empty() {
12458 state.serialize_entry("workspace", &self.workspace)?;
12459 }
12460 if !self.path.is_empty() {
12461 state.serialize_entry("path", &self.path)?;
12462 }
12463 if !self.new_path.is_empty() {
12464 state.serialize_entry("newPath", &self.new_path)?;
12465 }
12466 if !self._unknown_fields.is_empty() {
12467 for (key, value) in self._unknown_fields.iter() {
12468 state.serialize_entry(key, &value)?;
12469 }
12470 }
12471 state.end()
12472 }
12473}
12474
12475impl std::fmt::Debug for MoveDirectoryRequest {
12476 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12477 let mut debug_struct = f.debug_struct("MoveDirectoryRequest");
12478 debug_struct.field("workspace", &self.workspace);
12479 debug_struct.field("path", &self.path);
12480 debug_struct.field("new_path", &self.new_path);
12481 if !self._unknown_fields.is_empty() {
12482 debug_struct.field("_unknown_fields", &self._unknown_fields);
12483 }
12484 debug_struct.finish()
12485 }
12486}
12487
12488#[derive(Clone, Default, PartialEq)]
12490#[non_exhaustive]
12491pub struct MoveDirectoryResponse {
12492 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12493}
12494
12495impl MoveDirectoryResponse {
12496 pub fn new() -> Self {
12497 std::default::Default::default()
12498 }
12499}
12500
12501impl wkt::message::Message for MoveDirectoryResponse {
12502 fn typename() -> &'static str {
12503 "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
12504 }
12505}
12506
12507#[doc(hidden)]
12508impl<'de> serde::de::Deserialize<'de> for MoveDirectoryResponse {
12509 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12510 where
12511 D: serde::Deserializer<'de>,
12512 {
12513 #[allow(non_camel_case_types)]
12514 #[doc(hidden)]
12515 #[derive(PartialEq, Eq, Hash)]
12516 enum __FieldTag {
12517 Unknown(std::string::String),
12518 }
12519 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12520 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12521 where
12522 D: serde::Deserializer<'de>,
12523 {
12524 struct Visitor;
12525 impl<'de> serde::de::Visitor<'de> for Visitor {
12526 type Value = __FieldTag;
12527 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12528 formatter.write_str("a field name for MoveDirectoryResponse")
12529 }
12530 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12531 where
12532 E: serde::de::Error,
12533 {
12534 use std::result::Result::Ok;
12535 use std::string::ToString;
12536 Ok(__FieldTag::Unknown(value.to_string()))
12537 }
12538 }
12539 deserializer.deserialize_identifier(Visitor)
12540 }
12541 }
12542 struct Visitor;
12543 impl<'de> serde::de::Visitor<'de> for Visitor {
12544 type Value = MoveDirectoryResponse;
12545 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12546 formatter.write_str("struct MoveDirectoryResponse")
12547 }
12548 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12549 where
12550 A: serde::de::MapAccess<'de>,
12551 {
12552 #[allow(unused_imports)]
12553 use serde::de::Error;
12554 use std::option::Option::Some;
12555 let mut result = Self::Value::new();
12556 while let Some(tag) = map.next_key::<__FieldTag>()? {
12557 #[allow(clippy::match_single_binding)]
12558 match tag {
12559 __FieldTag::Unknown(key) => {
12560 let value = map.next_value::<serde_json::Value>()?;
12561 result._unknown_fields.insert(key, value);
12562 }
12563 }
12564 }
12565 std::result::Result::Ok(result)
12566 }
12567 }
12568 deserializer.deserialize_any(Visitor)
12569 }
12570}
12571
12572#[doc(hidden)]
12573impl serde::ser::Serialize for MoveDirectoryResponse {
12574 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12575 where
12576 S: serde::ser::Serializer,
12577 {
12578 use serde::ser::SerializeMap;
12579 #[allow(unused_imports)]
12580 use std::option::Option::Some;
12581 let mut state = serializer.serialize_map(std::option::Option::None)?;
12582 if !self._unknown_fields.is_empty() {
12583 for (key, value) in self._unknown_fields.iter() {
12584 state.serialize_entry(key, &value)?;
12585 }
12586 }
12587 state.end()
12588 }
12589}
12590
12591impl std::fmt::Debug for MoveDirectoryResponse {
12592 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12593 let mut debug_struct = f.debug_struct("MoveDirectoryResponse");
12594 if !self._unknown_fields.is_empty() {
12595 debug_struct.field("_unknown_fields", &self._unknown_fields);
12596 }
12597 debug_struct.finish()
12598 }
12599}
12600
12601#[derive(Clone, Default, PartialEq)]
12603#[non_exhaustive]
12604pub struct ReadFileRequest {
12605 pub workspace: std::string::String,
12607
12608 pub path: std::string::String,
12611
12612 pub revision: std::string::String,
12615
12616 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12617}
12618
12619impl ReadFileRequest {
12620 pub fn new() -> Self {
12621 std::default::Default::default()
12622 }
12623
12624 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12626 self.workspace = v.into();
12627 self
12628 }
12629
12630 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12632 self.path = v.into();
12633 self
12634 }
12635
12636 pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12638 self.revision = v.into();
12639 self
12640 }
12641}
12642
12643impl wkt::message::Message for ReadFileRequest {
12644 fn typename() -> &'static str {
12645 "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
12646 }
12647}
12648
12649#[doc(hidden)]
12650impl<'de> serde::de::Deserialize<'de> for ReadFileRequest {
12651 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12652 where
12653 D: serde::Deserializer<'de>,
12654 {
12655 #[allow(non_camel_case_types)]
12656 #[doc(hidden)]
12657 #[derive(PartialEq, Eq, Hash)]
12658 enum __FieldTag {
12659 __workspace,
12660 __path,
12661 __revision,
12662 Unknown(std::string::String),
12663 }
12664 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12665 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12666 where
12667 D: serde::Deserializer<'de>,
12668 {
12669 struct Visitor;
12670 impl<'de> serde::de::Visitor<'de> for Visitor {
12671 type Value = __FieldTag;
12672 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12673 formatter.write_str("a field name for ReadFileRequest")
12674 }
12675 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12676 where
12677 E: serde::de::Error,
12678 {
12679 use std::result::Result::Ok;
12680 use std::string::ToString;
12681 match value {
12682 "workspace" => Ok(__FieldTag::__workspace),
12683 "path" => Ok(__FieldTag::__path),
12684 "revision" => Ok(__FieldTag::__revision),
12685 _ => Ok(__FieldTag::Unknown(value.to_string())),
12686 }
12687 }
12688 }
12689 deserializer.deserialize_identifier(Visitor)
12690 }
12691 }
12692 struct Visitor;
12693 impl<'de> serde::de::Visitor<'de> for Visitor {
12694 type Value = ReadFileRequest;
12695 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12696 formatter.write_str("struct ReadFileRequest")
12697 }
12698 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12699 where
12700 A: serde::de::MapAccess<'de>,
12701 {
12702 #[allow(unused_imports)]
12703 use serde::de::Error;
12704 use std::option::Option::Some;
12705 let mut fields = std::collections::HashSet::new();
12706 let mut result = Self::Value::new();
12707 while let Some(tag) = map.next_key::<__FieldTag>()? {
12708 #[allow(clippy::match_single_binding)]
12709 match tag {
12710 __FieldTag::__workspace => {
12711 if !fields.insert(__FieldTag::__workspace) {
12712 return std::result::Result::Err(A::Error::duplicate_field(
12713 "multiple values for workspace",
12714 ));
12715 }
12716 result.workspace = map
12717 .next_value::<std::option::Option<std::string::String>>()?
12718 .unwrap_or_default();
12719 }
12720 __FieldTag::__path => {
12721 if !fields.insert(__FieldTag::__path) {
12722 return std::result::Result::Err(A::Error::duplicate_field(
12723 "multiple values for path",
12724 ));
12725 }
12726 result.path = map
12727 .next_value::<std::option::Option<std::string::String>>()?
12728 .unwrap_or_default();
12729 }
12730 __FieldTag::__revision => {
12731 if !fields.insert(__FieldTag::__revision) {
12732 return std::result::Result::Err(A::Error::duplicate_field(
12733 "multiple values for revision",
12734 ));
12735 }
12736 result.revision = map
12737 .next_value::<std::option::Option<std::string::String>>()?
12738 .unwrap_or_default();
12739 }
12740 __FieldTag::Unknown(key) => {
12741 let value = map.next_value::<serde_json::Value>()?;
12742 result._unknown_fields.insert(key, value);
12743 }
12744 }
12745 }
12746 std::result::Result::Ok(result)
12747 }
12748 }
12749 deserializer.deserialize_any(Visitor)
12750 }
12751}
12752
12753#[doc(hidden)]
12754impl serde::ser::Serialize for ReadFileRequest {
12755 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12756 where
12757 S: serde::ser::Serializer,
12758 {
12759 use serde::ser::SerializeMap;
12760 #[allow(unused_imports)]
12761 use std::option::Option::Some;
12762 let mut state = serializer.serialize_map(std::option::Option::None)?;
12763 if !self.workspace.is_empty() {
12764 state.serialize_entry("workspace", &self.workspace)?;
12765 }
12766 if !self.path.is_empty() {
12767 state.serialize_entry("path", &self.path)?;
12768 }
12769 if !self.revision.is_empty() {
12770 state.serialize_entry("revision", &self.revision)?;
12771 }
12772 if !self._unknown_fields.is_empty() {
12773 for (key, value) in self._unknown_fields.iter() {
12774 state.serialize_entry(key, &value)?;
12775 }
12776 }
12777 state.end()
12778 }
12779}
12780
12781impl std::fmt::Debug for ReadFileRequest {
12782 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12783 let mut debug_struct = f.debug_struct("ReadFileRequest");
12784 debug_struct.field("workspace", &self.workspace);
12785 debug_struct.field("path", &self.path);
12786 debug_struct.field("revision", &self.revision);
12787 if !self._unknown_fields.is_empty() {
12788 debug_struct.field("_unknown_fields", &self._unknown_fields);
12789 }
12790 debug_struct.finish()
12791 }
12792}
12793
12794#[derive(Clone, Default, PartialEq)]
12796#[non_exhaustive]
12797pub struct ReadFileResponse {
12798 pub file_contents: ::bytes::Bytes,
12800
12801 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12802}
12803
12804impl ReadFileResponse {
12805 pub fn new() -> Self {
12806 std::default::Default::default()
12807 }
12808
12809 pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
12811 self.file_contents = v.into();
12812 self
12813 }
12814}
12815
12816impl wkt::message::Message for ReadFileResponse {
12817 fn typename() -> &'static str {
12818 "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
12819 }
12820}
12821
12822#[doc(hidden)]
12823impl<'de> serde::de::Deserialize<'de> for ReadFileResponse {
12824 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12825 where
12826 D: serde::Deserializer<'de>,
12827 {
12828 #[allow(non_camel_case_types)]
12829 #[doc(hidden)]
12830 #[derive(PartialEq, Eq, Hash)]
12831 enum __FieldTag {
12832 __file_contents,
12833 Unknown(std::string::String),
12834 }
12835 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
12836 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12837 where
12838 D: serde::Deserializer<'de>,
12839 {
12840 struct Visitor;
12841 impl<'de> serde::de::Visitor<'de> for Visitor {
12842 type Value = __FieldTag;
12843 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12844 formatter.write_str("a field name for ReadFileResponse")
12845 }
12846 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
12847 where
12848 E: serde::de::Error,
12849 {
12850 use std::result::Result::Ok;
12851 use std::string::ToString;
12852 match value {
12853 "fileContents" => Ok(__FieldTag::__file_contents),
12854 "file_contents" => Ok(__FieldTag::__file_contents),
12855 _ => Ok(__FieldTag::Unknown(value.to_string())),
12856 }
12857 }
12858 }
12859 deserializer.deserialize_identifier(Visitor)
12860 }
12861 }
12862 struct Visitor;
12863 impl<'de> serde::de::Visitor<'de> for Visitor {
12864 type Value = ReadFileResponse;
12865 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
12866 formatter.write_str("struct ReadFileResponse")
12867 }
12868 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
12869 where
12870 A: serde::de::MapAccess<'de>,
12871 {
12872 #[allow(unused_imports)]
12873 use serde::de::Error;
12874 use std::option::Option::Some;
12875 let mut fields = std::collections::HashSet::new();
12876 let mut result = Self::Value::new();
12877 while let Some(tag) = map.next_key::<__FieldTag>()? {
12878 #[allow(clippy::match_single_binding)]
12879 match tag {
12880 __FieldTag::__file_contents => {
12881 if !fields.insert(__FieldTag::__file_contents) {
12882 return std::result::Result::Err(A::Error::duplicate_field(
12883 "multiple values for file_contents",
12884 ));
12885 }
12886 struct __With(std::option::Option<::bytes::Bytes>);
12887 impl<'de> serde::de::Deserialize<'de> for __With {
12888 fn deserialize<D>(
12889 deserializer: D,
12890 ) -> std::result::Result<Self, D::Error>
12891 where
12892 D: serde::de::Deserializer<'de>,
12893 {
12894 serde_with::As::< std::option::Option<serde_with::base64::Base64> >::deserialize(deserializer).map(__With)
12895 }
12896 }
12897 result.file_contents =
12898 map.next_value::<__With>()?.0.unwrap_or_default();
12899 }
12900 __FieldTag::Unknown(key) => {
12901 let value = map.next_value::<serde_json::Value>()?;
12902 result._unknown_fields.insert(key, value);
12903 }
12904 }
12905 }
12906 std::result::Result::Ok(result)
12907 }
12908 }
12909 deserializer.deserialize_any(Visitor)
12910 }
12911}
12912
12913#[doc(hidden)]
12914impl serde::ser::Serialize for ReadFileResponse {
12915 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12916 where
12917 S: serde::ser::Serializer,
12918 {
12919 use serde::ser::SerializeMap;
12920 #[allow(unused_imports)]
12921 use std::option::Option::Some;
12922 let mut state = serializer.serialize_map(std::option::Option::None)?;
12923 if !self.file_contents.is_empty() {
12924 struct __With<'a>(&'a ::bytes::Bytes);
12925 impl<'a> serde::ser::Serialize for __With<'a> {
12926 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12927 where
12928 S: serde::ser::Serializer,
12929 {
12930 serde_with::As::<serde_with::base64::Base64>::serialize(self.0, serializer)
12931 }
12932 }
12933 state.serialize_entry("fileContents", &__With(&self.file_contents))?;
12934 }
12935 if !self._unknown_fields.is_empty() {
12936 for (key, value) in self._unknown_fields.iter() {
12937 state.serialize_entry(key, &value)?;
12938 }
12939 }
12940 state.end()
12941 }
12942}
12943
12944impl std::fmt::Debug for ReadFileResponse {
12945 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12946 let mut debug_struct = f.debug_struct("ReadFileResponse");
12947 debug_struct.field("file_contents", &self.file_contents);
12948 if !self._unknown_fields.is_empty() {
12949 debug_struct.field("_unknown_fields", &self._unknown_fields);
12950 }
12951 debug_struct.finish()
12952 }
12953}
12954
12955#[derive(Clone, Default, PartialEq)]
12957#[non_exhaustive]
12958pub struct RemoveFileRequest {
12959 pub workspace: std::string::String,
12961
12962 pub path: std::string::String,
12965
12966 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12967}
12968
12969impl RemoveFileRequest {
12970 pub fn new() -> Self {
12971 std::default::Default::default()
12972 }
12973
12974 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12976 self.workspace = v.into();
12977 self
12978 }
12979
12980 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12982 self.path = v.into();
12983 self
12984 }
12985}
12986
12987impl wkt::message::Message for RemoveFileRequest {
12988 fn typename() -> &'static str {
12989 "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
12990 }
12991}
12992
12993#[doc(hidden)]
12994impl<'de> serde::de::Deserialize<'de> for RemoveFileRequest {
12995 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12996 where
12997 D: serde::Deserializer<'de>,
12998 {
12999 #[allow(non_camel_case_types)]
13000 #[doc(hidden)]
13001 #[derive(PartialEq, Eq, Hash)]
13002 enum __FieldTag {
13003 __workspace,
13004 __path,
13005 Unknown(std::string::String),
13006 }
13007 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13008 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13009 where
13010 D: serde::Deserializer<'de>,
13011 {
13012 struct Visitor;
13013 impl<'de> serde::de::Visitor<'de> for Visitor {
13014 type Value = __FieldTag;
13015 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13016 formatter.write_str("a field name for RemoveFileRequest")
13017 }
13018 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13019 where
13020 E: serde::de::Error,
13021 {
13022 use std::result::Result::Ok;
13023 use std::string::ToString;
13024 match value {
13025 "workspace" => Ok(__FieldTag::__workspace),
13026 "path" => Ok(__FieldTag::__path),
13027 _ => Ok(__FieldTag::Unknown(value.to_string())),
13028 }
13029 }
13030 }
13031 deserializer.deserialize_identifier(Visitor)
13032 }
13033 }
13034 struct Visitor;
13035 impl<'de> serde::de::Visitor<'de> for Visitor {
13036 type Value = RemoveFileRequest;
13037 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13038 formatter.write_str("struct RemoveFileRequest")
13039 }
13040 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13041 where
13042 A: serde::de::MapAccess<'de>,
13043 {
13044 #[allow(unused_imports)]
13045 use serde::de::Error;
13046 use std::option::Option::Some;
13047 let mut fields = std::collections::HashSet::new();
13048 let mut result = Self::Value::new();
13049 while let Some(tag) = map.next_key::<__FieldTag>()? {
13050 #[allow(clippy::match_single_binding)]
13051 match tag {
13052 __FieldTag::__workspace => {
13053 if !fields.insert(__FieldTag::__workspace) {
13054 return std::result::Result::Err(A::Error::duplicate_field(
13055 "multiple values for workspace",
13056 ));
13057 }
13058 result.workspace = map
13059 .next_value::<std::option::Option<std::string::String>>()?
13060 .unwrap_or_default();
13061 }
13062 __FieldTag::__path => {
13063 if !fields.insert(__FieldTag::__path) {
13064 return std::result::Result::Err(A::Error::duplicate_field(
13065 "multiple values for path",
13066 ));
13067 }
13068 result.path = map
13069 .next_value::<std::option::Option<std::string::String>>()?
13070 .unwrap_or_default();
13071 }
13072 __FieldTag::Unknown(key) => {
13073 let value = map.next_value::<serde_json::Value>()?;
13074 result._unknown_fields.insert(key, value);
13075 }
13076 }
13077 }
13078 std::result::Result::Ok(result)
13079 }
13080 }
13081 deserializer.deserialize_any(Visitor)
13082 }
13083}
13084
13085#[doc(hidden)]
13086impl serde::ser::Serialize for RemoveFileRequest {
13087 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13088 where
13089 S: serde::ser::Serializer,
13090 {
13091 use serde::ser::SerializeMap;
13092 #[allow(unused_imports)]
13093 use std::option::Option::Some;
13094 let mut state = serializer.serialize_map(std::option::Option::None)?;
13095 if !self.workspace.is_empty() {
13096 state.serialize_entry("workspace", &self.workspace)?;
13097 }
13098 if !self.path.is_empty() {
13099 state.serialize_entry("path", &self.path)?;
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
13110impl std::fmt::Debug for RemoveFileRequest {
13111 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13112 let mut debug_struct = f.debug_struct("RemoveFileRequest");
13113 debug_struct.field("workspace", &self.workspace);
13114 debug_struct.field("path", &self.path);
13115 if !self._unknown_fields.is_empty() {
13116 debug_struct.field("_unknown_fields", &self._unknown_fields);
13117 }
13118 debug_struct.finish()
13119 }
13120}
13121
13122#[derive(Clone, Default, PartialEq)]
13124#[non_exhaustive]
13125pub struct RemoveFileResponse {
13126 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13127}
13128
13129impl RemoveFileResponse {
13130 pub fn new() -> Self {
13131 std::default::Default::default()
13132 }
13133}
13134
13135impl wkt::message::Message for RemoveFileResponse {
13136 fn typename() -> &'static str {
13137 "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
13138 }
13139}
13140
13141#[doc(hidden)]
13142impl<'de> serde::de::Deserialize<'de> for RemoveFileResponse {
13143 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13144 where
13145 D: serde::Deserializer<'de>,
13146 {
13147 #[allow(non_camel_case_types)]
13148 #[doc(hidden)]
13149 #[derive(PartialEq, Eq, Hash)]
13150 enum __FieldTag {
13151 Unknown(std::string::String),
13152 }
13153 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13154 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13155 where
13156 D: serde::Deserializer<'de>,
13157 {
13158 struct Visitor;
13159 impl<'de> serde::de::Visitor<'de> for Visitor {
13160 type Value = __FieldTag;
13161 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13162 formatter.write_str("a field name for RemoveFileResponse")
13163 }
13164 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13165 where
13166 E: serde::de::Error,
13167 {
13168 use std::result::Result::Ok;
13169 use std::string::ToString;
13170 Ok(__FieldTag::Unknown(value.to_string()))
13171 }
13172 }
13173 deserializer.deserialize_identifier(Visitor)
13174 }
13175 }
13176 struct Visitor;
13177 impl<'de> serde::de::Visitor<'de> for Visitor {
13178 type Value = RemoveFileResponse;
13179 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13180 formatter.write_str("struct RemoveFileResponse")
13181 }
13182 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13183 where
13184 A: serde::de::MapAccess<'de>,
13185 {
13186 #[allow(unused_imports)]
13187 use serde::de::Error;
13188 use std::option::Option::Some;
13189 let mut result = Self::Value::new();
13190 while let Some(tag) = map.next_key::<__FieldTag>()? {
13191 #[allow(clippy::match_single_binding)]
13192 match tag {
13193 __FieldTag::Unknown(key) => {
13194 let value = map.next_value::<serde_json::Value>()?;
13195 result._unknown_fields.insert(key, value);
13196 }
13197 }
13198 }
13199 std::result::Result::Ok(result)
13200 }
13201 }
13202 deserializer.deserialize_any(Visitor)
13203 }
13204}
13205
13206#[doc(hidden)]
13207impl serde::ser::Serialize for RemoveFileResponse {
13208 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13209 where
13210 S: serde::ser::Serializer,
13211 {
13212 use serde::ser::SerializeMap;
13213 #[allow(unused_imports)]
13214 use std::option::Option::Some;
13215 let mut state = serializer.serialize_map(std::option::Option::None)?;
13216 if !self._unknown_fields.is_empty() {
13217 for (key, value) in self._unknown_fields.iter() {
13218 state.serialize_entry(key, &value)?;
13219 }
13220 }
13221 state.end()
13222 }
13223}
13224
13225impl std::fmt::Debug for RemoveFileResponse {
13226 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13227 let mut debug_struct = f.debug_struct("RemoveFileResponse");
13228 if !self._unknown_fields.is_empty() {
13229 debug_struct.field("_unknown_fields", &self._unknown_fields);
13230 }
13231 debug_struct.finish()
13232 }
13233}
13234
13235#[derive(Clone, Default, PartialEq)]
13237#[non_exhaustive]
13238pub struct MoveFileRequest {
13239 pub workspace: std::string::String,
13241
13242 pub path: std::string::String,
13245
13246 pub new_path: std::string::String,
13249
13250 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13251}
13252
13253impl MoveFileRequest {
13254 pub fn new() -> Self {
13255 std::default::Default::default()
13256 }
13257
13258 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13260 self.workspace = v.into();
13261 self
13262 }
13263
13264 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13266 self.path = v.into();
13267 self
13268 }
13269
13270 pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13272 self.new_path = v.into();
13273 self
13274 }
13275}
13276
13277impl wkt::message::Message for MoveFileRequest {
13278 fn typename() -> &'static str {
13279 "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
13280 }
13281}
13282
13283#[doc(hidden)]
13284impl<'de> serde::de::Deserialize<'de> for MoveFileRequest {
13285 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13286 where
13287 D: serde::Deserializer<'de>,
13288 {
13289 #[allow(non_camel_case_types)]
13290 #[doc(hidden)]
13291 #[derive(PartialEq, Eq, Hash)]
13292 enum __FieldTag {
13293 __workspace,
13294 __path,
13295 __new_path,
13296 Unknown(std::string::String),
13297 }
13298 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13299 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13300 where
13301 D: serde::Deserializer<'de>,
13302 {
13303 struct Visitor;
13304 impl<'de> serde::de::Visitor<'de> for Visitor {
13305 type Value = __FieldTag;
13306 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13307 formatter.write_str("a field name for MoveFileRequest")
13308 }
13309 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13310 where
13311 E: serde::de::Error,
13312 {
13313 use std::result::Result::Ok;
13314 use std::string::ToString;
13315 match value {
13316 "workspace" => Ok(__FieldTag::__workspace),
13317 "path" => Ok(__FieldTag::__path),
13318 "newPath" => Ok(__FieldTag::__new_path),
13319 "new_path" => Ok(__FieldTag::__new_path),
13320 _ => Ok(__FieldTag::Unknown(value.to_string())),
13321 }
13322 }
13323 }
13324 deserializer.deserialize_identifier(Visitor)
13325 }
13326 }
13327 struct Visitor;
13328 impl<'de> serde::de::Visitor<'de> for Visitor {
13329 type Value = MoveFileRequest;
13330 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13331 formatter.write_str("struct MoveFileRequest")
13332 }
13333 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13334 where
13335 A: serde::de::MapAccess<'de>,
13336 {
13337 #[allow(unused_imports)]
13338 use serde::de::Error;
13339 use std::option::Option::Some;
13340 let mut fields = std::collections::HashSet::new();
13341 let mut result = Self::Value::new();
13342 while let Some(tag) = map.next_key::<__FieldTag>()? {
13343 #[allow(clippy::match_single_binding)]
13344 match tag {
13345 __FieldTag::__workspace => {
13346 if !fields.insert(__FieldTag::__workspace) {
13347 return std::result::Result::Err(A::Error::duplicate_field(
13348 "multiple values for workspace",
13349 ));
13350 }
13351 result.workspace = map
13352 .next_value::<std::option::Option<std::string::String>>()?
13353 .unwrap_or_default();
13354 }
13355 __FieldTag::__path => {
13356 if !fields.insert(__FieldTag::__path) {
13357 return std::result::Result::Err(A::Error::duplicate_field(
13358 "multiple values for path",
13359 ));
13360 }
13361 result.path = map
13362 .next_value::<std::option::Option<std::string::String>>()?
13363 .unwrap_or_default();
13364 }
13365 __FieldTag::__new_path => {
13366 if !fields.insert(__FieldTag::__new_path) {
13367 return std::result::Result::Err(A::Error::duplicate_field(
13368 "multiple values for new_path",
13369 ));
13370 }
13371 result.new_path = map
13372 .next_value::<std::option::Option<std::string::String>>()?
13373 .unwrap_or_default();
13374 }
13375 __FieldTag::Unknown(key) => {
13376 let value = map.next_value::<serde_json::Value>()?;
13377 result._unknown_fields.insert(key, value);
13378 }
13379 }
13380 }
13381 std::result::Result::Ok(result)
13382 }
13383 }
13384 deserializer.deserialize_any(Visitor)
13385 }
13386}
13387
13388#[doc(hidden)]
13389impl serde::ser::Serialize for MoveFileRequest {
13390 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13391 where
13392 S: serde::ser::Serializer,
13393 {
13394 use serde::ser::SerializeMap;
13395 #[allow(unused_imports)]
13396 use std::option::Option::Some;
13397 let mut state = serializer.serialize_map(std::option::Option::None)?;
13398 if !self.workspace.is_empty() {
13399 state.serialize_entry("workspace", &self.workspace)?;
13400 }
13401 if !self.path.is_empty() {
13402 state.serialize_entry("path", &self.path)?;
13403 }
13404 if !self.new_path.is_empty() {
13405 state.serialize_entry("newPath", &self.new_path)?;
13406 }
13407 if !self._unknown_fields.is_empty() {
13408 for (key, value) in self._unknown_fields.iter() {
13409 state.serialize_entry(key, &value)?;
13410 }
13411 }
13412 state.end()
13413 }
13414}
13415
13416impl std::fmt::Debug for MoveFileRequest {
13417 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13418 let mut debug_struct = f.debug_struct("MoveFileRequest");
13419 debug_struct.field("workspace", &self.workspace);
13420 debug_struct.field("path", &self.path);
13421 debug_struct.field("new_path", &self.new_path);
13422 if !self._unknown_fields.is_empty() {
13423 debug_struct.field("_unknown_fields", &self._unknown_fields);
13424 }
13425 debug_struct.finish()
13426 }
13427}
13428
13429#[derive(Clone, Default, PartialEq)]
13431#[non_exhaustive]
13432pub struct MoveFileResponse {
13433 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13434}
13435
13436impl MoveFileResponse {
13437 pub fn new() -> Self {
13438 std::default::Default::default()
13439 }
13440}
13441
13442impl wkt::message::Message for MoveFileResponse {
13443 fn typename() -> &'static str {
13444 "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
13445 }
13446}
13447
13448#[doc(hidden)]
13449impl<'de> serde::de::Deserialize<'de> for MoveFileResponse {
13450 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13451 where
13452 D: serde::Deserializer<'de>,
13453 {
13454 #[allow(non_camel_case_types)]
13455 #[doc(hidden)]
13456 #[derive(PartialEq, Eq, Hash)]
13457 enum __FieldTag {
13458 Unknown(std::string::String),
13459 }
13460 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13461 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13462 where
13463 D: serde::Deserializer<'de>,
13464 {
13465 struct Visitor;
13466 impl<'de> serde::de::Visitor<'de> for Visitor {
13467 type Value = __FieldTag;
13468 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13469 formatter.write_str("a field name for MoveFileResponse")
13470 }
13471 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13472 where
13473 E: serde::de::Error,
13474 {
13475 use std::result::Result::Ok;
13476 use std::string::ToString;
13477 Ok(__FieldTag::Unknown(value.to_string()))
13478 }
13479 }
13480 deserializer.deserialize_identifier(Visitor)
13481 }
13482 }
13483 struct Visitor;
13484 impl<'de> serde::de::Visitor<'de> for Visitor {
13485 type Value = MoveFileResponse;
13486 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13487 formatter.write_str("struct MoveFileResponse")
13488 }
13489 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13490 where
13491 A: serde::de::MapAccess<'de>,
13492 {
13493 #[allow(unused_imports)]
13494 use serde::de::Error;
13495 use std::option::Option::Some;
13496 let mut result = Self::Value::new();
13497 while let Some(tag) = map.next_key::<__FieldTag>()? {
13498 #[allow(clippy::match_single_binding)]
13499 match tag {
13500 __FieldTag::Unknown(key) => {
13501 let value = map.next_value::<serde_json::Value>()?;
13502 result._unknown_fields.insert(key, value);
13503 }
13504 }
13505 }
13506 std::result::Result::Ok(result)
13507 }
13508 }
13509 deserializer.deserialize_any(Visitor)
13510 }
13511}
13512
13513#[doc(hidden)]
13514impl serde::ser::Serialize for MoveFileResponse {
13515 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13516 where
13517 S: serde::ser::Serializer,
13518 {
13519 use serde::ser::SerializeMap;
13520 #[allow(unused_imports)]
13521 use std::option::Option::Some;
13522 let mut state = serializer.serialize_map(std::option::Option::None)?;
13523 if !self._unknown_fields.is_empty() {
13524 for (key, value) in self._unknown_fields.iter() {
13525 state.serialize_entry(key, &value)?;
13526 }
13527 }
13528 state.end()
13529 }
13530}
13531
13532impl std::fmt::Debug for MoveFileResponse {
13533 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13534 let mut debug_struct = f.debug_struct("MoveFileResponse");
13535 if !self._unknown_fields.is_empty() {
13536 debug_struct.field("_unknown_fields", &self._unknown_fields);
13537 }
13538 debug_struct.finish()
13539 }
13540}
13541
13542#[derive(Clone, Default, PartialEq)]
13544#[non_exhaustive]
13545pub struct WriteFileRequest {
13546 pub workspace: std::string::String,
13548
13549 pub path: std::string::String,
13551
13552 pub contents: ::bytes::Bytes,
13554
13555 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13556}
13557
13558impl WriteFileRequest {
13559 pub fn new() -> Self {
13560 std::default::Default::default()
13561 }
13562
13563 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13565 self.workspace = v.into();
13566 self
13567 }
13568
13569 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13571 self.path = v.into();
13572 self
13573 }
13574
13575 pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
13577 self.contents = v.into();
13578 self
13579 }
13580}
13581
13582impl wkt::message::Message for WriteFileRequest {
13583 fn typename() -> &'static str {
13584 "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
13585 }
13586}
13587
13588#[doc(hidden)]
13589impl<'de> serde::de::Deserialize<'de> for WriteFileRequest {
13590 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13591 where
13592 D: serde::Deserializer<'de>,
13593 {
13594 #[allow(non_camel_case_types)]
13595 #[doc(hidden)]
13596 #[derive(PartialEq, Eq, Hash)]
13597 enum __FieldTag {
13598 __workspace,
13599 __path,
13600 __contents,
13601 Unknown(std::string::String),
13602 }
13603 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13604 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13605 where
13606 D: serde::Deserializer<'de>,
13607 {
13608 struct Visitor;
13609 impl<'de> serde::de::Visitor<'de> for Visitor {
13610 type Value = __FieldTag;
13611 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13612 formatter.write_str("a field name for WriteFileRequest")
13613 }
13614 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13615 where
13616 E: serde::de::Error,
13617 {
13618 use std::result::Result::Ok;
13619 use std::string::ToString;
13620 match value {
13621 "workspace" => Ok(__FieldTag::__workspace),
13622 "path" => Ok(__FieldTag::__path),
13623 "contents" => Ok(__FieldTag::__contents),
13624 _ => Ok(__FieldTag::Unknown(value.to_string())),
13625 }
13626 }
13627 }
13628 deserializer.deserialize_identifier(Visitor)
13629 }
13630 }
13631 struct Visitor;
13632 impl<'de> serde::de::Visitor<'de> for Visitor {
13633 type Value = WriteFileRequest;
13634 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13635 formatter.write_str("struct WriteFileRequest")
13636 }
13637 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13638 where
13639 A: serde::de::MapAccess<'de>,
13640 {
13641 #[allow(unused_imports)]
13642 use serde::de::Error;
13643 use std::option::Option::Some;
13644 let mut fields = std::collections::HashSet::new();
13645 let mut result = Self::Value::new();
13646 while let Some(tag) = map.next_key::<__FieldTag>()? {
13647 #[allow(clippy::match_single_binding)]
13648 match tag {
13649 __FieldTag::__workspace => {
13650 if !fields.insert(__FieldTag::__workspace) {
13651 return std::result::Result::Err(A::Error::duplicate_field(
13652 "multiple values for workspace",
13653 ));
13654 }
13655 result.workspace = map
13656 .next_value::<std::option::Option<std::string::String>>()?
13657 .unwrap_or_default();
13658 }
13659 __FieldTag::__path => {
13660 if !fields.insert(__FieldTag::__path) {
13661 return std::result::Result::Err(A::Error::duplicate_field(
13662 "multiple values for path",
13663 ));
13664 }
13665 result.path = map
13666 .next_value::<std::option::Option<std::string::String>>()?
13667 .unwrap_or_default();
13668 }
13669 __FieldTag::__contents => {
13670 if !fields.insert(__FieldTag::__contents) {
13671 return std::result::Result::Err(A::Error::duplicate_field(
13672 "multiple values for contents",
13673 ));
13674 }
13675 struct __With(std::option::Option<::bytes::Bytes>);
13676 impl<'de> serde::de::Deserialize<'de> for __With {
13677 fn deserialize<D>(
13678 deserializer: D,
13679 ) -> std::result::Result<Self, D::Error>
13680 where
13681 D: serde::de::Deserializer<'de>,
13682 {
13683 serde_with::As::< std::option::Option<serde_with::base64::Base64> >::deserialize(deserializer).map(__With)
13684 }
13685 }
13686 result.contents = map.next_value::<__With>()?.0.unwrap_or_default();
13687 }
13688 __FieldTag::Unknown(key) => {
13689 let value = map.next_value::<serde_json::Value>()?;
13690 result._unknown_fields.insert(key, value);
13691 }
13692 }
13693 }
13694 std::result::Result::Ok(result)
13695 }
13696 }
13697 deserializer.deserialize_any(Visitor)
13698 }
13699}
13700
13701#[doc(hidden)]
13702impl serde::ser::Serialize for WriteFileRequest {
13703 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13704 where
13705 S: serde::ser::Serializer,
13706 {
13707 use serde::ser::SerializeMap;
13708 #[allow(unused_imports)]
13709 use std::option::Option::Some;
13710 let mut state = serializer.serialize_map(std::option::Option::None)?;
13711 if !self.workspace.is_empty() {
13712 state.serialize_entry("workspace", &self.workspace)?;
13713 }
13714 if !self.path.is_empty() {
13715 state.serialize_entry("path", &self.path)?;
13716 }
13717 if !self.contents.is_empty() {
13718 struct __With<'a>(&'a ::bytes::Bytes);
13719 impl<'a> serde::ser::Serialize for __With<'a> {
13720 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13721 where
13722 S: serde::ser::Serializer,
13723 {
13724 serde_with::As::<serde_with::base64::Base64>::serialize(self.0, serializer)
13725 }
13726 }
13727 state.serialize_entry("contents", &__With(&self.contents))?;
13728 }
13729 if !self._unknown_fields.is_empty() {
13730 for (key, value) in self._unknown_fields.iter() {
13731 state.serialize_entry(key, &value)?;
13732 }
13733 }
13734 state.end()
13735 }
13736}
13737
13738impl std::fmt::Debug for WriteFileRequest {
13739 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13740 let mut debug_struct = f.debug_struct("WriteFileRequest");
13741 debug_struct.field("workspace", &self.workspace);
13742 debug_struct.field("path", &self.path);
13743 debug_struct.field("contents", &self.contents);
13744 if !self._unknown_fields.is_empty() {
13745 debug_struct.field("_unknown_fields", &self._unknown_fields);
13746 }
13747 debug_struct.finish()
13748 }
13749}
13750
13751#[derive(Clone, Default, PartialEq)]
13753#[non_exhaustive]
13754pub struct WriteFileResponse {
13755 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13756}
13757
13758impl WriteFileResponse {
13759 pub fn new() -> Self {
13760 std::default::Default::default()
13761 }
13762}
13763
13764impl wkt::message::Message for WriteFileResponse {
13765 fn typename() -> &'static str {
13766 "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
13767 }
13768}
13769
13770#[doc(hidden)]
13771impl<'de> serde::de::Deserialize<'de> for WriteFileResponse {
13772 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13773 where
13774 D: serde::Deserializer<'de>,
13775 {
13776 #[allow(non_camel_case_types)]
13777 #[doc(hidden)]
13778 #[derive(PartialEq, Eq, Hash)]
13779 enum __FieldTag {
13780 Unknown(std::string::String),
13781 }
13782 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13783 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13784 where
13785 D: serde::Deserializer<'de>,
13786 {
13787 struct Visitor;
13788 impl<'de> serde::de::Visitor<'de> for Visitor {
13789 type Value = __FieldTag;
13790 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13791 formatter.write_str("a field name for WriteFileResponse")
13792 }
13793 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13794 where
13795 E: serde::de::Error,
13796 {
13797 use std::result::Result::Ok;
13798 use std::string::ToString;
13799 Ok(__FieldTag::Unknown(value.to_string()))
13800 }
13801 }
13802 deserializer.deserialize_identifier(Visitor)
13803 }
13804 }
13805 struct Visitor;
13806 impl<'de> serde::de::Visitor<'de> for Visitor {
13807 type Value = WriteFileResponse;
13808 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13809 formatter.write_str("struct WriteFileResponse")
13810 }
13811 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13812 where
13813 A: serde::de::MapAccess<'de>,
13814 {
13815 #[allow(unused_imports)]
13816 use serde::de::Error;
13817 use std::option::Option::Some;
13818 let mut result = Self::Value::new();
13819 while let Some(tag) = map.next_key::<__FieldTag>()? {
13820 #[allow(clippy::match_single_binding)]
13821 match tag {
13822 __FieldTag::Unknown(key) => {
13823 let value = map.next_value::<serde_json::Value>()?;
13824 result._unknown_fields.insert(key, value);
13825 }
13826 }
13827 }
13828 std::result::Result::Ok(result)
13829 }
13830 }
13831 deserializer.deserialize_any(Visitor)
13832 }
13833}
13834
13835#[doc(hidden)]
13836impl serde::ser::Serialize for WriteFileResponse {
13837 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13838 where
13839 S: serde::ser::Serializer,
13840 {
13841 use serde::ser::SerializeMap;
13842 #[allow(unused_imports)]
13843 use std::option::Option::Some;
13844 let mut state = serializer.serialize_map(std::option::Option::None)?;
13845 if !self._unknown_fields.is_empty() {
13846 for (key, value) in self._unknown_fields.iter() {
13847 state.serialize_entry(key, &value)?;
13848 }
13849 }
13850 state.end()
13851 }
13852}
13853
13854impl std::fmt::Debug for WriteFileResponse {
13855 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13856 let mut debug_struct = f.debug_struct("WriteFileResponse");
13857 if !self._unknown_fields.is_empty() {
13858 debug_struct.field("_unknown_fields", &self._unknown_fields);
13859 }
13860 debug_struct.finish()
13861 }
13862}
13863
13864#[derive(Clone, Default, PartialEq)]
13866#[non_exhaustive]
13867pub struct InstallNpmPackagesRequest {
13868 pub workspace: std::string::String,
13870
13871 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13872}
13873
13874impl InstallNpmPackagesRequest {
13875 pub fn new() -> Self {
13876 std::default::Default::default()
13877 }
13878
13879 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13881 self.workspace = v.into();
13882 self
13883 }
13884}
13885
13886impl wkt::message::Message for InstallNpmPackagesRequest {
13887 fn typename() -> &'static str {
13888 "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
13889 }
13890}
13891
13892#[doc(hidden)]
13893impl<'de> serde::de::Deserialize<'de> for InstallNpmPackagesRequest {
13894 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13895 where
13896 D: serde::Deserializer<'de>,
13897 {
13898 #[allow(non_camel_case_types)]
13899 #[doc(hidden)]
13900 #[derive(PartialEq, Eq, Hash)]
13901 enum __FieldTag {
13902 __workspace,
13903 Unknown(std::string::String),
13904 }
13905 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
13906 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13907 where
13908 D: serde::Deserializer<'de>,
13909 {
13910 struct Visitor;
13911 impl<'de> serde::de::Visitor<'de> for Visitor {
13912 type Value = __FieldTag;
13913 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13914 formatter.write_str("a field name for InstallNpmPackagesRequest")
13915 }
13916 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
13917 where
13918 E: serde::de::Error,
13919 {
13920 use std::result::Result::Ok;
13921 use std::string::ToString;
13922 match value {
13923 "workspace" => Ok(__FieldTag::__workspace),
13924 _ => Ok(__FieldTag::Unknown(value.to_string())),
13925 }
13926 }
13927 }
13928 deserializer.deserialize_identifier(Visitor)
13929 }
13930 }
13931 struct Visitor;
13932 impl<'de> serde::de::Visitor<'de> for Visitor {
13933 type Value = InstallNpmPackagesRequest;
13934 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
13935 formatter.write_str("struct InstallNpmPackagesRequest")
13936 }
13937 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
13938 where
13939 A: serde::de::MapAccess<'de>,
13940 {
13941 #[allow(unused_imports)]
13942 use serde::de::Error;
13943 use std::option::Option::Some;
13944 let mut fields = std::collections::HashSet::new();
13945 let mut result = Self::Value::new();
13946 while let Some(tag) = map.next_key::<__FieldTag>()? {
13947 #[allow(clippy::match_single_binding)]
13948 match tag {
13949 __FieldTag::__workspace => {
13950 if !fields.insert(__FieldTag::__workspace) {
13951 return std::result::Result::Err(A::Error::duplicate_field(
13952 "multiple values for workspace",
13953 ));
13954 }
13955 result.workspace = map
13956 .next_value::<std::option::Option<std::string::String>>()?
13957 .unwrap_or_default();
13958 }
13959 __FieldTag::Unknown(key) => {
13960 let value = map.next_value::<serde_json::Value>()?;
13961 result._unknown_fields.insert(key, value);
13962 }
13963 }
13964 }
13965 std::result::Result::Ok(result)
13966 }
13967 }
13968 deserializer.deserialize_any(Visitor)
13969 }
13970}
13971
13972#[doc(hidden)]
13973impl serde::ser::Serialize for InstallNpmPackagesRequest {
13974 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13975 where
13976 S: serde::ser::Serializer,
13977 {
13978 use serde::ser::SerializeMap;
13979 #[allow(unused_imports)]
13980 use std::option::Option::Some;
13981 let mut state = serializer.serialize_map(std::option::Option::None)?;
13982 if !self.workspace.is_empty() {
13983 state.serialize_entry("workspace", &self.workspace)?;
13984 }
13985 if !self._unknown_fields.is_empty() {
13986 for (key, value) in self._unknown_fields.iter() {
13987 state.serialize_entry(key, &value)?;
13988 }
13989 }
13990 state.end()
13991 }
13992}
13993
13994impl std::fmt::Debug for InstallNpmPackagesRequest {
13995 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13996 let mut debug_struct = f.debug_struct("InstallNpmPackagesRequest");
13997 debug_struct.field("workspace", &self.workspace);
13998 if !self._unknown_fields.is_empty() {
13999 debug_struct.field("_unknown_fields", &self._unknown_fields);
14000 }
14001 debug_struct.finish()
14002 }
14003}
14004
14005#[derive(Clone, Default, PartialEq)]
14007#[non_exhaustive]
14008pub struct InstallNpmPackagesResponse {
14009 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14010}
14011
14012impl InstallNpmPackagesResponse {
14013 pub fn new() -> Self {
14014 std::default::Default::default()
14015 }
14016}
14017
14018impl wkt::message::Message for InstallNpmPackagesResponse {
14019 fn typename() -> &'static str {
14020 "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
14021 }
14022}
14023
14024#[doc(hidden)]
14025impl<'de> serde::de::Deserialize<'de> for InstallNpmPackagesResponse {
14026 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14027 where
14028 D: serde::Deserializer<'de>,
14029 {
14030 #[allow(non_camel_case_types)]
14031 #[doc(hidden)]
14032 #[derive(PartialEq, Eq, Hash)]
14033 enum __FieldTag {
14034 Unknown(std::string::String),
14035 }
14036 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14037 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14038 where
14039 D: serde::Deserializer<'de>,
14040 {
14041 struct Visitor;
14042 impl<'de> serde::de::Visitor<'de> for Visitor {
14043 type Value = __FieldTag;
14044 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14045 formatter.write_str("a field name for InstallNpmPackagesResponse")
14046 }
14047 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14048 where
14049 E: serde::de::Error,
14050 {
14051 use std::result::Result::Ok;
14052 use std::string::ToString;
14053 Ok(__FieldTag::Unknown(value.to_string()))
14054 }
14055 }
14056 deserializer.deserialize_identifier(Visitor)
14057 }
14058 }
14059 struct Visitor;
14060 impl<'de> serde::de::Visitor<'de> for Visitor {
14061 type Value = InstallNpmPackagesResponse;
14062 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14063 formatter.write_str("struct InstallNpmPackagesResponse")
14064 }
14065 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14066 where
14067 A: serde::de::MapAccess<'de>,
14068 {
14069 #[allow(unused_imports)]
14070 use serde::de::Error;
14071 use std::option::Option::Some;
14072 let mut result = Self::Value::new();
14073 while let Some(tag) = map.next_key::<__FieldTag>()? {
14074 #[allow(clippy::match_single_binding)]
14075 match tag {
14076 __FieldTag::Unknown(key) => {
14077 let value = map.next_value::<serde_json::Value>()?;
14078 result._unknown_fields.insert(key, value);
14079 }
14080 }
14081 }
14082 std::result::Result::Ok(result)
14083 }
14084 }
14085 deserializer.deserialize_any(Visitor)
14086 }
14087}
14088
14089#[doc(hidden)]
14090impl serde::ser::Serialize for InstallNpmPackagesResponse {
14091 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14092 where
14093 S: serde::ser::Serializer,
14094 {
14095 use serde::ser::SerializeMap;
14096 #[allow(unused_imports)]
14097 use std::option::Option::Some;
14098 let mut state = serializer.serialize_map(std::option::Option::None)?;
14099 if !self._unknown_fields.is_empty() {
14100 for (key, value) in self._unknown_fields.iter() {
14101 state.serialize_entry(key, &value)?;
14102 }
14103 }
14104 state.end()
14105 }
14106}
14107
14108impl std::fmt::Debug for InstallNpmPackagesResponse {
14109 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14110 let mut debug_struct = f.debug_struct("InstallNpmPackagesResponse");
14111 if !self._unknown_fields.is_empty() {
14112 debug_struct.field("_unknown_fields", &self._unknown_fields);
14113 }
14114 debug_struct.finish()
14115 }
14116}
14117
14118#[derive(Clone, Default, PartialEq)]
14120#[non_exhaustive]
14121pub struct ReleaseConfig {
14122 pub name: std::string::String,
14124
14125 pub git_commitish: std::string::String,
14132
14133 pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
14136
14137 pub cron_schedule: std::string::String,
14140
14141 pub time_zone: std::string::String,
14146
14147 pub recent_scheduled_release_records:
14151 std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
14152
14153 pub release_compilation_result: std::string::String,
14161
14162 pub disabled: bool,
14164
14165 pub internal_metadata: std::option::Option<std::string::String>,
14169
14170 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14171}
14172
14173impl ReleaseConfig {
14174 pub fn new() -> Self {
14175 std::default::Default::default()
14176 }
14177
14178 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14180 self.name = v.into();
14181 self
14182 }
14183
14184 pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14186 self.git_commitish = v.into();
14187 self
14188 }
14189
14190 pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
14192 where
14193 T: std::convert::Into<crate::model::CodeCompilationConfig>,
14194 {
14195 self.code_compilation_config = std::option::Option::Some(v.into());
14196 self
14197 }
14198
14199 pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
14201 where
14202 T: std::convert::Into<crate::model::CodeCompilationConfig>,
14203 {
14204 self.code_compilation_config = v.map(|x| x.into());
14205 self
14206 }
14207
14208 pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14210 self.cron_schedule = v.into();
14211 self
14212 }
14213
14214 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14216 self.time_zone = v.into();
14217 self
14218 }
14219
14220 pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
14222 where
14223 T: std::iter::IntoIterator<Item = V>,
14224 V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
14225 {
14226 use std::iter::Iterator;
14227 self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
14228 self
14229 }
14230
14231 pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
14233 mut self,
14234 v: T,
14235 ) -> Self {
14236 self.release_compilation_result = v.into();
14237 self
14238 }
14239
14240 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
14242 self.disabled = v.into();
14243 self
14244 }
14245
14246 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
14248 where
14249 T: std::convert::Into<std::string::String>,
14250 {
14251 self.internal_metadata = std::option::Option::Some(v.into());
14252 self
14253 }
14254
14255 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
14257 where
14258 T: std::convert::Into<std::string::String>,
14259 {
14260 self.internal_metadata = v.map(|x| x.into());
14261 self
14262 }
14263}
14264
14265impl wkt::message::Message for ReleaseConfig {
14266 fn typename() -> &'static str {
14267 "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
14268 }
14269}
14270
14271#[doc(hidden)]
14272impl<'de> serde::de::Deserialize<'de> for ReleaseConfig {
14273 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14274 where
14275 D: serde::Deserializer<'de>,
14276 {
14277 #[allow(non_camel_case_types)]
14278 #[doc(hidden)]
14279 #[derive(PartialEq, Eq, Hash)]
14280 enum __FieldTag {
14281 __name,
14282 __git_commitish,
14283 __code_compilation_config,
14284 __cron_schedule,
14285 __time_zone,
14286 __recent_scheduled_release_records,
14287 __release_compilation_result,
14288 __disabled,
14289 __internal_metadata,
14290 Unknown(std::string::String),
14291 }
14292 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14293 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14294 where
14295 D: serde::Deserializer<'de>,
14296 {
14297 struct Visitor;
14298 impl<'de> serde::de::Visitor<'de> for Visitor {
14299 type Value = __FieldTag;
14300 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14301 formatter.write_str("a field name for ReleaseConfig")
14302 }
14303 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14304 where
14305 E: serde::de::Error,
14306 {
14307 use std::result::Result::Ok;
14308 use std::string::ToString;
14309 match value {
14310 "name" => Ok(__FieldTag::__name),
14311 "gitCommitish" => Ok(__FieldTag::__git_commitish),
14312 "git_commitish" => Ok(__FieldTag::__git_commitish),
14313 "codeCompilationConfig" => Ok(__FieldTag::__code_compilation_config),
14314 "code_compilation_config" => Ok(__FieldTag::__code_compilation_config),
14315 "cronSchedule" => Ok(__FieldTag::__cron_schedule),
14316 "cron_schedule" => Ok(__FieldTag::__cron_schedule),
14317 "timeZone" => Ok(__FieldTag::__time_zone),
14318 "time_zone" => Ok(__FieldTag::__time_zone),
14319 "recentScheduledReleaseRecords" => {
14320 Ok(__FieldTag::__recent_scheduled_release_records)
14321 }
14322 "recent_scheduled_release_records" => {
14323 Ok(__FieldTag::__recent_scheduled_release_records)
14324 }
14325 "releaseCompilationResult" => {
14326 Ok(__FieldTag::__release_compilation_result)
14327 }
14328 "release_compilation_result" => {
14329 Ok(__FieldTag::__release_compilation_result)
14330 }
14331 "disabled" => Ok(__FieldTag::__disabled),
14332 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
14333 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
14334 _ => Ok(__FieldTag::Unknown(value.to_string())),
14335 }
14336 }
14337 }
14338 deserializer.deserialize_identifier(Visitor)
14339 }
14340 }
14341 struct Visitor;
14342 impl<'de> serde::de::Visitor<'de> for Visitor {
14343 type Value = ReleaseConfig;
14344 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14345 formatter.write_str("struct ReleaseConfig")
14346 }
14347 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14348 where
14349 A: serde::de::MapAccess<'de>,
14350 {
14351 #[allow(unused_imports)]
14352 use serde::de::Error;
14353 use std::option::Option::Some;
14354 let mut fields = std::collections::HashSet::new();
14355 let mut result = Self::Value::new();
14356 while let Some(tag) = map.next_key::<__FieldTag>()? {
14357 #[allow(clippy::match_single_binding)]
14358 match tag {
14359 __FieldTag::__name => {
14360 if !fields.insert(__FieldTag::__name) {
14361 return std::result::Result::Err(A::Error::duplicate_field(
14362 "multiple values for name",
14363 ));
14364 }
14365 result.name = map
14366 .next_value::<std::option::Option<std::string::String>>()?
14367 .unwrap_or_default();
14368 }
14369 __FieldTag::__git_commitish => {
14370 if !fields.insert(__FieldTag::__git_commitish) {
14371 return std::result::Result::Err(A::Error::duplicate_field(
14372 "multiple values for git_commitish",
14373 ));
14374 }
14375 result.git_commitish = map
14376 .next_value::<std::option::Option<std::string::String>>()?
14377 .unwrap_or_default();
14378 }
14379 __FieldTag::__code_compilation_config => {
14380 if !fields.insert(__FieldTag::__code_compilation_config) {
14381 return std::result::Result::Err(A::Error::duplicate_field(
14382 "multiple values for code_compilation_config",
14383 ));
14384 }
14385 result.code_compilation_config = map.next_value::<std::option::Option<crate::model::CodeCompilationConfig>>()?
14386 ;
14387 }
14388 __FieldTag::__cron_schedule => {
14389 if !fields.insert(__FieldTag::__cron_schedule) {
14390 return std::result::Result::Err(A::Error::duplicate_field(
14391 "multiple values for cron_schedule",
14392 ));
14393 }
14394 result.cron_schedule = map
14395 .next_value::<std::option::Option<std::string::String>>()?
14396 .unwrap_or_default();
14397 }
14398 __FieldTag::__time_zone => {
14399 if !fields.insert(__FieldTag::__time_zone) {
14400 return std::result::Result::Err(A::Error::duplicate_field(
14401 "multiple values for time_zone",
14402 ));
14403 }
14404 result.time_zone = map
14405 .next_value::<std::option::Option<std::string::String>>()?
14406 .unwrap_or_default();
14407 }
14408 __FieldTag::__recent_scheduled_release_records => {
14409 if !fields.insert(__FieldTag::__recent_scheduled_release_records) {
14410 return std::result::Result::Err(A::Error::duplicate_field(
14411 "multiple values for recent_scheduled_release_records",
14412 ));
14413 }
14414 result.recent_scheduled_release_records = map
14415 .next_value::<std::option::Option<
14416 std::vec::Vec<
14417 crate::model::release_config::ScheduledReleaseRecord,
14418 >,
14419 >>()?
14420 .unwrap_or_default();
14421 }
14422 __FieldTag::__release_compilation_result => {
14423 if !fields.insert(__FieldTag::__release_compilation_result) {
14424 return std::result::Result::Err(A::Error::duplicate_field(
14425 "multiple values for release_compilation_result",
14426 ));
14427 }
14428 result.release_compilation_result = map
14429 .next_value::<std::option::Option<std::string::String>>()?
14430 .unwrap_or_default();
14431 }
14432 __FieldTag::__disabled => {
14433 if !fields.insert(__FieldTag::__disabled) {
14434 return std::result::Result::Err(A::Error::duplicate_field(
14435 "multiple values for disabled",
14436 ));
14437 }
14438 result.disabled = map
14439 .next_value::<std::option::Option<bool>>()?
14440 .unwrap_or_default();
14441 }
14442 __FieldTag::__internal_metadata => {
14443 if !fields.insert(__FieldTag::__internal_metadata) {
14444 return std::result::Result::Err(A::Error::duplicate_field(
14445 "multiple values for internal_metadata",
14446 ));
14447 }
14448 result.internal_metadata =
14449 map.next_value::<std::option::Option<std::string::String>>()?;
14450 }
14451 __FieldTag::Unknown(key) => {
14452 let value = map.next_value::<serde_json::Value>()?;
14453 result._unknown_fields.insert(key, value);
14454 }
14455 }
14456 }
14457 std::result::Result::Ok(result)
14458 }
14459 }
14460 deserializer.deserialize_any(Visitor)
14461 }
14462}
14463
14464#[doc(hidden)]
14465impl serde::ser::Serialize for ReleaseConfig {
14466 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14467 where
14468 S: serde::ser::Serializer,
14469 {
14470 use serde::ser::SerializeMap;
14471 #[allow(unused_imports)]
14472 use std::option::Option::Some;
14473 let mut state = serializer.serialize_map(std::option::Option::None)?;
14474 if !self.name.is_empty() {
14475 state.serialize_entry("name", &self.name)?;
14476 }
14477 if !self.git_commitish.is_empty() {
14478 state.serialize_entry("gitCommitish", &self.git_commitish)?;
14479 }
14480 if self.code_compilation_config.is_some() {
14481 state.serialize_entry("codeCompilationConfig", &self.code_compilation_config)?;
14482 }
14483 if !self.cron_schedule.is_empty() {
14484 state.serialize_entry("cronSchedule", &self.cron_schedule)?;
14485 }
14486 if !self.time_zone.is_empty() {
14487 state.serialize_entry("timeZone", &self.time_zone)?;
14488 }
14489 if !self.recent_scheduled_release_records.is_empty() {
14490 state.serialize_entry(
14491 "recentScheduledReleaseRecords",
14492 &self.recent_scheduled_release_records,
14493 )?;
14494 }
14495 if !self.release_compilation_result.is_empty() {
14496 state.serialize_entry("releaseCompilationResult", &self.release_compilation_result)?;
14497 }
14498 if !wkt::internal::is_default(&self.disabled) {
14499 state.serialize_entry("disabled", &self.disabled)?;
14500 }
14501 if self.internal_metadata.is_some() {
14502 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
14503 }
14504 if !self._unknown_fields.is_empty() {
14505 for (key, value) in self._unknown_fields.iter() {
14506 state.serialize_entry(key, &value)?;
14507 }
14508 }
14509 state.end()
14510 }
14511}
14512
14513impl std::fmt::Debug for ReleaseConfig {
14514 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14515 let mut debug_struct = f.debug_struct("ReleaseConfig");
14516 debug_struct.field("name", &self.name);
14517 debug_struct.field("git_commitish", &self.git_commitish);
14518 debug_struct.field("code_compilation_config", &self.code_compilation_config);
14519 debug_struct.field("cron_schedule", &self.cron_schedule);
14520 debug_struct.field("time_zone", &self.time_zone);
14521 debug_struct.field(
14522 "recent_scheduled_release_records",
14523 &self.recent_scheduled_release_records,
14524 );
14525 debug_struct.field(
14526 "release_compilation_result",
14527 &self.release_compilation_result,
14528 );
14529 debug_struct.field("disabled", &self.disabled);
14530 debug_struct.field("internal_metadata", &self.internal_metadata);
14531 if !self._unknown_fields.is_empty() {
14532 debug_struct.field("_unknown_fields", &self._unknown_fields);
14533 }
14534 debug_struct.finish()
14535 }
14536}
14537
14538pub mod release_config {
14540 #[allow(unused_imports)]
14541 use super::*;
14542
14543 #[derive(Clone, Default, PartialEq)]
14546 #[non_exhaustive]
14547 pub struct ScheduledReleaseRecord {
14548 pub release_time: std::option::Option<wkt::Timestamp>,
14550
14551 pub result:
14553 std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
14554
14555 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14556 }
14557
14558 impl ScheduledReleaseRecord {
14559 pub fn new() -> Self {
14560 std::default::Default::default()
14561 }
14562
14563 pub fn set_release_time<T>(mut self, v: T) -> Self
14565 where
14566 T: std::convert::Into<wkt::Timestamp>,
14567 {
14568 self.release_time = std::option::Option::Some(v.into());
14569 self
14570 }
14571
14572 pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
14574 where
14575 T: std::convert::Into<wkt::Timestamp>,
14576 {
14577 self.release_time = v.map(|x| x.into());
14578 self
14579 }
14580
14581 pub fn set_result<
14586 T: std::convert::Into<
14587 std::option::Option<
14588 crate::model::release_config::scheduled_release_record::Result,
14589 >,
14590 >,
14591 >(
14592 mut self,
14593 v: T,
14594 ) -> Self {
14595 self.result = v.into();
14596 self
14597 }
14598
14599 pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
14603 #[allow(unreachable_patterns)]
14604 self.result.as_ref().and_then(|v| match v {
14605 crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
14606 _ => std::option::Option::None,
14607 })
14608 }
14609
14610 pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
14616 mut self,
14617 v: T,
14618 ) -> Self {
14619 self.result = std::option::Option::Some(
14620 crate::model::release_config::scheduled_release_record::Result::CompilationResult(
14621 v.into(),
14622 ),
14623 );
14624 self
14625 }
14626
14627 pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
14631 #[allow(unreachable_patterns)]
14632 self.result.as_ref().and_then(|v| match v {
14633 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
14634 std::option::Option::Some(v)
14635 }
14636 _ => std::option::Option::None,
14637 })
14638 }
14639
14640 pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
14646 mut self,
14647 v: T,
14648 ) -> Self {
14649 self.result = std::option::Option::Some(
14650 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
14651 v.into(),
14652 ),
14653 );
14654 self
14655 }
14656 }
14657
14658 impl wkt::message::Message for ScheduledReleaseRecord {
14659 fn typename() -> &'static str {
14660 "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
14661 }
14662 }
14663
14664 #[doc(hidden)]
14665 impl<'de> serde::de::Deserialize<'de> for ScheduledReleaseRecord {
14666 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14667 where
14668 D: serde::Deserializer<'de>,
14669 {
14670 #[allow(non_camel_case_types)]
14671 #[doc(hidden)]
14672 #[derive(PartialEq, Eq, Hash)]
14673 enum __FieldTag {
14674 __compilation_result,
14675 __error_status,
14676 __release_time,
14677 Unknown(std::string::String),
14678 }
14679 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14680 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14681 where
14682 D: serde::Deserializer<'de>,
14683 {
14684 struct Visitor;
14685 impl<'de> serde::de::Visitor<'de> for Visitor {
14686 type Value = __FieldTag;
14687 fn expecting(
14688 &self,
14689 formatter: &mut std::fmt::Formatter,
14690 ) -> std::fmt::Result {
14691 formatter.write_str("a field name for ScheduledReleaseRecord")
14692 }
14693 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14694 where
14695 E: serde::de::Error,
14696 {
14697 use std::result::Result::Ok;
14698 use std::string::ToString;
14699 match value {
14700 "compilationResult" => Ok(__FieldTag::__compilation_result),
14701 "compilation_result" => Ok(__FieldTag::__compilation_result),
14702 "errorStatus" => Ok(__FieldTag::__error_status),
14703 "error_status" => Ok(__FieldTag::__error_status),
14704 "releaseTime" => Ok(__FieldTag::__release_time),
14705 "release_time" => Ok(__FieldTag::__release_time),
14706 _ => Ok(__FieldTag::Unknown(value.to_string())),
14707 }
14708 }
14709 }
14710 deserializer.deserialize_identifier(Visitor)
14711 }
14712 }
14713 struct Visitor;
14714 impl<'de> serde::de::Visitor<'de> for Visitor {
14715 type Value = ScheduledReleaseRecord;
14716 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14717 formatter.write_str("struct ScheduledReleaseRecord")
14718 }
14719 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14720 where
14721 A: serde::de::MapAccess<'de>,
14722 {
14723 #[allow(unused_imports)]
14724 use serde::de::Error;
14725 use std::option::Option::Some;
14726 let mut fields = std::collections::HashSet::new();
14727 let mut result = Self::Value::new();
14728 while let Some(tag) = map.next_key::<__FieldTag>()? {
14729 #[allow(clippy::match_single_binding)]
14730 match tag {
14731 __FieldTag::__compilation_result => {
14732 if !fields.insert(__FieldTag::__compilation_result) {
14733 return std::result::Result::Err(A::Error::duplicate_field(
14734 "multiple values for compilation_result",
14735 ));
14736 }
14737 if result.result.is_some() {
14738 return std::result::Result::Err(A::Error::duplicate_field(
14739 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord.compilation_result, latest field was compilationResult",
14740 ));
14741 }
14742 result.result = std::option::Option::Some(
14743 crate::model::release_config::scheduled_release_record::Result::CompilationResult(
14744 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
14745 ),
14746 );
14747 }
14748 __FieldTag::__error_status => {
14749 if !fields.insert(__FieldTag::__error_status) {
14750 return std::result::Result::Err(A::Error::duplicate_field(
14751 "multiple values for error_status",
14752 ));
14753 }
14754 if result.result.is_some() {
14755 return std::result::Result::Err(A::Error::duplicate_field(
14756 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord.error_status, latest field was errorStatus",
14757 ));
14758 }
14759 result.result = std::option::Option::Some(
14760 crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
14761 map.next_value::<std::option::Option<std::boxed::Box<rpc::model::Status>>>()?.unwrap_or_default()
14762 ),
14763 );
14764 }
14765 __FieldTag::__release_time => {
14766 if !fields.insert(__FieldTag::__release_time) {
14767 return std::result::Result::Err(A::Error::duplicate_field(
14768 "multiple values for release_time",
14769 ));
14770 }
14771 result.release_time =
14772 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
14773 }
14774 __FieldTag::Unknown(key) => {
14775 let value = map.next_value::<serde_json::Value>()?;
14776 result._unknown_fields.insert(key, value);
14777 }
14778 }
14779 }
14780 std::result::Result::Ok(result)
14781 }
14782 }
14783 deserializer.deserialize_any(Visitor)
14784 }
14785 }
14786
14787 #[doc(hidden)]
14788 impl serde::ser::Serialize for ScheduledReleaseRecord {
14789 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14790 where
14791 S: serde::ser::Serializer,
14792 {
14793 use serde::ser::SerializeMap;
14794 #[allow(unused_imports)]
14795 use std::option::Option::Some;
14796 let mut state = serializer.serialize_map(std::option::Option::None)?;
14797 if let Some(value) = self.compilation_result() {
14798 state.serialize_entry("compilationResult", value)?;
14799 }
14800 if let Some(value) = self.error_status() {
14801 state.serialize_entry("errorStatus", value)?;
14802 }
14803 if self.release_time.is_some() {
14804 state.serialize_entry("releaseTime", &self.release_time)?;
14805 }
14806 if !self._unknown_fields.is_empty() {
14807 for (key, value) in self._unknown_fields.iter() {
14808 state.serialize_entry(key, &value)?;
14809 }
14810 }
14811 state.end()
14812 }
14813 }
14814
14815 impl std::fmt::Debug for ScheduledReleaseRecord {
14816 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14817 let mut debug_struct = f.debug_struct("ScheduledReleaseRecord");
14818 debug_struct.field("release_time", &self.release_time);
14819 debug_struct.field("result", &self.result);
14820 if !self._unknown_fields.is_empty() {
14821 debug_struct.field("_unknown_fields", &self._unknown_fields);
14822 }
14823 debug_struct.finish()
14824 }
14825 }
14826
14827 pub mod scheduled_release_record {
14829 #[allow(unused_imports)]
14830 use super::*;
14831
14832 #[derive(Clone, Debug, PartialEq)]
14834 #[non_exhaustive]
14835 pub enum Result {
14836 CompilationResult(std::string::String),
14840 ErrorStatus(std::boxed::Box<rpc::model::Status>),
14843 }
14844 }
14845}
14846
14847#[derive(Clone, Default, PartialEq)]
14849#[non_exhaustive]
14850pub struct ListReleaseConfigsRequest {
14851 pub parent: std::string::String,
14854
14855 pub page_size: i32,
14859
14860 pub page_token: std::string::String,
14867
14868 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14869}
14870
14871impl ListReleaseConfigsRequest {
14872 pub fn new() -> Self {
14873 std::default::Default::default()
14874 }
14875
14876 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14878 self.parent = v.into();
14879 self
14880 }
14881
14882 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14884 self.page_size = v.into();
14885 self
14886 }
14887
14888 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14890 self.page_token = v.into();
14891 self
14892 }
14893}
14894
14895impl wkt::message::Message for ListReleaseConfigsRequest {
14896 fn typename() -> &'static str {
14897 "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
14898 }
14899}
14900
14901#[doc(hidden)]
14902impl<'de> serde::de::Deserialize<'de> for ListReleaseConfigsRequest {
14903 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14904 where
14905 D: serde::Deserializer<'de>,
14906 {
14907 #[allow(non_camel_case_types)]
14908 #[doc(hidden)]
14909 #[derive(PartialEq, Eq, Hash)]
14910 enum __FieldTag {
14911 __parent,
14912 __page_size,
14913 __page_token,
14914 Unknown(std::string::String),
14915 }
14916 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
14917 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14918 where
14919 D: serde::Deserializer<'de>,
14920 {
14921 struct Visitor;
14922 impl<'de> serde::de::Visitor<'de> for Visitor {
14923 type Value = __FieldTag;
14924 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14925 formatter.write_str("a field name for ListReleaseConfigsRequest")
14926 }
14927 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
14928 where
14929 E: serde::de::Error,
14930 {
14931 use std::result::Result::Ok;
14932 use std::string::ToString;
14933 match value {
14934 "parent" => Ok(__FieldTag::__parent),
14935 "pageSize" => Ok(__FieldTag::__page_size),
14936 "page_size" => Ok(__FieldTag::__page_size),
14937 "pageToken" => Ok(__FieldTag::__page_token),
14938 "page_token" => Ok(__FieldTag::__page_token),
14939 _ => Ok(__FieldTag::Unknown(value.to_string())),
14940 }
14941 }
14942 }
14943 deserializer.deserialize_identifier(Visitor)
14944 }
14945 }
14946 struct Visitor;
14947 impl<'de> serde::de::Visitor<'de> for Visitor {
14948 type Value = ListReleaseConfigsRequest;
14949 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
14950 formatter.write_str("struct ListReleaseConfigsRequest")
14951 }
14952 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
14953 where
14954 A: serde::de::MapAccess<'de>,
14955 {
14956 #[allow(unused_imports)]
14957 use serde::de::Error;
14958 use std::option::Option::Some;
14959 let mut fields = std::collections::HashSet::new();
14960 let mut result = Self::Value::new();
14961 while let Some(tag) = map.next_key::<__FieldTag>()? {
14962 #[allow(clippy::match_single_binding)]
14963 match tag {
14964 __FieldTag::__parent => {
14965 if !fields.insert(__FieldTag::__parent) {
14966 return std::result::Result::Err(A::Error::duplicate_field(
14967 "multiple values for parent",
14968 ));
14969 }
14970 result.parent = map
14971 .next_value::<std::option::Option<std::string::String>>()?
14972 .unwrap_or_default();
14973 }
14974 __FieldTag::__page_size => {
14975 if !fields.insert(__FieldTag::__page_size) {
14976 return std::result::Result::Err(A::Error::duplicate_field(
14977 "multiple values for page_size",
14978 ));
14979 }
14980 struct __With(std::option::Option<i32>);
14981 impl<'de> serde::de::Deserialize<'de> for __With {
14982 fn deserialize<D>(
14983 deserializer: D,
14984 ) -> std::result::Result<Self, D::Error>
14985 where
14986 D: serde::de::Deserializer<'de>,
14987 {
14988 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
14989 }
14990 }
14991 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
14992 }
14993 __FieldTag::__page_token => {
14994 if !fields.insert(__FieldTag::__page_token) {
14995 return std::result::Result::Err(A::Error::duplicate_field(
14996 "multiple values for page_token",
14997 ));
14998 }
14999 result.page_token = map
15000 .next_value::<std::option::Option<std::string::String>>()?
15001 .unwrap_or_default();
15002 }
15003 __FieldTag::Unknown(key) => {
15004 let value = map.next_value::<serde_json::Value>()?;
15005 result._unknown_fields.insert(key, value);
15006 }
15007 }
15008 }
15009 std::result::Result::Ok(result)
15010 }
15011 }
15012 deserializer.deserialize_any(Visitor)
15013 }
15014}
15015
15016#[doc(hidden)]
15017impl serde::ser::Serialize for ListReleaseConfigsRequest {
15018 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15019 where
15020 S: serde::ser::Serializer,
15021 {
15022 use serde::ser::SerializeMap;
15023 #[allow(unused_imports)]
15024 use std::option::Option::Some;
15025 let mut state = serializer.serialize_map(std::option::Option::None)?;
15026 if !self.parent.is_empty() {
15027 state.serialize_entry("parent", &self.parent)?;
15028 }
15029 if !wkt::internal::is_default(&self.page_size) {
15030 struct __With<'a>(&'a i32);
15031 impl<'a> serde::ser::Serialize for __With<'a> {
15032 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15033 where
15034 S: serde::ser::Serializer,
15035 {
15036 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
15037 }
15038 }
15039 state.serialize_entry("pageSize", &__With(&self.page_size))?;
15040 }
15041 if !self.page_token.is_empty() {
15042 state.serialize_entry("pageToken", &self.page_token)?;
15043 }
15044 if !self._unknown_fields.is_empty() {
15045 for (key, value) in self._unknown_fields.iter() {
15046 state.serialize_entry(key, &value)?;
15047 }
15048 }
15049 state.end()
15050 }
15051}
15052
15053impl std::fmt::Debug for ListReleaseConfigsRequest {
15054 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15055 let mut debug_struct = f.debug_struct("ListReleaseConfigsRequest");
15056 debug_struct.field("parent", &self.parent);
15057 debug_struct.field("page_size", &self.page_size);
15058 debug_struct.field("page_token", &self.page_token);
15059 if !self._unknown_fields.is_empty() {
15060 debug_struct.field("_unknown_fields", &self._unknown_fields);
15061 }
15062 debug_struct.finish()
15063 }
15064}
15065
15066#[derive(Clone, Default, PartialEq)]
15068#[non_exhaustive]
15069pub struct ListReleaseConfigsResponse {
15070 pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
15072
15073 pub next_page_token: std::string::String,
15076
15077 pub unreachable: std::vec::Vec<std::string::String>,
15079
15080 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15081}
15082
15083impl ListReleaseConfigsResponse {
15084 pub fn new() -> Self {
15085 std::default::Default::default()
15086 }
15087
15088 pub fn set_release_configs<T, V>(mut self, v: T) -> Self
15090 where
15091 T: std::iter::IntoIterator<Item = V>,
15092 V: std::convert::Into<crate::model::ReleaseConfig>,
15093 {
15094 use std::iter::Iterator;
15095 self.release_configs = v.into_iter().map(|i| i.into()).collect();
15096 self
15097 }
15098
15099 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15101 self.next_page_token = v.into();
15102 self
15103 }
15104
15105 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
15107 where
15108 T: std::iter::IntoIterator<Item = V>,
15109 V: std::convert::Into<std::string::String>,
15110 {
15111 use std::iter::Iterator;
15112 self.unreachable = v.into_iter().map(|i| i.into()).collect();
15113 self
15114 }
15115}
15116
15117impl wkt::message::Message for ListReleaseConfigsResponse {
15118 fn typename() -> &'static str {
15119 "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
15120 }
15121}
15122
15123#[doc(hidden)]
15124impl gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
15125 type PageItem = crate::model::ReleaseConfig;
15126
15127 fn items(self) -> std::vec::Vec<Self::PageItem> {
15128 self.release_configs
15129 }
15130
15131 fn next_page_token(&self) -> std::string::String {
15132 use std::clone::Clone;
15133 self.next_page_token.clone()
15134 }
15135}
15136
15137#[doc(hidden)]
15138impl<'de> serde::de::Deserialize<'de> for ListReleaseConfigsResponse {
15139 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15140 where
15141 D: serde::Deserializer<'de>,
15142 {
15143 #[allow(non_camel_case_types)]
15144 #[doc(hidden)]
15145 #[derive(PartialEq, Eq, Hash)]
15146 enum __FieldTag {
15147 __release_configs,
15148 __next_page_token,
15149 __unreachable,
15150 Unknown(std::string::String),
15151 }
15152 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15153 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15154 where
15155 D: serde::Deserializer<'de>,
15156 {
15157 struct Visitor;
15158 impl<'de> serde::de::Visitor<'de> for Visitor {
15159 type Value = __FieldTag;
15160 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15161 formatter.write_str("a field name for ListReleaseConfigsResponse")
15162 }
15163 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15164 where
15165 E: serde::de::Error,
15166 {
15167 use std::result::Result::Ok;
15168 use std::string::ToString;
15169 match value {
15170 "releaseConfigs" => Ok(__FieldTag::__release_configs),
15171 "release_configs" => Ok(__FieldTag::__release_configs),
15172 "nextPageToken" => Ok(__FieldTag::__next_page_token),
15173 "next_page_token" => Ok(__FieldTag::__next_page_token),
15174 "unreachable" => Ok(__FieldTag::__unreachable),
15175 _ => Ok(__FieldTag::Unknown(value.to_string())),
15176 }
15177 }
15178 }
15179 deserializer.deserialize_identifier(Visitor)
15180 }
15181 }
15182 struct Visitor;
15183 impl<'de> serde::de::Visitor<'de> for Visitor {
15184 type Value = ListReleaseConfigsResponse;
15185 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15186 formatter.write_str("struct ListReleaseConfigsResponse")
15187 }
15188 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15189 where
15190 A: serde::de::MapAccess<'de>,
15191 {
15192 #[allow(unused_imports)]
15193 use serde::de::Error;
15194 use std::option::Option::Some;
15195 let mut fields = std::collections::HashSet::new();
15196 let mut result = Self::Value::new();
15197 while let Some(tag) = map.next_key::<__FieldTag>()? {
15198 #[allow(clippy::match_single_binding)]
15199 match tag {
15200 __FieldTag::__release_configs => {
15201 if !fields.insert(__FieldTag::__release_configs) {
15202 return std::result::Result::Err(A::Error::duplicate_field(
15203 "multiple values for release_configs",
15204 ));
15205 }
15206 result.release_configs = map.next_value::<std::option::Option<std::vec::Vec<crate::model::ReleaseConfig>>>()?.unwrap_or_default();
15207 }
15208 __FieldTag::__next_page_token => {
15209 if !fields.insert(__FieldTag::__next_page_token) {
15210 return std::result::Result::Err(A::Error::duplicate_field(
15211 "multiple values for next_page_token",
15212 ));
15213 }
15214 result.next_page_token = map
15215 .next_value::<std::option::Option<std::string::String>>()?
15216 .unwrap_or_default();
15217 }
15218 __FieldTag::__unreachable => {
15219 if !fields.insert(__FieldTag::__unreachable) {
15220 return std::result::Result::Err(A::Error::duplicate_field(
15221 "multiple values for unreachable",
15222 ));
15223 }
15224 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
15225 }
15226 __FieldTag::Unknown(key) => {
15227 let value = map.next_value::<serde_json::Value>()?;
15228 result._unknown_fields.insert(key, value);
15229 }
15230 }
15231 }
15232 std::result::Result::Ok(result)
15233 }
15234 }
15235 deserializer.deserialize_any(Visitor)
15236 }
15237}
15238
15239#[doc(hidden)]
15240impl serde::ser::Serialize for ListReleaseConfigsResponse {
15241 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15242 where
15243 S: serde::ser::Serializer,
15244 {
15245 use serde::ser::SerializeMap;
15246 #[allow(unused_imports)]
15247 use std::option::Option::Some;
15248 let mut state = serializer.serialize_map(std::option::Option::None)?;
15249 if !self.release_configs.is_empty() {
15250 state.serialize_entry("releaseConfigs", &self.release_configs)?;
15251 }
15252 if !self.next_page_token.is_empty() {
15253 state.serialize_entry("nextPageToken", &self.next_page_token)?;
15254 }
15255 if !self.unreachable.is_empty() {
15256 state.serialize_entry("unreachable", &self.unreachable)?;
15257 }
15258 if !self._unknown_fields.is_empty() {
15259 for (key, value) in self._unknown_fields.iter() {
15260 state.serialize_entry(key, &value)?;
15261 }
15262 }
15263 state.end()
15264 }
15265}
15266
15267impl std::fmt::Debug for ListReleaseConfigsResponse {
15268 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15269 let mut debug_struct = f.debug_struct("ListReleaseConfigsResponse");
15270 debug_struct.field("release_configs", &self.release_configs);
15271 debug_struct.field("next_page_token", &self.next_page_token);
15272 debug_struct.field("unreachable", &self.unreachable);
15273 if !self._unknown_fields.is_empty() {
15274 debug_struct.field("_unknown_fields", &self._unknown_fields);
15275 }
15276 debug_struct.finish()
15277 }
15278}
15279
15280#[derive(Clone, Default, PartialEq)]
15282#[non_exhaustive]
15283pub struct GetReleaseConfigRequest {
15284 pub name: std::string::String,
15286
15287 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15288}
15289
15290impl GetReleaseConfigRequest {
15291 pub fn new() -> Self {
15292 std::default::Default::default()
15293 }
15294
15295 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15297 self.name = v.into();
15298 self
15299 }
15300}
15301
15302impl wkt::message::Message for GetReleaseConfigRequest {
15303 fn typename() -> &'static str {
15304 "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
15305 }
15306}
15307
15308#[doc(hidden)]
15309impl<'de> serde::de::Deserialize<'de> for GetReleaseConfigRequest {
15310 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15311 where
15312 D: serde::Deserializer<'de>,
15313 {
15314 #[allow(non_camel_case_types)]
15315 #[doc(hidden)]
15316 #[derive(PartialEq, Eq, Hash)]
15317 enum __FieldTag {
15318 __name,
15319 Unknown(std::string::String),
15320 }
15321 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15322 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15323 where
15324 D: serde::Deserializer<'de>,
15325 {
15326 struct Visitor;
15327 impl<'de> serde::de::Visitor<'de> for Visitor {
15328 type Value = __FieldTag;
15329 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15330 formatter.write_str("a field name for GetReleaseConfigRequest")
15331 }
15332 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15333 where
15334 E: serde::de::Error,
15335 {
15336 use std::result::Result::Ok;
15337 use std::string::ToString;
15338 match value {
15339 "name" => Ok(__FieldTag::__name),
15340 _ => Ok(__FieldTag::Unknown(value.to_string())),
15341 }
15342 }
15343 }
15344 deserializer.deserialize_identifier(Visitor)
15345 }
15346 }
15347 struct Visitor;
15348 impl<'de> serde::de::Visitor<'de> for Visitor {
15349 type Value = GetReleaseConfigRequest;
15350 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15351 formatter.write_str("struct GetReleaseConfigRequest")
15352 }
15353 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15354 where
15355 A: serde::de::MapAccess<'de>,
15356 {
15357 #[allow(unused_imports)]
15358 use serde::de::Error;
15359 use std::option::Option::Some;
15360 let mut fields = std::collections::HashSet::new();
15361 let mut result = Self::Value::new();
15362 while let Some(tag) = map.next_key::<__FieldTag>()? {
15363 #[allow(clippy::match_single_binding)]
15364 match tag {
15365 __FieldTag::__name => {
15366 if !fields.insert(__FieldTag::__name) {
15367 return std::result::Result::Err(A::Error::duplicate_field(
15368 "multiple values for name",
15369 ));
15370 }
15371 result.name = map
15372 .next_value::<std::option::Option<std::string::String>>()?
15373 .unwrap_or_default();
15374 }
15375 __FieldTag::Unknown(key) => {
15376 let value = map.next_value::<serde_json::Value>()?;
15377 result._unknown_fields.insert(key, value);
15378 }
15379 }
15380 }
15381 std::result::Result::Ok(result)
15382 }
15383 }
15384 deserializer.deserialize_any(Visitor)
15385 }
15386}
15387
15388#[doc(hidden)]
15389impl serde::ser::Serialize for GetReleaseConfigRequest {
15390 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15391 where
15392 S: serde::ser::Serializer,
15393 {
15394 use serde::ser::SerializeMap;
15395 #[allow(unused_imports)]
15396 use std::option::Option::Some;
15397 let mut state = serializer.serialize_map(std::option::Option::None)?;
15398 if !self.name.is_empty() {
15399 state.serialize_entry("name", &self.name)?;
15400 }
15401 if !self._unknown_fields.is_empty() {
15402 for (key, value) in self._unknown_fields.iter() {
15403 state.serialize_entry(key, &value)?;
15404 }
15405 }
15406 state.end()
15407 }
15408}
15409
15410impl std::fmt::Debug for GetReleaseConfigRequest {
15411 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15412 let mut debug_struct = f.debug_struct("GetReleaseConfigRequest");
15413 debug_struct.field("name", &self.name);
15414 if !self._unknown_fields.is_empty() {
15415 debug_struct.field("_unknown_fields", &self._unknown_fields);
15416 }
15417 debug_struct.finish()
15418 }
15419}
15420
15421#[derive(Clone, Default, PartialEq)]
15423#[non_exhaustive]
15424pub struct CreateReleaseConfigRequest {
15425 pub parent: std::string::String,
15428
15429 pub release_config: std::option::Option<crate::model::ReleaseConfig>,
15431
15432 pub release_config_id: std::string::String,
15435
15436 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15437}
15438
15439impl CreateReleaseConfigRequest {
15440 pub fn new() -> Self {
15441 std::default::Default::default()
15442 }
15443
15444 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15446 self.parent = v.into();
15447 self
15448 }
15449
15450 pub fn set_release_config<T>(mut self, v: T) -> Self
15452 where
15453 T: std::convert::Into<crate::model::ReleaseConfig>,
15454 {
15455 self.release_config = std::option::Option::Some(v.into());
15456 self
15457 }
15458
15459 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
15461 where
15462 T: std::convert::Into<crate::model::ReleaseConfig>,
15463 {
15464 self.release_config = v.map(|x| x.into());
15465 self
15466 }
15467
15468 pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
15470 mut self,
15471 v: T,
15472 ) -> Self {
15473 self.release_config_id = v.into();
15474 self
15475 }
15476}
15477
15478impl wkt::message::Message for CreateReleaseConfigRequest {
15479 fn typename() -> &'static str {
15480 "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
15481 }
15482}
15483
15484#[doc(hidden)]
15485impl<'de> serde::de::Deserialize<'de> for CreateReleaseConfigRequest {
15486 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15487 where
15488 D: serde::Deserializer<'de>,
15489 {
15490 #[allow(non_camel_case_types)]
15491 #[doc(hidden)]
15492 #[derive(PartialEq, Eq, Hash)]
15493 enum __FieldTag {
15494 __parent,
15495 __release_config,
15496 __release_config_id,
15497 Unknown(std::string::String),
15498 }
15499 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15500 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15501 where
15502 D: serde::Deserializer<'de>,
15503 {
15504 struct Visitor;
15505 impl<'de> serde::de::Visitor<'de> for Visitor {
15506 type Value = __FieldTag;
15507 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15508 formatter.write_str("a field name for CreateReleaseConfigRequest")
15509 }
15510 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15511 where
15512 E: serde::de::Error,
15513 {
15514 use std::result::Result::Ok;
15515 use std::string::ToString;
15516 match value {
15517 "parent" => Ok(__FieldTag::__parent),
15518 "releaseConfig" => Ok(__FieldTag::__release_config),
15519 "release_config" => Ok(__FieldTag::__release_config),
15520 "releaseConfigId" => Ok(__FieldTag::__release_config_id),
15521 "release_config_id" => Ok(__FieldTag::__release_config_id),
15522 _ => Ok(__FieldTag::Unknown(value.to_string())),
15523 }
15524 }
15525 }
15526 deserializer.deserialize_identifier(Visitor)
15527 }
15528 }
15529 struct Visitor;
15530 impl<'de> serde::de::Visitor<'de> for Visitor {
15531 type Value = CreateReleaseConfigRequest;
15532 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15533 formatter.write_str("struct CreateReleaseConfigRequest")
15534 }
15535 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15536 where
15537 A: serde::de::MapAccess<'de>,
15538 {
15539 #[allow(unused_imports)]
15540 use serde::de::Error;
15541 use std::option::Option::Some;
15542 let mut fields = std::collections::HashSet::new();
15543 let mut result = Self::Value::new();
15544 while let Some(tag) = map.next_key::<__FieldTag>()? {
15545 #[allow(clippy::match_single_binding)]
15546 match tag {
15547 __FieldTag::__parent => {
15548 if !fields.insert(__FieldTag::__parent) {
15549 return std::result::Result::Err(A::Error::duplicate_field(
15550 "multiple values for parent",
15551 ));
15552 }
15553 result.parent = map
15554 .next_value::<std::option::Option<std::string::String>>()?
15555 .unwrap_or_default();
15556 }
15557 __FieldTag::__release_config => {
15558 if !fields.insert(__FieldTag::__release_config) {
15559 return std::result::Result::Err(A::Error::duplicate_field(
15560 "multiple values for release_config",
15561 ));
15562 }
15563 result.release_config = map
15564 .next_value::<std::option::Option<crate::model::ReleaseConfig>>()?;
15565 }
15566 __FieldTag::__release_config_id => {
15567 if !fields.insert(__FieldTag::__release_config_id) {
15568 return std::result::Result::Err(A::Error::duplicate_field(
15569 "multiple values for release_config_id",
15570 ));
15571 }
15572 result.release_config_id = map
15573 .next_value::<std::option::Option<std::string::String>>()?
15574 .unwrap_or_default();
15575 }
15576 __FieldTag::Unknown(key) => {
15577 let value = map.next_value::<serde_json::Value>()?;
15578 result._unknown_fields.insert(key, value);
15579 }
15580 }
15581 }
15582 std::result::Result::Ok(result)
15583 }
15584 }
15585 deserializer.deserialize_any(Visitor)
15586 }
15587}
15588
15589#[doc(hidden)]
15590impl serde::ser::Serialize for CreateReleaseConfigRequest {
15591 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15592 where
15593 S: serde::ser::Serializer,
15594 {
15595 use serde::ser::SerializeMap;
15596 #[allow(unused_imports)]
15597 use std::option::Option::Some;
15598 let mut state = serializer.serialize_map(std::option::Option::None)?;
15599 if !self.parent.is_empty() {
15600 state.serialize_entry("parent", &self.parent)?;
15601 }
15602 if self.release_config.is_some() {
15603 state.serialize_entry("releaseConfig", &self.release_config)?;
15604 }
15605 if !self.release_config_id.is_empty() {
15606 state.serialize_entry("releaseConfigId", &self.release_config_id)?;
15607 }
15608 if !self._unknown_fields.is_empty() {
15609 for (key, value) in self._unknown_fields.iter() {
15610 state.serialize_entry(key, &value)?;
15611 }
15612 }
15613 state.end()
15614 }
15615}
15616
15617impl std::fmt::Debug for CreateReleaseConfigRequest {
15618 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15619 let mut debug_struct = f.debug_struct("CreateReleaseConfigRequest");
15620 debug_struct.field("parent", &self.parent);
15621 debug_struct.field("release_config", &self.release_config);
15622 debug_struct.field("release_config_id", &self.release_config_id);
15623 if !self._unknown_fields.is_empty() {
15624 debug_struct.field("_unknown_fields", &self._unknown_fields);
15625 }
15626 debug_struct.finish()
15627 }
15628}
15629
15630#[derive(Clone, Default, PartialEq)]
15632#[non_exhaustive]
15633pub struct UpdateReleaseConfigRequest {
15634 pub update_mask: std::option::Option<wkt::FieldMask>,
15637
15638 pub release_config: std::option::Option<crate::model::ReleaseConfig>,
15640
15641 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15642}
15643
15644impl UpdateReleaseConfigRequest {
15645 pub fn new() -> Self {
15646 std::default::Default::default()
15647 }
15648
15649 pub fn set_update_mask<T>(mut self, v: T) -> Self
15651 where
15652 T: std::convert::Into<wkt::FieldMask>,
15653 {
15654 self.update_mask = std::option::Option::Some(v.into());
15655 self
15656 }
15657
15658 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15660 where
15661 T: std::convert::Into<wkt::FieldMask>,
15662 {
15663 self.update_mask = v.map(|x| x.into());
15664 self
15665 }
15666
15667 pub fn set_release_config<T>(mut self, v: T) -> Self
15669 where
15670 T: std::convert::Into<crate::model::ReleaseConfig>,
15671 {
15672 self.release_config = std::option::Option::Some(v.into());
15673 self
15674 }
15675
15676 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
15678 where
15679 T: std::convert::Into<crate::model::ReleaseConfig>,
15680 {
15681 self.release_config = v.map(|x| x.into());
15682 self
15683 }
15684}
15685
15686impl wkt::message::Message for UpdateReleaseConfigRequest {
15687 fn typename() -> &'static str {
15688 "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
15689 }
15690}
15691
15692#[doc(hidden)]
15693impl<'de> serde::de::Deserialize<'de> for UpdateReleaseConfigRequest {
15694 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15695 where
15696 D: serde::Deserializer<'de>,
15697 {
15698 #[allow(non_camel_case_types)]
15699 #[doc(hidden)]
15700 #[derive(PartialEq, Eq, Hash)]
15701 enum __FieldTag {
15702 __update_mask,
15703 __release_config,
15704 Unknown(std::string::String),
15705 }
15706 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15707 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15708 where
15709 D: serde::Deserializer<'de>,
15710 {
15711 struct Visitor;
15712 impl<'de> serde::de::Visitor<'de> for Visitor {
15713 type Value = __FieldTag;
15714 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15715 formatter.write_str("a field name for UpdateReleaseConfigRequest")
15716 }
15717 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15718 where
15719 E: serde::de::Error,
15720 {
15721 use std::result::Result::Ok;
15722 use std::string::ToString;
15723 match value {
15724 "updateMask" => Ok(__FieldTag::__update_mask),
15725 "update_mask" => Ok(__FieldTag::__update_mask),
15726 "releaseConfig" => Ok(__FieldTag::__release_config),
15727 "release_config" => Ok(__FieldTag::__release_config),
15728 _ => Ok(__FieldTag::Unknown(value.to_string())),
15729 }
15730 }
15731 }
15732 deserializer.deserialize_identifier(Visitor)
15733 }
15734 }
15735 struct Visitor;
15736 impl<'de> serde::de::Visitor<'de> for Visitor {
15737 type Value = UpdateReleaseConfigRequest;
15738 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15739 formatter.write_str("struct UpdateReleaseConfigRequest")
15740 }
15741 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15742 where
15743 A: serde::de::MapAccess<'de>,
15744 {
15745 #[allow(unused_imports)]
15746 use serde::de::Error;
15747 use std::option::Option::Some;
15748 let mut fields = std::collections::HashSet::new();
15749 let mut result = Self::Value::new();
15750 while let Some(tag) = map.next_key::<__FieldTag>()? {
15751 #[allow(clippy::match_single_binding)]
15752 match tag {
15753 __FieldTag::__update_mask => {
15754 if !fields.insert(__FieldTag::__update_mask) {
15755 return std::result::Result::Err(A::Error::duplicate_field(
15756 "multiple values for update_mask",
15757 ));
15758 }
15759 result.update_mask =
15760 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
15761 }
15762 __FieldTag::__release_config => {
15763 if !fields.insert(__FieldTag::__release_config) {
15764 return std::result::Result::Err(A::Error::duplicate_field(
15765 "multiple values for release_config",
15766 ));
15767 }
15768 result.release_config = map
15769 .next_value::<std::option::Option<crate::model::ReleaseConfig>>()?;
15770 }
15771 __FieldTag::Unknown(key) => {
15772 let value = map.next_value::<serde_json::Value>()?;
15773 result._unknown_fields.insert(key, value);
15774 }
15775 }
15776 }
15777 std::result::Result::Ok(result)
15778 }
15779 }
15780 deserializer.deserialize_any(Visitor)
15781 }
15782}
15783
15784#[doc(hidden)]
15785impl serde::ser::Serialize for UpdateReleaseConfigRequest {
15786 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15787 where
15788 S: serde::ser::Serializer,
15789 {
15790 use serde::ser::SerializeMap;
15791 #[allow(unused_imports)]
15792 use std::option::Option::Some;
15793 let mut state = serializer.serialize_map(std::option::Option::None)?;
15794 if self.update_mask.is_some() {
15795 state.serialize_entry("updateMask", &self.update_mask)?;
15796 }
15797 if self.release_config.is_some() {
15798 state.serialize_entry("releaseConfig", &self.release_config)?;
15799 }
15800 if !self._unknown_fields.is_empty() {
15801 for (key, value) in self._unknown_fields.iter() {
15802 state.serialize_entry(key, &value)?;
15803 }
15804 }
15805 state.end()
15806 }
15807}
15808
15809impl std::fmt::Debug for UpdateReleaseConfigRequest {
15810 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15811 let mut debug_struct = f.debug_struct("UpdateReleaseConfigRequest");
15812 debug_struct.field("update_mask", &self.update_mask);
15813 debug_struct.field("release_config", &self.release_config);
15814 if !self._unknown_fields.is_empty() {
15815 debug_struct.field("_unknown_fields", &self._unknown_fields);
15816 }
15817 debug_struct.finish()
15818 }
15819}
15820
15821#[derive(Clone, Default, PartialEq)]
15823#[non_exhaustive]
15824pub struct DeleteReleaseConfigRequest {
15825 pub name: std::string::String,
15827
15828 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15829}
15830
15831impl DeleteReleaseConfigRequest {
15832 pub fn new() -> Self {
15833 std::default::Default::default()
15834 }
15835
15836 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15838 self.name = v.into();
15839 self
15840 }
15841}
15842
15843impl wkt::message::Message for DeleteReleaseConfigRequest {
15844 fn typename() -> &'static str {
15845 "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
15846 }
15847}
15848
15849#[doc(hidden)]
15850impl<'de> serde::de::Deserialize<'de> for DeleteReleaseConfigRequest {
15851 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15852 where
15853 D: serde::Deserializer<'de>,
15854 {
15855 #[allow(non_camel_case_types)]
15856 #[doc(hidden)]
15857 #[derive(PartialEq, Eq, Hash)]
15858 enum __FieldTag {
15859 __name,
15860 Unknown(std::string::String),
15861 }
15862 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
15863 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15864 where
15865 D: serde::Deserializer<'de>,
15866 {
15867 struct Visitor;
15868 impl<'de> serde::de::Visitor<'de> for Visitor {
15869 type Value = __FieldTag;
15870 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15871 formatter.write_str("a field name for DeleteReleaseConfigRequest")
15872 }
15873 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
15874 where
15875 E: serde::de::Error,
15876 {
15877 use std::result::Result::Ok;
15878 use std::string::ToString;
15879 match value {
15880 "name" => Ok(__FieldTag::__name),
15881 _ => Ok(__FieldTag::Unknown(value.to_string())),
15882 }
15883 }
15884 }
15885 deserializer.deserialize_identifier(Visitor)
15886 }
15887 }
15888 struct Visitor;
15889 impl<'de> serde::de::Visitor<'de> for Visitor {
15890 type Value = DeleteReleaseConfigRequest;
15891 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
15892 formatter.write_str("struct DeleteReleaseConfigRequest")
15893 }
15894 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
15895 where
15896 A: serde::de::MapAccess<'de>,
15897 {
15898 #[allow(unused_imports)]
15899 use serde::de::Error;
15900 use std::option::Option::Some;
15901 let mut fields = std::collections::HashSet::new();
15902 let mut result = Self::Value::new();
15903 while let Some(tag) = map.next_key::<__FieldTag>()? {
15904 #[allow(clippy::match_single_binding)]
15905 match tag {
15906 __FieldTag::__name => {
15907 if !fields.insert(__FieldTag::__name) {
15908 return std::result::Result::Err(A::Error::duplicate_field(
15909 "multiple values for name",
15910 ));
15911 }
15912 result.name = map
15913 .next_value::<std::option::Option<std::string::String>>()?
15914 .unwrap_or_default();
15915 }
15916 __FieldTag::Unknown(key) => {
15917 let value = map.next_value::<serde_json::Value>()?;
15918 result._unknown_fields.insert(key, value);
15919 }
15920 }
15921 }
15922 std::result::Result::Ok(result)
15923 }
15924 }
15925 deserializer.deserialize_any(Visitor)
15926 }
15927}
15928
15929#[doc(hidden)]
15930impl serde::ser::Serialize for DeleteReleaseConfigRequest {
15931 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15932 where
15933 S: serde::ser::Serializer,
15934 {
15935 use serde::ser::SerializeMap;
15936 #[allow(unused_imports)]
15937 use std::option::Option::Some;
15938 let mut state = serializer.serialize_map(std::option::Option::None)?;
15939 if !self.name.is_empty() {
15940 state.serialize_entry("name", &self.name)?;
15941 }
15942 if !self._unknown_fields.is_empty() {
15943 for (key, value) in self._unknown_fields.iter() {
15944 state.serialize_entry(key, &value)?;
15945 }
15946 }
15947 state.end()
15948 }
15949}
15950
15951impl std::fmt::Debug for DeleteReleaseConfigRequest {
15952 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15953 let mut debug_struct = f.debug_struct("DeleteReleaseConfigRequest");
15954 debug_struct.field("name", &self.name);
15955 if !self._unknown_fields.is_empty() {
15956 debug_struct.field("_unknown_fields", &self._unknown_fields);
15957 }
15958 debug_struct.finish()
15959 }
15960}
15961
15962#[derive(Clone, Default, PartialEq)]
15964#[non_exhaustive]
15965pub struct CompilationResult {
15966 pub name: std::string::String,
15968
15969 pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
15972
15973 pub resolved_git_commit_sha: std::string::String,
15976
15977 pub dataform_core_version: std::string::String,
15979
15980 pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
15982
15983 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
15985
15986 pub create_time: std::option::Option<wkt::Timestamp>,
15988
15989 pub internal_metadata: std::option::Option<std::string::String>,
15993
15994 pub source: std::option::Option<crate::model::compilation_result::Source>,
15996
15997 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15998}
15999
16000impl CompilationResult {
16001 pub fn new() -> Self {
16002 std::default::Default::default()
16003 }
16004
16005 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16007 self.name = v.into();
16008 self
16009 }
16010
16011 pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
16013 where
16014 T: std::convert::Into<crate::model::CodeCompilationConfig>,
16015 {
16016 self.code_compilation_config = std::option::Option::Some(v.into());
16017 self
16018 }
16019
16020 pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
16022 where
16023 T: std::convert::Into<crate::model::CodeCompilationConfig>,
16024 {
16025 self.code_compilation_config = v.map(|x| x.into());
16026 self
16027 }
16028
16029 pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
16031 mut self,
16032 v: T,
16033 ) -> Self {
16034 self.resolved_git_commit_sha = v.into();
16035 self
16036 }
16037
16038 pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
16040 mut self,
16041 v: T,
16042 ) -> Self {
16043 self.dataform_core_version = v.into();
16044 self
16045 }
16046
16047 pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
16049 where
16050 T: std::iter::IntoIterator<Item = V>,
16051 V: std::convert::Into<crate::model::compilation_result::CompilationError>,
16052 {
16053 use std::iter::Iterator;
16054 self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
16055 self
16056 }
16057
16058 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
16060 where
16061 T: std::convert::Into<crate::model::DataEncryptionState>,
16062 {
16063 self.data_encryption_state = std::option::Option::Some(v.into());
16064 self
16065 }
16066
16067 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
16069 where
16070 T: std::convert::Into<crate::model::DataEncryptionState>,
16071 {
16072 self.data_encryption_state = v.map(|x| x.into());
16073 self
16074 }
16075
16076 pub fn set_create_time<T>(mut self, v: T) -> Self
16078 where
16079 T: std::convert::Into<wkt::Timestamp>,
16080 {
16081 self.create_time = std::option::Option::Some(v.into());
16082 self
16083 }
16084
16085 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16087 where
16088 T: std::convert::Into<wkt::Timestamp>,
16089 {
16090 self.create_time = v.map(|x| x.into());
16091 self
16092 }
16093
16094 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
16096 where
16097 T: std::convert::Into<std::string::String>,
16098 {
16099 self.internal_metadata = std::option::Option::Some(v.into());
16100 self
16101 }
16102
16103 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16105 where
16106 T: std::convert::Into<std::string::String>,
16107 {
16108 self.internal_metadata = v.map(|x| x.into());
16109 self
16110 }
16111
16112 pub fn set_source<
16117 T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
16118 >(
16119 mut self,
16120 v: T,
16121 ) -> Self {
16122 self.source = v.into();
16123 self
16124 }
16125
16126 pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
16130 #[allow(unreachable_patterns)]
16131 self.source.as_ref().and_then(|v| match v {
16132 crate::model::compilation_result::Source::GitCommitish(v) => {
16133 std::option::Option::Some(v)
16134 }
16135 _ => std::option::Option::None,
16136 })
16137 }
16138
16139 pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16145 self.source = std::option::Option::Some(
16146 crate::model::compilation_result::Source::GitCommitish(v.into()),
16147 );
16148 self
16149 }
16150
16151 pub fn workspace(&self) -> std::option::Option<&std::string::String> {
16155 #[allow(unreachable_patterns)]
16156 self.source.as_ref().and_then(|v| match v {
16157 crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
16158 _ => std::option::Option::None,
16159 })
16160 }
16161
16162 pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16168 self.source = std::option::Option::Some(
16169 crate::model::compilation_result::Source::Workspace(v.into()),
16170 );
16171 self
16172 }
16173
16174 pub fn release_config(&self) -> std::option::Option<&std::string::String> {
16178 #[allow(unreachable_patterns)]
16179 self.source.as_ref().and_then(|v| match v {
16180 crate::model::compilation_result::Source::ReleaseConfig(v) => {
16181 std::option::Option::Some(v)
16182 }
16183 _ => std::option::Option::None,
16184 })
16185 }
16186
16187 pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16193 self.source = std::option::Option::Some(
16194 crate::model::compilation_result::Source::ReleaseConfig(v.into()),
16195 );
16196 self
16197 }
16198}
16199
16200impl wkt::message::Message for CompilationResult {
16201 fn typename() -> &'static str {
16202 "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
16203 }
16204}
16205
16206#[doc(hidden)]
16207impl<'de> serde::de::Deserialize<'de> for CompilationResult {
16208 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16209 where
16210 D: serde::Deserializer<'de>,
16211 {
16212 #[allow(non_camel_case_types)]
16213 #[doc(hidden)]
16214 #[derive(PartialEq, Eq, Hash)]
16215 enum __FieldTag {
16216 __git_commitish,
16217 __workspace,
16218 __release_config,
16219 __name,
16220 __code_compilation_config,
16221 __resolved_git_commit_sha,
16222 __dataform_core_version,
16223 __compilation_errors,
16224 __data_encryption_state,
16225 __create_time,
16226 __internal_metadata,
16227 Unknown(std::string::String),
16228 }
16229 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
16230 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16231 where
16232 D: serde::Deserializer<'de>,
16233 {
16234 struct Visitor;
16235 impl<'de> serde::de::Visitor<'de> for Visitor {
16236 type Value = __FieldTag;
16237 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16238 formatter.write_str("a field name for CompilationResult")
16239 }
16240 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
16241 where
16242 E: serde::de::Error,
16243 {
16244 use std::result::Result::Ok;
16245 use std::string::ToString;
16246 match value {
16247 "gitCommitish" => Ok(__FieldTag::__git_commitish),
16248 "git_commitish" => Ok(__FieldTag::__git_commitish),
16249 "workspace" => Ok(__FieldTag::__workspace),
16250 "releaseConfig" => Ok(__FieldTag::__release_config),
16251 "release_config" => Ok(__FieldTag::__release_config),
16252 "name" => Ok(__FieldTag::__name),
16253 "codeCompilationConfig" => Ok(__FieldTag::__code_compilation_config),
16254 "code_compilation_config" => Ok(__FieldTag::__code_compilation_config),
16255 "resolvedGitCommitSha" => Ok(__FieldTag::__resolved_git_commit_sha),
16256 "resolved_git_commit_sha" => Ok(__FieldTag::__resolved_git_commit_sha),
16257 "dataformCoreVersion" => Ok(__FieldTag::__dataform_core_version),
16258 "dataform_core_version" => Ok(__FieldTag::__dataform_core_version),
16259 "compilationErrors" => Ok(__FieldTag::__compilation_errors),
16260 "compilation_errors" => Ok(__FieldTag::__compilation_errors),
16261 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
16262 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
16263 "createTime" => Ok(__FieldTag::__create_time),
16264 "create_time" => Ok(__FieldTag::__create_time),
16265 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
16266 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
16267 _ => Ok(__FieldTag::Unknown(value.to_string())),
16268 }
16269 }
16270 }
16271 deserializer.deserialize_identifier(Visitor)
16272 }
16273 }
16274 struct Visitor;
16275 impl<'de> serde::de::Visitor<'de> for Visitor {
16276 type Value = CompilationResult;
16277 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16278 formatter.write_str("struct CompilationResult")
16279 }
16280 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
16281 where
16282 A: serde::de::MapAccess<'de>,
16283 {
16284 #[allow(unused_imports)]
16285 use serde::de::Error;
16286 use std::option::Option::Some;
16287 let mut fields = std::collections::HashSet::new();
16288 let mut result = Self::Value::new();
16289 while let Some(tag) = map.next_key::<__FieldTag>()? {
16290 #[allow(clippy::match_single_binding)]
16291 match tag {
16292 __FieldTag::__git_commitish => {
16293 if !fields.insert(__FieldTag::__git_commitish) {
16294 return std::result::Result::Err(A::Error::duplicate_field(
16295 "multiple values for git_commitish",
16296 ));
16297 }
16298 if result.source.is_some() {
16299 return std::result::Result::Err(A::Error::duplicate_field(
16300 "multiple values for `source`, a oneof with full ID .google.cloud.dataform.v1.CompilationResult.git_commitish, latest field was gitCommitish",
16301 ));
16302 }
16303 result.source = std::option::Option::Some(
16304 crate::model::compilation_result::Source::GitCommitish(
16305 map.next_value::<std::option::Option<std::string::String>>()?
16306 .unwrap_or_default(),
16307 ),
16308 );
16309 }
16310 __FieldTag::__workspace => {
16311 if !fields.insert(__FieldTag::__workspace) {
16312 return std::result::Result::Err(A::Error::duplicate_field(
16313 "multiple values for workspace",
16314 ));
16315 }
16316 if result.source.is_some() {
16317 return std::result::Result::Err(A::Error::duplicate_field(
16318 "multiple values for `source`, a oneof with full ID .google.cloud.dataform.v1.CompilationResult.workspace, latest field was workspace",
16319 ));
16320 }
16321 result.source = std::option::Option::Some(
16322 crate::model::compilation_result::Source::Workspace(
16323 map.next_value::<std::option::Option<std::string::String>>()?
16324 .unwrap_or_default(),
16325 ),
16326 );
16327 }
16328 __FieldTag::__release_config => {
16329 if !fields.insert(__FieldTag::__release_config) {
16330 return std::result::Result::Err(A::Error::duplicate_field(
16331 "multiple values for release_config",
16332 ));
16333 }
16334 if result.source.is_some() {
16335 return std::result::Result::Err(A::Error::duplicate_field(
16336 "multiple values for `source`, a oneof with full ID .google.cloud.dataform.v1.CompilationResult.release_config, latest field was releaseConfig",
16337 ));
16338 }
16339 result.source = std::option::Option::Some(
16340 crate::model::compilation_result::Source::ReleaseConfig(
16341 map.next_value::<std::option::Option<std::string::String>>()?
16342 .unwrap_or_default(),
16343 ),
16344 );
16345 }
16346 __FieldTag::__name => {
16347 if !fields.insert(__FieldTag::__name) {
16348 return std::result::Result::Err(A::Error::duplicate_field(
16349 "multiple values for name",
16350 ));
16351 }
16352 result.name = map
16353 .next_value::<std::option::Option<std::string::String>>()?
16354 .unwrap_or_default();
16355 }
16356 __FieldTag::__code_compilation_config => {
16357 if !fields.insert(__FieldTag::__code_compilation_config) {
16358 return std::result::Result::Err(A::Error::duplicate_field(
16359 "multiple values for code_compilation_config",
16360 ));
16361 }
16362 result.code_compilation_config = map.next_value::<std::option::Option<crate::model::CodeCompilationConfig>>()?
16363 ;
16364 }
16365 __FieldTag::__resolved_git_commit_sha => {
16366 if !fields.insert(__FieldTag::__resolved_git_commit_sha) {
16367 return std::result::Result::Err(A::Error::duplicate_field(
16368 "multiple values for resolved_git_commit_sha",
16369 ));
16370 }
16371 result.resolved_git_commit_sha = map
16372 .next_value::<std::option::Option<std::string::String>>()?
16373 .unwrap_or_default();
16374 }
16375 __FieldTag::__dataform_core_version => {
16376 if !fields.insert(__FieldTag::__dataform_core_version) {
16377 return std::result::Result::Err(A::Error::duplicate_field(
16378 "multiple values for dataform_core_version",
16379 ));
16380 }
16381 result.dataform_core_version = map
16382 .next_value::<std::option::Option<std::string::String>>()?
16383 .unwrap_or_default();
16384 }
16385 __FieldTag::__compilation_errors => {
16386 if !fields.insert(__FieldTag::__compilation_errors) {
16387 return std::result::Result::Err(A::Error::duplicate_field(
16388 "multiple values for compilation_errors",
16389 ));
16390 }
16391 result.compilation_errors = map
16392 .next_value::<std::option::Option<
16393 std::vec::Vec<
16394 crate::model::compilation_result::CompilationError,
16395 >,
16396 >>()?
16397 .unwrap_or_default();
16398 }
16399 __FieldTag::__data_encryption_state => {
16400 if !fields.insert(__FieldTag::__data_encryption_state) {
16401 return std::result::Result::Err(A::Error::duplicate_field(
16402 "multiple values for data_encryption_state",
16403 ));
16404 }
16405 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
16406 ;
16407 }
16408 __FieldTag::__create_time => {
16409 if !fields.insert(__FieldTag::__create_time) {
16410 return std::result::Result::Err(A::Error::duplicate_field(
16411 "multiple values for create_time",
16412 ));
16413 }
16414 result.create_time =
16415 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
16416 }
16417 __FieldTag::__internal_metadata => {
16418 if !fields.insert(__FieldTag::__internal_metadata) {
16419 return std::result::Result::Err(A::Error::duplicate_field(
16420 "multiple values for internal_metadata",
16421 ));
16422 }
16423 result.internal_metadata =
16424 map.next_value::<std::option::Option<std::string::String>>()?;
16425 }
16426 __FieldTag::Unknown(key) => {
16427 let value = map.next_value::<serde_json::Value>()?;
16428 result._unknown_fields.insert(key, value);
16429 }
16430 }
16431 }
16432 std::result::Result::Ok(result)
16433 }
16434 }
16435 deserializer.deserialize_any(Visitor)
16436 }
16437}
16438
16439#[doc(hidden)]
16440impl serde::ser::Serialize for CompilationResult {
16441 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16442 where
16443 S: serde::ser::Serializer,
16444 {
16445 use serde::ser::SerializeMap;
16446 #[allow(unused_imports)]
16447 use std::option::Option::Some;
16448 let mut state = serializer.serialize_map(std::option::Option::None)?;
16449 if let Some(value) = self.git_commitish() {
16450 state.serialize_entry("gitCommitish", value)?;
16451 }
16452 if let Some(value) = self.workspace() {
16453 state.serialize_entry("workspace", value)?;
16454 }
16455 if let Some(value) = self.release_config() {
16456 state.serialize_entry("releaseConfig", value)?;
16457 }
16458 if !self.name.is_empty() {
16459 state.serialize_entry("name", &self.name)?;
16460 }
16461 if self.code_compilation_config.is_some() {
16462 state.serialize_entry("codeCompilationConfig", &self.code_compilation_config)?;
16463 }
16464 if !self.resolved_git_commit_sha.is_empty() {
16465 state.serialize_entry("resolvedGitCommitSha", &self.resolved_git_commit_sha)?;
16466 }
16467 if !self.dataform_core_version.is_empty() {
16468 state.serialize_entry("dataformCoreVersion", &self.dataform_core_version)?;
16469 }
16470 if !self.compilation_errors.is_empty() {
16471 state.serialize_entry("compilationErrors", &self.compilation_errors)?;
16472 }
16473 if self.data_encryption_state.is_some() {
16474 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
16475 }
16476 if self.create_time.is_some() {
16477 state.serialize_entry("createTime", &self.create_time)?;
16478 }
16479 if self.internal_metadata.is_some() {
16480 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
16481 }
16482 if !self._unknown_fields.is_empty() {
16483 for (key, value) in self._unknown_fields.iter() {
16484 state.serialize_entry(key, &value)?;
16485 }
16486 }
16487 state.end()
16488 }
16489}
16490
16491impl std::fmt::Debug for CompilationResult {
16492 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16493 let mut debug_struct = f.debug_struct("CompilationResult");
16494 debug_struct.field("name", &self.name);
16495 debug_struct.field("code_compilation_config", &self.code_compilation_config);
16496 debug_struct.field("resolved_git_commit_sha", &self.resolved_git_commit_sha);
16497 debug_struct.field("dataform_core_version", &self.dataform_core_version);
16498 debug_struct.field("compilation_errors", &self.compilation_errors);
16499 debug_struct.field("data_encryption_state", &self.data_encryption_state);
16500 debug_struct.field("create_time", &self.create_time);
16501 debug_struct.field("internal_metadata", &self.internal_metadata);
16502 debug_struct.field("source", &self.source);
16503 if !self._unknown_fields.is_empty() {
16504 debug_struct.field("_unknown_fields", &self._unknown_fields);
16505 }
16506 debug_struct.finish()
16507 }
16508}
16509
16510pub mod compilation_result {
16512 #[allow(unused_imports)]
16513 use super::*;
16514
16515 #[derive(Clone, Default, PartialEq)]
16517 #[non_exhaustive]
16518 pub struct CompilationError {
16519 pub message: std::string::String,
16521
16522 pub stack: std::string::String,
16524
16525 pub path: std::string::String,
16528
16529 pub action_target: std::option::Option<crate::model::Target>,
16532
16533 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16534 }
16535
16536 impl CompilationError {
16537 pub fn new() -> Self {
16538 std::default::Default::default()
16539 }
16540
16541 pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16543 self.message = v.into();
16544 self
16545 }
16546
16547 pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16549 self.stack = v.into();
16550 self
16551 }
16552
16553 pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16555 self.path = v.into();
16556 self
16557 }
16558
16559 pub fn set_action_target<T>(mut self, v: T) -> Self
16561 where
16562 T: std::convert::Into<crate::model::Target>,
16563 {
16564 self.action_target = std::option::Option::Some(v.into());
16565 self
16566 }
16567
16568 pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
16570 where
16571 T: std::convert::Into<crate::model::Target>,
16572 {
16573 self.action_target = v.map(|x| x.into());
16574 self
16575 }
16576 }
16577
16578 impl wkt::message::Message for CompilationError {
16579 fn typename() -> &'static str {
16580 "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
16581 }
16582 }
16583
16584 #[doc(hidden)]
16585 impl<'de> serde::de::Deserialize<'de> for CompilationError {
16586 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16587 where
16588 D: serde::Deserializer<'de>,
16589 {
16590 #[allow(non_camel_case_types)]
16591 #[doc(hidden)]
16592 #[derive(PartialEq, Eq, Hash)]
16593 enum __FieldTag {
16594 __message,
16595 __stack,
16596 __path,
16597 __action_target,
16598 Unknown(std::string::String),
16599 }
16600 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
16601 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16602 where
16603 D: serde::Deserializer<'de>,
16604 {
16605 struct Visitor;
16606 impl<'de> serde::de::Visitor<'de> for Visitor {
16607 type Value = __FieldTag;
16608 fn expecting(
16609 &self,
16610 formatter: &mut std::fmt::Formatter,
16611 ) -> std::fmt::Result {
16612 formatter.write_str("a field name for CompilationError")
16613 }
16614 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
16615 where
16616 E: serde::de::Error,
16617 {
16618 use std::result::Result::Ok;
16619 use std::string::ToString;
16620 match value {
16621 "message" => Ok(__FieldTag::__message),
16622 "stack" => Ok(__FieldTag::__stack),
16623 "path" => Ok(__FieldTag::__path),
16624 "actionTarget" => Ok(__FieldTag::__action_target),
16625 "action_target" => Ok(__FieldTag::__action_target),
16626 _ => Ok(__FieldTag::Unknown(value.to_string())),
16627 }
16628 }
16629 }
16630 deserializer.deserialize_identifier(Visitor)
16631 }
16632 }
16633 struct Visitor;
16634 impl<'de> serde::de::Visitor<'de> for Visitor {
16635 type Value = CompilationError;
16636 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16637 formatter.write_str("struct CompilationError")
16638 }
16639 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
16640 where
16641 A: serde::de::MapAccess<'de>,
16642 {
16643 #[allow(unused_imports)]
16644 use serde::de::Error;
16645 use std::option::Option::Some;
16646 let mut fields = std::collections::HashSet::new();
16647 let mut result = Self::Value::new();
16648 while let Some(tag) = map.next_key::<__FieldTag>()? {
16649 #[allow(clippy::match_single_binding)]
16650 match tag {
16651 __FieldTag::__message => {
16652 if !fields.insert(__FieldTag::__message) {
16653 return std::result::Result::Err(A::Error::duplicate_field(
16654 "multiple values for message",
16655 ));
16656 }
16657 result.message = map
16658 .next_value::<std::option::Option<std::string::String>>()?
16659 .unwrap_or_default();
16660 }
16661 __FieldTag::__stack => {
16662 if !fields.insert(__FieldTag::__stack) {
16663 return std::result::Result::Err(A::Error::duplicate_field(
16664 "multiple values for stack",
16665 ));
16666 }
16667 result.stack = map
16668 .next_value::<std::option::Option<std::string::String>>()?
16669 .unwrap_or_default();
16670 }
16671 __FieldTag::__path => {
16672 if !fields.insert(__FieldTag::__path) {
16673 return std::result::Result::Err(A::Error::duplicate_field(
16674 "multiple values for path",
16675 ));
16676 }
16677 result.path = map
16678 .next_value::<std::option::Option<std::string::String>>()?
16679 .unwrap_or_default();
16680 }
16681 __FieldTag::__action_target => {
16682 if !fields.insert(__FieldTag::__action_target) {
16683 return std::result::Result::Err(A::Error::duplicate_field(
16684 "multiple values for action_target",
16685 ));
16686 }
16687 result.action_target =
16688 map.next_value::<std::option::Option<crate::model::Target>>()?;
16689 }
16690 __FieldTag::Unknown(key) => {
16691 let value = map.next_value::<serde_json::Value>()?;
16692 result._unknown_fields.insert(key, value);
16693 }
16694 }
16695 }
16696 std::result::Result::Ok(result)
16697 }
16698 }
16699 deserializer.deserialize_any(Visitor)
16700 }
16701 }
16702
16703 #[doc(hidden)]
16704 impl serde::ser::Serialize for CompilationError {
16705 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16706 where
16707 S: serde::ser::Serializer,
16708 {
16709 use serde::ser::SerializeMap;
16710 #[allow(unused_imports)]
16711 use std::option::Option::Some;
16712 let mut state = serializer.serialize_map(std::option::Option::None)?;
16713 if !self.message.is_empty() {
16714 state.serialize_entry("message", &self.message)?;
16715 }
16716 if !self.stack.is_empty() {
16717 state.serialize_entry("stack", &self.stack)?;
16718 }
16719 if !self.path.is_empty() {
16720 state.serialize_entry("path", &self.path)?;
16721 }
16722 if self.action_target.is_some() {
16723 state.serialize_entry("actionTarget", &self.action_target)?;
16724 }
16725 if !self._unknown_fields.is_empty() {
16726 for (key, value) in self._unknown_fields.iter() {
16727 state.serialize_entry(key, &value)?;
16728 }
16729 }
16730 state.end()
16731 }
16732 }
16733
16734 impl std::fmt::Debug for CompilationError {
16735 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16736 let mut debug_struct = f.debug_struct("CompilationError");
16737 debug_struct.field("message", &self.message);
16738 debug_struct.field("stack", &self.stack);
16739 debug_struct.field("path", &self.path);
16740 debug_struct.field("action_target", &self.action_target);
16741 if !self._unknown_fields.is_empty() {
16742 debug_struct.field("_unknown_fields", &self._unknown_fields);
16743 }
16744 debug_struct.finish()
16745 }
16746 }
16747
16748 #[derive(Clone, Debug, PartialEq)]
16750 #[non_exhaustive]
16751 pub enum Source {
16752 GitCommitish(std::string::String),
16759 Workspace(std::string::String),
16762 ReleaseConfig(std::string::String),
16765 }
16766}
16767
16768#[derive(Clone, Default, PartialEq)]
16770#[non_exhaustive]
16771pub struct CodeCompilationConfig {
16772 pub default_database: std::string::String,
16774
16775 pub default_schema: std::string::String,
16777
16778 pub default_location: std::string::String,
16782
16783 pub assertion_schema: std::string::String,
16785
16786 pub vars: std::collections::HashMap<std::string::String, std::string::String>,
16789
16790 pub database_suffix: std::string::String,
16793
16794 pub schema_suffix: std::string::String,
16797
16798 pub table_prefix: std::string::String,
16800
16801 pub builtin_assertion_name_prefix: std::string::String,
16803
16804 pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
16806
16807 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16808}
16809
16810impl CodeCompilationConfig {
16811 pub fn new() -> Self {
16812 std::default::Default::default()
16813 }
16814
16815 pub fn set_default_database<T: std::convert::Into<std::string::String>>(
16817 mut self,
16818 v: T,
16819 ) -> Self {
16820 self.default_database = v.into();
16821 self
16822 }
16823
16824 pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16826 self.default_schema = v.into();
16827 self
16828 }
16829
16830 pub fn set_default_location<T: std::convert::Into<std::string::String>>(
16832 mut self,
16833 v: T,
16834 ) -> Self {
16835 self.default_location = v.into();
16836 self
16837 }
16838
16839 pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
16841 mut self,
16842 v: T,
16843 ) -> Self {
16844 self.assertion_schema = v.into();
16845 self
16846 }
16847
16848 pub fn set_vars<T, K, V>(mut self, v: T) -> Self
16850 where
16851 T: std::iter::IntoIterator<Item = (K, V)>,
16852 K: std::convert::Into<std::string::String>,
16853 V: std::convert::Into<std::string::String>,
16854 {
16855 use std::iter::Iterator;
16856 self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
16857 self
16858 }
16859
16860 pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16862 self.database_suffix = v.into();
16863 self
16864 }
16865
16866 pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16868 self.schema_suffix = v.into();
16869 self
16870 }
16871
16872 pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16874 self.table_prefix = v.into();
16875 self
16876 }
16877
16878 pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
16880 mut self,
16881 v: T,
16882 ) -> Self {
16883 self.builtin_assertion_name_prefix = v.into();
16884 self
16885 }
16886
16887 pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
16889 where
16890 T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
16891 {
16892 self.default_notebook_runtime_options = std::option::Option::Some(v.into());
16893 self
16894 }
16895
16896 pub fn set_or_clear_default_notebook_runtime_options<T>(
16898 mut self,
16899 v: std::option::Option<T>,
16900 ) -> Self
16901 where
16902 T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
16903 {
16904 self.default_notebook_runtime_options = v.map(|x| x.into());
16905 self
16906 }
16907}
16908
16909impl wkt::message::Message for CodeCompilationConfig {
16910 fn typename() -> &'static str {
16911 "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
16912 }
16913}
16914
16915#[doc(hidden)]
16916impl<'de> serde::de::Deserialize<'de> for CodeCompilationConfig {
16917 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16918 where
16919 D: serde::Deserializer<'de>,
16920 {
16921 #[allow(non_camel_case_types)]
16922 #[doc(hidden)]
16923 #[derive(PartialEq, Eq, Hash)]
16924 enum __FieldTag {
16925 __default_database,
16926 __default_schema,
16927 __default_location,
16928 __assertion_schema,
16929 __vars,
16930 __database_suffix,
16931 __schema_suffix,
16932 __table_prefix,
16933 __builtin_assertion_name_prefix,
16934 __default_notebook_runtime_options,
16935 Unknown(std::string::String),
16936 }
16937 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
16938 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16939 where
16940 D: serde::Deserializer<'de>,
16941 {
16942 struct Visitor;
16943 impl<'de> serde::de::Visitor<'de> for Visitor {
16944 type Value = __FieldTag;
16945 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16946 formatter.write_str("a field name for CodeCompilationConfig")
16947 }
16948 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
16949 where
16950 E: serde::de::Error,
16951 {
16952 use std::result::Result::Ok;
16953 use std::string::ToString;
16954 match value {
16955 "defaultDatabase" => Ok(__FieldTag::__default_database),
16956 "default_database" => Ok(__FieldTag::__default_database),
16957 "defaultSchema" => Ok(__FieldTag::__default_schema),
16958 "default_schema" => Ok(__FieldTag::__default_schema),
16959 "defaultLocation" => Ok(__FieldTag::__default_location),
16960 "default_location" => Ok(__FieldTag::__default_location),
16961 "assertionSchema" => Ok(__FieldTag::__assertion_schema),
16962 "assertion_schema" => Ok(__FieldTag::__assertion_schema),
16963 "vars" => Ok(__FieldTag::__vars),
16964 "databaseSuffix" => Ok(__FieldTag::__database_suffix),
16965 "database_suffix" => Ok(__FieldTag::__database_suffix),
16966 "schemaSuffix" => Ok(__FieldTag::__schema_suffix),
16967 "schema_suffix" => Ok(__FieldTag::__schema_suffix),
16968 "tablePrefix" => Ok(__FieldTag::__table_prefix),
16969 "table_prefix" => Ok(__FieldTag::__table_prefix),
16970 "builtinAssertionNamePrefix" => {
16971 Ok(__FieldTag::__builtin_assertion_name_prefix)
16972 }
16973 "builtin_assertion_name_prefix" => {
16974 Ok(__FieldTag::__builtin_assertion_name_prefix)
16975 }
16976 "defaultNotebookRuntimeOptions" => {
16977 Ok(__FieldTag::__default_notebook_runtime_options)
16978 }
16979 "default_notebook_runtime_options" => {
16980 Ok(__FieldTag::__default_notebook_runtime_options)
16981 }
16982 _ => Ok(__FieldTag::Unknown(value.to_string())),
16983 }
16984 }
16985 }
16986 deserializer.deserialize_identifier(Visitor)
16987 }
16988 }
16989 struct Visitor;
16990 impl<'de> serde::de::Visitor<'de> for Visitor {
16991 type Value = CodeCompilationConfig;
16992 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
16993 formatter.write_str("struct CodeCompilationConfig")
16994 }
16995 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
16996 where
16997 A: serde::de::MapAccess<'de>,
16998 {
16999 #[allow(unused_imports)]
17000 use serde::de::Error;
17001 use std::option::Option::Some;
17002 let mut fields = std::collections::HashSet::new();
17003 let mut result = Self::Value::new();
17004 while let Some(tag) = map.next_key::<__FieldTag>()? {
17005 #[allow(clippy::match_single_binding)]
17006 match tag {
17007 __FieldTag::__default_database => {
17008 if !fields.insert(__FieldTag::__default_database) {
17009 return std::result::Result::Err(A::Error::duplicate_field(
17010 "multiple values for default_database",
17011 ));
17012 }
17013 result.default_database = map
17014 .next_value::<std::option::Option<std::string::String>>()?
17015 .unwrap_or_default();
17016 }
17017 __FieldTag::__default_schema => {
17018 if !fields.insert(__FieldTag::__default_schema) {
17019 return std::result::Result::Err(A::Error::duplicate_field(
17020 "multiple values for default_schema",
17021 ));
17022 }
17023 result.default_schema = map
17024 .next_value::<std::option::Option<std::string::String>>()?
17025 .unwrap_or_default();
17026 }
17027 __FieldTag::__default_location => {
17028 if !fields.insert(__FieldTag::__default_location) {
17029 return std::result::Result::Err(A::Error::duplicate_field(
17030 "multiple values for default_location",
17031 ));
17032 }
17033 result.default_location = map
17034 .next_value::<std::option::Option<std::string::String>>()?
17035 .unwrap_or_default();
17036 }
17037 __FieldTag::__assertion_schema => {
17038 if !fields.insert(__FieldTag::__assertion_schema) {
17039 return std::result::Result::Err(A::Error::duplicate_field(
17040 "multiple values for assertion_schema",
17041 ));
17042 }
17043 result.assertion_schema = map
17044 .next_value::<std::option::Option<std::string::String>>()?
17045 .unwrap_or_default();
17046 }
17047 __FieldTag::__vars => {
17048 if !fields.insert(__FieldTag::__vars) {
17049 return std::result::Result::Err(A::Error::duplicate_field(
17050 "multiple values for vars",
17051 ));
17052 }
17053 result.vars = map
17054 .next_value::<std::option::Option<
17055 std::collections::HashMap<
17056 std::string::String,
17057 std::string::String,
17058 >,
17059 >>()?
17060 .unwrap_or_default();
17061 }
17062 __FieldTag::__database_suffix => {
17063 if !fields.insert(__FieldTag::__database_suffix) {
17064 return std::result::Result::Err(A::Error::duplicate_field(
17065 "multiple values for database_suffix",
17066 ));
17067 }
17068 result.database_suffix = map
17069 .next_value::<std::option::Option<std::string::String>>()?
17070 .unwrap_or_default();
17071 }
17072 __FieldTag::__schema_suffix => {
17073 if !fields.insert(__FieldTag::__schema_suffix) {
17074 return std::result::Result::Err(A::Error::duplicate_field(
17075 "multiple values for schema_suffix",
17076 ));
17077 }
17078 result.schema_suffix = map
17079 .next_value::<std::option::Option<std::string::String>>()?
17080 .unwrap_or_default();
17081 }
17082 __FieldTag::__table_prefix => {
17083 if !fields.insert(__FieldTag::__table_prefix) {
17084 return std::result::Result::Err(A::Error::duplicate_field(
17085 "multiple values for table_prefix",
17086 ));
17087 }
17088 result.table_prefix = map
17089 .next_value::<std::option::Option<std::string::String>>()?
17090 .unwrap_or_default();
17091 }
17092 __FieldTag::__builtin_assertion_name_prefix => {
17093 if !fields.insert(__FieldTag::__builtin_assertion_name_prefix) {
17094 return std::result::Result::Err(A::Error::duplicate_field(
17095 "multiple values for builtin_assertion_name_prefix",
17096 ));
17097 }
17098 result.builtin_assertion_name_prefix = map
17099 .next_value::<std::option::Option<std::string::String>>()?
17100 .unwrap_or_default();
17101 }
17102 __FieldTag::__default_notebook_runtime_options => {
17103 if !fields.insert(__FieldTag::__default_notebook_runtime_options) {
17104 return std::result::Result::Err(A::Error::duplicate_field(
17105 "multiple values for default_notebook_runtime_options",
17106 ));
17107 }
17108 result.default_notebook_runtime_options = map.next_value::<std::option::Option<crate::model::NotebookRuntimeOptions>>()?
17109 ;
17110 }
17111 __FieldTag::Unknown(key) => {
17112 let value = map.next_value::<serde_json::Value>()?;
17113 result._unknown_fields.insert(key, value);
17114 }
17115 }
17116 }
17117 std::result::Result::Ok(result)
17118 }
17119 }
17120 deserializer.deserialize_any(Visitor)
17121 }
17122}
17123
17124#[doc(hidden)]
17125impl serde::ser::Serialize for CodeCompilationConfig {
17126 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17127 where
17128 S: serde::ser::Serializer,
17129 {
17130 use serde::ser::SerializeMap;
17131 #[allow(unused_imports)]
17132 use std::option::Option::Some;
17133 let mut state = serializer.serialize_map(std::option::Option::None)?;
17134 if !self.default_database.is_empty() {
17135 state.serialize_entry("defaultDatabase", &self.default_database)?;
17136 }
17137 if !self.default_schema.is_empty() {
17138 state.serialize_entry("defaultSchema", &self.default_schema)?;
17139 }
17140 if !self.default_location.is_empty() {
17141 state.serialize_entry("defaultLocation", &self.default_location)?;
17142 }
17143 if !self.assertion_schema.is_empty() {
17144 state.serialize_entry("assertionSchema", &self.assertion_schema)?;
17145 }
17146 if !self.vars.is_empty() {
17147 state.serialize_entry("vars", &self.vars)?;
17148 }
17149 if !self.database_suffix.is_empty() {
17150 state.serialize_entry("databaseSuffix", &self.database_suffix)?;
17151 }
17152 if !self.schema_suffix.is_empty() {
17153 state.serialize_entry("schemaSuffix", &self.schema_suffix)?;
17154 }
17155 if !self.table_prefix.is_empty() {
17156 state.serialize_entry("tablePrefix", &self.table_prefix)?;
17157 }
17158 if !self.builtin_assertion_name_prefix.is_empty() {
17159 state.serialize_entry(
17160 "builtinAssertionNamePrefix",
17161 &self.builtin_assertion_name_prefix,
17162 )?;
17163 }
17164 if self.default_notebook_runtime_options.is_some() {
17165 state.serialize_entry(
17166 "defaultNotebookRuntimeOptions",
17167 &self.default_notebook_runtime_options,
17168 )?;
17169 }
17170 if !self._unknown_fields.is_empty() {
17171 for (key, value) in self._unknown_fields.iter() {
17172 state.serialize_entry(key, &value)?;
17173 }
17174 }
17175 state.end()
17176 }
17177}
17178
17179impl std::fmt::Debug for CodeCompilationConfig {
17180 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17181 let mut debug_struct = f.debug_struct("CodeCompilationConfig");
17182 debug_struct.field("default_database", &self.default_database);
17183 debug_struct.field("default_schema", &self.default_schema);
17184 debug_struct.field("default_location", &self.default_location);
17185 debug_struct.field("assertion_schema", &self.assertion_schema);
17186 debug_struct.field("vars", &self.vars);
17187 debug_struct.field("database_suffix", &self.database_suffix);
17188 debug_struct.field("schema_suffix", &self.schema_suffix);
17189 debug_struct.field("table_prefix", &self.table_prefix);
17190 debug_struct.field(
17191 "builtin_assertion_name_prefix",
17192 &self.builtin_assertion_name_prefix,
17193 );
17194 debug_struct.field(
17195 "default_notebook_runtime_options",
17196 &self.default_notebook_runtime_options,
17197 );
17198 if !self._unknown_fields.is_empty() {
17199 debug_struct.field("_unknown_fields", &self._unknown_fields);
17200 }
17201 debug_struct.finish()
17202 }
17203}
17204
17205#[derive(Clone, Default, PartialEq)]
17207#[non_exhaustive]
17208pub struct NotebookRuntimeOptions {
17209 pub ai_platform_notebook_runtime_template: std::string::String,
17214
17215 pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
17217
17218 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17219}
17220
17221impl NotebookRuntimeOptions {
17222 pub fn new() -> Self {
17223 std::default::Default::default()
17224 }
17225
17226 pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
17228 mut self,
17229 v: T,
17230 ) -> Self {
17231 self.ai_platform_notebook_runtime_template = v.into();
17232 self
17233 }
17234
17235 pub fn set_execution_sink<
17240 T: std::convert::Into<
17241 std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
17242 >,
17243 >(
17244 mut self,
17245 v: T,
17246 ) -> Self {
17247 self.execution_sink = v.into();
17248 self
17249 }
17250
17251 pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
17255 #[allow(unreachable_patterns)]
17256 self.execution_sink.as_ref().and_then(|v| match v {
17257 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
17258 std::option::Option::Some(v)
17259 }
17260 _ => std::option::Option::None,
17261 })
17262 }
17263
17264 pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
17270 mut self,
17271 v: T,
17272 ) -> Self {
17273 self.execution_sink = std::option::Option::Some(
17274 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
17275 );
17276 self
17277 }
17278}
17279
17280impl wkt::message::Message for NotebookRuntimeOptions {
17281 fn typename() -> &'static str {
17282 "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
17283 }
17284}
17285
17286#[doc(hidden)]
17287impl<'de> serde::de::Deserialize<'de> for NotebookRuntimeOptions {
17288 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17289 where
17290 D: serde::Deserializer<'de>,
17291 {
17292 #[allow(non_camel_case_types)]
17293 #[doc(hidden)]
17294 #[derive(PartialEq, Eq, Hash)]
17295 enum __FieldTag {
17296 __gcs_output_bucket,
17297 __ai_platform_notebook_runtime_template,
17298 Unknown(std::string::String),
17299 }
17300 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17301 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17302 where
17303 D: serde::Deserializer<'de>,
17304 {
17305 struct Visitor;
17306 impl<'de> serde::de::Visitor<'de> for Visitor {
17307 type Value = __FieldTag;
17308 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17309 formatter.write_str("a field name for NotebookRuntimeOptions")
17310 }
17311 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17312 where
17313 E: serde::de::Error,
17314 {
17315 use std::result::Result::Ok;
17316 use std::string::ToString;
17317 match value {
17318 "gcsOutputBucket" => Ok(__FieldTag::__gcs_output_bucket),
17319 "gcs_output_bucket" => Ok(__FieldTag::__gcs_output_bucket),
17320 "aiPlatformNotebookRuntimeTemplate" => {
17321 Ok(__FieldTag::__ai_platform_notebook_runtime_template)
17322 }
17323 "ai_platform_notebook_runtime_template" => {
17324 Ok(__FieldTag::__ai_platform_notebook_runtime_template)
17325 }
17326 _ => Ok(__FieldTag::Unknown(value.to_string())),
17327 }
17328 }
17329 }
17330 deserializer.deserialize_identifier(Visitor)
17331 }
17332 }
17333 struct Visitor;
17334 impl<'de> serde::de::Visitor<'de> for Visitor {
17335 type Value = NotebookRuntimeOptions;
17336 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17337 formatter.write_str("struct NotebookRuntimeOptions")
17338 }
17339 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
17340 where
17341 A: serde::de::MapAccess<'de>,
17342 {
17343 #[allow(unused_imports)]
17344 use serde::de::Error;
17345 use std::option::Option::Some;
17346 let mut fields = std::collections::HashSet::new();
17347 let mut result = Self::Value::new();
17348 while let Some(tag) = map.next_key::<__FieldTag>()? {
17349 #[allow(clippy::match_single_binding)]
17350 match tag {
17351 __FieldTag::__gcs_output_bucket => {
17352 if !fields.insert(__FieldTag::__gcs_output_bucket) {
17353 return std::result::Result::Err(A::Error::duplicate_field(
17354 "multiple values for gcs_output_bucket",
17355 ));
17356 }
17357 if result.execution_sink.is_some() {
17358 return std::result::Result::Err(A::Error::duplicate_field(
17359 "multiple values for `execution_sink`, a oneof with full ID .google.cloud.dataform.v1.NotebookRuntimeOptions.gcs_output_bucket, latest field was gcsOutputBucket",
17360 ));
17361 }
17362 result.execution_sink = std::option::Option::Some(
17363 crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(
17364 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
17365 ),
17366 );
17367 }
17368 __FieldTag::__ai_platform_notebook_runtime_template => {
17369 if !fields.insert(__FieldTag::__ai_platform_notebook_runtime_template) {
17370 return std::result::Result::Err(A::Error::duplicate_field(
17371 "multiple values for ai_platform_notebook_runtime_template",
17372 ));
17373 }
17374 result.ai_platform_notebook_runtime_template = map
17375 .next_value::<std::option::Option<std::string::String>>()?
17376 .unwrap_or_default();
17377 }
17378 __FieldTag::Unknown(key) => {
17379 let value = map.next_value::<serde_json::Value>()?;
17380 result._unknown_fields.insert(key, value);
17381 }
17382 }
17383 }
17384 std::result::Result::Ok(result)
17385 }
17386 }
17387 deserializer.deserialize_any(Visitor)
17388 }
17389}
17390
17391#[doc(hidden)]
17392impl serde::ser::Serialize for NotebookRuntimeOptions {
17393 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17394 where
17395 S: serde::ser::Serializer,
17396 {
17397 use serde::ser::SerializeMap;
17398 #[allow(unused_imports)]
17399 use std::option::Option::Some;
17400 let mut state = serializer.serialize_map(std::option::Option::None)?;
17401 if let Some(value) = self.gcs_output_bucket() {
17402 state.serialize_entry("gcsOutputBucket", value)?;
17403 }
17404 if !self.ai_platform_notebook_runtime_template.is_empty() {
17405 state.serialize_entry(
17406 "aiPlatformNotebookRuntimeTemplate",
17407 &self.ai_platform_notebook_runtime_template,
17408 )?;
17409 }
17410 if !self._unknown_fields.is_empty() {
17411 for (key, value) in self._unknown_fields.iter() {
17412 state.serialize_entry(key, &value)?;
17413 }
17414 }
17415 state.end()
17416 }
17417}
17418
17419impl std::fmt::Debug for NotebookRuntimeOptions {
17420 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17421 let mut debug_struct = f.debug_struct("NotebookRuntimeOptions");
17422 debug_struct.field(
17423 "ai_platform_notebook_runtime_template",
17424 &self.ai_platform_notebook_runtime_template,
17425 );
17426 debug_struct.field("execution_sink", &self.execution_sink);
17427 if !self._unknown_fields.is_empty() {
17428 debug_struct.field("_unknown_fields", &self._unknown_fields);
17429 }
17430 debug_struct.finish()
17431 }
17432}
17433
17434pub mod notebook_runtime_options {
17436 #[allow(unused_imports)]
17437 use super::*;
17438
17439 #[derive(Clone, Debug, PartialEq)]
17441 #[non_exhaustive]
17442 pub enum ExecutionSink {
17443 GcsOutputBucket(std::string::String),
17446 }
17447}
17448
17449#[derive(Clone, Default, PartialEq)]
17451#[non_exhaustive]
17452pub struct ListCompilationResultsRequest {
17453 pub parent: std::string::String,
17456
17457 pub page_size: i32,
17461
17462 pub page_token: std::string::String,
17469
17470 pub order_by: std::string::String,
17474
17475 pub filter: std::string::String,
17477
17478 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17479}
17480
17481impl ListCompilationResultsRequest {
17482 pub fn new() -> Self {
17483 std::default::Default::default()
17484 }
17485
17486 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17488 self.parent = v.into();
17489 self
17490 }
17491
17492 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17494 self.page_size = v.into();
17495 self
17496 }
17497
17498 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17500 self.page_token = v.into();
17501 self
17502 }
17503
17504 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17506 self.order_by = v.into();
17507 self
17508 }
17509
17510 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17512 self.filter = v.into();
17513 self
17514 }
17515}
17516
17517impl wkt::message::Message for ListCompilationResultsRequest {
17518 fn typename() -> &'static str {
17519 "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
17520 }
17521}
17522
17523#[doc(hidden)]
17524impl<'de> serde::de::Deserialize<'de> for ListCompilationResultsRequest {
17525 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17526 where
17527 D: serde::Deserializer<'de>,
17528 {
17529 #[allow(non_camel_case_types)]
17530 #[doc(hidden)]
17531 #[derive(PartialEq, Eq, Hash)]
17532 enum __FieldTag {
17533 __parent,
17534 __page_size,
17535 __page_token,
17536 __order_by,
17537 __filter,
17538 Unknown(std::string::String),
17539 }
17540 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17541 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17542 where
17543 D: serde::Deserializer<'de>,
17544 {
17545 struct Visitor;
17546 impl<'de> serde::de::Visitor<'de> for Visitor {
17547 type Value = __FieldTag;
17548 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17549 formatter.write_str("a field name for ListCompilationResultsRequest")
17550 }
17551 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17552 where
17553 E: serde::de::Error,
17554 {
17555 use std::result::Result::Ok;
17556 use std::string::ToString;
17557 match value {
17558 "parent" => Ok(__FieldTag::__parent),
17559 "pageSize" => Ok(__FieldTag::__page_size),
17560 "page_size" => Ok(__FieldTag::__page_size),
17561 "pageToken" => Ok(__FieldTag::__page_token),
17562 "page_token" => Ok(__FieldTag::__page_token),
17563 "orderBy" => Ok(__FieldTag::__order_by),
17564 "order_by" => Ok(__FieldTag::__order_by),
17565 "filter" => Ok(__FieldTag::__filter),
17566 _ => Ok(__FieldTag::Unknown(value.to_string())),
17567 }
17568 }
17569 }
17570 deserializer.deserialize_identifier(Visitor)
17571 }
17572 }
17573 struct Visitor;
17574 impl<'de> serde::de::Visitor<'de> for Visitor {
17575 type Value = ListCompilationResultsRequest;
17576 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17577 formatter.write_str("struct ListCompilationResultsRequest")
17578 }
17579 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
17580 where
17581 A: serde::de::MapAccess<'de>,
17582 {
17583 #[allow(unused_imports)]
17584 use serde::de::Error;
17585 use std::option::Option::Some;
17586 let mut fields = std::collections::HashSet::new();
17587 let mut result = Self::Value::new();
17588 while let Some(tag) = map.next_key::<__FieldTag>()? {
17589 #[allow(clippy::match_single_binding)]
17590 match tag {
17591 __FieldTag::__parent => {
17592 if !fields.insert(__FieldTag::__parent) {
17593 return std::result::Result::Err(A::Error::duplicate_field(
17594 "multiple values for parent",
17595 ));
17596 }
17597 result.parent = map
17598 .next_value::<std::option::Option<std::string::String>>()?
17599 .unwrap_or_default();
17600 }
17601 __FieldTag::__page_size => {
17602 if !fields.insert(__FieldTag::__page_size) {
17603 return std::result::Result::Err(A::Error::duplicate_field(
17604 "multiple values for page_size",
17605 ));
17606 }
17607 struct __With(std::option::Option<i32>);
17608 impl<'de> serde::de::Deserialize<'de> for __With {
17609 fn deserialize<D>(
17610 deserializer: D,
17611 ) -> std::result::Result<Self, D::Error>
17612 where
17613 D: serde::de::Deserializer<'de>,
17614 {
17615 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
17616 }
17617 }
17618 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
17619 }
17620 __FieldTag::__page_token => {
17621 if !fields.insert(__FieldTag::__page_token) {
17622 return std::result::Result::Err(A::Error::duplicate_field(
17623 "multiple values for page_token",
17624 ));
17625 }
17626 result.page_token = map
17627 .next_value::<std::option::Option<std::string::String>>()?
17628 .unwrap_or_default();
17629 }
17630 __FieldTag::__order_by => {
17631 if !fields.insert(__FieldTag::__order_by) {
17632 return std::result::Result::Err(A::Error::duplicate_field(
17633 "multiple values for order_by",
17634 ));
17635 }
17636 result.order_by = map
17637 .next_value::<std::option::Option<std::string::String>>()?
17638 .unwrap_or_default();
17639 }
17640 __FieldTag::__filter => {
17641 if !fields.insert(__FieldTag::__filter) {
17642 return std::result::Result::Err(A::Error::duplicate_field(
17643 "multiple values for filter",
17644 ));
17645 }
17646 result.filter = map
17647 .next_value::<std::option::Option<std::string::String>>()?
17648 .unwrap_or_default();
17649 }
17650 __FieldTag::Unknown(key) => {
17651 let value = map.next_value::<serde_json::Value>()?;
17652 result._unknown_fields.insert(key, value);
17653 }
17654 }
17655 }
17656 std::result::Result::Ok(result)
17657 }
17658 }
17659 deserializer.deserialize_any(Visitor)
17660 }
17661}
17662
17663#[doc(hidden)]
17664impl serde::ser::Serialize for ListCompilationResultsRequest {
17665 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17666 where
17667 S: serde::ser::Serializer,
17668 {
17669 use serde::ser::SerializeMap;
17670 #[allow(unused_imports)]
17671 use std::option::Option::Some;
17672 let mut state = serializer.serialize_map(std::option::Option::None)?;
17673 if !self.parent.is_empty() {
17674 state.serialize_entry("parent", &self.parent)?;
17675 }
17676 if !wkt::internal::is_default(&self.page_size) {
17677 struct __With<'a>(&'a i32);
17678 impl<'a> serde::ser::Serialize for __With<'a> {
17679 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17680 where
17681 S: serde::ser::Serializer,
17682 {
17683 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
17684 }
17685 }
17686 state.serialize_entry("pageSize", &__With(&self.page_size))?;
17687 }
17688 if !self.page_token.is_empty() {
17689 state.serialize_entry("pageToken", &self.page_token)?;
17690 }
17691 if !self.order_by.is_empty() {
17692 state.serialize_entry("orderBy", &self.order_by)?;
17693 }
17694 if !self.filter.is_empty() {
17695 state.serialize_entry("filter", &self.filter)?;
17696 }
17697 if !self._unknown_fields.is_empty() {
17698 for (key, value) in self._unknown_fields.iter() {
17699 state.serialize_entry(key, &value)?;
17700 }
17701 }
17702 state.end()
17703 }
17704}
17705
17706impl std::fmt::Debug for ListCompilationResultsRequest {
17707 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17708 let mut debug_struct = f.debug_struct("ListCompilationResultsRequest");
17709 debug_struct.field("parent", &self.parent);
17710 debug_struct.field("page_size", &self.page_size);
17711 debug_struct.field("page_token", &self.page_token);
17712 debug_struct.field("order_by", &self.order_by);
17713 debug_struct.field("filter", &self.filter);
17714 if !self._unknown_fields.is_empty() {
17715 debug_struct.field("_unknown_fields", &self._unknown_fields);
17716 }
17717 debug_struct.finish()
17718 }
17719}
17720
17721#[derive(Clone, Default, PartialEq)]
17723#[non_exhaustive]
17724pub struct ListCompilationResultsResponse {
17725 pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
17727
17728 pub next_page_token: std::string::String,
17731
17732 pub unreachable: std::vec::Vec<std::string::String>,
17734
17735 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17736}
17737
17738impl ListCompilationResultsResponse {
17739 pub fn new() -> Self {
17740 std::default::Default::default()
17741 }
17742
17743 pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
17745 where
17746 T: std::iter::IntoIterator<Item = V>,
17747 V: std::convert::Into<crate::model::CompilationResult>,
17748 {
17749 use std::iter::Iterator;
17750 self.compilation_results = v.into_iter().map(|i| i.into()).collect();
17751 self
17752 }
17753
17754 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17756 self.next_page_token = v.into();
17757 self
17758 }
17759
17760 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
17762 where
17763 T: std::iter::IntoIterator<Item = V>,
17764 V: std::convert::Into<std::string::String>,
17765 {
17766 use std::iter::Iterator;
17767 self.unreachable = v.into_iter().map(|i| i.into()).collect();
17768 self
17769 }
17770}
17771
17772impl wkt::message::Message for ListCompilationResultsResponse {
17773 fn typename() -> &'static str {
17774 "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
17775 }
17776}
17777
17778#[doc(hidden)]
17779impl gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
17780 type PageItem = crate::model::CompilationResult;
17781
17782 fn items(self) -> std::vec::Vec<Self::PageItem> {
17783 self.compilation_results
17784 }
17785
17786 fn next_page_token(&self) -> std::string::String {
17787 use std::clone::Clone;
17788 self.next_page_token.clone()
17789 }
17790}
17791
17792#[doc(hidden)]
17793impl<'de> serde::de::Deserialize<'de> for ListCompilationResultsResponse {
17794 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17795 where
17796 D: serde::Deserializer<'de>,
17797 {
17798 #[allow(non_camel_case_types)]
17799 #[doc(hidden)]
17800 #[derive(PartialEq, Eq, Hash)]
17801 enum __FieldTag {
17802 __compilation_results,
17803 __next_page_token,
17804 __unreachable,
17805 Unknown(std::string::String),
17806 }
17807 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17808 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17809 where
17810 D: serde::Deserializer<'de>,
17811 {
17812 struct Visitor;
17813 impl<'de> serde::de::Visitor<'de> for Visitor {
17814 type Value = __FieldTag;
17815 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17816 formatter.write_str("a field name for ListCompilationResultsResponse")
17817 }
17818 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17819 where
17820 E: serde::de::Error,
17821 {
17822 use std::result::Result::Ok;
17823 use std::string::ToString;
17824 match value {
17825 "compilationResults" => Ok(__FieldTag::__compilation_results),
17826 "compilation_results" => Ok(__FieldTag::__compilation_results),
17827 "nextPageToken" => Ok(__FieldTag::__next_page_token),
17828 "next_page_token" => Ok(__FieldTag::__next_page_token),
17829 "unreachable" => Ok(__FieldTag::__unreachable),
17830 _ => Ok(__FieldTag::Unknown(value.to_string())),
17831 }
17832 }
17833 }
17834 deserializer.deserialize_identifier(Visitor)
17835 }
17836 }
17837 struct Visitor;
17838 impl<'de> serde::de::Visitor<'de> for Visitor {
17839 type Value = ListCompilationResultsResponse;
17840 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17841 formatter.write_str("struct ListCompilationResultsResponse")
17842 }
17843 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
17844 where
17845 A: serde::de::MapAccess<'de>,
17846 {
17847 #[allow(unused_imports)]
17848 use serde::de::Error;
17849 use std::option::Option::Some;
17850 let mut fields = std::collections::HashSet::new();
17851 let mut result = Self::Value::new();
17852 while let Some(tag) = map.next_key::<__FieldTag>()? {
17853 #[allow(clippy::match_single_binding)]
17854 match tag {
17855 __FieldTag::__compilation_results => {
17856 if !fields.insert(__FieldTag::__compilation_results) {
17857 return std::result::Result::Err(A::Error::duplicate_field(
17858 "multiple values for compilation_results",
17859 ));
17860 }
17861 result.compilation_results =
17862 map.next_value::<std::option::Option<
17863 std::vec::Vec<crate::model::CompilationResult>,
17864 >>()?
17865 .unwrap_or_default();
17866 }
17867 __FieldTag::__next_page_token => {
17868 if !fields.insert(__FieldTag::__next_page_token) {
17869 return std::result::Result::Err(A::Error::duplicate_field(
17870 "multiple values for next_page_token",
17871 ));
17872 }
17873 result.next_page_token = map
17874 .next_value::<std::option::Option<std::string::String>>()?
17875 .unwrap_or_default();
17876 }
17877 __FieldTag::__unreachable => {
17878 if !fields.insert(__FieldTag::__unreachable) {
17879 return std::result::Result::Err(A::Error::duplicate_field(
17880 "multiple values for unreachable",
17881 ));
17882 }
17883 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
17884 }
17885 __FieldTag::Unknown(key) => {
17886 let value = map.next_value::<serde_json::Value>()?;
17887 result._unknown_fields.insert(key, value);
17888 }
17889 }
17890 }
17891 std::result::Result::Ok(result)
17892 }
17893 }
17894 deserializer.deserialize_any(Visitor)
17895 }
17896}
17897
17898#[doc(hidden)]
17899impl serde::ser::Serialize for ListCompilationResultsResponse {
17900 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17901 where
17902 S: serde::ser::Serializer,
17903 {
17904 use serde::ser::SerializeMap;
17905 #[allow(unused_imports)]
17906 use std::option::Option::Some;
17907 let mut state = serializer.serialize_map(std::option::Option::None)?;
17908 if !self.compilation_results.is_empty() {
17909 state.serialize_entry("compilationResults", &self.compilation_results)?;
17910 }
17911 if !self.next_page_token.is_empty() {
17912 state.serialize_entry("nextPageToken", &self.next_page_token)?;
17913 }
17914 if !self.unreachable.is_empty() {
17915 state.serialize_entry("unreachable", &self.unreachable)?;
17916 }
17917 if !self._unknown_fields.is_empty() {
17918 for (key, value) in self._unknown_fields.iter() {
17919 state.serialize_entry(key, &value)?;
17920 }
17921 }
17922 state.end()
17923 }
17924}
17925
17926impl std::fmt::Debug for ListCompilationResultsResponse {
17927 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17928 let mut debug_struct = f.debug_struct("ListCompilationResultsResponse");
17929 debug_struct.field("compilation_results", &self.compilation_results);
17930 debug_struct.field("next_page_token", &self.next_page_token);
17931 debug_struct.field("unreachable", &self.unreachable);
17932 if !self._unknown_fields.is_empty() {
17933 debug_struct.field("_unknown_fields", &self._unknown_fields);
17934 }
17935 debug_struct.finish()
17936 }
17937}
17938
17939#[derive(Clone, Default, PartialEq)]
17941#[non_exhaustive]
17942pub struct GetCompilationResultRequest {
17943 pub name: std::string::String,
17945
17946 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17947}
17948
17949impl GetCompilationResultRequest {
17950 pub fn new() -> Self {
17951 std::default::Default::default()
17952 }
17953
17954 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17956 self.name = v.into();
17957 self
17958 }
17959}
17960
17961impl wkt::message::Message for GetCompilationResultRequest {
17962 fn typename() -> &'static str {
17963 "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
17964 }
17965}
17966
17967#[doc(hidden)]
17968impl<'de> serde::de::Deserialize<'de> for GetCompilationResultRequest {
17969 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17970 where
17971 D: serde::Deserializer<'de>,
17972 {
17973 #[allow(non_camel_case_types)]
17974 #[doc(hidden)]
17975 #[derive(PartialEq, Eq, Hash)]
17976 enum __FieldTag {
17977 __name,
17978 Unknown(std::string::String),
17979 }
17980 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
17981 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17982 where
17983 D: serde::Deserializer<'de>,
17984 {
17985 struct Visitor;
17986 impl<'de> serde::de::Visitor<'de> for Visitor {
17987 type Value = __FieldTag;
17988 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
17989 formatter.write_str("a field name for GetCompilationResultRequest")
17990 }
17991 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
17992 where
17993 E: serde::de::Error,
17994 {
17995 use std::result::Result::Ok;
17996 use std::string::ToString;
17997 match value {
17998 "name" => Ok(__FieldTag::__name),
17999 _ => Ok(__FieldTag::Unknown(value.to_string())),
18000 }
18001 }
18002 }
18003 deserializer.deserialize_identifier(Visitor)
18004 }
18005 }
18006 struct Visitor;
18007 impl<'de> serde::de::Visitor<'de> for Visitor {
18008 type Value = GetCompilationResultRequest;
18009 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18010 formatter.write_str("struct GetCompilationResultRequest")
18011 }
18012 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
18013 where
18014 A: serde::de::MapAccess<'de>,
18015 {
18016 #[allow(unused_imports)]
18017 use serde::de::Error;
18018 use std::option::Option::Some;
18019 let mut fields = std::collections::HashSet::new();
18020 let mut result = Self::Value::new();
18021 while let Some(tag) = map.next_key::<__FieldTag>()? {
18022 #[allow(clippy::match_single_binding)]
18023 match tag {
18024 __FieldTag::__name => {
18025 if !fields.insert(__FieldTag::__name) {
18026 return std::result::Result::Err(A::Error::duplicate_field(
18027 "multiple values for name",
18028 ));
18029 }
18030 result.name = map
18031 .next_value::<std::option::Option<std::string::String>>()?
18032 .unwrap_or_default();
18033 }
18034 __FieldTag::Unknown(key) => {
18035 let value = map.next_value::<serde_json::Value>()?;
18036 result._unknown_fields.insert(key, value);
18037 }
18038 }
18039 }
18040 std::result::Result::Ok(result)
18041 }
18042 }
18043 deserializer.deserialize_any(Visitor)
18044 }
18045}
18046
18047#[doc(hidden)]
18048impl serde::ser::Serialize for GetCompilationResultRequest {
18049 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18050 where
18051 S: serde::ser::Serializer,
18052 {
18053 use serde::ser::SerializeMap;
18054 #[allow(unused_imports)]
18055 use std::option::Option::Some;
18056 let mut state = serializer.serialize_map(std::option::Option::None)?;
18057 if !self.name.is_empty() {
18058 state.serialize_entry("name", &self.name)?;
18059 }
18060 if !self._unknown_fields.is_empty() {
18061 for (key, value) in self._unknown_fields.iter() {
18062 state.serialize_entry(key, &value)?;
18063 }
18064 }
18065 state.end()
18066 }
18067}
18068
18069impl std::fmt::Debug for GetCompilationResultRequest {
18070 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18071 let mut debug_struct = f.debug_struct("GetCompilationResultRequest");
18072 debug_struct.field("name", &self.name);
18073 if !self._unknown_fields.is_empty() {
18074 debug_struct.field("_unknown_fields", &self._unknown_fields);
18075 }
18076 debug_struct.finish()
18077 }
18078}
18079
18080#[derive(Clone, Default, PartialEq)]
18082#[non_exhaustive]
18083pub struct CreateCompilationResultRequest {
18084 pub parent: std::string::String,
18087
18088 pub compilation_result: std::option::Option<crate::model::CompilationResult>,
18090
18091 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18092}
18093
18094impl CreateCompilationResultRequest {
18095 pub fn new() -> Self {
18096 std::default::Default::default()
18097 }
18098
18099 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18101 self.parent = v.into();
18102 self
18103 }
18104
18105 pub fn set_compilation_result<T>(mut self, v: T) -> Self
18107 where
18108 T: std::convert::Into<crate::model::CompilationResult>,
18109 {
18110 self.compilation_result = std::option::Option::Some(v.into());
18111 self
18112 }
18113
18114 pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
18116 where
18117 T: std::convert::Into<crate::model::CompilationResult>,
18118 {
18119 self.compilation_result = v.map(|x| x.into());
18120 self
18121 }
18122}
18123
18124impl wkt::message::Message for CreateCompilationResultRequest {
18125 fn typename() -> &'static str {
18126 "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
18127 }
18128}
18129
18130#[doc(hidden)]
18131impl<'de> serde::de::Deserialize<'de> for CreateCompilationResultRequest {
18132 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18133 where
18134 D: serde::Deserializer<'de>,
18135 {
18136 #[allow(non_camel_case_types)]
18137 #[doc(hidden)]
18138 #[derive(PartialEq, Eq, Hash)]
18139 enum __FieldTag {
18140 __parent,
18141 __compilation_result,
18142 Unknown(std::string::String),
18143 }
18144 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
18145 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18146 where
18147 D: serde::Deserializer<'de>,
18148 {
18149 struct Visitor;
18150 impl<'de> serde::de::Visitor<'de> for Visitor {
18151 type Value = __FieldTag;
18152 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18153 formatter.write_str("a field name for CreateCompilationResultRequest")
18154 }
18155 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
18156 where
18157 E: serde::de::Error,
18158 {
18159 use std::result::Result::Ok;
18160 use std::string::ToString;
18161 match value {
18162 "parent" => Ok(__FieldTag::__parent),
18163 "compilationResult" => Ok(__FieldTag::__compilation_result),
18164 "compilation_result" => Ok(__FieldTag::__compilation_result),
18165 _ => Ok(__FieldTag::Unknown(value.to_string())),
18166 }
18167 }
18168 }
18169 deserializer.deserialize_identifier(Visitor)
18170 }
18171 }
18172 struct Visitor;
18173 impl<'de> serde::de::Visitor<'de> for Visitor {
18174 type Value = CreateCompilationResultRequest;
18175 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18176 formatter.write_str("struct CreateCompilationResultRequest")
18177 }
18178 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
18179 where
18180 A: serde::de::MapAccess<'de>,
18181 {
18182 #[allow(unused_imports)]
18183 use serde::de::Error;
18184 use std::option::Option::Some;
18185 let mut fields = std::collections::HashSet::new();
18186 let mut result = Self::Value::new();
18187 while let Some(tag) = map.next_key::<__FieldTag>()? {
18188 #[allow(clippy::match_single_binding)]
18189 match tag {
18190 __FieldTag::__parent => {
18191 if !fields.insert(__FieldTag::__parent) {
18192 return std::result::Result::Err(A::Error::duplicate_field(
18193 "multiple values for parent",
18194 ));
18195 }
18196 result.parent = map
18197 .next_value::<std::option::Option<std::string::String>>()?
18198 .unwrap_or_default();
18199 }
18200 __FieldTag::__compilation_result => {
18201 if !fields.insert(__FieldTag::__compilation_result) {
18202 return std::result::Result::Err(A::Error::duplicate_field(
18203 "multiple values for compilation_result",
18204 ));
18205 }
18206 result.compilation_result = map
18207 .next_value::<std::option::Option<crate::model::CompilationResult>>(
18208 )?;
18209 }
18210 __FieldTag::Unknown(key) => {
18211 let value = map.next_value::<serde_json::Value>()?;
18212 result._unknown_fields.insert(key, value);
18213 }
18214 }
18215 }
18216 std::result::Result::Ok(result)
18217 }
18218 }
18219 deserializer.deserialize_any(Visitor)
18220 }
18221}
18222
18223#[doc(hidden)]
18224impl serde::ser::Serialize for CreateCompilationResultRequest {
18225 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18226 where
18227 S: serde::ser::Serializer,
18228 {
18229 use serde::ser::SerializeMap;
18230 #[allow(unused_imports)]
18231 use std::option::Option::Some;
18232 let mut state = serializer.serialize_map(std::option::Option::None)?;
18233 if !self.parent.is_empty() {
18234 state.serialize_entry("parent", &self.parent)?;
18235 }
18236 if self.compilation_result.is_some() {
18237 state.serialize_entry("compilationResult", &self.compilation_result)?;
18238 }
18239 if !self._unknown_fields.is_empty() {
18240 for (key, value) in self._unknown_fields.iter() {
18241 state.serialize_entry(key, &value)?;
18242 }
18243 }
18244 state.end()
18245 }
18246}
18247
18248impl std::fmt::Debug for CreateCompilationResultRequest {
18249 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18250 let mut debug_struct = f.debug_struct("CreateCompilationResultRequest");
18251 debug_struct.field("parent", &self.parent);
18252 debug_struct.field("compilation_result", &self.compilation_result);
18253 if !self._unknown_fields.is_empty() {
18254 debug_struct.field("_unknown_fields", &self._unknown_fields);
18255 }
18256 debug_struct.finish()
18257 }
18258}
18259
18260#[derive(Clone, Default, PartialEq)]
18263#[non_exhaustive]
18264pub struct Target {
18265 pub database: std::string::String,
18267
18268 pub schema: std::string::String,
18270
18271 pub name: std::string::String,
18273
18274 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18275}
18276
18277impl Target {
18278 pub fn new() -> Self {
18279 std::default::Default::default()
18280 }
18281
18282 pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18284 self.database = v.into();
18285 self
18286 }
18287
18288 pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18290 self.schema = v.into();
18291 self
18292 }
18293
18294 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18296 self.name = v.into();
18297 self
18298 }
18299}
18300
18301impl wkt::message::Message for Target {
18302 fn typename() -> &'static str {
18303 "type.googleapis.com/google.cloud.dataform.v1.Target"
18304 }
18305}
18306
18307#[doc(hidden)]
18308impl<'de> serde::de::Deserialize<'de> for Target {
18309 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18310 where
18311 D: serde::Deserializer<'de>,
18312 {
18313 #[allow(non_camel_case_types)]
18314 #[doc(hidden)]
18315 #[derive(PartialEq, Eq, Hash)]
18316 enum __FieldTag {
18317 __database,
18318 __schema,
18319 __name,
18320 Unknown(std::string::String),
18321 }
18322 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
18323 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18324 where
18325 D: serde::Deserializer<'de>,
18326 {
18327 struct Visitor;
18328 impl<'de> serde::de::Visitor<'de> for Visitor {
18329 type Value = __FieldTag;
18330 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18331 formatter.write_str("a field name for Target")
18332 }
18333 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
18334 where
18335 E: serde::de::Error,
18336 {
18337 use std::result::Result::Ok;
18338 use std::string::ToString;
18339 match value {
18340 "database" => Ok(__FieldTag::__database),
18341 "schema" => Ok(__FieldTag::__schema),
18342 "name" => Ok(__FieldTag::__name),
18343 _ => Ok(__FieldTag::Unknown(value.to_string())),
18344 }
18345 }
18346 }
18347 deserializer.deserialize_identifier(Visitor)
18348 }
18349 }
18350 struct Visitor;
18351 impl<'de> serde::de::Visitor<'de> for Visitor {
18352 type Value = Target;
18353 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18354 formatter.write_str("struct Target")
18355 }
18356 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
18357 where
18358 A: serde::de::MapAccess<'de>,
18359 {
18360 #[allow(unused_imports)]
18361 use serde::de::Error;
18362 use std::option::Option::Some;
18363 let mut fields = std::collections::HashSet::new();
18364 let mut result = Self::Value::new();
18365 while let Some(tag) = map.next_key::<__FieldTag>()? {
18366 #[allow(clippy::match_single_binding)]
18367 match tag {
18368 __FieldTag::__database => {
18369 if !fields.insert(__FieldTag::__database) {
18370 return std::result::Result::Err(A::Error::duplicate_field(
18371 "multiple values for database",
18372 ));
18373 }
18374 result.database = map
18375 .next_value::<std::option::Option<std::string::String>>()?
18376 .unwrap_or_default();
18377 }
18378 __FieldTag::__schema => {
18379 if !fields.insert(__FieldTag::__schema) {
18380 return std::result::Result::Err(A::Error::duplicate_field(
18381 "multiple values for schema",
18382 ));
18383 }
18384 result.schema = map
18385 .next_value::<std::option::Option<std::string::String>>()?
18386 .unwrap_or_default();
18387 }
18388 __FieldTag::__name => {
18389 if !fields.insert(__FieldTag::__name) {
18390 return std::result::Result::Err(A::Error::duplicate_field(
18391 "multiple values for name",
18392 ));
18393 }
18394 result.name = map
18395 .next_value::<std::option::Option<std::string::String>>()?
18396 .unwrap_or_default();
18397 }
18398 __FieldTag::Unknown(key) => {
18399 let value = map.next_value::<serde_json::Value>()?;
18400 result._unknown_fields.insert(key, value);
18401 }
18402 }
18403 }
18404 std::result::Result::Ok(result)
18405 }
18406 }
18407 deserializer.deserialize_any(Visitor)
18408 }
18409}
18410
18411#[doc(hidden)]
18412impl serde::ser::Serialize for Target {
18413 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18414 where
18415 S: serde::ser::Serializer,
18416 {
18417 use serde::ser::SerializeMap;
18418 #[allow(unused_imports)]
18419 use std::option::Option::Some;
18420 let mut state = serializer.serialize_map(std::option::Option::None)?;
18421 if !self.database.is_empty() {
18422 state.serialize_entry("database", &self.database)?;
18423 }
18424 if !self.schema.is_empty() {
18425 state.serialize_entry("schema", &self.schema)?;
18426 }
18427 if !self.name.is_empty() {
18428 state.serialize_entry("name", &self.name)?;
18429 }
18430 if !self._unknown_fields.is_empty() {
18431 for (key, value) in self._unknown_fields.iter() {
18432 state.serialize_entry(key, &value)?;
18433 }
18434 }
18435 state.end()
18436 }
18437}
18438
18439impl std::fmt::Debug for Target {
18440 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18441 let mut debug_struct = f.debug_struct("Target");
18442 debug_struct.field("database", &self.database);
18443 debug_struct.field("schema", &self.schema);
18444 debug_struct.field("name", &self.name);
18445 if !self._unknown_fields.is_empty() {
18446 debug_struct.field("_unknown_fields", &self._unknown_fields);
18447 }
18448 debug_struct.finish()
18449 }
18450}
18451
18452#[derive(Clone, Default, PartialEq)]
18454#[non_exhaustive]
18455pub struct RelationDescriptor {
18456 pub description: std::string::String,
18458
18459 pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
18461
18462 pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
18464
18465 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18466}
18467
18468impl RelationDescriptor {
18469 pub fn new() -> Self {
18470 std::default::Default::default()
18471 }
18472
18473 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18475 self.description = v.into();
18476 self
18477 }
18478
18479 pub fn set_columns<T, V>(mut self, v: T) -> Self
18481 where
18482 T: std::iter::IntoIterator<Item = V>,
18483 V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
18484 {
18485 use std::iter::Iterator;
18486 self.columns = v.into_iter().map(|i| i.into()).collect();
18487 self
18488 }
18489
18490 pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
18492 where
18493 T: std::iter::IntoIterator<Item = (K, V)>,
18494 K: std::convert::Into<std::string::String>,
18495 V: std::convert::Into<std::string::String>,
18496 {
18497 use std::iter::Iterator;
18498 self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
18499 self
18500 }
18501}
18502
18503impl wkt::message::Message for RelationDescriptor {
18504 fn typename() -> &'static str {
18505 "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
18506 }
18507}
18508
18509#[doc(hidden)]
18510impl<'de> serde::de::Deserialize<'de> for RelationDescriptor {
18511 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18512 where
18513 D: serde::Deserializer<'de>,
18514 {
18515 #[allow(non_camel_case_types)]
18516 #[doc(hidden)]
18517 #[derive(PartialEq, Eq, Hash)]
18518 enum __FieldTag {
18519 __description,
18520 __columns,
18521 __bigquery_labels,
18522 Unknown(std::string::String),
18523 }
18524 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
18525 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18526 where
18527 D: serde::Deserializer<'de>,
18528 {
18529 struct Visitor;
18530 impl<'de> serde::de::Visitor<'de> for Visitor {
18531 type Value = __FieldTag;
18532 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18533 formatter.write_str("a field name for RelationDescriptor")
18534 }
18535 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
18536 where
18537 E: serde::de::Error,
18538 {
18539 use std::result::Result::Ok;
18540 use std::string::ToString;
18541 match value {
18542 "description" => Ok(__FieldTag::__description),
18543 "columns" => Ok(__FieldTag::__columns),
18544 "bigqueryLabels" => Ok(__FieldTag::__bigquery_labels),
18545 "bigquery_labels" => Ok(__FieldTag::__bigquery_labels),
18546 _ => Ok(__FieldTag::Unknown(value.to_string())),
18547 }
18548 }
18549 }
18550 deserializer.deserialize_identifier(Visitor)
18551 }
18552 }
18553 struct Visitor;
18554 impl<'de> serde::de::Visitor<'de> for Visitor {
18555 type Value = RelationDescriptor;
18556 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18557 formatter.write_str("struct RelationDescriptor")
18558 }
18559 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
18560 where
18561 A: serde::de::MapAccess<'de>,
18562 {
18563 #[allow(unused_imports)]
18564 use serde::de::Error;
18565 use std::option::Option::Some;
18566 let mut fields = std::collections::HashSet::new();
18567 let mut result = Self::Value::new();
18568 while let Some(tag) = map.next_key::<__FieldTag>()? {
18569 #[allow(clippy::match_single_binding)]
18570 match tag {
18571 __FieldTag::__description => {
18572 if !fields.insert(__FieldTag::__description) {
18573 return std::result::Result::Err(A::Error::duplicate_field(
18574 "multiple values for description",
18575 ));
18576 }
18577 result.description = map
18578 .next_value::<std::option::Option<std::string::String>>()?
18579 .unwrap_or_default();
18580 }
18581 __FieldTag::__columns => {
18582 if !fields.insert(__FieldTag::__columns) {
18583 return std::result::Result::Err(A::Error::duplicate_field(
18584 "multiple values for columns",
18585 ));
18586 }
18587 result.columns = map
18588 .next_value::<std::option::Option<
18589 std::vec::Vec<
18590 crate::model::relation_descriptor::ColumnDescriptor,
18591 >,
18592 >>()?
18593 .unwrap_or_default();
18594 }
18595 __FieldTag::__bigquery_labels => {
18596 if !fields.insert(__FieldTag::__bigquery_labels) {
18597 return std::result::Result::Err(A::Error::duplicate_field(
18598 "multiple values for bigquery_labels",
18599 ));
18600 }
18601 result.bigquery_labels = map
18602 .next_value::<std::option::Option<
18603 std::collections::HashMap<
18604 std::string::String,
18605 std::string::String,
18606 >,
18607 >>()?
18608 .unwrap_or_default();
18609 }
18610 __FieldTag::Unknown(key) => {
18611 let value = map.next_value::<serde_json::Value>()?;
18612 result._unknown_fields.insert(key, value);
18613 }
18614 }
18615 }
18616 std::result::Result::Ok(result)
18617 }
18618 }
18619 deserializer.deserialize_any(Visitor)
18620 }
18621}
18622
18623#[doc(hidden)]
18624impl serde::ser::Serialize for RelationDescriptor {
18625 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18626 where
18627 S: serde::ser::Serializer,
18628 {
18629 use serde::ser::SerializeMap;
18630 #[allow(unused_imports)]
18631 use std::option::Option::Some;
18632 let mut state = serializer.serialize_map(std::option::Option::None)?;
18633 if !self.description.is_empty() {
18634 state.serialize_entry("description", &self.description)?;
18635 }
18636 if !self.columns.is_empty() {
18637 state.serialize_entry("columns", &self.columns)?;
18638 }
18639 if !self.bigquery_labels.is_empty() {
18640 state.serialize_entry("bigqueryLabels", &self.bigquery_labels)?;
18641 }
18642 if !self._unknown_fields.is_empty() {
18643 for (key, value) in self._unknown_fields.iter() {
18644 state.serialize_entry(key, &value)?;
18645 }
18646 }
18647 state.end()
18648 }
18649}
18650
18651impl std::fmt::Debug for RelationDescriptor {
18652 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18653 let mut debug_struct = f.debug_struct("RelationDescriptor");
18654 debug_struct.field("description", &self.description);
18655 debug_struct.field("columns", &self.columns);
18656 debug_struct.field("bigquery_labels", &self.bigquery_labels);
18657 if !self._unknown_fields.is_empty() {
18658 debug_struct.field("_unknown_fields", &self._unknown_fields);
18659 }
18660 debug_struct.finish()
18661 }
18662}
18663
18664pub mod relation_descriptor {
18666 #[allow(unused_imports)]
18667 use super::*;
18668
18669 #[derive(Clone, Default, PartialEq)]
18671 #[non_exhaustive]
18672 pub struct ColumnDescriptor {
18673 pub path: std::vec::Vec<std::string::String>,
18676
18677 pub description: std::string::String,
18679
18680 pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
18682
18683 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18684 }
18685
18686 impl ColumnDescriptor {
18687 pub fn new() -> Self {
18688 std::default::Default::default()
18689 }
18690
18691 pub fn set_path<T, V>(mut self, v: T) -> Self
18693 where
18694 T: std::iter::IntoIterator<Item = V>,
18695 V: std::convert::Into<std::string::String>,
18696 {
18697 use std::iter::Iterator;
18698 self.path = v.into_iter().map(|i| i.into()).collect();
18699 self
18700 }
18701
18702 pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18704 self.description = v.into();
18705 self
18706 }
18707
18708 pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
18710 where
18711 T: std::iter::IntoIterator<Item = V>,
18712 V: std::convert::Into<std::string::String>,
18713 {
18714 use std::iter::Iterator;
18715 self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
18716 self
18717 }
18718 }
18719
18720 impl wkt::message::Message for ColumnDescriptor {
18721 fn typename() -> &'static str {
18722 "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
18723 }
18724 }
18725
18726 #[doc(hidden)]
18727 impl<'de> serde::de::Deserialize<'de> for ColumnDescriptor {
18728 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18729 where
18730 D: serde::Deserializer<'de>,
18731 {
18732 #[allow(non_camel_case_types)]
18733 #[doc(hidden)]
18734 #[derive(PartialEq, Eq, Hash)]
18735 enum __FieldTag {
18736 __path,
18737 __description,
18738 __bigquery_policy_tags,
18739 Unknown(std::string::String),
18740 }
18741 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
18742 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18743 where
18744 D: serde::Deserializer<'de>,
18745 {
18746 struct Visitor;
18747 impl<'de> serde::de::Visitor<'de> for Visitor {
18748 type Value = __FieldTag;
18749 fn expecting(
18750 &self,
18751 formatter: &mut std::fmt::Formatter,
18752 ) -> std::fmt::Result {
18753 formatter.write_str("a field name for ColumnDescriptor")
18754 }
18755 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
18756 where
18757 E: serde::de::Error,
18758 {
18759 use std::result::Result::Ok;
18760 use std::string::ToString;
18761 match value {
18762 "path" => Ok(__FieldTag::__path),
18763 "description" => Ok(__FieldTag::__description),
18764 "bigqueryPolicyTags" => Ok(__FieldTag::__bigquery_policy_tags),
18765 "bigquery_policy_tags" => Ok(__FieldTag::__bigquery_policy_tags),
18766 _ => Ok(__FieldTag::Unknown(value.to_string())),
18767 }
18768 }
18769 }
18770 deserializer.deserialize_identifier(Visitor)
18771 }
18772 }
18773 struct Visitor;
18774 impl<'de> serde::de::Visitor<'de> for Visitor {
18775 type Value = ColumnDescriptor;
18776 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
18777 formatter.write_str("struct ColumnDescriptor")
18778 }
18779 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
18780 where
18781 A: serde::de::MapAccess<'de>,
18782 {
18783 #[allow(unused_imports)]
18784 use serde::de::Error;
18785 use std::option::Option::Some;
18786 let mut fields = std::collections::HashSet::new();
18787 let mut result = Self::Value::new();
18788 while let Some(tag) = map.next_key::<__FieldTag>()? {
18789 #[allow(clippy::match_single_binding)]
18790 match tag {
18791 __FieldTag::__path => {
18792 if !fields.insert(__FieldTag::__path) {
18793 return std::result::Result::Err(A::Error::duplicate_field(
18794 "multiple values for path",
18795 ));
18796 }
18797 result.path = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
18798 }
18799 __FieldTag::__description => {
18800 if !fields.insert(__FieldTag::__description) {
18801 return std::result::Result::Err(A::Error::duplicate_field(
18802 "multiple values for description",
18803 ));
18804 }
18805 result.description = map
18806 .next_value::<std::option::Option<std::string::String>>()?
18807 .unwrap_or_default();
18808 }
18809 __FieldTag::__bigquery_policy_tags => {
18810 if !fields.insert(__FieldTag::__bigquery_policy_tags) {
18811 return std::result::Result::Err(A::Error::duplicate_field(
18812 "multiple values for bigquery_policy_tags",
18813 ));
18814 }
18815 result.bigquery_policy_tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
18816 }
18817 __FieldTag::Unknown(key) => {
18818 let value = map.next_value::<serde_json::Value>()?;
18819 result._unknown_fields.insert(key, value);
18820 }
18821 }
18822 }
18823 std::result::Result::Ok(result)
18824 }
18825 }
18826 deserializer.deserialize_any(Visitor)
18827 }
18828 }
18829
18830 #[doc(hidden)]
18831 impl serde::ser::Serialize for ColumnDescriptor {
18832 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18833 where
18834 S: serde::ser::Serializer,
18835 {
18836 use serde::ser::SerializeMap;
18837 #[allow(unused_imports)]
18838 use std::option::Option::Some;
18839 let mut state = serializer.serialize_map(std::option::Option::None)?;
18840 if !self.path.is_empty() {
18841 state.serialize_entry("path", &self.path)?;
18842 }
18843 if !self.description.is_empty() {
18844 state.serialize_entry("description", &self.description)?;
18845 }
18846 if !self.bigquery_policy_tags.is_empty() {
18847 state.serialize_entry("bigqueryPolicyTags", &self.bigquery_policy_tags)?;
18848 }
18849 if !self._unknown_fields.is_empty() {
18850 for (key, value) in self._unknown_fields.iter() {
18851 state.serialize_entry(key, &value)?;
18852 }
18853 }
18854 state.end()
18855 }
18856 }
18857
18858 impl std::fmt::Debug for ColumnDescriptor {
18859 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18860 let mut debug_struct = f.debug_struct("ColumnDescriptor");
18861 debug_struct.field("path", &self.path);
18862 debug_struct.field("description", &self.description);
18863 debug_struct.field("bigquery_policy_tags", &self.bigquery_policy_tags);
18864 if !self._unknown_fields.is_empty() {
18865 debug_struct.field("_unknown_fields", &self._unknown_fields);
18866 }
18867 debug_struct.finish()
18868 }
18869 }
18870}
18871
18872#[derive(Clone, Default, PartialEq)]
18874#[non_exhaustive]
18875pub struct CompilationResultAction {
18876 pub target: std::option::Option<crate::model::Target>,
18878
18879 pub canonical_target: std::option::Option<crate::model::Target>,
18882
18883 pub file_path: std::string::String,
18886
18887 pub internal_metadata: std::option::Option<std::string::String>,
18891
18892 pub compiled_object:
18894 std::option::Option<crate::model::compilation_result_action::CompiledObject>,
18895
18896 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18897}
18898
18899impl CompilationResultAction {
18900 pub fn new() -> Self {
18901 std::default::Default::default()
18902 }
18903
18904 pub fn set_target<T>(mut self, v: T) -> Self
18906 where
18907 T: std::convert::Into<crate::model::Target>,
18908 {
18909 self.target = std::option::Option::Some(v.into());
18910 self
18911 }
18912
18913 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
18915 where
18916 T: std::convert::Into<crate::model::Target>,
18917 {
18918 self.target = v.map(|x| x.into());
18919 self
18920 }
18921
18922 pub fn set_canonical_target<T>(mut self, v: T) -> Self
18924 where
18925 T: std::convert::Into<crate::model::Target>,
18926 {
18927 self.canonical_target = std::option::Option::Some(v.into());
18928 self
18929 }
18930
18931 pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
18933 where
18934 T: std::convert::Into<crate::model::Target>,
18935 {
18936 self.canonical_target = v.map(|x| x.into());
18937 self
18938 }
18939
18940 pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18942 self.file_path = v.into();
18943 self
18944 }
18945
18946 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
18948 where
18949 T: std::convert::Into<std::string::String>,
18950 {
18951 self.internal_metadata = std::option::Option::Some(v.into());
18952 self
18953 }
18954
18955 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
18957 where
18958 T: std::convert::Into<std::string::String>,
18959 {
18960 self.internal_metadata = v.map(|x| x.into());
18961 self
18962 }
18963
18964 pub fn set_compiled_object<
18969 T: std::convert::Into<
18970 std::option::Option<crate::model::compilation_result_action::CompiledObject>,
18971 >,
18972 >(
18973 mut self,
18974 v: T,
18975 ) -> Self {
18976 self.compiled_object = v.into();
18977 self
18978 }
18979
18980 pub fn relation(
18984 &self,
18985 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
18986 {
18987 #[allow(unreachable_patterns)]
18988 self.compiled_object.as_ref().and_then(|v| match v {
18989 crate::model::compilation_result_action::CompiledObject::Relation(v) => {
18990 std::option::Option::Some(v)
18991 }
18992 _ => std::option::Option::None,
18993 })
18994 }
18995
18996 pub fn set_relation<
19002 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
19003 >(
19004 mut self,
19005 v: T,
19006 ) -> Self {
19007 self.compiled_object = std::option::Option::Some(
19008 crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
19009 );
19010 self
19011 }
19012
19013 pub fn operations(
19017 &self,
19018 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
19019 {
19020 #[allow(unreachable_patterns)]
19021 self.compiled_object.as_ref().and_then(|v| match v {
19022 crate::model::compilation_result_action::CompiledObject::Operations(v) => {
19023 std::option::Option::Some(v)
19024 }
19025 _ => std::option::Option::None,
19026 })
19027 }
19028
19029 pub fn set_operations<
19035 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
19036 >(
19037 mut self,
19038 v: T,
19039 ) -> Self {
19040 self.compiled_object = std::option::Option::Some(
19041 crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
19042 );
19043 self
19044 }
19045
19046 pub fn assertion(
19050 &self,
19051 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
19052 {
19053 #[allow(unreachable_patterns)]
19054 self.compiled_object.as_ref().and_then(|v| match v {
19055 crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
19056 std::option::Option::Some(v)
19057 }
19058 _ => std::option::Option::None,
19059 })
19060 }
19061
19062 pub fn set_assertion<
19068 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
19069 >(
19070 mut self,
19071 v: T,
19072 ) -> Self {
19073 self.compiled_object = std::option::Option::Some(
19074 crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
19075 );
19076 self
19077 }
19078
19079 pub fn declaration(
19083 &self,
19084 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
19085 {
19086 #[allow(unreachable_patterns)]
19087 self.compiled_object.as_ref().and_then(|v| match v {
19088 crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
19089 std::option::Option::Some(v)
19090 }
19091 _ => std::option::Option::None,
19092 })
19093 }
19094
19095 pub fn set_declaration<
19101 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
19102 >(
19103 mut self,
19104 v: T,
19105 ) -> Self {
19106 self.compiled_object = std::option::Option::Some(
19107 crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
19108 );
19109 self
19110 }
19111
19112 pub fn notebook(
19116 &self,
19117 ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
19118 {
19119 #[allow(unreachable_patterns)]
19120 self.compiled_object.as_ref().and_then(|v| match v {
19121 crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
19122 std::option::Option::Some(v)
19123 }
19124 _ => std::option::Option::None,
19125 })
19126 }
19127
19128 pub fn set_notebook<
19134 T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
19135 >(
19136 mut self,
19137 v: T,
19138 ) -> Self {
19139 self.compiled_object = std::option::Option::Some(
19140 crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
19141 );
19142 self
19143 }
19144
19145 pub fn data_preparation(
19149 &self,
19150 ) -> std::option::Option<
19151 &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
19152 > {
19153 #[allow(unreachable_patterns)]
19154 self.compiled_object.as_ref().and_then(|v| match v {
19155 crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
19156 std::option::Option::Some(v)
19157 }
19158 _ => std::option::Option::None,
19159 })
19160 }
19161
19162 pub fn set_data_preparation<
19168 T: std::convert::Into<
19169 std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
19170 >,
19171 >(
19172 mut self,
19173 v: T,
19174 ) -> Self {
19175 self.compiled_object = std::option::Option::Some(
19176 crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
19177 );
19178 self
19179 }
19180}
19181
19182impl wkt::message::Message for CompilationResultAction {
19183 fn typename() -> &'static str {
19184 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
19185 }
19186}
19187
19188#[doc(hidden)]
19189impl<'de> serde::de::Deserialize<'de> for CompilationResultAction {
19190 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19191 where
19192 D: serde::Deserializer<'de>,
19193 {
19194 #[allow(non_camel_case_types)]
19195 #[doc(hidden)]
19196 #[derive(PartialEq, Eq, Hash)]
19197 enum __FieldTag {
19198 __relation,
19199 __operations,
19200 __assertion,
19201 __declaration,
19202 __notebook,
19203 __data_preparation,
19204 __target,
19205 __canonical_target,
19206 __file_path,
19207 __internal_metadata,
19208 Unknown(std::string::String),
19209 }
19210 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
19211 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19212 where
19213 D: serde::Deserializer<'de>,
19214 {
19215 struct Visitor;
19216 impl<'de> serde::de::Visitor<'de> for Visitor {
19217 type Value = __FieldTag;
19218 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19219 formatter.write_str("a field name for CompilationResultAction")
19220 }
19221 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
19222 where
19223 E: serde::de::Error,
19224 {
19225 use std::result::Result::Ok;
19226 use std::string::ToString;
19227 match value {
19228 "relation" => Ok(__FieldTag::__relation),
19229 "operations" => Ok(__FieldTag::__operations),
19230 "assertion" => Ok(__FieldTag::__assertion),
19231 "declaration" => Ok(__FieldTag::__declaration),
19232 "notebook" => Ok(__FieldTag::__notebook),
19233 "dataPreparation" => Ok(__FieldTag::__data_preparation),
19234 "data_preparation" => Ok(__FieldTag::__data_preparation),
19235 "target" => Ok(__FieldTag::__target),
19236 "canonicalTarget" => Ok(__FieldTag::__canonical_target),
19237 "canonical_target" => Ok(__FieldTag::__canonical_target),
19238 "filePath" => Ok(__FieldTag::__file_path),
19239 "file_path" => Ok(__FieldTag::__file_path),
19240 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
19241 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
19242 _ => Ok(__FieldTag::Unknown(value.to_string())),
19243 }
19244 }
19245 }
19246 deserializer.deserialize_identifier(Visitor)
19247 }
19248 }
19249 struct Visitor;
19250 impl<'de> serde::de::Visitor<'de> for Visitor {
19251 type Value = CompilationResultAction;
19252 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19253 formatter.write_str("struct CompilationResultAction")
19254 }
19255 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
19256 where
19257 A: serde::de::MapAccess<'de>,
19258 {
19259 #[allow(unused_imports)]
19260 use serde::de::Error;
19261 use std::option::Option::Some;
19262 let mut fields = std::collections::HashSet::new();
19263 let mut result = Self::Value::new();
19264 while let Some(tag) = map.next_key::<__FieldTag>()? {
19265 #[allow(clippy::match_single_binding)]
19266 match tag {
19267 __FieldTag::__relation => {
19268 if !fields.insert(__FieldTag::__relation) {
19269 return std::result::Result::Err(A::Error::duplicate_field(
19270 "multiple values for relation",
19271 ));
19272 }
19273 if result.compiled_object.is_some() {
19274 return std::result::Result::Err(A::Error::duplicate_field(
19275 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.relation, latest field was relation",
19276 ));
19277 }
19278 result.compiled_object = std::option::Option::Some(
19279 crate::model::compilation_result_action::CompiledObject::Relation(
19280 map.next_value::<std::option::Option<
19281 std::boxed::Box<
19282 crate::model::compilation_result_action::Relation,
19283 >,
19284 >>()?
19285 .unwrap_or_default(),
19286 ),
19287 );
19288 }
19289 __FieldTag::__operations => {
19290 if !fields.insert(__FieldTag::__operations) {
19291 return std::result::Result::Err(A::Error::duplicate_field(
19292 "multiple values for operations",
19293 ));
19294 }
19295 if result.compiled_object.is_some() {
19296 return std::result::Result::Err(A::Error::duplicate_field(
19297 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.operations, latest field was operations",
19298 ));
19299 }
19300 result.compiled_object = std::option::Option::Some(
19301 crate::model::compilation_result_action::CompiledObject::Operations(
19302 map.next_value::<std::option::Option<
19303 std::boxed::Box<
19304 crate::model::compilation_result_action::Operations,
19305 >,
19306 >>()?
19307 .unwrap_or_default(),
19308 ),
19309 );
19310 }
19311 __FieldTag::__assertion => {
19312 if !fields.insert(__FieldTag::__assertion) {
19313 return std::result::Result::Err(A::Error::duplicate_field(
19314 "multiple values for assertion",
19315 ));
19316 }
19317 if result.compiled_object.is_some() {
19318 return std::result::Result::Err(A::Error::duplicate_field(
19319 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.assertion, latest field was assertion",
19320 ));
19321 }
19322 result.compiled_object = std::option::Option::Some(
19323 crate::model::compilation_result_action::CompiledObject::Assertion(
19324 map.next_value::<std::option::Option<
19325 std::boxed::Box<
19326 crate::model::compilation_result_action::Assertion,
19327 >,
19328 >>()?
19329 .unwrap_or_default(),
19330 ),
19331 );
19332 }
19333 __FieldTag::__declaration => {
19334 if !fields.insert(__FieldTag::__declaration) {
19335 return std::result::Result::Err(A::Error::duplicate_field(
19336 "multiple values for declaration",
19337 ));
19338 }
19339 if result.compiled_object.is_some() {
19340 return std::result::Result::Err(A::Error::duplicate_field(
19341 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.declaration, latest field was declaration",
19342 ));
19343 }
19344 result.compiled_object = std::option::Option::Some(
19345 crate::model::compilation_result_action::CompiledObject::Declaration(
19346 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::Declaration>>>()?.unwrap_or_default()
19347 ),
19348 );
19349 }
19350 __FieldTag::__notebook => {
19351 if !fields.insert(__FieldTag::__notebook) {
19352 return std::result::Result::Err(A::Error::duplicate_field(
19353 "multiple values for notebook",
19354 ));
19355 }
19356 if result.compiled_object.is_some() {
19357 return std::result::Result::Err(A::Error::duplicate_field(
19358 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.notebook, latest field was notebook",
19359 ));
19360 }
19361 result.compiled_object = std::option::Option::Some(
19362 crate::model::compilation_result_action::CompiledObject::Notebook(
19363 map.next_value::<std::option::Option<
19364 std::boxed::Box<
19365 crate::model::compilation_result_action::Notebook,
19366 >,
19367 >>()?
19368 .unwrap_or_default(),
19369 ),
19370 );
19371 }
19372 __FieldTag::__data_preparation => {
19373 if !fields.insert(__FieldTag::__data_preparation) {
19374 return std::result::Result::Err(A::Error::duplicate_field(
19375 "multiple values for data_preparation",
19376 ));
19377 }
19378 if result.compiled_object.is_some() {
19379 return std::result::Result::Err(A::Error::duplicate_field(
19380 "multiple values for `compiled_object`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.data_preparation, latest field was dataPreparation",
19381 ));
19382 }
19383 result.compiled_object = std::option::Option::Some(
19384 crate::model::compilation_result_action::CompiledObject::DataPreparation(
19385 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::DataPreparation>>>()?.unwrap_or_default()
19386 ),
19387 );
19388 }
19389 __FieldTag::__target => {
19390 if !fields.insert(__FieldTag::__target) {
19391 return std::result::Result::Err(A::Error::duplicate_field(
19392 "multiple values for target",
19393 ));
19394 }
19395 result.target =
19396 map.next_value::<std::option::Option<crate::model::Target>>()?;
19397 }
19398 __FieldTag::__canonical_target => {
19399 if !fields.insert(__FieldTag::__canonical_target) {
19400 return std::result::Result::Err(A::Error::duplicate_field(
19401 "multiple values for canonical_target",
19402 ));
19403 }
19404 result.canonical_target =
19405 map.next_value::<std::option::Option<crate::model::Target>>()?;
19406 }
19407 __FieldTag::__file_path => {
19408 if !fields.insert(__FieldTag::__file_path) {
19409 return std::result::Result::Err(A::Error::duplicate_field(
19410 "multiple values for file_path",
19411 ));
19412 }
19413 result.file_path = map
19414 .next_value::<std::option::Option<std::string::String>>()?
19415 .unwrap_or_default();
19416 }
19417 __FieldTag::__internal_metadata => {
19418 if !fields.insert(__FieldTag::__internal_metadata) {
19419 return std::result::Result::Err(A::Error::duplicate_field(
19420 "multiple values for internal_metadata",
19421 ));
19422 }
19423 result.internal_metadata =
19424 map.next_value::<std::option::Option<std::string::String>>()?;
19425 }
19426 __FieldTag::Unknown(key) => {
19427 let value = map.next_value::<serde_json::Value>()?;
19428 result._unknown_fields.insert(key, value);
19429 }
19430 }
19431 }
19432 std::result::Result::Ok(result)
19433 }
19434 }
19435 deserializer.deserialize_any(Visitor)
19436 }
19437}
19438
19439#[doc(hidden)]
19440impl serde::ser::Serialize for CompilationResultAction {
19441 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19442 where
19443 S: serde::ser::Serializer,
19444 {
19445 use serde::ser::SerializeMap;
19446 #[allow(unused_imports)]
19447 use std::option::Option::Some;
19448 let mut state = serializer.serialize_map(std::option::Option::None)?;
19449 if let Some(value) = self.relation() {
19450 state.serialize_entry("relation", value)?;
19451 }
19452 if let Some(value) = self.operations() {
19453 state.serialize_entry("operations", value)?;
19454 }
19455 if let Some(value) = self.assertion() {
19456 state.serialize_entry("assertion", value)?;
19457 }
19458 if let Some(value) = self.declaration() {
19459 state.serialize_entry("declaration", value)?;
19460 }
19461 if let Some(value) = self.notebook() {
19462 state.serialize_entry("notebook", value)?;
19463 }
19464 if let Some(value) = self.data_preparation() {
19465 state.serialize_entry("dataPreparation", value)?;
19466 }
19467 if self.target.is_some() {
19468 state.serialize_entry("target", &self.target)?;
19469 }
19470 if self.canonical_target.is_some() {
19471 state.serialize_entry("canonicalTarget", &self.canonical_target)?;
19472 }
19473 if !self.file_path.is_empty() {
19474 state.serialize_entry("filePath", &self.file_path)?;
19475 }
19476 if self.internal_metadata.is_some() {
19477 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
19478 }
19479 if !self._unknown_fields.is_empty() {
19480 for (key, value) in self._unknown_fields.iter() {
19481 state.serialize_entry(key, &value)?;
19482 }
19483 }
19484 state.end()
19485 }
19486}
19487
19488impl std::fmt::Debug for CompilationResultAction {
19489 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19490 let mut debug_struct = f.debug_struct("CompilationResultAction");
19491 debug_struct.field("target", &self.target);
19492 debug_struct.field("canonical_target", &self.canonical_target);
19493 debug_struct.field("file_path", &self.file_path);
19494 debug_struct.field("internal_metadata", &self.internal_metadata);
19495 debug_struct.field("compiled_object", &self.compiled_object);
19496 if !self._unknown_fields.is_empty() {
19497 debug_struct.field("_unknown_fields", &self._unknown_fields);
19498 }
19499 debug_struct.finish()
19500 }
19501}
19502
19503pub mod compilation_result_action {
19505 #[allow(unused_imports)]
19506 use super::*;
19507
19508 #[derive(Clone, Default, PartialEq)]
19510 #[non_exhaustive]
19511 pub struct Relation {
19512 pub dependency_targets: std::vec::Vec<crate::model::Target>,
19514
19515 pub disabled: bool,
19517
19518 pub tags: std::vec::Vec<std::string::String>,
19520
19521 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
19523
19524 pub relation_type: crate::model::compilation_result_action::relation::RelationType,
19526
19527 pub select_query: std::string::String,
19529
19530 pub pre_operations: std::vec::Vec<std::string::String>,
19532
19533 pub post_operations: std::vec::Vec<std::string::String>,
19535
19536 pub incremental_table_config: std::option::Option<
19539 crate::model::compilation_result_action::relation::IncrementalTableConfig,
19540 >,
19541
19542 pub partition_expression: std::string::String,
19544
19545 pub cluster_expressions: std::vec::Vec<std::string::String>,
19547
19548 pub partition_expiration_days: i32,
19550
19551 pub require_partition_filter: bool,
19554
19555 pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
19560
19561 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
19562 }
19563
19564 impl Relation {
19565 pub fn new() -> Self {
19566 std::default::Default::default()
19567 }
19568
19569 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
19571 where
19572 T: std::iter::IntoIterator<Item = V>,
19573 V: std::convert::Into<crate::model::Target>,
19574 {
19575 use std::iter::Iterator;
19576 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
19577 self
19578 }
19579
19580 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19582 self.disabled = v.into();
19583 self
19584 }
19585
19586 pub fn set_tags<T, V>(mut self, v: T) -> Self
19588 where
19589 T: std::iter::IntoIterator<Item = V>,
19590 V: std::convert::Into<std::string::String>,
19591 {
19592 use std::iter::Iterator;
19593 self.tags = v.into_iter().map(|i| i.into()).collect();
19594 self
19595 }
19596
19597 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
19599 where
19600 T: std::convert::Into<crate::model::RelationDescriptor>,
19601 {
19602 self.relation_descriptor = std::option::Option::Some(v.into());
19603 self
19604 }
19605
19606 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
19608 where
19609 T: std::convert::Into<crate::model::RelationDescriptor>,
19610 {
19611 self.relation_descriptor = v.map(|x| x.into());
19612 self
19613 }
19614
19615 pub fn set_relation_type<
19617 T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
19618 >(
19619 mut self,
19620 v: T,
19621 ) -> Self {
19622 self.relation_type = v.into();
19623 self
19624 }
19625
19626 pub fn set_select_query<T: std::convert::Into<std::string::String>>(
19628 mut self,
19629 v: T,
19630 ) -> Self {
19631 self.select_query = v.into();
19632 self
19633 }
19634
19635 pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
19637 where
19638 T: std::iter::IntoIterator<Item = V>,
19639 V: std::convert::Into<std::string::String>,
19640 {
19641 use std::iter::Iterator;
19642 self.pre_operations = v.into_iter().map(|i| i.into()).collect();
19643 self
19644 }
19645
19646 pub fn set_post_operations<T, V>(mut self, v: T) -> Self
19648 where
19649 T: std::iter::IntoIterator<Item = V>,
19650 V: std::convert::Into<std::string::String>,
19651 {
19652 use std::iter::Iterator;
19653 self.post_operations = v.into_iter().map(|i| i.into()).collect();
19654 self
19655 }
19656
19657 pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
19659 where
19660 T: std::convert::Into<
19661 crate::model::compilation_result_action::relation::IncrementalTableConfig,
19662 >,
19663 {
19664 self.incremental_table_config = std::option::Option::Some(v.into());
19665 self
19666 }
19667
19668 pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
19670 where
19671 T: std::convert::Into<
19672 crate::model::compilation_result_action::relation::IncrementalTableConfig,
19673 >,
19674 {
19675 self.incremental_table_config = v.map(|x| x.into());
19676 self
19677 }
19678
19679 pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
19681 mut self,
19682 v: T,
19683 ) -> Self {
19684 self.partition_expression = v.into();
19685 self
19686 }
19687
19688 pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
19690 where
19691 T: std::iter::IntoIterator<Item = V>,
19692 V: std::convert::Into<std::string::String>,
19693 {
19694 use std::iter::Iterator;
19695 self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
19696 self
19697 }
19698
19699 pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
19701 self.partition_expiration_days = v.into();
19702 self
19703 }
19704
19705 pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
19707 self.require_partition_filter = v.into();
19708 self
19709 }
19710
19711 pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
19713 where
19714 T: std::iter::IntoIterator<Item = (K, V)>,
19715 K: std::convert::Into<std::string::String>,
19716 V: std::convert::Into<std::string::String>,
19717 {
19718 use std::iter::Iterator;
19719 self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
19720 self
19721 }
19722 }
19723
19724 impl wkt::message::Message for Relation {
19725 fn typename() -> &'static str {
19726 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
19727 }
19728 }
19729
19730 #[doc(hidden)]
19731 impl<'de> serde::de::Deserialize<'de> for Relation {
19732 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19733 where
19734 D: serde::Deserializer<'de>,
19735 {
19736 #[allow(non_camel_case_types)]
19737 #[doc(hidden)]
19738 #[derive(PartialEq, Eq, Hash)]
19739 enum __FieldTag {
19740 __dependency_targets,
19741 __disabled,
19742 __tags,
19743 __relation_descriptor,
19744 __relation_type,
19745 __select_query,
19746 __pre_operations,
19747 __post_operations,
19748 __incremental_table_config,
19749 __partition_expression,
19750 __cluster_expressions,
19751 __partition_expiration_days,
19752 __require_partition_filter,
19753 __additional_options,
19754 Unknown(std::string::String),
19755 }
19756 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
19757 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19758 where
19759 D: serde::Deserializer<'de>,
19760 {
19761 struct Visitor;
19762 impl<'de> serde::de::Visitor<'de> for Visitor {
19763 type Value = __FieldTag;
19764 fn expecting(
19765 &self,
19766 formatter: &mut std::fmt::Formatter,
19767 ) -> std::fmt::Result {
19768 formatter.write_str("a field name for Relation")
19769 }
19770 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
19771 where
19772 E: serde::de::Error,
19773 {
19774 use std::result::Result::Ok;
19775 use std::string::ToString;
19776 match value {
19777 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
19778 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
19779 "disabled" => Ok(__FieldTag::__disabled),
19780 "tags" => Ok(__FieldTag::__tags),
19781 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
19782 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
19783 "relationType" => Ok(__FieldTag::__relation_type),
19784 "relation_type" => Ok(__FieldTag::__relation_type),
19785 "selectQuery" => Ok(__FieldTag::__select_query),
19786 "select_query" => Ok(__FieldTag::__select_query),
19787 "preOperations" => Ok(__FieldTag::__pre_operations),
19788 "pre_operations" => Ok(__FieldTag::__pre_operations),
19789 "postOperations" => Ok(__FieldTag::__post_operations),
19790 "post_operations" => Ok(__FieldTag::__post_operations),
19791 "incrementalTableConfig" => {
19792 Ok(__FieldTag::__incremental_table_config)
19793 }
19794 "incremental_table_config" => {
19795 Ok(__FieldTag::__incremental_table_config)
19796 }
19797 "partitionExpression" => Ok(__FieldTag::__partition_expression),
19798 "partition_expression" => Ok(__FieldTag::__partition_expression),
19799 "clusterExpressions" => Ok(__FieldTag::__cluster_expressions),
19800 "cluster_expressions" => Ok(__FieldTag::__cluster_expressions),
19801 "partitionExpirationDays" => {
19802 Ok(__FieldTag::__partition_expiration_days)
19803 }
19804 "partition_expiration_days" => {
19805 Ok(__FieldTag::__partition_expiration_days)
19806 }
19807 "requirePartitionFilter" => {
19808 Ok(__FieldTag::__require_partition_filter)
19809 }
19810 "require_partition_filter" => {
19811 Ok(__FieldTag::__require_partition_filter)
19812 }
19813 "additionalOptions" => Ok(__FieldTag::__additional_options),
19814 "additional_options" => Ok(__FieldTag::__additional_options),
19815 _ => Ok(__FieldTag::Unknown(value.to_string())),
19816 }
19817 }
19818 }
19819 deserializer.deserialize_identifier(Visitor)
19820 }
19821 }
19822 struct Visitor;
19823 impl<'de> serde::de::Visitor<'de> for Visitor {
19824 type Value = Relation;
19825 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
19826 formatter.write_str("struct Relation")
19827 }
19828 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
19829 where
19830 A: serde::de::MapAccess<'de>,
19831 {
19832 #[allow(unused_imports)]
19833 use serde::de::Error;
19834 use std::option::Option::Some;
19835 let mut fields = std::collections::HashSet::new();
19836 let mut result = Self::Value::new();
19837 while let Some(tag) = map.next_key::<__FieldTag>()? {
19838 #[allow(clippy::match_single_binding)]
19839 match tag {
19840 __FieldTag::__dependency_targets => {
19841 if !fields.insert(__FieldTag::__dependency_targets) {
19842 return std::result::Result::Err(A::Error::duplicate_field(
19843 "multiple values for dependency_targets",
19844 ));
19845 }
19846 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
19847 }
19848 __FieldTag::__disabled => {
19849 if !fields.insert(__FieldTag::__disabled) {
19850 return std::result::Result::Err(A::Error::duplicate_field(
19851 "multiple values for disabled",
19852 ));
19853 }
19854 result.disabled = map
19855 .next_value::<std::option::Option<bool>>()?
19856 .unwrap_or_default();
19857 }
19858 __FieldTag::__tags => {
19859 if !fields.insert(__FieldTag::__tags) {
19860 return std::result::Result::Err(A::Error::duplicate_field(
19861 "multiple values for tags",
19862 ));
19863 }
19864 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19865 }
19866 __FieldTag::__relation_descriptor => {
19867 if !fields.insert(__FieldTag::__relation_descriptor) {
19868 return std::result::Result::Err(A::Error::duplicate_field(
19869 "multiple values for relation_descriptor",
19870 ));
19871 }
19872 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
19873 ;
19874 }
19875 __FieldTag::__relation_type => {
19876 if !fields.insert(__FieldTag::__relation_type) {
19877 return std::result::Result::Err(A::Error::duplicate_field(
19878 "multiple values for relation_type",
19879 ));
19880 }
19881 result.relation_type = map.next_value::<std::option::Option<crate::model::compilation_result_action::relation::RelationType>>()?.unwrap_or_default();
19882 }
19883 __FieldTag::__select_query => {
19884 if !fields.insert(__FieldTag::__select_query) {
19885 return std::result::Result::Err(A::Error::duplicate_field(
19886 "multiple values for select_query",
19887 ));
19888 }
19889 result.select_query = map
19890 .next_value::<std::option::Option<std::string::String>>()?
19891 .unwrap_or_default();
19892 }
19893 __FieldTag::__pre_operations => {
19894 if !fields.insert(__FieldTag::__pre_operations) {
19895 return std::result::Result::Err(A::Error::duplicate_field(
19896 "multiple values for pre_operations",
19897 ));
19898 }
19899 result.pre_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19900 }
19901 __FieldTag::__post_operations => {
19902 if !fields.insert(__FieldTag::__post_operations) {
19903 return std::result::Result::Err(A::Error::duplicate_field(
19904 "multiple values for post_operations",
19905 ));
19906 }
19907 result.post_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19908 }
19909 __FieldTag::__incremental_table_config => {
19910 if !fields.insert(__FieldTag::__incremental_table_config) {
19911 return std::result::Result::Err(A::Error::duplicate_field(
19912 "multiple values for incremental_table_config",
19913 ));
19914 }
19915 result.incremental_table_config = map.next_value::<std::option::Option<crate::model::compilation_result_action::relation::IncrementalTableConfig>>()?
19916 ;
19917 }
19918 __FieldTag::__partition_expression => {
19919 if !fields.insert(__FieldTag::__partition_expression) {
19920 return std::result::Result::Err(A::Error::duplicate_field(
19921 "multiple values for partition_expression",
19922 ));
19923 }
19924 result.partition_expression = map
19925 .next_value::<std::option::Option<std::string::String>>()?
19926 .unwrap_or_default();
19927 }
19928 __FieldTag::__cluster_expressions => {
19929 if !fields.insert(__FieldTag::__cluster_expressions) {
19930 return std::result::Result::Err(A::Error::duplicate_field(
19931 "multiple values for cluster_expressions",
19932 ));
19933 }
19934 result.cluster_expressions = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
19935 }
19936 __FieldTag::__partition_expiration_days => {
19937 if !fields.insert(__FieldTag::__partition_expiration_days) {
19938 return std::result::Result::Err(A::Error::duplicate_field(
19939 "multiple values for partition_expiration_days",
19940 ));
19941 }
19942 struct __With(std::option::Option<i32>);
19943 impl<'de> serde::de::Deserialize<'de> for __With {
19944 fn deserialize<D>(
19945 deserializer: D,
19946 ) -> std::result::Result<Self, D::Error>
19947 where
19948 D: serde::de::Deserializer<'de>,
19949 {
19950 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
19951 }
19952 }
19953 result.partition_expiration_days =
19954 map.next_value::<__With>()?.0.unwrap_or_default();
19955 }
19956 __FieldTag::__require_partition_filter => {
19957 if !fields.insert(__FieldTag::__require_partition_filter) {
19958 return std::result::Result::Err(A::Error::duplicate_field(
19959 "multiple values for require_partition_filter",
19960 ));
19961 }
19962 result.require_partition_filter = map
19963 .next_value::<std::option::Option<bool>>()?
19964 .unwrap_or_default();
19965 }
19966 __FieldTag::__additional_options => {
19967 if !fields.insert(__FieldTag::__additional_options) {
19968 return std::result::Result::Err(A::Error::duplicate_field(
19969 "multiple values for additional_options",
19970 ));
19971 }
19972 result.additional_options = map
19973 .next_value::<std::option::Option<
19974 std::collections::HashMap<
19975 std::string::String,
19976 std::string::String,
19977 >,
19978 >>()?
19979 .unwrap_or_default();
19980 }
19981 __FieldTag::Unknown(key) => {
19982 let value = map.next_value::<serde_json::Value>()?;
19983 result._unknown_fields.insert(key, value);
19984 }
19985 }
19986 }
19987 std::result::Result::Ok(result)
19988 }
19989 }
19990 deserializer.deserialize_any(Visitor)
19991 }
19992 }
19993
19994 #[doc(hidden)]
19995 impl serde::ser::Serialize for Relation {
19996 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19997 where
19998 S: serde::ser::Serializer,
19999 {
20000 use serde::ser::SerializeMap;
20001 #[allow(unused_imports)]
20002 use std::option::Option::Some;
20003 let mut state = serializer.serialize_map(std::option::Option::None)?;
20004 if !self.dependency_targets.is_empty() {
20005 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
20006 }
20007 if !wkt::internal::is_default(&self.disabled) {
20008 state.serialize_entry("disabled", &self.disabled)?;
20009 }
20010 if !self.tags.is_empty() {
20011 state.serialize_entry("tags", &self.tags)?;
20012 }
20013 if self.relation_descriptor.is_some() {
20014 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
20015 }
20016 if !wkt::internal::is_default(&self.relation_type) {
20017 state.serialize_entry("relationType", &self.relation_type)?;
20018 }
20019 if !self.select_query.is_empty() {
20020 state.serialize_entry("selectQuery", &self.select_query)?;
20021 }
20022 if !self.pre_operations.is_empty() {
20023 state.serialize_entry("preOperations", &self.pre_operations)?;
20024 }
20025 if !self.post_operations.is_empty() {
20026 state.serialize_entry("postOperations", &self.post_operations)?;
20027 }
20028 if self.incremental_table_config.is_some() {
20029 state.serialize_entry("incrementalTableConfig", &self.incremental_table_config)?;
20030 }
20031 if !self.partition_expression.is_empty() {
20032 state.serialize_entry("partitionExpression", &self.partition_expression)?;
20033 }
20034 if !self.cluster_expressions.is_empty() {
20035 state.serialize_entry("clusterExpressions", &self.cluster_expressions)?;
20036 }
20037 if !wkt::internal::is_default(&self.partition_expiration_days) {
20038 struct __With<'a>(&'a i32);
20039 impl<'a> serde::ser::Serialize for __With<'a> {
20040 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20041 where
20042 S: serde::ser::Serializer,
20043 {
20044 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
20045 }
20046 }
20047 state.serialize_entry(
20048 "partitionExpirationDays",
20049 &__With(&self.partition_expiration_days),
20050 )?;
20051 }
20052 if !wkt::internal::is_default(&self.require_partition_filter) {
20053 state.serialize_entry("requirePartitionFilter", &self.require_partition_filter)?;
20054 }
20055 if !self.additional_options.is_empty() {
20056 state.serialize_entry("additionalOptions", &self.additional_options)?;
20057 }
20058 if !self._unknown_fields.is_empty() {
20059 for (key, value) in self._unknown_fields.iter() {
20060 state.serialize_entry(key, &value)?;
20061 }
20062 }
20063 state.end()
20064 }
20065 }
20066
20067 impl std::fmt::Debug for Relation {
20068 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20069 let mut debug_struct = f.debug_struct("Relation");
20070 debug_struct.field("dependency_targets", &self.dependency_targets);
20071 debug_struct.field("disabled", &self.disabled);
20072 debug_struct.field("tags", &self.tags);
20073 debug_struct.field("relation_descriptor", &self.relation_descriptor);
20074 debug_struct.field("relation_type", &self.relation_type);
20075 debug_struct.field("select_query", &self.select_query);
20076 debug_struct.field("pre_operations", &self.pre_operations);
20077 debug_struct.field("post_operations", &self.post_operations);
20078 debug_struct.field("incremental_table_config", &self.incremental_table_config);
20079 debug_struct.field("partition_expression", &self.partition_expression);
20080 debug_struct.field("cluster_expressions", &self.cluster_expressions);
20081 debug_struct.field("partition_expiration_days", &self.partition_expiration_days);
20082 debug_struct.field("require_partition_filter", &self.require_partition_filter);
20083 debug_struct.field("additional_options", &self.additional_options);
20084 if !self._unknown_fields.is_empty() {
20085 debug_struct.field("_unknown_fields", &self._unknown_fields);
20086 }
20087 debug_struct.finish()
20088 }
20089 }
20090
20091 pub mod relation {
20093 #[allow(unused_imports)]
20094 use super::*;
20095
20096 #[derive(Clone, Default, PartialEq)]
20098 #[non_exhaustive]
20099 pub struct IncrementalTableConfig {
20100 pub incremental_select_query: std::string::String,
20103
20104 pub refresh_disabled: bool,
20106
20107 pub unique_key_parts: std::vec::Vec<std::string::String>,
20112
20113 pub update_partition_filter: std::string::String,
20117
20118 pub incremental_pre_operations: std::vec::Vec<std::string::String>,
20121
20122 pub incremental_post_operations: std::vec::Vec<std::string::String>,
20125
20126 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20127 }
20128
20129 impl IncrementalTableConfig {
20130 pub fn new() -> Self {
20131 std::default::Default::default()
20132 }
20133
20134 pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
20136 mut self,
20137 v: T,
20138 ) -> Self {
20139 self.incremental_select_query = v.into();
20140 self
20141 }
20142
20143 pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20145 self.refresh_disabled = v.into();
20146 self
20147 }
20148
20149 pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
20151 where
20152 T: std::iter::IntoIterator<Item = V>,
20153 V: std::convert::Into<std::string::String>,
20154 {
20155 use std::iter::Iterator;
20156 self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
20157 self
20158 }
20159
20160 pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
20162 mut self,
20163 v: T,
20164 ) -> Self {
20165 self.update_partition_filter = v.into();
20166 self
20167 }
20168
20169 pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
20171 where
20172 T: std::iter::IntoIterator<Item = V>,
20173 V: std::convert::Into<std::string::String>,
20174 {
20175 use std::iter::Iterator;
20176 self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
20177 self
20178 }
20179
20180 pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
20182 where
20183 T: std::iter::IntoIterator<Item = V>,
20184 V: std::convert::Into<std::string::String>,
20185 {
20186 use std::iter::Iterator;
20187 self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
20188 self
20189 }
20190 }
20191
20192 impl wkt::message::Message for IncrementalTableConfig {
20193 fn typename() -> &'static str {
20194 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
20195 }
20196 }
20197
20198 #[doc(hidden)]
20199 impl<'de> serde::de::Deserialize<'de> for IncrementalTableConfig {
20200 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20201 where
20202 D: serde::Deserializer<'de>,
20203 {
20204 #[allow(non_camel_case_types)]
20205 #[doc(hidden)]
20206 #[derive(PartialEq, Eq, Hash)]
20207 enum __FieldTag {
20208 __incremental_select_query,
20209 __refresh_disabled,
20210 __unique_key_parts,
20211 __update_partition_filter,
20212 __incremental_pre_operations,
20213 __incremental_post_operations,
20214 Unknown(std::string::String),
20215 }
20216 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
20217 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20218 where
20219 D: serde::Deserializer<'de>,
20220 {
20221 struct Visitor;
20222 impl<'de> serde::de::Visitor<'de> for Visitor {
20223 type Value = __FieldTag;
20224 fn expecting(
20225 &self,
20226 formatter: &mut std::fmt::Formatter,
20227 ) -> std::fmt::Result {
20228 formatter.write_str("a field name for IncrementalTableConfig")
20229 }
20230 fn visit_str<E>(
20231 self,
20232 value: &str,
20233 ) -> std::result::Result<Self::Value, E>
20234 where
20235 E: serde::de::Error,
20236 {
20237 use std::result::Result::Ok;
20238 use std::string::ToString;
20239 match value {
20240 "incrementalSelectQuery" => {
20241 Ok(__FieldTag::__incremental_select_query)
20242 }
20243 "incremental_select_query" => {
20244 Ok(__FieldTag::__incremental_select_query)
20245 }
20246 "refreshDisabled" => Ok(__FieldTag::__refresh_disabled),
20247 "refresh_disabled" => Ok(__FieldTag::__refresh_disabled),
20248 "uniqueKeyParts" => Ok(__FieldTag::__unique_key_parts),
20249 "unique_key_parts" => Ok(__FieldTag::__unique_key_parts),
20250 "updatePartitionFilter" => {
20251 Ok(__FieldTag::__update_partition_filter)
20252 }
20253 "update_partition_filter" => {
20254 Ok(__FieldTag::__update_partition_filter)
20255 }
20256 "incrementalPreOperations" => {
20257 Ok(__FieldTag::__incremental_pre_operations)
20258 }
20259 "incremental_pre_operations" => {
20260 Ok(__FieldTag::__incremental_pre_operations)
20261 }
20262 "incrementalPostOperations" => {
20263 Ok(__FieldTag::__incremental_post_operations)
20264 }
20265 "incremental_post_operations" => {
20266 Ok(__FieldTag::__incremental_post_operations)
20267 }
20268 _ => Ok(__FieldTag::Unknown(value.to_string())),
20269 }
20270 }
20271 }
20272 deserializer.deserialize_identifier(Visitor)
20273 }
20274 }
20275 struct Visitor;
20276 impl<'de> serde::de::Visitor<'de> for Visitor {
20277 type Value = IncrementalTableConfig;
20278 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20279 formatter.write_str("struct IncrementalTableConfig")
20280 }
20281 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
20282 where
20283 A: serde::de::MapAccess<'de>,
20284 {
20285 #[allow(unused_imports)]
20286 use serde::de::Error;
20287 use std::option::Option::Some;
20288 let mut fields = std::collections::HashSet::new();
20289 let mut result = Self::Value::new();
20290 while let Some(tag) = map.next_key::<__FieldTag>()? {
20291 #[allow(clippy::match_single_binding)]
20292 match tag {
20293 __FieldTag::__incremental_select_query => {
20294 if !fields.insert(__FieldTag::__incremental_select_query) {
20295 return std::result::Result::Err(
20296 A::Error::duplicate_field(
20297 "multiple values for incremental_select_query",
20298 ),
20299 );
20300 }
20301 result.incremental_select_query = map
20302 .next_value::<std::option::Option<std::string::String>>()?
20303 .unwrap_or_default();
20304 }
20305 __FieldTag::__refresh_disabled => {
20306 if !fields.insert(__FieldTag::__refresh_disabled) {
20307 return std::result::Result::Err(
20308 A::Error::duplicate_field(
20309 "multiple values for refresh_disabled",
20310 ),
20311 );
20312 }
20313 result.refresh_disabled = map
20314 .next_value::<std::option::Option<bool>>()?
20315 .unwrap_or_default();
20316 }
20317 __FieldTag::__unique_key_parts => {
20318 if !fields.insert(__FieldTag::__unique_key_parts) {
20319 return std::result::Result::Err(
20320 A::Error::duplicate_field(
20321 "multiple values for unique_key_parts",
20322 ),
20323 );
20324 }
20325 result.unique_key_parts = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
20326 }
20327 __FieldTag::__update_partition_filter => {
20328 if !fields.insert(__FieldTag::__update_partition_filter) {
20329 return std::result::Result::Err(
20330 A::Error::duplicate_field(
20331 "multiple values for update_partition_filter",
20332 ),
20333 );
20334 }
20335 result.update_partition_filter = map
20336 .next_value::<std::option::Option<std::string::String>>()?
20337 .unwrap_or_default();
20338 }
20339 __FieldTag::__incremental_pre_operations => {
20340 if !fields.insert(__FieldTag::__incremental_pre_operations) {
20341 return std::result::Result::Err(
20342 A::Error::duplicate_field(
20343 "multiple values for incremental_pre_operations",
20344 ),
20345 );
20346 }
20347 result.incremental_pre_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
20348 }
20349 __FieldTag::__incremental_post_operations => {
20350 if !fields.insert(__FieldTag::__incremental_post_operations) {
20351 return std::result::Result::Err(
20352 A::Error::duplicate_field(
20353 "multiple values for incremental_post_operations",
20354 ),
20355 );
20356 }
20357 result.incremental_post_operations = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
20358 }
20359 __FieldTag::Unknown(key) => {
20360 let value = map.next_value::<serde_json::Value>()?;
20361 result._unknown_fields.insert(key, value);
20362 }
20363 }
20364 }
20365 std::result::Result::Ok(result)
20366 }
20367 }
20368 deserializer.deserialize_any(Visitor)
20369 }
20370 }
20371
20372 #[doc(hidden)]
20373 impl serde::ser::Serialize for IncrementalTableConfig {
20374 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20375 where
20376 S: serde::ser::Serializer,
20377 {
20378 use serde::ser::SerializeMap;
20379 #[allow(unused_imports)]
20380 use std::option::Option::Some;
20381 let mut state = serializer.serialize_map(std::option::Option::None)?;
20382 if !self.incremental_select_query.is_empty() {
20383 state.serialize_entry(
20384 "incrementalSelectQuery",
20385 &self.incremental_select_query,
20386 )?;
20387 }
20388 if !wkt::internal::is_default(&self.refresh_disabled) {
20389 state.serialize_entry("refreshDisabled", &self.refresh_disabled)?;
20390 }
20391 if !self.unique_key_parts.is_empty() {
20392 state.serialize_entry("uniqueKeyParts", &self.unique_key_parts)?;
20393 }
20394 if !self.update_partition_filter.is_empty() {
20395 state
20396 .serialize_entry("updatePartitionFilter", &self.update_partition_filter)?;
20397 }
20398 if !self.incremental_pre_operations.is_empty() {
20399 state.serialize_entry(
20400 "incrementalPreOperations",
20401 &self.incremental_pre_operations,
20402 )?;
20403 }
20404 if !self.incremental_post_operations.is_empty() {
20405 state.serialize_entry(
20406 "incrementalPostOperations",
20407 &self.incremental_post_operations,
20408 )?;
20409 }
20410 if !self._unknown_fields.is_empty() {
20411 for (key, value) in self._unknown_fields.iter() {
20412 state.serialize_entry(key, &value)?;
20413 }
20414 }
20415 state.end()
20416 }
20417 }
20418
20419 impl std::fmt::Debug for IncrementalTableConfig {
20420 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20421 let mut debug_struct = f.debug_struct("IncrementalTableConfig");
20422 debug_struct.field("incremental_select_query", &self.incremental_select_query);
20423 debug_struct.field("refresh_disabled", &self.refresh_disabled);
20424 debug_struct.field("unique_key_parts", &self.unique_key_parts);
20425 debug_struct.field("update_partition_filter", &self.update_partition_filter);
20426 debug_struct.field(
20427 "incremental_pre_operations",
20428 &self.incremental_pre_operations,
20429 );
20430 debug_struct.field(
20431 "incremental_post_operations",
20432 &self.incremental_post_operations,
20433 );
20434 if !self._unknown_fields.is_empty() {
20435 debug_struct.field("_unknown_fields", &self._unknown_fields);
20436 }
20437 debug_struct.finish()
20438 }
20439 }
20440
20441 #[derive(Clone, Debug, PartialEq)]
20457 #[non_exhaustive]
20458 pub enum RelationType {
20459 Unspecified,
20461 Table,
20463 View,
20465 IncrementalTable,
20467 MaterializedView,
20469 UnknownValue(relation_type::UnknownValue),
20474 }
20475
20476 #[doc(hidden)]
20477 pub mod relation_type {
20478 #[allow(unused_imports)]
20479 use super::*;
20480 #[derive(Clone, Debug, PartialEq)]
20481 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
20482 }
20483
20484 impl RelationType {
20485 pub fn value(&self) -> std::option::Option<i32> {
20490 match self {
20491 Self::Unspecified => std::option::Option::Some(0),
20492 Self::Table => std::option::Option::Some(1),
20493 Self::View => std::option::Option::Some(2),
20494 Self::IncrementalTable => std::option::Option::Some(3),
20495 Self::MaterializedView => std::option::Option::Some(4),
20496 Self::UnknownValue(u) => u.0.value(),
20497 }
20498 }
20499
20500 pub fn name(&self) -> std::option::Option<&str> {
20505 match self {
20506 Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
20507 Self::Table => std::option::Option::Some("TABLE"),
20508 Self::View => std::option::Option::Some("VIEW"),
20509 Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
20510 Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
20511 Self::UnknownValue(u) => u.0.name(),
20512 }
20513 }
20514 }
20515
20516 impl std::default::Default for RelationType {
20517 fn default() -> Self {
20518 use std::convert::From;
20519 Self::from(0)
20520 }
20521 }
20522
20523 impl std::fmt::Display for RelationType {
20524 fn fmt(
20525 &self,
20526 f: &mut std::fmt::Formatter<'_>,
20527 ) -> std::result::Result<(), std::fmt::Error> {
20528 wkt::internal::display_enum(f, self.name(), self.value())
20529 }
20530 }
20531
20532 impl std::convert::From<i32> for RelationType {
20533 fn from(value: i32) -> Self {
20534 match value {
20535 0 => Self::Unspecified,
20536 1 => Self::Table,
20537 2 => Self::View,
20538 3 => Self::IncrementalTable,
20539 4 => Self::MaterializedView,
20540 _ => Self::UnknownValue(relation_type::UnknownValue(
20541 wkt::internal::UnknownEnumValue::Integer(value),
20542 )),
20543 }
20544 }
20545 }
20546
20547 impl std::convert::From<&str> for RelationType {
20548 fn from(value: &str) -> Self {
20549 use std::string::ToString;
20550 match value {
20551 "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
20552 "TABLE" => Self::Table,
20553 "VIEW" => Self::View,
20554 "INCREMENTAL_TABLE" => Self::IncrementalTable,
20555 "MATERIALIZED_VIEW" => Self::MaterializedView,
20556 _ => Self::UnknownValue(relation_type::UnknownValue(
20557 wkt::internal::UnknownEnumValue::String(value.to_string()),
20558 )),
20559 }
20560 }
20561 }
20562
20563 impl serde::ser::Serialize for RelationType {
20564 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20565 where
20566 S: serde::Serializer,
20567 {
20568 match self {
20569 Self::Unspecified => serializer.serialize_i32(0),
20570 Self::Table => serializer.serialize_i32(1),
20571 Self::View => serializer.serialize_i32(2),
20572 Self::IncrementalTable => serializer.serialize_i32(3),
20573 Self::MaterializedView => serializer.serialize_i32(4),
20574 Self::UnknownValue(u) => u.0.serialize(serializer),
20575 }
20576 }
20577 }
20578
20579 impl<'de> serde::de::Deserialize<'de> for RelationType {
20580 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20581 where
20582 D: serde::Deserializer<'de>,
20583 {
20584 deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
20585 ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
20586 ))
20587 }
20588 }
20589 }
20590
20591 #[derive(Clone, Default, PartialEq)]
20593 #[non_exhaustive]
20594 pub struct Operations {
20595 pub dependency_targets: std::vec::Vec<crate::model::Target>,
20597
20598 pub disabled: bool,
20600
20601 pub tags: std::vec::Vec<std::string::String>,
20603
20604 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
20607
20608 pub queries: std::vec::Vec<std::string::String>,
20611
20612 pub has_output: bool,
20614
20615 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20616 }
20617
20618 impl Operations {
20619 pub fn new() -> Self {
20620 std::default::Default::default()
20621 }
20622
20623 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
20625 where
20626 T: std::iter::IntoIterator<Item = V>,
20627 V: std::convert::Into<crate::model::Target>,
20628 {
20629 use std::iter::Iterator;
20630 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
20631 self
20632 }
20633
20634 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20636 self.disabled = v.into();
20637 self
20638 }
20639
20640 pub fn set_tags<T, V>(mut self, v: T) -> Self
20642 where
20643 T: std::iter::IntoIterator<Item = V>,
20644 V: std::convert::Into<std::string::String>,
20645 {
20646 use std::iter::Iterator;
20647 self.tags = v.into_iter().map(|i| i.into()).collect();
20648 self
20649 }
20650
20651 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
20653 where
20654 T: std::convert::Into<crate::model::RelationDescriptor>,
20655 {
20656 self.relation_descriptor = std::option::Option::Some(v.into());
20657 self
20658 }
20659
20660 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
20662 where
20663 T: std::convert::Into<crate::model::RelationDescriptor>,
20664 {
20665 self.relation_descriptor = v.map(|x| x.into());
20666 self
20667 }
20668
20669 pub fn set_queries<T, V>(mut self, v: T) -> Self
20671 where
20672 T: std::iter::IntoIterator<Item = V>,
20673 V: std::convert::Into<std::string::String>,
20674 {
20675 use std::iter::Iterator;
20676 self.queries = v.into_iter().map(|i| i.into()).collect();
20677 self
20678 }
20679
20680 pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20682 self.has_output = v.into();
20683 self
20684 }
20685 }
20686
20687 impl wkt::message::Message for Operations {
20688 fn typename() -> &'static str {
20689 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
20690 }
20691 }
20692
20693 #[doc(hidden)]
20694 impl<'de> serde::de::Deserialize<'de> for Operations {
20695 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20696 where
20697 D: serde::Deserializer<'de>,
20698 {
20699 #[allow(non_camel_case_types)]
20700 #[doc(hidden)]
20701 #[derive(PartialEq, Eq, Hash)]
20702 enum __FieldTag {
20703 __dependency_targets,
20704 __disabled,
20705 __tags,
20706 __relation_descriptor,
20707 __queries,
20708 __has_output,
20709 Unknown(std::string::String),
20710 }
20711 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
20712 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
20713 where
20714 D: serde::Deserializer<'de>,
20715 {
20716 struct Visitor;
20717 impl<'de> serde::de::Visitor<'de> for Visitor {
20718 type Value = __FieldTag;
20719 fn expecting(
20720 &self,
20721 formatter: &mut std::fmt::Formatter,
20722 ) -> std::fmt::Result {
20723 formatter.write_str("a field name for Operations")
20724 }
20725 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
20726 where
20727 E: serde::de::Error,
20728 {
20729 use std::result::Result::Ok;
20730 use std::string::ToString;
20731 match value {
20732 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
20733 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
20734 "disabled" => Ok(__FieldTag::__disabled),
20735 "tags" => Ok(__FieldTag::__tags),
20736 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
20737 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
20738 "queries" => Ok(__FieldTag::__queries),
20739 "hasOutput" => Ok(__FieldTag::__has_output),
20740 "has_output" => Ok(__FieldTag::__has_output),
20741 _ => Ok(__FieldTag::Unknown(value.to_string())),
20742 }
20743 }
20744 }
20745 deserializer.deserialize_identifier(Visitor)
20746 }
20747 }
20748 struct Visitor;
20749 impl<'de> serde::de::Visitor<'de> for Visitor {
20750 type Value = Operations;
20751 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
20752 formatter.write_str("struct Operations")
20753 }
20754 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
20755 where
20756 A: serde::de::MapAccess<'de>,
20757 {
20758 #[allow(unused_imports)]
20759 use serde::de::Error;
20760 use std::option::Option::Some;
20761 let mut fields = std::collections::HashSet::new();
20762 let mut result = Self::Value::new();
20763 while let Some(tag) = map.next_key::<__FieldTag>()? {
20764 #[allow(clippy::match_single_binding)]
20765 match tag {
20766 __FieldTag::__dependency_targets => {
20767 if !fields.insert(__FieldTag::__dependency_targets) {
20768 return std::result::Result::Err(A::Error::duplicate_field(
20769 "multiple values for dependency_targets",
20770 ));
20771 }
20772 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
20773 }
20774 __FieldTag::__disabled => {
20775 if !fields.insert(__FieldTag::__disabled) {
20776 return std::result::Result::Err(A::Error::duplicate_field(
20777 "multiple values for disabled",
20778 ));
20779 }
20780 result.disabled = map
20781 .next_value::<std::option::Option<bool>>()?
20782 .unwrap_or_default();
20783 }
20784 __FieldTag::__tags => {
20785 if !fields.insert(__FieldTag::__tags) {
20786 return std::result::Result::Err(A::Error::duplicate_field(
20787 "multiple values for tags",
20788 ));
20789 }
20790 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
20791 }
20792 __FieldTag::__relation_descriptor => {
20793 if !fields.insert(__FieldTag::__relation_descriptor) {
20794 return std::result::Result::Err(A::Error::duplicate_field(
20795 "multiple values for relation_descriptor",
20796 ));
20797 }
20798 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
20799 ;
20800 }
20801 __FieldTag::__queries => {
20802 if !fields.insert(__FieldTag::__queries) {
20803 return std::result::Result::Err(A::Error::duplicate_field(
20804 "multiple values for queries",
20805 ));
20806 }
20807 result.queries = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
20808 }
20809 __FieldTag::__has_output => {
20810 if !fields.insert(__FieldTag::__has_output) {
20811 return std::result::Result::Err(A::Error::duplicate_field(
20812 "multiple values for has_output",
20813 ));
20814 }
20815 result.has_output = map
20816 .next_value::<std::option::Option<bool>>()?
20817 .unwrap_or_default();
20818 }
20819 __FieldTag::Unknown(key) => {
20820 let value = map.next_value::<serde_json::Value>()?;
20821 result._unknown_fields.insert(key, value);
20822 }
20823 }
20824 }
20825 std::result::Result::Ok(result)
20826 }
20827 }
20828 deserializer.deserialize_any(Visitor)
20829 }
20830 }
20831
20832 #[doc(hidden)]
20833 impl serde::ser::Serialize for Operations {
20834 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
20835 where
20836 S: serde::ser::Serializer,
20837 {
20838 use serde::ser::SerializeMap;
20839 #[allow(unused_imports)]
20840 use std::option::Option::Some;
20841 let mut state = serializer.serialize_map(std::option::Option::None)?;
20842 if !self.dependency_targets.is_empty() {
20843 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
20844 }
20845 if !wkt::internal::is_default(&self.disabled) {
20846 state.serialize_entry("disabled", &self.disabled)?;
20847 }
20848 if !self.tags.is_empty() {
20849 state.serialize_entry("tags", &self.tags)?;
20850 }
20851 if self.relation_descriptor.is_some() {
20852 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
20853 }
20854 if !self.queries.is_empty() {
20855 state.serialize_entry("queries", &self.queries)?;
20856 }
20857 if !wkt::internal::is_default(&self.has_output) {
20858 state.serialize_entry("hasOutput", &self.has_output)?;
20859 }
20860 if !self._unknown_fields.is_empty() {
20861 for (key, value) in self._unknown_fields.iter() {
20862 state.serialize_entry(key, &value)?;
20863 }
20864 }
20865 state.end()
20866 }
20867 }
20868
20869 impl std::fmt::Debug for Operations {
20870 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20871 let mut debug_struct = f.debug_struct("Operations");
20872 debug_struct.field("dependency_targets", &self.dependency_targets);
20873 debug_struct.field("disabled", &self.disabled);
20874 debug_struct.field("tags", &self.tags);
20875 debug_struct.field("relation_descriptor", &self.relation_descriptor);
20876 debug_struct.field("queries", &self.queries);
20877 debug_struct.field("has_output", &self.has_output);
20878 if !self._unknown_fields.is_empty() {
20879 debug_struct.field("_unknown_fields", &self._unknown_fields);
20880 }
20881 debug_struct.finish()
20882 }
20883 }
20884
20885 #[derive(Clone, Default, PartialEq)]
20888 #[non_exhaustive]
20889 pub struct Assertion {
20890 pub dependency_targets: std::vec::Vec<crate::model::Target>,
20892
20893 pub parent_action: std::option::Option<crate::model::Target>,
20896
20897 pub disabled: bool,
20899
20900 pub tags: std::vec::Vec<std::string::String>,
20902
20903 pub select_query: std::string::String,
20906
20907 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
20910
20911 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
20912 }
20913
20914 impl Assertion {
20915 pub fn new() -> Self {
20916 std::default::Default::default()
20917 }
20918
20919 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
20921 where
20922 T: std::iter::IntoIterator<Item = V>,
20923 V: std::convert::Into<crate::model::Target>,
20924 {
20925 use std::iter::Iterator;
20926 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
20927 self
20928 }
20929
20930 pub fn set_parent_action<T>(mut self, v: T) -> Self
20932 where
20933 T: std::convert::Into<crate::model::Target>,
20934 {
20935 self.parent_action = std::option::Option::Some(v.into());
20936 self
20937 }
20938
20939 pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
20941 where
20942 T: std::convert::Into<crate::model::Target>,
20943 {
20944 self.parent_action = v.map(|x| x.into());
20945 self
20946 }
20947
20948 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
20950 self.disabled = v.into();
20951 self
20952 }
20953
20954 pub fn set_tags<T, V>(mut self, v: T) -> Self
20956 where
20957 T: std::iter::IntoIterator<Item = V>,
20958 V: std::convert::Into<std::string::String>,
20959 {
20960 use std::iter::Iterator;
20961 self.tags = v.into_iter().map(|i| i.into()).collect();
20962 self
20963 }
20964
20965 pub fn set_select_query<T: std::convert::Into<std::string::String>>(
20967 mut self,
20968 v: T,
20969 ) -> Self {
20970 self.select_query = v.into();
20971 self
20972 }
20973
20974 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
20976 where
20977 T: std::convert::Into<crate::model::RelationDescriptor>,
20978 {
20979 self.relation_descriptor = std::option::Option::Some(v.into());
20980 self
20981 }
20982
20983 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
20985 where
20986 T: std::convert::Into<crate::model::RelationDescriptor>,
20987 {
20988 self.relation_descriptor = v.map(|x| x.into());
20989 self
20990 }
20991 }
20992
20993 impl wkt::message::Message for Assertion {
20994 fn typename() -> &'static str {
20995 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
20996 }
20997 }
20998
20999 #[doc(hidden)]
21000 impl<'de> serde::de::Deserialize<'de> for Assertion {
21001 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21002 where
21003 D: serde::Deserializer<'de>,
21004 {
21005 #[allow(non_camel_case_types)]
21006 #[doc(hidden)]
21007 #[derive(PartialEq, Eq, Hash)]
21008 enum __FieldTag {
21009 __dependency_targets,
21010 __parent_action,
21011 __disabled,
21012 __tags,
21013 __select_query,
21014 __relation_descriptor,
21015 Unknown(std::string::String),
21016 }
21017 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21018 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21019 where
21020 D: serde::Deserializer<'de>,
21021 {
21022 struct Visitor;
21023 impl<'de> serde::de::Visitor<'de> for Visitor {
21024 type Value = __FieldTag;
21025 fn expecting(
21026 &self,
21027 formatter: &mut std::fmt::Formatter,
21028 ) -> std::fmt::Result {
21029 formatter.write_str("a field name for Assertion")
21030 }
21031 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21032 where
21033 E: serde::de::Error,
21034 {
21035 use std::result::Result::Ok;
21036 use std::string::ToString;
21037 match value {
21038 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
21039 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
21040 "parentAction" => Ok(__FieldTag::__parent_action),
21041 "parent_action" => Ok(__FieldTag::__parent_action),
21042 "disabled" => Ok(__FieldTag::__disabled),
21043 "tags" => Ok(__FieldTag::__tags),
21044 "selectQuery" => Ok(__FieldTag::__select_query),
21045 "select_query" => Ok(__FieldTag::__select_query),
21046 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
21047 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
21048 _ => Ok(__FieldTag::Unknown(value.to_string())),
21049 }
21050 }
21051 }
21052 deserializer.deserialize_identifier(Visitor)
21053 }
21054 }
21055 struct Visitor;
21056 impl<'de> serde::de::Visitor<'de> for Visitor {
21057 type Value = Assertion;
21058 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21059 formatter.write_str("struct Assertion")
21060 }
21061 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21062 where
21063 A: serde::de::MapAccess<'de>,
21064 {
21065 #[allow(unused_imports)]
21066 use serde::de::Error;
21067 use std::option::Option::Some;
21068 let mut fields = std::collections::HashSet::new();
21069 let mut result = Self::Value::new();
21070 while let Some(tag) = map.next_key::<__FieldTag>()? {
21071 #[allow(clippy::match_single_binding)]
21072 match tag {
21073 __FieldTag::__dependency_targets => {
21074 if !fields.insert(__FieldTag::__dependency_targets) {
21075 return std::result::Result::Err(A::Error::duplicate_field(
21076 "multiple values for dependency_targets",
21077 ));
21078 }
21079 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
21080 }
21081 __FieldTag::__parent_action => {
21082 if !fields.insert(__FieldTag::__parent_action) {
21083 return std::result::Result::Err(A::Error::duplicate_field(
21084 "multiple values for parent_action",
21085 ));
21086 }
21087 result.parent_action =
21088 map.next_value::<std::option::Option<crate::model::Target>>()?;
21089 }
21090 __FieldTag::__disabled => {
21091 if !fields.insert(__FieldTag::__disabled) {
21092 return std::result::Result::Err(A::Error::duplicate_field(
21093 "multiple values for disabled",
21094 ));
21095 }
21096 result.disabled = map
21097 .next_value::<std::option::Option<bool>>()?
21098 .unwrap_or_default();
21099 }
21100 __FieldTag::__tags => {
21101 if !fields.insert(__FieldTag::__tags) {
21102 return std::result::Result::Err(A::Error::duplicate_field(
21103 "multiple values for tags",
21104 ));
21105 }
21106 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
21107 }
21108 __FieldTag::__select_query => {
21109 if !fields.insert(__FieldTag::__select_query) {
21110 return std::result::Result::Err(A::Error::duplicate_field(
21111 "multiple values for select_query",
21112 ));
21113 }
21114 result.select_query = map
21115 .next_value::<std::option::Option<std::string::String>>()?
21116 .unwrap_or_default();
21117 }
21118 __FieldTag::__relation_descriptor => {
21119 if !fields.insert(__FieldTag::__relation_descriptor) {
21120 return std::result::Result::Err(A::Error::duplicate_field(
21121 "multiple values for relation_descriptor",
21122 ));
21123 }
21124 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
21125 ;
21126 }
21127 __FieldTag::Unknown(key) => {
21128 let value = map.next_value::<serde_json::Value>()?;
21129 result._unknown_fields.insert(key, value);
21130 }
21131 }
21132 }
21133 std::result::Result::Ok(result)
21134 }
21135 }
21136 deserializer.deserialize_any(Visitor)
21137 }
21138 }
21139
21140 #[doc(hidden)]
21141 impl serde::ser::Serialize for Assertion {
21142 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21143 where
21144 S: serde::ser::Serializer,
21145 {
21146 use serde::ser::SerializeMap;
21147 #[allow(unused_imports)]
21148 use std::option::Option::Some;
21149 let mut state = serializer.serialize_map(std::option::Option::None)?;
21150 if !self.dependency_targets.is_empty() {
21151 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
21152 }
21153 if self.parent_action.is_some() {
21154 state.serialize_entry("parentAction", &self.parent_action)?;
21155 }
21156 if !wkt::internal::is_default(&self.disabled) {
21157 state.serialize_entry("disabled", &self.disabled)?;
21158 }
21159 if !self.tags.is_empty() {
21160 state.serialize_entry("tags", &self.tags)?;
21161 }
21162 if !self.select_query.is_empty() {
21163 state.serialize_entry("selectQuery", &self.select_query)?;
21164 }
21165 if self.relation_descriptor.is_some() {
21166 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
21167 }
21168 if !self._unknown_fields.is_empty() {
21169 for (key, value) in self._unknown_fields.iter() {
21170 state.serialize_entry(key, &value)?;
21171 }
21172 }
21173 state.end()
21174 }
21175 }
21176
21177 impl std::fmt::Debug for Assertion {
21178 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21179 let mut debug_struct = f.debug_struct("Assertion");
21180 debug_struct.field("dependency_targets", &self.dependency_targets);
21181 debug_struct.field("parent_action", &self.parent_action);
21182 debug_struct.field("disabled", &self.disabled);
21183 debug_struct.field("tags", &self.tags);
21184 debug_struct.field("select_query", &self.select_query);
21185 debug_struct.field("relation_descriptor", &self.relation_descriptor);
21186 if !self._unknown_fields.is_empty() {
21187 debug_struct.field("_unknown_fields", &self._unknown_fields);
21188 }
21189 debug_struct.finish()
21190 }
21191 }
21192
21193 #[derive(Clone, Default, PartialEq)]
21196 #[non_exhaustive]
21197 pub struct Declaration {
21198 pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
21201
21202 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21203 }
21204
21205 impl Declaration {
21206 pub fn new() -> Self {
21207 std::default::Default::default()
21208 }
21209
21210 pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
21212 where
21213 T: std::convert::Into<crate::model::RelationDescriptor>,
21214 {
21215 self.relation_descriptor = std::option::Option::Some(v.into());
21216 self
21217 }
21218
21219 pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
21221 where
21222 T: std::convert::Into<crate::model::RelationDescriptor>,
21223 {
21224 self.relation_descriptor = v.map(|x| x.into());
21225 self
21226 }
21227 }
21228
21229 impl wkt::message::Message for Declaration {
21230 fn typename() -> &'static str {
21231 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
21232 }
21233 }
21234
21235 #[doc(hidden)]
21236 impl<'de> serde::de::Deserialize<'de> for Declaration {
21237 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21238 where
21239 D: serde::Deserializer<'de>,
21240 {
21241 #[allow(non_camel_case_types)]
21242 #[doc(hidden)]
21243 #[derive(PartialEq, Eq, Hash)]
21244 enum __FieldTag {
21245 __relation_descriptor,
21246 Unknown(std::string::String),
21247 }
21248 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21249 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21250 where
21251 D: serde::Deserializer<'de>,
21252 {
21253 struct Visitor;
21254 impl<'de> serde::de::Visitor<'de> for Visitor {
21255 type Value = __FieldTag;
21256 fn expecting(
21257 &self,
21258 formatter: &mut std::fmt::Formatter,
21259 ) -> std::fmt::Result {
21260 formatter.write_str("a field name for Declaration")
21261 }
21262 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21263 where
21264 E: serde::de::Error,
21265 {
21266 use std::result::Result::Ok;
21267 use std::string::ToString;
21268 match value {
21269 "relationDescriptor" => Ok(__FieldTag::__relation_descriptor),
21270 "relation_descriptor" => Ok(__FieldTag::__relation_descriptor),
21271 _ => Ok(__FieldTag::Unknown(value.to_string())),
21272 }
21273 }
21274 }
21275 deserializer.deserialize_identifier(Visitor)
21276 }
21277 }
21278 struct Visitor;
21279 impl<'de> serde::de::Visitor<'de> for Visitor {
21280 type Value = Declaration;
21281 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21282 formatter.write_str("struct Declaration")
21283 }
21284 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21285 where
21286 A: serde::de::MapAccess<'de>,
21287 {
21288 #[allow(unused_imports)]
21289 use serde::de::Error;
21290 use std::option::Option::Some;
21291 let mut fields = std::collections::HashSet::new();
21292 let mut result = Self::Value::new();
21293 while let Some(tag) = map.next_key::<__FieldTag>()? {
21294 #[allow(clippy::match_single_binding)]
21295 match tag {
21296 __FieldTag::__relation_descriptor => {
21297 if !fields.insert(__FieldTag::__relation_descriptor) {
21298 return std::result::Result::Err(A::Error::duplicate_field(
21299 "multiple values for relation_descriptor",
21300 ));
21301 }
21302 result.relation_descriptor = map.next_value::<std::option::Option<crate::model::RelationDescriptor>>()?
21303 ;
21304 }
21305 __FieldTag::Unknown(key) => {
21306 let value = map.next_value::<serde_json::Value>()?;
21307 result._unknown_fields.insert(key, value);
21308 }
21309 }
21310 }
21311 std::result::Result::Ok(result)
21312 }
21313 }
21314 deserializer.deserialize_any(Visitor)
21315 }
21316 }
21317
21318 #[doc(hidden)]
21319 impl serde::ser::Serialize for Declaration {
21320 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21321 where
21322 S: serde::ser::Serializer,
21323 {
21324 use serde::ser::SerializeMap;
21325 #[allow(unused_imports)]
21326 use std::option::Option::Some;
21327 let mut state = serializer.serialize_map(std::option::Option::None)?;
21328 if self.relation_descriptor.is_some() {
21329 state.serialize_entry("relationDescriptor", &self.relation_descriptor)?;
21330 }
21331 if !self._unknown_fields.is_empty() {
21332 for (key, value) in self._unknown_fields.iter() {
21333 state.serialize_entry(key, &value)?;
21334 }
21335 }
21336 state.end()
21337 }
21338 }
21339
21340 impl std::fmt::Debug for Declaration {
21341 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21342 let mut debug_struct = f.debug_struct("Declaration");
21343 debug_struct.field("relation_descriptor", &self.relation_descriptor);
21344 if !self._unknown_fields.is_empty() {
21345 debug_struct.field("_unknown_fields", &self._unknown_fields);
21346 }
21347 debug_struct.finish()
21348 }
21349 }
21350
21351 #[derive(Clone, Default, PartialEq)]
21353 #[non_exhaustive]
21354 pub struct Notebook {
21355 pub dependency_targets: std::vec::Vec<crate::model::Target>,
21357
21358 pub disabled: bool,
21360
21361 pub contents: std::string::String,
21363
21364 pub tags: std::vec::Vec<std::string::String>,
21366
21367 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21368 }
21369
21370 impl Notebook {
21371 pub fn new() -> Self {
21372 std::default::Default::default()
21373 }
21374
21375 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
21377 where
21378 T: std::iter::IntoIterator<Item = V>,
21379 V: std::convert::Into<crate::model::Target>,
21380 {
21381 use std::iter::Iterator;
21382 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
21383 self
21384 }
21385
21386 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21388 self.disabled = v.into();
21389 self
21390 }
21391
21392 pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21394 self.contents = v.into();
21395 self
21396 }
21397
21398 pub fn set_tags<T, V>(mut self, v: T) -> Self
21400 where
21401 T: std::iter::IntoIterator<Item = V>,
21402 V: std::convert::Into<std::string::String>,
21403 {
21404 use std::iter::Iterator;
21405 self.tags = v.into_iter().map(|i| i.into()).collect();
21406 self
21407 }
21408 }
21409
21410 impl wkt::message::Message for Notebook {
21411 fn typename() -> &'static str {
21412 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
21413 }
21414 }
21415
21416 #[doc(hidden)]
21417 impl<'de> serde::de::Deserialize<'de> for Notebook {
21418 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21419 where
21420 D: serde::Deserializer<'de>,
21421 {
21422 #[allow(non_camel_case_types)]
21423 #[doc(hidden)]
21424 #[derive(PartialEq, Eq, Hash)]
21425 enum __FieldTag {
21426 __dependency_targets,
21427 __disabled,
21428 __contents,
21429 __tags,
21430 Unknown(std::string::String),
21431 }
21432 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21433 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21434 where
21435 D: serde::Deserializer<'de>,
21436 {
21437 struct Visitor;
21438 impl<'de> serde::de::Visitor<'de> for Visitor {
21439 type Value = __FieldTag;
21440 fn expecting(
21441 &self,
21442 formatter: &mut std::fmt::Formatter,
21443 ) -> std::fmt::Result {
21444 formatter.write_str("a field name for Notebook")
21445 }
21446 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21447 where
21448 E: serde::de::Error,
21449 {
21450 use std::result::Result::Ok;
21451 use std::string::ToString;
21452 match value {
21453 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
21454 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
21455 "disabled" => Ok(__FieldTag::__disabled),
21456 "contents" => Ok(__FieldTag::__contents),
21457 "tags" => Ok(__FieldTag::__tags),
21458 _ => Ok(__FieldTag::Unknown(value.to_string())),
21459 }
21460 }
21461 }
21462 deserializer.deserialize_identifier(Visitor)
21463 }
21464 }
21465 struct Visitor;
21466 impl<'de> serde::de::Visitor<'de> for Visitor {
21467 type Value = Notebook;
21468 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21469 formatter.write_str("struct Notebook")
21470 }
21471 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21472 where
21473 A: serde::de::MapAccess<'de>,
21474 {
21475 #[allow(unused_imports)]
21476 use serde::de::Error;
21477 use std::option::Option::Some;
21478 let mut fields = std::collections::HashSet::new();
21479 let mut result = Self::Value::new();
21480 while let Some(tag) = map.next_key::<__FieldTag>()? {
21481 #[allow(clippy::match_single_binding)]
21482 match tag {
21483 __FieldTag::__dependency_targets => {
21484 if !fields.insert(__FieldTag::__dependency_targets) {
21485 return std::result::Result::Err(A::Error::duplicate_field(
21486 "multiple values for dependency_targets",
21487 ));
21488 }
21489 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
21490 }
21491 __FieldTag::__disabled => {
21492 if !fields.insert(__FieldTag::__disabled) {
21493 return std::result::Result::Err(A::Error::duplicate_field(
21494 "multiple values for disabled",
21495 ));
21496 }
21497 result.disabled = map
21498 .next_value::<std::option::Option<bool>>()?
21499 .unwrap_or_default();
21500 }
21501 __FieldTag::__contents => {
21502 if !fields.insert(__FieldTag::__contents) {
21503 return std::result::Result::Err(A::Error::duplicate_field(
21504 "multiple values for contents",
21505 ));
21506 }
21507 result.contents = map
21508 .next_value::<std::option::Option<std::string::String>>()?
21509 .unwrap_or_default();
21510 }
21511 __FieldTag::__tags => {
21512 if !fields.insert(__FieldTag::__tags) {
21513 return std::result::Result::Err(A::Error::duplicate_field(
21514 "multiple values for tags",
21515 ));
21516 }
21517 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
21518 }
21519 __FieldTag::Unknown(key) => {
21520 let value = map.next_value::<serde_json::Value>()?;
21521 result._unknown_fields.insert(key, value);
21522 }
21523 }
21524 }
21525 std::result::Result::Ok(result)
21526 }
21527 }
21528 deserializer.deserialize_any(Visitor)
21529 }
21530 }
21531
21532 #[doc(hidden)]
21533 impl serde::ser::Serialize for Notebook {
21534 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21535 where
21536 S: serde::ser::Serializer,
21537 {
21538 use serde::ser::SerializeMap;
21539 #[allow(unused_imports)]
21540 use std::option::Option::Some;
21541 let mut state = serializer.serialize_map(std::option::Option::None)?;
21542 if !self.dependency_targets.is_empty() {
21543 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
21544 }
21545 if !wkt::internal::is_default(&self.disabled) {
21546 state.serialize_entry("disabled", &self.disabled)?;
21547 }
21548 if !self.contents.is_empty() {
21549 state.serialize_entry("contents", &self.contents)?;
21550 }
21551 if !self.tags.is_empty() {
21552 state.serialize_entry("tags", &self.tags)?;
21553 }
21554 if !self._unknown_fields.is_empty() {
21555 for (key, value) in self._unknown_fields.iter() {
21556 state.serialize_entry(key, &value)?;
21557 }
21558 }
21559 state.end()
21560 }
21561 }
21562
21563 impl std::fmt::Debug for Notebook {
21564 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21565 let mut debug_struct = f.debug_struct("Notebook");
21566 debug_struct.field("dependency_targets", &self.dependency_targets);
21567 debug_struct.field("disabled", &self.disabled);
21568 debug_struct.field("contents", &self.contents);
21569 debug_struct.field("tags", &self.tags);
21570 if !self._unknown_fields.is_empty() {
21571 debug_struct.field("_unknown_fields", &self._unknown_fields);
21572 }
21573 debug_struct.finish()
21574 }
21575 }
21576
21577 #[derive(Clone, Default, PartialEq)]
21579 #[non_exhaustive]
21580 pub struct DataPreparation {
21581 pub dependency_targets: std::vec::Vec<crate::model::Target>,
21583
21584 pub disabled: bool,
21586
21587 pub tags: std::vec::Vec<std::string::String>,
21589
21590 pub definition: std::option::Option<
21592 crate::model::compilation_result_action::data_preparation::Definition,
21593 >,
21594
21595 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21596 }
21597
21598 impl DataPreparation {
21599 pub fn new() -> Self {
21600 std::default::Default::default()
21601 }
21602
21603 pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
21605 where
21606 T: std::iter::IntoIterator<Item = V>,
21607 V: std::convert::Into<crate::model::Target>,
21608 {
21609 use std::iter::Iterator;
21610 self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
21611 self
21612 }
21613
21614 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
21616 self.disabled = v.into();
21617 self
21618 }
21619
21620 pub fn set_tags<T, V>(mut self, v: T) -> Self
21622 where
21623 T: std::iter::IntoIterator<Item = V>,
21624 V: std::convert::Into<std::string::String>,
21625 {
21626 use std::iter::Iterator;
21627 self.tags = v.into_iter().map(|i| i.into()).collect();
21628 self
21629 }
21630
21631 pub fn set_definition<
21636 T: std::convert::Into<
21637 std::option::Option<
21638 crate::model::compilation_result_action::data_preparation::Definition,
21639 >,
21640 >,
21641 >(
21642 mut self,
21643 v: T,
21644 ) -> Self {
21645 self.definition = v.into();
21646 self
21647 }
21648
21649 pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
21653 #[allow(unreachable_patterns)]
21654 self.definition.as_ref().and_then(|v| match v {
21655 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
21656 _ => std::option::Option::None,
21657 })
21658 }
21659
21660 pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
21666 mut self,
21667 v: T,
21668 ) -> Self {
21669 self.definition = std::option::Option::Some(
21670 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
21671 v.into(),
21672 ),
21673 );
21674 self
21675 }
21676
21677 pub fn contents_sql(
21681 &self,
21682 ) -> std::option::Option<
21683 &std::boxed::Box<
21684 crate::model::compilation_result_action::data_preparation::SqlDefinition,
21685 >,
21686 > {
21687 #[allow(unreachable_patterns)]
21688 self.definition.as_ref().and_then(|v| match v {
21689 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
21690 _ => std::option::Option::None,
21691 })
21692 }
21693
21694 pub fn set_contents_sql<
21700 T: std::convert::Into<
21701 std::boxed::Box<
21702 crate::model::compilation_result_action::data_preparation::SqlDefinition,
21703 >,
21704 >,
21705 >(
21706 mut self,
21707 v: T,
21708 ) -> Self {
21709 self.definition = std::option::Option::Some(
21710 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
21711 v.into(),
21712 ),
21713 );
21714 self
21715 }
21716 }
21717
21718 impl wkt::message::Message for DataPreparation {
21719 fn typename() -> &'static str {
21720 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
21721 }
21722 }
21723
21724 #[doc(hidden)]
21725 impl<'de> serde::de::Deserialize<'de> for DataPreparation {
21726 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21727 where
21728 D: serde::Deserializer<'de>,
21729 {
21730 #[allow(non_camel_case_types)]
21731 #[doc(hidden)]
21732 #[derive(PartialEq, Eq, Hash)]
21733 enum __FieldTag {
21734 __contents_yaml,
21735 __contents_sql,
21736 __dependency_targets,
21737 __disabled,
21738 __tags,
21739 Unknown(std::string::String),
21740 }
21741 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
21742 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
21743 where
21744 D: serde::Deserializer<'de>,
21745 {
21746 struct Visitor;
21747 impl<'de> serde::de::Visitor<'de> for Visitor {
21748 type Value = __FieldTag;
21749 fn expecting(
21750 &self,
21751 formatter: &mut std::fmt::Formatter,
21752 ) -> std::fmt::Result {
21753 formatter.write_str("a field name for DataPreparation")
21754 }
21755 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
21756 where
21757 E: serde::de::Error,
21758 {
21759 use std::result::Result::Ok;
21760 use std::string::ToString;
21761 match value {
21762 "contentsYaml" => Ok(__FieldTag::__contents_yaml),
21763 "contents_yaml" => Ok(__FieldTag::__contents_yaml),
21764 "contentsSql" => Ok(__FieldTag::__contents_sql),
21765 "contents_sql" => Ok(__FieldTag::__contents_sql),
21766 "dependencyTargets" => Ok(__FieldTag::__dependency_targets),
21767 "dependency_targets" => Ok(__FieldTag::__dependency_targets),
21768 "disabled" => Ok(__FieldTag::__disabled),
21769 "tags" => Ok(__FieldTag::__tags),
21770 _ => Ok(__FieldTag::Unknown(value.to_string())),
21771 }
21772 }
21773 }
21774 deserializer.deserialize_identifier(Visitor)
21775 }
21776 }
21777 struct Visitor;
21778 impl<'de> serde::de::Visitor<'de> for Visitor {
21779 type Value = DataPreparation;
21780 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
21781 formatter.write_str("struct DataPreparation")
21782 }
21783 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
21784 where
21785 A: serde::de::MapAccess<'de>,
21786 {
21787 #[allow(unused_imports)]
21788 use serde::de::Error;
21789 use std::option::Option::Some;
21790 let mut fields = std::collections::HashSet::new();
21791 let mut result = Self::Value::new();
21792 while let Some(tag) = map.next_key::<__FieldTag>()? {
21793 #[allow(clippy::match_single_binding)]
21794 match tag {
21795 __FieldTag::__contents_yaml => {
21796 if !fields.insert(__FieldTag::__contents_yaml) {
21797 return std::result::Result::Err(A::Error::duplicate_field(
21798 "multiple values for contents_yaml",
21799 ));
21800 }
21801 if result.definition.is_some() {
21802 return std::result::Result::Err(A::Error::duplicate_field(
21803 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.DataPreparation.contents_yaml, latest field was contentsYaml",
21804 ));
21805 }
21806 result.definition = std::option::Option::Some(
21807 crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
21808 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
21809 ),
21810 );
21811 }
21812 __FieldTag::__contents_sql => {
21813 if !fields.insert(__FieldTag::__contents_sql) {
21814 return std::result::Result::Err(A::Error::duplicate_field(
21815 "multiple values for contents_sql",
21816 ));
21817 }
21818 if result.definition.is_some() {
21819 return std::result::Result::Err(A::Error::duplicate_field(
21820 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.DataPreparation.contents_sql, latest field was contentsSql",
21821 ));
21822 }
21823 result.definition = std::option::Option::Some(
21824 crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
21825 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::data_preparation::SqlDefinition>>>()?.unwrap_or_default()
21826 ),
21827 );
21828 }
21829 __FieldTag::__dependency_targets => {
21830 if !fields.insert(__FieldTag::__dependency_targets) {
21831 return std::result::Result::Err(A::Error::duplicate_field(
21832 "multiple values for dependency_targets",
21833 ));
21834 }
21835 result.dependency_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
21836 }
21837 __FieldTag::__disabled => {
21838 if !fields.insert(__FieldTag::__disabled) {
21839 return std::result::Result::Err(A::Error::duplicate_field(
21840 "multiple values for disabled",
21841 ));
21842 }
21843 result.disabled = map
21844 .next_value::<std::option::Option<bool>>()?
21845 .unwrap_or_default();
21846 }
21847 __FieldTag::__tags => {
21848 if !fields.insert(__FieldTag::__tags) {
21849 return std::result::Result::Err(A::Error::duplicate_field(
21850 "multiple values for tags",
21851 ));
21852 }
21853 result.tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
21854 }
21855 __FieldTag::Unknown(key) => {
21856 let value = map.next_value::<serde_json::Value>()?;
21857 result._unknown_fields.insert(key, value);
21858 }
21859 }
21860 }
21861 std::result::Result::Ok(result)
21862 }
21863 }
21864 deserializer.deserialize_any(Visitor)
21865 }
21866 }
21867
21868 #[doc(hidden)]
21869 impl serde::ser::Serialize for DataPreparation {
21870 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
21871 where
21872 S: serde::ser::Serializer,
21873 {
21874 use serde::ser::SerializeMap;
21875 #[allow(unused_imports)]
21876 use std::option::Option::Some;
21877 let mut state = serializer.serialize_map(std::option::Option::None)?;
21878 if let Some(value) = self.contents_yaml() {
21879 state.serialize_entry("contentsYaml", value)?;
21880 }
21881 if let Some(value) = self.contents_sql() {
21882 state.serialize_entry("contentsSql", value)?;
21883 }
21884 if !self.dependency_targets.is_empty() {
21885 state.serialize_entry("dependencyTargets", &self.dependency_targets)?;
21886 }
21887 if !wkt::internal::is_default(&self.disabled) {
21888 state.serialize_entry("disabled", &self.disabled)?;
21889 }
21890 if !self.tags.is_empty() {
21891 state.serialize_entry("tags", &self.tags)?;
21892 }
21893 if !self._unknown_fields.is_empty() {
21894 for (key, value) in self._unknown_fields.iter() {
21895 state.serialize_entry(key, &value)?;
21896 }
21897 }
21898 state.end()
21899 }
21900 }
21901
21902 impl std::fmt::Debug for DataPreparation {
21903 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21904 let mut debug_struct = f.debug_struct("DataPreparation");
21905 debug_struct.field("dependency_targets", &self.dependency_targets);
21906 debug_struct.field("disabled", &self.disabled);
21907 debug_struct.field("tags", &self.tags);
21908 debug_struct.field("definition", &self.definition);
21909 if !self._unknown_fields.is_empty() {
21910 debug_struct.field("_unknown_fields", &self._unknown_fields);
21911 }
21912 debug_struct.finish()
21913 }
21914 }
21915
21916 pub mod data_preparation {
21918 #[allow(unused_imports)]
21919 use super::*;
21920
21921 #[derive(Clone, Default, PartialEq)]
21923 #[non_exhaustive]
21924 pub struct SqlDefinition {
21925 pub query: std::string::String,
21928
21929 pub error_table: std::option::Option<
21931 crate::model::compilation_result_action::data_preparation::ErrorTable,
21932 >,
21933
21934 pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
21936
21937 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
21938 }
21939
21940 impl SqlDefinition {
21941 pub fn new() -> Self {
21942 std::default::Default::default()
21943 }
21944
21945 pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
21947 self.query = v.into();
21948 self
21949 }
21950
21951 pub fn set_error_table<T>(mut self, v: T) -> Self
21953 where
21954 T: std::convert::Into<
21955 crate::model::compilation_result_action::data_preparation::ErrorTable,
21956 >,
21957 {
21958 self.error_table = std::option::Option::Some(v.into());
21959 self
21960 }
21961
21962 pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
21964 where
21965 T: std::convert::Into<
21966 crate::model::compilation_result_action::data_preparation::ErrorTable,
21967 >,
21968 {
21969 self.error_table = v.map(|x| x.into());
21970 self
21971 }
21972
21973 pub fn set_load<T>(mut self, v: T) -> Self
21975 where
21976 T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
21977 {
21978 self.load = std::option::Option::Some(v.into());
21979 self
21980 }
21981
21982 pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
21984 where
21985 T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
21986 {
21987 self.load = v.map(|x| x.into());
21988 self
21989 }
21990 }
21991
21992 impl wkt::message::Message for SqlDefinition {
21993 fn typename() -> &'static str {
21994 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
21995 }
21996 }
21997
21998 #[doc(hidden)]
21999 impl<'de> serde::de::Deserialize<'de> for SqlDefinition {
22000 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22001 where
22002 D: serde::Deserializer<'de>,
22003 {
22004 #[allow(non_camel_case_types)]
22005 #[doc(hidden)]
22006 #[derive(PartialEq, Eq, Hash)]
22007 enum __FieldTag {
22008 __query,
22009 __error_table,
22010 __load,
22011 Unknown(std::string::String),
22012 }
22013 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22014 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22015 where
22016 D: serde::Deserializer<'de>,
22017 {
22018 struct Visitor;
22019 impl<'de> serde::de::Visitor<'de> for Visitor {
22020 type Value = __FieldTag;
22021 fn expecting(
22022 &self,
22023 formatter: &mut std::fmt::Formatter,
22024 ) -> std::fmt::Result {
22025 formatter.write_str("a field name for SqlDefinition")
22026 }
22027 fn visit_str<E>(
22028 self,
22029 value: &str,
22030 ) -> std::result::Result<Self::Value, E>
22031 where
22032 E: serde::de::Error,
22033 {
22034 use std::result::Result::Ok;
22035 use std::string::ToString;
22036 match value {
22037 "query" => Ok(__FieldTag::__query),
22038 "errorTable" => Ok(__FieldTag::__error_table),
22039 "error_table" => Ok(__FieldTag::__error_table),
22040 "load" => Ok(__FieldTag::__load),
22041 _ => Ok(__FieldTag::Unknown(value.to_string())),
22042 }
22043 }
22044 }
22045 deserializer.deserialize_identifier(Visitor)
22046 }
22047 }
22048 struct Visitor;
22049 impl<'de> serde::de::Visitor<'de> for Visitor {
22050 type Value = SqlDefinition;
22051 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22052 formatter.write_str("struct SqlDefinition")
22053 }
22054 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22055 where
22056 A: serde::de::MapAccess<'de>,
22057 {
22058 #[allow(unused_imports)]
22059 use serde::de::Error;
22060 use std::option::Option::Some;
22061 let mut fields = std::collections::HashSet::new();
22062 let mut result = Self::Value::new();
22063 while let Some(tag) = map.next_key::<__FieldTag>()? {
22064 #[allow(clippy::match_single_binding)]
22065 match tag {
22066 __FieldTag::__query => {
22067 if !fields.insert(__FieldTag::__query) {
22068 return std::result::Result::Err(
22069 A::Error::duplicate_field("multiple values for query"),
22070 );
22071 }
22072 result.query = map
22073 .next_value::<std::option::Option<std::string::String>>()?
22074 .unwrap_or_default();
22075 }
22076 __FieldTag::__error_table => {
22077 if !fields.insert(__FieldTag::__error_table) {
22078 return std::result::Result::Err(
22079 A::Error::duplicate_field(
22080 "multiple values for error_table",
22081 ),
22082 );
22083 }
22084 result.error_table = map.next_value::<std::option::Option<crate::model::compilation_result_action::data_preparation::ErrorTable>>()?
22085 ;
22086 }
22087 __FieldTag::__load => {
22088 if !fields.insert(__FieldTag::__load) {
22089 return std::result::Result::Err(
22090 A::Error::duplicate_field("multiple values for load"),
22091 );
22092 }
22093 result.load = map.next_value::<std::option::Option<
22094 crate::model::compilation_result_action::LoadConfig,
22095 >>()?;
22096 }
22097 __FieldTag::Unknown(key) => {
22098 let value = map.next_value::<serde_json::Value>()?;
22099 result._unknown_fields.insert(key, value);
22100 }
22101 }
22102 }
22103 std::result::Result::Ok(result)
22104 }
22105 }
22106 deserializer.deserialize_any(Visitor)
22107 }
22108 }
22109
22110 #[doc(hidden)]
22111 impl serde::ser::Serialize for SqlDefinition {
22112 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22113 where
22114 S: serde::ser::Serializer,
22115 {
22116 use serde::ser::SerializeMap;
22117 #[allow(unused_imports)]
22118 use std::option::Option::Some;
22119 let mut state = serializer.serialize_map(std::option::Option::None)?;
22120 if !self.query.is_empty() {
22121 state.serialize_entry("query", &self.query)?;
22122 }
22123 if self.error_table.is_some() {
22124 state.serialize_entry("errorTable", &self.error_table)?;
22125 }
22126 if self.load.is_some() {
22127 state.serialize_entry("load", &self.load)?;
22128 }
22129 if !self._unknown_fields.is_empty() {
22130 for (key, value) in self._unknown_fields.iter() {
22131 state.serialize_entry(key, &value)?;
22132 }
22133 }
22134 state.end()
22135 }
22136 }
22137
22138 impl std::fmt::Debug for SqlDefinition {
22139 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22140 let mut debug_struct = f.debug_struct("SqlDefinition");
22141 debug_struct.field("query", &self.query);
22142 debug_struct.field("error_table", &self.error_table);
22143 debug_struct.field("load", &self.load);
22144 if !self._unknown_fields.is_empty() {
22145 debug_struct.field("_unknown_fields", &self._unknown_fields);
22146 }
22147 debug_struct.finish()
22148 }
22149 }
22150
22151 #[derive(Clone, Default, PartialEq)]
22154 #[non_exhaustive]
22155 pub struct ErrorTable {
22156 pub target: std::option::Option<crate::model::Target>,
22158
22159 pub retention_days: i32,
22162
22163 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22164 }
22165
22166 impl ErrorTable {
22167 pub fn new() -> Self {
22168 std::default::Default::default()
22169 }
22170
22171 pub fn set_target<T>(mut self, v: T) -> Self
22173 where
22174 T: std::convert::Into<crate::model::Target>,
22175 {
22176 self.target = std::option::Option::Some(v.into());
22177 self
22178 }
22179
22180 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
22182 where
22183 T: std::convert::Into<crate::model::Target>,
22184 {
22185 self.target = v.map(|x| x.into());
22186 self
22187 }
22188
22189 pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
22191 self.retention_days = v.into();
22192 self
22193 }
22194 }
22195
22196 impl wkt::message::Message for ErrorTable {
22197 fn typename() -> &'static str {
22198 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
22199 }
22200 }
22201
22202 #[doc(hidden)]
22203 impl<'de> serde::de::Deserialize<'de> for ErrorTable {
22204 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22205 where
22206 D: serde::Deserializer<'de>,
22207 {
22208 #[allow(non_camel_case_types)]
22209 #[doc(hidden)]
22210 #[derive(PartialEq, Eq, Hash)]
22211 enum __FieldTag {
22212 __target,
22213 __retention_days,
22214 Unknown(std::string::String),
22215 }
22216 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22217 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22218 where
22219 D: serde::Deserializer<'de>,
22220 {
22221 struct Visitor;
22222 impl<'de> serde::de::Visitor<'de> for Visitor {
22223 type Value = __FieldTag;
22224 fn expecting(
22225 &self,
22226 formatter: &mut std::fmt::Formatter,
22227 ) -> std::fmt::Result {
22228 formatter.write_str("a field name for ErrorTable")
22229 }
22230 fn visit_str<E>(
22231 self,
22232 value: &str,
22233 ) -> std::result::Result<Self::Value, E>
22234 where
22235 E: serde::de::Error,
22236 {
22237 use std::result::Result::Ok;
22238 use std::string::ToString;
22239 match value {
22240 "target" => Ok(__FieldTag::__target),
22241 "retentionDays" => Ok(__FieldTag::__retention_days),
22242 "retention_days" => Ok(__FieldTag::__retention_days),
22243 _ => Ok(__FieldTag::Unknown(value.to_string())),
22244 }
22245 }
22246 }
22247 deserializer.deserialize_identifier(Visitor)
22248 }
22249 }
22250 struct Visitor;
22251 impl<'de> serde::de::Visitor<'de> for Visitor {
22252 type Value = ErrorTable;
22253 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22254 formatter.write_str("struct ErrorTable")
22255 }
22256 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22257 where
22258 A: serde::de::MapAccess<'de>,
22259 {
22260 #[allow(unused_imports)]
22261 use serde::de::Error;
22262 use std::option::Option::Some;
22263 let mut fields = std::collections::HashSet::new();
22264 let mut result = Self::Value::new();
22265 while let Some(tag) = map.next_key::<__FieldTag>()? {
22266 #[allow(clippy::match_single_binding)]
22267 match tag {
22268 __FieldTag::__target => {
22269 if !fields.insert(__FieldTag::__target) {
22270 return std::result::Result::Err(
22271 A::Error::duplicate_field("multiple values for target"),
22272 );
22273 }
22274 result.target = map
22275 .next_value::<std::option::Option<crate::model::Target>>(
22276 )?;
22277 }
22278 __FieldTag::__retention_days => {
22279 if !fields.insert(__FieldTag::__retention_days) {
22280 return std::result::Result::Err(
22281 A::Error::duplicate_field(
22282 "multiple values for retention_days",
22283 ),
22284 );
22285 }
22286 struct __With(std::option::Option<i32>);
22287 impl<'de> serde::de::Deserialize<'de> for __With {
22288 fn deserialize<D>(
22289 deserializer: D,
22290 ) -> std::result::Result<Self, D::Error>
22291 where
22292 D: serde::de::Deserializer<'de>,
22293 {
22294 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
22295 }
22296 }
22297 result.retention_days =
22298 map.next_value::<__With>()?.0.unwrap_or_default();
22299 }
22300 __FieldTag::Unknown(key) => {
22301 let value = map.next_value::<serde_json::Value>()?;
22302 result._unknown_fields.insert(key, value);
22303 }
22304 }
22305 }
22306 std::result::Result::Ok(result)
22307 }
22308 }
22309 deserializer.deserialize_any(Visitor)
22310 }
22311 }
22312
22313 #[doc(hidden)]
22314 impl serde::ser::Serialize for ErrorTable {
22315 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22316 where
22317 S: serde::ser::Serializer,
22318 {
22319 use serde::ser::SerializeMap;
22320 #[allow(unused_imports)]
22321 use std::option::Option::Some;
22322 let mut state = serializer.serialize_map(std::option::Option::None)?;
22323 if self.target.is_some() {
22324 state.serialize_entry("target", &self.target)?;
22325 }
22326 if !wkt::internal::is_default(&self.retention_days) {
22327 struct __With<'a>(&'a i32);
22328 impl<'a> serde::ser::Serialize for __With<'a> {
22329 fn serialize<S>(
22330 &self,
22331 serializer: S,
22332 ) -> std::result::Result<S::Ok, S::Error>
22333 where
22334 S: serde::ser::Serializer,
22335 {
22336 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
22337 }
22338 }
22339 state.serialize_entry("retentionDays", &__With(&self.retention_days))?;
22340 }
22341 if !self._unknown_fields.is_empty() {
22342 for (key, value) in self._unknown_fields.iter() {
22343 state.serialize_entry(key, &value)?;
22344 }
22345 }
22346 state.end()
22347 }
22348 }
22349
22350 impl std::fmt::Debug for ErrorTable {
22351 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22352 let mut debug_struct = f.debug_struct("ErrorTable");
22353 debug_struct.field("target", &self.target);
22354 debug_struct.field("retention_days", &self.retention_days);
22355 if !self._unknown_fields.is_empty() {
22356 debug_struct.field("_unknown_fields", &self._unknown_fields);
22357 }
22358 debug_struct.finish()
22359 }
22360 }
22361
22362 #[derive(Clone, Debug, PartialEq)]
22364 #[non_exhaustive]
22365 pub enum Definition {
22366 ContentsYaml(std::string::String),
22368 ContentsSql(
22371 std::boxed::Box<
22372 crate::model::compilation_result_action::data_preparation::SqlDefinition,
22373 >,
22374 ),
22375 }
22376 }
22377
22378 #[derive(Clone, Default, PartialEq)]
22380 #[non_exhaustive]
22381 pub struct LoadConfig {
22382 pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
22384
22385 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22386 }
22387
22388 impl LoadConfig {
22389 pub fn new() -> Self {
22390 std::default::Default::default()
22391 }
22392
22393 pub fn set_mode<
22398 T: std::convert::Into<
22399 std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
22400 >,
22401 >(
22402 mut self,
22403 v: T,
22404 ) -> Self {
22405 self.mode = v.into();
22406 self
22407 }
22408
22409 pub fn replace(
22413 &self,
22414 ) -> std::option::Option<
22415 &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
22416 > {
22417 #[allow(unreachable_patterns)]
22418 self.mode.as_ref().and_then(|v| match v {
22419 crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
22420 std::option::Option::Some(v)
22421 }
22422 _ => std::option::Option::None,
22423 })
22424 }
22425
22426 pub fn set_replace<
22432 T: std::convert::Into<
22433 std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
22434 >,
22435 >(
22436 mut self,
22437 v: T,
22438 ) -> Self {
22439 self.mode = std::option::Option::Some(
22440 crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
22441 );
22442 self
22443 }
22444
22445 pub fn append(
22449 &self,
22450 ) -> std::option::Option<
22451 &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
22452 > {
22453 #[allow(unreachable_patterns)]
22454 self.mode.as_ref().and_then(|v| match v {
22455 crate::model::compilation_result_action::load_config::Mode::Append(v) => {
22456 std::option::Option::Some(v)
22457 }
22458 _ => std::option::Option::None,
22459 })
22460 }
22461
22462 pub fn set_append<
22468 T: std::convert::Into<
22469 std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
22470 >,
22471 >(
22472 mut self,
22473 v: T,
22474 ) -> Self {
22475 self.mode = std::option::Option::Some(
22476 crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
22477 );
22478 self
22479 }
22480
22481 pub fn maximum(
22485 &self,
22486 ) -> std::option::Option<
22487 &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
22488 > {
22489 #[allow(unreachable_patterns)]
22490 self.mode.as_ref().and_then(|v| match v {
22491 crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
22492 std::option::Option::Some(v)
22493 }
22494 _ => std::option::Option::None,
22495 })
22496 }
22497
22498 pub fn set_maximum<
22504 T: std::convert::Into<
22505 std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
22506 >,
22507 >(
22508 mut self,
22509 v: T,
22510 ) -> Self {
22511 self.mode = std::option::Option::Some(
22512 crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
22513 );
22514 self
22515 }
22516
22517 pub fn unique(
22521 &self,
22522 ) -> std::option::Option<
22523 &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
22524 > {
22525 #[allow(unreachable_patterns)]
22526 self.mode.as_ref().and_then(|v| match v {
22527 crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
22528 std::option::Option::Some(v)
22529 }
22530 _ => std::option::Option::None,
22531 })
22532 }
22533
22534 pub fn set_unique<
22540 T: std::convert::Into<
22541 std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
22542 >,
22543 >(
22544 mut self,
22545 v: T,
22546 ) -> Self {
22547 self.mode = std::option::Option::Some(
22548 crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
22549 );
22550 self
22551 }
22552 }
22553
22554 impl wkt::message::Message for LoadConfig {
22555 fn typename() -> &'static str {
22556 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
22557 }
22558 }
22559
22560 #[doc(hidden)]
22561 impl<'de> serde::de::Deserialize<'de> for LoadConfig {
22562 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22563 where
22564 D: serde::Deserializer<'de>,
22565 {
22566 #[allow(non_camel_case_types)]
22567 #[doc(hidden)]
22568 #[derive(PartialEq, Eq, Hash)]
22569 enum __FieldTag {
22570 __replace,
22571 __append,
22572 __maximum,
22573 __unique,
22574 Unknown(std::string::String),
22575 }
22576 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22577 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22578 where
22579 D: serde::Deserializer<'de>,
22580 {
22581 struct Visitor;
22582 impl<'de> serde::de::Visitor<'de> for Visitor {
22583 type Value = __FieldTag;
22584 fn expecting(
22585 &self,
22586 formatter: &mut std::fmt::Formatter,
22587 ) -> std::fmt::Result {
22588 formatter.write_str("a field name for LoadConfig")
22589 }
22590 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
22591 where
22592 E: serde::de::Error,
22593 {
22594 use std::result::Result::Ok;
22595 use std::string::ToString;
22596 match value {
22597 "replace" => Ok(__FieldTag::__replace),
22598 "append" => Ok(__FieldTag::__append),
22599 "maximum" => Ok(__FieldTag::__maximum),
22600 "unique" => Ok(__FieldTag::__unique),
22601 _ => Ok(__FieldTag::Unknown(value.to_string())),
22602 }
22603 }
22604 }
22605 deserializer.deserialize_identifier(Visitor)
22606 }
22607 }
22608 struct Visitor;
22609 impl<'de> serde::de::Visitor<'de> for Visitor {
22610 type Value = LoadConfig;
22611 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22612 formatter.write_str("struct LoadConfig")
22613 }
22614 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22615 where
22616 A: serde::de::MapAccess<'de>,
22617 {
22618 #[allow(unused_imports)]
22619 use serde::de::Error;
22620 use std::option::Option::Some;
22621 let mut fields = std::collections::HashSet::new();
22622 let mut result = Self::Value::new();
22623 while let Some(tag) = map.next_key::<__FieldTag>()? {
22624 #[allow(clippy::match_single_binding)]
22625 match tag {
22626 __FieldTag::__replace => {
22627 if !fields.insert(__FieldTag::__replace) {
22628 return std::result::Result::Err(A::Error::duplicate_field(
22629 "multiple values for replace",
22630 ));
22631 }
22632 if result.mode.is_some() {
22633 return std::result::Result::Err(A::Error::duplicate_field(
22634 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.replace, latest field was replace",
22635 ));
22636 }
22637 result.mode = std::option::Option::Some(
22638 crate::model::compilation_result_action::load_config::Mode::Replace(
22639 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>>>()?.unwrap_or_default()
22640 ),
22641 );
22642 }
22643 __FieldTag::__append => {
22644 if !fields.insert(__FieldTag::__append) {
22645 return std::result::Result::Err(A::Error::duplicate_field(
22646 "multiple values for append",
22647 ));
22648 }
22649 if result.mode.is_some() {
22650 return std::result::Result::Err(A::Error::duplicate_field(
22651 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.append, latest field was append",
22652 ));
22653 }
22654 result.mode = std::option::Option::Some(
22655 crate::model::compilation_result_action::load_config::Mode::Append(
22656 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>>>()?.unwrap_or_default()
22657 ),
22658 );
22659 }
22660 __FieldTag::__maximum => {
22661 if !fields.insert(__FieldTag::__maximum) {
22662 return std::result::Result::Err(A::Error::duplicate_field(
22663 "multiple values for maximum",
22664 ));
22665 }
22666 if result.mode.is_some() {
22667 return std::result::Result::Err(A::Error::duplicate_field(
22668 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.maximum, latest field was maximum",
22669 ));
22670 }
22671 result.mode = std::option::Option::Some(
22672 crate::model::compilation_result_action::load_config::Mode::Maximum(
22673 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>>>()?.unwrap_or_default()
22674 ),
22675 );
22676 }
22677 __FieldTag::__unique => {
22678 if !fields.insert(__FieldTag::__unique) {
22679 return std::result::Result::Err(A::Error::duplicate_field(
22680 "multiple values for unique",
22681 ));
22682 }
22683 if result.mode.is_some() {
22684 return std::result::Result::Err(A::Error::duplicate_field(
22685 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.CompilationResultAction.LoadConfig.unique, latest field was unique",
22686 ));
22687 }
22688 result.mode = std::option::Option::Some(
22689 crate::model::compilation_result_action::load_config::Mode::Unique(
22690 map.next_value::<std::option::Option<std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>>>()?.unwrap_or_default()
22691 ),
22692 );
22693 }
22694 __FieldTag::Unknown(key) => {
22695 let value = map.next_value::<serde_json::Value>()?;
22696 result._unknown_fields.insert(key, value);
22697 }
22698 }
22699 }
22700 std::result::Result::Ok(result)
22701 }
22702 }
22703 deserializer.deserialize_any(Visitor)
22704 }
22705 }
22706
22707 #[doc(hidden)]
22708 impl serde::ser::Serialize for LoadConfig {
22709 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22710 where
22711 S: serde::ser::Serializer,
22712 {
22713 use serde::ser::SerializeMap;
22714 #[allow(unused_imports)]
22715 use std::option::Option::Some;
22716 let mut state = serializer.serialize_map(std::option::Option::None)?;
22717 if let Some(value) = self.replace() {
22718 state.serialize_entry("replace", value)?;
22719 }
22720 if let Some(value) = self.append() {
22721 state.serialize_entry("append", value)?;
22722 }
22723 if let Some(value) = self.maximum() {
22724 state.serialize_entry("maximum", value)?;
22725 }
22726 if let Some(value) = self.unique() {
22727 state.serialize_entry("unique", value)?;
22728 }
22729 if !self._unknown_fields.is_empty() {
22730 for (key, value) in self._unknown_fields.iter() {
22731 state.serialize_entry(key, &value)?;
22732 }
22733 }
22734 state.end()
22735 }
22736 }
22737
22738 impl std::fmt::Debug for LoadConfig {
22739 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22740 let mut debug_struct = f.debug_struct("LoadConfig");
22741 debug_struct.field("mode", &self.mode);
22742 if !self._unknown_fields.is_empty() {
22743 debug_struct.field("_unknown_fields", &self._unknown_fields);
22744 }
22745 debug_struct.finish()
22746 }
22747 }
22748
22749 pub mod load_config {
22751 #[allow(unused_imports)]
22752 use super::*;
22753
22754 #[derive(Clone, Debug, PartialEq)]
22756 #[non_exhaustive]
22757 pub enum Mode {
22758 Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
22760 Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
22762 Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
22765 Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
22768 }
22769 }
22770
22771 #[derive(Clone, Default, PartialEq)]
22773 #[non_exhaustive]
22774 pub struct SimpleLoadMode {
22775 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22776 }
22777
22778 impl SimpleLoadMode {
22779 pub fn new() -> Self {
22780 std::default::Default::default()
22781 }
22782 }
22783
22784 impl wkt::message::Message for SimpleLoadMode {
22785 fn typename() -> &'static str {
22786 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
22787 }
22788 }
22789
22790 #[doc(hidden)]
22791 impl<'de> serde::de::Deserialize<'de> for SimpleLoadMode {
22792 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22793 where
22794 D: serde::Deserializer<'de>,
22795 {
22796 #[allow(non_camel_case_types)]
22797 #[doc(hidden)]
22798 #[derive(PartialEq, Eq, Hash)]
22799 enum __FieldTag {
22800 Unknown(std::string::String),
22801 }
22802 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22803 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22804 where
22805 D: serde::Deserializer<'de>,
22806 {
22807 struct Visitor;
22808 impl<'de> serde::de::Visitor<'de> for Visitor {
22809 type Value = __FieldTag;
22810 fn expecting(
22811 &self,
22812 formatter: &mut std::fmt::Formatter,
22813 ) -> std::fmt::Result {
22814 formatter.write_str("a field name for SimpleLoadMode")
22815 }
22816 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
22817 where
22818 E: serde::de::Error,
22819 {
22820 use std::result::Result::Ok;
22821 use std::string::ToString;
22822 Ok(__FieldTag::Unknown(value.to_string()))
22823 }
22824 }
22825 deserializer.deserialize_identifier(Visitor)
22826 }
22827 }
22828 struct Visitor;
22829 impl<'de> serde::de::Visitor<'de> for Visitor {
22830 type Value = SimpleLoadMode;
22831 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22832 formatter.write_str("struct SimpleLoadMode")
22833 }
22834 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22835 where
22836 A: serde::de::MapAccess<'de>,
22837 {
22838 #[allow(unused_imports)]
22839 use serde::de::Error;
22840 use std::option::Option::Some;
22841 let mut result = Self::Value::new();
22842 while let Some(tag) = map.next_key::<__FieldTag>()? {
22843 #[allow(clippy::match_single_binding)]
22844 match tag {
22845 __FieldTag::Unknown(key) => {
22846 let value = map.next_value::<serde_json::Value>()?;
22847 result._unknown_fields.insert(key, value);
22848 }
22849 }
22850 }
22851 std::result::Result::Ok(result)
22852 }
22853 }
22854 deserializer.deserialize_any(Visitor)
22855 }
22856 }
22857
22858 #[doc(hidden)]
22859 impl serde::ser::Serialize for SimpleLoadMode {
22860 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
22861 where
22862 S: serde::ser::Serializer,
22863 {
22864 use serde::ser::SerializeMap;
22865 #[allow(unused_imports)]
22866 use std::option::Option::Some;
22867 let mut state = serializer.serialize_map(std::option::Option::None)?;
22868 if !self._unknown_fields.is_empty() {
22869 for (key, value) in self._unknown_fields.iter() {
22870 state.serialize_entry(key, &value)?;
22871 }
22872 }
22873 state.end()
22874 }
22875 }
22876
22877 impl std::fmt::Debug for SimpleLoadMode {
22878 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22879 let mut debug_struct = f.debug_struct("SimpleLoadMode");
22880 if !self._unknown_fields.is_empty() {
22881 debug_struct.field("_unknown_fields", &self._unknown_fields);
22882 }
22883 debug_struct.finish()
22884 }
22885 }
22886
22887 #[derive(Clone, Default, PartialEq)]
22889 #[non_exhaustive]
22890 pub struct IncrementalLoadMode {
22891 pub column: std::string::String,
22893
22894 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
22895 }
22896
22897 impl IncrementalLoadMode {
22898 pub fn new() -> Self {
22899 std::default::Default::default()
22900 }
22901
22902 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
22904 self.column = v.into();
22905 self
22906 }
22907 }
22908
22909 impl wkt::message::Message for IncrementalLoadMode {
22910 fn typename() -> &'static str {
22911 "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
22912 }
22913 }
22914
22915 #[doc(hidden)]
22916 impl<'de> serde::de::Deserialize<'de> for IncrementalLoadMode {
22917 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22918 where
22919 D: serde::Deserializer<'de>,
22920 {
22921 #[allow(non_camel_case_types)]
22922 #[doc(hidden)]
22923 #[derive(PartialEq, Eq, Hash)]
22924 enum __FieldTag {
22925 __column,
22926 Unknown(std::string::String),
22927 }
22928 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
22929 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
22930 where
22931 D: serde::Deserializer<'de>,
22932 {
22933 struct Visitor;
22934 impl<'de> serde::de::Visitor<'de> for Visitor {
22935 type Value = __FieldTag;
22936 fn expecting(
22937 &self,
22938 formatter: &mut std::fmt::Formatter,
22939 ) -> std::fmt::Result {
22940 formatter.write_str("a field name for IncrementalLoadMode")
22941 }
22942 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
22943 where
22944 E: serde::de::Error,
22945 {
22946 use std::result::Result::Ok;
22947 use std::string::ToString;
22948 match value {
22949 "column" => Ok(__FieldTag::__column),
22950 _ => Ok(__FieldTag::Unknown(value.to_string())),
22951 }
22952 }
22953 }
22954 deserializer.deserialize_identifier(Visitor)
22955 }
22956 }
22957 struct Visitor;
22958 impl<'de> serde::de::Visitor<'de> for Visitor {
22959 type Value = IncrementalLoadMode;
22960 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
22961 formatter.write_str("struct IncrementalLoadMode")
22962 }
22963 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
22964 where
22965 A: serde::de::MapAccess<'de>,
22966 {
22967 #[allow(unused_imports)]
22968 use serde::de::Error;
22969 use std::option::Option::Some;
22970 let mut fields = std::collections::HashSet::new();
22971 let mut result = Self::Value::new();
22972 while let Some(tag) = map.next_key::<__FieldTag>()? {
22973 #[allow(clippy::match_single_binding)]
22974 match tag {
22975 __FieldTag::__column => {
22976 if !fields.insert(__FieldTag::__column) {
22977 return std::result::Result::Err(A::Error::duplicate_field(
22978 "multiple values for column",
22979 ));
22980 }
22981 result.column = map
22982 .next_value::<std::option::Option<std::string::String>>()?
22983 .unwrap_or_default();
22984 }
22985 __FieldTag::Unknown(key) => {
22986 let value = map.next_value::<serde_json::Value>()?;
22987 result._unknown_fields.insert(key, value);
22988 }
22989 }
22990 }
22991 std::result::Result::Ok(result)
22992 }
22993 }
22994 deserializer.deserialize_any(Visitor)
22995 }
22996 }
22997
22998 #[doc(hidden)]
22999 impl serde::ser::Serialize for IncrementalLoadMode {
23000 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23001 where
23002 S: serde::ser::Serializer,
23003 {
23004 use serde::ser::SerializeMap;
23005 #[allow(unused_imports)]
23006 use std::option::Option::Some;
23007 let mut state = serializer.serialize_map(std::option::Option::None)?;
23008 if !self.column.is_empty() {
23009 state.serialize_entry("column", &self.column)?;
23010 }
23011 if !self._unknown_fields.is_empty() {
23012 for (key, value) in self._unknown_fields.iter() {
23013 state.serialize_entry(key, &value)?;
23014 }
23015 }
23016 state.end()
23017 }
23018 }
23019
23020 impl std::fmt::Debug for IncrementalLoadMode {
23021 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23022 let mut debug_struct = f.debug_struct("IncrementalLoadMode");
23023 debug_struct.field("column", &self.column);
23024 if !self._unknown_fields.is_empty() {
23025 debug_struct.field("_unknown_fields", &self._unknown_fields);
23026 }
23027 debug_struct.finish()
23028 }
23029 }
23030
23031 #[derive(Clone, Debug, PartialEq)]
23033 #[non_exhaustive]
23034 pub enum CompiledObject {
23035 Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
23037 Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
23039 Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
23041 Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
23043 Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
23045 DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
23047 }
23048}
23049
23050#[derive(Clone, Default, PartialEq)]
23052#[non_exhaustive]
23053pub struct QueryCompilationResultActionsRequest {
23054 pub name: std::string::String,
23056
23057 pub page_size: i32,
23061
23062 pub page_token: std::string::String,
23070
23071 pub filter: std::string::String,
23074
23075 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23076}
23077
23078impl QueryCompilationResultActionsRequest {
23079 pub fn new() -> Self {
23080 std::default::Default::default()
23081 }
23082
23083 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23085 self.name = v.into();
23086 self
23087 }
23088
23089 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
23091 self.page_size = v.into();
23092 self
23093 }
23094
23095 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23097 self.page_token = v.into();
23098 self
23099 }
23100
23101 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23103 self.filter = v.into();
23104 self
23105 }
23106}
23107
23108impl wkt::message::Message for QueryCompilationResultActionsRequest {
23109 fn typename() -> &'static str {
23110 "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
23111 }
23112}
23113
23114#[doc(hidden)]
23115impl<'de> serde::de::Deserialize<'de> for QueryCompilationResultActionsRequest {
23116 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23117 where
23118 D: serde::Deserializer<'de>,
23119 {
23120 #[allow(non_camel_case_types)]
23121 #[doc(hidden)]
23122 #[derive(PartialEq, Eq, Hash)]
23123 enum __FieldTag {
23124 __name,
23125 __page_size,
23126 __page_token,
23127 __filter,
23128 Unknown(std::string::String),
23129 }
23130 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23131 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23132 where
23133 D: serde::Deserializer<'de>,
23134 {
23135 struct Visitor;
23136 impl<'de> serde::de::Visitor<'de> for Visitor {
23137 type Value = __FieldTag;
23138 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23139 formatter.write_str("a field name for QueryCompilationResultActionsRequest")
23140 }
23141 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23142 where
23143 E: serde::de::Error,
23144 {
23145 use std::result::Result::Ok;
23146 use std::string::ToString;
23147 match value {
23148 "name" => Ok(__FieldTag::__name),
23149 "pageSize" => Ok(__FieldTag::__page_size),
23150 "page_size" => Ok(__FieldTag::__page_size),
23151 "pageToken" => Ok(__FieldTag::__page_token),
23152 "page_token" => Ok(__FieldTag::__page_token),
23153 "filter" => Ok(__FieldTag::__filter),
23154 _ => Ok(__FieldTag::Unknown(value.to_string())),
23155 }
23156 }
23157 }
23158 deserializer.deserialize_identifier(Visitor)
23159 }
23160 }
23161 struct Visitor;
23162 impl<'de> serde::de::Visitor<'de> for Visitor {
23163 type Value = QueryCompilationResultActionsRequest;
23164 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23165 formatter.write_str("struct QueryCompilationResultActionsRequest")
23166 }
23167 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23168 where
23169 A: serde::de::MapAccess<'de>,
23170 {
23171 #[allow(unused_imports)]
23172 use serde::de::Error;
23173 use std::option::Option::Some;
23174 let mut fields = std::collections::HashSet::new();
23175 let mut result = Self::Value::new();
23176 while let Some(tag) = map.next_key::<__FieldTag>()? {
23177 #[allow(clippy::match_single_binding)]
23178 match tag {
23179 __FieldTag::__name => {
23180 if !fields.insert(__FieldTag::__name) {
23181 return std::result::Result::Err(A::Error::duplicate_field(
23182 "multiple values for name",
23183 ));
23184 }
23185 result.name = map
23186 .next_value::<std::option::Option<std::string::String>>()?
23187 .unwrap_or_default();
23188 }
23189 __FieldTag::__page_size => {
23190 if !fields.insert(__FieldTag::__page_size) {
23191 return std::result::Result::Err(A::Error::duplicate_field(
23192 "multiple values for page_size",
23193 ));
23194 }
23195 struct __With(std::option::Option<i32>);
23196 impl<'de> serde::de::Deserialize<'de> for __With {
23197 fn deserialize<D>(
23198 deserializer: D,
23199 ) -> std::result::Result<Self, D::Error>
23200 where
23201 D: serde::de::Deserializer<'de>,
23202 {
23203 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
23204 }
23205 }
23206 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
23207 }
23208 __FieldTag::__page_token => {
23209 if !fields.insert(__FieldTag::__page_token) {
23210 return std::result::Result::Err(A::Error::duplicate_field(
23211 "multiple values for page_token",
23212 ));
23213 }
23214 result.page_token = map
23215 .next_value::<std::option::Option<std::string::String>>()?
23216 .unwrap_or_default();
23217 }
23218 __FieldTag::__filter => {
23219 if !fields.insert(__FieldTag::__filter) {
23220 return std::result::Result::Err(A::Error::duplicate_field(
23221 "multiple values for filter",
23222 ));
23223 }
23224 result.filter = map
23225 .next_value::<std::option::Option<std::string::String>>()?
23226 .unwrap_or_default();
23227 }
23228 __FieldTag::Unknown(key) => {
23229 let value = map.next_value::<serde_json::Value>()?;
23230 result._unknown_fields.insert(key, value);
23231 }
23232 }
23233 }
23234 std::result::Result::Ok(result)
23235 }
23236 }
23237 deserializer.deserialize_any(Visitor)
23238 }
23239}
23240
23241#[doc(hidden)]
23242impl serde::ser::Serialize for QueryCompilationResultActionsRequest {
23243 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23244 where
23245 S: serde::ser::Serializer,
23246 {
23247 use serde::ser::SerializeMap;
23248 #[allow(unused_imports)]
23249 use std::option::Option::Some;
23250 let mut state = serializer.serialize_map(std::option::Option::None)?;
23251 if !self.name.is_empty() {
23252 state.serialize_entry("name", &self.name)?;
23253 }
23254 if !wkt::internal::is_default(&self.page_size) {
23255 struct __With<'a>(&'a i32);
23256 impl<'a> serde::ser::Serialize for __With<'a> {
23257 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23258 where
23259 S: serde::ser::Serializer,
23260 {
23261 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
23262 }
23263 }
23264 state.serialize_entry("pageSize", &__With(&self.page_size))?;
23265 }
23266 if !self.page_token.is_empty() {
23267 state.serialize_entry("pageToken", &self.page_token)?;
23268 }
23269 if !self.filter.is_empty() {
23270 state.serialize_entry("filter", &self.filter)?;
23271 }
23272 if !self._unknown_fields.is_empty() {
23273 for (key, value) in self._unknown_fields.iter() {
23274 state.serialize_entry(key, &value)?;
23275 }
23276 }
23277 state.end()
23278 }
23279}
23280
23281impl std::fmt::Debug for QueryCompilationResultActionsRequest {
23282 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23283 let mut debug_struct = f.debug_struct("QueryCompilationResultActionsRequest");
23284 debug_struct.field("name", &self.name);
23285 debug_struct.field("page_size", &self.page_size);
23286 debug_struct.field("page_token", &self.page_token);
23287 debug_struct.field("filter", &self.filter);
23288 if !self._unknown_fields.is_empty() {
23289 debug_struct.field("_unknown_fields", &self._unknown_fields);
23290 }
23291 debug_struct.finish()
23292 }
23293}
23294
23295#[derive(Clone, Default, PartialEq)]
23297#[non_exhaustive]
23298pub struct QueryCompilationResultActionsResponse {
23299 pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
23301
23302 pub next_page_token: std::string::String,
23305
23306 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23307}
23308
23309impl QueryCompilationResultActionsResponse {
23310 pub fn new() -> Self {
23311 std::default::Default::default()
23312 }
23313
23314 pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
23316 where
23317 T: std::iter::IntoIterator<Item = V>,
23318 V: std::convert::Into<crate::model::CompilationResultAction>,
23319 {
23320 use std::iter::Iterator;
23321 self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
23322 self
23323 }
23324
23325 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23327 self.next_page_token = v.into();
23328 self
23329 }
23330}
23331
23332impl wkt::message::Message for QueryCompilationResultActionsResponse {
23333 fn typename() -> &'static str {
23334 "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
23335 }
23336}
23337
23338#[doc(hidden)]
23339impl gax::paginator::internal::PageableResponse for QueryCompilationResultActionsResponse {
23340 type PageItem = crate::model::CompilationResultAction;
23341
23342 fn items(self) -> std::vec::Vec<Self::PageItem> {
23343 self.compilation_result_actions
23344 }
23345
23346 fn next_page_token(&self) -> std::string::String {
23347 use std::clone::Clone;
23348 self.next_page_token.clone()
23349 }
23350}
23351
23352#[doc(hidden)]
23353impl<'de> serde::de::Deserialize<'de> for QueryCompilationResultActionsResponse {
23354 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23355 where
23356 D: serde::Deserializer<'de>,
23357 {
23358 #[allow(non_camel_case_types)]
23359 #[doc(hidden)]
23360 #[derive(PartialEq, Eq, Hash)]
23361 enum __FieldTag {
23362 __compilation_result_actions,
23363 __next_page_token,
23364 Unknown(std::string::String),
23365 }
23366 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23367 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23368 where
23369 D: serde::Deserializer<'de>,
23370 {
23371 struct Visitor;
23372 impl<'de> serde::de::Visitor<'de> for Visitor {
23373 type Value = __FieldTag;
23374 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23375 formatter
23376 .write_str("a field name for QueryCompilationResultActionsResponse")
23377 }
23378 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23379 where
23380 E: serde::de::Error,
23381 {
23382 use std::result::Result::Ok;
23383 use std::string::ToString;
23384 match value {
23385 "compilationResultActions" => {
23386 Ok(__FieldTag::__compilation_result_actions)
23387 }
23388 "compilation_result_actions" => {
23389 Ok(__FieldTag::__compilation_result_actions)
23390 }
23391 "nextPageToken" => Ok(__FieldTag::__next_page_token),
23392 "next_page_token" => Ok(__FieldTag::__next_page_token),
23393 _ => Ok(__FieldTag::Unknown(value.to_string())),
23394 }
23395 }
23396 }
23397 deserializer.deserialize_identifier(Visitor)
23398 }
23399 }
23400 struct Visitor;
23401 impl<'de> serde::de::Visitor<'de> for Visitor {
23402 type Value = QueryCompilationResultActionsResponse;
23403 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23404 formatter.write_str("struct QueryCompilationResultActionsResponse")
23405 }
23406 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23407 where
23408 A: serde::de::MapAccess<'de>,
23409 {
23410 #[allow(unused_imports)]
23411 use serde::de::Error;
23412 use std::option::Option::Some;
23413 let mut fields = std::collections::HashSet::new();
23414 let mut result = Self::Value::new();
23415 while let Some(tag) = map.next_key::<__FieldTag>()? {
23416 #[allow(clippy::match_single_binding)]
23417 match tag {
23418 __FieldTag::__compilation_result_actions => {
23419 if !fields.insert(__FieldTag::__compilation_result_actions) {
23420 return std::result::Result::Err(A::Error::duplicate_field(
23421 "multiple values for compilation_result_actions",
23422 ));
23423 }
23424 result.compilation_result_actions = map
23425 .next_value::<std::option::Option<
23426 std::vec::Vec<crate::model::CompilationResultAction>,
23427 >>()?
23428 .unwrap_or_default();
23429 }
23430 __FieldTag::__next_page_token => {
23431 if !fields.insert(__FieldTag::__next_page_token) {
23432 return std::result::Result::Err(A::Error::duplicate_field(
23433 "multiple values for next_page_token",
23434 ));
23435 }
23436 result.next_page_token = map
23437 .next_value::<std::option::Option<std::string::String>>()?
23438 .unwrap_or_default();
23439 }
23440 __FieldTag::Unknown(key) => {
23441 let value = map.next_value::<serde_json::Value>()?;
23442 result._unknown_fields.insert(key, value);
23443 }
23444 }
23445 }
23446 std::result::Result::Ok(result)
23447 }
23448 }
23449 deserializer.deserialize_any(Visitor)
23450 }
23451}
23452
23453#[doc(hidden)]
23454impl serde::ser::Serialize for QueryCompilationResultActionsResponse {
23455 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23456 where
23457 S: serde::ser::Serializer,
23458 {
23459 use serde::ser::SerializeMap;
23460 #[allow(unused_imports)]
23461 use std::option::Option::Some;
23462 let mut state = serializer.serialize_map(std::option::Option::None)?;
23463 if !self.compilation_result_actions.is_empty() {
23464 state.serialize_entry("compilationResultActions", &self.compilation_result_actions)?;
23465 }
23466 if !self.next_page_token.is_empty() {
23467 state.serialize_entry("nextPageToken", &self.next_page_token)?;
23468 }
23469 if !self._unknown_fields.is_empty() {
23470 for (key, value) in self._unknown_fields.iter() {
23471 state.serialize_entry(key, &value)?;
23472 }
23473 }
23474 state.end()
23475 }
23476}
23477
23478impl std::fmt::Debug for QueryCompilationResultActionsResponse {
23479 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23480 let mut debug_struct = f.debug_struct("QueryCompilationResultActionsResponse");
23481 debug_struct.field(
23482 "compilation_result_actions",
23483 &self.compilation_result_actions,
23484 );
23485 debug_struct.field("next_page_token", &self.next_page_token);
23486 if !self._unknown_fields.is_empty() {
23487 debug_struct.field("_unknown_fields", &self._unknown_fields);
23488 }
23489 debug_struct.finish()
23490 }
23491}
23492
23493#[derive(Clone, Default, PartialEq)]
23495#[non_exhaustive]
23496pub struct WorkflowConfig {
23497 pub name: std::string::String,
23499
23500 pub release_config: std::string::String,
23504
23505 pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
23507
23508 pub cron_schedule: std::string::String,
23511
23512 pub time_zone: std::string::String,
23517
23518 pub recent_scheduled_execution_records:
23522 std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
23523
23524 pub disabled: bool,
23526
23527 pub create_time: std::option::Option<wkt::Timestamp>,
23529
23530 pub update_time: std::option::Option<wkt::Timestamp>,
23532
23533 pub internal_metadata: std::option::Option<std::string::String>,
23537
23538 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23539}
23540
23541impl WorkflowConfig {
23542 pub fn new() -> Self {
23543 std::default::Default::default()
23544 }
23545
23546 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23548 self.name = v.into();
23549 self
23550 }
23551
23552 pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23554 self.release_config = v.into();
23555 self
23556 }
23557
23558 pub fn set_invocation_config<T>(mut self, v: T) -> Self
23560 where
23561 T: std::convert::Into<crate::model::InvocationConfig>,
23562 {
23563 self.invocation_config = std::option::Option::Some(v.into());
23564 self
23565 }
23566
23567 pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
23569 where
23570 T: std::convert::Into<crate::model::InvocationConfig>,
23571 {
23572 self.invocation_config = v.map(|x| x.into());
23573 self
23574 }
23575
23576 pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23578 self.cron_schedule = v.into();
23579 self
23580 }
23581
23582 pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
23584 self.time_zone = v.into();
23585 self
23586 }
23587
23588 pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
23590 where
23591 T: std::iter::IntoIterator<Item = V>,
23592 V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
23593 {
23594 use std::iter::Iterator;
23595 self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
23596 self
23597 }
23598
23599 pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
23601 self.disabled = v.into();
23602 self
23603 }
23604
23605 pub fn set_create_time<T>(mut self, v: T) -> Self
23607 where
23608 T: std::convert::Into<wkt::Timestamp>,
23609 {
23610 self.create_time = std::option::Option::Some(v.into());
23611 self
23612 }
23613
23614 pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
23616 where
23617 T: std::convert::Into<wkt::Timestamp>,
23618 {
23619 self.create_time = v.map(|x| x.into());
23620 self
23621 }
23622
23623 pub fn set_update_time<T>(mut self, v: T) -> Self
23625 where
23626 T: std::convert::Into<wkt::Timestamp>,
23627 {
23628 self.update_time = std::option::Option::Some(v.into());
23629 self
23630 }
23631
23632 pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
23634 where
23635 T: std::convert::Into<wkt::Timestamp>,
23636 {
23637 self.update_time = v.map(|x| x.into());
23638 self
23639 }
23640
23641 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
23643 where
23644 T: std::convert::Into<std::string::String>,
23645 {
23646 self.internal_metadata = std::option::Option::Some(v.into());
23647 self
23648 }
23649
23650 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
23652 where
23653 T: std::convert::Into<std::string::String>,
23654 {
23655 self.internal_metadata = v.map(|x| x.into());
23656 self
23657 }
23658}
23659
23660impl wkt::message::Message for WorkflowConfig {
23661 fn typename() -> &'static str {
23662 "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
23663 }
23664}
23665
23666#[doc(hidden)]
23667impl<'de> serde::de::Deserialize<'de> for WorkflowConfig {
23668 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23669 where
23670 D: serde::Deserializer<'de>,
23671 {
23672 #[allow(non_camel_case_types)]
23673 #[doc(hidden)]
23674 #[derive(PartialEq, Eq, Hash)]
23675 enum __FieldTag {
23676 __name,
23677 __release_config,
23678 __invocation_config,
23679 __cron_schedule,
23680 __time_zone,
23681 __recent_scheduled_execution_records,
23682 __disabled,
23683 __create_time,
23684 __update_time,
23685 __internal_metadata,
23686 Unknown(std::string::String),
23687 }
23688 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
23689 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
23690 where
23691 D: serde::Deserializer<'de>,
23692 {
23693 struct Visitor;
23694 impl<'de> serde::de::Visitor<'de> for Visitor {
23695 type Value = __FieldTag;
23696 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23697 formatter.write_str("a field name for WorkflowConfig")
23698 }
23699 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
23700 where
23701 E: serde::de::Error,
23702 {
23703 use std::result::Result::Ok;
23704 use std::string::ToString;
23705 match value {
23706 "name" => Ok(__FieldTag::__name),
23707 "releaseConfig" => Ok(__FieldTag::__release_config),
23708 "release_config" => Ok(__FieldTag::__release_config),
23709 "invocationConfig" => Ok(__FieldTag::__invocation_config),
23710 "invocation_config" => Ok(__FieldTag::__invocation_config),
23711 "cronSchedule" => Ok(__FieldTag::__cron_schedule),
23712 "cron_schedule" => Ok(__FieldTag::__cron_schedule),
23713 "timeZone" => Ok(__FieldTag::__time_zone),
23714 "time_zone" => Ok(__FieldTag::__time_zone),
23715 "recentScheduledExecutionRecords" => {
23716 Ok(__FieldTag::__recent_scheduled_execution_records)
23717 }
23718 "recent_scheduled_execution_records" => {
23719 Ok(__FieldTag::__recent_scheduled_execution_records)
23720 }
23721 "disabled" => Ok(__FieldTag::__disabled),
23722 "createTime" => Ok(__FieldTag::__create_time),
23723 "create_time" => Ok(__FieldTag::__create_time),
23724 "updateTime" => Ok(__FieldTag::__update_time),
23725 "update_time" => Ok(__FieldTag::__update_time),
23726 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
23727 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
23728 _ => Ok(__FieldTag::Unknown(value.to_string())),
23729 }
23730 }
23731 }
23732 deserializer.deserialize_identifier(Visitor)
23733 }
23734 }
23735 struct Visitor;
23736 impl<'de> serde::de::Visitor<'de> for Visitor {
23737 type Value = WorkflowConfig;
23738 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
23739 formatter.write_str("struct WorkflowConfig")
23740 }
23741 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
23742 where
23743 A: serde::de::MapAccess<'de>,
23744 {
23745 #[allow(unused_imports)]
23746 use serde::de::Error;
23747 use std::option::Option::Some;
23748 let mut fields = std::collections::HashSet::new();
23749 let mut result = Self::Value::new();
23750 while let Some(tag) = map.next_key::<__FieldTag>()? {
23751 #[allow(clippy::match_single_binding)]
23752 match tag {
23753 __FieldTag::__name => {
23754 if !fields.insert(__FieldTag::__name) {
23755 return std::result::Result::Err(A::Error::duplicate_field(
23756 "multiple values for name",
23757 ));
23758 }
23759 result.name = map
23760 .next_value::<std::option::Option<std::string::String>>()?
23761 .unwrap_or_default();
23762 }
23763 __FieldTag::__release_config => {
23764 if !fields.insert(__FieldTag::__release_config) {
23765 return std::result::Result::Err(A::Error::duplicate_field(
23766 "multiple values for release_config",
23767 ));
23768 }
23769 result.release_config = map
23770 .next_value::<std::option::Option<std::string::String>>()?
23771 .unwrap_or_default();
23772 }
23773 __FieldTag::__invocation_config => {
23774 if !fields.insert(__FieldTag::__invocation_config) {
23775 return std::result::Result::Err(A::Error::duplicate_field(
23776 "multiple values for invocation_config",
23777 ));
23778 }
23779 result.invocation_config = map
23780 .next_value::<std::option::Option<crate::model::InvocationConfig>>(
23781 )?;
23782 }
23783 __FieldTag::__cron_schedule => {
23784 if !fields.insert(__FieldTag::__cron_schedule) {
23785 return std::result::Result::Err(A::Error::duplicate_field(
23786 "multiple values for cron_schedule",
23787 ));
23788 }
23789 result.cron_schedule = map
23790 .next_value::<std::option::Option<std::string::String>>()?
23791 .unwrap_or_default();
23792 }
23793 __FieldTag::__time_zone => {
23794 if !fields.insert(__FieldTag::__time_zone) {
23795 return std::result::Result::Err(A::Error::duplicate_field(
23796 "multiple values for time_zone",
23797 ));
23798 }
23799 result.time_zone = map
23800 .next_value::<std::option::Option<std::string::String>>()?
23801 .unwrap_or_default();
23802 }
23803 __FieldTag::__recent_scheduled_execution_records => {
23804 if !fields.insert(__FieldTag::__recent_scheduled_execution_records) {
23805 return std::result::Result::Err(A::Error::duplicate_field(
23806 "multiple values for recent_scheduled_execution_records",
23807 ));
23808 }
23809 result.recent_scheduled_execution_records = map
23810 .next_value::<std::option::Option<
23811 std::vec::Vec<
23812 crate::model::workflow_config::ScheduledExecutionRecord,
23813 >,
23814 >>()?
23815 .unwrap_or_default();
23816 }
23817 __FieldTag::__disabled => {
23818 if !fields.insert(__FieldTag::__disabled) {
23819 return std::result::Result::Err(A::Error::duplicate_field(
23820 "multiple values for disabled",
23821 ));
23822 }
23823 result.disabled = map
23824 .next_value::<std::option::Option<bool>>()?
23825 .unwrap_or_default();
23826 }
23827 __FieldTag::__create_time => {
23828 if !fields.insert(__FieldTag::__create_time) {
23829 return std::result::Result::Err(A::Error::duplicate_field(
23830 "multiple values for create_time",
23831 ));
23832 }
23833 result.create_time =
23834 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
23835 }
23836 __FieldTag::__update_time => {
23837 if !fields.insert(__FieldTag::__update_time) {
23838 return std::result::Result::Err(A::Error::duplicate_field(
23839 "multiple values for update_time",
23840 ));
23841 }
23842 result.update_time =
23843 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
23844 }
23845 __FieldTag::__internal_metadata => {
23846 if !fields.insert(__FieldTag::__internal_metadata) {
23847 return std::result::Result::Err(A::Error::duplicate_field(
23848 "multiple values for internal_metadata",
23849 ));
23850 }
23851 result.internal_metadata =
23852 map.next_value::<std::option::Option<std::string::String>>()?;
23853 }
23854 __FieldTag::Unknown(key) => {
23855 let value = map.next_value::<serde_json::Value>()?;
23856 result._unknown_fields.insert(key, value);
23857 }
23858 }
23859 }
23860 std::result::Result::Ok(result)
23861 }
23862 }
23863 deserializer.deserialize_any(Visitor)
23864 }
23865}
23866
23867#[doc(hidden)]
23868impl serde::ser::Serialize for WorkflowConfig {
23869 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
23870 where
23871 S: serde::ser::Serializer,
23872 {
23873 use serde::ser::SerializeMap;
23874 #[allow(unused_imports)]
23875 use std::option::Option::Some;
23876 let mut state = serializer.serialize_map(std::option::Option::None)?;
23877 if !self.name.is_empty() {
23878 state.serialize_entry("name", &self.name)?;
23879 }
23880 if !self.release_config.is_empty() {
23881 state.serialize_entry("releaseConfig", &self.release_config)?;
23882 }
23883 if self.invocation_config.is_some() {
23884 state.serialize_entry("invocationConfig", &self.invocation_config)?;
23885 }
23886 if !self.cron_schedule.is_empty() {
23887 state.serialize_entry("cronSchedule", &self.cron_schedule)?;
23888 }
23889 if !self.time_zone.is_empty() {
23890 state.serialize_entry("timeZone", &self.time_zone)?;
23891 }
23892 if !self.recent_scheduled_execution_records.is_empty() {
23893 state.serialize_entry(
23894 "recentScheduledExecutionRecords",
23895 &self.recent_scheduled_execution_records,
23896 )?;
23897 }
23898 if !wkt::internal::is_default(&self.disabled) {
23899 state.serialize_entry("disabled", &self.disabled)?;
23900 }
23901 if self.create_time.is_some() {
23902 state.serialize_entry("createTime", &self.create_time)?;
23903 }
23904 if self.update_time.is_some() {
23905 state.serialize_entry("updateTime", &self.update_time)?;
23906 }
23907 if self.internal_metadata.is_some() {
23908 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
23909 }
23910 if !self._unknown_fields.is_empty() {
23911 for (key, value) in self._unknown_fields.iter() {
23912 state.serialize_entry(key, &value)?;
23913 }
23914 }
23915 state.end()
23916 }
23917}
23918
23919impl std::fmt::Debug for WorkflowConfig {
23920 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23921 let mut debug_struct = f.debug_struct("WorkflowConfig");
23922 debug_struct.field("name", &self.name);
23923 debug_struct.field("release_config", &self.release_config);
23924 debug_struct.field("invocation_config", &self.invocation_config);
23925 debug_struct.field("cron_schedule", &self.cron_schedule);
23926 debug_struct.field("time_zone", &self.time_zone);
23927 debug_struct.field(
23928 "recent_scheduled_execution_records",
23929 &self.recent_scheduled_execution_records,
23930 );
23931 debug_struct.field("disabled", &self.disabled);
23932 debug_struct.field("create_time", &self.create_time);
23933 debug_struct.field("update_time", &self.update_time);
23934 debug_struct.field("internal_metadata", &self.internal_metadata);
23935 if !self._unknown_fields.is_empty() {
23936 debug_struct.field("_unknown_fields", &self._unknown_fields);
23937 }
23938 debug_struct.finish()
23939 }
23940}
23941
23942pub mod workflow_config {
23944 #[allow(unused_imports)]
23945 use super::*;
23946
23947 #[derive(Clone, Default, PartialEq)]
23950 #[non_exhaustive]
23951 pub struct ScheduledExecutionRecord {
23952 pub execution_time: std::option::Option<wkt::Timestamp>,
23954
23955 pub result:
23957 std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
23958
23959 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
23960 }
23961
23962 impl ScheduledExecutionRecord {
23963 pub fn new() -> Self {
23964 std::default::Default::default()
23965 }
23966
23967 pub fn set_execution_time<T>(mut self, v: T) -> Self
23969 where
23970 T: std::convert::Into<wkt::Timestamp>,
23971 {
23972 self.execution_time = std::option::Option::Some(v.into());
23973 self
23974 }
23975
23976 pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
23978 where
23979 T: std::convert::Into<wkt::Timestamp>,
23980 {
23981 self.execution_time = v.map(|x| x.into());
23982 self
23983 }
23984
23985 pub fn set_result<
23990 T: std::convert::Into<
23991 std::option::Option<
23992 crate::model::workflow_config::scheduled_execution_record::Result,
23993 >,
23994 >,
23995 >(
23996 mut self,
23997 v: T,
23998 ) -> Self {
23999 self.result = v.into();
24000 self
24001 }
24002
24003 pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
24007 #[allow(unreachable_patterns)]
24008 self.result.as_ref().and_then(|v| match v {
24009 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
24010 _ => std::option::Option::None,
24011 })
24012 }
24013
24014 pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
24020 mut self,
24021 v: T,
24022 ) -> Self {
24023 self.result = std::option::Option::Some(
24024 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
24025 v.into()
24026 )
24027 );
24028 self
24029 }
24030
24031 pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
24035 #[allow(unreachable_patterns)]
24036 self.result.as_ref().and_then(|v| match v {
24037 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
24038 v,
24039 ) => std::option::Option::Some(v),
24040 _ => std::option::Option::None,
24041 })
24042 }
24043
24044 pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
24050 mut self,
24051 v: T,
24052 ) -> Self {
24053 self.result = std::option::Option::Some(
24054 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
24055 v.into(),
24056 ),
24057 );
24058 self
24059 }
24060 }
24061
24062 impl wkt::message::Message for ScheduledExecutionRecord {
24063 fn typename() -> &'static str {
24064 "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
24065 }
24066 }
24067
24068 #[doc(hidden)]
24069 impl<'de> serde::de::Deserialize<'de> for ScheduledExecutionRecord {
24070 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24071 where
24072 D: serde::Deserializer<'de>,
24073 {
24074 #[allow(non_camel_case_types)]
24075 #[doc(hidden)]
24076 #[derive(PartialEq, Eq, Hash)]
24077 enum __FieldTag {
24078 __workflow_invocation,
24079 __error_status,
24080 __execution_time,
24081 Unknown(std::string::String),
24082 }
24083 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
24084 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24085 where
24086 D: serde::Deserializer<'de>,
24087 {
24088 struct Visitor;
24089 impl<'de> serde::de::Visitor<'de> for Visitor {
24090 type Value = __FieldTag;
24091 fn expecting(
24092 &self,
24093 formatter: &mut std::fmt::Formatter,
24094 ) -> std::fmt::Result {
24095 formatter.write_str("a field name for ScheduledExecutionRecord")
24096 }
24097 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
24098 where
24099 E: serde::de::Error,
24100 {
24101 use std::result::Result::Ok;
24102 use std::string::ToString;
24103 match value {
24104 "workflowInvocation" => Ok(__FieldTag::__workflow_invocation),
24105 "workflow_invocation" => Ok(__FieldTag::__workflow_invocation),
24106 "errorStatus" => Ok(__FieldTag::__error_status),
24107 "error_status" => Ok(__FieldTag::__error_status),
24108 "executionTime" => Ok(__FieldTag::__execution_time),
24109 "execution_time" => Ok(__FieldTag::__execution_time),
24110 _ => Ok(__FieldTag::Unknown(value.to_string())),
24111 }
24112 }
24113 }
24114 deserializer.deserialize_identifier(Visitor)
24115 }
24116 }
24117 struct Visitor;
24118 impl<'de> serde::de::Visitor<'de> for Visitor {
24119 type Value = ScheduledExecutionRecord;
24120 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24121 formatter.write_str("struct ScheduledExecutionRecord")
24122 }
24123 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
24124 where
24125 A: serde::de::MapAccess<'de>,
24126 {
24127 #[allow(unused_imports)]
24128 use serde::de::Error;
24129 use std::option::Option::Some;
24130 let mut fields = std::collections::HashSet::new();
24131 let mut result = Self::Value::new();
24132 while let Some(tag) = map.next_key::<__FieldTag>()? {
24133 #[allow(clippy::match_single_binding)]
24134 match tag {
24135 __FieldTag::__workflow_invocation => {
24136 if !fields.insert(__FieldTag::__workflow_invocation) {
24137 return std::result::Result::Err(A::Error::duplicate_field(
24138 "multiple values for workflow_invocation",
24139 ));
24140 }
24141 if result.result.is_some() {
24142 return std::result::Result::Err(A::Error::duplicate_field(
24143 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord.workflow_invocation, latest field was workflowInvocation",
24144 ));
24145 }
24146 result.result = std::option::Option::Some(
24147 crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
24148 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
24149 ),
24150 );
24151 }
24152 __FieldTag::__error_status => {
24153 if !fields.insert(__FieldTag::__error_status) {
24154 return std::result::Result::Err(A::Error::duplicate_field(
24155 "multiple values for error_status",
24156 ));
24157 }
24158 if result.result.is_some() {
24159 return std::result::Result::Err(A::Error::duplicate_field(
24160 "multiple values for `result`, a oneof with full ID .google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord.error_status, latest field was errorStatus",
24161 ));
24162 }
24163 result.result = std::option::Option::Some(
24164 crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
24165 map.next_value::<std::option::Option<std::boxed::Box<rpc::model::Status>>>()?.unwrap_or_default()
24166 ),
24167 );
24168 }
24169 __FieldTag::__execution_time => {
24170 if !fields.insert(__FieldTag::__execution_time) {
24171 return std::result::Result::Err(A::Error::duplicate_field(
24172 "multiple values for execution_time",
24173 ));
24174 }
24175 result.execution_time =
24176 map.next_value::<std::option::Option<wkt::Timestamp>>()?;
24177 }
24178 __FieldTag::Unknown(key) => {
24179 let value = map.next_value::<serde_json::Value>()?;
24180 result._unknown_fields.insert(key, value);
24181 }
24182 }
24183 }
24184 std::result::Result::Ok(result)
24185 }
24186 }
24187 deserializer.deserialize_any(Visitor)
24188 }
24189 }
24190
24191 #[doc(hidden)]
24192 impl serde::ser::Serialize for ScheduledExecutionRecord {
24193 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24194 where
24195 S: serde::ser::Serializer,
24196 {
24197 use serde::ser::SerializeMap;
24198 #[allow(unused_imports)]
24199 use std::option::Option::Some;
24200 let mut state = serializer.serialize_map(std::option::Option::None)?;
24201 if let Some(value) = self.workflow_invocation() {
24202 state.serialize_entry("workflowInvocation", value)?;
24203 }
24204 if let Some(value) = self.error_status() {
24205 state.serialize_entry("errorStatus", value)?;
24206 }
24207 if self.execution_time.is_some() {
24208 state.serialize_entry("executionTime", &self.execution_time)?;
24209 }
24210 if !self._unknown_fields.is_empty() {
24211 for (key, value) in self._unknown_fields.iter() {
24212 state.serialize_entry(key, &value)?;
24213 }
24214 }
24215 state.end()
24216 }
24217 }
24218
24219 impl std::fmt::Debug for ScheduledExecutionRecord {
24220 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24221 let mut debug_struct = f.debug_struct("ScheduledExecutionRecord");
24222 debug_struct.field("execution_time", &self.execution_time);
24223 debug_struct.field("result", &self.result);
24224 if !self._unknown_fields.is_empty() {
24225 debug_struct.field("_unknown_fields", &self._unknown_fields);
24226 }
24227 debug_struct.finish()
24228 }
24229 }
24230
24231 pub mod scheduled_execution_record {
24233 #[allow(unused_imports)]
24234 use super::*;
24235
24236 #[derive(Clone, Debug, PartialEq)]
24238 #[non_exhaustive]
24239 pub enum Result {
24240 WorkflowInvocation(std::string::String),
24244 ErrorStatus(std::boxed::Box<rpc::model::Status>),
24247 }
24248 }
24249}
24250
24251#[derive(Clone, Default, PartialEq)]
24255#[non_exhaustive]
24256pub struct InvocationConfig {
24257 pub included_targets: std::vec::Vec<crate::model::Target>,
24259
24260 pub included_tags: std::vec::Vec<std::string::String>,
24262
24263 pub transitive_dependencies_included: bool,
24266
24267 pub transitive_dependents_included: bool,
24270
24271 pub fully_refresh_incremental_tables_enabled: bool,
24273
24274 pub service_account: std::string::String,
24276
24277 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24278}
24279
24280impl InvocationConfig {
24281 pub fn new() -> Self {
24282 std::default::Default::default()
24283 }
24284
24285 pub fn set_included_targets<T, V>(mut self, v: T) -> Self
24287 where
24288 T: std::iter::IntoIterator<Item = V>,
24289 V: std::convert::Into<crate::model::Target>,
24290 {
24291 use std::iter::Iterator;
24292 self.included_targets = v.into_iter().map(|i| i.into()).collect();
24293 self
24294 }
24295
24296 pub fn set_included_tags<T, V>(mut self, v: T) -> Self
24298 where
24299 T: std::iter::IntoIterator<Item = V>,
24300 V: std::convert::Into<std::string::String>,
24301 {
24302 use std::iter::Iterator;
24303 self.included_tags = v.into_iter().map(|i| i.into()).collect();
24304 self
24305 }
24306
24307 pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
24309 mut self,
24310 v: T,
24311 ) -> Self {
24312 self.transitive_dependencies_included = v.into();
24313 self
24314 }
24315
24316 pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
24318 self.transitive_dependents_included = v.into();
24319 self
24320 }
24321
24322 pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
24324 mut self,
24325 v: T,
24326 ) -> Self {
24327 self.fully_refresh_incremental_tables_enabled = v.into();
24328 self
24329 }
24330
24331 pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24333 self.service_account = v.into();
24334 self
24335 }
24336}
24337
24338impl wkt::message::Message for InvocationConfig {
24339 fn typename() -> &'static str {
24340 "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
24341 }
24342}
24343
24344#[doc(hidden)]
24345impl<'de> serde::de::Deserialize<'de> for InvocationConfig {
24346 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24347 where
24348 D: serde::Deserializer<'de>,
24349 {
24350 #[allow(non_camel_case_types)]
24351 #[doc(hidden)]
24352 #[derive(PartialEq, Eq, Hash)]
24353 enum __FieldTag {
24354 __included_targets,
24355 __included_tags,
24356 __transitive_dependencies_included,
24357 __transitive_dependents_included,
24358 __fully_refresh_incremental_tables_enabled,
24359 __service_account,
24360 Unknown(std::string::String),
24361 }
24362 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
24363 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24364 where
24365 D: serde::Deserializer<'de>,
24366 {
24367 struct Visitor;
24368 impl<'de> serde::de::Visitor<'de> for Visitor {
24369 type Value = __FieldTag;
24370 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24371 formatter.write_str("a field name for InvocationConfig")
24372 }
24373 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
24374 where
24375 E: serde::de::Error,
24376 {
24377 use std::result::Result::Ok;
24378 use std::string::ToString;
24379 match value {
24380 "includedTargets" => Ok(__FieldTag::__included_targets),
24381 "included_targets" => Ok(__FieldTag::__included_targets),
24382 "includedTags" => Ok(__FieldTag::__included_tags),
24383 "included_tags" => Ok(__FieldTag::__included_tags),
24384 "transitiveDependenciesIncluded" => {
24385 Ok(__FieldTag::__transitive_dependencies_included)
24386 }
24387 "transitive_dependencies_included" => {
24388 Ok(__FieldTag::__transitive_dependencies_included)
24389 }
24390 "transitiveDependentsIncluded" => {
24391 Ok(__FieldTag::__transitive_dependents_included)
24392 }
24393 "transitive_dependents_included" => {
24394 Ok(__FieldTag::__transitive_dependents_included)
24395 }
24396 "fullyRefreshIncrementalTablesEnabled" => {
24397 Ok(__FieldTag::__fully_refresh_incremental_tables_enabled)
24398 }
24399 "fully_refresh_incremental_tables_enabled" => {
24400 Ok(__FieldTag::__fully_refresh_incremental_tables_enabled)
24401 }
24402 "serviceAccount" => Ok(__FieldTag::__service_account),
24403 "service_account" => Ok(__FieldTag::__service_account),
24404 _ => Ok(__FieldTag::Unknown(value.to_string())),
24405 }
24406 }
24407 }
24408 deserializer.deserialize_identifier(Visitor)
24409 }
24410 }
24411 struct Visitor;
24412 impl<'de> serde::de::Visitor<'de> for Visitor {
24413 type Value = InvocationConfig;
24414 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24415 formatter.write_str("struct InvocationConfig")
24416 }
24417 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
24418 where
24419 A: serde::de::MapAccess<'de>,
24420 {
24421 #[allow(unused_imports)]
24422 use serde::de::Error;
24423 use std::option::Option::Some;
24424 let mut fields = std::collections::HashSet::new();
24425 let mut result = Self::Value::new();
24426 while let Some(tag) = map.next_key::<__FieldTag>()? {
24427 #[allow(clippy::match_single_binding)]
24428 match tag {
24429 __FieldTag::__included_targets => {
24430 if !fields.insert(__FieldTag::__included_targets) {
24431 return std::result::Result::Err(A::Error::duplicate_field(
24432 "multiple values for included_targets",
24433 ));
24434 }
24435 result.included_targets = map.next_value::<std::option::Option<std::vec::Vec<crate::model::Target>>>()?.unwrap_or_default();
24436 }
24437 __FieldTag::__included_tags => {
24438 if !fields.insert(__FieldTag::__included_tags) {
24439 return std::result::Result::Err(A::Error::duplicate_field(
24440 "multiple values for included_tags",
24441 ));
24442 }
24443 result.included_tags = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
24444 }
24445 __FieldTag::__transitive_dependencies_included => {
24446 if !fields.insert(__FieldTag::__transitive_dependencies_included) {
24447 return std::result::Result::Err(A::Error::duplicate_field(
24448 "multiple values for transitive_dependencies_included",
24449 ));
24450 }
24451 result.transitive_dependencies_included = map
24452 .next_value::<std::option::Option<bool>>()?
24453 .unwrap_or_default();
24454 }
24455 __FieldTag::__transitive_dependents_included => {
24456 if !fields.insert(__FieldTag::__transitive_dependents_included) {
24457 return std::result::Result::Err(A::Error::duplicate_field(
24458 "multiple values for transitive_dependents_included",
24459 ));
24460 }
24461 result.transitive_dependents_included = map
24462 .next_value::<std::option::Option<bool>>()?
24463 .unwrap_or_default();
24464 }
24465 __FieldTag::__fully_refresh_incremental_tables_enabled => {
24466 if !fields
24467 .insert(__FieldTag::__fully_refresh_incremental_tables_enabled)
24468 {
24469 return std::result::Result::Err(A::Error::duplicate_field(
24470 "multiple values for fully_refresh_incremental_tables_enabled",
24471 ));
24472 }
24473 result.fully_refresh_incremental_tables_enabled = map
24474 .next_value::<std::option::Option<bool>>()?
24475 .unwrap_or_default();
24476 }
24477 __FieldTag::__service_account => {
24478 if !fields.insert(__FieldTag::__service_account) {
24479 return std::result::Result::Err(A::Error::duplicate_field(
24480 "multiple values for service_account",
24481 ));
24482 }
24483 result.service_account = map
24484 .next_value::<std::option::Option<std::string::String>>()?
24485 .unwrap_or_default();
24486 }
24487 __FieldTag::Unknown(key) => {
24488 let value = map.next_value::<serde_json::Value>()?;
24489 result._unknown_fields.insert(key, value);
24490 }
24491 }
24492 }
24493 std::result::Result::Ok(result)
24494 }
24495 }
24496 deserializer.deserialize_any(Visitor)
24497 }
24498}
24499
24500#[doc(hidden)]
24501impl serde::ser::Serialize for InvocationConfig {
24502 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24503 where
24504 S: serde::ser::Serializer,
24505 {
24506 use serde::ser::SerializeMap;
24507 #[allow(unused_imports)]
24508 use std::option::Option::Some;
24509 let mut state = serializer.serialize_map(std::option::Option::None)?;
24510 if !self.included_targets.is_empty() {
24511 state.serialize_entry("includedTargets", &self.included_targets)?;
24512 }
24513 if !self.included_tags.is_empty() {
24514 state.serialize_entry("includedTags", &self.included_tags)?;
24515 }
24516 if !wkt::internal::is_default(&self.transitive_dependencies_included) {
24517 state.serialize_entry(
24518 "transitiveDependenciesIncluded",
24519 &self.transitive_dependencies_included,
24520 )?;
24521 }
24522 if !wkt::internal::is_default(&self.transitive_dependents_included) {
24523 state.serialize_entry(
24524 "transitiveDependentsIncluded",
24525 &self.transitive_dependents_included,
24526 )?;
24527 }
24528 if !wkt::internal::is_default(&self.fully_refresh_incremental_tables_enabled) {
24529 state.serialize_entry(
24530 "fullyRefreshIncrementalTablesEnabled",
24531 &self.fully_refresh_incremental_tables_enabled,
24532 )?;
24533 }
24534 if !self.service_account.is_empty() {
24535 state.serialize_entry("serviceAccount", &self.service_account)?;
24536 }
24537 if !self._unknown_fields.is_empty() {
24538 for (key, value) in self._unknown_fields.iter() {
24539 state.serialize_entry(key, &value)?;
24540 }
24541 }
24542 state.end()
24543 }
24544}
24545
24546impl std::fmt::Debug for InvocationConfig {
24547 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24548 let mut debug_struct = f.debug_struct("InvocationConfig");
24549 debug_struct.field("included_targets", &self.included_targets);
24550 debug_struct.field("included_tags", &self.included_tags);
24551 debug_struct.field(
24552 "transitive_dependencies_included",
24553 &self.transitive_dependencies_included,
24554 );
24555 debug_struct.field(
24556 "transitive_dependents_included",
24557 &self.transitive_dependents_included,
24558 );
24559 debug_struct.field(
24560 "fully_refresh_incremental_tables_enabled",
24561 &self.fully_refresh_incremental_tables_enabled,
24562 );
24563 debug_struct.field("service_account", &self.service_account);
24564 if !self._unknown_fields.is_empty() {
24565 debug_struct.field("_unknown_fields", &self._unknown_fields);
24566 }
24567 debug_struct.finish()
24568 }
24569}
24570
24571#[derive(Clone, Default, PartialEq)]
24573#[non_exhaustive]
24574pub struct ListWorkflowConfigsRequest {
24575 pub parent: std::string::String,
24578
24579 pub page_size: i32,
24583
24584 pub page_token: std::string::String,
24591
24592 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24593}
24594
24595impl ListWorkflowConfigsRequest {
24596 pub fn new() -> Self {
24597 std::default::Default::default()
24598 }
24599
24600 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24602 self.parent = v.into();
24603 self
24604 }
24605
24606 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
24608 self.page_size = v.into();
24609 self
24610 }
24611
24612 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24614 self.page_token = v.into();
24615 self
24616 }
24617}
24618
24619impl wkt::message::Message for ListWorkflowConfigsRequest {
24620 fn typename() -> &'static str {
24621 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
24622 }
24623}
24624
24625#[doc(hidden)]
24626impl<'de> serde::de::Deserialize<'de> for ListWorkflowConfigsRequest {
24627 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24628 where
24629 D: serde::Deserializer<'de>,
24630 {
24631 #[allow(non_camel_case_types)]
24632 #[doc(hidden)]
24633 #[derive(PartialEq, Eq, Hash)]
24634 enum __FieldTag {
24635 __parent,
24636 __page_size,
24637 __page_token,
24638 Unknown(std::string::String),
24639 }
24640 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
24641 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24642 where
24643 D: serde::Deserializer<'de>,
24644 {
24645 struct Visitor;
24646 impl<'de> serde::de::Visitor<'de> for Visitor {
24647 type Value = __FieldTag;
24648 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24649 formatter.write_str("a field name for ListWorkflowConfigsRequest")
24650 }
24651 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
24652 where
24653 E: serde::de::Error,
24654 {
24655 use std::result::Result::Ok;
24656 use std::string::ToString;
24657 match value {
24658 "parent" => Ok(__FieldTag::__parent),
24659 "pageSize" => Ok(__FieldTag::__page_size),
24660 "page_size" => Ok(__FieldTag::__page_size),
24661 "pageToken" => Ok(__FieldTag::__page_token),
24662 "page_token" => Ok(__FieldTag::__page_token),
24663 _ => Ok(__FieldTag::Unknown(value.to_string())),
24664 }
24665 }
24666 }
24667 deserializer.deserialize_identifier(Visitor)
24668 }
24669 }
24670 struct Visitor;
24671 impl<'de> serde::de::Visitor<'de> for Visitor {
24672 type Value = ListWorkflowConfigsRequest;
24673 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24674 formatter.write_str("struct ListWorkflowConfigsRequest")
24675 }
24676 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
24677 where
24678 A: serde::de::MapAccess<'de>,
24679 {
24680 #[allow(unused_imports)]
24681 use serde::de::Error;
24682 use std::option::Option::Some;
24683 let mut fields = std::collections::HashSet::new();
24684 let mut result = Self::Value::new();
24685 while let Some(tag) = map.next_key::<__FieldTag>()? {
24686 #[allow(clippy::match_single_binding)]
24687 match tag {
24688 __FieldTag::__parent => {
24689 if !fields.insert(__FieldTag::__parent) {
24690 return std::result::Result::Err(A::Error::duplicate_field(
24691 "multiple values for parent",
24692 ));
24693 }
24694 result.parent = map
24695 .next_value::<std::option::Option<std::string::String>>()?
24696 .unwrap_or_default();
24697 }
24698 __FieldTag::__page_size => {
24699 if !fields.insert(__FieldTag::__page_size) {
24700 return std::result::Result::Err(A::Error::duplicate_field(
24701 "multiple values for page_size",
24702 ));
24703 }
24704 struct __With(std::option::Option<i32>);
24705 impl<'de> serde::de::Deserialize<'de> for __With {
24706 fn deserialize<D>(
24707 deserializer: D,
24708 ) -> std::result::Result<Self, D::Error>
24709 where
24710 D: serde::de::Deserializer<'de>,
24711 {
24712 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
24713 }
24714 }
24715 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
24716 }
24717 __FieldTag::__page_token => {
24718 if !fields.insert(__FieldTag::__page_token) {
24719 return std::result::Result::Err(A::Error::duplicate_field(
24720 "multiple values for page_token",
24721 ));
24722 }
24723 result.page_token = map
24724 .next_value::<std::option::Option<std::string::String>>()?
24725 .unwrap_or_default();
24726 }
24727 __FieldTag::Unknown(key) => {
24728 let value = map.next_value::<serde_json::Value>()?;
24729 result._unknown_fields.insert(key, value);
24730 }
24731 }
24732 }
24733 std::result::Result::Ok(result)
24734 }
24735 }
24736 deserializer.deserialize_any(Visitor)
24737 }
24738}
24739
24740#[doc(hidden)]
24741impl serde::ser::Serialize for ListWorkflowConfigsRequest {
24742 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24743 where
24744 S: serde::ser::Serializer,
24745 {
24746 use serde::ser::SerializeMap;
24747 #[allow(unused_imports)]
24748 use std::option::Option::Some;
24749 let mut state = serializer.serialize_map(std::option::Option::None)?;
24750 if !self.parent.is_empty() {
24751 state.serialize_entry("parent", &self.parent)?;
24752 }
24753 if !wkt::internal::is_default(&self.page_size) {
24754 struct __With<'a>(&'a i32);
24755 impl<'a> serde::ser::Serialize for __With<'a> {
24756 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24757 where
24758 S: serde::ser::Serializer,
24759 {
24760 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
24761 }
24762 }
24763 state.serialize_entry("pageSize", &__With(&self.page_size))?;
24764 }
24765 if !self.page_token.is_empty() {
24766 state.serialize_entry("pageToken", &self.page_token)?;
24767 }
24768 if !self._unknown_fields.is_empty() {
24769 for (key, value) in self._unknown_fields.iter() {
24770 state.serialize_entry(key, &value)?;
24771 }
24772 }
24773 state.end()
24774 }
24775}
24776
24777impl std::fmt::Debug for ListWorkflowConfigsRequest {
24778 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24779 let mut debug_struct = f.debug_struct("ListWorkflowConfigsRequest");
24780 debug_struct.field("parent", &self.parent);
24781 debug_struct.field("page_size", &self.page_size);
24782 debug_struct.field("page_token", &self.page_token);
24783 if !self._unknown_fields.is_empty() {
24784 debug_struct.field("_unknown_fields", &self._unknown_fields);
24785 }
24786 debug_struct.finish()
24787 }
24788}
24789
24790#[derive(Clone, Default, PartialEq)]
24792#[non_exhaustive]
24793pub struct ListWorkflowConfigsResponse {
24794 pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
24796
24797 pub next_page_token: std::string::String,
24800
24801 pub unreachable: std::vec::Vec<std::string::String>,
24803
24804 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
24805}
24806
24807impl ListWorkflowConfigsResponse {
24808 pub fn new() -> Self {
24809 std::default::Default::default()
24810 }
24811
24812 pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
24814 where
24815 T: std::iter::IntoIterator<Item = V>,
24816 V: std::convert::Into<crate::model::WorkflowConfig>,
24817 {
24818 use std::iter::Iterator;
24819 self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
24820 self
24821 }
24822
24823 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
24825 self.next_page_token = v.into();
24826 self
24827 }
24828
24829 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
24831 where
24832 T: std::iter::IntoIterator<Item = V>,
24833 V: std::convert::Into<std::string::String>,
24834 {
24835 use std::iter::Iterator;
24836 self.unreachable = v.into_iter().map(|i| i.into()).collect();
24837 self
24838 }
24839}
24840
24841impl wkt::message::Message for ListWorkflowConfigsResponse {
24842 fn typename() -> &'static str {
24843 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
24844 }
24845}
24846
24847#[doc(hidden)]
24848impl gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
24849 type PageItem = crate::model::WorkflowConfig;
24850
24851 fn items(self) -> std::vec::Vec<Self::PageItem> {
24852 self.workflow_configs
24853 }
24854
24855 fn next_page_token(&self) -> std::string::String {
24856 use std::clone::Clone;
24857 self.next_page_token.clone()
24858 }
24859}
24860
24861#[doc(hidden)]
24862impl<'de> serde::de::Deserialize<'de> for ListWorkflowConfigsResponse {
24863 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24864 where
24865 D: serde::Deserializer<'de>,
24866 {
24867 #[allow(non_camel_case_types)]
24868 #[doc(hidden)]
24869 #[derive(PartialEq, Eq, Hash)]
24870 enum __FieldTag {
24871 __workflow_configs,
24872 __next_page_token,
24873 __unreachable,
24874 Unknown(std::string::String),
24875 }
24876 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
24877 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
24878 where
24879 D: serde::Deserializer<'de>,
24880 {
24881 struct Visitor;
24882 impl<'de> serde::de::Visitor<'de> for Visitor {
24883 type Value = __FieldTag;
24884 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24885 formatter.write_str("a field name for ListWorkflowConfigsResponse")
24886 }
24887 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
24888 where
24889 E: serde::de::Error,
24890 {
24891 use std::result::Result::Ok;
24892 use std::string::ToString;
24893 match value {
24894 "workflowConfigs" => Ok(__FieldTag::__workflow_configs),
24895 "workflow_configs" => Ok(__FieldTag::__workflow_configs),
24896 "nextPageToken" => Ok(__FieldTag::__next_page_token),
24897 "next_page_token" => Ok(__FieldTag::__next_page_token),
24898 "unreachable" => Ok(__FieldTag::__unreachable),
24899 _ => Ok(__FieldTag::Unknown(value.to_string())),
24900 }
24901 }
24902 }
24903 deserializer.deserialize_identifier(Visitor)
24904 }
24905 }
24906 struct Visitor;
24907 impl<'de> serde::de::Visitor<'de> for Visitor {
24908 type Value = ListWorkflowConfigsResponse;
24909 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
24910 formatter.write_str("struct ListWorkflowConfigsResponse")
24911 }
24912 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
24913 where
24914 A: serde::de::MapAccess<'de>,
24915 {
24916 #[allow(unused_imports)]
24917 use serde::de::Error;
24918 use std::option::Option::Some;
24919 let mut fields = std::collections::HashSet::new();
24920 let mut result = Self::Value::new();
24921 while let Some(tag) = map.next_key::<__FieldTag>()? {
24922 #[allow(clippy::match_single_binding)]
24923 match tag {
24924 __FieldTag::__workflow_configs => {
24925 if !fields.insert(__FieldTag::__workflow_configs) {
24926 return std::result::Result::Err(A::Error::duplicate_field(
24927 "multiple values for workflow_configs",
24928 ));
24929 }
24930 result.workflow_configs =
24931 map.next_value::<std::option::Option<
24932 std::vec::Vec<crate::model::WorkflowConfig>,
24933 >>()?
24934 .unwrap_or_default();
24935 }
24936 __FieldTag::__next_page_token => {
24937 if !fields.insert(__FieldTag::__next_page_token) {
24938 return std::result::Result::Err(A::Error::duplicate_field(
24939 "multiple values for next_page_token",
24940 ));
24941 }
24942 result.next_page_token = map
24943 .next_value::<std::option::Option<std::string::String>>()?
24944 .unwrap_or_default();
24945 }
24946 __FieldTag::__unreachable => {
24947 if !fields.insert(__FieldTag::__unreachable) {
24948 return std::result::Result::Err(A::Error::duplicate_field(
24949 "multiple values for unreachable",
24950 ));
24951 }
24952 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
24953 }
24954 __FieldTag::Unknown(key) => {
24955 let value = map.next_value::<serde_json::Value>()?;
24956 result._unknown_fields.insert(key, value);
24957 }
24958 }
24959 }
24960 std::result::Result::Ok(result)
24961 }
24962 }
24963 deserializer.deserialize_any(Visitor)
24964 }
24965}
24966
24967#[doc(hidden)]
24968impl serde::ser::Serialize for ListWorkflowConfigsResponse {
24969 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
24970 where
24971 S: serde::ser::Serializer,
24972 {
24973 use serde::ser::SerializeMap;
24974 #[allow(unused_imports)]
24975 use std::option::Option::Some;
24976 let mut state = serializer.serialize_map(std::option::Option::None)?;
24977 if !self.workflow_configs.is_empty() {
24978 state.serialize_entry("workflowConfigs", &self.workflow_configs)?;
24979 }
24980 if !self.next_page_token.is_empty() {
24981 state.serialize_entry("nextPageToken", &self.next_page_token)?;
24982 }
24983 if !self.unreachable.is_empty() {
24984 state.serialize_entry("unreachable", &self.unreachable)?;
24985 }
24986 if !self._unknown_fields.is_empty() {
24987 for (key, value) in self._unknown_fields.iter() {
24988 state.serialize_entry(key, &value)?;
24989 }
24990 }
24991 state.end()
24992 }
24993}
24994
24995impl std::fmt::Debug for ListWorkflowConfigsResponse {
24996 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24997 let mut debug_struct = f.debug_struct("ListWorkflowConfigsResponse");
24998 debug_struct.field("workflow_configs", &self.workflow_configs);
24999 debug_struct.field("next_page_token", &self.next_page_token);
25000 debug_struct.field("unreachable", &self.unreachable);
25001 if !self._unknown_fields.is_empty() {
25002 debug_struct.field("_unknown_fields", &self._unknown_fields);
25003 }
25004 debug_struct.finish()
25005 }
25006}
25007
25008#[derive(Clone, Default, PartialEq)]
25010#[non_exhaustive]
25011pub struct GetWorkflowConfigRequest {
25012 pub name: std::string::String,
25014
25015 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25016}
25017
25018impl GetWorkflowConfigRequest {
25019 pub fn new() -> Self {
25020 std::default::Default::default()
25021 }
25022
25023 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25025 self.name = v.into();
25026 self
25027 }
25028}
25029
25030impl wkt::message::Message for GetWorkflowConfigRequest {
25031 fn typename() -> &'static str {
25032 "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
25033 }
25034}
25035
25036#[doc(hidden)]
25037impl<'de> serde::de::Deserialize<'de> for GetWorkflowConfigRequest {
25038 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25039 where
25040 D: serde::Deserializer<'de>,
25041 {
25042 #[allow(non_camel_case_types)]
25043 #[doc(hidden)]
25044 #[derive(PartialEq, Eq, Hash)]
25045 enum __FieldTag {
25046 __name,
25047 Unknown(std::string::String),
25048 }
25049 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25050 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25051 where
25052 D: serde::Deserializer<'de>,
25053 {
25054 struct Visitor;
25055 impl<'de> serde::de::Visitor<'de> for Visitor {
25056 type Value = __FieldTag;
25057 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25058 formatter.write_str("a field name for GetWorkflowConfigRequest")
25059 }
25060 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25061 where
25062 E: serde::de::Error,
25063 {
25064 use std::result::Result::Ok;
25065 use std::string::ToString;
25066 match value {
25067 "name" => Ok(__FieldTag::__name),
25068 _ => Ok(__FieldTag::Unknown(value.to_string())),
25069 }
25070 }
25071 }
25072 deserializer.deserialize_identifier(Visitor)
25073 }
25074 }
25075 struct Visitor;
25076 impl<'de> serde::de::Visitor<'de> for Visitor {
25077 type Value = GetWorkflowConfigRequest;
25078 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25079 formatter.write_str("struct GetWorkflowConfigRequest")
25080 }
25081 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25082 where
25083 A: serde::de::MapAccess<'de>,
25084 {
25085 #[allow(unused_imports)]
25086 use serde::de::Error;
25087 use std::option::Option::Some;
25088 let mut fields = std::collections::HashSet::new();
25089 let mut result = Self::Value::new();
25090 while let Some(tag) = map.next_key::<__FieldTag>()? {
25091 #[allow(clippy::match_single_binding)]
25092 match tag {
25093 __FieldTag::__name => {
25094 if !fields.insert(__FieldTag::__name) {
25095 return std::result::Result::Err(A::Error::duplicate_field(
25096 "multiple values for name",
25097 ));
25098 }
25099 result.name = map
25100 .next_value::<std::option::Option<std::string::String>>()?
25101 .unwrap_or_default();
25102 }
25103 __FieldTag::Unknown(key) => {
25104 let value = map.next_value::<serde_json::Value>()?;
25105 result._unknown_fields.insert(key, value);
25106 }
25107 }
25108 }
25109 std::result::Result::Ok(result)
25110 }
25111 }
25112 deserializer.deserialize_any(Visitor)
25113 }
25114}
25115
25116#[doc(hidden)]
25117impl serde::ser::Serialize for GetWorkflowConfigRequest {
25118 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25119 where
25120 S: serde::ser::Serializer,
25121 {
25122 use serde::ser::SerializeMap;
25123 #[allow(unused_imports)]
25124 use std::option::Option::Some;
25125 let mut state = serializer.serialize_map(std::option::Option::None)?;
25126 if !self.name.is_empty() {
25127 state.serialize_entry("name", &self.name)?;
25128 }
25129 if !self._unknown_fields.is_empty() {
25130 for (key, value) in self._unknown_fields.iter() {
25131 state.serialize_entry(key, &value)?;
25132 }
25133 }
25134 state.end()
25135 }
25136}
25137
25138impl std::fmt::Debug for GetWorkflowConfigRequest {
25139 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25140 let mut debug_struct = f.debug_struct("GetWorkflowConfigRequest");
25141 debug_struct.field("name", &self.name);
25142 if !self._unknown_fields.is_empty() {
25143 debug_struct.field("_unknown_fields", &self._unknown_fields);
25144 }
25145 debug_struct.finish()
25146 }
25147}
25148
25149#[derive(Clone, Default, PartialEq)]
25151#[non_exhaustive]
25152pub struct CreateWorkflowConfigRequest {
25153 pub parent: std::string::String,
25156
25157 pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
25159
25160 pub workflow_config_id: std::string::String,
25163
25164 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25165}
25166
25167impl CreateWorkflowConfigRequest {
25168 pub fn new() -> Self {
25169 std::default::Default::default()
25170 }
25171
25172 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25174 self.parent = v.into();
25175 self
25176 }
25177
25178 pub fn set_workflow_config<T>(mut self, v: T) -> Self
25180 where
25181 T: std::convert::Into<crate::model::WorkflowConfig>,
25182 {
25183 self.workflow_config = std::option::Option::Some(v.into());
25184 self
25185 }
25186
25187 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
25189 where
25190 T: std::convert::Into<crate::model::WorkflowConfig>,
25191 {
25192 self.workflow_config = v.map(|x| x.into());
25193 self
25194 }
25195
25196 pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
25198 mut self,
25199 v: T,
25200 ) -> Self {
25201 self.workflow_config_id = v.into();
25202 self
25203 }
25204}
25205
25206impl wkt::message::Message for CreateWorkflowConfigRequest {
25207 fn typename() -> &'static str {
25208 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
25209 }
25210}
25211
25212#[doc(hidden)]
25213impl<'de> serde::de::Deserialize<'de> for CreateWorkflowConfigRequest {
25214 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25215 where
25216 D: serde::Deserializer<'de>,
25217 {
25218 #[allow(non_camel_case_types)]
25219 #[doc(hidden)]
25220 #[derive(PartialEq, Eq, Hash)]
25221 enum __FieldTag {
25222 __parent,
25223 __workflow_config,
25224 __workflow_config_id,
25225 Unknown(std::string::String),
25226 }
25227 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25228 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25229 where
25230 D: serde::Deserializer<'de>,
25231 {
25232 struct Visitor;
25233 impl<'de> serde::de::Visitor<'de> for Visitor {
25234 type Value = __FieldTag;
25235 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25236 formatter.write_str("a field name for CreateWorkflowConfigRequest")
25237 }
25238 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25239 where
25240 E: serde::de::Error,
25241 {
25242 use std::result::Result::Ok;
25243 use std::string::ToString;
25244 match value {
25245 "parent" => Ok(__FieldTag::__parent),
25246 "workflowConfig" => Ok(__FieldTag::__workflow_config),
25247 "workflow_config" => Ok(__FieldTag::__workflow_config),
25248 "workflowConfigId" => Ok(__FieldTag::__workflow_config_id),
25249 "workflow_config_id" => Ok(__FieldTag::__workflow_config_id),
25250 _ => Ok(__FieldTag::Unknown(value.to_string())),
25251 }
25252 }
25253 }
25254 deserializer.deserialize_identifier(Visitor)
25255 }
25256 }
25257 struct Visitor;
25258 impl<'de> serde::de::Visitor<'de> for Visitor {
25259 type Value = CreateWorkflowConfigRequest;
25260 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25261 formatter.write_str("struct CreateWorkflowConfigRequest")
25262 }
25263 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25264 where
25265 A: serde::de::MapAccess<'de>,
25266 {
25267 #[allow(unused_imports)]
25268 use serde::de::Error;
25269 use std::option::Option::Some;
25270 let mut fields = std::collections::HashSet::new();
25271 let mut result = Self::Value::new();
25272 while let Some(tag) = map.next_key::<__FieldTag>()? {
25273 #[allow(clippy::match_single_binding)]
25274 match tag {
25275 __FieldTag::__parent => {
25276 if !fields.insert(__FieldTag::__parent) {
25277 return std::result::Result::Err(A::Error::duplicate_field(
25278 "multiple values for parent",
25279 ));
25280 }
25281 result.parent = map
25282 .next_value::<std::option::Option<std::string::String>>()?
25283 .unwrap_or_default();
25284 }
25285 __FieldTag::__workflow_config => {
25286 if !fields.insert(__FieldTag::__workflow_config) {
25287 return std::result::Result::Err(A::Error::duplicate_field(
25288 "multiple values for workflow_config",
25289 ));
25290 }
25291 result.workflow_config = map
25292 .next_value::<std::option::Option<crate::model::WorkflowConfig>>(
25293 )?;
25294 }
25295 __FieldTag::__workflow_config_id => {
25296 if !fields.insert(__FieldTag::__workflow_config_id) {
25297 return std::result::Result::Err(A::Error::duplicate_field(
25298 "multiple values for workflow_config_id",
25299 ));
25300 }
25301 result.workflow_config_id = map
25302 .next_value::<std::option::Option<std::string::String>>()?
25303 .unwrap_or_default();
25304 }
25305 __FieldTag::Unknown(key) => {
25306 let value = map.next_value::<serde_json::Value>()?;
25307 result._unknown_fields.insert(key, value);
25308 }
25309 }
25310 }
25311 std::result::Result::Ok(result)
25312 }
25313 }
25314 deserializer.deserialize_any(Visitor)
25315 }
25316}
25317
25318#[doc(hidden)]
25319impl serde::ser::Serialize for CreateWorkflowConfigRequest {
25320 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25321 where
25322 S: serde::ser::Serializer,
25323 {
25324 use serde::ser::SerializeMap;
25325 #[allow(unused_imports)]
25326 use std::option::Option::Some;
25327 let mut state = serializer.serialize_map(std::option::Option::None)?;
25328 if !self.parent.is_empty() {
25329 state.serialize_entry("parent", &self.parent)?;
25330 }
25331 if self.workflow_config.is_some() {
25332 state.serialize_entry("workflowConfig", &self.workflow_config)?;
25333 }
25334 if !self.workflow_config_id.is_empty() {
25335 state.serialize_entry("workflowConfigId", &self.workflow_config_id)?;
25336 }
25337 if !self._unknown_fields.is_empty() {
25338 for (key, value) in self._unknown_fields.iter() {
25339 state.serialize_entry(key, &value)?;
25340 }
25341 }
25342 state.end()
25343 }
25344}
25345
25346impl std::fmt::Debug for CreateWorkflowConfigRequest {
25347 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25348 let mut debug_struct = f.debug_struct("CreateWorkflowConfigRequest");
25349 debug_struct.field("parent", &self.parent);
25350 debug_struct.field("workflow_config", &self.workflow_config);
25351 debug_struct.field("workflow_config_id", &self.workflow_config_id);
25352 if !self._unknown_fields.is_empty() {
25353 debug_struct.field("_unknown_fields", &self._unknown_fields);
25354 }
25355 debug_struct.finish()
25356 }
25357}
25358
25359#[derive(Clone, Default, PartialEq)]
25361#[non_exhaustive]
25362pub struct UpdateWorkflowConfigRequest {
25363 pub update_mask: std::option::Option<wkt::FieldMask>,
25366
25367 pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
25369
25370 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25371}
25372
25373impl UpdateWorkflowConfigRequest {
25374 pub fn new() -> Self {
25375 std::default::Default::default()
25376 }
25377
25378 pub fn set_update_mask<T>(mut self, v: T) -> Self
25380 where
25381 T: std::convert::Into<wkt::FieldMask>,
25382 {
25383 self.update_mask = std::option::Option::Some(v.into());
25384 self
25385 }
25386
25387 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
25389 where
25390 T: std::convert::Into<wkt::FieldMask>,
25391 {
25392 self.update_mask = v.map(|x| x.into());
25393 self
25394 }
25395
25396 pub fn set_workflow_config<T>(mut self, v: T) -> Self
25398 where
25399 T: std::convert::Into<crate::model::WorkflowConfig>,
25400 {
25401 self.workflow_config = std::option::Option::Some(v.into());
25402 self
25403 }
25404
25405 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
25407 where
25408 T: std::convert::Into<crate::model::WorkflowConfig>,
25409 {
25410 self.workflow_config = v.map(|x| x.into());
25411 self
25412 }
25413}
25414
25415impl wkt::message::Message for UpdateWorkflowConfigRequest {
25416 fn typename() -> &'static str {
25417 "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
25418 }
25419}
25420
25421#[doc(hidden)]
25422impl<'de> serde::de::Deserialize<'de> for UpdateWorkflowConfigRequest {
25423 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25424 where
25425 D: serde::Deserializer<'de>,
25426 {
25427 #[allow(non_camel_case_types)]
25428 #[doc(hidden)]
25429 #[derive(PartialEq, Eq, Hash)]
25430 enum __FieldTag {
25431 __update_mask,
25432 __workflow_config,
25433 Unknown(std::string::String),
25434 }
25435 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25436 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25437 where
25438 D: serde::Deserializer<'de>,
25439 {
25440 struct Visitor;
25441 impl<'de> serde::de::Visitor<'de> for Visitor {
25442 type Value = __FieldTag;
25443 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25444 formatter.write_str("a field name for UpdateWorkflowConfigRequest")
25445 }
25446 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25447 where
25448 E: serde::de::Error,
25449 {
25450 use std::result::Result::Ok;
25451 use std::string::ToString;
25452 match value {
25453 "updateMask" => Ok(__FieldTag::__update_mask),
25454 "update_mask" => Ok(__FieldTag::__update_mask),
25455 "workflowConfig" => Ok(__FieldTag::__workflow_config),
25456 "workflow_config" => Ok(__FieldTag::__workflow_config),
25457 _ => Ok(__FieldTag::Unknown(value.to_string())),
25458 }
25459 }
25460 }
25461 deserializer.deserialize_identifier(Visitor)
25462 }
25463 }
25464 struct Visitor;
25465 impl<'de> serde::de::Visitor<'de> for Visitor {
25466 type Value = UpdateWorkflowConfigRequest;
25467 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25468 formatter.write_str("struct UpdateWorkflowConfigRequest")
25469 }
25470 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25471 where
25472 A: serde::de::MapAccess<'de>,
25473 {
25474 #[allow(unused_imports)]
25475 use serde::de::Error;
25476 use std::option::Option::Some;
25477 let mut fields = std::collections::HashSet::new();
25478 let mut result = Self::Value::new();
25479 while let Some(tag) = map.next_key::<__FieldTag>()? {
25480 #[allow(clippy::match_single_binding)]
25481 match tag {
25482 __FieldTag::__update_mask => {
25483 if !fields.insert(__FieldTag::__update_mask) {
25484 return std::result::Result::Err(A::Error::duplicate_field(
25485 "multiple values for update_mask",
25486 ));
25487 }
25488 result.update_mask =
25489 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
25490 }
25491 __FieldTag::__workflow_config => {
25492 if !fields.insert(__FieldTag::__workflow_config) {
25493 return std::result::Result::Err(A::Error::duplicate_field(
25494 "multiple values for workflow_config",
25495 ));
25496 }
25497 result.workflow_config = map
25498 .next_value::<std::option::Option<crate::model::WorkflowConfig>>(
25499 )?;
25500 }
25501 __FieldTag::Unknown(key) => {
25502 let value = map.next_value::<serde_json::Value>()?;
25503 result._unknown_fields.insert(key, value);
25504 }
25505 }
25506 }
25507 std::result::Result::Ok(result)
25508 }
25509 }
25510 deserializer.deserialize_any(Visitor)
25511 }
25512}
25513
25514#[doc(hidden)]
25515impl serde::ser::Serialize for UpdateWorkflowConfigRequest {
25516 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25517 where
25518 S: serde::ser::Serializer,
25519 {
25520 use serde::ser::SerializeMap;
25521 #[allow(unused_imports)]
25522 use std::option::Option::Some;
25523 let mut state = serializer.serialize_map(std::option::Option::None)?;
25524 if self.update_mask.is_some() {
25525 state.serialize_entry("updateMask", &self.update_mask)?;
25526 }
25527 if self.workflow_config.is_some() {
25528 state.serialize_entry("workflowConfig", &self.workflow_config)?;
25529 }
25530 if !self._unknown_fields.is_empty() {
25531 for (key, value) in self._unknown_fields.iter() {
25532 state.serialize_entry(key, &value)?;
25533 }
25534 }
25535 state.end()
25536 }
25537}
25538
25539impl std::fmt::Debug for UpdateWorkflowConfigRequest {
25540 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25541 let mut debug_struct = f.debug_struct("UpdateWorkflowConfigRequest");
25542 debug_struct.field("update_mask", &self.update_mask);
25543 debug_struct.field("workflow_config", &self.workflow_config);
25544 if !self._unknown_fields.is_empty() {
25545 debug_struct.field("_unknown_fields", &self._unknown_fields);
25546 }
25547 debug_struct.finish()
25548 }
25549}
25550
25551#[derive(Clone, Default, PartialEq)]
25553#[non_exhaustive]
25554pub struct DeleteWorkflowConfigRequest {
25555 pub name: std::string::String,
25557
25558 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25559}
25560
25561impl DeleteWorkflowConfigRequest {
25562 pub fn new() -> Self {
25563 std::default::Default::default()
25564 }
25565
25566 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25568 self.name = v.into();
25569 self
25570 }
25571}
25572
25573impl wkt::message::Message for DeleteWorkflowConfigRequest {
25574 fn typename() -> &'static str {
25575 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
25576 }
25577}
25578
25579#[doc(hidden)]
25580impl<'de> serde::de::Deserialize<'de> for DeleteWorkflowConfigRequest {
25581 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25582 where
25583 D: serde::Deserializer<'de>,
25584 {
25585 #[allow(non_camel_case_types)]
25586 #[doc(hidden)]
25587 #[derive(PartialEq, Eq, Hash)]
25588 enum __FieldTag {
25589 __name,
25590 Unknown(std::string::String),
25591 }
25592 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25593 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25594 where
25595 D: serde::Deserializer<'de>,
25596 {
25597 struct Visitor;
25598 impl<'de> serde::de::Visitor<'de> for Visitor {
25599 type Value = __FieldTag;
25600 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25601 formatter.write_str("a field name for DeleteWorkflowConfigRequest")
25602 }
25603 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25604 where
25605 E: serde::de::Error,
25606 {
25607 use std::result::Result::Ok;
25608 use std::string::ToString;
25609 match value {
25610 "name" => Ok(__FieldTag::__name),
25611 _ => Ok(__FieldTag::Unknown(value.to_string())),
25612 }
25613 }
25614 }
25615 deserializer.deserialize_identifier(Visitor)
25616 }
25617 }
25618 struct Visitor;
25619 impl<'de> serde::de::Visitor<'de> for Visitor {
25620 type Value = DeleteWorkflowConfigRequest;
25621 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25622 formatter.write_str("struct DeleteWorkflowConfigRequest")
25623 }
25624 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25625 where
25626 A: serde::de::MapAccess<'de>,
25627 {
25628 #[allow(unused_imports)]
25629 use serde::de::Error;
25630 use std::option::Option::Some;
25631 let mut fields = std::collections::HashSet::new();
25632 let mut result = Self::Value::new();
25633 while let Some(tag) = map.next_key::<__FieldTag>()? {
25634 #[allow(clippy::match_single_binding)]
25635 match tag {
25636 __FieldTag::__name => {
25637 if !fields.insert(__FieldTag::__name) {
25638 return std::result::Result::Err(A::Error::duplicate_field(
25639 "multiple values for name",
25640 ));
25641 }
25642 result.name = map
25643 .next_value::<std::option::Option<std::string::String>>()?
25644 .unwrap_or_default();
25645 }
25646 __FieldTag::Unknown(key) => {
25647 let value = map.next_value::<serde_json::Value>()?;
25648 result._unknown_fields.insert(key, value);
25649 }
25650 }
25651 }
25652 std::result::Result::Ok(result)
25653 }
25654 }
25655 deserializer.deserialize_any(Visitor)
25656 }
25657}
25658
25659#[doc(hidden)]
25660impl serde::ser::Serialize for DeleteWorkflowConfigRequest {
25661 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
25662 where
25663 S: serde::ser::Serializer,
25664 {
25665 use serde::ser::SerializeMap;
25666 #[allow(unused_imports)]
25667 use std::option::Option::Some;
25668 let mut state = serializer.serialize_map(std::option::Option::None)?;
25669 if !self.name.is_empty() {
25670 state.serialize_entry("name", &self.name)?;
25671 }
25672 if !self._unknown_fields.is_empty() {
25673 for (key, value) in self._unknown_fields.iter() {
25674 state.serialize_entry(key, &value)?;
25675 }
25676 }
25677 state.end()
25678 }
25679}
25680
25681impl std::fmt::Debug for DeleteWorkflowConfigRequest {
25682 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25683 let mut debug_struct = f.debug_struct("DeleteWorkflowConfigRequest");
25684 debug_struct.field("name", &self.name);
25685 if !self._unknown_fields.is_empty() {
25686 debug_struct.field("_unknown_fields", &self._unknown_fields);
25687 }
25688 debug_struct.finish()
25689 }
25690}
25691
25692#[derive(Clone, Default, PartialEq)]
25694#[non_exhaustive]
25695pub struct WorkflowInvocation {
25696 pub name: std::string::String,
25698
25699 pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
25701
25702 pub state: crate::model::workflow_invocation::State,
25704
25705 pub invocation_timing: std::option::Option<gtype::model::Interval>,
25707
25708 pub resolved_compilation_result: std::string::String,
25712
25713 pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
25715
25716 pub internal_metadata: std::option::Option<std::string::String>,
25720
25721 pub compilation_source:
25723 std::option::Option<crate::model::workflow_invocation::CompilationSource>,
25724
25725 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
25726}
25727
25728impl WorkflowInvocation {
25729 pub fn new() -> Self {
25730 std::default::Default::default()
25731 }
25732
25733 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25735 self.name = v.into();
25736 self
25737 }
25738
25739 pub fn set_invocation_config<T>(mut self, v: T) -> Self
25741 where
25742 T: std::convert::Into<crate::model::InvocationConfig>,
25743 {
25744 self.invocation_config = std::option::Option::Some(v.into());
25745 self
25746 }
25747
25748 pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
25750 where
25751 T: std::convert::Into<crate::model::InvocationConfig>,
25752 {
25753 self.invocation_config = v.map(|x| x.into());
25754 self
25755 }
25756
25757 pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
25759 mut self,
25760 v: T,
25761 ) -> Self {
25762 self.state = v.into();
25763 self
25764 }
25765
25766 pub fn set_invocation_timing<T>(mut self, v: T) -> Self
25768 where
25769 T: std::convert::Into<gtype::model::Interval>,
25770 {
25771 self.invocation_timing = std::option::Option::Some(v.into());
25772 self
25773 }
25774
25775 pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
25777 where
25778 T: std::convert::Into<gtype::model::Interval>,
25779 {
25780 self.invocation_timing = v.map(|x| x.into());
25781 self
25782 }
25783
25784 pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
25786 mut self,
25787 v: T,
25788 ) -> Self {
25789 self.resolved_compilation_result = v.into();
25790 self
25791 }
25792
25793 pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
25795 where
25796 T: std::convert::Into<crate::model::DataEncryptionState>,
25797 {
25798 self.data_encryption_state = std::option::Option::Some(v.into());
25799 self
25800 }
25801
25802 pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
25804 where
25805 T: std::convert::Into<crate::model::DataEncryptionState>,
25806 {
25807 self.data_encryption_state = v.map(|x| x.into());
25808 self
25809 }
25810
25811 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
25813 where
25814 T: std::convert::Into<std::string::String>,
25815 {
25816 self.internal_metadata = std::option::Option::Some(v.into());
25817 self
25818 }
25819
25820 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
25822 where
25823 T: std::convert::Into<std::string::String>,
25824 {
25825 self.internal_metadata = v.map(|x| x.into());
25826 self
25827 }
25828
25829 pub fn set_compilation_source<
25834 T: std::convert::Into<
25835 std::option::Option<crate::model::workflow_invocation::CompilationSource>,
25836 >,
25837 >(
25838 mut self,
25839 v: T,
25840 ) -> Self {
25841 self.compilation_source = v.into();
25842 self
25843 }
25844
25845 pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
25849 #[allow(unreachable_patterns)]
25850 self.compilation_source.as_ref().and_then(|v| match v {
25851 crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
25852 std::option::Option::Some(v)
25853 }
25854 _ => std::option::Option::None,
25855 })
25856 }
25857
25858 pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
25864 mut self,
25865 v: T,
25866 ) -> Self {
25867 self.compilation_source = std::option::Option::Some(
25868 crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
25869 );
25870 self
25871 }
25872
25873 pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
25877 #[allow(unreachable_patterns)]
25878 self.compilation_source.as_ref().and_then(|v| match v {
25879 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
25880 std::option::Option::Some(v)
25881 }
25882 _ => std::option::Option::None,
25883 })
25884 }
25885
25886 pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
25892 self.compilation_source = std::option::Option::Some(
25893 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
25894 );
25895 self
25896 }
25897}
25898
25899impl wkt::message::Message for WorkflowInvocation {
25900 fn typename() -> &'static str {
25901 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
25902 }
25903}
25904
25905#[doc(hidden)]
25906impl<'de> serde::de::Deserialize<'de> for WorkflowInvocation {
25907 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25908 where
25909 D: serde::Deserializer<'de>,
25910 {
25911 #[allow(non_camel_case_types)]
25912 #[doc(hidden)]
25913 #[derive(PartialEq, Eq, Hash)]
25914 enum __FieldTag {
25915 __compilation_result,
25916 __workflow_config,
25917 __name,
25918 __invocation_config,
25919 __state,
25920 __invocation_timing,
25921 __resolved_compilation_result,
25922 __data_encryption_state,
25923 __internal_metadata,
25924 Unknown(std::string::String),
25925 }
25926 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
25927 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
25928 where
25929 D: serde::Deserializer<'de>,
25930 {
25931 struct Visitor;
25932 impl<'de> serde::de::Visitor<'de> for Visitor {
25933 type Value = __FieldTag;
25934 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25935 formatter.write_str("a field name for WorkflowInvocation")
25936 }
25937 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
25938 where
25939 E: serde::de::Error,
25940 {
25941 use std::result::Result::Ok;
25942 use std::string::ToString;
25943 match value {
25944 "compilationResult" => Ok(__FieldTag::__compilation_result),
25945 "compilation_result" => Ok(__FieldTag::__compilation_result),
25946 "workflowConfig" => Ok(__FieldTag::__workflow_config),
25947 "workflow_config" => Ok(__FieldTag::__workflow_config),
25948 "name" => Ok(__FieldTag::__name),
25949 "invocationConfig" => Ok(__FieldTag::__invocation_config),
25950 "invocation_config" => Ok(__FieldTag::__invocation_config),
25951 "state" => Ok(__FieldTag::__state),
25952 "invocationTiming" => Ok(__FieldTag::__invocation_timing),
25953 "invocation_timing" => Ok(__FieldTag::__invocation_timing),
25954 "resolvedCompilationResult" => {
25955 Ok(__FieldTag::__resolved_compilation_result)
25956 }
25957 "resolved_compilation_result" => {
25958 Ok(__FieldTag::__resolved_compilation_result)
25959 }
25960 "dataEncryptionState" => Ok(__FieldTag::__data_encryption_state),
25961 "data_encryption_state" => Ok(__FieldTag::__data_encryption_state),
25962 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
25963 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
25964 _ => Ok(__FieldTag::Unknown(value.to_string())),
25965 }
25966 }
25967 }
25968 deserializer.deserialize_identifier(Visitor)
25969 }
25970 }
25971 struct Visitor;
25972 impl<'de> serde::de::Visitor<'de> for Visitor {
25973 type Value = WorkflowInvocation;
25974 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
25975 formatter.write_str("struct WorkflowInvocation")
25976 }
25977 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
25978 where
25979 A: serde::de::MapAccess<'de>,
25980 {
25981 #[allow(unused_imports)]
25982 use serde::de::Error;
25983 use std::option::Option::Some;
25984 let mut fields = std::collections::HashSet::new();
25985 let mut result = Self::Value::new();
25986 while let Some(tag) = map.next_key::<__FieldTag>()? {
25987 #[allow(clippy::match_single_binding)]
25988 match tag {
25989 __FieldTag::__compilation_result => {
25990 if !fields.insert(__FieldTag::__compilation_result) {
25991 return std::result::Result::Err(A::Error::duplicate_field(
25992 "multiple values for compilation_result",
25993 ));
25994 }
25995 if result.compilation_source.is_some() {
25996 return std::result::Result::Err(A::Error::duplicate_field(
25997 "multiple values for `compilation_source`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocation.compilation_result, latest field was compilationResult",
25998 ));
25999 }
26000 result.compilation_source = std::option::Option::Some(
26001 crate::model::workflow_invocation::CompilationSource::CompilationResult(
26002 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
26003 ),
26004 );
26005 }
26006 __FieldTag::__workflow_config => {
26007 if !fields.insert(__FieldTag::__workflow_config) {
26008 return std::result::Result::Err(A::Error::duplicate_field(
26009 "multiple values for workflow_config",
26010 ));
26011 }
26012 if result.compilation_source.is_some() {
26013 return std::result::Result::Err(A::Error::duplicate_field(
26014 "multiple values for `compilation_source`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocation.workflow_config, latest field was workflowConfig",
26015 ));
26016 }
26017 result.compilation_source = std::option::Option::Some(
26018 crate::model::workflow_invocation::CompilationSource::WorkflowConfig(
26019 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
26020 ),
26021 );
26022 }
26023 __FieldTag::__name => {
26024 if !fields.insert(__FieldTag::__name) {
26025 return std::result::Result::Err(A::Error::duplicate_field(
26026 "multiple values for name",
26027 ));
26028 }
26029 result.name = map
26030 .next_value::<std::option::Option<std::string::String>>()?
26031 .unwrap_or_default();
26032 }
26033 __FieldTag::__invocation_config => {
26034 if !fields.insert(__FieldTag::__invocation_config) {
26035 return std::result::Result::Err(A::Error::duplicate_field(
26036 "multiple values for invocation_config",
26037 ));
26038 }
26039 result.invocation_config = map
26040 .next_value::<std::option::Option<crate::model::InvocationConfig>>(
26041 )?;
26042 }
26043 __FieldTag::__state => {
26044 if !fields.insert(__FieldTag::__state) {
26045 return std::result::Result::Err(A::Error::duplicate_field(
26046 "multiple values for state",
26047 ));
26048 }
26049 result.state = map.next_value::<std::option::Option<crate::model::workflow_invocation::State>>()?.unwrap_or_default();
26050 }
26051 __FieldTag::__invocation_timing => {
26052 if !fields.insert(__FieldTag::__invocation_timing) {
26053 return std::result::Result::Err(A::Error::duplicate_field(
26054 "multiple values for invocation_timing",
26055 ));
26056 }
26057 result.invocation_timing =
26058 map.next_value::<std::option::Option<gtype::model::Interval>>()?;
26059 }
26060 __FieldTag::__resolved_compilation_result => {
26061 if !fields.insert(__FieldTag::__resolved_compilation_result) {
26062 return std::result::Result::Err(A::Error::duplicate_field(
26063 "multiple values for resolved_compilation_result",
26064 ));
26065 }
26066 result.resolved_compilation_result = map
26067 .next_value::<std::option::Option<std::string::String>>()?
26068 .unwrap_or_default();
26069 }
26070 __FieldTag::__data_encryption_state => {
26071 if !fields.insert(__FieldTag::__data_encryption_state) {
26072 return std::result::Result::Err(A::Error::duplicate_field(
26073 "multiple values for data_encryption_state",
26074 ));
26075 }
26076 result.data_encryption_state = map.next_value::<std::option::Option<crate::model::DataEncryptionState>>()?
26077 ;
26078 }
26079 __FieldTag::__internal_metadata => {
26080 if !fields.insert(__FieldTag::__internal_metadata) {
26081 return std::result::Result::Err(A::Error::duplicate_field(
26082 "multiple values for internal_metadata",
26083 ));
26084 }
26085 result.internal_metadata =
26086 map.next_value::<std::option::Option<std::string::String>>()?;
26087 }
26088 __FieldTag::Unknown(key) => {
26089 let value = map.next_value::<serde_json::Value>()?;
26090 result._unknown_fields.insert(key, value);
26091 }
26092 }
26093 }
26094 std::result::Result::Ok(result)
26095 }
26096 }
26097 deserializer.deserialize_any(Visitor)
26098 }
26099}
26100
26101#[doc(hidden)]
26102impl serde::ser::Serialize for WorkflowInvocation {
26103 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26104 where
26105 S: serde::ser::Serializer,
26106 {
26107 use serde::ser::SerializeMap;
26108 #[allow(unused_imports)]
26109 use std::option::Option::Some;
26110 let mut state = serializer.serialize_map(std::option::Option::None)?;
26111 if let Some(value) = self.compilation_result() {
26112 state.serialize_entry("compilationResult", value)?;
26113 }
26114 if let Some(value) = self.workflow_config() {
26115 state.serialize_entry("workflowConfig", value)?;
26116 }
26117 if !self.name.is_empty() {
26118 state.serialize_entry("name", &self.name)?;
26119 }
26120 if self.invocation_config.is_some() {
26121 state.serialize_entry("invocationConfig", &self.invocation_config)?;
26122 }
26123 if !wkt::internal::is_default(&self.state) {
26124 state.serialize_entry("state", &self.state)?;
26125 }
26126 if self.invocation_timing.is_some() {
26127 state.serialize_entry("invocationTiming", &self.invocation_timing)?;
26128 }
26129 if !self.resolved_compilation_result.is_empty() {
26130 state.serialize_entry(
26131 "resolvedCompilationResult",
26132 &self.resolved_compilation_result,
26133 )?;
26134 }
26135 if self.data_encryption_state.is_some() {
26136 state.serialize_entry("dataEncryptionState", &self.data_encryption_state)?;
26137 }
26138 if self.internal_metadata.is_some() {
26139 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
26140 }
26141 if !self._unknown_fields.is_empty() {
26142 for (key, value) in self._unknown_fields.iter() {
26143 state.serialize_entry(key, &value)?;
26144 }
26145 }
26146 state.end()
26147 }
26148}
26149
26150impl std::fmt::Debug for WorkflowInvocation {
26151 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26152 let mut debug_struct = f.debug_struct("WorkflowInvocation");
26153 debug_struct.field("name", &self.name);
26154 debug_struct.field("invocation_config", &self.invocation_config);
26155 debug_struct.field("state", &self.state);
26156 debug_struct.field("invocation_timing", &self.invocation_timing);
26157 debug_struct.field(
26158 "resolved_compilation_result",
26159 &self.resolved_compilation_result,
26160 );
26161 debug_struct.field("data_encryption_state", &self.data_encryption_state);
26162 debug_struct.field("internal_metadata", &self.internal_metadata);
26163 debug_struct.field("compilation_source", &self.compilation_source);
26164 if !self._unknown_fields.is_empty() {
26165 debug_struct.field("_unknown_fields", &self._unknown_fields);
26166 }
26167 debug_struct.finish()
26168 }
26169}
26170
26171pub mod workflow_invocation {
26173 #[allow(unused_imports)]
26174 use super::*;
26175
26176 #[derive(Clone, Debug, PartialEq)]
26192 #[non_exhaustive]
26193 pub enum State {
26194 Unspecified,
26196 Running,
26198 Succeeded,
26200 Cancelled,
26202 Failed,
26204 Canceling,
26207 UnknownValue(state::UnknownValue),
26212 }
26213
26214 #[doc(hidden)]
26215 pub mod state {
26216 #[allow(unused_imports)]
26217 use super::*;
26218 #[derive(Clone, Debug, PartialEq)]
26219 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
26220 }
26221
26222 impl State {
26223 pub fn value(&self) -> std::option::Option<i32> {
26228 match self {
26229 Self::Unspecified => std::option::Option::Some(0),
26230 Self::Running => std::option::Option::Some(1),
26231 Self::Succeeded => std::option::Option::Some(2),
26232 Self::Cancelled => std::option::Option::Some(3),
26233 Self::Failed => std::option::Option::Some(4),
26234 Self::Canceling => std::option::Option::Some(5),
26235 Self::UnknownValue(u) => u.0.value(),
26236 }
26237 }
26238
26239 pub fn name(&self) -> std::option::Option<&str> {
26244 match self {
26245 Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
26246 Self::Running => std::option::Option::Some("RUNNING"),
26247 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
26248 Self::Cancelled => std::option::Option::Some("CANCELLED"),
26249 Self::Failed => std::option::Option::Some("FAILED"),
26250 Self::Canceling => std::option::Option::Some("CANCELING"),
26251 Self::UnknownValue(u) => u.0.name(),
26252 }
26253 }
26254 }
26255
26256 impl std::default::Default for State {
26257 fn default() -> Self {
26258 use std::convert::From;
26259 Self::from(0)
26260 }
26261 }
26262
26263 impl std::fmt::Display for State {
26264 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
26265 wkt::internal::display_enum(f, self.name(), self.value())
26266 }
26267 }
26268
26269 impl std::convert::From<i32> for State {
26270 fn from(value: i32) -> Self {
26271 match value {
26272 0 => Self::Unspecified,
26273 1 => Self::Running,
26274 2 => Self::Succeeded,
26275 3 => Self::Cancelled,
26276 4 => Self::Failed,
26277 5 => Self::Canceling,
26278 _ => Self::UnknownValue(state::UnknownValue(
26279 wkt::internal::UnknownEnumValue::Integer(value),
26280 )),
26281 }
26282 }
26283 }
26284
26285 impl std::convert::From<&str> for State {
26286 fn from(value: &str) -> Self {
26287 use std::string::ToString;
26288 match value {
26289 "STATE_UNSPECIFIED" => Self::Unspecified,
26290 "RUNNING" => Self::Running,
26291 "SUCCEEDED" => Self::Succeeded,
26292 "CANCELLED" => Self::Cancelled,
26293 "FAILED" => Self::Failed,
26294 "CANCELING" => Self::Canceling,
26295 _ => Self::UnknownValue(state::UnknownValue(
26296 wkt::internal::UnknownEnumValue::String(value.to_string()),
26297 )),
26298 }
26299 }
26300 }
26301
26302 impl serde::ser::Serialize for State {
26303 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26304 where
26305 S: serde::Serializer,
26306 {
26307 match self {
26308 Self::Unspecified => serializer.serialize_i32(0),
26309 Self::Running => serializer.serialize_i32(1),
26310 Self::Succeeded => serializer.serialize_i32(2),
26311 Self::Cancelled => serializer.serialize_i32(3),
26312 Self::Failed => serializer.serialize_i32(4),
26313 Self::Canceling => serializer.serialize_i32(5),
26314 Self::UnknownValue(u) => u.0.serialize(serializer),
26315 }
26316 }
26317 }
26318
26319 impl<'de> serde::de::Deserialize<'de> for State {
26320 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26321 where
26322 D: serde::Deserializer<'de>,
26323 {
26324 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
26325 ".google.cloud.dataform.v1.WorkflowInvocation.State",
26326 ))
26327 }
26328 }
26329
26330 #[derive(Clone, Debug, PartialEq)]
26332 #[non_exhaustive]
26333 pub enum CompilationSource {
26334 CompilationResult(std::string::String),
26338 WorkflowConfig(std::string::String),
26341 }
26342}
26343
26344#[derive(Clone, Default, PartialEq)]
26346#[non_exhaustive]
26347pub struct ListWorkflowInvocationsRequest {
26348 pub parent: std::string::String,
26351
26352 pub page_size: i32,
26356
26357 pub page_token: std::string::String,
26364
26365 pub order_by: std::string::String,
26369
26370 pub filter: std::string::String,
26372
26373 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26374}
26375
26376impl ListWorkflowInvocationsRequest {
26377 pub fn new() -> Self {
26378 std::default::Default::default()
26379 }
26380
26381 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26383 self.parent = v.into();
26384 self
26385 }
26386
26387 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
26389 self.page_size = v.into();
26390 self
26391 }
26392
26393 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26395 self.page_token = v.into();
26396 self
26397 }
26398
26399 pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26401 self.order_by = v.into();
26402 self
26403 }
26404
26405 pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26407 self.filter = v.into();
26408 self
26409 }
26410}
26411
26412impl wkt::message::Message for ListWorkflowInvocationsRequest {
26413 fn typename() -> &'static str {
26414 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
26415 }
26416}
26417
26418#[doc(hidden)]
26419impl<'de> serde::de::Deserialize<'de> for ListWorkflowInvocationsRequest {
26420 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26421 where
26422 D: serde::Deserializer<'de>,
26423 {
26424 #[allow(non_camel_case_types)]
26425 #[doc(hidden)]
26426 #[derive(PartialEq, Eq, Hash)]
26427 enum __FieldTag {
26428 __parent,
26429 __page_size,
26430 __page_token,
26431 __order_by,
26432 __filter,
26433 Unknown(std::string::String),
26434 }
26435 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
26436 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26437 where
26438 D: serde::Deserializer<'de>,
26439 {
26440 struct Visitor;
26441 impl<'de> serde::de::Visitor<'de> for Visitor {
26442 type Value = __FieldTag;
26443 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26444 formatter.write_str("a field name for ListWorkflowInvocationsRequest")
26445 }
26446 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
26447 where
26448 E: serde::de::Error,
26449 {
26450 use std::result::Result::Ok;
26451 use std::string::ToString;
26452 match value {
26453 "parent" => Ok(__FieldTag::__parent),
26454 "pageSize" => Ok(__FieldTag::__page_size),
26455 "page_size" => Ok(__FieldTag::__page_size),
26456 "pageToken" => Ok(__FieldTag::__page_token),
26457 "page_token" => Ok(__FieldTag::__page_token),
26458 "orderBy" => Ok(__FieldTag::__order_by),
26459 "order_by" => Ok(__FieldTag::__order_by),
26460 "filter" => Ok(__FieldTag::__filter),
26461 _ => Ok(__FieldTag::Unknown(value.to_string())),
26462 }
26463 }
26464 }
26465 deserializer.deserialize_identifier(Visitor)
26466 }
26467 }
26468 struct Visitor;
26469 impl<'de> serde::de::Visitor<'de> for Visitor {
26470 type Value = ListWorkflowInvocationsRequest;
26471 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26472 formatter.write_str("struct ListWorkflowInvocationsRequest")
26473 }
26474 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
26475 where
26476 A: serde::de::MapAccess<'de>,
26477 {
26478 #[allow(unused_imports)]
26479 use serde::de::Error;
26480 use std::option::Option::Some;
26481 let mut fields = std::collections::HashSet::new();
26482 let mut result = Self::Value::new();
26483 while let Some(tag) = map.next_key::<__FieldTag>()? {
26484 #[allow(clippy::match_single_binding)]
26485 match tag {
26486 __FieldTag::__parent => {
26487 if !fields.insert(__FieldTag::__parent) {
26488 return std::result::Result::Err(A::Error::duplicate_field(
26489 "multiple values for parent",
26490 ));
26491 }
26492 result.parent = map
26493 .next_value::<std::option::Option<std::string::String>>()?
26494 .unwrap_or_default();
26495 }
26496 __FieldTag::__page_size => {
26497 if !fields.insert(__FieldTag::__page_size) {
26498 return std::result::Result::Err(A::Error::duplicate_field(
26499 "multiple values for page_size",
26500 ));
26501 }
26502 struct __With(std::option::Option<i32>);
26503 impl<'de> serde::de::Deserialize<'de> for __With {
26504 fn deserialize<D>(
26505 deserializer: D,
26506 ) -> std::result::Result<Self, D::Error>
26507 where
26508 D: serde::de::Deserializer<'de>,
26509 {
26510 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
26511 }
26512 }
26513 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
26514 }
26515 __FieldTag::__page_token => {
26516 if !fields.insert(__FieldTag::__page_token) {
26517 return std::result::Result::Err(A::Error::duplicate_field(
26518 "multiple values for page_token",
26519 ));
26520 }
26521 result.page_token = map
26522 .next_value::<std::option::Option<std::string::String>>()?
26523 .unwrap_or_default();
26524 }
26525 __FieldTag::__order_by => {
26526 if !fields.insert(__FieldTag::__order_by) {
26527 return std::result::Result::Err(A::Error::duplicate_field(
26528 "multiple values for order_by",
26529 ));
26530 }
26531 result.order_by = map
26532 .next_value::<std::option::Option<std::string::String>>()?
26533 .unwrap_or_default();
26534 }
26535 __FieldTag::__filter => {
26536 if !fields.insert(__FieldTag::__filter) {
26537 return std::result::Result::Err(A::Error::duplicate_field(
26538 "multiple values for filter",
26539 ));
26540 }
26541 result.filter = map
26542 .next_value::<std::option::Option<std::string::String>>()?
26543 .unwrap_or_default();
26544 }
26545 __FieldTag::Unknown(key) => {
26546 let value = map.next_value::<serde_json::Value>()?;
26547 result._unknown_fields.insert(key, value);
26548 }
26549 }
26550 }
26551 std::result::Result::Ok(result)
26552 }
26553 }
26554 deserializer.deserialize_any(Visitor)
26555 }
26556}
26557
26558#[doc(hidden)]
26559impl serde::ser::Serialize for ListWorkflowInvocationsRequest {
26560 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26561 where
26562 S: serde::ser::Serializer,
26563 {
26564 use serde::ser::SerializeMap;
26565 #[allow(unused_imports)]
26566 use std::option::Option::Some;
26567 let mut state = serializer.serialize_map(std::option::Option::None)?;
26568 if !self.parent.is_empty() {
26569 state.serialize_entry("parent", &self.parent)?;
26570 }
26571 if !wkt::internal::is_default(&self.page_size) {
26572 struct __With<'a>(&'a i32);
26573 impl<'a> serde::ser::Serialize for __With<'a> {
26574 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26575 where
26576 S: serde::ser::Serializer,
26577 {
26578 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
26579 }
26580 }
26581 state.serialize_entry("pageSize", &__With(&self.page_size))?;
26582 }
26583 if !self.page_token.is_empty() {
26584 state.serialize_entry("pageToken", &self.page_token)?;
26585 }
26586 if !self.order_by.is_empty() {
26587 state.serialize_entry("orderBy", &self.order_by)?;
26588 }
26589 if !self.filter.is_empty() {
26590 state.serialize_entry("filter", &self.filter)?;
26591 }
26592 if !self._unknown_fields.is_empty() {
26593 for (key, value) in self._unknown_fields.iter() {
26594 state.serialize_entry(key, &value)?;
26595 }
26596 }
26597 state.end()
26598 }
26599}
26600
26601impl std::fmt::Debug for ListWorkflowInvocationsRequest {
26602 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26603 let mut debug_struct = f.debug_struct("ListWorkflowInvocationsRequest");
26604 debug_struct.field("parent", &self.parent);
26605 debug_struct.field("page_size", &self.page_size);
26606 debug_struct.field("page_token", &self.page_token);
26607 debug_struct.field("order_by", &self.order_by);
26608 debug_struct.field("filter", &self.filter);
26609 if !self._unknown_fields.is_empty() {
26610 debug_struct.field("_unknown_fields", &self._unknown_fields);
26611 }
26612 debug_struct.finish()
26613 }
26614}
26615
26616#[derive(Clone, Default, PartialEq)]
26618#[non_exhaustive]
26619pub struct ListWorkflowInvocationsResponse {
26620 pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
26622
26623 pub next_page_token: std::string::String,
26626
26627 pub unreachable: std::vec::Vec<std::string::String>,
26629
26630 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26631}
26632
26633impl ListWorkflowInvocationsResponse {
26634 pub fn new() -> Self {
26635 std::default::Default::default()
26636 }
26637
26638 pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
26640 where
26641 T: std::iter::IntoIterator<Item = V>,
26642 V: std::convert::Into<crate::model::WorkflowInvocation>,
26643 {
26644 use std::iter::Iterator;
26645 self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
26646 self
26647 }
26648
26649 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26651 self.next_page_token = v.into();
26652 self
26653 }
26654
26655 pub fn set_unreachable<T, V>(mut self, v: T) -> Self
26657 where
26658 T: std::iter::IntoIterator<Item = V>,
26659 V: std::convert::Into<std::string::String>,
26660 {
26661 use std::iter::Iterator;
26662 self.unreachable = v.into_iter().map(|i| i.into()).collect();
26663 self
26664 }
26665}
26666
26667impl wkt::message::Message for ListWorkflowInvocationsResponse {
26668 fn typename() -> &'static str {
26669 "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
26670 }
26671}
26672
26673#[doc(hidden)]
26674impl gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
26675 type PageItem = crate::model::WorkflowInvocation;
26676
26677 fn items(self) -> std::vec::Vec<Self::PageItem> {
26678 self.workflow_invocations
26679 }
26680
26681 fn next_page_token(&self) -> std::string::String {
26682 use std::clone::Clone;
26683 self.next_page_token.clone()
26684 }
26685}
26686
26687#[doc(hidden)]
26688impl<'de> serde::de::Deserialize<'de> for ListWorkflowInvocationsResponse {
26689 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26690 where
26691 D: serde::Deserializer<'de>,
26692 {
26693 #[allow(non_camel_case_types)]
26694 #[doc(hidden)]
26695 #[derive(PartialEq, Eq, Hash)]
26696 enum __FieldTag {
26697 __workflow_invocations,
26698 __next_page_token,
26699 __unreachable,
26700 Unknown(std::string::String),
26701 }
26702 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
26703 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26704 where
26705 D: serde::Deserializer<'de>,
26706 {
26707 struct Visitor;
26708 impl<'de> serde::de::Visitor<'de> for Visitor {
26709 type Value = __FieldTag;
26710 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26711 formatter.write_str("a field name for ListWorkflowInvocationsResponse")
26712 }
26713 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
26714 where
26715 E: serde::de::Error,
26716 {
26717 use std::result::Result::Ok;
26718 use std::string::ToString;
26719 match value {
26720 "workflowInvocations" => Ok(__FieldTag::__workflow_invocations),
26721 "workflow_invocations" => Ok(__FieldTag::__workflow_invocations),
26722 "nextPageToken" => Ok(__FieldTag::__next_page_token),
26723 "next_page_token" => Ok(__FieldTag::__next_page_token),
26724 "unreachable" => Ok(__FieldTag::__unreachable),
26725 _ => Ok(__FieldTag::Unknown(value.to_string())),
26726 }
26727 }
26728 }
26729 deserializer.deserialize_identifier(Visitor)
26730 }
26731 }
26732 struct Visitor;
26733 impl<'de> serde::de::Visitor<'de> for Visitor {
26734 type Value = ListWorkflowInvocationsResponse;
26735 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26736 formatter.write_str("struct ListWorkflowInvocationsResponse")
26737 }
26738 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
26739 where
26740 A: serde::de::MapAccess<'de>,
26741 {
26742 #[allow(unused_imports)]
26743 use serde::de::Error;
26744 use std::option::Option::Some;
26745 let mut fields = std::collections::HashSet::new();
26746 let mut result = Self::Value::new();
26747 while let Some(tag) = map.next_key::<__FieldTag>()? {
26748 #[allow(clippy::match_single_binding)]
26749 match tag {
26750 __FieldTag::__workflow_invocations => {
26751 if !fields.insert(__FieldTag::__workflow_invocations) {
26752 return std::result::Result::Err(A::Error::duplicate_field(
26753 "multiple values for workflow_invocations",
26754 ));
26755 }
26756 result.workflow_invocations = map
26757 .next_value::<std::option::Option<
26758 std::vec::Vec<crate::model::WorkflowInvocation>,
26759 >>()?
26760 .unwrap_or_default();
26761 }
26762 __FieldTag::__next_page_token => {
26763 if !fields.insert(__FieldTag::__next_page_token) {
26764 return std::result::Result::Err(A::Error::duplicate_field(
26765 "multiple values for next_page_token",
26766 ));
26767 }
26768 result.next_page_token = map
26769 .next_value::<std::option::Option<std::string::String>>()?
26770 .unwrap_or_default();
26771 }
26772 __FieldTag::__unreachable => {
26773 if !fields.insert(__FieldTag::__unreachable) {
26774 return std::result::Result::Err(A::Error::duplicate_field(
26775 "multiple values for unreachable",
26776 ));
26777 }
26778 result.unreachable = map.next_value::<std::option::Option<std::vec::Vec<std::string::String>>>()?.unwrap_or_default();
26779 }
26780 __FieldTag::Unknown(key) => {
26781 let value = map.next_value::<serde_json::Value>()?;
26782 result._unknown_fields.insert(key, value);
26783 }
26784 }
26785 }
26786 std::result::Result::Ok(result)
26787 }
26788 }
26789 deserializer.deserialize_any(Visitor)
26790 }
26791}
26792
26793#[doc(hidden)]
26794impl serde::ser::Serialize for ListWorkflowInvocationsResponse {
26795 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26796 where
26797 S: serde::ser::Serializer,
26798 {
26799 use serde::ser::SerializeMap;
26800 #[allow(unused_imports)]
26801 use std::option::Option::Some;
26802 let mut state = serializer.serialize_map(std::option::Option::None)?;
26803 if !self.workflow_invocations.is_empty() {
26804 state.serialize_entry("workflowInvocations", &self.workflow_invocations)?;
26805 }
26806 if !self.next_page_token.is_empty() {
26807 state.serialize_entry("nextPageToken", &self.next_page_token)?;
26808 }
26809 if !self.unreachable.is_empty() {
26810 state.serialize_entry("unreachable", &self.unreachable)?;
26811 }
26812 if !self._unknown_fields.is_empty() {
26813 for (key, value) in self._unknown_fields.iter() {
26814 state.serialize_entry(key, &value)?;
26815 }
26816 }
26817 state.end()
26818 }
26819}
26820
26821impl std::fmt::Debug for ListWorkflowInvocationsResponse {
26822 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26823 let mut debug_struct = f.debug_struct("ListWorkflowInvocationsResponse");
26824 debug_struct.field("workflow_invocations", &self.workflow_invocations);
26825 debug_struct.field("next_page_token", &self.next_page_token);
26826 debug_struct.field("unreachable", &self.unreachable);
26827 if !self._unknown_fields.is_empty() {
26828 debug_struct.field("_unknown_fields", &self._unknown_fields);
26829 }
26830 debug_struct.finish()
26831 }
26832}
26833
26834#[derive(Clone, Default, PartialEq)]
26836#[non_exhaustive]
26837pub struct GetWorkflowInvocationRequest {
26838 pub name: std::string::String,
26840
26841 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26842}
26843
26844impl GetWorkflowInvocationRequest {
26845 pub fn new() -> Self {
26846 std::default::Default::default()
26847 }
26848
26849 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26851 self.name = v.into();
26852 self
26853 }
26854}
26855
26856impl wkt::message::Message for GetWorkflowInvocationRequest {
26857 fn typename() -> &'static str {
26858 "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
26859 }
26860}
26861
26862#[doc(hidden)]
26863impl<'de> serde::de::Deserialize<'de> for GetWorkflowInvocationRequest {
26864 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26865 where
26866 D: serde::Deserializer<'de>,
26867 {
26868 #[allow(non_camel_case_types)]
26869 #[doc(hidden)]
26870 #[derive(PartialEq, Eq, Hash)]
26871 enum __FieldTag {
26872 __name,
26873 Unknown(std::string::String),
26874 }
26875 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
26876 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
26877 where
26878 D: serde::Deserializer<'de>,
26879 {
26880 struct Visitor;
26881 impl<'de> serde::de::Visitor<'de> for Visitor {
26882 type Value = __FieldTag;
26883 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26884 formatter.write_str("a field name for GetWorkflowInvocationRequest")
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 "name" => Ok(__FieldTag::__name),
26894 _ => Ok(__FieldTag::Unknown(value.to_string())),
26895 }
26896 }
26897 }
26898 deserializer.deserialize_identifier(Visitor)
26899 }
26900 }
26901 struct Visitor;
26902 impl<'de> serde::de::Visitor<'de> for Visitor {
26903 type Value = GetWorkflowInvocationRequest;
26904 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
26905 formatter.write_str("struct GetWorkflowInvocationRequest")
26906 }
26907 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
26908 where
26909 A: serde::de::MapAccess<'de>,
26910 {
26911 #[allow(unused_imports)]
26912 use serde::de::Error;
26913 use std::option::Option::Some;
26914 let mut fields = std::collections::HashSet::new();
26915 let mut result = Self::Value::new();
26916 while let Some(tag) = map.next_key::<__FieldTag>()? {
26917 #[allow(clippy::match_single_binding)]
26918 match tag {
26919 __FieldTag::__name => {
26920 if !fields.insert(__FieldTag::__name) {
26921 return std::result::Result::Err(A::Error::duplicate_field(
26922 "multiple values for name",
26923 ));
26924 }
26925 result.name = map
26926 .next_value::<std::option::Option<std::string::String>>()?
26927 .unwrap_or_default();
26928 }
26929 __FieldTag::Unknown(key) => {
26930 let value = map.next_value::<serde_json::Value>()?;
26931 result._unknown_fields.insert(key, value);
26932 }
26933 }
26934 }
26935 std::result::Result::Ok(result)
26936 }
26937 }
26938 deserializer.deserialize_any(Visitor)
26939 }
26940}
26941
26942#[doc(hidden)]
26943impl serde::ser::Serialize for GetWorkflowInvocationRequest {
26944 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
26945 where
26946 S: serde::ser::Serializer,
26947 {
26948 use serde::ser::SerializeMap;
26949 #[allow(unused_imports)]
26950 use std::option::Option::Some;
26951 let mut state = serializer.serialize_map(std::option::Option::None)?;
26952 if !self.name.is_empty() {
26953 state.serialize_entry("name", &self.name)?;
26954 }
26955 if !self._unknown_fields.is_empty() {
26956 for (key, value) in self._unknown_fields.iter() {
26957 state.serialize_entry(key, &value)?;
26958 }
26959 }
26960 state.end()
26961 }
26962}
26963
26964impl std::fmt::Debug for GetWorkflowInvocationRequest {
26965 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26966 let mut debug_struct = f.debug_struct("GetWorkflowInvocationRequest");
26967 debug_struct.field("name", &self.name);
26968 if !self._unknown_fields.is_empty() {
26969 debug_struct.field("_unknown_fields", &self._unknown_fields);
26970 }
26971 debug_struct.finish()
26972 }
26973}
26974
26975#[derive(Clone, Default, PartialEq)]
26977#[non_exhaustive]
26978pub struct CreateWorkflowInvocationRequest {
26979 pub parent: std::string::String,
26982
26983 pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
26985
26986 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
26987}
26988
26989impl CreateWorkflowInvocationRequest {
26990 pub fn new() -> Self {
26991 std::default::Default::default()
26992 }
26993
26994 pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
26996 self.parent = v.into();
26997 self
26998 }
26999
27000 pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
27002 where
27003 T: std::convert::Into<crate::model::WorkflowInvocation>,
27004 {
27005 self.workflow_invocation = std::option::Option::Some(v.into());
27006 self
27007 }
27008
27009 pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
27011 where
27012 T: std::convert::Into<crate::model::WorkflowInvocation>,
27013 {
27014 self.workflow_invocation = v.map(|x| x.into());
27015 self
27016 }
27017}
27018
27019impl wkt::message::Message for CreateWorkflowInvocationRequest {
27020 fn typename() -> &'static str {
27021 "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
27022 }
27023}
27024
27025#[doc(hidden)]
27026impl<'de> serde::de::Deserialize<'de> for CreateWorkflowInvocationRequest {
27027 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27028 where
27029 D: serde::Deserializer<'de>,
27030 {
27031 #[allow(non_camel_case_types)]
27032 #[doc(hidden)]
27033 #[derive(PartialEq, Eq, Hash)]
27034 enum __FieldTag {
27035 __parent,
27036 __workflow_invocation,
27037 Unknown(std::string::String),
27038 }
27039 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27040 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27041 where
27042 D: serde::Deserializer<'de>,
27043 {
27044 struct Visitor;
27045 impl<'de> serde::de::Visitor<'de> for Visitor {
27046 type Value = __FieldTag;
27047 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27048 formatter.write_str("a field name for CreateWorkflowInvocationRequest")
27049 }
27050 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
27051 where
27052 E: serde::de::Error,
27053 {
27054 use std::result::Result::Ok;
27055 use std::string::ToString;
27056 match value {
27057 "parent" => Ok(__FieldTag::__parent),
27058 "workflowInvocation" => Ok(__FieldTag::__workflow_invocation),
27059 "workflow_invocation" => Ok(__FieldTag::__workflow_invocation),
27060 _ => Ok(__FieldTag::Unknown(value.to_string())),
27061 }
27062 }
27063 }
27064 deserializer.deserialize_identifier(Visitor)
27065 }
27066 }
27067 struct Visitor;
27068 impl<'de> serde::de::Visitor<'de> for Visitor {
27069 type Value = CreateWorkflowInvocationRequest;
27070 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27071 formatter.write_str("struct CreateWorkflowInvocationRequest")
27072 }
27073 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27074 where
27075 A: serde::de::MapAccess<'de>,
27076 {
27077 #[allow(unused_imports)]
27078 use serde::de::Error;
27079 use std::option::Option::Some;
27080 let mut fields = std::collections::HashSet::new();
27081 let mut result = Self::Value::new();
27082 while let Some(tag) = map.next_key::<__FieldTag>()? {
27083 #[allow(clippy::match_single_binding)]
27084 match tag {
27085 __FieldTag::__parent => {
27086 if !fields.insert(__FieldTag::__parent) {
27087 return std::result::Result::Err(A::Error::duplicate_field(
27088 "multiple values for parent",
27089 ));
27090 }
27091 result.parent = map
27092 .next_value::<std::option::Option<std::string::String>>()?
27093 .unwrap_or_default();
27094 }
27095 __FieldTag::__workflow_invocation => {
27096 if !fields.insert(__FieldTag::__workflow_invocation) {
27097 return std::result::Result::Err(A::Error::duplicate_field(
27098 "multiple values for workflow_invocation",
27099 ));
27100 }
27101 result.workflow_invocation = map.next_value::<std::option::Option<crate::model::WorkflowInvocation>>()?
27102 ;
27103 }
27104 __FieldTag::Unknown(key) => {
27105 let value = map.next_value::<serde_json::Value>()?;
27106 result._unknown_fields.insert(key, value);
27107 }
27108 }
27109 }
27110 std::result::Result::Ok(result)
27111 }
27112 }
27113 deserializer.deserialize_any(Visitor)
27114 }
27115}
27116
27117#[doc(hidden)]
27118impl serde::ser::Serialize for CreateWorkflowInvocationRequest {
27119 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27120 where
27121 S: serde::ser::Serializer,
27122 {
27123 use serde::ser::SerializeMap;
27124 #[allow(unused_imports)]
27125 use std::option::Option::Some;
27126 let mut state = serializer.serialize_map(std::option::Option::None)?;
27127 if !self.parent.is_empty() {
27128 state.serialize_entry("parent", &self.parent)?;
27129 }
27130 if self.workflow_invocation.is_some() {
27131 state.serialize_entry("workflowInvocation", &self.workflow_invocation)?;
27132 }
27133 if !self._unknown_fields.is_empty() {
27134 for (key, value) in self._unknown_fields.iter() {
27135 state.serialize_entry(key, &value)?;
27136 }
27137 }
27138 state.end()
27139 }
27140}
27141
27142impl std::fmt::Debug for CreateWorkflowInvocationRequest {
27143 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27144 let mut debug_struct = f.debug_struct("CreateWorkflowInvocationRequest");
27145 debug_struct.field("parent", &self.parent);
27146 debug_struct.field("workflow_invocation", &self.workflow_invocation);
27147 if !self._unknown_fields.is_empty() {
27148 debug_struct.field("_unknown_fields", &self._unknown_fields);
27149 }
27150 debug_struct.finish()
27151 }
27152}
27153
27154#[derive(Clone, Default, PartialEq)]
27156#[non_exhaustive]
27157pub struct DeleteWorkflowInvocationRequest {
27158 pub name: std::string::String,
27160
27161 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27162}
27163
27164impl DeleteWorkflowInvocationRequest {
27165 pub fn new() -> Self {
27166 std::default::Default::default()
27167 }
27168
27169 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27171 self.name = v.into();
27172 self
27173 }
27174}
27175
27176impl wkt::message::Message for DeleteWorkflowInvocationRequest {
27177 fn typename() -> &'static str {
27178 "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
27179 }
27180}
27181
27182#[doc(hidden)]
27183impl<'de> serde::de::Deserialize<'de> for DeleteWorkflowInvocationRequest {
27184 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27185 where
27186 D: serde::Deserializer<'de>,
27187 {
27188 #[allow(non_camel_case_types)]
27189 #[doc(hidden)]
27190 #[derive(PartialEq, Eq, Hash)]
27191 enum __FieldTag {
27192 __name,
27193 Unknown(std::string::String),
27194 }
27195 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27196 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27197 where
27198 D: serde::Deserializer<'de>,
27199 {
27200 struct Visitor;
27201 impl<'de> serde::de::Visitor<'de> for Visitor {
27202 type Value = __FieldTag;
27203 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27204 formatter.write_str("a field name for DeleteWorkflowInvocationRequest")
27205 }
27206 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
27207 where
27208 E: serde::de::Error,
27209 {
27210 use std::result::Result::Ok;
27211 use std::string::ToString;
27212 match value {
27213 "name" => Ok(__FieldTag::__name),
27214 _ => Ok(__FieldTag::Unknown(value.to_string())),
27215 }
27216 }
27217 }
27218 deserializer.deserialize_identifier(Visitor)
27219 }
27220 }
27221 struct Visitor;
27222 impl<'de> serde::de::Visitor<'de> for Visitor {
27223 type Value = DeleteWorkflowInvocationRequest;
27224 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27225 formatter.write_str("struct DeleteWorkflowInvocationRequest")
27226 }
27227 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27228 where
27229 A: serde::de::MapAccess<'de>,
27230 {
27231 #[allow(unused_imports)]
27232 use serde::de::Error;
27233 use std::option::Option::Some;
27234 let mut fields = std::collections::HashSet::new();
27235 let mut result = Self::Value::new();
27236 while let Some(tag) = map.next_key::<__FieldTag>()? {
27237 #[allow(clippy::match_single_binding)]
27238 match tag {
27239 __FieldTag::__name => {
27240 if !fields.insert(__FieldTag::__name) {
27241 return std::result::Result::Err(A::Error::duplicate_field(
27242 "multiple values for name",
27243 ));
27244 }
27245 result.name = map
27246 .next_value::<std::option::Option<std::string::String>>()?
27247 .unwrap_or_default();
27248 }
27249 __FieldTag::Unknown(key) => {
27250 let value = map.next_value::<serde_json::Value>()?;
27251 result._unknown_fields.insert(key, value);
27252 }
27253 }
27254 }
27255 std::result::Result::Ok(result)
27256 }
27257 }
27258 deserializer.deserialize_any(Visitor)
27259 }
27260}
27261
27262#[doc(hidden)]
27263impl serde::ser::Serialize for DeleteWorkflowInvocationRequest {
27264 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27265 where
27266 S: serde::ser::Serializer,
27267 {
27268 use serde::ser::SerializeMap;
27269 #[allow(unused_imports)]
27270 use std::option::Option::Some;
27271 let mut state = serializer.serialize_map(std::option::Option::None)?;
27272 if !self.name.is_empty() {
27273 state.serialize_entry("name", &self.name)?;
27274 }
27275 if !self._unknown_fields.is_empty() {
27276 for (key, value) in self._unknown_fields.iter() {
27277 state.serialize_entry(key, &value)?;
27278 }
27279 }
27280 state.end()
27281 }
27282}
27283
27284impl std::fmt::Debug for DeleteWorkflowInvocationRequest {
27285 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27286 let mut debug_struct = f.debug_struct("DeleteWorkflowInvocationRequest");
27287 debug_struct.field("name", &self.name);
27288 if !self._unknown_fields.is_empty() {
27289 debug_struct.field("_unknown_fields", &self._unknown_fields);
27290 }
27291 debug_struct.finish()
27292 }
27293}
27294
27295#[derive(Clone, Default, PartialEq)]
27297#[non_exhaustive]
27298pub struct CancelWorkflowInvocationRequest {
27299 pub name: std::string::String,
27301
27302 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27303}
27304
27305impl CancelWorkflowInvocationRequest {
27306 pub fn new() -> Self {
27307 std::default::Default::default()
27308 }
27309
27310 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27312 self.name = v.into();
27313 self
27314 }
27315}
27316
27317impl wkt::message::Message for CancelWorkflowInvocationRequest {
27318 fn typename() -> &'static str {
27319 "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
27320 }
27321}
27322
27323#[doc(hidden)]
27324impl<'de> serde::de::Deserialize<'de> for CancelWorkflowInvocationRequest {
27325 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27326 where
27327 D: serde::Deserializer<'de>,
27328 {
27329 #[allow(non_camel_case_types)]
27330 #[doc(hidden)]
27331 #[derive(PartialEq, Eq, Hash)]
27332 enum __FieldTag {
27333 __name,
27334 Unknown(std::string::String),
27335 }
27336 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27337 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27338 where
27339 D: serde::Deserializer<'de>,
27340 {
27341 struct Visitor;
27342 impl<'de> serde::de::Visitor<'de> for Visitor {
27343 type Value = __FieldTag;
27344 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27345 formatter.write_str("a field name for CancelWorkflowInvocationRequest")
27346 }
27347 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
27348 where
27349 E: serde::de::Error,
27350 {
27351 use std::result::Result::Ok;
27352 use std::string::ToString;
27353 match value {
27354 "name" => Ok(__FieldTag::__name),
27355 _ => Ok(__FieldTag::Unknown(value.to_string())),
27356 }
27357 }
27358 }
27359 deserializer.deserialize_identifier(Visitor)
27360 }
27361 }
27362 struct Visitor;
27363 impl<'de> serde::de::Visitor<'de> for Visitor {
27364 type Value = CancelWorkflowInvocationRequest;
27365 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27366 formatter.write_str("struct CancelWorkflowInvocationRequest")
27367 }
27368 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27369 where
27370 A: serde::de::MapAccess<'de>,
27371 {
27372 #[allow(unused_imports)]
27373 use serde::de::Error;
27374 use std::option::Option::Some;
27375 let mut fields = std::collections::HashSet::new();
27376 let mut result = Self::Value::new();
27377 while let Some(tag) = map.next_key::<__FieldTag>()? {
27378 #[allow(clippy::match_single_binding)]
27379 match tag {
27380 __FieldTag::__name => {
27381 if !fields.insert(__FieldTag::__name) {
27382 return std::result::Result::Err(A::Error::duplicate_field(
27383 "multiple values for name",
27384 ));
27385 }
27386 result.name = map
27387 .next_value::<std::option::Option<std::string::String>>()?
27388 .unwrap_or_default();
27389 }
27390 __FieldTag::Unknown(key) => {
27391 let value = map.next_value::<serde_json::Value>()?;
27392 result._unknown_fields.insert(key, value);
27393 }
27394 }
27395 }
27396 std::result::Result::Ok(result)
27397 }
27398 }
27399 deserializer.deserialize_any(Visitor)
27400 }
27401}
27402
27403#[doc(hidden)]
27404impl serde::ser::Serialize for CancelWorkflowInvocationRequest {
27405 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27406 where
27407 S: serde::ser::Serializer,
27408 {
27409 use serde::ser::SerializeMap;
27410 #[allow(unused_imports)]
27411 use std::option::Option::Some;
27412 let mut state = serializer.serialize_map(std::option::Option::None)?;
27413 if !self.name.is_empty() {
27414 state.serialize_entry("name", &self.name)?;
27415 }
27416 if !self._unknown_fields.is_empty() {
27417 for (key, value) in self._unknown_fields.iter() {
27418 state.serialize_entry(key, &value)?;
27419 }
27420 }
27421 state.end()
27422 }
27423}
27424
27425impl std::fmt::Debug for CancelWorkflowInvocationRequest {
27426 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27427 let mut debug_struct = f.debug_struct("CancelWorkflowInvocationRequest");
27428 debug_struct.field("name", &self.name);
27429 if !self._unknown_fields.is_empty() {
27430 debug_struct.field("_unknown_fields", &self._unknown_fields);
27431 }
27432 debug_struct.finish()
27433 }
27434}
27435
27436#[derive(Clone, Default, PartialEq)]
27438#[non_exhaustive]
27439pub struct CancelWorkflowInvocationResponse {
27440 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27441}
27442
27443impl CancelWorkflowInvocationResponse {
27444 pub fn new() -> Self {
27445 std::default::Default::default()
27446 }
27447}
27448
27449impl wkt::message::Message for CancelWorkflowInvocationResponse {
27450 fn typename() -> &'static str {
27451 "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
27452 }
27453}
27454
27455#[doc(hidden)]
27456impl<'de> serde::de::Deserialize<'de> for CancelWorkflowInvocationResponse {
27457 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27458 where
27459 D: serde::Deserializer<'de>,
27460 {
27461 #[allow(non_camel_case_types)]
27462 #[doc(hidden)]
27463 #[derive(PartialEq, Eq, Hash)]
27464 enum __FieldTag {
27465 Unknown(std::string::String),
27466 }
27467 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27468 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27469 where
27470 D: serde::Deserializer<'de>,
27471 {
27472 struct Visitor;
27473 impl<'de> serde::de::Visitor<'de> for Visitor {
27474 type Value = __FieldTag;
27475 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27476 formatter.write_str("a field name for CancelWorkflowInvocationResponse")
27477 }
27478 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
27479 where
27480 E: serde::de::Error,
27481 {
27482 use std::result::Result::Ok;
27483 use std::string::ToString;
27484 Ok(__FieldTag::Unknown(value.to_string()))
27485 }
27486 }
27487 deserializer.deserialize_identifier(Visitor)
27488 }
27489 }
27490 struct Visitor;
27491 impl<'de> serde::de::Visitor<'de> for Visitor {
27492 type Value = CancelWorkflowInvocationResponse;
27493 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27494 formatter.write_str("struct CancelWorkflowInvocationResponse")
27495 }
27496 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27497 where
27498 A: serde::de::MapAccess<'de>,
27499 {
27500 #[allow(unused_imports)]
27501 use serde::de::Error;
27502 use std::option::Option::Some;
27503 let mut result = Self::Value::new();
27504 while let Some(tag) = map.next_key::<__FieldTag>()? {
27505 #[allow(clippy::match_single_binding)]
27506 match tag {
27507 __FieldTag::Unknown(key) => {
27508 let value = map.next_value::<serde_json::Value>()?;
27509 result._unknown_fields.insert(key, value);
27510 }
27511 }
27512 }
27513 std::result::Result::Ok(result)
27514 }
27515 }
27516 deserializer.deserialize_any(Visitor)
27517 }
27518}
27519
27520#[doc(hidden)]
27521impl serde::ser::Serialize for CancelWorkflowInvocationResponse {
27522 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
27523 where
27524 S: serde::ser::Serializer,
27525 {
27526 use serde::ser::SerializeMap;
27527 #[allow(unused_imports)]
27528 use std::option::Option::Some;
27529 let mut state = serializer.serialize_map(std::option::Option::None)?;
27530 if !self._unknown_fields.is_empty() {
27531 for (key, value) in self._unknown_fields.iter() {
27532 state.serialize_entry(key, &value)?;
27533 }
27534 }
27535 state.end()
27536 }
27537}
27538
27539impl std::fmt::Debug for CancelWorkflowInvocationResponse {
27540 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27541 let mut debug_struct = f.debug_struct("CancelWorkflowInvocationResponse");
27542 if !self._unknown_fields.is_empty() {
27543 debug_struct.field("_unknown_fields", &self._unknown_fields);
27544 }
27545 debug_struct.finish()
27546 }
27547}
27548
27549#[derive(Clone, Default, PartialEq)]
27551#[non_exhaustive]
27552pub struct WorkflowInvocationAction {
27553 pub target: std::option::Option<crate::model::Target>,
27556
27557 pub canonical_target: std::option::Option<crate::model::Target>,
27560
27561 pub state: crate::model::workflow_invocation_action::State,
27563
27564 pub failure_reason: std::string::String,
27567
27568 pub invocation_timing: std::option::Option<gtype::model::Interval>,
27574
27575 pub internal_metadata: std::option::Option<std::string::String>,
27579
27580 pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
27582
27583 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
27584}
27585
27586impl WorkflowInvocationAction {
27587 pub fn new() -> Self {
27588 std::default::Default::default()
27589 }
27590
27591 pub fn set_target<T>(mut self, v: T) -> Self
27593 where
27594 T: std::convert::Into<crate::model::Target>,
27595 {
27596 self.target = std::option::Option::Some(v.into());
27597 self
27598 }
27599
27600 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
27602 where
27603 T: std::convert::Into<crate::model::Target>,
27604 {
27605 self.target = v.map(|x| x.into());
27606 self
27607 }
27608
27609 pub fn set_canonical_target<T>(mut self, v: T) -> Self
27611 where
27612 T: std::convert::Into<crate::model::Target>,
27613 {
27614 self.canonical_target = std::option::Option::Some(v.into());
27615 self
27616 }
27617
27618 pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
27620 where
27621 T: std::convert::Into<crate::model::Target>,
27622 {
27623 self.canonical_target = v.map(|x| x.into());
27624 self
27625 }
27626
27627 pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
27629 mut self,
27630 v: T,
27631 ) -> Self {
27632 self.state = v.into();
27633 self
27634 }
27635
27636 pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
27638 self.failure_reason = v.into();
27639 self
27640 }
27641
27642 pub fn set_invocation_timing<T>(mut self, v: T) -> Self
27644 where
27645 T: std::convert::Into<gtype::model::Interval>,
27646 {
27647 self.invocation_timing = std::option::Option::Some(v.into());
27648 self
27649 }
27650
27651 pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
27653 where
27654 T: std::convert::Into<gtype::model::Interval>,
27655 {
27656 self.invocation_timing = v.map(|x| x.into());
27657 self
27658 }
27659
27660 pub fn set_internal_metadata<T>(mut self, v: T) -> Self
27662 where
27663 T: std::convert::Into<std::string::String>,
27664 {
27665 self.internal_metadata = std::option::Option::Some(v.into());
27666 self
27667 }
27668
27669 pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
27671 where
27672 T: std::convert::Into<std::string::String>,
27673 {
27674 self.internal_metadata = v.map(|x| x.into());
27675 self
27676 }
27677
27678 pub fn set_action<
27683 T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
27684 >(
27685 mut self,
27686 v: T,
27687 ) -> Self {
27688 self.action = v.into();
27689 self
27690 }
27691
27692 pub fn bigquery_action(
27696 &self,
27697 ) -> std::option::Option<
27698 &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
27699 > {
27700 #[allow(unreachable_patterns)]
27701 self.action.as_ref().and_then(|v| match v {
27702 crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
27703 std::option::Option::Some(v)
27704 }
27705 _ => std::option::Option::None,
27706 })
27707 }
27708
27709 pub fn set_bigquery_action<
27715 T: std::convert::Into<
27716 std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
27717 >,
27718 >(
27719 mut self,
27720 v: T,
27721 ) -> Self {
27722 self.action = std::option::Option::Some(
27723 crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
27724 );
27725 self
27726 }
27727
27728 pub fn notebook_action(
27732 &self,
27733 ) -> std::option::Option<
27734 &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
27735 > {
27736 #[allow(unreachable_patterns)]
27737 self.action.as_ref().and_then(|v| match v {
27738 crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
27739 std::option::Option::Some(v)
27740 }
27741 _ => std::option::Option::None,
27742 })
27743 }
27744
27745 pub fn set_notebook_action<
27751 T: std::convert::Into<
27752 std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
27753 >,
27754 >(
27755 mut self,
27756 v: T,
27757 ) -> Self {
27758 self.action = std::option::Option::Some(
27759 crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
27760 );
27761 self
27762 }
27763
27764 pub fn data_preparation_action(
27768 &self,
27769 ) -> std::option::Option<
27770 &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
27771 > {
27772 #[allow(unreachable_patterns)]
27773 self.action.as_ref().and_then(|v| match v {
27774 crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
27775 std::option::Option::Some(v)
27776 }
27777 _ => std::option::Option::None,
27778 })
27779 }
27780
27781 pub fn set_data_preparation_action<
27787 T: std::convert::Into<
27788 std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
27789 >,
27790 >(
27791 mut self,
27792 v: T,
27793 ) -> Self {
27794 self.action = std::option::Option::Some(
27795 crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
27796 );
27797 self
27798 }
27799}
27800
27801impl wkt::message::Message for WorkflowInvocationAction {
27802 fn typename() -> &'static str {
27803 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
27804 }
27805}
27806
27807#[doc(hidden)]
27808impl<'de> serde::de::Deserialize<'de> for WorkflowInvocationAction {
27809 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27810 where
27811 D: serde::Deserializer<'de>,
27812 {
27813 #[allow(non_camel_case_types)]
27814 #[doc(hidden)]
27815 #[derive(PartialEq, Eq, Hash)]
27816 enum __FieldTag {
27817 __bigquery_action,
27818 __notebook_action,
27819 __data_preparation_action,
27820 __target,
27821 __canonical_target,
27822 __state,
27823 __failure_reason,
27824 __invocation_timing,
27825 __internal_metadata,
27826 Unknown(std::string::String),
27827 }
27828 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
27829 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
27830 where
27831 D: serde::Deserializer<'de>,
27832 {
27833 struct Visitor;
27834 impl<'de> serde::de::Visitor<'de> for Visitor {
27835 type Value = __FieldTag;
27836 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27837 formatter.write_str("a field name for WorkflowInvocationAction")
27838 }
27839 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
27840 where
27841 E: serde::de::Error,
27842 {
27843 use std::result::Result::Ok;
27844 use std::string::ToString;
27845 match value {
27846 "bigqueryAction" => Ok(__FieldTag::__bigquery_action),
27847 "bigquery_action" => Ok(__FieldTag::__bigquery_action),
27848 "notebookAction" => Ok(__FieldTag::__notebook_action),
27849 "notebook_action" => Ok(__FieldTag::__notebook_action),
27850 "dataPreparationAction" => Ok(__FieldTag::__data_preparation_action),
27851 "data_preparation_action" => Ok(__FieldTag::__data_preparation_action),
27852 "target" => Ok(__FieldTag::__target),
27853 "canonicalTarget" => Ok(__FieldTag::__canonical_target),
27854 "canonical_target" => Ok(__FieldTag::__canonical_target),
27855 "state" => Ok(__FieldTag::__state),
27856 "failureReason" => Ok(__FieldTag::__failure_reason),
27857 "failure_reason" => Ok(__FieldTag::__failure_reason),
27858 "invocationTiming" => Ok(__FieldTag::__invocation_timing),
27859 "invocation_timing" => Ok(__FieldTag::__invocation_timing),
27860 "internalMetadata" => Ok(__FieldTag::__internal_metadata),
27861 "internal_metadata" => Ok(__FieldTag::__internal_metadata),
27862 _ => Ok(__FieldTag::Unknown(value.to_string())),
27863 }
27864 }
27865 }
27866 deserializer.deserialize_identifier(Visitor)
27867 }
27868 }
27869 struct Visitor;
27870 impl<'de> serde::de::Visitor<'de> for Visitor {
27871 type Value = WorkflowInvocationAction;
27872 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
27873 formatter.write_str("struct WorkflowInvocationAction")
27874 }
27875 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
27876 where
27877 A: serde::de::MapAccess<'de>,
27878 {
27879 #[allow(unused_imports)]
27880 use serde::de::Error;
27881 use std::option::Option::Some;
27882 let mut fields = std::collections::HashSet::new();
27883 let mut result = Self::Value::new();
27884 while let Some(tag) = map.next_key::<__FieldTag>()? {
27885 #[allow(clippy::match_single_binding)]
27886 match tag {
27887 __FieldTag::__bigquery_action => {
27888 if !fields.insert(__FieldTag::__bigquery_action) {
27889 return std::result::Result::Err(A::Error::duplicate_field(
27890 "multiple values for bigquery_action",
27891 ));
27892 }
27893 if result.action.is_some() {
27894 return std::result::Result::Err(A::Error::duplicate_field(
27895 "multiple values for `action`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.bigquery_action, latest field was bigqueryAction",
27896 ));
27897 }
27898 result.action = std::option::Option::Some(
27899 crate::model::workflow_invocation_action::Action::BigqueryAction(
27900 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>>>()?.unwrap_or_default()
27901 ),
27902 );
27903 }
27904 __FieldTag::__notebook_action => {
27905 if !fields.insert(__FieldTag::__notebook_action) {
27906 return std::result::Result::Err(A::Error::duplicate_field(
27907 "multiple values for notebook_action",
27908 ));
27909 }
27910 if result.action.is_some() {
27911 return std::result::Result::Err(A::Error::duplicate_field(
27912 "multiple values for `action`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.notebook_action, latest field was notebookAction",
27913 ));
27914 }
27915 result.action = std::option::Option::Some(
27916 crate::model::workflow_invocation_action::Action::NotebookAction(
27917 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>>>()?.unwrap_or_default()
27918 ),
27919 );
27920 }
27921 __FieldTag::__data_preparation_action => {
27922 if !fields.insert(__FieldTag::__data_preparation_action) {
27923 return std::result::Result::Err(A::Error::duplicate_field(
27924 "multiple values for data_preparation_action",
27925 ));
27926 }
27927 if result.action.is_some() {
27928 return std::result::Result::Err(A::Error::duplicate_field(
27929 "multiple values for `action`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.data_preparation_action, latest field was dataPreparationAction",
27930 ));
27931 }
27932 result.action = std::option::Option::Some(
27933 crate::model::workflow_invocation_action::Action::DataPreparationAction(
27934 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>>>()?.unwrap_or_default()
27935 ),
27936 );
27937 }
27938 __FieldTag::__target => {
27939 if !fields.insert(__FieldTag::__target) {
27940 return std::result::Result::Err(A::Error::duplicate_field(
27941 "multiple values for target",
27942 ));
27943 }
27944 result.target =
27945 map.next_value::<std::option::Option<crate::model::Target>>()?;
27946 }
27947 __FieldTag::__canonical_target => {
27948 if !fields.insert(__FieldTag::__canonical_target) {
27949 return std::result::Result::Err(A::Error::duplicate_field(
27950 "multiple values for canonical_target",
27951 ));
27952 }
27953 result.canonical_target =
27954 map.next_value::<std::option::Option<crate::model::Target>>()?;
27955 }
27956 __FieldTag::__state => {
27957 if !fields.insert(__FieldTag::__state) {
27958 return std::result::Result::Err(A::Error::duplicate_field(
27959 "multiple values for state",
27960 ));
27961 }
27962 result.state = map
27963 .next_value::<std::option::Option<
27964 crate::model::workflow_invocation_action::State,
27965 >>()?
27966 .unwrap_or_default();
27967 }
27968 __FieldTag::__failure_reason => {
27969 if !fields.insert(__FieldTag::__failure_reason) {
27970 return std::result::Result::Err(A::Error::duplicate_field(
27971 "multiple values for failure_reason",
27972 ));
27973 }
27974 result.failure_reason = map
27975 .next_value::<std::option::Option<std::string::String>>()?
27976 .unwrap_or_default();
27977 }
27978 __FieldTag::__invocation_timing => {
27979 if !fields.insert(__FieldTag::__invocation_timing) {
27980 return std::result::Result::Err(A::Error::duplicate_field(
27981 "multiple values for invocation_timing",
27982 ));
27983 }
27984 result.invocation_timing =
27985 map.next_value::<std::option::Option<gtype::model::Interval>>()?;
27986 }
27987 __FieldTag::__internal_metadata => {
27988 if !fields.insert(__FieldTag::__internal_metadata) {
27989 return std::result::Result::Err(A::Error::duplicate_field(
27990 "multiple values for internal_metadata",
27991 ));
27992 }
27993 result.internal_metadata =
27994 map.next_value::<std::option::Option<std::string::String>>()?;
27995 }
27996 __FieldTag::Unknown(key) => {
27997 let value = map.next_value::<serde_json::Value>()?;
27998 result._unknown_fields.insert(key, value);
27999 }
28000 }
28001 }
28002 std::result::Result::Ok(result)
28003 }
28004 }
28005 deserializer.deserialize_any(Visitor)
28006 }
28007}
28008
28009#[doc(hidden)]
28010impl serde::ser::Serialize for WorkflowInvocationAction {
28011 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28012 where
28013 S: serde::ser::Serializer,
28014 {
28015 use serde::ser::SerializeMap;
28016 #[allow(unused_imports)]
28017 use std::option::Option::Some;
28018 let mut state = serializer.serialize_map(std::option::Option::None)?;
28019 if let Some(value) = self.bigquery_action() {
28020 state.serialize_entry("bigqueryAction", value)?;
28021 }
28022 if let Some(value) = self.notebook_action() {
28023 state.serialize_entry("notebookAction", value)?;
28024 }
28025 if let Some(value) = self.data_preparation_action() {
28026 state.serialize_entry("dataPreparationAction", value)?;
28027 }
28028 if self.target.is_some() {
28029 state.serialize_entry("target", &self.target)?;
28030 }
28031 if self.canonical_target.is_some() {
28032 state.serialize_entry("canonicalTarget", &self.canonical_target)?;
28033 }
28034 if !wkt::internal::is_default(&self.state) {
28035 state.serialize_entry("state", &self.state)?;
28036 }
28037 if !self.failure_reason.is_empty() {
28038 state.serialize_entry("failureReason", &self.failure_reason)?;
28039 }
28040 if self.invocation_timing.is_some() {
28041 state.serialize_entry("invocationTiming", &self.invocation_timing)?;
28042 }
28043 if self.internal_metadata.is_some() {
28044 state.serialize_entry("internalMetadata", &self.internal_metadata)?;
28045 }
28046 if !self._unknown_fields.is_empty() {
28047 for (key, value) in self._unknown_fields.iter() {
28048 state.serialize_entry(key, &value)?;
28049 }
28050 }
28051 state.end()
28052 }
28053}
28054
28055impl std::fmt::Debug for WorkflowInvocationAction {
28056 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28057 let mut debug_struct = f.debug_struct("WorkflowInvocationAction");
28058 debug_struct.field("target", &self.target);
28059 debug_struct.field("canonical_target", &self.canonical_target);
28060 debug_struct.field("state", &self.state);
28061 debug_struct.field("failure_reason", &self.failure_reason);
28062 debug_struct.field("invocation_timing", &self.invocation_timing);
28063 debug_struct.field("internal_metadata", &self.internal_metadata);
28064 debug_struct.field("action", &self.action);
28065 if !self._unknown_fields.is_empty() {
28066 debug_struct.field("_unknown_fields", &self._unknown_fields);
28067 }
28068 debug_struct.finish()
28069 }
28070}
28071
28072pub mod workflow_invocation_action {
28074 #[allow(unused_imports)]
28075 use super::*;
28076
28077 #[derive(Clone, Default, PartialEq)]
28079 #[non_exhaustive]
28080 pub struct BigQueryAction {
28081 pub sql_script: std::string::String,
28083
28084 pub job_id: std::string::String,
28087
28088 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28089 }
28090
28091 impl BigQueryAction {
28092 pub fn new() -> Self {
28093 std::default::Default::default()
28094 }
28095
28096 pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28098 self.sql_script = v.into();
28099 self
28100 }
28101
28102 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28104 self.job_id = v.into();
28105 self
28106 }
28107 }
28108
28109 impl wkt::message::Message for BigQueryAction {
28110 fn typename() -> &'static str {
28111 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
28112 }
28113 }
28114
28115 #[doc(hidden)]
28116 impl<'de> serde::de::Deserialize<'de> for BigQueryAction {
28117 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28118 where
28119 D: serde::Deserializer<'de>,
28120 {
28121 #[allow(non_camel_case_types)]
28122 #[doc(hidden)]
28123 #[derive(PartialEq, Eq, Hash)]
28124 enum __FieldTag {
28125 __sql_script,
28126 __job_id,
28127 Unknown(std::string::String),
28128 }
28129 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28130 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28131 where
28132 D: serde::Deserializer<'de>,
28133 {
28134 struct Visitor;
28135 impl<'de> serde::de::Visitor<'de> for Visitor {
28136 type Value = __FieldTag;
28137 fn expecting(
28138 &self,
28139 formatter: &mut std::fmt::Formatter,
28140 ) -> std::fmt::Result {
28141 formatter.write_str("a field name for BigQueryAction")
28142 }
28143 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28144 where
28145 E: serde::de::Error,
28146 {
28147 use std::result::Result::Ok;
28148 use std::string::ToString;
28149 match value {
28150 "sqlScript" => Ok(__FieldTag::__sql_script),
28151 "sql_script" => Ok(__FieldTag::__sql_script),
28152 "jobId" => Ok(__FieldTag::__job_id),
28153 "job_id" => Ok(__FieldTag::__job_id),
28154 _ => Ok(__FieldTag::Unknown(value.to_string())),
28155 }
28156 }
28157 }
28158 deserializer.deserialize_identifier(Visitor)
28159 }
28160 }
28161 struct Visitor;
28162 impl<'de> serde::de::Visitor<'de> for Visitor {
28163 type Value = BigQueryAction;
28164 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28165 formatter.write_str("struct BigQueryAction")
28166 }
28167 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28168 where
28169 A: serde::de::MapAccess<'de>,
28170 {
28171 #[allow(unused_imports)]
28172 use serde::de::Error;
28173 use std::option::Option::Some;
28174 let mut fields = std::collections::HashSet::new();
28175 let mut result = Self::Value::new();
28176 while let Some(tag) = map.next_key::<__FieldTag>()? {
28177 #[allow(clippy::match_single_binding)]
28178 match tag {
28179 __FieldTag::__sql_script => {
28180 if !fields.insert(__FieldTag::__sql_script) {
28181 return std::result::Result::Err(A::Error::duplicate_field(
28182 "multiple values for sql_script",
28183 ));
28184 }
28185 result.sql_script = map
28186 .next_value::<std::option::Option<std::string::String>>()?
28187 .unwrap_or_default();
28188 }
28189 __FieldTag::__job_id => {
28190 if !fields.insert(__FieldTag::__job_id) {
28191 return std::result::Result::Err(A::Error::duplicate_field(
28192 "multiple values for job_id",
28193 ));
28194 }
28195 result.job_id = map
28196 .next_value::<std::option::Option<std::string::String>>()?
28197 .unwrap_or_default();
28198 }
28199 __FieldTag::Unknown(key) => {
28200 let value = map.next_value::<serde_json::Value>()?;
28201 result._unknown_fields.insert(key, value);
28202 }
28203 }
28204 }
28205 std::result::Result::Ok(result)
28206 }
28207 }
28208 deserializer.deserialize_any(Visitor)
28209 }
28210 }
28211
28212 #[doc(hidden)]
28213 impl serde::ser::Serialize for BigQueryAction {
28214 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28215 where
28216 S: serde::ser::Serializer,
28217 {
28218 use serde::ser::SerializeMap;
28219 #[allow(unused_imports)]
28220 use std::option::Option::Some;
28221 let mut state = serializer.serialize_map(std::option::Option::None)?;
28222 if !self.sql_script.is_empty() {
28223 state.serialize_entry("sqlScript", &self.sql_script)?;
28224 }
28225 if !self.job_id.is_empty() {
28226 state.serialize_entry("jobId", &self.job_id)?;
28227 }
28228 if !self._unknown_fields.is_empty() {
28229 for (key, value) in self._unknown_fields.iter() {
28230 state.serialize_entry(key, &value)?;
28231 }
28232 }
28233 state.end()
28234 }
28235 }
28236
28237 impl std::fmt::Debug for BigQueryAction {
28238 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28239 let mut debug_struct = f.debug_struct("BigQueryAction");
28240 debug_struct.field("sql_script", &self.sql_script);
28241 debug_struct.field("job_id", &self.job_id);
28242 if !self._unknown_fields.is_empty() {
28243 debug_struct.field("_unknown_fields", &self._unknown_fields);
28244 }
28245 debug_struct.finish()
28246 }
28247 }
28248
28249 #[derive(Clone, Default, PartialEq)]
28251 #[non_exhaustive]
28252 pub struct NotebookAction {
28253 pub contents: std::string::String,
28255
28256 pub job_id: std::string::String,
28260
28261 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28262 }
28263
28264 impl NotebookAction {
28265 pub fn new() -> Self {
28266 std::default::Default::default()
28267 }
28268
28269 pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28271 self.contents = v.into();
28272 self
28273 }
28274
28275 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28277 self.job_id = v.into();
28278 self
28279 }
28280 }
28281
28282 impl wkt::message::Message for NotebookAction {
28283 fn typename() -> &'static str {
28284 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
28285 }
28286 }
28287
28288 #[doc(hidden)]
28289 impl<'de> serde::de::Deserialize<'de> for NotebookAction {
28290 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28291 where
28292 D: serde::Deserializer<'de>,
28293 {
28294 #[allow(non_camel_case_types)]
28295 #[doc(hidden)]
28296 #[derive(PartialEq, Eq, Hash)]
28297 enum __FieldTag {
28298 __contents,
28299 __job_id,
28300 Unknown(std::string::String),
28301 }
28302 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28303 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28304 where
28305 D: serde::Deserializer<'de>,
28306 {
28307 struct Visitor;
28308 impl<'de> serde::de::Visitor<'de> for Visitor {
28309 type Value = __FieldTag;
28310 fn expecting(
28311 &self,
28312 formatter: &mut std::fmt::Formatter,
28313 ) -> std::fmt::Result {
28314 formatter.write_str("a field name for NotebookAction")
28315 }
28316 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28317 where
28318 E: serde::de::Error,
28319 {
28320 use std::result::Result::Ok;
28321 use std::string::ToString;
28322 match value {
28323 "contents" => Ok(__FieldTag::__contents),
28324 "jobId" => Ok(__FieldTag::__job_id),
28325 "job_id" => Ok(__FieldTag::__job_id),
28326 _ => Ok(__FieldTag::Unknown(value.to_string())),
28327 }
28328 }
28329 }
28330 deserializer.deserialize_identifier(Visitor)
28331 }
28332 }
28333 struct Visitor;
28334 impl<'de> serde::de::Visitor<'de> for Visitor {
28335 type Value = NotebookAction;
28336 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28337 formatter.write_str("struct NotebookAction")
28338 }
28339 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28340 where
28341 A: serde::de::MapAccess<'de>,
28342 {
28343 #[allow(unused_imports)]
28344 use serde::de::Error;
28345 use std::option::Option::Some;
28346 let mut fields = std::collections::HashSet::new();
28347 let mut result = Self::Value::new();
28348 while let Some(tag) = map.next_key::<__FieldTag>()? {
28349 #[allow(clippy::match_single_binding)]
28350 match tag {
28351 __FieldTag::__contents => {
28352 if !fields.insert(__FieldTag::__contents) {
28353 return std::result::Result::Err(A::Error::duplicate_field(
28354 "multiple values for contents",
28355 ));
28356 }
28357 result.contents = map
28358 .next_value::<std::option::Option<std::string::String>>()?
28359 .unwrap_or_default();
28360 }
28361 __FieldTag::__job_id => {
28362 if !fields.insert(__FieldTag::__job_id) {
28363 return std::result::Result::Err(A::Error::duplicate_field(
28364 "multiple values for job_id",
28365 ));
28366 }
28367 result.job_id = map
28368 .next_value::<std::option::Option<std::string::String>>()?
28369 .unwrap_or_default();
28370 }
28371 __FieldTag::Unknown(key) => {
28372 let value = map.next_value::<serde_json::Value>()?;
28373 result._unknown_fields.insert(key, value);
28374 }
28375 }
28376 }
28377 std::result::Result::Ok(result)
28378 }
28379 }
28380 deserializer.deserialize_any(Visitor)
28381 }
28382 }
28383
28384 #[doc(hidden)]
28385 impl serde::ser::Serialize for NotebookAction {
28386 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28387 where
28388 S: serde::ser::Serializer,
28389 {
28390 use serde::ser::SerializeMap;
28391 #[allow(unused_imports)]
28392 use std::option::Option::Some;
28393 let mut state = serializer.serialize_map(std::option::Option::None)?;
28394 if !self.contents.is_empty() {
28395 state.serialize_entry("contents", &self.contents)?;
28396 }
28397 if !self.job_id.is_empty() {
28398 state.serialize_entry("jobId", &self.job_id)?;
28399 }
28400 if !self._unknown_fields.is_empty() {
28401 for (key, value) in self._unknown_fields.iter() {
28402 state.serialize_entry(key, &value)?;
28403 }
28404 }
28405 state.end()
28406 }
28407 }
28408
28409 impl std::fmt::Debug for NotebookAction {
28410 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28411 let mut debug_struct = f.debug_struct("NotebookAction");
28412 debug_struct.field("contents", &self.contents);
28413 debug_struct.field("job_id", &self.job_id);
28414 if !self._unknown_fields.is_empty() {
28415 debug_struct.field("_unknown_fields", &self._unknown_fields);
28416 }
28417 debug_struct.finish()
28418 }
28419 }
28420
28421 #[derive(Clone, Default, PartialEq)]
28423 #[non_exhaustive]
28424 pub struct DataPreparationAction {
28425 pub generated_sql: std::string::String,
28428
28429 pub job_id: std::string::String,
28432
28433 pub definition: std::option::Option<
28435 crate::model::workflow_invocation_action::data_preparation_action::Definition,
28436 >,
28437
28438 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28439 }
28440
28441 impl DataPreparationAction {
28442 pub fn new() -> Self {
28443 std::default::Default::default()
28444 }
28445
28446 pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
28448 mut self,
28449 v: T,
28450 ) -> Self {
28451 self.generated_sql = v.into();
28452 self
28453 }
28454
28455 pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28457 self.job_id = v.into();
28458 self
28459 }
28460
28461 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
28466 {
28467 self.definition = v.into();
28468 self
28469 }
28470
28471 pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
28475 #[allow(unreachable_patterns)]
28476 self.definition.as_ref().and_then(|v| match v {
28477 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
28478 _ => std::option::Option::None,
28479 })
28480 }
28481
28482 pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
28488 mut self,
28489 v: T,
28490 ) -> Self {
28491 self.definition = std::option::Option::Some(
28492 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
28493 v.into()
28494 )
28495 );
28496 self
28497 }
28498
28499 pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
28503 #[allow(unreachable_patterns)]
28504 self.definition.as_ref().and_then(|v| match v {
28505 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
28506 _ => std::option::Option::None,
28507 })
28508 }
28509
28510 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{
28516 self.definition = std::option::Option::Some(
28517 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
28518 v.into()
28519 )
28520 );
28521 self
28522 }
28523 }
28524
28525 impl wkt::message::Message for DataPreparationAction {
28526 fn typename() -> &'static str {
28527 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
28528 }
28529 }
28530
28531 #[doc(hidden)]
28532 impl<'de> serde::de::Deserialize<'de> for DataPreparationAction {
28533 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28534 where
28535 D: serde::Deserializer<'de>,
28536 {
28537 #[allow(non_camel_case_types)]
28538 #[doc(hidden)]
28539 #[derive(PartialEq, Eq, Hash)]
28540 enum __FieldTag {
28541 __contents_yaml,
28542 __contents_sql,
28543 __generated_sql,
28544 __job_id,
28545 Unknown(std::string::String),
28546 }
28547 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28548 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28549 where
28550 D: serde::Deserializer<'de>,
28551 {
28552 struct Visitor;
28553 impl<'de> serde::de::Visitor<'de> for Visitor {
28554 type Value = __FieldTag;
28555 fn expecting(
28556 &self,
28557 formatter: &mut std::fmt::Formatter,
28558 ) -> std::fmt::Result {
28559 formatter.write_str("a field name for DataPreparationAction")
28560 }
28561 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
28562 where
28563 E: serde::de::Error,
28564 {
28565 use std::result::Result::Ok;
28566 use std::string::ToString;
28567 match value {
28568 "contentsYaml" => Ok(__FieldTag::__contents_yaml),
28569 "contents_yaml" => Ok(__FieldTag::__contents_yaml),
28570 "contentsSql" => Ok(__FieldTag::__contents_sql),
28571 "contents_sql" => Ok(__FieldTag::__contents_sql),
28572 "generatedSql" => Ok(__FieldTag::__generated_sql),
28573 "generated_sql" => Ok(__FieldTag::__generated_sql),
28574 "jobId" => Ok(__FieldTag::__job_id),
28575 "job_id" => Ok(__FieldTag::__job_id),
28576 _ => Ok(__FieldTag::Unknown(value.to_string())),
28577 }
28578 }
28579 }
28580 deserializer.deserialize_identifier(Visitor)
28581 }
28582 }
28583 struct Visitor;
28584 impl<'de> serde::de::Visitor<'de> for Visitor {
28585 type Value = DataPreparationAction;
28586 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28587 formatter.write_str("struct DataPreparationAction")
28588 }
28589 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28590 where
28591 A: serde::de::MapAccess<'de>,
28592 {
28593 #[allow(unused_imports)]
28594 use serde::de::Error;
28595 use std::option::Option::Some;
28596 let mut fields = std::collections::HashSet::new();
28597 let mut result = Self::Value::new();
28598 while let Some(tag) = map.next_key::<__FieldTag>()? {
28599 #[allow(clippy::match_single_binding)]
28600 match tag {
28601 __FieldTag::__contents_yaml => {
28602 if !fields.insert(__FieldTag::__contents_yaml) {
28603 return std::result::Result::Err(A::Error::duplicate_field(
28604 "multiple values for contents_yaml",
28605 ));
28606 }
28607 if result.definition.is_some() {
28608 return std::result::Result::Err(A::Error::duplicate_field(
28609 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.contents_yaml, latest field was contentsYaml",
28610 ));
28611 }
28612 result.definition = std::option::Option::Some(
28613 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
28614 map.next_value::<std::option::Option<std::string::String>>()?.unwrap_or_default()
28615 ),
28616 );
28617 }
28618 __FieldTag::__contents_sql => {
28619 if !fields.insert(__FieldTag::__contents_sql) {
28620 return std::result::Result::Err(A::Error::duplicate_field(
28621 "multiple values for contents_sql",
28622 ));
28623 }
28624 if result.definition.is_some() {
28625 return std::result::Result::Err(A::Error::duplicate_field(
28626 "multiple values for `definition`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.contents_sql, latest field was contentsSql",
28627 ));
28628 }
28629 result.definition = std::option::Option::Some(
28630 crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
28631 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>>()?.unwrap_or_default()
28632 ),
28633 );
28634 }
28635 __FieldTag::__generated_sql => {
28636 if !fields.insert(__FieldTag::__generated_sql) {
28637 return std::result::Result::Err(A::Error::duplicate_field(
28638 "multiple values for generated_sql",
28639 ));
28640 }
28641 result.generated_sql = map
28642 .next_value::<std::option::Option<std::string::String>>()?
28643 .unwrap_or_default();
28644 }
28645 __FieldTag::__job_id => {
28646 if !fields.insert(__FieldTag::__job_id) {
28647 return std::result::Result::Err(A::Error::duplicate_field(
28648 "multiple values for job_id",
28649 ));
28650 }
28651 result.job_id = map
28652 .next_value::<std::option::Option<std::string::String>>()?
28653 .unwrap_or_default();
28654 }
28655 __FieldTag::Unknown(key) => {
28656 let value = map.next_value::<serde_json::Value>()?;
28657 result._unknown_fields.insert(key, value);
28658 }
28659 }
28660 }
28661 std::result::Result::Ok(result)
28662 }
28663 }
28664 deserializer.deserialize_any(Visitor)
28665 }
28666 }
28667
28668 #[doc(hidden)]
28669 impl serde::ser::Serialize for DataPreparationAction {
28670 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28671 where
28672 S: serde::ser::Serializer,
28673 {
28674 use serde::ser::SerializeMap;
28675 #[allow(unused_imports)]
28676 use std::option::Option::Some;
28677 let mut state = serializer.serialize_map(std::option::Option::None)?;
28678 if let Some(value) = self.contents_yaml() {
28679 state.serialize_entry("contentsYaml", value)?;
28680 }
28681 if let Some(value) = self.contents_sql() {
28682 state.serialize_entry("contentsSql", value)?;
28683 }
28684 if !self.generated_sql.is_empty() {
28685 state.serialize_entry("generatedSql", &self.generated_sql)?;
28686 }
28687 if !self.job_id.is_empty() {
28688 state.serialize_entry("jobId", &self.job_id)?;
28689 }
28690 if !self._unknown_fields.is_empty() {
28691 for (key, value) in self._unknown_fields.iter() {
28692 state.serialize_entry(key, &value)?;
28693 }
28694 }
28695 state.end()
28696 }
28697 }
28698
28699 impl std::fmt::Debug for DataPreparationAction {
28700 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28701 let mut debug_struct = f.debug_struct("DataPreparationAction");
28702 debug_struct.field("generated_sql", &self.generated_sql);
28703 debug_struct.field("job_id", &self.job_id);
28704 debug_struct.field("definition", &self.definition);
28705 if !self._unknown_fields.is_empty() {
28706 debug_struct.field("_unknown_fields", &self._unknown_fields);
28707 }
28708 debug_struct.finish()
28709 }
28710 }
28711
28712 pub mod data_preparation_action {
28714 #[allow(unused_imports)]
28715 use super::*;
28716
28717 #[derive(Clone, Default, PartialEq)]
28719 #[non_exhaustive]
28720 pub struct ActionSqlDefinition {
28721 pub query: std::string::String,
28724
28725 pub error_table: std::option::Option<
28727 crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
28728 >,
28729
28730 pub load_config: std::option::Option<
28732 crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
28733 >,
28734
28735 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28736 }
28737
28738 impl ActionSqlDefinition {
28739 pub fn new() -> Self {
28740 std::default::Default::default()
28741 }
28742
28743 pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
28745 self.query = v.into();
28746 self
28747 }
28748
28749 pub fn set_error_table<T>(mut self, v: T) -> Self
28751 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
28752 {
28753 self.error_table = std::option::Option::Some(v.into());
28754 self
28755 }
28756
28757 pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
28759 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
28760 {
28761 self.error_table = v.map(|x| x.into());
28762 self
28763 }
28764
28765 pub fn set_load_config<T>(mut self, v: T) -> Self
28767 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
28768 {
28769 self.load_config = std::option::Option::Some(v.into());
28770 self
28771 }
28772
28773 pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
28775 where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
28776 {
28777 self.load_config = v.map(|x| x.into());
28778 self
28779 }
28780 }
28781
28782 impl wkt::message::Message for ActionSqlDefinition {
28783 fn typename() -> &'static str {
28784 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
28785 }
28786 }
28787
28788 #[doc(hidden)]
28789 impl<'de> serde::de::Deserialize<'de> for ActionSqlDefinition {
28790 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28791 where
28792 D: serde::Deserializer<'de>,
28793 {
28794 #[allow(non_camel_case_types)]
28795 #[doc(hidden)]
28796 #[derive(PartialEq, Eq, Hash)]
28797 enum __FieldTag {
28798 __query,
28799 __error_table,
28800 __load_config,
28801 Unknown(std::string::String),
28802 }
28803 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
28804 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28805 where
28806 D: serde::Deserializer<'de>,
28807 {
28808 struct Visitor;
28809 impl<'de> serde::de::Visitor<'de> for Visitor {
28810 type Value = __FieldTag;
28811 fn expecting(
28812 &self,
28813 formatter: &mut std::fmt::Formatter,
28814 ) -> std::fmt::Result {
28815 formatter.write_str("a field name for ActionSqlDefinition")
28816 }
28817 fn visit_str<E>(
28818 self,
28819 value: &str,
28820 ) -> std::result::Result<Self::Value, E>
28821 where
28822 E: serde::de::Error,
28823 {
28824 use std::result::Result::Ok;
28825 use std::string::ToString;
28826 match value {
28827 "query" => Ok(__FieldTag::__query),
28828 "errorTable" => Ok(__FieldTag::__error_table),
28829 "error_table" => Ok(__FieldTag::__error_table),
28830 "loadConfig" => Ok(__FieldTag::__load_config),
28831 "load_config" => Ok(__FieldTag::__load_config),
28832 _ => Ok(__FieldTag::Unknown(value.to_string())),
28833 }
28834 }
28835 }
28836 deserializer.deserialize_identifier(Visitor)
28837 }
28838 }
28839 struct Visitor;
28840 impl<'de> serde::de::Visitor<'de> for Visitor {
28841 type Value = ActionSqlDefinition;
28842 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
28843 formatter.write_str("struct ActionSqlDefinition")
28844 }
28845 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
28846 where
28847 A: serde::de::MapAccess<'de>,
28848 {
28849 #[allow(unused_imports)]
28850 use serde::de::Error;
28851 use std::option::Option::Some;
28852 let mut fields = std::collections::HashSet::new();
28853 let mut result = Self::Value::new();
28854 while let Some(tag) = map.next_key::<__FieldTag>()? {
28855 #[allow(clippy::match_single_binding)]
28856 match tag {
28857 __FieldTag::__query => {
28858 if !fields.insert(__FieldTag::__query) {
28859 return std::result::Result::Err(
28860 A::Error::duplicate_field("multiple values for query"),
28861 );
28862 }
28863 result.query = map
28864 .next_value::<std::option::Option<std::string::String>>()?
28865 .unwrap_or_default();
28866 }
28867 __FieldTag::__error_table => {
28868 if !fields.insert(__FieldTag::__error_table) {
28869 return std::result::Result::Err(
28870 A::Error::duplicate_field(
28871 "multiple values for error_table",
28872 ),
28873 );
28874 }
28875 result.error_table = map.next_value::<std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>>()?
28876 ;
28877 }
28878 __FieldTag::__load_config => {
28879 if !fields.insert(__FieldTag::__load_config) {
28880 return std::result::Result::Err(
28881 A::Error::duplicate_field(
28882 "multiple values for load_config",
28883 ),
28884 );
28885 }
28886 result.load_config = map.next_value::<std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>>()?
28887 ;
28888 }
28889 __FieldTag::Unknown(key) => {
28890 let value = map.next_value::<serde_json::Value>()?;
28891 result._unknown_fields.insert(key, value);
28892 }
28893 }
28894 }
28895 std::result::Result::Ok(result)
28896 }
28897 }
28898 deserializer.deserialize_any(Visitor)
28899 }
28900 }
28901
28902 #[doc(hidden)]
28903 impl serde::ser::Serialize for ActionSqlDefinition {
28904 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
28905 where
28906 S: serde::ser::Serializer,
28907 {
28908 use serde::ser::SerializeMap;
28909 #[allow(unused_imports)]
28910 use std::option::Option::Some;
28911 let mut state = serializer.serialize_map(std::option::Option::None)?;
28912 if !self.query.is_empty() {
28913 state.serialize_entry("query", &self.query)?;
28914 }
28915 if self.error_table.is_some() {
28916 state.serialize_entry("errorTable", &self.error_table)?;
28917 }
28918 if self.load_config.is_some() {
28919 state.serialize_entry("loadConfig", &self.load_config)?;
28920 }
28921 if !self._unknown_fields.is_empty() {
28922 for (key, value) in self._unknown_fields.iter() {
28923 state.serialize_entry(key, &value)?;
28924 }
28925 }
28926 state.end()
28927 }
28928 }
28929
28930 impl std::fmt::Debug for ActionSqlDefinition {
28931 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28932 let mut debug_struct = f.debug_struct("ActionSqlDefinition");
28933 debug_struct.field("query", &self.query);
28934 debug_struct.field("error_table", &self.error_table);
28935 debug_struct.field("load_config", &self.load_config);
28936 if !self._unknown_fields.is_empty() {
28937 debug_struct.field("_unknown_fields", &self._unknown_fields);
28938 }
28939 debug_struct.finish()
28940 }
28941 }
28942
28943 #[derive(Clone, Default, PartialEq)]
28946 #[non_exhaustive]
28947 pub struct ActionErrorTable {
28948 pub target: std::option::Option<crate::model::Target>,
28950
28951 pub retention_days: i32,
28954
28955 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
28956 }
28957
28958 impl ActionErrorTable {
28959 pub fn new() -> Self {
28960 std::default::Default::default()
28961 }
28962
28963 pub fn set_target<T>(mut self, v: T) -> Self
28965 where
28966 T: std::convert::Into<crate::model::Target>,
28967 {
28968 self.target = std::option::Option::Some(v.into());
28969 self
28970 }
28971
28972 pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
28974 where
28975 T: std::convert::Into<crate::model::Target>,
28976 {
28977 self.target = v.map(|x| x.into());
28978 self
28979 }
28980
28981 pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
28983 self.retention_days = v.into();
28984 self
28985 }
28986 }
28987
28988 impl wkt::message::Message for ActionErrorTable {
28989 fn typename() -> &'static str {
28990 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
28991 }
28992 }
28993
28994 #[doc(hidden)]
28995 impl<'de> serde::de::Deserialize<'de> for ActionErrorTable {
28996 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
28997 where
28998 D: serde::Deserializer<'de>,
28999 {
29000 #[allow(non_camel_case_types)]
29001 #[doc(hidden)]
29002 #[derive(PartialEq, Eq, Hash)]
29003 enum __FieldTag {
29004 __target,
29005 __retention_days,
29006 Unknown(std::string::String),
29007 }
29008 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
29009 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29010 where
29011 D: serde::Deserializer<'de>,
29012 {
29013 struct Visitor;
29014 impl<'de> serde::de::Visitor<'de> for Visitor {
29015 type Value = __FieldTag;
29016 fn expecting(
29017 &self,
29018 formatter: &mut std::fmt::Formatter,
29019 ) -> std::fmt::Result {
29020 formatter.write_str("a field name for ActionErrorTable")
29021 }
29022 fn visit_str<E>(
29023 self,
29024 value: &str,
29025 ) -> std::result::Result<Self::Value, E>
29026 where
29027 E: serde::de::Error,
29028 {
29029 use std::result::Result::Ok;
29030 use std::string::ToString;
29031 match value {
29032 "target" => Ok(__FieldTag::__target),
29033 "retentionDays" => Ok(__FieldTag::__retention_days),
29034 "retention_days" => Ok(__FieldTag::__retention_days),
29035 _ => Ok(__FieldTag::Unknown(value.to_string())),
29036 }
29037 }
29038 }
29039 deserializer.deserialize_identifier(Visitor)
29040 }
29041 }
29042 struct Visitor;
29043 impl<'de> serde::de::Visitor<'de> for Visitor {
29044 type Value = ActionErrorTable;
29045 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29046 formatter.write_str("struct ActionErrorTable")
29047 }
29048 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
29049 where
29050 A: serde::de::MapAccess<'de>,
29051 {
29052 #[allow(unused_imports)]
29053 use serde::de::Error;
29054 use std::option::Option::Some;
29055 let mut fields = std::collections::HashSet::new();
29056 let mut result = Self::Value::new();
29057 while let Some(tag) = map.next_key::<__FieldTag>()? {
29058 #[allow(clippy::match_single_binding)]
29059 match tag {
29060 __FieldTag::__target => {
29061 if !fields.insert(__FieldTag::__target) {
29062 return std::result::Result::Err(
29063 A::Error::duplicate_field("multiple values for target"),
29064 );
29065 }
29066 result.target = map
29067 .next_value::<std::option::Option<crate::model::Target>>(
29068 )?;
29069 }
29070 __FieldTag::__retention_days => {
29071 if !fields.insert(__FieldTag::__retention_days) {
29072 return std::result::Result::Err(
29073 A::Error::duplicate_field(
29074 "multiple values for retention_days",
29075 ),
29076 );
29077 }
29078 struct __With(std::option::Option<i32>);
29079 impl<'de> serde::de::Deserialize<'de> for __With {
29080 fn deserialize<D>(
29081 deserializer: D,
29082 ) -> std::result::Result<Self, D::Error>
29083 where
29084 D: serde::de::Deserializer<'de>,
29085 {
29086 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
29087 }
29088 }
29089 result.retention_days =
29090 map.next_value::<__With>()?.0.unwrap_or_default();
29091 }
29092 __FieldTag::Unknown(key) => {
29093 let value = map.next_value::<serde_json::Value>()?;
29094 result._unknown_fields.insert(key, value);
29095 }
29096 }
29097 }
29098 std::result::Result::Ok(result)
29099 }
29100 }
29101 deserializer.deserialize_any(Visitor)
29102 }
29103 }
29104
29105 #[doc(hidden)]
29106 impl serde::ser::Serialize for ActionErrorTable {
29107 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29108 where
29109 S: serde::ser::Serializer,
29110 {
29111 use serde::ser::SerializeMap;
29112 #[allow(unused_imports)]
29113 use std::option::Option::Some;
29114 let mut state = serializer.serialize_map(std::option::Option::None)?;
29115 if self.target.is_some() {
29116 state.serialize_entry("target", &self.target)?;
29117 }
29118 if !wkt::internal::is_default(&self.retention_days) {
29119 struct __With<'a>(&'a i32);
29120 impl<'a> serde::ser::Serialize for __With<'a> {
29121 fn serialize<S>(
29122 &self,
29123 serializer: S,
29124 ) -> std::result::Result<S::Ok, S::Error>
29125 where
29126 S: serde::ser::Serializer,
29127 {
29128 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
29129 }
29130 }
29131 state.serialize_entry("retentionDays", &__With(&self.retention_days))?;
29132 }
29133 if !self._unknown_fields.is_empty() {
29134 for (key, value) in self._unknown_fields.iter() {
29135 state.serialize_entry(key, &value)?;
29136 }
29137 }
29138 state.end()
29139 }
29140 }
29141
29142 impl std::fmt::Debug for ActionErrorTable {
29143 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29144 let mut debug_struct = f.debug_struct("ActionErrorTable");
29145 debug_struct.field("target", &self.target);
29146 debug_struct.field("retention_days", &self.retention_days);
29147 if !self._unknown_fields.is_empty() {
29148 debug_struct.field("_unknown_fields", &self._unknown_fields);
29149 }
29150 debug_struct.finish()
29151 }
29152 }
29153
29154 #[derive(Clone, Default, PartialEq)]
29156 #[non_exhaustive]
29157 pub struct ActionLoadConfig {
29158
29159 pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
29161
29162 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29163 }
29164
29165 impl ActionLoadConfig {
29166 pub fn new() -> Self {
29167 std::default::Default::default()
29168 }
29169
29170 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
29175 {
29176 self.mode = v.into();
29177 self
29178 }
29179
29180 pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
29184 #[allow(unreachable_patterns)]
29185 self.mode.as_ref().and_then(|v| match v {
29186 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
29187 _ => std::option::Option::None,
29188 })
29189 }
29190
29191 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{
29197 self.mode = std::option::Option::Some(
29198 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
29199 v.into()
29200 )
29201 );
29202 self
29203 }
29204
29205 pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
29209 #[allow(unreachable_patterns)]
29210 self.mode.as_ref().and_then(|v| match v {
29211 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
29212 _ => std::option::Option::None,
29213 })
29214 }
29215
29216 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{
29222 self.mode = std::option::Option::Some(
29223 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
29224 v.into()
29225 )
29226 );
29227 self
29228 }
29229
29230 pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
29234 #[allow(unreachable_patterns)]
29235 self.mode.as_ref().and_then(|v| match v {
29236 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
29237 _ => std::option::Option::None,
29238 })
29239 }
29240
29241 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{
29247 self.mode = std::option::Option::Some(
29248 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
29249 v.into()
29250 )
29251 );
29252 self
29253 }
29254
29255 pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
29259 #[allow(unreachable_patterns)]
29260 self.mode.as_ref().and_then(|v| match v {
29261 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
29262 _ => std::option::Option::None,
29263 })
29264 }
29265
29266 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{
29272 self.mode = std::option::Option::Some(
29273 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
29274 v.into()
29275 )
29276 );
29277 self
29278 }
29279 }
29280
29281 impl wkt::message::Message for ActionLoadConfig {
29282 fn typename() -> &'static str {
29283 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
29284 }
29285 }
29286
29287 #[doc(hidden)]
29288 impl<'de> serde::de::Deserialize<'de> for ActionLoadConfig {
29289 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29290 where
29291 D: serde::Deserializer<'de>,
29292 {
29293 #[allow(non_camel_case_types)]
29294 #[doc(hidden)]
29295 #[derive(PartialEq, Eq, Hash)]
29296 enum __FieldTag {
29297 __replace,
29298 __append,
29299 __maximum,
29300 __unique,
29301 Unknown(std::string::String),
29302 }
29303 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
29304 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29305 where
29306 D: serde::Deserializer<'de>,
29307 {
29308 struct Visitor;
29309 impl<'de> serde::de::Visitor<'de> for Visitor {
29310 type Value = __FieldTag;
29311 fn expecting(
29312 &self,
29313 formatter: &mut std::fmt::Formatter,
29314 ) -> std::fmt::Result {
29315 formatter.write_str("a field name for ActionLoadConfig")
29316 }
29317 fn visit_str<E>(
29318 self,
29319 value: &str,
29320 ) -> std::result::Result<Self::Value, E>
29321 where
29322 E: serde::de::Error,
29323 {
29324 use std::result::Result::Ok;
29325 use std::string::ToString;
29326 match value {
29327 "replace" => Ok(__FieldTag::__replace),
29328 "append" => Ok(__FieldTag::__append),
29329 "maximum" => Ok(__FieldTag::__maximum),
29330 "unique" => Ok(__FieldTag::__unique),
29331 _ => Ok(__FieldTag::Unknown(value.to_string())),
29332 }
29333 }
29334 }
29335 deserializer.deserialize_identifier(Visitor)
29336 }
29337 }
29338 struct Visitor;
29339 impl<'de> serde::de::Visitor<'de> for Visitor {
29340 type Value = ActionLoadConfig;
29341 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29342 formatter.write_str("struct ActionLoadConfig")
29343 }
29344 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
29345 where
29346 A: serde::de::MapAccess<'de>,
29347 {
29348 #[allow(unused_imports)]
29349 use serde::de::Error;
29350 use std::option::Option::Some;
29351 let mut fields = std::collections::HashSet::new();
29352 let mut result = Self::Value::new();
29353 while let Some(tag) = map.next_key::<__FieldTag>()? {
29354 #[allow(clippy::match_single_binding)]
29355 match tag {
29356 __FieldTag::__replace => {
29357 if !fields.insert(__FieldTag::__replace) {
29358 return std::result::Result::Err(
29359 A::Error::duplicate_field(
29360 "multiple values for replace",
29361 ),
29362 );
29363 }
29364 if result.mode.is_some() {
29365 return std::result::Result::Err(
29366 A::Error::duplicate_field(
29367 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.replace, latest field was replace",
29368 ),
29369 );
29370 }
29371 result.mode = std::option::Option::Some(
29372 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
29373 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>>()?.unwrap_or_default()
29374 ),
29375 );
29376 }
29377 __FieldTag::__append => {
29378 if !fields.insert(__FieldTag::__append) {
29379 return std::result::Result::Err(
29380 A::Error::duplicate_field("multiple values for append"),
29381 );
29382 }
29383 if result.mode.is_some() {
29384 return std::result::Result::Err(
29385 A::Error::duplicate_field(
29386 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.append, latest field was append",
29387 ),
29388 );
29389 }
29390 result.mode = std::option::Option::Some(
29391 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
29392 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>>()?.unwrap_or_default()
29393 ),
29394 );
29395 }
29396 __FieldTag::__maximum => {
29397 if !fields.insert(__FieldTag::__maximum) {
29398 return std::result::Result::Err(
29399 A::Error::duplicate_field(
29400 "multiple values for maximum",
29401 ),
29402 );
29403 }
29404 if result.mode.is_some() {
29405 return std::result::Result::Err(
29406 A::Error::duplicate_field(
29407 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.maximum, latest field was maximum",
29408 ),
29409 );
29410 }
29411 result.mode = std::option::Option::Some(
29412 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
29413 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>>()?.unwrap_or_default()
29414 ),
29415 );
29416 }
29417 __FieldTag::__unique => {
29418 if !fields.insert(__FieldTag::__unique) {
29419 return std::result::Result::Err(
29420 A::Error::duplicate_field("multiple values for unique"),
29421 );
29422 }
29423 if result.mode.is_some() {
29424 return std::result::Result::Err(
29425 A::Error::duplicate_field(
29426 "multiple values for `mode`, a oneof with full ID .google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig.unique, latest field was unique",
29427 ),
29428 );
29429 }
29430 result.mode = std::option::Option::Some(
29431 crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
29432 map.next_value::<std::option::Option<std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>>()?.unwrap_or_default()
29433 ),
29434 );
29435 }
29436 __FieldTag::Unknown(key) => {
29437 let value = map.next_value::<serde_json::Value>()?;
29438 result._unknown_fields.insert(key, value);
29439 }
29440 }
29441 }
29442 std::result::Result::Ok(result)
29443 }
29444 }
29445 deserializer.deserialize_any(Visitor)
29446 }
29447 }
29448
29449 #[doc(hidden)]
29450 impl serde::ser::Serialize for ActionLoadConfig {
29451 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29452 where
29453 S: serde::ser::Serializer,
29454 {
29455 use serde::ser::SerializeMap;
29456 #[allow(unused_imports)]
29457 use std::option::Option::Some;
29458 let mut state = serializer.serialize_map(std::option::Option::None)?;
29459 if let Some(value) = self.replace() {
29460 state.serialize_entry("replace", value)?;
29461 }
29462 if let Some(value) = self.append() {
29463 state.serialize_entry("append", value)?;
29464 }
29465 if let Some(value) = self.maximum() {
29466 state.serialize_entry("maximum", value)?;
29467 }
29468 if let Some(value) = self.unique() {
29469 state.serialize_entry("unique", value)?;
29470 }
29471 if !self._unknown_fields.is_empty() {
29472 for (key, value) in self._unknown_fields.iter() {
29473 state.serialize_entry(key, &value)?;
29474 }
29475 }
29476 state.end()
29477 }
29478 }
29479
29480 impl std::fmt::Debug for ActionLoadConfig {
29481 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29482 let mut debug_struct = f.debug_struct("ActionLoadConfig");
29483 debug_struct.field("mode", &self.mode);
29484 if !self._unknown_fields.is_empty() {
29485 debug_struct.field("_unknown_fields", &self._unknown_fields);
29486 }
29487 debug_struct.finish()
29488 }
29489 }
29490
29491 pub mod action_load_config {
29493 #[allow(unused_imports)]
29494 use super::*;
29495
29496 #[derive(Clone, Debug, PartialEq)]
29498 #[non_exhaustive]
29499 pub enum Mode {
29500 Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
29502 Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
29504 Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
29507 Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
29510 }
29511 }
29512
29513 #[derive(Clone, Default, PartialEq)]
29515 #[non_exhaustive]
29516 pub struct ActionSimpleLoadMode {
29517 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29518 }
29519
29520 impl ActionSimpleLoadMode {
29521 pub fn new() -> Self {
29522 std::default::Default::default()
29523 }
29524 }
29525
29526 impl wkt::message::Message for ActionSimpleLoadMode {
29527 fn typename() -> &'static str {
29528 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
29529 }
29530 }
29531
29532 #[doc(hidden)]
29533 impl<'de> serde::de::Deserialize<'de> for ActionSimpleLoadMode {
29534 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29535 where
29536 D: serde::Deserializer<'de>,
29537 {
29538 #[allow(non_camel_case_types)]
29539 #[doc(hidden)]
29540 #[derive(PartialEq, Eq, Hash)]
29541 enum __FieldTag {
29542 Unknown(std::string::String),
29543 }
29544 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
29545 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29546 where
29547 D: serde::Deserializer<'de>,
29548 {
29549 struct Visitor;
29550 impl<'de> serde::de::Visitor<'de> for Visitor {
29551 type Value = __FieldTag;
29552 fn expecting(
29553 &self,
29554 formatter: &mut std::fmt::Formatter,
29555 ) -> std::fmt::Result {
29556 formatter.write_str("a field name for ActionSimpleLoadMode")
29557 }
29558 fn visit_str<E>(
29559 self,
29560 value: &str,
29561 ) -> std::result::Result<Self::Value, E>
29562 where
29563 E: serde::de::Error,
29564 {
29565 use std::result::Result::Ok;
29566 use std::string::ToString;
29567 Ok(__FieldTag::Unknown(value.to_string()))
29568 }
29569 }
29570 deserializer.deserialize_identifier(Visitor)
29571 }
29572 }
29573 struct Visitor;
29574 impl<'de> serde::de::Visitor<'de> for Visitor {
29575 type Value = ActionSimpleLoadMode;
29576 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29577 formatter.write_str("struct ActionSimpleLoadMode")
29578 }
29579 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
29580 where
29581 A: serde::de::MapAccess<'de>,
29582 {
29583 #[allow(unused_imports)]
29584 use serde::de::Error;
29585 use std::option::Option::Some;
29586 let mut result = Self::Value::new();
29587 while let Some(tag) = map.next_key::<__FieldTag>()? {
29588 #[allow(clippy::match_single_binding)]
29589 match tag {
29590 __FieldTag::Unknown(key) => {
29591 let value = map.next_value::<serde_json::Value>()?;
29592 result._unknown_fields.insert(key, value);
29593 }
29594 }
29595 }
29596 std::result::Result::Ok(result)
29597 }
29598 }
29599 deserializer.deserialize_any(Visitor)
29600 }
29601 }
29602
29603 #[doc(hidden)]
29604 impl serde::ser::Serialize for ActionSimpleLoadMode {
29605 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29606 where
29607 S: serde::ser::Serializer,
29608 {
29609 use serde::ser::SerializeMap;
29610 #[allow(unused_imports)]
29611 use std::option::Option::Some;
29612 let mut state = serializer.serialize_map(std::option::Option::None)?;
29613 if !self._unknown_fields.is_empty() {
29614 for (key, value) in self._unknown_fields.iter() {
29615 state.serialize_entry(key, &value)?;
29616 }
29617 }
29618 state.end()
29619 }
29620 }
29621
29622 impl std::fmt::Debug for ActionSimpleLoadMode {
29623 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29624 let mut debug_struct = f.debug_struct("ActionSimpleLoadMode");
29625 if !self._unknown_fields.is_empty() {
29626 debug_struct.field("_unknown_fields", &self._unknown_fields);
29627 }
29628 debug_struct.finish()
29629 }
29630 }
29631
29632 #[derive(Clone, Default, PartialEq)]
29634 #[non_exhaustive]
29635 pub struct ActionIncrementalLoadMode {
29636 pub column: std::string::String,
29638
29639 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29640 }
29641
29642 impl ActionIncrementalLoadMode {
29643 pub fn new() -> Self {
29644 std::default::Default::default()
29645 }
29646
29647 pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
29649 self.column = v.into();
29650 self
29651 }
29652 }
29653
29654 impl wkt::message::Message for ActionIncrementalLoadMode {
29655 fn typename() -> &'static str {
29656 "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
29657 }
29658 }
29659
29660 #[doc(hidden)]
29661 impl<'de> serde::de::Deserialize<'de> for ActionIncrementalLoadMode {
29662 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29663 where
29664 D: serde::Deserializer<'de>,
29665 {
29666 #[allow(non_camel_case_types)]
29667 #[doc(hidden)]
29668 #[derive(PartialEq, Eq, Hash)]
29669 enum __FieldTag {
29670 __column,
29671 Unknown(std::string::String),
29672 }
29673 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
29674 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29675 where
29676 D: serde::Deserializer<'de>,
29677 {
29678 struct Visitor;
29679 impl<'de> serde::de::Visitor<'de> for Visitor {
29680 type Value = __FieldTag;
29681 fn expecting(
29682 &self,
29683 formatter: &mut std::fmt::Formatter,
29684 ) -> std::fmt::Result {
29685 formatter.write_str("a field name for ActionIncrementalLoadMode")
29686 }
29687 fn visit_str<E>(
29688 self,
29689 value: &str,
29690 ) -> std::result::Result<Self::Value, E>
29691 where
29692 E: serde::de::Error,
29693 {
29694 use std::result::Result::Ok;
29695 use std::string::ToString;
29696 match value {
29697 "column" => Ok(__FieldTag::__column),
29698 _ => Ok(__FieldTag::Unknown(value.to_string())),
29699 }
29700 }
29701 }
29702 deserializer.deserialize_identifier(Visitor)
29703 }
29704 }
29705 struct Visitor;
29706 impl<'de> serde::de::Visitor<'de> for Visitor {
29707 type Value = ActionIncrementalLoadMode;
29708 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
29709 formatter.write_str("struct ActionIncrementalLoadMode")
29710 }
29711 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
29712 where
29713 A: serde::de::MapAccess<'de>,
29714 {
29715 #[allow(unused_imports)]
29716 use serde::de::Error;
29717 use std::option::Option::Some;
29718 let mut fields = std::collections::HashSet::new();
29719 let mut result = Self::Value::new();
29720 while let Some(tag) = map.next_key::<__FieldTag>()? {
29721 #[allow(clippy::match_single_binding)]
29722 match tag {
29723 __FieldTag::__column => {
29724 if !fields.insert(__FieldTag::__column) {
29725 return std::result::Result::Err(
29726 A::Error::duplicate_field("multiple values for column"),
29727 );
29728 }
29729 result.column = map
29730 .next_value::<std::option::Option<std::string::String>>()?
29731 .unwrap_or_default();
29732 }
29733 __FieldTag::Unknown(key) => {
29734 let value = map.next_value::<serde_json::Value>()?;
29735 result._unknown_fields.insert(key, value);
29736 }
29737 }
29738 }
29739 std::result::Result::Ok(result)
29740 }
29741 }
29742 deserializer.deserialize_any(Visitor)
29743 }
29744 }
29745
29746 #[doc(hidden)]
29747 impl serde::ser::Serialize for ActionIncrementalLoadMode {
29748 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29749 where
29750 S: serde::ser::Serializer,
29751 {
29752 use serde::ser::SerializeMap;
29753 #[allow(unused_imports)]
29754 use std::option::Option::Some;
29755 let mut state = serializer.serialize_map(std::option::Option::None)?;
29756 if !self.column.is_empty() {
29757 state.serialize_entry("column", &self.column)?;
29758 }
29759 if !self._unknown_fields.is_empty() {
29760 for (key, value) in self._unknown_fields.iter() {
29761 state.serialize_entry(key, &value)?;
29762 }
29763 }
29764 state.end()
29765 }
29766 }
29767
29768 impl std::fmt::Debug for ActionIncrementalLoadMode {
29769 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29770 let mut debug_struct = f.debug_struct("ActionIncrementalLoadMode");
29771 debug_struct.field("column", &self.column);
29772 if !self._unknown_fields.is_empty() {
29773 debug_struct.field("_unknown_fields", &self._unknown_fields);
29774 }
29775 debug_struct.finish()
29776 }
29777 }
29778
29779 #[derive(Clone, Debug, PartialEq)]
29781 #[non_exhaustive]
29782 pub enum Definition {
29783 ContentsYaml(std::string::String),
29786 ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
29789 }
29790 }
29791
29792 #[derive(Clone, Debug, PartialEq)]
29808 #[non_exhaustive]
29809 pub enum State {
29810 Pending,
29812 Running,
29814 Skipped,
29817 Disabled,
29820 Succeeded,
29822 Cancelled,
29824 Failed,
29826 UnknownValue(state::UnknownValue),
29831 }
29832
29833 #[doc(hidden)]
29834 pub mod state {
29835 #[allow(unused_imports)]
29836 use super::*;
29837 #[derive(Clone, Debug, PartialEq)]
29838 pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
29839 }
29840
29841 impl State {
29842 pub fn value(&self) -> std::option::Option<i32> {
29847 match self {
29848 Self::Pending => std::option::Option::Some(0),
29849 Self::Running => std::option::Option::Some(1),
29850 Self::Skipped => std::option::Option::Some(2),
29851 Self::Disabled => std::option::Option::Some(3),
29852 Self::Succeeded => std::option::Option::Some(4),
29853 Self::Cancelled => std::option::Option::Some(5),
29854 Self::Failed => std::option::Option::Some(6),
29855 Self::UnknownValue(u) => u.0.value(),
29856 }
29857 }
29858
29859 pub fn name(&self) -> std::option::Option<&str> {
29864 match self {
29865 Self::Pending => std::option::Option::Some("PENDING"),
29866 Self::Running => std::option::Option::Some("RUNNING"),
29867 Self::Skipped => std::option::Option::Some("SKIPPED"),
29868 Self::Disabled => std::option::Option::Some("DISABLED"),
29869 Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
29870 Self::Cancelled => std::option::Option::Some("CANCELLED"),
29871 Self::Failed => std::option::Option::Some("FAILED"),
29872 Self::UnknownValue(u) => u.0.name(),
29873 }
29874 }
29875 }
29876
29877 impl std::default::Default for State {
29878 fn default() -> Self {
29879 use std::convert::From;
29880 Self::from(0)
29881 }
29882 }
29883
29884 impl std::fmt::Display for State {
29885 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
29886 wkt::internal::display_enum(f, self.name(), self.value())
29887 }
29888 }
29889
29890 impl std::convert::From<i32> for State {
29891 fn from(value: i32) -> Self {
29892 match value {
29893 0 => Self::Pending,
29894 1 => Self::Running,
29895 2 => Self::Skipped,
29896 3 => Self::Disabled,
29897 4 => Self::Succeeded,
29898 5 => Self::Cancelled,
29899 6 => Self::Failed,
29900 _ => Self::UnknownValue(state::UnknownValue(
29901 wkt::internal::UnknownEnumValue::Integer(value),
29902 )),
29903 }
29904 }
29905 }
29906
29907 impl std::convert::From<&str> for State {
29908 fn from(value: &str) -> Self {
29909 use std::string::ToString;
29910 match value {
29911 "PENDING" => Self::Pending,
29912 "RUNNING" => Self::Running,
29913 "SKIPPED" => Self::Skipped,
29914 "DISABLED" => Self::Disabled,
29915 "SUCCEEDED" => Self::Succeeded,
29916 "CANCELLED" => Self::Cancelled,
29917 "FAILED" => Self::Failed,
29918 _ => Self::UnknownValue(state::UnknownValue(
29919 wkt::internal::UnknownEnumValue::String(value.to_string()),
29920 )),
29921 }
29922 }
29923 }
29924
29925 impl serde::ser::Serialize for State {
29926 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
29927 where
29928 S: serde::Serializer,
29929 {
29930 match self {
29931 Self::Pending => serializer.serialize_i32(0),
29932 Self::Running => serializer.serialize_i32(1),
29933 Self::Skipped => serializer.serialize_i32(2),
29934 Self::Disabled => serializer.serialize_i32(3),
29935 Self::Succeeded => serializer.serialize_i32(4),
29936 Self::Cancelled => serializer.serialize_i32(5),
29937 Self::Failed => serializer.serialize_i32(6),
29938 Self::UnknownValue(u) => u.0.serialize(serializer),
29939 }
29940 }
29941 }
29942
29943 impl<'de> serde::de::Deserialize<'de> for State {
29944 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
29945 where
29946 D: serde::Deserializer<'de>,
29947 {
29948 deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
29949 ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
29950 ))
29951 }
29952 }
29953
29954 #[derive(Clone, Debug, PartialEq)]
29956 #[non_exhaustive]
29957 pub enum Action {
29958 BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
29960 NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
29962 DataPreparationAction(
29964 std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
29965 ),
29966 }
29967}
29968
29969#[derive(Clone, Default, PartialEq)]
29971#[non_exhaustive]
29972pub struct QueryWorkflowInvocationActionsRequest {
29973 pub name: std::string::String,
29975
29976 pub page_size: i32,
29980
29981 pub page_token: std::string::String,
29989
29990 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
29991}
29992
29993impl QueryWorkflowInvocationActionsRequest {
29994 pub fn new() -> Self {
29995 std::default::Default::default()
29996 }
29997
29998 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30000 self.name = v.into();
30001 self
30002 }
30003
30004 pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
30006 self.page_size = v.into();
30007 self
30008 }
30009
30010 pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30012 self.page_token = v.into();
30013 self
30014 }
30015}
30016
30017impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
30018 fn typename() -> &'static str {
30019 "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
30020 }
30021}
30022
30023#[doc(hidden)]
30024impl<'de> serde::de::Deserialize<'de> for QueryWorkflowInvocationActionsRequest {
30025 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30026 where
30027 D: serde::Deserializer<'de>,
30028 {
30029 #[allow(non_camel_case_types)]
30030 #[doc(hidden)]
30031 #[derive(PartialEq, Eq, Hash)]
30032 enum __FieldTag {
30033 __name,
30034 __page_size,
30035 __page_token,
30036 Unknown(std::string::String),
30037 }
30038 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
30039 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30040 where
30041 D: serde::Deserializer<'de>,
30042 {
30043 struct Visitor;
30044 impl<'de> serde::de::Visitor<'de> for Visitor {
30045 type Value = __FieldTag;
30046 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30047 formatter
30048 .write_str("a field name for QueryWorkflowInvocationActionsRequest")
30049 }
30050 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
30051 where
30052 E: serde::de::Error,
30053 {
30054 use std::result::Result::Ok;
30055 use std::string::ToString;
30056 match value {
30057 "name" => Ok(__FieldTag::__name),
30058 "pageSize" => Ok(__FieldTag::__page_size),
30059 "page_size" => Ok(__FieldTag::__page_size),
30060 "pageToken" => Ok(__FieldTag::__page_token),
30061 "page_token" => Ok(__FieldTag::__page_token),
30062 _ => Ok(__FieldTag::Unknown(value.to_string())),
30063 }
30064 }
30065 }
30066 deserializer.deserialize_identifier(Visitor)
30067 }
30068 }
30069 struct Visitor;
30070 impl<'de> serde::de::Visitor<'de> for Visitor {
30071 type Value = QueryWorkflowInvocationActionsRequest;
30072 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30073 formatter.write_str("struct QueryWorkflowInvocationActionsRequest")
30074 }
30075 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
30076 where
30077 A: serde::de::MapAccess<'de>,
30078 {
30079 #[allow(unused_imports)]
30080 use serde::de::Error;
30081 use std::option::Option::Some;
30082 let mut fields = std::collections::HashSet::new();
30083 let mut result = Self::Value::new();
30084 while let Some(tag) = map.next_key::<__FieldTag>()? {
30085 #[allow(clippy::match_single_binding)]
30086 match tag {
30087 __FieldTag::__name => {
30088 if !fields.insert(__FieldTag::__name) {
30089 return std::result::Result::Err(A::Error::duplicate_field(
30090 "multiple values for name",
30091 ));
30092 }
30093 result.name = map
30094 .next_value::<std::option::Option<std::string::String>>()?
30095 .unwrap_or_default();
30096 }
30097 __FieldTag::__page_size => {
30098 if !fields.insert(__FieldTag::__page_size) {
30099 return std::result::Result::Err(A::Error::duplicate_field(
30100 "multiple values for page_size",
30101 ));
30102 }
30103 struct __With(std::option::Option<i32>);
30104 impl<'de> serde::de::Deserialize<'de> for __With {
30105 fn deserialize<D>(
30106 deserializer: D,
30107 ) -> std::result::Result<Self, D::Error>
30108 where
30109 D: serde::de::Deserializer<'de>,
30110 {
30111 serde_with::As::< std::option::Option<wkt::internal::I32> >::deserialize(deserializer).map(__With)
30112 }
30113 }
30114 result.page_size = map.next_value::<__With>()?.0.unwrap_or_default();
30115 }
30116 __FieldTag::__page_token => {
30117 if !fields.insert(__FieldTag::__page_token) {
30118 return std::result::Result::Err(A::Error::duplicate_field(
30119 "multiple values for page_token",
30120 ));
30121 }
30122 result.page_token = map
30123 .next_value::<std::option::Option<std::string::String>>()?
30124 .unwrap_or_default();
30125 }
30126 __FieldTag::Unknown(key) => {
30127 let value = map.next_value::<serde_json::Value>()?;
30128 result._unknown_fields.insert(key, value);
30129 }
30130 }
30131 }
30132 std::result::Result::Ok(result)
30133 }
30134 }
30135 deserializer.deserialize_any(Visitor)
30136 }
30137}
30138
30139#[doc(hidden)]
30140impl serde::ser::Serialize for QueryWorkflowInvocationActionsRequest {
30141 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30142 where
30143 S: serde::ser::Serializer,
30144 {
30145 use serde::ser::SerializeMap;
30146 #[allow(unused_imports)]
30147 use std::option::Option::Some;
30148 let mut state = serializer.serialize_map(std::option::Option::None)?;
30149 if !self.name.is_empty() {
30150 state.serialize_entry("name", &self.name)?;
30151 }
30152 if !wkt::internal::is_default(&self.page_size) {
30153 struct __With<'a>(&'a i32);
30154 impl<'a> serde::ser::Serialize for __With<'a> {
30155 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30156 where
30157 S: serde::ser::Serializer,
30158 {
30159 serde_with::As::<wkt::internal::I32>::serialize(self.0, serializer)
30160 }
30161 }
30162 state.serialize_entry("pageSize", &__With(&self.page_size))?;
30163 }
30164 if !self.page_token.is_empty() {
30165 state.serialize_entry("pageToken", &self.page_token)?;
30166 }
30167 if !self._unknown_fields.is_empty() {
30168 for (key, value) in self._unknown_fields.iter() {
30169 state.serialize_entry(key, &value)?;
30170 }
30171 }
30172 state.end()
30173 }
30174}
30175
30176impl std::fmt::Debug for QueryWorkflowInvocationActionsRequest {
30177 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30178 let mut debug_struct = f.debug_struct("QueryWorkflowInvocationActionsRequest");
30179 debug_struct.field("name", &self.name);
30180 debug_struct.field("page_size", &self.page_size);
30181 debug_struct.field("page_token", &self.page_token);
30182 if !self._unknown_fields.is_empty() {
30183 debug_struct.field("_unknown_fields", &self._unknown_fields);
30184 }
30185 debug_struct.finish()
30186 }
30187}
30188
30189#[derive(Clone, Default, PartialEq)]
30191#[non_exhaustive]
30192pub struct QueryWorkflowInvocationActionsResponse {
30193 pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
30195
30196 pub next_page_token: std::string::String,
30199
30200 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30201}
30202
30203impl QueryWorkflowInvocationActionsResponse {
30204 pub fn new() -> Self {
30205 std::default::Default::default()
30206 }
30207
30208 pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
30210 where
30211 T: std::iter::IntoIterator<Item = V>,
30212 V: std::convert::Into<crate::model::WorkflowInvocationAction>,
30213 {
30214 use std::iter::Iterator;
30215 self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
30216 self
30217 }
30218
30219 pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30221 self.next_page_token = v.into();
30222 self
30223 }
30224}
30225
30226impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
30227 fn typename() -> &'static str {
30228 "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
30229 }
30230}
30231
30232#[doc(hidden)]
30233impl gax::paginator::internal::PageableResponse for QueryWorkflowInvocationActionsResponse {
30234 type PageItem = crate::model::WorkflowInvocationAction;
30235
30236 fn items(self) -> std::vec::Vec<Self::PageItem> {
30237 self.workflow_invocation_actions
30238 }
30239
30240 fn next_page_token(&self) -> std::string::String {
30241 use std::clone::Clone;
30242 self.next_page_token.clone()
30243 }
30244}
30245
30246#[doc(hidden)]
30247impl<'de> serde::de::Deserialize<'de> for QueryWorkflowInvocationActionsResponse {
30248 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30249 where
30250 D: serde::Deserializer<'de>,
30251 {
30252 #[allow(non_camel_case_types)]
30253 #[doc(hidden)]
30254 #[derive(PartialEq, Eq, Hash)]
30255 enum __FieldTag {
30256 __workflow_invocation_actions,
30257 __next_page_token,
30258 Unknown(std::string::String),
30259 }
30260 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
30261 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30262 where
30263 D: serde::Deserializer<'de>,
30264 {
30265 struct Visitor;
30266 impl<'de> serde::de::Visitor<'de> for Visitor {
30267 type Value = __FieldTag;
30268 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30269 formatter
30270 .write_str("a field name for QueryWorkflowInvocationActionsResponse")
30271 }
30272 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
30273 where
30274 E: serde::de::Error,
30275 {
30276 use std::result::Result::Ok;
30277 use std::string::ToString;
30278 match value {
30279 "workflowInvocationActions" => {
30280 Ok(__FieldTag::__workflow_invocation_actions)
30281 }
30282 "workflow_invocation_actions" => {
30283 Ok(__FieldTag::__workflow_invocation_actions)
30284 }
30285 "nextPageToken" => Ok(__FieldTag::__next_page_token),
30286 "next_page_token" => Ok(__FieldTag::__next_page_token),
30287 _ => Ok(__FieldTag::Unknown(value.to_string())),
30288 }
30289 }
30290 }
30291 deserializer.deserialize_identifier(Visitor)
30292 }
30293 }
30294 struct Visitor;
30295 impl<'de> serde::de::Visitor<'de> for Visitor {
30296 type Value = QueryWorkflowInvocationActionsResponse;
30297 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30298 formatter.write_str("struct QueryWorkflowInvocationActionsResponse")
30299 }
30300 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
30301 where
30302 A: serde::de::MapAccess<'de>,
30303 {
30304 #[allow(unused_imports)]
30305 use serde::de::Error;
30306 use std::option::Option::Some;
30307 let mut fields = std::collections::HashSet::new();
30308 let mut result = Self::Value::new();
30309 while let Some(tag) = map.next_key::<__FieldTag>()? {
30310 #[allow(clippy::match_single_binding)]
30311 match tag {
30312 __FieldTag::__workflow_invocation_actions => {
30313 if !fields.insert(__FieldTag::__workflow_invocation_actions) {
30314 return std::result::Result::Err(A::Error::duplicate_field(
30315 "multiple values for workflow_invocation_actions",
30316 ));
30317 }
30318 result.workflow_invocation_actions = map
30319 .next_value::<std::option::Option<
30320 std::vec::Vec<crate::model::WorkflowInvocationAction>,
30321 >>()?
30322 .unwrap_or_default();
30323 }
30324 __FieldTag::__next_page_token => {
30325 if !fields.insert(__FieldTag::__next_page_token) {
30326 return std::result::Result::Err(A::Error::duplicate_field(
30327 "multiple values for next_page_token",
30328 ));
30329 }
30330 result.next_page_token = map
30331 .next_value::<std::option::Option<std::string::String>>()?
30332 .unwrap_or_default();
30333 }
30334 __FieldTag::Unknown(key) => {
30335 let value = map.next_value::<serde_json::Value>()?;
30336 result._unknown_fields.insert(key, value);
30337 }
30338 }
30339 }
30340 std::result::Result::Ok(result)
30341 }
30342 }
30343 deserializer.deserialize_any(Visitor)
30344 }
30345}
30346
30347#[doc(hidden)]
30348impl serde::ser::Serialize for QueryWorkflowInvocationActionsResponse {
30349 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30350 where
30351 S: serde::ser::Serializer,
30352 {
30353 use serde::ser::SerializeMap;
30354 #[allow(unused_imports)]
30355 use std::option::Option::Some;
30356 let mut state = serializer.serialize_map(std::option::Option::None)?;
30357 if !self.workflow_invocation_actions.is_empty() {
30358 state.serialize_entry(
30359 "workflowInvocationActions",
30360 &self.workflow_invocation_actions,
30361 )?;
30362 }
30363 if !self.next_page_token.is_empty() {
30364 state.serialize_entry("nextPageToken", &self.next_page_token)?;
30365 }
30366 if !self._unknown_fields.is_empty() {
30367 for (key, value) in self._unknown_fields.iter() {
30368 state.serialize_entry(key, &value)?;
30369 }
30370 }
30371 state.end()
30372 }
30373}
30374
30375impl std::fmt::Debug for QueryWorkflowInvocationActionsResponse {
30376 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30377 let mut debug_struct = f.debug_struct("QueryWorkflowInvocationActionsResponse");
30378 debug_struct.field(
30379 "workflow_invocation_actions",
30380 &self.workflow_invocation_actions,
30381 );
30382 debug_struct.field("next_page_token", &self.next_page_token);
30383 if !self._unknown_fields.is_empty() {
30384 debug_struct.field("_unknown_fields", &self._unknown_fields);
30385 }
30386 debug_struct.finish()
30387 }
30388}
30389
30390#[derive(Clone, Default, PartialEq)]
30392#[non_exhaustive]
30393pub struct Config {
30394 pub name: std::string::String,
30396
30397 pub default_kms_key_name: std::string::String,
30400
30401 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30402}
30403
30404impl Config {
30405 pub fn new() -> Self {
30406 std::default::Default::default()
30407 }
30408
30409 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30411 self.name = v.into();
30412 self
30413 }
30414
30415 pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
30417 mut self,
30418 v: T,
30419 ) -> Self {
30420 self.default_kms_key_name = v.into();
30421 self
30422 }
30423}
30424
30425impl wkt::message::Message for Config {
30426 fn typename() -> &'static str {
30427 "type.googleapis.com/google.cloud.dataform.v1.Config"
30428 }
30429}
30430
30431#[doc(hidden)]
30432impl<'de> serde::de::Deserialize<'de> for Config {
30433 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30434 where
30435 D: serde::Deserializer<'de>,
30436 {
30437 #[allow(non_camel_case_types)]
30438 #[doc(hidden)]
30439 #[derive(PartialEq, Eq, Hash)]
30440 enum __FieldTag {
30441 __name,
30442 __default_kms_key_name,
30443 Unknown(std::string::String),
30444 }
30445 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
30446 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30447 where
30448 D: serde::Deserializer<'de>,
30449 {
30450 struct Visitor;
30451 impl<'de> serde::de::Visitor<'de> for Visitor {
30452 type Value = __FieldTag;
30453 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30454 formatter.write_str("a field name for Config")
30455 }
30456 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
30457 where
30458 E: serde::de::Error,
30459 {
30460 use std::result::Result::Ok;
30461 use std::string::ToString;
30462 match value {
30463 "name" => Ok(__FieldTag::__name),
30464 "defaultKmsKeyName" => Ok(__FieldTag::__default_kms_key_name),
30465 "default_kms_key_name" => Ok(__FieldTag::__default_kms_key_name),
30466 _ => Ok(__FieldTag::Unknown(value.to_string())),
30467 }
30468 }
30469 }
30470 deserializer.deserialize_identifier(Visitor)
30471 }
30472 }
30473 struct Visitor;
30474 impl<'de> serde::de::Visitor<'de> for Visitor {
30475 type Value = Config;
30476 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30477 formatter.write_str("struct Config")
30478 }
30479 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
30480 where
30481 A: serde::de::MapAccess<'de>,
30482 {
30483 #[allow(unused_imports)]
30484 use serde::de::Error;
30485 use std::option::Option::Some;
30486 let mut fields = std::collections::HashSet::new();
30487 let mut result = Self::Value::new();
30488 while let Some(tag) = map.next_key::<__FieldTag>()? {
30489 #[allow(clippy::match_single_binding)]
30490 match tag {
30491 __FieldTag::__name => {
30492 if !fields.insert(__FieldTag::__name) {
30493 return std::result::Result::Err(A::Error::duplicate_field(
30494 "multiple values for name",
30495 ));
30496 }
30497 result.name = map
30498 .next_value::<std::option::Option<std::string::String>>()?
30499 .unwrap_or_default();
30500 }
30501 __FieldTag::__default_kms_key_name => {
30502 if !fields.insert(__FieldTag::__default_kms_key_name) {
30503 return std::result::Result::Err(A::Error::duplicate_field(
30504 "multiple values for default_kms_key_name",
30505 ));
30506 }
30507 result.default_kms_key_name = map
30508 .next_value::<std::option::Option<std::string::String>>()?
30509 .unwrap_or_default();
30510 }
30511 __FieldTag::Unknown(key) => {
30512 let value = map.next_value::<serde_json::Value>()?;
30513 result._unknown_fields.insert(key, value);
30514 }
30515 }
30516 }
30517 std::result::Result::Ok(result)
30518 }
30519 }
30520 deserializer.deserialize_any(Visitor)
30521 }
30522}
30523
30524#[doc(hidden)]
30525impl serde::ser::Serialize for Config {
30526 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30527 where
30528 S: serde::ser::Serializer,
30529 {
30530 use serde::ser::SerializeMap;
30531 #[allow(unused_imports)]
30532 use std::option::Option::Some;
30533 let mut state = serializer.serialize_map(std::option::Option::None)?;
30534 if !self.name.is_empty() {
30535 state.serialize_entry("name", &self.name)?;
30536 }
30537 if !self.default_kms_key_name.is_empty() {
30538 state.serialize_entry("defaultKmsKeyName", &self.default_kms_key_name)?;
30539 }
30540 if !self._unknown_fields.is_empty() {
30541 for (key, value) in self._unknown_fields.iter() {
30542 state.serialize_entry(key, &value)?;
30543 }
30544 }
30545 state.end()
30546 }
30547}
30548
30549impl std::fmt::Debug for Config {
30550 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30551 let mut debug_struct = f.debug_struct("Config");
30552 debug_struct.field("name", &self.name);
30553 debug_struct.field("default_kms_key_name", &self.default_kms_key_name);
30554 if !self._unknown_fields.is_empty() {
30555 debug_struct.field("_unknown_fields", &self._unknown_fields);
30556 }
30557 debug_struct.finish()
30558 }
30559}
30560
30561#[derive(Clone, Default, PartialEq)]
30563#[non_exhaustive]
30564pub struct GetConfigRequest {
30565 pub name: std::string::String,
30567
30568 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30569}
30570
30571impl GetConfigRequest {
30572 pub fn new() -> Self {
30573 std::default::Default::default()
30574 }
30575
30576 pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
30578 self.name = v.into();
30579 self
30580 }
30581}
30582
30583impl wkt::message::Message for GetConfigRequest {
30584 fn typename() -> &'static str {
30585 "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
30586 }
30587}
30588
30589#[doc(hidden)]
30590impl<'de> serde::de::Deserialize<'de> for GetConfigRequest {
30591 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30592 where
30593 D: serde::Deserializer<'de>,
30594 {
30595 #[allow(non_camel_case_types)]
30596 #[doc(hidden)]
30597 #[derive(PartialEq, Eq, Hash)]
30598 enum __FieldTag {
30599 __name,
30600 Unknown(std::string::String),
30601 }
30602 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
30603 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30604 where
30605 D: serde::Deserializer<'de>,
30606 {
30607 struct Visitor;
30608 impl<'de> serde::de::Visitor<'de> for Visitor {
30609 type Value = __FieldTag;
30610 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30611 formatter.write_str("a field name for GetConfigRequest")
30612 }
30613 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
30614 where
30615 E: serde::de::Error,
30616 {
30617 use std::result::Result::Ok;
30618 use std::string::ToString;
30619 match value {
30620 "name" => Ok(__FieldTag::__name),
30621 _ => Ok(__FieldTag::Unknown(value.to_string())),
30622 }
30623 }
30624 }
30625 deserializer.deserialize_identifier(Visitor)
30626 }
30627 }
30628 struct Visitor;
30629 impl<'de> serde::de::Visitor<'de> for Visitor {
30630 type Value = GetConfigRequest;
30631 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30632 formatter.write_str("struct GetConfigRequest")
30633 }
30634 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
30635 where
30636 A: serde::de::MapAccess<'de>,
30637 {
30638 #[allow(unused_imports)]
30639 use serde::de::Error;
30640 use std::option::Option::Some;
30641 let mut fields = std::collections::HashSet::new();
30642 let mut result = Self::Value::new();
30643 while let Some(tag) = map.next_key::<__FieldTag>()? {
30644 #[allow(clippy::match_single_binding)]
30645 match tag {
30646 __FieldTag::__name => {
30647 if !fields.insert(__FieldTag::__name) {
30648 return std::result::Result::Err(A::Error::duplicate_field(
30649 "multiple values for name",
30650 ));
30651 }
30652 result.name = map
30653 .next_value::<std::option::Option<std::string::String>>()?
30654 .unwrap_or_default();
30655 }
30656 __FieldTag::Unknown(key) => {
30657 let value = map.next_value::<serde_json::Value>()?;
30658 result._unknown_fields.insert(key, value);
30659 }
30660 }
30661 }
30662 std::result::Result::Ok(result)
30663 }
30664 }
30665 deserializer.deserialize_any(Visitor)
30666 }
30667}
30668
30669#[doc(hidden)]
30670impl serde::ser::Serialize for GetConfigRequest {
30671 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30672 where
30673 S: serde::ser::Serializer,
30674 {
30675 use serde::ser::SerializeMap;
30676 #[allow(unused_imports)]
30677 use std::option::Option::Some;
30678 let mut state = serializer.serialize_map(std::option::Option::None)?;
30679 if !self.name.is_empty() {
30680 state.serialize_entry("name", &self.name)?;
30681 }
30682 if !self._unknown_fields.is_empty() {
30683 for (key, value) in self._unknown_fields.iter() {
30684 state.serialize_entry(key, &value)?;
30685 }
30686 }
30687 state.end()
30688 }
30689}
30690
30691impl std::fmt::Debug for GetConfigRequest {
30692 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30693 let mut debug_struct = f.debug_struct("GetConfigRequest");
30694 debug_struct.field("name", &self.name);
30695 if !self._unknown_fields.is_empty() {
30696 debug_struct.field("_unknown_fields", &self._unknown_fields);
30697 }
30698 debug_struct.finish()
30699 }
30700}
30701
30702#[derive(Clone, Default, PartialEq)]
30704#[non_exhaustive]
30705pub struct UpdateConfigRequest {
30706 pub config: std::option::Option<crate::model::Config>,
30708
30709 pub update_mask: std::option::Option<wkt::FieldMask>,
30711
30712 _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
30713}
30714
30715impl UpdateConfigRequest {
30716 pub fn new() -> Self {
30717 std::default::Default::default()
30718 }
30719
30720 pub fn set_config<T>(mut self, v: T) -> Self
30722 where
30723 T: std::convert::Into<crate::model::Config>,
30724 {
30725 self.config = std::option::Option::Some(v.into());
30726 self
30727 }
30728
30729 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
30731 where
30732 T: std::convert::Into<crate::model::Config>,
30733 {
30734 self.config = v.map(|x| x.into());
30735 self
30736 }
30737
30738 pub fn set_update_mask<T>(mut self, v: T) -> Self
30740 where
30741 T: std::convert::Into<wkt::FieldMask>,
30742 {
30743 self.update_mask = std::option::Option::Some(v.into());
30744 self
30745 }
30746
30747 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
30749 where
30750 T: std::convert::Into<wkt::FieldMask>,
30751 {
30752 self.update_mask = v.map(|x| x.into());
30753 self
30754 }
30755}
30756
30757impl wkt::message::Message for UpdateConfigRequest {
30758 fn typename() -> &'static str {
30759 "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
30760 }
30761}
30762
30763#[doc(hidden)]
30764impl<'de> serde::de::Deserialize<'de> for UpdateConfigRequest {
30765 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30766 where
30767 D: serde::Deserializer<'de>,
30768 {
30769 #[allow(non_camel_case_types)]
30770 #[doc(hidden)]
30771 #[derive(PartialEq, Eq, Hash)]
30772 enum __FieldTag {
30773 __config,
30774 __update_mask,
30775 Unknown(std::string::String),
30776 }
30777 impl<'de> serde::de::Deserialize<'de> for __FieldTag {
30778 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
30779 where
30780 D: serde::Deserializer<'de>,
30781 {
30782 struct Visitor;
30783 impl<'de> serde::de::Visitor<'de> for Visitor {
30784 type Value = __FieldTag;
30785 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30786 formatter.write_str("a field name for UpdateConfigRequest")
30787 }
30788 fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
30789 where
30790 E: serde::de::Error,
30791 {
30792 use std::result::Result::Ok;
30793 use std::string::ToString;
30794 match value {
30795 "config" => Ok(__FieldTag::__config),
30796 "updateMask" => Ok(__FieldTag::__update_mask),
30797 "update_mask" => Ok(__FieldTag::__update_mask),
30798 _ => Ok(__FieldTag::Unknown(value.to_string())),
30799 }
30800 }
30801 }
30802 deserializer.deserialize_identifier(Visitor)
30803 }
30804 }
30805 struct Visitor;
30806 impl<'de> serde::de::Visitor<'de> for Visitor {
30807 type Value = UpdateConfigRequest;
30808 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
30809 formatter.write_str("struct UpdateConfigRequest")
30810 }
30811 fn visit_map<A>(self, mut map: A) -> std::result::Result<Self::Value, A::Error>
30812 where
30813 A: serde::de::MapAccess<'de>,
30814 {
30815 #[allow(unused_imports)]
30816 use serde::de::Error;
30817 use std::option::Option::Some;
30818 let mut fields = std::collections::HashSet::new();
30819 let mut result = Self::Value::new();
30820 while let Some(tag) = map.next_key::<__FieldTag>()? {
30821 #[allow(clippy::match_single_binding)]
30822 match tag {
30823 __FieldTag::__config => {
30824 if !fields.insert(__FieldTag::__config) {
30825 return std::result::Result::Err(A::Error::duplicate_field(
30826 "multiple values for config",
30827 ));
30828 }
30829 result.config =
30830 map.next_value::<std::option::Option<crate::model::Config>>()?;
30831 }
30832 __FieldTag::__update_mask => {
30833 if !fields.insert(__FieldTag::__update_mask) {
30834 return std::result::Result::Err(A::Error::duplicate_field(
30835 "multiple values for update_mask",
30836 ));
30837 }
30838 result.update_mask =
30839 map.next_value::<std::option::Option<wkt::FieldMask>>()?;
30840 }
30841 __FieldTag::Unknown(key) => {
30842 let value = map.next_value::<serde_json::Value>()?;
30843 result._unknown_fields.insert(key, value);
30844 }
30845 }
30846 }
30847 std::result::Result::Ok(result)
30848 }
30849 }
30850 deserializer.deserialize_any(Visitor)
30851 }
30852}
30853
30854#[doc(hidden)]
30855impl serde::ser::Serialize for UpdateConfigRequest {
30856 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
30857 where
30858 S: serde::ser::Serializer,
30859 {
30860 use serde::ser::SerializeMap;
30861 #[allow(unused_imports)]
30862 use std::option::Option::Some;
30863 let mut state = serializer.serialize_map(std::option::Option::None)?;
30864 if self.config.is_some() {
30865 state.serialize_entry("config", &self.config)?;
30866 }
30867 if self.update_mask.is_some() {
30868 state.serialize_entry("updateMask", &self.update_mask)?;
30869 }
30870 if !self._unknown_fields.is_empty() {
30871 for (key, value) in self._unknown_fields.iter() {
30872 state.serialize_entry(key, &value)?;
30873 }
30874 }
30875 state.end()
30876 }
30877}
30878
30879impl std::fmt::Debug for UpdateConfigRequest {
30880 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30881 let mut debug_struct = f.debug_struct("UpdateConfigRequest");
30882 debug_struct.field("config", &self.config);
30883 debug_struct.field("update_mask", &self.update_mask);
30884 if !self._unknown_fields.is_empty() {
30885 debug_struct.field("_unknown_fields", &self._unknown_fields);
30886 }
30887 debug_struct.finish()
30888 }
30889}