Skip to main content

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 gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_iam_v1;
25extern crate google_cloud_location;
26extern crate google_cloud_rpc;
27extern crate google_cloud_type;
28extern crate lazy_static;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36mod debug;
37mod deserialize;
38mod serialize;
39
40/// Describes encryption state of a resource.
41#[derive(Clone, Default, PartialEq)]
42#[non_exhaustive]
43pub struct DataEncryptionState {
44    /// Required. The KMS key version name with which data of a resource is
45    /// encrypted.
46    pub kms_key_version_name: std::string::String,
47
48    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
49}
50
51impl DataEncryptionState {
52    pub fn new() -> Self {
53        std::default::Default::default()
54    }
55
56    /// Sets the value of [kms_key_version_name][crate::model::DataEncryptionState::kms_key_version_name].
57    ///
58    /// # Example
59    /// ```ignore,no_run
60    /// # use google_cloud_dataform_v1::model::DataEncryptionState;
61    /// let x = DataEncryptionState::new().set_kms_key_version_name("example");
62    /// ```
63    pub fn set_kms_key_version_name<T: std::convert::Into<std::string::String>>(
64        mut self,
65        v: T,
66    ) -> Self {
67        self.kms_key_version_name = v.into();
68        self
69    }
70}
71
72impl wkt::message::Message for DataEncryptionState {
73    fn typename() -> &'static str {
74        "type.googleapis.com/google.cloud.dataform.v1.DataEncryptionState"
75    }
76}
77
78/// Represents a Dataform Git repository.
79#[derive(Clone, Default, PartialEq)]
80#[non_exhaustive]
81pub struct Repository {
82    /// Identifier. The repository's name.
83    pub name: std::string::String,
84
85    /// Output only. The timestamp of when the repository was created.
86    pub create_time: std::option::Option<wkt::Timestamp>,
87
88    /// Optional. The repository's user-friendly name.
89    pub display_name: std::string::String,
90
91    /// Optional. If set, configures this repository to be linked to a Git remote.
92    pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
93
94    /// Optional. The name of the Secret Manager secret version to be used to
95    /// interpolate variables into the .npmrc file for package installation
96    /// operations. Must be in the format `projects/*/secrets/*/versions/*`. The
97    /// file itself must be in a JSON format.
98    pub npmrc_environment_variables_secret_version: std::string::String,
99
100    /// Optional. If set, fields of `workspace_compilation_overrides` override the
101    /// default compilation settings that are specified in dataform.json when
102    /// creating workspace-scoped compilation results. See documentation for
103    /// `WorkspaceCompilationOverrides` for more information.
104    pub workspace_compilation_overrides:
105        std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
106
107    /// Optional. Repository user labels.
108    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
109
110    /// Optional. Input only. If set to true, the authenticated user will be
111    /// granted the roles/dataform.admin role on the created repository.
112    pub set_authenticated_user_admin: bool,
113
114    /// Optional. The service account to run workflow invocations under.
115    pub service_account: std::string::String,
116
117    /// Optional. The reference to a KMS encryption key. If provided, it will be
118    /// used to encrypt user data in the repository and all child resources. It is
119    /// not possible to add or update the encryption key after the repository is
120    /// created. Example:
121    /// `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}`
122    pub kms_key_name: std::string::String,
123
124    /// Output only. A data encryption state of a Git repository if this Repository
125    /// is protected by a KMS key.
126    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
127
128    /// Output only. All the metadata information that is used internally to serve
129    /// the resource. For example: timestamps, flags, status fields, etc. The
130    /// format of this field is a JSON string.
131    pub internal_metadata: std::option::Option<std::string::String>,
132
133    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
134}
135
136impl Repository {
137    pub fn new() -> Self {
138        std::default::Default::default()
139    }
140
141    /// Sets the value of [name][crate::model::Repository::name].
142    ///
143    /// # Example
144    /// ```ignore,no_run
145    /// # use google_cloud_dataform_v1::model::Repository;
146    /// let x = Repository::new().set_name("example");
147    /// ```
148    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
149        self.name = v.into();
150        self
151    }
152
153    /// Sets the value of [create_time][crate::model::Repository::create_time].
154    ///
155    /// # Example
156    /// ```ignore,no_run
157    /// # use google_cloud_dataform_v1::model::Repository;
158    /// use wkt::Timestamp;
159    /// let x = Repository::new().set_create_time(Timestamp::default()/* use setters */);
160    /// ```
161    pub fn set_create_time<T>(mut self, v: T) -> Self
162    where
163        T: std::convert::Into<wkt::Timestamp>,
164    {
165        self.create_time = std::option::Option::Some(v.into());
166        self
167    }
168
169    /// Sets or clears the value of [create_time][crate::model::Repository::create_time].
170    ///
171    /// # Example
172    /// ```ignore,no_run
173    /// # use google_cloud_dataform_v1::model::Repository;
174    /// use wkt::Timestamp;
175    /// let x = Repository::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
176    /// let x = Repository::new().set_or_clear_create_time(None::<Timestamp>);
177    /// ```
178    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
179    where
180        T: std::convert::Into<wkt::Timestamp>,
181    {
182        self.create_time = v.map(|x| x.into());
183        self
184    }
185
186    /// Sets the value of [display_name][crate::model::Repository::display_name].
187    ///
188    /// # Example
189    /// ```ignore,no_run
190    /// # use google_cloud_dataform_v1::model::Repository;
191    /// let x = Repository::new().set_display_name("example");
192    /// ```
193    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
194        self.display_name = v.into();
195        self
196    }
197
198    /// Sets the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
199    ///
200    /// # Example
201    /// ```ignore,no_run
202    /// # use google_cloud_dataform_v1::model::Repository;
203    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
204    /// let x = Repository::new().set_git_remote_settings(GitRemoteSettings::default()/* use setters */);
205    /// ```
206    pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
207    where
208        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
209    {
210        self.git_remote_settings = std::option::Option::Some(v.into());
211        self
212    }
213
214    /// Sets or clears the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
215    ///
216    /// # Example
217    /// ```ignore,no_run
218    /// # use google_cloud_dataform_v1::model::Repository;
219    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
220    /// let x = Repository::new().set_or_clear_git_remote_settings(Some(GitRemoteSettings::default()/* use setters */));
221    /// let x = Repository::new().set_or_clear_git_remote_settings(None::<GitRemoteSettings>);
222    /// ```
223    pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
224    where
225        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
226    {
227        self.git_remote_settings = v.map(|x| x.into());
228        self
229    }
230
231    /// Sets the value of [npmrc_environment_variables_secret_version][crate::model::Repository::npmrc_environment_variables_secret_version].
232    ///
233    /// # Example
234    /// ```ignore,no_run
235    /// # use google_cloud_dataform_v1::model::Repository;
236    /// let x = Repository::new().set_npmrc_environment_variables_secret_version("example");
237    /// ```
238    pub fn set_npmrc_environment_variables_secret_version<
239        T: std::convert::Into<std::string::String>,
240    >(
241        mut self,
242        v: T,
243    ) -> Self {
244        self.npmrc_environment_variables_secret_version = v.into();
245        self
246    }
247
248    /// Sets the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
249    ///
250    /// # Example
251    /// ```ignore,no_run
252    /// # use google_cloud_dataform_v1::model::Repository;
253    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
254    /// let x = Repository::new().set_workspace_compilation_overrides(WorkspaceCompilationOverrides::default()/* use setters */);
255    /// ```
256    pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
257    where
258        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
259    {
260        self.workspace_compilation_overrides = std::option::Option::Some(v.into());
261        self
262    }
263
264    /// Sets or clears the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
265    ///
266    /// # Example
267    /// ```ignore,no_run
268    /// # use google_cloud_dataform_v1::model::Repository;
269    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
270    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(Some(WorkspaceCompilationOverrides::default()/* use setters */));
271    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(None::<WorkspaceCompilationOverrides>);
272    /// ```
273    pub fn set_or_clear_workspace_compilation_overrides<T>(
274        mut self,
275        v: std::option::Option<T>,
276    ) -> Self
277    where
278        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
279    {
280        self.workspace_compilation_overrides = v.map(|x| x.into());
281        self
282    }
283
284    /// Sets the value of [labels][crate::model::Repository::labels].
285    ///
286    /// # Example
287    /// ```ignore,no_run
288    /// # use google_cloud_dataform_v1::model::Repository;
289    /// let x = Repository::new().set_labels([
290    ///     ("key0", "abc"),
291    ///     ("key1", "xyz"),
292    /// ]);
293    /// ```
294    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
295    where
296        T: std::iter::IntoIterator<Item = (K, V)>,
297        K: std::convert::Into<std::string::String>,
298        V: std::convert::Into<std::string::String>,
299    {
300        use std::iter::Iterator;
301        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
302        self
303    }
304
305    /// Sets the value of [set_authenticated_user_admin][crate::model::Repository::set_authenticated_user_admin].
306    ///
307    /// # Example
308    /// ```ignore,no_run
309    /// # use google_cloud_dataform_v1::model::Repository;
310    /// let x = Repository::new().set_set_authenticated_user_admin(true);
311    /// ```
312    pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
313        self.set_authenticated_user_admin = v.into();
314        self
315    }
316
317    /// Sets the value of [service_account][crate::model::Repository::service_account].
318    ///
319    /// # Example
320    /// ```ignore,no_run
321    /// # use google_cloud_dataform_v1::model::Repository;
322    /// let x = Repository::new().set_service_account("example");
323    /// ```
324    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
325        self.service_account = v.into();
326        self
327    }
328
329    /// Sets the value of [kms_key_name][crate::model::Repository::kms_key_name].
330    ///
331    /// # Example
332    /// ```ignore,no_run
333    /// # use google_cloud_dataform_v1::model::Repository;
334    /// let x = Repository::new().set_kms_key_name("example");
335    /// ```
336    pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
337        self.kms_key_name = v.into();
338        self
339    }
340
341    /// Sets the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
342    ///
343    /// # Example
344    /// ```ignore,no_run
345    /// # use google_cloud_dataform_v1::model::Repository;
346    /// use google_cloud_dataform_v1::model::DataEncryptionState;
347    /// let x = Repository::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
348    /// ```
349    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
350    where
351        T: std::convert::Into<crate::model::DataEncryptionState>,
352    {
353        self.data_encryption_state = std::option::Option::Some(v.into());
354        self
355    }
356
357    /// Sets or clears the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
358    ///
359    /// # Example
360    /// ```ignore,no_run
361    /// # use google_cloud_dataform_v1::model::Repository;
362    /// use google_cloud_dataform_v1::model::DataEncryptionState;
363    /// let x = Repository::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
364    /// let x = Repository::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
365    /// ```
366    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
367    where
368        T: std::convert::Into<crate::model::DataEncryptionState>,
369    {
370        self.data_encryption_state = v.map(|x| x.into());
371        self
372    }
373
374    /// Sets the value of [internal_metadata][crate::model::Repository::internal_metadata].
375    ///
376    /// # Example
377    /// ```ignore,no_run
378    /// # use google_cloud_dataform_v1::model::Repository;
379    /// let x = Repository::new().set_internal_metadata("example");
380    /// ```
381    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
382    where
383        T: std::convert::Into<std::string::String>,
384    {
385        self.internal_metadata = std::option::Option::Some(v.into());
386        self
387    }
388
389    /// Sets or clears the value of [internal_metadata][crate::model::Repository::internal_metadata].
390    ///
391    /// # Example
392    /// ```ignore,no_run
393    /// # use google_cloud_dataform_v1::model::Repository;
394    /// let x = Repository::new().set_or_clear_internal_metadata(Some("example"));
395    /// let x = Repository::new().set_or_clear_internal_metadata(None::<String>);
396    /// ```
397    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
398    where
399        T: std::convert::Into<std::string::String>,
400    {
401        self.internal_metadata = v.map(|x| x.into());
402        self
403    }
404}
405
406impl wkt::message::Message for Repository {
407    fn typename() -> &'static str {
408        "type.googleapis.com/google.cloud.dataform.v1.Repository"
409    }
410}
411
412/// Defines additional types related to [Repository].
413pub mod repository {
414    #[allow(unused_imports)]
415    use super::*;
416
417    /// Controls Git remote configuration for a repository.
418    #[derive(Clone, Default, PartialEq)]
419    #[non_exhaustive]
420    pub struct GitRemoteSettings {
421        /// Required. The Git remote's URL.
422        pub url: std::string::String,
423
424        /// Required. The Git remote's default branch name.
425        pub default_branch: std::string::String,
426
427        /// Optional. The name of the Secret Manager secret version to use as an
428        /// authentication token for Git operations. Must be in the format
429        /// `projects/*/secrets/*/versions/*`.
430        pub authentication_token_secret_version: std::string::String,
431
432        /// Optional. Authentication fields for remote uris using SSH protocol.
433        pub ssh_authentication_config: std::option::Option<
434            crate::model::repository::git_remote_settings::SshAuthenticationConfig,
435        >,
436
437        /// Output only. Deprecated: The field does not contain any token status
438        /// information.
439        #[deprecated]
440        pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
441
442        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
443    }
444
445    impl GitRemoteSettings {
446        pub fn new() -> Self {
447            std::default::Default::default()
448        }
449
450        /// Sets the value of [url][crate::model::repository::GitRemoteSettings::url].
451        ///
452        /// # Example
453        /// ```ignore,no_run
454        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
455        /// let x = GitRemoteSettings::new().set_url("example");
456        /// ```
457        pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
458            self.url = v.into();
459            self
460        }
461
462        /// Sets the value of [default_branch][crate::model::repository::GitRemoteSettings::default_branch].
463        ///
464        /// # Example
465        /// ```ignore,no_run
466        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
467        /// let x = GitRemoteSettings::new().set_default_branch("example");
468        /// ```
469        pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
470            mut self,
471            v: T,
472        ) -> Self {
473            self.default_branch = v.into();
474            self
475        }
476
477        /// Sets the value of [authentication_token_secret_version][crate::model::repository::GitRemoteSettings::authentication_token_secret_version].
478        ///
479        /// # Example
480        /// ```ignore,no_run
481        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
482        /// let x = GitRemoteSettings::new().set_authentication_token_secret_version("example");
483        /// ```
484        pub fn set_authentication_token_secret_version<
485            T: std::convert::Into<std::string::String>,
486        >(
487            mut self,
488            v: T,
489        ) -> Self {
490            self.authentication_token_secret_version = v.into();
491            self
492        }
493
494        /// Sets the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
495        ///
496        /// # Example
497        /// ```ignore,no_run
498        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
499        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
500        /// let x = GitRemoteSettings::new().set_ssh_authentication_config(SshAuthenticationConfig::default()/* use setters */);
501        /// ```
502        pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
503        where
504            T: std::convert::Into<
505                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
506                >,
507        {
508            self.ssh_authentication_config = std::option::Option::Some(v.into());
509            self
510        }
511
512        /// Sets or clears the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
513        ///
514        /// # Example
515        /// ```ignore,no_run
516        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
517        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
518        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(Some(SshAuthenticationConfig::default()/* use setters */));
519        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(None::<SshAuthenticationConfig>);
520        /// ```
521        pub fn set_or_clear_ssh_authentication_config<T>(
522            mut self,
523            v: std::option::Option<T>,
524        ) -> Self
525        where
526            T: std::convert::Into<
527                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
528                >,
529        {
530            self.ssh_authentication_config = v.map(|x| x.into());
531            self
532        }
533
534        /// Sets the value of [token_status][crate::model::repository::GitRemoteSettings::token_status].
535        ///
536        /// # Example
537        /// ```ignore,no_run
538        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
539        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::TokenStatus;
540        /// let x0 = GitRemoteSettings::new().set_token_status(TokenStatus::NotFound);
541        /// let x1 = GitRemoteSettings::new().set_token_status(TokenStatus::Invalid);
542        /// let x2 = GitRemoteSettings::new().set_token_status(TokenStatus::Valid);
543        /// ```
544        #[deprecated]
545        pub fn set_token_status<
546            T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
547        >(
548            mut self,
549            v: T,
550        ) -> Self {
551            self.token_status = v.into();
552            self
553        }
554    }
555
556    impl wkt::message::Message for GitRemoteSettings {
557        fn typename() -> &'static str {
558            "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
559        }
560    }
561
562    /// Defines additional types related to [GitRemoteSettings].
563    pub mod git_remote_settings {
564        #[allow(unused_imports)]
565        use super::*;
566
567        /// Configures fields for performing SSH authentication.
568        #[derive(Clone, Default, PartialEq)]
569        #[non_exhaustive]
570        pub struct SshAuthenticationConfig {
571            /// Required. The name of the Secret Manager secret version to use as a
572            /// ssh private key for Git operations.
573            /// Must be in the format `projects/*/secrets/*/versions/*`.
574            pub user_private_key_secret_version: std::string::String,
575
576            /// Required. Content of a public SSH key to verify an identity of a remote
577            /// Git host.
578            pub host_public_key: std::string::String,
579
580            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
581        }
582
583        impl SshAuthenticationConfig {
584            pub fn new() -> Self {
585                std::default::Default::default()
586            }
587
588            /// Sets the value of [user_private_key_secret_version][crate::model::repository::git_remote_settings::SshAuthenticationConfig::user_private_key_secret_version].
589            ///
590            /// # Example
591            /// ```ignore,no_run
592            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
593            /// let x = SshAuthenticationConfig::new().set_user_private_key_secret_version("example");
594            /// ```
595            pub fn set_user_private_key_secret_version<
596                T: std::convert::Into<std::string::String>,
597            >(
598                mut self,
599                v: T,
600            ) -> Self {
601                self.user_private_key_secret_version = v.into();
602                self
603            }
604
605            /// Sets the value of [host_public_key][crate::model::repository::git_remote_settings::SshAuthenticationConfig::host_public_key].
606            ///
607            /// # Example
608            /// ```ignore,no_run
609            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
610            /// let x = SshAuthenticationConfig::new().set_host_public_key("example");
611            /// ```
612            pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
613                mut self,
614                v: T,
615            ) -> Self {
616                self.host_public_key = v.into();
617                self
618            }
619        }
620
621        impl wkt::message::Message for SshAuthenticationConfig {
622            fn typename() -> &'static str {
623                "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
624            }
625        }
626
627        /// The status of the authentication token.
628        ///
629        /// # Working with unknown values
630        ///
631        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
632        /// additional enum variants at any time. Adding new variants is not considered
633        /// a breaking change. Applications should write their code in anticipation of:
634        ///
635        /// - New values appearing in future releases of the client library, **and**
636        /// - New values received dynamically, without application changes.
637        ///
638        /// Please consult the [Working with enums] section in the user guide for some
639        /// guidelines.
640        ///
641        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
642        #[derive(Clone, Debug, PartialEq)]
643        #[non_exhaustive]
644        pub enum TokenStatus {
645            /// Default value. This value is unused.
646            Unspecified,
647            /// The token could not be found in Secret Manager (or the Dataform
648            /// Service Account did not have permission to access it).
649            NotFound,
650            /// The token could not be used to authenticate against the Git remote.
651            Invalid,
652            /// The token was used successfully to authenticate against the Git remote.
653            Valid,
654            /// If set, the enum was initialized with an unknown value.
655            ///
656            /// Applications can examine the value using [TokenStatus::value] or
657            /// [TokenStatus::name].
658            UnknownValue(token_status::UnknownValue),
659        }
660
661        #[doc(hidden)]
662        pub mod token_status {
663            #[allow(unused_imports)]
664            use super::*;
665            #[derive(Clone, Debug, PartialEq)]
666            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
667        }
668
669        impl TokenStatus {
670            /// Gets the enum value.
671            ///
672            /// Returns `None` if the enum contains an unknown value deserialized from
673            /// the string representation of enums.
674            pub fn value(&self) -> std::option::Option<i32> {
675                match self {
676                    Self::Unspecified => std::option::Option::Some(0),
677                    Self::NotFound => std::option::Option::Some(1),
678                    Self::Invalid => std::option::Option::Some(2),
679                    Self::Valid => std::option::Option::Some(3),
680                    Self::UnknownValue(u) => u.0.value(),
681                }
682            }
683
684            /// Gets the enum value as a string.
685            ///
686            /// Returns `None` if the enum contains an unknown value deserialized from
687            /// the integer representation of enums.
688            pub fn name(&self) -> std::option::Option<&str> {
689                match self {
690                    Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
691                    Self::NotFound => std::option::Option::Some("NOT_FOUND"),
692                    Self::Invalid => std::option::Option::Some("INVALID"),
693                    Self::Valid => std::option::Option::Some("VALID"),
694                    Self::UnknownValue(u) => u.0.name(),
695                }
696            }
697        }
698
699        impl std::default::Default for TokenStatus {
700            fn default() -> Self {
701                use std::convert::From;
702                Self::from(0)
703            }
704        }
705
706        impl std::fmt::Display for TokenStatus {
707            fn fmt(
708                &self,
709                f: &mut std::fmt::Formatter<'_>,
710            ) -> std::result::Result<(), std::fmt::Error> {
711                wkt::internal::display_enum(f, self.name(), self.value())
712            }
713        }
714
715        impl std::convert::From<i32> for TokenStatus {
716            fn from(value: i32) -> Self {
717                match value {
718                    0 => Self::Unspecified,
719                    1 => Self::NotFound,
720                    2 => Self::Invalid,
721                    3 => Self::Valid,
722                    _ => Self::UnknownValue(token_status::UnknownValue(
723                        wkt::internal::UnknownEnumValue::Integer(value),
724                    )),
725                }
726            }
727        }
728
729        impl std::convert::From<&str> for TokenStatus {
730            fn from(value: &str) -> Self {
731                use std::string::ToString;
732                match value {
733                    "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
734                    "NOT_FOUND" => Self::NotFound,
735                    "INVALID" => Self::Invalid,
736                    "VALID" => Self::Valid,
737                    _ => Self::UnknownValue(token_status::UnknownValue(
738                        wkt::internal::UnknownEnumValue::String(value.to_string()),
739                    )),
740                }
741            }
742        }
743
744        impl serde::ser::Serialize for TokenStatus {
745            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
746            where
747                S: serde::Serializer,
748            {
749                match self {
750                    Self::Unspecified => serializer.serialize_i32(0),
751                    Self::NotFound => serializer.serialize_i32(1),
752                    Self::Invalid => serializer.serialize_i32(2),
753                    Self::Valid => serializer.serialize_i32(3),
754                    Self::UnknownValue(u) => u.0.serialize(serializer),
755                }
756            }
757        }
758
759        impl<'de> serde::de::Deserialize<'de> for TokenStatus {
760            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
761            where
762                D: serde::Deserializer<'de>,
763            {
764                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
765                    ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
766                ))
767            }
768        }
769    }
770
771    /// Configures workspace compilation overrides for a repository.
772    #[derive(Clone, Default, PartialEq)]
773    #[non_exhaustive]
774    pub struct WorkspaceCompilationOverrides {
775        /// Optional. The default database (Google Cloud project ID).
776        pub default_database: std::string::String,
777
778        /// Optional. The suffix that should be appended to all schema (BigQuery
779        /// dataset ID) names.
780        pub schema_suffix: std::string::String,
781
782        /// Optional. The prefix that should be prepended to all table names.
783        pub table_prefix: std::string::String,
784
785        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
786    }
787
788    impl WorkspaceCompilationOverrides {
789        pub fn new() -> Self {
790            std::default::Default::default()
791        }
792
793        /// Sets the value of [default_database][crate::model::repository::WorkspaceCompilationOverrides::default_database].
794        ///
795        /// # Example
796        /// ```ignore,no_run
797        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
798        /// let x = WorkspaceCompilationOverrides::new().set_default_database("example");
799        /// ```
800        pub fn set_default_database<T: std::convert::Into<std::string::String>>(
801            mut self,
802            v: T,
803        ) -> Self {
804            self.default_database = v.into();
805            self
806        }
807
808        /// Sets the value of [schema_suffix][crate::model::repository::WorkspaceCompilationOverrides::schema_suffix].
809        ///
810        /// # Example
811        /// ```ignore,no_run
812        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
813        /// let x = WorkspaceCompilationOverrides::new().set_schema_suffix("example");
814        /// ```
815        pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
816            mut self,
817            v: T,
818        ) -> Self {
819            self.schema_suffix = v.into();
820            self
821        }
822
823        /// Sets the value of [table_prefix][crate::model::repository::WorkspaceCompilationOverrides::table_prefix].
824        ///
825        /// # Example
826        /// ```ignore,no_run
827        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
828        /// let x = WorkspaceCompilationOverrides::new().set_table_prefix("example");
829        /// ```
830        pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
831            mut self,
832            v: T,
833        ) -> Self {
834            self.table_prefix = v.into();
835            self
836        }
837    }
838
839    impl wkt::message::Message for WorkspaceCompilationOverrides {
840        fn typename() -> &'static str {
841            "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
842        }
843    }
844}
845
846/// `ListRepositories` request message.
847#[derive(Clone, Default, PartialEq)]
848#[non_exhaustive]
849pub struct ListRepositoriesRequest {
850    /// Required. The location in which to list repositories. Must be in the format
851    /// `projects/*/locations/*`.
852    pub parent: std::string::String,
853
854    /// Optional. Maximum number of repositories to return. The server may return
855    /// fewer items than requested. If unspecified, the server will pick an
856    /// appropriate default.
857    pub page_size: i32,
858
859    /// Optional. Page token received from a previous `ListRepositories` call.
860    /// Provide this to retrieve the subsequent page.
861    ///
862    /// When paginating, all other parameters provided to `ListRepositories`,
863    /// with the exception of `page_size`, must match the call that provided the
864    /// page token.
865    pub page_token: std::string::String,
866
867    /// Optional. This field only supports ordering by `name`. If unspecified, the
868    /// server will choose the ordering. If specified, the default order is
869    /// ascending for the `name` field.
870    pub order_by: std::string::String,
871
872    /// Optional. Filter for the returned list.
873    pub filter: std::string::String,
874
875    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
876}
877
878impl ListRepositoriesRequest {
879    pub fn new() -> Self {
880        std::default::Default::default()
881    }
882
883    /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
884    ///
885    /// # Example
886    /// ```ignore,no_run
887    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
888    /// let x = ListRepositoriesRequest::new().set_parent("example");
889    /// ```
890    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
891        self.parent = v.into();
892        self
893    }
894
895    /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
896    ///
897    /// # Example
898    /// ```ignore,no_run
899    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
900    /// let x = ListRepositoriesRequest::new().set_page_size(42);
901    /// ```
902    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
903        self.page_size = v.into();
904        self
905    }
906
907    /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
908    ///
909    /// # Example
910    /// ```ignore,no_run
911    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
912    /// let x = ListRepositoriesRequest::new().set_page_token("example");
913    /// ```
914    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
915        self.page_token = v.into();
916        self
917    }
918
919    /// Sets the value of [order_by][crate::model::ListRepositoriesRequest::order_by].
920    ///
921    /// # Example
922    /// ```ignore,no_run
923    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
924    /// let x = ListRepositoriesRequest::new().set_order_by("example");
925    /// ```
926    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
927        self.order_by = v.into();
928        self
929    }
930
931    /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
932    ///
933    /// # Example
934    /// ```ignore,no_run
935    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
936    /// let x = ListRepositoriesRequest::new().set_filter("example");
937    /// ```
938    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
939        self.filter = v.into();
940        self
941    }
942}
943
944impl wkt::message::Message for ListRepositoriesRequest {
945    fn typename() -> &'static str {
946        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
947    }
948}
949
950/// `ListRepositories` response message.
951#[derive(Clone, Default, PartialEq)]
952#[non_exhaustive]
953pub struct ListRepositoriesResponse {
954    /// List of repositories.
955    pub repositories: std::vec::Vec<crate::model::Repository>,
956
957    /// A token which can be sent as `page_token` to retrieve the next page.
958    /// If this field is omitted, there are no subsequent pages.
959    pub next_page_token: std::string::String,
960
961    /// Locations which could not be reached.
962    pub unreachable: std::vec::Vec<std::string::String>,
963
964    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
965}
966
967impl ListRepositoriesResponse {
968    pub fn new() -> Self {
969        std::default::Default::default()
970    }
971
972    /// Sets the value of [repositories][crate::model::ListRepositoriesResponse::repositories].
973    ///
974    /// # Example
975    /// ```ignore,no_run
976    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
977    /// use google_cloud_dataform_v1::model::Repository;
978    /// let x = ListRepositoriesResponse::new()
979    ///     .set_repositories([
980    ///         Repository::default()/* use setters */,
981    ///         Repository::default()/* use (different) setters */,
982    ///     ]);
983    /// ```
984    pub fn set_repositories<T, V>(mut self, v: T) -> Self
985    where
986        T: std::iter::IntoIterator<Item = V>,
987        V: std::convert::Into<crate::model::Repository>,
988    {
989        use std::iter::Iterator;
990        self.repositories = v.into_iter().map(|i| i.into()).collect();
991        self
992    }
993
994    /// Sets the value of [next_page_token][crate::model::ListRepositoriesResponse::next_page_token].
995    ///
996    /// # Example
997    /// ```ignore,no_run
998    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
999    /// let x = ListRepositoriesResponse::new().set_next_page_token("example");
1000    /// ```
1001    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1002        self.next_page_token = v.into();
1003        self
1004    }
1005
1006    /// Sets the value of [unreachable][crate::model::ListRepositoriesResponse::unreachable].
1007    ///
1008    /// # Example
1009    /// ```ignore,no_run
1010    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1011    /// let x = ListRepositoriesResponse::new().set_unreachable(["a", "b", "c"]);
1012    /// ```
1013    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1014    where
1015        T: std::iter::IntoIterator<Item = V>,
1016        V: std::convert::Into<std::string::String>,
1017    {
1018        use std::iter::Iterator;
1019        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1020        self
1021    }
1022}
1023
1024impl wkt::message::Message for ListRepositoriesResponse {
1025    fn typename() -> &'static str {
1026        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
1027    }
1028}
1029
1030#[doc(hidden)]
1031impl google_cloud_gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
1032    type PageItem = crate::model::Repository;
1033
1034    fn items(self) -> std::vec::Vec<Self::PageItem> {
1035        self.repositories
1036    }
1037
1038    fn next_page_token(&self) -> std::string::String {
1039        use std::clone::Clone;
1040        self.next_page_token.clone()
1041    }
1042}
1043
1044/// `GetRepository` request message.
1045#[derive(Clone, Default, PartialEq)]
1046#[non_exhaustive]
1047pub struct GetRepositoryRequest {
1048    /// Required. The repository's name.
1049    pub name: std::string::String,
1050
1051    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1052}
1053
1054impl GetRepositoryRequest {
1055    pub fn new() -> Self {
1056        std::default::Default::default()
1057    }
1058
1059    /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
1060    ///
1061    /// # Example
1062    /// ```ignore,no_run
1063    /// # use google_cloud_dataform_v1::model::GetRepositoryRequest;
1064    /// let x = GetRepositoryRequest::new().set_name("example");
1065    /// ```
1066    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1067        self.name = v.into();
1068        self
1069    }
1070}
1071
1072impl wkt::message::Message for GetRepositoryRequest {
1073    fn typename() -> &'static str {
1074        "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
1075    }
1076}
1077
1078/// `CreateRepository` request message.
1079#[derive(Clone, Default, PartialEq)]
1080#[non_exhaustive]
1081pub struct CreateRepositoryRequest {
1082    /// Required. The location in which to create the repository. Must be in the
1083    /// format `projects/*/locations/*`.
1084    pub parent: std::string::String,
1085
1086    /// Required. The repository to create.
1087    pub repository: std::option::Option<crate::model::Repository>,
1088
1089    /// Required. The ID to use for the repository, which will become the final
1090    /// component of the repository's resource name.
1091    pub repository_id: std::string::String,
1092
1093    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1094}
1095
1096impl CreateRepositoryRequest {
1097    pub fn new() -> Self {
1098        std::default::Default::default()
1099    }
1100
1101    /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
1102    ///
1103    /// # Example
1104    /// ```ignore,no_run
1105    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1106    /// let x = CreateRepositoryRequest::new().set_parent("example");
1107    /// ```
1108    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1109        self.parent = v.into();
1110        self
1111    }
1112
1113    /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
1114    ///
1115    /// # Example
1116    /// ```ignore,no_run
1117    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1118    /// use google_cloud_dataform_v1::model::Repository;
1119    /// let x = CreateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1120    /// ```
1121    pub fn set_repository<T>(mut self, v: T) -> Self
1122    where
1123        T: std::convert::Into<crate::model::Repository>,
1124    {
1125        self.repository = std::option::Option::Some(v.into());
1126        self
1127    }
1128
1129    /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
1130    ///
1131    /// # Example
1132    /// ```ignore,no_run
1133    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1134    /// use google_cloud_dataform_v1::model::Repository;
1135    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1136    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1137    /// ```
1138    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1139    where
1140        T: std::convert::Into<crate::model::Repository>,
1141    {
1142        self.repository = v.map(|x| x.into());
1143        self
1144    }
1145
1146    /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
1147    ///
1148    /// # Example
1149    /// ```ignore,no_run
1150    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1151    /// let x = CreateRepositoryRequest::new().set_repository_id("example");
1152    /// ```
1153    pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1154        self.repository_id = v.into();
1155        self
1156    }
1157}
1158
1159impl wkt::message::Message for CreateRepositoryRequest {
1160    fn typename() -> &'static str {
1161        "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
1162    }
1163}
1164
1165/// `UpdateRepository` request message.
1166#[derive(Clone, Default, PartialEq)]
1167#[non_exhaustive]
1168pub struct UpdateRepositoryRequest {
1169    /// Optional. Specifies the fields to be updated in the repository. If left
1170    /// unset, all fields will be updated.
1171    pub update_mask: std::option::Option<wkt::FieldMask>,
1172
1173    /// Required. The repository to update.
1174    pub repository: std::option::Option<crate::model::Repository>,
1175
1176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1177}
1178
1179impl UpdateRepositoryRequest {
1180    pub fn new() -> Self {
1181        std::default::Default::default()
1182    }
1183
1184    /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1185    ///
1186    /// # Example
1187    /// ```ignore,no_run
1188    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1189    /// use wkt::FieldMask;
1190    /// let x = UpdateRepositoryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1191    /// ```
1192    pub fn set_update_mask<T>(mut self, v: T) -> Self
1193    where
1194        T: std::convert::Into<wkt::FieldMask>,
1195    {
1196        self.update_mask = std::option::Option::Some(v.into());
1197        self
1198    }
1199
1200    /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1201    ///
1202    /// # Example
1203    /// ```ignore,no_run
1204    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1205    /// use wkt::FieldMask;
1206    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1207    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1208    /// ```
1209    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1210    where
1211        T: std::convert::Into<wkt::FieldMask>,
1212    {
1213        self.update_mask = v.map(|x| x.into());
1214        self
1215    }
1216
1217    /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1218    ///
1219    /// # Example
1220    /// ```ignore,no_run
1221    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1222    /// use google_cloud_dataform_v1::model::Repository;
1223    /// let x = UpdateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1224    /// ```
1225    pub fn set_repository<T>(mut self, v: T) -> Self
1226    where
1227        T: std::convert::Into<crate::model::Repository>,
1228    {
1229        self.repository = std::option::Option::Some(v.into());
1230        self
1231    }
1232
1233    /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1234    ///
1235    /// # Example
1236    /// ```ignore,no_run
1237    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1238    /// use google_cloud_dataform_v1::model::Repository;
1239    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1240    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1241    /// ```
1242    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1243    where
1244        T: std::convert::Into<crate::model::Repository>,
1245    {
1246        self.repository = v.map(|x| x.into());
1247        self
1248    }
1249}
1250
1251impl wkt::message::Message for UpdateRepositoryRequest {
1252    fn typename() -> &'static str {
1253        "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
1254    }
1255}
1256
1257/// `DeleteRepository` request message.
1258#[derive(Clone, Default, PartialEq)]
1259#[non_exhaustive]
1260pub struct DeleteRepositoryRequest {
1261    /// Required. The repository's name.
1262    pub name: std::string::String,
1263
1264    /// Optional. If set to true, any child resources of this repository will also
1265    /// be deleted. (Otherwise, the request will only succeed if the repository has
1266    /// no child resources.)
1267    pub force: bool,
1268
1269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1270}
1271
1272impl DeleteRepositoryRequest {
1273    pub fn new() -> Self {
1274        std::default::Default::default()
1275    }
1276
1277    /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
1278    ///
1279    /// # Example
1280    /// ```ignore,no_run
1281    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1282    /// let x = DeleteRepositoryRequest::new().set_name("example");
1283    /// ```
1284    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1285        self.name = v.into();
1286        self
1287    }
1288
1289    /// Sets the value of [force][crate::model::DeleteRepositoryRequest::force].
1290    ///
1291    /// # Example
1292    /// ```ignore,no_run
1293    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1294    /// let x = DeleteRepositoryRequest::new().set_force(true);
1295    /// ```
1296    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1297        self.force = v.into();
1298        self
1299    }
1300}
1301
1302impl wkt::message::Message for DeleteRepositoryRequest {
1303    fn typename() -> &'static str {
1304        "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
1305    }
1306}
1307
1308/// `CommitRepositoryChanges` request message.
1309#[derive(Clone, Default, PartialEq)]
1310#[non_exhaustive]
1311pub struct CommitRepositoryChangesRequest {
1312    /// Required. The repository's name.
1313    pub name: std::string::String,
1314
1315    /// Required. The changes to commit to the repository.
1316    pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
1317
1318    /// Optional. The commit SHA which must be the repository's current HEAD before
1319    /// applying this commit; otherwise this request will fail. If unset, no
1320    /// validation on the current HEAD commit SHA is performed.
1321    pub required_head_commit_sha: std::string::String,
1322
1323    /// Optional. A map to the path of the file to the operation. The path is the
1324    /// full file path including filename, from repository root.
1325    pub file_operations: std::collections::HashMap<
1326        std::string::String,
1327        crate::model::commit_repository_changes_request::FileOperation,
1328    >,
1329
1330    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1331}
1332
1333impl CommitRepositoryChangesRequest {
1334    pub fn new() -> Self {
1335        std::default::Default::default()
1336    }
1337
1338    /// Sets the value of [name][crate::model::CommitRepositoryChangesRequest::name].
1339    ///
1340    /// # Example
1341    /// ```ignore,no_run
1342    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1343    /// let x = CommitRepositoryChangesRequest::new().set_name("example");
1344    /// ```
1345    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1346        self.name = v.into();
1347        self
1348    }
1349
1350    /// Sets the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1351    ///
1352    /// # Example
1353    /// ```ignore,no_run
1354    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1355    /// use google_cloud_dataform_v1::model::CommitMetadata;
1356    /// let x = CommitRepositoryChangesRequest::new().set_commit_metadata(CommitMetadata::default()/* use setters */);
1357    /// ```
1358    pub fn set_commit_metadata<T>(mut self, v: T) -> Self
1359    where
1360        T: std::convert::Into<crate::model::CommitMetadata>,
1361    {
1362        self.commit_metadata = std::option::Option::Some(v.into());
1363        self
1364    }
1365
1366    /// Sets or clears the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1367    ///
1368    /// # Example
1369    /// ```ignore,no_run
1370    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1371    /// use google_cloud_dataform_v1::model::CommitMetadata;
1372    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(Some(CommitMetadata::default()/* use setters */));
1373    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(None::<CommitMetadata>);
1374    /// ```
1375    pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
1376    where
1377        T: std::convert::Into<crate::model::CommitMetadata>,
1378    {
1379        self.commit_metadata = v.map(|x| x.into());
1380        self
1381    }
1382
1383    /// Sets the value of [required_head_commit_sha][crate::model::CommitRepositoryChangesRequest::required_head_commit_sha].
1384    ///
1385    /// # Example
1386    /// ```ignore,no_run
1387    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1388    /// let x = CommitRepositoryChangesRequest::new().set_required_head_commit_sha("example");
1389    /// ```
1390    pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
1391        mut self,
1392        v: T,
1393    ) -> Self {
1394        self.required_head_commit_sha = v.into();
1395        self
1396    }
1397
1398    /// Sets the value of [file_operations][crate::model::CommitRepositoryChangesRequest::file_operations].
1399    ///
1400    /// # Example
1401    /// ```ignore,no_run
1402    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1403    /// use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1404    /// let x = CommitRepositoryChangesRequest::new().set_file_operations([
1405    ///     ("key0", FileOperation::default()/* use setters */),
1406    ///     ("key1", FileOperation::default()/* use (different) setters */),
1407    /// ]);
1408    /// ```
1409    pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
1410    where
1411        T: std::iter::IntoIterator<Item = (K, V)>,
1412        K: std::convert::Into<std::string::String>,
1413        V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
1414    {
1415        use std::iter::Iterator;
1416        self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1417        self
1418    }
1419}
1420
1421impl wkt::message::Message for CommitRepositoryChangesRequest {
1422    fn typename() -> &'static str {
1423        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
1424    }
1425}
1426
1427/// Defines additional types related to [CommitRepositoryChangesRequest].
1428pub mod commit_repository_changes_request {
1429    #[allow(unused_imports)]
1430    use super::*;
1431
1432    /// Represents a single file operation to the repository.
1433    #[derive(Clone, Default, PartialEq)]
1434    #[non_exhaustive]
1435    pub struct FileOperation {
1436        /// The operation to perform on the file.
1437        pub operation: std::option::Option<
1438            crate::model::commit_repository_changes_request::file_operation::Operation,
1439        >,
1440
1441        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1442    }
1443
1444    impl FileOperation {
1445        pub fn new() -> Self {
1446            std::default::Default::default()
1447        }
1448
1449        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation].
1450        ///
1451        /// Note that all the setters affecting `operation` are mutually
1452        /// exclusive.
1453        ///
1454        /// # Example
1455        /// ```ignore,no_run
1456        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1457        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1458        /// let x = FileOperation::new().set_operation(Some(
1459        ///     google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::Operation::WriteFile(WriteFile::default().into())));
1460        /// ```
1461        pub fn set_operation<
1462            T: std::convert::Into<
1463                    std::option::Option<
1464                        crate::model::commit_repository_changes_request::file_operation::Operation,
1465                    >,
1466                >,
1467        >(
1468            mut self,
1469            v: T,
1470        ) -> Self {
1471            self.operation = v.into();
1472            self
1473        }
1474
1475        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1476        /// if it holds a `WriteFile`, `None` if the field is not set or
1477        /// holds a different branch.
1478        pub fn write_file(
1479            &self,
1480        ) -> std::option::Option<
1481            &std::boxed::Box<
1482                crate::model::commit_repository_changes_request::file_operation::WriteFile,
1483            >,
1484        > {
1485            #[allow(unreachable_patterns)]
1486            self.operation.as_ref().and_then(|v| match v {
1487                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
1488                _ => std::option::Option::None,
1489            })
1490        }
1491
1492        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1493        /// to hold a `WriteFile`.
1494        ///
1495        /// Note that all the setters affecting `operation` are
1496        /// mutually exclusive.
1497        ///
1498        /// # Example
1499        /// ```ignore,no_run
1500        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1501        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1502        /// let x = FileOperation::new().set_write_file(WriteFile::default()/* use setters */);
1503        /// assert!(x.write_file().is_some());
1504        /// assert!(x.delete_file().is_none());
1505        /// ```
1506        pub fn set_write_file<
1507            T: std::convert::Into<
1508                    std::boxed::Box<
1509                        crate::model::commit_repository_changes_request::file_operation::WriteFile,
1510                    >,
1511                >,
1512        >(
1513            mut self,
1514            v: T,
1515        ) -> Self {
1516            self.operation = std::option::Option::Some(
1517                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
1518                    v.into()
1519                )
1520            );
1521            self
1522        }
1523
1524        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1525        /// if it holds a `DeleteFile`, `None` if the field is not set or
1526        /// holds a different branch.
1527        pub fn delete_file(
1528            &self,
1529        ) -> std::option::Option<
1530            &std::boxed::Box<
1531                crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1532            >,
1533        > {
1534            #[allow(unreachable_patterns)]
1535            self.operation.as_ref().and_then(|v| match v {
1536                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
1537                _ => std::option::Option::None,
1538            })
1539        }
1540
1541        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1542        /// to hold a `DeleteFile`.
1543        ///
1544        /// Note that all the setters affecting `operation` are
1545        /// mutually exclusive.
1546        ///
1547        /// # Example
1548        /// ```ignore,no_run
1549        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1550        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::DeleteFile;
1551        /// let x = FileOperation::new().set_delete_file(DeleteFile::default()/* use setters */);
1552        /// assert!(x.delete_file().is_some());
1553        /// assert!(x.write_file().is_none());
1554        /// ```
1555        pub fn set_delete_file<
1556            T: std::convert::Into<
1557                    std::boxed::Box<
1558                        crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1559                    >,
1560                >,
1561        >(
1562            mut self,
1563            v: T,
1564        ) -> Self {
1565            self.operation = std::option::Option::Some(
1566                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
1567                    v.into()
1568                )
1569            );
1570            self
1571        }
1572    }
1573
1574    impl wkt::message::Message for FileOperation {
1575        fn typename() -> &'static str {
1576            "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
1577        }
1578    }
1579
1580    /// Defines additional types related to [FileOperation].
1581    pub mod file_operation {
1582        #[allow(unused_imports)]
1583        use super::*;
1584
1585        /// Represents the write file operation (for files added or modified).
1586        #[derive(Clone, Default, PartialEq)]
1587        #[non_exhaustive]
1588        pub struct WriteFile {
1589            /// The file's contents.
1590            pub contents: ::bytes::Bytes,
1591
1592            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1593        }
1594
1595        impl WriteFile {
1596            pub fn new() -> Self {
1597                std::default::Default::default()
1598            }
1599
1600            /// Sets the value of [contents][crate::model::commit_repository_changes_request::file_operation::WriteFile::contents].
1601            ///
1602            /// # Example
1603            /// ```ignore,no_run
1604            /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1605            /// let x = WriteFile::new().set_contents(bytes::Bytes::from_static(b"example"));
1606            /// ```
1607            pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1608                self.contents = v.into();
1609                self
1610            }
1611        }
1612
1613        impl wkt::message::Message for WriteFile {
1614            fn typename() -> &'static str {
1615                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
1616            }
1617        }
1618
1619        /// Represents the delete file operation.
1620        #[derive(Clone, Default, PartialEq)]
1621        #[non_exhaustive]
1622        pub struct DeleteFile {
1623            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1624        }
1625
1626        impl DeleteFile {
1627            pub fn new() -> Self {
1628                std::default::Default::default()
1629            }
1630        }
1631
1632        impl wkt::message::Message for DeleteFile {
1633            fn typename() -> &'static str {
1634                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
1635            }
1636        }
1637
1638        /// The operation to perform on the file.
1639        #[derive(Clone, Debug, PartialEq)]
1640        #[non_exhaustive]
1641        pub enum Operation {
1642            /// Represents the write operation.
1643            WriteFile(
1644                std::boxed::Box<
1645                    crate::model::commit_repository_changes_request::file_operation::WriteFile,
1646                >,
1647            ),
1648            /// Represents the delete operation.
1649            DeleteFile(
1650                std::boxed::Box<
1651                    crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1652                >,
1653            ),
1654        }
1655    }
1656}
1657
1658/// `CommitRepositoryChanges` response message.
1659#[derive(Clone, Default, PartialEq)]
1660#[non_exhaustive]
1661pub struct CommitRepositoryChangesResponse {
1662    /// The commit SHA of the current commit.
1663    pub commit_sha: std::string::String,
1664
1665    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1666}
1667
1668impl CommitRepositoryChangesResponse {
1669    pub fn new() -> Self {
1670        std::default::Default::default()
1671    }
1672
1673    /// Sets the value of [commit_sha][crate::model::CommitRepositoryChangesResponse::commit_sha].
1674    ///
1675    /// # Example
1676    /// ```ignore,no_run
1677    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesResponse;
1678    /// let x = CommitRepositoryChangesResponse::new().set_commit_sha("example");
1679    /// ```
1680    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1681        self.commit_sha = v.into();
1682        self
1683    }
1684}
1685
1686impl wkt::message::Message for CommitRepositoryChangesResponse {
1687    fn typename() -> &'static str {
1688        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
1689    }
1690}
1691
1692/// `ReadRepositoryFile` request message.
1693#[derive(Clone, Default, PartialEq)]
1694#[non_exhaustive]
1695pub struct ReadRepositoryFileRequest {
1696    /// Required. The repository's name.
1697    pub name: std::string::String,
1698
1699    /// Optional. The commit SHA for the commit to read from. If unset, the file
1700    /// will be read from HEAD.
1701    pub commit_sha: std::string::String,
1702
1703    /// Required. Full file path to read including filename, from repository root.
1704    pub path: std::string::String,
1705
1706    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1707}
1708
1709impl ReadRepositoryFileRequest {
1710    pub fn new() -> Self {
1711        std::default::Default::default()
1712    }
1713
1714    /// Sets the value of [name][crate::model::ReadRepositoryFileRequest::name].
1715    ///
1716    /// # Example
1717    /// ```ignore,no_run
1718    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1719    /// let x = ReadRepositoryFileRequest::new().set_name("example");
1720    /// ```
1721    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1722        self.name = v.into();
1723        self
1724    }
1725
1726    /// Sets the value of [commit_sha][crate::model::ReadRepositoryFileRequest::commit_sha].
1727    ///
1728    /// # Example
1729    /// ```ignore,no_run
1730    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1731    /// let x = ReadRepositoryFileRequest::new().set_commit_sha("example");
1732    /// ```
1733    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1734        self.commit_sha = v.into();
1735        self
1736    }
1737
1738    /// Sets the value of [path][crate::model::ReadRepositoryFileRequest::path].
1739    ///
1740    /// # Example
1741    /// ```ignore,no_run
1742    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1743    /// let x = ReadRepositoryFileRequest::new().set_path("example");
1744    /// ```
1745    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1746        self.path = v.into();
1747        self
1748    }
1749}
1750
1751impl wkt::message::Message for ReadRepositoryFileRequest {
1752    fn typename() -> &'static str {
1753        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
1754    }
1755}
1756
1757/// `ReadRepositoryFile` response message.
1758#[derive(Clone, Default, PartialEq)]
1759#[non_exhaustive]
1760pub struct ReadRepositoryFileResponse {
1761    /// The file's contents.
1762    pub contents: ::bytes::Bytes,
1763
1764    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1765}
1766
1767impl ReadRepositoryFileResponse {
1768    pub fn new() -> Self {
1769        std::default::Default::default()
1770    }
1771
1772    /// Sets the value of [contents][crate::model::ReadRepositoryFileResponse::contents].
1773    ///
1774    /// # Example
1775    /// ```ignore,no_run
1776    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileResponse;
1777    /// let x = ReadRepositoryFileResponse::new().set_contents(bytes::Bytes::from_static(b"example"));
1778    /// ```
1779    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1780        self.contents = v.into();
1781        self
1782    }
1783}
1784
1785impl wkt::message::Message for ReadRepositoryFileResponse {
1786    fn typename() -> &'static str {
1787        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
1788    }
1789}
1790
1791/// `QueryRepositoryDirectoryContents` request message.
1792#[derive(Clone, Default, PartialEq)]
1793#[non_exhaustive]
1794pub struct QueryRepositoryDirectoryContentsRequest {
1795    /// Required. The repository's name.
1796    pub name: std::string::String,
1797
1798    /// Optional. The Commit SHA for the commit to query from. If unset, the
1799    /// directory will be queried from HEAD.
1800    pub commit_sha: std::string::String,
1801
1802    /// Optional. The directory's full path including directory name, relative to
1803    /// root. If left unset, the root is used.
1804    pub path: std::string::String,
1805
1806    /// Optional. Maximum number of paths to return. The server may return fewer
1807    /// items than requested. If unspecified, the server will pick an appropriate
1808    /// default.
1809    pub page_size: i32,
1810
1811    /// Optional. Page token received from a previous
1812    /// `QueryRepositoryDirectoryContents` call. Provide this to retrieve the
1813    /// subsequent page.
1814    ///
1815    /// When paginating, all other parameters provided to
1816    /// `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must
1817    /// match the call that provided the page token.
1818    pub page_token: std::string::String,
1819
1820    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1821}
1822
1823impl QueryRepositoryDirectoryContentsRequest {
1824    pub fn new() -> Self {
1825        std::default::Default::default()
1826    }
1827
1828    /// Sets the value of [name][crate::model::QueryRepositoryDirectoryContentsRequest::name].
1829    ///
1830    /// # Example
1831    /// ```ignore,no_run
1832    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1833    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_name("example");
1834    /// ```
1835    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1836        self.name = v.into();
1837        self
1838    }
1839
1840    /// Sets the value of [commit_sha][crate::model::QueryRepositoryDirectoryContentsRequest::commit_sha].
1841    ///
1842    /// # Example
1843    /// ```ignore,no_run
1844    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1845    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_commit_sha("example");
1846    /// ```
1847    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1848        self.commit_sha = v.into();
1849        self
1850    }
1851
1852    /// Sets the value of [path][crate::model::QueryRepositoryDirectoryContentsRequest::path].
1853    ///
1854    /// # Example
1855    /// ```ignore,no_run
1856    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1857    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_path("example");
1858    /// ```
1859    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1860        self.path = v.into();
1861        self
1862    }
1863
1864    /// Sets the value of [page_size][crate::model::QueryRepositoryDirectoryContentsRequest::page_size].
1865    ///
1866    /// # Example
1867    /// ```ignore,no_run
1868    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1869    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_size(42);
1870    /// ```
1871    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1872        self.page_size = v.into();
1873        self
1874    }
1875
1876    /// Sets the value of [page_token][crate::model::QueryRepositoryDirectoryContentsRequest::page_token].
1877    ///
1878    /// # Example
1879    /// ```ignore,no_run
1880    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
1881    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_token("example");
1882    /// ```
1883    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1884        self.page_token = v.into();
1885        self
1886    }
1887}
1888
1889impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
1890    fn typename() -> &'static str {
1891        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
1892    }
1893}
1894
1895/// `QueryRepositoryDirectoryContents` response message.
1896#[derive(Clone, Default, PartialEq)]
1897#[non_exhaustive]
1898pub struct QueryRepositoryDirectoryContentsResponse {
1899    /// List of entries in the directory.
1900    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
1901
1902    /// A token, which can be sent as `page_token` to retrieve the next page.
1903    /// If this field is omitted, there are no subsequent pages.
1904    pub next_page_token: std::string::String,
1905
1906    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1907}
1908
1909impl QueryRepositoryDirectoryContentsResponse {
1910    pub fn new() -> Self {
1911        std::default::Default::default()
1912    }
1913
1914    /// Sets the value of [directory_entries][crate::model::QueryRepositoryDirectoryContentsResponse::directory_entries].
1915    ///
1916    /// # Example
1917    /// ```ignore,no_run
1918    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
1919    /// use google_cloud_dataform_v1::model::DirectoryEntry;
1920    /// let x = QueryRepositoryDirectoryContentsResponse::new()
1921    ///     .set_directory_entries([
1922    ///         DirectoryEntry::default()/* use setters */,
1923    ///         DirectoryEntry::default()/* use (different) setters */,
1924    ///     ]);
1925    /// ```
1926    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
1927    where
1928        T: std::iter::IntoIterator<Item = V>,
1929        V: std::convert::Into<crate::model::DirectoryEntry>,
1930    {
1931        use std::iter::Iterator;
1932        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
1933        self
1934    }
1935
1936    /// Sets the value of [next_page_token][crate::model::QueryRepositoryDirectoryContentsResponse::next_page_token].
1937    ///
1938    /// # Example
1939    /// ```ignore,no_run
1940    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
1941    /// let x = QueryRepositoryDirectoryContentsResponse::new().set_next_page_token("example");
1942    /// ```
1943    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1944        self.next_page_token = v.into();
1945        self
1946    }
1947}
1948
1949impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
1950    fn typename() -> &'static str {
1951        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
1952    }
1953}
1954
1955#[doc(hidden)]
1956impl google_cloud_gax::paginator::internal::PageableResponse
1957    for QueryRepositoryDirectoryContentsResponse
1958{
1959    type PageItem = crate::model::DirectoryEntry;
1960
1961    fn items(self) -> std::vec::Vec<Self::PageItem> {
1962        self.directory_entries
1963    }
1964
1965    fn next_page_token(&self) -> std::string::String {
1966        use std::clone::Clone;
1967        self.next_page_token.clone()
1968    }
1969}
1970
1971/// `FetchRepositoryHistory` request message.
1972#[derive(Clone, Default, PartialEq)]
1973#[non_exhaustive]
1974pub struct FetchRepositoryHistoryRequest {
1975    /// Required. The repository's name.
1976    pub name: std::string::String,
1977
1978    /// Optional. Maximum number of commits to return. The server may return fewer
1979    /// items than requested. If unspecified, the server will pick an appropriate
1980    /// default.
1981    pub page_size: i32,
1982
1983    /// Optional. Page token received from a previous `FetchRepositoryHistory`
1984    /// call. Provide this to retrieve the subsequent page.
1985    ///
1986    /// When paginating, all other parameters provided to `FetchRepositoryHistory`,
1987    /// with the exception of `page_size`, must match the call that provided the
1988    /// page token.
1989    pub page_token: std::string::String,
1990
1991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1992}
1993
1994impl FetchRepositoryHistoryRequest {
1995    pub fn new() -> Self {
1996        std::default::Default::default()
1997    }
1998
1999    /// Sets the value of [name][crate::model::FetchRepositoryHistoryRequest::name].
2000    ///
2001    /// # Example
2002    /// ```ignore,no_run
2003    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2004    /// let x = FetchRepositoryHistoryRequest::new().set_name("example");
2005    /// ```
2006    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2007        self.name = v.into();
2008        self
2009    }
2010
2011    /// Sets the value of [page_size][crate::model::FetchRepositoryHistoryRequest::page_size].
2012    ///
2013    /// # Example
2014    /// ```ignore,no_run
2015    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2016    /// let x = FetchRepositoryHistoryRequest::new().set_page_size(42);
2017    /// ```
2018    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2019        self.page_size = v.into();
2020        self
2021    }
2022
2023    /// Sets the value of [page_token][crate::model::FetchRepositoryHistoryRequest::page_token].
2024    ///
2025    /// # Example
2026    /// ```ignore,no_run
2027    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2028    /// let x = FetchRepositoryHistoryRequest::new().set_page_token("example");
2029    /// ```
2030    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2031        self.page_token = v.into();
2032        self
2033    }
2034}
2035
2036impl wkt::message::Message for FetchRepositoryHistoryRequest {
2037    fn typename() -> &'static str {
2038        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
2039    }
2040}
2041
2042/// `FetchRepositoryHistory` response message.
2043#[derive(Clone, Default, PartialEq)]
2044#[non_exhaustive]
2045pub struct FetchRepositoryHistoryResponse {
2046    /// A list of commit logs, ordered by 'git log' default order.
2047    pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
2048
2049    /// A token, which can be sent as `page_token` to retrieve the next page.
2050    /// If this field is omitted, there are no subsequent pages.
2051    pub next_page_token: std::string::String,
2052
2053    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2054}
2055
2056impl FetchRepositoryHistoryResponse {
2057    pub fn new() -> Self {
2058        std::default::Default::default()
2059    }
2060
2061    /// Sets the value of [commits][crate::model::FetchRepositoryHistoryResponse::commits].
2062    ///
2063    /// # Example
2064    /// ```ignore,no_run
2065    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2066    /// use google_cloud_dataform_v1::model::CommitLogEntry;
2067    /// let x = FetchRepositoryHistoryResponse::new()
2068    ///     .set_commits([
2069    ///         CommitLogEntry::default()/* use setters */,
2070    ///         CommitLogEntry::default()/* use (different) setters */,
2071    ///     ]);
2072    /// ```
2073    pub fn set_commits<T, V>(mut self, v: T) -> Self
2074    where
2075        T: std::iter::IntoIterator<Item = V>,
2076        V: std::convert::Into<crate::model::CommitLogEntry>,
2077    {
2078        use std::iter::Iterator;
2079        self.commits = v.into_iter().map(|i| i.into()).collect();
2080        self
2081    }
2082
2083    /// Sets the value of [next_page_token][crate::model::FetchRepositoryHistoryResponse::next_page_token].
2084    ///
2085    /// # Example
2086    /// ```ignore,no_run
2087    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2088    /// let x = FetchRepositoryHistoryResponse::new().set_next_page_token("example");
2089    /// ```
2090    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2091        self.next_page_token = v.into();
2092        self
2093    }
2094}
2095
2096impl wkt::message::Message for FetchRepositoryHistoryResponse {
2097    fn typename() -> &'static str {
2098        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
2099    }
2100}
2101
2102#[doc(hidden)]
2103impl google_cloud_gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
2104    type PageItem = crate::model::CommitLogEntry;
2105
2106    fn items(self) -> std::vec::Vec<Self::PageItem> {
2107        self.commits
2108    }
2109
2110    fn next_page_token(&self) -> std::string::String {
2111        use std::clone::Clone;
2112        self.next_page_token.clone()
2113    }
2114}
2115
2116/// Represents a single commit log.
2117#[derive(Clone, Default, PartialEq)]
2118#[non_exhaustive]
2119pub struct CommitLogEntry {
2120    /// Commit timestamp.
2121    pub commit_time: std::option::Option<wkt::Timestamp>,
2122
2123    /// The commit SHA for this commit log entry.
2124    pub commit_sha: std::string::String,
2125
2126    /// The commit author for this commit log entry.
2127    pub author: std::option::Option<crate::model::CommitAuthor>,
2128
2129    /// The commit message for this commit log entry.
2130    pub commit_message: std::string::String,
2131
2132    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2133}
2134
2135impl CommitLogEntry {
2136    pub fn new() -> Self {
2137        std::default::Default::default()
2138    }
2139
2140    /// Sets the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2141    ///
2142    /// # Example
2143    /// ```ignore,no_run
2144    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2145    /// use wkt::Timestamp;
2146    /// let x = CommitLogEntry::new().set_commit_time(Timestamp::default()/* use setters */);
2147    /// ```
2148    pub fn set_commit_time<T>(mut self, v: T) -> Self
2149    where
2150        T: std::convert::Into<wkt::Timestamp>,
2151    {
2152        self.commit_time = std::option::Option::Some(v.into());
2153        self
2154    }
2155
2156    /// Sets or clears the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2157    ///
2158    /// # Example
2159    /// ```ignore,no_run
2160    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2161    /// use wkt::Timestamp;
2162    /// let x = CommitLogEntry::new().set_or_clear_commit_time(Some(Timestamp::default()/* use setters */));
2163    /// let x = CommitLogEntry::new().set_or_clear_commit_time(None::<Timestamp>);
2164    /// ```
2165    pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
2166    where
2167        T: std::convert::Into<wkt::Timestamp>,
2168    {
2169        self.commit_time = v.map(|x| x.into());
2170        self
2171    }
2172
2173    /// Sets the value of [commit_sha][crate::model::CommitLogEntry::commit_sha].
2174    ///
2175    /// # Example
2176    /// ```ignore,no_run
2177    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2178    /// let x = CommitLogEntry::new().set_commit_sha("example");
2179    /// ```
2180    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2181        self.commit_sha = v.into();
2182        self
2183    }
2184
2185    /// Sets the value of [author][crate::model::CommitLogEntry::author].
2186    ///
2187    /// # Example
2188    /// ```ignore,no_run
2189    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2190    /// use google_cloud_dataform_v1::model::CommitAuthor;
2191    /// let x = CommitLogEntry::new().set_author(CommitAuthor::default()/* use setters */);
2192    /// ```
2193    pub fn set_author<T>(mut self, v: T) -> Self
2194    where
2195        T: std::convert::Into<crate::model::CommitAuthor>,
2196    {
2197        self.author = std::option::Option::Some(v.into());
2198        self
2199    }
2200
2201    /// Sets or clears the value of [author][crate::model::CommitLogEntry::author].
2202    ///
2203    /// # Example
2204    /// ```ignore,no_run
2205    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2206    /// use google_cloud_dataform_v1::model::CommitAuthor;
2207    /// let x = CommitLogEntry::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2208    /// let x = CommitLogEntry::new().set_or_clear_author(None::<CommitAuthor>);
2209    /// ```
2210    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2211    where
2212        T: std::convert::Into<crate::model::CommitAuthor>,
2213    {
2214        self.author = v.map(|x| x.into());
2215        self
2216    }
2217
2218    /// Sets the value of [commit_message][crate::model::CommitLogEntry::commit_message].
2219    ///
2220    /// # Example
2221    /// ```ignore,no_run
2222    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2223    /// let x = CommitLogEntry::new().set_commit_message("example");
2224    /// ```
2225    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2226        self.commit_message = v.into();
2227        self
2228    }
2229}
2230
2231impl wkt::message::Message for CommitLogEntry {
2232    fn typename() -> &'static str {
2233        "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
2234    }
2235}
2236
2237/// Represents a Dataform Git commit.
2238#[derive(Clone, Default, PartialEq)]
2239#[non_exhaustive]
2240pub struct CommitMetadata {
2241    /// Required. The commit's author.
2242    pub author: std::option::Option<crate::model::CommitAuthor>,
2243
2244    /// Optional. The commit's message.
2245    pub commit_message: std::string::String,
2246
2247    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2248}
2249
2250impl CommitMetadata {
2251    pub fn new() -> Self {
2252        std::default::Default::default()
2253    }
2254
2255    /// Sets the value of [author][crate::model::CommitMetadata::author].
2256    ///
2257    /// # Example
2258    /// ```ignore,no_run
2259    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2260    /// use google_cloud_dataform_v1::model::CommitAuthor;
2261    /// let x = CommitMetadata::new().set_author(CommitAuthor::default()/* use setters */);
2262    /// ```
2263    pub fn set_author<T>(mut self, v: T) -> Self
2264    where
2265        T: std::convert::Into<crate::model::CommitAuthor>,
2266    {
2267        self.author = std::option::Option::Some(v.into());
2268        self
2269    }
2270
2271    /// Sets or clears the value of [author][crate::model::CommitMetadata::author].
2272    ///
2273    /// # Example
2274    /// ```ignore,no_run
2275    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2276    /// use google_cloud_dataform_v1::model::CommitAuthor;
2277    /// let x = CommitMetadata::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2278    /// let x = CommitMetadata::new().set_or_clear_author(None::<CommitAuthor>);
2279    /// ```
2280    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2281    where
2282        T: std::convert::Into<crate::model::CommitAuthor>,
2283    {
2284        self.author = v.map(|x| x.into());
2285        self
2286    }
2287
2288    /// Sets the value of [commit_message][crate::model::CommitMetadata::commit_message].
2289    ///
2290    /// # Example
2291    /// ```ignore,no_run
2292    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2293    /// let x = CommitMetadata::new().set_commit_message("example");
2294    /// ```
2295    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2296        self.commit_message = v.into();
2297        self
2298    }
2299}
2300
2301impl wkt::message::Message for CommitMetadata {
2302    fn typename() -> &'static str {
2303        "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
2304    }
2305}
2306
2307/// `ComputeRepositoryAccessTokenStatus` request message.
2308#[derive(Clone, Default, PartialEq)]
2309#[non_exhaustive]
2310pub struct ComputeRepositoryAccessTokenStatusRequest {
2311    /// Required. The repository's name.
2312    pub name: std::string::String,
2313
2314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2315}
2316
2317impl ComputeRepositoryAccessTokenStatusRequest {
2318    pub fn new() -> Self {
2319        std::default::Default::default()
2320    }
2321
2322    /// Sets the value of [name][crate::model::ComputeRepositoryAccessTokenStatusRequest::name].
2323    ///
2324    /// # Example
2325    /// ```ignore,no_run
2326    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusRequest;
2327    /// let x = ComputeRepositoryAccessTokenStatusRequest::new().set_name("example");
2328    /// ```
2329    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2330        self.name = v.into();
2331        self
2332    }
2333}
2334
2335impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
2336    fn typename() -> &'static str {
2337        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
2338    }
2339}
2340
2341/// `ComputeRepositoryAccessTokenStatus` response message.
2342#[derive(Clone, Default, PartialEq)]
2343#[non_exhaustive]
2344pub struct ComputeRepositoryAccessTokenStatusResponse {
2345    /// Indicates the status of the Git access token.
2346    pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
2347
2348    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2349}
2350
2351impl ComputeRepositoryAccessTokenStatusResponse {
2352    pub fn new() -> Self {
2353        std::default::Default::default()
2354    }
2355
2356    /// Sets the value of [token_status][crate::model::ComputeRepositoryAccessTokenStatusResponse::token_status].
2357    ///
2358    /// # Example
2359    /// ```ignore,no_run
2360    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusResponse;
2361    /// use google_cloud_dataform_v1::model::compute_repository_access_token_status_response::TokenStatus;
2362    /// let x0 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::NotFound);
2363    /// let x1 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Invalid);
2364    /// let x2 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Valid);
2365    /// ```
2366    pub fn set_token_status<
2367        T: std::convert::Into<
2368                crate::model::compute_repository_access_token_status_response::TokenStatus,
2369            >,
2370    >(
2371        mut self,
2372        v: T,
2373    ) -> Self {
2374        self.token_status = v.into();
2375        self
2376    }
2377}
2378
2379impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
2380    fn typename() -> &'static str {
2381        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
2382    }
2383}
2384
2385/// Defines additional types related to [ComputeRepositoryAccessTokenStatusResponse].
2386pub mod compute_repository_access_token_status_response {
2387    #[allow(unused_imports)]
2388    use super::*;
2389
2390    /// Indicates the status of a Git authentication token.
2391    ///
2392    /// # Working with unknown values
2393    ///
2394    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2395    /// additional enum variants at any time. Adding new variants is not considered
2396    /// a breaking change. Applications should write their code in anticipation of:
2397    ///
2398    /// - New values appearing in future releases of the client library, **and**
2399    /// - New values received dynamically, without application changes.
2400    ///
2401    /// Please consult the [Working with enums] section in the user guide for some
2402    /// guidelines.
2403    ///
2404    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2405    #[derive(Clone, Debug, PartialEq)]
2406    #[non_exhaustive]
2407    pub enum TokenStatus {
2408        /// Default value. This value is unused.
2409        Unspecified,
2410        /// The token could not be found in Secret Manager (or the Dataform
2411        /// Service Account did not have permission to access it).
2412        NotFound,
2413        /// The token could not be used to authenticate against the Git remote.
2414        Invalid,
2415        /// The token was used successfully to authenticate against the Git remote.
2416        Valid,
2417        /// If set, the enum was initialized with an unknown value.
2418        ///
2419        /// Applications can examine the value using [TokenStatus::value] or
2420        /// [TokenStatus::name].
2421        UnknownValue(token_status::UnknownValue),
2422    }
2423
2424    #[doc(hidden)]
2425    pub mod token_status {
2426        #[allow(unused_imports)]
2427        use super::*;
2428        #[derive(Clone, Debug, PartialEq)]
2429        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2430    }
2431
2432    impl TokenStatus {
2433        /// Gets the enum value.
2434        ///
2435        /// Returns `None` if the enum contains an unknown value deserialized from
2436        /// the string representation of enums.
2437        pub fn value(&self) -> std::option::Option<i32> {
2438            match self {
2439                Self::Unspecified => std::option::Option::Some(0),
2440                Self::NotFound => std::option::Option::Some(1),
2441                Self::Invalid => std::option::Option::Some(2),
2442                Self::Valid => std::option::Option::Some(3),
2443                Self::UnknownValue(u) => u.0.value(),
2444            }
2445        }
2446
2447        /// Gets the enum value as a string.
2448        ///
2449        /// Returns `None` if the enum contains an unknown value deserialized from
2450        /// the integer representation of enums.
2451        pub fn name(&self) -> std::option::Option<&str> {
2452            match self {
2453                Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
2454                Self::NotFound => std::option::Option::Some("NOT_FOUND"),
2455                Self::Invalid => std::option::Option::Some("INVALID"),
2456                Self::Valid => std::option::Option::Some("VALID"),
2457                Self::UnknownValue(u) => u.0.name(),
2458            }
2459        }
2460    }
2461
2462    impl std::default::Default for TokenStatus {
2463        fn default() -> Self {
2464            use std::convert::From;
2465            Self::from(0)
2466        }
2467    }
2468
2469    impl std::fmt::Display for TokenStatus {
2470        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2471            wkt::internal::display_enum(f, self.name(), self.value())
2472        }
2473    }
2474
2475    impl std::convert::From<i32> for TokenStatus {
2476        fn from(value: i32) -> Self {
2477            match value {
2478                0 => Self::Unspecified,
2479                1 => Self::NotFound,
2480                2 => Self::Invalid,
2481                3 => Self::Valid,
2482                _ => Self::UnknownValue(token_status::UnknownValue(
2483                    wkt::internal::UnknownEnumValue::Integer(value),
2484                )),
2485            }
2486        }
2487    }
2488
2489    impl std::convert::From<&str> for TokenStatus {
2490        fn from(value: &str) -> Self {
2491            use std::string::ToString;
2492            match value {
2493                "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
2494                "NOT_FOUND" => Self::NotFound,
2495                "INVALID" => Self::Invalid,
2496                "VALID" => Self::Valid,
2497                _ => Self::UnknownValue(token_status::UnknownValue(
2498                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2499                )),
2500            }
2501        }
2502    }
2503
2504    impl serde::ser::Serialize for TokenStatus {
2505        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2506        where
2507            S: serde::Serializer,
2508        {
2509            match self {
2510                Self::Unspecified => serializer.serialize_i32(0),
2511                Self::NotFound => serializer.serialize_i32(1),
2512                Self::Invalid => serializer.serialize_i32(2),
2513                Self::Valid => serializer.serialize_i32(3),
2514                Self::UnknownValue(u) => u.0.serialize(serializer),
2515            }
2516        }
2517    }
2518
2519    impl<'de> serde::de::Deserialize<'de> for TokenStatus {
2520        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2521        where
2522            D: serde::Deserializer<'de>,
2523        {
2524            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
2525                ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
2526            ))
2527        }
2528    }
2529}
2530
2531/// `FetchRemoteBranches` request message.
2532#[derive(Clone, Default, PartialEq)]
2533#[non_exhaustive]
2534pub struct FetchRemoteBranchesRequest {
2535    /// Required. The repository's name.
2536    pub name: std::string::String,
2537
2538    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2539}
2540
2541impl FetchRemoteBranchesRequest {
2542    pub fn new() -> Self {
2543        std::default::Default::default()
2544    }
2545
2546    /// Sets the value of [name][crate::model::FetchRemoteBranchesRequest::name].
2547    ///
2548    /// # Example
2549    /// ```ignore,no_run
2550    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesRequest;
2551    /// let x = FetchRemoteBranchesRequest::new().set_name("example");
2552    /// ```
2553    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2554        self.name = v.into();
2555        self
2556    }
2557}
2558
2559impl wkt::message::Message for FetchRemoteBranchesRequest {
2560    fn typename() -> &'static str {
2561        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
2562    }
2563}
2564
2565/// `FetchRemoteBranches` response message.
2566#[derive(Clone, Default, PartialEq)]
2567#[non_exhaustive]
2568pub struct FetchRemoteBranchesResponse {
2569    /// The remote repository's branch names.
2570    pub branches: std::vec::Vec<std::string::String>,
2571
2572    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2573}
2574
2575impl FetchRemoteBranchesResponse {
2576    pub fn new() -> Self {
2577        std::default::Default::default()
2578    }
2579
2580    /// Sets the value of [branches][crate::model::FetchRemoteBranchesResponse::branches].
2581    ///
2582    /// # Example
2583    /// ```ignore,no_run
2584    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesResponse;
2585    /// let x = FetchRemoteBranchesResponse::new().set_branches(["a", "b", "c"]);
2586    /// ```
2587    pub fn set_branches<T, V>(mut self, v: T) -> Self
2588    where
2589        T: std::iter::IntoIterator<Item = V>,
2590        V: std::convert::Into<std::string::String>,
2591    {
2592        use std::iter::Iterator;
2593        self.branches = v.into_iter().map(|i| i.into()).collect();
2594        self
2595    }
2596}
2597
2598impl wkt::message::Message for FetchRemoteBranchesResponse {
2599    fn typename() -> &'static str {
2600        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
2601    }
2602}
2603
2604/// Represents a Dataform Git workspace.
2605#[derive(Clone, Default, PartialEq)]
2606#[non_exhaustive]
2607pub struct Workspace {
2608    /// Identifier. The workspace's name.
2609    pub name: std::string::String,
2610
2611    /// Output only. The timestamp of when the workspace was created.
2612    pub create_time: std::option::Option<wkt::Timestamp>,
2613
2614    /// Output only. A data encryption state of a Git repository if this Workspace
2615    /// is protected by a KMS key.
2616    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
2617
2618    /// Output only. All the metadata information that is used internally to serve
2619    /// the resource. For example: timestamps, flags, status fields, etc. The
2620    /// format of this field is a JSON string.
2621    pub internal_metadata: std::option::Option<std::string::String>,
2622
2623    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2624}
2625
2626impl Workspace {
2627    pub fn new() -> Self {
2628        std::default::Default::default()
2629    }
2630
2631    /// Sets the value of [name][crate::model::Workspace::name].
2632    ///
2633    /// # Example
2634    /// ```ignore,no_run
2635    /// # use google_cloud_dataform_v1::model::Workspace;
2636    /// let x = Workspace::new().set_name("example");
2637    /// ```
2638    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2639        self.name = v.into();
2640        self
2641    }
2642
2643    /// Sets the value of [create_time][crate::model::Workspace::create_time].
2644    ///
2645    /// # Example
2646    /// ```ignore,no_run
2647    /// # use google_cloud_dataform_v1::model::Workspace;
2648    /// use wkt::Timestamp;
2649    /// let x = Workspace::new().set_create_time(Timestamp::default()/* use setters */);
2650    /// ```
2651    pub fn set_create_time<T>(mut self, v: T) -> Self
2652    where
2653        T: std::convert::Into<wkt::Timestamp>,
2654    {
2655        self.create_time = std::option::Option::Some(v.into());
2656        self
2657    }
2658
2659    /// Sets or clears the value of [create_time][crate::model::Workspace::create_time].
2660    ///
2661    /// # Example
2662    /// ```ignore,no_run
2663    /// # use google_cloud_dataform_v1::model::Workspace;
2664    /// use wkt::Timestamp;
2665    /// let x = Workspace::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2666    /// let x = Workspace::new().set_or_clear_create_time(None::<Timestamp>);
2667    /// ```
2668    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2669    where
2670        T: std::convert::Into<wkt::Timestamp>,
2671    {
2672        self.create_time = v.map(|x| x.into());
2673        self
2674    }
2675
2676    /// Sets the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2677    ///
2678    /// # Example
2679    /// ```ignore,no_run
2680    /// # use google_cloud_dataform_v1::model::Workspace;
2681    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2682    /// let x = Workspace::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
2683    /// ```
2684    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
2685    where
2686        T: std::convert::Into<crate::model::DataEncryptionState>,
2687    {
2688        self.data_encryption_state = std::option::Option::Some(v.into());
2689        self
2690    }
2691
2692    /// Sets or clears the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2693    ///
2694    /// # Example
2695    /// ```ignore,no_run
2696    /// # use google_cloud_dataform_v1::model::Workspace;
2697    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2698    /// let x = Workspace::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
2699    /// let x = Workspace::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
2700    /// ```
2701    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
2702    where
2703        T: std::convert::Into<crate::model::DataEncryptionState>,
2704    {
2705        self.data_encryption_state = v.map(|x| x.into());
2706        self
2707    }
2708
2709    /// Sets the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2710    ///
2711    /// # Example
2712    /// ```ignore,no_run
2713    /// # use google_cloud_dataform_v1::model::Workspace;
2714    /// let x = Workspace::new().set_internal_metadata("example");
2715    /// ```
2716    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
2717    where
2718        T: std::convert::Into<std::string::String>,
2719    {
2720        self.internal_metadata = std::option::Option::Some(v.into());
2721        self
2722    }
2723
2724    /// Sets or clears the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2725    ///
2726    /// # Example
2727    /// ```ignore,no_run
2728    /// # use google_cloud_dataform_v1::model::Workspace;
2729    /// let x = Workspace::new().set_or_clear_internal_metadata(Some("example"));
2730    /// let x = Workspace::new().set_or_clear_internal_metadata(None::<String>);
2731    /// ```
2732    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2733    where
2734        T: std::convert::Into<std::string::String>,
2735    {
2736        self.internal_metadata = v.map(|x| x.into());
2737        self
2738    }
2739}
2740
2741impl wkt::message::Message for Workspace {
2742    fn typename() -> &'static str {
2743        "type.googleapis.com/google.cloud.dataform.v1.Workspace"
2744    }
2745}
2746
2747/// `ListWorkspaces` request message.
2748#[derive(Clone, Default, PartialEq)]
2749#[non_exhaustive]
2750pub struct ListWorkspacesRequest {
2751    /// Required. The repository in which to list workspaces. Must be in the
2752    /// format `projects/*/locations/*/repositories/*`.
2753    pub parent: std::string::String,
2754
2755    /// Optional. Maximum number of workspaces to return. The server may return
2756    /// fewer items than requested. If unspecified, the server will pick an
2757    /// appropriate default.
2758    pub page_size: i32,
2759
2760    /// Optional. Page token received from a previous `ListWorkspaces` call.
2761    /// Provide this to retrieve the subsequent page.
2762    ///
2763    /// When paginating, all other parameters provided to `ListWorkspaces`, with
2764    /// the exception of `page_size`, must match the call that provided the page
2765    /// token.
2766    pub page_token: std::string::String,
2767
2768    /// Optional. This field only supports ordering by `name`. If unspecified, the
2769    /// server will choose the ordering. If specified, the default order is
2770    /// ascending for the `name` field.
2771    pub order_by: std::string::String,
2772
2773    /// Optional. Filter for the returned list.
2774    pub filter: std::string::String,
2775
2776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2777}
2778
2779impl ListWorkspacesRequest {
2780    pub fn new() -> Self {
2781        std::default::Default::default()
2782    }
2783
2784    /// Sets the value of [parent][crate::model::ListWorkspacesRequest::parent].
2785    ///
2786    /// # Example
2787    /// ```ignore,no_run
2788    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2789    /// let x = ListWorkspacesRequest::new().set_parent("example");
2790    /// ```
2791    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2792        self.parent = v.into();
2793        self
2794    }
2795
2796    /// Sets the value of [page_size][crate::model::ListWorkspacesRequest::page_size].
2797    ///
2798    /// # Example
2799    /// ```ignore,no_run
2800    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2801    /// let x = ListWorkspacesRequest::new().set_page_size(42);
2802    /// ```
2803    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2804        self.page_size = v.into();
2805        self
2806    }
2807
2808    /// Sets the value of [page_token][crate::model::ListWorkspacesRequest::page_token].
2809    ///
2810    /// # Example
2811    /// ```ignore,no_run
2812    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2813    /// let x = ListWorkspacesRequest::new().set_page_token("example");
2814    /// ```
2815    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2816        self.page_token = v.into();
2817        self
2818    }
2819
2820    /// Sets the value of [order_by][crate::model::ListWorkspacesRequest::order_by].
2821    ///
2822    /// # Example
2823    /// ```ignore,no_run
2824    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2825    /// let x = ListWorkspacesRequest::new().set_order_by("example");
2826    /// ```
2827    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2828        self.order_by = v.into();
2829        self
2830    }
2831
2832    /// Sets the value of [filter][crate::model::ListWorkspacesRequest::filter].
2833    ///
2834    /// # Example
2835    /// ```ignore,no_run
2836    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
2837    /// let x = ListWorkspacesRequest::new().set_filter("example");
2838    /// ```
2839    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2840        self.filter = v.into();
2841        self
2842    }
2843}
2844
2845impl wkt::message::Message for ListWorkspacesRequest {
2846    fn typename() -> &'static str {
2847        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
2848    }
2849}
2850
2851/// `ListWorkspaces` response message.
2852#[derive(Clone, Default, PartialEq)]
2853#[non_exhaustive]
2854pub struct ListWorkspacesResponse {
2855    /// List of workspaces.
2856    pub workspaces: std::vec::Vec<crate::model::Workspace>,
2857
2858    /// A token, which can be sent as `page_token` to retrieve the next page.
2859    /// If this field is omitted, there are no subsequent pages.
2860    pub next_page_token: std::string::String,
2861
2862    /// Locations which could not be reached.
2863    pub unreachable: std::vec::Vec<std::string::String>,
2864
2865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2866}
2867
2868impl ListWorkspacesResponse {
2869    pub fn new() -> Self {
2870        std::default::Default::default()
2871    }
2872
2873    /// Sets the value of [workspaces][crate::model::ListWorkspacesResponse::workspaces].
2874    ///
2875    /// # Example
2876    /// ```ignore,no_run
2877    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
2878    /// use google_cloud_dataform_v1::model::Workspace;
2879    /// let x = ListWorkspacesResponse::new()
2880    ///     .set_workspaces([
2881    ///         Workspace::default()/* use setters */,
2882    ///         Workspace::default()/* use (different) setters */,
2883    ///     ]);
2884    /// ```
2885    pub fn set_workspaces<T, V>(mut self, v: T) -> Self
2886    where
2887        T: std::iter::IntoIterator<Item = V>,
2888        V: std::convert::Into<crate::model::Workspace>,
2889    {
2890        use std::iter::Iterator;
2891        self.workspaces = v.into_iter().map(|i| i.into()).collect();
2892        self
2893    }
2894
2895    /// Sets the value of [next_page_token][crate::model::ListWorkspacesResponse::next_page_token].
2896    ///
2897    /// # Example
2898    /// ```ignore,no_run
2899    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
2900    /// let x = ListWorkspacesResponse::new().set_next_page_token("example");
2901    /// ```
2902    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2903        self.next_page_token = v.into();
2904        self
2905    }
2906
2907    /// Sets the value of [unreachable][crate::model::ListWorkspacesResponse::unreachable].
2908    ///
2909    /// # Example
2910    /// ```ignore,no_run
2911    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
2912    /// let x = ListWorkspacesResponse::new().set_unreachable(["a", "b", "c"]);
2913    /// ```
2914    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2915    where
2916        T: std::iter::IntoIterator<Item = V>,
2917        V: std::convert::Into<std::string::String>,
2918    {
2919        use std::iter::Iterator;
2920        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2921        self
2922    }
2923}
2924
2925impl wkt::message::Message for ListWorkspacesResponse {
2926    fn typename() -> &'static str {
2927        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
2928    }
2929}
2930
2931#[doc(hidden)]
2932impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
2933    type PageItem = crate::model::Workspace;
2934
2935    fn items(self) -> std::vec::Vec<Self::PageItem> {
2936        self.workspaces
2937    }
2938
2939    fn next_page_token(&self) -> std::string::String {
2940        use std::clone::Clone;
2941        self.next_page_token.clone()
2942    }
2943}
2944
2945/// `GetWorkspace` request message.
2946#[derive(Clone, Default, PartialEq)]
2947#[non_exhaustive]
2948pub struct GetWorkspaceRequest {
2949    /// Required. The workspace's name.
2950    pub name: std::string::String,
2951
2952    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2953}
2954
2955impl GetWorkspaceRequest {
2956    pub fn new() -> Self {
2957        std::default::Default::default()
2958    }
2959
2960    /// Sets the value of [name][crate::model::GetWorkspaceRequest::name].
2961    ///
2962    /// # Example
2963    /// ```ignore,no_run
2964    /// # use google_cloud_dataform_v1::model::GetWorkspaceRequest;
2965    /// let x = GetWorkspaceRequest::new().set_name("example");
2966    /// ```
2967    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2968        self.name = v.into();
2969        self
2970    }
2971}
2972
2973impl wkt::message::Message for GetWorkspaceRequest {
2974    fn typename() -> &'static str {
2975        "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
2976    }
2977}
2978
2979/// `CreateWorkspace` request message.
2980#[derive(Clone, Default, PartialEq)]
2981#[non_exhaustive]
2982pub struct CreateWorkspaceRequest {
2983    /// Required. The repository in which to create the workspace. Must be in the
2984    /// format `projects/*/locations/*/repositories/*`.
2985    pub parent: std::string::String,
2986
2987    /// Required. The workspace to create.
2988    pub workspace: std::option::Option<crate::model::Workspace>,
2989
2990    /// Required. The ID to use for the workspace, which will become the final
2991    /// component of the workspace's resource name.
2992    pub workspace_id: std::string::String,
2993
2994    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2995}
2996
2997impl CreateWorkspaceRequest {
2998    pub fn new() -> Self {
2999        std::default::Default::default()
3000    }
3001
3002    /// Sets the value of [parent][crate::model::CreateWorkspaceRequest::parent].
3003    ///
3004    /// # Example
3005    /// ```ignore,no_run
3006    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3007    /// let x = CreateWorkspaceRequest::new().set_parent("example");
3008    /// ```
3009    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3010        self.parent = v.into();
3011        self
3012    }
3013
3014    /// Sets the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3015    ///
3016    /// # Example
3017    /// ```ignore,no_run
3018    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3019    /// use google_cloud_dataform_v1::model::Workspace;
3020    /// let x = CreateWorkspaceRequest::new().set_workspace(Workspace::default()/* use setters */);
3021    /// ```
3022    pub fn set_workspace<T>(mut self, v: T) -> Self
3023    where
3024        T: std::convert::Into<crate::model::Workspace>,
3025    {
3026        self.workspace = std::option::Option::Some(v.into());
3027        self
3028    }
3029
3030    /// Sets or clears the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3031    ///
3032    /// # Example
3033    /// ```ignore,no_run
3034    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3035    /// use google_cloud_dataform_v1::model::Workspace;
3036    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(Some(Workspace::default()/* use setters */));
3037    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(None::<Workspace>);
3038    /// ```
3039    pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
3040    where
3041        T: std::convert::Into<crate::model::Workspace>,
3042    {
3043        self.workspace = v.map(|x| x.into());
3044        self
3045    }
3046
3047    /// Sets the value of [workspace_id][crate::model::CreateWorkspaceRequest::workspace_id].
3048    ///
3049    /// # Example
3050    /// ```ignore,no_run
3051    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3052    /// let x = CreateWorkspaceRequest::new().set_workspace_id("example");
3053    /// ```
3054    pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3055        self.workspace_id = v.into();
3056        self
3057    }
3058}
3059
3060impl wkt::message::Message for CreateWorkspaceRequest {
3061    fn typename() -> &'static str {
3062        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
3063    }
3064}
3065
3066/// `DeleteWorkspace` request message.
3067#[derive(Clone, Default, PartialEq)]
3068#[non_exhaustive]
3069pub struct DeleteWorkspaceRequest {
3070    /// Required. The workspace resource's name.
3071    pub name: std::string::String,
3072
3073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3074}
3075
3076impl DeleteWorkspaceRequest {
3077    pub fn new() -> Self {
3078        std::default::Default::default()
3079    }
3080
3081    /// Sets the value of [name][crate::model::DeleteWorkspaceRequest::name].
3082    ///
3083    /// # Example
3084    /// ```ignore,no_run
3085    /// # use google_cloud_dataform_v1::model::DeleteWorkspaceRequest;
3086    /// let x = DeleteWorkspaceRequest::new().set_name("example");
3087    /// ```
3088    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3089        self.name = v.into();
3090        self
3091    }
3092}
3093
3094impl wkt::message::Message for DeleteWorkspaceRequest {
3095    fn typename() -> &'static str {
3096        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
3097    }
3098}
3099
3100/// Represents the author of a Git commit.
3101#[derive(Clone, Default, PartialEq)]
3102#[non_exhaustive]
3103pub struct CommitAuthor {
3104    /// Required. The commit author's name.
3105    pub name: std::string::String,
3106
3107    /// Required. The commit author's email address.
3108    pub email_address: std::string::String,
3109
3110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3111}
3112
3113impl CommitAuthor {
3114    pub fn new() -> Self {
3115        std::default::Default::default()
3116    }
3117
3118    /// Sets the value of [name][crate::model::CommitAuthor::name].
3119    ///
3120    /// # Example
3121    /// ```ignore,no_run
3122    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3123    /// let x = CommitAuthor::new().set_name("example");
3124    /// ```
3125    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3126        self.name = v.into();
3127        self
3128    }
3129
3130    /// Sets the value of [email_address][crate::model::CommitAuthor::email_address].
3131    ///
3132    /// # Example
3133    /// ```ignore,no_run
3134    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3135    /// let x = CommitAuthor::new().set_email_address("example");
3136    /// ```
3137    pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3138        self.email_address = v.into();
3139        self
3140    }
3141}
3142
3143impl wkt::message::Message for CommitAuthor {
3144    fn typename() -> &'static str {
3145        "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
3146    }
3147}
3148
3149/// `PullGitCommits` request message.
3150#[derive(Clone, Default, PartialEq)]
3151#[non_exhaustive]
3152pub struct PullGitCommitsRequest {
3153    /// Required. The workspace's name.
3154    pub name: std::string::String,
3155
3156    /// Optional. The name of the branch in the Git remote from which to pull
3157    /// commits. If left unset, the repository's default branch name will be used.
3158    pub remote_branch: std::string::String,
3159
3160    /// Required. The author of any merge commit which may be created as a result
3161    /// of merging fetched Git commits into this workspace.
3162    pub author: std::option::Option<crate::model::CommitAuthor>,
3163
3164    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3165}
3166
3167impl PullGitCommitsRequest {
3168    pub fn new() -> Self {
3169        std::default::Default::default()
3170    }
3171
3172    /// Sets the value of [name][crate::model::PullGitCommitsRequest::name].
3173    ///
3174    /// # Example
3175    /// ```ignore,no_run
3176    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3177    /// let x = PullGitCommitsRequest::new().set_name("example");
3178    /// ```
3179    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3180        self.name = v.into();
3181        self
3182    }
3183
3184    /// Sets the value of [remote_branch][crate::model::PullGitCommitsRequest::remote_branch].
3185    ///
3186    /// # Example
3187    /// ```ignore,no_run
3188    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3189    /// let x = PullGitCommitsRequest::new().set_remote_branch("example");
3190    /// ```
3191    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3192        self.remote_branch = v.into();
3193        self
3194    }
3195
3196    /// Sets the value of [author][crate::model::PullGitCommitsRequest::author].
3197    ///
3198    /// # Example
3199    /// ```ignore,no_run
3200    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3201    /// use google_cloud_dataform_v1::model::CommitAuthor;
3202    /// let x = PullGitCommitsRequest::new().set_author(CommitAuthor::default()/* use setters */);
3203    /// ```
3204    pub fn set_author<T>(mut self, v: T) -> Self
3205    where
3206        T: std::convert::Into<crate::model::CommitAuthor>,
3207    {
3208        self.author = std::option::Option::Some(v.into());
3209        self
3210    }
3211
3212    /// Sets or clears the value of [author][crate::model::PullGitCommitsRequest::author].
3213    ///
3214    /// # Example
3215    /// ```ignore,no_run
3216    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3217    /// use google_cloud_dataform_v1::model::CommitAuthor;
3218    /// let x = PullGitCommitsRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
3219    /// let x = PullGitCommitsRequest::new().set_or_clear_author(None::<CommitAuthor>);
3220    /// ```
3221    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
3222    where
3223        T: std::convert::Into<crate::model::CommitAuthor>,
3224    {
3225        self.author = v.map(|x| x.into());
3226        self
3227    }
3228}
3229
3230impl wkt::message::Message for PullGitCommitsRequest {
3231    fn typename() -> &'static str {
3232        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
3233    }
3234}
3235
3236/// `PullGitCommits` response message.
3237#[derive(Clone, Default, PartialEq)]
3238#[non_exhaustive]
3239pub struct PullGitCommitsResponse {
3240    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3241}
3242
3243impl PullGitCommitsResponse {
3244    pub fn new() -> Self {
3245        std::default::Default::default()
3246    }
3247}
3248
3249impl wkt::message::Message for PullGitCommitsResponse {
3250    fn typename() -> &'static str {
3251        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
3252    }
3253}
3254
3255/// `PushGitCommits` request message.
3256#[derive(Clone, Default, PartialEq)]
3257#[non_exhaustive]
3258pub struct PushGitCommitsRequest {
3259    /// Required. The workspace's name.
3260    pub name: std::string::String,
3261
3262    /// Optional. The name of the branch in the Git remote to which commits should
3263    /// be pushed. If left unset, the repository's default branch name will be
3264    /// used.
3265    pub remote_branch: std::string::String,
3266
3267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3268}
3269
3270impl PushGitCommitsRequest {
3271    pub fn new() -> Self {
3272        std::default::Default::default()
3273    }
3274
3275    /// Sets the value of [name][crate::model::PushGitCommitsRequest::name].
3276    ///
3277    /// # Example
3278    /// ```ignore,no_run
3279    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3280    /// let x = PushGitCommitsRequest::new().set_name("example");
3281    /// ```
3282    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3283        self.name = v.into();
3284        self
3285    }
3286
3287    /// Sets the value of [remote_branch][crate::model::PushGitCommitsRequest::remote_branch].
3288    ///
3289    /// # Example
3290    /// ```ignore,no_run
3291    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3292    /// let x = PushGitCommitsRequest::new().set_remote_branch("example");
3293    /// ```
3294    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3295        self.remote_branch = v.into();
3296        self
3297    }
3298}
3299
3300impl wkt::message::Message for PushGitCommitsRequest {
3301    fn typename() -> &'static str {
3302        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
3303    }
3304}
3305
3306/// `PushGitCommits` response message.
3307#[derive(Clone, Default, PartialEq)]
3308#[non_exhaustive]
3309pub struct PushGitCommitsResponse {
3310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3311}
3312
3313impl PushGitCommitsResponse {
3314    pub fn new() -> Self {
3315        std::default::Default::default()
3316    }
3317}
3318
3319impl wkt::message::Message for PushGitCommitsResponse {
3320    fn typename() -> &'static str {
3321        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
3322    }
3323}
3324
3325/// `FetchFileGitStatuses` request message.
3326#[derive(Clone, Default, PartialEq)]
3327#[non_exhaustive]
3328pub struct FetchFileGitStatusesRequest {
3329    /// Required. The workspace's name.
3330    pub name: std::string::String,
3331
3332    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3333}
3334
3335impl FetchFileGitStatusesRequest {
3336    pub fn new() -> Self {
3337        std::default::Default::default()
3338    }
3339
3340    /// Sets the value of [name][crate::model::FetchFileGitStatusesRequest::name].
3341    ///
3342    /// # Example
3343    /// ```ignore,no_run
3344    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesRequest;
3345    /// let x = FetchFileGitStatusesRequest::new().set_name("example");
3346    /// ```
3347    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3348        self.name = v.into();
3349        self
3350    }
3351}
3352
3353impl wkt::message::Message for FetchFileGitStatusesRequest {
3354    fn typename() -> &'static str {
3355        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
3356    }
3357}
3358
3359/// `FetchFileGitStatuses` response message.
3360#[derive(Clone, Default, PartialEq)]
3361#[non_exhaustive]
3362pub struct FetchFileGitStatusesResponse {
3363    /// A list of all files which have uncommitted Git changes. There will only be
3364    /// a single entry for any given file.
3365    pub uncommitted_file_changes:
3366        std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
3367
3368    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3369}
3370
3371impl FetchFileGitStatusesResponse {
3372    pub fn new() -> Self {
3373        std::default::Default::default()
3374    }
3375
3376    /// Sets the value of [uncommitted_file_changes][crate::model::FetchFileGitStatusesResponse::uncommitted_file_changes].
3377    ///
3378    /// # Example
3379    /// ```ignore,no_run
3380    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesResponse;
3381    /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3382    /// let x = FetchFileGitStatusesResponse::new()
3383    ///     .set_uncommitted_file_changes([
3384    ///         UncommittedFileChange::default()/* use setters */,
3385    ///         UncommittedFileChange::default()/* use (different) setters */,
3386    ///     ]);
3387    /// ```
3388    pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
3389    where
3390        T: std::iter::IntoIterator<Item = V>,
3391        V: std::convert::Into<
3392                crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
3393            >,
3394    {
3395        use std::iter::Iterator;
3396        self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
3397        self
3398    }
3399}
3400
3401impl wkt::message::Message for FetchFileGitStatusesResponse {
3402    fn typename() -> &'static str {
3403        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
3404    }
3405}
3406
3407/// Defines additional types related to [FetchFileGitStatusesResponse].
3408pub mod fetch_file_git_statuses_response {
3409    #[allow(unused_imports)]
3410    use super::*;
3411
3412    /// Represents the Git state of a file with uncommitted changes.
3413    #[derive(Clone, Default, PartialEq)]
3414    #[non_exhaustive]
3415    pub struct UncommittedFileChange {
3416        /// The file's full path including filename, relative to the workspace root.
3417        pub path: std::string::String,
3418
3419        /// Output only. Indicates the status of the file.
3420        pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3421
3422        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3423    }
3424
3425    impl UncommittedFileChange {
3426        pub fn new() -> Self {
3427            std::default::Default::default()
3428        }
3429
3430        /// Sets the value of [path][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::path].
3431        ///
3432        /// # Example
3433        /// ```ignore,no_run
3434        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3435        /// let x = UncommittedFileChange::new().set_path("example");
3436        /// ```
3437        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3438            self.path = v.into();
3439            self
3440        }
3441
3442        /// Sets the value of [state][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::state].
3443        ///
3444        /// # Example
3445        /// ```ignore,no_run
3446        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3447        /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::uncommitted_file_change::State;
3448        /// let x0 = UncommittedFileChange::new().set_state(State::Added);
3449        /// let x1 = UncommittedFileChange::new().set_state(State::Deleted);
3450        /// let x2 = UncommittedFileChange::new().set_state(State::Modified);
3451        /// ```
3452        pub fn set_state<
3453            T: std::convert::Into<
3454                    crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3455                >,
3456        >(
3457            mut self,
3458            v: T,
3459        ) -> Self {
3460            self.state = v.into();
3461            self
3462        }
3463    }
3464
3465    impl wkt::message::Message for UncommittedFileChange {
3466        fn typename() -> &'static str {
3467            "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
3468        }
3469    }
3470
3471    /// Defines additional types related to [UncommittedFileChange].
3472    pub mod uncommitted_file_change {
3473        #[allow(unused_imports)]
3474        use super::*;
3475
3476        /// Indicates the status of an uncommitted file change.
3477        ///
3478        /// # Working with unknown values
3479        ///
3480        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3481        /// additional enum variants at any time. Adding new variants is not considered
3482        /// a breaking change. Applications should write their code in anticipation of:
3483        ///
3484        /// - New values appearing in future releases of the client library, **and**
3485        /// - New values received dynamically, without application changes.
3486        ///
3487        /// Please consult the [Working with enums] section in the user guide for some
3488        /// guidelines.
3489        ///
3490        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3491        #[derive(Clone, Debug, PartialEq)]
3492        #[non_exhaustive]
3493        pub enum State {
3494            /// Default value. This value is unused.
3495            Unspecified,
3496            /// The file has been newly added.
3497            Added,
3498            /// The file has been deleted.
3499            Deleted,
3500            /// The file has been modified.
3501            Modified,
3502            /// The file contains merge conflicts.
3503            HasConflicts,
3504            /// If set, the enum was initialized with an unknown value.
3505            ///
3506            /// Applications can examine the value using [State::value] or
3507            /// [State::name].
3508            UnknownValue(state::UnknownValue),
3509        }
3510
3511        #[doc(hidden)]
3512        pub mod state {
3513            #[allow(unused_imports)]
3514            use super::*;
3515            #[derive(Clone, Debug, PartialEq)]
3516            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3517        }
3518
3519        impl State {
3520            /// Gets the enum value.
3521            ///
3522            /// Returns `None` if the enum contains an unknown value deserialized from
3523            /// the string representation of enums.
3524            pub fn value(&self) -> std::option::Option<i32> {
3525                match self {
3526                    Self::Unspecified => std::option::Option::Some(0),
3527                    Self::Added => std::option::Option::Some(1),
3528                    Self::Deleted => std::option::Option::Some(2),
3529                    Self::Modified => std::option::Option::Some(3),
3530                    Self::HasConflicts => std::option::Option::Some(4),
3531                    Self::UnknownValue(u) => u.0.value(),
3532                }
3533            }
3534
3535            /// Gets the enum value as a string.
3536            ///
3537            /// Returns `None` if the enum contains an unknown value deserialized from
3538            /// the integer representation of enums.
3539            pub fn name(&self) -> std::option::Option<&str> {
3540                match self {
3541                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
3542                    Self::Added => std::option::Option::Some("ADDED"),
3543                    Self::Deleted => std::option::Option::Some("DELETED"),
3544                    Self::Modified => std::option::Option::Some("MODIFIED"),
3545                    Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
3546                    Self::UnknownValue(u) => u.0.name(),
3547                }
3548            }
3549        }
3550
3551        impl std::default::Default for State {
3552            fn default() -> Self {
3553                use std::convert::From;
3554                Self::from(0)
3555            }
3556        }
3557
3558        impl std::fmt::Display for State {
3559            fn fmt(
3560                &self,
3561                f: &mut std::fmt::Formatter<'_>,
3562            ) -> std::result::Result<(), std::fmt::Error> {
3563                wkt::internal::display_enum(f, self.name(), self.value())
3564            }
3565        }
3566
3567        impl std::convert::From<i32> for State {
3568            fn from(value: i32) -> Self {
3569                match value {
3570                    0 => Self::Unspecified,
3571                    1 => Self::Added,
3572                    2 => Self::Deleted,
3573                    3 => Self::Modified,
3574                    4 => Self::HasConflicts,
3575                    _ => Self::UnknownValue(state::UnknownValue(
3576                        wkt::internal::UnknownEnumValue::Integer(value),
3577                    )),
3578                }
3579            }
3580        }
3581
3582        impl std::convert::From<&str> for State {
3583            fn from(value: &str) -> Self {
3584                use std::string::ToString;
3585                match value {
3586                    "STATE_UNSPECIFIED" => Self::Unspecified,
3587                    "ADDED" => Self::Added,
3588                    "DELETED" => Self::Deleted,
3589                    "MODIFIED" => Self::Modified,
3590                    "HAS_CONFLICTS" => Self::HasConflicts,
3591                    _ => Self::UnknownValue(state::UnknownValue(
3592                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3593                    )),
3594                }
3595            }
3596        }
3597
3598        impl serde::ser::Serialize for State {
3599            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3600            where
3601                S: serde::Serializer,
3602            {
3603                match self {
3604                    Self::Unspecified => serializer.serialize_i32(0),
3605                    Self::Added => serializer.serialize_i32(1),
3606                    Self::Deleted => serializer.serialize_i32(2),
3607                    Self::Modified => serializer.serialize_i32(3),
3608                    Self::HasConflicts => serializer.serialize_i32(4),
3609                    Self::UnknownValue(u) => u.0.serialize(serializer),
3610                }
3611            }
3612        }
3613
3614        impl<'de> serde::de::Deserialize<'de> for State {
3615            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3616            where
3617                D: serde::Deserializer<'de>,
3618            {
3619                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
3620                    ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
3621            }
3622        }
3623    }
3624}
3625
3626/// `FetchGitAheadBehind` request message.
3627#[derive(Clone, Default, PartialEq)]
3628#[non_exhaustive]
3629pub struct FetchGitAheadBehindRequest {
3630    /// Required. The workspace's name.
3631    pub name: std::string::String,
3632
3633    /// Optional. The name of the branch in the Git remote against which this
3634    /// workspace should be compared. If left unset, the repository's default
3635    /// branch name will be used.
3636    pub remote_branch: std::string::String,
3637
3638    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3639}
3640
3641impl FetchGitAheadBehindRequest {
3642    pub fn new() -> Self {
3643        std::default::Default::default()
3644    }
3645
3646    /// Sets the value of [name][crate::model::FetchGitAheadBehindRequest::name].
3647    ///
3648    /// # Example
3649    /// ```ignore,no_run
3650    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
3651    /// let x = FetchGitAheadBehindRequest::new().set_name("example");
3652    /// ```
3653    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3654        self.name = v.into();
3655        self
3656    }
3657
3658    /// Sets the value of [remote_branch][crate::model::FetchGitAheadBehindRequest::remote_branch].
3659    ///
3660    /// # Example
3661    /// ```ignore,no_run
3662    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
3663    /// let x = FetchGitAheadBehindRequest::new().set_remote_branch("example");
3664    /// ```
3665    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3666        self.remote_branch = v.into();
3667        self
3668    }
3669}
3670
3671impl wkt::message::Message for FetchGitAheadBehindRequest {
3672    fn typename() -> &'static str {
3673        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
3674    }
3675}
3676
3677/// `FetchGitAheadBehind` response message.
3678#[derive(Clone, Default, PartialEq)]
3679#[non_exhaustive]
3680pub struct FetchGitAheadBehindResponse {
3681    /// The number of commits in the remote branch that are not in the workspace.
3682    pub commits_ahead: i32,
3683
3684    /// The number of commits in the workspace that are not in the remote branch.
3685    pub commits_behind: i32,
3686
3687    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3688}
3689
3690impl FetchGitAheadBehindResponse {
3691    pub fn new() -> Self {
3692        std::default::Default::default()
3693    }
3694
3695    /// Sets the value of [commits_ahead][crate::model::FetchGitAheadBehindResponse::commits_ahead].
3696    ///
3697    /// # Example
3698    /// ```ignore,no_run
3699    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
3700    /// let x = FetchGitAheadBehindResponse::new().set_commits_ahead(42);
3701    /// ```
3702    pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3703        self.commits_ahead = v.into();
3704        self
3705    }
3706
3707    /// Sets the value of [commits_behind][crate::model::FetchGitAheadBehindResponse::commits_behind].
3708    ///
3709    /// # Example
3710    /// ```ignore,no_run
3711    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
3712    /// let x = FetchGitAheadBehindResponse::new().set_commits_behind(42);
3713    /// ```
3714    pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3715        self.commits_behind = v.into();
3716        self
3717    }
3718}
3719
3720impl wkt::message::Message for FetchGitAheadBehindResponse {
3721    fn typename() -> &'static str {
3722        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
3723    }
3724}
3725
3726/// `CommitWorkspaceChanges` request message.
3727#[derive(Clone, Default, PartialEq)]
3728#[non_exhaustive]
3729pub struct CommitWorkspaceChangesRequest {
3730    /// Required. The workspace's name.
3731    pub name: std::string::String,
3732
3733    /// Required. The commit's author.
3734    pub author: std::option::Option<crate::model::CommitAuthor>,
3735
3736    /// Optional. The commit's message.
3737    pub commit_message: std::string::String,
3738
3739    /// Optional. Full file paths to commit including filename, rooted at workspace
3740    /// root. If left empty, all files will be committed.
3741    pub paths: std::vec::Vec<std::string::String>,
3742
3743    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3744}
3745
3746impl CommitWorkspaceChangesRequest {
3747    pub fn new() -> Self {
3748        std::default::Default::default()
3749    }
3750
3751    /// Sets the value of [name][crate::model::CommitWorkspaceChangesRequest::name].
3752    ///
3753    /// # Example
3754    /// ```ignore,no_run
3755    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3756    /// let x = CommitWorkspaceChangesRequest::new().set_name("example");
3757    /// ```
3758    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3759        self.name = v.into();
3760        self
3761    }
3762
3763    /// Sets the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
3764    ///
3765    /// # Example
3766    /// ```ignore,no_run
3767    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3768    /// use google_cloud_dataform_v1::model::CommitAuthor;
3769    /// let x = CommitWorkspaceChangesRequest::new().set_author(CommitAuthor::default()/* use setters */);
3770    /// ```
3771    pub fn set_author<T>(mut self, v: T) -> Self
3772    where
3773        T: std::convert::Into<crate::model::CommitAuthor>,
3774    {
3775        self.author = std::option::Option::Some(v.into());
3776        self
3777    }
3778
3779    /// Sets or clears the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
3780    ///
3781    /// # Example
3782    /// ```ignore,no_run
3783    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3784    /// use google_cloud_dataform_v1::model::CommitAuthor;
3785    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
3786    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(None::<CommitAuthor>);
3787    /// ```
3788    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
3789    where
3790        T: std::convert::Into<crate::model::CommitAuthor>,
3791    {
3792        self.author = v.map(|x| x.into());
3793        self
3794    }
3795
3796    /// Sets the value of [commit_message][crate::model::CommitWorkspaceChangesRequest::commit_message].
3797    ///
3798    /// # Example
3799    /// ```ignore,no_run
3800    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3801    /// let x = CommitWorkspaceChangesRequest::new().set_commit_message("example");
3802    /// ```
3803    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3804        self.commit_message = v.into();
3805        self
3806    }
3807
3808    /// Sets the value of [paths][crate::model::CommitWorkspaceChangesRequest::paths].
3809    ///
3810    /// # Example
3811    /// ```ignore,no_run
3812    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
3813    /// let x = CommitWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
3814    /// ```
3815    pub fn set_paths<T, V>(mut self, v: T) -> Self
3816    where
3817        T: std::iter::IntoIterator<Item = V>,
3818        V: std::convert::Into<std::string::String>,
3819    {
3820        use std::iter::Iterator;
3821        self.paths = v.into_iter().map(|i| i.into()).collect();
3822        self
3823    }
3824}
3825
3826impl wkt::message::Message for CommitWorkspaceChangesRequest {
3827    fn typename() -> &'static str {
3828        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
3829    }
3830}
3831
3832/// `CommitWorkspaceChanges` response message.
3833#[derive(Clone, Default, PartialEq)]
3834#[non_exhaustive]
3835pub struct CommitWorkspaceChangesResponse {
3836    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3837}
3838
3839impl CommitWorkspaceChangesResponse {
3840    pub fn new() -> Self {
3841        std::default::Default::default()
3842    }
3843}
3844
3845impl wkt::message::Message for CommitWorkspaceChangesResponse {
3846    fn typename() -> &'static str {
3847        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
3848    }
3849}
3850
3851/// `ResetWorkspaceChanges` request message.
3852#[derive(Clone, Default, PartialEq)]
3853#[non_exhaustive]
3854pub struct ResetWorkspaceChangesRequest {
3855    /// Required. The workspace's name.
3856    pub name: std::string::String,
3857
3858    /// Optional. Full file paths to reset back to their committed state including
3859    /// filename, rooted at workspace root. If left empty, all files will be reset.
3860    pub paths: std::vec::Vec<std::string::String>,
3861
3862    /// Optional. If set to true, untracked files will be deleted.
3863    pub clean: bool,
3864
3865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3866}
3867
3868impl ResetWorkspaceChangesRequest {
3869    pub fn new() -> Self {
3870        std::default::Default::default()
3871    }
3872
3873    /// Sets the value of [name][crate::model::ResetWorkspaceChangesRequest::name].
3874    ///
3875    /// # Example
3876    /// ```ignore,no_run
3877    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
3878    /// let x = ResetWorkspaceChangesRequest::new().set_name("example");
3879    /// ```
3880    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3881        self.name = v.into();
3882        self
3883    }
3884
3885    /// Sets the value of [paths][crate::model::ResetWorkspaceChangesRequest::paths].
3886    ///
3887    /// # Example
3888    /// ```ignore,no_run
3889    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
3890    /// let x = ResetWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
3891    /// ```
3892    pub fn set_paths<T, V>(mut self, v: T) -> Self
3893    where
3894        T: std::iter::IntoIterator<Item = V>,
3895        V: std::convert::Into<std::string::String>,
3896    {
3897        use std::iter::Iterator;
3898        self.paths = v.into_iter().map(|i| i.into()).collect();
3899        self
3900    }
3901
3902    /// Sets the value of [clean][crate::model::ResetWorkspaceChangesRequest::clean].
3903    ///
3904    /// # Example
3905    /// ```ignore,no_run
3906    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
3907    /// let x = ResetWorkspaceChangesRequest::new().set_clean(true);
3908    /// ```
3909    pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3910        self.clean = v.into();
3911        self
3912    }
3913}
3914
3915impl wkt::message::Message for ResetWorkspaceChangesRequest {
3916    fn typename() -> &'static str {
3917        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
3918    }
3919}
3920
3921/// `ResetWorkspaceChanges` response message.
3922#[derive(Clone, Default, PartialEq)]
3923#[non_exhaustive]
3924pub struct ResetWorkspaceChangesResponse {
3925    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3926}
3927
3928impl ResetWorkspaceChangesResponse {
3929    pub fn new() -> Self {
3930        std::default::Default::default()
3931    }
3932}
3933
3934impl wkt::message::Message for ResetWorkspaceChangesResponse {
3935    fn typename() -> &'static str {
3936        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
3937    }
3938}
3939
3940/// `FetchFileDiff` request message.
3941#[derive(Clone, Default, PartialEq)]
3942#[non_exhaustive]
3943pub struct FetchFileDiffRequest {
3944    /// Required. The workspace's name.
3945    pub workspace: std::string::String,
3946
3947    /// Required. The file's full path including filename, relative to the
3948    /// workspace root.
3949    pub path: std::string::String,
3950
3951    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3952}
3953
3954impl FetchFileDiffRequest {
3955    pub fn new() -> Self {
3956        std::default::Default::default()
3957    }
3958
3959    /// Sets the value of [workspace][crate::model::FetchFileDiffRequest::workspace].
3960    ///
3961    /// # Example
3962    /// ```ignore,no_run
3963    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
3964    /// let x = FetchFileDiffRequest::new().set_workspace("example");
3965    /// ```
3966    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3967        self.workspace = v.into();
3968        self
3969    }
3970
3971    /// Sets the value of [path][crate::model::FetchFileDiffRequest::path].
3972    ///
3973    /// # Example
3974    /// ```ignore,no_run
3975    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
3976    /// let x = FetchFileDiffRequest::new().set_path("example");
3977    /// ```
3978    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3979        self.path = v.into();
3980        self
3981    }
3982}
3983
3984impl wkt::message::Message for FetchFileDiffRequest {
3985    fn typename() -> &'static str {
3986        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
3987    }
3988}
3989
3990/// `FetchFileDiff` response message.
3991#[derive(Clone, Default, PartialEq)]
3992#[non_exhaustive]
3993pub struct FetchFileDiffResponse {
3994    /// The raw formatted Git diff for the file.
3995    pub formatted_diff: std::string::String,
3996
3997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3998}
3999
4000impl FetchFileDiffResponse {
4001    pub fn new() -> Self {
4002        std::default::Default::default()
4003    }
4004
4005    /// Sets the value of [formatted_diff][crate::model::FetchFileDiffResponse::formatted_diff].
4006    ///
4007    /// # Example
4008    /// ```ignore,no_run
4009    /// # use google_cloud_dataform_v1::model::FetchFileDiffResponse;
4010    /// let x = FetchFileDiffResponse::new().set_formatted_diff("example");
4011    /// ```
4012    pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4013        self.formatted_diff = v.into();
4014        self
4015    }
4016}
4017
4018impl wkt::message::Message for FetchFileDiffResponse {
4019    fn typename() -> &'static str {
4020        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
4021    }
4022}
4023
4024/// `QueryDirectoryContents` request message.
4025#[derive(Clone, Default, PartialEq)]
4026#[non_exhaustive]
4027pub struct QueryDirectoryContentsRequest {
4028    /// Required. The workspace's name.
4029    pub workspace: std::string::String,
4030
4031    /// Optional. The directory's full path including directory name, relative to
4032    /// the workspace root. If left unset, the workspace root is used.
4033    pub path: std::string::String,
4034
4035    /// Optional. Maximum number of paths to return. The server may return fewer
4036    /// items than requested. If unspecified, the server will pick an appropriate
4037    /// default.
4038    pub page_size: i32,
4039
4040    /// Optional. Page token received from a previous `QueryDirectoryContents`
4041    /// call. Provide this to retrieve the subsequent page.
4042    ///
4043    /// When paginating, all other parameters provided to
4044    /// `QueryDirectoryContents`, with the exception of `page_size`, must match the
4045    /// call that provided the page token.
4046    pub page_token: std::string::String,
4047
4048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4049}
4050
4051impl QueryDirectoryContentsRequest {
4052    pub fn new() -> Self {
4053        std::default::Default::default()
4054    }
4055
4056    /// Sets the value of [workspace][crate::model::QueryDirectoryContentsRequest::workspace].
4057    ///
4058    /// # Example
4059    /// ```ignore,no_run
4060    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4061    /// let x = QueryDirectoryContentsRequest::new().set_workspace("example");
4062    /// ```
4063    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4064        self.workspace = v.into();
4065        self
4066    }
4067
4068    /// Sets the value of [path][crate::model::QueryDirectoryContentsRequest::path].
4069    ///
4070    /// # Example
4071    /// ```ignore,no_run
4072    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4073    /// let x = QueryDirectoryContentsRequest::new().set_path("example");
4074    /// ```
4075    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4076        self.path = v.into();
4077        self
4078    }
4079
4080    /// Sets the value of [page_size][crate::model::QueryDirectoryContentsRequest::page_size].
4081    ///
4082    /// # Example
4083    /// ```ignore,no_run
4084    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4085    /// let x = QueryDirectoryContentsRequest::new().set_page_size(42);
4086    /// ```
4087    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4088        self.page_size = v.into();
4089        self
4090    }
4091
4092    /// Sets the value of [page_token][crate::model::QueryDirectoryContentsRequest::page_token].
4093    ///
4094    /// # Example
4095    /// ```ignore,no_run
4096    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4097    /// let x = QueryDirectoryContentsRequest::new().set_page_token("example");
4098    /// ```
4099    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4100        self.page_token = v.into();
4101        self
4102    }
4103}
4104
4105impl wkt::message::Message for QueryDirectoryContentsRequest {
4106    fn typename() -> &'static str {
4107        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
4108    }
4109}
4110
4111/// `QueryDirectoryContents` response message.
4112#[derive(Clone, Default, PartialEq)]
4113#[non_exhaustive]
4114pub struct QueryDirectoryContentsResponse {
4115    /// List of entries in the directory.
4116    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
4117
4118    /// A token, which can be sent as `page_token` to retrieve the next page.
4119    /// If this field is omitted, there are no subsequent pages.
4120    pub next_page_token: std::string::String,
4121
4122    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4123}
4124
4125impl QueryDirectoryContentsResponse {
4126    pub fn new() -> Self {
4127        std::default::Default::default()
4128    }
4129
4130    /// Sets the value of [directory_entries][crate::model::QueryDirectoryContentsResponse::directory_entries].
4131    ///
4132    /// # Example
4133    /// ```ignore,no_run
4134    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4135    /// use google_cloud_dataform_v1::model::DirectoryEntry;
4136    /// let x = QueryDirectoryContentsResponse::new()
4137    ///     .set_directory_entries([
4138    ///         DirectoryEntry::default()/* use setters */,
4139    ///         DirectoryEntry::default()/* use (different) setters */,
4140    ///     ]);
4141    /// ```
4142    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
4143    where
4144        T: std::iter::IntoIterator<Item = V>,
4145        V: std::convert::Into<crate::model::DirectoryEntry>,
4146    {
4147        use std::iter::Iterator;
4148        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
4149        self
4150    }
4151
4152    /// Sets the value of [next_page_token][crate::model::QueryDirectoryContentsResponse::next_page_token].
4153    ///
4154    /// # Example
4155    /// ```ignore,no_run
4156    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4157    /// let x = QueryDirectoryContentsResponse::new().set_next_page_token("example");
4158    /// ```
4159    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4160        self.next_page_token = v.into();
4161        self
4162    }
4163}
4164
4165impl wkt::message::Message for QueryDirectoryContentsResponse {
4166    fn typename() -> &'static str {
4167        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
4168    }
4169}
4170
4171#[doc(hidden)]
4172impl google_cloud_gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
4173    type PageItem = crate::model::DirectoryEntry;
4174
4175    fn items(self) -> std::vec::Vec<Self::PageItem> {
4176        self.directory_entries
4177    }
4178
4179    fn next_page_token(&self) -> std::string::String {
4180        use std::clone::Clone;
4181        self.next_page_token.clone()
4182    }
4183}
4184
4185/// Represents a single entry in a directory.
4186#[derive(Clone, Default, PartialEq)]
4187#[non_exhaustive]
4188pub struct DirectoryEntry {
4189    /// The entry's contents.
4190    pub entry: std::option::Option<crate::model::directory_entry::Entry>,
4191
4192    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4193}
4194
4195impl DirectoryEntry {
4196    pub fn new() -> Self {
4197        std::default::Default::default()
4198    }
4199
4200    /// Sets the value of [entry][crate::model::DirectoryEntry::entry].
4201    ///
4202    /// Note that all the setters affecting `entry` are mutually
4203    /// exclusive.
4204    ///
4205    /// # Example
4206    /// ```ignore,no_run
4207    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4208    /// use google_cloud_dataform_v1::model::directory_entry::Entry;
4209    /// let x = DirectoryEntry::new().set_entry(Some(Entry::File("example".to_string())));
4210    /// ```
4211    pub fn set_entry<
4212        T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
4213    >(
4214        mut self,
4215        v: T,
4216    ) -> Self {
4217        self.entry = v.into();
4218        self
4219    }
4220
4221    /// The value of [entry][crate::model::DirectoryEntry::entry]
4222    /// if it holds a `File`, `None` if the field is not set or
4223    /// holds a different branch.
4224    pub fn file(&self) -> std::option::Option<&std::string::String> {
4225        #[allow(unreachable_patterns)]
4226        self.entry.as_ref().and_then(|v| match v {
4227            crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
4228            _ => std::option::Option::None,
4229        })
4230    }
4231
4232    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4233    /// to hold a `File`.
4234    ///
4235    /// Note that all the setters affecting `entry` are
4236    /// mutually exclusive.
4237    ///
4238    /// # Example
4239    /// ```ignore,no_run
4240    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4241    /// let x = DirectoryEntry::new().set_file("example");
4242    /// assert!(x.file().is_some());
4243    /// assert!(x.directory().is_none());
4244    /// ```
4245    pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4246        self.entry =
4247            std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
4248        self
4249    }
4250
4251    /// The value of [entry][crate::model::DirectoryEntry::entry]
4252    /// if it holds a `Directory`, `None` if the field is not set or
4253    /// holds a different branch.
4254    pub fn directory(&self) -> std::option::Option<&std::string::String> {
4255        #[allow(unreachable_patterns)]
4256        self.entry.as_ref().and_then(|v| match v {
4257            crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
4258            _ => std::option::Option::None,
4259        })
4260    }
4261
4262    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4263    /// to hold a `Directory`.
4264    ///
4265    /// Note that all the setters affecting `entry` are
4266    /// mutually exclusive.
4267    ///
4268    /// # Example
4269    /// ```ignore,no_run
4270    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4271    /// let x = DirectoryEntry::new().set_directory("example");
4272    /// assert!(x.directory().is_some());
4273    /// assert!(x.file().is_none());
4274    /// ```
4275    pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4276        self.entry =
4277            std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
4278        self
4279    }
4280}
4281
4282impl wkt::message::Message for DirectoryEntry {
4283    fn typename() -> &'static str {
4284        "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
4285    }
4286}
4287
4288/// Defines additional types related to [DirectoryEntry].
4289pub mod directory_entry {
4290    #[allow(unused_imports)]
4291    use super::*;
4292
4293    /// The entry's contents.
4294    #[derive(Clone, Debug, PartialEq)]
4295    #[non_exhaustive]
4296    pub enum Entry {
4297        /// A file in the directory.
4298        File(std::string::String),
4299        /// A child directory in the directory.
4300        Directory(std::string::String),
4301    }
4302}
4303
4304/// Configuration containing file search request parameters.
4305#[derive(Clone, Default, PartialEq)]
4306#[non_exhaustive]
4307pub struct SearchFilesRequest {
4308    /// Required. The workspace's name.
4309    pub workspace: std::string::String,
4310
4311    /// Optional. Maximum number of search results to return. The server may return
4312    /// fewer items than requested. If unspecified, the server will pick an
4313    /// appropriate default.
4314    pub page_size: i32,
4315
4316    /// Optional. Page token received from a previous `SearchFilesRequest`
4317    /// call. Provide this to retrieve the subsequent page.
4318    ///
4319    /// When paginating, all other parameters provided to `SearchFilesRequest`,
4320    /// with the exception of `page_size`, must match the call that provided the
4321    /// page token.
4322    pub page_token: std::string::String,
4323
4324    /// Optional. Optional filter for the returned list in filtering format.
4325    /// Filtering is only currently supported on the `path` field.
4326    /// See <https://google.aip.dev/160> for details.
4327    pub filter: std::string::String,
4328
4329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4330}
4331
4332impl SearchFilesRequest {
4333    pub fn new() -> Self {
4334        std::default::Default::default()
4335    }
4336
4337    /// Sets the value of [workspace][crate::model::SearchFilesRequest::workspace].
4338    ///
4339    /// # Example
4340    /// ```ignore,no_run
4341    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4342    /// let x = SearchFilesRequest::new().set_workspace("example");
4343    /// ```
4344    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4345        self.workspace = v.into();
4346        self
4347    }
4348
4349    /// Sets the value of [page_size][crate::model::SearchFilesRequest::page_size].
4350    ///
4351    /// # Example
4352    /// ```ignore,no_run
4353    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4354    /// let x = SearchFilesRequest::new().set_page_size(42);
4355    /// ```
4356    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4357        self.page_size = v.into();
4358        self
4359    }
4360
4361    /// Sets the value of [page_token][crate::model::SearchFilesRequest::page_token].
4362    ///
4363    /// # Example
4364    /// ```ignore,no_run
4365    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4366    /// let x = SearchFilesRequest::new().set_page_token("example");
4367    /// ```
4368    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4369        self.page_token = v.into();
4370        self
4371    }
4372
4373    /// Sets the value of [filter][crate::model::SearchFilesRequest::filter].
4374    ///
4375    /// # Example
4376    /// ```ignore,no_run
4377    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4378    /// let x = SearchFilesRequest::new().set_filter("example");
4379    /// ```
4380    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4381        self.filter = v.into();
4382        self
4383    }
4384}
4385
4386impl wkt::message::Message for SearchFilesRequest {
4387    fn typename() -> &'static str {
4388        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
4389    }
4390}
4391
4392/// Client-facing representation of a file search response.
4393#[derive(Clone, Default, PartialEq)]
4394#[non_exhaustive]
4395pub struct SearchFilesResponse {
4396    /// List of matched results.
4397    pub search_results: std::vec::Vec<crate::model::SearchResult>,
4398
4399    /// Optional. A token, which can be sent as `page_token` to retrieve the next
4400    /// page. If this field is omitted, there are no subsequent pages.
4401    pub next_page_token: std::string::String,
4402
4403    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4404}
4405
4406impl SearchFilesResponse {
4407    pub fn new() -> Self {
4408        std::default::Default::default()
4409    }
4410
4411    /// Sets the value of [search_results][crate::model::SearchFilesResponse::search_results].
4412    ///
4413    /// # Example
4414    /// ```ignore,no_run
4415    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4416    /// use google_cloud_dataform_v1::model::SearchResult;
4417    /// let x = SearchFilesResponse::new()
4418    ///     .set_search_results([
4419    ///         SearchResult::default()/* use setters */,
4420    ///         SearchResult::default()/* use (different) setters */,
4421    ///     ]);
4422    /// ```
4423    pub fn set_search_results<T, V>(mut self, v: T) -> Self
4424    where
4425        T: std::iter::IntoIterator<Item = V>,
4426        V: std::convert::Into<crate::model::SearchResult>,
4427    {
4428        use std::iter::Iterator;
4429        self.search_results = v.into_iter().map(|i| i.into()).collect();
4430        self
4431    }
4432
4433    /// Sets the value of [next_page_token][crate::model::SearchFilesResponse::next_page_token].
4434    ///
4435    /// # Example
4436    /// ```ignore,no_run
4437    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4438    /// let x = SearchFilesResponse::new().set_next_page_token("example");
4439    /// ```
4440    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4441        self.next_page_token = v.into();
4442        self
4443    }
4444}
4445
4446impl wkt::message::Message for SearchFilesResponse {
4447    fn typename() -> &'static str {
4448        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
4449    }
4450}
4451
4452#[doc(hidden)]
4453impl google_cloud_gax::paginator::internal::PageableResponse for SearchFilesResponse {
4454    type PageItem = crate::model::SearchResult;
4455
4456    fn items(self) -> std::vec::Vec<Self::PageItem> {
4457        self.search_results
4458    }
4459
4460    fn next_page_token(&self) -> std::string::String {
4461        use std::clone::Clone;
4462        self.next_page_token.clone()
4463    }
4464}
4465
4466/// Client-facing representation of a search result entry.
4467#[derive(Clone, Default, PartialEq)]
4468#[non_exhaustive]
4469pub struct SearchResult {
4470    /// The entry's contents.
4471    pub entry: std::option::Option<crate::model::search_result::Entry>,
4472
4473    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4474}
4475
4476impl SearchResult {
4477    pub fn new() -> Self {
4478        std::default::Default::default()
4479    }
4480
4481    /// Sets the value of [entry][crate::model::SearchResult::entry].
4482    ///
4483    /// Note that all the setters affecting `entry` are mutually
4484    /// exclusive.
4485    ///
4486    /// # Example
4487    /// ```ignore,no_run
4488    /// # use google_cloud_dataform_v1::model::SearchResult;
4489    /// use google_cloud_dataform_v1::model::FileSearchResult;
4490    /// let x = SearchResult::new().set_entry(Some(
4491    ///     google_cloud_dataform_v1::model::search_result::Entry::File(FileSearchResult::default().into())));
4492    /// ```
4493    pub fn set_entry<
4494        T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
4495    >(
4496        mut self,
4497        v: T,
4498    ) -> Self {
4499        self.entry = v.into();
4500        self
4501    }
4502
4503    /// The value of [entry][crate::model::SearchResult::entry]
4504    /// if it holds a `File`, `None` if the field is not set or
4505    /// holds a different branch.
4506    pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
4507        #[allow(unreachable_patterns)]
4508        self.entry.as_ref().and_then(|v| match v {
4509            crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
4510            _ => std::option::Option::None,
4511        })
4512    }
4513
4514    /// Sets the value of [entry][crate::model::SearchResult::entry]
4515    /// to hold a `File`.
4516    ///
4517    /// Note that all the setters affecting `entry` are
4518    /// mutually exclusive.
4519    ///
4520    /// # Example
4521    /// ```ignore,no_run
4522    /// # use google_cloud_dataform_v1::model::SearchResult;
4523    /// use google_cloud_dataform_v1::model::FileSearchResult;
4524    /// let x = SearchResult::new().set_file(FileSearchResult::default()/* use setters */);
4525    /// assert!(x.file().is_some());
4526    /// assert!(x.directory().is_none());
4527    /// ```
4528    pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
4529        mut self,
4530        v: T,
4531    ) -> Self {
4532        self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
4533        self
4534    }
4535
4536    /// The value of [entry][crate::model::SearchResult::entry]
4537    /// if it holds a `Directory`, `None` if the field is not set or
4538    /// holds a different branch.
4539    pub fn directory(
4540        &self,
4541    ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
4542        #[allow(unreachable_patterns)]
4543        self.entry.as_ref().and_then(|v| match v {
4544            crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
4545            _ => std::option::Option::None,
4546        })
4547    }
4548
4549    /// Sets the value of [entry][crate::model::SearchResult::entry]
4550    /// to hold a `Directory`.
4551    ///
4552    /// Note that all the setters affecting `entry` are
4553    /// mutually exclusive.
4554    ///
4555    /// # Example
4556    /// ```ignore,no_run
4557    /// # use google_cloud_dataform_v1::model::SearchResult;
4558    /// use google_cloud_dataform_v1::model::DirectorySearchResult;
4559    /// let x = SearchResult::new().set_directory(DirectorySearchResult::default()/* use setters */);
4560    /// assert!(x.directory().is_some());
4561    /// assert!(x.file().is_none());
4562    /// ```
4563    pub fn set_directory<
4564        T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
4565    >(
4566        mut self,
4567        v: T,
4568    ) -> Self {
4569        self.entry =
4570            std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
4571        self
4572    }
4573}
4574
4575impl wkt::message::Message for SearchResult {
4576    fn typename() -> &'static str {
4577        "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
4578    }
4579}
4580
4581/// Defines additional types related to [SearchResult].
4582pub mod search_result {
4583    #[allow(unused_imports)]
4584    use super::*;
4585
4586    /// The entry's contents.
4587    #[derive(Clone, Debug, PartialEq)]
4588    #[non_exhaustive]
4589    pub enum Entry {
4590        /// Details when search result is a file.
4591        File(std::boxed::Box<crate::model::FileSearchResult>),
4592        /// Details when search result is a directory.
4593        Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
4594    }
4595}
4596
4597/// Client-facing representation of a file entry in search results.
4598#[derive(Clone, Default, PartialEq)]
4599#[non_exhaustive]
4600pub struct FileSearchResult {
4601    /// File system path relative to the workspace root.
4602    pub path: std::string::String,
4603
4604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4605}
4606
4607impl FileSearchResult {
4608    pub fn new() -> Self {
4609        std::default::Default::default()
4610    }
4611
4612    /// Sets the value of [path][crate::model::FileSearchResult::path].
4613    ///
4614    /// # Example
4615    /// ```ignore,no_run
4616    /// # use google_cloud_dataform_v1::model::FileSearchResult;
4617    /// let x = FileSearchResult::new().set_path("example");
4618    /// ```
4619    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4620        self.path = v.into();
4621        self
4622    }
4623}
4624
4625impl wkt::message::Message for FileSearchResult {
4626    fn typename() -> &'static str {
4627        "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
4628    }
4629}
4630
4631/// Client-facing representation of a directory entry in search results.
4632#[derive(Clone, Default, PartialEq)]
4633#[non_exhaustive]
4634pub struct DirectorySearchResult {
4635    /// File system path relative to the workspace root.
4636    pub path: std::string::String,
4637
4638    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4639}
4640
4641impl DirectorySearchResult {
4642    pub fn new() -> Self {
4643        std::default::Default::default()
4644    }
4645
4646    /// Sets the value of [path][crate::model::DirectorySearchResult::path].
4647    ///
4648    /// # Example
4649    /// ```ignore,no_run
4650    /// # use google_cloud_dataform_v1::model::DirectorySearchResult;
4651    /// let x = DirectorySearchResult::new().set_path("example");
4652    /// ```
4653    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4654        self.path = v.into();
4655        self
4656    }
4657}
4658
4659impl wkt::message::Message for DirectorySearchResult {
4660    fn typename() -> &'static str {
4661        "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
4662    }
4663}
4664
4665/// `MakeDirectory` request message.
4666#[derive(Clone, Default, PartialEq)]
4667#[non_exhaustive]
4668pub struct MakeDirectoryRequest {
4669    /// Required. The workspace's name.
4670    pub workspace: std::string::String,
4671
4672    /// Required. The directory's full path including directory name, relative to
4673    /// the workspace root.
4674    pub path: std::string::String,
4675
4676    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4677}
4678
4679impl MakeDirectoryRequest {
4680    pub fn new() -> Self {
4681        std::default::Default::default()
4682    }
4683
4684    /// Sets the value of [workspace][crate::model::MakeDirectoryRequest::workspace].
4685    ///
4686    /// # Example
4687    /// ```ignore,no_run
4688    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
4689    /// let x = MakeDirectoryRequest::new().set_workspace("example");
4690    /// ```
4691    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4692        self.workspace = v.into();
4693        self
4694    }
4695
4696    /// Sets the value of [path][crate::model::MakeDirectoryRequest::path].
4697    ///
4698    /// # Example
4699    /// ```ignore,no_run
4700    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
4701    /// let x = MakeDirectoryRequest::new().set_path("example");
4702    /// ```
4703    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4704        self.path = v.into();
4705        self
4706    }
4707}
4708
4709impl wkt::message::Message for MakeDirectoryRequest {
4710    fn typename() -> &'static str {
4711        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
4712    }
4713}
4714
4715/// `MakeDirectory` response message.
4716#[derive(Clone, Default, PartialEq)]
4717#[non_exhaustive]
4718pub struct MakeDirectoryResponse {
4719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4720}
4721
4722impl MakeDirectoryResponse {
4723    pub fn new() -> Self {
4724        std::default::Default::default()
4725    }
4726}
4727
4728impl wkt::message::Message for MakeDirectoryResponse {
4729    fn typename() -> &'static str {
4730        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
4731    }
4732}
4733
4734/// `RemoveDirectory` request message.
4735#[derive(Clone, Default, PartialEq)]
4736#[non_exhaustive]
4737pub struct RemoveDirectoryRequest {
4738    /// Required. The workspace's name.
4739    pub workspace: std::string::String,
4740
4741    /// Required. The directory's full path including directory name, relative to
4742    /// the workspace root.
4743    pub path: std::string::String,
4744
4745    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4746}
4747
4748impl RemoveDirectoryRequest {
4749    pub fn new() -> Self {
4750        std::default::Default::default()
4751    }
4752
4753    /// Sets the value of [workspace][crate::model::RemoveDirectoryRequest::workspace].
4754    ///
4755    /// # Example
4756    /// ```ignore,no_run
4757    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
4758    /// let x = RemoveDirectoryRequest::new().set_workspace("example");
4759    /// ```
4760    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4761        self.workspace = v.into();
4762        self
4763    }
4764
4765    /// Sets the value of [path][crate::model::RemoveDirectoryRequest::path].
4766    ///
4767    /// # Example
4768    /// ```ignore,no_run
4769    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
4770    /// let x = RemoveDirectoryRequest::new().set_path("example");
4771    /// ```
4772    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4773        self.path = v.into();
4774        self
4775    }
4776}
4777
4778impl wkt::message::Message for RemoveDirectoryRequest {
4779    fn typename() -> &'static str {
4780        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
4781    }
4782}
4783
4784/// `RemoveDirectory` response message.
4785#[derive(Clone, Default, PartialEq)]
4786#[non_exhaustive]
4787pub struct RemoveDirectoryResponse {
4788    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4789}
4790
4791impl RemoveDirectoryResponse {
4792    pub fn new() -> Self {
4793        std::default::Default::default()
4794    }
4795}
4796
4797impl wkt::message::Message for RemoveDirectoryResponse {
4798    fn typename() -> &'static str {
4799        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
4800    }
4801}
4802
4803/// `MoveDirectory` request message.
4804#[derive(Clone, Default, PartialEq)]
4805#[non_exhaustive]
4806pub struct MoveDirectoryRequest {
4807    /// Required. The workspace's name.
4808    pub workspace: std::string::String,
4809
4810    /// Required. The directory's full path including directory name, relative to
4811    /// the workspace root.
4812    pub path: std::string::String,
4813
4814    /// Required. The new path for the directory including directory name, rooted
4815    /// at workspace root.
4816    pub new_path: std::string::String,
4817
4818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4819}
4820
4821impl MoveDirectoryRequest {
4822    pub fn new() -> Self {
4823        std::default::Default::default()
4824    }
4825
4826    /// Sets the value of [workspace][crate::model::MoveDirectoryRequest::workspace].
4827    ///
4828    /// # Example
4829    /// ```ignore,no_run
4830    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
4831    /// let x = MoveDirectoryRequest::new().set_workspace("example");
4832    /// ```
4833    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4834        self.workspace = v.into();
4835        self
4836    }
4837
4838    /// Sets the value of [path][crate::model::MoveDirectoryRequest::path].
4839    ///
4840    /// # Example
4841    /// ```ignore,no_run
4842    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
4843    /// let x = MoveDirectoryRequest::new().set_path("example");
4844    /// ```
4845    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4846        self.path = v.into();
4847        self
4848    }
4849
4850    /// Sets the value of [new_path][crate::model::MoveDirectoryRequest::new_path].
4851    ///
4852    /// # Example
4853    /// ```ignore,no_run
4854    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
4855    /// let x = MoveDirectoryRequest::new().set_new_path("example");
4856    /// ```
4857    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4858        self.new_path = v.into();
4859        self
4860    }
4861}
4862
4863impl wkt::message::Message for MoveDirectoryRequest {
4864    fn typename() -> &'static str {
4865        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
4866    }
4867}
4868
4869/// `MoveDirectory` response message.
4870#[derive(Clone, Default, PartialEq)]
4871#[non_exhaustive]
4872pub struct MoveDirectoryResponse {
4873    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4874}
4875
4876impl MoveDirectoryResponse {
4877    pub fn new() -> Self {
4878        std::default::Default::default()
4879    }
4880}
4881
4882impl wkt::message::Message for MoveDirectoryResponse {
4883    fn typename() -> &'static str {
4884        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
4885    }
4886}
4887
4888/// `ReadFile` request message.
4889#[derive(Clone, Default, PartialEq)]
4890#[non_exhaustive]
4891pub struct ReadFileRequest {
4892    /// Required. The workspace's name.
4893    pub workspace: std::string::String,
4894
4895    /// Required. The file's full path including filename, relative to the
4896    /// workspace root.
4897    pub path: std::string::String,
4898
4899    /// Optional. The Git revision of the file to return. If left empty, the
4900    /// current contents of `path` will be returned.
4901    pub revision: std::string::String,
4902
4903    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4904}
4905
4906impl ReadFileRequest {
4907    pub fn new() -> Self {
4908        std::default::Default::default()
4909    }
4910
4911    /// Sets the value of [workspace][crate::model::ReadFileRequest::workspace].
4912    ///
4913    /// # Example
4914    /// ```ignore,no_run
4915    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
4916    /// let x = ReadFileRequest::new().set_workspace("example");
4917    /// ```
4918    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4919        self.workspace = v.into();
4920        self
4921    }
4922
4923    /// Sets the value of [path][crate::model::ReadFileRequest::path].
4924    ///
4925    /// # Example
4926    /// ```ignore,no_run
4927    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
4928    /// let x = ReadFileRequest::new().set_path("example");
4929    /// ```
4930    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4931        self.path = v.into();
4932        self
4933    }
4934
4935    /// Sets the value of [revision][crate::model::ReadFileRequest::revision].
4936    ///
4937    /// # Example
4938    /// ```ignore,no_run
4939    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
4940    /// let x = ReadFileRequest::new().set_revision("example");
4941    /// ```
4942    pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4943        self.revision = v.into();
4944        self
4945    }
4946}
4947
4948impl wkt::message::Message for ReadFileRequest {
4949    fn typename() -> &'static str {
4950        "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
4951    }
4952}
4953
4954/// `ReadFile` response message.
4955#[derive(Clone, Default, PartialEq)]
4956#[non_exhaustive]
4957pub struct ReadFileResponse {
4958    /// The file's contents.
4959    pub file_contents: ::bytes::Bytes,
4960
4961    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4962}
4963
4964impl ReadFileResponse {
4965    pub fn new() -> Self {
4966        std::default::Default::default()
4967    }
4968
4969    /// Sets the value of [file_contents][crate::model::ReadFileResponse::file_contents].
4970    ///
4971    /// # Example
4972    /// ```ignore,no_run
4973    /// # use google_cloud_dataform_v1::model::ReadFileResponse;
4974    /// let x = ReadFileResponse::new().set_file_contents(bytes::Bytes::from_static(b"example"));
4975    /// ```
4976    pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4977        self.file_contents = v.into();
4978        self
4979    }
4980}
4981
4982impl wkt::message::Message for ReadFileResponse {
4983    fn typename() -> &'static str {
4984        "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
4985    }
4986}
4987
4988/// `RemoveFile` request message.
4989#[derive(Clone, Default, PartialEq)]
4990#[non_exhaustive]
4991pub struct RemoveFileRequest {
4992    /// Required. The workspace's name.
4993    pub workspace: std::string::String,
4994
4995    /// Required. The file's full path including filename, relative to the
4996    /// workspace root.
4997    pub path: std::string::String,
4998
4999    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5000}
5001
5002impl RemoveFileRequest {
5003    pub fn new() -> Self {
5004        std::default::Default::default()
5005    }
5006
5007    /// Sets the value of [workspace][crate::model::RemoveFileRequest::workspace].
5008    ///
5009    /// # Example
5010    /// ```ignore,no_run
5011    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5012    /// let x = RemoveFileRequest::new().set_workspace("example");
5013    /// ```
5014    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5015        self.workspace = v.into();
5016        self
5017    }
5018
5019    /// Sets the value of [path][crate::model::RemoveFileRequest::path].
5020    ///
5021    /// # Example
5022    /// ```ignore,no_run
5023    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5024    /// let x = RemoveFileRequest::new().set_path("example");
5025    /// ```
5026    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5027        self.path = v.into();
5028        self
5029    }
5030}
5031
5032impl wkt::message::Message for RemoveFileRequest {
5033    fn typename() -> &'static str {
5034        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
5035    }
5036}
5037
5038/// `RemoveFile` response message.
5039#[derive(Clone, Default, PartialEq)]
5040#[non_exhaustive]
5041pub struct RemoveFileResponse {
5042    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5043}
5044
5045impl RemoveFileResponse {
5046    pub fn new() -> Self {
5047        std::default::Default::default()
5048    }
5049}
5050
5051impl wkt::message::Message for RemoveFileResponse {
5052    fn typename() -> &'static str {
5053        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
5054    }
5055}
5056
5057/// `MoveFile` request message.
5058#[derive(Clone, Default, PartialEq)]
5059#[non_exhaustive]
5060pub struct MoveFileRequest {
5061    /// Required. The workspace's name.
5062    pub workspace: std::string::String,
5063
5064    /// Required. The file's full path including filename, relative to the
5065    /// workspace root.
5066    pub path: std::string::String,
5067
5068    /// Required. The file's new path including filename, relative to the workspace
5069    /// root.
5070    pub new_path: std::string::String,
5071
5072    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5073}
5074
5075impl MoveFileRequest {
5076    pub fn new() -> Self {
5077        std::default::Default::default()
5078    }
5079
5080    /// Sets the value of [workspace][crate::model::MoveFileRequest::workspace].
5081    ///
5082    /// # Example
5083    /// ```ignore,no_run
5084    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5085    /// let x = MoveFileRequest::new().set_workspace("example");
5086    /// ```
5087    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5088        self.workspace = v.into();
5089        self
5090    }
5091
5092    /// Sets the value of [path][crate::model::MoveFileRequest::path].
5093    ///
5094    /// # Example
5095    /// ```ignore,no_run
5096    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5097    /// let x = MoveFileRequest::new().set_path("example");
5098    /// ```
5099    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5100        self.path = v.into();
5101        self
5102    }
5103
5104    /// Sets the value of [new_path][crate::model::MoveFileRequest::new_path].
5105    ///
5106    /// # Example
5107    /// ```ignore,no_run
5108    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5109    /// let x = MoveFileRequest::new().set_new_path("example");
5110    /// ```
5111    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5112        self.new_path = v.into();
5113        self
5114    }
5115}
5116
5117impl wkt::message::Message for MoveFileRequest {
5118    fn typename() -> &'static str {
5119        "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
5120    }
5121}
5122
5123/// `MoveFile` response message.
5124#[derive(Clone, Default, PartialEq)]
5125#[non_exhaustive]
5126pub struct MoveFileResponse {
5127    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5128}
5129
5130impl MoveFileResponse {
5131    pub fn new() -> Self {
5132        std::default::Default::default()
5133    }
5134}
5135
5136impl wkt::message::Message for MoveFileResponse {
5137    fn typename() -> &'static str {
5138        "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
5139    }
5140}
5141
5142/// `WriteFile` request message.
5143#[derive(Clone, Default, PartialEq)]
5144#[non_exhaustive]
5145pub struct WriteFileRequest {
5146    /// Required. The workspace's name.
5147    pub workspace: std::string::String,
5148
5149    /// Required. The file.
5150    pub path: std::string::String,
5151
5152    /// Required. The file's contents.
5153    pub contents: ::bytes::Bytes,
5154
5155    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5156}
5157
5158impl WriteFileRequest {
5159    pub fn new() -> Self {
5160        std::default::Default::default()
5161    }
5162
5163    /// Sets the value of [workspace][crate::model::WriteFileRequest::workspace].
5164    ///
5165    /// # Example
5166    /// ```ignore,no_run
5167    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5168    /// let x = WriteFileRequest::new().set_workspace("example");
5169    /// ```
5170    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5171        self.workspace = v.into();
5172        self
5173    }
5174
5175    /// Sets the value of [path][crate::model::WriteFileRequest::path].
5176    ///
5177    /// # Example
5178    /// ```ignore,no_run
5179    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5180    /// let x = WriteFileRequest::new().set_path("example");
5181    /// ```
5182    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5183        self.path = v.into();
5184        self
5185    }
5186
5187    /// Sets the value of [contents][crate::model::WriteFileRequest::contents].
5188    ///
5189    /// # Example
5190    /// ```ignore,no_run
5191    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5192    /// let x = WriteFileRequest::new().set_contents(bytes::Bytes::from_static(b"example"));
5193    /// ```
5194    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5195        self.contents = v.into();
5196        self
5197    }
5198}
5199
5200impl wkt::message::Message for WriteFileRequest {
5201    fn typename() -> &'static str {
5202        "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
5203    }
5204}
5205
5206/// `WriteFile` response message.
5207#[derive(Clone, Default, PartialEq)]
5208#[non_exhaustive]
5209pub struct WriteFileResponse {
5210    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5211}
5212
5213impl WriteFileResponse {
5214    pub fn new() -> Self {
5215        std::default::Default::default()
5216    }
5217}
5218
5219impl wkt::message::Message for WriteFileResponse {
5220    fn typename() -> &'static str {
5221        "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
5222    }
5223}
5224
5225/// `InstallNpmPackages` request message.
5226#[derive(Clone, Default, PartialEq)]
5227#[non_exhaustive]
5228pub struct InstallNpmPackagesRequest {
5229    /// Required. The workspace's name.
5230    pub workspace: std::string::String,
5231
5232    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5233}
5234
5235impl InstallNpmPackagesRequest {
5236    pub fn new() -> Self {
5237        std::default::Default::default()
5238    }
5239
5240    /// Sets the value of [workspace][crate::model::InstallNpmPackagesRequest::workspace].
5241    ///
5242    /// # Example
5243    /// ```ignore,no_run
5244    /// # use google_cloud_dataform_v1::model::InstallNpmPackagesRequest;
5245    /// let x = InstallNpmPackagesRequest::new().set_workspace("example");
5246    /// ```
5247    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5248        self.workspace = v.into();
5249        self
5250    }
5251}
5252
5253impl wkt::message::Message for InstallNpmPackagesRequest {
5254    fn typename() -> &'static str {
5255        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
5256    }
5257}
5258
5259/// `InstallNpmPackages` response message.
5260#[derive(Clone, Default, PartialEq)]
5261#[non_exhaustive]
5262pub struct InstallNpmPackagesResponse {
5263    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5264}
5265
5266impl InstallNpmPackagesResponse {
5267    pub fn new() -> Self {
5268        std::default::Default::default()
5269    }
5270}
5271
5272impl wkt::message::Message for InstallNpmPackagesResponse {
5273    fn typename() -> &'static str {
5274        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
5275    }
5276}
5277
5278/// Represents a Dataform release configuration.
5279#[derive(Clone, Default, PartialEq)]
5280#[non_exhaustive]
5281pub struct ReleaseConfig {
5282    /// Identifier. The release config's name.
5283    pub name: std::string::String,
5284
5285    /// Required. Git commit/tag/branch name at which the repository should be
5286    /// compiled. Must exist in the remote repository. Examples:
5287    ///
5288    /// - a commit SHA: `12ade345`
5289    /// - a tag: `tag1`
5290    /// - a branch name: `branch1`
5291    pub git_commitish: std::string::String,
5292
5293    /// Optional. If set, fields of `code_compilation_config` override the default
5294    /// compilation settings that are specified in dataform.json.
5295    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
5296
5297    /// Optional. Optional schedule (in cron format) for automatic creation of
5298    /// compilation results.
5299    pub cron_schedule: std::string::String,
5300
5301    /// Optional. Specifies the time zone to be used when interpreting
5302    /// cron_schedule. Must be a time zone name from the time zone database
5303    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
5304    /// unspecified, the default is UTC.
5305    pub time_zone: std::string::String,
5306
5307    /// Output only. Records of the 10 most recent scheduled release attempts,
5308    /// ordered in descending order of `release_time`. Updated whenever automatic
5309    /// creation of a compilation result is triggered by cron_schedule.
5310    pub recent_scheduled_release_records:
5311        std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
5312
5313    /// Optional. The name of the currently released compilation result for this
5314    /// release config. This value is updated when a compilation result is
5315    /// automatically created from this release config (using cron_schedule), or
5316    /// when this resource is updated by API call (perhaps to roll back to an
5317    /// earlier release). The compilation result must have been created using this
5318    /// release config. Must be in the format
5319    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
5320    pub release_compilation_result: std::string::String,
5321
5322    /// Optional. Disables automatic creation of compilation results.
5323    pub disabled: bool,
5324
5325    /// Output only. All the metadata information that is used internally to serve
5326    /// the resource. For example: timestamps, flags, status fields, etc. The
5327    /// format of this field is a JSON string.
5328    pub internal_metadata: std::option::Option<std::string::String>,
5329
5330    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5331}
5332
5333impl ReleaseConfig {
5334    pub fn new() -> Self {
5335        std::default::Default::default()
5336    }
5337
5338    /// Sets the value of [name][crate::model::ReleaseConfig::name].
5339    ///
5340    /// # Example
5341    /// ```ignore,no_run
5342    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5343    /// let x = ReleaseConfig::new().set_name("example");
5344    /// ```
5345    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5346        self.name = v.into();
5347        self
5348    }
5349
5350    /// Sets the value of [git_commitish][crate::model::ReleaseConfig::git_commitish].
5351    ///
5352    /// # Example
5353    /// ```ignore,no_run
5354    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5355    /// let x = ReleaseConfig::new().set_git_commitish("example");
5356    /// ```
5357    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5358        self.git_commitish = v.into();
5359        self
5360    }
5361
5362    /// Sets the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5363    ///
5364    /// # Example
5365    /// ```ignore,no_run
5366    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5367    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5368    /// let x = ReleaseConfig::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
5369    /// ```
5370    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
5371    where
5372        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5373    {
5374        self.code_compilation_config = std::option::Option::Some(v.into());
5375        self
5376    }
5377
5378    /// Sets or clears the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5379    ///
5380    /// # Example
5381    /// ```ignore,no_run
5382    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5383    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5384    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
5385    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
5386    /// ```
5387    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
5388    where
5389        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5390    {
5391        self.code_compilation_config = v.map(|x| x.into());
5392        self
5393    }
5394
5395    /// Sets the value of [cron_schedule][crate::model::ReleaseConfig::cron_schedule].
5396    ///
5397    /// # Example
5398    /// ```ignore,no_run
5399    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5400    /// let x = ReleaseConfig::new().set_cron_schedule("example");
5401    /// ```
5402    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5403        self.cron_schedule = v.into();
5404        self
5405    }
5406
5407    /// Sets the value of [time_zone][crate::model::ReleaseConfig::time_zone].
5408    ///
5409    /// # Example
5410    /// ```ignore,no_run
5411    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5412    /// let x = ReleaseConfig::new().set_time_zone("example");
5413    /// ```
5414    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5415        self.time_zone = v.into();
5416        self
5417    }
5418
5419    /// Sets the value of [recent_scheduled_release_records][crate::model::ReleaseConfig::recent_scheduled_release_records].
5420    ///
5421    /// # Example
5422    /// ```ignore,no_run
5423    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5424    /// use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5425    /// let x = ReleaseConfig::new()
5426    ///     .set_recent_scheduled_release_records([
5427    ///         ScheduledReleaseRecord::default()/* use setters */,
5428    ///         ScheduledReleaseRecord::default()/* use (different) setters */,
5429    ///     ]);
5430    /// ```
5431    pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
5432    where
5433        T: std::iter::IntoIterator<Item = V>,
5434        V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
5435    {
5436        use std::iter::Iterator;
5437        self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
5438        self
5439    }
5440
5441    /// Sets the value of [release_compilation_result][crate::model::ReleaseConfig::release_compilation_result].
5442    ///
5443    /// # Example
5444    /// ```ignore,no_run
5445    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5446    /// let x = ReleaseConfig::new().set_release_compilation_result("example");
5447    /// ```
5448    pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
5449        mut self,
5450        v: T,
5451    ) -> Self {
5452        self.release_compilation_result = v.into();
5453        self
5454    }
5455
5456    /// Sets the value of [disabled][crate::model::ReleaseConfig::disabled].
5457    ///
5458    /// # Example
5459    /// ```ignore,no_run
5460    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5461    /// let x = ReleaseConfig::new().set_disabled(true);
5462    /// ```
5463    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5464        self.disabled = v.into();
5465        self
5466    }
5467
5468    /// Sets the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
5469    ///
5470    /// # Example
5471    /// ```ignore,no_run
5472    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5473    /// let x = ReleaseConfig::new().set_internal_metadata("example");
5474    /// ```
5475    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
5476    where
5477        T: std::convert::Into<std::string::String>,
5478    {
5479        self.internal_metadata = std::option::Option::Some(v.into());
5480        self
5481    }
5482
5483    /// Sets or clears the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
5484    ///
5485    /// # Example
5486    /// ```ignore,no_run
5487    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5488    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(Some("example"));
5489    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(None::<String>);
5490    /// ```
5491    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5492    where
5493        T: std::convert::Into<std::string::String>,
5494    {
5495        self.internal_metadata = v.map(|x| x.into());
5496        self
5497    }
5498}
5499
5500impl wkt::message::Message for ReleaseConfig {
5501    fn typename() -> &'static str {
5502        "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
5503    }
5504}
5505
5506/// Defines additional types related to [ReleaseConfig].
5507pub mod release_config {
5508    #[allow(unused_imports)]
5509    use super::*;
5510
5511    /// A record of an attempt to create a compilation result for this release
5512    /// config.
5513    #[derive(Clone, Default, PartialEq)]
5514    #[non_exhaustive]
5515    pub struct ScheduledReleaseRecord {
5516        /// Output only. The timestamp of this release attempt.
5517        pub release_time: std::option::Option<wkt::Timestamp>,
5518
5519        /// The result of this release attempt.
5520        pub result:
5521            std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
5522
5523        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5524    }
5525
5526    impl ScheduledReleaseRecord {
5527        pub fn new() -> Self {
5528            std::default::Default::default()
5529        }
5530
5531        /// Sets the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
5532        ///
5533        /// # Example
5534        /// ```ignore,no_run
5535        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5536        /// use wkt::Timestamp;
5537        /// let x = ScheduledReleaseRecord::new().set_release_time(Timestamp::default()/* use setters */);
5538        /// ```
5539        pub fn set_release_time<T>(mut self, v: T) -> Self
5540        where
5541            T: std::convert::Into<wkt::Timestamp>,
5542        {
5543            self.release_time = std::option::Option::Some(v.into());
5544            self
5545        }
5546
5547        /// Sets or clears the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
5548        ///
5549        /// # Example
5550        /// ```ignore,no_run
5551        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5552        /// use wkt::Timestamp;
5553        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(Some(Timestamp::default()/* use setters */));
5554        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(None::<Timestamp>);
5555        /// ```
5556        pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
5557        where
5558            T: std::convert::Into<wkt::Timestamp>,
5559        {
5560            self.release_time = v.map(|x| x.into());
5561            self
5562        }
5563
5564        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result].
5565        ///
5566        /// Note that all the setters affecting `result` are mutually
5567        /// exclusive.
5568        ///
5569        /// # Example
5570        /// ```ignore,no_run
5571        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5572        /// use google_cloud_dataform_v1::model::release_config::scheduled_release_record::Result;
5573        /// let x = ScheduledReleaseRecord::new().set_result(Some(Result::CompilationResult("example".to_string())));
5574        /// ```
5575        pub fn set_result<
5576            T: std::convert::Into<
5577                    std::option::Option<
5578                        crate::model::release_config::scheduled_release_record::Result,
5579                    >,
5580                >,
5581        >(
5582            mut self,
5583            v: T,
5584        ) -> Self {
5585            self.result = v.into();
5586            self
5587        }
5588
5589        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5590        /// if it holds a `CompilationResult`, `None` if the field is not set or
5591        /// holds a different branch.
5592        pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
5593            #[allow(unreachable_patterns)]
5594            self.result.as_ref().and_then(|v| match v {
5595                crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
5596                _ => std::option::Option::None,
5597            })
5598        }
5599
5600        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5601        /// to hold a `CompilationResult`.
5602        ///
5603        /// Note that all the setters affecting `result` are
5604        /// mutually exclusive.
5605        ///
5606        /// # Example
5607        /// ```ignore,no_run
5608        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5609        /// let x = ScheduledReleaseRecord::new().set_compilation_result("example");
5610        /// assert!(x.compilation_result().is_some());
5611        /// assert!(x.error_status().is_none());
5612        /// ```
5613        pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
5614            mut self,
5615            v: T,
5616        ) -> Self {
5617            self.result = std::option::Option::Some(
5618                crate::model::release_config::scheduled_release_record::Result::CompilationResult(
5619                    v.into(),
5620                ),
5621            );
5622            self
5623        }
5624
5625        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5626        /// if it holds a `ErrorStatus`, `None` if the field is not set or
5627        /// holds a different branch.
5628        pub fn error_status(
5629            &self,
5630        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
5631            #[allow(unreachable_patterns)]
5632            self.result.as_ref().and_then(|v| match v {
5633                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
5634                    std::option::Option::Some(v)
5635                }
5636                _ => std::option::Option::None,
5637            })
5638        }
5639
5640        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
5641        /// to hold a `ErrorStatus`.
5642        ///
5643        /// Note that all the setters affecting `result` are
5644        /// mutually exclusive.
5645        ///
5646        /// # Example
5647        /// ```ignore,no_run
5648        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5649        /// use google_cloud_rpc::model::Status;
5650        /// let x = ScheduledReleaseRecord::new().set_error_status(Status::default()/* use setters */);
5651        /// assert!(x.error_status().is_some());
5652        /// assert!(x.compilation_result().is_none());
5653        /// ```
5654        pub fn set_error_status<
5655            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
5656        >(
5657            mut self,
5658            v: T,
5659        ) -> Self {
5660            self.result = std::option::Option::Some(
5661                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
5662                    v.into(),
5663                ),
5664            );
5665            self
5666        }
5667    }
5668
5669    impl wkt::message::Message for ScheduledReleaseRecord {
5670        fn typename() -> &'static str {
5671            "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
5672        }
5673    }
5674
5675    /// Defines additional types related to [ScheduledReleaseRecord].
5676    pub mod scheduled_release_record {
5677        #[allow(unused_imports)]
5678        use super::*;
5679
5680        /// The result of this release attempt.
5681        #[derive(Clone, Debug, PartialEq)]
5682        #[non_exhaustive]
5683        pub enum Result {
5684            /// The name of the created compilation result, if one was successfully
5685            /// created. Must be in the format
5686            /// `projects/*/locations/*/repositories/*/compilationResults/*`.
5687            CompilationResult(std::string::String),
5688            /// The error status encountered upon this attempt to create the
5689            /// compilation result, if the attempt was unsuccessful.
5690            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
5691        }
5692    }
5693}
5694
5695/// `ListReleaseConfigs` request message.
5696#[derive(Clone, Default, PartialEq)]
5697#[non_exhaustive]
5698pub struct ListReleaseConfigsRequest {
5699    /// Required. The repository in which to list release configs. Must be in the
5700    /// format `projects/*/locations/*/repositories/*`.
5701    pub parent: std::string::String,
5702
5703    /// Optional. Maximum number of release configs to return. The server may
5704    /// return fewer items than requested. If unspecified, the server will pick an
5705    /// appropriate default.
5706    pub page_size: i32,
5707
5708    /// Optional. Page token received from a previous `ListReleaseConfigs` call.
5709    /// Provide this to retrieve the subsequent page.
5710    ///
5711    /// When paginating, all other parameters provided to `ListReleaseConfigs`,
5712    /// with the exception of `page_size`, must match the call that provided the
5713    /// page token.
5714    pub page_token: std::string::String,
5715
5716    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5717}
5718
5719impl ListReleaseConfigsRequest {
5720    pub fn new() -> Self {
5721        std::default::Default::default()
5722    }
5723
5724    /// Sets the value of [parent][crate::model::ListReleaseConfigsRequest::parent].
5725    ///
5726    /// # Example
5727    /// ```ignore,no_run
5728    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
5729    /// let x = ListReleaseConfigsRequest::new().set_parent("example");
5730    /// ```
5731    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5732        self.parent = v.into();
5733        self
5734    }
5735
5736    /// Sets the value of [page_size][crate::model::ListReleaseConfigsRequest::page_size].
5737    ///
5738    /// # Example
5739    /// ```ignore,no_run
5740    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
5741    /// let x = ListReleaseConfigsRequest::new().set_page_size(42);
5742    /// ```
5743    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5744        self.page_size = v.into();
5745        self
5746    }
5747
5748    /// Sets the value of [page_token][crate::model::ListReleaseConfigsRequest::page_token].
5749    ///
5750    /// # Example
5751    /// ```ignore,no_run
5752    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
5753    /// let x = ListReleaseConfigsRequest::new().set_page_token("example");
5754    /// ```
5755    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5756        self.page_token = v.into();
5757        self
5758    }
5759}
5760
5761impl wkt::message::Message for ListReleaseConfigsRequest {
5762    fn typename() -> &'static str {
5763        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
5764    }
5765}
5766
5767/// `ListReleaseConfigs` response message.
5768#[derive(Clone, Default, PartialEq)]
5769#[non_exhaustive]
5770pub struct ListReleaseConfigsResponse {
5771    /// List of release configs.
5772    pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
5773
5774    /// A token, which can be sent as `page_token` to retrieve the next page.
5775    /// If this field is omitted, there are no subsequent pages.
5776    pub next_page_token: std::string::String,
5777
5778    /// Locations which could not be reached.
5779    pub unreachable: std::vec::Vec<std::string::String>,
5780
5781    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5782}
5783
5784impl ListReleaseConfigsResponse {
5785    pub fn new() -> Self {
5786        std::default::Default::default()
5787    }
5788
5789    /// Sets the value of [release_configs][crate::model::ListReleaseConfigsResponse::release_configs].
5790    ///
5791    /// # Example
5792    /// ```ignore,no_run
5793    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
5794    /// use google_cloud_dataform_v1::model::ReleaseConfig;
5795    /// let x = ListReleaseConfigsResponse::new()
5796    ///     .set_release_configs([
5797    ///         ReleaseConfig::default()/* use setters */,
5798    ///         ReleaseConfig::default()/* use (different) setters */,
5799    ///     ]);
5800    /// ```
5801    pub fn set_release_configs<T, V>(mut self, v: T) -> Self
5802    where
5803        T: std::iter::IntoIterator<Item = V>,
5804        V: std::convert::Into<crate::model::ReleaseConfig>,
5805    {
5806        use std::iter::Iterator;
5807        self.release_configs = v.into_iter().map(|i| i.into()).collect();
5808        self
5809    }
5810
5811    /// Sets the value of [next_page_token][crate::model::ListReleaseConfigsResponse::next_page_token].
5812    ///
5813    /// # Example
5814    /// ```ignore,no_run
5815    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
5816    /// let x = ListReleaseConfigsResponse::new().set_next_page_token("example");
5817    /// ```
5818    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5819        self.next_page_token = v.into();
5820        self
5821    }
5822
5823    /// Sets the value of [unreachable][crate::model::ListReleaseConfigsResponse::unreachable].
5824    ///
5825    /// # Example
5826    /// ```ignore,no_run
5827    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
5828    /// let x = ListReleaseConfigsResponse::new().set_unreachable(["a", "b", "c"]);
5829    /// ```
5830    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5831    where
5832        T: std::iter::IntoIterator<Item = V>,
5833        V: std::convert::Into<std::string::String>,
5834    {
5835        use std::iter::Iterator;
5836        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5837        self
5838    }
5839}
5840
5841impl wkt::message::Message for ListReleaseConfigsResponse {
5842    fn typename() -> &'static str {
5843        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
5844    }
5845}
5846
5847#[doc(hidden)]
5848impl google_cloud_gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
5849    type PageItem = crate::model::ReleaseConfig;
5850
5851    fn items(self) -> std::vec::Vec<Self::PageItem> {
5852        self.release_configs
5853    }
5854
5855    fn next_page_token(&self) -> std::string::String {
5856        use std::clone::Clone;
5857        self.next_page_token.clone()
5858    }
5859}
5860
5861/// `GetReleaseConfig` request message.
5862#[derive(Clone, Default, PartialEq)]
5863#[non_exhaustive]
5864pub struct GetReleaseConfigRequest {
5865    /// Required. The release config's name.
5866    pub name: std::string::String,
5867
5868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5869}
5870
5871impl GetReleaseConfigRequest {
5872    pub fn new() -> Self {
5873        std::default::Default::default()
5874    }
5875
5876    /// Sets the value of [name][crate::model::GetReleaseConfigRequest::name].
5877    ///
5878    /// # Example
5879    /// ```ignore,no_run
5880    /// # use google_cloud_dataform_v1::model::GetReleaseConfigRequest;
5881    /// let x = GetReleaseConfigRequest::new().set_name("example");
5882    /// ```
5883    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5884        self.name = v.into();
5885        self
5886    }
5887}
5888
5889impl wkt::message::Message for GetReleaseConfigRequest {
5890    fn typename() -> &'static str {
5891        "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
5892    }
5893}
5894
5895/// `CreateReleaseConfig` request message.
5896#[derive(Clone, Default, PartialEq)]
5897#[non_exhaustive]
5898pub struct CreateReleaseConfigRequest {
5899    /// Required. The repository in which to create the release config. Must be in
5900    /// the format `projects/*/locations/*/repositories/*`.
5901    pub parent: std::string::String,
5902
5903    /// Required. The release config to create.
5904    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
5905
5906    /// Required. The ID to use for the release config, which will become the final
5907    /// component of the release config's resource name.
5908    pub release_config_id: std::string::String,
5909
5910    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5911}
5912
5913impl CreateReleaseConfigRequest {
5914    pub fn new() -> Self {
5915        std::default::Default::default()
5916    }
5917
5918    /// Sets the value of [parent][crate::model::CreateReleaseConfigRequest::parent].
5919    ///
5920    /// # Example
5921    /// ```ignore,no_run
5922    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5923    /// let x = CreateReleaseConfigRequest::new().set_parent("example");
5924    /// ```
5925    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5926        self.parent = v.into();
5927        self
5928    }
5929
5930    /// Sets the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
5931    ///
5932    /// # Example
5933    /// ```ignore,no_run
5934    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5935    /// use google_cloud_dataform_v1::model::ReleaseConfig;
5936    /// let x = CreateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
5937    /// ```
5938    pub fn set_release_config<T>(mut self, v: T) -> Self
5939    where
5940        T: std::convert::Into<crate::model::ReleaseConfig>,
5941    {
5942        self.release_config = std::option::Option::Some(v.into());
5943        self
5944    }
5945
5946    /// Sets or clears the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
5947    ///
5948    /// # Example
5949    /// ```ignore,no_run
5950    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5951    /// use google_cloud_dataform_v1::model::ReleaseConfig;
5952    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
5953    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
5954    /// ```
5955    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
5956    where
5957        T: std::convert::Into<crate::model::ReleaseConfig>,
5958    {
5959        self.release_config = v.map(|x| x.into());
5960        self
5961    }
5962
5963    /// Sets the value of [release_config_id][crate::model::CreateReleaseConfigRequest::release_config_id].
5964    ///
5965    /// # Example
5966    /// ```ignore,no_run
5967    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
5968    /// let x = CreateReleaseConfigRequest::new().set_release_config_id("example");
5969    /// ```
5970    pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
5971        mut self,
5972        v: T,
5973    ) -> Self {
5974        self.release_config_id = v.into();
5975        self
5976    }
5977}
5978
5979impl wkt::message::Message for CreateReleaseConfigRequest {
5980    fn typename() -> &'static str {
5981        "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
5982    }
5983}
5984
5985/// `UpdateReleaseConfig` request message.
5986#[derive(Clone, Default, PartialEq)]
5987#[non_exhaustive]
5988pub struct UpdateReleaseConfigRequest {
5989    /// Optional. Specifies the fields to be updated in the release config. If left
5990    /// unset, all fields will be updated.
5991    pub update_mask: std::option::Option<wkt::FieldMask>,
5992
5993    /// Required. The release config to update.
5994    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
5995
5996    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5997}
5998
5999impl UpdateReleaseConfigRequest {
6000    pub fn new() -> Self {
6001        std::default::Default::default()
6002    }
6003
6004    /// Sets the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6005    ///
6006    /// # Example
6007    /// ```ignore,no_run
6008    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6009    /// use wkt::FieldMask;
6010    /// let x = UpdateReleaseConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6011    /// ```
6012    pub fn set_update_mask<T>(mut self, v: T) -> Self
6013    where
6014        T: std::convert::Into<wkt::FieldMask>,
6015    {
6016        self.update_mask = std::option::Option::Some(v.into());
6017        self
6018    }
6019
6020    /// Sets or clears the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6021    ///
6022    /// # Example
6023    /// ```ignore,no_run
6024    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6025    /// use wkt::FieldMask;
6026    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6027    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6028    /// ```
6029    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6030    where
6031        T: std::convert::Into<wkt::FieldMask>,
6032    {
6033        self.update_mask = v.map(|x| x.into());
6034        self
6035    }
6036
6037    /// Sets the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6038    ///
6039    /// # Example
6040    /// ```ignore,no_run
6041    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6042    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6043    /// let x = UpdateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6044    /// ```
6045    pub fn set_release_config<T>(mut self, v: T) -> Self
6046    where
6047        T: std::convert::Into<crate::model::ReleaseConfig>,
6048    {
6049        self.release_config = std::option::Option::Some(v.into());
6050        self
6051    }
6052
6053    /// Sets or clears the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6054    ///
6055    /// # Example
6056    /// ```ignore,no_run
6057    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6058    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6059    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6060    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6061    /// ```
6062    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6063    where
6064        T: std::convert::Into<crate::model::ReleaseConfig>,
6065    {
6066        self.release_config = v.map(|x| x.into());
6067        self
6068    }
6069}
6070
6071impl wkt::message::Message for UpdateReleaseConfigRequest {
6072    fn typename() -> &'static str {
6073        "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
6074    }
6075}
6076
6077/// `DeleteReleaseConfig` request message.
6078#[derive(Clone, Default, PartialEq)]
6079#[non_exhaustive]
6080pub struct DeleteReleaseConfigRequest {
6081    /// Required. The release config's name.
6082    pub name: std::string::String,
6083
6084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6085}
6086
6087impl DeleteReleaseConfigRequest {
6088    pub fn new() -> Self {
6089        std::default::Default::default()
6090    }
6091
6092    /// Sets the value of [name][crate::model::DeleteReleaseConfigRequest::name].
6093    ///
6094    /// # Example
6095    /// ```ignore,no_run
6096    /// # use google_cloud_dataform_v1::model::DeleteReleaseConfigRequest;
6097    /// let x = DeleteReleaseConfigRequest::new().set_name("example");
6098    /// ```
6099    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6100        self.name = v.into();
6101        self
6102    }
6103}
6104
6105impl wkt::message::Message for DeleteReleaseConfigRequest {
6106    fn typename() -> &'static str {
6107        "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
6108    }
6109}
6110
6111/// Represents the result of compiling a Dataform project.
6112#[derive(Clone, Default, PartialEq)]
6113#[non_exhaustive]
6114pub struct CompilationResult {
6115    /// Output only. The compilation result's name.
6116    pub name: std::string::String,
6117
6118    /// Immutable. If set, fields of `code_compilation_config` override the default
6119    /// compilation settings that are specified in dataform.json.
6120    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
6121
6122    /// Output only. The fully resolved Git commit SHA of the code that was
6123    /// compiled. Not set for compilation results whose source is a workspace.
6124    pub resolved_git_commit_sha: std::string::String,
6125
6126    /// Output only. The version of `@dataform/core` that was used for compilation.
6127    pub dataform_core_version: std::string::String,
6128
6129    /// Output only. Errors encountered during project compilation.
6130    pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
6131
6132    /// Output only. Only set if the repository has a KMS Key.
6133    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
6134
6135    /// Output only. The timestamp of when the compilation result was created.
6136    pub create_time: std::option::Option<wkt::Timestamp>,
6137
6138    /// Output only. All the metadata information that is used internally to serve
6139    /// the resource. For example: timestamps, flags, status fields, etc. The
6140    /// format of this field is a JSON string.
6141    pub internal_metadata: std::option::Option<std::string::String>,
6142
6143    /// The source of the compilation result.
6144    pub source: std::option::Option<crate::model::compilation_result::Source>,
6145
6146    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6147}
6148
6149impl CompilationResult {
6150    pub fn new() -> Self {
6151        std::default::Default::default()
6152    }
6153
6154    /// Sets the value of [name][crate::model::CompilationResult::name].
6155    ///
6156    /// # Example
6157    /// ```ignore,no_run
6158    /// # use google_cloud_dataform_v1::model::CompilationResult;
6159    /// let x = CompilationResult::new().set_name("example");
6160    /// ```
6161    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6162        self.name = v.into();
6163        self
6164    }
6165
6166    /// Sets the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6167    ///
6168    /// # Example
6169    /// ```ignore,no_run
6170    /// # use google_cloud_dataform_v1::model::CompilationResult;
6171    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6172    /// let x = CompilationResult::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
6173    /// ```
6174    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
6175    where
6176        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6177    {
6178        self.code_compilation_config = std::option::Option::Some(v.into());
6179        self
6180    }
6181
6182    /// Sets or clears the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6183    ///
6184    /// # Example
6185    /// ```ignore,no_run
6186    /// # use google_cloud_dataform_v1::model::CompilationResult;
6187    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6188    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
6189    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
6190    /// ```
6191    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
6192    where
6193        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6194    {
6195        self.code_compilation_config = v.map(|x| x.into());
6196        self
6197    }
6198
6199    /// Sets the value of [resolved_git_commit_sha][crate::model::CompilationResult::resolved_git_commit_sha].
6200    ///
6201    /// # Example
6202    /// ```ignore,no_run
6203    /// # use google_cloud_dataform_v1::model::CompilationResult;
6204    /// let x = CompilationResult::new().set_resolved_git_commit_sha("example");
6205    /// ```
6206    pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
6207        mut self,
6208        v: T,
6209    ) -> Self {
6210        self.resolved_git_commit_sha = v.into();
6211        self
6212    }
6213
6214    /// Sets the value of [dataform_core_version][crate::model::CompilationResult::dataform_core_version].
6215    ///
6216    /// # Example
6217    /// ```ignore,no_run
6218    /// # use google_cloud_dataform_v1::model::CompilationResult;
6219    /// let x = CompilationResult::new().set_dataform_core_version("example");
6220    /// ```
6221    pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
6222        mut self,
6223        v: T,
6224    ) -> Self {
6225        self.dataform_core_version = v.into();
6226        self
6227    }
6228
6229    /// Sets the value of [compilation_errors][crate::model::CompilationResult::compilation_errors].
6230    ///
6231    /// # Example
6232    /// ```ignore,no_run
6233    /// # use google_cloud_dataform_v1::model::CompilationResult;
6234    /// use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6235    /// let x = CompilationResult::new()
6236    ///     .set_compilation_errors([
6237    ///         CompilationError::default()/* use setters */,
6238    ///         CompilationError::default()/* use (different) setters */,
6239    ///     ]);
6240    /// ```
6241    pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
6242    where
6243        T: std::iter::IntoIterator<Item = V>,
6244        V: std::convert::Into<crate::model::compilation_result::CompilationError>,
6245    {
6246        use std::iter::Iterator;
6247        self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
6248        self
6249    }
6250
6251    /// Sets the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6252    ///
6253    /// # Example
6254    /// ```ignore,no_run
6255    /// # use google_cloud_dataform_v1::model::CompilationResult;
6256    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6257    /// let x = CompilationResult::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
6258    /// ```
6259    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
6260    where
6261        T: std::convert::Into<crate::model::DataEncryptionState>,
6262    {
6263        self.data_encryption_state = std::option::Option::Some(v.into());
6264        self
6265    }
6266
6267    /// Sets or clears the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6268    ///
6269    /// # Example
6270    /// ```ignore,no_run
6271    /// # use google_cloud_dataform_v1::model::CompilationResult;
6272    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6273    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
6274    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
6275    /// ```
6276    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
6277    where
6278        T: std::convert::Into<crate::model::DataEncryptionState>,
6279    {
6280        self.data_encryption_state = v.map(|x| x.into());
6281        self
6282    }
6283
6284    /// Sets the value of [create_time][crate::model::CompilationResult::create_time].
6285    ///
6286    /// # Example
6287    /// ```ignore,no_run
6288    /// # use google_cloud_dataform_v1::model::CompilationResult;
6289    /// use wkt::Timestamp;
6290    /// let x = CompilationResult::new().set_create_time(Timestamp::default()/* use setters */);
6291    /// ```
6292    pub fn set_create_time<T>(mut self, v: T) -> Self
6293    where
6294        T: std::convert::Into<wkt::Timestamp>,
6295    {
6296        self.create_time = std::option::Option::Some(v.into());
6297        self
6298    }
6299
6300    /// Sets or clears the value of [create_time][crate::model::CompilationResult::create_time].
6301    ///
6302    /// # Example
6303    /// ```ignore,no_run
6304    /// # use google_cloud_dataform_v1::model::CompilationResult;
6305    /// use wkt::Timestamp;
6306    /// let x = CompilationResult::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6307    /// let x = CompilationResult::new().set_or_clear_create_time(None::<Timestamp>);
6308    /// ```
6309    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6310    where
6311        T: std::convert::Into<wkt::Timestamp>,
6312    {
6313        self.create_time = v.map(|x| x.into());
6314        self
6315    }
6316
6317    /// Sets the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6318    ///
6319    /// # Example
6320    /// ```ignore,no_run
6321    /// # use google_cloud_dataform_v1::model::CompilationResult;
6322    /// let x = CompilationResult::new().set_internal_metadata("example");
6323    /// ```
6324    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
6325    where
6326        T: std::convert::Into<std::string::String>,
6327    {
6328        self.internal_metadata = std::option::Option::Some(v.into());
6329        self
6330    }
6331
6332    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6333    ///
6334    /// # Example
6335    /// ```ignore,no_run
6336    /// # use google_cloud_dataform_v1::model::CompilationResult;
6337    /// let x = CompilationResult::new().set_or_clear_internal_metadata(Some("example"));
6338    /// let x = CompilationResult::new().set_or_clear_internal_metadata(None::<String>);
6339    /// ```
6340    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6341    where
6342        T: std::convert::Into<std::string::String>,
6343    {
6344        self.internal_metadata = v.map(|x| x.into());
6345        self
6346    }
6347
6348    /// Sets the value of [source][crate::model::CompilationResult::source].
6349    ///
6350    /// Note that all the setters affecting `source` are mutually
6351    /// exclusive.
6352    ///
6353    /// # Example
6354    /// ```ignore,no_run
6355    /// # use google_cloud_dataform_v1::model::CompilationResult;
6356    /// use google_cloud_dataform_v1::model::compilation_result::Source;
6357    /// let x = CompilationResult::new().set_source(Some(Source::GitCommitish("example".to_string())));
6358    /// ```
6359    pub fn set_source<
6360        T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
6361    >(
6362        mut self,
6363        v: T,
6364    ) -> Self {
6365        self.source = v.into();
6366        self
6367    }
6368
6369    /// The value of [source][crate::model::CompilationResult::source]
6370    /// if it holds a `GitCommitish`, `None` if the field is not set or
6371    /// holds a different branch.
6372    pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
6373        #[allow(unreachable_patterns)]
6374        self.source.as_ref().and_then(|v| match v {
6375            crate::model::compilation_result::Source::GitCommitish(v) => {
6376                std::option::Option::Some(v)
6377            }
6378            _ => std::option::Option::None,
6379        })
6380    }
6381
6382    /// Sets the value of [source][crate::model::CompilationResult::source]
6383    /// to hold a `GitCommitish`.
6384    ///
6385    /// Note that all the setters affecting `source` are
6386    /// mutually exclusive.
6387    ///
6388    /// # Example
6389    /// ```ignore,no_run
6390    /// # use google_cloud_dataform_v1::model::CompilationResult;
6391    /// let x = CompilationResult::new().set_git_commitish("example");
6392    /// assert!(x.git_commitish().is_some());
6393    /// assert!(x.workspace().is_none());
6394    /// assert!(x.release_config().is_none());
6395    /// ```
6396    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6397        self.source = std::option::Option::Some(
6398            crate::model::compilation_result::Source::GitCommitish(v.into()),
6399        );
6400        self
6401    }
6402
6403    /// The value of [source][crate::model::CompilationResult::source]
6404    /// if it holds a `Workspace`, `None` if the field is not set or
6405    /// holds a different branch.
6406    pub fn workspace(&self) -> std::option::Option<&std::string::String> {
6407        #[allow(unreachable_patterns)]
6408        self.source.as_ref().and_then(|v| match v {
6409            crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
6410            _ => std::option::Option::None,
6411        })
6412    }
6413
6414    /// Sets the value of [source][crate::model::CompilationResult::source]
6415    /// to hold a `Workspace`.
6416    ///
6417    /// Note that all the setters affecting `source` are
6418    /// mutually exclusive.
6419    ///
6420    /// # Example
6421    /// ```ignore,no_run
6422    /// # use google_cloud_dataform_v1::model::CompilationResult;
6423    /// let x = CompilationResult::new().set_workspace("example");
6424    /// assert!(x.workspace().is_some());
6425    /// assert!(x.git_commitish().is_none());
6426    /// assert!(x.release_config().is_none());
6427    /// ```
6428    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6429        self.source = std::option::Option::Some(
6430            crate::model::compilation_result::Source::Workspace(v.into()),
6431        );
6432        self
6433    }
6434
6435    /// The value of [source][crate::model::CompilationResult::source]
6436    /// if it holds a `ReleaseConfig`, `None` if the field is not set or
6437    /// holds a different branch.
6438    pub fn release_config(&self) -> std::option::Option<&std::string::String> {
6439        #[allow(unreachable_patterns)]
6440        self.source.as_ref().and_then(|v| match v {
6441            crate::model::compilation_result::Source::ReleaseConfig(v) => {
6442                std::option::Option::Some(v)
6443            }
6444            _ => std::option::Option::None,
6445        })
6446    }
6447
6448    /// Sets the value of [source][crate::model::CompilationResult::source]
6449    /// to hold a `ReleaseConfig`.
6450    ///
6451    /// Note that all the setters affecting `source` are
6452    /// mutually exclusive.
6453    ///
6454    /// # Example
6455    /// ```ignore,no_run
6456    /// # use google_cloud_dataform_v1::model::CompilationResult;
6457    /// let x = CompilationResult::new().set_release_config("example");
6458    /// assert!(x.release_config().is_some());
6459    /// assert!(x.git_commitish().is_none());
6460    /// assert!(x.workspace().is_none());
6461    /// ```
6462    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6463        self.source = std::option::Option::Some(
6464            crate::model::compilation_result::Source::ReleaseConfig(v.into()),
6465        );
6466        self
6467    }
6468}
6469
6470impl wkt::message::Message for CompilationResult {
6471    fn typename() -> &'static str {
6472        "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
6473    }
6474}
6475
6476/// Defines additional types related to [CompilationResult].
6477pub mod compilation_result {
6478    #[allow(unused_imports)]
6479    use super::*;
6480
6481    /// An error encountered when attempting to compile a Dataform project.
6482    #[derive(Clone, Default, PartialEq)]
6483    #[non_exhaustive]
6484    pub struct CompilationError {
6485        /// Output only. The error's top level message.
6486        pub message: std::string::String,
6487
6488        /// Output only. The error's full stack trace.
6489        pub stack: std::string::String,
6490
6491        /// Output only. The path of the file where this error occurred, if
6492        /// available, relative to the project root.
6493        pub path: std::string::String,
6494
6495        /// Output only. The identifier of the action where this error occurred, if
6496        /// available.
6497        pub action_target: std::option::Option<crate::model::Target>,
6498
6499        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6500    }
6501
6502    impl CompilationError {
6503        pub fn new() -> Self {
6504            std::default::Default::default()
6505        }
6506
6507        /// Sets the value of [message][crate::model::compilation_result::CompilationError::message].
6508        ///
6509        /// # Example
6510        /// ```ignore,no_run
6511        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6512        /// let x = CompilationError::new().set_message("example");
6513        /// ```
6514        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6515            self.message = v.into();
6516            self
6517        }
6518
6519        /// Sets the value of [stack][crate::model::compilation_result::CompilationError::stack].
6520        ///
6521        /// # Example
6522        /// ```ignore,no_run
6523        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6524        /// let x = CompilationError::new().set_stack("example");
6525        /// ```
6526        pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6527            self.stack = v.into();
6528            self
6529        }
6530
6531        /// Sets the value of [path][crate::model::compilation_result::CompilationError::path].
6532        ///
6533        /// # Example
6534        /// ```ignore,no_run
6535        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6536        /// let x = CompilationError::new().set_path("example");
6537        /// ```
6538        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6539            self.path = v.into();
6540            self
6541        }
6542
6543        /// Sets the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
6544        ///
6545        /// # Example
6546        /// ```ignore,no_run
6547        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6548        /// use google_cloud_dataform_v1::model::Target;
6549        /// let x = CompilationError::new().set_action_target(Target::default()/* use setters */);
6550        /// ```
6551        pub fn set_action_target<T>(mut self, v: T) -> Self
6552        where
6553            T: std::convert::Into<crate::model::Target>,
6554        {
6555            self.action_target = std::option::Option::Some(v.into());
6556            self
6557        }
6558
6559        /// Sets or clears the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
6560        ///
6561        /// # Example
6562        /// ```ignore,no_run
6563        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6564        /// use google_cloud_dataform_v1::model::Target;
6565        /// let x = CompilationError::new().set_or_clear_action_target(Some(Target::default()/* use setters */));
6566        /// let x = CompilationError::new().set_or_clear_action_target(None::<Target>);
6567        /// ```
6568        pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
6569        where
6570            T: std::convert::Into<crate::model::Target>,
6571        {
6572            self.action_target = v.map(|x| x.into());
6573            self
6574        }
6575    }
6576
6577    impl wkt::message::Message for CompilationError {
6578        fn typename() -> &'static str {
6579            "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
6580        }
6581    }
6582
6583    /// The source of the compilation result.
6584    #[derive(Clone, Debug, PartialEq)]
6585    #[non_exhaustive]
6586    pub enum Source {
6587        /// Immutable. Git commit/tag/branch name at which the repository should be
6588        /// compiled. Must exist in the remote repository. Examples:
6589        ///
6590        /// - a commit SHA: `12ade345`
6591        /// - a tag: `tag1`
6592        /// - a branch name: `branch1`
6593        GitCommitish(std::string::String),
6594        /// Immutable. The name of the workspace to compile. Must be in the format
6595        /// `projects/*/locations/*/repositories/*/workspaces/*`.
6596        Workspace(std::string::String),
6597        /// Immutable. The name of the release config to compile. Must be in the
6598        /// format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
6599        ReleaseConfig(std::string::String),
6600    }
6601}
6602
6603/// Configures various aspects of Dataform code compilation.
6604#[derive(Clone, Default, PartialEq)]
6605#[non_exhaustive]
6606pub struct CodeCompilationConfig {
6607    /// Optional. The default database (Google Cloud project ID).
6608    pub default_database: std::string::String,
6609
6610    /// Optional. The default schema (BigQuery dataset ID).
6611    pub default_schema: std::string::String,
6612
6613    /// Optional. The default BigQuery location to use. Defaults to "US".
6614    /// See the BigQuery docs for a full list of locations:
6615    /// <https://cloud.google.com/bigquery/docs/locations>.
6616    pub default_location: std::string::String,
6617
6618    /// Optional. The default schema (BigQuery dataset ID) for assertions.
6619    pub assertion_schema: std::string::String,
6620
6621    /// Optional. User-defined variables that are made available to project code
6622    /// during compilation.
6623    pub vars: std::collections::HashMap<std::string::String, std::string::String>,
6624
6625    /// Optional. The suffix that should be appended to all database (Google Cloud
6626    /// project ID) names.
6627    pub database_suffix: std::string::String,
6628
6629    /// Optional. The suffix that should be appended to all schema (BigQuery
6630    /// dataset ID) names.
6631    pub schema_suffix: std::string::String,
6632
6633    /// Optional. The prefix that should be prepended to all table names.
6634    pub table_prefix: std::string::String,
6635
6636    /// Optional. The prefix to prepend to built-in assertion names.
6637    pub builtin_assertion_name_prefix: std::string::String,
6638
6639    /// Optional. The default notebook runtime options.
6640    pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
6641
6642    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6643}
6644
6645impl CodeCompilationConfig {
6646    pub fn new() -> Self {
6647        std::default::Default::default()
6648    }
6649
6650    /// Sets the value of [default_database][crate::model::CodeCompilationConfig::default_database].
6651    ///
6652    /// # Example
6653    /// ```ignore,no_run
6654    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6655    /// let x = CodeCompilationConfig::new().set_default_database("example");
6656    /// ```
6657    pub fn set_default_database<T: std::convert::Into<std::string::String>>(
6658        mut self,
6659        v: T,
6660    ) -> Self {
6661        self.default_database = v.into();
6662        self
6663    }
6664
6665    /// Sets the value of [default_schema][crate::model::CodeCompilationConfig::default_schema].
6666    ///
6667    /// # Example
6668    /// ```ignore,no_run
6669    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6670    /// let x = CodeCompilationConfig::new().set_default_schema("example");
6671    /// ```
6672    pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6673        self.default_schema = v.into();
6674        self
6675    }
6676
6677    /// Sets the value of [default_location][crate::model::CodeCompilationConfig::default_location].
6678    ///
6679    /// # Example
6680    /// ```ignore,no_run
6681    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6682    /// let x = CodeCompilationConfig::new().set_default_location("example");
6683    /// ```
6684    pub fn set_default_location<T: std::convert::Into<std::string::String>>(
6685        mut self,
6686        v: T,
6687    ) -> Self {
6688        self.default_location = v.into();
6689        self
6690    }
6691
6692    /// Sets the value of [assertion_schema][crate::model::CodeCompilationConfig::assertion_schema].
6693    ///
6694    /// # Example
6695    /// ```ignore,no_run
6696    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6697    /// let x = CodeCompilationConfig::new().set_assertion_schema("example");
6698    /// ```
6699    pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
6700        mut self,
6701        v: T,
6702    ) -> Self {
6703        self.assertion_schema = v.into();
6704        self
6705    }
6706
6707    /// Sets the value of [vars][crate::model::CodeCompilationConfig::vars].
6708    ///
6709    /// # Example
6710    /// ```ignore,no_run
6711    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6712    /// let x = CodeCompilationConfig::new().set_vars([
6713    ///     ("key0", "abc"),
6714    ///     ("key1", "xyz"),
6715    /// ]);
6716    /// ```
6717    pub fn set_vars<T, K, V>(mut self, v: T) -> Self
6718    where
6719        T: std::iter::IntoIterator<Item = (K, V)>,
6720        K: std::convert::Into<std::string::String>,
6721        V: std::convert::Into<std::string::String>,
6722    {
6723        use std::iter::Iterator;
6724        self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6725        self
6726    }
6727
6728    /// Sets the value of [database_suffix][crate::model::CodeCompilationConfig::database_suffix].
6729    ///
6730    /// # Example
6731    /// ```ignore,no_run
6732    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6733    /// let x = CodeCompilationConfig::new().set_database_suffix("example");
6734    /// ```
6735    pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6736        self.database_suffix = v.into();
6737        self
6738    }
6739
6740    /// Sets the value of [schema_suffix][crate::model::CodeCompilationConfig::schema_suffix].
6741    ///
6742    /// # Example
6743    /// ```ignore,no_run
6744    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6745    /// let x = CodeCompilationConfig::new().set_schema_suffix("example");
6746    /// ```
6747    pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6748        self.schema_suffix = v.into();
6749        self
6750    }
6751
6752    /// Sets the value of [table_prefix][crate::model::CodeCompilationConfig::table_prefix].
6753    ///
6754    /// # Example
6755    /// ```ignore,no_run
6756    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6757    /// let x = CodeCompilationConfig::new().set_table_prefix("example");
6758    /// ```
6759    pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6760        self.table_prefix = v.into();
6761        self
6762    }
6763
6764    /// Sets the value of [builtin_assertion_name_prefix][crate::model::CodeCompilationConfig::builtin_assertion_name_prefix].
6765    ///
6766    /// # Example
6767    /// ```ignore,no_run
6768    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6769    /// let x = CodeCompilationConfig::new().set_builtin_assertion_name_prefix("example");
6770    /// ```
6771    pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
6772        mut self,
6773        v: T,
6774    ) -> Self {
6775        self.builtin_assertion_name_prefix = v.into();
6776        self
6777    }
6778
6779    /// Sets the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
6780    ///
6781    /// # Example
6782    /// ```ignore,no_run
6783    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6784    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6785    /// let x = CodeCompilationConfig::new().set_default_notebook_runtime_options(NotebookRuntimeOptions::default()/* use setters */);
6786    /// ```
6787    pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
6788    where
6789        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
6790    {
6791        self.default_notebook_runtime_options = std::option::Option::Some(v.into());
6792        self
6793    }
6794
6795    /// Sets or clears the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
6796    ///
6797    /// # Example
6798    /// ```ignore,no_run
6799    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
6800    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6801    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(Some(NotebookRuntimeOptions::default()/* use setters */));
6802    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(None::<NotebookRuntimeOptions>);
6803    /// ```
6804    pub fn set_or_clear_default_notebook_runtime_options<T>(
6805        mut self,
6806        v: std::option::Option<T>,
6807    ) -> Self
6808    where
6809        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
6810    {
6811        self.default_notebook_runtime_options = v.map(|x| x.into());
6812        self
6813    }
6814}
6815
6816impl wkt::message::Message for CodeCompilationConfig {
6817    fn typename() -> &'static str {
6818        "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
6819    }
6820}
6821
6822/// Configures various aspects of Dataform notebook runtime.
6823#[derive(Clone, Default, PartialEq)]
6824#[non_exhaustive]
6825pub struct NotebookRuntimeOptions {
6826    /// Optional. The resource name of the [Colab runtime template]
6827    /// (<https://cloud.google.com/colab/docs/runtimes>), from which a runtime is
6828    /// created for notebook executions. If not specified, a runtime is created
6829    /// with Colab's default specifications.
6830    pub ai_platform_notebook_runtime_template: std::string::String,
6831
6832    /// The location to store the notebook execution result.
6833    pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
6834
6835    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6836}
6837
6838impl NotebookRuntimeOptions {
6839    pub fn new() -> Self {
6840        std::default::Default::default()
6841    }
6842
6843    /// Sets the value of [ai_platform_notebook_runtime_template][crate::model::NotebookRuntimeOptions::ai_platform_notebook_runtime_template].
6844    ///
6845    /// # Example
6846    /// ```ignore,no_run
6847    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6848    /// let x = NotebookRuntimeOptions::new().set_ai_platform_notebook_runtime_template("example");
6849    /// ```
6850    pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
6851        mut self,
6852        v: T,
6853    ) -> Self {
6854        self.ai_platform_notebook_runtime_template = v.into();
6855        self
6856    }
6857
6858    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink].
6859    ///
6860    /// Note that all the setters affecting `execution_sink` are mutually
6861    /// exclusive.
6862    ///
6863    /// # Example
6864    /// ```ignore,no_run
6865    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6866    /// use google_cloud_dataform_v1::model::notebook_runtime_options::ExecutionSink;
6867    /// let x = NotebookRuntimeOptions::new().set_execution_sink(Some(ExecutionSink::GcsOutputBucket("example".to_string())));
6868    /// ```
6869    pub fn set_execution_sink<
6870        T: std::convert::Into<
6871                std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
6872            >,
6873    >(
6874        mut self,
6875        v: T,
6876    ) -> Self {
6877        self.execution_sink = v.into();
6878        self
6879    }
6880
6881    /// The value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
6882    /// if it holds a `GcsOutputBucket`, `None` if the field is not set or
6883    /// holds a different branch.
6884    pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
6885        #[allow(unreachable_patterns)]
6886        self.execution_sink.as_ref().and_then(|v| match v {
6887            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
6888                std::option::Option::Some(v)
6889            }
6890            _ => std::option::Option::None,
6891        })
6892    }
6893
6894    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
6895    /// to hold a `GcsOutputBucket`.
6896    ///
6897    /// Note that all the setters affecting `execution_sink` are
6898    /// mutually exclusive.
6899    ///
6900    /// # Example
6901    /// ```ignore,no_run
6902    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
6903    /// let x = NotebookRuntimeOptions::new().set_gcs_output_bucket("example");
6904    /// assert!(x.gcs_output_bucket().is_some());
6905    /// ```
6906    pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
6907        mut self,
6908        v: T,
6909    ) -> Self {
6910        self.execution_sink = std::option::Option::Some(
6911            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
6912        );
6913        self
6914    }
6915}
6916
6917impl wkt::message::Message for NotebookRuntimeOptions {
6918    fn typename() -> &'static str {
6919        "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
6920    }
6921}
6922
6923/// Defines additional types related to [NotebookRuntimeOptions].
6924pub mod notebook_runtime_options {
6925    #[allow(unused_imports)]
6926    use super::*;
6927
6928    /// The location to store the notebook execution result.
6929    #[derive(Clone, Debug, PartialEq)]
6930    #[non_exhaustive]
6931    pub enum ExecutionSink {
6932        /// Optional. The Google Cloud Storage location to upload the result to.
6933        /// Format: `gs://bucket-name`.
6934        GcsOutputBucket(std::string::String),
6935    }
6936}
6937
6938/// `ListCompilationResults` request message.
6939#[derive(Clone, Default, PartialEq)]
6940#[non_exhaustive]
6941pub struct ListCompilationResultsRequest {
6942    /// Required. The repository in which to list compilation results. Must be in
6943    /// the format `projects/*/locations/*/repositories/*`.
6944    pub parent: std::string::String,
6945
6946    /// Optional. Maximum number of compilation results to return. The server may
6947    /// return fewer items than requested. If unspecified, the server will pick an
6948    /// appropriate default.
6949    pub page_size: i32,
6950
6951    /// Optional. Page token received from a previous `ListCompilationResults`
6952    /// call. Provide this to retrieve the subsequent page.
6953    ///
6954    /// When paginating, all other parameters provided to `ListCompilationResults`,
6955    /// with the exception of `page_size`, must match the call that provided the
6956    /// page token.
6957    pub page_token: std::string::String,
6958
6959    /// Optional. This field only supports ordering by `name` and `create_time`.
6960    /// If unspecified, the server will choose the ordering.
6961    /// If specified, the default order is ascending for the `name` field.
6962    pub order_by: std::string::String,
6963
6964    /// Optional. Filter for the returned list.
6965    pub filter: std::string::String,
6966
6967    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6968}
6969
6970impl ListCompilationResultsRequest {
6971    pub fn new() -> Self {
6972        std::default::Default::default()
6973    }
6974
6975    /// Sets the value of [parent][crate::model::ListCompilationResultsRequest::parent].
6976    ///
6977    /// # Example
6978    /// ```ignore,no_run
6979    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
6980    /// let x = ListCompilationResultsRequest::new().set_parent("example");
6981    /// ```
6982    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6983        self.parent = v.into();
6984        self
6985    }
6986
6987    /// Sets the value of [page_size][crate::model::ListCompilationResultsRequest::page_size].
6988    ///
6989    /// # Example
6990    /// ```ignore,no_run
6991    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
6992    /// let x = ListCompilationResultsRequest::new().set_page_size(42);
6993    /// ```
6994    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6995        self.page_size = v.into();
6996        self
6997    }
6998
6999    /// Sets the value of [page_token][crate::model::ListCompilationResultsRequest::page_token].
7000    ///
7001    /// # Example
7002    /// ```ignore,no_run
7003    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7004    /// let x = ListCompilationResultsRequest::new().set_page_token("example");
7005    /// ```
7006    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7007        self.page_token = v.into();
7008        self
7009    }
7010
7011    /// Sets the value of [order_by][crate::model::ListCompilationResultsRequest::order_by].
7012    ///
7013    /// # Example
7014    /// ```ignore,no_run
7015    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7016    /// let x = ListCompilationResultsRequest::new().set_order_by("example");
7017    /// ```
7018    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7019        self.order_by = v.into();
7020        self
7021    }
7022
7023    /// Sets the value of [filter][crate::model::ListCompilationResultsRequest::filter].
7024    ///
7025    /// # Example
7026    /// ```ignore,no_run
7027    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7028    /// let x = ListCompilationResultsRequest::new().set_filter("example");
7029    /// ```
7030    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7031        self.filter = v.into();
7032        self
7033    }
7034}
7035
7036impl wkt::message::Message for ListCompilationResultsRequest {
7037    fn typename() -> &'static str {
7038        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
7039    }
7040}
7041
7042/// `ListCompilationResults` response message.
7043#[derive(Clone, Default, PartialEq)]
7044#[non_exhaustive]
7045pub struct ListCompilationResultsResponse {
7046    /// List of compilation results.
7047    pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
7048
7049    /// A token, which can be sent as `page_token` to retrieve the next page.
7050    /// If this field is omitted, there are no subsequent pages.
7051    pub next_page_token: std::string::String,
7052
7053    /// Locations which could not be reached.
7054    pub unreachable: std::vec::Vec<std::string::String>,
7055
7056    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7057}
7058
7059impl ListCompilationResultsResponse {
7060    pub fn new() -> Self {
7061        std::default::Default::default()
7062    }
7063
7064    /// Sets the value of [compilation_results][crate::model::ListCompilationResultsResponse::compilation_results].
7065    ///
7066    /// # Example
7067    /// ```ignore,no_run
7068    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7069    /// use google_cloud_dataform_v1::model::CompilationResult;
7070    /// let x = ListCompilationResultsResponse::new()
7071    ///     .set_compilation_results([
7072    ///         CompilationResult::default()/* use setters */,
7073    ///         CompilationResult::default()/* use (different) setters */,
7074    ///     ]);
7075    /// ```
7076    pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
7077    where
7078        T: std::iter::IntoIterator<Item = V>,
7079        V: std::convert::Into<crate::model::CompilationResult>,
7080    {
7081        use std::iter::Iterator;
7082        self.compilation_results = v.into_iter().map(|i| i.into()).collect();
7083        self
7084    }
7085
7086    /// Sets the value of [next_page_token][crate::model::ListCompilationResultsResponse::next_page_token].
7087    ///
7088    /// # Example
7089    /// ```ignore,no_run
7090    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7091    /// let x = ListCompilationResultsResponse::new().set_next_page_token("example");
7092    /// ```
7093    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7094        self.next_page_token = v.into();
7095        self
7096    }
7097
7098    /// Sets the value of [unreachable][crate::model::ListCompilationResultsResponse::unreachable].
7099    ///
7100    /// # Example
7101    /// ```ignore,no_run
7102    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7103    /// let x = ListCompilationResultsResponse::new().set_unreachable(["a", "b", "c"]);
7104    /// ```
7105    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7106    where
7107        T: std::iter::IntoIterator<Item = V>,
7108        V: std::convert::Into<std::string::String>,
7109    {
7110        use std::iter::Iterator;
7111        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7112        self
7113    }
7114}
7115
7116impl wkt::message::Message for ListCompilationResultsResponse {
7117    fn typename() -> &'static str {
7118        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
7119    }
7120}
7121
7122#[doc(hidden)]
7123impl google_cloud_gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
7124    type PageItem = crate::model::CompilationResult;
7125
7126    fn items(self) -> std::vec::Vec<Self::PageItem> {
7127        self.compilation_results
7128    }
7129
7130    fn next_page_token(&self) -> std::string::String {
7131        use std::clone::Clone;
7132        self.next_page_token.clone()
7133    }
7134}
7135
7136/// `GetCompilationResult` request message.
7137#[derive(Clone, Default, PartialEq)]
7138#[non_exhaustive]
7139pub struct GetCompilationResultRequest {
7140    /// Required. The compilation result's name.
7141    pub name: std::string::String,
7142
7143    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7144}
7145
7146impl GetCompilationResultRequest {
7147    pub fn new() -> Self {
7148        std::default::Default::default()
7149    }
7150
7151    /// Sets the value of [name][crate::model::GetCompilationResultRequest::name].
7152    ///
7153    /// # Example
7154    /// ```ignore,no_run
7155    /// # use google_cloud_dataform_v1::model::GetCompilationResultRequest;
7156    /// let x = GetCompilationResultRequest::new().set_name("example");
7157    /// ```
7158    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7159        self.name = v.into();
7160        self
7161    }
7162}
7163
7164impl wkt::message::Message for GetCompilationResultRequest {
7165    fn typename() -> &'static str {
7166        "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
7167    }
7168}
7169
7170/// `CreateCompilationResult` request message.
7171#[derive(Clone, Default, PartialEq)]
7172#[non_exhaustive]
7173pub struct CreateCompilationResultRequest {
7174    /// Required. The repository in which to create the compilation result. Must be
7175    /// in the format `projects/*/locations/*/repositories/*`.
7176    pub parent: std::string::String,
7177
7178    /// Required. The compilation result to create.
7179    pub compilation_result: std::option::Option<crate::model::CompilationResult>,
7180
7181    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7182}
7183
7184impl CreateCompilationResultRequest {
7185    pub fn new() -> Self {
7186        std::default::Default::default()
7187    }
7188
7189    /// Sets the value of [parent][crate::model::CreateCompilationResultRequest::parent].
7190    ///
7191    /// # Example
7192    /// ```ignore,no_run
7193    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7194    /// let x = CreateCompilationResultRequest::new().set_parent("example");
7195    /// ```
7196    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7197        self.parent = v.into();
7198        self
7199    }
7200
7201    /// Sets the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7202    ///
7203    /// # Example
7204    /// ```ignore,no_run
7205    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7206    /// use google_cloud_dataform_v1::model::CompilationResult;
7207    /// let x = CreateCompilationResultRequest::new().set_compilation_result(CompilationResult::default()/* use setters */);
7208    /// ```
7209    pub fn set_compilation_result<T>(mut self, v: T) -> Self
7210    where
7211        T: std::convert::Into<crate::model::CompilationResult>,
7212    {
7213        self.compilation_result = std::option::Option::Some(v.into());
7214        self
7215    }
7216
7217    /// Sets or clears the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7218    ///
7219    /// # Example
7220    /// ```ignore,no_run
7221    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7222    /// use google_cloud_dataform_v1::model::CompilationResult;
7223    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(Some(CompilationResult::default()/* use setters */));
7224    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(None::<CompilationResult>);
7225    /// ```
7226    pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
7227    where
7228        T: std::convert::Into<crate::model::CompilationResult>,
7229    {
7230        self.compilation_result = v.map(|x| x.into());
7231        self
7232    }
7233}
7234
7235impl wkt::message::Message for CreateCompilationResultRequest {
7236    fn typename() -> &'static str {
7237        "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
7238    }
7239}
7240
7241/// Represents an action identifier. If the action writes output, the output
7242/// will be written to the referenced database object.
7243#[derive(Clone, Default, PartialEq)]
7244#[non_exhaustive]
7245pub struct Target {
7246    /// Optional. The action's database (Google Cloud project ID) .
7247    pub database: std::string::String,
7248
7249    /// Optional. The action's schema (BigQuery dataset ID), within `database`.
7250    pub schema: std::string::String,
7251
7252    /// Optional. The action's name, within `database` and `schema`.
7253    pub name: std::string::String,
7254
7255    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7256}
7257
7258impl Target {
7259    pub fn new() -> Self {
7260        std::default::Default::default()
7261    }
7262
7263    /// Sets the value of [database][crate::model::Target::database].
7264    ///
7265    /// # Example
7266    /// ```ignore,no_run
7267    /// # use google_cloud_dataform_v1::model::Target;
7268    /// let x = Target::new().set_database("example");
7269    /// ```
7270    pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7271        self.database = v.into();
7272        self
7273    }
7274
7275    /// Sets the value of [schema][crate::model::Target::schema].
7276    ///
7277    /// # Example
7278    /// ```ignore,no_run
7279    /// # use google_cloud_dataform_v1::model::Target;
7280    /// let x = Target::new().set_schema("example");
7281    /// ```
7282    pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7283        self.schema = v.into();
7284        self
7285    }
7286
7287    /// Sets the value of [name][crate::model::Target::name].
7288    ///
7289    /// # Example
7290    /// ```ignore,no_run
7291    /// # use google_cloud_dataform_v1::model::Target;
7292    /// let x = Target::new().set_name("example");
7293    /// ```
7294    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7295        self.name = v.into();
7296        self
7297    }
7298}
7299
7300impl wkt::message::Message for Target {
7301    fn typename() -> &'static str {
7302        "type.googleapis.com/google.cloud.dataform.v1.Target"
7303    }
7304}
7305
7306/// Describes a relation and its columns.
7307#[derive(Clone, Default, PartialEq)]
7308#[non_exhaustive]
7309pub struct RelationDescriptor {
7310    /// A text description of the relation.
7311    pub description: std::string::String,
7312
7313    /// A list of descriptions of columns within the relation.
7314    pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
7315
7316    /// A set of BigQuery labels that should be applied to the relation.
7317    pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
7318
7319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7320}
7321
7322impl RelationDescriptor {
7323    pub fn new() -> Self {
7324        std::default::Default::default()
7325    }
7326
7327    /// Sets the value of [description][crate::model::RelationDescriptor::description].
7328    ///
7329    /// # Example
7330    /// ```ignore,no_run
7331    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7332    /// let x = RelationDescriptor::new().set_description("example");
7333    /// ```
7334    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7335        self.description = v.into();
7336        self
7337    }
7338
7339    /// Sets the value of [columns][crate::model::RelationDescriptor::columns].
7340    ///
7341    /// # Example
7342    /// ```ignore,no_run
7343    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7344    /// use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7345    /// let x = RelationDescriptor::new()
7346    ///     .set_columns([
7347    ///         ColumnDescriptor::default()/* use setters */,
7348    ///         ColumnDescriptor::default()/* use (different) setters */,
7349    ///     ]);
7350    /// ```
7351    pub fn set_columns<T, V>(mut self, v: T) -> Self
7352    where
7353        T: std::iter::IntoIterator<Item = V>,
7354        V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
7355    {
7356        use std::iter::Iterator;
7357        self.columns = v.into_iter().map(|i| i.into()).collect();
7358        self
7359    }
7360
7361    /// Sets the value of [bigquery_labels][crate::model::RelationDescriptor::bigquery_labels].
7362    ///
7363    /// # Example
7364    /// ```ignore,no_run
7365    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7366    /// let x = RelationDescriptor::new().set_bigquery_labels([
7367    ///     ("key0", "abc"),
7368    ///     ("key1", "xyz"),
7369    /// ]);
7370    /// ```
7371    pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
7372    where
7373        T: std::iter::IntoIterator<Item = (K, V)>,
7374        K: std::convert::Into<std::string::String>,
7375        V: std::convert::Into<std::string::String>,
7376    {
7377        use std::iter::Iterator;
7378        self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7379        self
7380    }
7381}
7382
7383impl wkt::message::Message for RelationDescriptor {
7384    fn typename() -> &'static str {
7385        "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
7386    }
7387}
7388
7389/// Defines additional types related to [RelationDescriptor].
7390pub mod relation_descriptor {
7391    #[allow(unused_imports)]
7392    use super::*;
7393
7394    /// Describes a column.
7395    #[derive(Clone, Default, PartialEq)]
7396    #[non_exhaustive]
7397    pub struct ColumnDescriptor {
7398        /// The identifier for the column. Each entry in `path` represents one level
7399        /// of nesting.
7400        pub path: std::vec::Vec<std::string::String>,
7401
7402        /// A textual description of the column.
7403        pub description: std::string::String,
7404
7405        /// A list of BigQuery policy tags that will be applied to the column.
7406        pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
7407
7408        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7409    }
7410
7411    impl ColumnDescriptor {
7412        pub fn new() -> Self {
7413            std::default::Default::default()
7414        }
7415
7416        /// Sets the value of [path][crate::model::relation_descriptor::ColumnDescriptor::path].
7417        ///
7418        /// # Example
7419        /// ```ignore,no_run
7420        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7421        /// let x = ColumnDescriptor::new().set_path(["a", "b", "c"]);
7422        /// ```
7423        pub fn set_path<T, V>(mut self, v: T) -> Self
7424        where
7425            T: std::iter::IntoIterator<Item = V>,
7426            V: std::convert::Into<std::string::String>,
7427        {
7428            use std::iter::Iterator;
7429            self.path = v.into_iter().map(|i| i.into()).collect();
7430            self
7431        }
7432
7433        /// Sets the value of [description][crate::model::relation_descriptor::ColumnDescriptor::description].
7434        ///
7435        /// # Example
7436        /// ```ignore,no_run
7437        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7438        /// let x = ColumnDescriptor::new().set_description("example");
7439        /// ```
7440        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7441            self.description = v.into();
7442            self
7443        }
7444
7445        /// Sets the value of [bigquery_policy_tags][crate::model::relation_descriptor::ColumnDescriptor::bigquery_policy_tags].
7446        ///
7447        /// # Example
7448        /// ```ignore,no_run
7449        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7450        /// let x = ColumnDescriptor::new().set_bigquery_policy_tags(["a", "b", "c"]);
7451        /// ```
7452        pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
7453        where
7454            T: std::iter::IntoIterator<Item = V>,
7455            V: std::convert::Into<std::string::String>,
7456        {
7457            use std::iter::Iterator;
7458            self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
7459            self
7460        }
7461    }
7462
7463    impl wkt::message::Message for ColumnDescriptor {
7464        fn typename() -> &'static str {
7465            "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
7466        }
7467    }
7468}
7469
7470/// Represents a single Dataform action in a compilation result.
7471#[derive(Clone, Default, PartialEq)]
7472#[non_exhaustive]
7473pub struct CompilationResultAction {
7474    /// This action's identifier. Unique within the compilation result.
7475    pub target: std::option::Option<crate::model::Target>,
7476
7477    /// The action's identifier if the project had been compiled without any
7478    /// overrides configured. Unique within the compilation result.
7479    pub canonical_target: std::option::Option<crate::model::Target>,
7480
7481    /// The full path including filename in which this action is located, relative
7482    /// to the workspace root.
7483    pub file_path: std::string::String,
7484
7485    /// Output only. All the metadata information that is used internally to serve
7486    /// the resource. For example: timestamps, flags, status fields, etc. The
7487    /// format of this field is a JSON string.
7488    pub internal_metadata: std::option::Option<std::string::String>,
7489
7490    /// The compiled object.
7491    pub compiled_object:
7492        std::option::Option<crate::model::compilation_result_action::CompiledObject>,
7493
7494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7495}
7496
7497impl CompilationResultAction {
7498    pub fn new() -> Self {
7499        std::default::Default::default()
7500    }
7501
7502    /// Sets the value of [target][crate::model::CompilationResultAction::target].
7503    ///
7504    /// # Example
7505    /// ```ignore,no_run
7506    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7507    /// use google_cloud_dataform_v1::model::Target;
7508    /// let x = CompilationResultAction::new().set_target(Target::default()/* use setters */);
7509    /// ```
7510    pub fn set_target<T>(mut self, v: T) -> Self
7511    where
7512        T: std::convert::Into<crate::model::Target>,
7513    {
7514        self.target = std::option::Option::Some(v.into());
7515        self
7516    }
7517
7518    /// Sets or clears the value of [target][crate::model::CompilationResultAction::target].
7519    ///
7520    /// # Example
7521    /// ```ignore,no_run
7522    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7523    /// use google_cloud_dataform_v1::model::Target;
7524    /// let x = CompilationResultAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
7525    /// let x = CompilationResultAction::new().set_or_clear_target(None::<Target>);
7526    /// ```
7527    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
7528    where
7529        T: std::convert::Into<crate::model::Target>,
7530    {
7531        self.target = v.map(|x| x.into());
7532        self
7533    }
7534
7535    /// Sets the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
7536    ///
7537    /// # Example
7538    /// ```ignore,no_run
7539    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7540    /// use google_cloud_dataform_v1::model::Target;
7541    /// let x = CompilationResultAction::new().set_canonical_target(Target::default()/* use setters */);
7542    /// ```
7543    pub fn set_canonical_target<T>(mut self, v: T) -> Self
7544    where
7545        T: std::convert::Into<crate::model::Target>,
7546    {
7547        self.canonical_target = std::option::Option::Some(v.into());
7548        self
7549    }
7550
7551    /// Sets or clears the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
7552    ///
7553    /// # Example
7554    /// ```ignore,no_run
7555    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7556    /// use google_cloud_dataform_v1::model::Target;
7557    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
7558    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(None::<Target>);
7559    /// ```
7560    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
7561    where
7562        T: std::convert::Into<crate::model::Target>,
7563    {
7564        self.canonical_target = v.map(|x| x.into());
7565        self
7566    }
7567
7568    /// Sets the value of [file_path][crate::model::CompilationResultAction::file_path].
7569    ///
7570    /// # Example
7571    /// ```ignore,no_run
7572    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7573    /// let x = CompilationResultAction::new().set_file_path("example");
7574    /// ```
7575    pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7576        self.file_path = v.into();
7577        self
7578    }
7579
7580    /// Sets the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
7581    ///
7582    /// # Example
7583    /// ```ignore,no_run
7584    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7585    /// let x = CompilationResultAction::new().set_internal_metadata("example");
7586    /// ```
7587    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
7588    where
7589        T: std::convert::Into<std::string::String>,
7590    {
7591        self.internal_metadata = std::option::Option::Some(v.into());
7592        self
7593    }
7594
7595    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
7596    ///
7597    /// # Example
7598    /// ```ignore,no_run
7599    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7600    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(Some("example"));
7601    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(None::<String>);
7602    /// ```
7603    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7604    where
7605        T: std::convert::Into<std::string::String>,
7606    {
7607        self.internal_metadata = v.map(|x| x.into());
7608        self
7609    }
7610
7611    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object].
7612    ///
7613    /// Note that all the setters affecting `compiled_object` are mutually
7614    /// exclusive.
7615    ///
7616    /// # Example
7617    /// ```ignore,no_run
7618    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7619    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
7620    /// let x = CompilationResultAction::new().set_compiled_object(Some(
7621    ///     google_cloud_dataform_v1::model::compilation_result_action::CompiledObject::Relation(Relation::default().into())));
7622    /// ```
7623    pub fn set_compiled_object<
7624        T: std::convert::Into<
7625                std::option::Option<crate::model::compilation_result_action::CompiledObject>,
7626            >,
7627    >(
7628        mut self,
7629        v: T,
7630    ) -> Self {
7631        self.compiled_object = v.into();
7632        self
7633    }
7634
7635    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7636    /// if it holds a `Relation`, `None` if the field is not set or
7637    /// holds a different branch.
7638    pub fn relation(
7639        &self,
7640    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
7641    {
7642        #[allow(unreachable_patterns)]
7643        self.compiled_object.as_ref().and_then(|v| match v {
7644            crate::model::compilation_result_action::CompiledObject::Relation(v) => {
7645                std::option::Option::Some(v)
7646            }
7647            _ => std::option::Option::None,
7648        })
7649    }
7650
7651    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7652    /// to hold a `Relation`.
7653    ///
7654    /// Note that all the setters affecting `compiled_object` are
7655    /// mutually exclusive.
7656    ///
7657    /// # Example
7658    /// ```ignore,no_run
7659    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7660    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
7661    /// let x = CompilationResultAction::new().set_relation(Relation::default()/* use setters */);
7662    /// assert!(x.relation().is_some());
7663    /// assert!(x.operations().is_none());
7664    /// assert!(x.assertion().is_none());
7665    /// assert!(x.declaration().is_none());
7666    /// assert!(x.notebook().is_none());
7667    /// assert!(x.data_preparation().is_none());
7668    /// ```
7669    pub fn set_relation<
7670        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
7671    >(
7672        mut self,
7673        v: T,
7674    ) -> Self {
7675        self.compiled_object = std::option::Option::Some(
7676            crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
7677        );
7678        self
7679    }
7680
7681    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7682    /// if it holds a `Operations`, `None` if the field is not set or
7683    /// holds a different branch.
7684    pub fn operations(
7685        &self,
7686    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
7687    {
7688        #[allow(unreachable_patterns)]
7689        self.compiled_object.as_ref().and_then(|v| match v {
7690            crate::model::compilation_result_action::CompiledObject::Operations(v) => {
7691                std::option::Option::Some(v)
7692            }
7693            _ => std::option::Option::None,
7694        })
7695    }
7696
7697    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7698    /// to hold a `Operations`.
7699    ///
7700    /// Note that all the setters affecting `compiled_object` are
7701    /// mutually exclusive.
7702    ///
7703    /// # Example
7704    /// ```ignore,no_run
7705    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7706    /// use google_cloud_dataform_v1::model::compilation_result_action::Operations;
7707    /// let x = CompilationResultAction::new().set_operations(Operations::default()/* use setters */);
7708    /// assert!(x.operations().is_some());
7709    /// assert!(x.relation().is_none());
7710    /// assert!(x.assertion().is_none());
7711    /// assert!(x.declaration().is_none());
7712    /// assert!(x.notebook().is_none());
7713    /// assert!(x.data_preparation().is_none());
7714    /// ```
7715    pub fn set_operations<
7716        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
7717    >(
7718        mut self,
7719        v: T,
7720    ) -> Self {
7721        self.compiled_object = std::option::Option::Some(
7722            crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
7723        );
7724        self
7725    }
7726
7727    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7728    /// if it holds a `Assertion`, `None` if the field is not set or
7729    /// holds a different branch.
7730    pub fn assertion(
7731        &self,
7732    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
7733    {
7734        #[allow(unreachable_patterns)]
7735        self.compiled_object.as_ref().and_then(|v| match v {
7736            crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
7737                std::option::Option::Some(v)
7738            }
7739            _ => std::option::Option::None,
7740        })
7741    }
7742
7743    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7744    /// to hold a `Assertion`.
7745    ///
7746    /// Note that all the setters affecting `compiled_object` are
7747    /// mutually exclusive.
7748    ///
7749    /// # Example
7750    /// ```ignore,no_run
7751    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7752    /// use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
7753    /// let x = CompilationResultAction::new().set_assertion(Assertion::default()/* use setters */);
7754    /// assert!(x.assertion().is_some());
7755    /// assert!(x.relation().is_none());
7756    /// assert!(x.operations().is_none());
7757    /// assert!(x.declaration().is_none());
7758    /// assert!(x.notebook().is_none());
7759    /// assert!(x.data_preparation().is_none());
7760    /// ```
7761    pub fn set_assertion<
7762        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
7763    >(
7764        mut self,
7765        v: T,
7766    ) -> Self {
7767        self.compiled_object = std::option::Option::Some(
7768            crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
7769        );
7770        self
7771    }
7772
7773    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7774    /// if it holds a `Declaration`, `None` if the field is not set or
7775    /// holds a different branch.
7776    pub fn declaration(
7777        &self,
7778    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
7779    {
7780        #[allow(unreachable_patterns)]
7781        self.compiled_object.as_ref().and_then(|v| match v {
7782            crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
7783                std::option::Option::Some(v)
7784            }
7785            _ => std::option::Option::None,
7786        })
7787    }
7788
7789    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7790    /// to hold a `Declaration`.
7791    ///
7792    /// Note that all the setters affecting `compiled_object` are
7793    /// mutually exclusive.
7794    ///
7795    /// # Example
7796    /// ```ignore,no_run
7797    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7798    /// use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
7799    /// let x = CompilationResultAction::new().set_declaration(Declaration::default()/* use setters */);
7800    /// assert!(x.declaration().is_some());
7801    /// assert!(x.relation().is_none());
7802    /// assert!(x.operations().is_none());
7803    /// assert!(x.assertion().is_none());
7804    /// assert!(x.notebook().is_none());
7805    /// assert!(x.data_preparation().is_none());
7806    /// ```
7807    pub fn set_declaration<
7808        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
7809    >(
7810        mut self,
7811        v: T,
7812    ) -> Self {
7813        self.compiled_object = std::option::Option::Some(
7814            crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
7815        );
7816        self
7817    }
7818
7819    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7820    /// if it holds a `Notebook`, `None` if the field is not set or
7821    /// holds a different branch.
7822    pub fn notebook(
7823        &self,
7824    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
7825    {
7826        #[allow(unreachable_patterns)]
7827        self.compiled_object.as_ref().and_then(|v| match v {
7828            crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
7829                std::option::Option::Some(v)
7830            }
7831            _ => std::option::Option::None,
7832        })
7833    }
7834
7835    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7836    /// to hold a `Notebook`.
7837    ///
7838    /// Note that all the setters affecting `compiled_object` are
7839    /// mutually exclusive.
7840    ///
7841    /// # Example
7842    /// ```ignore,no_run
7843    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7844    /// use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
7845    /// let x = CompilationResultAction::new().set_notebook(Notebook::default()/* use setters */);
7846    /// assert!(x.notebook().is_some());
7847    /// assert!(x.relation().is_none());
7848    /// assert!(x.operations().is_none());
7849    /// assert!(x.assertion().is_none());
7850    /// assert!(x.declaration().is_none());
7851    /// assert!(x.data_preparation().is_none());
7852    /// ```
7853    pub fn set_notebook<
7854        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
7855    >(
7856        mut self,
7857        v: T,
7858    ) -> Self {
7859        self.compiled_object = std::option::Option::Some(
7860            crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
7861        );
7862        self
7863    }
7864
7865    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7866    /// if it holds a `DataPreparation`, `None` if the field is not set or
7867    /// holds a different branch.
7868    pub fn data_preparation(
7869        &self,
7870    ) -> std::option::Option<
7871        &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
7872    > {
7873        #[allow(unreachable_patterns)]
7874        self.compiled_object.as_ref().and_then(|v| match v {
7875            crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
7876                std::option::Option::Some(v)
7877            }
7878            _ => std::option::Option::None,
7879        })
7880    }
7881
7882    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
7883    /// to hold a `DataPreparation`.
7884    ///
7885    /// Note that all the setters affecting `compiled_object` are
7886    /// mutually exclusive.
7887    ///
7888    /// # Example
7889    /// ```ignore,no_run
7890    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
7891    /// use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
7892    /// let x = CompilationResultAction::new().set_data_preparation(DataPreparation::default()/* use setters */);
7893    /// assert!(x.data_preparation().is_some());
7894    /// assert!(x.relation().is_none());
7895    /// assert!(x.operations().is_none());
7896    /// assert!(x.assertion().is_none());
7897    /// assert!(x.declaration().is_none());
7898    /// assert!(x.notebook().is_none());
7899    /// ```
7900    pub fn set_data_preparation<
7901        T: std::convert::Into<
7902                std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
7903            >,
7904    >(
7905        mut self,
7906        v: T,
7907    ) -> Self {
7908        self.compiled_object = std::option::Option::Some(
7909            crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
7910        );
7911        self
7912    }
7913}
7914
7915impl wkt::message::Message for CompilationResultAction {
7916    fn typename() -> &'static str {
7917        "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
7918    }
7919}
7920
7921/// Defines additional types related to [CompilationResultAction].
7922pub mod compilation_result_action {
7923    #[allow(unused_imports)]
7924    use super::*;
7925
7926    /// Represents a database relation.
7927    #[derive(Clone, Default, PartialEq)]
7928    #[non_exhaustive]
7929    pub struct Relation {
7930        /// A list of actions that this action depends on.
7931        pub dependency_targets: std::vec::Vec<crate::model::Target>,
7932
7933        /// Whether this action is disabled (i.e. should not be run).
7934        pub disabled: bool,
7935
7936        /// Arbitrary, user-defined tags on this action.
7937        pub tags: std::vec::Vec<std::string::String>,
7938
7939        /// Descriptor for the relation and its columns.
7940        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
7941
7942        /// The type of this relation.
7943        pub relation_type: crate::model::compilation_result_action::relation::RelationType,
7944
7945        /// The SELECT query which returns rows which this relation should contain.
7946        pub select_query: std::string::String,
7947
7948        /// SQL statements to be executed before creating the relation.
7949        pub pre_operations: std::vec::Vec<std::string::String>,
7950
7951        /// SQL statements to be executed after creating the relation.
7952        pub post_operations: std::vec::Vec<std::string::String>,
7953
7954        /// Configures `INCREMENTAL_TABLE` settings for this relation. Only set if
7955        /// `relation_type` is `INCREMENTAL_TABLE`.
7956        pub incremental_table_config: std::option::Option<
7957            crate::model::compilation_result_action::relation::IncrementalTableConfig,
7958        >,
7959
7960        /// The SQL expression used to partition the relation.
7961        pub partition_expression: std::string::String,
7962
7963        /// A list of columns or SQL expressions used to cluster the table.
7964        pub cluster_expressions: std::vec::Vec<std::string::String>,
7965
7966        /// Sets the partition expiration in days.
7967        pub partition_expiration_days: i32,
7968
7969        /// Specifies whether queries on this table must include a predicate filter
7970        /// that filters on the partitioning column.
7971        pub require_partition_filter: bool,
7972
7973        /// Additional options that will be provided as key/value pairs into the
7974        /// options clause of a create table/view statement. See
7975        /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language>
7976        /// for more information on which options are supported.
7977        pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
7978
7979        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7980    }
7981
7982    impl Relation {
7983        pub fn new() -> Self {
7984            std::default::Default::default()
7985        }
7986
7987        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Relation::dependency_targets].
7988        ///
7989        /// # Example
7990        /// ```ignore,no_run
7991        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
7992        /// use google_cloud_dataform_v1::model::Target;
7993        /// let x = Relation::new()
7994        ///     .set_dependency_targets([
7995        ///         Target::default()/* use setters */,
7996        ///         Target::default()/* use (different) setters */,
7997        ///     ]);
7998        /// ```
7999        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8000        where
8001            T: std::iter::IntoIterator<Item = V>,
8002            V: std::convert::Into<crate::model::Target>,
8003        {
8004            use std::iter::Iterator;
8005            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8006            self
8007        }
8008
8009        /// Sets the value of [disabled][crate::model::compilation_result_action::Relation::disabled].
8010        ///
8011        /// # Example
8012        /// ```ignore,no_run
8013        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8014        /// let x = Relation::new().set_disabled(true);
8015        /// ```
8016        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8017            self.disabled = v.into();
8018            self
8019        }
8020
8021        /// Sets the value of [tags][crate::model::compilation_result_action::Relation::tags].
8022        ///
8023        /// # Example
8024        /// ```ignore,no_run
8025        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8026        /// let x = Relation::new().set_tags(["a", "b", "c"]);
8027        /// ```
8028        pub fn set_tags<T, V>(mut self, v: T) -> Self
8029        where
8030            T: std::iter::IntoIterator<Item = V>,
8031            V: std::convert::Into<std::string::String>,
8032        {
8033            use std::iter::Iterator;
8034            self.tags = v.into_iter().map(|i| i.into()).collect();
8035            self
8036        }
8037
8038        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8039        ///
8040        /// # Example
8041        /// ```ignore,no_run
8042        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8043        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8044        /// let x = Relation::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8045        /// ```
8046        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8047        where
8048            T: std::convert::Into<crate::model::RelationDescriptor>,
8049        {
8050            self.relation_descriptor = std::option::Option::Some(v.into());
8051            self
8052        }
8053
8054        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8055        ///
8056        /// # Example
8057        /// ```ignore,no_run
8058        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8059        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8060        /// let x = Relation::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8061        /// let x = Relation::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8062        /// ```
8063        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8064        where
8065            T: std::convert::Into<crate::model::RelationDescriptor>,
8066        {
8067            self.relation_descriptor = v.map(|x| x.into());
8068            self
8069        }
8070
8071        /// Sets the value of [relation_type][crate::model::compilation_result_action::Relation::relation_type].
8072        ///
8073        /// # Example
8074        /// ```ignore,no_run
8075        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8076        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::RelationType;
8077        /// let x0 = Relation::new().set_relation_type(RelationType::Table);
8078        /// let x1 = Relation::new().set_relation_type(RelationType::View);
8079        /// let x2 = Relation::new().set_relation_type(RelationType::IncrementalTable);
8080        /// ```
8081        pub fn set_relation_type<
8082            T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
8083        >(
8084            mut self,
8085            v: T,
8086        ) -> Self {
8087            self.relation_type = v.into();
8088            self
8089        }
8090
8091        /// Sets the value of [select_query][crate::model::compilation_result_action::Relation::select_query].
8092        ///
8093        /// # Example
8094        /// ```ignore,no_run
8095        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8096        /// let x = Relation::new().set_select_query("example");
8097        /// ```
8098        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
8099            mut self,
8100            v: T,
8101        ) -> Self {
8102            self.select_query = v.into();
8103            self
8104        }
8105
8106        /// Sets the value of [pre_operations][crate::model::compilation_result_action::Relation::pre_operations].
8107        ///
8108        /// # Example
8109        /// ```ignore,no_run
8110        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8111        /// let x = Relation::new().set_pre_operations(["a", "b", "c"]);
8112        /// ```
8113        pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
8114        where
8115            T: std::iter::IntoIterator<Item = V>,
8116            V: std::convert::Into<std::string::String>,
8117        {
8118            use std::iter::Iterator;
8119            self.pre_operations = v.into_iter().map(|i| i.into()).collect();
8120            self
8121        }
8122
8123        /// Sets the value of [post_operations][crate::model::compilation_result_action::Relation::post_operations].
8124        ///
8125        /// # Example
8126        /// ```ignore,no_run
8127        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8128        /// let x = Relation::new().set_post_operations(["a", "b", "c"]);
8129        /// ```
8130        pub fn set_post_operations<T, V>(mut self, v: T) -> Self
8131        where
8132            T: std::iter::IntoIterator<Item = V>,
8133            V: std::convert::Into<std::string::String>,
8134        {
8135            use std::iter::Iterator;
8136            self.post_operations = v.into_iter().map(|i| i.into()).collect();
8137            self
8138        }
8139
8140        /// Sets the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8141        ///
8142        /// # Example
8143        /// ```ignore,no_run
8144        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8145        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8146        /// let x = Relation::new().set_incremental_table_config(IncrementalTableConfig::default()/* use setters */);
8147        /// ```
8148        pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
8149        where
8150            T: std::convert::Into<
8151                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8152                >,
8153        {
8154            self.incremental_table_config = std::option::Option::Some(v.into());
8155            self
8156        }
8157
8158        /// Sets or clears the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8159        ///
8160        /// # Example
8161        /// ```ignore,no_run
8162        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8163        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8164        /// let x = Relation::new().set_or_clear_incremental_table_config(Some(IncrementalTableConfig::default()/* use setters */));
8165        /// let x = Relation::new().set_or_clear_incremental_table_config(None::<IncrementalTableConfig>);
8166        /// ```
8167        pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
8168        where
8169            T: std::convert::Into<
8170                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8171                >,
8172        {
8173            self.incremental_table_config = v.map(|x| x.into());
8174            self
8175        }
8176
8177        /// Sets the value of [partition_expression][crate::model::compilation_result_action::Relation::partition_expression].
8178        ///
8179        /// # Example
8180        /// ```ignore,no_run
8181        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8182        /// let x = Relation::new().set_partition_expression("example");
8183        /// ```
8184        pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
8185            mut self,
8186            v: T,
8187        ) -> Self {
8188            self.partition_expression = v.into();
8189            self
8190        }
8191
8192        /// Sets the value of [cluster_expressions][crate::model::compilation_result_action::Relation::cluster_expressions].
8193        ///
8194        /// # Example
8195        /// ```ignore,no_run
8196        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8197        /// let x = Relation::new().set_cluster_expressions(["a", "b", "c"]);
8198        /// ```
8199        pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
8200        where
8201            T: std::iter::IntoIterator<Item = V>,
8202            V: std::convert::Into<std::string::String>,
8203        {
8204            use std::iter::Iterator;
8205            self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
8206            self
8207        }
8208
8209        /// Sets the value of [partition_expiration_days][crate::model::compilation_result_action::Relation::partition_expiration_days].
8210        ///
8211        /// # Example
8212        /// ```ignore,no_run
8213        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8214        /// let x = Relation::new().set_partition_expiration_days(42);
8215        /// ```
8216        pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8217            self.partition_expiration_days = v.into();
8218            self
8219        }
8220
8221        /// Sets the value of [require_partition_filter][crate::model::compilation_result_action::Relation::require_partition_filter].
8222        ///
8223        /// # Example
8224        /// ```ignore,no_run
8225        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8226        /// let x = Relation::new().set_require_partition_filter(true);
8227        /// ```
8228        pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8229            self.require_partition_filter = v.into();
8230            self
8231        }
8232
8233        /// Sets the value of [additional_options][crate::model::compilation_result_action::Relation::additional_options].
8234        ///
8235        /// # Example
8236        /// ```ignore,no_run
8237        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8238        /// let x = Relation::new().set_additional_options([
8239        ///     ("key0", "abc"),
8240        ///     ("key1", "xyz"),
8241        /// ]);
8242        /// ```
8243        pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
8244        where
8245            T: std::iter::IntoIterator<Item = (K, V)>,
8246            K: std::convert::Into<std::string::String>,
8247            V: std::convert::Into<std::string::String>,
8248        {
8249            use std::iter::Iterator;
8250            self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8251            self
8252        }
8253    }
8254
8255    impl wkt::message::Message for Relation {
8256        fn typename() -> &'static str {
8257            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
8258        }
8259    }
8260
8261    /// Defines additional types related to [Relation].
8262    pub mod relation {
8263        #[allow(unused_imports)]
8264        use super::*;
8265
8266        /// Contains settings for relations of type `INCREMENTAL_TABLE`.
8267        #[derive(Clone, Default, PartialEq)]
8268        #[non_exhaustive]
8269        pub struct IncrementalTableConfig {
8270            /// The SELECT query which returns rows which should be inserted into the
8271            /// relation if it already exists and is not being refreshed.
8272            pub incremental_select_query: std::string::String,
8273
8274            /// Whether this table should be protected from being refreshed.
8275            pub refresh_disabled: bool,
8276
8277            /// A set of columns or SQL expressions used to define row uniqueness.
8278            /// If any duplicates are discovered (as defined by `unique_key_parts`),
8279            /// only the newly selected rows (as defined by `incremental_select_query`)
8280            /// will be included in the relation.
8281            pub unique_key_parts: std::vec::Vec<std::string::String>,
8282
8283            /// A SQL expression conditional used to limit the set of existing rows
8284            /// considered for a merge operation (see `unique_key_parts` for more
8285            /// information).
8286            pub update_partition_filter: std::string::String,
8287
8288            /// SQL statements to be executed before inserting new rows into the
8289            /// relation.
8290            pub incremental_pre_operations: std::vec::Vec<std::string::String>,
8291
8292            /// SQL statements to be executed after inserting new rows into the
8293            /// relation.
8294            pub incremental_post_operations: std::vec::Vec<std::string::String>,
8295
8296            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8297        }
8298
8299        impl IncrementalTableConfig {
8300            pub fn new() -> Self {
8301                std::default::Default::default()
8302            }
8303
8304            /// Sets the value of [incremental_select_query][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_select_query].
8305            ///
8306            /// # Example
8307            /// ```ignore,no_run
8308            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8309            /// let x = IncrementalTableConfig::new().set_incremental_select_query("example");
8310            /// ```
8311            pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
8312                mut self,
8313                v: T,
8314            ) -> Self {
8315                self.incremental_select_query = v.into();
8316                self
8317            }
8318
8319            /// Sets the value of [refresh_disabled][crate::model::compilation_result_action::relation::IncrementalTableConfig::refresh_disabled].
8320            ///
8321            /// # Example
8322            /// ```ignore,no_run
8323            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8324            /// let x = IncrementalTableConfig::new().set_refresh_disabled(true);
8325            /// ```
8326            pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8327                self.refresh_disabled = v.into();
8328                self
8329            }
8330
8331            /// Sets the value of [unique_key_parts][crate::model::compilation_result_action::relation::IncrementalTableConfig::unique_key_parts].
8332            ///
8333            /// # Example
8334            /// ```ignore,no_run
8335            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8336            /// let x = IncrementalTableConfig::new().set_unique_key_parts(["a", "b", "c"]);
8337            /// ```
8338            pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
8339            where
8340                T: std::iter::IntoIterator<Item = V>,
8341                V: std::convert::Into<std::string::String>,
8342            {
8343                use std::iter::Iterator;
8344                self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
8345                self
8346            }
8347
8348            /// Sets the value of [update_partition_filter][crate::model::compilation_result_action::relation::IncrementalTableConfig::update_partition_filter].
8349            ///
8350            /// # Example
8351            /// ```ignore,no_run
8352            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8353            /// let x = IncrementalTableConfig::new().set_update_partition_filter("example");
8354            /// ```
8355            pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
8356                mut self,
8357                v: T,
8358            ) -> Self {
8359                self.update_partition_filter = v.into();
8360                self
8361            }
8362
8363            /// Sets the value of [incremental_pre_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_pre_operations].
8364            ///
8365            /// # Example
8366            /// ```ignore,no_run
8367            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8368            /// let x = IncrementalTableConfig::new().set_incremental_pre_operations(["a", "b", "c"]);
8369            /// ```
8370            pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
8371            where
8372                T: std::iter::IntoIterator<Item = V>,
8373                V: std::convert::Into<std::string::String>,
8374            {
8375                use std::iter::Iterator;
8376                self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
8377                self
8378            }
8379
8380            /// Sets the value of [incremental_post_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_post_operations].
8381            ///
8382            /// # Example
8383            /// ```ignore,no_run
8384            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8385            /// let x = IncrementalTableConfig::new().set_incremental_post_operations(["a", "b", "c"]);
8386            /// ```
8387            pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
8388            where
8389                T: std::iter::IntoIterator<Item = V>,
8390                V: std::convert::Into<std::string::String>,
8391            {
8392                use std::iter::Iterator;
8393                self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
8394                self
8395            }
8396        }
8397
8398        impl wkt::message::Message for IncrementalTableConfig {
8399            fn typename() -> &'static str {
8400                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
8401            }
8402        }
8403
8404        /// Indicates the type of this relation.
8405        ///
8406        /// # Working with unknown values
8407        ///
8408        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8409        /// additional enum variants at any time. Adding new variants is not considered
8410        /// a breaking change. Applications should write their code in anticipation of:
8411        ///
8412        /// - New values appearing in future releases of the client library, **and**
8413        /// - New values received dynamically, without application changes.
8414        ///
8415        /// Please consult the [Working with enums] section in the user guide for some
8416        /// guidelines.
8417        ///
8418        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8419        #[derive(Clone, Debug, PartialEq)]
8420        #[non_exhaustive]
8421        pub enum RelationType {
8422            /// Default value. This value is unused.
8423            Unspecified,
8424            /// The relation is a table.
8425            Table,
8426            /// The relation is a view.
8427            View,
8428            /// The relation is an incrementalized table.
8429            IncrementalTable,
8430            /// The relation is a materialized view.
8431            MaterializedView,
8432            /// If set, the enum was initialized with an unknown value.
8433            ///
8434            /// Applications can examine the value using [RelationType::value] or
8435            /// [RelationType::name].
8436            UnknownValue(relation_type::UnknownValue),
8437        }
8438
8439        #[doc(hidden)]
8440        pub mod relation_type {
8441            #[allow(unused_imports)]
8442            use super::*;
8443            #[derive(Clone, Debug, PartialEq)]
8444            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8445        }
8446
8447        impl RelationType {
8448            /// Gets the enum value.
8449            ///
8450            /// Returns `None` if the enum contains an unknown value deserialized from
8451            /// the string representation of enums.
8452            pub fn value(&self) -> std::option::Option<i32> {
8453                match self {
8454                    Self::Unspecified => std::option::Option::Some(0),
8455                    Self::Table => std::option::Option::Some(1),
8456                    Self::View => std::option::Option::Some(2),
8457                    Self::IncrementalTable => std::option::Option::Some(3),
8458                    Self::MaterializedView => std::option::Option::Some(4),
8459                    Self::UnknownValue(u) => u.0.value(),
8460                }
8461            }
8462
8463            /// Gets the enum value as a string.
8464            ///
8465            /// Returns `None` if the enum contains an unknown value deserialized from
8466            /// the integer representation of enums.
8467            pub fn name(&self) -> std::option::Option<&str> {
8468                match self {
8469                    Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
8470                    Self::Table => std::option::Option::Some("TABLE"),
8471                    Self::View => std::option::Option::Some("VIEW"),
8472                    Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
8473                    Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
8474                    Self::UnknownValue(u) => u.0.name(),
8475                }
8476            }
8477        }
8478
8479        impl std::default::Default for RelationType {
8480            fn default() -> Self {
8481                use std::convert::From;
8482                Self::from(0)
8483            }
8484        }
8485
8486        impl std::fmt::Display for RelationType {
8487            fn fmt(
8488                &self,
8489                f: &mut std::fmt::Formatter<'_>,
8490            ) -> std::result::Result<(), std::fmt::Error> {
8491                wkt::internal::display_enum(f, self.name(), self.value())
8492            }
8493        }
8494
8495        impl std::convert::From<i32> for RelationType {
8496            fn from(value: i32) -> Self {
8497                match value {
8498                    0 => Self::Unspecified,
8499                    1 => Self::Table,
8500                    2 => Self::View,
8501                    3 => Self::IncrementalTable,
8502                    4 => Self::MaterializedView,
8503                    _ => Self::UnknownValue(relation_type::UnknownValue(
8504                        wkt::internal::UnknownEnumValue::Integer(value),
8505                    )),
8506                }
8507            }
8508        }
8509
8510        impl std::convert::From<&str> for RelationType {
8511            fn from(value: &str) -> Self {
8512                use std::string::ToString;
8513                match value {
8514                    "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
8515                    "TABLE" => Self::Table,
8516                    "VIEW" => Self::View,
8517                    "INCREMENTAL_TABLE" => Self::IncrementalTable,
8518                    "MATERIALIZED_VIEW" => Self::MaterializedView,
8519                    _ => Self::UnknownValue(relation_type::UnknownValue(
8520                        wkt::internal::UnknownEnumValue::String(value.to_string()),
8521                    )),
8522                }
8523            }
8524        }
8525
8526        impl serde::ser::Serialize for RelationType {
8527            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8528            where
8529                S: serde::Serializer,
8530            {
8531                match self {
8532                    Self::Unspecified => serializer.serialize_i32(0),
8533                    Self::Table => serializer.serialize_i32(1),
8534                    Self::View => serializer.serialize_i32(2),
8535                    Self::IncrementalTable => serializer.serialize_i32(3),
8536                    Self::MaterializedView => serializer.serialize_i32(4),
8537                    Self::UnknownValue(u) => u.0.serialize(serializer),
8538                }
8539            }
8540        }
8541
8542        impl<'de> serde::de::Deserialize<'de> for RelationType {
8543            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8544            where
8545                D: serde::Deserializer<'de>,
8546            {
8547                deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
8548                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
8549                ))
8550            }
8551        }
8552    }
8553
8554    /// Represents a list of arbitrary database operations.
8555    #[derive(Clone, Default, PartialEq)]
8556    #[non_exhaustive]
8557    pub struct Operations {
8558        /// A list of actions that this action depends on.
8559        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8560
8561        /// Whether this action is disabled (i.e. should not be run).
8562        pub disabled: bool,
8563
8564        /// Arbitrary, user-defined tags on this action.
8565        pub tags: std::vec::Vec<std::string::String>,
8566
8567        /// Descriptor for any output relation and its columns. Only set if
8568        /// `has_output` is true.
8569        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8570
8571        /// A list of arbitrary SQL statements that will be executed without
8572        /// alteration.
8573        pub queries: std::vec::Vec<std::string::String>,
8574
8575        /// Whether these operations produce an output relation.
8576        pub has_output: bool,
8577
8578        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8579    }
8580
8581    impl Operations {
8582        pub fn new() -> Self {
8583            std::default::Default::default()
8584        }
8585
8586        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Operations::dependency_targets].
8587        ///
8588        /// # Example
8589        /// ```ignore,no_run
8590        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8591        /// use google_cloud_dataform_v1::model::Target;
8592        /// let x = Operations::new()
8593        ///     .set_dependency_targets([
8594        ///         Target::default()/* use setters */,
8595        ///         Target::default()/* use (different) setters */,
8596        ///     ]);
8597        /// ```
8598        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8599        where
8600            T: std::iter::IntoIterator<Item = V>,
8601            V: std::convert::Into<crate::model::Target>,
8602        {
8603            use std::iter::Iterator;
8604            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8605            self
8606        }
8607
8608        /// Sets the value of [disabled][crate::model::compilation_result_action::Operations::disabled].
8609        ///
8610        /// # Example
8611        /// ```ignore,no_run
8612        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8613        /// let x = Operations::new().set_disabled(true);
8614        /// ```
8615        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8616            self.disabled = v.into();
8617            self
8618        }
8619
8620        /// Sets the value of [tags][crate::model::compilation_result_action::Operations::tags].
8621        ///
8622        /// # Example
8623        /// ```ignore,no_run
8624        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8625        /// let x = Operations::new().set_tags(["a", "b", "c"]);
8626        /// ```
8627        pub fn set_tags<T, V>(mut self, v: T) -> Self
8628        where
8629            T: std::iter::IntoIterator<Item = V>,
8630            V: std::convert::Into<std::string::String>,
8631        {
8632            use std::iter::Iterator;
8633            self.tags = v.into_iter().map(|i| i.into()).collect();
8634            self
8635        }
8636
8637        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
8638        ///
8639        /// # Example
8640        /// ```ignore,no_run
8641        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8642        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8643        /// let x = Operations::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8644        /// ```
8645        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8646        where
8647            T: std::convert::Into<crate::model::RelationDescriptor>,
8648        {
8649            self.relation_descriptor = std::option::Option::Some(v.into());
8650            self
8651        }
8652
8653        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
8654        ///
8655        /// # Example
8656        /// ```ignore,no_run
8657        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8658        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8659        /// let x = Operations::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8660        /// let x = Operations::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8661        /// ```
8662        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8663        where
8664            T: std::convert::Into<crate::model::RelationDescriptor>,
8665        {
8666            self.relation_descriptor = v.map(|x| x.into());
8667            self
8668        }
8669
8670        /// Sets the value of [queries][crate::model::compilation_result_action::Operations::queries].
8671        ///
8672        /// # Example
8673        /// ```ignore,no_run
8674        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8675        /// let x = Operations::new().set_queries(["a", "b", "c"]);
8676        /// ```
8677        pub fn set_queries<T, V>(mut self, v: T) -> Self
8678        where
8679            T: std::iter::IntoIterator<Item = V>,
8680            V: std::convert::Into<std::string::String>,
8681        {
8682            use std::iter::Iterator;
8683            self.queries = v.into_iter().map(|i| i.into()).collect();
8684            self
8685        }
8686
8687        /// Sets the value of [has_output][crate::model::compilation_result_action::Operations::has_output].
8688        ///
8689        /// # Example
8690        /// ```ignore,no_run
8691        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8692        /// let x = Operations::new().set_has_output(true);
8693        /// ```
8694        pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8695            self.has_output = v.into();
8696            self
8697        }
8698    }
8699
8700    impl wkt::message::Message for Operations {
8701        fn typename() -> &'static str {
8702            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
8703        }
8704    }
8705
8706    /// Represents an assertion upon a SQL query which is required return zero
8707    /// rows.
8708    #[derive(Clone, Default, PartialEq)]
8709    #[non_exhaustive]
8710    pub struct Assertion {
8711        /// A list of actions that this action depends on.
8712        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8713
8714        /// The parent action of this assertion. Only set if this assertion was
8715        /// automatically generated.
8716        pub parent_action: std::option::Option<crate::model::Target>,
8717
8718        /// Whether this action is disabled (i.e. should not be run).
8719        pub disabled: bool,
8720
8721        /// Arbitrary, user-defined tags on this action.
8722        pub tags: std::vec::Vec<std::string::String>,
8723
8724        /// The SELECT query which must return zero rows in order for this assertion
8725        /// to succeed.
8726        pub select_query: std::string::String,
8727
8728        /// Descriptor for the assertion's automatically-generated view and its
8729        /// columns.
8730        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8731
8732        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8733    }
8734
8735    impl Assertion {
8736        pub fn new() -> Self {
8737            std::default::Default::default()
8738        }
8739
8740        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Assertion::dependency_targets].
8741        ///
8742        /// # Example
8743        /// ```ignore,no_run
8744        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8745        /// use google_cloud_dataform_v1::model::Target;
8746        /// let x = Assertion::new()
8747        ///     .set_dependency_targets([
8748        ///         Target::default()/* use setters */,
8749        ///         Target::default()/* use (different) setters */,
8750        ///     ]);
8751        /// ```
8752        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8753        where
8754            T: std::iter::IntoIterator<Item = V>,
8755            V: std::convert::Into<crate::model::Target>,
8756        {
8757            use std::iter::Iterator;
8758            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8759            self
8760        }
8761
8762        /// Sets the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
8763        ///
8764        /// # Example
8765        /// ```ignore,no_run
8766        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8767        /// use google_cloud_dataform_v1::model::Target;
8768        /// let x = Assertion::new().set_parent_action(Target::default()/* use setters */);
8769        /// ```
8770        pub fn set_parent_action<T>(mut self, v: T) -> Self
8771        where
8772            T: std::convert::Into<crate::model::Target>,
8773        {
8774            self.parent_action = std::option::Option::Some(v.into());
8775            self
8776        }
8777
8778        /// Sets or clears the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
8779        ///
8780        /// # Example
8781        /// ```ignore,no_run
8782        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8783        /// use google_cloud_dataform_v1::model::Target;
8784        /// let x = Assertion::new().set_or_clear_parent_action(Some(Target::default()/* use setters */));
8785        /// let x = Assertion::new().set_or_clear_parent_action(None::<Target>);
8786        /// ```
8787        pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
8788        where
8789            T: std::convert::Into<crate::model::Target>,
8790        {
8791            self.parent_action = v.map(|x| x.into());
8792            self
8793        }
8794
8795        /// Sets the value of [disabled][crate::model::compilation_result_action::Assertion::disabled].
8796        ///
8797        /// # Example
8798        /// ```ignore,no_run
8799        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8800        /// let x = Assertion::new().set_disabled(true);
8801        /// ```
8802        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8803            self.disabled = v.into();
8804            self
8805        }
8806
8807        /// Sets the value of [tags][crate::model::compilation_result_action::Assertion::tags].
8808        ///
8809        /// # Example
8810        /// ```ignore,no_run
8811        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8812        /// let x = Assertion::new().set_tags(["a", "b", "c"]);
8813        /// ```
8814        pub fn set_tags<T, V>(mut self, v: T) -> Self
8815        where
8816            T: std::iter::IntoIterator<Item = V>,
8817            V: std::convert::Into<std::string::String>,
8818        {
8819            use std::iter::Iterator;
8820            self.tags = v.into_iter().map(|i| i.into()).collect();
8821            self
8822        }
8823
8824        /// Sets the value of [select_query][crate::model::compilation_result_action::Assertion::select_query].
8825        ///
8826        /// # Example
8827        /// ```ignore,no_run
8828        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8829        /// let x = Assertion::new().set_select_query("example");
8830        /// ```
8831        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
8832            mut self,
8833            v: T,
8834        ) -> Self {
8835            self.select_query = v.into();
8836            self
8837        }
8838
8839        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
8840        ///
8841        /// # Example
8842        /// ```ignore,no_run
8843        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8844        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8845        /// let x = Assertion::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8846        /// ```
8847        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8848        where
8849            T: std::convert::Into<crate::model::RelationDescriptor>,
8850        {
8851            self.relation_descriptor = std::option::Option::Some(v.into());
8852            self
8853        }
8854
8855        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
8856        ///
8857        /// # Example
8858        /// ```ignore,no_run
8859        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8860        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8861        /// let x = Assertion::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8862        /// let x = Assertion::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8863        /// ```
8864        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8865        where
8866            T: std::convert::Into<crate::model::RelationDescriptor>,
8867        {
8868            self.relation_descriptor = v.map(|x| x.into());
8869            self
8870        }
8871    }
8872
8873    impl wkt::message::Message for Assertion {
8874        fn typename() -> &'static str {
8875            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
8876        }
8877    }
8878
8879    /// Represents a relation which is not managed by Dataform but which may be
8880    /// referenced by Dataform actions.
8881    #[derive(Clone, Default, PartialEq)]
8882    #[non_exhaustive]
8883    pub struct Declaration {
8884        /// Descriptor for the relation and its columns. Used as documentation only,
8885        /// i.e. values here will result in no changes to the relation's metadata.
8886        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8887
8888        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8889    }
8890
8891    impl Declaration {
8892        pub fn new() -> Self {
8893            std::default::Default::default()
8894        }
8895
8896        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
8897        ///
8898        /// # Example
8899        /// ```ignore,no_run
8900        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
8901        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8902        /// let x = Declaration::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8903        /// ```
8904        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8905        where
8906            T: std::convert::Into<crate::model::RelationDescriptor>,
8907        {
8908            self.relation_descriptor = std::option::Option::Some(v.into());
8909            self
8910        }
8911
8912        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
8913        ///
8914        /// # Example
8915        /// ```ignore,no_run
8916        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
8917        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8918        /// let x = Declaration::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8919        /// let x = Declaration::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8920        /// ```
8921        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8922        where
8923            T: std::convert::Into<crate::model::RelationDescriptor>,
8924        {
8925            self.relation_descriptor = v.map(|x| x.into());
8926            self
8927        }
8928    }
8929
8930    impl wkt::message::Message for Declaration {
8931        fn typename() -> &'static str {
8932            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
8933        }
8934    }
8935
8936    /// Represents a notebook.
8937    #[derive(Clone, Default, PartialEq)]
8938    #[non_exhaustive]
8939    pub struct Notebook {
8940        /// A list of actions that this action depends on.
8941        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8942
8943        /// Whether this action is disabled (i.e. should not be run).
8944        pub disabled: bool,
8945
8946        /// The contents of the notebook.
8947        pub contents: std::string::String,
8948
8949        /// Arbitrary, user-defined tags on this action.
8950        pub tags: std::vec::Vec<std::string::String>,
8951
8952        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8953    }
8954
8955    impl Notebook {
8956        pub fn new() -> Self {
8957            std::default::Default::default()
8958        }
8959
8960        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Notebook::dependency_targets].
8961        ///
8962        /// # Example
8963        /// ```ignore,no_run
8964        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8965        /// use google_cloud_dataform_v1::model::Target;
8966        /// let x = Notebook::new()
8967        ///     .set_dependency_targets([
8968        ///         Target::default()/* use setters */,
8969        ///         Target::default()/* use (different) setters */,
8970        ///     ]);
8971        /// ```
8972        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8973        where
8974            T: std::iter::IntoIterator<Item = V>,
8975            V: std::convert::Into<crate::model::Target>,
8976        {
8977            use std::iter::Iterator;
8978            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8979            self
8980        }
8981
8982        /// Sets the value of [disabled][crate::model::compilation_result_action::Notebook::disabled].
8983        ///
8984        /// # Example
8985        /// ```ignore,no_run
8986        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8987        /// let x = Notebook::new().set_disabled(true);
8988        /// ```
8989        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8990            self.disabled = v.into();
8991            self
8992        }
8993
8994        /// Sets the value of [contents][crate::model::compilation_result_action::Notebook::contents].
8995        ///
8996        /// # Example
8997        /// ```ignore,no_run
8998        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8999        /// let x = Notebook::new().set_contents("example");
9000        /// ```
9001        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9002            self.contents = v.into();
9003            self
9004        }
9005
9006        /// Sets the value of [tags][crate::model::compilation_result_action::Notebook::tags].
9007        ///
9008        /// # Example
9009        /// ```ignore,no_run
9010        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
9011        /// let x = Notebook::new().set_tags(["a", "b", "c"]);
9012        /// ```
9013        pub fn set_tags<T, V>(mut self, v: T) -> Self
9014        where
9015            T: std::iter::IntoIterator<Item = V>,
9016            V: std::convert::Into<std::string::String>,
9017        {
9018            use std::iter::Iterator;
9019            self.tags = v.into_iter().map(|i| i.into()).collect();
9020            self
9021        }
9022    }
9023
9024    impl wkt::message::Message for Notebook {
9025        fn typename() -> &'static str {
9026            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
9027        }
9028    }
9029
9030    /// Defines a compiled Data Preparation entity
9031    #[derive(Clone, Default, PartialEq)]
9032    #[non_exhaustive]
9033    pub struct DataPreparation {
9034        /// A list of actions that this action depends on.
9035        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9036
9037        /// Whether this action is disabled (i.e. should not be run).
9038        pub disabled: bool,
9039
9040        /// Arbitrary, user-defined tags on this action.
9041        pub tags: std::vec::Vec<std::string::String>,
9042
9043        /// The definition for the data preparation.
9044        pub definition: std::option::Option<
9045            crate::model::compilation_result_action::data_preparation::Definition,
9046        >,
9047
9048        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9049    }
9050
9051    impl DataPreparation {
9052        pub fn new() -> Self {
9053            std::default::Default::default()
9054        }
9055
9056        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::DataPreparation::dependency_targets].
9057        ///
9058        /// # Example
9059        /// ```ignore,no_run
9060        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9061        /// use google_cloud_dataform_v1::model::Target;
9062        /// let x = DataPreparation::new()
9063        ///     .set_dependency_targets([
9064        ///         Target::default()/* use setters */,
9065        ///         Target::default()/* use (different) setters */,
9066        ///     ]);
9067        /// ```
9068        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9069        where
9070            T: std::iter::IntoIterator<Item = V>,
9071            V: std::convert::Into<crate::model::Target>,
9072        {
9073            use std::iter::Iterator;
9074            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9075            self
9076        }
9077
9078        /// Sets the value of [disabled][crate::model::compilation_result_action::DataPreparation::disabled].
9079        ///
9080        /// # Example
9081        /// ```ignore,no_run
9082        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9083        /// let x = DataPreparation::new().set_disabled(true);
9084        /// ```
9085        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9086            self.disabled = v.into();
9087            self
9088        }
9089
9090        /// Sets the value of [tags][crate::model::compilation_result_action::DataPreparation::tags].
9091        ///
9092        /// # Example
9093        /// ```ignore,no_run
9094        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9095        /// let x = DataPreparation::new().set_tags(["a", "b", "c"]);
9096        /// ```
9097        pub fn set_tags<T, V>(mut self, v: T) -> Self
9098        where
9099            T: std::iter::IntoIterator<Item = V>,
9100            V: std::convert::Into<std::string::String>,
9101        {
9102            use std::iter::Iterator;
9103            self.tags = v.into_iter().map(|i| i.into()).collect();
9104            self
9105        }
9106
9107        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition].
9108        ///
9109        /// Note that all the setters affecting `definition` are mutually
9110        /// exclusive.
9111        ///
9112        /// # Example
9113        /// ```ignore,no_run
9114        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9115        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::Definition;
9116        /// let x = DataPreparation::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
9117        /// ```
9118        pub fn set_definition<
9119            T: std::convert::Into<
9120                    std::option::Option<
9121                        crate::model::compilation_result_action::data_preparation::Definition,
9122                    >,
9123                >,
9124        >(
9125            mut self,
9126            v: T,
9127        ) -> Self {
9128            self.definition = v.into();
9129            self
9130        }
9131
9132        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9133        /// if it holds a `ContentsYaml`, `None` if the field is not set or
9134        /// holds a different branch.
9135        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
9136            #[allow(unreachable_patterns)]
9137            self.definition.as_ref().and_then(|v| match v {
9138                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
9139                _ => std::option::Option::None,
9140            })
9141        }
9142
9143        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9144        /// to hold a `ContentsYaml`.
9145        ///
9146        /// Note that all the setters affecting `definition` are
9147        /// mutually exclusive.
9148        ///
9149        /// # Example
9150        /// ```ignore,no_run
9151        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9152        /// let x = DataPreparation::new().set_contents_yaml("example");
9153        /// assert!(x.contents_yaml().is_some());
9154        /// assert!(x.contents_sql().is_none());
9155        /// ```
9156        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
9157            mut self,
9158            v: T,
9159        ) -> Self {
9160            self.definition = std::option::Option::Some(
9161                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
9162                    v.into(),
9163                ),
9164            );
9165            self
9166        }
9167
9168        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9169        /// if it holds a `ContentsSql`, `None` if the field is not set or
9170        /// holds a different branch.
9171        pub fn contents_sql(
9172            &self,
9173        ) -> std::option::Option<
9174            &std::boxed::Box<
9175                crate::model::compilation_result_action::data_preparation::SqlDefinition,
9176            >,
9177        > {
9178            #[allow(unreachable_patterns)]
9179            self.definition.as_ref().and_then(|v| match v {
9180                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
9181                _ => std::option::Option::None,
9182            })
9183        }
9184
9185        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
9186        /// to hold a `ContentsSql`.
9187        ///
9188        /// Note that all the setters affecting `definition` are
9189        /// mutually exclusive.
9190        ///
9191        /// # Example
9192        /// ```ignore,no_run
9193        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9194        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9195        /// let x = DataPreparation::new().set_contents_sql(SqlDefinition::default()/* use setters */);
9196        /// assert!(x.contents_sql().is_some());
9197        /// assert!(x.contents_yaml().is_none());
9198        /// ```
9199        pub fn set_contents_sql<
9200            T: std::convert::Into<
9201                    std::boxed::Box<
9202                        crate::model::compilation_result_action::data_preparation::SqlDefinition,
9203                    >,
9204                >,
9205        >(
9206            mut self,
9207            v: T,
9208        ) -> Self {
9209            self.definition = std::option::Option::Some(
9210                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
9211                    v.into(),
9212                ),
9213            );
9214            self
9215        }
9216    }
9217
9218    impl wkt::message::Message for DataPreparation {
9219        fn typename() -> &'static str {
9220            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
9221        }
9222    }
9223
9224    /// Defines additional types related to [DataPreparation].
9225    pub mod data_preparation {
9226        #[allow(unused_imports)]
9227        use super::*;
9228
9229        /// Definition of a SQL Data Preparation
9230        #[derive(Clone, Default, PartialEq)]
9231        #[non_exhaustive]
9232        pub struct SqlDefinition {
9233            /// The SQL query representing the data preparation steps. Formatted as a
9234            /// Pipe SQL query statement.
9235            pub query: std::string::String,
9236
9237            /// Error table configuration,
9238            pub error_table: std::option::Option<
9239                crate::model::compilation_result_action::data_preparation::ErrorTable,
9240            >,
9241
9242            /// Load configuration.
9243            pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
9244
9245            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9246        }
9247
9248        impl SqlDefinition {
9249            pub fn new() -> Self {
9250                std::default::Default::default()
9251            }
9252
9253            /// Sets the value of [query][crate::model::compilation_result_action::data_preparation::SqlDefinition::query].
9254            ///
9255            /// # Example
9256            /// ```ignore,no_run
9257            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9258            /// let x = SqlDefinition::new().set_query("example");
9259            /// ```
9260            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9261                self.query = v.into();
9262                self
9263            }
9264
9265            /// Sets the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
9266            ///
9267            /// # Example
9268            /// ```ignore,no_run
9269            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9270            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9271            /// let x = SqlDefinition::new().set_error_table(ErrorTable::default()/* use setters */);
9272            /// ```
9273            pub fn set_error_table<T>(mut self, v: T) -> Self
9274            where
9275                T: std::convert::Into<
9276                        crate::model::compilation_result_action::data_preparation::ErrorTable,
9277                    >,
9278            {
9279                self.error_table = std::option::Option::Some(v.into());
9280                self
9281            }
9282
9283            /// Sets or clears the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
9284            ///
9285            /// # Example
9286            /// ```ignore,no_run
9287            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9288            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9289            /// let x = SqlDefinition::new().set_or_clear_error_table(Some(ErrorTable::default()/* use setters */));
9290            /// let x = SqlDefinition::new().set_or_clear_error_table(None::<ErrorTable>);
9291            /// ```
9292            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
9293            where
9294                T: std::convert::Into<
9295                        crate::model::compilation_result_action::data_preparation::ErrorTable,
9296                    >,
9297            {
9298                self.error_table = v.map(|x| x.into());
9299                self
9300            }
9301
9302            /// Sets the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
9303            ///
9304            /// # Example
9305            /// ```ignore,no_run
9306            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9307            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9308            /// let x = SqlDefinition::new().set_load(LoadConfig::default()/* use setters */);
9309            /// ```
9310            pub fn set_load<T>(mut self, v: T) -> Self
9311            where
9312                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
9313            {
9314                self.load = std::option::Option::Some(v.into());
9315                self
9316            }
9317
9318            /// Sets or clears the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
9319            ///
9320            /// # Example
9321            /// ```ignore,no_run
9322            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
9323            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9324            /// let x = SqlDefinition::new().set_or_clear_load(Some(LoadConfig::default()/* use setters */));
9325            /// let x = SqlDefinition::new().set_or_clear_load(None::<LoadConfig>);
9326            /// ```
9327            pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
9328            where
9329                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
9330            {
9331                self.load = v.map(|x| x.into());
9332                self
9333            }
9334        }
9335
9336        impl wkt::message::Message for SqlDefinition {
9337            fn typename() -> &'static str {
9338                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
9339            }
9340        }
9341
9342        /// Error table information, used to write error data into a BigQuery
9343        /// table.
9344        #[derive(Clone, Default, PartialEq)]
9345        #[non_exhaustive]
9346        pub struct ErrorTable {
9347            /// Error Table target.
9348            pub target: std::option::Option<crate::model::Target>,
9349
9350            /// Error table partition expiration in days. Only positive values are
9351            /// allowed.
9352            pub retention_days: i32,
9353
9354            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9355        }
9356
9357        impl ErrorTable {
9358            pub fn new() -> Self {
9359                std::default::Default::default()
9360            }
9361
9362            /// Sets the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
9363            ///
9364            /// # Example
9365            /// ```ignore,no_run
9366            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9367            /// use google_cloud_dataform_v1::model::Target;
9368            /// let x = ErrorTable::new().set_target(Target::default()/* use setters */);
9369            /// ```
9370            pub fn set_target<T>(mut self, v: T) -> Self
9371            where
9372                T: std::convert::Into<crate::model::Target>,
9373            {
9374                self.target = std::option::Option::Some(v.into());
9375                self
9376            }
9377
9378            /// Sets or clears the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
9379            ///
9380            /// # Example
9381            /// ```ignore,no_run
9382            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9383            /// use google_cloud_dataform_v1::model::Target;
9384            /// let x = ErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
9385            /// let x = ErrorTable::new().set_or_clear_target(None::<Target>);
9386            /// ```
9387            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
9388            where
9389                T: std::convert::Into<crate::model::Target>,
9390            {
9391                self.target = v.map(|x| x.into());
9392                self
9393            }
9394
9395            /// Sets the value of [retention_days][crate::model::compilation_result_action::data_preparation::ErrorTable::retention_days].
9396            ///
9397            /// # Example
9398            /// ```ignore,no_run
9399            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
9400            /// let x = ErrorTable::new().set_retention_days(42);
9401            /// ```
9402            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9403                self.retention_days = v.into();
9404                self
9405            }
9406        }
9407
9408        impl wkt::message::Message for ErrorTable {
9409            fn typename() -> &'static str {
9410                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
9411            }
9412        }
9413
9414        /// The definition for the data preparation.
9415        #[derive(Clone, Debug, PartialEq)]
9416        #[non_exhaustive]
9417        pub enum Definition {
9418            /// The data preparation definition, stored as a YAML string.
9419            ContentsYaml(std::string::String),
9420            /// SQL definition for a Data Preparation. Contains a SQL query and
9421            /// additional context information.
9422            ContentsSql(
9423                std::boxed::Box<
9424                    crate::model::compilation_result_action::data_preparation::SqlDefinition,
9425                >,
9426            ),
9427        }
9428    }
9429
9430    /// Simplified load configuration for actions
9431    #[derive(Clone, Default, PartialEq)]
9432    #[non_exhaustive]
9433    pub struct LoadConfig {
9434        /// Load mode
9435        pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
9436
9437        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9438    }
9439
9440    impl LoadConfig {
9441        pub fn new() -> Self {
9442            std::default::Default::default()
9443        }
9444
9445        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode].
9446        ///
9447        /// Note that all the setters affecting `mode` are mutually
9448        /// exclusive.
9449        ///
9450        /// # Example
9451        /// ```ignore,no_run
9452        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9453        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
9454        /// let x = LoadConfig::new().set_mode(Some(
9455        ///     google_cloud_dataform_v1::model::compilation_result_action::load_config::Mode::Replace(SimpleLoadMode::default().into())));
9456        /// ```
9457        pub fn set_mode<
9458            T: std::convert::Into<
9459                    std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
9460                >,
9461        >(
9462            mut self,
9463            v: T,
9464        ) -> Self {
9465            self.mode = v.into();
9466            self
9467        }
9468
9469        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9470        /// if it holds a `Replace`, `None` if the field is not set or
9471        /// holds a different branch.
9472        pub fn replace(
9473            &self,
9474        ) -> std::option::Option<
9475            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9476        > {
9477            #[allow(unreachable_patterns)]
9478            self.mode.as_ref().and_then(|v| match v {
9479                crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
9480                    std::option::Option::Some(v)
9481                }
9482                _ => std::option::Option::None,
9483            })
9484        }
9485
9486        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9487        /// to hold a `Replace`.
9488        ///
9489        /// Note that all the setters affecting `mode` are
9490        /// mutually exclusive.
9491        ///
9492        /// # Example
9493        /// ```ignore,no_run
9494        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9495        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
9496        /// let x = LoadConfig::new().set_replace(SimpleLoadMode::default()/* use setters */);
9497        /// assert!(x.replace().is_some());
9498        /// assert!(x.append().is_none());
9499        /// assert!(x.maximum().is_none());
9500        /// assert!(x.unique().is_none());
9501        /// ```
9502        pub fn set_replace<
9503            T: std::convert::Into<
9504                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9505                >,
9506        >(
9507            mut self,
9508            v: T,
9509        ) -> Self {
9510            self.mode = std::option::Option::Some(
9511                crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
9512            );
9513            self
9514        }
9515
9516        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9517        /// if it holds a `Append`, `None` if the field is not set or
9518        /// holds a different branch.
9519        pub fn append(
9520            &self,
9521        ) -> std::option::Option<
9522            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9523        > {
9524            #[allow(unreachable_patterns)]
9525            self.mode.as_ref().and_then(|v| match v {
9526                crate::model::compilation_result_action::load_config::Mode::Append(v) => {
9527                    std::option::Option::Some(v)
9528                }
9529                _ => std::option::Option::None,
9530            })
9531        }
9532
9533        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9534        /// to hold a `Append`.
9535        ///
9536        /// Note that all the setters affecting `mode` are
9537        /// mutually exclusive.
9538        ///
9539        /// # Example
9540        /// ```ignore,no_run
9541        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9542        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
9543        /// let x = LoadConfig::new().set_append(SimpleLoadMode::default()/* use setters */);
9544        /// assert!(x.append().is_some());
9545        /// assert!(x.replace().is_none());
9546        /// assert!(x.maximum().is_none());
9547        /// assert!(x.unique().is_none());
9548        /// ```
9549        pub fn set_append<
9550            T: std::convert::Into<
9551                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
9552                >,
9553        >(
9554            mut self,
9555            v: T,
9556        ) -> Self {
9557            self.mode = std::option::Option::Some(
9558                crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
9559            );
9560            self
9561        }
9562
9563        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9564        /// if it holds a `Maximum`, `None` if the field is not set or
9565        /// holds a different branch.
9566        pub fn maximum(
9567            &self,
9568        ) -> std::option::Option<
9569            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9570        > {
9571            #[allow(unreachable_patterns)]
9572            self.mode.as_ref().and_then(|v| match v {
9573                crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
9574                    std::option::Option::Some(v)
9575                }
9576                _ => std::option::Option::None,
9577            })
9578        }
9579
9580        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9581        /// to hold a `Maximum`.
9582        ///
9583        /// Note that all the setters affecting `mode` are
9584        /// mutually exclusive.
9585        ///
9586        /// # Example
9587        /// ```ignore,no_run
9588        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9589        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
9590        /// let x = LoadConfig::new().set_maximum(IncrementalLoadMode::default()/* use setters */);
9591        /// assert!(x.maximum().is_some());
9592        /// assert!(x.replace().is_none());
9593        /// assert!(x.append().is_none());
9594        /// assert!(x.unique().is_none());
9595        /// ```
9596        pub fn set_maximum<
9597            T: std::convert::Into<
9598                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9599                >,
9600        >(
9601            mut self,
9602            v: T,
9603        ) -> Self {
9604            self.mode = std::option::Option::Some(
9605                crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
9606            );
9607            self
9608        }
9609
9610        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9611        /// if it holds a `Unique`, `None` if the field is not set or
9612        /// holds a different branch.
9613        pub fn unique(
9614            &self,
9615        ) -> std::option::Option<
9616            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9617        > {
9618            #[allow(unreachable_patterns)]
9619            self.mode.as_ref().and_then(|v| match v {
9620                crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
9621                    std::option::Option::Some(v)
9622                }
9623                _ => std::option::Option::None,
9624            })
9625        }
9626
9627        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
9628        /// to hold a `Unique`.
9629        ///
9630        /// Note that all the setters affecting `mode` are
9631        /// mutually exclusive.
9632        ///
9633        /// # Example
9634        /// ```ignore,no_run
9635        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
9636        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
9637        /// let x = LoadConfig::new().set_unique(IncrementalLoadMode::default()/* use setters */);
9638        /// assert!(x.unique().is_some());
9639        /// assert!(x.replace().is_none());
9640        /// assert!(x.append().is_none());
9641        /// assert!(x.maximum().is_none());
9642        /// ```
9643        pub fn set_unique<
9644            T: std::convert::Into<
9645                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
9646                >,
9647        >(
9648            mut self,
9649            v: T,
9650        ) -> Self {
9651            self.mode = std::option::Option::Some(
9652                crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
9653            );
9654            self
9655        }
9656    }
9657
9658    impl wkt::message::Message for LoadConfig {
9659        fn typename() -> &'static str {
9660            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
9661        }
9662    }
9663
9664    /// Defines additional types related to [LoadConfig].
9665    pub mod load_config {
9666        #[allow(unused_imports)]
9667        use super::*;
9668
9669        /// Load mode
9670        #[derive(Clone, Debug, PartialEq)]
9671        #[non_exhaustive]
9672        pub enum Mode {
9673            /// Replace destination table
9674            Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
9675            /// Append into destination table
9676            Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
9677            /// Insert records where the value exceeds the previous maximum value for a
9678            /// column in the destination table
9679            Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
9680            /// Insert records where the value of a column is not already present in
9681            /// the destination table
9682            Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
9683        }
9684    }
9685
9686    /// Simple load definition
9687    #[derive(Clone, Default, PartialEq)]
9688    #[non_exhaustive]
9689    pub struct SimpleLoadMode {
9690        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9691    }
9692
9693    impl SimpleLoadMode {
9694        pub fn new() -> Self {
9695            std::default::Default::default()
9696        }
9697    }
9698
9699    impl wkt::message::Message for SimpleLoadMode {
9700        fn typename() -> &'static str {
9701            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
9702        }
9703    }
9704
9705    /// Load definition for incremental load modes
9706    #[derive(Clone, Default, PartialEq)]
9707    #[non_exhaustive]
9708    pub struct IncrementalLoadMode {
9709        /// Column name for incremental load modes
9710        pub column: std::string::String,
9711
9712        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9713    }
9714
9715    impl IncrementalLoadMode {
9716        pub fn new() -> Self {
9717            std::default::Default::default()
9718        }
9719
9720        /// Sets the value of [column][crate::model::compilation_result_action::IncrementalLoadMode::column].
9721        ///
9722        /// # Example
9723        /// ```ignore,no_run
9724        /// # use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
9725        /// let x = IncrementalLoadMode::new().set_column("example");
9726        /// ```
9727        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9728            self.column = v.into();
9729            self
9730        }
9731    }
9732
9733    impl wkt::message::Message for IncrementalLoadMode {
9734        fn typename() -> &'static str {
9735            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
9736        }
9737    }
9738
9739    /// The compiled object.
9740    #[derive(Clone, Debug, PartialEq)]
9741    #[non_exhaustive]
9742    pub enum CompiledObject {
9743        /// The database relation created/updated by this action.
9744        Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
9745        /// The database operations executed by this action.
9746        Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
9747        /// The assertion executed by this action.
9748        Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
9749        /// The declaration declared by this action.
9750        Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
9751        /// The notebook executed by this action.
9752        Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
9753        /// The data preparation executed by this action.
9754        DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
9755    }
9756}
9757
9758/// `QueryCompilationResultActions` request message.
9759#[derive(Clone, Default, PartialEq)]
9760#[non_exhaustive]
9761pub struct QueryCompilationResultActionsRequest {
9762    /// Required. The compilation result's name.
9763    pub name: std::string::String,
9764
9765    /// Optional. Maximum number of compilation results to return. The server may
9766    /// return fewer items than requested. If unspecified, the server will pick an
9767    /// appropriate default.
9768    pub page_size: i32,
9769
9770    /// Optional. Page token received from a previous
9771    /// `QueryCompilationResultActions` call. Provide this to retrieve the
9772    /// subsequent page.
9773    ///
9774    /// When paginating, all other parameters provided to
9775    /// `QueryCompilationResultActions`, with the exception of `page_size`, must
9776    /// match the call that provided the page token.
9777    pub page_token: std::string::String,
9778
9779    /// Optional. Optional filter for the returned list. Filtering is only
9780    /// currently supported on the `file_path` field.
9781    pub filter: std::string::String,
9782
9783    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9784}
9785
9786impl QueryCompilationResultActionsRequest {
9787    pub fn new() -> Self {
9788        std::default::Default::default()
9789    }
9790
9791    /// Sets the value of [name][crate::model::QueryCompilationResultActionsRequest::name].
9792    ///
9793    /// # Example
9794    /// ```ignore,no_run
9795    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9796    /// let x = QueryCompilationResultActionsRequest::new().set_name("example");
9797    /// ```
9798    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9799        self.name = v.into();
9800        self
9801    }
9802
9803    /// Sets the value of [page_size][crate::model::QueryCompilationResultActionsRequest::page_size].
9804    ///
9805    /// # Example
9806    /// ```ignore,no_run
9807    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9808    /// let x = QueryCompilationResultActionsRequest::new().set_page_size(42);
9809    /// ```
9810    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9811        self.page_size = v.into();
9812        self
9813    }
9814
9815    /// Sets the value of [page_token][crate::model::QueryCompilationResultActionsRequest::page_token].
9816    ///
9817    /// # Example
9818    /// ```ignore,no_run
9819    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9820    /// let x = QueryCompilationResultActionsRequest::new().set_page_token("example");
9821    /// ```
9822    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9823        self.page_token = v.into();
9824        self
9825    }
9826
9827    /// Sets the value of [filter][crate::model::QueryCompilationResultActionsRequest::filter].
9828    ///
9829    /// # Example
9830    /// ```ignore,no_run
9831    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
9832    /// let x = QueryCompilationResultActionsRequest::new().set_filter("example");
9833    /// ```
9834    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9835        self.filter = v.into();
9836        self
9837    }
9838}
9839
9840impl wkt::message::Message for QueryCompilationResultActionsRequest {
9841    fn typename() -> &'static str {
9842        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
9843    }
9844}
9845
9846/// `QueryCompilationResultActions` response message.
9847#[derive(Clone, Default, PartialEq)]
9848#[non_exhaustive]
9849pub struct QueryCompilationResultActionsResponse {
9850    /// List of compilation result actions.
9851    pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
9852
9853    /// A token, which can be sent as `page_token` to retrieve the next page.
9854    /// If this field is omitted, there are no subsequent pages.
9855    pub next_page_token: std::string::String,
9856
9857    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9858}
9859
9860impl QueryCompilationResultActionsResponse {
9861    pub fn new() -> Self {
9862        std::default::Default::default()
9863    }
9864
9865    /// Sets the value of [compilation_result_actions][crate::model::QueryCompilationResultActionsResponse::compilation_result_actions].
9866    ///
9867    /// # Example
9868    /// ```ignore,no_run
9869    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
9870    /// use google_cloud_dataform_v1::model::CompilationResultAction;
9871    /// let x = QueryCompilationResultActionsResponse::new()
9872    ///     .set_compilation_result_actions([
9873    ///         CompilationResultAction::default()/* use setters */,
9874    ///         CompilationResultAction::default()/* use (different) setters */,
9875    ///     ]);
9876    /// ```
9877    pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
9878    where
9879        T: std::iter::IntoIterator<Item = V>,
9880        V: std::convert::Into<crate::model::CompilationResultAction>,
9881    {
9882        use std::iter::Iterator;
9883        self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
9884        self
9885    }
9886
9887    /// Sets the value of [next_page_token][crate::model::QueryCompilationResultActionsResponse::next_page_token].
9888    ///
9889    /// # Example
9890    /// ```ignore,no_run
9891    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
9892    /// let x = QueryCompilationResultActionsResponse::new().set_next_page_token("example");
9893    /// ```
9894    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9895        self.next_page_token = v.into();
9896        self
9897    }
9898}
9899
9900impl wkt::message::Message for QueryCompilationResultActionsResponse {
9901    fn typename() -> &'static str {
9902        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
9903    }
9904}
9905
9906#[doc(hidden)]
9907impl google_cloud_gax::paginator::internal::PageableResponse
9908    for QueryCompilationResultActionsResponse
9909{
9910    type PageItem = crate::model::CompilationResultAction;
9911
9912    fn items(self) -> std::vec::Vec<Self::PageItem> {
9913        self.compilation_result_actions
9914    }
9915
9916    fn next_page_token(&self) -> std::string::String {
9917        use std::clone::Clone;
9918        self.next_page_token.clone()
9919    }
9920}
9921
9922/// Represents a Dataform workflow configuration.
9923#[derive(Clone, Default, PartialEq)]
9924#[non_exhaustive]
9925pub struct WorkflowConfig {
9926    /// Identifier. The workflow config's name.
9927    pub name: std::string::String,
9928
9929    /// Required. The name of the release config whose release_compilation_result
9930    /// should be executed. Must be in the format
9931    /// `projects/*/locations/*/repositories/*/releaseConfigs/*`.
9932    pub release_config: std::string::String,
9933
9934    /// Optional. If left unset, a default InvocationConfig will be used.
9935    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
9936
9937    /// Optional. Optional schedule (in cron format) for automatic execution of
9938    /// this workflow config.
9939    pub cron_schedule: std::string::String,
9940
9941    /// Optional. Specifies the time zone to be used when interpreting
9942    /// cron_schedule. Must be a time zone name from the time zone database
9943    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
9944    /// unspecified, the default is UTC.
9945    pub time_zone: std::string::String,
9946
9947    /// Output only. Records of the 10 most recent scheduled execution attempts,
9948    /// ordered in descending order of `execution_time`. Updated whenever automatic
9949    /// creation of a workflow invocation is triggered by cron_schedule.
9950    pub recent_scheduled_execution_records:
9951        std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
9952
9953    /// Optional. Disables automatic creation of workflow invocations.
9954    pub disabled: bool,
9955
9956    /// Output only. The timestamp of when the WorkflowConfig was created.
9957    pub create_time: std::option::Option<wkt::Timestamp>,
9958
9959    /// Output only. The timestamp of when the WorkflowConfig was last updated.
9960    pub update_time: std::option::Option<wkt::Timestamp>,
9961
9962    /// Output only. All the metadata information that is used internally to serve
9963    /// the resource. For example: timestamps, flags, status fields, etc. The
9964    /// format of this field is a JSON string.
9965    pub internal_metadata: std::option::Option<std::string::String>,
9966
9967    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9968}
9969
9970impl WorkflowConfig {
9971    pub fn new() -> Self {
9972        std::default::Default::default()
9973    }
9974
9975    /// Sets the value of [name][crate::model::WorkflowConfig::name].
9976    ///
9977    /// # Example
9978    /// ```ignore,no_run
9979    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
9980    /// let x = WorkflowConfig::new().set_name("example");
9981    /// ```
9982    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9983        self.name = v.into();
9984        self
9985    }
9986
9987    /// Sets the value of [release_config][crate::model::WorkflowConfig::release_config].
9988    ///
9989    /// # Example
9990    /// ```ignore,no_run
9991    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
9992    /// let x = WorkflowConfig::new().set_release_config("example");
9993    /// ```
9994    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9995        self.release_config = v.into();
9996        self
9997    }
9998
9999    /// Sets the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
10000    ///
10001    /// # Example
10002    /// ```ignore,no_run
10003    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10004    /// use google_cloud_dataform_v1::model::InvocationConfig;
10005    /// let x = WorkflowConfig::new().set_invocation_config(InvocationConfig::default()/* use setters */);
10006    /// ```
10007    pub fn set_invocation_config<T>(mut self, v: T) -> Self
10008    where
10009        T: std::convert::Into<crate::model::InvocationConfig>,
10010    {
10011        self.invocation_config = std::option::Option::Some(v.into());
10012        self
10013    }
10014
10015    /// Sets or clears the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
10016    ///
10017    /// # Example
10018    /// ```ignore,no_run
10019    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10020    /// use google_cloud_dataform_v1::model::InvocationConfig;
10021    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
10022    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(None::<InvocationConfig>);
10023    /// ```
10024    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
10025    where
10026        T: std::convert::Into<crate::model::InvocationConfig>,
10027    {
10028        self.invocation_config = v.map(|x| x.into());
10029        self
10030    }
10031
10032    /// Sets the value of [cron_schedule][crate::model::WorkflowConfig::cron_schedule].
10033    ///
10034    /// # Example
10035    /// ```ignore,no_run
10036    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10037    /// let x = WorkflowConfig::new().set_cron_schedule("example");
10038    /// ```
10039    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10040        self.cron_schedule = v.into();
10041        self
10042    }
10043
10044    /// Sets the value of [time_zone][crate::model::WorkflowConfig::time_zone].
10045    ///
10046    /// # Example
10047    /// ```ignore,no_run
10048    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10049    /// let x = WorkflowConfig::new().set_time_zone("example");
10050    /// ```
10051    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10052        self.time_zone = v.into();
10053        self
10054    }
10055
10056    /// Sets the value of [recent_scheduled_execution_records][crate::model::WorkflowConfig::recent_scheduled_execution_records].
10057    ///
10058    /// # Example
10059    /// ```ignore,no_run
10060    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10061    /// use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10062    /// let x = WorkflowConfig::new()
10063    ///     .set_recent_scheduled_execution_records([
10064    ///         ScheduledExecutionRecord::default()/* use setters */,
10065    ///         ScheduledExecutionRecord::default()/* use (different) setters */,
10066    ///     ]);
10067    /// ```
10068    pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
10069    where
10070        T: std::iter::IntoIterator<Item = V>,
10071        V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
10072    {
10073        use std::iter::Iterator;
10074        self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
10075        self
10076    }
10077
10078    /// Sets the value of [disabled][crate::model::WorkflowConfig::disabled].
10079    ///
10080    /// # Example
10081    /// ```ignore,no_run
10082    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10083    /// let x = WorkflowConfig::new().set_disabled(true);
10084    /// ```
10085    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10086        self.disabled = v.into();
10087        self
10088    }
10089
10090    /// Sets the value of [create_time][crate::model::WorkflowConfig::create_time].
10091    ///
10092    /// # Example
10093    /// ```ignore,no_run
10094    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10095    /// use wkt::Timestamp;
10096    /// let x = WorkflowConfig::new().set_create_time(Timestamp::default()/* use setters */);
10097    /// ```
10098    pub fn set_create_time<T>(mut self, v: T) -> Self
10099    where
10100        T: std::convert::Into<wkt::Timestamp>,
10101    {
10102        self.create_time = std::option::Option::Some(v.into());
10103        self
10104    }
10105
10106    /// Sets or clears the value of [create_time][crate::model::WorkflowConfig::create_time].
10107    ///
10108    /// # Example
10109    /// ```ignore,no_run
10110    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10111    /// use wkt::Timestamp;
10112    /// let x = WorkflowConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10113    /// let x = WorkflowConfig::new().set_or_clear_create_time(None::<Timestamp>);
10114    /// ```
10115    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10116    where
10117        T: std::convert::Into<wkt::Timestamp>,
10118    {
10119        self.create_time = v.map(|x| x.into());
10120        self
10121    }
10122
10123    /// Sets the value of [update_time][crate::model::WorkflowConfig::update_time].
10124    ///
10125    /// # Example
10126    /// ```ignore,no_run
10127    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10128    /// use wkt::Timestamp;
10129    /// let x = WorkflowConfig::new().set_update_time(Timestamp::default()/* use setters */);
10130    /// ```
10131    pub fn set_update_time<T>(mut self, v: T) -> Self
10132    where
10133        T: std::convert::Into<wkt::Timestamp>,
10134    {
10135        self.update_time = std::option::Option::Some(v.into());
10136        self
10137    }
10138
10139    /// Sets or clears the value of [update_time][crate::model::WorkflowConfig::update_time].
10140    ///
10141    /// # Example
10142    /// ```ignore,no_run
10143    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10144    /// use wkt::Timestamp;
10145    /// let x = WorkflowConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10146    /// let x = WorkflowConfig::new().set_or_clear_update_time(None::<Timestamp>);
10147    /// ```
10148    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10149    where
10150        T: std::convert::Into<wkt::Timestamp>,
10151    {
10152        self.update_time = v.map(|x| x.into());
10153        self
10154    }
10155
10156    /// Sets the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
10157    ///
10158    /// # Example
10159    /// ```ignore,no_run
10160    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10161    /// let x = WorkflowConfig::new().set_internal_metadata("example");
10162    /// ```
10163    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
10164    where
10165        T: std::convert::Into<std::string::String>,
10166    {
10167        self.internal_metadata = std::option::Option::Some(v.into());
10168        self
10169    }
10170
10171    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
10172    ///
10173    /// # Example
10174    /// ```ignore,no_run
10175    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10176    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(Some("example"));
10177    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(None::<String>);
10178    /// ```
10179    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
10180    where
10181        T: std::convert::Into<std::string::String>,
10182    {
10183        self.internal_metadata = v.map(|x| x.into());
10184        self
10185    }
10186}
10187
10188impl wkt::message::Message for WorkflowConfig {
10189    fn typename() -> &'static str {
10190        "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
10191    }
10192}
10193
10194/// Defines additional types related to [WorkflowConfig].
10195pub mod workflow_config {
10196    #[allow(unused_imports)]
10197    use super::*;
10198
10199    /// A record of an attempt to create a workflow invocation for this workflow
10200    /// config.
10201    #[derive(Clone, Default, PartialEq)]
10202    #[non_exhaustive]
10203    pub struct ScheduledExecutionRecord {
10204        /// Output only. The timestamp of this execution attempt.
10205        pub execution_time: std::option::Option<wkt::Timestamp>,
10206
10207        /// The result of this execution attempt.
10208        pub result:
10209            std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
10210
10211        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10212    }
10213
10214    impl ScheduledExecutionRecord {
10215        pub fn new() -> Self {
10216            std::default::Default::default()
10217        }
10218
10219        /// Sets the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
10220        ///
10221        /// # Example
10222        /// ```ignore,no_run
10223        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10224        /// use wkt::Timestamp;
10225        /// let x = ScheduledExecutionRecord::new().set_execution_time(Timestamp::default()/* use setters */);
10226        /// ```
10227        pub fn set_execution_time<T>(mut self, v: T) -> Self
10228        where
10229            T: std::convert::Into<wkt::Timestamp>,
10230        {
10231            self.execution_time = std::option::Option::Some(v.into());
10232            self
10233        }
10234
10235        /// Sets or clears the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
10236        ///
10237        /// # Example
10238        /// ```ignore,no_run
10239        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10240        /// use wkt::Timestamp;
10241        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(Some(Timestamp::default()/* use setters */));
10242        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(None::<Timestamp>);
10243        /// ```
10244        pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
10245        where
10246            T: std::convert::Into<wkt::Timestamp>,
10247        {
10248            self.execution_time = v.map(|x| x.into());
10249            self
10250        }
10251
10252        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result].
10253        ///
10254        /// Note that all the setters affecting `result` are mutually
10255        /// exclusive.
10256        ///
10257        /// # Example
10258        /// ```ignore,no_run
10259        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10260        /// use google_cloud_dataform_v1::model::workflow_config::scheduled_execution_record::Result;
10261        /// let x = ScheduledExecutionRecord::new().set_result(Some(Result::WorkflowInvocation("example".to_string())));
10262        /// ```
10263        pub fn set_result<
10264            T: std::convert::Into<
10265                    std::option::Option<
10266                        crate::model::workflow_config::scheduled_execution_record::Result,
10267                    >,
10268                >,
10269        >(
10270            mut self,
10271            v: T,
10272        ) -> Self {
10273            self.result = v.into();
10274            self
10275        }
10276
10277        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10278        /// if it holds a `WorkflowInvocation`, `None` if the field is not set or
10279        /// holds a different branch.
10280        pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
10281            #[allow(unreachable_patterns)]
10282            self.result.as_ref().and_then(|v| match v {
10283                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
10284                _ => std::option::Option::None,
10285            })
10286        }
10287
10288        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10289        /// to hold a `WorkflowInvocation`.
10290        ///
10291        /// Note that all the setters affecting `result` are
10292        /// mutually exclusive.
10293        ///
10294        /// # Example
10295        /// ```ignore,no_run
10296        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10297        /// let x = ScheduledExecutionRecord::new().set_workflow_invocation("example");
10298        /// assert!(x.workflow_invocation().is_some());
10299        /// assert!(x.error_status().is_none());
10300        /// ```
10301        pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
10302            mut self,
10303            v: T,
10304        ) -> Self {
10305            self.result = std::option::Option::Some(
10306                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
10307                    v.into()
10308                )
10309            );
10310            self
10311        }
10312
10313        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10314        /// if it holds a `ErrorStatus`, `None` if the field is not set or
10315        /// holds a different branch.
10316        pub fn error_status(
10317            &self,
10318        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
10319            #[allow(unreachable_patterns)]
10320            self.result.as_ref().and_then(|v| match v {
10321                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
10322                    v,
10323                ) => std::option::Option::Some(v),
10324                _ => std::option::Option::None,
10325            })
10326        }
10327
10328        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
10329        /// to hold a `ErrorStatus`.
10330        ///
10331        /// Note that all the setters affecting `result` are
10332        /// mutually exclusive.
10333        ///
10334        /// # Example
10335        /// ```ignore,no_run
10336        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10337        /// use google_cloud_rpc::model::Status;
10338        /// let x = ScheduledExecutionRecord::new().set_error_status(Status::default()/* use setters */);
10339        /// assert!(x.error_status().is_some());
10340        /// assert!(x.workflow_invocation().is_none());
10341        /// ```
10342        pub fn set_error_status<
10343            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
10344        >(
10345            mut self,
10346            v: T,
10347        ) -> Self {
10348            self.result = std::option::Option::Some(
10349                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
10350                    v.into(),
10351                ),
10352            );
10353            self
10354        }
10355    }
10356
10357    impl wkt::message::Message for ScheduledExecutionRecord {
10358        fn typename() -> &'static str {
10359            "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
10360        }
10361    }
10362
10363    /// Defines additional types related to [ScheduledExecutionRecord].
10364    pub mod scheduled_execution_record {
10365        #[allow(unused_imports)]
10366        use super::*;
10367
10368        /// The result of this execution attempt.
10369        #[derive(Clone, Debug, PartialEq)]
10370        #[non_exhaustive]
10371        pub enum Result {
10372            /// The name of the created workflow invocation, if one was successfully
10373            /// created. Must be in the format
10374            /// `projects/*/locations/*/repositories/*/workflowInvocations/*`.
10375            WorkflowInvocation(std::string::String),
10376            /// The error status encountered upon this attempt to create the
10377            /// workflow invocation, if the attempt was unsuccessful.
10378            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
10379        }
10380    }
10381}
10382
10383/// Includes various configuration options for a workflow invocation.
10384/// If both `included_targets` and `included_tags` are unset, all actions
10385/// will be included.
10386#[derive(Clone, Default, PartialEq)]
10387#[non_exhaustive]
10388pub struct InvocationConfig {
10389    /// Optional. The set of action identifiers to include.
10390    pub included_targets: std::vec::Vec<crate::model::Target>,
10391
10392    /// Optional. The set of tags to include.
10393    pub included_tags: std::vec::Vec<std::string::String>,
10394
10395    /// Optional. When set to true, transitive dependencies of included actions
10396    /// will be executed.
10397    pub transitive_dependencies_included: bool,
10398
10399    /// Optional. When set to true, transitive dependents of included actions will
10400    /// be executed.
10401    pub transitive_dependents_included: bool,
10402
10403    /// Optional. When set to true, any incremental tables will be fully refreshed.
10404    pub fully_refresh_incremental_tables_enabled: bool,
10405
10406    /// Optional. The service account to run workflow invocations under.
10407    pub service_account: std::string::String,
10408
10409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10410}
10411
10412impl InvocationConfig {
10413    pub fn new() -> Self {
10414        std::default::Default::default()
10415    }
10416
10417    /// Sets the value of [included_targets][crate::model::InvocationConfig::included_targets].
10418    ///
10419    /// # Example
10420    /// ```ignore,no_run
10421    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10422    /// use google_cloud_dataform_v1::model::Target;
10423    /// let x = InvocationConfig::new()
10424    ///     .set_included_targets([
10425    ///         Target::default()/* use setters */,
10426    ///         Target::default()/* use (different) setters */,
10427    ///     ]);
10428    /// ```
10429    pub fn set_included_targets<T, V>(mut self, v: T) -> Self
10430    where
10431        T: std::iter::IntoIterator<Item = V>,
10432        V: std::convert::Into<crate::model::Target>,
10433    {
10434        use std::iter::Iterator;
10435        self.included_targets = v.into_iter().map(|i| i.into()).collect();
10436        self
10437    }
10438
10439    /// Sets the value of [included_tags][crate::model::InvocationConfig::included_tags].
10440    ///
10441    /// # Example
10442    /// ```ignore,no_run
10443    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10444    /// let x = InvocationConfig::new().set_included_tags(["a", "b", "c"]);
10445    /// ```
10446    pub fn set_included_tags<T, V>(mut self, v: T) -> Self
10447    where
10448        T: std::iter::IntoIterator<Item = V>,
10449        V: std::convert::Into<std::string::String>,
10450    {
10451        use std::iter::Iterator;
10452        self.included_tags = v.into_iter().map(|i| i.into()).collect();
10453        self
10454    }
10455
10456    /// Sets the value of [transitive_dependencies_included][crate::model::InvocationConfig::transitive_dependencies_included].
10457    ///
10458    /// # Example
10459    /// ```ignore,no_run
10460    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10461    /// let x = InvocationConfig::new().set_transitive_dependencies_included(true);
10462    /// ```
10463    pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
10464        mut self,
10465        v: T,
10466    ) -> Self {
10467        self.transitive_dependencies_included = v.into();
10468        self
10469    }
10470
10471    /// Sets the value of [transitive_dependents_included][crate::model::InvocationConfig::transitive_dependents_included].
10472    ///
10473    /// # Example
10474    /// ```ignore,no_run
10475    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10476    /// let x = InvocationConfig::new().set_transitive_dependents_included(true);
10477    /// ```
10478    pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10479        self.transitive_dependents_included = v.into();
10480        self
10481    }
10482
10483    /// Sets the value of [fully_refresh_incremental_tables_enabled][crate::model::InvocationConfig::fully_refresh_incremental_tables_enabled].
10484    ///
10485    /// # Example
10486    /// ```ignore,no_run
10487    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10488    /// let x = InvocationConfig::new().set_fully_refresh_incremental_tables_enabled(true);
10489    /// ```
10490    pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
10491        mut self,
10492        v: T,
10493    ) -> Self {
10494        self.fully_refresh_incremental_tables_enabled = v.into();
10495        self
10496    }
10497
10498    /// Sets the value of [service_account][crate::model::InvocationConfig::service_account].
10499    ///
10500    /// # Example
10501    /// ```ignore,no_run
10502    /// # use google_cloud_dataform_v1::model::InvocationConfig;
10503    /// let x = InvocationConfig::new().set_service_account("example");
10504    /// ```
10505    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10506        self.service_account = v.into();
10507        self
10508    }
10509}
10510
10511impl wkt::message::Message for InvocationConfig {
10512    fn typename() -> &'static str {
10513        "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
10514    }
10515}
10516
10517/// `ListWorkflowConfigs` request message.
10518#[derive(Clone, Default, PartialEq)]
10519#[non_exhaustive]
10520pub struct ListWorkflowConfigsRequest {
10521    /// Required. The repository in which to list workflow configs. Must be in the
10522    /// format `projects/*/locations/*/repositories/*`.
10523    pub parent: std::string::String,
10524
10525    /// Optional. Maximum number of workflow configs to return. The server may
10526    /// return fewer items than requested. If unspecified, the server will pick an
10527    /// appropriate default.
10528    pub page_size: i32,
10529
10530    /// Optional. Page token received from a previous `ListWorkflowConfigs` call.
10531    /// Provide this to retrieve the subsequent page.
10532    ///
10533    /// When paginating, all other parameters provided to `ListWorkflowConfigs`,
10534    /// with the exception of `page_size`, must match the call that provided the
10535    /// page token.
10536    pub page_token: std::string::String,
10537
10538    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10539}
10540
10541impl ListWorkflowConfigsRequest {
10542    pub fn new() -> Self {
10543        std::default::Default::default()
10544    }
10545
10546    /// Sets the value of [parent][crate::model::ListWorkflowConfigsRequest::parent].
10547    ///
10548    /// # Example
10549    /// ```ignore,no_run
10550    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
10551    /// let x = ListWorkflowConfigsRequest::new().set_parent("example");
10552    /// ```
10553    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10554        self.parent = v.into();
10555        self
10556    }
10557
10558    /// Sets the value of [page_size][crate::model::ListWorkflowConfigsRequest::page_size].
10559    ///
10560    /// # Example
10561    /// ```ignore,no_run
10562    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
10563    /// let x = ListWorkflowConfigsRequest::new().set_page_size(42);
10564    /// ```
10565    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10566        self.page_size = v.into();
10567        self
10568    }
10569
10570    /// Sets the value of [page_token][crate::model::ListWorkflowConfigsRequest::page_token].
10571    ///
10572    /// # Example
10573    /// ```ignore,no_run
10574    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
10575    /// let x = ListWorkflowConfigsRequest::new().set_page_token("example");
10576    /// ```
10577    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10578        self.page_token = v.into();
10579        self
10580    }
10581}
10582
10583impl wkt::message::Message for ListWorkflowConfigsRequest {
10584    fn typename() -> &'static str {
10585        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
10586    }
10587}
10588
10589/// `ListWorkflowConfigs` response message.
10590#[derive(Clone, Default, PartialEq)]
10591#[non_exhaustive]
10592pub struct ListWorkflowConfigsResponse {
10593    /// List of workflow configs.
10594    pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
10595
10596    /// A token, which can be sent as `page_token` to retrieve the next page.
10597    /// If this field is omitted, there are no subsequent pages.
10598    pub next_page_token: std::string::String,
10599
10600    /// Locations which could not be reached.
10601    pub unreachable: std::vec::Vec<std::string::String>,
10602
10603    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10604}
10605
10606impl ListWorkflowConfigsResponse {
10607    pub fn new() -> Self {
10608        std::default::Default::default()
10609    }
10610
10611    /// Sets the value of [workflow_configs][crate::model::ListWorkflowConfigsResponse::workflow_configs].
10612    ///
10613    /// # Example
10614    /// ```ignore,no_run
10615    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
10616    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10617    /// let x = ListWorkflowConfigsResponse::new()
10618    ///     .set_workflow_configs([
10619    ///         WorkflowConfig::default()/* use setters */,
10620    ///         WorkflowConfig::default()/* use (different) setters */,
10621    ///     ]);
10622    /// ```
10623    pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
10624    where
10625        T: std::iter::IntoIterator<Item = V>,
10626        V: std::convert::Into<crate::model::WorkflowConfig>,
10627    {
10628        use std::iter::Iterator;
10629        self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
10630        self
10631    }
10632
10633    /// Sets the value of [next_page_token][crate::model::ListWorkflowConfigsResponse::next_page_token].
10634    ///
10635    /// # Example
10636    /// ```ignore,no_run
10637    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
10638    /// let x = ListWorkflowConfigsResponse::new().set_next_page_token("example");
10639    /// ```
10640    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10641        self.next_page_token = v.into();
10642        self
10643    }
10644
10645    /// Sets the value of [unreachable][crate::model::ListWorkflowConfigsResponse::unreachable].
10646    ///
10647    /// # Example
10648    /// ```ignore,no_run
10649    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
10650    /// let x = ListWorkflowConfigsResponse::new().set_unreachable(["a", "b", "c"]);
10651    /// ```
10652    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
10653    where
10654        T: std::iter::IntoIterator<Item = V>,
10655        V: std::convert::Into<std::string::String>,
10656    {
10657        use std::iter::Iterator;
10658        self.unreachable = v.into_iter().map(|i| i.into()).collect();
10659        self
10660    }
10661}
10662
10663impl wkt::message::Message for ListWorkflowConfigsResponse {
10664    fn typename() -> &'static str {
10665        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
10666    }
10667}
10668
10669#[doc(hidden)]
10670impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
10671    type PageItem = crate::model::WorkflowConfig;
10672
10673    fn items(self) -> std::vec::Vec<Self::PageItem> {
10674        self.workflow_configs
10675    }
10676
10677    fn next_page_token(&self) -> std::string::String {
10678        use std::clone::Clone;
10679        self.next_page_token.clone()
10680    }
10681}
10682
10683/// `GetWorkflowConfig` request message.
10684#[derive(Clone, Default, PartialEq)]
10685#[non_exhaustive]
10686pub struct GetWorkflowConfigRequest {
10687    /// Required. The workflow config's name.
10688    pub name: std::string::String,
10689
10690    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10691}
10692
10693impl GetWorkflowConfigRequest {
10694    pub fn new() -> Self {
10695        std::default::Default::default()
10696    }
10697
10698    /// Sets the value of [name][crate::model::GetWorkflowConfigRequest::name].
10699    ///
10700    /// # Example
10701    /// ```ignore,no_run
10702    /// # use google_cloud_dataform_v1::model::GetWorkflowConfigRequest;
10703    /// let x = GetWorkflowConfigRequest::new().set_name("example");
10704    /// ```
10705    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10706        self.name = v.into();
10707        self
10708    }
10709}
10710
10711impl wkt::message::Message for GetWorkflowConfigRequest {
10712    fn typename() -> &'static str {
10713        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
10714    }
10715}
10716
10717/// `CreateWorkflowConfig` request message.
10718#[derive(Clone, Default, PartialEq)]
10719#[non_exhaustive]
10720pub struct CreateWorkflowConfigRequest {
10721    /// Required. The repository in which to create the workflow config. Must be in
10722    /// the format `projects/*/locations/*/repositories/*`.
10723    pub parent: std::string::String,
10724
10725    /// Required. The workflow config to create.
10726    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
10727
10728    /// Required. The ID to use for the workflow config, which will become the
10729    /// final component of the workflow config's resource name.
10730    pub workflow_config_id: std::string::String,
10731
10732    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10733}
10734
10735impl CreateWorkflowConfigRequest {
10736    pub fn new() -> Self {
10737        std::default::Default::default()
10738    }
10739
10740    /// Sets the value of [parent][crate::model::CreateWorkflowConfigRequest::parent].
10741    ///
10742    /// # Example
10743    /// ```ignore,no_run
10744    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10745    /// let x = CreateWorkflowConfigRequest::new().set_parent("example");
10746    /// ```
10747    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10748        self.parent = v.into();
10749        self
10750    }
10751
10752    /// Sets the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
10753    ///
10754    /// # Example
10755    /// ```ignore,no_run
10756    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10757    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10758    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
10759    /// ```
10760    pub fn set_workflow_config<T>(mut self, v: T) -> Self
10761    where
10762        T: std::convert::Into<crate::model::WorkflowConfig>,
10763    {
10764        self.workflow_config = std::option::Option::Some(v.into());
10765        self
10766    }
10767
10768    /// Sets or clears the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
10769    ///
10770    /// # Example
10771    /// ```ignore,no_run
10772    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10773    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10774    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
10775    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
10776    /// ```
10777    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
10778    where
10779        T: std::convert::Into<crate::model::WorkflowConfig>,
10780    {
10781        self.workflow_config = v.map(|x| x.into());
10782        self
10783    }
10784
10785    /// Sets the value of [workflow_config_id][crate::model::CreateWorkflowConfigRequest::workflow_config_id].
10786    ///
10787    /// # Example
10788    /// ```ignore,no_run
10789    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
10790    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config_id("example");
10791    /// ```
10792    pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
10793        mut self,
10794        v: T,
10795    ) -> Self {
10796        self.workflow_config_id = v.into();
10797        self
10798    }
10799}
10800
10801impl wkt::message::Message for CreateWorkflowConfigRequest {
10802    fn typename() -> &'static str {
10803        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
10804    }
10805}
10806
10807/// `UpdateWorkflowConfig` request message.
10808#[derive(Clone, Default, PartialEq)]
10809#[non_exhaustive]
10810pub struct UpdateWorkflowConfigRequest {
10811    /// Optional. Specifies the fields to be updated in the workflow config. If
10812    /// left unset, all fields will be updated.
10813    pub update_mask: std::option::Option<wkt::FieldMask>,
10814
10815    /// Required. The workflow config to update.
10816    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
10817
10818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10819}
10820
10821impl UpdateWorkflowConfigRequest {
10822    pub fn new() -> Self {
10823        std::default::Default::default()
10824    }
10825
10826    /// Sets the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
10827    ///
10828    /// # Example
10829    /// ```ignore,no_run
10830    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10831    /// use wkt::FieldMask;
10832    /// let x = UpdateWorkflowConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
10833    /// ```
10834    pub fn set_update_mask<T>(mut self, v: T) -> Self
10835    where
10836        T: std::convert::Into<wkt::FieldMask>,
10837    {
10838        self.update_mask = std::option::Option::Some(v.into());
10839        self
10840    }
10841
10842    /// Sets or clears the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
10843    ///
10844    /// # Example
10845    /// ```ignore,no_run
10846    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10847    /// use wkt::FieldMask;
10848    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
10849    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
10850    /// ```
10851    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10852    where
10853        T: std::convert::Into<wkt::FieldMask>,
10854    {
10855        self.update_mask = v.map(|x| x.into());
10856        self
10857    }
10858
10859    /// Sets the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
10860    ///
10861    /// # Example
10862    /// ```ignore,no_run
10863    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10864    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10865    /// let x = UpdateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
10866    /// ```
10867    pub fn set_workflow_config<T>(mut self, v: T) -> Self
10868    where
10869        T: std::convert::Into<crate::model::WorkflowConfig>,
10870    {
10871        self.workflow_config = std::option::Option::Some(v.into());
10872        self
10873    }
10874
10875    /// Sets or clears the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
10876    ///
10877    /// # Example
10878    /// ```ignore,no_run
10879    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
10880    /// use google_cloud_dataform_v1::model::WorkflowConfig;
10881    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
10882    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
10883    /// ```
10884    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
10885    where
10886        T: std::convert::Into<crate::model::WorkflowConfig>,
10887    {
10888        self.workflow_config = v.map(|x| x.into());
10889        self
10890    }
10891}
10892
10893impl wkt::message::Message for UpdateWorkflowConfigRequest {
10894    fn typename() -> &'static str {
10895        "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
10896    }
10897}
10898
10899/// `DeleteWorkflowConfig` request message.
10900#[derive(Clone, Default, PartialEq)]
10901#[non_exhaustive]
10902pub struct DeleteWorkflowConfigRequest {
10903    /// Required. The workflow config's name.
10904    pub name: std::string::String,
10905
10906    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10907}
10908
10909impl DeleteWorkflowConfigRequest {
10910    pub fn new() -> Self {
10911        std::default::Default::default()
10912    }
10913
10914    /// Sets the value of [name][crate::model::DeleteWorkflowConfigRequest::name].
10915    ///
10916    /// # Example
10917    /// ```ignore,no_run
10918    /// # use google_cloud_dataform_v1::model::DeleteWorkflowConfigRequest;
10919    /// let x = DeleteWorkflowConfigRequest::new().set_name("example");
10920    /// ```
10921    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10922        self.name = v.into();
10923        self
10924    }
10925}
10926
10927impl wkt::message::Message for DeleteWorkflowConfigRequest {
10928    fn typename() -> &'static str {
10929        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
10930    }
10931}
10932
10933/// Represents a single invocation of a compilation result.
10934#[derive(Clone, Default, PartialEq)]
10935#[non_exhaustive]
10936pub struct WorkflowInvocation {
10937    /// Output only. The workflow invocation's name.
10938    pub name: std::string::String,
10939
10940    /// Immutable. If left unset, a default InvocationConfig will be used.
10941    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
10942
10943    /// Output only. This workflow invocation's current state.
10944    pub state: crate::model::workflow_invocation::State,
10945
10946    /// Output only. This workflow invocation's timing details.
10947    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
10948
10949    /// Output only. The resolved compilation result that was used to create this
10950    /// invocation. Will be in the format
10951    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
10952    pub resolved_compilation_result: std::string::String,
10953
10954    /// Output only. Only set if the repository has a KMS Key.
10955    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
10956
10957    /// Output only. All the metadata information that is used internally to serve
10958    /// the resource. For example: timestamps, flags, status fields, etc. The
10959    /// format of this field is a JSON string.
10960    pub internal_metadata: std::option::Option<std::string::String>,
10961
10962    /// The source of the compilation result to use for this invocation.
10963    pub compilation_source:
10964        std::option::Option<crate::model::workflow_invocation::CompilationSource>,
10965
10966    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10967}
10968
10969impl WorkflowInvocation {
10970    pub fn new() -> Self {
10971        std::default::Default::default()
10972    }
10973
10974    /// Sets the value of [name][crate::model::WorkflowInvocation::name].
10975    ///
10976    /// # Example
10977    /// ```ignore,no_run
10978    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
10979    /// let x = WorkflowInvocation::new().set_name("example");
10980    /// ```
10981    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10982        self.name = v.into();
10983        self
10984    }
10985
10986    /// Sets the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
10987    ///
10988    /// # Example
10989    /// ```ignore,no_run
10990    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
10991    /// use google_cloud_dataform_v1::model::InvocationConfig;
10992    /// let x = WorkflowInvocation::new().set_invocation_config(InvocationConfig::default()/* use setters */);
10993    /// ```
10994    pub fn set_invocation_config<T>(mut self, v: T) -> Self
10995    where
10996        T: std::convert::Into<crate::model::InvocationConfig>,
10997    {
10998        self.invocation_config = std::option::Option::Some(v.into());
10999        self
11000    }
11001
11002    /// Sets or clears the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
11003    ///
11004    /// # Example
11005    /// ```ignore,no_run
11006    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11007    /// use google_cloud_dataform_v1::model::InvocationConfig;
11008    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
11009    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(None::<InvocationConfig>);
11010    /// ```
11011    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
11012    where
11013        T: std::convert::Into<crate::model::InvocationConfig>,
11014    {
11015        self.invocation_config = v.map(|x| x.into());
11016        self
11017    }
11018
11019    /// Sets the value of [state][crate::model::WorkflowInvocation::state].
11020    ///
11021    /// # Example
11022    /// ```ignore,no_run
11023    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11024    /// use google_cloud_dataform_v1::model::workflow_invocation::State;
11025    /// let x0 = WorkflowInvocation::new().set_state(State::Running);
11026    /// let x1 = WorkflowInvocation::new().set_state(State::Succeeded);
11027    /// let x2 = WorkflowInvocation::new().set_state(State::Cancelled);
11028    /// ```
11029    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
11030        mut self,
11031        v: T,
11032    ) -> Self {
11033        self.state = v.into();
11034        self
11035    }
11036
11037    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
11038    ///
11039    /// # Example
11040    /// ```ignore,no_run
11041    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11042    /// use google_cloud_type::model::Interval;
11043    /// let x = WorkflowInvocation::new().set_invocation_timing(Interval::default()/* use setters */);
11044    /// ```
11045    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
11046    where
11047        T: std::convert::Into<google_cloud_type::model::Interval>,
11048    {
11049        self.invocation_timing = std::option::Option::Some(v.into());
11050        self
11051    }
11052
11053    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
11054    ///
11055    /// # Example
11056    /// ```ignore,no_run
11057    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11058    /// use google_cloud_type::model::Interval;
11059    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
11060    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(None::<Interval>);
11061    /// ```
11062    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
11063    where
11064        T: std::convert::Into<google_cloud_type::model::Interval>,
11065    {
11066        self.invocation_timing = v.map(|x| x.into());
11067        self
11068    }
11069
11070    /// Sets the value of [resolved_compilation_result][crate::model::WorkflowInvocation::resolved_compilation_result].
11071    ///
11072    /// # Example
11073    /// ```ignore,no_run
11074    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11075    /// let x = WorkflowInvocation::new().set_resolved_compilation_result("example");
11076    /// ```
11077    pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
11078        mut self,
11079        v: T,
11080    ) -> Self {
11081        self.resolved_compilation_result = v.into();
11082        self
11083    }
11084
11085    /// Sets the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
11086    ///
11087    /// # Example
11088    /// ```ignore,no_run
11089    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11090    /// use google_cloud_dataform_v1::model::DataEncryptionState;
11091    /// let x = WorkflowInvocation::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
11092    /// ```
11093    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
11094    where
11095        T: std::convert::Into<crate::model::DataEncryptionState>,
11096    {
11097        self.data_encryption_state = std::option::Option::Some(v.into());
11098        self
11099    }
11100
11101    /// Sets or clears the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
11102    ///
11103    /// # Example
11104    /// ```ignore,no_run
11105    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11106    /// use google_cloud_dataform_v1::model::DataEncryptionState;
11107    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
11108    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
11109    /// ```
11110    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
11111    where
11112        T: std::convert::Into<crate::model::DataEncryptionState>,
11113    {
11114        self.data_encryption_state = v.map(|x| x.into());
11115        self
11116    }
11117
11118    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
11119    ///
11120    /// # Example
11121    /// ```ignore,no_run
11122    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11123    /// let x = WorkflowInvocation::new().set_internal_metadata("example");
11124    /// ```
11125    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
11126    where
11127        T: std::convert::Into<std::string::String>,
11128    {
11129        self.internal_metadata = std::option::Option::Some(v.into());
11130        self
11131    }
11132
11133    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
11134    ///
11135    /// # Example
11136    /// ```ignore,no_run
11137    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11138    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(Some("example"));
11139    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(None::<String>);
11140    /// ```
11141    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11142    where
11143        T: std::convert::Into<std::string::String>,
11144    {
11145        self.internal_metadata = v.map(|x| x.into());
11146        self
11147    }
11148
11149    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source].
11150    ///
11151    /// Note that all the setters affecting `compilation_source` are mutually
11152    /// exclusive.
11153    ///
11154    /// # Example
11155    /// ```ignore,no_run
11156    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11157    /// use google_cloud_dataform_v1::model::workflow_invocation::CompilationSource;
11158    /// let x = WorkflowInvocation::new().set_compilation_source(Some(CompilationSource::CompilationResult("example".to_string())));
11159    /// ```
11160    pub fn set_compilation_source<
11161        T: std::convert::Into<
11162                std::option::Option<crate::model::workflow_invocation::CompilationSource>,
11163            >,
11164    >(
11165        mut self,
11166        v: T,
11167    ) -> Self {
11168        self.compilation_source = v.into();
11169        self
11170    }
11171
11172    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11173    /// if it holds a `CompilationResult`, `None` if the field is not set or
11174    /// holds a different branch.
11175    pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
11176        #[allow(unreachable_patterns)]
11177        self.compilation_source.as_ref().and_then(|v| match v {
11178            crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
11179                std::option::Option::Some(v)
11180            }
11181            _ => std::option::Option::None,
11182        })
11183    }
11184
11185    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11186    /// to hold a `CompilationResult`.
11187    ///
11188    /// Note that all the setters affecting `compilation_source` are
11189    /// mutually exclusive.
11190    ///
11191    /// # Example
11192    /// ```ignore,no_run
11193    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11194    /// let x = WorkflowInvocation::new().set_compilation_result("example");
11195    /// assert!(x.compilation_result().is_some());
11196    /// assert!(x.workflow_config().is_none());
11197    /// ```
11198    pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
11199        mut self,
11200        v: T,
11201    ) -> Self {
11202        self.compilation_source = std::option::Option::Some(
11203            crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
11204        );
11205        self
11206    }
11207
11208    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11209    /// if it holds a `WorkflowConfig`, `None` if the field is not set or
11210    /// holds a different branch.
11211    pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
11212        #[allow(unreachable_patterns)]
11213        self.compilation_source.as_ref().and_then(|v| match v {
11214            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
11215                std::option::Option::Some(v)
11216            }
11217            _ => std::option::Option::None,
11218        })
11219    }
11220
11221    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
11222    /// to hold a `WorkflowConfig`.
11223    ///
11224    /// Note that all the setters affecting `compilation_source` are
11225    /// mutually exclusive.
11226    ///
11227    /// # Example
11228    /// ```ignore,no_run
11229    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
11230    /// let x = WorkflowInvocation::new().set_workflow_config("example");
11231    /// assert!(x.workflow_config().is_some());
11232    /// assert!(x.compilation_result().is_none());
11233    /// ```
11234    pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11235        self.compilation_source = std::option::Option::Some(
11236            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
11237        );
11238        self
11239    }
11240}
11241
11242impl wkt::message::Message for WorkflowInvocation {
11243    fn typename() -> &'static str {
11244        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
11245    }
11246}
11247
11248/// Defines additional types related to [WorkflowInvocation].
11249pub mod workflow_invocation {
11250    #[allow(unused_imports)]
11251    use super::*;
11252
11253    /// Represents the current state of a workflow invocation.
11254    ///
11255    /// # Working with unknown values
11256    ///
11257    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11258    /// additional enum variants at any time. Adding new variants is not considered
11259    /// a breaking change. Applications should write their code in anticipation of:
11260    ///
11261    /// - New values appearing in future releases of the client library, **and**
11262    /// - New values received dynamically, without application changes.
11263    ///
11264    /// Please consult the [Working with enums] section in the user guide for some
11265    /// guidelines.
11266    ///
11267    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11268    #[derive(Clone, Debug, PartialEq)]
11269    #[non_exhaustive]
11270    pub enum State {
11271        /// Default value. This value is unused.
11272        Unspecified,
11273        /// The workflow invocation is currently running.
11274        Running,
11275        /// The workflow invocation succeeded. A terminal state.
11276        Succeeded,
11277        /// The workflow invocation was cancelled. A terminal state.
11278        Cancelled,
11279        /// The workflow invocation failed. A terminal state.
11280        Failed,
11281        /// The workflow invocation is being cancelled, but some actions are still
11282        /// running.
11283        Canceling,
11284        /// If set, the enum was initialized with an unknown value.
11285        ///
11286        /// Applications can examine the value using [State::value] or
11287        /// [State::name].
11288        UnknownValue(state::UnknownValue),
11289    }
11290
11291    #[doc(hidden)]
11292    pub mod state {
11293        #[allow(unused_imports)]
11294        use super::*;
11295        #[derive(Clone, Debug, PartialEq)]
11296        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11297    }
11298
11299    impl State {
11300        /// Gets the enum value.
11301        ///
11302        /// Returns `None` if the enum contains an unknown value deserialized from
11303        /// the string representation of enums.
11304        pub fn value(&self) -> std::option::Option<i32> {
11305            match self {
11306                Self::Unspecified => std::option::Option::Some(0),
11307                Self::Running => std::option::Option::Some(1),
11308                Self::Succeeded => std::option::Option::Some(2),
11309                Self::Cancelled => std::option::Option::Some(3),
11310                Self::Failed => std::option::Option::Some(4),
11311                Self::Canceling => std::option::Option::Some(5),
11312                Self::UnknownValue(u) => u.0.value(),
11313            }
11314        }
11315
11316        /// Gets the enum value as a string.
11317        ///
11318        /// Returns `None` if the enum contains an unknown value deserialized from
11319        /// the integer representation of enums.
11320        pub fn name(&self) -> std::option::Option<&str> {
11321            match self {
11322                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11323                Self::Running => std::option::Option::Some("RUNNING"),
11324                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
11325                Self::Cancelled => std::option::Option::Some("CANCELLED"),
11326                Self::Failed => std::option::Option::Some("FAILED"),
11327                Self::Canceling => std::option::Option::Some("CANCELING"),
11328                Self::UnknownValue(u) => u.0.name(),
11329            }
11330        }
11331    }
11332
11333    impl std::default::Default for State {
11334        fn default() -> Self {
11335            use std::convert::From;
11336            Self::from(0)
11337        }
11338    }
11339
11340    impl std::fmt::Display for State {
11341        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11342            wkt::internal::display_enum(f, self.name(), self.value())
11343        }
11344    }
11345
11346    impl std::convert::From<i32> for State {
11347        fn from(value: i32) -> Self {
11348            match value {
11349                0 => Self::Unspecified,
11350                1 => Self::Running,
11351                2 => Self::Succeeded,
11352                3 => Self::Cancelled,
11353                4 => Self::Failed,
11354                5 => Self::Canceling,
11355                _ => Self::UnknownValue(state::UnknownValue(
11356                    wkt::internal::UnknownEnumValue::Integer(value),
11357                )),
11358            }
11359        }
11360    }
11361
11362    impl std::convert::From<&str> for State {
11363        fn from(value: &str) -> Self {
11364            use std::string::ToString;
11365            match value {
11366                "STATE_UNSPECIFIED" => Self::Unspecified,
11367                "RUNNING" => Self::Running,
11368                "SUCCEEDED" => Self::Succeeded,
11369                "CANCELLED" => Self::Cancelled,
11370                "FAILED" => Self::Failed,
11371                "CANCELING" => Self::Canceling,
11372                _ => Self::UnknownValue(state::UnknownValue(
11373                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11374                )),
11375            }
11376        }
11377    }
11378
11379    impl serde::ser::Serialize for State {
11380        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11381        where
11382            S: serde::Serializer,
11383        {
11384            match self {
11385                Self::Unspecified => serializer.serialize_i32(0),
11386                Self::Running => serializer.serialize_i32(1),
11387                Self::Succeeded => serializer.serialize_i32(2),
11388                Self::Cancelled => serializer.serialize_i32(3),
11389                Self::Failed => serializer.serialize_i32(4),
11390                Self::Canceling => serializer.serialize_i32(5),
11391                Self::UnknownValue(u) => u.0.serialize(serializer),
11392            }
11393        }
11394    }
11395
11396    impl<'de> serde::de::Deserialize<'de> for State {
11397        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11398        where
11399            D: serde::Deserializer<'de>,
11400        {
11401            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11402                ".google.cloud.dataform.v1.WorkflowInvocation.State",
11403            ))
11404        }
11405    }
11406
11407    /// The source of the compilation result to use for this invocation.
11408    #[derive(Clone, Debug, PartialEq)]
11409    #[non_exhaustive]
11410    pub enum CompilationSource {
11411        /// Immutable. The name of the compilation result to use for this invocation.
11412        /// Must be in the format
11413        /// `projects/*/locations/*/repositories/*/compilationResults/*`.
11414        CompilationResult(std::string::String),
11415        /// Immutable. The name of the workflow config to invoke. Must be in the
11416        /// format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
11417        WorkflowConfig(std::string::String),
11418    }
11419}
11420
11421/// `ListWorkflowInvocations` request message.
11422#[derive(Clone, Default, PartialEq)]
11423#[non_exhaustive]
11424pub struct ListWorkflowInvocationsRequest {
11425    /// Required. The parent resource of the WorkflowInvocation type. Must be in
11426    /// the format `projects/*/locations/*/repositories/*`.
11427    pub parent: std::string::String,
11428
11429    /// Optional. Maximum number of workflow invocations to return. The server may
11430    /// return fewer items than requested. If unspecified, the server will pick an
11431    /// appropriate default.
11432    pub page_size: i32,
11433
11434    /// Optional. Page token received from a previous `ListWorkflowInvocations`
11435    /// call. Provide this to retrieve the subsequent page.
11436    ///
11437    /// When paginating, all other parameters provided to
11438    /// `ListWorkflowInvocations`, with the exception of `page_size`, must match
11439    /// the call that provided the page token.
11440    pub page_token: std::string::String,
11441
11442    /// Optional. This field only supports ordering by `name`. If unspecified, the
11443    /// server will choose the ordering. If specified, the default order is
11444    /// ascending for the `name` field.
11445    pub order_by: std::string::String,
11446
11447    /// Optional. Filter for the returned list.
11448    pub filter: std::string::String,
11449
11450    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11451}
11452
11453impl ListWorkflowInvocationsRequest {
11454    pub fn new() -> Self {
11455        std::default::Default::default()
11456    }
11457
11458    /// Sets the value of [parent][crate::model::ListWorkflowInvocationsRequest::parent].
11459    ///
11460    /// # Example
11461    /// ```ignore,no_run
11462    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11463    /// let x = ListWorkflowInvocationsRequest::new().set_parent("example");
11464    /// ```
11465    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11466        self.parent = v.into();
11467        self
11468    }
11469
11470    /// Sets the value of [page_size][crate::model::ListWorkflowInvocationsRequest::page_size].
11471    ///
11472    /// # Example
11473    /// ```ignore,no_run
11474    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11475    /// let x = ListWorkflowInvocationsRequest::new().set_page_size(42);
11476    /// ```
11477    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11478        self.page_size = v.into();
11479        self
11480    }
11481
11482    /// Sets the value of [page_token][crate::model::ListWorkflowInvocationsRequest::page_token].
11483    ///
11484    /// # Example
11485    /// ```ignore,no_run
11486    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11487    /// let x = ListWorkflowInvocationsRequest::new().set_page_token("example");
11488    /// ```
11489    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11490        self.page_token = v.into();
11491        self
11492    }
11493
11494    /// Sets the value of [order_by][crate::model::ListWorkflowInvocationsRequest::order_by].
11495    ///
11496    /// # Example
11497    /// ```ignore,no_run
11498    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11499    /// let x = ListWorkflowInvocationsRequest::new().set_order_by("example");
11500    /// ```
11501    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11502        self.order_by = v.into();
11503        self
11504    }
11505
11506    /// Sets the value of [filter][crate::model::ListWorkflowInvocationsRequest::filter].
11507    ///
11508    /// # Example
11509    /// ```ignore,no_run
11510    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
11511    /// let x = ListWorkflowInvocationsRequest::new().set_filter("example");
11512    /// ```
11513    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11514        self.filter = v.into();
11515        self
11516    }
11517}
11518
11519impl wkt::message::Message for ListWorkflowInvocationsRequest {
11520    fn typename() -> &'static str {
11521        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
11522    }
11523}
11524
11525/// `ListWorkflowInvocations` response message.
11526#[derive(Clone, Default, PartialEq)]
11527#[non_exhaustive]
11528pub struct ListWorkflowInvocationsResponse {
11529    /// List of workflow invocations.
11530    pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
11531
11532    /// A token, which can be sent as `page_token` to retrieve the next page.
11533    /// If this field is omitted, there are no subsequent pages.
11534    pub next_page_token: std::string::String,
11535
11536    /// Locations which could not be reached.
11537    pub unreachable: std::vec::Vec<std::string::String>,
11538
11539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11540}
11541
11542impl ListWorkflowInvocationsResponse {
11543    pub fn new() -> Self {
11544        std::default::Default::default()
11545    }
11546
11547    /// Sets the value of [workflow_invocations][crate::model::ListWorkflowInvocationsResponse::workflow_invocations].
11548    ///
11549    /// # Example
11550    /// ```ignore,no_run
11551    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
11552    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
11553    /// let x = ListWorkflowInvocationsResponse::new()
11554    ///     .set_workflow_invocations([
11555    ///         WorkflowInvocation::default()/* use setters */,
11556    ///         WorkflowInvocation::default()/* use (different) setters */,
11557    ///     ]);
11558    /// ```
11559    pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
11560    where
11561        T: std::iter::IntoIterator<Item = V>,
11562        V: std::convert::Into<crate::model::WorkflowInvocation>,
11563    {
11564        use std::iter::Iterator;
11565        self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
11566        self
11567    }
11568
11569    /// Sets the value of [next_page_token][crate::model::ListWorkflowInvocationsResponse::next_page_token].
11570    ///
11571    /// # Example
11572    /// ```ignore,no_run
11573    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
11574    /// let x = ListWorkflowInvocationsResponse::new().set_next_page_token("example");
11575    /// ```
11576    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11577        self.next_page_token = v.into();
11578        self
11579    }
11580
11581    /// Sets the value of [unreachable][crate::model::ListWorkflowInvocationsResponse::unreachable].
11582    ///
11583    /// # Example
11584    /// ```ignore,no_run
11585    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
11586    /// let x = ListWorkflowInvocationsResponse::new().set_unreachable(["a", "b", "c"]);
11587    /// ```
11588    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
11589    where
11590        T: std::iter::IntoIterator<Item = V>,
11591        V: std::convert::Into<std::string::String>,
11592    {
11593        use std::iter::Iterator;
11594        self.unreachable = v.into_iter().map(|i| i.into()).collect();
11595        self
11596    }
11597}
11598
11599impl wkt::message::Message for ListWorkflowInvocationsResponse {
11600    fn typename() -> &'static str {
11601        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
11602    }
11603}
11604
11605#[doc(hidden)]
11606impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
11607    type PageItem = crate::model::WorkflowInvocation;
11608
11609    fn items(self) -> std::vec::Vec<Self::PageItem> {
11610        self.workflow_invocations
11611    }
11612
11613    fn next_page_token(&self) -> std::string::String {
11614        use std::clone::Clone;
11615        self.next_page_token.clone()
11616    }
11617}
11618
11619/// `GetWorkflowInvocation` request message.
11620#[derive(Clone, Default, PartialEq)]
11621#[non_exhaustive]
11622pub struct GetWorkflowInvocationRequest {
11623    /// Required. The workflow invocation resource's name.
11624    pub name: std::string::String,
11625
11626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11627}
11628
11629impl GetWorkflowInvocationRequest {
11630    pub fn new() -> Self {
11631        std::default::Default::default()
11632    }
11633
11634    /// Sets the value of [name][crate::model::GetWorkflowInvocationRequest::name].
11635    ///
11636    /// # Example
11637    /// ```ignore,no_run
11638    /// # use google_cloud_dataform_v1::model::GetWorkflowInvocationRequest;
11639    /// let x = GetWorkflowInvocationRequest::new().set_name("example");
11640    /// ```
11641    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11642        self.name = v.into();
11643        self
11644    }
11645}
11646
11647impl wkt::message::Message for GetWorkflowInvocationRequest {
11648    fn typename() -> &'static str {
11649        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
11650    }
11651}
11652
11653/// `CreateWorkflowInvocation` request message.
11654#[derive(Clone, Default, PartialEq)]
11655#[non_exhaustive]
11656pub struct CreateWorkflowInvocationRequest {
11657    /// Required. The repository in which to create the workflow invocation. Must
11658    /// be in the format `projects/*/locations/*/repositories/*`.
11659    pub parent: std::string::String,
11660
11661    /// Required. The workflow invocation resource to create.
11662    pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
11663
11664    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11665}
11666
11667impl CreateWorkflowInvocationRequest {
11668    pub fn new() -> Self {
11669        std::default::Default::default()
11670    }
11671
11672    /// Sets the value of [parent][crate::model::CreateWorkflowInvocationRequest::parent].
11673    ///
11674    /// # Example
11675    /// ```ignore,no_run
11676    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
11677    /// let x = CreateWorkflowInvocationRequest::new().set_parent("example");
11678    /// ```
11679    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11680        self.parent = v.into();
11681        self
11682    }
11683
11684    /// Sets the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
11685    ///
11686    /// # Example
11687    /// ```ignore,no_run
11688    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
11689    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
11690    /// let x = CreateWorkflowInvocationRequest::new().set_workflow_invocation(WorkflowInvocation::default()/* use setters */);
11691    /// ```
11692    pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
11693    where
11694        T: std::convert::Into<crate::model::WorkflowInvocation>,
11695    {
11696        self.workflow_invocation = std::option::Option::Some(v.into());
11697        self
11698    }
11699
11700    /// Sets or clears the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
11701    ///
11702    /// # Example
11703    /// ```ignore,no_run
11704    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
11705    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
11706    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(Some(WorkflowInvocation::default()/* use setters */));
11707    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(None::<WorkflowInvocation>);
11708    /// ```
11709    pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
11710    where
11711        T: std::convert::Into<crate::model::WorkflowInvocation>,
11712    {
11713        self.workflow_invocation = v.map(|x| x.into());
11714        self
11715    }
11716}
11717
11718impl wkt::message::Message for CreateWorkflowInvocationRequest {
11719    fn typename() -> &'static str {
11720        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
11721    }
11722}
11723
11724/// `DeleteWorkflowInvocation` request message.
11725#[derive(Clone, Default, PartialEq)]
11726#[non_exhaustive]
11727pub struct DeleteWorkflowInvocationRequest {
11728    /// Required. The workflow invocation resource's name.
11729    pub name: std::string::String,
11730
11731    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11732}
11733
11734impl DeleteWorkflowInvocationRequest {
11735    pub fn new() -> Self {
11736        std::default::Default::default()
11737    }
11738
11739    /// Sets the value of [name][crate::model::DeleteWorkflowInvocationRequest::name].
11740    ///
11741    /// # Example
11742    /// ```ignore,no_run
11743    /// # use google_cloud_dataform_v1::model::DeleteWorkflowInvocationRequest;
11744    /// let x = DeleteWorkflowInvocationRequest::new().set_name("example");
11745    /// ```
11746    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11747        self.name = v.into();
11748        self
11749    }
11750}
11751
11752impl wkt::message::Message for DeleteWorkflowInvocationRequest {
11753    fn typename() -> &'static str {
11754        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
11755    }
11756}
11757
11758/// `CancelWorkflowInvocation` request message.
11759#[derive(Clone, Default, PartialEq)]
11760#[non_exhaustive]
11761pub struct CancelWorkflowInvocationRequest {
11762    /// Required. The workflow invocation resource's name.
11763    pub name: std::string::String,
11764
11765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11766}
11767
11768impl CancelWorkflowInvocationRequest {
11769    pub fn new() -> Self {
11770        std::default::Default::default()
11771    }
11772
11773    /// Sets the value of [name][crate::model::CancelWorkflowInvocationRequest::name].
11774    ///
11775    /// # Example
11776    /// ```ignore,no_run
11777    /// # use google_cloud_dataform_v1::model::CancelWorkflowInvocationRequest;
11778    /// let x = CancelWorkflowInvocationRequest::new().set_name("example");
11779    /// ```
11780    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11781        self.name = v.into();
11782        self
11783    }
11784}
11785
11786impl wkt::message::Message for CancelWorkflowInvocationRequest {
11787    fn typename() -> &'static str {
11788        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
11789    }
11790}
11791
11792/// `CancelWorkflowInvocation` response message.
11793#[derive(Clone, Default, PartialEq)]
11794#[non_exhaustive]
11795pub struct CancelWorkflowInvocationResponse {
11796    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11797}
11798
11799impl CancelWorkflowInvocationResponse {
11800    pub fn new() -> Self {
11801        std::default::Default::default()
11802    }
11803}
11804
11805impl wkt::message::Message for CancelWorkflowInvocationResponse {
11806    fn typename() -> &'static str {
11807        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
11808    }
11809}
11810
11811/// Represents a single action in a workflow invocation.
11812#[derive(Clone, Default, PartialEq)]
11813#[non_exhaustive]
11814pub struct WorkflowInvocationAction {
11815    /// Output only. This action's identifier. Unique within the workflow
11816    /// invocation.
11817    pub target: std::option::Option<crate::model::Target>,
11818
11819    /// Output only. The action's identifier if the project had been compiled
11820    /// without any overrides configured. Unique within the compilation result.
11821    pub canonical_target: std::option::Option<crate::model::Target>,
11822
11823    /// Output only. This action's current state.
11824    pub state: crate::model::workflow_invocation_action::State,
11825
11826    /// Output only. If and only if action's state is FAILED a failure reason is
11827    /// set.
11828    pub failure_reason: std::string::String,
11829
11830    /// Output only. This action's timing details.
11831    /// `start_time` will be set if the action is in [RUNNING, SUCCEEDED,
11832    /// CANCELLED, FAILED] state.
11833    /// `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED]
11834    /// state.
11835    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
11836
11837    /// Output only. All the metadata information that is used internally to serve
11838    /// the resource. For example: timestamps, flags, status fields, etc. The
11839    /// format of this field is a JSON string.
11840    pub internal_metadata: std::option::Option<std::string::String>,
11841
11842    /// The action's details.
11843    pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
11844
11845    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11846}
11847
11848impl WorkflowInvocationAction {
11849    pub fn new() -> Self {
11850        std::default::Default::default()
11851    }
11852
11853    /// Sets the value of [target][crate::model::WorkflowInvocationAction::target].
11854    ///
11855    /// # Example
11856    /// ```ignore,no_run
11857    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11858    /// use google_cloud_dataform_v1::model::Target;
11859    /// let x = WorkflowInvocationAction::new().set_target(Target::default()/* use setters */);
11860    /// ```
11861    pub fn set_target<T>(mut self, v: T) -> Self
11862    where
11863        T: std::convert::Into<crate::model::Target>,
11864    {
11865        self.target = std::option::Option::Some(v.into());
11866        self
11867    }
11868
11869    /// Sets or clears the value of [target][crate::model::WorkflowInvocationAction::target].
11870    ///
11871    /// # Example
11872    /// ```ignore,no_run
11873    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11874    /// use google_cloud_dataform_v1::model::Target;
11875    /// let x = WorkflowInvocationAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
11876    /// let x = WorkflowInvocationAction::new().set_or_clear_target(None::<Target>);
11877    /// ```
11878    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
11879    where
11880        T: std::convert::Into<crate::model::Target>,
11881    {
11882        self.target = v.map(|x| x.into());
11883        self
11884    }
11885
11886    /// Sets the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
11887    ///
11888    /// # Example
11889    /// ```ignore,no_run
11890    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11891    /// use google_cloud_dataform_v1::model::Target;
11892    /// let x = WorkflowInvocationAction::new().set_canonical_target(Target::default()/* use setters */);
11893    /// ```
11894    pub fn set_canonical_target<T>(mut self, v: T) -> Self
11895    where
11896        T: std::convert::Into<crate::model::Target>,
11897    {
11898        self.canonical_target = std::option::Option::Some(v.into());
11899        self
11900    }
11901
11902    /// Sets or clears the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
11903    ///
11904    /// # Example
11905    /// ```ignore,no_run
11906    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11907    /// use google_cloud_dataform_v1::model::Target;
11908    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
11909    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(None::<Target>);
11910    /// ```
11911    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
11912    where
11913        T: std::convert::Into<crate::model::Target>,
11914    {
11915        self.canonical_target = v.map(|x| x.into());
11916        self
11917    }
11918
11919    /// Sets the value of [state][crate::model::WorkflowInvocationAction::state].
11920    ///
11921    /// # Example
11922    /// ```ignore,no_run
11923    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11924    /// use google_cloud_dataform_v1::model::workflow_invocation_action::State;
11925    /// let x0 = WorkflowInvocationAction::new().set_state(State::Running);
11926    /// let x1 = WorkflowInvocationAction::new().set_state(State::Skipped);
11927    /// let x2 = WorkflowInvocationAction::new().set_state(State::Disabled);
11928    /// ```
11929    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
11930        mut self,
11931        v: T,
11932    ) -> Self {
11933        self.state = v.into();
11934        self
11935    }
11936
11937    /// Sets the value of [failure_reason][crate::model::WorkflowInvocationAction::failure_reason].
11938    ///
11939    /// # Example
11940    /// ```ignore,no_run
11941    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11942    /// let x = WorkflowInvocationAction::new().set_failure_reason("example");
11943    /// ```
11944    pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11945        self.failure_reason = v.into();
11946        self
11947    }
11948
11949    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
11950    ///
11951    /// # Example
11952    /// ```ignore,no_run
11953    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11954    /// use google_cloud_type::model::Interval;
11955    /// let x = WorkflowInvocationAction::new().set_invocation_timing(Interval::default()/* use setters */);
11956    /// ```
11957    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
11958    where
11959        T: std::convert::Into<google_cloud_type::model::Interval>,
11960    {
11961        self.invocation_timing = std::option::Option::Some(v.into());
11962        self
11963    }
11964
11965    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
11966    ///
11967    /// # Example
11968    /// ```ignore,no_run
11969    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11970    /// use google_cloud_type::model::Interval;
11971    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
11972    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(None::<Interval>);
11973    /// ```
11974    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
11975    where
11976        T: std::convert::Into<google_cloud_type::model::Interval>,
11977    {
11978        self.invocation_timing = v.map(|x| x.into());
11979        self
11980    }
11981
11982    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
11983    ///
11984    /// # Example
11985    /// ```ignore,no_run
11986    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
11987    /// let x = WorkflowInvocationAction::new().set_internal_metadata("example");
11988    /// ```
11989    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
11990    where
11991        T: std::convert::Into<std::string::String>,
11992    {
11993        self.internal_metadata = std::option::Option::Some(v.into());
11994        self
11995    }
11996
11997    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
11998    ///
11999    /// # Example
12000    /// ```ignore,no_run
12001    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12002    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(Some("example"));
12003    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(None::<String>);
12004    /// ```
12005    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12006    where
12007        T: std::convert::Into<std::string::String>,
12008    {
12009        self.internal_metadata = v.map(|x| x.into());
12010        self
12011    }
12012
12013    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action].
12014    ///
12015    /// Note that all the setters affecting `action` are mutually
12016    /// exclusive.
12017    ///
12018    /// # Example
12019    /// ```ignore,no_run
12020    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12021    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12022    /// let x = WorkflowInvocationAction::new().set_action(Some(
12023    ///     google_cloud_dataform_v1::model::workflow_invocation_action::Action::BigqueryAction(BigQueryAction::default().into())));
12024    /// ```
12025    pub fn set_action<
12026        T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
12027    >(
12028        mut self,
12029        v: T,
12030    ) -> Self {
12031        self.action = v.into();
12032        self
12033    }
12034
12035    /// The value of [action][crate::model::WorkflowInvocationAction::action]
12036    /// if it holds a `BigqueryAction`, `None` if the field is not set or
12037    /// holds a different branch.
12038    pub fn bigquery_action(
12039        &self,
12040    ) -> std::option::Option<
12041        &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
12042    > {
12043        #[allow(unreachable_patterns)]
12044        self.action.as_ref().and_then(|v| match v {
12045            crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
12046                std::option::Option::Some(v)
12047            }
12048            _ => std::option::Option::None,
12049        })
12050    }
12051
12052    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
12053    /// to hold a `BigqueryAction`.
12054    ///
12055    /// Note that all the setters affecting `action` are
12056    /// mutually exclusive.
12057    ///
12058    /// # Example
12059    /// ```ignore,no_run
12060    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12061    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12062    /// let x = WorkflowInvocationAction::new().set_bigquery_action(BigQueryAction::default()/* use setters */);
12063    /// assert!(x.bigquery_action().is_some());
12064    /// assert!(x.notebook_action().is_none());
12065    /// assert!(x.data_preparation_action().is_none());
12066    /// ```
12067    pub fn set_bigquery_action<
12068        T: std::convert::Into<
12069                std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
12070            >,
12071    >(
12072        mut self,
12073        v: T,
12074    ) -> Self {
12075        self.action = std::option::Option::Some(
12076            crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
12077        );
12078        self
12079    }
12080
12081    /// The value of [action][crate::model::WorkflowInvocationAction::action]
12082    /// if it holds a `NotebookAction`, `None` if the field is not set or
12083    /// holds a different branch.
12084    pub fn notebook_action(
12085        &self,
12086    ) -> std::option::Option<
12087        &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
12088    > {
12089        #[allow(unreachable_patterns)]
12090        self.action.as_ref().and_then(|v| match v {
12091            crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
12092                std::option::Option::Some(v)
12093            }
12094            _ => std::option::Option::None,
12095        })
12096    }
12097
12098    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
12099    /// to hold a `NotebookAction`.
12100    ///
12101    /// Note that all the setters affecting `action` are
12102    /// mutually exclusive.
12103    ///
12104    /// # Example
12105    /// ```ignore,no_run
12106    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12107    /// use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
12108    /// let x = WorkflowInvocationAction::new().set_notebook_action(NotebookAction::default()/* use setters */);
12109    /// assert!(x.notebook_action().is_some());
12110    /// assert!(x.bigquery_action().is_none());
12111    /// assert!(x.data_preparation_action().is_none());
12112    /// ```
12113    pub fn set_notebook_action<
12114        T: std::convert::Into<
12115                std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
12116            >,
12117    >(
12118        mut self,
12119        v: T,
12120    ) -> Self {
12121        self.action = std::option::Option::Some(
12122            crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
12123        );
12124        self
12125    }
12126
12127    /// The value of [action][crate::model::WorkflowInvocationAction::action]
12128    /// if it holds a `DataPreparationAction`, `None` if the field is not set or
12129    /// holds a different branch.
12130    pub fn data_preparation_action(
12131        &self,
12132    ) -> std::option::Option<
12133        &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
12134    > {
12135        #[allow(unreachable_patterns)]
12136        self.action.as_ref().and_then(|v| match v {
12137            crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
12138                std::option::Option::Some(v)
12139            }
12140            _ => std::option::Option::None,
12141        })
12142    }
12143
12144    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
12145    /// to hold a `DataPreparationAction`.
12146    ///
12147    /// Note that all the setters affecting `action` are
12148    /// mutually exclusive.
12149    ///
12150    /// # Example
12151    /// ```ignore,no_run
12152    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12153    /// use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12154    /// let x = WorkflowInvocationAction::new().set_data_preparation_action(DataPreparationAction::default()/* use setters */);
12155    /// assert!(x.data_preparation_action().is_some());
12156    /// assert!(x.bigquery_action().is_none());
12157    /// assert!(x.notebook_action().is_none());
12158    /// ```
12159    pub fn set_data_preparation_action<
12160        T: std::convert::Into<
12161                std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
12162            >,
12163    >(
12164        mut self,
12165        v: T,
12166    ) -> Self {
12167        self.action = std::option::Option::Some(
12168            crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
12169        );
12170        self
12171    }
12172}
12173
12174impl wkt::message::Message for WorkflowInvocationAction {
12175    fn typename() -> &'static str {
12176        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
12177    }
12178}
12179
12180/// Defines additional types related to [WorkflowInvocationAction].
12181pub mod workflow_invocation_action {
12182    #[allow(unused_imports)]
12183    use super::*;
12184
12185    /// Represents a workflow action that will run against BigQuery.
12186    #[derive(Clone, Default, PartialEq)]
12187    #[non_exhaustive]
12188    pub struct BigQueryAction {
12189        /// Output only. The generated BigQuery SQL script that will be executed.
12190        pub sql_script: std::string::String,
12191
12192        /// Output only. The ID of the BigQuery job that executed the SQL in
12193        /// sql_script. Only set once the job has started to run.
12194        pub job_id: std::string::String,
12195
12196        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12197    }
12198
12199    impl BigQueryAction {
12200        pub fn new() -> Self {
12201            std::default::Default::default()
12202        }
12203
12204        /// Sets the value of [sql_script][crate::model::workflow_invocation_action::BigQueryAction::sql_script].
12205        ///
12206        /// # Example
12207        /// ```ignore,no_run
12208        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12209        /// let x = BigQueryAction::new().set_sql_script("example");
12210        /// ```
12211        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12212            self.sql_script = v.into();
12213            self
12214        }
12215
12216        /// Sets the value of [job_id][crate::model::workflow_invocation_action::BigQueryAction::job_id].
12217        ///
12218        /// # Example
12219        /// ```ignore,no_run
12220        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
12221        /// let x = BigQueryAction::new().set_job_id("example");
12222        /// ```
12223        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12224            self.job_id = v.into();
12225            self
12226        }
12227    }
12228
12229    impl wkt::message::Message for BigQueryAction {
12230        fn typename() -> &'static str {
12231            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
12232        }
12233    }
12234
12235    /// Represents a workflow action that will run against a Notebook runtime.
12236    #[derive(Clone, Default, PartialEq)]
12237    #[non_exhaustive]
12238    pub struct NotebookAction {
12239        /// Output only. The code contents of a Notebook to be run.
12240        pub contents: std::string::String,
12241
12242        /// Output only. The ID of the Vertex job that executed the notebook in
12243        /// contents and also the ID used for the outputs created in Google Cloud
12244        /// Storage buckets. Only set once the job has started to run.
12245        pub job_id: std::string::String,
12246
12247        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12248    }
12249
12250    impl NotebookAction {
12251        pub fn new() -> Self {
12252            std::default::Default::default()
12253        }
12254
12255        /// Sets the value of [contents][crate::model::workflow_invocation_action::NotebookAction::contents].
12256        ///
12257        /// # Example
12258        /// ```ignore,no_run
12259        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
12260        /// let x = NotebookAction::new().set_contents("example");
12261        /// ```
12262        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12263            self.contents = v.into();
12264            self
12265        }
12266
12267        /// Sets the value of [job_id][crate::model::workflow_invocation_action::NotebookAction::job_id].
12268        ///
12269        /// # Example
12270        /// ```ignore,no_run
12271        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
12272        /// let x = NotebookAction::new().set_job_id("example");
12273        /// ```
12274        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12275            self.job_id = v.into();
12276            self
12277        }
12278    }
12279
12280    impl wkt::message::Message for NotebookAction {
12281        fn typename() -> &'static str {
12282            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
12283        }
12284    }
12285
12286    /// Represents a workflow action that will run a Data Preparation.
12287    #[derive(Clone, Default, PartialEq)]
12288    #[non_exhaustive]
12289    pub struct DataPreparationAction {
12290        /// Output only. The generated BigQuery SQL script that will be executed. For
12291        /// reference only.
12292        pub generated_sql: std::string::String,
12293
12294        /// Output only. The ID of the BigQuery job that executed the SQL in
12295        /// sql_script. Only set once the job has started to run.
12296        pub job_id: std::string::String,
12297
12298        /// The definition for the data preparation.
12299        pub definition: std::option::Option<
12300            crate::model::workflow_invocation_action::data_preparation_action::Definition,
12301        >,
12302
12303        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12304    }
12305
12306    impl DataPreparationAction {
12307        pub fn new() -> Self {
12308            std::default::Default::default()
12309        }
12310
12311        /// Sets the value of [generated_sql][crate::model::workflow_invocation_action::DataPreparationAction::generated_sql].
12312        ///
12313        /// # Example
12314        /// ```ignore,no_run
12315        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12316        /// let x = DataPreparationAction::new().set_generated_sql("example");
12317        /// ```
12318        pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
12319            mut self,
12320            v: T,
12321        ) -> Self {
12322            self.generated_sql = v.into();
12323            self
12324        }
12325
12326        /// Sets the value of [job_id][crate::model::workflow_invocation_action::DataPreparationAction::job_id].
12327        ///
12328        /// # Example
12329        /// ```ignore,no_run
12330        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12331        /// let x = DataPreparationAction::new().set_job_id("example");
12332        /// ```
12333        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12334            self.job_id = v.into();
12335            self
12336        }
12337
12338        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition].
12339        ///
12340        /// Note that all the setters affecting `definition` are mutually
12341        /// exclusive.
12342        ///
12343        /// # Example
12344        /// ```ignore,no_run
12345        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12346        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::Definition;
12347        /// let x = DataPreparationAction::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
12348        /// ```
12349        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
12350        {
12351            self.definition = v.into();
12352            self
12353        }
12354
12355        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12356        /// if it holds a `ContentsYaml`, `None` if the field is not set or
12357        /// holds a different branch.
12358        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
12359            #[allow(unreachable_patterns)]
12360            self.definition.as_ref().and_then(|v| match v {
12361                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
12362                _ => std::option::Option::None,
12363            })
12364        }
12365
12366        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12367        /// to hold a `ContentsYaml`.
12368        ///
12369        /// Note that all the setters affecting `definition` are
12370        /// mutually exclusive.
12371        ///
12372        /// # Example
12373        /// ```ignore,no_run
12374        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12375        /// let x = DataPreparationAction::new().set_contents_yaml("example");
12376        /// assert!(x.contents_yaml().is_some());
12377        /// assert!(x.contents_sql().is_none());
12378        /// ```
12379        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
12380            mut self,
12381            v: T,
12382        ) -> Self {
12383            self.definition = std::option::Option::Some(
12384                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
12385                    v.into()
12386                )
12387            );
12388            self
12389        }
12390
12391        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12392        /// if it holds a `ContentsSql`, `None` if the field is not set or
12393        /// holds a different branch.
12394        pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
12395            #[allow(unreachable_patterns)]
12396            self.definition.as_ref().and_then(|v| match v {
12397                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
12398                _ => std::option::Option::None,
12399            })
12400        }
12401
12402        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
12403        /// to hold a `ContentsSql`.
12404        ///
12405        /// Note that all the setters affecting `definition` are
12406        /// mutually exclusive.
12407        ///
12408        /// # Example
12409        /// ```ignore,no_run
12410        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
12411        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12412        /// let x = DataPreparationAction::new().set_contents_sql(ActionSqlDefinition::default()/* use setters */);
12413        /// assert!(x.contents_sql().is_some());
12414        /// assert!(x.contents_yaml().is_none());
12415        /// ```
12416        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{
12417            self.definition = std::option::Option::Some(
12418                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
12419                    v.into()
12420                )
12421            );
12422            self
12423        }
12424    }
12425
12426    impl wkt::message::Message for DataPreparationAction {
12427        fn typename() -> &'static str {
12428            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
12429        }
12430    }
12431
12432    /// Defines additional types related to [DataPreparationAction].
12433    pub mod data_preparation_action {
12434        #[allow(unused_imports)]
12435        use super::*;
12436
12437        /// Definition of a SQL Data Preparation
12438        #[derive(Clone, Default, PartialEq)]
12439        #[non_exhaustive]
12440        pub struct ActionSqlDefinition {
12441            /// The SQL query representing the data preparation steps. Formatted as a
12442            /// Pipe SQL query statement.
12443            pub query: std::string::String,
12444
12445            /// Error table configuration,
12446            pub error_table: std::option::Option<
12447                crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
12448            >,
12449
12450            /// Load configuration.
12451            pub load_config: std::option::Option<
12452                crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
12453            >,
12454
12455            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12456        }
12457
12458        impl ActionSqlDefinition {
12459            pub fn new() -> Self {
12460                std::default::Default::default()
12461            }
12462
12463            /// Sets the value of [query][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::query].
12464            ///
12465            /// # Example
12466            /// ```ignore,no_run
12467            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12468            /// let x = ActionSqlDefinition::new().set_query("example");
12469            /// ```
12470            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12471                self.query = v.into();
12472                self
12473            }
12474
12475            /// Sets the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
12476            ///
12477            /// # Example
12478            /// ```ignore,no_run
12479            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12480            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12481            /// let x = ActionSqlDefinition::new().set_error_table(ActionErrorTable::default()/* use setters */);
12482            /// ```
12483            pub fn set_error_table<T>(mut self, v: T) -> Self
12484            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
12485            {
12486                self.error_table = std::option::Option::Some(v.into());
12487                self
12488            }
12489
12490            /// Sets or clears the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
12491            ///
12492            /// # Example
12493            /// ```ignore,no_run
12494            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12495            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12496            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(Some(ActionErrorTable::default()/* use setters */));
12497            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(None::<ActionErrorTable>);
12498            /// ```
12499            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
12500            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
12501            {
12502                self.error_table = v.map(|x| x.into());
12503                self
12504            }
12505
12506            /// Sets the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
12507            ///
12508            /// # Example
12509            /// ```ignore,no_run
12510            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12511            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12512            /// let x = ActionSqlDefinition::new().set_load_config(ActionLoadConfig::default()/* use setters */);
12513            /// ```
12514            pub fn set_load_config<T>(mut self, v: T) -> Self
12515            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
12516            {
12517                self.load_config = std::option::Option::Some(v.into());
12518                self
12519            }
12520
12521            /// Sets or clears the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
12522            ///
12523            /// # Example
12524            /// ```ignore,no_run
12525            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
12526            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12527            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(Some(ActionLoadConfig::default()/* use setters */));
12528            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(None::<ActionLoadConfig>);
12529            /// ```
12530            pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
12531            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
12532            {
12533                self.load_config = v.map(|x| x.into());
12534                self
12535            }
12536        }
12537
12538        impl wkt::message::Message for ActionSqlDefinition {
12539            fn typename() -> &'static str {
12540                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
12541            }
12542        }
12543
12544        /// Error table information, used to write error data into a BigQuery
12545        /// table.
12546        #[derive(Clone, Default, PartialEq)]
12547        #[non_exhaustive]
12548        pub struct ActionErrorTable {
12549            /// Error Table target.
12550            pub target: std::option::Option<crate::model::Target>,
12551
12552            /// Error table partition expiration in days. Only positive values are
12553            /// allowed.
12554            pub retention_days: i32,
12555
12556            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12557        }
12558
12559        impl ActionErrorTable {
12560            pub fn new() -> Self {
12561                std::default::Default::default()
12562            }
12563
12564            /// Sets the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
12565            ///
12566            /// # Example
12567            /// ```ignore,no_run
12568            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12569            /// use google_cloud_dataform_v1::model::Target;
12570            /// let x = ActionErrorTable::new().set_target(Target::default()/* use setters */);
12571            /// ```
12572            pub fn set_target<T>(mut self, v: T) -> Self
12573            where
12574                T: std::convert::Into<crate::model::Target>,
12575            {
12576                self.target = std::option::Option::Some(v.into());
12577                self
12578            }
12579
12580            /// Sets or clears the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
12581            ///
12582            /// # Example
12583            /// ```ignore,no_run
12584            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12585            /// use google_cloud_dataform_v1::model::Target;
12586            /// let x = ActionErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
12587            /// let x = ActionErrorTable::new().set_or_clear_target(None::<Target>);
12588            /// ```
12589            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
12590            where
12591                T: std::convert::Into<crate::model::Target>,
12592            {
12593                self.target = v.map(|x| x.into());
12594                self
12595            }
12596
12597            /// Sets the value of [retention_days][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::retention_days].
12598            ///
12599            /// # Example
12600            /// ```ignore,no_run
12601            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
12602            /// let x = ActionErrorTable::new().set_retention_days(42);
12603            /// ```
12604            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12605                self.retention_days = v.into();
12606                self
12607            }
12608        }
12609
12610        impl wkt::message::Message for ActionErrorTable {
12611            fn typename() -> &'static str {
12612                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
12613            }
12614        }
12615
12616        /// Simplified load configuration for actions
12617        #[derive(Clone, Default, PartialEq)]
12618        #[non_exhaustive]
12619        pub struct ActionLoadConfig {
12620
12621            /// Load mode
12622            pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
12623
12624            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12625        }
12626
12627        impl ActionLoadConfig {
12628            pub fn new() -> Self {
12629                std::default::Default::default()
12630            }
12631
12632            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode].
12633            ///
12634            /// Note that all the setters affecting `mode` are mutually
12635            /// exclusive.
12636            ///
12637            /// # Example
12638            /// ```ignore,no_run
12639            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12640            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
12641            /// let x = ActionLoadConfig::new().set_mode(Some(
12642            ///     google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(ActionSimpleLoadMode::default().into())));
12643            /// ```
12644            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
12645            {
12646                self.mode = v.into();
12647                self
12648            }
12649
12650            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12651            /// if it holds a `Replace`, `None` if the field is not set or
12652            /// holds a different branch.
12653            pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
12654                #[allow(unreachable_patterns)]
12655                self.mode.as_ref().and_then(|v| match v {
12656                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
12657                    _ => std::option::Option::None,
12658                })
12659            }
12660
12661            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12662            /// to hold a `Replace`.
12663            ///
12664            /// Note that all the setters affecting `mode` are
12665            /// mutually exclusive.
12666            ///
12667            /// # Example
12668            /// ```ignore,no_run
12669            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12670            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
12671            /// let x = ActionLoadConfig::new().set_replace(ActionSimpleLoadMode::default()/* use setters */);
12672            /// assert!(x.replace().is_some());
12673            /// assert!(x.append().is_none());
12674            /// assert!(x.maximum().is_none());
12675            /// assert!(x.unique().is_none());
12676            /// ```
12677            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{
12678                self.mode = std::option::Option::Some(
12679                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
12680                        v.into()
12681                    )
12682                );
12683                self
12684            }
12685
12686            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12687            /// if it holds a `Append`, `None` if the field is not set or
12688            /// holds a different branch.
12689            pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
12690                #[allow(unreachable_patterns)]
12691                self.mode.as_ref().and_then(|v| match v {
12692                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
12693                    _ => std::option::Option::None,
12694                })
12695            }
12696
12697            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12698            /// to hold a `Append`.
12699            ///
12700            /// Note that all the setters affecting `mode` are
12701            /// mutually exclusive.
12702            ///
12703            /// # Example
12704            /// ```ignore,no_run
12705            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12706            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
12707            /// let x = ActionLoadConfig::new().set_append(ActionSimpleLoadMode::default()/* use setters */);
12708            /// assert!(x.append().is_some());
12709            /// assert!(x.replace().is_none());
12710            /// assert!(x.maximum().is_none());
12711            /// assert!(x.unique().is_none());
12712            /// ```
12713            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{
12714                self.mode = std::option::Option::Some(
12715                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
12716                        v.into()
12717                    )
12718                );
12719                self
12720            }
12721
12722            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12723            /// if it holds a `Maximum`, `None` if the field is not set or
12724            /// holds a different branch.
12725            pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
12726                #[allow(unreachable_patterns)]
12727                self.mode.as_ref().and_then(|v| match v {
12728                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
12729                    _ => std::option::Option::None,
12730                })
12731            }
12732
12733            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12734            /// to hold a `Maximum`.
12735            ///
12736            /// Note that all the setters affecting `mode` are
12737            /// mutually exclusive.
12738            ///
12739            /// # Example
12740            /// ```ignore,no_run
12741            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12742            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
12743            /// let x = ActionLoadConfig::new().set_maximum(ActionIncrementalLoadMode::default()/* use setters */);
12744            /// assert!(x.maximum().is_some());
12745            /// assert!(x.replace().is_none());
12746            /// assert!(x.append().is_none());
12747            /// assert!(x.unique().is_none());
12748            /// ```
12749            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{
12750                self.mode = std::option::Option::Some(
12751                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
12752                        v.into()
12753                    )
12754                );
12755                self
12756            }
12757
12758            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12759            /// if it holds a `Unique`, `None` if the field is not set or
12760            /// holds a different branch.
12761            pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
12762                #[allow(unreachable_patterns)]
12763                self.mode.as_ref().and_then(|v| match v {
12764                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
12765                    _ => std::option::Option::None,
12766                })
12767            }
12768
12769            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
12770            /// to hold a `Unique`.
12771            ///
12772            /// Note that all the setters affecting `mode` are
12773            /// mutually exclusive.
12774            ///
12775            /// # Example
12776            /// ```ignore,no_run
12777            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
12778            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
12779            /// let x = ActionLoadConfig::new().set_unique(ActionIncrementalLoadMode::default()/* use setters */);
12780            /// assert!(x.unique().is_some());
12781            /// assert!(x.replace().is_none());
12782            /// assert!(x.append().is_none());
12783            /// assert!(x.maximum().is_none());
12784            /// ```
12785            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{
12786                self.mode = std::option::Option::Some(
12787                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
12788                        v.into()
12789                    )
12790                );
12791                self
12792            }
12793        }
12794
12795        impl wkt::message::Message for ActionLoadConfig {
12796            fn typename() -> &'static str {
12797                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
12798            }
12799        }
12800
12801        /// Defines additional types related to [ActionLoadConfig].
12802        pub mod action_load_config {
12803            #[allow(unused_imports)]
12804            use super::*;
12805
12806            /// Load mode
12807            #[derive(Clone, Debug, PartialEq)]
12808            #[non_exhaustive]
12809            pub enum Mode {
12810                /// Replace destination table
12811                Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
12812                /// Append into destination table
12813                Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
12814                /// Insert records where the value exceeds the previous maximum value for
12815                /// a column in the destination table
12816                Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
12817                /// Insert records where the value of a column is not already present in
12818                /// the destination table
12819                Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
12820            }
12821        }
12822
12823        /// Simple load definition
12824        #[derive(Clone, Default, PartialEq)]
12825        #[non_exhaustive]
12826        pub struct ActionSimpleLoadMode {
12827            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12828        }
12829
12830        impl ActionSimpleLoadMode {
12831            pub fn new() -> Self {
12832                std::default::Default::default()
12833            }
12834        }
12835
12836        impl wkt::message::Message for ActionSimpleLoadMode {
12837            fn typename() -> &'static str {
12838                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
12839            }
12840        }
12841
12842        /// Load definition for incremental load modes
12843        #[derive(Clone, Default, PartialEq)]
12844        #[non_exhaustive]
12845        pub struct ActionIncrementalLoadMode {
12846            /// Column name for incremental load modes
12847            pub column: std::string::String,
12848
12849            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12850        }
12851
12852        impl ActionIncrementalLoadMode {
12853            pub fn new() -> Self {
12854                std::default::Default::default()
12855            }
12856
12857            /// Sets the value of [column][crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode::column].
12858            ///
12859            /// # Example
12860            /// ```ignore,no_run
12861            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
12862            /// let x = ActionIncrementalLoadMode::new().set_column("example");
12863            /// ```
12864            pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12865                self.column = v.into();
12866                self
12867            }
12868        }
12869
12870        impl wkt::message::Message for ActionIncrementalLoadMode {
12871            fn typename() -> &'static str {
12872                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
12873            }
12874        }
12875
12876        /// The definition for the data preparation.
12877        #[derive(Clone, Debug, PartialEq)]
12878        #[non_exhaustive]
12879        pub enum Definition {
12880            /// Output only. YAML representing the contents of the data preparation.
12881            /// Can be used to show the customer what the input was to their workflow.
12882            ContentsYaml(std::string::String),
12883            /// SQL definition for a Data Preparation. Contains a SQL query and
12884            /// additional context information.
12885            ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
12886        }
12887    }
12888
12889    /// Represents the current state of a workflow invocation action.
12890    ///
12891    /// # Working with unknown values
12892    ///
12893    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12894    /// additional enum variants at any time. Adding new variants is not considered
12895    /// a breaking change. Applications should write their code in anticipation of:
12896    ///
12897    /// - New values appearing in future releases of the client library, **and**
12898    /// - New values received dynamically, without application changes.
12899    ///
12900    /// Please consult the [Working with enums] section in the user guide for some
12901    /// guidelines.
12902    ///
12903    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12904    #[derive(Clone, Debug, PartialEq)]
12905    #[non_exhaustive]
12906    pub enum State {
12907        /// The action has not yet been considered for invocation.
12908        Pending,
12909        /// The action is currently running.
12910        Running,
12911        /// Execution of the action was skipped because upstream dependencies did not
12912        /// all complete successfully. A terminal state.
12913        Skipped,
12914        /// Execution of the action was disabled as per the configuration of the
12915        /// corresponding compilation result action. A terminal state.
12916        Disabled,
12917        /// The action succeeded. A terminal state.
12918        Succeeded,
12919        /// The action was cancelled. A terminal state.
12920        Cancelled,
12921        /// The action failed. A terminal state.
12922        Failed,
12923        /// If set, the enum was initialized with an unknown value.
12924        ///
12925        /// Applications can examine the value using [State::value] or
12926        /// [State::name].
12927        UnknownValue(state::UnknownValue),
12928    }
12929
12930    #[doc(hidden)]
12931    pub mod state {
12932        #[allow(unused_imports)]
12933        use super::*;
12934        #[derive(Clone, Debug, PartialEq)]
12935        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12936    }
12937
12938    impl State {
12939        /// Gets the enum value.
12940        ///
12941        /// Returns `None` if the enum contains an unknown value deserialized from
12942        /// the string representation of enums.
12943        pub fn value(&self) -> std::option::Option<i32> {
12944            match self {
12945                Self::Pending => std::option::Option::Some(0),
12946                Self::Running => std::option::Option::Some(1),
12947                Self::Skipped => std::option::Option::Some(2),
12948                Self::Disabled => std::option::Option::Some(3),
12949                Self::Succeeded => std::option::Option::Some(4),
12950                Self::Cancelled => std::option::Option::Some(5),
12951                Self::Failed => std::option::Option::Some(6),
12952                Self::UnknownValue(u) => u.0.value(),
12953            }
12954        }
12955
12956        /// Gets the enum value as a string.
12957        ///
12958        /// Returns `None` if the enum contains an unknown value deserialized from
12959        /// the integer representation of enums.
12960        pub fn name(&self) -> std::option::Option<&str> {
12961            match self {
12962                Self::Pending => std::option::Option::Some("PENDING"),
12963                Self::Running => std::option::Option::Some("RUNNING"),
12964                Self::Skipped => std::option::Option::Some("SKIPPED"),
12965                Self::Disabled => std::option::Option::Some("DISABLED"),
12966                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12967                Self::Cancelled => std::option::Option::Some("CANCELLED"),
12968                Self::Failed => std::option::Option::Some("FAILED"),
12969                Self::UnknownValue(u) => u.0.name(),
12970            }
12971        }
12972    }
12973
12974    impl std::default::Default for State {
12975        fn default() -> Self {
12976            use std::convert::From;
12977            Self::from(0)
12978        }
12979    }
12980
12981    impl std::fmt::Display for State {
12982        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12983            wkt::internal::display_enum(f, self.name(), self.value())
12984        }
12985    }
12986
12987    impl std::convert::From<i32> for State {
12988        fn from(value: i32) -> Self {
12989            match value {
12990                0 => Self::Pending,
12991                1 => Self::Running,
12992                2 => Self::Skipped,
12993                3 => Self::Disabled,
12994                4 => Self::Succeeded,
12995                5 => Self::Cancelled,
12996                6 => Self::Failed,
12997                _ => Self::UnknownValue(state::UnknownValue(
12998                    wkt::internal::UnknownEnumValue::Integer(value),
12999                )),
13000            }
13001        }
13002    }
13003
13004    impl std::convert::From<&str> for State {
13005        fn from(value: &str) -> Self {
13006            use std::string::ToString;
13007            match value {
13008                "PENDING" => Self::Pending,
13009                "RUNNING" => Self::Running,
13010                "SKIPPED" => Self::Skipped,
13011                "DISABLED" => Self::Disabled,
13012                "SUCCEEDED" => Self::Succeeded,
13013                "CANCELLED" => Self::Cancelled,
13014                "FAILED" => Self::Failed,
13015                _ => Self::UnknownValue(state::UnknownValue(
13016                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13017                )),
13018            }
13019        }
13020    }
13021
13022    impl serde::ser::Serialize for State {
13023        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13024        where
13025            S: serde::Serializer,
13026        {
13027            match self {
13028                Self::Pending => serializer.serialize_i32(0),
13029                Self::Running => serializer.serialize_i32(1),
13030                Self::Skipped => serializer.serialize_i32(2),
13031                Self::Disabled => serializer.serialize_i32(3),
13032                Self::Succeeded => serializer.serialize_i32(4),
13033                Self::Cancelled => serializer.serialize_i32(5),
13034                Self::Failed => serializer.serialize_i32(6),
13035                Self::UnknownValue(u) => u.0.serialize(serializer),
13036            }
13037        }
13038    }
13039
13040    impl<'de> serde::de::Deserialize<'de> for State {
13041        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13042        where
13043            D: serde::Deserializer<'de>,
13044        {
13045            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13046                ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
13047            ))
13048        }
13049    }
13050
13051    /// The action's details.
13052    #[derive(Clone, Debug, PartialEq)]
13053    #[non_exhaustive]
13054    pub enum Action {
13055        /// Output only. The workflow action's bigquery action details.
13056        BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
13057        /// Output only. The workflow action's notebook action details.
13058        NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
13059        /// Output only. The workflow action's data preparation action details.
13060        DataPreparationAction(
13061            std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13062        ),
13063    }
13064}
13065
13066/// `QueryWorkflowInvocationActions` request message.
13067#[derive(Clone, Default, PartialEq)]
13068#[non_exhaustive]
13069pub struct QueryWorkflowInvocationActionsRequest {
13070    /// Required. The workflow invocation's name.
13071    pub name: std::string::String,
13072
13073    /// Optional. Maximum number of workflow invocations to return. The server may
13074    /// return fewer items than requested. If unspecified, the server will pick an
13075    /// appropriate default.
13076    pub page_size: i32,
13077
13078    /// Optional. Page token received from a previous
13079    /// `QueryWorkflowInvocationActions` call. Provide this to retrieve the
13080    /// subsequent page.
13081    ///
13082    /// When paginating, all other parameters provided to
13083    /// `QueryWorkflowInvocationActions`, with the exception of `page_size`, must
13084    /// match the call that provided the page token.
13085    pub page_token: std::string::String,
13086
13087    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13088}
13089
13090impl QueryWorkflowInvocationActionsRequest {
13091    pub fn new() -> Self {
13092        std::default::Default::default()
13093    }
13094
13095    /// Sets the value of [name][crate::model::QueryWorkflowInvocationActionsRequest::name].
13096    ///
13097    /// # Example
13098    /// ```ignore,no_run
13099    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
13100    /// let x = QueryWorkflowInvocationActionsRequest::new().set_name("example");
13101    /// ```
13102    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13103        self.name = v.into();
13104        self
13105    }
13106
13107    /// Sets the value of [page_size][crate::model::QueryWorkflowInvocationActionsRequest::page_size].
13108    ///
13109    /// # Example
13110    /// ```ignore,no_run
13111    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
13112    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_size(42);
13113    /// ```
13114    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13115        self.page_size = v.into();
13116        self
13117    }
13118
13119    /// Sets the value of [page_token][crate::model::QueryWorkflowInvocationActionsRequest::page_token].
13120    ///
13121    /// # Example
13122    /// ```ignore,no_run
13123    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
13124    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_token("example");
13125    /// ```
13126    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13127        self.page_token = v.into();
13128        self
13129    }
13130}
13131
13132impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
13133    fn typename() -> &'static str {
13134        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
13135    }
13136}
13137
13138/// `QueryWorkflowInvocationActions` response message.
13139#[derive(Clone, Default, PartialEq)]
13140#[non_exhaustive]
13141pub struct QueryWorkflowInvocationActionsResponse {
13142    /// List of workflow invocation actions.
13143    pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
13144
13145    /// A token, which can be sent as `page_token` to retrieve the next page.
13146    /// If this field is omitted, there are no subsequent pages.
13147    pub next_page_token: std::string::String,
13148
13149    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13150}
13151
13152impl QueryWorkflowInvocationActionsResponse {
13153    pub fn new() -> Self {
13154        std::default::Default::default()
13155    }
13156
13157    /// Sets the value of [workflow_invocation_actions][crate::model::QueryWorkflowInvocationActionsResponse::workflow_invocation_actions].
13158    ///
13159    /// # Example
13160    /// ```ignore,no_run
13161    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
13162    /// use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13163    /// let x = QueryWorkflowInvocationActionsResponse::new()
13164    ///     .set_workflow_invocation_actions([
13165    ///         WorkflowInvocationAction::default()/* use setters */,
13166    ///         WorkflowInvocationAction::default()/* use (different) setters */,
13167    ///     ]);
13168    /// ```
13169    pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
13170    where
13171        T: std::iter::IntoIterator<Item = V>,
13172        V: std::convert::Into<crate::model::WorkflowInvocationAction>,
13173    {
13174        use std::iter::Iterator;
13175        self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
13176        self
13177    }
13178
13179    /// Sets the value of [next_page_token][crate::model::QueryWorkflowInvocationActionsResponse::next_page_token].
13180    ///
13181    /// # Example
13182    /// ```ignore,no_run
13183    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
13184    /// let x = QueryWorkflowInvocationActionsResponse::new().set_next_page_token("example");
13185    /// ```
13186    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13187        self.next_page_token = v.into();
13188        self
13189    }
13190}
13191
13192impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
13193    fn typename() -> &'static str {
13194        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
13195    }
13196}
13197
13198#[doc(hidden)]
13199impl google_cloud_gax::paginator::internal::PageableResponse
13200    for QueryWorkflowInvocationActionsResponse
13201{
13202    type PageItem = crate::model::WorkflowInvocationAction;
13203
13204    fn items(self) -> std::vec::Vec<Self::PageItem> {
13205        self.workflow_invocation_actions
13206    }
13207
13208    fn next_page_token(&self) -> std::string::String {
13209        use std::clone::Clone;
13210        self.next_page_token.clone()
13211    }
13212}
13213
13214/// Config for all repositories in a given project and location.
13215#[derive(Clone, Default, PartialEq)]
13216#[non_exhaustive]
13217pub struct Config {
13218    /// Identifier. The config name.
13219    pub name: std::string::String,
13220
13221    /// Optional. The default KMS key that is used if no encryption key is provided
13222    /// when a repository is created.
13223    pub default_kms_key_name: std::string::String,
13224
13225    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13226}
13227
13228impl Config {
13229    pub fn new() -> Self {
13230        std::default::Default::default()
13231    }
13232
13233    /// Sets the value of [name][crate::model::Config::name].
13234    ///
13235    /// # Example
13236    /// ```ignore,no_run
13237    /// # use google_cloud_dataform_v1::model::Config;
13238    /// let x = Config::new().set_name("example");
13239    /// ```
13240    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13241        self.name = v.into();
13242        self
13243    }
13244
13245    /// Sets the value of [default_kms_key_name][crate::model::Config::default_kms_key_name].
13246    ///
13247    /// # Example
13248    /// ```ignore,no_run
13249    /// # use google_cloud_dataform_v1::model::Config;
13250    /// let x = Config::new().set_default_kms_key_name("example");
13251    /// ```
13252    pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
13253        mut self,
13254        v: T,
13255    ) -> Self {
13256        self.default_kms_key_name = v.into();
13257        self
13258    }
13259}
13260
13261impl wkt::message::Message for Config {
13262    fn typename() -> &'static str {
13263        "type.googleapis.com/google.cloud.dataform.v1.Config"
13264    }
13265}
13266
13267/// `GetConfig` request message.
13268#[derive(Clone, Default, PartialEq)]
13269#[non_exhaustive]
13270pub struct GetConfigRequest {
13271    /// Required. The config name.
13272    pub name: std::string::String,
13273
13274    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13275}
13276
13277impl GetConfigRequest {
13278    pub fn new() -> Self {
13279        std::default::Default::default()
13280    }
13281
13282    /// Sets the value of [name][crate::model::GetConfigRequest::name].
13283    ///
13284    /// # Example
13285    /// ```ignore,no_run
13286    /// # use google_cloud_dataform_v1::model::GetConfigRequest;
13287    /// let x = GetConfigRequest::new().set_name("example");
13288    /// ```
13289    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13290        self.name = v.into();
13291        self
13292    }
13293}
13294
13295impl wkt::message::Message for GetConfigRequest {
13296    fn typename() -> &'static str {
13297        "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
13298    }
13299}
13300
13301/// `UpdateConfig` request message.
13302#[derive(Clone, Default, PartialEq)]
13303#[non_exhaustive]
13304pub struct UpdateConfigRequest {
13305    /// Required. The config to update.
13306    pub config: std::option::Option<crate::model::Config>,
13307
13308    /// Optional. Specifies the fields to be updated in the config.
13309    pub update_mask: std::option::Option<wkt::FieldMask>,
13310
13311    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13312}
13313
13314impl UpdateConfigRequest {
13315    pub fn new() -> Self {
13316        std::default::Default::default()
13317    }
13318
13319    /// Sets the value of [config][crate::model::UpdateConfigRequest::config].
13320    ///
13321    /// # Example
13322    /// ```ignore,no_run
13323    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13324    /// use google_cloud_dataform_v1::model::Config;
13325    /// let x = UpdateConfigRequest::new().set_config(Config::default()/* use setters */);
13326    /// ```
13327    pub fn set_config<T>(mut self, v: T) -> Self
13328    where
13329        T: std::convert::Into<crate::model::Config>,
13330    {
13331        self.config = std::option::Option::Some(v.into());
13332        self
13333    }
13334
13335    /// Sets or clears the value of [config][crate::model::UpdateConfigRequest::config].
13336    ///
13337    /// # Example
13338    /// ```ignore,no_run
13339    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13340    /// use google_cloud_dataform_v1::model::Config;
13341    /// let x = UpdateConfigRequest::new().set_or_clear_config(Some(Config::default()/* use setters */));
13342    /// let x = UpdateConfigRequest::new().set_or_clear_config(None::<Config>);
13343    /// ```
13344    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
13345    where
13346        T: std::convert::Into<crate::model::Config>,
13347    {
13348        self.config = v.map(|x| x.into());
13349        self
13350    }
13351
13352    /// Sets the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
13353    ///
13354    /// # Example
13355    /// ```ignore,no_run
13356    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13357    /// use wkt::FieldMask;
13358    /// let x = UpdateConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
13359    /// ```
13360    pub fn set_update_mask<T>(mut self, v: T) -> Self
13361    where
13362        T: std::convert::Into<wkt::FieldMask>,
13363    {
13364        self.update_mask = std::option::Option::Some(v.into());
13365        self
13366    }
13367
13368    /// Sets or clears the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
13369    ///
13370    /// # Example
13371    /// ```ignore,no_run
13372    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
13373    /// use wkt::FieldMask;
13374    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
13375    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
13376    /// ```
13377    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13378    where
13379        T: std::convert::Into<wkt::FieldMask>,
13380    {
13381        self.update_mask = v.map(|x| x.into());
13382        self
13383    }
13384}
13385
13386impl wkt::message::Message for UpdateConfigRequest {
13387    fn typename() -> &'static str {
13388        "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
13389    }
13390}