google_cloud_dataform_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate gtype;
25extern crate iam_v1;
26extern crate lazy_static;
27extern crate location;
28extern crate reqwest;
29extern crate rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// Describes encryption state of a resource.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct DataEncryptionState {
45    /// Required. The KMS key version name with which data of a resource is
46    /// encrypted.
47    pub kms_key_version_name: std::string::String,
48
49    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50}
51
52impl DataEncryptionState {
53    pub fn new() -> Self {
54        std::default::Default::default()
55    }
56
57    /// Sets the value of [kms_key_version_name][crate::model::DataEncryptionState::kms_key_version_name].
58    ///
59    /// # Example
60    /// ```ignore,no_run
61    /// # use google_cloud_dataform_v1::model::DataEncryptionState;
62    /// let x = DataEncryptionState::new().set_kms_key_version_name("example");
63    /// ```
64    pub fn set_kms_key_version_name<T: std::convert::Into<std::string::String>>(
65        mut self,
66        v: T,
67    ) -> Self {
68        self.kms_key_version_name = v.into();
69        self
70    }
71}
72
73impl wkt::message::Message for DataEncryptionState {
74    fn typename() -> &'static str {
75        "type.googleapis.com/google.cloud.dataform.v1.DataEncryptionState"
76    }
77}
78
79/// Represents a Dataform Git repository.
80#[derive(Clone, Default, PartialEq)]
81#[non_exhaustive]
82pub struct Repository {
83    /// Identifier. The repository's name.
84    pub name: std::string::String,
85
86    /// Output only. The timestamp of when the repository was created.
87    pub create_time: std::option::Option<wkt::Timestamp>,
88
89    /// Optional. The repository's user-friendly name.
90    pub display_name: std::string::String,
91
92    /// Optional. If set, configures this repository to be linked to a Git remote.
93    pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
94
95    /// Optional. The name of the Secret Manager secret version to be used to
96    /// interpolate variables into the .npmrc file for package installation
97    /// operations. Must be in the format `projects/*/secrets/*/versions/*`. The
98    /// file itself must be in a JSON format.
99    pub npmrc_environment_variables_secret_version: std::string::String,
100
101    /// Optional. If set, fields of `workspace_compilation_overrides` override the
102    /// default compilation settings that are specified in dataform.json when
103    /// creating workspace-scoped compilation results. See documentation for
104    /// `WorkspaceCompilationOverrides` for more information.
105    pub workspace_compilation_overrides:
106        std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
107
108    /// Optional. Repository user labels.
109    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
110
111    /// Optional. Input only. If set to true, the authenticated user will be
112    /// granted the roles/dataform.admin role on the created repository.
113    pub set_authenticated_user_admin: bool,
114
115    /// Optional. The service account to run workflow invocations under.
116    pub service_account: std::string::String,
117
118    /// Optional. The reference to a KMS encryption key. If provided, it will be
119    /// used to encrypt user data in the repository and all child resources. It is
120    /// not possible to add or update the encryption key after the repository is
121    /// created. Example:
122    /// `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}`
123    pub kms_key_name: std::string::String,
124
125    /// Output only. A data encryption state of a Git repository if this Repository
126    /// is protected by a KMS key.
127    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
128
129    /// Output only. All the metadata information that is used internally to serve
130    /// the resource. For example: timestamps, flags, status fields, etc. The
131    /// format of this field is a JSON string.
132    pub internal_metadata: std::option::Option<std::string::String>,
133
134    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
135}
136
137impl Repository {
138    pub fn new() -> Self {
139        std::default::Default::default()
140    }
141
142    /// Sets the value of [name][crate::model::Repository::name].
143    ///
144    /// # Example
145    /// ```ignore,no_run
146    /// # use google_cloud_dataform_v1::model::Repository;
147    /// let x = Repository::new().set_name("example");
148    /// ```
149    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
150        self.name = v.into();
151        self
152    }
153
154    /// Sets the value of [create_time][crate::model::Repository::create_time].
155    ///
156    /// # Example
157    /// ```ignore,no_run
158    /// # use google_cloud_dataform_v1::model::Repository;
159    /// use wkt::Timestamp;
160    /// let x = Repository::new().set_create_time(Timestamp::default()/* use setters */);
161    /// ```
162    pub fn set_create_time<T>(mut self, v: T) -> Self
163    where
164        T: std::convert::Into<wkt::Timestamp>,
165    {
166        self.create_time = std::option::Option::Some(v.into());
167        self
168    }
169
170    /// Sets or clears the value of [create_time][crate::model::Repository::create_time].
171    ///
172    /// # Example
173    /// ```ignore,no_run
174    /// # use google_cloud_dataform_v1::model::Repository;
175    /// use wkt::Timestamp;
176    /// let x = Repository::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
177    /// let x = Repository::new().set_or_clear_create_time(None::<Timestamp>);
178    /// ```
179    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
180    where
181        T: std::convert::Into<wkt::Timestamp>,
182    {
183        self.create_time = v.map(|x| x.into());
184        self
185    }
186
187    /// Sets the value of [display_name][crate::model::Repository::display_name].
188    ///
189    /// # Example
190    /// ```ignore,no_run
191    /// # use google_cloud_dataform_v1::model::Repository;
192    /// let x = Repository::new().set_display_name("example");
193    /// ```
194    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
195        self.display_name = v.into();
196        self
197    }
198
199    /// Sets the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
200    ///
201    /// # Example
202    /// ```ignore,no_run
203    /// # use google_cloud_dataform_v1::model::Repository;
204    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
205    /// let x = Repository::new().set_git_remote_settings(GitRemoteSettings::default()/* use setters */);
206    /// ```
207    pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
208    where
209        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
210    {
211        self.git_remote_settings = std::option::Option::Some(v.into());
212        self
213    }
214
215    /// Sets or clears the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
216    ///
217    /// # Example
218    /// ```ignore,no_run
219    /// # use google_cloud_dataform_v1::model::Repository;
220    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
221    /// let x = Repository::new().set_or_clear_git_remote_settings(Some(GitRemoteSettings::default()/* use setters */));
222    /// let x = Repository::new().set_or_clear_git_remote_settings(None::<GitRemoteSettings>);
223    /// ```
224    pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
225    where
226        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
227    {
228        self.git_remote_settings = v.map(|x| x.into());
229        self
230    }
231
232    /// Sets the value of [npmrc_environment_variables_secret_version][crate::model::Repository::npmrc_environment_variables_secret_version].
233    ///
234    /// # Example
235    /// ```ignore,no_run
236    /// # use google_cloud_dataform_v1::model::Repository;
237    /// let x = Repository::new().set_npmrc_environment_variables_secret_version("example");
238    /// ```
239    pub fn set_npmrc_environment_variables_secret_version<
240        T: std::convert::Into<std::string::String>,
241    >(
242        mut self,
243        v: T,
244    ) -> Self {
245        self.npmrc_environment_variables_secret_version = v.into();
246        self
247    }
248
249    /// Sets the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
250    ///
251    /// # Example
252    /// ```ignore,no_run
253    /// # use google_cloud_dataform_v1::model::Repository;
254    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
255    /// let x = Repository::new().set_workspace_compilation_overrides(WorkspaceCompilationOverrides::default()/* use setters */);
256    /// ```
257    pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
258    where
259        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
260    {
261        self.workspace_compilation_overrides = std::option::Option::Some(v.into());
262        self
263    }
264
265    /// Sets or clears the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
266    ///
267    /// # Example
268    /// ```ignore,no_run
269    /// # use google_cloud_dataform_v1::model::Repository;
270    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
271    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(Some(WorkspaceCompilationOverrides::default()/* use setters */));
272    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(None::<WorkspaceCompilationOverrides>);
273    /// ```
274    pub fn set_or_clear_workspace_compilation_overrides<T>(
275        mut self,
276        v: std::option::Option<T>,
277    ) -> Self
278    where
279        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
280    {
281        self.workspace_compilation_overrides = v.map(|x| x.into());
282        self
283    }
284
285    /// Sets the value of [labels][crate::model::Repository::labels].
286    ///
287    /// # Example
288    /// ```ignore,no_run
289    /// # use google_cloud_dataform_v1::model::Repository;
290    /// let x = Repository::new().set_labels([
291    ///     ("key0", "abc"),
292    ///     ("key1", "xyz"),
293    /// ]);
294    /// ```
295    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
296    where
297        T: std::iter::IntoIterator<Item = (K, V)>,
298        K: std::convert::Into<std::string::String>,
299        V: std::convert::Into<std::string::String>,
300    {
301        use std::iter::Iterator;
302        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
303        self
304    }
305
306    /// Sets the value of [set_authenticated_user_admin][crate::model::Repository::set_authenticated_user_admin].
307    ///
308    /// # Example
309    /// ```ignore,no_run
310    /// # use google_cloud_dataform_v1::model::Repository;
311    /// let x = Repository::new().set_set_authenticated_user_admin(true);
312    /// ```
313    pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
314        self.set_authenticated_user_admin = v.into();
315        self
316    }
317
318    /// Sets the value of [service_account][crate::model::Repository::service_account].
319    ///
320    /// # Example
321    /// ```ignore,no_run
322    /// # use google_cloud_dataform_v1::model::Repository;
323    /// let x = Repository::new().set_service_account("example");
324    /// ```
325    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
326        self.service_account = v.into();
327        self
328    }
329
330    /// Sets the value of [kms_key_name][crate::model::Repository::kms_key_name].
331    ///
332    /// # Example
333    /// ```ignore,no_run
334    /// # use google_cloud_dataform_v1::model::Repository;
335    /// let x = Repository::new().set_kms_key_name("example");
336    /// ```
337    pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
338        self.kms_key_name = v.into();
339        self
340    }
341
342    /// Sets the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
343    ///
344    /// # Example
345    /// ```ignore,no_run
346    /// # use google_cloud_dataform_v1::model::Repository;
347    /// use google_cloud_dataform_v1::model::DataEncryptionState;
348    /// let x = Repository::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
349    /// ```
350    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
351    where
352        T: std::convert::Into<crate::model::DataEncryptionState>,
353    {
354        self.data_encryption_state = std::option::Option::Some(v.into());
355        self
356    }
357
358    /// Sets or clears the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
359    ///
360    /// # Example
361    /// ```ignore,no_run
362    /// # use google_cloud_dataform_v1::model::Repository;
363    /// use google_cloud_dataform_v1::model::DataEncryptionState;
364    /// let x = Repository::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
365    /// let x = Repository::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
366    /// ```
367    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
368    where
369        T: std::convert::Into<crate::model::DataEncryptionState>,
370    {
371        self.data_encryption_state = v.map(|x| x.into());
372        self
373    }
374
375    /// Sets the value of [internal_metadata][crate::model::Repository::internal_metadata].
376    ///
377    /// # Example
378    /// ```ignore,no_run
379    /// # use google_cloud_dataform_v1::model::Repository;
380    /// let x = Repository::new().set_internal_metadata("example");
381    /// ```
382    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
383    where
384        T: std::convert::Into<std::string::String>,
385    {
386        self.internal_metadata = std::option::Option::Some(v.into());
387        self
388    }
389
390    /// Sets or clears the value of [internal_metadata][crate::model::Repository::internal_metadata].
391    ///
392    /// # Example
393    /// ```ignore,no_run
394    /// # use google_cloud_dataform_v1::model::Repository;
395    /// let x = Repository::new().set_or_clear_internal_metadata(Some("example"));
396    /// let x = Repository::new().set_or_clear_internal_metadata(None::<String>);
397    /// ```
398    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
399    where
400        T: std::convert::Into<std::string::String>,
401    {
402        self.internal_metadata = v.map(|x| x.into());
403        self
404    }
405}
406
407impl wkt::message::Message for Repository {
408    fn typename() -> &'static str {
409        "type.googleapis.com/google.cloud.dataform.v1.Repository"
410    }
411}
412
413/// Defines additional types related to [Repository].
414pub mod repository {
415    #[allow(unused_imports)]
416    use super::*;
417
418    /// Controls Git remote configuration for a repository.
419    #[derive(Clone, Default, PartialEq)]
420    #[non_exhaustive]
421    pub struct GitRemoteSettings {
422        /// Required. The Git remote's URL.
423        pub url: std::string::String,
424
425        /// Required. The Git remote's default branch name.
426        pub default_branch: std::string::String,
427
428        /// Optional. The name of the Secret Manager secret version to use as an
429        /// authentication token for Git operations. Must be in the format
430        /// `projects/*/secrets/*/versions/*`.
431        pub authentication_token_secret_version: std::string::String,
432
433        /// Optional. Authentication fields for remote uris using SSH protocol.
434        pub ssh_authentication_config: std::option::Option<
435            crate::model::repository::git_remote_settings::SshAuthenticationConfig,
436        >,
437
438        /// Output only. Deprecated: The field does not contain any token status
439        /// information.
440        #[deprecated]
441        pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
442
443        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
444    }
445
446    impl GitRemoteSettings {
447        pub fn new() -> Self {
448            std::default::Default::default()
449        }
450
451        /// Sets the value of [url][crate::model::repository::GitRemoteSettings::url].
452        ///
453        /// # Example
454        /// ```ignore,no_run
455        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
456        /// let x = GitRemoteSettings::new().set_url("example");
457        /// ```
458        pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
459            self.url = v.into();
460            self
461        }
462
463        /// Sets the value of [default_branch][crate::model::repository::GitRemoteSettings::default_branch].
464        ///
465        /// # Example
466        /// ```ignore,no_run
467        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
468        /// let x = GitRemoteSettings::new().set_default_branch("example");
469        /// ```
470        pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
471            mut self,
472            v: T,
473        ) -> Self {
474            self.default_branch = v.into();
475            self
476        }
477
478        /// Sets the value of [authentication_token_secret_version][crate::model::repository::GitRemoteSettings::authentication_token_secret_version].
479        ///
480        /// # Example
481        /// ```ignore,no_run
482        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
483        /// let x = GitRemoteSettings::new().set_authentication_token_secret_version("example");
484        /// ```
485        pub fn set_authentication_token_secret_version<
486            T: std::convert::Into<std::string::String>,
487        >(
488            mut self,
489            v: T,
490        ) -> Self {
491            self.authentication_token_secret_version = v.into();
492            self
493        }
494
495        /// Sets the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
496        ///
497        /// # Example
498        /// ```ignore,no_run
499        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
500        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
501        /// let x = GitRemoteSettings::new().set_ssh_authentication_config(SshAuthenticationConfig::default()/* use setters */);
502        /// ```
503        pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
504        where
505            T: std::convert::Into<
506                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
507                >,
508        {
509            self.ssh_authentication_config = std::option::Option::Some(v.into());
510            self
511        }
512
513        /// Sets or clears the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
514        ///
515        /// # Example
516        /// ```ignore,no_run
517        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
518        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
519        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(Some(SshAuthenticationConfig::default()/* use setters */));
520        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(None::<SshAuthenticationConfig>);
521        /// ```
522        pub fn set_or_clear_ssh_authentication_config<T>(
523            mut self,
524            v: std::option::Option<T>,
525        ) -> Self
526        where
527            T: std::convert::Into<
528                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
529                >,
530        {
531            self.ssh_authentication_config = v.map(|x| x.into());
532            self
533        }
534
535        /// Sets the value of [token_status][crate::model::repository::GitRemoteSettings::token_status].
536        ///
537        /// # Example
538        /// ```ignore,no_run
539        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
540        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::TokenStatus;
541        /// let x0 = GitRemoteSettings::new().set_token_status(TokenStatus::NotFound);
542        /// let x1 = GitRemoteSettings::new().set_token_status(TokenStatus::Invalid);
543        /// let x2 = GitRemoteSettings::new().set_token_status(TokenStatus::Valid);
544        /// ```
545        #[deprecated]
546        pub fn set_token_status<
547            T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
548        >(
549            mut self,
550            v: T,
551        ) -> Self {
552            self.token_status = v.into();
553            self
554        }
555    }
556
557    impl wkt::message::Message for GitRemoteSettings {
558        fn typename() -> &'static str {
559            "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
560        }
561    }
562
563    /// Defines additional types related to [GitRemoteSettings].
564    pub mod git_remote_settings {
565        #[allow(unused_imports)]
566        use super::*;
567
568        /// Configures fields for performing SSH authentication.
569        #[derive(Clone, Default, PartialEq)]
570        #[non_exhaustive]
571        pub struct SshAuthenticationConfig {
572            /// Required. The name of the Secret Manager secret version to use as a
573            /// ssh private key for Git operations.
574            /// Must be in the format `projects/*/secrets/*/versions/*`.
575            pub user_private_key_secret_version: std::string::String,
576
577            /// Required. Content of a public SSH key to verify an identity of a remote
578            /// Git host.
579            pub host_public_key: std::string::String,
580
581            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
582        }
583
584        impl SshAuthenticationConfig {
585            pub fn new() -> Self {
586                std::default::Default::default()
587            }
588
589            /// Sets the value of [user_private_key_secret_version][crate::model::repository::git_remote_settings::SshAuthenticationConfig::user_private_key_secret_version].
590            ///
591            /// # Example
592            /// ```ignore,no_run
593            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
594            /// let x = SshAuthenticationConfig::new().set_user_private_key_secret_version("example");
595            /// ```
596            pub fn set_user_private_key_secret_version<
597                T: std::convert::Into<std::string::String>,
598            >(
599                mut self,
600                v: T,
601            ) -> Self {
602                self.user_private_key_secret_version = v.into();
603                self
604            }
605
606            /// Sets the value of [host_public_key][crate::model::repository::git_remote_settings::SshAuthenticationConfig::host_public_key].
607            ///
608            /// # Example
609            /// ```ignore,no_run
610            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
611            /// let x = SshAuthenticationConfig::new().set_host_public_key("example");
612            /// ```
613            pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
614                mut self,
615                v: T,
616            ) -> Self {
617                self.host_public_key = v.into();
618                self
619            }
620        }
621
622        impl wkt::message::Message for SshAuthenticationConfig {
623            fn typename() -> &'static str {
624                "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
625            }
626        }
627
628        /// The status of the authentication token.
629        ///
630        /// # Working with unknown values
631        ///
632        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
633        /// additional enum variants at any time. Adding new variants is not considered
634        /// a breaking change. Applications should write their code in anticipation of:
635        ///
636        /// - New values appearing in future releases of the client library, **and**
637        /// - New values received dynamically, without application changes.
638        ///
639        /// Please consult the [Working with enums] section in the user guide for some
640        /// guidelines.
641        ///
642        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
643        #[derive(Clone, Debug, PartialEq)]
644        #[non_exhaustive]
645        pub enum TokenStatus {
646            /// Default value. This value is unused.
647            Unspecified,
648            /// The token could not be found in Secret Manager (or the Dataform
649            /// Service Account did not have permission to access it).
650            NotFound,
651            /// The token could not be used to authenticate against the Git remote.
652            Invalid,
653            /// The token was used successfully to authenticate against the Git remote.
654            Valid,
655            /// If set, the enum was initialized with an unknown value.
656            ///
657            /// Applications can examine the value using [TokenStatus::value] or
658            /// [TokenStatus::name].
659            UnknownValue(token_status::UnknownValue),
660        }
661
662        #[doc(hidden)]
663        pub mod token_status {
664            #[allow(unused_imports)]
665            use super::*;
666            #[derive(Clone, Debug, PartialEq)]
667            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
668        }
669
670        impl TokenStatus {
671            /// Gets the enum value.
672            ///
673            /// Returns `None` if the enum contains an unknown value deserialized from
674            /// the string representation of enums.
675            pub fn value(&self) -> std::option::Option<i32> {
676                match self {
677                    Self::Unspecified => std::option::Option::Some(0),
678                    Self::NotFound => std::option::Option::Some(1),
679                    Self::Invalid => std::option::Option::Some(2),
680                    Self::Valid => std::option::Option::Some(3),
681                    Self::UnknownValue(u) => u.0.value(),
682                }
683            }
684
685            /// Gets the enum value as a string.
686            ///
687            /// Returns `None` if the enum contains an unknown value deserialized from
688            /// the integer representation of enums.
689            pub fn name(&self) -> std::option::Option<&str> {
690                match self {
691                    Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
692                    Self::NotFound => std::option::Option::Some("NOT_FOUND"),
693                    Self::Invalid => std::option::Option::Some("INVALID"),
694                    Self::Valid => std::option::Option::Some("VALID"),
695                    Self::UnknownValue(u) => u.0.name(),
696                }
697            }
698        }
699
700        impl std::default::Default for TokenStatus {
701            fn default() -> Self {
702                use std::convert::From;
703                Self::from(0)
704            }
705        }
706
707        impl std::fmt::Display for TokenStatus {
708            fn fmt(
709                &self,
710                f: &mut std::fmt::Formatter<'_>,
711            ) -> std::result::Result<(), std::fmt::Error> {
712                wkt::internal::display_enum(f, self.name(), self.value())
713            }
714        }
715
716        impl std::convert::From<i32> for TokenStatus {
717            fn from(value: i32) -> Self {
718                match value {
719                    0 => Self::Unspecified,
720                    1 => Self::NotFound,
721                    2 => Self::Invalid,
722                    3 => Self::Valid,
723                    _ => Self::UnknownValue(token_status::UnknownValue(
724                        wkt::internal::UnknownEnumValue::Integer(value),
725                    )),
726                }
727            }
728        }
729
730        impl std::convert::From<&str> for TokenStatus {
731            fn from(value: &str) -> Self {
732                use std::string::ToString;
733                match value {
734                    "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
735                    "NOT_FOUND" => Self::NotFound,
736                    "INVALID" => Self::Invalid,
737                    "VALID" => Self::Valid,
738                    _ => Self::UnknownValue(token_status::UnknownValue(
739                        wkt::internal::UnknownEnumValue::String(value.to_string()),
740                    )),
741                }
742            }
743        }
744
745        impl serde::ser::Serialize for TokenStatus {
746            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
747            where
748                S: serde::Serializer,
749            {
750                match self {
751                    Self::Unspecified => serializer.serialize_i32(0),
752                    Self::NotFound => serializer.serialize_i32(1),
753                    Self::Invalid => serializer.serialize_i32(2),
754                    Self::Valid => serializer.serialize_i32(3),
755                    Self::UnknownValue(u) => u.0.serialize(serializer),
756                }
757            }
758        }
759
760        impl<'de> serde::de::Deserialize<'de> for TokenStatus {
761            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
762            where
763                D: serde::Deserializer<'de>,
764            {
765                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
766                    ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
767                ))
768            }
769        }
770    }
771
772    /// Configures workspace compilation overrides for a repository.
773    #[derive(Clone, Default, PartialEq)]
774    #[non_exhaustive]
775    pub struct WorkspaceCompilationOverrides {
776        /// Optional. The default database (Google Cloud project ID).
777        pub default_database: std::string::String,
778
779        /// Optional. The suffix that should be appended to all schema (BigQuery
780        /// dataset ID) names.
781        pub schema_suffix: std::string::String,
782
783        /// Optional. The prefix that should be prepended to all table names.
784        pub table_prefix: std::string::String,
785
786        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
787    }
788
789    impl WorkspaceCompilationOverrides {
790        pub fn new() -> Self {
791            std::default::Default::default()
792        }
793
794        /// Sets the value of [default_database][crate::model::repository::WorkspaceCompilationOverrides::default_database].
795        ///
796        /// # Example
797        /// ```ignore,no_run
798        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
799        /// let x = WorkspaceCompilationOverrides::new().set_default_database("example");
800        /// ```
801        pub fn set_default_database<T: std::convert::Into<std::string::String>>(
802            mut self,
803            v: T,
804        ) -> Self {
805            self.default_database = v.into();
806            self
807        }
808
809        /// Sets the value of [schema_suffix][crate::model::repository::WorkspaceCompilationOverrides::schema_suffix].
810        ///
811        /// # Example
812        /// ```ignore,no_run
813        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
814        /// let x = WorkspaceCompilationOverrides::new().set_schema_suffix("example");
815        /// ```
816        pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
817            mut self,
818            v: T,
819        ) -> Self {
820            self.schema_suffix = v.into();
821            self
822        }
823
824        /// Sets the value of [table_prefix][crate::model::repository::WorkspaceCompilationOverrides::table_prefix].
825        ///
826        /// # Example
827        /// ```ignore,no_run
828        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
829        /// let x = WorkspaceCompilationOverrides::new().set_table_prefix("example");
830        /// ```
831        pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
832            mut self,
833            v: T,
834        ) -> Self {
835            self.table_prefix = v.into();
836            self
837        }
838    }
839
840    impl wkt::message::Message for WorkspaceCompilationOverrides {
841        fn typename() -> &'static str {
842            "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
843        }
844    }
845}
846
847/// `ListRepositories` request message.
848#[derive(Clone, Default, PartialEq)]
849#[non_exhaustive]
850pub struct ListRepositoriesRequest {
851    /// Required. The location in which to list repositories. Must be in the format
852    /// `projects/*/locations/*`.
853    pub parent: std::string::String,
854
855    /// Optional. Maximum number of repositories to return. The server may return
856    /// fewer items than requested. If unspecified, the server will pick an
857    /// appropriate default.
858    pub page_size: i32,
859
860    /// Optional. Page token received from a previous `ListRepositories` call.
861    /// Provide this to retrieve the subsequent page.
862    ///
863    /// When paginating, all other parameters provided to `ListRepositories`,
864    /// with the exception of `page_size`, must match the call that provided the
865    /// page token.
866    pub page_token: std::string::String,
867
868    /// Optional. This field only supports ordering by `name`. If unspecified, the
869    /// server will choose the ordering. If specified, the default order is
870    /// ascending for the `name` field.
871    pub order_by: std::string::String,
872
873    /// Optional. Filter for the returned list.
874    pub filter: std::string::String,
875
876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
877}
878
879impl ListRepositoriesRequest {
880    pub fn new() -> Self {
881        std::default::Default::default()
882    }
883
884    /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
885    ///
886    /// # Example
887    /// ```ignore,no_run
888    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
889    /// let x = ListRepositoriesRequest::new().set_parent("example");
890    /// ```
891    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
892        self.parent = v.into();
893        self
894    }
895
896    /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
897    ///
898    /// # Example
899    /// ```ignore,no_run
900    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
901    /// let x = ListRepositoriesRequest::new().set_page_size(42);
902    /// ```
903    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
904        self.page_size = v.into();
905        self
906    }
907
908    /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
909    ///
910    /// # Example
911    /// ```ignore,no_run
912    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
913    /// let x = ListRepositoriesRequest::new().set_page_token("example");
914    /// ```
915    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
916        self.page_token = v.into();
917        self
918    }
919
920    /// Sets the value of [order_by][crate::model::ListRepositoriesRequest::order_by].
921    ///
922    /// # Example
923    /// ```ignore,no_run
924    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
925    /// let x = ListRepositoriesRequest::new().set_order_by("example");
926    /// ```
927    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
928        self.order_by = v.into();
929        self
930    }
931
932    /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
933    ///
934    /// # Example
935    /// ```ignore,no_run
936    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
937    /// let x = ListRepositoriesRequest::new().set_filter("example");
938    /// ```
939    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
940        self.filter = v.into();
941        self
942    }
943}
944
945impl wkt::message::Message for ListRepositoriesRequest {
946    fn typename() -> &'static str {
947        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
948    }
949}
950
951/// `ListRepositories` response message.
952#[derive(Clone, Default, PartialEq)]
953#[non_exhaustive]
954pub struct ListRepositoriesResponse {
955    /// List of repositories.
956    pub repositories: std::vec::Vec<crate::model::Repository>,
957
958    /// A token which can be sent as `page_token` to retrieve the next page.
959    /// If this field is omitted, there are no subsequent pages.
960    pub next_page_token: std::string::String,
961
962    /// Locations which could not be reached.
963    pub unreachable: std::vec::Vec<std::string::String>,
964
965    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
966}
967
968impl ListRepositoriesResponse {
969    pub fn new() -> Self {
970        std::default::Default::default()
971    }
972
973    /// Sets the value of [repositories][crate::model::ListRepositoriesResponse::repositories].
974    ///
975    /// # Example
976    /// ```ignore,no_run
977    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
978    /// use google_cloud_dataform_v1::model::Repository;
979    /// let x = ListRepositoriesResponse::new()
980    ///     .set_repositories([
981    ///         Repository::default()/* use setters */,
982    ///         Repository::default()/* use (different) setters */,
983    ///     ]);
984    /// ```
985    pub fn set_repositories<T, V>(mut self, v: T) -> Self
986    where
987        T: std::iter::IntoIterator<Item = V>,
988        V: std::convert::Into<crate::model::Repository>,
989    {
990        use std::iter::Iterator;
991        self.repositories = v.into_iter().map(|i| i.into()).collect();
992        self
993    }
994
995    /// Sets the value of [next_page_token][crate::model::ListRepositoriesResponse::next_page_token].
996    ///
997    /// # Example
998    /// ```ignore,no_run
999    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1000    /// let x = ListRepositoriesResponse::new().set_next_page_token("example");
1001    /// ```
1002    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1003        self.next_page_token = v.into();
1004        self
1005    }
1006
1007    /// Sets the value of [unreachable][crate::model::ListRepositoriesResponse::unreachable].
1008    ///
1009    /// # Example
1010    /// ```ignore,no_run
1011    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1012    /// let x = ListRepositoriesResponse::new().set_unreachable(["a", "b", "c"]);
1013    /// ```
1014    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1015    where
1016        T: std::iter::IntoIterator<Item = V>,
1017        V: std::convert::Into<std::string::String>,
1018    {
1019        use std::iter::Iterator;
1020        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1021        self
1022    }
1023}
1024
1025impl wkt::message::Message for ListRepositoriesResponse {
1026    fn typename() -> &'static str {
1027        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
1028    }
1029}
1030
1031#[doc(hidden)]
1032impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
1033    type PageItem = crate::model::Repository;
1034
1035    fn items(self) -> std::vec::Vec<Self::PageItem> {
1036        self.repositories
1037    }
1038
1039    fn next_page_token(&self) -> std::string::String {
1040        use std::clone::Clone;
1041        self.next_page_token.clone()
1042    }
1043}
1044
1045/// `GetRepository` request message.
1046#[derive(Clone, Default, PartialEq)]
1047#[non_exhaustive]
1048pub struct GetRepositoryRequest {
1049    /// Required. The repository's name.
1050    pub name: std::string::String,
1051
1052    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1053}
1054
1055impl GetRepositoryRequest {
1056    pub fn new() -> Self {
1057        std::default::Default::default()
1058    }
1059
1060    /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
1061    ///
1062    /// # Example
1063    /// ```ignore,no_run
1064    /// # use google_cloud_dataform_v1::model::GetRepositoryRequest;
1065    /// let x = GetRepositoryRequest::new().set_name("example");
1066    /// ```
1067    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1068        self.name = v.into();
1069        self
1070    }
1071}
1072
1073impl wkt::message::Message for GetRepositoryRequest {
1074    fn typename() -> &'static str {
1075        "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
1076    }
1077}
1078
1079/// `CreateRepository` request message.
1080#[derive(Clone, Default, PartialEq)]
1081#[non_exhaustive]
1082pub struct CreateRepositoryRequest {
1083    /// Required. The location in which to create the repository. Must be in the
1084    /// format `projects/*/locations/*`.
1085    pub parent: std::string::String,
1086
1087    /// Required. The repository to create.
1088    pub repository: std::option::Option<crate::model::Repository>,
1089
1090    /// Required. The ID to use for the repository, which will become the final
1091    /// component of the repository's resource name.
1092    pub repository_id: std::string::String,
1093
1094    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1095}
1096
1097impl CreateRepositoryRequest {
1098    pub fn new() -> Self {
1099        std::default::Default::default()
1100    }
1101
1102    /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
1103    ///
1104    /// # Example
1105    /// ```ignore,no_run
1106    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1107    /// let x = CreateRepositoryRequest::new().set_parent("example");
1108    /// ```
1109    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1110        self.parent = v.into();
1111        self
1112    }
1113
1114    /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
1115    ///
1116    /// # Example
1117    /// ```ignore,no_run
1118    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1119    /// use google_cloud_dataform_v1::model::Repository;
1120    /// let x = CreateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1121    /// ```
1122    pub fn set_repository<T>(mut self, v: T) -> Self
1123    where
1124        T: std::convert::Into<crate::model::Repository>,
1125    {
1126        self.repository = std::option::Option::Some(v.into());
1127        self
1128    }
1129
1130    /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
1131    ///
1132    /// # Example
1133    /// ```ignore,no_run
1134    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1135    /// use google_cloud_dataform_v1::model::Repository;
1136    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1137    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1138    /// ```
1139    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1140    where
1141        T: std::convert::Into<crate::model::Repository>,
1142    {
1143        self.repository = v.map(|x| x.into());
1144        self
1145    }
1146
1147    /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
1148    ///
1149    /// # Example
1150    /// ```ignore,no_run
1151    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1152    /// let x = CreateRepositoryRequest::new().set_repository_id("example");
1153    /// ```
1154    pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1155        self.repository_id = v.into();
1156        self
1157    }
1158}
1159
1160impl wkt::message::Message for CreateRepositoryRequest {
1161    fn typename() -> &'static str {
1162        "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
1163    }
1164}
1165
1166/// `UpdateRepository` request message.
1167#[derive(Clone, Default, PartialEq)]
1168#[non_exhaustive]
1169pub struct UpdateRepositoryRequest {
1170    /// Optional. Specifies the fields to be updated in the repository. If left
1171    /// unset, all fields will be updated.
1172    pub update_mask: std::option::Option<wkt::FieldMask>,
1173
1174    /// Required. The repository to update.
1175    pub repository: std::option::Option<crate::model::Repository>,
1176
1177    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1178}
1179
1180impl UpdateRepositoryRequest {
1181    pub fn new() -> Self {
1182        std::default::Default::default()
1183    }
1184
1185    /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1186    ///
1187    /// # Example
1188    /// ```ignore,no_run
1189    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1190    /// use wkt::FieldMask;
1191    /// let x = UpdateRepositoryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1192    /// ```
1193    pub fn set_update_mask<T>(mut self, v: T) -> Self
1194    where
1195        T: std::convert::Into<wkt::FieldMask>,
1196    {
1197        self.update_mask = std::option::Option::Some(v.into());
1198        self
1199    }
1200
1201    /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1202    ///
1203    /// # Example
1204    /// ```ignore,no_run
1205    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1206    /// use wkt::FieldMask;
1207    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1208    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1209    /// ```
1210    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1211    where
1212        T: std::convert::Into<wkt::FieldMask>,
1213    {
1214        self.update_mask = v.map(|x| x.into());
1215        self
1216    }
1217
1218    /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1219    ///
1220    /// # Example
1221    /// ```ignore,no_run
1222    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1223    /// use google_cloud_dataform_v1::model::Repository;
1224    /// let x = UpdateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1225    /// ```
1226    pub fn set_repository<T>(mut self, v: T) -> Self
1227    where
1228        T: std::convert::Into<crate::model::Repository>,
1229    {
1230        self.repository = std::option::Option::Some(v.into());
1231        self
1232    }
1233
1234    /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1235    ///
1236    /// # Example
1237    /// ```ignore,no_run
1238    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1239    /// use google_cloud_dataform_v1::model::Repository;
1240    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1241    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1242    /// ```
1243    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1244    where
1245        T: std::convert::Into<crate::model::Repository>,
1246    {
1247        self.repository = v.map(|x| x.into());
1248        self
1249    }
1250}
1251
1252impl wkt::message::Message for UpdateRepositoryRequest {
1253    fn typename() -> &'static str {
1254        "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
1255    }
1256}
1257
1258/// `DeleteRepository` request message.
1259#[derive(Clone, Default, PartialEq)]
1260#[non_exhaustive]
1261pub struct DeleteRepositoryRequest {
1262    /// Required. The repository's name.
1263    pub name: std::string::String,
1264
1265    /// Optional. If set to true, any child resources of this repository will also
1266    /// be deleted. (Otherwise, the request will only succeed if the repository has
1267    /// no child resources.)
1268    pub force: bool,
1269
1270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1271}
1272
1273impl DeleteRepositoryRequest {
1274    pub fn new() -> Self {
1275        std::default::Default::default()
1276    }
1277
1278    /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
1279    ///
1280    /// # Example
1281    /// ```ignore,no_run
1282    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1283    /// let x = DeleteRepositoryRequest::new().set_name("example");
1284    /// ```
1285    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1286        self.name = v.into();
1287        self
1288    }
1289
1290    /// Sets the value of [force][crate::model::DeleteRepositoryRequest::force].
1291    ///
1292    /// # Example
1293    /// ```ignore,no_run
1294    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1295    /// let x = DeleteRepositoryRequest::new().set_force(true);
1296    /// ```
1297    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1298        self.force = v.into();
1299        self
1300    }
1301}
1302
1303impl wkt::message::Message for DeleteRepositoryRequest {
1304    fn typename() -> &'static str {
1305        "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
1306    }
1307}
1308
1309/// `CommitRepositoryChanges` request message.
1310#[derive(Clone, Default, PartialEq)]
1311#[non_exhaustive]
1312pub struct CommitRepositoryChangesRequest {
1313    /// Required. The repository's name.
1314    pub name: std::string::String,
1315
1316    /// Required. The changes to commit to the repository.
1317    pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
1318
1319    /// Optional. The commit SHA which must be the repository's current HEAD before
1320    /// applying this commit; otherwise this request will fail. If unset, no
1321    /// validation on the current HEAD commit SHA is performed.
1322    pub required_head_commit_sha: std::string::String,
1323
1324    /// Optional. A map to the path of the file to the operation. The path is the
1325    /// full file path including filename, from repository root.
1326    pub file_operations: std::collections::HashMap<
1327        std::string::String,
1328        crate::model::commit_repository_changes_request::FileOperation,
1329    >,
1330
1331    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1332}
1333
1334impl CommitRepositoryChangesRequest {
1335    pub fn new() -> Self {
1336        std::default::Default::default()
1337    }
1338
1339    /// Sets the value of [name][crate::model::CommitRepositoryChangesRequest::name].
1340    ///
1341    /// # Example
1342    /// ```ignore,no_run
1343    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1344    /// let x = CommitRepositoryChangesRequest::new().set_name("example");
1345    /// ```
1346    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1347        self.name = v.into();
1348        self
1349    }
1350
1351    /// Sets the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1352    ///
1353    /// # Example
1354    /// ```ignore,no_run
1355    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1356    /// use google_cloud_dataform_v1::model::CommitMetadata;
1357    /// let x = CommitRepositoryChangesRequest::new().set_commit_metadata(CommitMetadata::default()/* use setters */);
1358    /// ```
1359    pub fn set_commit_metadata<T>(mut self, v: T) -> Self
1360    where
1361        T: std::convert::Into<crate::model::CommitMetadata>,
1362    {
1363        self.commit_metadata = std::option::Option::Some(v.into());
1364        self
1365    }
1366
1367    /// Sets or clears the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1368    ///
1369    /// # Example
1370    /// ```ignore,no_run
1371    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1372    /// use google_cloud_dataform_v1::model::CommitMetadata;
1373    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(Some(CommitMetadata::default()/* use setters */));
1374    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(None::<CommitMetadata>);
1375    /// ```
1376    pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
1377    where
1378        T: std::convert::Into<crate::model::CommitMetadata>,
1379    {
1380        self.commit_metadata = v.map(|x| x.into());
1381        self
1382    }
1383
1384    /// Sets the value of [required_head_commit_sha][crate::model::CommitRepositoryChangesRequest::required_head_commit_sha].
1385    ///
1386    /// # Example
1387    /// ```ignore,no_run
1388    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1389    /// let x = CommitRepositoryChangesRequest::new().set_required_head_commit_sha("example");
1390    /// ```
1391    pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
1392        mut self,
1393        v: T,
1394    ) -> Self {
1395        self.required_head_commit_sha = v.into();
1396        self
1397    }
1398
1399    /// Sets the value of [file_operations][crate::model::CommitRepositoryChangesRequest::file_operations].
1400    ///
1401    /// # Example
1402    /// ```ignore,no_run
1403    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1404    /// use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1405    /// let x = CommitRepositoryChangesRequest::new().set_file_operations([
1406    ///     ("key0", FileOperation::default()/* use setters */),
1407    ///     ("key1", FileOperation::default()/* use (different) setters */),
1408    /// ]);
1409    /// ```
1410    pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
1411    where
1412        T: std::iter::IntoIterator<Item = (K, V)>,
1413        K: std::convert::Into<std::string::String>,
1414        V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
1415    {
1416        use std::iter::Iterator;
1417        self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1418        self
1419    }
1420}
1421
1422impl wkt::message::Message for CommitRepositoryChangesRequest {
1423    fn typename() -> &'static str {
1424        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
1425    }
1426}
1427
1428/// Defines additional types related to [CommitRepositoryChangesRequest].
1429pub mod commit_repository_changes_request {
1430    #[allow(unused_imports)]
1431    use super::*;
1432
1433    /// Represents a single file operation to the repository.
1434    #[derive(Clone, Default, PartialEq)]
1435    #[non_exhaustive]
1436    pub struct FileOperation {
1437        /// The operation to perform on the file.
1438        pub operation: std::option::Option<
1439            crate::model::commit_repository_changes_request::file_operation::Operation,
1440        >,
1441
1442        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1443    }
1444
1445    impl FileOperation {
1446        pub fn new() -> Self {
1447            std::default::Default::default()
1448        }
1449
1450        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation].
1451        ///
1452        /// Note that all the setters affecting `operation` are mutually
1453        /// exclusive.
1454        ///
1455        /// # Example
1456        /// ```ignore,no_run
1457        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1458        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1459        /// let x = FileOperation::new().set_operation(Some(
1460        ///     google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::Operation::WriteFile(WriteFile::default().into())));
1461        /// ```
1462        pub fn set_operation<
1463            T: std::convert::Into<
1464                    std::option::Option<
1465                        crate::model::commit_repository_changes_request::file_operation::Operation,
1466                    >,
1467                >,
1468        >(
1469            mut self,
1470            v: T,
1471        ) -> Self {
1472            self.operation = v.into();
1473            self
1474        }
1475
1476        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1477        /// if it holds a `WriteFile`, `None` if the field is not set or
1478        /// holds a different branch.
1479        pub fn write_file(
1480            &self,
1481        ) -> std::option::Option<
1482            &std::boxed::Box<
1483                crate::model::commit_repository_changes_request::file_operation::WriteFile,
1484            >,
1485        > {
1486            #[allow(unreachable_patterns)]
1487            self.operation.as_ref().and_then(|v| match v {
1488                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
1489                _ => std::option::Option::None,
1490            })
1491        }
1492
1493        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1494        /// to hold a `WriteFile`.
1495        ///
1496        /// Note that all the setters affecting `operation` are
1497        /// mutually exclusive.
1498        ///
1499        /// # Example
1500        /// ```ignore,no_run
1501        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1502        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1503        /// let x = FileOperation::new().set_write_file(WriteFile::default()/* use setters */);
1504        /// assert!(x.write_file().is_some());
1505        /// assert!(x.delete_file().is_none());
1506        /// ```
1507        pub fn set_write_file<
1508            T: std::convert::Into<
1509                    std::boxed::Box<
1510                        crate::model::commit_repository_changes_request::file_operation::WriteFile,
1511                    >,
1512                >,
1513        >(
1514            mut self,
1515            v: T,
1516        ) -> Self {
1517            self.operation = std::option::Option::Some(
1518                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
1519                    v.into()
1520                )
1521            );
1522            self
1523        }
1524
1525        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1526        /// if it holds a `DeleteFile`, `None` if the field is not set or
1527        /// holds a different branch.
1528        pub fn delete_file(
1529            &self,
1530        ) -> std::option::Option<
1531            &std::boxed::Box<
1532                crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1533            >,
1534        > {
1535            #[allow(unreachable_patterns)]
1536            self.operation.as_ref().and_then(|v| match v {
1537                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
1538                _ => std::option::Option::None,
1539            })
1540        }
1541
1542        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1543        /// to hold a `DeleteFile`.
1544        ///
1545        /// Note that all the setters affecting `operation` are
1546        /// mutually exclusive.
1547        ///
1548        /// # Example
1549        /// ```ignore,no_run
1550        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1551        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::DeleteFile;
1552        /// let x = FileOperation::new().set_delete_file(DeleteFile::default()/* use setters */);
1553        /// assert!(x.delete_file().is_some());
1554        /// assert!(x.write_file().is_none());
1555        /// ```
1556        pub fn set_delete_file<
1557            T: std::convert::Into<
1558                    std::boxed::Box<
1559                        crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1560                    >,
1561                >,
1562        >(
1563            mut self,
1564            v: T,
1565        ) -> Self {
1566            self.operation = std::option::Option::Some(
1567                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
1568                    v.into()
1569                )
1570            );
1571            self
1572        }
1573    }
1574
1575    impl wkt::message::Message for FileOperation {
1576        fn typename() -> &'static str {
1577            "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
1578        }
1579    }
1580
1581    /// Defines additional types related to [FileOperation].
1582    pub mod file_operation {
1583        #[allow(unused_imports)]
1584        use super::*;
1585
1586        /// Represents the write file operation (for files added or modified).
1587        #[derive(Clone, Default, PartialEq)]
1588        #[non_exhaustive]
1589        pub struct WriteFile {
1590            /// The file's contents.
1591            pub contents: ::bytes::Bytes,
1592
1593            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1594        }
1595
1596        impl WriteFile {
1597            pub fn new() -> Self {
1598                std::default::Default::default()
1599            }
1600
1601            /// Sets the value of [contents][crate::model::commit_repository_changes_request::file_operation::WriteFile::contents].
1602            ///
1603            /// # Example
1604            /// ```ignore,no_run
1605            /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1606            /// let x = WriteFile::new().set_contents(bytes::Bytes::from_static(b"example"));
1607            /// ```
1608            pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1609                self.contents = v.into();
1610                self
1611            }
1612        }
1613
1614        impl wkt::message::Message for WriteFile {
1615            fn typename() -> &'static str {
1616                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
1617            }
1618        }
1619
1620        /// Represents the delete file operation.
1621        #[derive(Clone, Default, PartialEq)]
1622        #[non_exhaustive]
1623        pub struct DeleteFile {
1624            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1625        }
1626
1627        impl DeleteFile {
1628            pub fn new() -> Self {
1629                std::default::Default::default()
1630            }
1631        }
1632
1633        impl wkt::message::Message for DeleteFile {
1634            fn typename() -> &'static str {
1635                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
1636            }
1637        }
1638
1639        /// The operation to perform on the file.
1640        #[derive(Clone, Debug, PartialEq)]
1641        #[non_exhaustive]
1642        pub enum Operation {
1643            /// Represents the write operation.
1644            WriteFile(
1645                std::boxed::Box<
1646                    crate::model::commit_repository_changes_request::file_operation::WriteFile,
1647                >,
1648            ),
1649            /// Represents the delete operation.
1650            DeleteFile(
1651                std::boxed::Box<
1652                    crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1653                >,
1654            ),
1655        }
1656    }
1657}
1658
1659/// `CommitRepositoryChanges` response message.
1660#[derive(Clone, Default, PartialEq)]
1661#[non_exhaustive]
1662pub struct CommitRepositoryChangesResponse {
1663    /// The commit SHA of the current commit.
1664    pub commit_sha: std::string::String,
1665
1666    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1667}
1668
1669impl CommitRepositoryChangesResponse {
1670    pub fn new() -> Self {
1671        std::default::Default::default()
1672    }
1673
1674    /// Sets the value of [commit_sha][crate::model::CommitRepositoryChangesResponse::commit_sha].
1675    ///
1676    /// # Example
1677    /// ```ignore,no_run
1678    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesResponse;
1679    /// let x = CommitRepositoryChangesResponse::new().set_commit_sha("example");
1680    /// ```
1681    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1682        self.commit_sha = v.into();
1683        self
1684    }
1685}
1686
1687impl wkt::message::Message for CommitRepositoryChangesResponse {
1688    fn typename() -> &'static str {
1689        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
1690    }
1691}
1692
1693/// `ReadRepositoryFile` request message.
1694#[derive(Clone, Default, PartialEq)]
1695#[non_exhaustive]
1696pub struct ReadRepositoryFileRequest {
1697    /// Required. The repository's name.
1698    pub name: std::string::String,
1699
1700    /// Optional. The commit SHA for the commit to read from. If unset, the file
1701    /// will be read from HEAD.
1702    pub commit_sha: std::string::String,
1703
1704    /// Required. Full file path to read including filename, from repository root.
1705    pub path: std::string::String,
1706
1707    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1708}
1709
1710impl ReadRepositoryFileRequest {
1711    pub fn new() -> Self {
1712        std::default::Default::default()
1713    }
1714
1715    /// Sets the value of [name][crate::model::ReadRepositoryFileRequest::name].
1716    ///
1717    /// # Example
1718    /// ```ignore,no_run
1719    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1720    /// let x = ReadRepositoryFileRequest::new().set_name("example");
1721    /// ```
1722    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1723        self.name = v.into();
1724        self
1725    }
1726
1727    /// Sets the value of [commit_sha][crate::model::ReadRepositoryFileRequest::commit_sha].
1728    ///
1729    /// # Example
1730    /// ```ignore,no_run
1731    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1732    /// let x = ReadRepositoryFileRequest::new().set_commit_sha("example");
1733    /// ```
1734    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1735        self.commit_sha = v.into();
1736        self
1737    }
1738
1739    /// Sets the value of [path][crate::model::ReadRepositoryFileRequest::path].
1740    ///
1741    /// # Example
1742    /// ```ignore,no_run
1743    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1744    /// let x = ReadRepositoryFileRequest::new().set_path("example");
1745    /// ```
1746    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1747        self.path = v.into();
1748        self
1749    }
1750}
1751
1752impl wkt::message::Message for ReadRepositoryFileRequest {
1753    fn typename() -> &'static str {
1754        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
1755    }
1756}
1757
1758/// `ReadRepositoryFile` response message.
1759#[derive(Clone, Default, PartialEq)]
1760#[non_exhaustive]
1761pub struct ReadRepositoryFileResponse {
1762    /// The file's contents.
1763    pub contents: ::bytes::Bytes,
1764
1765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1766}
1767
1768impl ReadRepositoryFileResponse {
1769    pub fn new() -> Self {
1770        std::default::Default::default()
1771    }
1772
1773    /// Sets the value of [contents][crate::model::ReadRepositoryFileResponse::contents].
1774    ///
1775    /// # Example
1776    /// ```ignore,no_run
1777    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileResponse;
1778    /// let x = ReadRepositoryFileResponse::new().set_contents(bytes::Bytes::from_static(b"example"));
1779    /// ```
1780    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1781        self.contents = v.into();
1782        self
1783    }
1784}
1785
1786impl wkt::message::Message for ReadRepositoryFileResponse {
1787    fn typename() -> &'static str {
1788        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
1789    }
1790}
1791
1792/// `QueryRepositoryDirectoryContents` request message.
1793#[derive(Clone, Default, PartialEq)]
1794#[non_exhaustive]
1795pub struct QueryRepositoryDirectoryContentsRequest {
1796    /// Required. The repository's name.
1797    pub name: std::string::String,
1798
1799    /// Optional. The Commit SHA for the commit to query from. If unset, the
1800    /// directory will be queried from HEAD.
1801    pub commit_sha: std::string::String,
1802
1803    /// Optional. The directory's full path including directory name, relative to
1804    /// root. If left unset, the root is used.
1805    pub path: std::string::String,
1806
1807    /// Optional. Maximum number of paths to return. The server may return fewer
1808    /// items than requested. If unspecified, the server will pick an appropriate
1809    /// default.
1810    pub page_size: i32,
1811
1812    /// Optional. Page token received from a previous
1813    /// `QueryRepositoryDirectoryContents` call. Provide this to retrieve the
1814    /// subsequent page.
1815    ///
1816    /// When paginating, all other parameters provided to
1817    /// `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must
1818    /// match the call that provided the page token.
1819    pub page_token: std::string::String,
1820
1821    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1822}
1823
1824impl QueryRepositoryDirectoryContentsRequest {
1825    pub fn new() -> Self {
1826        std::default::Default::default()
1827    }
1828
1829    /// Sets the value of [name][crate::model::QueryRepositoryDirectoryContentsRequest::name].
1830    ///
1831    /// # Example
1832    /// ```ignore,no_run
1833    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1834    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_name("example");
1835    /// ```
1836    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1837        self.name = v.into();
1838        self
1839    }
1840
1841    /// Sets the value of [commit_sha][crate::model::QueryRepositoryDirectoryContentsRequest::commit_sha].
1842    ///
1843    /// # Example
1844    /// ```ignore,no_run
1845    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1846    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_commit_sha("example");
1847    /// ```
1848    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1849        self.commit_sha = v.into();
1850        self
1851    }
1852
1853    /// Sets the value of [path][crate::model::QueryRepositoryDirectoryContentsRequest::path].
1854    ///
1855    /// # Example
1856    /// ```ignore,no_run
1857    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1858    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_path("example");
1859    /// ```
1860    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1861        self.path = v.into();
1862        self
1863    }
1864
1865    /// Sets the value of [page_size][crate::model::QueryRepositoryDirectoryContentsRequest::page_size].
1866    ///
1867    /// # Example
1868    /// ```ignore,no_run
1869    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1870    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_size(42);
1871    /// ```
1872    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1873        self.page_size = v.into();
1874        self
1875    }
1876
1877    /// Sets the value of [page_token][crate::model::QueryRepositoryDirectoryContentsRequest::page_token].
1878    ///
1879    /// # Example
1880    /// ```ignore,no_run
1881    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1882    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_token("example");
1883    /// ```
1884    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1885        self.page_token = v.into();
1886        self
1887    }
1888}
1889
1890impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
1891    fn typename() -> &'static str {
1892        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
1893    }
1894}
1895
1896/// `QueryRepositoryDirectoryContents` response message.
1897#[derive(Clone, Default, PartialEq)]
1898#[non_exhaustive]
1899pub struct QueryRepositoryDirectoryContentsResponse {
1900    /// List of entries in the directory.
1901    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
1902
1903    /// A token, which can be sent as `page_token` to retrieve the next page.
1904    /// If this field is omitted, there are no subsequent pages.
1905    pub next_page_token: std::string::String,
1906
1907    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1908}
1909
1910impl QueryRepositoryDirectoryContentsResponse {
1911    pub fn new() -> Self {
1912        std::default::Default::default()
1913    }
1914
1915    /// Sets the value of [directory_entries][crate::model::QueryRepositoryDirectoryContentsResponse::directory_entries].
1916    ///
1917    /// # Example
1918    /// ```ignore,no_run
1919    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
1920    /// use google_cloud_dataform_v1::model::DirectoryEntry;
1921    /// let x = QueryRepositoryDirectoryContentsResponse::new()
1922    ///     .set_directory_entries([
1923    ///         DirectoryEntry::default()/* use setters */,
1924    ///         DirectoryEntry::default()/* use (different) setters */,
1925    ///     ]);
1926    /// ```
1927    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
1928    where
1929        T: std::iter::IntoIterator<Item = V>,
1930        V: std::convert::Into<crate::model::DirectoryEntry>,
1931    {
1932        use std::iter::Iterator;
1933        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
1934        self
1935    }
1936
1937    /// Sets the value of [next_page_token][crate::model::QueryRepositoryDirectoryContentsResponse::next_page_token].
1938    ///
1939    /// # Example
1940    /// ```ignore,no_run
1941    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
1942    /// let x = QueryRepositoryDirectoryContentsResponse::new().set_next_page_token("example");
1943    /// ```
1944    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1945        self.next_page_token = v.into();
1946        self
1947    }
1948}
1949
1950impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
1951    fn typename() -> &'static str {
1952        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
1953    }
1954}
1955
1956#[doc(hidden)]
1957impl gax::paginator::internal::PageableResponse for QueryRepositoryDirectoryContentsResponse {
1958    type PageItem = crate::model::DirectoryEntry;
1959
1960    fn items(self) -> std::vec::Vec<Self::PageItem> {
1961        self.directory_entries
1962    }
1963
1964    fn next_page_token(&self) -> std::string::String {
1965        use std::clone::Clone;
1966        self.next_page_token.clone()
1967    }
1968}
1969
1970/// `FetchRepositoryHistory` request message.
1971#[derive(Clone, Default, PartialEq)]
1972#[non_exhaustive]
1973pub struct FetchRepositoryHistoryRequest {
1974    /// Required. The repository's name.
1975    pub name: std::string::String,
1976
1977    /// Optional. Maximum number of commits to return. The server may return fewer
1978    /// items than requested. If unspecified, the server will pick an appropriate
1979    /// default.
1980    pub page_size: i32,
1981
1982    /// Optional. Page token received from a previous `FetchRepositoryHistory`
1983    /// call. Provide this to retrieve the subsequent page.
1984    ///
1985    /// When paginating, all other parameters provided to `FetchRepositoryHistory`,
1986    /// with the exception of `page_size`, must match the call that provided the
1987    /// page token.
1988    pub page_token: std::string::String,
1989
1990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1991}
1992
1993impl FetchRepositoryHistoryRequest {
1994    pub fn new() -> Self {
1995        std::default::Default::default()
1996    }
1997
1998    /// Sets the value of [name][crate::model::FetchRepositoryHistoryRequest::name].
1999    ///
2000    /// # Example
2001    /// ```ignore,no_run
2002    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2003    /// let x = FetchRepositoryHistoryRequest::new().set_name("example");
2004    /// ```
2005    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2006        self.name = v.into();
2007        self
2008    }
2009
2010    /// Sets the value of [page_size][crate::model::FetchRepositoryHistoryRequest::page_size].
2011    ///
2012    /// # Example
2013    /// ```ignore,no_run
2014    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2015    /// let x = FetchRepositoryHistoryRequest::new().set_page_size(42);
2016    /// ```
2017    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2018        self.page_size = v.into();
2019        self
2020    }
2021
2022    /// Sets the value of [page_token][crate::model::FetchRepositoryHistoryRequest::page_token].
2023    ///
2024    /// # Example
2025    /// ```ignore,no_run
2026    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2027    /// let x = FetchRepositoryHistoryRequest::new().set_page_token("example");
2028    /// ```
2029    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2030        self.page_token = v.into();
2031        self
2032    }
2033}
2034
2035impl wkt::message::Message for FetchRepositoryHistoryRequest {
2036    fn typename() -> &'static str {
2037        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
2038    }
2039}
2040
2041/// `FetchRepositoryHistory` response message.
2042#[derive(Clone, Default, PartialEq)]
2043#[non_exhaustive]
2044pub struct FetchRepositoryHistoryResponse {
2045    /// A list of commit logs, ordered by 'git log' default order.
2046    pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
2047
2048    /// A token, which can be sent as `page_token` to retrieve the next page.
2049    /// If this field is omitted, there are no subsequent pages.
2050    pub next_page_token: std::string::String,
2051
2052    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2053}
2054
2055impl FetchRepositoryHistoryResponse {
2056    pub fn new() -> Self {
2057        std::default::Default::default()
2058    }
2059
2060    /// Sets the value of [commits][crate::model::FetchRepositoryHistoryResponse::commits].
2061    ///
2062    /// # Example
2063    /// ```ignore,no_run
2064    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2065    /// use google_cloud_dataform_v1::model::CommitLogEntry;
2066    /// let x = FetchRepositoryHistoryResponse::new()
2067    ///     .set_commits([
2068    ///         CommitLogEntry::default()/* use setters */,
2069    ///         CommitLogEntry::default()/* use (different) setters */,
2070    ///     ]);
2071    /// ```
2072    pub fn set_commits<T, V>(mut self, v: T) -> Self
2073    where
2074        T: std::iter::IntoIterator<Item = V>,
2075        V: std::convert::Into<crate::model::CommitLogEntry>,
2076    {
2077        use std::iter::Iterator;
2078        self.commits = v.into_iter().map(|i| i.into()).collect();
2079        self
2080    }
2081
2082    /// Sets the value of [next_page_token][crate::model::FetchRepositoryHistoryResponse::next_page_token].
2083    ///
2084    /// # Example
2085    /// ```ignore,no_run
2086    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2087    /// let x = FetchRepositoryHistoryResponse::new().set_next_page_token("example");
2088    /// ```
2089    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2090        self.next_page_token = v.into();
2091        self
2092    }
2093}
2094
2095impl wkt::message::Message for FetchRepositoryHistoryResponse {
2096    fn typename() -> &'static str {
2097        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
2098    }
2099}
2100
2101#[doc(hidden)]
2102impl gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
2103    type PageItem = crate::model::CommitLogEntry;
2104
2105    fn items(self) -> std::vec::Vec<Self::PageItem> {
2106        self.commits
2107    }
2108
2109    fn next_page_token(&self) -> std::string::String {
2110        use std::clone::Clone;
2111        self.next_page_token.clone()
2112    }
2113}
2114
2115/// Represents a single commit log.
2116#[derive(Clone, Default, PartialEq)]
2117#[non_exhaustive]
2118pub struct CommitLogEntry {
2119    /// Commit timestamp.
2120    pub commit_time: std::option::Option<wkt::Timestamp>,
2121
2122    /// The commit SHA for this commit log entry.
2123    pub commit_sha: std::string::String,
2124
2125    /// The commit author for this commit log entry.
2126    pub author: std::option::Option<crate::model::CommitAuthor>,
2127
2128    /// The commit message for this commit log entry.
2129    pub commit_message: std::string::String,
2130
2131    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2132}
2133
2134impl CommitLogEntry {
2135    pub fn new() -> Self {
2136        std::default::Default::default()
2137    }
2138
2139    /// Sets the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2140    ///
2141    /// # Example
2142    /// ```ignore,no_run
2143    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2144    /// use wkt::Timestamp;
2145    /// let x = CommitLogEntry::new().set_commit_time(Timestamp::default()/* use setters */);
2146    /// ```
2147    pub fn set_commit_time<T>(mut self, v: T) -> Self
2148    where
2149        T: std::convert::Into<wkt::Timestamp>,
2150    {
2151        self.commit_time = std::option::Option::Some(v.into());
2152        self
2153    }
2154
2155    /// Sets or clears the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2156    ///
2157    /// # Example
2158    /// ```ignore,no_run
2159    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2160    /// use wkt::Timestamp;
2161    /// let x = CommitLogEntry::new().set_or_clear_commit_time(Some(Timestamp::default()/* use setters */));
2162    /// let x = CommitLogEntry::new().set_or_clear_commit_time(None::<Timestamp>);
2163    /// ```
2164    pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
2165    where
2166        T: std::convert::Into<wkt::Timestamp>,
2167    {
2168        self.commit_time = v.map(|x| x.into());
2169        self
2170    }
2171
2172    /// Sets the value of [commit_sha][crate::model::CommitLogEntry::commit_sha].
2173    ///
2174    /// # Example
2175    /// ```ignore,no_run
2176    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2177    /// let x = CommitLogEntry::new().set_commit_sha("example");
2178    /// ```
2179    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2180        self.commit_sha = v.into();
2181        self
2182    }
2183
2184    /// Sets the value of [author][crate::model::CommitLogEntry::author].
2185    ///
2186    /// # Example
2187    /// ```ignore,no_run
2188    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2189    /// use google_cloud_dataform_v1::model::CommitAuthor;
2190    /// let x = CommitLogEntry::new().set_author(CommitAuthor::default()/* use setters */);
2191    /// ```
2192    pub fn set_author<T>(mut self, v: T) -> Self
2193    where
2194        T: std::convert::Into<crate::model::CommitAuthor>,
2195    {
2196        self.author = std::option::Option::Some(v.into());
2197        self
2198    }
2199
2200    /// Sets or clears the value of [author][crate::model::CommitLogEntry::author].
2201    ///
2202    /// # Example
2203    /// ```ignore,no_run
2204    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2205    /// use google_cloud_dataform_v1::model::CommitAuthor;
2206    /// let x = CommitLogEntry::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2207    /// let x = CommitLogEntry::new().set_or_clear_author(None::<CommitAuthor>);
2208    /// ```
2209    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2210    where
2211        T: std::convert::Into<crate::model::CommitAuthor>,
2212    {
2213        self.author = v.map(|x| x.into());
2214        self
2215    }
2216
2217    /// Sets the value of [commit_message][crate::model::CommitLogEntry::commit_message].
2218    ///
2219    /// # Example
2220    /// ```ignore,no_run
2221    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2222    /// let x = CommitLogEntry::new().set_commit_message("example");
2223    /// ```
2224    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2225        self.commit_message = v.into();
2226        self
2227    }
2228}
2229
2230impl wkt::message::Message for CommitLogEntry {
2231    fn typename() -> &'static str {
2232        "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
2233    }
2234}
2235
2236/// Represents a Dataform Git commit.
2237#[derive(Clone, Default, PartialEq)]
2238#[non_exhaustive]
2239pub struct CommitMetadata {
2240    /// Required. The commit's author.
2241    pub author: std::option::Option<crate::model::CommitAuthor>,
2242
2243    /// Optional. The commit's message.
2244    pub commit_message: std::string::String,
2245
2246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2247}
2248
2249impl CommitMetadata {
2250    pub fn new() -> Self {
2251        std::default::Default::default()
2252    }
2253
2254    /// Sets the value of [author][crate::model::CommitMetadata::author].
2255    ///
2256    /// # Example
2257    /// ```ignore,no_run
2258    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2259    /// use google_cloud_dataform_v1::model::CommitAuthor;
2260    /// let x = CommitMetadata::new().set_author(CommitAuthor::default()/* use setters */);
2261    /// ```
2262    pub fn set_author<T>(mut self, v: T) -> Self
2263    where
2264        T: std::convert::Into<crate::model::CommitAuthor>,
2265    {
2266        self.author = std::option::Option::Some(v.into());
2267        self
2268    }
2269
2270    /// Sets or clears the value of [author][crate::model::CommitMetadata::author].
2271    ///
2272    /// # Example
2273    /// ```ignore,no_run
2274    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2275    /// use google_cloud_dataform_v1::model::CommitAuthor;
2276    /// let x = CommitMetadata::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2277    /// let x = CommitMetadata::new().set_or_clear_author(None::<CommitAuthor>);
2278    /// ```
2279    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2280    where
2281        T: std::convert::Into<crate::model::CommitAuthor>,
2282    {
2283        self.author = v.map(|x| x.into());
2284        self
2285    }
2286
2287    /// Sets the value of [commit_message][crate::model::CommitMetadata::commit_message].
2288    ///
2289    /// # Example
2290    /// ```ignore,no_run
2291    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2292    /// let x = CommitMetadata::new().set_commit_message("example");
2293    /// ```
2294    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2295        self.commit_message = v.into();
2296        self
2297    }
2298}
2299
2300impl wkt::message::Message for CommitMetadata {
2301    fn typename() -> &'static str {
2302        "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
2303    }
2304}
2305
2306/// `ComputeRepositoryAccessTokenStatus` request message.
2307#[derive(Clone, Default, PartialEq)]
2308#[non_exhaustive]
2309pub struct ComputeRepositoryAccessTokenStatusRequest {
2310    /// Required. The repository's name.
2311    pub name: std::string::String,
2312
2313    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2314}
2315
2316impl ComputeRepositoryAccessTokenStatusRequest {
2317    pub fn new() -> Self {
2318        std::default::Default::default()
2319    }
2320
2321    /// Sets the value of [name][crate::model::ComputeRepositoryAccessTokenStatusRequest::name].
2322    ///
2323    /// # Example
2324    /// ```ignore,no_run
2325    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusRequest;
2326    /// let x = ComputeRepositoryAccessTokenStatusRequest::new().set_name("example");
2327    /// ```
2328    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2329        self.name = v.into();
2330        self
2331    }
2332}
2333
2334impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
2335    fn typename() -> &'static str {
2336        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
2337    }
2338}
2339
2340/// `ComputeRepositoryAccessTokenStatus` response message.
2341#[derive(Clone, Default, PartialEq)]
2342#[non_exhaustive]
2343pub struct ComputeRepositoryAccessTokenStatusResponse {
2344    /// Indicates the status of the Git access token.
2345    pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
2346
2347    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2348}
2349
2350impl ComputeRepositoryAccessTokenStatusResponse {
2351    pub fn new() -> Self {
2352        std::default::Default::default()
2353    }
2354
2355    /// Sets the value of [token_status][crate::model::ComputeRepositoryAccessTokenStatusResponse::token_status].
2356    ///
2357    /// # Example
2358    /// ```ignore,no_run
2359    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusResponse;
2360    /// use google_cloud_dataform_v1::model::compute_repository_access_token_status_response::TokenStatus;
2361    /// let x0 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::NotFound);
2362    /// let x1 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Invalid);
2363    /// let x2 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Valid);
2364    /// ```
2365    pub fn set_token_status<
2366        T: std::convert::Into<
2367                crate::model::compute_repository_access_token_status_response::TokenStatus,
2368            >,
2369    >(
2370        mut self,
2371        v: T,
2372    ) -> Self {
2373        self.token_status = v.into();
2374        self
2375    }
2376}
2377
2378impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
2379    fn typename() -> &'static str {
2380        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
2381    }
2382}
2383
2384/// Defines additional types related to [ComputeRepositoryAccessTokenStatusResponse].
2385pub mod compute_repository_access_token_status_response {
2386    #[allow(unused_imports)]
2387    use super::*;
2388
2389    /// Indicates the status of a Git authentication token.
2390    ///
2391    /// # Working with unknown values
2392    ///
2393    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2394    /// additional enum variants at any time. Adding new variants is not considered
2395    /// a breaking change. Applications should write their code in anticipation of:
2396    ///
2397    /// - New values appearing in future releases of the client library, **and**
2398    /// - New values received dynamically, without application changes.
2399    ///
2400    /// Please consult the [Working with enums] section in the user guide for some
2401    /// guidelines.
2402    ///
2403    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2404    #[derive(Clone, Debug, PartialEq)]
2405    #[non_exhaustive]
2406    pub enum TokenStatus {
2407        /// Default value. This value is unused.
2408        Unspecified,
2409        /// The token could not be found in Secret Manager (or the Dataform
2410        /// Service Account did not have permission to access it).
2411        NotFound,
2412        /// The token could not be used to authenticate against the Git remote.
2413        Invalid,
2414        /// The token was used successfully to authenticate against the Git remote.
2415        Valid,
2416        /// If set, the enum was initialized with an unknown value.
2417        ///
2418        /// Applications can examine the value using [TokenStatus::value] or
2419        /// [TokenStatus::name].
2420        UnknownValue(token_status::UnknownValue),
2421    }
2422
2423    #[doc(hidden)]
2424    pub mod token_status {
2425        #[allow(unused_imports)]
2426        use super::*;
2427        #[derive(Clone, Debug, PartialEq)]
2428        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2429    }
2430
2431    impl TokenStatus {
2432        /// Gets the enum value.
2433        ///
2434        /// Returns `None` if the enum contains an unknown value deserialized from
2435        /// the string representation of enums.
2436        pub fn value(&self) -> std::option::Option<i32> {
2437            match self {
2438                Self::Unspecified => std::option::Option::Some(0),
2439                Self::NotFound => std::option::Option::Some(1),
2440                Self::Invalid => std::option::Option::Some(2),
2441                Self::Valid => std::option::Option::Some(3),
2442                Self::UnknownValue(u) => u.0.value(),
2443            }
2444        }
2445
2446        /// Gets the enum value as a string.
2447        ///
2448        /// Returns `None` if the enum contains an unknown value deserialized from
2449        /// the integer representation of enums.
2450        pub fn name(&self) -> std::option::Option<&str> {
2451            match self {
2452                Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
2453                Self::NotFound => std::option::Option::Some("NOT_FOUND"),
2454                Self::Invalid => std::option::Option::Some("INVALID"),
2455                Self::Valid => std::option::Option::Some("VALID"),
2456                Self::UnknownValue(u) => u.0.name(),
2457            }
2458        }
2459    }
2460
2461    impl std::default::Default for TokenStatus {
2462        fn default() -> Self {
2463            use std::convert::From;
2464            Self::from(0)
2465        }
2466    }
2467
2468    impl std::fmt::Display for TokenStatus {
2469        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2470            wkt::internal::display_enum(f, self.name(), self.value())
2471        }
2472    }
2473
2474    impl std::convert::From<i32> for TokenStatus {
2475        fn from(value: i32) -> Self {
2476            match value {
2477                0 => Self::Unspecified,
2478                1 => Self::NotFound,
2479                2 => Self::Invalid,
2480                3 => Self::Valid,
2481                _ => Self::UnknownValue(token_status::UnknownValue(
2482                    wkt::internal::UnknownEnumValue::Integer(value),
2483                )),
2484            }
2485        }
2486    }
2487
2488    impl std::convert::From<&str> for TokenStatus {
2489        fn from(value: &str) -> Self {
2490            use std::string::ToString;
2491            match value {
2492                "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
2493                "NOT_FOUND" => Self::NotFound,
2494                "INVALID" => Self::Invalid,
2495                "VALID" => Self::Valid,
2496                _ => Self::UnknownValue(token_status::UnknownValue(
2497                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2498                )),
2499            }
2500        }
2501    }
2502
2503    impl serde::ser::Serialize for TokenStatus {
2504        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2505        where
2506            S: serde::Serializer,
2507        {
2508            match self {
2509                Self::Unspecified => serializer.serialize_i32(0),
2510                Self::NotFound => serializer.serialize_i32(1),
2511                Self::Invalid => serializer.serialize_i32(2),
2512                Self::Valid => serializer.serialize_i32(3),
2513                Self::UnknownValue(u) => u.0.serialize(serializer),
2514            }
2515        }
2516    }
2517
2518    impl<'de> serde::de::Deserialize<'de> for TokenStatus {
2519        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2520        where
2521            D: serde::Deserializer<'de>,
2522        {
2523            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
2524                ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
2525            ))
2526        }
2527    }
2528}
2529
2530/// `FetchRemoteBranches` request message.
2531#[derive(Clone, Default, PartialEq)]
2532#[non_exhaustive]
2533pub struct FetchRemoteBranchesRequest {
2534    /// Required. The repository's name.
2535    pub name: std::string::String,
2536
2537    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2538}
2539
2540impl FetchRemoteBranchesRequest {
2541    pub fn new() -> Self {
2542        std::default::Default::default()
2543    }
2544
2545    /// Sets the value of [name][crate::model::FetchRemoteBranchesRequest::name].
2546    ///
2547    /// # Example
2548    /// ```ignore,no_run
2549    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesRequest;
2550    /// let x = FetchRemoteBranchesRequest::new().set_name("example");
2551    /// ```
2552    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2553        self.name = v.into();
2554        self
2555    }
2556}
2557
2558impl wkt::message::Message for FetchRemoteBranchesRequest {
2559    fn typename() -> &'static str {
2560        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
2561    }
2562}
2563
2564/// `FetchRemoteBranches` response message.
2565#[derive(Clone, Default, PartialEq)]
2566#[non_exhaustive]
2567pub struct FetchRemoteBranchesResponse {
2568    /// The remote repository's branch names.
2569    pub branches: std::vec::Vec<std::string::String>,
2570
2571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2572}
2573
2574impl FetchRemoteBranchesResponse {
2575    pub fn new() -> Self {
2576        std::default::Default::default()
2577    }
2578
2579    /// Sets the value of [branches][crate::model::FetchRemoteBranchesResponse::branches].
2580    ///
2581    /// # Example
2582    /// ```ignore,no_run
2583    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesResponse;
2584    /// let x = FetchRemoteBranchesResponse::new().set_branches(["a", "b", "c"]);
2585    /// ```
2586    pub fn set_branches<T, V>(mut self, v: T) -> Self
2587    where
2588        T: std::iter::IntoIterator<Item = V>,
2589        V: std::convert::Into<std::string::String>,
2590    {
2591        use std::iter::Iterator;
2592        self.branches = v.into_iter().map(|i| i.into()).collect();
2593        self
2594    }
2595}
2596
2597impl wkt::message::Message for FetchRemoteBranchesResponse {
2598    fn typename() -> &'static str {
2599        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
2600    }
2601}
2602
2603/// Represents a Dataform Git workspace.
2604#[derive(Clone, Default, PartialEq)]
2605#[non_exhaustive]
2606pub struct Workspace {
2607    /// Identifier. The workspace's name.
2608    pub name: std::string::String,
2609
2610    /// Output only. The timestamp of when the workspace was created.
2611    pub create_time: std::option::Option<wkt::Timestamp>,
2612
2613    /// Output only. A data encryption state of a Git repository if this Workspace
2614    /// is protected by a KMS key.
2615    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
2616
2617    /// Output only. All the metadata information that is used internally to serve
2618    /// the resource. For example: timestamps, flags, status fields, etc. The
2619    /// format of this field is a JSON string.
2620    pub internal_metadata: std::option::Option<std::string::String>,
2621
2622    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2623}
2624
2625impl Workspace {
2626    pub fn new() -> Self {
2627        std::default::Default::default()
2628    }
2629
2630    /// Sets the value of [name][crate::model::Workspace::name].
2631    ///
2632    /// # Example
2633    /// ```ignore,no_run
2634    /// # use google_cloud_dataform_v1::model::Workspace;
2635    /// let x = Workspace::new().set_name("example");
2636    /// ```
2637    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2638        self.name = v.into();
2639        self
2640    }
2641
2642    /// Sets the value of [create_time][crate::model::Workspace::create_time].
2643    ///
2644    /// # Example
2645    /// ```ignore,no_run
2646    /// # use google_cloud_dataform_v1::model::Workspace;
2647    /// use wkt::Timestamp;
2648    /// let x = Workspace::new().set_create_time(Timestamp::default()/* use setters */);
2649    /// ```
2650    pub fn set_create_time<T>(mut self, v: T) -> Self
2651    where
2652        T: std::convert::Into<wkt::Timestamp>,
2653    {
2654        self.create_time = std::option::Option::Some(v.into());
2655        self
2656    }
2657
2658    /// Sets or clears the value of [create_time][crate::model::Workspace::create_time].
2659    ///
2660    /// # Example
2661    /// ```ignore,no_run
2662    /// # use google_cloud_dataform_v1::model::Workspace;
2663    /// use wkt::Timestamp;
2664    /// let x = Workspace::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2665    /// let x = Workspace::new().set_or_clear_create_time(None::<Timestamp>);
2666    /// ```
2667    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2668    where
2669        T: std::convert::Into<wkt::Timestamp>,
2670    {
2671        self.create_time = v.map(|x| x.into());
2672        self
2673    }
2674
2675    /// Sets the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2676    ///
2677    /// # Example
2678    /// ```ignore,no_run
2679    /// # use google_cloud_dataform_v1::model::Workspace;
2680    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2681    /// let x = Workspace::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
2682    /// ```
2683    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
2684    where
2685        T: std::convert::Into<crate::model::DataEncryptionState>,
2686    {
2687        self.data_encryption_state = std::option::Option::Some(v.into());
2688        self
2689    }
2690
2691    /// Sets or clears the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2692    ///
2693    /// # Example
2694    /// ```ignore,no_run
2695    /// # use google_cloud_dataform_v1::model::Workspace;
2696    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2697    /// let x = Workspace::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
2698    /// let x = Workspace::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
2699    /// ```
2700    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
2701    where
2702        T: std::convert::Into<crate::model::DataEncryptionState>,
2703    {
2704        self.data_encryption_state = v.map(|x| x.into());
2705        self
2706    }
2707
2708    /// Sets the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2709    ///
2710    /// # Example
2711    /// ```ignore,no_run
2712    /// # use google_cloud_dataform_v1::model::Workspace;
2713    /// let x = Workspace::new().set_internal_metadata("example");
2714    /// ```
2715    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
2716    where
2717        T: std::convert::Into<std::string::String>,
2718    {
2719        self.internal_metadata = std::option::Option::Some(v.into());
2720        self
2721    }
2722
2723    /// Sets or clears the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2724    ///
2725    /// # Example
2726    /// ```ignore,no_run
2727    /// # use google_cloud_dataform_v1::model::Workspace;
2728    /// let x = Workspace::new().set_or_clear_internal_metadata(Some("example"));
2729    /// let x = Workspace::new().set_or_clear_internal_metadata(None::<String>);
2730    /// ```
2731    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2732    where
2733        T: std::convert::Into<std::string::String>,
2734    {
2735        self.internal_metadata = v.map(|x| x.into());
2736        self
2737    }
2738}
2739
2740impl wkt::message::Message for Workspace {
2741    fn typename() -> &'static str {
2742        "type.googleapis.com/google.cloud.dataform.v1.Workspace"
2743    }
2744}
2745
2746/// `ListWorkspaces` request message.
2747#[derive(Clone, Default, PartialEq)]
2748#[non_exhaustive]
2749pub struct ListWorkspacesRequest {
2750    /// Required. The repository in which to list workspaces. Must be in the
2751    /// format `projects/*/locations/*/repositories/*`.
2752    pub parent: std::string::String,
2753
2754    /// Optional. Maximum number of workspaces to return. The server may return
2755    /// fewer items than requested. If unspecified, the server will pick an
2756    /// appropriate default.
2757    pub page_size: i32,
2758
2759    /// Optional. Page token received from a previous `ListWorkspaces` call.
2760    /// Provide this to retrieve the subsequent page.
2761    ///
2762    /// When paginating, all other parameters provided to `ListWorkspaces`, with
2763    /// the exception of `page_size`, must match the call that provided the page
2764    /// token.
2765    pub page_token: std::string::String,
2766
2767    /// Optional. This field only supports ordering by `name`. If unspecified, the
2768    /// server will choose the ordering. If specified, the default order is
2769    /// ascending for the `name` field.
2770    pub order_by: std::string::String,
2771
2772    /// Optional. Filter for the returned list.
2773    pub filter: std::string::String,
2774
2775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2776}
2777
2778impl ListWorkspacesRequest {
2779    pub fn new() -> Self {
2780        std::default::Default::default()
2781    }
2782
2783    /// Sets the value of [parent][crate::model::ListWorkspacesRequest::parent].
2784    ///
2785    /// # Example
2786    /// ```ignore,no_run
2787    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2788    /// let x = ListWorkspacesRequest::new().set_parent("example");
2789    /// ```
2790    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2791        self.parent = v.into();
2792        self
2793    }
2794
2795    /// Sets the value of [page_size][crate::model::ListWorkspacesRequest::page_size].
2796    ///
2797    /// # Example
2798    /// ```ignore,no_run
2799    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2800    /// let x = ListWorkspacesRequest::new().set_page_size(42);
2801    /// ```
2802    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2803        self.page_size = v.into();
2804        self
2805    }
2806
2807    /// Sets the value of [page_token][crate::model::ListWorkspacesRequest::page_token].
2808    ///
2809    /// # Example
2810    /// ```ignore,no_run
2811    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2812    /// let x = ListWorkspacesRequest::new().set_page_token("example");
2813    /// ```
2814    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2815        self.page_token = v.into();
2816        self
2817    }
2818
2819    /// Sets the value of [order_by][crate::model::ListWorkspacesRequest::order_by].
2820    ///
2821    /// # Example
2822    /// ```ignore,no_run
2823    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2824    /// let x = ListWorkspacesRequest::new().set_order_by("example");
2825    /// ```
2826    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2827        self.order_by = v.into();
2828        self
2829    }
2830
2831    /// Sets the value of [filter][crate::model::ListWorkspacesRequest::filter].
2832    ///
2833    /// # Example
2834    /// ```ignore,no_run
2835    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2836    /// let x = ListWorkspacesRequest::new().set_filter("example");
2837    /// ```
2838    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2839        self.filter = v.into();
2840        self
2841    }
2842}
2843
2844impl wkt::message::Message for ListWorkspacesRequest {
2845    fn typename() -> &'static str {
2846        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
2847    }
2848}
2849
2850/// `ListWorkspaces` response message.
2851#[derive(Clone, Default, PartialEq)]
2852#[non_exhaustive]
2853pub struct ListWorkspacesResponse {
2854    /// List of workspaces.
2855    pub workspaces: std::vec::Vec<crate::model::Workspace>,
2856
2857    /// A token, which can be sent as `page_token` to retrieve the next page.
2858    /// If this field is omitted, there are no subsequent pages.
2859    pub next_page_token: std::string::String,
2860
2861    /// Locations which could not be reached.
2862    pub unreachable: std::vec::Vec<std::string::String>,
2863
2864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2865}
2866
2867impl ListWorkspacesResponse {
2868    pub fn new() -> Self {
2869        std::default::Default::default()
2870    }
2871
2872    /// Sets the value of [workspaces][crate::model::ListWorkspacesResponse::workspaces].
2873    ///
2874    /// # Example
2875    /// ```ignore,no_run
2876    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
2877    /// use google_cloud_dataform_v1::model::Workspace;
2878    /// let x = ListWorkspacesResponse::new()
2879    ///     .set_workspaces([
2880    ///         Workspace::default()/* use setters */,
2881    ///         Workspace::default()/* use (different) setters */,
2882    ///     ]);
2883    /// ```
2884    pub fn set_workspaces<T, V>(mut self, v: T) -> Self
2885    where
2886        T: std::iter::IntoIterator<Item = V>,
2887        V: std::convert::Into<crate::model::Workspace>,
2888    {
2889        use std::iter::Iterator;
2890        self.workspaces = v.into_iter().map(|i| i.into()).collect();
2891        self
2892    }
2893
2894    /// Sets the value of [next_page_token][crate::model::ListWorkspacesResponse::next_page_token].
2895    ///
2896    /// # Example
2897    /// ```ignore,no_run
2898    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
2899    /// let x = ListWorkspacesResponse::new().set_next_page_token("example");
2900    /// ```
2901    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2902        self.next_page_token = v.into();
2903        self
2904    }
2905
2906    /// Sets the value of [unreachable][crate::model::ListWorkspacesResponse::unreachable].
2907    ///
2908    /// # Example
2909    /// ```ignore,no_run
2910    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
2911    /// let x = ListWorkspacesResponse::new().set_unreachable(["a", "b", "c"]);
2912    /// ```
2913    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2914    where
2915        T: std::iter::IntoIterator<Item = V>,
2916        V: std::convert::Into<std::string::String>,
2917    {
2918        use std::iter::Iterator;
2919        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2920        self
2921    }
2922}
2923
2924impl wkt::message::Message for ListWorkspacesResponse {
2925    fn typename() -> &'static str {
2926        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
2927    }
2928}
2929
2930#[doc(hidden)]
2931impl gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
2932    type PageItem = crate::model::Workspace;
2933
2934    fn items(self) -> std::vec::Vec<Self::PageItem> {
2935        self.workspaces
2936    }
2937
2938    fn next_page_token(&self) -> std::string::String {
2939        use std::clone::Clone;
2940        self.next_page_token.clone()
2941    }
2942}
2943
2944/// `GetWorkspace` request message.
2945#[derive(Clone, Default, PartialEq)]
2946#[non_exhaustive]
2947pub struct GetWorkspaceRequest {
2948    /// Required. The workspace's name.
2949    pub name: std::string::String,
2950
2951    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2952}
2953
2954impl GetWorkspaceRequest {
2955    pub fn new() -> Self {
2956        std::default::Default::default()
2957    }
2958
2959    /// Sets the value of [name][crate::model::GetWorkspaceRequest::name].
2960    ///
2961    /// # Example
2962    /// ```ignore,no_run
2963    /// # use google_cloud_dataform_v1::model::GetWorkspaceRequest;
2964    /// let x = GetWorkspaceRequest::new().set_name("example");
2965    /// ```
2966    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2967        self.name = v.into();
2968        self
2969    }
2970}
2971
2972impl wkt::message::Message for GetWorkspaceRequest {
2973    fn typename() -> &'static str {
2974        "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
2975    }
2976}
2977
2978/// `CreateWorkspace` request message.
2979#[derive(Clone, Default, PartialEq)]
2980#[non_exhaustive]
2981pub struct CreateWorkspaceRequest {
2982    /// Required. The repository in which to create the workspace. Must be in the
2983    /// format `projects/*/locations/*/repositories/*`.
2984    pub parent: std::string::String,
2985
2986    /// Required. The workspace to create.
2987    pub workspace: std::option::Option<crate::model::Workspace>,
2988
2989    /// Required. The ID to use for the workspace, which will become the final
2990    /// component of the workspace's resource name.
2991    pub workspace_id: std::string::String,
2992
2993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2994}
2995
2996impl CreateWorkspaceRequest {
2997    pub fn new() -> Self {
2998        std::default::Default::default()
2999    }
3000
3001    /// Sets the value of [parent][crate::model::CreateWorkspaceRequest::parent].
3002    ///
3003    /// # Example
3004    /// ```ignore,no_run
3005    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3006    /// let x = CreateWorkspaceRequest::new().set_parent("example");
3007    /// ```
3008    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3009        self.parent = v.into();
3010        self
3011    }
3012
3013    /// Sets the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3014    ///
3015    /// # Example
3016    /// ```ignore,no_run
3017    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3018    /// use google_cloud_dataform_v1::model::Workspace;
3019    /// let x = CreateWorkspaceRequest::new().set_workspace(Workspace::default()/* use setters */);
3020    /// ```
3021    pub fn set_workspace<T>(mut self, v: T) -> Self
3022    where
3023        T: std::convert::Into<crate::model::Workspace>,
3024    {
3025        self.workspace = std::option::Option::Some(v.into());
3026        self
3027    }
3028
3029    /// Sets or clears the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3030    ///
3031    /// # Example
3032    /// ```ignore,no_run
3033    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3034    /// use google_cloud_dataform_v1::model::Workspace;
3035    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(Some(Workspace::default()/* use setters */));
3036    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(None::<Workspace>);
3037    /// ```
3038    pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
3039    where
3040        T: std::convert::Into<crate::model::Workspace>,
3041    {
3042        self.workspace = v.map(|x| x.into());
3043        self
3044    }
3045
3046    /// Sets the value of [workspace_id][crate::model::CreateWorkspaceRequest::workspace_id].
3047    ///
3048    /// # Example
3049    /// ```ignore,no_run
3050    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3051    /// let x = CreateWorkspaceRequest::new().set_workspace_id("example");
3052    /// ```
3053    pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3054        self.workspace_id = v.into();
3055        self
3056    }
3057}
3058
3059impl wkt::message::Message for CreateWorkspaceRequest {
3060    fn typename() -> &'static str {
3061        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
3062    }
3063}
3064
3065/// `DeleteWorkspace` request message.
3066#[derive(Clone, Default, PartialEq)]
3067#[non_exhaustive]
3068pub struct DeleteWorkspaceRequest {
3069    /// Required. The workspace resource's name.
3070    pub name: std::string::String,
3071
3072    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3073}
3074
3075impl DeleteWorkspaceRequest {
3076    pub fn new() -> Self {
3077        std::default::Default::default()
3078    }
3079
3080    /// Sets the value of [name][crate::model::DeleteWorkspaceRequest::name].
3081    ///
3082    /// # Example
3083    /// ```ignore,no_run
3084    /// # use google_cloud_dataform_v1::model::DeleteWorkspaceRequest;
3085    /// let x = DeleteWorkspaceRequest::new().set_name("example");
3086    /// ```
3087    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3088        self.name = v.into();
3089        self
3090    }
3091}
3092
3093impl wkt::message::Message for DeleteWorkspaceRequest {
3094    fn typename() -> &'static str {
3095        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
3096    }
3097}
3098
3099/// Represents the author of a Git commit.
3100#[derive(Clone, Default, PartialEq)]
3101#[non_exhaustive]
3102pub struct CommitAuthor {
3103    /// Required. The commit author's name.
3104    pub name: std::string::String,
3105
3106    /// Required. The commit author's email address.
3107    pub email_address: std::string::String,
3108
3109    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3110}
3111
3112impl CommitAuthor {
3113    pub fn new() -> Self {
3114        std::default::Default::default()
3115    }
3116
3117    /// Sets the value of [name][crate::model::CommitAuthor::name].
3118    ///
3119    /// # Example
3120    /// ```ignore,no_run
3121    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3122    /// let x = CommitAuthor::new().set_name("example");
3123    /// ```
3124    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3125        self.name = v.into();
3126        self
3127    }
3128
3129    /// Sets the value of [email_address][crate::model::CommitAuthor::email_address].
3130    ///
3131    /// # Example
3132    /// ```ignore,no_run
3133    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3134    /// let x = CommitAuthor::new().set_email_address("example");
3135    /// ```
3136    pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3137        self.email_address = v.into();
3138        self
3139    }
3140}
3141
3142impl wkt::message::Message for CommitAuthor {
3143    fn typename() -> &'static str {
3144        "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
3145    }
3146}
3147
3148/// `PullGitCommits` request message.
3149#[derive(Clone, Default, PartialEq)]
3150#[non_exhaustive]
3151pub struct PullGitCommitsRequest {
3152    /// Required. The workspace's name.
3153    pub name: std::string::String,
3154
3155    /// Optional. The name of the branch in the Git remote from which to pull
3156    /// commits. If left unset, the repository's default branch name will be used.
3157    pub remote_branch: std::string::String,
3158
3159    /// Required. The author of any merge commit which may be created as a result
3160    /// of merging fetched Git commits into this workspace.
3161    pub author: std::option::Option<crate::model::CommitAuthor>,
3162
3163    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3164}
3165
3166impl PullGitCommitsRequest {
3167    pub fn new() -> Self {
3168        std::default::Default::default()
3169    }
3170
3171    /// Sets the value of [name][crate::model::PullGitCommitsRequest::name].
3172    ///
3173    /// # Example
3174    /// ```ignore,no_run
3175    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3176    /// let x = PullGitCommitsRequest::new().set_name("example");
3177    /// ```
3178    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3179        self.name = v.into();
3180        self
3181    }
3182
3183    /// Sets the value of [remote_branch][crate::model::PullGitCommitsRequest::remote_branch].
3184    ///
3185    /// # Example
3186    /// ```ignore,no_run
3187    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3188    /// let x = PullGitCommitsRequest::new().set_remote_branch("example");
3189    /// ```
3190    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3191        self.remote_branch = v.into();
3192        self
3193    }
3194
3195    /// Sets the value of [author][crate::model::PullGitCommitsRequest::author].
3196    ///
3197    /// # Example
3198    /// ```ignore,no_run
3199    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3200    /// use google_cloud_dataform_v1::model::CommitAuthor;
3201    /// let x = PullGitCommitsRequest::new().set_author(CommitAuthor::default()/* use setters */);
3202    /// ```
3203    pub fn set_author<T>(mut self, v: T) -> Self
3204    where
3205        T: std::convert::Into<crate::model::CommitAuthor>,
3206    {
3207        self.author = std::option::Option::Some(v.into());
3208        self
3209    }
3210
3211    /// Sets or clears the value of [author][crate::model::PullGitCommitsRequest::author].
3212    ///
3213    /// # Example
3214    /// ```ignore,no_run
3215    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3216    /// use google_cloud_dataform_v1::model::CommitAuthor;
3217    /// let x = PullGitCommitsRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
3218    /// let x = PullGitCommitsRequest::new().set_or_clear_author(None::<CommitAuthor>);
3219    /// ```
3220    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
3221    where
3222        T: std::convert::Into<crate::model::CommitAuthor>,
3223    {
3224        self.author = v.map(|x| x.into());
3225        self
3226    }
3227}
3228
3229impl wkt::message::Message for PullGitCommitsRequest {
3230    fn typename() -> &'static str {
3231        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
3232    }
3233}
3234
3235/// `PullGitCommits` response message.
3236#[derive(Clone, Default, PartialEq)]
3237#[non_exhaustive]
3238pub struct PullGitCommitsResponse {
3239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3240}
3241
3242impl PullGitCommitsResponse {
3243    pub fn new() -> Self {
3244        std::default::Default::default()
3245    }
3246}
3247
3248impl wkt::message::Message for PullGitCommitsResponse {
3249    fn typename() -> &'static str {
3250        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
3251    }
3252}
3253
3254/// `PushGitCommits` request message.
3255#[derive(Clone, Default, PartialEq)]
3256#[non_exhaustive]
3257pub struct PushGitCommitsRequest {
3258    /// Required. The workspace's name.
3259    pub name: std::string::String,
3260
3261    /// Optional. The name of the branch in the Git remote to which commits should
3262    /// be pushed. If left unset, the repository's default branch name will be
3263    /// used.
3264    pub remote_branch: std::string::String,
3265
3266    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3267}
3268
3269impl PushGitCommitsRequest {
3270    pub fn new() -> Self {
3271        std::default::Default::default()
3272    }
3273
3274    /// Sets the value of [name][crate::model::PushGitCommitsRequest::name].
3275    ///
3276    /// # Example
3277    /// ```ignore,no_run
3278    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3279    /// let x = PushGitCommitsRequest::new().set_name("example");
3280    /// ```
3281    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3282        self.name = v.into();
3283        self
3284    }
3285
3286    /// Sets the value of [remote_branch][crate::model::PushGitCommitsRequest::remote_branch].
3287    ///
3288    /// # Example
3289    /// ```ignore,no_run
3290    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3291    /// let x = PushGitCommitsRequest::new().set_remote_branch("example");
3292    /// ```
3293    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3294        self.remote_branch = v.into();
3295        self
3296    }
3297}
3298
3299impl wkt::message::Message for PushGitCommitsRequest {
3300    fn typename() -> &'static str {
3301        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
3302    }
3303}
3304
3305/// `PushGitCommits` response message.
3306#[derive(Clone, Default, PartialEq)]
3307#[non_exhaustive]
3308pub struct PushGitCommitsResponse {
3309    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3310}
3311
3312impl PushGitCommitsResponse {
3313    pub fn new() -> Self {
3314        std::default::Default::default()
3315    }
3316}
3317
3318impl wkt::message::Message for PushGitCommitsResponse {
3319    fn typename() -> &'static str {
3320        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
3321    }
3322}
3323
3324/// `FetchFileGitStatuses` request message.
3325#[derive(Clone, Default, PartialEq)]
3326#[non_exhaustive]
3327pub struct FetchFileGitStatusesRequest {
3328    /// Required. The workspace's name.
3329    pub name: std::string::String,
3330
3331    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3332}
3333
3334impl FetchFileGitStatusesRequest {
3335    pub fn new() -> Self {
3336        std::default::Default::default()
3337    }
3338
3339    /// Sets the value of [name][crate::model::FetchFileGitStatusesRequest::name].
3340    ///
3341    /// # Example
3342    /// ```ignore,no_run
3343    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesRequest;
3344    /// let x = FetchFileGitStatusesRequest::new().set_name("example");
3345    /// ```
3346    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3347        self.name = v.into();
3348        self
3349    }
3350}
3351
3352impl wkt::message::Message for FetchFileGitStatusesRequest {
3353    fn typename() -> &'static str {
3354        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
3355    }
3356}
3357
3358/// `FetchFileGitStatuses` response message.
3359#[derive(Clone, Default, PartialEq)]
3360#[non_exhaustive]
3361pub struct FetchFileGitStatusesResponse {
3362    /// A list of all files which have uncommitted Git changes. There will only be
3363    /// a single entry for any given file.
3364    pub uncommitted_file_changes:
3365        std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
3366
3367    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3368}
3369
3370impl FetchFileGitStatusesResponse {
3371    pub fn new() -> Self {
3372        std::default::Default::default()
3373    }
3374
3375    /// Sets the value of [uncommitted_file_changes][crate::model::FetchFileGitStatusesResponse::uncommitted_file_changes].
3376    ///
3377    /// # Example
3378    /// ```ignore,no_run
3379    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesResponse;
3380    /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3381    /// let x = FetchFileGitStatusesResponse::new()
3382    ///     .set_uncommitted_file_changes([
3383    ///         UncommittedFileChange::default()/* use setters */,
3384    ///         UncommittedFileChange::default()/* use (different) setters */,
3385    ///     ]);
3386    /// ```
3387    pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
3388    where
3389        T: std::iter::IntoIterator<Item = V>,
3390        V: std::convert::Into<
3391                crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
3392            >,
3393    {
3394        use std::iter::Iterator;
3395        self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
3396        self
3397    }
3398}
3399
3400impl wkt::message::Message for FetchFileGitStatusesResponse {
3401    fn typename() -> &'static str {
3402        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
3403    }
3404}
3405
3406/// Defines additional types related to [FetchFileGitStatusesResponse].
3407pub mod fetch_file_git_statuses_response {
3408    #[allow(unused_imports)]
3409    use super::*;
3410
3411    /// Represents the Git state of a file with uncommitted changes.
3412    #[derive(Clone, Default, PartialEq)]
3413    #[non_exhaustive]
3414    pub struct UncommittedFileChange {
3415        /// The file's full path including filename, relative to the workspace root.
3416        pub path: std::string::String,
3417
3418        /// Output only. Indicates the status of the file.
3419        pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3420
3421        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3422    }
3423
3424    impl UncommittedFileChange {
3425        pub fn new() -> Self {
3426            std::default::Default::default()
3427        }
3428
3429        /// Sets the value of [path][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::path].
3430        ///
3431        /// # Example
3432        /// ```ignore,no_run
3433        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3434        /// let x = UncommittedFileChange::new().set_path("example");
3435        /// ```
3436        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3437            self.path = v.into();
3438            self
3439        }
3440
3441        /// Sets the value of [state][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::state].
3442        ///
3443        /// # Example
3444        /// ```ignore,no_run
3445        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3446        /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::uncommitted_file_change::State;
3447        /// let x0 = UncommittedFileChange::new().set_state(State::Added);
3448        /// let x1 = UncommittedFileChange::new().set_state(State::Deleted);
3449        /// let x2 = UncommittedFileChange::new().set_state(State::Modified);
3450        /// ```
3451        pub fn set_state<
3452            T: std::convert::Into<
3453                    crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3454                >,
3455        >(
3456            mut self,
3457            v: T,
3458        ) -> Self {
3459            self.state = v.into();
3460            self
3461        }
3462    }
3463
3464    impl wkt::message::Message for UncommittedFileChange {
3465        fn typename() -> &'static str {
3466            "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
3467        }
3468    }
3469
3470    /// Defines additional types related to [UncommittedFileChange].
3471    pub mod uncommitted_file_change {
3472        #[allow(unused_imports)]
3473        use super::*;
3474
3475        /// Indicates the status of an uncommitted file change.
3476        ///
3477        /// # Working with unknown values
3478        ///
3479        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3480        /// additional enum variants at any time. Adding new variants is not considered
3481        /// a breaking change. Applications should write their code in anticipation of:
3482        ///
3483        /// - New values appearing in future releases of the client library, **and**
3484        /// - New values received dynamically, without application changes.
3485        ///
3486        /// Please consult the [Working with enums] section in the user guide for some
3487        /// guidelines.
3488        ///
3489        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3490        #[derive(Clone, Debug, PartialEq)]
3491        #[non_exhaustive]
3492        pub enum State {
3493            /// Default value. This value is unused.
3494            Unspecified,
3495            /// The file has been newly added.
3496            Added,
3497            /// The file has been deleted.
3498            Deleted,
3499            /// The file has been modified.
3500            Modified,
3501            /// The file contains merge conflicts.
3502            HasConflicts,
3503            /// If set, the enum was initialized with an unknown value.
3504            ///
3505            /// Applications can examine the value using [State::value] or
3506            /// [State::name].
3507            UnknownValue(state::UnknownValue),
3508        }
3509
3510        #[doc(hidden)]
3511        pub mod state {
3512            #[allow(unused_imports)]
3513            use super::*;
3514            #[derive(Clone, Debug, PartialEq)]
3515            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3516        }
3517
3518        impl State {
3519            /// Gets the enum value.
3520            ///
3521            /// Returns `None` if the enum contains an unknown value deserialized from
3522            /// the string representation of enums.
3523            pub fn value(&self) -> std::option::Option<i32> {
3524                match self {
3525                    Self::Unspecified => std::option::Option::Some(0),
3526                    Self::Added => std::option::Option::Some(1),
3527                    Self::Deleted => std::option::Option::Some(2),
3528                    Self::Modified => std::option::Option::Some(3),
3529                    Self::HasConflicts => std::option::Option::Some(4),
3530                    Self::UnknownValue(u) => u.0.value(),
3531                }
3532            }
3533
3534            /// Gets the enum value as a string.
3535            ///
3536            /// Returns `None` if the enum contains an unknown value deserialized from
3537            /// the integer representation of enums.
3538            pub fn name(&self) -> std::option::Option<&str> {
3539                match self {
3540                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
3541                    Self::Added => std::option::Option::Some("ADDED"),
3542                    Self::Deleted => std::option::Option::Some("DELETED"),
3543                    Self::Modified => std::option::Option::Some("MODIFIED"),
3544                    Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
3545                    Self::UnknownValue(u) => u.0.name(),
3546                }
3547            }
3548        }
3549
3550        impl std::default::Default for State {
3551            fn default() -> Self {
3552                use std::convert::From;
3553                Self::from(0)
3554            }
3555        }
3556
3557        impl std::fmt::Display for State {
3558            fn fmt(
3559                &self,
3560                f: &mut std::fmt::Formatter<'_>,
3561            ) -> std::result::Result<(), std::fmt::Error> {
3562                wkt::internal::display_enum(f, self.name(), self.value())
3563            }
3564        }
3565
3566        impl std::convert::From<i32> for State {
3567            fn from(value: i32) -> Self {
3568                match value {
3569                    0 => Self::Unspecified,
3570                    1 => Self::Added,
3571                    2 => Self::Deleted,
3572                    3 => Self::Modified,
3573                    4 => Self::HasConflicts,
3574                    _ => Self::UnknownValue(state::UnknownValue(
3575                        wkt::internal::UnknownEnumValue::Integer(value),
3576                    )),
3577                }
3578            }
3579        }
3580
3581        impl std::convert::From<&str> for State {
3582            fn from(value: &str) -> Self {
3583                use std::string::ToString;
3584                match value {
3585                    "STATE_UNSPECIFIED" => Self::Unspecified,
3586                    "ADDED" => Self::Added,
3587                    "DELETED" => Self::Deleted,
3588                    "MODIFIED" => Self::Modified,
3589                    "HAS_CONFLICTS" => Self::HasConflicts,
3590                    _ => Self::UnknownValue(state::UnknownValue(
3591                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3592                    )),
3593                }
3594            }
3595        }
3596
3597        impl serde::ser::Serialize for State {
3598            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3599            where
3600                S: serde::Serializer,
3601            {
3602                match self {
3603                    Self::Unspecified => serializer.serialize_i32(0),
3604                    Self::Added => serializer.serialize_i32(1),
3605                    Self::Deleted => serializer.serialize_i32(2),
3606                    Self::Modified => serializer.serialize_i32(3),
3607                    Self::HasConflicts => serializer.serialize_i32(4),
3608                    Self::UnknownValue(u) => u.0.serialize(serializer),
3609                }
3610            }
3611        }
3612
3613        impl<'de> serde::de::Deserialize<'de> for State {
3614            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3615            where
3616                D: serde::Deserializer<'de>,
3617            {
3618                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
3619                    ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
3620            }
3621        }
3622    }
3623}
3624
3625/// `FetchGitAheadBehind` request message.
3626#[derive(Clone, Default, PartialEq)]
3627#[non_exhaustive]
3628pub struct FetchGitAheadBehindRequest {
3629    /// Required. The workspace's name.
3630    pub name: std::string::String,
3631
3632    /// Optional. The name of the branch in the Git remote against which this
3633    /// workspace should be compared. If left unset, the repository's default
3634    /// branch name will be used.
3635    pub remote_branch: std::string::String,
3636
3637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3638}
3639
3640impl FetchGitAheadBehindRequest {
3641    pub fn new() -> Self {
3642        std::default::Default::default()
3643    }
3644
3645    /// Sets the value of [name][crate::model::FetchGitAheadBehindRequest::name].
3646    ///
3647    /// # Example
3648    /// ```ignore,no_run
3649    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
3650    /// let x = FetchGitAheadBehindRequest::new().set_name("example");
3651    /// ```
3652    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3653        self.name = v.into();
3654        self
3655    }
3656
3657    /// Sets the value of [remote_branch][crate::model::FetchGitAheadBehindRequest::remote_branch].
3658    ///
3659    /// # Example
3660    /// ```ignore,no_run
3661    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
3662    /// let x = FetchGitAheadBehindRequest::new().set_remote_branch("example");
3663    /// ```
3664    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3665        self.remote_branch = v.into();
3666        self
3667    }
3668}
3669
3670impl wkt::message::Message for FetchGitAheadBehindRequest {
3671    fn typename() -> &'static str {
3672        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
3673    }
3674}
3675
3676/// `FetchGitAheadBehind` response message.
3677#[derive(Clone, Default, PartialEq)]
3678#[non_exhaustive]
3679pub struct FetchGitAheadBehindResponse {
3680    /// The number of commits in the remote branch that are not in the workspace.
3681    pub commits_ahead: i32,
3682
3683    /// The number of commits in the workspace that are not in the remote branch.
3684    pub commits_behind: i32,
3685
3686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3687}
3688
3689impl FetchGitAheadBehindResponse {
3690    pub fn new() -> Self {
3691        std::default::Default::default()
3692    }
3693
3694    /// Sets the value of [commits_ahead][crate::model::FetchGitAheadBehindResponse::commits_ahead].
3695    ///
3696    /// # Example
3697    /// ```ignore,no_run
3698    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
3699    /// let x = FetchGitAheadBehindResponse::new().set_commits_ahead(42);
3700    /// ```
3701    pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3702        self.commits_ahead = v.into();
3703        self
3704    }
3705
3706    /// Sets the value of [commits_behind][crate::model::FetchGitAheadBehindResponse::commits_behind].
3707    ///
3708    /// # Example
3709    /// ```ignore,no_run
3710    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
3711    /// let x = FetchGitAheadBehindResponse::new().set_commits_behind(42);
3712    /// ```
3713    pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3714        self.commits_behind = v.into();
3715        self
3716    }
3717}
3718
3719impl wkt::message::Message for FetchGitAheadBehindResponse {
3720    fn typename() -> &'static str {
3721        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
3722    }
3723}
3724
3725/// `CommitWorkspaceChanges` request message.
3726#[derive(Clone, Default, PartialEq)]
3727#[non_exhaustive]
3728pub struct CommitWorkspaceChangesRequest {
3729    /// Required. The workspace's name.
3730    pub name: std::string::String,
3731
3732    /// Required. The commit's author.
3733    pub author: std::option::Option<crate::model::CommitAuthor>,
3734
3735    /// Optional. The commit's message.
3736    pub commit_message: std::string::String,
3737
3738    /// Optional. Full file paths to commit including filename, rooted at workspace
3739    /// root. If left empty, all files will be committed.
3740    pub paths: std::vec::Vec<std::string::String>,
3741
3742    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3743}
3744
3745impl CommitWorkspaceChangesRequest {
3746    pub fn new() -> Self {
3747        std::default::Default::default()
3748    }
3749
3750    /// Sets the value of [name][crate::model::CommitWorkspaceChangesRequest::name].
3751    ///
3752    /// # Example
3753    /// ```ignore,no_run
3754    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3755    /// let x = CommitWorkspaceChangesRequest::new().set_name("example");
3756    /// ```
3757    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3758        self.name = v.into();
3759        self
3760    }
3761
3762    /// Sets the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
3763    ///
3764    /// # Example
3765    /// ```ignore,no_run
3766    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3767    /// use google_cloud_dataform_v1::model::CommitAuthor;
3768    /// let x = CommitWorkspaceChangesRequest::new().set_author(CommitAuthor::default()/* use setters */);
3769    /// ```
3770    pub fn set_author<T>(mut self, v: T) -> Self
3771    where
3772        T: std::convert::Into<crate::model::CommitAuthor>,
3773    {
3774        self.author = std::option::Option::Some(v.into());
3775        self
3776    }
3777
3778    /// Sets or clears the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
3779    ///
3780    /// # Example
3781    /// ```ignore,no_run
3782    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3783    /// use google_cloud_dataform_v1::model::CommitAuthor;
3784    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
3785    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(None::<CommitAuthor>);
3786    /// ```
3787    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
3788    where
3789        T: std::convert::Into<crate::model::CommitAuthor>,
3790    {
3791        self.author = v.map(|x| x.into());
3792        self
3793    }
3794
3795    /// Sets the value of [commit_message][crate::model::CommitWorkspaceChangesRequest::commit_message].
3796    ///
3797    /// # Example
3798    /// ```ignore,no_run
3799    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3800    /// let x = CommitWorkspaceChangesRequest::new().set_commit_message("example");
3801    /// ```
3802    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3803        self.commit_message = v.into();
3804        self
3805    }
3806
3807    /// Sets the value of [paths][crate::model::CommitWorkspaceChangesRequest::paths].
3808    ///
3809    /// # Example
3810    /// ```ignore,no_run
3811    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3812    /// let x = CommitWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
3813    /// ```
3814    pub fn set_paths<T, V>(mut self, v: T) -> Self
3815    where
3816        T: std::iter::IntoIterator<Item = V>,
3817        V: std::convert::Into<std::string::String>,
3818    {
3819        use std::iter::Iterator;
3820        self.paths = v.into_iter().map(|i| i.into()).collect();
3821        self
3822    }
3823}
3824
3825impl wkt::message::Message for CommitWorkspaceChangesRequest {
3826    fn typename() -> &'static str {
3827        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
3828    }
3829}
3830
3831/// `CommitWorkspaceChanges` response message.
3832#[derive(Clone, Default, PartialEq)]
3833#[non_exhaustive]
3834pub struct CommitWorkspaceChangesResponse {
3835    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3836}
3837
3838impl CommitWorkspaceChangesResponse {
3839    pub fn new() -> Self {
3840        std::default::Default::default()
3841    }
3842}
3843
3844impl wkt::message::Message for CommitWorkspaceChangesResponse {
3845    fn typename() -> &'static str {
3846        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
3847    }
3848}
3849
3850/// `ResetWorkspaceChanges` request message.
3851#[derive(Clone, Default, PartialEq)]
3852#[non_exhaustive]
3853pub struct ResetWorkspaceChangesRequest {
3854    /// Required. The workspace's name.
3855    pub name: std::string::String,
3856
3857    /// Optional. Full file paths to reset back to their committed state including
3858    /// filename, rooted at workspace root. If left empty, all files will be reset.
3859    pub paths: std::vec::Vec<std::string::String>,
3860
3861    /// Optional. If set to true, untracked files will be deleted.
3862    pub clean: bool,
3863
3864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3865}
3866
3867impl ResetWorkspaceChangesRequest {
3868    pub fn new() -> Self {
3869        std::default::Default::default()
3870    }
3871
3872    /// Sets the value of [name][crate::model::ResetWorkspaceChangesRequest::name].
3873    ///
3874    /// # Example
3875    /// ```ignore,no_run
3876    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
3877    /// let x = ResetWorkspaceChangesRequest::new().set_name("example");
3878    /// ```
3879    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3880        self.name = v.into();
3881        self
3882    }
3883
3884    /// Sets the value of [paths][crate::model::ResetWorkspaceChangesRequest::paths].
3885    ///
3886    /// # Example
3887    /// ```ignore,no_run
3888    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
3889    /// let x = ResetWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
3890    /// ```
3891    pub fn set_paths<T, V>(mut self, v: T) -> Self
3892    where
3893        T: std::iter::IntoIterator<Item = V>,
3894        V: std::convert::Into<std::string::String>,
3895    {
3896        use std::iter::Iterator;
3897        self.paths = v.into_iter().map(|i| i.into()).collect();
3898        self
3899    }
3900
3901    /// Sets the value of [clean][crate::model::ResetWorkspaceChangesRequest::clean].
3902    ///
3903    /// # Example
3904    /// ```ignore,no_run
3905    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
3906    /// let x = ResetWorkspaceChangesRequest::new().set_clean(true);
3907    /// ```
3908    pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3909        self.clean = v.into();
3910        self
3911    }
3912}
3913
3914impl wkt::message::Message for ResetWorkspaceChangesRequest {
3915    fn typename() -> &'static str {
3916        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
3917    }
3918}
3919
3920/// `ResetWorkspaceChanges` response message.
3921#[derive(Clone, Default, PartialEq)]
3922#[non_exhaustive]
3923pub struct ResetWorkspaceChangesResponse {
3924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3925}
3926
3927impl ResetWorkspaceChangesResponse {
3928    pub fn new() -> Self {
3929        std::default::Default::default()
3930    }
3931}
3932
3933impl wkt::message::Message for ResetWorkspaceChangesResponse {
3934    fn typename() -> &'static str {
3935        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
3936    }
3937}
3938
3939/// `FetchFileDiff` request message.
3940#[derive(Clone, Default, PartialEq)]
3941#[non_exhaustive]
3942pub struct FetchFileDiffRequest {
3943    /// Required. The workspace's name.
3944    pub workspace: std::string::String,
3945
3946    /// Required. The file's full path including filename, relative to the
3947    /// workspace root.
3948    pub path: std::string::String,
3949
3950    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3951}
3952
3953impl FetchFileDiffRequest {
3954    pub fn new() -> Self {
3955        std::default::Default::default()
3956    }
3957
3958    /// Sets the value of [workspace][crate::model::FetchFileDiffRequest::workspace].
3959    ///
3960    /// # Example
3961    /// ```ignore,no_run
3962    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
3963    /// let x = FetchFileDiffRequest::new().set_workspace("example");
3964    /// ```
3965    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3966        self.workspace = v.into();
3967        self
3968    }
3969
3970    /// Sets the value of [path][crate::model::FetchFileDiffRequest::path].
3971    ///
3972    /// # Example
3973    /// ```ignore,no_run
3974    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
3975    /// let x = FetchFileDiffRequest::new().set_path("example");
3976    /// ```
3977    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3978        self.path = v.into();
3979        self
3980    }
3981}
3982
3983impl wkt::message::Message for FetchFileDiffRequest {
3984    fn typename() -> &'static str {
3985        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
3986    }
3987}
3988
3989/// `FetchFileDiff` response message.
3990#[derive(Clone, Default, PartialEq)]
3991#[non_exhaustive]
3992pub struct FetchFileDiffResponse {
3993    /// The raw formatted Git diff for the file.
3994    pub formatted_diff: std::string::String,
3995
3996    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3997}
3998
3999impl FetchFileDiffResponse {
4000    pub fn new() -> Self {
4001        std::default::Default::default()
4002    }
4003
4004    /// Sets the value of [formatted_diff][crate::model::FetchFileDiffResponse::formatted_diff].
4005    ///
4006    /// # Example
4007    /// ```ignore,no_run
4008    /// # use google_cloud_dataform_v1::model::FetchFileDiffResponse;
4009    /// let x = FetchFileDiffResponse::new().set_formatted_diff("example");
4010    /// ```
4011    pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4012        self.formatted_diff = v.into();
4013        self
4014    }
4015}
4016
4017impl wkt::message::Message for FetchFileDiffResponse {
4018    fn typename() -> &'static str {
4019        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
4020    }
4021}
4022
4023/// `QueryDirectoryContents` request message.
4024#[derive(Clone, Default, PartialEq)]
4025#[non_exhaustive]
4026pub struct QueryDirectoryContentsRequest {
4027    /// Required. The workspace's name.
4028    pub workspace: std::string::String,
4029
4030    /// Optional. The directory's full path including directory name, relative to
4031    /// the workspace root. If left unset, the workspace root is used.
4032    pub path: std::string::String,
4033
4034    /// Optional. Maximum number of paths to return. The server may return fewer
4035    /// items than requested. If unspecified, the server will pick an appropriate
4036    /// default.
4037    pub page_size: i32,
4038
4039    /// Optional. Page token received from a previous `QueryDirectoryContents`
4040    /// call. Provide this to retrieve the subsequent page.
4041    ///
4042    /// When paginating, all other parameters provided to
4043    /// `QueryDirectoryContents`, with the exception of `page_size`, must match the
4044    /// call that provided the page token.
4045    pub page_token: std::string::String,
4046
4047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4048}
4049
4050impl QueryDirectoryContentsRequest {
4051    pub fn new() -> Self {
4052        std::default::Default::default()
4053    }
4054
4055    /// Sets the value of [workspace][crate::model::QueryDirectoryContentsRequest::workspace].
4056    ///
4057    /// # Example
4058    /// ```ignore,no_run
4059    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4060    /// let x = QueryDirectoryContentsRequest::new().set_workspace("example");
4061    /// ```
4062    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4063        self.workspace = v.into();
4064        self
4065    }
4066
4067    /// Sets the value of [path][crate::model::QueryDirectoryContentsRequest::path].
4068    ///
4069    /// # Example
4070    /// ```ignore,no_run
4071    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4072    /// let x = QueryDirectoryContentsRequest::new().set_path("example");
4073    /// ```
4074    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4075        self.path = v.into();
4076        self
4077    }
4078
4079    /// Sets the value of [page_size][crate::model::QueryDirectoryContentsRequest::page_size].
4080    ///
4081    /// # Example
4082    /// ```ignore,no_run
4083    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4084    /// let x = QueryDirectoryContentsRequest::new().set_page_size(42);
4085    /// ```
4086    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4087        self.page_size = v.into();
4088        self
4089    }
4090
4091    /// Sets the value of [page_token][crate::model::QueryDirectoryContentsRequest::page_token].
4092    ///
4093    /// # Example
4094    /// ```ignore,no_run
4095    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4096    /// let x = QueryDirectoryContentsRequest::new().set_page_token("example");
4097    /// ```
4098    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4099        self.page_token = v.into();
4100        self
4101    }
4102}
4103
4104impl wkt::message::Message for QueryDirectoryContentsRequest {
4105    fn typename() -> &'static str {
4106        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
4107    }
4108}
4109
4110/// `QueryDirectoryContents` response message.
4111#[derive(Clone, Default, PartialEq)]
4112#[non_exhaustive]
4113pub struct QueryDirectoryContentsResponse {
4114    /// List of entries in the directory.
4115    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
4116
4117    /// A token, which can be sent as `page_token` to retrieve the next page.
4118    /// If this field is omitted, there are no subsequent pages.
4119    pub next_page_token: std::string::String,
4120
4121    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4122}
4123
4124impl QueryDirectoryContentsResponse {
4125    pub fn new() -> Self {
4126        std::default::Default::default()
4127    }
4128
4129    /// Sets the value of [directory_entries][crate::model::QueryDirectoryContentsResponse::directory_entries].
4130    ///
4131    /// # Example
4132    /// ```ignore,no_run
4133    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4134    /// use google_cloud_dataform_v1::model::DirectoryEntry;
4135    /// let x = QueryDirectoryContentsResponse::new()
4136    ///     .set_directory_entries([
4137    ///         DirectoryEntry::default()/* use setters */,
4138    ///         DirectoryEntry::default()/* use (different) setters */,
4139    ///     ]);
4140    /// ```
4141    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
4142    where
4143        T: std::iter::IntoIterator<Item = V>,
4144        V: std::convert::Into<crate::model::DirectoryEntry>,
4145    {
4146        use std::iter::Iterator;
4147        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
4148        self
4149    }
4150
4151    /// Sets the value of [next_page_token][crate::model::QueryDirectoryContentsResponse::next_page_token].
4152    ///
4153    /// # Example
4154    /// ```ignore,no_run
4155    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4156    /// let x = QueryDirectoryContentsResponse::new().set_next_page_token("example");
4157    /// ```
4158    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4159        self.next_page_token = v.into();
4160        self
4161    }
4162}
4163
4164impl wkt::message::Message for QueryDirectoryContentsResponse {
4165    fn typename() -> &'static str {
4166        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
4167    }
4168}
4169
4170#[doc(hidden)]
4171impl gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
4172    type PageItem = crate::model::DirectoryEntry;
4173
4174    fn items(self) -> std::vec::Vec<Self::PageItem> {
4175        self.directory_entries
4176    }
4177
4178    fn next_page_token(&self) -> std::string::String {
4179        use std::clone::Clone;
4180        self.next_page_token.clone()
4181    }
4182}
4183
4184/// Represents a single entry in a directory.
4185#[derive(Clone, Default, PartialEq)]
4186#[non_exhaustive]
4187pub struct DirectoryEntry {
4188    /// The entry's contents.
4189    pub entry: std::option::Option<crate::model::directory_entry::Entry>,
4190
4191    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4192}
4193
4194impl DirectoryEntry {
4195    pub fn new() -> Self {
4196        std::default::Default::default()
4197    }
4198
4199    /// Sets the value of [entry][crate::model::DirectoryEntry::entry].
4200    ///
4201    /// Note that all the setters affecting `entry` are mutually
4202    /// exclusive.
4203    ///
4204    /// # Example
4205    /// ```ignore,no_run
4206    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4207    /// use google_cloud_dataform_v1::model::directory_entry::Entry;
4208    /// let x = DirectoryEntry::new().set_entry(Some(Entry::File("example".to_string())));
4209    /// ```
4210    pub fn set_entry<
4211        T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
4212    >(
4213        mut self,
4214        v: T,
4215    ) -> Self {
4216        self.entry = v.into();
4217        self
4218    }
4219
4220    /// The value of [entry][crate::model::DirectoryEntry::entry]
4221    /// if it holds a `File`, `None` if the field is not set or
4222    /// holds a different branch.
4223    pub fn file(&self) -> std::option::Option<&std::string::String> {
4224        #[allow(unreachable_patterns)]
4225        self.entry.as_ref().and_then(|v| match v {
4226            crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
4227            _ => std::option::Option::None,
4228        })
4229    }
4230
4231    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4232    /// to hold a `File`.
4233    ///
4234    /// Note that all the setters affecting `entry` are
4235    /// mutually exclusive.
4236    ///
4237    /// # Example
4238    /// ```ignore,no_run
4239    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4240    /// let x = DirectoryEntry::new().set_file("example");
4241    /// assert!(x.file().is_some());
4242    /// assert!(x.directory().is_none());
4243    /// ```
4244    pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4245        self.entry =
4246            std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
4247        self
4248    }
4249
4250    /// The value of [entry][crate::model::DirectoryEntry::entry]
4251    /// if it holds a `Directory`, `None` if the field is not set or
4252    /// holds a different branch.
4253    pub fn directory(&self) -> std::option::Option<&std::string::String> {
4254        #[allow(unreachable_patterns)]
4255        self.entry.as_ref().and_then(|v| match v {
4256            crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
4257            _ => std::option::Option::None,
4258        })
4259    }
4260
4261    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4262    /// to hold a `Directory`.
4263    ///
4264    /// Note that all the setters affecting `entry` are
4265    /// mutually exclusive.
4266    ///
4267    /// # Example
4268    /// ```ignore,no_run
4269    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4270    /// let x = DirectoryEntry::new().set_directory("example");
4271    /// assert!(x.directory().is_some());
4272    /// assert!(x.file().is_none());
4273    /// ```
4274    pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4275        self.entry =
4276            std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
4277        self
4278    }
4279}
4280
4281impl wkt::message::Message for DirectoryEntry {
4282    fn typename() -> &'static str {
4283        "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
4284    }
4285}
4286
4287/// Defines additional types related to [DirectoryEntry].
4288pub mod directory_entry {
4289    #[allow(unused_imports)]
4290    use super::*;
4291
4292    /// The entry's contents.
4293    #[derive(Clone, Debug, PartialEq)]
4294    #[non_exhaustive]
4295    pub enum Entry {
4296        /// A file in the directory.
4297        File(std::string::String),
4298        /// A child directory in the directory.
4299        Directory(std::string::String),
4300    }
4301}
4302
4303/// Configuration containing file search request parameters.
4304#[derive(Clone, Default, PartialEq)]
4305#[non_exhaustive]
4306pub struct SearchFilesRequest {
4307    /// Required. The workspace's name.
4308    pub workspace: std::string::String,
4309
4310    /// Optional. Maximum number of search results to return. The server may return
4311    /// fewer items than requested. If unspecified, the server will pick an
4312    /// appropriate default.
4313    pub page_size: i32,
4314
4315    /// Optional. Page token received from a previous `SearchFilesRequest`
4316    /// call. Provide this to retrieve the subsequent page.
4317    ///
4318    /// When paginating, all other parameters provided to `SearchFilesRequest`,
4319    /// with the exception of `page_size`, must match the call that provided the
4320    /// page token.
4321    pub page_token: std::string::String,
4322
4323    /// Optional. Optional filter for the returned list in filtering format.
4324    /// Filtering is only currently supported on the `path` field.
4325    /// See <https://google.aip.dev/160> for details.
4326    pub filter: std::string::String,
4327
4328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4329}
4330
4331impl SearchFilesRequest {
4332    pub fn new() -> Self {
4333        std::default::Default::default()
4334    }
4335
4336    /// Sets the value of [workspace][crate::model::SearchFilesRequest::workspace].
4337    ///
4338    /// # Example
4339    /// ```ignore,no_run
4340    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4341    /// let x = SearchFilesRequest::new().set_workspace("example");
4342    /// ```
4343    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4344        self.workspace = v.into();
4345        self
4346    }
4347
4348    /// Sets the value of [page_size][crate::model::SearchFilesRequest::page_size].
4349    ///
4350    /// # Example
4351    /// ```ignore,no_run
4352    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4353    /// let x = SearchFilesRequest::new().set_page_size(42);
4354    /// ```
4355    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4356        self.page_size = v.into();
4357        self
4358    }
4359
4360    /// Sets the value of [page_token][crate::model::SearchFilesRequest::page_token].
4361    ///
4362    /// # Example
4363    /// ```ignore,no_run
4364    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4365    /// let x = SearchFilesRequest::new().set_page_token("example");
4366    /// ```
4367    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4368        self.page_token = v.into();
4369        self
4370    }
4371
4372    /// Sets the value of [filter][crate::model::SearchFilesRequest::filter].
4373    ///
4374    /// # Example
4375    /// ```ignore,no_run
4376    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4377    /// let x = SearchFilesRequest::new().set_filter("example");
4378    /// ```
4379    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4380        self.filter = v.into();
4381        self
4382    }
4383}
4384
4385impl wkt::message::Message for SearchFilesRequest {
4386    fn typename() -> &'static str {
4387        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
4388    }
4389}
4390
4391/// Client-facing representation of a file search response.
4392#[derive(Clone, Default, PartialEq)]
4393#[non_exhaustive]
4394pub struct SearchFilesResponse {
4395    /// List of matched results.
4396    pub search_results: std::vec::Vec<crate::model::SearchResult>,
4397
4398    /// Optional. A token, which can be sent as `page_token` to retrieve the next
4399    /// page. If this field is omitted, there are no subsequent pages.
4400    pub next_page_token: std::string::String,
4401
4402    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4403}
4404
4405impl SearchFilesResponse {
4406    pub fn new() -> Self {
4407        std::default::Default::default()
4408    }
4409
4410    /// Sets the value of [search_results][crate::model::SearchFilesResponse::search_results].
4411    ///
4412    /// # Example
4413    /// ```ignore,no_run
4414    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4415    /// use google_cloud_dataform_v1::model::SearchResult;
4416    /// let x = SearchFilesResponse::new()
4417    ///     .set_search_results([
4418    ///         SearchResult::default()/* use setters */,
4419    ///         SearchResult::default()/* use (different) setters */,
4420    ///     ]);
4421    /// ```
4422    pub fn set_search_results<T, V>(mut self, v: T) -> Self
4423    where
4424        T: std::iter::IntoIterator<Item = V>,
4425        V: std::convert::Into<crate::model::SearchResult>,
4426    {
4427        use std::iter::Iterator;
4428        self.search_results = v.into_iter().map(|i| i.into()).collect();
4429        self
4430    }
4431
4432    /// Sets the value of [next_page_token][crate::model::SearchFilesResponse::next_page_token].
4433    ///
4434    /// # Example
4435    /// ```ignore,no_run
4436    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4437    /// let x = SearchFilesResponse::new().set_next_page_token("example");
4438    /// ```
4439    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4440        self.next_page_token = v.into();
4441        self
4442    }
4443}
4444
4445impl wkt::message::Message for SearchFilesResponse {
4446    fn typename() -> &'static str {
4447        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
4448    }
4449}
4450
4451#[doc(hidden)]
4452impl gax::paginator::internal::PageableResponse for SearchFilesResponse {
4453    type PageItem = crate::model::SearchResult;
4454
4455    fn items(self) -> std::vec::Vec<Self::PageItem> {
4456        self.search_results
4457    }
4458
4459    fn next_page_token(&self) -> std::string::String {
4460        use std::clone::Clone;
4461        self.next_page_token.clone()
4462    }
4463}
4464
4465/// Client-facing representation of a search result entry.
4466#[derive(Clone, Default, PartialEq)]
4467#[non_exhaustive]
4468pub struct SearchResult {
4469    /// The entry's contents.
4470    pub entry: std::option::Option<crate::model::search_result::Entry>,
4471
4472    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4473}
4474
4475impl SearchResult {
4476    pub fn new() -> Self {
4477        std::default::Default::default()
4478    }
4479
4480    /// Sets the value of [entry][crate::model::SearchResult::entry].
4481    ///
4482    /// Note that all the setters affecting `entry` are mutually
4483    /// exclusive.
4484    ///
4485    /// # Example
4486    /// ```ignore,no_run
4487    /// # use google_cloud_dataform_v1::model::SearchResult;
4488    /// use google_cloud_dataform_v1::model::FileSearchResult;
4489    /// let x = SearchResult::new().set_entry(Some(
4490    ///     google_cloud_dataform_v1::model::search_result::Entry::File(FileSearchResult::default().into())));
4491    /// ```
4492    pub fn set_entry<
4493        T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
4494    >(
4495        mut self,
4496        v: T,
4497    ) -> Self {
4498        self.entry = v.into();
4499        self
4500    }
4501
4502    /// The value of [entry][crate::model::SearchResult::entry]
4503    /// if it holds a `File`, `None` if the field is not set or
4504    /// holds a different branch.
4505    pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
4506        #[allow(unreachable_patterns)]
4507        self.entry.as_ref().and_then(|v| match v {
4508            crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
4509            _ => std::option::Option::None,
4510        })
4511    }
4512
4513    /// Sets the value of [entry][crate::model::SearchResult::entry]
4514    /// to hold a `File`.
4515    ///
4516    /// Note that all the setters affecting `entry` are
4517    /// mutually exclusive.
4518    ///
4519    /// # Example
4520    /// ```ignore,no_run
4521    /// # use google_cloud_dataform_v1::model::SearchResult;
4522    /// use google_cloud_dataform_v1::model::FileSearchResult;
4523    /// let x = SearchResult::new().set_file(FileSearchResult::default()/* use setters */);
4524    /// assert!(x.file().is_some());
4525    /// assert!(x.directory().is_none());
4526    /// ```
4527    pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
4528        mut self,
4529        v: T,
4530    ) -> Self {
4531        self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
4532        self
4533    }
4534
4535    /// The value of [entry][crate::model::SearchResult::entry]
4536    /// if it holds a `Directory`, `None` if the field is not set or
4537    /// holds a different branch.
4538    pub fn directory(
4539        &self,
4540    ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
4541        #[allow(unreachable_patterns)]
4542        self.entry.as_ref().and_then(|v| match v {
4543            crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
4544            _ => std::option::Option::None,
4545        })
4546    }
4547
4548    /// Sets the value of [entry][crate::model::SearchResult::entry]
4549    /// to hold a `Directory`.
4550    ///
4551    /// Note that all the setters affecting `entry` are
4552    /// mutually exclusive.
4553    ///
4554    /// # Example
4555    /// ```ignore,no_run
4556    /// # use google_cloud_dataform_v1::model::SearchResult;
4557    /// use google_cloud_dataform_v1::model::DirectorySearchResult;
4558    /// let x = SearchResult::new().set_directory(DirectorySearchResult::default()/* use setters */);
4559    /// assert!(x.directory().is_some());
4560    /// assert!(x.file().is_none());
4561    /// ```
4562    pub fn set_directory<
4563        T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
4564    >(
4565        mut self,
4566        v: T,
4567    ) -> Self {
4568        self.entry =
4569            std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
4570        self
4571    }
4572}
4573
4574impl wkt::message::Message for SearchResult {
4575    fn typename() -> &'static str {
4576        "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
4577    }
4578}
4579
4580/// Defines additional types related to [SearchResult].
4581pub mod search_result {
4582    #[allow(unused_imports)]
4583    use super::*;
4584
4585    /// The entry's contents.
4586    #[derive(Clone, Debug, PartialEq)]
4587    #[non_exhaustive]
4588    pub enum Entry {
4589        /// Details when search result is a file.
4590        File(std::boxed::Box<crate::model::FileSearchResult>),
4591        /// Details when search result is a directory.
4592        Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
4593    }
4594}
4595
4596/// Client-facing representation of a file entry in search results.
4597#[derive(Clone, Default, PartialEq)]
4598#[non_exhaustive]
4599pub struct FileSearchResult {
4600    /// File system path relative to the workspace root.
4601    pub path: std::string::String,
4602
4603    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4604}
4605
4606impl FileSearchResult {
4607    pub fn new() -> Self {
4608        std::default::Default::default()
4609    }
4610
4611    /// Sets the value of [path][crate::model::FileSearchResult::path].
4612    ///
4613    /// # Example
4614    /// ```ignore,no_run
4615    /// # use google_cloud_dataform_v1::model::FileSearchResult;
4616    /// let x = FileSearchResult::new().set_path("example");
4617    /// ```
4618    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4619        self.path = v.into();
4620        self
4621    }
4622}
4623
4624impl wkt::message::Message for FileSearchResult {
4625    fn typename() -> &'static str {
4626        "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
4627    }
4628}
4629
4630/// Client-facing representation of a directory entry in search results.
4631#[derive(Clone, Default, PartialEq)]
4632#[non_exhaustive]
4633pub struct DirectorySearchResult {
4634    /// File system path relative to the workspace root.
4635    pub path: std::string::String,
4636
4637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4638}
4639
4640impl DirectorySearchResult {
4641    pub fn new() -> Self {
4642        std::default::Default::default()
4643    }
4644
4645    /// Sets the value of [path][crate::model::DirectorySearchResult::path].
4646    ///
4647    /// # Example
4648    /// ```ignore,no_run
4649    /// # use google_cloud_dataform_v1::model::DirectorySearchResult;
4650    /// let x = DirectorySearchResult::new().set_path("example");
4651    /// ```
4652    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4653        self.path = v.into();
4654        self
4655    }
4656}
4657
4658impl wkt::message::Message for DirectorySearchResult {
4659    fn typename() -> &'static str {
4660        "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
4661    }
4662}
4663
4664/// `MakeDirectory` request message.
4665#[derive(Clone, Default, PartialEq)]
4666#[non_exhaustive]
4667pub struct MakeDirectoryRequest {
4668    /// Required. The workspace's name.
4669    pub workspace: std::string::String,
4670
4671    /// Required. The directory's full path including directory name, relative to
4672    /// the workspace root.
4673    pub path: std::string::String,
4674
4675    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4676}
4677
4678impl MakeDirectoryRequest {
4679    pub fn new() -> Self {
4680        std::default::Default::default()
4681    }
4682
4683    /// Sets the value of [workspace][crate::model::MakeDirectoryRequest::workspace].
4684    ///
4685    /// # Example
4686    /// ```ignore,no_run
4687    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
4688    /// let x = MakeDirectoryRequest::new().set_workspace("example");
4689    /// ```
4690    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4691        self.workspace = v.into();
4692        self
4693    }
4694
4695    /// Sets the value of [path][crate::model::MakeDirectoryRequest::path].
4696    ///
4697    /// # Example
4698    /// ```ignore,no_run
4699    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
4700    /// let x = MakeDirectoryRequest::new().set_path("example");
4701    /// ```
4702    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4703        self.path = v.into();
4704        self
4705    }
4706}
4707
4708impl wkt::message::Message for MakeDirectoryRequest {
4709    fn typename() -> &'static str {
4710        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
4711    }
4712}
4713
4714/// `MakeDirectory` response message.
4715#[derive(Clone, Default, PartialEq)]
4716#[non_exhaustive]
4717pub struct MakeDirectoryResponse {
4718    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4719}
4720
4721impl MakeDirectoryResponse {
4722    pub fn new() -> Self {
4723        std::default::Default::default()
4724    }
4725}
4726
4727impl wkt::message::Message for MakeDirectoryResponse {
4728    fn typename() -> &'static str {
4729        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
4730    }
4731}
4732
4733/// `RemoveDirectory` request message.
4734#[derive(Clone, Default, PartialEq)]
4735#[non_exhaustive]
4736pub struct RemoveDirectoryRequest {
4737    /// Required. The workspace's name.
4738    pub workspace: std::string::String,
4739
4740    /// Required. The directory's full path including directory name, relative to
4741    /// the workspace root.
4742    pub path: std::string::String,
4743
4744    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4745}
4746
4747impl RemoveDirectoryRequest {
4748    pub fn new() -> Self {
4749        std::default::Default::default()
4750    }
4751
4752    /// Sets the value of [workspace][crate::model::RemoveDirectoryRequest::workspace].
4753    ///
4754    /// # Example
4755    /// ```ignore,no_run
4756    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
4757    /// let x = RemoveDirectoryRequest::new().set_workspace("example");
4758    /// ```
4759    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4760        self.workspace = v.into();
4761        self
4762    }
4763
4764    /// Sets the value of [path][crate::model::RemoveDirectoryRequest::path].
4765    ///
4766    /// # Example
4767    /// ```ignore,no_run
4768    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
4769    /// let x = RemoveDirectoryRequest::new().set_path("example");
4770    /// ```
4771    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4772        self.path = v.into();
4773        self
4774    }
4775}
4776
4777impl wkt::message::Message for RemoveDirectoryRequest {
4778    fn typename() -> &'static str {
4779        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
4780    }
4781}
4782
4783/// `RemoveDirectory` response message.
4784#[derive(Clone, Default, PartialEq)]
4785#[non_exhaustive]
4786pub struct RemoveDirectoryResponse {
4787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4788}
4789
4790impl RemoveDirectoryResponse {
4791    pub fn new() -> Self {
4792        std::default::Default::default()
4793    }
4794}
4795
4796impl wkt::message::Message for RemoveDirectoryResponse {
4797    fn typename() -> &'static str {
4798        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
4799    }
4800}
4801
4802/// `MoveDirectory` request message.
4803#[derive(Clone, Default, PartialEq)]
4804#[non_exhaustive]
4805pub struct MoveDirectoryRequest {
4806    /// Required. The workspace's name.
4807    pub workspace: std::string::String,
4808
4809    /// Required. The directory's full path including directory name, relative to
4810    /// the workspace root.
4811    pub path: std::string::String,
4812
4813    /// Required. The new path for the directory including directory name, rooted
4814    /// at workspace root.
4815    pub new_path: std::string::String,
4816
4817    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4818}
4819
4820impl MoveDirectoryRequest {
4821    pub fn new() -> Self {
4822        std::default::Default::default()
4823    }
4824
4825    /// Sets the value of [workspace][crate::model::MoveDirectoryRequest::workspace].
4826    ///
4827    /// # Example
4828    /// ```ignore,no_run
4829    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
4830    /// let x = MoveDirectoryRequest::new().set_workspace("example");
4831    /// ```
4832    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4833        self.workspace = v.into();
4834        self
4835    }
4836
4837    /// Sets the value of [path][crate::model::MoveDirectoryRequest::path].
4838    ///
4839    /// # Example
4840    /// ```ignore,no_run
4841    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
4842    /// let x = MoveDirectoryRequest::new().set_path("example");
4843    /// ```
4844    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4845        self.path = v.into();
4846        self
4847    }
4848
4849    /// Sets the value of [new_path][crate::model::MoveDirectoryRequest::new_path].
4850    ///
4851    /// # Example
4852    /// ```ignore,no_run
4853    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
4854    /// let x = MoveDirectoryRequest::new().set_new_path("example");
4855    /// ```
4856    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4857        self.new_path = v.into();
4858        self
4859    }
4860}
4861
4862impl wkt::message::Message for MoveDirectoryRequest {
4863    fn typename() -> &'static str {
4864        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
4865    }
4866}
4867
4868/// `MoveDirectory` response message.
4869#[derive(Clone, Default, PartialEq)]
4870#[non_exhaustive]
4871pub struct MoveDirectoryResponse {
4872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4873}
4874
4875impl MoveDirectoryResponse {
4876    pub fn new() -> Self {
4877        std::default::Default::default()
4878    }
4879}
4880
4881impl wkt::message::Message for MoveDirectoryResponse {
4882    fn typename() -> &'static str {
4883        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
4884    }
4885}
4886
4887/// `ReadFile` request message.
4888#[derive(Clone, Default, PartialEq)]
4889#[non_exhaustive]
4890pub struct ReadFileRequest {
4891    /// Required. The workspace's name.
4892    pub workspace: std::string::String,
4893
4894    /// Required. The file's full path including filename, relative to the
4895    /// workspace root.
4896    pub path: std::string::String,
4897
4898    /// Optional. The Git revision of the file to return. If left empty, the
4899    /// current contents of `path` will be returned.
4900    pub revision: std::string::String,
4901
4902    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4903}
4904
4905impl ReadFileRequest {
4906    pub fn new() -> Self {
4907        std::default::Default::default()
4908    }
4909
4910    /// Sets the value of [workspace][crate::model::ReadFileRequest::workspace].
4911    ///
4912    /// # Example
4913    /// ```ignore,no_run
4914    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
4915    /// let x = ReadFileRequest::new().set_workspace("example");
4916    /// ```
4917    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4918        self.workspace = v.into();
4919        self
4920    }
4921
4922    /// Sets the value of [path][crate::model::ReadFileRequest::path].
4923    ///
4924    /// # Example
4925    /// ```ignore,no_run
4926    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
4927    /// let x = ReadFileRequest::new().set_path("example");
4928    /// ```
4929    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4930        self.path = v.into();
4931        self
4932    }
4933
4934    /// Sets the value of [revision][crate::model::ReadFileRequest::revision].
4935    ///
4936    /// # Example
4937    /// ```ignore,no_run
4938    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
4939    /// let x = ReadFileRequest::new().set_revision("example");
4940    /// ```
4941    pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4942        self.revision = v.into();
4943        self
4944    }
4945}
4946
4947impl wkt::message::Message for ReadFileRequest {
4948    fn typename() -> &'static str {
4949        "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
4950    }
4951}
4952
4953/// `ReadFile` response message.
4954#[derive(Clone, Default, PartialEq)]
4955#[non_exhaustive]
4956pub struct ReadFileResponse {
4957    /// The file's contents.
4958    pub file_contents: ::bytes::Bytes,
4959
4960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4961}
4962
4963impl ReadFileResponse {
4964    pub fn new() -> Self {
4965        std::default::Default::default()
4966    }
4967
4968    /// Sets the value of [file_contents][crate::model::ReadFileResponse::file_contents].
4969    ///
4970    /// # Example
4971    /// ```ignore,no_run
4972    /// # use google_cloud_dataform_v1::model::ReadFileResponse;
4973    /// let x = ReadFileResponse::new().set_file_contents(bytes::Bytes::from_static(b"example"));
4974    /// ```
4975    pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4976        self.file_contents = v.into();
4977        self
4978    }
4979}
4980
4981impl wkt::message::Message for ReadFileResponse {
4982    fn typename() -> &'static str {
4983        "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
4984    }
4985}
4986
4987/// `RemoveFile` request message.
4988#[derive(Clone, Default, PartialEq)]
4989#[non_exhaustive]
4990pub struct RemoveFileRequest {
4991    /// Required. The workspace's name.
4992    pub workspace: std::string::String,
4993
4994    /// Required. The file's full path including filename, relative to the
4995    /// workspace root.
4996    pub path: std::string::String,
4997
4998    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4999}
5000
5001impl RemoveFileRequest {
5002    pub fn new() -> Self {
5003        std::default::Default::default()
5004    }
5005
5006    /// Sets the value of [workspace][crate::model::RemoveFileRequest::workspace].
5007    ///
5008    /// # Example
5009    /// ```ignore,no_run
5010    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5011    /// let x = RemoveFileRequest::new().set_workspace("example");
5012    /// ```
5013    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5014        self.workspace = v.into();
5015        self
5016    }
5017
5018    /// Sets the value of [path][crate::model::RemoveFileRequest::path].
5019    ///
5020    /// # Example
5021    /// ```ignore,no_run
5022    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5023    /// let x = RemoveFileRequest::new().set_path("example");
5024    /// ```
5025    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5026        self.path = v.into();
5027        self
5028    }
5029}
5030
5031impl wkt::message::Message for RemoveFileRequest {
5032    fn typename() -> &'static str {
5033        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
5034    }
5035}
5036
5037/// `RemoveFile` response message.
5038#[derive(Clone, Default, PartialEq)]
5039#[non_exhaustive]
5040pub struct RemoveFileResponse {
5041    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5042}
5043
5044impl RemoveFileResponse {
5045    pub fn new() -> Self {
5046        std::default::Default::default()
5047    }
5048}
5049
5050impl wkt::message::Message for RemoveFileResponse {
5051    fn typename() -> &'static str {
5052        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
5053    }
5054}
5055
5056/// `MoveFile` request message.
5057#[derive(Clone, Default, PartialEq)]
5058#[non_exhaustive]
5059pub struct MoveFileRequest {
5060    /// Required. The workspace's name.
5061    pub workspace: std::string::String,
5062
5063    /// Required. The file's full path including filename, relative to the
5064    /// workspace root.
5065    pub path: std::string::String,
5066
5067    /// Required. The file's new path including filename, relative to the workspace
5068    /// root.
5069    pub new_path: std::string::String,
5070
5071    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5072}
5073
5074impl MoveFileRequest {
5075    pub fn new() -> Self {
5076        std::default::Default::default()
5077    }
5078
5079    /// Sets the value of [workspace][crate::model::MoveFileRequest::workspace].
5080    ///
5081    /// # Example
5082    /// ```ignore,no_run
5083    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5084    /// let x = MoveFileRequest::new().set_workspace("example");
5085    /// ```
5086    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5087        self.workspace = v.into();
5088        self
5089    }
5090
5091    /// Sets the value of [path][crate::model::MoveFileRequest::path].
5092    ///
5093    /// # Example
5094    /// ```ignore,no_run
5095    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5096    /// let x = MoveFileRequest::new().set_path("example");
5097    /// ```
5098    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5099        self.path = v.into();
5100        self
5101    }
5102
5103    /// Sets the value of [new_path][crate::model::MoveFileRequest::new_path].
5104    ///
5105    /// # Example
5106    /// ```ignore,no_run
5107    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5108    /// let x = MoveFileRequest::new().set_new_path("example");
5109    /// ```
5110    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5111        self.new_path = v.into();
5112        self
5113    }
5114}
5115
5116impl wkt::message::Message for MoveFileRequest {
5117    fn typename() -> &'static str {
5118        "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
5119    }
5120}
5121
5122/// `MoveFile` response message.
5123#[derive(Clone, Default, PartialEq)]
5124#[non_exhaustive]
5125pub struct MoveFileResponse {
5126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5127}
5128
5129impl MoveFileResponse {
5130    pub fn new() -> Self {
5131        std::default::Default::default()
5132    }
5133}
5134
5135impl wkt::message::Message for MoveFileResponse {
5136    fn typename() -> &'static str {
5137        "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
5138    }
5139}
5140
5141/// `WriteFile` request message.
5142#[derive(Clone, Default, PartialEq)]
5143#[non_exhaustive]
5144pub struct WriteFileRequest {
5145    /// Required. The workspace's name.
5146    pub workspace: std::string::String,
5147
5148    /// Required. The file.
5149    pub path: std::string::String,
5150
5151    /// Required. The file's contents.
5152    pub contents: ::bytes::Bytes,
5153
5154    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5155}
5156
5157impl WriteFileRequest {
5158    pub fn new() -> Self {
5159        std::default::Default::default()
5160    }
5161
5162    /// Sets the value of [workspace][crate::model::WriteFileRequest::workspace].
5163    ///
5164    /// # Example
5165    /// ```ignore,no_run
5166    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5167    /// let x = WriteFileRequest::new().set_workspace("example");
5168    /// ```
5169    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5170        self.workspace = v.into();
5171        self
5172    }
5173
5174    /// Sets the value of [path][crate::model::WriteFileRequest::path].
5175    ///
5176    /// # Example
5177    /// ```ignore,no_run
5178    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5179    /// let x = WriteFileRequest::new().set_path("example");
5180    /// ```
5181    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5182        self.path = v.into();
5183        self
5184    }
5185
5186    /// Sets the value of [contents][crate::model::WriteFileRequest::contents].
5187    ///
5188    /// # Example
5189    /// ```ignore,no_run
5190    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5191    /// let x = WriteFileRequest::new().set_contents(bytes::Bytes::from_static(b"example"));
5192    /// ```
5193    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5194        self.contents = v.into();
5195        self
5196    }
5197}
5198
5199impl wkt::message::Message for WriteFileRequest {
5200    fn typename() -> &'static str {
5201        "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
5202    }
5203}
5204
5205/// `WriteFile` response message.
5206#[derive(Clone, Default, PartialEq)]
5207#[non_exhaustive]
5208pub struct WriteFileResponse {
5209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5210}
5211
5212impl WriteFileResponse {
5213    pub fn new() -> Self {
5214        std::default::Default::default()
5215    }
5216}
5217
5218impl wkt::message::Message for WriteFileResponse {
5219    fn typename() -> &'static str {
5220        "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
5221    }
5222}
5223
5224/// `InstallNpmPackages` request message.
5225#[derive(Clone, Default, PartialEq)]
5226#[non_exhaustive]
5227pub struct InstallNpmPackagesRequest {
5228    /// Required. The workspace's name.
5229    pub workspace: std::string::String,
5230
5231    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5232}
5233
5234impl InstallNpmPackagesRequest {
5235    pub fn new() -> Self {
5236        std::default::Default::default()
5237    }
5238
5239    /// Sets the value of [workspace][crate::model::InstallNpmPackagesRequest::workspace].
5240    ///
5241    /// # Example
5242    /// ```ignore,no_run
5243    /// # use google_cloud_dataform_v1::model::InstallNpmPackagesRequest;
5244    /// let x = InstallNpmPackagesRequest::new().set_workspace("example");
5245    /// ```
5246    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5247        self.workspace = v.into();
5248        self
5249    }
5250}
5251
5252impl wkt::message::Message for InstallNpmPackagesRequest {
5253    fn typename() -> &'static str {
5254        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
5255    }
5256}
5257
5258/// `InstallNpmPackages` response message.
5259#[derive(Clone, Default, PartialEq)]
5260#[non_exhaustive]
5261pub struct InstallNpmPackagesResponse {
5262    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5263}
5264
5265impl InstallNpmPackagesResponse {
5266    pub fn new() -> Self {
5267        std::default::Default::default()
5268    }
5269}
5270
5271impl wkt::message::Message for InstallNpmPackagesResponse {
5272    fn typename() -> &'static str {
5273        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
5274    }
5275}
5276
5277/// Represents a Dataform release configuration.
5278#[derive(Clone, Default, PartialEq)]
5279#[non_exhaustive]
5280pub struct ReleaseConfig {
5281    /// Identifier. The release config's name.
5282    pub name: std::string::String,
5283
5284    /// Required. Git commit/tag/branch name at which the repository should be
5285    /// compiled. Must exist in the remote repository. Examples:
5286    ///
5287    /// - a commit SHA: `12ade345`
5288    /// - a tag: `tag1`
5289    /// - a branch name: `branch1`
5290    pub git_commitish: std::string::String,
5291
5292    /// Optional. If set, fields of `code_compilation_config` override the default
5293    /// compilation settings that are specified in dataform.json.
5294    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
5295
5296    /// Optional. Optional schedule (in cron format) for automatic creation of
5297    /// compilation results.
5298    pub cron_schedule: std::string::String,
5299
5300    /// Optional. Specifies the time zone to be used when interpreting
5301    /// cron_schedule. Must be a time zone name from the time zone database
5302    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
5303    /// unspecified, the default is UTC.
5304    pub time_zone: std::string::String,
5305
5306    /// Output only. Records of the 10 most recent scheduled release attempts,
5307    /// ordered in descending order of `release_time`. Updated whenever automatic
5308    /// creation of a compilation result is triggered by cron_schedule.
5309    pub recent_scheduled_release_records:
5310        std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
5311
5312    /// Optional. The name of the currently released compilation result for this
5313    /// release config. This value is updated when a compilation result is
5314    /// automatically created from this release config (using cron_schedule), or
5315    /// when this resource is updated by API call (perhaps to roll back to an
5316    /// earlier release). The compilation result must have been created using this
5317    /// release config. Must be in the format
5318    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
5319    pub release_compilation_result: std::string::String,
5320
5321    /// Optional. Disables automatic creation of compilation results.
5322    pub disabled: bool,
5323
5324    /// Output only. All the metadata information that is used internally to serve
5325    /// the resource. For example: timestamps, flags, status fields, etc. The
5326    /// format of this field is a JSON string.
5327    pub internal_metadata: std::option::Option<std::string::String>,
5328
5329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5330}
5331
5332impl ReleaseConfig {
5333    pub fn new() -> Self {
5334        std::default::Default::default()
5335    }
5336
5337    /// Sets the value of [name][crate::model::ReleaseConfig::name].
5338    ///
5339    /// # Example
5340    /// ```ignore,no_run
5341    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5342    /// let x = ReleaseConfig::new().set_name("example");
5343    /// ```
5344    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5345        self.name = v.into();
5346        self
5347    }
5348
5349    /// Sets the value of [git_commitish][crate::model::ReleaseConfig::git_commitish].
5350    ///
5351    /// # Example
5352    /// ```ignore,no_run
5353    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5354    /// let x = ReleaseConfig::new().set_git_commitish("example");
5355    /// ```
5356    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5357        self.git_commitish = v.into();
5358        self
5359    }
5360
5361    /// Sets the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5362    ///
5363    /// # Example
5364    /// ```ignore,no_run
5365    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5366    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5367    /// let x = ReleaseConfig::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
5368    /// ```
5369    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
5370    where
5371        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5372    {
5373        self.code_compilation_config = std::option::Option::Some(v.into());
5374        self
5375    }
5376
5377    /// Sets or clears the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5378    ///
5379    /// # Example
5380    /// ```ignore,no_run
5381    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5382    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5383    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
5384    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
5385    /// ```
5386    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
5387    where
5388        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5389    {
5390        self.code_compilation_config = v.map(|x| x.into());
5391        self
5392    }
5393
5394    /// Sets the value of [cron_schedule][crate::model::ReleaseConfig::cron_schedule].
5395    ///
5396    /// # Example
5397    /// ```ignore,no_run
5398    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5399    /// let x = ReleaseConfig::new().set_cron_schedule("example");
5400    /// ```
5401    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5402        self.cron_schedule = v.into();
5403        self
5404    }
5405
5406    /// Sets the value of [time_zone][crate::model::ReleaseConfig::time_zone].
5407    ///
5408    /// # Example
5409    /// ```ignore,no_run
5410    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5411    /// let x = ReleaseConfig::new().set_time_zone("example");
5412    /// ```
5413    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5414        self.time_zone = v.into();
5415        self
5416    }
5417
5418    /// Sets the value of [recent_scheduled_release_records][crate::model::ReleaseConfig::recent_scheduled_release_records].
5419    ///
5420    /// # Example
5421    /// ```ignore,no_run
5422    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5423    /// use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5424    /// let x = ReleaseConfig::new()
5425    ///     .set_recent_scheduled_release_records([
5426    ///         ScheduledReleaseRecord::default()/* use setters */,
5427    ///         ScheduledReleaseRecord::default()/* use (different) setters */,
5428    ///     ]);
5429    /// ```
5430    pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
5431    where
5432        T: std::iter::IntoIterator<Item = V>,
5433        V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
5434    {
5435        use std::iter::Iterator;
5436        self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
5437        self
5438    }
5439
5440    /// Sets the value of [release_compilation_result][crate::model::ReleaseConfig::release_compilation_result].
5441    ///
5442    /// # Example
5443    /// ```ignore,no_run
5444    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5445    /// let x = ReleaseConfig::new().set_release_compilation_result("example");
5446    /// ```
5447    pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
5448        mut self,
5449        v: T,
5450    ) -> Self {
5451        self.release_compilation_result = v.into();
5452        self
5453    }
5454
5455    /// Sets the value of [disabled][crate::model::ReleaseConfig::disabled].
5456    ///
5457    /// # Example
5458    /// ```ignore,no_run
5459    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5460    /// let x = ReleaseConfig::new().set_disabled(true);
5461    /// ```
5462    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5463        self.disabled = v.into();
5464        self
5465    }
5466
5467    /// Sets the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
5468    ///
5469    /// # Example
5470    /// ```ignore,no_run
5471    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5472    /// let x = ReleaseConfig::new().set_internal_metadata("example");
5473    /// ```
5474    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
5475    where
5476        T: std::convert::Into<std::string::String>,
5477    {
5478        self.internal_metadata = std::option::Option::Some(v.into());
5479        self
5480    }
5481
5482    /// Sets or clears the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
5483    ///
5484    /// # Example
5485    /// ```ignore,no_run
5486    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5487    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(Some("example"));
5488    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(None::<String>);
5489    /// ```
5490    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5491    where
5492        T: std::convert::Into<std::string::String>,
5493    {
5494        self.internal_metadata = v.map(|x| x.into());
5495        self
5496    }
5497}
5498
5499impl wkt::message::Message for ReleaseConfig {
5500    fn typename() -> &'static str {
5501        "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
5502    }
5503}
5504
5505/// Defines additional types related to [ReleaseConfig].
5506pub mod release_config {
5507    #[allow(unused_imports)]
5508    use super::*;
5509
5510    /// A record of an attempt to create a compilation result for this release
5511    /// config.
5512    #[derive(Clone, Default, PartialEq)]
5513    #[non_exhaustive]
5514    pub struct ScheduledReleaseRecord {
5515        /// Output only. The timestamp of this release attempt.
5516        pub release_time: std::option::Option<wkt::Timestamp>,
5517
5518        /// The result of this release attempt.
5519        pub result:
5520            std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
5521
5522        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5523    }
5524
5525    impl ScheduledReleaseRecord {
5526        pub fn new() -> Self {
5527            std::default::Default::default()
5528        }
5529
5530        /// Sets the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
5531        ///
5532        /// # Example
5533        /// ```ignore,no_run
5534        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5535        /// use wkt::Timestamp;
5536        /// let x = ScheduledReleaseRecord::new().set_release_time(Timestamp::default()/* use setters */);
5537        /// ```
5538        pub fn set_release_time<T>(mut self, v: T) -> Self
5539        where
5540            T: std::convert::Into<wkt::Timestamp>,
5541        {
5542            self.release_time = std::option::Option::Some(v.into());
5543            self
5544        }
5545
5546        /// Sets or clears the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
5547        ///
5548        /// # Example
5549        /// ```ignore,no_run
5550        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5551        /// use wkt::Timestamp;
5552        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(Some(Timestamp::default()/* use setters */));
5553        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(None::<Timestamp>);
5554        /// ```
5555        pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
5556        where
5557            T: std::convert::Into<wkt::Timestamp>,
5558        {
5559            self.release_time = v.map(|x| x.into());
5560            self
5561        }
5562
5563        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result].
5564        ///
5565        /// Note that all the setters affecting `result` are mutually
5566        /// exclusive.
5567        ///
5568        /// # Example
5569        /// ```ignore,no_run
5570        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5571        /// use google_cloud_dataform_v1::model::release_config::scheduled_release_record::Result;
5572        /// let x = ScheduledReleaseRecord::new().set_result(Some(Result::CompilationResult("example".to_string())));
5573        /// ```
5574        pub fn set_result<
5575            T: std::convert::Into<
5576                    std::option::Option<
5577                        crate::model::release_config::scheduled_release_record::Result,
5578                    >,
5579                >,
5580        >(
5581            mut self,
5582            v: T,
5583        ) -> Self {
5584            self.result = v.into();
5585            self
5586        }
5587
5588        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5589        /// if it holds a `CompilationResult`, `None` if the field is not set or
5590        /// holds a different branch.
5591        pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
5592            #[allow(unreachable_patterns)]
5593            self.result.as_ref().and_then(|v| match v {
5594                crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
5595                _ => std::option::Option::None,
5596            })
5597        }
5598
5599        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5600        /// to hold a `CompilationResult`.
5601        ///
5602        /// Note that all the setters affecting `result` are
5603        /// mutually exclusive.
5604        ///
5605        /// # Example
5606        /// ```ignore,no_run
5607        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5608        /// let x = ScheduledReleaseRecord::new().set_compilation_result("example");
5609        /// assert!(x.compilation_result().is_some());
5610        /// assert!(x.error_status().is_none());
5611        /// ```
5612        pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
5613            mut self,
5614            v: T,
5615        ) -> Self {
5616            self.result = std::option::Option::Some(
5617                crate::model::release_config::scheduled_release_record::Result::CompilationResult(
5618                    v.into(),
5619                ),
5620            );
5621            self
5622        }
5623
5624        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5625        /// if it holds a `ErrorStatus`, `None` if the field is not set or
5626        /// holds a different branch.
5627        pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
5628            #[allow(unreachable_patterns)]
5629            self.result.as_ref().and_then(|v| match v {
5630                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
5631                    std::option::Option::Some(v)
5632                }
5633                _ => std::option::Option::None,
5634            })
5635        }
5636
5637        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5638        /// to hold a `ErrorStatus`.
5639        ///
5640        /// Note that all the setters affecting `result` are
5641        /// mutually exclusive.
5642        ///
5643        /// # Example
5644        /// ```ignore,no_run
5645        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5646        /// use rpc::model::Status;
5647        /// let x = ScheduledReleaseRecord::new().set_error_status(Status::default()/* use setters */);
5648        /// assert!(x.error_status().is_some());
5649        /// assert!(x.compilation_result().is_none());
5650        /// ```
5651        pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
5652            mut self,
5653            v: T,
5654        ) -> Self {
5655            self.result = std::option::Option::Some(
5656                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
5657                    v.into(),
5658                ),
5659            );
5660            self
5661        }
5662    }
5663
5664    impl wkt::message::Message for ScheduledReleaseRecord {
5665        fn typename() -> &'static str {
5666            "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
5667        }
5668    }
5669
5670    /// Defines additional types related to [ScheduledReleaseRecord].
5671    pub mod scheduled_release_record {
5672        #[allow(unused_imports)]
5673        use super::*;
5674
5675        /// The result of this release attempt.
5676        #[derive(Clone, Debug, PartialEq)]
5677        #[non_exhaustive]
5678        pub enum Result {
5679            /// The name of the created compilation result, if one was successfully
5680            /// created. Must be in the format
5681            /// `projects/*/locations/*/repositories/*/compilationResults/*`.
5682            CompilationResult(std::string::String),
5683            /// The error status encountered upon this attempt to create the
5684            /// compilation result, if the attempt was unsuccessful.
5685            ErrorStatus(std::boxed::Box<rpc::model::Status>),
5686        }
5687    }
5688}
5689
5690/// `ListReleaseConfigs` request message.
5691#[derive(Clone, Default, PartialEq)]
5692#[non_exhaustive]
5693pub struct ListReleaseConfigsRequest {
5694    /// Required. The repository in which to list release configs. Must be in the
5695    /// format `projects/*/locations/*/repositories/*`.
5696    pub parent: std::string::String,
5697
5698    /// Optional. Maximum number of release configs to return. The server may
5699    /// return fewer items than requested. If unspecified, the server will pick an
5700    /// appropriate default.
5701    pub page_size: i32,
5702
5703    /// Optional. Page token received from a previous `ListReleaseConfigs` call.
5704    /// Provide this to retrieve the subsequent page.
5705    ///
5706    /// When paginating, all other parameters provided to `ListReleaseConfigs`,
5707    /// with the exception of `page_size`, must match the call that provided the
5708    /// page token.
5709    pub page_token: std::string::String,
5710
5711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5712}
5713
5714impl ListReleaseConfigsRequest {
5715    pub fn new() -> Self {
5716        std::default::Default::default()
5717    }
5718
5719    /// Sets the value of [parent][crate::model::ListReleaseConfigsRequest::parent].
5720    ///
5721    /// # Example
5722    /// ```ignore,no_run
5723    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
5724    /// let x = ListReleaseConfigsRequest::new().set_parent("example");
5725    /// ```
5726    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5727        self.parent = v.into();
5728        self
5729    }
5730
5731    /// Sets the value of [page_size][crate::model::ListReleaseConfigsRequest::page_size].
5732    ///
5733    /// # Example
5734    /// ```ignore,no_run
5735    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
5736    /// let x = ListReleaseConfigsRequest::new().set_page_size(42);
5737    /// ```
5738    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5739        self.page_size = v.into();
5740        self
5741    }
5742
5743    /// Sets the value of [page_token][crate::model::ListReleaseConfigsRequest::page_token].
5744    ///
5745    /// # Example
5746    /// ```ignore,no_run
5747    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
5748    /// let x = ListReleaseConfigsRequest::new().set_page_token("example");
5749    /// ```
5750    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5751        self.page_token = v.into();
5752        self
5753    }
5754}
5755
5756impl wkt::message::Message for ListReleaseConfigsRequest {
5757    fn typename() -> &'static str {
5758        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
5759    }
5760}
5761
5762/// `ListReleaseConfigs` response message.
5763#[derive(Clone, Default, PartialEq)]
5764#[non_exhaustive]
5765pub struct ListReleaseConfigsResponse {
5766    /// List of release configs.
5767    pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
5768
5769    /// A token, which can be sent as `page_token` to retrieve the next page.
5770    /// If this field is omitted, there are no subsequent pages.
5771    pub next_page_token: std::string::String,
5772
5773    /// Locations which could not be reached.
5774    pub unreachable: std::vec::Vec<std::string::String>,
5775
5776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5777}
5778
5779impl ListReleaseConfigsResponse {
5780    pub fn new() -> Self {
5781        std::default::Default::default()
5782    }
5783
5784    /// Sets the value of [release_configs][crate::model::ListReleaseConfigsResponse::release_configs].
5785    ///
5786    /// # Example
5787    /// ```ignore,no_run
5788    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
5789    /// use google_cloud_dataform_v1::model::ReleaseConfig;
5790    /// let x = ListReleaseConfigsResponse::new()
5791    ///     .set_release_configs([
5792    ///         ReleaseConfig::default()/* use setters */,
5793    ///         ReleaseConfig::default()/* use (different) setters */,
5794    ///     ]);
5795    /// ```
5796    pub fn set_release_configs<T, V>(mut self, v: T) -> Self
5797    where
5798        T: std::iter::IntoIterator<Item = V>,
5799        V: std::convert::Into<crate::model::ReleaseConfig>,
5800    {
5801        use std::iter::Iterator;
5802        self.release_configs = v.into_iter().map(|i| i.into()).collect();
5803        self
5804    }
5805
5806    /// Sets the value of [next_page_token][crate::model::ListReleaseConfigsResponse::next_page_token].
5807    ///
5808    /// # Example
5809    /// ```ignore,no_run
5810    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
5811    /// let x = ListReleaseConfigsResponse::new().set_next_page_token("example");
5812    /// ```
5813    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5814        self.next_page_token = v.into();
5815        self
5816    }
5817
5818    /// Sets the value of [unreachable][crate::model::ListReleaseConfigsResponse::unreachable].
5819    ///
5820    /// # Example
5821    /// ```ignore,no_run
5822    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
5823    /// let x = ListReleaseConfigsResponse::new().set_unreachable(["a", "b", "c"]);
5824    /// ```
5825    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5826    where
5827        T: std::iter::IntoIterator<Item = V>,
5828        V: std::convert::Into<std::string::String>,
5829    {
5830        use std::iter::Iterator;
5831        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5832        self
5833    }
5834}
5835
5836impl wkt::message::Message for ListReleaseConfigsResponse {
5837    fn typename() -> &'static str {
5838        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
5839    }
5840}
5841
5842#[doc(hidden)]
5843impl gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
5844    type PageItem = crate::model::ReleaseConfig;
5845
5846    fn items(self) -> std::vec::Vec<Self::PageItem> {
5847        self.release_configs
5848    }
5849
5850    fn next_page_token(&self) -> std::string::String {
5851        use std::clone::Clone;
5852        self.next_page_token.clone()
5853    }
5854}
5855
5856/// `GetReleaseConfig` request message.
5857#[derive(Clone, Default, PartialEq)]
5858#[non_exhaustive]
5859pub struct GetReleaseConfigRequest {
5860    /// Required. The release config's name.
5861    pub name: std::string::String,
5862
5863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5864}
5865
5866impl GetReleaseConfigRequest {
5867    pub fn new() -> Self {
5868        std::default::Default::default()
5869    }
5870
5871    /// Sets the value of [name][crate::model::GetReleaseConfigRequest::name].
5872    ///
5873    /// # Example
5874    /// ```ignore,no_run
5875    /// # use google_cloud_dataform_v1::model::GetReleaseConfigRequest;
5876    /// let x = GetReleaseConfigRequest::new().set_name("example");
5877    /// ```
5878    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5879        self.name = v.into();
5880        self
5881    }
5882}
5883
5884impl wkt::message::Message for GetReleaseConfigRequest {
5885    fn typename() -> &'static str {
5886        "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
5887    }
5888}
5889
5890/// `CreateReleaseConfig` request message.
5891#[derive(Clone, Default, PartialEq)]
5892#[non_exhaustive]
5893pub struct CreateReleaseConfigRequest {
5894    /// Required. The repository in which to create the release config. Must be in
5895    /// the format `projects/*/locations/*/repositories/*`.
5896    pub parent: std::string::String,
5897
5898    /// Required. The release config to create.
5899    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
5900
5901    /// Required. The ID to use for the release config, which will become the final
5902    /// component of the release config's resource name.
5903    pub release_config_id: std::string::String,
5904
5905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5906}
5907
5908impl CreateReleaseConfigRequest {
5909    pub fn new() -> Self {
5910        std::default::Default::default()
5911    }
5912
5913    /// Sets the value of [parent][crate::model::CreateReleaseConfigRequest::parent].
5914    ///
5915    /// # Example
5916    /// ```ignore,no_run
5917    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5918    /// let x = CreateReleaseConfigRequest::new().set_parent("example");
5919    /// ```
5920    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5921        self.parent = v.into();
5922        self
5923    }
5924
5925    /// Sets the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
5926    ///
5927    /// # Example
5928    /// ```ignore,no_run
5929    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5930    /// use google_cloud_dataform_v1::model::ReleaseConfig;
5931    /// let x = CreateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
5932    /// ```
5933    pub fn set_release_config<T>(mut self, v: T) -> Self
5934    where
5935        T: std::convert::Into<crate::model::ReleaseConfig>,
5936    {
5937        self.release_config = std::option::Option::Some(v.into());
5938        self
5939    }
5940
5941    /// Sets or clears the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
5942    ///
5943    /// # Example
5944    /// ```ignore,no_run
5945    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5946    /// use google_cloud_dataform_v1::model::ReleaseConfig;
5947    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
5948    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
5949    /// ```
5950    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
5951    where
5952        T: std::convert::Into<crate::model::ReleaseConfig>,
5953    {
5954        self.release_config = v.map(|x| x.into());
5955        self
5956    }
5957
5958    /// Sets the value of [release_config_id][crate::model::CreateReleaseConfigRequest::release_config_id].
5959    ///
5960    /// # Example
5961    /// ```ignore,no_run
5962    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5963    /// let x = CreateReleaseConfigRequest::new().set_release_config_id("example");
5964    /// ```
5965    pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
5966        mut self,
5967        v: T,
5968    ) -> Self {
5969        self.release_config_id = v.into();
5970        self
5971    }
5972}
5973
5974impl wkt::message::Message for CreateReleaseConfigRequest {
5975    fn typename() -> &'static str {
5976        "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
5977    }
5978}
5979
5980/// `UpdateReleaseConfig` request message.
5981#[derive(Clone, Default, PartialEq)]
5982#[non_exhaustive]
5983pub struct UpdateReleaseConfigRequest {
5984    /// Optional. Specifies the fields to be updated in the release config. If left
5985    /// unset, all fields will be updated.
5986    pub update_mask: std::option::Option<wkt::FieldMask>,
5987
5988    /// Required. The release config to update.
5989    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
5990
5991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5992}
5993
5994impl UpdateReleaseConfigRequest {
5995    pub fn new() -> Self {
5996        std::default::Default::default()
5997    }
5998
5999    /// Sets the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6000    ///
6001    /// # Example
6002    /// ```ignore,no_run
6003    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6004    /// use wkt::FieldMask;
6005    /// let x = UpdateReleaseConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6006    /// ```
6007    pub fn set_update_mask<T>(mut self, v: T) -> Self
6008    where
6009        T: std::convert::Into<wkt::FieldMask>,
6010    {
6011        self.update_mask = std::option::Option::Some(v.into());
6012        self
6013    }
6014
6015    /// Sets or clears the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6016    ///
6017    /// # Example
6018    /// ```ignore,no_run
6019    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6020    /// use wkt::FieldMask;
6021    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6022    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6023    /// ```
6024    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6025    where
6026        T: std::convert::Into<wkt::FieldMask>,
6027    {
6028        self.update_mask = v.map(|x| x.into());
6029        self
6030    }
6031
6032    /// Sets the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6033    ///
6034    /// # Example
6035    /// ```ignore,no_run
6036    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6037    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6038    /// let x = UpdateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6039    /// ```
6040    pub fn set_release_config<T>(mut self, v: T) -> Self
6041    where
6042        T: std::convert::Into<crate::model::ReleaseConfig>,
6043    {
6044        self.release_config = std::option::Option::Some(v.into());
6045        self
6046    }
6047
6048    /// Sets or clears the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6049    ///
6050    /// # Example
6051    /// ```ignore,no_run
6052    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6053    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6054    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6055    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6056    /// ```
6057    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6058    where
6059        T: std::convert::Into<crate::model::ReleaseConfig>,
6060    {
6061        self.release_config = v.map(|x| x.into());
6062        self
6063    }
6064}
6065
6066impl wkt::message::Message for UpdateReleaseConfigRequest {
6067    fn typename() -> &'static str {
6068        "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
6069    }
6070}
6071
6072/// `DeleteReleaseConfig` request message.
6073#[derive(Clone, Default, PartialEq)]
6074#[non_exhaustive]
6075pub struct DeleteReleaseConfigRequest {
6076    /// Required. The release config's name.
6077    pub name: std::string::String,
6078
6079    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6080}
6081
6082impl DeleteReleaseConfigRequest {
6083    pub fn new() -> Self {
6084        std::default::Default::default()
6085    }
6086
6087    /// Sets the value of [name][crate::model::DeleteReleaseConfigRequest::name].
6088    ///
6089    /// # Example
6090    /// ```ignore,no_run
6091    /// # use google_cloud_dataform_v1::model::DeleteReleaseConfigRequest;
6092    /// let x = DeleteReleaseConfigRequest::new().set_name("example");
6093    /// ```
6094    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6095        self.name = v.into();
6096        self
6097    }
6098}
6099
6100impl wkt::message::Message for DeleteReleaseConfigRequest {
6101    fn typename() -> &'static str {
6102        "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
6103    }
6104}
6105
6106/// Represents the result of compiling a Dataform project.
6107#[derive(Clone, Default, PartialEq)]
6108#[non_exhaustive]
6109pub struct CompilationResult {
6110    /// Output only. The compilation result's name.
6111    pub name: std::string::String,
6112
6113    /// Immutable. If set, fields of `code_compilation_config` override the default
6114    /// compilation settings that are specified in dataform.json.
6115    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
6116
6117    /// Output only. The fully resolved Git commit SHA of the code that was
6118    /// compiled. Not set for compilation results whose source is a workspace.
6119    pub resolved_git_commit_sha: std::string::String,
6120
6121    /// Output only. The version of `@dataform/core` that was used for compilation.
6122    pub dataform_core_version: std::string::String,
6123
6124    /// Output only. Errors encountered during project compilation.
6125    pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
6126
6127    /// Output only. Only set if the repository has a KMS Key.
6128    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
6129
6130    /// Output only. The timestamp of when the compilation result was created.
6131    pub create_time: std::option::Option<wkt::Timestamp>,
6132
6133    /// Output only. All the metadata information that is used internally to serve
6134    /// the resource. For example: timestamps, flags, status fields, etc. The
6135    /// format of this field is a JSON string.
6136    pub internal_metadata: std::option::Option<std::string::String>,
6137
6138    /// The source of the compilation result.
6139    pub source: std::option::Option<crate::model::compilation_result::Source>,
6140
6141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6142}
6143
6144impl CompilationResult {
6145    pub fn new() -> Self {
6146        std::default::Default::default()
6147    }
6148
6149    /// Sets the value of [name][crate::model::CompilationResult::name].
6150    ///
6151    /// # Example
6152    /// ```ignore,no_run
6153    /// # use google_cloud_dataform_v1::model::CompilationResult;
6154    /// let x = CompilationResult::new().set_name("example");
6155    /// ```
6156    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6157        self.name = v.into();
6158        self
6159    }
6160
6161    /// Sets the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6162    ///
6163    /// # Example
6164    /// ```ignore,no_run
6165    /// # use google_cloud_dataform_v1::model::CompilationResult;
6166    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6167    /// let x = CompilationResult::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
6168    /// ```
6169    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
6170    where
6171        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6172    {
6173        self.code_compilation_config = std::option::Option::Some(v.into());
6174        self
6175    }
6176
6177    /// Sets or clears the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6178    ///
6179    /// # Example
6180    /// ```ignore,no_run
6181    /// # use google_cloud_dataform_v1::model::CompilationResult;
6182    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6183    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
6184    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
6185    /// ```
6186    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
6187    where
6188        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6189    {
6190        self.code_compilation_config = v.map(|x| x.into());
6191        self
6192    }
6193
6194    /// Sets the value of [resolved_git_commit_sha][crate::model::CompilationResult::resolved_git_commit_sha].
6195    ///
6196    /// # Example
6197    /// ```ignore,no_run
6198    /// # use google_cloud_dataform_v1::model::CompilationResult;
6199    /// let x = CompilationResult::new().set_resolved_git_commit_sha("example");
6200    /// ```
6201    pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
6202        mut self,
6203        v: T,
6204    ) -> Self {
6205        self.resolved_git_commit_sha = v.into();
6206        self
6207    }
6208
6209    /// Sets the value of [dataform_core_version][crate::model::CompilationResult::dataform_core_version].
6210    ///
6211    /// # Example
6212    /// ```ignore,no_run
6213    /// # use google_cloud_dataform_v1::model::CompilationResult;
6214    /// let x = CompilationResult::new().set_dataform_core_version("example");
6215    /// ```
6216    pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
6217        mut self,
6218        v: T,
6219    ) -> Self {
6220        self.dataform_core_version = v.into();
6221        self
6222    }
6223
6224    /// Sets the value of [compilation_errors][crate::model::CompilationResult::compilation_errors].
6225    ///
6226    /// # Example
6227    /// ```ignore,no_run
6228    /// # use google_cloud_dataform_v1::model::CompilationResult;
6229    /// use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6230    /// let x = CompilationResult::new()
6231    ///     .set_compilation_errors([
6232    ///         CompilationError::default()/* use setters */,
6233    ///         CompilationError::default()/* use (different) setters */,
6234    ///     ]);
6235    /// ```
6236    pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
6237    where
6238        T: std::iter::IntoIterator<Item = V>,
6239        V: std::convert::Into<crate::model::compilation_result::CompilationError>,
6240    {
6241        use std::iter::Iterator;
6242        self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
6243        self
6244    }
6245
6246    /// Sets the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6247    ///
6248    /// # Example
6249    /// ```ignore,no_run
6250    /// # use google_cloud_dataform_v1::model::CompilationResult;
6251    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6252    /// let x = CompilationResult::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
6253    /// ```
6254    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
6255    where
6256        T: std::convert::Into<crate::model::DataEncryptionState>,
6257    {
6258        self.data_encryption_state = std::option::Option::Some(v.into());
6259        self
6260    }
6261
6262    /// Sets or clears the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6263    ///
6264    /// # Example
6265    /// ```ignore,no_run
6266    /// # use google_cloud_dataform_v1::model::CompilationResult;
6267    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6268    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
6269    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
6270    /// ```
6271    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
6272    where
6273        T: std::convert::Into<crate::model::DataEncryptionState>,
6274    {
6275        self.data_encryption_state = v.map(|x| x.into());
6276        self
6277    }
6278
6279    /// Sets the value of [create_time][crate::model::CompilationResult::create_time].
6280    ///
6281    /// # Example
6282    /// ```ignore,no_run
6283    /// # use google_cloud_dataform_v1::model::CompilationResult;
6284    /// use wkt::Timestamp;
6285    /// let x = CompilationResult::new().set_create_time(Timestamp::default()/* use setters */);
6286    /// ```
6287    pub fn set_create_time<T>(mut self, v: T) -> Self
6288    where
6289        T: std::convert::Into<wkt::Timestamp>,
6290    {
6291        self.create_time = std::option::Option::Some(v.into());
6292        self
6293    }
6294
6295    /// Sets or clears the value of [create_time][crate::model::CompilationResult::create_time].
6296    ///
6297    /// # Example
6298    /// ```ignore,no_run
6299    /// # use google_cloud_dataform_v1::model::CompilationResult;
6300    /// use wkt::Timestamp;
6301    /// let x = CompilationResult::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6302    /// let x = CompilationResult::new().set_or_clear_create_time(None::<Timestamp>);
6303    /// ```
6304    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6305    where
6306        T: std::convert::Into<wkt::Timestamp>,
6307    {
6308        self.create_time = v.map(|x| x.into());
6309        self
6310    }
6311
6312    /// Sets the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6313    ///
6314    /// # Example
6315    /// ```ignore,no_run
6316    /// # use google_cloud_dataform_v1::model::CompilationResult;
6317    /// let x = CompilationResult::new().set_internal_metadata("example");
6318    /// ```
6319    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
6320    where
6321        T: std::convert::Into<std::string::String>,
6322    {
6323        self.internal_metadata = std::option::Option::Some(v.into());
6324        self
6325    }
6326
6327    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6328    ///
6329    /// # Example
6330    /// ```ignore,no_run
6331    /// # use google_cloud_dataform_v1::model::CompilationResult;
6332    /// let x = CompilationResult::new().set_or_clear_internal_metadata(Some("example"));
6333    /// let x = CompilationResult::new().set_or_clear_internal_metadata(None::<String>);
6334    /// ```
6335    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6336    where
6337        T: std::convert::Into<std::string::String>,
6338    {
6339        self.internal_metadata = v.map(|x| x.into());
6340        self
6341    }
6342
6343    /// Sets the value of [source][crate::model::CompilationResult::source].
6344    ///
6345    /// Note that all the setters affecting `source` are mutually
6346    /// exclusive.
6347    ///
6348    /// # Example
6349    /// ```ignore,no_run
6350    /// # use google_cloud_dataform_v1::model::CompilationResult;
6351    /// use google_cloud_dataform_v1::model::compilation_result::Source;
6352    /// let x = CompilationResult::new().set_source(Some(Source::GitCommitish("example".to_string())));
6353    /// ```
6354    pub fn set_source<
6355        T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
6356    >(
6357        mut self,
6358        v: T,
6359    ) -> Self {
6360        self.source = v.into();
6361        self
6362    }
6363
6364    /// The value of [source][crate::model::CompilationResult::source]
6365    /// if it holds a `GitCommitish`, `None` if the field is not set or
6366    /// holds a different branch.
6367    pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
6368        #[allow(unreachable_patterns)]
6369        self.source.as_ref().and_then(|v| match v {
6370            crate::model::compilation_result::Source::GitCommitish(v) => {
6371                std::option::Option::Some(v)
6372            }
6373            _ => std::option::Option::None,
6374        })
6375    }
6376
6377    /// Sets the value of [source][crate::model::CompilationResult::source]
6378    /// to hold a `GitCommitish`.
6379    ///
6380    /// Note that all the setters affecting `source` are
6381    /// mutually exclusive.
6382    ///
6383    /// # Example
6384    /// ```ignore,no_run
6385    /// # use google_cloud_dataform_v1::model::CompilationResult;
6386    /// let x = CompilationResult::new().set_git_commitish("example");
6387    /// assert!(x.git_commitish().is_some());
6388    /// assert!(x.workspace().is_none());
6389    /// assert!(x.release_config().is_none());
6390    /// ```
6391    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6392        self.source = std::option::Option::Some(
6393            crate::model::compilation_result::Source::GitCommitish(v.into()),
6394        );
6395        self
6396    }
6397
6398    /// The value of [source][crate::model::CompilationResult::source]
6399    /// if it holds a `Workspace`, `None` if the field is not set or
6400    /// holds a different branch.
6401    pub fn workspace(&self) -> std::option::Option<&std::string::String> {
6402        #[allow(unreachable_patterns)]
6403        self.source.as_ref().and_then(|v| match v {
6404            crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
6405            _ => std::option::Option::None,
6406        })
6407    }
6408
6409    /// Sets the value of [source][crate::model::CompilationResult::source]
6410    /// to hold a `Workspace`.
6411    ///
6412    /// Note that all the setters affecting `source` are
6413    /// mutually exclusive.
6414    ///
6415    /// # Example
6416    /// ```ignore,no_run
6417    /// # use google_cloud_dataform_v1::model::CompilationResult;
6418    /// let x = CompilationResult::new().set_workspace("example");
6419    /// assert!(x.workspace().is_some());
6420    /// assert!(x.git_commitish().is_none());
6421    /// assert!(x.release_config().is_none());
6422    /// ```
6423    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6424        self.source = std::option::Option::Some(
6425            crate::model::compilation_result::Source::Workspace(v.into()),
6426        );
6427        self
6428    }
6429
6430    /// The value of [source][crate::model::CompilationResult::source]
6431    /// if it holds a `ReleaseConfig`, `None` if the field is not set or
6432    /// holds a different branch.
6433    pub fn release_config(&self) -> std::option::Option<&std::string::String> {
6434        #[allow(unreachable_patterns)]
6435        self.source.as_ref().and_then(|v| match v {
6436            crate::model::compilation_result::Source::ReleaseConfig(v) => {
6437                std::option::Option::Some(v)
6438            }
6439            _ => std::option::Option::None,
6440        })
6441    }
6442
6443    /// Sets the value of [source][crate::model::CompilationResult::source]
6444    /// to hold a `ReleaseConfig`.
6445    ///
6446    /// Note that all the setters affecting `source` are
6447    /// mutually exclusive.
6448    ///
6449    /// # Example
6450    /// ```ignore,no_run
6451    /// # use google_cloud_dataform_v1::model::CompilationResult;
6452    /// let x = CompilationResult::new().set_release_config("example");
6453    /// assert!(x.release_config().is_some());
6454    /// assert!(x.git_commitish().is_none());
6455    /// assert!(x.workspace().is_none());
6456    /// ```
6457    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6458        self.source = std::option::Option::Some(
6459            crate::model::compilation_result::Source::ReleaseConfig(v.into()),
6460        );
6461        self
6462    }
6463}
6464
6465impl wkt::message::Message for CompilationResult {
6466    fn typename() -> &'static str {
6467        "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
6468    }
6469}
6470
6471/// Defines additional types related to [CompilationResult].
6472pub mod compilation_result {
6473    #[allow(unused_imports)]
6474    use super::*;
6475
6476    /// An error encountered when attempting to compile a Dataform project.
6477    #[derive(Clone, Default, PartialEq)]
6478    #[non_exhaustive]
6479    pub struct CompilationError {
6480        /// Output only. The error's top level message.
6481        pub message: std::string::String,
6482
6483        /// Output only. The error's full stack trace.
6484        pub stack: std::string::String,
6485
6486        /// Output only. The path of the file where this error occurred, if
6487        /// available, relative to the project root.
6488        pub path: std::string::String,
6489
6490        /// Output only. The identifier of the action where this error occurred, if
6491        /// available.
6492        pub action_target: std::option::Option<crate::model::Target>,
6493
6494        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6495    }
6496
6497    impl CompilationError {
6498        pub fn new() -> Self {
6499            std::default::Default::default()
6500        }
6501
6502        /// Sets the value of [message][crate::model::compilation_result::CompilationError::message].
6503        ///
6504        /// # Example
6505        /// ```ignore,no_run
6506        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6507        /// let x = CompilationError::new().set_message("example");
6508        /// ```
6509        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6510            self.message = v.into();
6511            self
6512        }
6513
6514        /// Sets the value of [stack][crate::model::compilation_result::CompilationError::stack].
6515        ///
6516        /// # Example
6517        /// ```ignore,no_run
6518        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6519        /// let x = CompilationError::new().set_stack("example");
6520        /// ```
6521        pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6522            self.stack = v.into();
6523            self
6524        }
6525
6526        /// Sets the value of [path][crate::model::compilation_result::CompilationError::path].
6527        ///
6528        /// # Example
6529        /// ```ignore,no_run
6530        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6531        /// let x = CompilationError::new().set_path("example");
6532        /// ```
6533        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6534            self.path = v.into();
6535            self
6536        }
6537
6538        /// Sets the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
6539        ///
6540        /// # Example
6541        /// ```ignore,no_run
6542        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6543        /// use google_cloud_dataform_v1::model::Target;
6544        /// let x = CompilationError::new().set_action_target(Target::default()/* use setters */);
6545        /// ```
6546        pub fn set_action_target<T>(mut self, v: T) -> Self
6547        where
6548            T: std::convert::Into<crate::model::Target>,
6549        {
6550            self.action_target = std::option::Option::Some(v.into());
6551            self
6552        }
6553
6554        /// Sets or clears the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
6555        ///
6556        /// # Example
6557        /// ```ignore,no_run
6558        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6559        /// use google_cloud_dataform_v1::model::Target;
6560        /// let x = CompilationError::new().set_or_clear_action_target(Some(Target::default()/* use setters */));
6561        /// let x = CompilationError::new().set_or_clear_action_target(None::<Target>);
6562        /// ```
6563        pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
6564        where
6565            T: std::convert::Into<crate::model::Target>,
6566        {
6567            self.action_target = v.map(|x| x.into());
6568            self
6569        }
6570    }
6571
6572    impl wkt::message::Message for CompilationError {
6573        fn typename() -> &'static str {
6574            "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
6575        }
6576    }
6577
6578    /// The source of the compilation result.
6579    #[derive(Clone, Debug, PartialEq)]
6580    #[non_exhaustive]
6581    pub enum Source {
6582        /// Immutable. Git commit/tag/branch name at which the repository should be
6583        /// compiled. Must exist in the remote repository. Examples:
6584        ///
6585        /// - a commit SHA: `12ade345`
6586        /// - a tag: `tag1`
6587        /// - a branch name: `branch1`
6588        GitCommitish(std::string::String),
6589        /// Immutable. The name of the workspace to compile. Must be in the format
6590        /// `projects/*/locations/*/repositories/*/workspaces/*`.
6591        Workspace(std::string::String),
6592        /// Immutable. The name of the release config to compile. Must be in the
6593        /// format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
6594        ReleaseConfig(std::string::String),
6595    }
6596}
6597
6598/// Configures various aspects of Dataform code compilation.
6599#[derive(Clone, Default, PartialEq)]
6600#[non_exhaustive]
6601pub struct CodeCompilationConfig {
6602    /// Optional. The default database (Google Cloud project ID).
6603    pub default_database: std::string::String,
6604
6605    /// Optional. The default schema (BigQuery dataset ID).
6606    pub default_schema: std::string::String,
6607
6608    /// Optional. The default BigQuery location to use. Defaults to "US".
6609    /// See the BigQuery docs for a full list of locations:
6610    /// <https://cloud.google.com/bigquery/docs/locations>.
6611    pub default_location: std::string::String,
6612
6613    /// Optional. The default schema (BigQuery dataset ID) for assertions.
6614    pub assertion_schema: std::string::String,
6615
6616    /// Optional. User-defined variables that are made available to project code
6617    /// during compilation.
6618    pub vars: std::collections::HashMap<std::string::String, std::string::String>,
6619
6620    /// Optional. The suffix that should be appended to all database (Google Cloud
6621    /// project ID) names.
6622    pub database_suffix: std::string::String,
6623
6624    /// Optional. The suffix that should be appended to all schema (BigQuery
6625    /// dataset ID) names.
6626    pub schema_suffix: std::string::String,
6627
6628    /// Optional. The prefix that should be prepended to all table names.
6629    pub table_prefix: std::string::String,
6630
6631    /// Optional. The prefix to prepend to built-in assertion names.
6632    pub builtin_assertion_name_prefix: std::string::String,
6633
6634    /// Optional. The default notebook runtime options.
6635    pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
6636
6637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6638}
6639
6640impl CodeCompilationConfig {
6641    pub fn new() -> Self {
6642        std::default::Default::default()
6643    }
6644
6645    /// Sets the value of [default_database][crate::model::CodeCompilationConfig::default_database].
6646    ///
6647    /// # Example
6648    /// ```ignore,no_run
6649    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6650    /// let x = CodeCompilationConfig::new().set_default_database("example");
6651    /// ```
6652    pub fn set_default_database<T: std::convert::Into<std::string::String>>(
6653        mut self,
6654        v: T,
6655    ) -> Self {
6656        self.default_database = v.into();
6657        self
6658    }
6659
6660    /// Sets the value of [default_schema][crate::model::CodeCompilationConfig::default_schema].
6661    ///
6662    /// # Example
6663    /// ```ignore,no_run
6664    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6665    /// let x = CodeCompilationConfig::new().set_default_schema("example");
6666    /// ```
6667    pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6668        self.default_schema = v.into();
6669        self
6670    }
6671
6672    /// Sets the value of [default_location][crate::model::CodeCompilationConfig::default_location].
6673    ///
6674    /// # Example
6675    /// ```ignore,no_run
6676    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6677    /// let x = CodeCompilationConfig::new().set_default_location("example");
6678    /// ```
6679    pub fn set_default_location<T: std::convert::Into<std::string::String>>(
6680        mut self,
6681        v: T,
6682    ) -> Self {
6683        self.default_location = v.into();
6684        self
6685    }
6686
6687    /// Sets the value of [assertion_schema][crate::model::CodeCompilationConfig::assertion_schema].
6688    ///
6689    /// # Example
6690    /// ```ignore,no_run
6691    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6692    /// let x = CodeCompilationConfig::new().set_assertion_schema("example");
6693    /// ```
6694    pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
6695        mut self,
6696        v: T,
6697    ) -> Self {
6698        self.assertion_schema = v.into();
6699        self
6700    }
6701
6702    /// Sets the value of [vars][crate::model::CodeCompilationConfig::vars].
6703    ///
6704    /// # Example
6705    /// ```ignore,no_run
6706    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6707    /// let x = CodeCompilationConfig::new().set_vars([
6708    ///     ("key0", "abc"),
6709    ///     ("key1", "xyz"),
6710    /// ]);
6711    /// ```
6712    pub fn set_vars<T, K, V>(mut self, v: T) -> Self
6713    where
6714        T: std::iter::IntoIterator<Item = (K, V)>,
6715        K: std::convert::Into<std::string::String>,
6716        V: std::convert::Into<std::string::String>,
6717    {
6718        use std::iter::Iterator;
6719        self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6720        self
6721    }
6722
6723    /// Sets the value of [database_suffix][crate::model::CodeCompilationConfig::database_suffix].
6724    ///
6725    /// # Example
6726    /// ```ignore,no_run
6727    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6728    /// let x = CodeCompilationConfig::new().set_database_suffix("example");
6729    /// ```
6730    pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6731        self.database_suffix = v.into();
6732        self
6733    }
6734
6735    /// Sets the value of [schema_suffix][crate::model::CodeCompilationConfig::schema_suffix].
6736    ///
6737    /// # Example
6738    /// ```ignore,no_run
6739    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6740    /// let x = CodeCompilationConfig::new().set_schema_suffix("example");
6741    /// ```
6742    pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6743        self.schema_suffix = v.into();
6744        self
6745    }
6746
6747    /// Sets the value of [table_prefix][crate::model::CodeCompilationConfig::table_prefix].
6748    ///
6749    /// # Example
6750    /// ```ignore,no_run
6751    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6752    /// let x = CodeCompilationConfig::new().set_table_prefix("example");
6753    /// ```
6754    pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6755        self.table_prefix = v.into();
6756        self
6757    }
6758
6759    /// Sets the value of [builtin_assertion_name_prefix][crate::model::CodeCompilationConfig::builtin_assertion_name_prefix].
6760    ///
6761    /// # Example
6762    /// ```ignore,no_run
6763    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6764    /// let x = CodeCompilationConfig::new().set_builtin_assertion_name_prefix("example");
6765    /// ```
6766    pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
6767        mut self,
6768        v: T,
6769    ) -> Self {
6770        self.builtin_assertion_name_prefix = v.into();
6771        self
6772    }
6773
6774    /// Sets the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
6775    ///
6776    /// # Example
6777    /// ```ignore,no_run
6778    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6779    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6780    /// let x = CodeCompilationConfig::new().set_default_notebook_runtime_options(NotebookRuntimeOptions::default()/* use setters */);
6781    /// ```
6782    pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
6783    where
6784        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
6785    {
6786        self.default_notebook_runtime_options = std::option::Option::Some(v.into());
6787        self
6788    }
6789
6790    /// Sets or clears the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
6791    ///
6792    /// # Example
6793    /// ```ignore,no_run
6794    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6795    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6796    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(Some(NotebookRuntimeOptions::default()/* use setters */));
6797    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(None::<NotebookRuntimeOptions>);
6798    /// ```
6799    pub fn set_or_clear_default_notebook_runtime_options<T>(
6800        mut self,
6801        v: std::option::Option<T>,
6802    ) -> Self
6803    where
6804        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
6805    {
6806        self.default_notebook_runtime_options = v.map(|x| x.into());
6807        self
6808    }
6809}
6810
6811impl wkt::message::Message for CodeCompilationConfig {
6812    fn typename() -> &'static str {
6813        "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
6814    }
6815}
6816
6817/// Configures various aspects of Dataform notebook runtime.
6818#[derive(Clone, Default, PartialEq)]
6819#[non_exhaustive]
6820pub struct NotebookRuntimeOptions {
6821    /// Optional. The resource name of the [Colab runtime template]
6822    /// (<https://cloud.google.com/colab/docs/runtimes>), from which a runtime is
6823    /// created for notebook executions. If not specified, a runtime is created
6824    /// with Colab's default specifications.
6825    pub ai_platform_notebook_runtime_template: std::string::String,
6826
6827    /// The location to store the notebook execution result.
6828    pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
6829
6830    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6831}
6832
6833impl NotebookRuntimeOptions {
6834    pub fn new() -> Self {
6835        std::default::Default::default()
6836    }
6837
6838    /// Sets the value of [ai_platform_notebook_runtime_template][crate::model::NotebookRuntimeOptions::ai_platform_notebook_runtime_template].
6839    ///
6840    /// # Example
6841    /// ```ignore,no_run
6842    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6843    /// let x = NotebookRuntimeOptions::new().set_ai_platform_notebook_runtime_template("example");
6844    /// ```
6845    pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
6846        mut self,
6847        v: T,
6848    ) -> Self {
6849        self.ai_platform_notebook_runtime_template = v.into();
6850        self
6851    }
6852
6853    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink].
6854    ///
6855    /// Note that all the setters affecting `execution_sink` are mutually
6856    /// exclusive.
6857    ///
6858    /// # Example
6859    /// ```ignore,no_run
6860    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6861    /// use google_cloud_dataform_v1::model::notebook_runtime_options::ExecutionSink;
6862    /// let x = NotebookRuntimeOptions::new().set_execution_sink(Some(ExecutionSink::GcsOutputBucket("example".to_string())));
6863    /// ```
6864    pub fn set_execution_sink<
6865        T: std::convert::Into<
6866                std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
6867            >,
6868    >(
6869        mut self,
6870        v: T,
6871    ) -> Self {
6872        self.execution_sink = v.into();
6873        self
6874    }
6875
6876    /// The value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
6877    /// if it holds a `GcsOutputBucket`, `None` if the field is not set or
6878    /// holds a different branch.
6879    pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
6880        #[allow(unreachable_patterns)]
6881        self.execution_sink.as_ref().and_then(|v| match v {
6882            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
6883                std::option::Option::Some(v)
6884            }
6885            _ => std::option::Option::None,
6886        })
6887    }
6888
6889    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
6890    /// to hold a `GcsOutputBucket`.
6891    ///
6892    /// Note that all the setters affecting `execution_sink` are
6893    /// mutually exclusive.
6894    ///
6895    /// # Example
6896    /// ```ignore,no_run
6897    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6898    /// let x = NotebookRuntimeOptions::new().set_gcs_output_bucket("example");
6899    /// assert!(x.gcs_output_bucket().is_some());
6900    /// ```
6901    pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
6902        mut self,
6903        v: T,
6904    ) -> Self {
6905        self.execution_sink = std::option::Option::Some(
6906            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
6907        );
6908        self
6909    }
6910}
6911
6912impl wkt::message::Message for NotebookRuntimeOptions {
6913    fn typename() -> &'static str {
6914        "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
6915    }
6916}
6917
6918/// Defines additional types related to [NotebookRuntimeOptions].
6919pub mod notebook_runtime_options {
6920    #[allow(unused_imports)]
6921    use super::*;
6922
6923    /// The location to store the notebook execution result.
6924    #[derive(Clone, Debug, PartialEq)]
6925    #[non_exhaustive]
6926    pub enum ExecutionSink {
6927        /// Optional. The Google Cloud Storage location to upload the result to.
6928        /// Format: `gs://bucket-name`.
6929        GcsOutputBucket(std::string::String),
6930    }
6931}
6932
6933/// `ListCompilationResults` request message.
6934#[derive(Clone, Default, PartialEq)]
6935#[non_exhaustive]
6936pub struct ListCompilationResultsRequest {
6937    /// Required. The repository in which to list compilation results. Must be in
6938    /// the format `projects/*/locations/*/repositories/*`.
6939    pub parent: std::string::String,
6940
6941    /// Optional. Maximum number of compilation results to return. The server may
6942    /// return fewer items than requested. If unspecified, the server will pick an
6943    /// appropriate default.
6944    pub page_size: i32,
6945
6946    /// Optional. Page token received from a previous `ListCompilationResults`
6947    /// call. Provide this to retrieve the subsequent page.
6948    ///
6949    /// When paginating, all other parameters provided to `ListCompilationResults`,
6950    /// with the exception of `page_size`, must match the call that provided the
6951    /// page token.
6952    pub page_token: std::string::String,
6953
6954    /// Optional. This field only supports ordering by `name` and `create_time`.
6955    /// If unspecified, the server will choose the ordering.
6956    /// If specified, the default order is ascending for the `name` field.
6957    pub order_by: std::string::String,
6958
6959    /// Optional. Filter for the returned list.
6960    pub filter: std::string::String,
6961
6962    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6963}
6964
6965impl ListCompilationResultsRequest {
6966    pub fn new() -> Self {
6967        std::default::Default::default()
6968    }
6969
6970    /// Sets the value of [parent][crate::model::ListCompilationResultsRequest::parent].
6971    ///
6972    /// # Example
6973    /// ```ignore,no_run
6974    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
6975    /// let x = ListCompilationResultsRequest::new().set_parent("example");
6976    /// ```
6977    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6978        self.parent = v.into();
6979        self
6980    }
6981
6982    /// Sets the value of [page_size][crate::model::ListCompilationResultsRequest::page_size].
6983    ///
6984    /// # Example
6985    /// ```ignore,no_run
6986    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
6987    /// let x = ListCompilationResultsRequest::new().set_page_size(42);
6988    /// ```
6989    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6990        self.page_size = v.into();
6991        self
6992    }
6993
6994    /// Sets the value of [page_token][crate::model::ListCompilationResultsRequest::page_token].
6995    ///
6996    /// # Example
6997    /// ```ignore,no_run
6998    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
6999    /// let x = ListCompilationResultsRequest::new().set_page_token("example");
7000    /// ```
7001    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7002        self.page_token = v.into();
7003        self
7004    }
7005
7006    /// Sets the value of [order_by][crate::model::ListCompilationResultsRequest::order_by].
7007    ///
7008    /// # Example
7009    /// ```ignore,no_run
7010    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7011    /// let x = ListCompilationResultsRequest::new().set_order_by("example");
7012    /// ```
7013    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7014        self.order_by = v.into();
7015        self
7016    }
7017
7018    /// Sets the value of [filter][crate::model::ListCompilationResultsRequest::filter].
7019    ///
7020    /// # Example
7021    /// ```ignore,no_run
7022    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7023    /// let x = ListCompilationResultsRequest::new().set_filter("example");
7024    /// ```
7025    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7026        self.filter = v.into();
7027        self
7028    }
7029}
7030
7031impl wkt::message::Message for ListCompilationResultsRequest {
7032    fn typename() -> &'static str {
7033        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
7034    }
7035}
7036
7037/// `ListCompilationResults` response message.
7038#[derive(Clone, Default, PartialEq)]
7039#[non_exhaustive]
7040pub struct ListCompilationResultsResponse {
7041    /// List of compilation results.
7042    pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
7043
7044    /// A token, which can be sent as `page_token` to retrieve the next page.
7045    /// If this field is omitted, there are no subsequent pages.
7046    pub next_page_token: std::string::String,
7047
7048    /// Locations which could not be reached.
7049    pub unreachable: std::vec::Vec<std::string::String>,
7050
7051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7052}
7053
7054impl ListCompilationResultsResponse {
7055    pub fn new() -> Self {
7056        std::default::Default::default()
7057    }
7058
7059    /// Sets the value of [compilation_results][crate::model::ListCompilationResultsResponse::compilation_results].
7060    ///
7061    /// # Example
7062    /// ```ignore,no_run
7063    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7064    /// use google_cloud_dataform_v1::model::CompilationResult;
7065    /// let x = ListCompilationResultsResponse::new()
7066    ///     .set_compilation_results([
7067    ///         CompilationResult::default()/* use setters */,
7068    ///         CompilationResult::default()/* use (different) setters */,
7069    ///     ]);
7070    /// ```
7071    pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
7072    where
7073        T: std::iter::IntoIterator<Item = V>,
7074        V: std::convert::Into<crate::model::CompilationResult>,
7075    {
7076        use std::iter::Iterator;
7077        self.compilation_results = v.into_iter().map(|i| i.into()).collect();
7078        self
7079    }
7080
7081    /// Sets the value of [next_page_token][crate::model::ListCompilationResultsResponse::next_page_token].
7082    ///
7083    /// # Example
7084    /// ```ignore,no_run
7085    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7086    /// let x = ListCompilationResultsResponse::new().set_next_page_token("example");
7087    /// ```
7088    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7089        self.next_page_token = v.into();
7090        self
7091    }
7092
7093    /// Sets the value of [unreachable][crate::model::ListCompilationResultsResponse::unreachable].
7094    ///
7095    /// # Example
7096    /// ```ignore,no_run
7097    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7098    /// let x = ListCompilationResultsResponse::new().set_unreachable(["a", "b", "c"]);
7099    /// ```
7100    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7101    where
7102        T: std::iter::IntoIterator<Item = V>,
7103        V: std::convert::Into<std::string::String>,
7104    {
7105        use std::iter::Iterator;
7106        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7107        self
7108    }
7109}
7110
7111impl wkt::message::Message for ListCompilationResultsResponse {
7112    fn typename() -> &'static str {
7113        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
7114    }
7115}
7116
7117#[doc(hidden)]
7118impl gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
7119    type PageItem = crate::model::CompilationResult;
7120
7121    fn items(self) -> std::vec::Vec<Self::PageItem> {
7122        self.compilation_results
7123    }
7124
7125    fn next_page_token(&self) -> std::string::String {
7126        use std::clone::Clone;
7127        self.next_page_token.clone()
7128    }
7129}
7130
7131/// `GetCompilationResult` request message.
7132#[derive(Clone, Default, PartialEq)]
7133#[non_exhaustive]
7134pub struct GetCompilationResultRequest {
7135    /// Required. The compilation result's name.
7136    pub name: std::string::String,
7137
7138    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7139}
7140
7141impl GetCompilationResultRequest {
7142    pub fn new() -> Self {
7143        std::default::Default::default()
7144    }
7145
7146    /// Sets the value of [name][crate::model::GetCompilationResultRequest::name].
7147    ///
7148    /// # Example
7149    /// ```ignore,no_run
7150    /// # use google_cloud_dataform_v1::model::GetCompilationResultRequest;
7151    /// let x = GetCompilationResultRequest::new().set_name("example");
7152    /// ```
7153    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7154        self.name = v.into();
7155        self
7156    }
7157}
7158
7159impl wkt::message::Message for GetCompilationResultRequest {
7160    fn typename() -> &'static str {
7161        "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
7162    }
7163}
7164
7165/// `CreateCompilationResult` request message.
7166#[derive(Clone, Default, PartialEq)]
7167#[non_exhaustive]
7168pub struct CreateCompilationResultRequest {
7169    /// Required. The repository in which to create the compilation result. Must be
7170    /// in the format `projects/*/locations/*/repositories/*`.
7171    pub parent: std::string::String,
7172
7173    /// Required. The compilation result to create.
7174    pub compilation_result: std::option::Option<crate::model::CompilationResult>,
7175
7176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7177}
7178
7179impl CreateCompilationResultRequest {
7180    pub fn new() -> Self {
7181        std::default::Default::default()
7182    }
7183
7184    /// Sets the value of [parent][crate::model::CreateCompilationResultRequest::parent].
7185    ///
7186    /// # Example
7187    /// ```ignore,no_run
7188    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7189    /// let x = CreateCompilationResultRequest::new().set_parent("example");
7190    /// ```
7191    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7192        self.parent = v.into();
7193        self
7194    }
7195
7196    /// Sets the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7197    ///
7198    /// # Example
7199    /// ```ignore,no_run
7200    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7201    /// use google_cloud_dataform_v1::model::CompilationResult;
7202    /// let x = CreateCompilationResultRequest::new().set_compilation_result(CompilationResult::default()/* use setters */);
7203    /// ```
7204    pub fn set_compilation_result<T>(mut self, v: T) -> Self
7205    where
7206        T: std::convert::Into<crate::model::CompilationResult>,
7207    {
7208        self.compilation_result = std::option::Option::Some(v.into());
7209        self
7210    }
7211
7212    /// Sets or clears the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7213    ///
7214    /// # Example
7215    /// ```ignore,no_run
7216    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7217    /// use google_cloud_dataform_v1::model::CompilationResult;
7218    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(Some(CompilationResult::default()/* use setters */));
7219    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(None::<CompilationResult>);
7220    /// ```
7221    pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
7222    where
7223        T: std::convert::Into<crate::model::CompilationResult>,
7224    {
7225        self.compilation_result = v.map(|x| x.into());
7226        self
7227    }
7228}
7229
7230impl wkt::message::Message for CreateCompilationResultRequest {
7231    fn typename() -> &'static str {
7232        "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
7233    }
7234}
7235
7236/// Represents an action identifier. If the action writes output, the output
7237/// will be written to the referenced database object.
7238#[derive(Clone, Default, PartialEq)]
7239#[non_exhaustive]
7240pub struct Target {
7241    /// Optional. The action's database (Google Cloud project ID) .
7242    pub database: std::string::String,
7243
7244    /// Optional. The action's schema (BigQuery dataset ID), within `database`.
7245    pub schema: std::string::String,
7246
7247    /// Optional. The action's name, within `database` and `schema`.
7248    pub name: std::string::String,
7249
7250    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7251}
7252
7253impl Target {
7254    pub fn new() -> Self {
7255        std::default::Default::default()
7256    }
7257
7258    /// Sets the value of [database][crate::model::Target::database].
7259    ///
7260    /// # Example
7261    /// ```ignore,no_run
7262    /// # use google_cloud_dataform_v1::model::Target;
7263    /// let x = Target::new().set_database("example");
7264    /// ```
7265    pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7266        self.database = v.into();
7267        self
7268    }
7269
7270    /// Sets the value of [schema][crate::model::Target::schema].
7271    ///
7272    /// # Example
7273    /// ```ignore,no_run
7274    /// # use google_cloud_dataform_v1::model::Target;
7275    /// let x = Target::new().set_schema("example");
7276    /// ```
7277    pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7278        self.schema = v.into();
7279        self
7280    }
7281
7282    /// Sets the value of [name][crate::model::Target::name].
7283    ///
7284    /// # Example
7285    /// ```ignore,no_run
7286    /// # use google_cloud_dataform_v1::model::Target;
7287    /// let x = Target::new().set_name("example");
7288    /// ```
7289    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7290        self.name = v.into();
7291        self
7292    }
7293}
7294
7295impl wkt::message::Message for Target {
7296    fn typename() -> &'static str {
7297        "type.googleapis.com/google.cloud.dataform.v1.Target"
7298    }
7299}
7300
7301/// Describes a relation and its columns.
7302#[derive(Clone, Default, PartialEq)]
7303#[non_exhaustive]
7304pub struct RelationDescriptor {
7305    /// A text description of the relation.
7306    pub description: std::string::String,
7307
7308    /// A list of descriptions of columns within the relation.
7309    pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
7310
7311    /// A set of BigQuery labels that should be applied to the relation.
7312    pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
7313
7314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7315}
7316
7317impl RelationDescriptor {
7318    pub fn new() -> Self {
7319        std::default::Default::default()
7320    }
7321
7322    /// Sets the value of [description][crate::model::RelationDescriptor::description].
7323    ///
7324    /// # Example
7325    /// ```ignore,no_run
7326    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7327    /// let x = RelationDescriptor::new().set_description("example");
7328    /// ```
7329    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7330        self.description = v.into();
7331        self
7332    }
7333
7334    /// Sets the value of [columns][crate::model::RelationDescriptor::columns].
7335    ///
7336    /// # Example
7337    /// ```ignore,no_run
7338    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7339    /// use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7340    /// let x = RelationDescriptor::new()
7341    ///     .set_columns([
7342    ///         ColumnDescriptor::default()/* use setters */,
7343    ///         ColumnDescriptor::default()/* use (different) setters */,
7344    ///     ]);
7345    /// ```
7346    pub fn set_columns<T, V>(mut self, v: T) -> Self
7347    where
7348        T: std::iter::IntoIterator<Item = V>,
7349        V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
7350    {
7351        use std::iter::Iterator;
7352        self.columns = v.into_iter().map(|i| i.into()).collect();
7353        self
7354    }
7355
7356    /// Sets the value of [bigquery_labels][crate::model::RelationDescriptor::bigquery_labels].
7357    ///
7358    /// # Example
7359    /// ```ignore,no_run
7360    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7361    /// let x = RelationDescriptor::new().set_bigquery_labels([
7362    ///     ("key0", "abc"),
7363    ///     ("key1", "xyz"),
7364    /// ]);
7365    /// ```
7366    pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
7367    where
7368        T: std::iter::IntoIterator<Item = (K, V)>,
7369        K: std::convert::Into<std::string::String>,
7370        V: std::convert::Into<std::string::String>,
7371    {
7372        use std::iter::Iterator;
7373        self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7374        self
7375    }
7376}
7377
7378impl wkt::message::Message for RelationDescriptor {
7379    fn typename() -> &'static str {
7380        "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
7381    }
7382}
7383
7384/// Defines additional types related to [RelationDescriptor].
7385pub mod relation_descriptor {
7386    #[allow(unused_imports)]
7387    use super::*;
7388
7389    /// Describes a column.
7390    #[derive(Clone, Default, PartialEq)]
7391    #[non_exhaustive]
7392    pub struct ColumnDescriptor {
7393        /// The identifier for the column. Each entry in `path` represents one level
7394        /// of nesting.
7395        pub path: std::vec::Vec<std::string::String>,
7396
7397        /// A textual description of the column.
7398        pub description: std::string::String,
7399
7400        /// A list of BigQuery policy tags that will be applied to the column.
7401        pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
7402
7403        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7404    }
7405
7406    impl ColumnDescriptor {
7407        pub fn new() -> Self {
7408            std::default::Default::default()
7409        }
7410
7411        /// Sets the value of [path][crate::model::relation_descriptor::ColumnDescriptor::path].
7412        ///
7413        /// # Example
7414        /// ```ignore,no_run
7415        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7416        /// let x = ColumnDescriptor::new().set_path(["a", "b", "c"]);
7417        /// ```
7418        pub fn set_path<T, V>(mut self, v: T) -> Self
7419        where
7420            T: std::iter::IntoIterator<Item = V>,
7421            V: std::convert::Into<std::string::String>,
7422        {
7423            use std::iter::Iterator;
7424            self.path = v.into_iter().map(|i| i.into()).collect();
7425            self
7426        }
7427
7428        /// Sets the value of [description][crate::model::relation_descriptor::ColumnDescriptor::description].
7429        ///
7430        /// # Example
7431        /// ```ignore,no_run
7432        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7433        /// let x = ColumnDescriptor::new().set_description("example");
7434        /// ```
7435        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7436            self.description = v.into();
7437            self
7438        }
7439
7440        /// Sets the value of [bigquery_policy_tags][crate::model::relation_descriptor::ColumnDescriptor::bigquery_policy_tags].
7441        ///
7442        /// # Example
7443        /// ```ignore,no_run
7444        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7445        /// let x = ColumnDescriptor::new().set_bigquery_policy_tags(["a", "b", "c"]);
7446        /// ```
7447        pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
7448        where
7449            T: std::iter::IntoIterator<Item = V>,
7450            V: std::convert::Into<std::string::String>,
7451        {
7452            use std::iter::Iterator;
7453            self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
7454            self
7455        }
7456    }
7457
7458    impl wkt::message::Message for ColumnDescriptor {
7459        fn typename() -> &'static str {
7460            "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
7461        }
7462    }
7463}
7464
7465/// Represents a single Dataform action in a compilation result.
7466#[derive(Clone, Default, PartialEq)]
7467#[non_exhaustive]
7468pub struct CompilationResultAction {
7469    /// This action's identifier. Unique within the compilation result.
7470    pub target: std::option::Option<crate::model::Target>,
7471
7472    /// The action's identifier if the project had been compiled without any
7473    /// overrides configured. Unique within the compilation result.
7474    pub canonical_target: std::option::Option<crate::model::Target>,
7475
7476    /// The full path including filename in which this action is located, relative
7477    /// to the workspace root.
7478    pub file_path: std::string::String,
7479
7480    /// Output only. All the metadata information that is used internally to serve
7481    /// the resource. For example: timestamps, flags, status fields, etc. The
7482    /// format of this field is a JSON string.
7483    pub internal_metadata: std::option::Option<std::string::String>,
7484
7485    /// The compiled object.
7486    pub compiled_object:
7487        std::option::Option<crate::model::compilation_result_action::CompiledObject>,
7488
7489    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7490}
7491
7492impl CompilationResultAction {
7493    pub fn new() -> Self {
7494        std::default::Default::default()
7495    }
7496
7497    /// Sets the value of [target][crate::model::CompilationResultAction::target].
7498    ///
7499    /// # Example
7500    /// ```ignore,no_run
7501    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7502    /// use google_cloud_dataform_v1::model::Target;
7503    /// let x = CompilationResultAction::new().set_target(Target::default()/* use setters */);
7504    /// ```
7505    pub fn set_target<T>(mut self, v: T) -> Self
7506    where
7507        T: std::convert::Into<crate::model::Target>,
7508    {
7509        self.target = std::option::Option::Some(v.into());
7510        self
7511    }
7512
7513    /// Sets or clears the value of [target][crate::model::CompilationResultAction::target].
7514    ///
7515    /// # Example
7516    /// ```ignore,no_run
7517    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7518    /// use google_cloud_dataform_v1::model::Target;
7519    /// let x = CompilationResultAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
7520    /// let x = CompilationResultAction::new().set_or_clear_target(None::<Target>);
7521    /// ```
7522    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
7523    where
7524        T: std::convert::Into<crate::model::Target>,
7525    {
7526        self.target = v.map(|x| x.into());
7527        self
7528    }
7529
7530    /// Sets the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
7531    ///
7532    /// # Example
7533    /// ```ignore,no_run
7534    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7535    /// use google_cloud_dataform_v1::model::Target;
7536    /// let x = CompilationResultAction::new().set_canonical_target(Target::default()/* use setters */);
7537    /// ```
7538    pub fn set_canonical_target<T>(mut self, v: T) -> Self
7539    where
7540        T: std::convert::Into<crate::model::Target>,
7541    {
7542        self.canonical_target = std::option::Option::Some(v.into());
7543        self
7544    }
7545
7546    /// Sets or clears the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
7547    ///
7548    /// # Example
7549    /// ```ignore,no_run
7550    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7551    /// use google_cloud_dataform_v1::model::Target;
7552    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
7553    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(None::<Target>);
7554    /// ```
7555    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
7556    where
7557        T: std::convert::Into<crate::model::Target>,
7558    {
7559        self.canonical_target = v.map(|x| x.into());
7560        self
7561    }
7562
7563    /// Sets the value of [file_path][crate::model::CompilationResultAction::file_path].
7564    ///
7565    /// # Example
7566    /// ```ignore,no_run
7567    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7568    /// let x = CompilationResultAction::new().set_file_path("example");
7569    /// ```
7570    pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7571        self.file_path = v.into();
7572        self
7573    }
7574
7575    /// Sets the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
7576    ///
7577    /// # Example
7578    /// ```ignore,no_run
7579    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7580    /// let x = CompilationResultAction::new().set_internal_metadata("example");
7581    /// ```
7582    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
7583    where
7584        T: std::convert::Into<std::string::String>,
7585    {
7586        self.internal_metadata = std::option::Option::Some(v.into());
7587        self
7588    }
7589
7590    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
7591    ///
7592    /// # Example
7593    /// ```ignore,no_run
7594    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7595    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(Some("example"));
7596    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(None::<String>);
7597    /// ```
7598    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7599    where
7600        T: std::convert::Into<std::string::String>,
7601    {
7602        self.internal_metadata = v.map(|x| x.into());
7603        self
7604    }
7605
7606    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object].
7607    ///
7608    /// Note that all the setters affecting `compiled_object` are mutually
7609    /// exclusive.
7610    ///
7611    /// # Example
7612    /// ```ignore,no_run
7613    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7614    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
7615    /// let x = CompilationResultAction::new().set_compiled_object(Some(
7616    ///     google_cloud_dataform_v1::model::compilation_result_action::CompiledObject::Relation(Relation::default().into())));
7617    /// ```
7618    pub fn set_compiled_object<
7619        T: std::convert::Into<
7620                std::option::Option<crate::model::compilation_result_action::CompiledObject>,
7621            >,
7622    >(
7623        mut self,
7624        v: T,
7625    ) -> Self {
7626        self.compiled_object = v.into();
7627        self
7628    }
7629
7630    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7631    /// if it holds a `Relation`, `None` if the field is not set or
7632    /// holds a different branch.
7633    pub fn relation(
7634        &self,
7635    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
7636    {
7637        #[allow(unreachable_patterns)]
7638        self.compiled_object.as_ref().and_then(|v| match v {
7639            crate::model::compilation_result_action::CompiledObject::Relation(v) => {
7640                std::option::Option::Some(v)
7641            }
7642            _ => std::option::Option::None,
7643        })
7644    }
7645
7646    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7647    /// to hold a `Relation`.
7648    ///
7649    /// Note that all the setters affecting `compiled_object` are
7650    /// mutually exclusive.
7651    ///
7652    /// # Example
7653    /// ```ignore,no_run
7654    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7655    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
7656    /// let x = CompilationResultAction::new().set_relation(Relation::default()/* use setters */);
7657    /// assert!(x.relation().is_some());
7658    /// assert!(x.operations().is_none());
7659    /// assert!(x.assertion().is_none());
7660    /// assert!(x.declaration().is_none());
7661    /// assert!(x.notebook().is_none());
7662    /// assert!(x.data_preparation().is_none());
7663    /// ```
7664    pub fn set_relation<
7665        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
7666    >(
7667        mut self,
7668        v: T,
7669    ) -> Self {
7670        self.compiled_object = std::option::Option::Some(
7671            crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
7672        );
7673        self
7674    }
7675
7676    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7677    /// if it holds a `Operations`, `None` if the field is not set or
7678    /// holds a different branch.
7679    pub fn operations(
7680        &self,
7681    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
7682    {
7683        #[allow(unreachable_patterns)]
7684        self.compiled_object.as_ref().and_then(|v| match v {
7685            crate::model::compilation_result_action::CompiledObject::Operations(v) => {
7686                std::option::Option::Some(v)
7687            }
7688            _ => std::option::Option::None,
7689        })
7690    }
7691
7692    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7693    /// to hold a `Operations`.
7694    ///
7695    /// Note that all the setters affecting `compiled_object` are
7696    /// mutually exclusive.
7697    ///
7698    /// # Example
7699    /// ```ignore,no_run
7700    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7701    /// use google_cloud_dataform_v1::model::compilation_result_action::Operations;
7702    /// let x = CompilationResultAction::new().set_operations(Operations::default()/* use setters */);
7703    /// assert!(x.operations().is_some());
7704    /// assert!(x.relation().is_none());
7705    /// assert!(x.assertion().is_none());
7706    /// assert!(x.declaration().is_none());
7707    /// assert!(x.notebook().is_none());
7708    /// assert!(x.data_preparation().is_none());
7709    /// ```
7710    pub fn set_operations<
7711        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
7712    >(
7713        mut self,
7714        v: T,
7715    ) -> Self {
7716        self.compiled_object = std::option::Option::Some(
7717            crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
7718        );
7719        self
7720    }
7721
7722    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7723    /// if it holds a `Assertion`, `None` if the field is not set or
7724    /// holds a different branch.
7725    pub fn assertion(
7726        &self,
7727    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
7728    {
7729        #[allow(unreachable_patterns)]
7730        self.compiled_object.as_ref().and_then(|v| match v {
7731            crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
7732                std::option::Option::Some(v)
7733            }
7734            _ => std::option::Option::None,
7735        })
7736    }
7737
7738    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7739    /// to hold a `Assertion`.
7740    ///
7741    /// Note that all the setters affecting `compiled_object` are
7742    /// mutually exclusive.
7743    ///
7744    /// # Example
7745    /// ```ignore,no_run
7746    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7747    /// use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
7748    /// let x = CompilationResultAction::new().set_assertion(Assertion::default()/* use setters */);
7749    /// assert!(x.assertion().is_some());
7750    /// assert!(x.relation().is_none());
7751    /// assert!(x.operations().is_none());
7752    /// assert!(x.declaration().is_none());
7753    /// assert!(x.notebook().is_none());
7754    /// assert!(x.data_preparation().is_none());
7755    /// ```
7756    pub fn set_assertion<
7757        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
7758    >(
7759        mut self,
7760        v: T,
7761    ) -> Self {
7762        self.compiled_object = std::option::Option::Some(
7763            crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
7764        );
7765        self
7766    }
7767
7768    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7769    /// if it holds a `Declaration`, `None` if the field is not set or
7770    /// holds a different branch.
7771    pub fn declaration(
7772        &self,
7773    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
7774    {
7775        #[allow(unreachable_patterns)]
7776        self.compiled_object.as_ref().and_then(|v| match v {
7777            crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
7778                std::option::Option::Some(v)
7779            }
7780            _ => std::option::Option::None,
7781        })
7782    }
7783
7784    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7785    /// to hold a `Declaration`.
7786    ///
7787    /// Note that all the setters affecting `compiled_object` are
7788    /// mutually exclusive.
7789    ///
7790    /// # Example
7791    /// ```ignore,no_run
7792    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7793    /// use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
7794    /// let x = CompilationResultAction::new().set_declaration(Declaration::default()/* use setters */);
7795    /// assert!(x.declaration().is_some());
7796    /// assert!(x.relation().is_none());
7797    /// assert!(x.operations().is_none());
7798    /// assert!(x.assertion().is_none());
7799    /// assert!(x.notebook().is_none());
7800    /// assert!(x.data_preparation().is_none());
7801    /// ```
7802    pub fn set_declaration<
7803        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
7804    >(
7805        mut self,
7806        v: T,
7807    ) -> Self {
7808        self.compiled_object = std::option::Option::Some(
7809            crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
7810        );
7811        self
7812    }
7813
7814    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7815    /// if it holds a `Notebook`, `None` if the field is not set or
7816    /// holds a different branch.
7817    pub fn notebook(
7818        &self,
7819    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
7820    {
7821        #[allow(unreachable_patterns)]
7822        self.compiled_object.as_ref().and_then(|v| match v {
7823            crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
7824                std::option::Option::Some(v)
7825            }
7826            _ => std::option::Option::None,
7827        })
7828    }
7829
7830    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7831    /// to hold a `Notebook`.
7832    ///
7833    /// Note that all the setters affecting `compiled_object` are
7834    /// mutually exclusive.
7835    ///
7836    /// # Example
7837    /// ```ignore,no_run
7838    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7839    /// use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
7840    /// let x = CompilationResultAction::new().set_notebook(Notebook::default()/* use setters */);
7841    /// assert!(x.notebook().is_some());
7842    /// assert!(x.relation().is_none());
7843    /// assert!(x.operations().is_none());
7844    /// assert!(x.assertion().is_none());
7845    /// assert!(x.declaration().is_none());
7846    /// assert!(x.data_preparation().is_none());
7847    /// ```
7848    pub fn set_notebook<
7849        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
7850    >(
7851        mut self,
7852        v: T,
7853    ) -> Self {
7854        self.compiled_object = std::option::Option::Some(
7855            crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
7856        );
7857        self
7858    }
7859
7860    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7861    /// if it holds a `DataPreparation`, `None` if the field is not set or
7862    /// holds a different branch.
7863    pub fn data_preparation(
7864        &self,
7865    ) -> std::option::Option<
7866        &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
7867    > {
7868        #[allow(unreachable_patterns)]
7869        self.compiled_object.as_ref().and_then(|v| match v {
7870            crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
7871                std::option::Option::Some(v)
7872            }
7873            _ => std::option::Option::None,
7874        })
7875    }
7876
7877    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7878    /// to hold a `DataPreparation`.
7879    ///
7880    /// Note that all the setters affecting `compiled_object` are
7881    /// mutually exclusive.
7882    ///
7883    /// # Example
7884    /// ```ignore,no_run
7885    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7886    /// use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
7887    /// let x = CompilationResultAction::new().set_data_preparation(DataPreparation::default()/* use setters */);
7888    /// assert!(x.data_preparation().is_some());
7889    /// assert!(x.relation().is_none());
7890    /// assert!(x.operations().is_none());
7891    /// assert!(x.assertion().is_none());
7892    /// assert!(x.declaration().is_none());
7893    /// assert!(x.notebook().is_none());
7894    /// ```
7895    pub fn set_data_preparation<
7896        T: std::convert::Into<
7897                std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
7898            >,
7899    >(
7900        mut self,
7901        v: T,
7902    ) -> Self {
7903        self.compiled_object = std::option::Option::Some(
7904            crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
7905        );
7906        self
7907    }
7908}
7909
7910impl wkt::message::Message for CompilationResultAction {
7911    fn typename() -> &'static str {
7912        "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
7913    }
7914}
7915
7916/// Defines additional types related to [CompilationResultAction].
7917pub mod compilation_result_action {
7918    #[allow(unused_imports)]
7919    use super::*;
7920
7921    /// Represents a database relation.
7922    #[derive(Clone, Default, PartialEq)]
7923    #[non_exhaustive]
7924    pub struct Relation {
7925        /// A list of actions that this action depends on.
7926        pub dependency_targets: std::vec::Vec<crate::model::Target>,
7927
7928        /// Whether this action is disabled (i.e. should not be run).
7929        pub disabled: bool,
7930
7931        /// Arbitrary, user-defined tags on this action.
7932        pub tags: std::vec::Vec<std::string::String>,
7933
7934        /// Descriptor for the relation and its columns.
7935        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
7936
7937        /// The type of this relation.
7938        pub relation_type: crate::model::compilation_result_action::relation::RelationType,
7939
7940        /// The SELECT query which returns rows which this relation should contain.
7941        pub select_query: std::string::String,
7942
7943        /// SQL statements to be executed before creating the relation.
7944        pub pre_operations: std::vec::Vec<std::string::String>,
7945
7946        /// SQL statements to be executed after creating the relation.
7947        pub post_operations: std::vec::Vec<std::string::String>,
7948
7949        /// Configures `INCREMENTAL_TABLE` settings for this relation. Only set if
7950        /// `relation_type` is `INCREMENTAL_TABLE`.
7951        pub incremental_table_config: std::option::Option<
7952            crate::model::compilation_result_action::relation::IncrementalTableConfig,
7953        >,
7954
7955        /// The SQL expression used to partition the relation.
7956        pub partition_expression: std::string::String,
7957
7958        /// A list of columns or SQL expressions used to cluster the table.
7959        pub cluster_expressions: std::vec::Vec<std::string::String>,
7960
7961        /// Sets the partition expiration in days.
7962        pub partition_expiration_days: i32,
7963
7964        /// Specifies whether queries on this table must include a predicate filter
7965        /// that filters on the partitioning column.
7966        pub require_partition_filter: bool,
7967
7968        /// Additional options that will be provided as key/value pairs into the
7969        /// options clause of a create table/view statement. See
7970        /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language>
7971        /// for more information on which options are supported.
7972        pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
7973
7974        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7975    }
7976
7977    impl Relation {
7978        pub fn new() -> Self {
7979            std::default::Default::default()
7980        }
7981
7982        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Relation::dependency_targets].
7983        ///
7984        /// # Example
7985        /// ```ignore,no_run
7986        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
7987        /// use google_cloud_dataform_v1::model::Target;
7988        /// let x = Relation::new()
7989        ///     .set_dependency_targets([
7990        ///         Target::default()/* use setters */,
7991        ///         Target::default()/* use (different) setters */,
7992        ///     ]);
7993        /// ```
7994        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
7995        where
7996            T: std::iter::IntoIterator<Item = V>,
7997            V: std::convert::Into<crate::model::Target>,
7998        {
7999            use std::iter::Iterator;
8000            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8001            self
8002        }
8003
8004        /// Sets the value of [disabled][crate::model::compilation_result_action::Relation::disabled].
8005        ///
8006        /// # Example
8007        /// ```ignore,no_run
8008        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8009        /// let x = Relation::new().set_disabled(true);
8010        /// ```
8011        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8012            self.disabled = v.into();
8013            self
8014        }
8015
8016        /// Sets the value of [tags][crate::model::compilation_result_action::Relation::tags].
8017        ///
8018        /// # Example
8019        /// ```ignore,no_run
8020        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8021        /// let x = Relation::new().set_tags(["a", "b", "c"]);
8022        /// ```
8023        pub fn set_tags<T, V>(mut self, v: T) -> Self
8024        where
8025            T: std::iter::IntoIterator<Item = V>,
8026            V: std::convert::Into<std::string::String>,
8027        {
8028            use std::iter::Iterator;
8029            self.tags = v.into_iter().map(|i| i.into()).collect();
8030            self
8031        }
8032
8033        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8034        ///
8035        /// # Example
8036        /// ```ignore,no_run
8037        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8038        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8039        /// let x = Relation::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8040        /// ```
8041        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8042        where
8043            T: std::convert::Into<crate::model::RelationDescriptor>,
8044        {
8045            self.relation_descriptor = std::option::Option::Some(v.into());
8046            self
8047        }
8048
8049        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8050        ///
8051        /// # Example
8052        /// ```ignore,no_run
8053        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8054        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8055        /// let x = Relation::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8056        /// let x = Relation::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8057        /// ```
8058        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8059        where
8060            T: std::convert::Into<crate::model::RelationDescriptor>,
8061        {
8062            self.relation_descriptor = v.map(|x| x.into());
8063            self
8064        }
8065
8066        /// Sets the value of [relation_type][crate::model::compilation_result_action::Relation::relation_type].
8067        ///
8068        /// # Example
8069        /// ```ignore,no_run
8070        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8071        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::RelationType;
8072        /// let x0 = Relation::new().set_relation_type(RelationType::Table);
8073        /// let x1 = Relation::new().set_relation_type(RelationType::View);
8074        /// let x2 = Relation::new().set_relation_type(RelationType::IncrementalTable);
8075        /// ```
8076        pub fn set_relation_type<
8077            T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
8078        >(
8079            mut self,
8080            v: T,
8081        ) -> Self {
8082            self.relation_type = v.into();
8083            self
8084        }
8085
8086        /// Sets the value of [select_query][crate::model::compilation_result_action::Relation::select_query].
8087        ///
8088        /// # Example
8089        /// ```ignore,no_run
8090        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8091        /// let x = Relation::new().set_select_query("example");
8092        /// ```
8093        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
8094            mut self,
8095            v: T,
8096        ) -> Self {
8097            self.select_query = v.into();
8098            self
8099        }
8100
8101        /// Sets the value of [pre_operations][crate::model::compilation_result_action::Relation::pre_operations].
8102        ///
8103        /// # Example
8104        /// ```ignore,no_run
8105        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8106        /// let x = Relation::new().set_pre_operations(["a", "b", "c"]);
8107        /// ```
8108        pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
8109        where
8110            T: std::iter::IntoIterator<Item = V>,
8111            V: std::convert::Into<std::string::String>,
8112        {
8113            use std::iter::Iterator;
8114            self.pre_operations = v.into_iter().map(|i| i.into()).collect();
8115            self
8116        }
8117
8118        /// Sets the value of [post_operations][crate::model::compilation_result_action::Relation::post_operations].
8119        ///
8120        /// # Example
8121        /// ```ignore,no_run
8122        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8123        /// let x = Relation::new().set_post_operations(["a", "b", "c"]);
8124        /// ```
8125        pub fn set_post_operations<T, V>(mut self, v: T) -> Self
8126        where
8127            T: std::iter::IntoIterator<Item = V>,
8128            V: std::convert::Into<std::string::String>,
8129        {
8130            use std::iter::Iterator;
8131            self.post_operations = v.into_iter().map(|i| i.into()).collect();
8132            self
8133        }
8134
8135        /// Sets the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8136        ///
8137        /// # Example
8138        /// ```ignore,no_run
8139        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8140        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8141        /// let x = Relation::new().set_incremental_table_config(IncrementalTableConfig::default()/* use setters */);
8142        /// ```
8143        pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
8144        where
8145            T: std::convert::Into<
8146                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8147                >,
8148        {
8149            self.incremental_table_config = std::option::Option::Some(v.into());
8150            self
8151        }
8152
8153        /// Sets or clears the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8154        ///
8155        /// # Example
8156        /// ```ignore,no_run
8157        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8158        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8159        /// let x = Relation::new().set_or_clear_incremental_table_config(Some(IncrementalTableConfig::default()/* use setters */));
8160        /// let x = Relation::new().set_or_clear_incremental_table_config(None::<IncrementalTableConfig>);
8161        /// ```
8162        pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
8163        where
8164            T: std::convert::Into<
8165                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8166                >,
8167        {
8168            self.incremental_table_config = v.map(|x| x.into());
8169            self
8170        }
8171
8172        /// Sets the value of [partition_expression][crate::model::compilation_result_action::Relation::partition_expression].
8173        ///
8174        /// # Example
8175        /// ```ignore,no_run
8176        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8177        /// let x = Relation::new().set_partition_expression("example");
8178        /// ```
8179        pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
8180            mut self,
8181            v: T,
8182        ) -> Self {
8183            self.partition_expression = v.into();
8184            self
8185        }
8186
8187        /// Sets the value of [cluster_expressions][crate::model::compilation_result_action::Relation::cluster_expressions].
8188        ///
8189        /// # Example
8190        /// ```ignore,no_run
8191        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8192        /// let x = Relation::new().set_cluster_expressions(["a", "b", "c"]);
8193        /// ```
8194        pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
8195        where
8196            T: std::iter::IntoIterator<Item = V>,
8197            V: std::convert::Into<std::string::String>,
8198        {
8199            use std::iter::Iterator;
8200            self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
8201            self
8202        }
8203
8204        /// Sets the value of [partition_expiration_days][crate::model::compilation_result_action::Relation::partition_expiration_days].
8205        ///
8206        /// # Example
8207        /// ```ignore,no_run
8208        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8209        /// let x = Relation::new().set_partition_expiration_days(42);
8210        /// ```
8211        pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8212            self.partition_expiration_days = v.into();
8213            self
8214        }
8215
8216        /// Sets the value of [require_partition_filter][crate::model::compilation_result_action::Relation::require_partition_filter].
8217        ///
8218        /// # Example
8219        /// ```ignore,no_run
8220        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8221        /// let x = Relation::new().set_require_partition_filter(true);
8222        /// ```
8223        pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8224            self.require_partition_filter = v.into();
8225            self
8226        }
8227
8228        /// Sets the value of [additional_options][crate::model::compilation_result_action::Relation::additional_options].
8229        ///
8230        /// # Example
8231        /// ```ignore,no_run
8232        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8233        /// let x = Relation::new().set_additional_options([
8234        ///     ("key0", "abc"),
8235        ///     ("key1", "xyz"),
8236        /// ]);
8237        /// ```
8238        pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
8239        where
8240            T: std::iter::IntoIterator<Item = (K, V)>,
8241            K: std::convert::Into<std::string::String>,
8242            V: std::convert::Into<std::string::String>,
8243        {
8244            use std::iter::Iterator;
8245            self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8246            self
8247        }
8248    }
8249
8250    impl wkt::message::Message for Relation {
8251        fn typename() -> &'static str {
8252            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
8253        }
8254    }
8255
8256    /// Defines additional types related to [Relation].
8257    pub mod relation {
8258        #[allow(unused_imports)]
8259        use super::*;
8260
8261        /// Contains settings for relations of type `INCREMENTAL_TABLE`.
8262        #[derive(Clone, Default, PartialEq)]
8263        #[non_exhaustive]
8264        pub struct IncrementalTableConfig {
8265            /// The SELECT query which returns rows which should be inserted into the
8266            /// relation if it already exists and is not being refreshed.
8267            pub incremental_select_query: std::string::String,
8268
8269            /// Whether this table should be protected from being refreshed.
8270            pub refresh_disabled: bool,
8271
8272            /// A set of columns or SQL expressions used to define row uniqueness.
8273            /// If any duplicates are discovered (as defined by `unique_key_parts`),
8274            /// only the newly selected rows (as defined by `incremental_select_query`)
8275            /// will be included in the relation.
8276            pub unique_key_parts: std::vec::Vec<std::string::String>,
8277
8278            /// A SQL expression conditional used to limit the set of existing rows
8279            /// considered for a merge operation (see `unique_key_parts` for more
8280            /// information).
8281            pub update_partition_filter: std::string::String,
8282
8283            /// SQL statements to be executed before inserting new rows into the
8284            /// relation.
8285            pub incremental_pre_operations: std::vec::Vec<std::string::String>,
8286
8287            /// SQL statements to be executed after inserting new rows into the
8288            /// relation.
8289            pub incremental_post_operations: std::vec::Vec<std::string::String>,
8290
8291            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8292        }
8293
8294        impl IncrementalTableConfig {
8295            pub fn new() -> Self {
8296                std::default::Default::default()
8297            }
8298
8299            /// Sets the value of [incremental_select_query][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_select_query].
8300            ///
8301            /// # Example
8302            /// ```ignore,no_run
8303            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8304            /// let x = IncrementalTableConfig::new().set_incremental_select_query("example");
8305            /// ```
8306            pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
8307                mut self,
8308                v: T,
8309            ) -> Self {
8310                self.incremental_select_query = v.into();
8311                self
8312            }
8313
8314            /// Sets the value of [refresh_disabled][crate::model::compilation_result_action::relation::IncrementalTableConfig::refresh_disabled].
8315            ///
8316            /// # Example
8317            /// ```ignore,no_run
8318            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8319            /// let x = IncrementalTableConfig::new().set_refresh_disabled(true);
8320            /// ```
8321            pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8322                self.refresh_disabled = v.into();
8323                self
8324            }
8325
8326            /// Sets the value of [unique_key_parts][crate::model::compilation_result_action::relation::IncrementalTableConfig::unique_key_parts].
8327            ///
8328            /// # Example
8329            /// ```ignore,no_run
8330            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8331            /// let x = IncrementalTableConfig::new().set_unique_key_parts(["a", "b", "c"]);
8332            /// ```
8333            pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
8334            where
8335                T: std::iter::IntoIterator<Item = V>,
8336                V: std::convert::Into<std::string::String>,
8337            {
8338                use std::iter::Iterator;
8339                self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
8340                self
8341            }
8342
8343            /// Sets the value of [update_partition_filter][crate::model::compilation_result_action::relation::IncrementalTableConfig::update_partition_filter].
8344            ///
8345            /// # Example
8346            /// ```ignore,no_run
8347            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8348            /// let x = IncrementalTableConfig::new().set_update_partition_filter("example");
8349            /// ```
8350            pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
8351                mut self,
8352                v: T,
8353            ) -> Self {
8354                self.update_partition_filter = v.into();
8355                self
8356            }
8357
8358            /// Sets the value of [incremental_pre_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_pre_operations].
8359            ///
8360            /// # Example
8361            /// ```ignore,no_run
8362            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8363            /// let x = IncrementalTableConfig::new().set_incremental_pre_operations(["a", "b", "c"]);
8364            /// ```
8365            pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
8366            where
8367                T: std::iter::IntoIterator<Item = V>,
8368                V: std::convert::Into<std::string::String>,
8369            {
8370                use std::iter::Iterator;
8371                self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
8372                self
8373            }
8374
8375            /// Sets the value of [incremental_post_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_post_operations].
8376            ///
8377            /// # Example
8378            /// ```ignore,no_run
8379            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8380            /// let x = IncrementalTableConfig::new().set_incremental_post_operations(["a", "b", "c"]);
8381            /// ```
8382            pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
8383            where
8384                T: std::iter::IntoIterator<Item = V>,
8385                V: std::convert::Into<std::string::String>,
8386            {
8387                use std::iter::Iterator;
8388                self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
8389                self
8390            }
8391        }
8392
8393        impl wkt::message::Message for IncrementalTableConfig {
8394            fn typename() -> &'static str {
8395                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
8396            }
8397        }
8398
8399        /// Indicates the type of this relation.
8400        ///
8401        /// # Working with unknown values
8402        ///
8403        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8404        /// additional enum variants at any time. Adding new variants is not considered
8405        /// a breaking change. Applications should write their code in anticipation of:
8406        ///
8407        /// - New values appearing in future releases of the client library, **and**
8408        /// - New values received dynamically, without application changes.
8409        ///
8410        /// Please consult the [Working with enums] section in the user guide for some
8411        /// guidelines.
8412        ///
8413        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8414        #[derive(Clone, Debug, PartialEq)]
8415        #[non_exhaustive]
8416        pub enum RelationType {
8417            /// Default value. This value is unused.
8418            Unspecified,
8419            /// The relation is a table.
8420            Table,
8421            /// The relation is a view.
8422            View,
8423            /// The relation is an incrementalized table.
8424            IncrementalTable,
8425            /// The relation is a materialized view.
8426            MaterializedView,
8427            /// If set, the enum was initialized with an unknown value.
8428            ///
8429            /// Applications can examine the value using [RelationType::value] or
8430            /// [RelationType::name].
8431            UnknownValue(relation_type::UnknownValue),
8432        }
8433
8434        #[doc(hidden)]
8435        pub mod relation_type {
8436            #[allow(unused_imports)]
8437            use super::*;
8438            #[derive(Clone, Debug, PartialEq)]
8439            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8440        }
8441
8442        impl RelationType {
8443            /// Gets the enum value.
8444            ///
8445            /// Returns `None` if the enum contains an unknown value deserialized from
8446            /// the string representation of enums.
8447            pub fn value(&self) -> std::option::Option<i32> {
8448                match self {
8449                    Self::Unspecified => std::option::Option::Some(0),
8450                    Self::Table => std::option::Option::Some(1),
8451                    Self::View => std::option::Option::Some(2),
8452                    Self::IncrementalTable => std::option::Option::Some(3),
8453                    Self::MaterializedView => std::option::Option::Some(4),
8454                    Self::UnknownValue(u) => u.0.value(),
8455                }
8456            }
8457
8458            /// Gets the enum value as a string.
8459            ///
8460            /// Returns `None` if the enum contains an unknown value deserialized from
8461            /// the integer representation of enums.
8462            pub fn name(&self) -> std::option::Option<&str> {
8463                match self {
8464                    Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
8465                    Self::Table => std::option::Option::Some("TABLE"),
8466                    Self::View => std::option::Option::Some("VIEW"),
8467                    Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
8468                    Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
8469                    Self::UnknownValue(u) => u.0.name(),
8470                }
8471            }
8472        }
8473
8474        impl std::default::Default for RelationType {
8475            fn default() -> Self {
8476                use std::convert::From;
8477                Self::from(0)
8478            }
8479        }
8480
8481        impl std::fmt::Display for RelationType {
8482            fn fmt(
8483                &self,
8484                f: &mut std::fmt::Formatter<'_>,
8485            ) -> std::result::Result<(), std::fmt::Error> {
8486                wkt::internal::display_enum(f, self.name(), self.value())
8487            }
8488        }
8489
8490        impl std::convert::From<i32> for RelationType {
8491            fn from(value: i32) -> Self {
8492                match value {
8493                    0 => Self::Unspecified,
8494                    1 => Self::Table,
8495                    2 => Self::View,
8496                    3 => Self::IncrementalTable,
8497                    4 => Self::MaterializedView,
8498                    _ => Self::UnknownValue(relation_type::UnknownValue(
8499                        wkt::internal::UnknownEnumValue::Integer(value),
8500                    )),
8501                }
8502            }
8503        }
8504
8505        impl std::convert::From<&str> for RelationType {
8506            fn from(value: &str) -> Self {
8507                use std::string::ToString;
8508                match value {
8509                    "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
8510                    "TABLE" => Self::Table,
8511                    "VIEW" => Self::View,
8512                    "INCREMENTAL_TABLE" => Self::IncrementalTable,
8513                    "MATERIALIZED_VIEW" => Self::MaterializedView,
8514                    _ => Self::UnknownValue(relation_type::UnknownValue(
8515                        wkt::internal::UnknownEnumValue::String(value.to_string()),
8516                    )),
8517                }
8518            }
8519        }
8520
8521        impl serde::ser::Serialize for RelationType {
8522            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8523            where
8524                S: serde::Serializer,
8525            {
8526                match self {
8527                    Self::Unspecified => serializer.serialize_i32(0),
8528                    Self::Table => serializer.serialize_i32(1),
8529                    Self::View => serializer.serialize_i32(2),
8530                    Self::IncrementalTable => serializer.serialize_i32(3),
8531                    Self::MaterializedView => serializer.serialize_i32(4),
8532                    Self::UnknownValue(u) => u.0.serialize(serializer),
8533                }
8534            }
8535        }
8536
8537        impl<'de> serde::de::Deserialize<'de> for RelationType {
8538            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8539            where
8540                D: serde::Deserializer<'de>,
8541            {
8542                deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
8543                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
8544                ))
8545            }
8546        }
8547    }
8548
8549    /// Represents a list of arbitrary database operations.
8550    #[derive(Clone, Default, PartialEq)]
8551    #[non_exhaustive]
8552    pub struct Operations {
8553        /// A list of actions that this action depends on.
8554        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8555
8556        /// Whether this action is disabled (i.e. should not be run).
8557        pub disabled: bool,
8558
8559        /// Arbitrary, user-defined tags on this action.
8560        pub tags: std::vec::Vec<std::string::String>,
8561
8562        /// Descriptor for any output relation and its columns. Only set if
8563        /// `has_output` is true.
8564        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8565
8566        /// A list of arbitrary SQL statements that will be executed without
8567        /// alteration.
8568        pub queries: std::vec::Vec<std::string::String>,
8569
8570        /// Whether these operations produce an output relation.
8571        pub has_output: bool,
8572
8573        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8574    }
8575
8576    impl Operations {
8577        pub fn new() -> Self {
8578            std::default::Default::default()
8579        }
8580
8581        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Operations::dependency_targets].
8582        ///
8583        /// # Example
8584        /// ```ignore,no_run
8585        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8586        /// use google_cloud_dataform_v1::model::Target;
8587        /// let x = Operations::new()
8588        ///     .set_dependency_targets([
8589        ///         Target::default()/* use setters */,
8590        ///         Target::default()/* use (different) setters */,
8591        ///     ]);
8592        /// ```
8593        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8594        where
8595            T: std::iter::IntoIterator<Item = V>,
8596            V: std::convert::Into<crate::model::Target>,
8597        {
8598            use std::iter::Iterator;
8599            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8600            self
8601        }
8602
8603        /// Sets the value of [disabled][crate::model::compilation_result_action::Operations::disabled].
8604        ///
8605        /// # Example
8606        /// ```ignore,no_run
8607        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8608        /// let x = Operations::new().set_disabled(true);
8609        /// ```
8610        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8611            self.disabled = v.into();
8612            self
8613        }
8614
8615        /// Sets the value of [tags][crate::model::compilation_result_action::Operations::tags].
8616        ///
8617        /// # Example
8618        /// ```ignore,no_run
8619        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8620        /// let x = Operations::new().set_tags(["a", "b", "c"]);
8621        /// ```
8622        pub fn set_tags<T, V>(mut self, v: T) -> Self
8623        where
8624            T: std::iter::IntoIterator<Item = V>,
8625            V: std::convert::Into<std::string::String>,
8626        {
8627            use std::iter::Iterator;
8628            self.tags = v.into_iter().map(|i| i.into()).collect();
8629            self
8630        }
8631
8632        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
8633        ///
8634        /// # Example
8635        /// ```ignore,no_run
8636        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8637        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8638        /// let x = Operations::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8639        /// ```
8640        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8641        where
8642            T: std::convert::Into<crate::model::RelationDescriptor>,
8643        {
8644            self.relation_descriptor = std::option::Option::Some(v.into());
8645            self
8646        }
8647
8648        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
8649        ///
8650        /// # Example
8651        /// ```ignore,no_run
8652        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8653        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8654        /// let x = Operations::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8655        /// let x = Operations::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8656        /// ```
8657        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8658        where
8659            T: std::convert::Into<crate::model::RelationDescriptor>,
8660        {
8661            self.relation_descriptor = v.map(|x| x.into());
8662            self
8663        }
8664
8665        /// Sets the value of [queries][crate::model::compilation_result_action::Operations::queries].
8666        ///
8667        /// # Example
8668        /// ```ignore,no_run
8669        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8670        /// let x = Operations::new().set_queries(["a", "b", "c"]);
8671        /// ```
8672        pub fn set_queries<T, V>(mut self, v: T) -> Self
8673        where
8674            T: std::iter::IntoIterator<Item = V>,
8675            V: std::convert::Into<std::string::String>,
8676        {
8677            use std::iter::Iterator;
8678            self.queries = v.into_iter().map(|i| i.into()).collect();
8679            self
8680        }
8681
8682        /// Sets the value of [has_output][crate::model::compilation_result_action::Operations::has_output].
8683        ///
8684        /// # Example
8685        /// ```ignore,no_run
8686        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8687        /// let x = Operations::new().set_has_output(true);
8688        /// ```
8689        pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8690            self.has_output = v.into();
8691            self
8692        }
8693    }
8694
8695    impl wkt::message::Message for Operations {
8696        fn typename() -> &'static str {
8697            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
8698        }
8699    }
8700
8701    /// Represents an assertion upon a SQL query which is required return zero
8702    /// rows.
8703    #[derive(Clone, Default, PartialEq)]
8704    #[non_exhaustive]
8705    pub struct Assertion {
8706        /// A list of actions that this action depends on.
8707        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8708
8709        /// The parent action of this assertion. Only set if this assertion was
8710        /// automatically generated.
8711        pub parent_action: std::option::Option<crate::model::Target>,
8712
8713        /// Whether this action is disabled (i.e. should not be run).
8714        pub disabled: bool,
8715
8716        /// Arbitrary, user-defined tags on this action.
8717        pub tags: std::vec::Vec<std::string::String>,
8718
8719        /// The SELECT query which must return zero rows in order for this assertion
8720        /// to succeed.
8721        pub select_query: std::string::String,
8722
8723        /// Descriptor for the assertion's automatically-generated view and its
8724        /// columns.
8725        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8726
8727        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8728    }
8729
8730    impl Assertion {
8731        pub fn new() -> Self {
8732            std::default::Default::default()
8733        }
8734
8735        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Assertion::dependency_targets].
8736        ///
8737        /// # Example
8738        /// ```ignore,no_run
8739        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8740        /// use google_cloud_dataform_v1::model::Target;
8741        /// let x = Assertion::new()
8742        ///     .set_dependency_targets([
8743        ///         Target::default()/* use setters */,
8744        ///         Target::default()/* use (different) setters */,
8745        ///     ]);
8746        /// ```
8747        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8748        where
8749            T: std::iter::IntoIterator<Item = V>,
8750            V: std::convert::Into<crate::model::Target>,
8751        {
8752            use std::iter::Iterator;
8753            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8754            self
8755        }
8756
8757        /// Sets the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
8758        ///
8759        /// # Example
8760        /// ```ignore,no_run
8761        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8762        /// use google_cloud_dataform_v1::model::Target;
8763        /// let x = Assertion::new().set_parent_action(Target::default()/* use setters */);
8764        /// ```
8765        pub fn set_parent_action<T>(mut self, v: T) -> Self
8766        where
8767            T: std::convert::Into<crate::model::Target>,
8768        {
8769            self.parent_action = std::option::Option::Some(v.into());
8770            self
8771        }
8772
8773        /// Sets or clears the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
8774        ///
8775        /// # Example
8776        /// ```ignore,no_run
8777        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8778        /// use google_cloud_dataform_v1::model::Target;
8779        /// let x = Assertion::new().set_or_clear_parent_action(Some(Target::default()/* use setters */));
8780        /// let x = Assertion::new().set_or_clear_parent_action(None::<Target>);
8781        /// ```
8782        pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
8783        where
8784            T: std::convert::Into<crate::model::Target>,
8785        {
8786            self.parent_action = v.map(|x| x.into());
8787            self
8788        }
8789
8790        /// Sets the value of [disabled][crate::model::compilation_result_action::Assertion::disabled].
8791        ///
8792        /// # Example
8793        /// ```ignore,no_run
8794        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8795        /// let x = Assertion::new().set_disabled(true);
8796        /// ```
8797        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8798            self.disabled = v.into();
8799            self
8800        }
8801
8802        /// Sets the value of [tags][crate::model::compilation_result_action::Assertion::tags].
8803        ///
8804        /// # Example
8805        /// ```ignore,no_run
8806        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8807        /// let x = Assertion::new().set_tags(["a", "b", "c"]);
8808        /// ```
8809        pub fn set_tags<T, V>(mut self, v: T) -> Self
8810        where
8811            T: std::iter::IntoIterator<Item = V>,
8812            V: std::convert::Into<std::string::String>,
8813        {
8814            use std::iter::Iterator;
8815            self.tags = v.into_iter().map(|i| i.into()).collect();
8816            self
8817        }
8818
8819        /// Sets the value of [select_query][crate::model::compilation_result_action::Assertion::select_query].
8820        ///
8821        /// # Example
8822        /// ```ignore,no_run
8823        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8824        /// let x = Assertion::new().set_select_query("example");
8825        /// ```
8826        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
8827            mut self,
8828            v: T,
8829        ) -> Self {
8830            self.select_query = v.into();
8831            self
8832        }
8833
8834        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
8835        ///
8836        /// # Example
8837        /// ```ignore,no_run
8838        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8839        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8840        /// let x = Assertion::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8841        /// ```
8842        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8843        where
8844            T: std::convert::Into<crate::model::RelationDescriptor>,
8845        {
8846            self.relation_descriptor = std::option::Option::Some(v.into());
8847            self
8848        }
8849
8850        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
8851        ///
8852        /// # Example
8853        /// ```ignore,no_run
8854        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8855        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8856        /// let x = Assertion::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8857        /// let x = Assertion::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8858        /// ```
8859        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8860        where
8861            T: std::convert::Into<crate::model::RelationDescriptor>,
8862        {
8863            self.relation_descriptor = v.map(|x| x.into());
8864            self
8865        }
8866    }
8867
8868    impl wkt::message::Message for Assertion {
8869        fn typename() -> &'static str {
8870            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
8871        }
8872    }
8873
8874    /// Represents a relation which is not managed by Dataform but which may be
8875    /// referenced by Dataform actions.
8876    #[derive(Clone, Default, PartialEq)]
8877    #[non_exhaustive]
8878    pub struct Declaration {
8879        /// Descriptor for the relation and its columns. Used as documentation only,
8880        /// i.e. values here will result in no changes to the relation's metadata.
8881        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8882
8883        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8884    }
8885
8886    impl Declaration {
8887        pub fn new() -> Self {
8888            std::default::Default::default()
8889        }
8890
8891        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
8892        ///
8893        /// # Example
8894        /// ```ignore,no_run
8895        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
8896        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8897        /// let x = Declaration::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8898        /// ```
8899        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8900        where
8901            T: std::convert::Into<crate::model::RelationDescriptor>,
8902        {
8903            self.relation_descriptor = std::option::Option::Some(v.into());
8904            self
8905        }
8906
8907        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
8908        ///
8909        /// # Example
8910        /// ```ignore,no_run
8911        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
8912        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8913        /// let x = Declaration::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8914        /// let x = Declaration::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8915        /// ```
8916        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8917        where
8918            T: std::convert::Into<crate::model::RelationDescriptor>,
8919        {
8920            self.relation_descriptor = v.map(|x| x.into());
8921            self
8922        }
8923    }
8924
8925    impl wkt::message::Message for Declaration {
8926        fn typename() -> &'static str {
8927            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
8928        }
8929    }
8930
8931    /// Represents a notebook.
8932    #[derive(Clone, Default, PartialEq)]
8933    #[non_exhaustive]
8934    pub struct Notebook {
8935        /// A list of actions that this action depends on.
8936        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8937
8938        /// Whether this action is disabled (i.e. should not be run).
8939        pub disabled: bool,
8940
8941        /// The contents of the notebook.
8942        pub contents: std::string::String,
8943
8944        /// Arbitrary, user-defined tags on this action.
8945        pub tags: std::vec::Vec<std::string::String>,
8946
8947        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8948    }
8949
8950    impl Notebook {
8951        pub fn new() -> Self {
8952            std::default::Default::default()
8953        }
8954
8955        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Notebook::dependency_targets].
8956        ///
8957        /// # Example
8958        /// ```ignore,no_run
8959        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8960        /// use google_cloud_dataform_v1::model::Target;
8961        /// let x = Notebook::new()
8962        ///     .set_dependency_targets([
8963        ///         Target::default()/* use setters */,
8964        ///         Target::default()/* use (different) setters */,
8965        ///     ]);
8966        /// ```
8967        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8968        where
8969            T: std::iter::IntoIterator<Item = V>,
8970            V: std::convert::Into<crate::model::Target>,
8971        {
8972            use std::iter::Iterator;
8973            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8974            self
8975        }
8976
8977        /// Sets the value of [disabled][crate::model::compilation_result_action::Notebook::disabled].
8978        ///
8979        /// # Example
8980        /// ```ignore,no_run
8981        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8982        /// let x = Notebook::new().set_disabled(true);
8983        /// ```
8984        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8985            self.disabled = v.into();
8986            self
8987        }
8988
8989        /// Sets the value of [contents][crate::model::compilation_result_action::Notebook::contents].
8990        ///
8991        /// # Example
8992        /// ```ignore,no_run
8993        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8994        /// let x = Notebook::new().set_contents("example");
8995        /// ```
8996        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8997            self.contents = v.into();
8998            self
8999        }
9000
9001        /// Sets the value of [tags][crate::model::compilation_result_action::Notebook::tags].
9002        ///
9003        /// # Example
9004        /// ```ignore,no_run
9005        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
9006        /// let x = Notebook::new().set_tags(["a", "b", "c"]);
9007        /// ```
9008        pub fn set_tags<T, V>(mut self, v: T) -> Self
9009        where
9010            T: std::iter::IntoIterator<Item = V>,
9011            V: std::convert::Into<std::string::String>,
9012        {
9013            use std::iter::Iterator;
9014            self.tags = v.into_iter().map(|i| i.into()).collect();
9015            self
9016        }
9017    }
9018
9019    impl wkt::message::Message for Notebook {
9020        fn typename() -> &'static str {
9021            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
9022        }
9023    }
9024
9025    /// Defines a compiled Data Preparation entity
9026    #[derive(Clone, Default, PartialEq)]
9027    #[non_exhaustive]
9028    pub struct DataPreparation {
9029        /// A list of actions that this action depends on.
9030        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9031
9032        /// Whether this action is disabled (i.e. should not be run).
9033        pub disabled: bool,
9034
9035        /// Arbitrary, user-defined tags on this action.
9036        pub tags: std::vec::Vec<std::string::String>,
9037
9038        /// The definition for the data preparation.
9039        pub definition: std::option::Option<
9040            crate::model::compilation_result_action::data_preparation::Definition,
9041        >,
9042
9043        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9044    }
9045
9046    impl DataPreparation {
9047        pub fn new() -> Self {
9048            std::default::Default::default()
9049        }
9050
9051        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::DataPreparation::dependency_targets].
9052        ///
9053        /// # Example
9054        /// ```ignore,no_run
9055        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9056        /// use google_cloud_dataform_v1::model::Target;
9057        /// let x = DataPreparation::new()
9058        ///     .set_dependency_targets([
9059        ///         Target::default()/* use setters */,
9060        ///         Target::default()/* use (different) setters */,
9061        ///     ]);
9062        /// ```
9063        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9064        where
9065            T: std::iter::IntoIterator<Item = V>,
9066            V: std::convert::Into<crate::model::Target>,
9067        {
9068            use std::iter::Iterator;
9069            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9070            self
9071        }
9072
9073        /// Sets the value of [disabled][crate::model::compilation_result_action::DataPreparation::disabled].
9074        ///
9075        /// # Example
9076        /// ```ignore,no_run
9077        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9078        /// let x = DataPreparation::new().set_disabled(true);
9079        /// ```
9080        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9081            self.disabled = v.into();
9082            self
9083        }
9084
9085        /// Sets the value of [tags][crate::model::compilation_result_action::DataPreparation::tags].
9086        ///
9087        /// # Example
9088        /// ```ignore,no_run
9089        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9090        /// let x = DataPreparation::new().set_tags(["a", "b", "c"]);
9091        /// ```
9092        pub fn set_tags<T, V>(mut self, v: T) -> Self
9093        where
9094            T: std::iter::IntoIterator<Item = V>,
9095            V: std::convert::Into<std::string::String>,
9096        {
9097            use std::iter::Iterator;
9098            self.tags = v.into_iter().map(|i| i.into()).collect();
9099            self
9100        }
9101
9102        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition].
9103        ///
9104        /// Note that all the setters affecting `definition` are mutually
9105        /// exclusive.
9106        ///
9107        /// # Example
9108        /// ```ignore,no_run
9109        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9110        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::Definition;
9111        /// let x = DataPreparation::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
9112        /// ```
9113        pub fn set_definition<
9114            T: std::convert::Into<
9115                    std::option::Option<
9116                        crate::model::compilation_result_action::data_preparation::Definition,
9117                    >,
9118                >,
9119        >(
9120            mut self,
9121            v: T,
9122        ) -> Self {
9123            self.definition = v.into();
9124            self
9125        }
9126
9127        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9128        /// if it holds a `ContentsYaml`, `None` if the field is not set or
9129        /// holds a different branch.
9130        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
9131            #[allow(unreachable_patterns)]
9132            self.definition.as_ref().and_then(|v| match v {
9133                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
9134                _ => std::option::Option::None,
9135            })
9136        }
9137
9138        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9139        /// to hold a `ContentsYaml`.
9140        ///
9141        /// Note that all the setters affecting `definition` are
9142        /// mutually exclusive.
9143        ///
9144        /// # Example
9145        /// ```ignore,no_run
9146        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9147        /// let x = DataPreparation::new().set_contents_yaml("example");
9148        /// assert!(x.contents_yaml().is_some());
9149        /// assert!(x.contents_sql().is_none());
9150        /// ```
9151        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
9152            mut self,
9153            v: T,
9154        ) -> Self {
9155            self.definition = std::option::Option::Some(
9156                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
9157                    v.into(),
9158                ),
9159            );
9160            self
9161        }
9162
9163        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9164        /// if it holds a `ContentsSql`, `None` if the field is not set or
9165        /// holds a different branch.
9166        pub fn contents_sql(
9167            &self,
9168        ) -> std::option::Option<
9169            &std::boxed::Box<
9170                crate::model::compilation_result_action::data_preparation::SqlDefinition,
9171            >,
9172        > {
9173            #[allow(unreachable_patterns)]
9174            self.definition.as_ref().and_then(|v| match v {
9175                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
9176                _ => std::option::Option::None,
9177            })
9178        }
9179
9180        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9181        /// to hold a `ContentsSql`.
9182        ///
9183        /// Note that all the setters affecting `definition` are
9184        /// mutually exclusive.
9185        ///
9186        /// # Example
9187        /// ```ignore,no_run
9188        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9189        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9190        /// let x = DataPreparation::new().set_contents_sql(SqlDefinition::default()/* use setters */);
9191        /// assert!(x.contents_sql().is_some());
9192        /// assert!(x.contents_yaml().is_none());
9193        /// ```
9194        pub fn set_contents_sql<
9195            T: std::convert::Into<
9196                    std::boxed::Box<
9197                        crate::model::compilation_result_action::data_preparation::SqlDefinition,
9198                    >,
9199                >,
9200        >(
9201            mut self,
9202            v: T,
9203        ) -> Self {
9204            self.definition = std::option::Option::Some(
9205                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
9206                    v.into(),
9207                ),
9208            );
9209            self
9210        }
9211    }
9212
9213    impl wkt::message::Message for DataPreparation {
9214        fn typename() -> &'static str {
9215            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
9216        }
9217    }
9218
9219    /// Defines additional types related to [DataPreparation].
9220    pub mod data_preparation {
9221        #[allow(unused_imports)]
9222        use super::*;
9223
9224        /// Definition of a SQL Data Preparation
9225        #[derive(Clone, Default, PartialEq)]
9226        #[non_exhaustive]
9227        pub struct SqlDefinition {
9228            /// The SQL query representing the data preparation steps. Formatted as a
9229            /// Pipe SQL query statement.
9230            pub query: std::string::String,
9231
9232            /// Error table configuration,
9233            pub error_table: std::option::Option<
9234                crate::model::compilation_result_action::data_preparation::ErrorTable,
9235            >,
9236
9237            /// Load configuration.
9238            pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
9239
9240            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9241        }
9242
9243        impl SqlDefinition {
9244            pub fn new() -> Self {
9245                std::default::Default::default()
9246            }
9247
9248            /// Sets the value of [query][crate::model::compilation_result_action::data_preparation::SqlDefinition::query].
9249            ///
9250            /// # Example
9251            /// ```ignore,no_run
9252            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9253            /// let x = SqlDefinition::new().set_query("example");
9254            /// ```
9255            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9256                self.query = v.into();
9257                self
9258            }
9259
9260            /// Sets the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
9261            ///
9262            /// # Example
9263            /// ```ignore,no_run
9264            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9265            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9266            /// let x = SqlDefinition::new().set_error_table(ErrorTable::default()/* use setters */);
9267            /// ```
9268            pub fn set_error_table<T>(mut self, v: T) -> Self
9269            where
9270                T: std::convert::Into<
9271                        crate::model::compilation_result_action::data_preparation::ErrorTable,
9272                    >,
9273            {
9274                self.error_table = std::option::Option::Some(v.into());
9275                self
9276            }
9277
9278            /// Sets or clears the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
9279            ///
9280            /// # Example
9281            /// ```ignore,no_run
9282            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9283            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9284            /// let x = SqlDefinition::new().set_or_clear_error_table(Some(ErrorTable::default()/* use setters */));
9285            /// let x = SqlDefinition::new().set_or_clear_error_table(None::<ErrorTable>);
9286            /// ```
9287            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
9288            where
9289                T: std::convert::Into<
9290                        crate::model::compilation_result_action::data_preparation::ErrorTable,
9291                    >,
9292            {
9293                self.error_table = v.map(|x| x.into());
9294                self
9295            }
9296
9297            /// Sets the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
9298            ///
9299            /// # Example
9300            /// ```ignore,no_run
9301            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9302            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9303            /// let x = SqlDefinition::new().set_load(LoadConfig::default()/* use setters */);
9304            /// ```
9305            pub fn set_load<T>(mut self, v: T) -> Self
9306            where
9307                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
9308            {
9309                self.load = std::option::Option::Some(v.into());
9310                self
9311            }
9312
9313            /// Sets or clears the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
9314            ///
9315            /// # Example
9316            /// ```ignore,no_run
9317            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9318            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9319            /// let x = SqlDefinition::new().set_or_clear_load(Some(LoadConfig::default()/* use setters */));
9320            /// let x = SqlDefinition::new().set_or_clear_load(None::<LoadConfig>);
9321            /// ```
9322            pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
9323            where
9324                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
9325            {
9326                self.load = v.map(|x| x.into());
9327                self
9328            }
9329        }
9330
9331        impl wkt::message::Message for SqlDefinition {
9332            fn typename() -> &'static str {
9333                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
9334            }
9335        }
9336
9337        /// Error table information, used to write error data into a BigQuery
9338        /// table.
9339        #[derive(Clone, Default, PartialEq)]
9340        #[non_exhaustive]
9341        pub struct ErrorTable {
9342            /// Error Table target.
9343            pub target: std::option::Option<crate::model::Target>,
9344
9345            /// Error table partition expiration in days. Only positive values are
9346            /// allowed.
9347            pub retention_days: i32,
9348
9349            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9350        }
9351
9352        impl ErrorTable {
9353            pub fn new() -> Self {
9354                std::default::Default::default()
9355            }
9356
9357            /// Sets the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
9358            ///
9359            /// # Example
9360            /// ```ignore,no_run
9361            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9362            /// use google_cloud_dataform_v1::model::Target;
9363            /// let x = ErrorTable::new().set_target(Target::default()/* use setters */);
9364            /// ```
9365            pub fn set_target<T>(mut self, v: T) -> Self
9366            where
9367                T: std::convert::Into<crate::model::Target>,
9368            {
9369                self.target = std::option::Option::Some(v.into());
9370                self
9371            }
9372
9373            /// Sets or clears the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
9374            ///
9375            /// # Example
9376            /// ```ignore,no_run
9377            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9378            /// use google_cloud_dataform_v1::model::Target;
9379            /// let x = ErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
9380            /// let x = ErrorTable::new().set_or_clear_target(None::<Target>);
9381            /// ```
9382            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
9383            where
9384                T: std::convert::Into<crate::model::Target>,
9385            {
9386                self.target = v.map(|x| x.into());
9387                self
9388            }
9389
9390            /// Sets the value of [retention_days][crate::model::compilation_result_action::data_preparation::ErrorTable::retention_days].
9391            ///
9392            /// # Example
9393            /// ```ignore,no_run
9394            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9395            /// let x = ErrorTable::new().set_retention_days(42);
9396            /// ```
9397            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9398                self.retention_days = v.into();
9399                self
9400            }
9401        }
9402
9403        impl wkt::message::Message for ErrorTable {
9404            fn typename() -> &'static str {
9405                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
9406            }
9407        }
9408
9409        /// The definition for the data preparation.
9410        #[derive(Clone, Debug, PartialEq)]
9411        #[non_exhaustive]
9412        pub enum Definition {
9413            /// The data preparation definition, stored as a YAML string.
9414            ContentsYaml(std::string::String),
9415            /// SQL definition for a Data Preparation. Contains a SQL query and
9416            /// additional context information.
9417            ContentsSql(
9418                std::boxed::Box<
9419                    crate::model::compilation_result_action::data_preparation::SqlDefinition,
9420                >,
9421            ),
9422        }
9423    }
9424
9425    /// Simplified load configuration for actions
9426    #[derive(Clone, Default, PartialEq)]
9427    #[non_exhaustive]
9428    pub struct LoadConfig {
9429        /// Load mode
9430        pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
9431
9432        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9433    }
9434
9435    impl LoadConfig {
9436        pub fn new() -> Self {
9437            std::default::Default::default()
9438        }
9439
9440        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode].
9441        ///
9442        /// Note that all the setters affecting `mode` are mutually
9443        /// exclusive.
9444        ///
9445        /// # Example
9446        /// ```ignore,no_run
9447        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9448        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
9449        /// let x = LoadConfig::new().set_mode(Some(
9450        ///     google_cloud_dataform_v1::model::compilation_result_action::load_config::Mode::Replace(SimpleLoadMode::default().into())));
9451        /// ```
9452        pub fn set_mode<
9453            T: std::convert::Into<
9454                    std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
9455                >,
9456        >(
9457            mut self,
9458            v: T,
9459        ) -> Self {
9460            self.mode = v.into();
9461            self
9462        }
9463
9464        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9465        /// if it holds a `Replace`, `None` if the field is not set or
9466        /// holds a different branch.
9467        pub fn replace(
9468            &self,
9469        ) -> std::option::Option<
9470            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9471        > {
9472            #[allow(unreachable_patterns)]
9473            self.mode.as_ref().and_then(|v| match v {
9474                crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
9475                    std::option::Option::Some(v)
9476                }
9477                _ => std::option::Option::None,
9478            })
9479        }
9480
9481        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9482        /// to hold a `Replace`.
9483        ///
9484        /// Note that all the setters affecting `mode` are
9485        /// mutually exclusive.
9486        ///
9487        /// # Example
9488        /// ```ignore,no_run
9489        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9490        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
9491        /// let x = LoadConfig::new().set_replace(SimpleLoadMode::default()/* use setters */);
9492        /// assert!(x.replace().is_some());
9493        /// assert!(x.append().is_none());
9494        /// assert!(x.maximum().is_none());
9495        /// assert!(x.unique().is_none());
9496        /// ```
9497        pub fn set_replace<
9498            T: std::convert::Into<
9499                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9500                >,
9501        >(
9502            mut self,
9503            v: T,
9504        ) -> Self {
9505            self.mode = std::option::Option::Some(
9506                crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
9507            );
9508            self
9509        }
9510
9511        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9512        /// if it holds a `Append`, `None` if the field is not set or
9513        /// holds a different branch.
9514        pub fn append(
9515            &self,
9516        ) -> std::option::Option<
9517            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9518        > {
9519            #[allow(unreachable_patterns)]
9520            self.mode.as_ref().and_then(|v| match v {
9521                crate::model::compilation_result_action::load_config::Mode::Append(v) => {
9522                    std::option::Option::Some(v)
9523                }
9524                _ => std::option::Option::None,
9525            })
9526        }
9527
9528        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9529        /// to hold a `Append`.
9530        ///
9531        /// Note that all the setters affecting `mode` are
9532        /// mutually exclusive.
9533        ///
9534        /// # Example
9535        /// ```ignore,no_run
9536        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9537        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
9538        /// let x = LoadConfig::new().set_append(SimpleLoadMode::default()/* use setters */);
9539        /// assert!(x.append().is_some());
9540        /// assert!(x.replace().is_none());
9541        /// assert!(x.maximum().is_none());
9542        /// assert!(x.unique().is_none());
9543        /// ```
9544        pub fn set_append<
9545            T: std::convert::Into<
9546                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9547                >,
9548        >(
9549            mut self,
9550            v: T,
9551        ) -> Self {
9552            self.mode = std::option::Option::Some(
9553                crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
9554            );
9555            self
9556        }
9557
9558        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9559        /// if it holds a `Maximum`, `None` if the field is not set or
9560        /// holds a different branch.
9561        pub fn maximum(
9562            &self,
9563        ) -> std::option::Option<
9564            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9565        > {
9566            #[allow(unreachable_patterns)]
9567            self.mode.as_ref().and_then(|v| match v {
9568                crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
9569                    std::option::Option::Some(v)
9570                }
9571                _ => std::option::Option::None,
9572            })
9573        }
9574
9575        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9576        /// to hold a `Maximum`.
9577        ///
9578        /// Note that all the setters affecting `mode` are
9579        /// mutually exclusive.
9580        ///
9581        /// # Example
9582        /// ```ignore,no_run
9583        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9584        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
9585        /// let x = LoadConfig::new().set_maximum(IncrementalLoadMode::default()/* use setters */);
9586        /// assert!(x.maximum().is_some());
9587        /// assert!(x.replace().is_none());
9588        /// assert!(x.append().is_none());
9589        /// assert!(x.unique().is_none());
9590        /// ```
9591        pub fn set_maximum<
9592            T: std::convert::Into<
9593                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9594                >,
9595        >(
9596            mut self,
9597            v: T,
9598        ) -> Self {
9599            self.mode = std::option::Option::Some(
9600                crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
9601            );
9602            self
9603        }
9604
9605        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9606        /// if it holds a `Unique`, `None` if the field is not set or
9607        /// holds a different branch.
9608        pub fn unique(
9609            &self,
9610        ) -> std::option::Option<
9611            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9612        > {
9613            #[allow(unreachable_patterns)]
9614            self.mode.as_ref().and_then(|v| match v {
9615                crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
9616                    std::option::Option::Some(v)
9617                }
9618                _ => std::option::Option::None,
9619            })
9620        }
9621
9622        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9623        /// to hold a `Unique`.
9624        ///
9625        /// Note that all the setters affecting `mode` are
9626        /// mutually exclusive.
9627        ///
9628        /// # Example
9629        /// ```ignore,no_run
9630        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9631        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
9632        /// let x = LoadConfig::new().set_unique(IncrementalLoadMode::default()/* use setters */);
9633        /// assert!(x.unique().is_some());
9634        /// assert!(x.replace().is_none());
9635        /// assert!(x.append().is_none());
9636        /// assert!(x.maximum().is_none());
9637        /// ```
9638        pub fn set_unique<
9639            T: std::convert::Into<
9640                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9641                >,
9642        >(
9643            mut self,
9644            v: T,
9645        ) -> Self {
9646            self.mode = std::option::Option::Some(
9647                crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
9648            );
9649            self
9650        }
9651    }
9652
9653    impl wkt::message::Message for LoadConfig {
9654        fn typename() -> &'static str {
9655            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
9656        }
9657    }
9658
9659    /// Defines additional types related to [LoadConfig].
9660    pub mod load_config {
9661        #[allow(unused_imports)]
9662        use super::*;
9663
9664        /// Load mode
9665        #[derive(Clone, Debug, PartialEq)]
9666        #[non_exhaustive]
9667        pub enum Mode {
9668            /// Replace destination table
9669            Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
9670            /// Append into destination table
9671            Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
9672            /// Insert records where the value exceeds the previous maximum value for a
9673            /// column in the destination table
9674            Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
9675            /// Insert records where the value of a column is not already present in
9676            /// the destination table
9677            Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
9678        }
9679    }
9680
9681    /// Simple load definition
9682    #[derive(Clone, Default, PartialEq)]
9683    #[non_exhaustive]
9684    pub struct SimpleLoadMode {
9685        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9686    }
9687
9688    impl SimpleLoadMode {
9689        pub fn new() -> Self {
9690            std::default::Default::default()
9691        }
9692    }
9693
9694    impl wkt::message::Message for SimpleLoadMode {
9695        fn typename() -> &'static str {
9696            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
9697        }
9698    }
9699
9700    /// Load definition for incremental load modes
9701    #[derive(Clone, Default, PartialEq)]
9702    #[non_exhaustive]
9703    pub struct IncrementalLoadMode {
9704        /// Column name for incremental load modes
9705        pub column: std::string::String,
9706
9707        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9708    }
9709
9710    impl IncrementalLoadMode {
9711        pub fn new() -> Self {
9712            std::default::Default::default()
9713        }
9714
9715        /// Sets the value of [column][crate::model::compilation_result_action::IncrementalLoadMode::column].
9716        ///
9717        /// # Example
9718        /// ```ignore,no_run
9719        /// # use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
9720        /// let x = IncrementalLoadMode::new().set_column("example");
9721        /// ```
9722        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9723            self.column = v.into();
9724            self
9725        }
9726    }
9727
9728    impl wkt::message::Message for IncrementalLoadMode {
9729        fn typename() -> &'static str {
9730            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
9731        }
9732    }
9733
9734    /// The compiled object.
9735    #[derive(Clone, Debug, PartialEq)]
9736    #[non_exhaustive]
9737    pub enum CompiledObject {
9738        /// The database relation created/updated by this action.
9739        Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
9740        /// The database operations executed by this action.
9741        Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
9742        /// The assertion executed by this action.
9743        Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
9744        /// The declaration declared by this action.
9745        Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
9746        /// The notebook executed by this action.
9747        Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
9748        /// The data preparation executed by this action.
9749        DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
9750    }
9751}
9752
9753/// `QueryCompilationResultActions` request message.
9754#[derive(Clone, Default, PartialEq)]
9755#[non_exhaustive]
9756pub struct QueryCompilationResultActionsRequest {
9757    /// Required. The compilation result's name.
9758    pub name: std::string::String,
9759
9760    /// Optional. Maximum number of compilation results to return. The server may
9761    /// return fewer items than requested. If unspecified, the server will pick an
9762    /// appropriate default.
9763    pub page_size: i32,
9764
9765    /// Optional. Page token received from a previous
9766    /// `QueryCompilationResultActions` call. Provide this to retrieve the
9767    /// subsequent page.
9768    ///
9769    /// When paginating, all other parameters provided to
9770    /// `QueryCompilationResultActions`, with the exception of `page_size`, must
9771    /// match the call that provided the page token.
9772    pub page_token: std::string::String,
9773
9774    /// Optional. Optional filter for the returned list. Filtering is only
9775    /// currently supported on the `file_path` field.
9776    pub filter: std::string::String,
9777
9778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9779}
9780
9781impl QueryCompilationResultActionsRequest {
9782    pub fn new() -> Self {
9783        std::default::Default::default()
9784    }
9785
9786    /// Sets the value of [name][crate::model::QueryCompilationResultActionsRequest::name].
9787    ///
9788    /// # Example
9789    /// ```ignore,no_run
9790    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9791    /// let x = QueryCompilationResultActionsRequest::new().set_name("example");
9792    /// ```
9793    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9794        self.name = v.into();
9795        self
9796    }
9797
9798    /// Sets the value of [page_size][crate::model::QueryCompilationResultActionsRequest::page_size].
9799    ///
9800    /// # Example
9801    /// ```ignore,no_run
9802    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9803    /// let x = QueryCompilationResultActionsRequest::new().set_page_size(42);
9804    /// ```
9805    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9806        self.page_size = v.into();
9807        self
9808    }
9809
9810    /// Sets the value of [page_token][crate::model::QueryCompilationResultActionsRequest::page_token].
9811    ///
9812    /// # Example
9813    /// ```ignore,no_run
9814    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9815    /// let x = QueryCompilationResultActionsRequest::new().set_page_token("example");
9816    /// ```
9817    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9818        self.page_token = v.into();
9819        self
9820    }
9821
9822    /// Sets the value of [filter][crate::model::QueryCompilationResultActionsRequest::filter].
9823    ///
9824    /// # Example
9825    /// ```ignore,no_run
9826    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9827    /// let x = QueryCompilationResultActionsRequest::new().set_filter("example");
9828    /// ```
9829    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9830        self.filter = v.into();
9831        self
9832    }
9833}
9834
9835impl wkt::message::Message for QueryCompilationResultActionsRequest {
9836    fn typename() -> &'static str {
9837        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
9838    }
9839}
9840
9841/// `QueryCompilationResultActions` response message.
9842#[derive(Clone, Default, PartialEq)]
9843#[non_exhaustive]
9844pub struct QueryCompilationResultActionsResponse {
9845    /// List of compilation result actions.
9846    pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
9847
9848    /// A token, which can be sent as `page_token` to retrieve the next page.
9849    /// If this field is omitted, there are no subsequent pages.
9850    pub next_page_token: std::string::String,
9851
9852    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9853}
9854
9855impl QueryCompilationResultActionsResponse {
9856    pub fn new() -> Self {
9857        std::default::Default::default()
9858    }
9859
9860    /// Sets the value of [compilation_result_actions][crate::model::QueryCompilationResultActionsResponse::compilation_result_actions].
9861    ///
9862    /// # Example
9863    /// ```ignore,no_run
9864    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
9865    /// use google_cloud_dataform_v1::model::CompilationResultAction;
9866    /// let x = QueryCompilationResultActionsResponse::new()
9867    ///     .set_compilation_result_actions([
9868    ///         CompilationResultAction::default()/* use setters */,
9869    ///         CompilationResultAction::default()/* use (different) setters */,
9870    ///     ]);
9871    /// ```
9872    pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
9873    where
9874        T: std::iter::IntoIterator<Item = V>,
9875        V: std::convert::Into<crate::model::CompilationResultAction>,
9876    {
9877        use std::iter::Iterator;
9878        self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
9879        self
9880    }
9881
9882    /// Sets the value of [next_page_token][crate::model::QueryCompilationResultActionsResponse::next_page_token].
9883    ///
9884    /// # Example
9885    /// ```ignore,no_run
9886    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
9887    /// let x = QueryCompilationResultActionsResponse::new().set_next_page_token("example");
9888    /// ```
9889    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9890        self.next_page_token = v.into();
9891        self
9892    }
9893}
9894
9895impl wkt::message::Message for QueryCompilationResultActionsResponse {
9896    fn typename() -> &'static str {
9897        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
9898    }
9899}
9900
9901#[doc(hidden)]
9902impl gax::paginator::internal::PageableResponse for QueryCompilationResultActionsResponse {
9903    type PageItem = crate::model::CompilationResultAction;
9904
9905    fn items(self) -> std::vec::Vec<Self::PageItem> {
9906        self.compilation_result_actions
9907    }
9908
9909    fn next_page_token(&self) -> std::string::String {
9910        use std::clone::Clone;
9911        self.next_page_token.clone()
9912    }
9913}
9914
9915/// Represents a Dataform workflow configuration.
9916#[derive(Clone, Default, PartialEq)]
9917#[non_exhaustive]
9918pub struct WorkflowConfig {
9919    /// Identifier. The workflow config's name.
9920    pub name: std::string::String,
9921
9922    /// Required. The name of the release config whose release_compilation_result
9923    /// should be executed. Must be in the format
9924    /// `projects/*/locations/*/repositories/*/releaseConfigs/*`.
9925    pub release_config: std::string::String,
9926
9927    /// Optional. If left unset, a default InvocationConfig will be used.
9928    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
9929
9930    /// Optional. Optional schedule (in cron format) for automatic execution of
9931    /// this workflow config.
9932    pub cron_schedule: std::string::String,
9933
9934    /// Optional. Specifies the time zone to be used when interpreting
9935    /// cron_schedule. Must be a time zone name from the time zone database
9936    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
9937    /// unspecified, the default is UTC.
9938    pub time_zone: std::string::String,
9939
9940    /// Output only. Records of the 10 most recent scheduled execution attempts,
9941    /// ordered in descending order of `execution_time`. Updated whenever automatic
9942    /// creation of a workflow invocation is triggered by cron_schedule.
9943    pub recent_scheduled_execution_records:
9944        std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
9945
9946    /// Optional. Disables automatic creation of workflow invocations.
9947    pub disabled: bool,
9948
9949    /// Output only. The timestamp of when the WorkflowConfig was created.
9950    pub create_time: std::option::Option<wkt::Timestamp>,
9951
9952    /// Output only. The timestamp of when the WorkflowConfig was last updated.
9953    pub update_time: std::option::Option<wkt::Timestamp>,
9954
9955    /// Output only. All the metadata information that is used internally to serve
9956    /// the resource. For example: timestamps, flags, status fields, etc. The
9957    /// format of this field is a JSON string.
9958    pub internal_metadata: std::option::Option<std::string::String>,
9959
9960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9961}
9962
9963impl WorkflowConfig {
9964    pub fn new() -> Self {
9965        std::default::Default::default()
9966    }
9967
9968    /// Sets the value of [name][crate::model::WorkflowConfig::name].
9969    ///
9970    /// # Example
9971    /// ```ignore,no_run
9972    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
9973    /// let x = WorkflowConfig::new().set_name("example");
9974    /// ```
9975    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9976        self.name = v.into();
9977        self
9978    }
9979
9980    /// Sets the value of [release_config][crate::model::WorkflowConfig::release_config].
9981    ///
9982    /// # Example
9983    /// ```ignore,no_run
9984    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
9985    /// let x = WorkflowConfig::new().set_release_config("example");
9986    /// ```
9987    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9988        self.release_config = v.into();
9989        self
9990    }
9991
9992    /// Sets the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
9993    ///
9994    /// # Example
9995    /// ```ignore,no_run
9996    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
9997    /// use google_cloud_dataform_v1::model::InvocationConfig;
9998    /// let x = WorkflowConfig::new().set_invocation_config(InvocationConfig::default()/* use setters */);
9999    /// ```
10000    pub fn set_invocation_config<T>(mut self, v: T) -> Self
10001    where
10002        T: std::convert::Into<crate::model::InvocationConfig>,
10003    {
10004        self.invocation_config = std::option::Option::Some(v.into());
10005        self
10006    }
10007
10008    /// Sets or clears the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
10009    ///
10010    /// # Example
10011    /// ```ignore,no_run
10012    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10013    /// use google_cloud_dataform_v1::model::InvocationConfig;
10014    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
10015    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(None::<InvocationConfig>);
10016    /// ```
10017    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
10018    where
10019        T: std::convert::Into<crate::model::InvocationConfig>,
10020    {
10021        self.invocation_config = v.map(|x| x.into());
10022        self
10023    }
10024
10025    /// Sets the value of [cron_schedule][crate::model::WorkflowConfig::cron_schedule].
10026    ///
10027    /// # Example
10028    /// ```ignore,no_run
10029    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10030    /// let x = WorkflowConfig::new().set_cron_schedule("example");
10031    /// ```
10032    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10033        self.cron_schedule = v.into();
10034        self
10035    }
10036
10037    /// Sets the value of [time_zone][crate::model::WorkflowConfig::time_zone].
10038    ///
10039    /// # Example
10040    /// ```ignore,no_run
10041    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10042    /// let x = WorkflowConfig::new().set_time_zone("example");
10043    /// ```
10044    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10045        self.time_zone = v.into();
10046        self
10047    }
10048
10049    /// Sets the value of [recent_scheduled_execution_records][crate::model::WorkflowConfig::recent_scheduled_execution_records].
10050    ///
10051    /// # Example
10052    /// ```ignore,no_run
10053    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10054    /// use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10055    /// let x = WorkflowConfig::new()
10056    ///     .set_recent_scheduled_execution_records([
10057    ///         ScheduledExecutionRecord::default()/* use setters */,
10058    ///         ScheduledExecutionRecord::default()/* use (different) setters */,
10059    ///     ]);
10060    /// ```
10061    pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
10062    where
10063        T: std::iter::IntoIterator<Item = V>,
10064        V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
10065    {
10066        use std::iter::Iterator;
10067        self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
10068        self
10069    }
10070
10071    /// Sets the value of [disabled][crate::model::WorkflowConfig::disabled].
10072    ///
10073    /// # Example
10074    /// ```ignore,no_run
10075    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10076    /// let x = WorkflowConfig::new().set_disabled(true);
10077    /// ```
10078    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10079        self.disabled = v.into();
10080        self
10081    }
10082
10083    /// Sets the value of [create_time][crate::model::WorkflowConfig::create_time].
10084    ///
10085    /// # Example
10086    /// ```ignore,no_run
10087    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10088    /// use wkt::Timestamp;
10089    /// let x = WorkflowConfig::new().set_create_time(Timestamp::default()/* use setters */);
10090    /// ```
10091    pub fn set_create_time<T>(mut self, v: T) -> Self
10092    where
10093        T: std::convert::Into<wkt::Timestamp>,
10094    {
10095        self.create_time = std::option::Option::Some(v.into());
10096        self
10097    }
10098
10099    /// Sets or clears the value of [create_time][crate::model::WorkflowConfig::create_time].
10100    ///
10101    /// # Example
10102    /// ```ignore,no_run
10103    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10104    /// use wkt::Timestamp;
10105    /// let x = WorkflowConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10106    /// let x = WorkflowConfig::new().set_or_clear_create_time(None::<Timestamp>);
10107    /// ```
10108    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10109    where
10110        T: std::convert::Into<wkt::Timestamp>,
10111    {
10112        self.create_time = v.map(|x| x.into());
10113        self
10114    }
10115
10116    /// Sets the value of [update_time][crate::model::WorkflowConfig::update_time].
10117    ///
10118    /// # Example
10119    /// ```ignore,no_run
10120    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10121    /// use wkt::Timestamp;
10122    /// let x = WorkflowConfig::new().set_update_time(Timestamp::default()/* use setters */);
10123    /// ```
10124    pub fn set_update_time<T>(mut self, v: T) -> Self
10125    where
10126        T: std::convert::Into<wkt::Timestamp>,
10127    {
10128        self.update_time = std::option::Option::Some(v.into());
10129        self
10130    }
10131
10132    /// Sets or clears the value of [update_time][crate::model::WorkflowConfig::update_time].
10133    ///
10134    /// # Example
10135    /// ```ignore,no_run
10136    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10137    /// use wkt::Timestamp;
10138    /// let x = WorkflowConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10139    /// let x = WorkflowConfig::new().set_or_clear_update_time(None::<Timestamp>);
10140    /// ```
10141    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10142    where
10143        T: std::convert::Into<wkt::Timestamp>,
10144    {
10145        self.update_time = v.map(|x| x.into());
10146        self
10147    }
10148
10149    /// Sets the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
10150    ///
10151    /// # Example
10152    /// ```ignore,no_run
10153    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10154    /// let x = WorkflowConfig::new().set_internal_metadata("example");
10155    /// ```
10156    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
10157    where
10158        T: std::convert::Into<std::string::String>,
10159    {
10160        self.internal_metadata = std::option::Option::Some(v.into());
10161        self
10162    }
10163
10164    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
10165    ///
10166    /// # Example
10167    /// ```ignore,no_run
10168    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10169    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(Some("example"));
10170    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(None::<String>);
10171    /// ```
10172    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
10173    where
10174        T: std::convert::Into<std::string::String>,
10175    {
10176        self.internal_metadata = v.map(|x| x.into());
10177        self
10178    }
10179}
10180
10181impl wkt::message::Message for WorkflowConfig {
10182    fn typename() -> &'static str {
10183        "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
10184    }
10185}
10186
10187/// Defines additional types related to [WorkflowConfig].
10188pub mod workflow_config {
10189    #[allow(unused_imports)]
10190    use super::*;
10191
10192    /// A record of an attempt to create a workflow invocation for this workflow
10193    /// config.
10194    #[derive(Clone, Default, PartialEq)]
10195    #[non_exhaustive]
10196    pub struct ScheduledExecutionRecord {
10197        /// Output only. The timestamp of this execution attempt.
10198        pub execution_time: std::option::Option<wkt::Timestamp>,
10199
10200        /// The result of this execution attempt.
10201        pub result:
10202            std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
10203
10204        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10205    }
10206
10207    impl ScheduledExecutionRecord {
10208        pub fn new() -> Self {
10209            std::default::Default::default()
10210        }
10211
10212        /// Sets the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
10213        ///
10214        /// # Example
10215        /// ```ignore,no_run
10216        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10217        /// use wkt::Timestamp;
10218        /// let x = ScheduledExecutionRecord::new().set_execution_time(Timestamp::default()/* use setters */);
10219        /// ```
10220        pub fn set_execution_time<T>(mut self, v: T) -> Self
10221        where
10222            T: std::convert::Into<wkt::Timestamp>,
10223        {
10224            self.execution_time = std::option::Option::Some(v.into());
10225            self
10226        }
10227
10228        /// Sets or clears the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
10229        ///
10230        /// # Example
10231        /// ```ignore,no_run
10232        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10233        /// use wkt::Timestamp;
10234        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(Some(Timestamp::default()/* use setters */));
10235        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(None::<Timestamp>);
10236        /// ```
10237        pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
10238        where
10239            T: std::convert::Into<wkt::Timestamp>,
10240        {
10241            self.execution_time = v.map(|x| x.into());
10242            self
10243        }
10244
10245        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result].
10246        ///
10247        /// Note that all the setters affecting `result` are mutually
10248        /// exclusive.
10249        ///
10250        /// # Example
10251        /// ```ignore,no_run
10252        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10253        /// use google_cloud_dataform_v1::model::workflow_config::scheduled_execution_record::Result;
10254        /// let x = ScheduledExecutionRecord::new().set_result(Some(Result::WorkflowInvocation("example".to_string())));
10255        /// ```
10256        pub fn set_result<
10257            T: std::convert::Into<
10258                    std::option::Option<
10259                        crate::model::workflow_config::scheduled_execution_record::Result,
10260                    >,
10261                >,
10262        >(
10263            mut self,
10264            v: T,
10265        ) -> Self {
10266            self.result = v.into();
10267            self
10268        }
10269
10270        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10271        /// if it holds a `WorkflowInvocation`, `None` if the field is not set or
10272        /// holds a different branch.
10273        pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
10274            #[allow(unreachable_patterns)]
10275            self.result.as_ref().and_then(|v| match v {
10276                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
10277                _ => std::option::Option::None,
10278            })
10279        }
10280
10281        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10282        /// to hold a `WorkflowInvocation`.
10283        ///
10284        /// Note that all the setters affecting `result` are
10285        /// mutually exclusive.
10286        ///
10287        /// # Example
10288        /// ```ignore,no_run
10289        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10290        /// let x = ScheduledExecutionRecord::new().set_workflow_invocation("example");
10291        /// assert!(x.workflow_invocation().is_some());
10292        /// assert!(x.error_status().is_none());
10293        /// ```
10294        pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
10295            mut self,
10296            v: T,
10297        ) -> Self {
10298            self.result = std::option::Option::Some(
10299                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
10300                    v.into()
10301                )
10302            );
10303            self
10304        }
10305
10306        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10307        /// if it holds a `ErrorStatus`, `None` if the field is not set or
10308        /// holds a different branch.
10309        pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
10310            #[allow(unreachable_patterns)]
10311            self.result.as_ref().and_then(|v| match v {
10312                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
10313                    v,
10314                ) => std::option::Option::Some(v),
10315                _ => std::option::Option::None,
10316            })
10317        }
10318
10319        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10320        /// to hold a `ErrorStatus`.
10321        ///
10322        /// Note that all the setters affecting `result` are
10323        /// mutually exclusive.
10324        ///
10325        /// # Example
10326        /// ```ignore,no_run
10327        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10328        /// use rpc::model::Status;
10329        /// let x = ScheduledExecutionRecord::new().set_error_status(Status::default()/* use setters */);
10330        /// assert!(x.error_status().is_some());
10331        /// assert!(x.workflow_invocation().is_none());
10332        /// ```
10333        pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
10334            mut self,
10335            v: T,
10336        ) -> Self {
10337            self.result = std::option::Option::Some(
10338                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
10339                    v.into(),
10340                ),
10341            );
10342            self
10343        }
10344    }
10345
10346    impl wkt::message::Message for ScheduledExecutionRecord {
10347        fn typename() -> &'static str {
10348            "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
10349        }
10350    }
10351
10352    /// Defines additional types related to [ScheduledExecutionRecord].
10353    pub mod scheduled_execution_record {
10354        #[allow(unused_imports)]
10355        use super::*;
10356
10357        /// The result of this execution attempt.
10358        #[derive(Clone, Debug, PartialEq)]
10359        #[non_exhaustive]
10360        pub enum Result {
10361            /// The name of the created workflow invocation, if one was successfully
10362            /// created. Must be in the format
10363            /// `projects/*/locations/*/repositories/*/workflowInvocations/*`.
10364            WorkflowInvocation(std::string::String),
10365            /// The error status encountered upon this attempt to create the
10366            /// workflow invocation, if the attempt was unsuccessful.
10367            ErrorStatus(std::boxed::Box<rpc::model::Status>),
10368        }
10369    }
10370}
10371
10372/// Includes various configuration options for a workflow invocation.
10373/// If both `included_targets` and `included_tags` are unset, all actions
10374/// will be included.
10375#[derive(Clone, Default, PartialEq)]
10376#[non_exhaustive]
10377pub struct InvocationConfig {
10378    /// Optional. The set of action identifiers to include.
10379    pub included_targets: std::vec::Vec<crate::model::Target>,
10380
10381    /// Optional. The set of tags to include.
10382    pub included_tags: std::vec::Vec<std::string::String>,
10383
10384    /// Optional. When set to true, transitive dependencies of included actions
10385    /// will be executed.
10386    pub transitive_dependencies_included: bool,
10387
10388    /// Optional. When set to true, transitive dependents of included actions will
10389    /// be executed.
10390    pub transitive_dependents_included: bool,
10391
10392    /// Optional. When set to true, any incremental tables will be fully refreshed.
10393    pub fully_refresh_incremental_tables_enabled: bool,
10394
10395    /// Optional. The service account to run workflow invocations under.
10396    pub service_account: std::string::String,
10397
10398    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10399}
10400
10401impl InvocationConfig {
10402    pub fn new() -> Self {
10403        std::default::Default::default()
10404    }
10405
10406    /// Sets the value of [included_targets][crate::model::InvocationConfig::included_targets].
10407    ///
10408    /// # Example
10409    /// ```ignore,no_run
10410    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10411    /// use google_cloud_dataform_v1::model::Target;
10412    /// let x = InvocationConfig::new()
10413    ///     .set_included_targets([
10414    ///         Target::default()/* use setters */,
10415    ///         Target::default()/* use (different) setters */,
10416    ///     ]);
10417    /// ```
10418    pub fn set_included_targets<T, V>(mut self, v: T) -> Self
10419    where
10420        T: std::iter::IntoIterator<Item = V>,
10421        V: std::convert::Into<crate::model::Target>,
10422    {
10423        use std::iter::Iterator;
10424        self.included_targets = v.into_iter().map(|i| i.into()).collect();
10425        self
10426    }
10427
10428    /// Sets the value of [included_tags][crate::model::InvocationConfig::included_tags].
10429    ///
10430    /// # Example
10431    /// ```ignore,no_run
10432    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10433    /// let x = InvocationConfig::new().set_included_tags(["a", "b", "c"]);
10434    /// ```
10435    pub fn set_included_tags<T, V>(mut self, v: T) -> Self
10436    where
10437        T: std::iter::IntoIterator<Item = V>,
10438        V: std::convert::Into<std::string::String>,
10439    {
10440        use std::iter::Iterator;
10441        self.included_tags = v.into_iter().map(|i| i.into()).collect();
10442        self
10443    }
10444
10445    /// Sets the value of [transitive_dependencies_included][crate::model::InvocationConfig::transitive_dependencies_included].
10446    ///
10447    /// # Example
10448    /// ```ignore,no_run
10449    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10450    /// let x = InvocationConfig::new().set_transitive_dependencies_included(true);
10451    /// ```
10452    pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
10453        mut self,
10454        v: T,
10455    ) -> Self {
10456        self.transitive_dependencies_included = v.into();
10457        self
10458    }
10459
10460    /// Sets the value of [transitive_dependents_included][crate::model::InvocationConfig::transitive_dependents_included].
10461    ///
10462    /// # Example
10463    /// ```ignore,no_run
10464    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10465    /// let x = InvocationConfig::new().set_transitive_dependents_included(true);
10466    /// ```
10467    pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10468        self.transitive_dependents_included = v.into();
10469        self
10470    }
10471
10472    /// Sets the value of [fully_refresh_incremental_tables_enabled][crate::model::InvocationConfig::fully_refresh_incremental_tables_enabled].
10473    ///
10474    /// # Example
10475    /// ```ignore,no_run
10476    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10477    /// let x = InvocationConfig::new().set_fully_refresh_incremental_tables_enabled(true);
10478    /// ```
10479    pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
10480        mut self,
10481        v: T,
10482    ) -> Self {
10483        self.fully_refresh_incremental_tables_enabled = v.into();
10484        self
10485    }
10486
10487    /// Sets the value of [service_account][crate::model::InvocationConfig::service_account].
10488    ///
10489    /// # Example
10490    /// ```ignore,no_run
10491    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10492    /// let x = InvocationConfig::new().set_service_account("example");
10493    /// ```
10494    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10495        self.service_account = v.into();
10496        self
10497    }
10498}
10499
10500impl wkt::message::Message for InvocationConfig {
10501    fn typename() -> &'static str {
10502        "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
10503    }
10504}
10505
10506/// `ListWorkflowConfigs` request message.
10507#[derive(Clone, Default, PartialEq)]
10508#[non_exhaustive]
10509pub struct ListWorkflowConfigsRequest {
10510    /// Required. The repository in which to list workflow configs. Must be in the
10511    /// format `projects/*/locations/*/repositories/*`.
10512    pub parent: std::string::String,
10513
10514    /// Optional. Maximum number of workflow configs to return. The server may
10515    /// return fewer items than requested. If unspecified, the server will pick an
10516    /// appropriate default.
10517    pub page_size: i32,
10518
10519    /// Optional. Page token received from a previous `ListWorkflowConfigs` call.
10520    /// Provide this to retrieve the subsequent page.
10521    ///
10522    /// When paginating, all other parameters provided to `ListWorkflowConfigs`,
10523    /// with the exception of `page_size`, must match the call that provided the
10524    /// page token.
10525    pub page_token: std::string::String,
10526
10527    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10528}
10529
10530impl ListWorkflowConfigsRequest {
10531    pub fn new() -> Self {
10532        std::default::Default::default()
10533    }
10534
10535    /// Sets the value of [parent][crate::model::ListWorkflowConfigsRequest::parent].
10536    ///
10537    /// # Example
10538    /// ```ignore,no_run
10539    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
10540    /// let x = ListWorkflowConfigsRequest::new().set_parent("example");
10541    /// ```
10542    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10543        self.parent = v.into();
10544        self
10545    }
10546
10547    /// Sets the value of [page_size][crate::model::ListWorkflowConfigsRequest::page_size].
10548    ///
10549    /// # Example
10550    /// ```ignore,no_run
10551    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
10552    /// let x = ListWorkflowConfigsRequest::new().set_page_size(42);
10553    /// ```
10554    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10555        self.page_size = v.into();
10556        self
10557    }
10558
10559    /// Sets the value of [page_token][crate::model::ListWorkflowConfigsRequest::page_token].
10560    ///
10561    /// # Example
10562    /// ```ignore,no_run
10563    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
10564    /// let x = ListWorkflowConfigsRequest::new().set_page_token("example");
10565    /// ```
10566    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10567        self.page_token = v.into();
10568        self
10569    }
10570}
10571
10572impl wkt::message::Message for ListWorkflowConfigsRequest {
10573    fn typename() -> &'static str {
10574        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
10575    }
10576}
10577
10578/// `ListWorkflowConfigs` response message.
10579#[derive(Clone, Default, PartialEq)]
10580#[non_exhaustive]
10581pub struct ListWorkflowConfigsResponse {
10582    /// List of workflow configs.
10583    pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
10584
10585    /// A token, which can be sent as `page_token` to retrieve the next page.
10586    /// If this field is omitted, there are no subsequent pages.
10587    pub next_page_token: std::string::String,
10588
10589    /// Locations which could not be reached.
10590    pub unreachable: std::vec::Vec<std::string::String>,
10591
10592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10593}
10594
10595impl ListWorkflowConfigsResponse {
10596    pub fn new() -> Self {
10597        std::default::Default::default()
10598    }
10599
10600    /// Sets the value of [workflow_configs][crate::model::ListWorkflowConfigsResponse::workflow_configs].
10601    ///
10602    /// # Example
10603    /// ```ignore,no_run
10604    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
10605    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10606    /// let x = ListWorkflowConfigsResponse::new()
10607    ///     .set_workflow_configs([
10608    ///         WorkflowConfig::default()/* use setters */,
10609    ///         WorkflowConfig::default()/* use (different) setters */,
10610    ///     ]);
10611    /// ```
10612    pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
10613    where
10614        T: std::iter::IntoIterator<Item = V>,
10615        V: std::convert::Into<crate::model::WorkflowConfig>,
10616    {
10617        use std::iter::Iterator;
10618        self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
10619        self
10620    }
10621
10622    /// Sets the value of [next_page_token][crate::model::ListWorkflowConfigsResponse::next_page_token].
10623    ///
10624    /// # Example
10625    /// ```ignore,no_run
10626    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
10627    /// let x = ListWorkflowConfigsResponse::new().set_next_page_token("example");
10628    /// ```
10629    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10630        self.next_page_token = v.into();
10631        self
10632    }
10633
10634    /// Sets the value of [unreachable][crate::model::ListWorkflowConfigsResponse::unreachable].
10635    ///
10636    /// # Example
10637    /// ```ignore,no_run
10638    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
10639    /// let x = ListWorkflowConfigsResponse::new().set_unreachable(["a", "b", "c"]);
10640    /// ```
10641    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
10642    where
10643        T: std::iter::IntoIterator<Item = V>,
10644        V: std::convert::Into<std::string::String>,
10645    {
10646        use std::iter::Iterator;
10647        self.unreachable = v.into_iter().map(|i| i.into()).collect();
10648        self
10649    }
10650}
10651
10652impl wkt::message::Message for ListWorkflowConfigsResponse {
10653    fn typename() -> &'static str {
10654        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
10655    }
10656}
10657
10658#[doc(hidden)]
10659impl gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
10660    type PageItem = crate::model::WorkflowConfig;
10661
10662    fn items(self) -> std::vec::Vec<Self::PageItem> {
10663        self.workflow_configs
10664    }
10665
10666    fn next_page_token(&self) -> std::string::String {
10667        use std::clone::Clone;
10668        self.next_page_token.clone()
10669    }
10670}
10671
10672/// `GetWorkflowConfig` request message.
10673#[derive(Clone, Default, PartialEq)]
10674#[non_exhaustive]
10675pub struct GetWorkflowConfigRequest {
10676    /// Required. The workflow config's name.
10677    pub name: std::string::String,
10678
10679    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10680}
10681
10682impl GetWorkflowConfigRequest {
10683    pub fn new() -> Self {
10684        std::default::Default::default()
10685    }
10686
10687    /// Sets the value of [name][crate::model::GetWorkflowConfigRequest::name].
10688    ///
10689    /// # Example
10690    /// ```ignore,no_run
10691    /// # use google_cloud_dataform_v1::model::GetWorkflowConfigRequest;
10692    /// let x = GetWorkflowConfigRequest::new().set_name("example");
10693    /// ```
10694    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10695        self.name = v.into();
10696        self
10697    }
10698}
10699
10700impl wkt::message::Message for GetWorkflowConfigRequest {
10701    fn typename() -> &'static str {
10702        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
10703    }
10704}
10705
10706/// `CreateWorkflowConfig` request message.
10707#[derive(Clone, Default, PartialEq)]
10708#[non_exhaustive]
10709pub struct CreateWorkflowConfigRequest {
10710    /// Required. The repository in which to create the workflow config. Must be in
10711    /// the format `projects/*/locations/*/repositories/*`.
10712    pub parent: std::string::String,
10713
10714    /// Required. The workflow config to create.
10715    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
10716
10717    /// Required. The ID to use for the workflow config, which will become the
10718    /// final component of the workflow config's resource name.
10719    pub workflow_config_id: std::string::String,
10720
10721    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10722}
10723
10724impl CreateWorkflowConfigRequest {
10725    pub fn new() -> Self {
10726        std::default::Default::default()
10727    }
10728
10729    /// Sets the value of [parent][crate::model::CreateWorkflowConfigRequest::parent].
10730    ///
10731    /// # Example
10732    /// ```ignore,no_run
10733    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10734    /// let x = CreateWorkflowConfigRequest::new().set_parent("example");
10735    /// ```
10736    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10737        self.parent = v.into();
10738        self
10739    }
10740
10741    /// Sets the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
10742    ///
10743    /// # Example
10744    /// ```ignore,no_run
10745    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10746    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10747    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
10748    /// ```
10749    pub fn set_workflow_config<T>(mut self, v: T) -> Self
10750    where
10751        T: std::convert::Into<crate::model::WorkflowConfig>,
10752    {
10753        self.workflow_config = std::option::Option::Some(v.into());
10754        self
10755    }
10756
10757    /// Sets or clears the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
10758    ///
10759    /// # Example
10760    /// ```ignore,no_run
10761    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10762    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10763    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
10764    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
10765    /// ```
10766    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
10767    where
10768        T: std::convert::Into<crate::model::WorkflowConfig>,
10769    {
10770        self.workflow_config = v.map(|x| x.into());
10771        self
10772    }
10773
10774    /// Sets the value of [workflow_config_id][crate::model::CreateWorkflowConfigRequest::workflow_config_id].
10775    ///
10776    /// # Example
10777    /// ```ignore,no_run
10778    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10779    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config_id("example");
10780    /// ```
10781    pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
10782        mut self,
10783        v: T,
10784    ) -> Self {
10785        self.workflow_config_id = v.into();
10786        self
10787    }
10788}
10789
10790impl wkt::message::Message for CreateWorkflowConfigRequest {
10791    fn typename() -> &'static str {
10792        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
10793    }
10794}
10795
10796/// `UpdateWorkflowConfig` request message.
10797#[derive(Clone, Default, PartialEq)]
10798#[non_exhaustive]
10799pub struct UpdateWorkflowConfigRequest {
10800    /// Optional. Specifies the fields to be updated in the workflow config. If
10801    /// left unset, all fields will be updated.
10802    pub update_mask: std::option::Option<wkt::FieldMask>,
10803
10804    /// Required. The workflow config to update.
10805    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
10806
10807    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10808}
10809
10810impl UpdateWorkflowConfigRequest {
10811    pub fn new() -> Self {
10812        std::default::Default::default()
10813    }
10814
10815    /// Sets the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
10816    ///
10817    /// # Example
10818    /// ```ignore,no_run
10819    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10820    /// use wkt::FieldMask;
10821    /// let x = UpdateWorkflowConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
10822    /// ```
10823    pub fn set_update_mask<T>(mut self, v: T) -> Self
10824    where
10825        T: std::convert::Into<wkt::FieldMask>,
10826    {
10827        self.update_mask = std::option::Option::Some(v.into());
10828        self
10829    }
10830
10831    /// Sets or clears the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
10832    ///
10833    /// # Example
10834    /// ```ignore,no_run
10835    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10836    /// use wkt::FieldMask;
10837    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
10838    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
10839    /// ```
10840    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10841    where
10842        T: std::convert::Into<wkt::FieldMask>,
10843    {
10844        self.update_mask = v.map(|x| x.into());
10845        self
10846    }
10847
10848    /// Sets the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
10849    ///
10850    /// # Example
10851    /// ```ignore,no_run
10852    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10853    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10854    /// let x = UpdateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
10855    /// ```
10856    pub fn set_workflow_config<T>(mut self, v: T) -> Self
10857    where
10858        T: std::convert::Into<crate::model::WorkflowConfig>,
10859    {
10860        self.workflow_config = std::option::Option::Some(v.into());
10861        self
10862    }
10863
10864    /// Sets or clears the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
10865    ///
10866    /// # Example
10867    /// ```ignore,no_run
10868    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10869    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10870    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
10871    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
10872    /// ```
10873    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
10874    where
10875        T: std::convert::Into<crate::model::WorkflowConfig>,
10876    {
10877        self.workflow_config = v.map(|x| x.into());
10878        self
10879    }
10880}
10881
10882impl wkt::message::Message for UpdateWorkflowConfigRequest {
10883    fn typename() -> &'static str {
10884        "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
10885    }
10886}
10887
10888/// `DeleteWorkflowConfig` request message.
10889#[derive(Clone, Default, PartialEq)]
10890#[non_exhaustive]
10891pub struct DeleteWorkflowConfigRequest {
10892    /// Required. The workflow config's name.
10893    pub name: std::string::String,
10894
10895    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10896}
10897
10898impl DeleteWorkflowConfigRequest {
10899    pub fn new() -> Self {
10900        std::default::Default::default()
10901    }
10902
10903    /// Sets the value of [name][crate::model::DeleteWorkflowConfigRequest::name].
10904    ///
10905    /// # Example
10906    /// ```ignore,no_run
10907    /// # use google_cloud_dataform_v1::model::DeleteWorkflowConfigRequest;
10908    /// let x = DeleteWorkflowConfigRequest::new().set_name("example");
10909    /// ```
10910    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10911        self.name = v.into();
10912        self
10913    }
10914}
10915
10916impl wkt::message::Message for DeleteWorkflowConfigRequest {
10917    fn typename() -> &'static str {
10918        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
10919    }
10920}
10921
10922/// Represents a single invocation of a compilation result.
10923#[derive(Clone, Default, PartialEq)]
10924#[non_exhaustive]
10925pub struct WorkflowInvocation {
10926    /// Output only. The workflow invocation's name.
10927    pub name: std::string::String,
10928
10929    /// Immutable. If left unset, a default InvocationConfig will be used.
10930    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
10931
10932    /// Output only. This workflow invocation's current state.
10933    pub state: crate::model::workflow_invocation::State,
10934
10935    /// Output only. This workflow invocation's timing details.
10936    pub invocation_timing: std::option::Option<gtype::model::Interval>,
10937
10938    /// Output only. The resolved compilation result that was used to create this
10939    /// invocation. Will be in the format
10940    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
10941    pub resolved_compilation_result: std::string::String,
10942
10943    /// Output only. Only set if the repository has a KMS Key.
10944    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
10945
10946    /// Output only. All the metadata information that is used internally to serve
10947    /// the resource. For example: timestamps, flags, status fields, etc. The
10948    /// format of this field is a JSON string.
10949    pub internal_metadata: std::option::Option<std::string::String>,
10950
10951    /// The source of the compilation result to use for this invocation.
10952    pub compilation_source:
10953        std::option::Option<crate::model::workflow_invocation::CompilationSource>,
10954
10955    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10956}
10957
10958impl WorkflowInvocation {
10959    pub fn new() -> Self {
10960        std::default::Default::default()
10961    }
10962
10963    /// Sets the value of [name][crate::model::WorkflowInvocation::name].
10964    ///
10965    /// # Example
10966    /// ```ignore,no_run
10967    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
10968    /// let x = WorkflowInvocation::new().set_name("example");
10969    /// ```
10970    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10971        self.name = v.into();
10972        self
10973    }
10974
10975    /// Sets the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
10976    ///
10977    /// # Example
10978    /// ```ignore,no_run
10979    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
10980    /// use google_cloud_dataform_v1::model::InvocationConfig;
10981    /// let x = WorkflowInvocation::new().set_invocation_config(InvocationConfig::default()/* use setters */);
10982    /// ```
10983    pub fn set_invocation_config<T>(mut self, v: T) -> Self
10984    where
10985        T: std::convert::Into<crate::model::InvocationConfig>,
10986    {
10987        self.invocation_config = std::option::Option::Some(v.into());
10988        self
10989    }
10990
10991    /// Sets or clears the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
10992    ///
10993    /// # Example
10994    /// ```ignore,no_run
10995    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
10996    /// use google_cloud_dataform_v1::model::InvocationConfig;
10997    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
10998    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(None::<InvocationConfig>);
10999    /// ```
11000    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
11001    where
11002        T: std::convert::Into<crate::model::InvocationConfig>,
11003    {
11004        self.invocation_config = v.map(|x| x.into());
11005        self
11006    }
11007
11008    /// Sets the value of [state][crate::model::WorkflowInvocation::state].
11009    ///
11010    /// # Example
11011    /// ```ignore,no_run
11012    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11013    /// use google_cloud_dataform_v1::model::workflow_invocation::State;
11014    /// let x0 = WorkflowInvocation::new().set_state(State::Running);
11015    /// let x1 = WorkflowInvocation::new().set_state(State::Succeeded);
11016    /// let x2 = WorkflowInvocation::new().set_state(State::Cancelled);
11017    /// ```
11018    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
11019        mut self,
11020        v: T,
11021    ) -> Self {
11022        self.state = v.into();
11023        self
11024    }
11025
11026    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
11027    ///
11028    /// # Example
11029    /// ```ignore,no_run
11030    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11031    /// use gtype::model::Interval;
11032    /// let x = WorkflowInvocation::new().set_invocation_timing(Interval::default()/* use setters */);
11033    /// ```
11034    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
11035    where
11036        T: std::convert::Into<gtype::model::Interval>,
11037    {
11038        self.invocation_timing = std::option::Option::Some(v.into());
11039        self
11040    }
11041
11042    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
11043    ///
11044    /// # Example
11045    /// ```ignore,no_run
11046    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11047    /// use gtype::model::Interval;
11048    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
11049    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(None::<Interval>);
11050    /// ```
11051    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
11052    where
11053        T: std::convert::Into<gtype::model::Interval>,
11054    {
11055        self.invocation_timing = v.map(|x| x.into());
11056        self
11057    }
11058
11059    /// Sets the value of [resolved_compilation_result][crate::model::WorkflowInvocation::resolved_compilation_result].
11060    ///
11061    /// # Example
11062    /// ```ignore,no_run
11063    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11064    /// let x = WorkflowInvocation::new().set_resolved_compilation_result("example");
11065    /// ```
11066    pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
11067        mut self,
11068        v: T,
11069    ) -> Self {
11070        self.resolved_compilation_result = v.into();
11071        self
11072    }
11073
11074    /// Sets the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
11075    ///
11076    /// # Example
11077    /// ```ignore,no_run
11078    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11079    /// use google_cloud_dataform_v1::model::DataEncryptionState;
11080    /// let x = WorkflowInvocation::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
11081    /// ```
11082    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
11083    where
11084        T: std::convert::Into<crate::model::DataEncryptionState>,
11085    {
11086        self.data_encryption_state = std::option::Option::Some(v.into());
11087        self
11088    }
11089
11090    /// Sets or clears the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
11091    ///
11092    /// # Example
11093    /// ```ignore,no_run
11094    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11095    /// use google_cloud_dataform_v1::model::DataEncryptionState;
11096    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
11097    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
11098    /// ```
11099    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
11100    where
11101        T: std::convert::Into<crate::model::DataEncryptionState>,
11102    {
11103        self.data_encryption_state = v.map(|x| x.into());
11104        self
11105    }
11106
11107    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
11108    ///
11109    /// # Example
11110    /// ```ignore,no_run
11111    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11112    /// let x = WorkflowInvocation::new().set_internal_metadata("example");
11113    /// ```
11114    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
11115    where
11116        T: std::convert::Into<std::string::String>,
11117    {
11118        self.internal_metadata = std::option::Option::Some(v.into());
11119        self
11120    }
11121
11122    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
11123    ///
11124    /// # Example
11125    /// ```ignore,no_run
11126    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11127    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(Some("example"));
11128    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(None::<String>);
11129    /// ```
11130    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11131    where
11132        T: std::convert::Into<std::string::String>,
11133    {
11134        self.internal_metadata = v.map(|x| x.into());
11135        self
11136    }
11137
11138    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source].
11139    ///
11140    /// Note that all the setters affecting `compilation_source` are mutually
11141    /// exclusive.
11142    ///
11143    /// # Example
11144    /// ```ignore,no_run
11145    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11146    /// use google_cloud_dataform_v1::model::workflow_invocation::CompilationSource;
11147    /// let x = WorkflowInvocation::new().set_compilation_source(Some(CompilationSource::CompilationResult("example".to_string())));
11148    /// ```
11149    pub fn set_compilation_source<
11150        T: std::convert::Into<
11151                std::option::Option<crate::model::workflow_invocation::CompilationSource>,
11152            >,
11153    >(
11154        mut self,
11155        v: T,
11156    ) -> Self {
11157        self.compilation_source = v.into();
11158        self
11159    }
11160
11161    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11162    /// if it holds a `CompilationResult`, `None` if the field is not set or
11163    /// holds a different branch.
11164    pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
11165        #[allow(unreachable_patterns)]
11166        self.compilation_source.as_ref().and_then(|v| match v {
11167            crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
11168                std::option::Option::Some(v)
11169            }
11170            _ => std::option::Option::None,
11171        })
11172    }
11173
11174    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11175    /// to hold a `CompilationResult`.
11176    ///
11177    /// Note that all the setters affecting `compilation_source` are
11178    /// mutually exclusive.
11179    ///
11180    /// # Example
11181    /// ```ignore,no_run
11182    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11183    /// let x = WorkflowInvocation::new().set_compilation_result("example");
11184    /// assert!(x.compilation_result().is_some());
11185    /// assert!(x.workflow_config().is_none());
11186    /// ```
11187    pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
11188        mut self,
11189        v: T,
11190    ) -> Self {
11191        self.compilation_source = std::option::Option::Some(
11192            crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
11193        );
11194        self
11195    }
11196
11197    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11198    /// if it holds a `WorkflowConfig`, `None` if the field is not set or
11199    /// holds a different branch.
11200    pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
11201        #[allow(unreachable_patterns)]
11202        self.compilation_source.as_ref().and_then(|v| match v {
11203            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
11204                std::option::Option::Some(v)
11205            }
11206            _ => std::option::Option::None,
11207        })
11208    }
11209
11210    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11211    /// to hold a `WorkflowConfig`.
11212    ///
11213    /// Note that all the setters affecting `compilation_source` are
11214    /// mutually exclusive.
11215    ///
11216    /// # Example
11217    /// ```ignore,no_run
11218    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11219    /// let x = WorkflowInvocation::new().set_workflow_config("example");
11220    /// assert!(x.workflow_config().is_some());
11221    /// assert!(x.compilation_result().is_none());
11222    /// ```
11223    pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11224        self.compilation_source = std::option::Option::Some(
11225            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
11226        );
11227        self
11228    }
11229}
11230
11231impl wkt::message::Message for WorkflowInvocation {
11232    fn typename() -> &'static str {
11233        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
11234    }
11235}
11236
11237/// Defines additional types related to [WorkflowInvocation].
11238pub mod workflow_invocation {
11239    #[allow(unused_imports)]
11240    use super::*;
11241
11242    /// Represents the current state of a workflow invocation.
11243    ///
11244    /// # Working with unknown values
11245    ///
11246    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11247    /// additional enum variants at any time. Adding new variants is not considered
11248    /// a breaking change. Applications should write their code in anticipation of:
11249    ///
11250    /// - New values appearing in future releases of the client library, **and**
11251    /// - New values received dynamically, without application changes.
11252    ///
11253    /// Please consult the [Working with enums] section in the user guide for some
11254    /// guidelines.
11255    ///
11256    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11257    #[derive(Clone, Debug, PartialEq)]
11258    #[non_exhaustive]
11259    pub enum State {
11260        /// Default value. This value is unused.
11261        Unspecified,
11262        /// The workflow invocation is currently running.
11263        Running,
11264        /// The workflow invocation succeeded. A terminal state.
11265        Succeeded,
11266        /// The workflow invocation was cancelled. A terminal state.
11267        Cancelled,
11268        /// The workflow invocation failed. A terminal state.
11269        Failed,
11270        /// The workflow invocation is being cancelled, but some actions are still
11271        /// running.
11272        Canceling,
11273        /// If set, the enum was initialized with an unknown value.
11274        ///
11275        /// Applications can examine the value using [State::value] or
11276        /// [State::name].
11277        UnknownValue(state::UnknownValue),
11278    }
11279
11280    #[doc(hidden)]
11281    pub mod state {
11282        #[allow(unused_imports)]
11283        use super::*;
11284        #[derive(Clone, Debug, PartialEq)]
11285        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11286    }
11287
11288    impl State {
11289        /// Gets the enum value.
11290        ///
11291        /// Returns `None` if the enum contains an unknown value deserialized from
11292        /// the string representation of enums.
11293        pub fn value(&self) -> std::option::Option<i32> {
11294            match self {
11295                Self::Unspecified => std::option::Option::Some(0),
11296                Self::Running => std::option::Option::Some(1),
11297                Self::Succeeded => std::option::Option::Some(2),
11298                Self::Cancelled => std::option::Option::Some(3),
11299                Self::Failed => std::option::Option::Some(4),
11300                Self::Canceling => std::option::Option::Some(5),
11301                Self::UnknownValue(u) => u.0.value(),
11302            }
11303        }
11304
11305        /// Gets the enum value as a string.
11306        ///
11307        /// Returns `None` if the enum contains an unknown value deserialized from
11308        /// the integer representation of enums.
11309        pub fn name(&self) -> std::option::Option<&str> {
11310            match self {
11311                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11312                Self::Running => std::option::Option::Some("RUNNING"),
11313                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
11314                Self::Cancelled => std::option::Option::Some("CANCELLED"),
11315                Self::Failed => std::option::Option::Some("FAILED"),
11316                Self::Canceling => std::option::Option::Some("CANCELING"),
11317                Self::UnknownValue(u) => u.0.name(),
11318            }
11319        }
11320    }
11321
11322    impl std::default::Default for State {
11323        fn default() -> Self {
11324            use std::convert::From;
11325            Self::from(0)
11326        }
11327    }
11328
11329    impl std::fmt::Display for State {
11330        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11331            wkt::internal::display_enum(f, self.name(), self.value())
11332        }
11333    }
11334
11335    impl std::convert::From<i32> for State {
11336        fn from(value: i32) -> Self {
11337            match value {
11338                0 => Self::Unspecified,
11339                1 => Self::Running,
11340                2 => Self::Succeeded,
11341                3 => Self::Cancelled,
11342                4 => Self::Failed,
11343                5 => Self::Canceling,
11344                _ => Self::UnknownValue(state::UnknownValue(
11345                    wkt::internal::UnknownEnumValue::Integer(value),
11346                )),
11347            }
11348        }
11349    }
11350
11351    impl std::convert::From<&str> for State {
11352        fn from(value: &str) -> Self {
11353            use std::string::ToString;
11354            match value {
11355                "STATE_UNSPECIFIED" => Self::Unspecified,
11356                "RUNNING" => Self::Running,
11357                "SUCCEEDED" => Self::Succeeded,
11358                "CANCELLED" => Self::Cancelled,
11359                "FAILED" => Self::Failed,
11360                "CANCELING" => Self::Canceling,
11361                _ => Self::UnknownValue(state::UnknownValue(
11362                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11363                )),
11364            }
11365        }
11366    }
11367
11368    impl serde::ser::Serialize for State {
11369        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11370        where
11371            S: serde::Serializer,
11372        {
11373            match self {
11374                Self::Unspecified => serializer.serialize_i32(0),
11375                Self::Running => serializer.serialize_i32(1),
11376                Self::Succeeded => serializer.serialize_i32(2),
11377                Self::Cancelled => serializer.serialize_i32(3),
11378                Self::Failed => serializer.serialize_i32(4),
11379                Self::Canceling => serializer.serialize_i32(5),
11380                Self::UnknownValue(u) => u.0.serialize(serializer),
11381            }
11382        }
11383    }
11384
11385    impl<'de> serde::de::Deserialize<'de> for State {
11386        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11387        where
11388            D: serde::Deserializer<'de>,
11389        {
11390            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11391                ".google.cloud.dataform.v1.WorkflowInvocation.State",
11392            ))
11393        }
11394    }
11395
11396    /// The source of the compilation result to use for this invocation.
11397    #[derive(Clone, Debug, PartialEq)]
11398    #[non_exhaustive]
11399    pub enum CompilationSource {
11400        /// Immutable. The name of the compilation result to use for this invocation.
11401        /// Must be in the format
11402        /// `projects/*/locations/*/repositories/*/compilationResults/*`.
11403        CompilationResult(std::string::String),
11404        /// Immutable. The name of the workflow config to invoke. Must be in the
11405        /// format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
11406        WorkflowConfig(std::string::String),
11407    }
11408}
11409
11410/// `ListWorkflowInvocations` request message.
11411#[derive(Clone, Default, PartialEq)]
11412#[non_exhaustive]
11413pub struct ListWorkflowInvocationsRequest {
11414    /// Required. The parent resource of the WorkflowInvocation type. Must be in
11415    /// the format `projects/*/locations/*/repositories/*`.
11416    pub parent: std::string::String,
11417
11418    /// Optional. Maximum number of workflow invocations to return. The server may
11419    /// return fewer items than requested. If unspecified, the server will pick an
11420    /// appropriate default.
11421    pub page_size: i32,
11422
11423    /// Optional. Page token received from a previous `ListWorkflowInvocations`
11424    /// call. Provide this to retrieve the subsequent page.
11425    ///
11426    /// When paginating, all other parameters provided to
11427    /// `ListWorkflowInvocations`, with the exception of `page_size`, must match
11428    /// the call that provided the page token.
11429    pub page_token: std::string::String,
11430
11431    /// Optional. This field only supports ordering by `name`. If unspecified, the
11432    /// server will choose the ordering. If specified, the default order is
11433    /// ascending for the `name` field.
11434    pub order_by: std::string::String,
11435
11436    /// Optional. Filter for the returned list.
11437    pub filter: std::string::String,
11438
11439    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11440}
11441
11442impl ListWorkflowInvocationsRequest {
11443    pub fn new() -> Self {
11444        std::default::Default::default()
11445    }
11446
11447    /// Sets the value of [parent][crate::model::ListWorkflowInvocationsRequest::parent].
11448    ///
11449    /// # Example
11450    /// ```ignore,no_run
11451    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11452    /// let x = ListWorkflowInvocationsRequest::new().set_parent("example");
11453    /// ```
11454    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11455        self.parent = v.into();
11456        self
11457    }
11458
11459    /// Sets the value of [page_size][crate::model::ListWorkflowInvocationsRequest::page_size].
11460    ///
11461    /// # Example
11462    /// ```ignore,no_run
11463    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11464    /// let x = ListWorkflowInvocationsRequest::new().set_page_size(42);
11465    /// ```
11466    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11467        self.page_size = v.into();
11468        self
11469    }
11470
11471    /// Sets the value of [page_token][crate::model::ListWorkflowInvocationsRequest::page_token].
11472    ///
11473    /// # Example
11474    /// ```ignore,no_run
11475    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11476    /// let x = ListWorkflowInvocationsRequest::new().set_page_token("example");
11477    /// ```
11478    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11479        self.page_token = v.into();
11480        self
11481    }
11482
11483    /// Sets the value of [order_by][crate::model::ListWorkflowInvocationsRequest::order_by].
11484    ///
11485    /// # Example
11486    /// ```ignore,no_run
11487    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11488    /// let x = ListWorkflowInvocationsRequest::new().set_order_by("example");
11489    /// ```
11490    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11491        self.order_by = v.into();
11492        self
11493    }
11494
11495    /// Sets the value of [filter][crate::model::ListWorkflowInvocationsRequest::filter].
11496    ///
11497    /// # Example
11498    /// ```ignore,no_run
11499    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11500    /// let x = ListWorkflowInvocationsRequest::new().set_filter("example");
11501    /// ```
11502    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11503        self.filter = v.into();
11504        self
11505    }
11506}
11507
11508impl wkt::message::Message for ListWorkflowInvocationsRequest {
11509    fn typename() -> &'static str {
11510        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
11511    }
11512}
11513
11514/// `ListWorkflowInvocations` response message.
11515#[derive(Clone, Default, PartialEq)]
11516#[non_exhaustive]
11517pub struct ListWorkflowInvocationsResponse {
11518    /// List of workflow invocations.
11519    pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
11520
11521    /// A token, which can be sent as `page_token` to retrieve the next page.
11522    /// If this field is omitted, there are no subsequent pages.
11523    pub next_page_token: std::string::String,
11524
11525    /// Locations which could not be reached.
11526    pub unreachable: std::vec::Vec<std::string::String>,
11527
11528    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11529}
11530
11531impl ListWorkflowInvocationsResponse {
11532    pub fn new() -> Self {
11533        std::default::Default::default()
11534    }
11535
11536    /// Sets the value of [workflow_invocations][crate::model::ListWorkflowInvocationsResponse::workflow_invocations].
11537    ///
11538    /// # Example
11539    /// ```ignore,no_run
11540    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
11541    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
11542    /// let x = ListWorkflowInvocationsResponse::new()
11543    ///     .set_workflow_invocations([
11544    ///         WorkflowInvocation::default()/* use setters */,
11545    ///         WorkflowInvocation::default()/* use (different) setters */,
11546    ///     ]);
11547    /// ```
11548    pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
11549    where
11550        T: std::iter::IntoIterator<Item = V>,
11551        V: std::convert::Into<crate::model::WorkflowInvocation>,
11552    {
11553        use std::iter::Iterator;
11554        self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
11555        self
11556    }
11557
11558    /// Sets the value of [next_page_token][crate::model::ListWorkflowInvocationsResponse::next_page_token].
11559    ///
11560    /// # Example
11561    /// ```ignore,no_run
11562    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
11563    /// let x = ListWorkflowInvocationsResponse::new().set_next_page_token("example");
11564    /// ```
11565    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11566        self.next_page_token = v.into();
11567        self
11568    }
11569
11570    /// Sets the value of [unreachable][crate::model::ListWorkflowInvocationsResponse::unreachable].
11571    ///
11572    /// # Example
11573    /// ```ignore,no_run
11574    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
11575    /// let x = ListWorkflowInvocationsResponse::new().set_unreachable(["a", "b", "c"]);
11576    /// ```
11577    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
11578    where
11579        T: std::iter::IntoIterator<Item = V>,
11580        V: std::convert::Into<std::string::String>,
11581    {
11582        use std::iter::Iterator;
11583        self.unreachable = v.into_iter().map(|i| i.into()).collect();
11584        self
11585    }
11586}
11587
11588impl wkt::message::Message for ListWorkflowInvocationsResponse {
11589    fn typename() -> &'static str {
11590        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
11591    }
11592}
11593
11594#[doc(hidden)]
11595impl gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
11596    type PageItem = crate::model::WorkflowInvocation;
11597
11598    fn items(self) -> std::vec::Vec<Self::PageItem> {
11599        self.workflow_invocations
11600    }
11601
11602    fn next_page_token(&self) -> std::string::String {
11603        use std::clone::Clone;
11604        self.next_page_token.clone()
11605    }
11606}
11607
11608/// `GetWorkflowInvocation` request message.
11609#[derive(Clone, Default, PartialEq)]
11610#[non_exhaustive]
11611pub struct GetWorkflowInvocationRequest {
11612    /// Required. The workflow invocation resource's name.
11613    pub name: std::string::String,
11614
11615    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11616}
11617
11618impl GetWorkflowInvocationRequest {
11619    pub fn new() -> Self {
11620        std::default::Default::default()
11621    }
11622
11623    /// Sets the value of [name][crate::model::GetWorkflowInvocationRequest::name].
11624    ///
11625    /// # Example
11626    /// ```ignore,no_run
11627    /// # use google_cloud_dataform_v1::model::GetWorkflowInvocationRequest;
11628    /// let x = GetWorkflowInvocationRequest::new().set_name("example");
11629    /// ```
11630    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11631        self.name = v.into();
11632        self
11633    }
11634}
11635
11636impl wkt::message::Message for GetWorkflowInvocationRequest {
11637    fn typename() -> &'static str {
11638        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
11639    }
11640}
11641
11642/// `CreateWorkflowInvocation` request message.
11643#[derive(Clone, Default, PartialEq)]
11644#[non_exhaustive]
11645pub struct CreateWorkflowInvocationRequest {
11646    /// Required. The repository in which to create the workflow invocation. Must
11647    /// be in the format `projects/*/locations/*/repositories/*`.
11648    pub parent: std::string::String,
11649
11650    /// Required. The workflow invocation resource to create.
11651    pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
11652
11653    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11654}
11655
11656impl CreateWorkflowInvocationRequest {
11657    pub fn new() -> Self {
11658        std::default::Default::default()
11659    }
11660
11661    /// Sets the value of [parent][crate::model::CreateWorkflowInvocationRequest::parent].
11662    ///
11663    /// # Example
11664    /// ```ignore,no_run
11665    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
11666    /// let x = CreateWorkflowInvocationRequest::new().set_parent("example");
11667    /// ```
11668    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11669        self.parent = v.into();
11670        self
11671    }
11672
11673    /// Sets the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
11674    ///
11675    /// # Example
11676    /// ```ignore,no_run
11677    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
11678    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
11679    /// let x = CreateWorkflowInvocationRequest::new().set_workflow_invocation(WorkflowInvocation::default()/* use setters */);
11680    /// ```
11681    pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
11682    where
11683        T: std::convert::Into<crate::model::WorkflowInvocation>,
11684    {
11685        self.workflow_invocation = std::option::Option::Some(v.into());
11686        self
11687    }
11688
11689    /// Sets or clears the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
11690    ///
11691    /// # Example
11692    /// ```ignore,no_run
11693    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
11694    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
11695    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(Some(WorkflowInvocation::default()/* use setters */));
11696    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(None::<WorkflowInvocation>);
11697    /// ```
11698    pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
11699    where
11700        T: std::convert::Into<crate::model::WorkflowInvocation>,
11701    {
11702        self.workflow_invocation = v.map(|x| x.into());
11703        self
11704    }
11705}
11706
11707impl wkt::message::Message for CreateWorkflowInvocationRequest {
11708    fn typename() -> &'static str {
11709        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
11710    }
11711}
11712
11713/// `DeleteWorkflowInvocation` request message.
11714#[derive(Clone, Default, PartialEq)]
11715#[non_exhaustive]
11716pub struct DeleteWorkflowInvocationRequest {
11717    /// Required. The workflow invocation resource's name.
11718    pub name: std::string::String,
11719
11720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11721}
11722
11723impl DeleteWorkflowInvocationRequest {
11724    pub fn new() -> Self {
11725        std::default::Default::default()
11726    }
11727
11728    /// Sets the value of [name][crate::model::DeleteWorkflowInvocationRequest::name].
11729    ///
11730    /// # Example
11731    /// ```ignore,no_run
11732    /// # use google_cloud_dataform_v1::model::DeleteWorkflowInvocationRequest;
11733    /// let x = DeleteWorkflowInvocationRequest::new().set_name("example");
11734    /// ```
11735    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11736        self.name = v.into();
11737        self
11738    }
11739}
11740
11741impl wkt::message::Message for DeleteWorkflowInvocationRequest {
11742    fn typename() -> &'static str {
11743        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
11744    }
11745}
11746
11747/// `CancelWorkflowInvocation` request message.
11748#[derive(Clone, Default, PartialEq)]
11749#[non_exhaustive]
11750pub struct CancelWorkflowInvocationRequest {
11751    /// Required. The workflow invocation resource's name.
11752    pub name: std::string::String,
11753
11754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11755}
11756
11757impl CancelWorkflowInvocationRequest {
11758    pub fn new() -> Self {
11759        std::default::Default::default()
11760    }
11761
11762    /// Sets the value of [name][crate::model::CancelWorkflowInvocationRequest::name].
11763    ///
11764    /// # Example
11765    /// ```ignore,no_run
11766    /// # use google_cloud_dataform_v1::model::CancelWorkflowInvocationRequest;
11767    /// let x = CancelWorkflowInvocationRequest::new().set_name("example");
11768    /// ```
11769    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11770        self.name = v.into();
11771        self
11772    }
11773}
11774
11775impl wkt::message::Message for CancelWorkflowInvocationRequest {
11776    fn typename() -> &'static str {
11777        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
11778    }
11779}
11780
11781/// `CancelWorkflowInvocation` response message.
11782#[derive(Clone, Default, PartialEq)]
11783#[non_exhaustive]
11784pub struct CancelWorkflowInvocationResponse {
11785    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11786}
11787
11788impl CancelWorkflowInvocationResponse {
11789    pub fn new() -> Self {
11790        std::default::Default::default()
11791    }
11792}
11793
11794impl wkt::message::Message for CancelWorkflowInvocationResponse {
11795    fn typename() -> &'static str {
11796        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
11797    }
11798}
11799
11800/// Represents a single action in a workflow invocation.
11801#[derive(Clone, Default, PartialEq)]
11802#[non_exhaustive]
11803pub struct WorkflowInvocationAction {
11804    /// Output only. This action's identifier. Unique within the workflow
11805    /// invocation.
11806    pub target: std::option::Option<crate::model::Target>,
11807
11808    /// Output only. The action's identifier if the project had been compiled
11809    /// without any overrides configured. Unique within the compilation result.
11810    pub canonical_target: std::option::Option<crate::model::Target>,
11811
11812    /// Output only. This action's current state.
11813    pub state: crate::model::workflow_invocation_action::State,
11814
11815    /// Output only. If and only if action's state is FAILED a failure reason is
11816    /// set.
11817    pub failure_reason: std::string::String,
11818
11819    /// Output only. This action's timing details.
11820    /// `start_time` will be set if the action is in [RUNNING, SUCCEEDED,
11821    /// CANCELLED, FAILED] state.
11822    /// `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED]
11823    /// state.
11824    pub invocation_timing: std::option::Option<gtype::model::Interval>,
11825
11826    /// Output only. All the metadata information that is used internally to serve
11827    /// the resource. For example: timestamps, flags, status fields, etc. The
11828    /// format of this field is a JSON string.
11829    pub internal_metadata: std::option::Option<std::string::String>,
11830
11831    /// The action's details.
11832    pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
11833
11834    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11835}
11836
11837impl WorkflowInvocationAction {
11838    pub fn new() -> Self {
11839        std::default::Default::default()
11840    }
11841
11842    /// Sets the value of [target][crate::model::WorkflowInvocationAction::target].
11843    ///
11844    /// # Example
11845    /// ```ignore,no_run
11846    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11847    /// use google_cloud_dataform_v1::model::Target;
11848    /// let x = WorkflowInvocationAction::new().set_target(Target::default()/* use setters */);
11849    /// ```
11850    pub fn set_target<T>(mut self, v: T) -> Self
11851    where
11852        T: std::convert::Into<crate::model::Target>,
11853    {
11854        self.target = std::option::Option::Some(v.into());
11855        self
11856    }
11857
11858    /// Sets or clears the value of [target][crate::model::WorkflowInvocationAction::target].
11859    ///
11860    /// # Example
11861    /// ```ignore,no_run
11862    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11863    /// use google_cloud_dataform_v1::model::Target;
11864    /// let x = WorkflowInvocationAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
11865    /// let x = WorkflowInvocationAction::new().set_or_clear_target(None::<Target>);
11866    /// ```
11867    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
11868    where
11869        T: std::convert::Into<crate::model::Target>,
11870    {
11871        self.target = v.map(|x| x.into());
11872        self
11873    }
11874
11875    /// Sets the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
11876    ///
11877    /// # Example
11878    /// ```ignore,no_run
11879    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11880    /// use google_cloud_dataform_v1::model::Target;
11881    /// let x = WorkflowInvocationAction::new().set_canonical_target(Target::default()/* use setters */);
11882    /// ```
11883    pub fn set_canonical_target<T>(mut self, v: T) -> Self
11884    where
11885        T: std::convert::Into<crate::model::Target>,
11886    {
11887        self.canonical_target = std::option::Option::Some(v.into());
11888        self
11889    }
11890
11891    /// Sets or clears the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
11892    ///
11893    /// # Example
11894    /// ```ignore,no_run
11895    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11896    /// use google_cloud_dataform_v1::model::Target;
11897    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
11898    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(None::<Target>);
11899    /// ```
11900    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
11901    where
11902        T: std::convert::Into<crate::model::Target>,
11903    {
11904        self.canonical_target = v.map(|x| x.into());
11905        self
11906    }
11907
11908    /// Sets the value of [state][crate::model::WorkflowInvocationAction::state].
11909    ///
11910    /// # Example
11911    /// ```ignore,no_run
11912    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11913    /// use google_cloud_dataform_v1::model::workflow_invocation_action::State;
11914    /// let x0 = WorkflowInvocationAction::new().set_state(State::Running);
11915    /// let x1 = WorkflowInvocationAction::new().set_state(State::Skipped);
11916    /// let x2 = WorkflowInvocationAction::new().set_state(State::Disabled);
11917    /// ```
11918    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
11919        mut self,
11920        v: T,
11921    ) -> Self {
11922        self.state = v.into();
11923        self
11924    }
11925
11926    /// Sets the value of [failure_reason][crate::model::WorkflowInvocationAction::failure_reason].
11927    ///
11928    /// # Example
11929    /// ```ignore,no_run
11930    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11931    /// let x = WorkflowInvocationAction::new().set_failure_reason("example");
11932    /// ```
11933    pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11934        self.failure_reason = v.into();
11935        self
11936    }
11937
11938    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
11939    ///
11940    /// # Example
11941    /// ```ignore,no_run
11942    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11943    /// use gtype::model::Interval;
11944    /// let x = WorkflowInvocationAction::new().set_invocation_timing(Interval::default()/* use setters */);
11945    /// ```
11946    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
11947    where
11948        T: std::convert::Into<gtype::model::Interval>,
11949    {
11950        self.invocation_timing = std::option::Option::Some(v.into());
11951        self
11952    }
11953
11954    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
11955    ///
11956    /// # Example
11957    /// ```ignore,no_run
11958    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11959    /// use gtype::model::Interval;
11960    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
11961    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(None::<Interval>);
11962    /// ```
11963    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
11964    where
11965        T: std::convert::Into<gtype::model::Interval>,
11966    {
11967        self.invocation_timing = v.map(|x| x.into());
11968        self
11969    }
11970
11971    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
11972    ///
11973    /// # Example
11974    /// ```ignore,no_run
11975    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11976    /// let x = WorkflowInvocationAction::new().set_internal_metadata("example");
11977    /// ```
11978    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
11979    where
11980        T: std::convert::Into<std::string::String>,
11981    {
11982        self.internal_metadata = std::option::Option::Some(v.into());
11983        self
11984    }
11985
11986    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
11987    ///
11988    /// # Example
11989    /// ```ignore,no_run
11990    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11991    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(Some("example"));
11992    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(None::<String>);
11993    /// ```
11994    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11995    where
11996        T: std::convert::Into<std::string::String>,
11997    {
11998        self.internal_metadata = v.map(|x| x.into());
11999        self
12000    }
12001
12002    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action].
12003    ///
12004    /// Note that all the setters affecting `action` are mutually
12005    /// exclusive.
12006    ///
12007    /// # Example
12008    /// ```ignore,no_run
12009    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12010    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12011    /// let x = WorkflowInvocationAction::new().set_action(Some(
12012    ///     google_cloud_dataform_v1::model::workflow_invocation_action::Action::BigqueryAction(BigQueryAction::default().into())));
12013    /// ```
12014    pub fn set_action<
12015        T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
12016    >(
12017        mut self,
12018        v: T,
12019    ) -> Self {
12020        self.action = v.into();
12021        self
12022    }
12023
12024    /// The value of [action][crate::model::WorkflowInvocationAction::action]
12025    /// if it holds a `BigqueryAction`, `None` if the field is not set or
12026    /// holds a different branch.
12027    pub fn bigquery_action(
12028        &self,
12029    ) -> std::option::Option<
12030        &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
12031    > {
12032        #[allow(unreachable_patterns)]
12033        self.action.as_ref().and_then(|v| match v {
12034            crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
12035                std::option::Option::Some(v)
12036            }
12037            _ => std::option::Option::None,
12038        })
12039    }
12040
12041    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
12042    /// to hold a `BigqueryAction`.
12043    ///
12044    /// Note that all the setters affecting `action` are
12045    /// mutually exclusive.
12046    ///
12047    /// # Example
12048    /// ```ignore,no_run
12049    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12050    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12051    /// let x = WorkflowInvocationAction::new().set_bigquery_action(BigQueryAction::default()/* use setters */);
12052    /// assert!(x.bigquery_action().is_some());
12053    /// assert!(x.notebook_action().is_none());
12054    /// assert!(x.data_preparation_action().is_none());
12055    /// ```
12056    pub fn set_bigquery_action<
12057        T: std::convert::Into<
12058                std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
12059            >,
12060    >(
12061        mut self,
12062        v: T,
12063    ) -> Self {
12064        self.action = std::option::Option::Some(
12065            crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
12066        );
12067        self
12068    }
12069
12070    /// The value of [action][crate::model::WorkflowInvocationAction::action]
12071    /// if it holds a `NotebookAction`, `None` if the field is not set or
12072    /// holds a different branch.
12073    pub fn notebook_action(
12074        &self,
12075    ) -> std::option::Option<
12076        &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
12077    > {
12078        #[allow(unreachable_patterns)]
12079        self.action.as_ref().and_then(|v| match v {
12080            crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
12081                std::option::Option::Some(v)
12082            }
12083            _ => std::option::Option::None,
12084        })
12085    }
12086
12087    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
12088    /// to hold a `NotebookAction`.
12089    ///
12090    /// Note that all the setters affecting `action` are
12091    /// mutually exclusive.
12092    ///
12093    /// # Example
12094    /// ```ignore,no_run
12095    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12096    /// use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
12097    /// let x = WorkflowInvocationAction::new().set_notebook_action(NotebookAction::default()/* use setters */);
12098    /// assert!(x.notebook_action().is_some());
12099    /// assert!(x.bigquery_action().is_none());
12100    /// assert!(x.data_preparation_action().is_none());
12101    /// ```
12102    pub fn set_notebook_action<
12103        T: std::convert::Into<
12104                std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
12105            >,
12106    >(
12107        mut self,
12108        v: T,
12109    ) -> Self {
12110        self.action = std::option::Option::Some(
12111            crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
12112        );
12113        self
12114    }
12115
12116    /// The value of [action][crate::model::WorkflowInvocationAction::action]
12117    /// if it holds a `DataPreparationAction`, `None` if the field is not set or
12118    /// holds a different branch.
12119    pub fn data_preparation_action(
12120        &self,
12121    ) -> std::option::Option<
12122        &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
12123    > {
12124        #[allow(unreachable_patterns)]
12125        self.action.as_ref().and_then(|v| match v {
12126            crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
12127                std::option::Option::Some(v)
12128            }
12129            _ => std::option::Option::None,
12130        })
12131    }
12132
12133    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
12134    /// to hold a `DataPreparationAction`.
12135    ///
12136    /// Note that all the setters affecting `action` are
12137    /// mutually exclusive.
12138    ///
12139    /// # Example
12140    /// ```ignore,no_run
12141    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12142    /// use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12143    /// let x = WorkflowInvocationAction::new().set_data_preparation_action(DataPreparationAction::default()/* use setters */);
12144    /// assert!(x.data_preparation_action().is_some());
12145    /// assert!(x.bigquery_action().is_none());
12146    /// assert!(x.notebook_action().is_none());
12147    /// ```
12148    pub fn set_data_preparation_action<
12149        T: std::convert::Into<
12150                std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
12151            >,
12152    >(
12153        mut self,
12154        v: T,
12155    ) -> Self {
12156        self.action = std::option::Option::Some(
12157            crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
12158        );
12159        self
12160    }
12161}
12162
12163impl wkt::message::Message for WorkflowInvocationAction {
12164    fn typename() -> &'static str {
12165        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
12166    }
12167}
12168
12169/// Defines additional types related to [WorkflowInvocationAction].
12170pub mod workflow_invocation_action {
12171    #[allow(unused_imports)]
12172    use super::*;
12173
12174    /// Represents a workflow action that will run against BigQuery.
12175    #[derive(Clone, Default, PartialEq)]
12176    #[non_exhaustive]
12177    pub struct BigQueryAction {
12178        /// Output only. The generated BigQuery SQL script that will be executed.
12179        pub sql_script: std::string::String,
12180
12181        /// Output only. The ID of the BigQuery job that executed the SQL in
12182        /// sql_script. Only set once the job has started to run.
12183        pub job_id: std::string::String,
12184
12185        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12186    }
12187
12188    impl BigQueryAction {
12189        pub fn new() -> Self {
12190            std::default::Default::default()
12191        }
12192
12193        /// Sets the value of [sql_script][crate::model::workflow_invocation_action::BigQueryAction::sql_script].
12194        ///
12195        /// # Example
12196        /// ```ignore,no_run
12197        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12198        /// let x = BigQueryAction::new().set_sql_script("example");
12199        /// ```
12200        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12201            self.sql_script = v.into();
12202            self
12203        }
12204
12205        /// Sets the value of [job_id][crate::model::workflow_invocation_action::BigQueryAction::job_id].
12206        ///
12207        /// # Example
12208        /// ```ignore,no_run
12209        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12210        /// let x = BigQueryAction::new().set_job_id("example");
12211        /// ```
12212        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12213            self.job_id = v.into();
12214            self
12215        }
12216    }
12217
12218    impl wkt::message::Message for BigQueryAction {
12219        fn typename() -> &'static str {
12220            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
12221        }
12222    }
12223
12224    /// Represents a workflow action that will run against a Notebook runtime.
12225    #[derive(Clone, Default, PartialEq)]
12226    #[non_exhaustive]
12227    pub struct NotebookAction {
12228        /// Output only. The code contents of a Notebook to be run.
12229        pub contents: std::string::String,
12230
12231        /// Output only. The ID of the Vertex job that executed the notebook in
12232        /// contents and also the ID used for the outputs created in Google Cloud
12233        /// Storage buckets. Only set once the job has started to run.
12234        pub job_id: std::string::String,
12235
12236        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12237    }
12238
12239    impl NotebookAction {
12240        pub fn new() -> Self {
12241            std::default::Default::default()
12242        }
12243
12244        /// Sets the value of [contents][crate::model::workflow_invocation_action::NotebookAction::contents].
12245        ///
12246        /// # Example
12247        /// ```ignore,no_run
12248        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
12249        /// let x = NotebookAction::new().set_contents("example");
12250        /// ```
12251        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12252            self.contents = v.into();
12253            self
12254        }
12255
12256        /// Sets the value of [job_id][crate::model::workflow_invocation_action::NotebookAction::job_id].
12257        ///
12258        /// # Example
12259        /// ```ignore,no_run
12260        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
12261        /// let x = NotebookAction::new().set_job_id("example");
12262        /// ```
12263        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12264            self.job_id = v.into();
12265            self
12266        }
12267    }
12268
12269    impl wkt::message::Message for NotebookAction {
12270        fn typename() -> &'static str {
12271            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
12272        }
12273    }
12274
12275    /// Represents a workflow action that will run a Data Preparation.
12276    #[derive(Clone, Default, PartialEq)]
12277    #[non_exhaustive]
12278    pub struct DataPreparationAction {
12279        /// Output only. The generated BigQuery SQL script that will be executed. For
12280        /// reference only.
12281        pub generated_sql: std::string::String,
12282
12283        /// Output only. The ID of the BigQuery job that executed the SQL in
12284        /// sql_script. Only set once the job has started to run.
12285        pub job_id: std::string::String,
12286
12287        /// The definition for the data preparation.
12288        pub definition: std::option::Option<
12289            crate::model::workflow_invocation_action::data_preparation_action::Definition,
12290        >,
12291
12292        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12293    }
12294
12295    impl DataPreparationAction {
12296        pub fn new() -> Self {
12297            std::default::Default::default()
12298        }
12299
12300        /// Sets the value of [generated_sql][crate::model::workflow_invocation_action::DataPreparationAction::generated_sql].
12301        ///
12302        /// # Example
12303        /// ```ignore,no_run
12304        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12305        /// let x = DataPreparationAction::new().set_generated_sql("example");
12306        /// ```
12307        pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
12308            mut self,
12309            v: T,
12310        ) -> Self {
12311            self.generated_sql = v.into();
12312            self
12313        }
12314
12315        /// Sets the value of [job_id][crate::model::workflow_invocation_action::DataPreparationAction::job_id].
12316        ///
12317        /// # Example
12318        /// ```ignore,no_run
12319        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12320        /// let x = DataPreparationAction::new().set_job_id("example");
12321        /// ```
12322        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12323            self.job_id = v.into();
12324            self
12325        }
12326
12327        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition].
12328        ///
12329        /// Note that all the setters affecting `definition` are mutually
12330        /// exclusive.
12331        ///
12332        /// # Example
12333        /// ```ignore,no_run
12334        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12335        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::Definition;
12336        /// let x = DataPreparationAction::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
12337        /// ```
12338        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
12339        {
12340            self.definition = v.into();
12341            self
12342        }
12343
12344        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12345        /// if it holds a `ContentsYaml`, `None` if the field is not set or
12346        /// holds a different branch.
12347        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
12348            #[allow(unreachable_patterns)]
12349            self.definition.as_ref().and_then(|v| match v {
12350                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
12351                _ => std::option::Option::None,
12352            })
12353        }
12354
12355        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12356        /// to hold a `ContentsYaml`.
12357        ///
12358        /// Note that all the setters affecting `definition` are
12359        /// mutually exclusive.
12360        ///
12361        /// # Example
12362        /// ```ignore,no_run
12363        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12364        /// let x = DataPreparationAction::new().set_contents_yaml("example");
12365        /// assert!(x.contents_yaml().is_some());
12366        /// assert!(x.contents_sql().is_none());
12367        /// ```
12368        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
12369            mut self,
12370            v: T,
12371        ) -> Self {
12372            self.definition = std::option::Option::Some(
12373                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
12374                    v.into()
12375                )
12376            );
12377            self
12378        }
12379
12380        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12381        /// if it holds a `ContentsSql`, `None` if the field is not set or
12382        /// holds a different branch.
12383        pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
12384            #[allow(unreachable_patterns)]
12385            self.definition.as_ref().and_then(|v| match v {
12386                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
12387                _ => std::option::Option::None,
12388            })
12389        }
12390
12391        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12392        /// to hold a `ContentsSql`.
12393        ///
12394        /// Note that all the setters affecting `definition` are
12395        /// mutually exclusive.
12396        ///
12397        /// # Example
12398        /// ```ignore,no_run
12399        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12400        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12401        /// let x = DataPreparationAction::new().set_contents_sql(ActionSqlDefinition::default()/* use setters */);
12402        /// assert!(x.contents_sql().is_some());
12403        /// assert!(x.contents_yaml().is_none());
12404        /// ```
12405        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{
12406            self.definition = std::option::Option::Some(
12407                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
12408                    v.into()
12409                )
12410            );
12411            self
12412        }
12413    }
12414
12415    impl wkt::message::Message for DataPreparationAction {
12416        fn typename() -> &'static str {
12417            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
12418        }
12419    }
12420
12421    /// Defines additional types related to [DataPreparationAction].
12422    pub mod data_preparation_action {
12423        #[allow(unused_imports)]
12424        use super::*;
12425
12426        /// Definition of a SQL Data Preparation
12427        #[derive(Clone, Default, PartialEq)]
12428        #[non_exhaustive]
12429        pub struct ActionSqlDefinition {
12430            /// The SQL query representing the data preparation steps. Formatted as a
12431            /// Pipe SQL query statement.
12432            pub query: std::string::String,
12433
12434            /// Error table configuration,
12435            pub error_table: std::option::Option<
12436                crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
12437            >,
12438
12439            /// Load configuration.
12440            pub load_config: std::option::Option<
12441                crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
12442            >,
12443
12444            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12445        }
12446
12447        impl ActionSqlDefinition {
12448            pub fn new() -> Self {
12449                std::default::Default::default()
12450            }
12451
12452            /// Sets the value of [query][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::query].
12453            ///
12454            /// # Example
12455            /// ```ignore,no_run
12456            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12457            /// let x = ActionSqlDefinition::new().set_query("example");
12458            /// ```
12459            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12460                self.query = v.into();
12461                self
12462            }
12463
12464            /// Sets the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
12465            ///
12466            /// # Example
12467            /// ```ignore,no_run
12468            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12469            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12470            /// let x = ActionSqlDefinition::new().set_error_table(ActionErrorTable::default()/* use setters */);
12471            /// ```
12472            pub fn set_error_table<T>(mut self, v: T) -> Self
12473            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
12474            {
12475                self.error_table = std::option::Option::Some(v.into());
12476                self
12477            }
12478
12479            /// Sets or clears the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
12480            ///
12481            /// # Example
12482            /// ```ignore,no_run
12483            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12484            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12485            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(Some(ActionErrorTable::default()/* use setters */));
12486            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(None::<ActionErrorTable>);
12487            /// ```
12488            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
12489            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
12490            {
12491                self.error_table = v.map(|x| x.into());
12492                self
12493            }
12494
12495            /// Sets the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
12496            ///
12497            /// # Example
12498            /// ```ignore,no_run
12499            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12500            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12501            /// let x = ActionSqlDefinition::new().set_load_config(ActionLoadConfig::default()/* use setters */);
12502            /// ```
12503            pub fn set_load_config<T>(mut self, v: T) -> Self
12504            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
12505            {
12506                self.load_config = std::option::Option::Some(v.into());
12507                self
12508            }
12509
12510            /// Sets or clears the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
12511            ///
12512            /// # Example
12513            /// ```ignore,no_run
12514            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12515            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12516            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(Some(ActionLoadConfig::default()/* use setters */));
12517            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(None::<ActionLoadConfig>);
12518            /// ```
12519            pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
12520            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
12521            {
12522                self.load_config = v.map(|x| x.into());
12523                self
12524            }
12525        }
12526
12527        impl wkt::message::Message for ActionSqlDefinition {
12528            fn typename() -> &'static str {
12529                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
12530            }
12531        }
12532
12533        /// Error table information, used to write error data into a BigQuery
12534        /// table.
12535        #[derive(Clone, Default, PartialEq)]
12536        #[non_exhaustive]
12537        pub struct ActionErrorTable {
12538            /// Error Table target.
12539            pub target: std::option::Option<crate::model::Target>,
12540
12541            /// Error table partition expiration in days. Only positive values are
12542            /// allowed.
12543            pub retention_days: i32,
12544
12545            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12546        }
12547
12548        impl ActionErrorTable {
12549            pub fn new() -> Self {
12550                std::default::Default::default()
12551            }
12552
12553            /// Sets the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
12554            ///
12555            /// # Example
12556            /// ```ignore,no_run
12557            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12558            /// use google_cloud_dataform_v1::model::Target;
12559            /// let x = ActionErrorTable::new().set_target(Target::default()/* use setters */);
12560            /// ```
12561            pub fn set_target<T>(mut self, v: T) -> Self
12562            where
12563                T: std::convert::Into<crate::model::Target>,
12564            {
12565                self.target = std::option::Option::Some(v.into());
12566                self
12567            }
12568
12569            /// Sets or clears the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
12570            ///
12571            /// # Example
12572            /// ```ignore,no_run
12573            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12574            /// use google_cloud_dataform_v1::model::Target;
12575            /// let x = ActionErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
12576            /// let x = ActionErrorTable::new().set_or_clear_target(None::<Target>);
12577            /// ```
12578            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
12579            where
12580                T: std::convert::Into<crate::model::Target>,
12581            {
12582                self.target = v.map(|x| x.into());
12583                self
12584            }
12585
12586            /// Sets the value of [retention_days][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::retention_days].
12587            ///
12588            /// # Example
12589            /// ```ignore,no_run
12590            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12591            /// let x = ActionErrorTable::new().set_retention_days(42);
12592            /// ```
12593            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12594                self.retention_days = v.into();
12595                self
12596            }
12597        }
12598
12599        impl wkt::message::Message for ActionErrorTable {
12600            fn typename() -> &'static str {
12601                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
12602            }
12603        }
12604
12605        /// Simplified load configuration for actions
12606        #[derive(Clone, Default, PartialEq)]
12607        #[non_exhaustive]
12608        pub struct ActionLoadConfig {
12609
12610            /// Load mode
12611            pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
12612
12613            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12614        }
12615
12616        impl ActionLoadConfig {
12617            pub fn new() -> Self {
12618                std::default::Default::default()
12619            }
12620
12621            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode].
12622            ///
12623            /// Note that all the setters affecting `mode` are mutually
12624            /// exclusive.
12625            ///
12626            /// # Example
12627            /// ```ignore,no_run
12628            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12629            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
12630            /// let x = ActionLoadConfig::new().set_mode(Some(
12631            ///     google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(ActionSimpleLoadMode::default().into())));
12632            /// ```
12633            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
12634            {
12635                self.mode = v.into();
12636                self
12637            }
12638
12639            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12640            /// if it holds a `Replace`, `None` if the field is not set or
12641            /// holds a different branch.
12642            pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
12643                #[allow(unreachable_patterns)]
12644                self.mode.as_ref().and_then(|v| match v {
12645                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
12646                    _ => std::option::Option::None,
12647                })
12648            }
12649
12650            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12651            /// to hold a `Replace`.
12652            ///
12653            /// Note that all the setters affecting `mode` are
12654            /// mutually exclusive.
12655            ///
12656            /// # Example
12657            /// ```ignore,no_run
12658            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12659            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
12660            /// let x = ActionLoadConfig::new().set_replace(ActionSimpleLoadMode::default()/* use setters */);
12661            /// assert!(x.replace().is_some());
12662            /// assert!(x.append().is_none());
12663            /// assert!(x.maximum().is_none());
12664            /// assert!(x.unique().is_none());
12665            /// ```
12666            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{
12667                self.mode = std::option::Option::Some(
12668                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
12669                        v.into()
12670                    )
12671                );
12672                self
12673            }
12674
12675            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12676            /// if it holds a `Append`, `None` if the field is not set or
12677            /// holds a different branch.
12678            pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
12679                #[allow(unreachable_patterns)]
12680                self.mode.as_ref().and_then(|v| match v {
12681                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
12682                    _ => std::option::Option::None,
12683                })
12684            }
12685
12686            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12687            /// to hold a `Append`.
12688            ///
12689            /// Note that all the setters affecting `mode` are
12690            /// mutually exclusive.
12691            ///
12692            /// # Example
12693            /// ```ignore,no_run
12694            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12695            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
12696            /// let x = ActionLoadConfig::new().set_append(ActionSimpleLoadMode::default()/* use setters */);
12697            /// assert!(x.append().is_some());
12698            /// assert!(x.replace().is_none());
12699            /// assert!(x.maximum().is_none());
12700            /// assert!(x.unique().is_none());
12701            /// ```
12702            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{
12703                self.mode = std::option::Option::Some(
12704                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
12705                        v.into()
12706                    )
12707                );
12708                self
12709            }
12710
12711            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12712            /// if it holds a `Maximum`, `None` if the field is not set or
12713            /// holds a different branch.
12714            pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
12715                #[allow(unreachable_patterns)]
12716                self.mode.as_ref().and_then(|v| match v {
12717                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
12718                    _ => std::option::Option::None,
12719                })
12720            }
12721
12722            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12723            /// to hold a `Maximum`.
12724            ///
12725            /// Note that all the setters affecting `mode` are
12726            /// mutually exclusive.
12727            ///
12728            /// # Example
12729            /// ```ignore,no_run
12730            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12731            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
12732            /// let x = ActionLoadConfig::new().set_maximum(ActionIncrementalLoadMode::default()/* use setters */);
12733            /// assert!(x.maximum().is_some());
12734            /// assert!(x.replace().is_none());
12735            /// assert!(x.append().is_none());
12736            /// assert!(x.unique().is_none());
12737            /// ```
12738            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{
12739                self.mode = std::option::Option::Some(
12740                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
12741                        v.into()
12742                    )
12743                );
12744                self
12745            }
12746
12747            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12748            /// if it holds a `Unique`, `None` if the field is not set or
12749            /// holds a different branch.
12750            pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
12751                #[allow(unreachable_patterns)]
12752                self.mode.as_ref().and_then(|v| match v {
12753                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
12754                    _ => std::option::Option::None,
12755                })
12756            }
12757
12758            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12759            /// to hold a `Unique`.
12760            ///
12761            /// Note that all the setters affecting `mode` are
12762            /// mutually exclusive.
12763            ///
12764            /// # Example
12765            /// ```ignore,no_run
12766            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12767            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
12768            /// let x = ActionLoadConfig::new().set_unique(ActionIncrementalLoadMode::default()/* use setters */);
12769            /// assert!(x.unique().is_some());
12770            /// assert!(x.replace().is_none());
12771            /// assert!(x.append().is_none());
12772            /// assert!(x.maximum().is_none());
12773            /// ```
12774            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{
12775                self.mode = std::option::Option::Some(
12776                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
12777                        v.into()
12778                    )
12779                );
12780                self
12781            }
12782        }
12783
12784        impl wkt::message::Message for ActionLoadConfig {
12785            fn typename() -> &'static str {
12786                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
12787            }
12788        }
12789
12790        /// Defines additional types related to [ActionLoadConfig].
12791        pub mod action_load_config {
12792            #[allow(unused_imports)]
12793            use super::*;
12794
12795            /// Load mode
12796            #[derive(Clone, Debug, PartialEq)]
12797            #[non_exhaustive]
12798            pub enum Mode {
12799                /// Replace destination table
12800                Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
12801                /// Append into destination table
12802                Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
12803                /// Insert records where the value exceeds the previous maximum value for
12804                /// a column in the destination table
12805                Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
12806                /// Insert records where the value of a column is not already present in
12807                /// the destination table
12808                Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
12809            }
12810        }
12811
12812        /// Simple load definition
12813        #[derive(Clone, Default, PartialEq)]
12814        #[non_exhaustive]
12815        pub struct ActionSimpleLoadMode {
12816            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12817        }
12818
12819        impl ActionSimpleLoadMode {
12820            pub fn new() -> Self {
12821                std::default::Default::default()
12822            }
12823        }
12824
12825        impl wkt::message::Message for ActionSimpleLoadMode {
12826            fn typename() -> &'static str {
12827                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
12828            }
12829        }
12830
12831        /// Load definition for incremental load modes
12832        #[derive(Clone, Default, PartialEq)]
12833        #[non_exhaustive]
12834        pub struct ActionIncrementalLoadMode {
12835            /// Column name for incremental load modes
12836            pub column: std::string::String,
12837
12838            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12839        }
12840
12841        impl ActionIncrementalLoadMode {
12842            pub fn new() -> Self {
12843                std::default::Default::default()
12844            }
12845
12846            /// Sets the value of [column][crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode::column].
12847            ///
12848            /// # Example
12849            /// ```ignore,no_run
12850            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
12851            /// let x = ActionIncrementalLoadMode::new().set_column("example");
12852            /// ```
12853            pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12854                self.column = v.into();
12855                self
12856            }
12857        }
12858
12859        impl wkt::message::Message for ActionIncrementalLoadMode {
12860            fn typename() -> &'static str {
12861                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
12862            }
12863        }
12864
12865        /// The definition for the data preparation.
12866        #[derive(Clone, Debug, PartialEq)]
12867        #[non_exhaustive]
12868        pub enum Definition {
12869            /// Output only. YAML representing the contents of the data preparation.
12870            /// Can be used to show the customer what the input was to their workflow.
12871            ContentsYaml(std::string::String),
12872            /// SQL definition for a Data Preparation. Contains a SQL query and
12873            /// additional context information.
12874            ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
12875        }
12876    }
12877
12878    /// Represents the current state of a workflow invocation action.
12879    ///
12880    /// # Working with unknown values
12881    ///
12882    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12883    /// additional enum variants at any time. Adding new variants is not considered
12884    /// a breaking change. Applications should write their code in anticipation of:
12885    ///
12886    /// - New values appearing in future releases of the client library, **and**
12887    /// - New values received dynamically, without application changes.
12888    ///
12889    /// Please consult the [Working with enums] section in the user guide for some
12890    /// guidelines.
12891    ///
12892    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12893    #[derive(Clone, Debug, PartialEq)]
12894    #[non_exhaustive]
12895    pub enum State {
12896        /// The action has not yet been considered for invocation.
12897        Pending,
12898        /// The action is currently running.
12899        Running,
12900        /// Execution of the action was skipped because upstream dependencies did not
12901        /// all complete successfully. A terminal state.
12902        Skipped,
12903        /// Execution of the action was disabled as per the configuration of the
12904        /// corresponding compilation result action. A terminal state.
12905        Disabled,
12906        /// The action succeeded. A terminal state.
12907        Succeeded,
12908        /// The action was cancelled. A terminal state.
12909        Cancelled,
12910        /// The action failed. A terminal state.
12911        Failed,
12912        /// If set, the enum was initialized with an unknown value.
12913        ///
12914        /// Applications can examine the value using [State::value] or
12915        /// [State::name].
12916        UnknownValue(state::UnknownValue),
12917    }
12918
12919    #[doc(hidden)]
12920    pub mod state {
12921        #[allow(unused_imports)]
12922        use super::*;
12923        #[derive(Clone, Debug, PartialEq)]
12924        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12925    }
12926
12927    impl State {
12928        /// Gets the enum value.
12929        ///
12930        /// Returns `None` if the enum contains an unknown value deserialized from
12931        /// the string representation of enums.
12932        pub fn value(&self) -> std::option::Option<i32> {
12933            match self {
12934                Self::Pending => std::option::Option::Some(0),
12935                Self::Running => std::option::Option::Some(1),
12936                Self::Skipped => std::option::Option::Some(2),
12937                Self::Disabled => std::option::Option::Some(3),
12938                Self::Succeeded => std::option::Option::Some(4),
12939                Self::Cancelled => std::option::Option::Some(5),
12940                Self::Failed => std::option::Option::Some(6),
12941                Self::UnknownValue(u) => u.0.value(),
12942            }
12943        }
12944
12945        /// Gets the enum value as a string.
12946        ///
12947        /// Returns `None` if the enum contains an unknown value deserialized from
12948        /// the integer representation of enums.
12949        pub fn name(&self) -> std::option::Option<&str> {
12950            match self {
12951                Self::Pending => std::option::Option::Some("PENDING"),
12952                Self::Running => std::option::Option::Some("RUNNING"),
12953                Self::Skipped => std::option::Option::Some("SKIPPED"),
12954                Self::Disabled => std::option::Option::Some("DISABLED"),
12955                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12956                Self::Cancelled => std::option::Option::Some("CANCELLED"),
12957                Self::Failed => std::option::Option::Some("FAILED"),
12958                Self::UnknownValue(u) => u.0.name(),
12959            }
12960        }
12961    }
12962
12963    impl std::default::Default for State {
12964        fn default() -> Self {
12965            use std::convert::From;
12966            Self::from(0)
12967        }
12968    }
12969
12970    impl std::fmt::Display for State {
12971        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12972            wkt::internal::display_enum(f, self.name(), self.value())
12973        }
12974    }
12975
12976    impl std::convert::From<i32> for State {
12977        fn from(value: i32) -> Self {
12978            match value {
12979                0 => Self::Pending,
12980                1 => Self::Running,
12981                2 => Self::Skipped,
12982                3 => Self::Disabled,
12983                4 => Self::Succeeded,
12984                5 => Self::Cancelled,
12985                6 => Self::Failed,
12986                _ => Self::UnknownValue(state::UnknownValue(
12987                    wkt::internal::UnknownEnumValue::Integer(value),
12988                )),
12989            }
12990        }
12991    }
12992
12993    impl std::convert::From<&str> for State {
12994        fn from(value: &str) -> Self {
12995            use std::string::ToString;
12996            match value {
12997                "PENDING" => Self::Pending,
12998                "RUNNING" => Self::Running,
12999                "SKIPPED" => Self::Skipped,
13000                "DISABLED" => Self::Disabled,
13001                "SUCCEEDED" => Self::Succeeded,
13002                "CANCELLED" => Self::Cancelled,
13003                "FAILED" => Self::Failed,
13004                _ => Self::UnknownValue(state::UnknownValue(
13005                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13006                )),
13007            }
13008        }
13009    }
13010
13011    impl serde::ser::Serialize for State {
13012        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13013        where
13014            S: serde::Serializer,
13015        {
13016            match self {
13017                Self::Pending => serializer.serialize_i32(0),
13018                Self::Running => serializer.serialize_i32(1),
13019                Self::Skipped => serializer.serialize_i32(2),
13020                Self::Disabled => serializer.serialize_i32(3),
13021                Self::Succeeded => serializer.serialize_i32(4),
13022                Self::Cancelled => serializer.serialize_i32(5),
13023                Self::Failed => serializer.serialize_i32(6),
13024                Self::UnknownValue(u) => u.0.serialize(serializer),
13025            }
13026        }
13027    }
13028
13029    impl<'de> serde::de::Deserialize<'de> for State {
13030        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13031        where
13032            D: serde::Deserializer<'de>,
13033        {
13034            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13035                ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
13036            ))
13037        }
13038    }
13039
13040    /// The action's details.
13041    #[derive(Clone, Debug, PartialEq)]
13042    #[non_exhaustive]
13043    pub enum Action {
13044        /// Output only. The workflow action's bigquery action details.
13045        BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
13046        /// Output only. The workflow action's notebook action details.
13047        NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
13048        /// Output only. The workflow action's data preparation action details.
13049        DataPreparationAction(
13050            std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13051        ),
13052    }
13053}
13054
13055/// `QueryWorkflowInvocationActions` request message.
13056#[derive(Clone, Default, PartialEq)]
13057#[non_exhaustive]
13058pub struct QueryWorkflowInvocationActionsRequest {
13059    /// Required. The workflow invocation's name.
13060    pub name: std::string::String,
13061
13062    /// Optional. Maximum number of workflow invocations to return. The server may
13063    /// return fewer items than requested. If unspecified, the server will pick an
13064    /// appropriate default.
13065    pub page_size: i32,
13066
13067    /// Optional. Page token received from a previous
13068    /// `QueryWorkflowInvocationActions` call. Provide this to retrieve the
13069    /// subsequent page.
13070    ///
13071    /// When paginating, all other parameters provided to
13072    /// `QueryWorkflowInvocationActions`, with the exception of `page_size`, must
13073    /// match the call that provided the page token.
13074    pub page_token: std::string::String,
13075
13076    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13077}
13078
13079impl QueryWorkflowInvocationActionsRequest {
13080    pub fn new() -> Self {
13081        std::default::Default::default()
13082    }
13083
13084    /// Sets the value of [name][crate::model::QueryWorkflowInvocationActionsRequest::name].
13085    ///
13086    /// # Example
13087    /// ```ignore,no_run
13088    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
13089    /// let x = QueryWorkflowInvocationActionsRequest::new().set_name("example");
13090    /// ```
13091    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13092        self.name = v.into();
13093        self
13094    }
13095
13096    /// Sets the value of [page_size][crate::model::QueryWorkflowInvocationActionsRequest::page_size].
13097    ///
13098    /// # Example
13099    /// ```ignore,no_run
13100    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
13101    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_size(42);
13102    /// ```
13103    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13104        self.page_size = v.into();
13105        self
13106    }
13107
13108    /// Sets the value of [page_token][crate::model::QueryWorkflowInvocationActionsRequest::page_token].
13109    ///
13110    /// # Example
13111    /// ```ignore,no_run
13112    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
13113    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_token("example");
13114    /// ```
13115    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13116        self.page_token = v.into();
13117        self
13118    }
13119}
13120
13121impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
13122    fn typename() -> &'static str {
13123        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
13124    }
13125}
13126
13127/// `QueryWorkflowInvocationActions` response message.
13128#[derive(Clone, Default, PartialEq)]
13129#[non_exhaustive]
13130pub struct QueryWorkflowInvocationActionsResponse {
13131    /// List of workflow invocation actions.
13132    pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
13133
13134    /// A token, which can be sent as `page_token` to retrieve the next page.
13135    /// If this field is omitted, there are no subsequent pages.
13136    pub next_page_token: std::string::String,
13137
13138    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13139}
13140
13141impl QueryWorkflowInvocationActionsResponse {
13142    pub fn new() -> Self {
13143        std::default::Default::default()
13144    }
13145
13146    /// Sets the value of [workflow_invocation_actions][crate::model::QueryWorkflowInvocationActionsResponse::workflow_invocation_actions].
13147    ///
13148    /// # Example
13149    /// ```ignore,no_run
13150    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
13151    /// use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13152    /// let x = QueryWorkflowInvocationActionsResponse::new()
13153    ///     .set_workflow_invocation_actions([
13154    ///         WorkflowInvocationAction::default()/* use setters */,
13155    ///         WorkflowInvocationAction::default()/* use (different) setters */,
13156    ///     ]);
13157    /// ```
13158    pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
13159    where
13160        T: std::iter::IntoIterator<Item = V>,
13161        V: std::convert::Into<crate::model::WorkflowInvocationAction>,
13162    {
13163        use std::iter::Iterator;
13164        self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
13165        self
13166    }
13167
13168    /// Sets the value of [next_page_token][crate::model::QueryWorkflowInvocationActionsResponse::next_page_token].
13169    ///
13170    /// # Example
13171    /// ```ignore,no_run
13172    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
13173    /// let x = QueryWorkflowInvocationActionsResponse::new().set_next_page_token("example");
13174    /// ```
13175    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13176        self.next_page_token = v.into();
13177        self
13178    }
13179}
13180
13181impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
13182    fn typename() -> &'static str {
13183        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
13184    }
13185}
13186
13187#[doc(hidden)]
13188impl gax::paginator::internal::PageableResponse for QueryWorkflowInvocationActionsResponse {
13189    type PageItem = crate::model::WorkflowInvocationAction;
13190
13191    fn items(self) -> std::vec::Vec<Self::PageItem> {
13192        self.workflow_invocation_actions
13193    }
13194
13195    fn next_page_token(&self) -> std::string::String {
13196        use std::clone::Clone;
13197        self.next_page_token.clone()
13198    }
13199}
13200
13201/// Config for all repositories in a given project and location.
13202#[derive(Clone, Default, PartialEq)]
13203#[non_exhaustive]
13204pub struct Config {
13205    /// Identifier. The config name.
13206    pub name: std::string::String,
13207
13208    /// Optional. The default KMS key that is used if no encryption key is provided
13209    /// when a repository is created.
13210    pub default_kms_key_name: std::string::String,
13211
13212    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13213}
13214
13215impl Config {
13216    pub fn new() -> Self {
13217        std::default::Default::default()
13218    }
13219
13220    /// Sets the value of [name][crate::model::Config::name].
13221    ///
13222    /// # Example
13223    /// ```ignore,no_run
13224    /// # use google_cloud_dataform_v1::model::Config;
13225    /// let x = Config::new().set_name("example");
13226    /// ```
13227    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13228        self.name = v.into();
13229        self
13230    }
13231
13232    /// Sets the value of [default_kms_key_name][crate::model::Config::default_kms_key_name].
13233    ///
13234    /// # Example
13235    /// ```ignore,no_run
13236    /// # use google_cloud_dataform_v1::model::Config;
13237    /// let x = Config::new().set_default_kms_key_name("example");
13238    /// ```
13239    pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
13240        mut self,
13241        v: T,
13242    ) -> Self {
13243        self.default_kms_key_name = v.into();
13244        self
13245    }
13246}
13247
13248impl wkt::message::Message for Config {
13249    fn typename() -> &'static str {
13250        "type.googleapis.com/google.cloud.dataform.v1.Config"
13251    }
13252}
13253
13254/// `GetConfig` request message.
13255#[derive(Clone, Default, PartialEq)]
13256#[non_exhaustive]
13257pub struct GetConfigRequest {
13258    /// Required. The config name.
13259    pub name: std::string::String,
13260
13261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13262}
13263
13264impl GetConfigRequest {
13265    pub fn new() -> Self {
13266        std::default::Default::default()
13267    }
13268
13269    /// Sets the value of [name][crate::model::GetConfigRequest::name].
13270    ///
13271    /// # Example
13272    /// ```ignore,no_run
13273    /// # use google_cloud_dataform_v1::model::GetConfigRequest;
13274    /// let x = GetConfigRequest::new().set_name("example");
13275    /// ```
13276    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13277        self.name = v.into();
13278        self
13279    }
13280}
13281
13282impl wkt::message::Message for GetConfigRequest {
13283    fn typename() -> &'static str {
13284        "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
13285    }
13286}
13287
13288/// `UpdateConfig` request message.
13289#[derive(Clone, Default, PartialEq)]
13290#[non_exhaustive]
13291pub struct UpdateConfigRequest {
13292    /// Required. The config to update.
13293    pub config: std::option::Option<crate::model::Config>,
13294
13295    /// Optional. Specifies the fields to be updated in the config.
13296    pub update_mask: std::option::Option<wkt::FieldMask>,
13297
13298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13299}
13300
13301impl UpdateConfigRequest {
13302    pub fn new() -> Self {
13303        std::default::Default::default()
13304    }
13305
13306    /// Sets the value of [config][crate::model::UpdateConfigRequest::config].
13307    ///
13308    /// # Example
13309    /// ```ignore,no_run
13310    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13311    /// use google_cloud_dataform_v1::model::Config;
13312    /// let x = UpdateConfigRequest::new().set_config(Config::default()/* use setters */);
13313    /// ```
13314    pub fn set_config<T>(mut self, v: T) -> Self
13315    where
13316        T: std::convert::Into<crate::model::Config>,
13317    {
13318        self.config = std::option::Option::Some(v.into());
13319        self
13320    }
13321
13322    /// Sets or clears the value of [config][crate::model::UpdateConfigRequest::config].
13323    ///
13324    /// # Example
13325    /// ```ignore,no_run
13326    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13327    /// use google_cloud_dataform_v1::model::Config;
13328    /// let x = UpdateConfigRequest::new().set_or_clear_config(Some(Config::default()/* use setters */));
13329    /// let x = UpdateConfigRequest::new().set_or_clear_config(None::<Config>);
13330    /// ```
13331    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
13332    where
13333        T: std::convert::Into<crate::model::Config>,
13334    {
13335        self.config = v.map(|x| x.into());
13336        self
13337    }
13338
13339    /// Sets the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
13340    ///
13341    /// # Example
13342    /// ```ignore,no_run
13343    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13344    /// use wkt::FieldMask;
13345    /// let x = UpdateConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
13346    /// ```
13347    pub fn set_update_mask<T>(mut self, v: T) -> Self
13348    where
13349        T: std::convert::Into<wkt::FieldMask>,
13350    {
13351        self.update_mask = std::option::Option::Some(v.into());
13352        self
13353    }
13354
13355    /// Sets or clears the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
13356    ///
13357    /// # Example
13358    /// ```ignore,no_run
13359    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13360    /// use wkt::FieldMask;
13361    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
13362    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
13363    /// ```
13364    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13365    where
13366        T: std::convert::Into<wkt::FieldMask>,
13367    {
13368        self.update_mask = v.map(|x| x.into());
13369        self
13370    }
13371}
13372
13373impl wkt::message::Message for UpdateConfigRequest {
13374    fn typename() -> &'static str {
13375        "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
13376    }
13377}