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_longrunning;
27extern crate google_cloud_lro;
28extern crate google_cloud_rpc;
29extern crate google_cloud_type;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// Describes encryption state of a resource.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct DataEncryptionState {
45    /// Required. The KMS key version name with which data of a resource is
46    /// encrypted.
47    pub kms_key_version_name: std::string::String,
48
49    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50}
51
52impl DataEncryptionState {
53    /// Creates a new default instance.
54    pub fn new() -> Self {
55        std::default::Default::default()
56    }
57
58    /// Sets the value of [kms_key_version_name][crate::model::DataEncryptionState::kms_key_version_name].
59    ///
60    /// # Example
61    /// ```ignore,no_run
62    /// # use google_cloud_dataform_v1::model::DataEncryptionState;
63    /// let x = DataEncryptionState::new().set_kms_key_version_name("example");
64    /// ```
65    pub fn set_kms_key_version_name<T: std::convert::Into<std::string::String>>(
66        mut self,
67        v: T,
68    ) -> Self {
69        self.kms_key_version_name = v.into();
70        self
71    }
72}
73
74impl wkt::message::Message for DataEncryptionState {
75    fn typename() -> &'static str {
76        "type.googleapis.com/google.cloud.dataform.v1.DataEncryptionState"
77    }
78}
79
80/// Represents a Dataform Git repository.
81#[derive(Clone, Default, PartialEq)]
82#[non_exhaustive]
83pub struct Repository {
84    /// Identifier. The repository's name.
85    pub name: std::string::String,
86
87    /// Optional. The name of the containing folder of the repository.
88    /// The field is immutable and it can be modified via a MoveRepository
89    /// operation.
90    /// Format: `projects/*/locations/*/folders/*`. or
91    /// `projects/*/locations/*/teamFolders/*`.
92    pub containing_folder: std::option::Option<std::string::String>,
93
94    /// Output only. The resource name of the TeamFolder that this Repository is
95    /// associated with. This should take the format:
96    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this
97    /// is not set, the Repository is not associated with a TeamFolder.
98    pub team_folder_name: std::option::Option<std::string::String>,
99
100    /// Output only. The timestamp of when the repository was created.
101    pub create_time: std::option::Option<wkt::Timestamp>,
102
103    /// Optional. The repository's user-friendly name.
104    pub display_name: std::string::String,
105
106    /// Optional. If set, configures this repository to be linked to a Git remote.
107    pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
108
109    /// Optional. The name of the Secret Manager secret version to be used to
110    /// interpolate variables into the .npmrc file for package installation
111    /// operations. Must be in the format `projects/*/secrets/*/versions/*`. The
112    /// file itself must be in a JSON format.
113    pub npmrc_environment_variables_secret_version: std::string::String,
114
115    /// Optional. If set, fields of `workspace_compilation_overrides` override the
116    /// default compilation settings that are specified in dataform.json when
117    /// creating workspace-scoped compilation results. See documentation for
118    /// `WorkspaceCompilationOverrides` for more information.
119    pub workspace_compilation_overrides:
120        std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
121
122    /// Optional. Repository user labels.
123    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
124
125    /// Optional. Input only. If set to true, the authenticated user will be
126    /// granted the roles/dataform.admin role on the created repository.
127    pub set_authenticated_user_admin: bool,
128
129    /// Optional. The service account to run workflow invocations under.
130    pub service_account: std::string::String,
131
132    /// Optional. The reference to a KMS encryption key. If provided, it will be
133    /// used to encrypt user data in the repository and all child resources. It is
134    /// not possible to add or update the encryption key after the repository is
135    /// created. Example:
136    /// `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}`
137    pub kms_key_name: std::string::String,
138
139    /// Output only. A data encryption state of a Git repository if this Repository
140    /// is protected by a KMS key.
141    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
142
143    /// Output only. All the metadata information that is used internally to serve
144    /// the resource. For example: timestamps, flags, status fields, etc. The
145    /// format of this field is a JSON string.
146    pub internal_metadata: std::option::Option<std::string::String>,
147
148    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
149}
150
151impl Repository {
152    /// Creates a new default instance.
153    pub fn new() -> Self {
154        std::default::Default::default()
155    }
156
157    /// Sets the value of [name][crate::model::Repository::name].
158    ///
159    /// # Example
160    /// ```ignore,no_run
161    /// # use google_cloud_dataform_v1::model::Repository;
162    /// let x = Repository::new().set_name("example");
163    /// ```
164    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
165        self.name = v.into();
166        self
167    }
168
169    /// Sets the value of [containing_folder][crate::model::Repository::containing_folder].
170    ///
171    /// # Example
172    /// ```ignore,no_run
173    /// # use google_cloud_dataform_v1::model::Repository;
174    /// let x = Repository::new().set_containing_folder("example");
175    /// ```
176    pub fn set_containing_folder<T>(mut self, v: T) -> Self
177    where
178        T: std::convert::Into<std::string::String>,
179    {
180        self.containing_folder = std::option::Option::Some(v.into());
181        self
182    }
183
184    /// Sets or clears the value of [containing_folder][crate::model::Repository::containing_folder].
185    ///
186    /// # Example
187    /// ```ignore,no_run
188    /// # use google_cloud_dataform_v1::model::Repository;
189    /// let x = Repository::new().set_or_clear_containing_folder(Some("example"));
190    /// let x = Repository::new().set_or_clear_containing_folder(None::<String>);
191    /// ```
192    pub fn set_or_clear_containing_folder<T>(mut self, v: std::option::Option<T>) -> Self
193    where
194        T: std::convert::Into<std::string::String>,
195    {
196        self.containing_folder = v.map(|x| x.into());
197        self
198    }
199
200    /// Sets the value of [team_folder_name][crate::model::Repository::team_folder_name].
201    ///
202    /// # Example
203    /// ```ignore,no_run
204    /// # use google_cloud_dataform_v1::model::Repository;
205    /// let x = Repository::new().set_team_folder_name("example");
206    /// ```
207    pub fn set_team_folder_name<T>(mut self, v: T) -> Self
208    where
209        T: std::convert::Into<std::string::String>,
210    {
211        self.team_folder_name = std::option::Option::Some(v.into());
212        self
213    }
214
215    /// Sets or clears the value of [team_folder_name][crate::model::Repository::team_folder_name].
216    ///
217    /// # Example
218    /// ```ignore,no_run
219    /// # use google_cloud_dataform_v1::model::Repository;
220    /// let x = Repository::new().set_or_clear_team_folder_name(Some("example"));
221    /// let x = Repository::new().set_or_clear_team_folder_name(None::<String>);
222    /// ```
223    pub fn set_or_clear_team_folder_name<T>(mut self, v: std::option::Option<T>) -> Self
224    where
225        T: std::convert::Into<std::string::String>,
226    {
227        self.team_folder_name = v.map(|x| x.into());
228        self
229    }
230
231    /// Sets the value of [create_time][crate::model::Repository::create_time].
232    ///
233    /// # Example
234    /// ```ignore,no_run
235    /// # use google_cloud_dataform_v1::model::Repository;
236    /// use wkt::Timestamp;
237    /// let x = Repository::new().set_create_time(Timestamp::default()/* use setters */);
238    /// ```
239    pub fn set_create_time<T>(mut self, v: T) -> Self
240    where
241        T: std::convert::Into<wkt::Timestamp>,
242    {
243        self.create_time = std::option::Option::Some(v.into());
244        self
245    }
246
247    /// Sets or clears the value of [create_time][crate::model::Repository::create_time].
248    ///
249    /// # Example
250    /// ```ignore,no_run
251    /// # use google_cloud_dataform_v1::model::Repository;
252    /// use wkt::Timestamp;
253    /// let x = Repository::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
254    /// let x = Repository::new().set_or_clear_create_time(None::<Timestamp>);
255    /// ```
256    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
257    where
258        T: std::convert::Into<wkt::Timestamp>,
259    {
260        self.create_time = v.map(|x| x.into());
261        self
262    }
263
264    /// Sets the value of [display_name][crate::model::Repository::display_name].
265    ///
266    /// # Example
267    /// ```ignore,no_run
268    /// # use google_cloud_dataform_v1::model::Repository;
269    /// let x = Repository::new().set_display_name("example");
270    /// ```
271    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
272        self.display_name = v.into();
273        self
274    }
275
276    /// Sets the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
277    ///
278    /// # Example
279    /// ```ignore,no_run
280    /// # use google_cloud_dataform_v1::model::Repository;
281    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
282    /// let x = Repository::new().set_git_remote_settings(GitRemoteSettings::default()/* use setters */);
283    /// ```
284    pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
285    where
286        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
287    {
288        self.git_remote_settings = std::option::Option::Some(v.into());
289        self
290    }
291
292    /// Sets or clears the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
293    ///
294    /// # Example
295    /// ```ignore,no_run
296    /// # use google_cloud_dataform_v1::model::Repository;
297    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
298    /// let x = Repository::new().set_or_clear_git_remote_settings(Some(GitRemoteSettings::default()/* use setters */));
299    /// let x = Repository::new().set_or_clear_git_remote_settings(None::<GitRemoteSettings>);
300    /// ```
301    pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
302    where
303        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
304    {
305        self.git_remote_settings = v.map(|x| x.into());
306        self
307    }
308
309    /// Sets the value of [npmrc_environment_variables_secret_version][crate::model::Repository::npmrc_environment_variables_secret_version].
310    ///
311    /// # Example
312    /// ```ignore,no_run
313    /// # use google_cloud_dataform_v1::model::Repository;
314    /// let x = Repository::new().set_npmrc_environment_variables_secret_version("example");
315    /// ```
316    pub fn set_npmrc_environment_variables_secret_version<
317        T: std::convert::Into<std::string::String>,
318    >(
319        mut self,
320        v: T,
321    ) -> Self {
322        self.npmrc_environment_variables_secret_version = v.into();
323        self
324    }
325
326    /// Sets the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
327    ///
328    /// # Example
329    /// ```ignore,no_run
330    /// # use google_cloud_dataform_v1::model::Repository;
331    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
332    /// let x = Repository::new().set_workspace_compilation_overrides(WorkspaceCompilationOverrides::default()/* use setters */);
333    /// ```
334    pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
335    where
336        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
337    {
338        self.workspace_compilation_overrides = std::option::Option::Some(v.into());
339        self
340    }
341
342    /// Sets or clears the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
343    ///
344    /// # Example
345    /// ```ignore,no_run
346    /// # use google_cloud_dataform_v1::model::Repository;
347    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
348    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(Some(WorkspaceCompilationOverrides::default()/* use setters */));
349    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(None::<WorkspaceCompilationOverrides>);
350    /// ```
351    pub fn set_or_clear_workspace_compilation_overrides<T>(
352        mut self,
353        v: std::option::Option<T>,
354    ) -> Self
355    where
356        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
357    {
358        self.workspace_compilation_overrides = v.map(|x| x.into());
359        self
360    }
361
362    /// Sets the value of [labels][crate::model::Repository::labels].
363    ///
364    /// # Example
365    /// ```ignore,no_run
366    /// # use google_cloud_dataform_v1::model::Repository;
367    /// let x = Repository::new().set_labels([
368    ///     ("key0", "abc"),
369    ///     ("key1", "xyz"),
370    /// ]);
371    /// ```
372    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
373    where
374        T: std::iter::IntoIterator<Item = (K, V)>,
375        K: std::convert::Into<std::string::String>,
376        V: std::convert::Into<std::string::String>,
377    {
378        use std::iter::Iterator;
379        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
380        self
381    }
382
383    /// Sets the value of [set_authenticated_user_admin][crate::model::Repository::set_authenticated_user_admin].
384    ///
385    /// # Example
386    /// ```ignore,no_run
387    /// # use google_cloud_dataform_v1::model::Repository;
388    /// let x = Repository::new().set_set_authenticated_user_admin(true);
389    /// ```
390    pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
391        self.set_authenticated_user_admin = v.into();
392        self
393    }
394
395    /// Sets the value of [service_account][crate::model::Repository::service_account].
396    ///
397    /// # Example
398    /// ```ignore,no_run
399    /// # use google_cloud_dataform_v1::model::Repository;
400    /// let x = Repository::new().set_service_account("example");
401    /// ```
402    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
403        self.service_account = v.into();
404        self
405    }
406
407    /// Sets the value of [kms_key_name][crate::model::Repository::kms_key_name].
408    ///
409    /// # Example
410    /// ```ignore,no_run
411    /// # use google_cloud_dataform_v1::model::Repository;
412    /// let x = Repository::new().set_kms_key_name("example");
413    /// ```
414    pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
415        self.kms_key_name = v.into();
416        self
417    }
418
419    /// Sets the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
420    ///
421    /// # Example
422    /// ```ignore,no_run
423    /// # use google_cloud_dataform_v1::model::Repository;
424    /// use google_cloud_dataform_v1::model::DataEncryptionState;
425    /// let x = Repository::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
426    /// ```
427    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
428    where
429        T: std::convert::Into<crate::model::DataEncryptionState>,
430    {
431        self.data_encryption_state = std::option::Option::Some(v.into());
432        self
433    }
434
435    /// Sets or clears the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
436    ///
437    /// # Example
438    /// ```ignore,no_run
439    /// # use google_cloud_dataform_v1::model::Repository;
440    /// use google_cloud_dataform_v1::model::DataEncryptionState;
441    /// let x = Repository::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
442    /// let x = Repository::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
443    /// ```
444    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
445    where
446        T: std::convert::Into<crate::model::DataEncryptionState>,
447    {
448        self.data_encryption_state = v.map(|x| x.into());
449        self
450    }
451
452    /// Sets the value of [internal_metadata][crate::model::Repository::internal_metadata].
453    ///
454    /// # Example
455    /// ```ignore,no_run
456    /// # use google_cloud_dataform_v1::model::Repository;
457    /// let x = Repository::new().set_internal_metadata("example");
458    /// ```
459    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
460    where
461        T: std::convert::Into<std::string::String>,
462    {
463        self.internal_metadata = std::option::Option::Some(v.into());
464        self
465    }
466
467    /// Sets or clears the value of [internal_metadata][crate::model::Repository::internal_metadata].
468    ///
469    /// # Example
470    /// ```ignore,no_run
471    /// # use google_cloud_dataform_v1::model::Repository;
472    /// let x = Repository::new().set_or_clear_internal_metadata(Some("example"));
473    /// let x = Repository::new().set_or_clear_internal_metadata(None::<String>);
474    /// ```
475    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
476    where
477        T: std::convert::Into<std::string::String>,
478    {
479        self.internal_metadata = v.map(|x| x.into());
480        self
481    }
482}
483
484impl wkt::message::Message for Repository {
485    fn typename() -> &'static str {
486        "type.googleapis.com/google.cloud.dataform.v1.Repository"
487    }
488}
489
490/// Defines additional types related to [Repository].
491pub mod repository {
492    #[allow(unused_imports)]
493    use super::*;
494
495    /// Controls Git remote configuration for a repository.
496    #[derive(Clone, Default, PartialEq)]
497    #[non_exhaustive]
498    pub struct GitRemoteSettings {
499        /// Required. The Git remote's URL.
500        pub url: std::string::String,
501
502        /// Required. The Git remote's default branch name.
503        pub default_branch: std::string::String,
504
505        /// Optional. The name of the Secret Manager secret version to use as an
506        /// authentication token for Git operations. Must be in the format
507        /// `projects/*/secrets/*/versions/*`.
508        pub authentication_token_secret_version: std::string::String,
509
510        /// Optional. Authentication fields for remote uris using SSH protocol.
511        pub ssh_authentication_config: std::option::Option<
512            crate::model::repository::git_remote_settings::SshAuthenticationConfig,
513        >,
514
515        /// Output only. Deprecated: The field does not contain any token status
516        /// information.
517        #[deprecated]
518        pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
519
520        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
521    }
522
523    impl GitRemoteSettings {
524        /// Creates a new default instance.
525        pub fn new() -> Self {
526            std::default::Default::default()
527        }
528
529        /// Sets the value of [url][crate::model::repository::GitRemoteSettings::url].
530        ///
531        /// # Example
532        /// ```ignore,no_run
533        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
534        /// let x = GitRemoteSettings::new().set_url("example");
535        /// ```
536        pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
537            self.url = v.into();
538            self
539        }
540
541        /// Sets the value of [default_branch][crate::model::repository::GitRemoteSettings::default_branch].
542        ///
543        /// # Example
544        /// ```ignore,no_run
545        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
546        /// let x = GitRemoteSettings::new().set_default_branch("example");
547        /// ```
548        pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
549            mut self,
550            v: T,
551        ) -> Self {
552            self.default_branch = v.into();
553            self
554        }
555
556        /// Sets the value of [authentication_token_secret_version][crate::model::repository::GitRemoteSettings::authentication_token_secret_version].
557        ///
558        /// # Example
559        /// ```ignore,no_run
560        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
561        /// let x = GitRemoteSettings::new().set_authentication_token_secret_version("example");
562        /// ```
563        pub fn set_authentication_token_secret_version<
564            T: std::convert::Into<std::string::String>,
565        >(
566            mut self,
567            v: T,
568        ) -> Self {
569            self.authentication_token_secret_version = v.into();
570            self
571        }
572
573        /// Sets the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
574        ///
575        /// # Example
576        /// ```ignore,no_run
577        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
578        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
579        /// let x = GitRemoteSettings::new().set_ssh_authentication_config(SshAuthenticationConfig::default()/* use setters */);
580        /// ```
581        pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
582        where
583            T: std::convert::Into<
584                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
585                >,
586        {
587            self.ssh_authentication_config = std::option::Option::Some(v.into());
588            self
589        }
590
591        /// Sets or clears the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
592        ///
593        /// # Example
594        /// ```ignore,no_run
595        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
596        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
597        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(Some(SshAuthenticationConfig::default()/* use setters */));
598        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(None::<SshAuthenticationConfig>);
599        /// ```
600        pub fn set_or_clear_ssh_authentication_config<T>(
601            mut self,
602            v: std::option::Option<T>,
603        ) -> Self
604        where
605            T: std::convert::Into<
606                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
607                >,
608        {
609            self.ssh_authentication_config = v.map(|x| x.into());
610            self
611        }
612
613        /// Sets the value of [token_status][crate::model::repository::GitRemoteSettings::token_status].
614        ///
615        /// # Example
616        /// ```ignore,no_run
617        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
618        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::TokenStatus;
619        /// let x0 = GitRemoteSettings::new().set_token_status(TokenStatus::NotFound);
620        /// let x1 = GitRemoteSettings::new().set_token_status(TokenStatus::Invalid);
621        /// let x2 = GitRemoteSettings::new().set_token_status(TokenStatus::Valid);
622        /// ```
623        #[deprecated]
624        pub fn set_token_status<
625            T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
626        >(
627            mut self,
628            v: T,
629        ) -> Self {
630            self.token_status = v.into();
631            self
632        }
633    }
634
635    impl wkt::message::Message for GitRemoteSettings {
636        fn typename() -> &'static str {
637            "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
638        }
639    }
640
641    /// Defines additional types related to [GitRemoteSettings].
642    pub mod git_remote_settings {
643        #[allow(unused_imports)]
644        use super::*;
645
646        /// Configures fields for performing SSH authentication.
647        #[derive(Clone, Default, PartialEq)]
648        #[non_exhaustive]
649        pub struct SshAuthenticationConfig {
650            /// Required. The name of the Secret Manager secret version to use as a
651            /// ssh private key for Git operations.
652            /// Must be in the format `projects/*/secrets/*/versions/*`.
653            pub user_private_key_secret_version: std::string::String,
654
655            /// Required. Content of a public SSH key to verify an identity of a remote
656            /// Git host.
657            pub host_public_key: std::string::String,
658
659            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
660        }
661
662        impl SshAuthenticationConfig {
663            /// Creates a new default instance.
664            pub fn new() -> Self {
665                std::default::Default::default()
666            }
667
668            /// Sets the value of [user_private_key_secret_version][crate::model::repository::git_remote_settings::SshAuthenticationConfig::user_private_key_secret_version].
669            ///
670            /// # Example
671            /// ```ignore,no_run
672            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
673            /// let x = SshAuthenticationConfig::new().set_user_private_key_secret_version("example");
674            /// ```
675            pub fn set_user_private_key_secret_version<
676                T: std::convert::Into<std::string::String>,
677            >(
678                mut self,
679                v: T,
680            ) -> Self {
681                self.user_private_key_secret_version = v.into();
682                self
683            }
684
685            /// Sets the value of [host_public_key][crate::model::repository::git_remote_settings::SshAuthenticationConfig::host_public_key].
686            ///
687            /// # Example
688            /// ```ignore,no_run
689            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
690            /// let x = SshAuthenticationConfig::new().set_host_public_key("example");
691            /// ```
692            pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
693                mut self,
694                v: T,
695            ) -> Self {
696                self.host_public_key = v.into();
697                self
698            }
699        }
700
701        impl wkt::message::Message for SshAuthenticationConfig {
702            fn typename() -> &'static str {
703                "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
704            }
705        }
706
707        /// The status of the authentication token.
708        ///
709        /// # Working with unknown values
710        ///
711        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
712        /// additional enum variants at any time. Adding new variants is not considered
713        /// a breaking change. Applications should write their code in anticipation of:
714        ///
715        /// - New values appearing in future releases of the client library, **and**
716        /// - New values received dynamically, without application changes.
717        ///
718        /// Please consult the [Working with enums] section in the user guide for some
719        /// guidelines.
720        ///
721        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
722        #[derive(Clone, Debug, PartialEq)]
723        #[non_exhaustive]
724        pub enum TokenStatus {
725            /// Default value. This value is unused.
726            Unspecified,
727            /// The token could not be found in Secret Manager (or the Dataform
728            /// Service Account did not have permission to access it).
729            NotFound,
730            /// The token could not be used to authenticate against the Git remote.
731            Invalid,
732            /// The token was used successfully to authenticate against the Git remote.
733            Valid,
734            /// If set, the enum was initialized with an unknown value.
735            ///
736            /// Applications can examine the value using [TokenStatus::value] or
737            /// [TokenStatus::name].
738            UnknownValue(token_status::UnknownValue),
739        }
740
741        #[doc(hidden)]
742        pub mod token_status {
743            #[allow(unused_imports)]
744            use super::*;
745            #[derive(Clone, Debug, PartialEq)]
746            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
747        }
748
749        impl TokenStatus {
750            /// Gets the enum value.
751            ///
752            /// Returns `None` if the enum contains an unknown value deserialized from
753            /// the string representation of enums.
754            pub fn value(&self) -> std::option::Option<i32> {
755                match self {
756                    Self::Unspecified => std::option::Option::Some(0),
757                    Self::NotFound => std::option::Option::Some(1),
758                    Self::Invalid => std::option::Option::Some(2),
759                    Self::Valid => std::option::Option::Some(3),
760                    Self::UnknownValue(u) => u.0.value(),
761                }
762            }
763
764            /// Gets the enum value as a string.
765            ///
766            /// Returns `None` if the enum contains an unknown value deserialized from
767            /// the integer representation of enums.
768            pub fn name(&self) -> std::option::Option<&str> {
769                match self {
770                    Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
771                    Self::NotFound => std::option::Option::Some("NOT_FOUND"),
772                    Self::Invalid => std::option::Option::Some("INVALID"),
773                    Self::Valid => std::option::Option::Some("VALID"),
774                    Self::UnknownValue(u) => u.0.name(),
775                }
776            }
777        }
778
779        impl std::default::Default for TokenStatus {
780            fn default() -> Self {
781                use std::convert::From;
782                Self::from(0)
783            }
784        }
785
786        impl std::fmt::Display for TokenStatus {
787            fn fmt(
788                &self,
789                f: &mut std::fmt::Formatter<'_>,
790            ) -> std::result::Result<(), std::fmt::Error> {
791                wkt::internal::display_enum(f, self.name(), self.value())
792            }
793        }
794
795        impl std::convert::From<i32> for TokenStatus {
796            fn from(value: i32) -> Self {
797                match value {
798                    0 => Self::Unspecified,
799                    1 => Self::NotFound,
800                    2 => Self::Invalid,
801                    3 => Self::Valid,
802                    _ => Self::UnknownValue(token_status::UnknownValue(
803                        wkt::internal::UnknownEnumValue::Integer(value),
804                    )),
805                }
806            }
807        }
808
809        impl std::convert::From<&str> for TokenStatus {
810            fn from(value: &str) -> Self {
811                use std::string::ToString;
812                match value {
813                    "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
814                    "NOT_FOUND" => Self::NotFound,
815                    "INVALID" => Self::Invalid,
816                    "VALID" => Self::Valid,
817                    _ => Self::UnknownValue(token_status::UnknownValue(
818                        wkt::internal::UnknownEnumValue::String(value.to_string()),
819                    )),
820                }
821            }
822        }
823
824        impl serde::ser::Serialize for TokenStatus {
825            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
826            where
827                S: serde::Serializer,
828            {
829                match self {
830                    Self::Unspecified => serializer.serialize_i32(0),
831                    Self::NotFound => serializer.serialize_i32(1),
832                    Self::Invalid => serializer.serialize_i32(2),
833                    Self::Valid => serializer.serialize_i32(3),
834                    Self::UnknownValue(u) => u.0.serialize(serializer),
835                }
836            }
837        }
838
839        impl<'de> serde::de::Deserialize<'de> for TokenStatus {
840            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
841            where
842                D: serde::Deserializer<'de>,
843            {
844                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
845                    ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
846                ))
847            }
848        }
849    }
850
851    /// Configures workspace compilation overrides for a repository.
852    #[derive(Clone, Default, PartialEq)]
853    #[non_exhaustive]
854    pub struct WorkspaceCompilationOverrides {
855        /// Optional. The default database (Google Cloud project ID).
856        pub default_database: std::string::String,
857
858        /// Optional. The suffix that should be appended to all schema (BigQuery
859        /// dataset ID) names.
860        pub schema_suffix: std::string::String,
861
862        /// Optional. The prefix that should be prepended to all table names.
863        pub table_prefix: std::string::String,
864
865        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
866    }
867
868    impl WorkspaceCompilationOverrides {
869        /// Creates a new default instance.
870        pub fn new() -> Self {
871            std::default::Default::default()
872        }
873
874        /// Sets the value of [default_database][crate::model::repository::WorkspaceCompilationOverrides::default_database].
875        ///
876        /// # Example
877        /// ```ignore,no_run
878        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
879        /// let x = WorkspaceCompilationOverrides::new().set_default_database("example");
880        /// ```
881        pub fn set_default_database<T: std::convert::Into<std::string::String>>(
882            mut self,
883            v: T,
884        ) -> Self {
885            self.default_database = v.into();
886            self
887        }
888
889        /// Sets the value of [schema_suffix][crate::model::repository::WorkspaceCompilationOverrides::schema_suffix].
890        ///
891        /// # Example
892        /// ```ignore,no_run
893        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
894        /// let x = WorkspaceCompilationOverrides::new().set_schema_suffix("example");
895        /// ```
896        pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
897            mut self,
898            v: T,
899        ) -> Self {
900            self.schema_suffix = v.into();
901            self
902        }
903
904        /// Sets the value of [table_prefix][crate::model::repository::WorkspaceCompilationOverrides::table_prefix].
905        ///
906        /// # Example
907        /// ```ignore,no_run
908        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
909        /// let x = WorkspaceCompilationOverrides::new().set_table_prefix("example");
910        /// ```
911        pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
912            mut self,
913            v: T,
914        ) -> Self {
915            self.table_prefix = v.into();
916            self
917        }
918    }
919
920    impl wkt::message::Message for WorkspaceCompilationOverrides {
921        fn typename() -> &'static str {
922            "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
923        }
924    }
925}
926
927/// Metadata used to identify if a resource is user scoped.
928#[derive(Clone, Default, PartialEq)]
929#[non_exhaustive]
930pub struct PrivateResourceMetadata {
931    /// Output only. If true, this resource is user-scoped, meaning it is either a
932    /// workspace or sourced from a workspace.
933    pub user_scoped: bool,
934
935    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
936}
937
938impl PrivateResourceMetadata {
939    /// Creates a new default instance.
940    pub fn new() -> Self {
941        std::default::Default::default()
942    }
943
944    /// Sets the value of [user_scoped][crate::model::PrivateResourceMetadata::user_scoped].
945    ///
946    /// # Example
947    /// ```ignore,no_run
948    /// # use google_cloud_dataform_v1::model::PrivateResourceMetadata;
949    /// let x = PrivateResourceMetadata::new().set_user_scoped(true);
950    /// ```
951    pub fn set_user_scoped<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
952        self.user_scoped = v.into();
953        self
954    }
955}
956
957impl wkt::message::Message for PrivateResourceMetadata {
958    fn typename() -> &'static str {
959        "type.googleapis.com/google.cloud.dataform.v1.PrivateResourceMetadata"
960    }
961}
962
963/// `ListRepositories` request message.
964#[derive(Clone, Default, PartialEq)]
965#[non_exhaustive]
966pub struct ListRepositoriesRequest {
967    /// Required. The location in which to list repositories. Must be in the format
968    /// `projects/*/locations/*`.
969    pub parent: std::string::String,
970
971    /// Optional. Maximum number of repositories to return. The server may return
972    /// fewer items than requested. If unspecified, the server will pick an
973    /// appropriate default.
974    pub page_size: i32,
975
976    /// Optional. Page token received from a previous `ListRepositories` call.
977    /// Provide this to retrieve the subsequent page.
978    ///
979    /// When paginating, all other parameters provided to `ListRepositories`,
980    /// with the exception of `page_size`, must match the call that provided the
981    /// page token.
982    pub page_token: std::string::String,
983
984    /// Optional. This field only supports ordering by `name`. If unspecified, the
985    /// server will choose the ordering. If specified, the default order is
986    /// ascending for the `name` field.
987    pub order_by: std::string::String,
988
989    /// Optional. Filter for the returned list.
990    pub filter: std::string::String,
991
992    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
993}
994
995impl ListRepositoriesRequest {
996    /// Creates a new default instance.
997    pub fn new() -> Self {
998        std::default::Default::default()
999    }
1000
1001    /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
1002    ///
1003    /// # Example
1004    /// ```ignore,no_run
1005    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1006    /// let x = ListRepositoriesRequest::new().set_parent("example");
1007    /// ```
1008    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1009        self.parent = v.into();
1010        self
1011    }
1012
1013    /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
1014    ///
1015    /// # Example
1016    /// ```ignore,no_run
1017    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1018    /// let x = ListRepositoriesRequest::new().set_page_size(42);
1019    /// ```
1020    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1021        self.page_size = v.into();
1022        self
1023    }
1024
1025    /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
1026    ///
1027    /// # Example
1028    /// ```ignore,no_run
1029    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1030    /// let x = ListRepositoriesRequest::new().set_page_token("example");
1031    /// ```
1032    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1033        self.page_token = v.into();
1034        self
1035    }
1036
1037    /// Sets the value of [order_by][crate::model::ListRepositoriesRequest::order_by].
1038    ///
1039    /// # Example
1040    /// ```ignore,no_run
1041    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1042    /// let x = ListRepositoriesRequest::new().set_order_by("example");
1043    /// ```
1044    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1045        self.order_by = v.into();
1046        self
1047    }
1048
1049    /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
1050    ///
1051    /// # Example
1052    /// ```ignore,no_run
1053    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1054    /// let x = ListRepositoriesRequest::new().set_filter("example");
1055    /// ```
1056    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1057        self.filter = v.into();
1058        self
1059    }
1060}
1061
1062impl wkt::message::Message for ListRepositoriesRequest {
1063    fn typename() -> &'static str {
1064        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
1065    }
1066}
1067
1068/// `ListRepositories` response message.
1069#[derive(Clone, Default, PartialEq)]
1070#[non_exhaustive]
1071pub struct ListRepositoriesResponse {
1072    /// List of repositories.
1073    pub repositories: std::vec::Vec<crate::model::Repository>,
1074
1075    /// A token which can be sent as `page_token` to retrieve the next page.
1076    /// If this field is omitted, there are no subsequent pages.
1077    pub next_page_token: std::string::String,
1078
1079    /// Locations which could not be reached.
1080    pub unreachable: std::vec::Vec<std::string::String>,
1081
1082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1083}
1084
1085impl ListRepositoriesResponse {
1086    /// Creates a new default instance.
1087    pub fn new() -> Self {
1088        std::default::Default::default()
1089    }
1090
1091    /// Sets the value of [repositories][crate::model::ListRepositoriesResponse::repositories].
1092    ///
1093    /// # Example
1094    /// ```ignore,no_run
1095    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1096    /// use google_cloud_dataform_v1::model::Repository;
1097    /// let x = ListRepositoriesResponse::new()
1098    ///     .set_repositories([
1099    ///         Repository::default()/* use setters */,
1100    ///         Repository::default()/* use (different) setters */,
1101    ///     ]);
1102    /// ```
1103    pub fn set_repositories<T, V>(mut self, v: T) -> Self
1104    where
1105        T: std::iter::IntoIterator<Item = V>,
1106        V: std::convert::Into<crate::model::Repository>,
1107    {
1108        use std::iter::Iterator;
1109        self.repositories = v.into_iter().map(|i| i.into()).collect();
1110        self
1111    }
1112
1113    /// Sets the value of [next_page_token][crate::model::ListRepositoriesResponse::next_page_token].
1114    ///
1115    /// # Example
1116    /// ```ignore,no_run
1117    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1118    /// let x = ListRepositoriesResponse::new().set_next_page_token("example");
1119    /// ```
1120    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1121        self.next_page_token = v.into();
1122        self
1123    }
1124
1125    /// Sets the value of [unreachable][crate::model::ListRepositoriesResponse::unreachable].
1126    ///
1127    /// # Example
1128    /// ```ignore,no_run
1129    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1130    /// let x = ListRepositoriesResponse::new().set_unreachable(["a", "b", "c"]);
1131    /// ```
1132    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1133    where
1134        T: std::iter::IntoIterator<Item = V>,
1135        V: std::convert::Into<std::string::String>,
1136    {
1137        use std::iter::Iterator;
1138        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1139        self
1140    }
1141}
1142
1143impl wkt::message::Message for ListRepositoriesResponse {
1144    fn typename() -> &'static str {
1145        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
1146    }
1147}
1148
1149#[doc(hidden)]
1150impl google_cloud_gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
1151    type PageItem = crate::model::Repository;
1152
1153    fn items(self) -> std::vec::Vec<Self::PageItem> {
1154        self.repositories
1155    }
1156
1157    fn next_page_token(&self) -> std::string::String {
1158        use std::clone::Clone;
1159        self.next_page_token.clone()
1160    }
1161}
1162
1163/// `MoveRepository` request message.
1164#[derive(Clone, Default, PartialEq)]
1165#[non_exhaustive]
1166pub struct MoveRepositoryRequest {
1167    /// Required. The full resource name of the repository to move.
1168    pub name: std::string::String,
1169
1170    /// Optional. The name of the Folder, TeamFolder, or root location to move the
1171    /// repository to. Can be in the format of: "" to move into the root User
1172    /// folder, `projects/*/locations/*/folders/*`,
1173    /// `projects/*/locations/*/teamFolders/*`
1174    pub destination_containing_folder: std::option::Option<std::string::String>,
1175
1176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1177}
1178
1179impl MoveRepositoryRequest {
1180    /// Creates a new default instance.
1181    pub fn new() -> Self {
1182        std::default::Default::default()
1183    }
1184
1185    /// Sets the value of [name][crate::model::MoveRepositoryRequest::name].
1186    ///
1187    /// # Example
1188    /// ```ignore,no_run
1189    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1190    /// let x = MoveRepositoryRequest::new().set_name("example");
1191    /// ```
1192    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1193        self.name = v.into();
1194        self
1195    }
1196
1197    /// Sets the value of [destination_containing_folder][crate::model::MoveRepositoryRequest::destination_containing_folder].
1198    ///
1199    /// # Example
1200    /// ```ignore,no_run
1201    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1202    /// let x = MoveRepositoryRequest::new().set_destination_containing_folder("example");
1203    /// ```
1204    pub fn set_destination_containing_folder<T>(mut self, v: T) -> Self
1205    where
1206        T: std::convert::Into<std::string::String>,
1207    {
1208        self.destination_containing_folder = std::option::Option::Some(v.into());
1209        self
1210    }
1211
1212    /// Sets or clears the value of [destination_containing_folder][crate::model::MoveRepositoryRequest::destination_containing_folder].
1213    ///
1214    /// # Example
1215    /// ```ignore,no_run
1216    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1217    /// let x = MoveRepositoryRequest::new().set_or_clear_destination_containing_folder(Some("example"));
1218    /// let x = MoveRepositoryRequest::new().set_or_clear_destination_containing_folder(None::<String>);
1219    /// ```
1220    pub fn set_or_clear_destination_containing_folder<T>(
1221        mut self,
1222        v: std::option::Option<T>,
1223    ) -> Self
1224    where
1225        T: std::convert::Into<std::string::String>,
1226    {
1227        self.destination_containing_folder = v.map(|x| x.into());
1228        self
1229    }
1230}
1231
1232impl wkt::message::Message for MoveRepositoryRequest {
1233    fn typename() -> &'static str {
1234        "type.googleapis.com/google.cloud.dataform.v1.MoveRepositoryRequest"
1235    }
1236}
1237
1238/// `GetRepository` request message.
1239#[derive(Clone, Default, PartialEq)]
1240#[non_exhaustive]
1241pub struct GetRepositoryRequest {
1242    /// Required. The repository's name.
1243    pub name: std::string::String,
1244
1245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1246}
1247
1248impl GetRepositoryRequest {
1249    /// Creates a new default instance.
1250    pub fn new() -> Self {
1251        std::default::Default::default()
1252    }
1253
1254    /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
1255    ///
1256    /// # Example
1257    /// ```ignore,no_run
1258    /// # use google_cloud_dataform_v1::model::GetRepositoryRequest;
1259    /// let x = GetRepositoryRequest::new().set_name("example");
1260    /// ```
1261    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1262        self.name = v.into();
1263        self
1264    }
1265}
1266
1267impl wkt::message::Message for GetRepositoryRequest {
1268    fn typename() -> &'static str {
1269        "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
1270    }
1271}
1272
1273/// `CreateRepository` request message.
1274#[derive(Clone, Default, PartialEq)]
1275#[non_exhaustive]
1276pub struct CreateRepositoryRequest {
1277    /// Required. The location in which to create the repository. Must be in the
1278    /// format `projects/*/locations/*`.
1279    pub parent: std::string::String,
1280
1281    /// Required. The repository to create.
1282    pub repository: std::option::Option<crate::model::Repository>,
1283
1284    /// Required. The ID to use for the repository, which will become the final
1285    /// component of the repository's resource name.
1286    pub repository_id: std::string::String,
1287
1288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1289}
1290
1291impl CreateRepositoryRequest {
1292    /// Creates a new default instance.
1293    pub fn new() -> Self {
1294        std::default::Default::default()
1295    }
1296
1297    /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
1298    ///
1299    /// # Example
1300    /// ```ignore,no_run
1301    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1302    /// let x = CreateRepositoryRequest::new().set_parent("example");
1303    /// ```
1304    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1305        self.parent = v.into();
1306        self
1307    }
1308
1309    /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
1310    ///
1311    /// # Example
1312    /// ```ignore,no_run
1313    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1314    /// use google_cloud_dataform_v1::model::Repository;
1315    /// let x = CreateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1316    /// ```
1317    pub fn set_repository<T>(mut self, v: T) -> Self
1318    where
1319        T: std::convert::Into<crate::model::Repository>,
1320    {
1321        self.repository = std::option::Option::Some(v.into());
1322        self
1323    }
1324
1325    /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
1326    ///
1327    /// # Example
1328    /// ```ignore,no_run
1329    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1330    /// use google_cloud_dataform_v1::model::Repository;
1331    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1332    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1333    /// ```
1334    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1335    where
1336        T: std::convert::Into<crate::model::Repository>,
1337    {
1338        self.repository = v.map(|x| x.into());
1339        self
1340    }
1341
1342    /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
1343    ///
1344    /// # Example
1345    /// ```ignore,no_run
1346    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1347    /// let x = CreateRepositoryRequest::new().set_repository_id("example");
1348    /// ```
1349    pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1350        self.repository_id = v.into();
1351        self
1352    }
1353}
1354
1355impl wkt::message::Message for CreateRepositoryRequest {
1356    fn typename() -> &'static str {
1357        "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
1358    }
1359}
1360
1361/// `UpdateRepository` request message.
1362#[derive(Clone, Default, PartialEq)]
1363#[non_exhaustive]
1364pub struct UpdateRepositoryRequest {
1365    /// Optional. Specifies the fields to be updated in the repository. If left
1366    /// unset, all fields will be updated.
1367    pub update_mask: std::option::Option<wkt::FieldMask>,
1368
1369    /// Required. The repository to update.
1370    pub repository: std::option::Option<crate::model::Repository>,
1371
1372    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1373}
1374
1375impl UpdateRepositoryRequest {
1376    /// Creates a new default instance.
1377    pub fn new() -> Self {
1378        std::default::Default::default()
1379    }
1380
1381    /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1382    ///
1383    /// # Example
1384    /// ```ignore,no_run
1385    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1386    /// use wkt::FieldMask;
1387    /// let x = UpdateRepositoryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1388    /// ```
1389    pub fn set_update_mask<T>(mut self, v: T) -> Self
1390    where
1391        T: std::convert::Into<wkt::FieldMask>,
1392    {
1393        self.update_mask = std::option::Option::Some(v.into());
1394        self
1395    }
1396
1397    /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1398    ///
1399    /// # Example
1400    /// ```ignore,no_run
1401    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1402    /// use wkt::FieldMask;
1403    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1404    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1405    /// ```
1406    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1407    where
1408        T: std::convert::Into<wkt::FieldMask>,
1409    {
1410        self.update_mask = v.map(|x| x.into());
1411        self
1412    }
1413
1414    /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1415    ///
1416    /// # Example
1417    /// ```ignore,no_run
1418    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1419    /// use google_cloud_dataform_v1::model::Repository;
1420    /// let x = UpdateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1421    /// ```
1422    pub fn set_repository<T>(mut self, v: T) -> Self
1423    where
1424        T: std::convert::Into<crate::model::Repository>,
1425    {
1426        self.repository = std::option::Option::Some(v.into());
1427        self
1428    }
1429
1430    /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1431    ///
1432    /// # Example
1433    /// ```ignore,no_run
1434    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1435    /// use google_cloud_dataform_v1::model::Repository;
1436    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1437    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1438    /// ```
1439    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1440    where
1441        T: std::convert::Into<crate::model::Repository>,
1442    {
1443        self.repository = v.map(|x| x.into());
1444        self
1445    }
1446}
1447
1448impl wkt::message::Message for UpdateRepositoryRequest {
1449    fn typename() -> &'static str {
1450        "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
1451    }
1452}
1453
1454/// `DeleteRepository` request message.
1455#[derive(Clone, Default, PartialEq)]
1456#[non_exhaustive]
1457pub struct DeleteRepositoryRequest {
1458    /// Required. The repository's name.
1459    pub name: std::string::String,
1460
1461    /// Optional. If set to true, child resources of this repository (compilation
1462    /// results and workflow invocations) will also be deleted. Otherwise, the
1463    /// request will only succeed if the repository has no child resources.
1464    ///
1465    /// **Note:** *This flag doesn't support deletion of workspaces, release
1466    /// configs or workflow configs. If any of such resources exists in the
1467    /// repository, the request will fail.*.
1468    pub force: bool,
1469
1470    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1471}
1472
1473impl DeleteRepositoryRequest {
1474    /// Creates a new default instance.
1475    pub fn new() -> Self {
1476        std::default::Default::default()
1477    }
1478
1479    /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
1480    ///
1481    /// # Example
1482    /// ```ignore,no_run
1483    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1484    /// let x = DeleteRepositoryRequest::new().set_name("example");
1485    /// ```
1486    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1487        self.name = v.into();
1488        self
1489    }
1490
1491    /// Sets the value of [force][crate::model::DeleteRepositoryRequest::force].
1492    ///
1493    /// # Example
1494    /// ```ignore,no_run
1495    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1496    /// let x = DeleteRepositoryRequest::new().set_force(true);
1497    /// ```
1498    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1499        self.force = v.into();
1500        self
1501    }
1502}
1503
1504impl wkt::message::Message for DeleteRepositoryRequest {
1505    fn typename() -> &'static str {
1506        "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
1507    }
1508}
1509
1510/// `CommitRepositoryChanges` request message.
1511#[derive(Clone, Default, PartialEq)]
1512#[non_exhaustive]
1513pub struct CommitRepositoryChangesRequest {
1514    /// Required. The repository's name.
1515    pub name: std::string::String,
1516
1517    /// Required. The changes to commit to the repository.
1518    pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
1519
1520    /// Optional. The commit SHA which must be the repository's current HEAD before
1521    /// applying this commit; otherwise this request will fail. If unset, no
1522    /// validation on the current HEAD commit SHA is performed.
1523    pub required_head_commit_sha: std::string::String,
1524
1525    /// Optional. A map to the path of the file to the operation. The path is the
1526    /// full file path including filename, from repository root.
1527    pub file_operations: std::collections::HashMap<
1528        std::string::String,
1529        crate::model::commit_repository_changes_request::FileOperation,
1530    >,
1531
1532    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1533}
1534
1535impl CommitRepositoryChangesRequest {
1536    /// Creates a new default instance.
1537    pub fn new() -> Self {
1538        std::default::Default::default()
1539    }
1540
1541    /// Sets the value of [name][crate::model::CommitRepositoryChangesRequest::name].
1542    ///
1543    /// # Example
1544    /// ```ignore,no_run
1545    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1546    /// let x = CommitRepositoryChangesRequest::new().set_name("example");
1547    /// ```
1548    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1549        self.name = v.into();
1550        self
1551    }
1552
1553    /// Sets the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1554    ///
1555    /// # Example
1556    /// ```ignore,no_run
1557    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1558    /// use google_cloud_dataform_v1::model::CommitMetadata;
1559    /// let x = CommitRepositoryChangesRequest::new().set_commit_metadata(CommitMetadata::default()/* use setters */);
1560    /// ```
1561    pub fn set_commit_metadata<T>(mut self, v: T) -> Self
1562    where
1563        T: std::convert::Into<crate::model::CommitMetadata>,
1564    {
1565        self.commit_metadata = std::option::Option::Some(v.into());
1566        self
1567    }
1568
1569    /// Sets or clears the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1570    ///
1571    /// # Example
1572    /// ```ignore,no_run
1573    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1574    /// use google_cloud_dataform_v1::model::CommitMetadata;
1575    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(Some(CommitMetadata::default()/* use setters */));
1576    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(None::<CommitMetadata>);
1577    /// ```
1578    pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
1579    where
1580        T: std::convert::Into<crate::model::CommitMetadata>,
1581    {
1582        self.commit_metadata = v.map(|x| x.into());
1583        self
1584    }
1585
1586    /// Sets the value of [required_head_commit_sha][crate::model::CommitRepositoryChangesRequest::required_head_commit_sha].
1587    ///
1588    /// # Example
1589    /// ```ignore,no_run
1590    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1591    /// let x = CommitRepositoryChangesRequest::new().set_required_head_commit_sha("example");
1592    /// ```
1593    pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
1594        mut self,
1595        v: T,
1596    ) -> Self {
1597        self.required_head_commit_sha = v.into();
1598        self
1599    }
1600
1601    /// Sets the value of [file_operations][crate::model::CommitRepositoryChangesRequest::file_operations].
1602    ///
1603    /// # Example
1604    /// ```ignore,no_run
1605    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1606    /// use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1607    /// let x = CommitRepositoryChangesRequest::new().set_file_operations([
1608    ///     ("key0", FileOperation::default()/* use setters */),
1609    ///     ("key1", FileOperation::default()/* use (different) setters */),
1610    /// ]);
1611    /// ```
1612    pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
1613    where
1614        T: std::iter::IntoIterator<Item = (K, V)>,
1615        K: std::convert::Into<std::string::String>,
1616        V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
1617    {
1618        use std::iter::Iterator;
1619        self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1620        self
1621    }
1622}
1623
1624impl wkt::message::Message for CommitRepositoryChangesRequest {
1625    fn typename() -> &'static str {
1626        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
1627    }
1628}
1629
1630/// Defines additional types related to [CommitRepositoryChangesRequest].
1631pub mod commit_repository_changes_request {
1632    #[allow(unused_imports)]
1633    use super::*;
1634
1635    /// Represents a single file operation to the repository.
1636    #[derive(Clone, Default, PartialEq)]
1637    #[non_exhaustive]
1638    pub struct FileOperation {
1639        /// The operation to perform on the file.
1640        pub operation: std::option::Option<
1641            crate::model::commit_repository_changes_request::file_operation::Operation,
1642        >,
1643
1644        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1645    }
1646
1647    impl FileOperation {
1648        /// Creates a new default instance.
1649        pub fn new() -> Self {
1650            std::default::Default::default()
1651        }
1652
1653        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation].
1654        ///
1655        /// Note that all the setters affecting `operation` are mutually
1656        /// exclusive.
1657        ///
1658        /// # Example
1659        /// ```ignore,no_run
1660        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1661        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1662        /// let x = FileOperation::new().set_operation(Some(
1663        ///     google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::Operation::WriteFile(WriteFile::default().into())));
1664        /// ```
1665        pub fn set_operation<
1666            T: std::convert::Into<
1667                    std::option::Option<
1668                        crate::model::commit_repository_changes_request::file_operation::Operation,
1669                    >,
1670                >,
1671        >(
1672            mut self,
1673            v: T,
1674        ) -> Self {
1675            self.operation = v.into();
1676            self
1677        }
1678
1679        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1680        /// if it holds a `WriteFile`, `None` if the field is not set or
1681        /// holds a different branch.
1682        pub fn write_file(
1683            &self,
1684        ) -> std::option::Option<
1685            &std::boxed::Box<
1686                crate::model::commit_repository_changes_request::file_operation::WriteFile,
1687            >,
1688        > {
1689            #[allow(unreachable_patterns)]
1690            self.operation.as_ref().and_then(|v| match v {
1691                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
1692                _ => std::option::Option::None,
1693            })
1694        }
1695
1696        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1697        /// to hold a `WriteFile`.
1698        ///
1699        /// Note that all the setters affecting `operation` are
1700        /// mutually exclusive.
1701        ///
1702        /// # Example
1703        /// ```ignore,no_run
1704        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1705        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1706        /// let x = FileOperation::new().set_write_file(WriteFile::default()/* use setters */);
1707        /// assert!(x.write_file().is_some());
1708        /// assert!(x.delete_file().is_none());
1709        /// ```
1710        pub fn set_write_file<
1711            T: std::convert::Into<
1712                    std::boxed::Box<
1713                        crate::model::commit_repository_changes_request::file_operation::WriteFile,
1714                    >,
1715                >,
1716        >(
1717            mut self,
1718            v: T,
1719        ) -> Self {
1720            self.operation = std::option::Option::Some(
1721                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
1722                    v.into()
1723                )
1724            );
1725            self
1726        }
1727
1728        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1729        /// if it holds a `DeleteFile`, `None` if the field is not set or
1730        /// holds a different branch.
1731        pub fn delete_file(
1732            &self,
1733        ) -> std::option::Option<
1734            &std::boxed::Box<
1735                crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1736            >,
1737        > {
1738            #[allow(unreachable_patterns)]
1739            self.operation.as_ref().and_then(|v| match v {
1740                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
1741                _ => std::option::Option::None,
1742            })
1743        }
1744
1745        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1746        /// to hold a `DeleteFile`.
1747        ///
1748        /// Note that all the setters affecting `operation` are
1749        /// mutually exclusive.
1750        ///
1751        /// # Example
1752        /// ```ignore,no_run
1753        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1754        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::DeleteFile;
1755        /// let x = FileOperation::new().set_delete_file(DeleteFile::default()/* use setters */);
1756        /// assert!(x.delete_file().is_some());
1757        /// assert!(x.write_file().is_none());
1758        /// ```
1759        pub fn set_delete_file<
1760            T: std::convert::Into<
1761                    std::boxed::Box<
1762                        crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1763                    >,
1764                >,
1765        >(
1766            mut self,
1767            v: T,
1768        ) -> Self {
1769            self.operation = std::option::Option::Some(
1770                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
1771                    v.into()
1772                )
1773            );
1774            self
1775        }
1776    }
1777
1778    impl wkt::message::Message for FileOperation {
1779        fn typename() -> &'static str {
1780            "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
1781        }
1782    }
1783
1784    /// Defines additional types related to [FileOperation].
1785    pub mod file_operation {
1786        #[allow(unused_imports)]
1787        use super::*;
1788
1789        /// Represents the write file operation (for files added or modified).
1790        #[derive(Clone, Default, PartialEq)]
1791        #[non_exhaustive]
1792        pub struct WriteFile {
1793            /// The file's contents.
1794            pub contents: ::bytes::Bytes,
1795
1796            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1797        }
1798
1799        impl WriteFile {
1800            /// Creates a new default instance.
1801            pub fn new() -> Self {
1802                std::default::Default::default()
1803            }
1804
1805            /// Sets the value of [contents][crate::model::commit_repository_changes_request::file_operation::WriteFile::contents].
1806            ///
1807            /// # Example
1808            /// ```ignore,no_run
1809            /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1810            /// let x = WriteFile::new().set_contents(bytes::Bytes::from_static(b"example"));
1811            /// ```
1812            pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1813                self.contents = v.into();
1814                self
1815            }
1816        }
1817
1818        impl wkt::message::Message for WriteFile {
1819            fn typename() -> &'static str {
1820                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
1821            }
1822        }
1823
1824        /// Represents the delete file operation.
1825        #[derive(Clone, Default, PartialEq)]
1826        #[non_exhaustive]
1827        pub struct DeleteFile {
1828            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1829        }
1830
1831        impl DeleteFile {
1832            /// Creates a new default instance.
1833            pub fn new() -> Self {
1834                std::default::Default::default()
1835            }
1836        }
1837
1838        impl wkt::message::Message for DeleteFile {
1839            fn typename() -> &'static str {
1840                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
1841            }
1842        }
1843
1844        /// The operation to perform on the file.
1845        #[derive(Clone, Debug, PartialEq)]
1846        #[non_exhaustive]
1847        pub enum Operation {
1848            /// Represents the write operation.
1849            WriteFile(
1850                std::boxed::Box<
1851                    crate::model::commit_repository_changes_request::file_operation::WriteFile,
1852                >,
1853            ),
1854            /// Represents the delete operation.
1855            DeleteFile(
1856                std::boxed::Box<
1857                    crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1858                >,
1859            ),
1860        }
1861    }
1862}
1863
1864/// `CommitRepositoryChanges` response message.
1865#[derive(Clone, Default, PartialEq)]
1866#[non_exhaustive]
1867pub struct CommitRepositoryChangesResponse {
1868    /// The commit SHA of the current commit.
1869    pub commit_sha: std::string::String,
1870
1871    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1872}
1873
1874impl CommitRepositoryChangesResponse {
1875    /// Creates a new default instance.
1876    pub fn new() -> Self {
1877        std::default::Default::default()
1878    }
1879
1880    /// Sets the value of [commit_sha][crate::model::CommitRepositoryChangesResponse::commit_sha].
1881    ///
1882    /// # Example
1883    /// ```ignore,no_run
1884    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesResponse;
1885    /// let x = CommitRepositoryChangesResponse::new().set_commit_sha("example");
1886    /// ```
1887    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1888        self.commit_sha = v.into();
1889        self
1890    }
1891}
1892
1893impl wkt::message::Message for CommitRepositoryChangesResponse {
1894    fn typename() -> &'static str {
1895        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
1896    }
1897}
1898
1899/// `ReadRepositoryFile` request message.
1900#[derive(Clone, Default, PartialEq)]
1901#[non_exhaustive]
1902pub struct ReadRepositoryFileRequest {
1903    /// Required. The repository's name.
1904    pub name: std::string::String,
1905
1906    /// Optional. The commit SHA for the commit to read from. If unset, the file
1907    /// will be read from HEAD.
1908    pub commit_sha: std::string::String,
1909
1910    /// Required. Full file path to read including filename, from repository root.
1911    pub path: std::string::String,
1912
1913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1914}
1915
1916impl ReadRepositoryFileRequest {
1917    /// Creates a new default instance.
1918    pub fn new() -> Self {
1919        std::default::Default::default()
1920    }
1921
1922    /// Sets the value of [name][crate::model::ReadRepositoryFileRequest::name].
1923    ///
1924    /// # Example
1925    /// ```ignore,no_run
1926    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1927    /// let x = ReadRepositoryFileRequest::new().set_name("example");
1928    /// ```
1929    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1930        self.name = v.into();
1931        self
1932    }
1933
1934    /// Sets the value of [commit_sha][crate::model::ReadRepositoryFileRequest::commit_sha].
1935    ///
1936    /// # Example
1937    /// ```ignore,no_run
1938    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1939    /// let x = ReadRepositoryFileRequest::new().set_commit_sha("example");
1940    /// ```
1941    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1942        self.commit_sha = v.into();
1943        self
1944    }
1945
1946    /// Sets the value of [path][crate::model::ReadRepositoryFileRequest::path].
1947    ///
1948    /// # Example
1949    /// ```ignore,no_run
1950    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1951    /// let x = ReadRepositoryFileRequest::new().set_path("example");
1952    /// ```
1953    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1954        self.path = v.into();
1955        self
1956    }
1957}
1958
1959impl wkt::message::Message for ReadRepositoryFileRequest {
1960    fn typename() -> &'static str {
1961        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
1962    }
1963}
1964
1965/// `ReadRepositoryFile` response message.
1966#[derive(Clone, Default, PartialEq)]
1967#[non_exhaustive]
1968pub struct ReadRepositoryFileResponse {
1969    /// The file's contents.
1970    pub contents: ::bytes::Bytes,
1971
1972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1973}
1974
1975impl ReadRepositoryFileResponse {
1976    /// Creates a new default instance.
1977    pub fn new() -> Self {
1978        std::default::Default::default()
1979    }
1980
1981    /// Sets the value of [contents][crate::model::ReadRepositoryFileResponse::contents].
1982    ///
1983    /// # Example
1984    /// ```ignore,no_run
1985    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileResponse;
1986    /// let x = ReadRepositoryFileResponse::new().set_contents(bytes::Bytes::from_static(b"example"));
1987    /// ```
1988    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1989        self.contents = v.into();
1990        self
1991    }
1992}
1993
1994impl wkt::message::Message for ReadRepositoryFileResponse {
1995    fn typename() -> &'static str {
1996        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
1997    }
1998}
1999
2000/// `QueryRepositoryDirectoryContents` request message.
2001#[derive(Clone, Default, PartialEq)]
2002#[non_exhaustive]
2003pub struct QueryRepositoryDirectoryContentsRequest {
2004    /// Required. The repository's name.
2005    pub name: std::string::String,
2006
2007    /// Optional. The Commit SHA for the commit to query from. If unset, the
2008    /// directory will be queried from HEAD.
2009    pub commit_sha: std::string::String,
2010
2011    /// Optional. The directory's full path including directory name, relative to
2012    /// root. If left unset, the root is used.
2013    pub path: std::string::String,
2014
2015    /// Optional. Maximum number of paths to return. The server may return fewer
2016    /// items than requested. If unspecified, the server will pick an appropriate
2017    /// default.
2018    pub page_size: i32,
2019
2020    /// Optional. Page token received from a previous
2021    /// `QueryRepositoryDirectoryContents` call. Provide this to retrieve the
2022    /// subsequent page.
2023    ///
2024    /// When paginating, all other parameters provided to
2025    /// `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must
2026    /// match the call that provided the page token.
2027    pub page_token: std::string::String,
2028
2029    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2030}
2031
2032impl QueryRepositoryDirectoryContentsRequest {
2033    /// Creates a new default instance.
2034    pub fn new() -> Self {
2035        std::default::Default::default()
2036    }
2037
2038    /// Sets the value of [name][crate::model::QueryRepositoryDirectoryContentsRequest::name].
2039    ///
2040    /// # Example
2041    /// ```ignore,no_run
2042    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2043    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_name("example");
2044    /// ```
2045    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2046        self.name = v.into();
2047        self
2048    }
2049
2050    /// Sets the value of [commit_sha][crate::model::QueryRepositoryDirectoryContentsRequest::commit_sha].
2051    ///
2052    /// # Example
2053    /// ```ignore,no_run
2054    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2055    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_commit_sha("example");
2056    /// ```
2057    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2058        self.commit_sha = v.into();
2059        self
2060    }
2061
2062    /// Sets the value of [path][crate::model::QueryRepositoryDirectoryContentsRequest::path].
2063    ///
2064    /// # Example
2065    /// ```ignore,no_run
2066    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2067    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_path("example");
2068    /// ```
2069    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2070        self.path = v.into();
2071        self
2072    }
2073
2074    /// Sets the value of [page_size][crate::model::QueryRepositoryDirectoryContentsRequest::page_size].
2075    ///
2076    /// # Example
2077    /// ```ignore,no_run
2078    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2079    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_size(42);
2080    /// ```
2081    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2082        self.page_size = v.into();
2083        self
2084    }
2085
2086    /// Sets the value of [page_token][crate::model::QueryRepositoryDirectoryContentsRequest::page_token].
2087    ///
2088    /// # Example
2089    /// ```ignore,no_run
2090    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2091    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_token("example");
2092    /// ```
2093    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2094        self.page_token = v.into();
2095        self
2096    }
2097}
2098
2099impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
2100    fn typename() -> &'static str {
2101        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
2102    }
2103}
2104
2105/// `QueryRepositoryDirectoryContents` response message.
2106#[derive(Clone, Default, PartialEq)]
2107#[non_exhaustive]
2108pub struct QueryRepositoryDirectoryContentsResponse {
2109    /// List of entries in the directory.
2110    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
2111
2112    /// A token, which can be sent as `page_token` to retrieve the next page.
2113    /// If this field is omitted, there are no subsequent pages.
2114    pub next_page_token: std::string::String,
2115
2116    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2117}
2118
2119impl QueryRepositoryDirectoryContentsResponse {
2120    /// Creates a new default instance.
2121    pub fn new() -> Self {
2122        std::default::Default::default()
2123    }
2124
2125    /// Sets the value of [directory_entries][crate::model::QueryRepositoryDirectoryContentsResponse::directory_entries].
2126    ///
2127    /// # Example
2128    /// ```ignore,no_run
2129    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
2130    /// use google_cloud_dataform_v1::model::DirectoryEntry;
2131    /// let x = QueryRepositoryDirectoryContentsResponse::new()
2132    ///     .set_directory_entries([
2133    ///         DirectoryEntry::default()/* use setters */,
2134    ///         DirectoryEntry::default()/* use (different) setters */,
2135    ///     ]);
2136    /// ```
2137    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
2138    where
2139        T: std::iter::IntoIterator<Item = V>,
2140        V: std::convert::Into<crate::model::DirectoryEntry>,
2141    {
2142        use std::iter::Iterator;
2143        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
2144        self
2145    }
2146
2147    /// Sets the value of [next_page_token][crate::model::QueryRepositoryDirectoryContentsResponse::next_page_token].
2148    ///
2149    /// # Example
2150    /// ```ignore,no_run
2151    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
2152    /// let x = QueryRepositoryDirectoryContentsResponse::new().set_next_page_token("example");
2153    /// ```
2154    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2155        self.next_page_token = v.into();
2156        self
2157    }
2158}
2159
2160impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
2161    fn typename() -> &'static str {
2162        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
2163    }
2164}
2165
2166#[doc(hidden)]
2167impl google_cloud_gax::paginator::internal::PageableResponse
2168    for QueryRepositoryDirectoryContentsResponse
2169{
2170    type PageItem = crate::model::DirectoryEntry;
2171
2172    fn items(self) -> std::vec::Vec<Self::PageItem> {
2173        self.directory_entries
2174    }
2175
2176    fn next_page_token(&self) -> std::string::String {
2177        use std::clone::Clone;
2178        self.next_page_token.clone()
2179    }
2180}
2181
2182/// `FetchRepositoryHistory` request message.
2183#[derive(Clone, Default, PartialEq)]
2184#[non_exhaustive]
2185pub struct FetchRepositoryHistoryRequest {
2186    /// Required. The repository's name.
2187    pub name: std::string::String,
2188
2189    /// Optional. Maximum number of commits to return. The server may return fewer
2190    /// items than requested. If unspecified, the server will pick an appropriate
2191    /// default.
2192    pub page_size: i32,
2193
2194    /// Optional. Page token received from a previous `FetchRepositoryHistory`
2195    /// call. Provide this to retrieve the subsequent page.
2196    ///
2197    /// When paginating, all other parameters provided to `FetchRepositoryHistory`,
2198    /// with the exception of `page_size`, must match the call that provided the
2199    /// page token.
2200    pub page_token: std::string::String,
2201
2202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2203}
2204
2205impl FetchRepositoryHistoryRequest {
2206    /// Creates a new default instance.
2207    pub fn new() -> Self {
2208        std::default::Default::default()
2209    }
2210
2211    /// Sets the value of [name][crate::model::FetchRepositoryHistoryRequest::name].
2212    ///
2213    /// # Example
2214    /// ```ignore,no_run
2215    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2216    /// let x = FetchRepositoryHistoryRequest::new().set_name("example");
2217    /// ```
2218    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2219        self.name = v.into();
2220        self
2221    }
2222
2223    /// Sets the value of [page_size][crate::model::FetchRepositoryHistoryRequest::page_size].
2224    ///
2225    /// # Example
2226    /// ```ignore,no_run
2227    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2228    /// let x = FetchRepositoryHistoryRequest::new().set_page_size(42);
2229    /// ```
2230    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2231        self.page_size = v.into();
2232        self
2233    }
2234
2235    /// Sets the value of [page_token][crate::model::FetchRepositoryHistoryRequest::page_token].
2236    ///
2237    /// # Example
2238    /// ```ignore,no_run
2239    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2240    /// let x = FetchRepositoryHistoryRequest::new().set_page_token("example");
2241    /// ```
2242    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2243        self.page_token = v.into();
2244        self
2245    }
2246}
2247
2248impl wkt::message::Message for FetchRepositoryHistoryRequest {
2249    fn typename() -> &'static str {
2250        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
2251    }
2252}
2253
2254/// `FetchRepositoryHistory` response message.
2255#[derive(Clone, Default, PartialEq)]
2256#[non_exhaustive]
2257pub struct FetchRepositoryHistoryResponse {
2258    /// A list of commit logs, ordered by 'git log' default order.
2259    pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
2260
2261    /// A token, which can be sent as `page_token` to retrieve the next page.
2262    /// If this field is omitted, there are no subsequent pages.
2263    pub next_page_token: std::string::String,
2264
2265    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2266}
2267
2268impl FetchRepositoryHistoryResponse {
2269    /// Creates a new default instance.
2270    pub fn new() -> Self {
2271        std::default::Default::default()
2272    }
2273
2274    /// Sets the value of [commits][crate::model::FetchRepositoryHistoryResponse::commits].
2275    ///
2276    /// # Example
2277    /// ```ignore,no_run
2278    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2279    /// use google_cloud_dataform_v1::model::CommitLogEntry;
2280    /// let x = FetchRepositoryHistoryResponse::new()
2281    ///     .set_commits([
2282    ///         CommitLogEntry::default()/* use setters */,
2283    ///         CommitLogEntry::default()/* use (different) setters */,
2284    ///     ]);
2285    /// ```
2286    pub fn set_commits<T, V>(mut self, v: T) -> Self
2287    where
2288        T: std::iter::IntoIterator<Item = V>,
2289        V: std::convert::Into<crate::model::CommitLogEntry>,
2290    {
2291        use std::iter::Iterator;
2292        self.commits = v.into_iter().map(|i| i.into()).collect();
2293        self
2294    }
2295
2296    /// Sets the value of [next_page_token][crate::model::FetchRepositoryHistoryResponse::next_page_token].
2297    ///
2298    /// # Example
2299    /// ```ignore,no_run
2300    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2301    /// let x = FetchRepositoryHistoryResponse::new().set_next_page_token("example");
2302    /// ```
2303    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2304        self.next_page_token = v.into();
2305        self
2306    }
2307}
2308
2309impl wkt::message::Message for FetchRepositoryHistoryResponse {
2310    fn typename() -> &'static str {
2311        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
2312    }
2313}
2314
2315#[doc(hidden)]
2316impl google_cloud_gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
2317    type PageItem = crate::model::CommitLogEntry;
2318
2319    fn items(self) -> std::vec::Vec<Self::PageItem> {
2320        self.commits
2321    }
2322
2323    fn next_page_token(&self) -> std::string::String {
2324        use std::clone::Clone;
2325        self.next_page_token.clone()
2326    }
2327}
2328
2329/// Represents a single commit log.
2330#[derive(Clone, Default, PartialEq)]
2331#[non_exhaustive]
2332pub struct CommitLogEntry {
2333    /// Commit timestamp.
2334    pub commit_time: std::option::Option<wkt::Timestamp>,
2335
2336    /// The commit SHA for this commit log entry.
2337    pub commit_sha: std::string::String,
2338
2339    /// The commit author for this commit log entry.
2340    pub author: std::option::Option<crate::model::CommitAuthor>,
2341
2342    /// The commit message for this commit log entry.
2343    pub commit_message: std::string::String,
2344
2345    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2346}
2347
2348impl CommitLogEntry {
2349    /// Creates a new default instance.
2350    pub fn new() -> Self {
2351        std::default::Default::default()
2352    }
2353
2354    /// Sets the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2355    ///
2356    /// # Example
2357    /// ```ignore,no_run
2358    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2359    /// use wkt::Timestamp;
2360    /// let x = CommitLogEntry::new().set_commit_time(Timestamp::default()/* use setters */);
2361    /// ```
2362    pub fn set_commit_time<T>(mut self, v: T) -> Self
2363    where
2364        T: std::convert::Into<wkt::Timestamp>,
2365    {
2366        self.commit_time = std::option::Option::Some(v.into());
2367        self
2368    }
2369
2370    /// Sets or clears the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2371    ///
2372    /// # Example
2373    /// ```ignore,no_run
2374    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2375    /// use wkt::Timestamp;
2376    /// let x = CommitLogEntry::new().set_or_clear_commit_time(Some(Timestamp::default()/* use setters */));
2377    /// let x = CommitLogEntry::new().set_or_clear_commit_time(None::<Timestamp>);
2378    /// ```
2379    pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
2380    where
2381        T: std::convert::Into<wkt::Timestamp>,
2382    {
2383        self.commit_time = v.map(|x| x.into());
2384        self
2385    }
2386
2387    /// Sets the value of [commit_sha][crate::model::CommitLogEntry::commit_sha].
2388    ///
2389    /// # Example
2390    /// ```ignore,no_run
2391    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2392    /// let x = CommitLogEntry::new().set_commit_sha("example");
2393    /// ```
2394    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2395        self.commit_sha = v.into();
2396        self
2397    }
2398
2399    /// Sets the value of [author][crate::model::CommitLogEntry::author].
2400    ///
2401    /// # Example
2402    /// ```ignore,no_run
2403    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2404    /// use google_cloud_dataform_v1::model::CommitAuthor;
2405    /// let x = CommitLogEntry::new().set_author(CommitAuthor::default()/* use setters */);
2406    /// ```
2407    pub fn set_author<T>(mut self, v: T) -> Self
2408    where
2409        T: std::convert::Into<crate::model::CommitAuthor>,
2410    {
2411        self.author = std::option::Option::Some(v.into());
2412        self
2413    }
2414
2415    /// Sets or clears the value of [author][crate::model::CommitLogEntry::author].
2416    ///
2417    /// # Example
2418    /// ```ignore,no_run
2419    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2420    /// use google_cloud_dataform_v1::model::CommitAuthor;
2421    /// let x = CommitLogEntry::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2422    /// let x = CommitLogEntry::new().set_or_clear_author(None::<CommitAuthor>);
2423    /// ```
2424    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2425    where
2426        T: std::convert::Into<crate::model::CommitAuthor>,
2427    {
2428        self.author = v.map(|x| x.into());
2429        self
2430    }
2431
2432    /// Sets the value of [commit_message][crate::model::CommitLogEntry::commit_message].
2433    ///
2434    /// # Example
2435    /// ```ignore,no_run
2436    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2437    /// let x = CommitLogEntry::new().set_commit_message("example");
2438    /// ```
2439    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2440        self.commit_message = v.into();
2441        self
2442    }
2443}
2444
2445impl wkt::message::Message for CommitLogEntry {
2446    fn typename() -> &'static str {
2447        "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
2448    }
2449}
2450
2451/// Represents a Dataform Git commit.
2452#[derive(Clone, Default, PartialEq)]
2453#[non_exhaustive]
2454pub struct CommitMetadata {
2455    /// Required. The commit's author.
2456    pub author: std::option::Option<crate::model::CommitAuthor>,
2457
2458    /// Optional. The commit's message.
2459    pub commit_message: std::string::String,
2460
2461    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2462}
2463
2464impl CommitMetadata {
2465    /// Creates a new default instance.
2466    pub fn new() -> Self {
2467        std::default::Default::default()
2468    }
2469
2470    /// Sets the value of [author][crate::model::CommitMetadata::author].
2471    ///
2472    /// # Example
2473    /// ```ignore,no_run
2474    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2475    /// use google_cloud_dataform_v1::model::CommitAuthor;
2476    /// let x = CommitMetadata::new().set_author(CommitAuthor::default()/* use setters */);
2477    /// ```
2478    pub fn set_author<T>(mut self, v: T) -> Self
2479    where
2480        T: std::convert::Into<crate::model::CommitAuthor>,
2481    {
2482        self.author = std::option::Option::Some(v.into());
2483        self
2484    }
2485
2486    /// Sets or clears the value of [author][crate::model::CommitMetadata::author].
2487    ///
2488    /// # Example
2489    /// ```ignore,no_run
2490    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2491    /// use google_cloud_dataform_v1::model::CommitAuthor;
2492    /// let x = CommitMetadata::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2493    /// let x = CommitMetadata::new().set_or_clear_author(None::<CommitAuthor>);
2494    /// ```
2495    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2496    where
2497        T: std::convert::Into<crate::model::CommitAuthor>,
2498    {
2499        self.author = v.map(|x| x.into());
2500        self
2501    }
2502
2503    /// Sets the value of [commit_message][crate::model::CommitMetadata::commit_message].
2504    ///
2505    /// # Example
2506    /// ```ignore,no_run
2507    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2508    /// let x = CommitMetadata::new().set_commit_message("example");
2509    /// ```
2510    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2511        self.commit_message = v.into();
2512        self
2513    }
2514}
2515
2516impl wkt::message::Message for CommitMetadata {
2517    fn typename() -> &'static str {
2518        "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
2519    }
2520}
2521
2522/// `ComputeRepositoryAccessTokenStatus` request message.
2523#[derive(Clone, Default, PartialEq)]
2524#[non_exhaustive]
2525pub struct ComputeRepositoryAccessTokenStatusRequest {
2526    /// Required. The repository's name.
2527    pub name: std::string::String,
2528
2529    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2530}
2531
2532impl ComputeRepositoryAccessTokenStatusRequest {
2533    /// Creates a new default instance.
2534    pub fn new() -> Self {
2535        std::default::Default::default()
2536    }
2537
2538    /// Sets the value of [name][crate::model::ComputeRepositoryAccessTokenStatusRequest::name].
2539    ///
2540    /// # Example
2541    /// ```ignore,no_run
2542    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusRequest;
2543    /// let x = ComputeRepositoryAccessTokenStatusRequest::new().set_name("example");
2544    /// ```
2545    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2546        self.name = v.into();
2547        self
2548    }
2549}
2550
2551impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
2552    fn typename() -> &'static str {
2553        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
2554    }
2555}
2556
2557/// `ComputeRepositoryAccessTokenStatus` response message.
2558#[derive(Clone, Default, PartialEq)]
2559#[non_exhaustive]
2560pub struct ComputeRepositoryAccessTokenStatusResponse {
2561    /// Indicates the status of the Git access token.
2562    pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
2563
2564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2565}
2566
2567impl ComputeRepositoryAccessTokenStatusResponse {
2568    /// Creates a new default instance.
2569    pub fn new() -> Self {
2570        std::default::Default::default()
2571    }
2572
2573    /// Sets the value of [token_status][crate::model::ComputeRepositoryAccessTokenStatusResponse::token_status].
2574    ///
2575    /// # Example
2576    /// ```ignore,no_run
2577    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusResponse;
2578    /// use google_cloud_dataform_v1::model::compute_repository_access_token_status_response::TokenStatus;
2579    /// let x0 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::NotFound);
2580    /// let x1 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Invalid);
2581    /// let x2 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Valid);
2582    /// ```
2583    pub fn set_token_status<
2584        T: std::convert::Into<
2585                crate::model::compute_repository_access_token_status_response::TokenStatus,
2586            >,
2587    >(
2588        mut self,
2589        v: T,
2590    ) -> Self {
2591        self.token_status = v.into();
2592        self
2593    }
2594}
2595
2596impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
2597    fn typename() -> &'static str {
2598        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
2599    }
2600}
2601
2602/// Defines additional types related to [ComputeRepositoryAccessTokenStatusResponse].
2603pub mod compute_repository_access_token_status_response {
2604    #[allow(unused_imports)]
2605    use super::*;
2606
2607    /// Indicates the status of a Git authentication token.
2608    ///
2609    /// # Working with unknown values
2610    ///
2611    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2612    /// additional enum variants at any time. Adding new variants is not considered
2613    /// a breaking change. Applications should write their code in anticipation of:
2614    ///
2615    /// - New values appearing in future releases of the client library, **and**
2616    /// - New values received dynamically, without application changes.
2617    ///
2618    /// Please consult the [Working with enums] section in the user guide for some
2619    /// guidelines.
2620    ///
2621    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2622    #[derive(Clone, Debug, PartialEq)]
2623    #[non_exhaustive]
2624    pub enum TokenStatus {
2625        /// Default value. This value is unused.
2626        Unspecified,
2627        /// The token could not be found in Secret Manager (or the Dataform
2628        /// Service Account did not have permission to access it).
2629        NotFound,
2630        /// The token could not be used to authenticate against the Git remote.
2631        Invalid,
2632        /// The token was used successfully to authenticate against the Git remote.
2633        Valid,
2634        /// The token is not accessible due to permission issues.
2635        PermissionDenied,
2636        /// If set, the enum was initialized with an unknown value.
2637        ///
2638        /// Applications can examine the value using [TokenStatus::value] or
2639        /// [TokenStatus::name].
2640        UnknownValue(token_status::UnknownValue),
2641    }
2642
2643    #[doc(hidden)]
2644    pub mod token_status {
2645        #[allow(unused_imports)]
2646        use super::*;
2647        #[derive(Clone, Debug, PartialEq)]
2648        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2649    }
2650
2651    impl TokenStatus {
2652        /// Gets the enum value.
2653        ///
2654        /// Returns `None` if the enum contains an unknown value deserialized from
2655        /// the string representation of enums.
2656        pub fn value(&self) -> std::option::Option<i32> {
2657            match self {
2658                Self::Unspecified => std::option::Option::Some(0),
2659                Self::NotFound => std::option::Option::Some(1),
2660                Self::Invalid => std::option::Option::Some(2),
2661                Self::Valid => std::option::Option::Some(3),
2662                Self::PermissionDenied => std::option::Option::Some(4),
2663                Self::UnknownValue(u) => u.0.value(),
2664            }
2665        }
2666
2667        /// Gets the enum value as a string.
2668        ///
2669        /// Returns `None` if the enum contains an unknown value deserialized from
2670        /// the integer representation of enums.
2671        pub fn name(&self) -> std::option::Option<&str> {
2672            match self {
2673                Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
2674                Self::NotFound => std::option::Option::Some("NOT_FOUND"),
2675                Self::Invalid => std::option::Option::Some("INVALID"),
2676                Self::Valid => std::option::Option::Some("VALID"),
2677                Self::PermissionDenied => std::option::Option::Some("PERMISSION_DENIED"),
2678                Self::UnknownValue(u) => u.0.name(),
2679            }
2680        }
2681    }
2682
2683    impl std::default::Default for TokenStatus {
2684        fn default() -> Self {
2685            use std::convert::From;
2686            Self::from(0)
2687        }
2688    }
2689
2690    impl std::fmt::Display for TokenStatus {
2691        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2692            wkt::internal::display_enum(f, self.name(), self.value())
2693        }
2694    }
2695
2696    impl std::convert::From<i32> for TokenStatus {
2697        fn from(value: i32) -> Self {
2698            match value {
2699                0 => Self::Unspecified,
2700                1 => Self::NotFound,
2701                2 => Self::Invalid,
2702                3 => Self::Valid,
2703                4 => Self::PermissionDenied,
2704                _ => Self::UnknownValue(token_status::UnknownValue(
2705                    wkt::internal::UnknownEnumValue::Integer(value),
2706                )),
2707            }
2708        }
2709    }
2710
2711    impl std::convert::From<&str> for TokenStatus {
2712        fn from(value: &str) -> Self {
2713            use std::string::ToString;
2714            match value {
2715                "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
2716                "NOT_FOUND" => Self::NotFound,
2717                "INVALID" => Self::Invalid,
2718                "VALID" => Self::Valid,
2719                "PERMISSION_DENIED" => Self::PermissionDenied,
2720                _ => Self::UnknownValue(token_status::UnknownValue(
2721                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2722                )),
2723            }
2724        }
2725    }
2726
2727    impl serde::ser::Serialize for TokenStatus {
2728        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2729        where
2730            S: serde::Serializer,
2731        {
2732            match self {
2733                Self::Unspecified => serializer.serialize_i32(0),
2734                Self::NotFound => serializer.serialize_i32(1),
2735                Self::Invalid => serializer.serialize_i32(2),
2736                Self::Valid => serializer.serialize_i32(3),
2737                Self::PermissionDenied => serializer.serialize_i32(4),
2738                Self::UnknownValue(u) => u.0.serialize(serializer),
2739            }
2740        }
2741    }
2742
2743    impl<'de> serde::de::Deserialize<'de> for TokenStatus {
2744        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2745        where
2746            D: serde::Deserializer<'de>,
2747        {
2748            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
2749                ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
2750            ))
2751        }
2752    }
2753}
2754
2755/// `FetchRemoteBranches` request message.
2756#[derive(Clone, Default, PartialEq)]
2757#[non_exhaustive]
2758pub struct FetchRemoteBranchesRequest {
2759    /// Required. The repository's name.
2760    pub name: std::string::String,
2761
2762    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2763}
2764
2765impl FetchRemoteBranchesRequest {
2766    /// Creates a new default instance.
2767    pub fn new() -> Self {
2768        std::default::Default::default()
2769    }
2770
2771    /// Sets the value of [name][crate::model::FetchRemoteBranchesRequest::name].
2772    ///
2773    /// # Example
2774    /// ```ignore,no_run
2775    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesRequest;
2776    /// let x = FetchRemoteBranchesRequest::new().set_name("example");
2777    /// ```
2778    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2779        self.name = v.into();
2780        self
2781    }
2782}
2783
2784impl wkt::message::Message for FetchRemoteBranchesRequest {
2785    fn typename() -> &'static str {
2786        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
2787    }
2788}
2789
2790/// `FetchRemoteBranches` response message.
2791#[derive(Clone, Default, PartialEq)]
2792#[non_exhaustive]
2793pub struct FetchRemoteBranchesResponse {
2794    /// The remote repository's branch names.
2795    pub branches: std::vec::Vec<std::string::String>,
2796
2797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2798}
2799
2800impl FetchRemoteBranchesResponse {
2801    /// Creates a new default instance.
2802    pub fn new() -> Self {
2803        std::default::Default::default()
2804    }
2805
2806    /// Sets the value of [branches][crate::model::FetchRemoteBranchesResponse::branches].
2807    ///
2808    /// # Example
2809    /// ```ignore,no_run
2810    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesResponse;
2811    /// let x = FetchRemoteBranchesResponse::new().set_branches(["a", "b", "c"]);
2812    /// ```
2813    pub fn set_branches<T, V>(mut self, v: T) -> Self
2814    where
2815        T: std::iter::IntoIterator<Item = V>,
2816        V: std::convert::Into<std::string::String>,
2817    {
2818        use std::iter::Iterator;
2819        self.branches = v.into_iter().map(|i| i.into()).collect();
2820        self
2821    }
2822}
2823
2824impl wkt::message::Message for FetchRemoteBranchesResponse {
2825    fn typename() -> &'static str {
2826        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
2827    }
2828}
2829
2830/// Represents a Dataform Git workspace.
2831#[derive(Clone, Default, PartialEq)]
2832#[non_exhaustive]
2833pub struct Workspace {
2834    /// Identifier. The workspace's name.
2835    pub name: std::string::String,
2836
2837    /// Output only. The timestamp of when the workspace was created.
2838    pub create_time: std::option::Option<wkt::Timestamp>,
2839
2840    /// Output only. A data encryption state of a Git repository if this Workspace
2841    /// is protected by a KMS key.
2842    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
2843
2844    /// Output only. All the metadata information that is used internally to serve
2845    /// the resource. For example: timestamps, flags, status fields, etc. The
2846    /// format of this field is a JSON string.
2847    pub internal_metadata: std::option::Option<std::string::String>,
2848
2849    /// Optional. If set to true, workspaces will not be moved if its linked
2850    /// Repository is moved. Instead, it will be deleted.
2851    pub disable_moves: std::option::Option<bool>,
2852
2853    /// Output only. Metadata indicating whether this resource is user-scoped. For
2854    /// `Workspace` resources, the `user_scoped` field is always `true`.
2855    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
2856
2857    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2858}
2859
2860impl Workspace {
2861    /// Creates a new default instance.
2862    pub fn new() -> Self {
2863        std::default::Default::default()
2864    }
2865
2866    /// Sets the value of [name][crate::model::Workspace::name].
2867    ///
2868    /// # Example
2869    /// ```ignore,no_run
2870    /// # use google_cloud_dataform_v1::model::Workspace;
2871    /// let x = Workspace::new().set_name("example");
2872    /// ```
2873    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2874        self.name = v.into();
2875        self
2876    }
2877
2878    /// Sets the value of [create_time][crate::model::Workspace::create_time].
2879    ///
2880    /// # Example
2881    /// ```ignore,no_run
2882    /// # use google_cloud_dataform_v1::model::Workspace;
2883    /// use wkt::Timestamp;
2884    /// let x = Workspace::new().set_create_time(Timestamp::default()/* use setters */);
2885    /// ```
2886    pub fn set_create_time<T>(mut self, v: T) -> Self
2887    where
2888        T: std::convert::Into<wkt::Timestamp>,
2889    {
2890        self.create_time = std::option::Option::Some(v.into());
2891        self
2892    }
2893
2894    /// Sets or clears the value of [create_time][crate::model::Workspace::create_time].
2895    ///
2896    /// # Example
2897    /// ```ignore,no_run
2898    /// # use google_cloud_dataform_v1::model::Workspace;
2899    /// use wkt::Timestamp;
2900    /// let x = Workspace::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2901    /// let x = Workspace::new().set_or_clear_create_time(None::<Timestamp>);
2902    /// ```
2903    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2904    where
2905        T: std::convert::Into<wkt::Timestamp>,
2906    {
2907        self.create_time = v.map(|x| x.into());
2908        self
2909    }
2910
2911    /// Sets the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2912    ///
2913    /// # Example
2914    /// ```ignore,no_run
2915    /// # use google_cloud_dataform_v1::model::Workspace;
2916    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2917    /// let x = Workspace::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
2918    /// ```
2919    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
2920    where
2921        T: std::convert::Into<crate::model::DataEncryptionState>,
2922    {
2923        self.data_encryption_state = std::option::Option::Some(v.into());
2924        self
2925    }
2926
2927    /// Sets or clears the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2928    ///
2929    /// # Example
2930    /// ```ignore,no_run
2931    /// # use google_cloud_dataform_v1::model::Workspace;
2932    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2933    /// let x = Workspace::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
2934    /// let x = Workspace::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
2935    /// ```
2936    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
2937    where
2938        T: std::convert::Into<crate::model::DataEncryptionState>,
2939    {
2940        self.data_encryption_state = v.map(|x| x.into());
2941        self
2942    }
2943
2944    /// Sets the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2945    ///
2946    /// # Example
2947    /// ```ignore,no_run
2948    /// # use google_cloud_dataform_v1::model::Workspace;
2949    /// let x = Workspace::new().set_internal_metadata("example");
2950    /// ```
2951    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
2952    where
2953        T: std::convert::Into<std::string::String>,
2954    {
2955        self.internal_metadata = std::option::Option::Some(v.into());
2956        self
2957    }
2958
2959    /// Sets or clears the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2960    ///
2961    /// # Example
2962    /// ```ignore,no_run
2963    /// # use google_cloud_dataform_v1::model::Workspace;
2964    /// let x = Workspace::new().set_or_clear_internal_metadata(Some("example"));
2965    /// let x = Workspace::new().set_or_clear_internal_metadata(None::<String>);
2966    /// ```
2967    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2968    where
2969        T: std::convert::Into<std::string::String>,
2970    {
2971        self.internal_metadata = v.map(|x| x.into());
2972        self
2973    }
2974
2975    /// Sets the value of [disable_moves][crate::model::Workspace::disable_moves].
2976    ///
2977    /// # Example
2978    /// ```ignore,no_run
2979    /// # use google_cloud_dataform_v1::model::Workspace;
2980    /// let x = Workspace::new().set_disable_moves(true);
2981    /// ```
2982    pub fn set_disable_moves<T>(mut self, v: T) -> Self
2983    where
2984        T: std::convert::Into<bool>,
2985    {
2986        self.disable_moves = std::option::Option::Some(v.into());
2987        self
2988    }
2989
2990    /// Sets or clears the value of [disable_moves][crate::model::Workspace::disable_moves].
2991    ///
2992    /// # Example
2993    /// ```ignore,no_run
2994    /// # use google_cloud_dataform_v1::model::Workspace;
2995    /// let x = Workspace::new().set_or_clear_disable_moves(Some(false));
2996    /// let x = Workspace::new().set_or_clear_disable_moves(None::<bool>);
2997    /// ```
2998    pub fn set_or_clear_disable_moves<T>(mut self, v: std::option::Option<T>) -> Self
2999    where
3000        T: std::convert::Into<bool>,
3001    {
3002        self.disable_moves = v.map(|x| x.into());
3003        self
3004    }
3005
3006    /// Sets the value of [private_resource_metadata][crate::model::Workspace::private_resource_metadata].
3007    ///
3008    /// # Example
3009    /// ```ignore,no_run
3010    /// # use google_cloud_dataform_v1::model::Workspace;
3011    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
3012    /// let x = Workspace::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
3013    /// ```
3014    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
3015    where
3016        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
3017    {
3018        self.private_resource_metadata = std::option::Option::Some(v.into());
3019        self
3020    }
3021
3022    /// Sets or clears the value of [private_resource_metadata][crate::model::Workspace::private_resource_metadata].
3023    ///
3024    /// # Example
3025    /// ```ignore,no_run
3026    /// # use google_cloud_dataform_v1::model::Workspace;
3027    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
3028    /// let x = Workspace::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
3029    /// let x = Workspace::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
3030    /// ```
3031    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
3032    where
3033        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
3034    {
3035        self.private_resource_metadata = v.map(|x| x.into());
3036        self
3037    }
3038}
3039
3040impl wkt::message::Message for Workspace {
3041    fn typename() -> &'static str {
3042        "type.googleapis.com/google.cloud.dataform.v1.Workspace"
3043    }
3044}
3045
3046/// `ListWorkspaces` request message.
3047#[derive(Clone, Default, PartialEq)]
3048#[non_exhaustive]
3049pub struct ListWorkspacesRequest {
3050    /// Required. The repository in which to list workspaces. Must be in the
3051    /// format `projects/*/locations/*/repositories/*`.
3052    pub parent: std::string::String,
3053
3054    /// Optional. Maximum number of workspaces to return. The server may return
3055    /// fewer items than requested. If unspecified, the server will pick an
3056    /// appropriate default.
3057    pub page_size: i32,
3058
3059    /// Optional. Page token received from a previous `ListWorkspaces` call.
3060    /// Provide this to retrieve the subsequent page.
3061    ///
3062    /// When paginating, all other parameters provided to `ListWorkspaces`, with
3063    /// the exception of `page_size`, must match the call that provided the page
3064    /// token.
3065    pub page_token: std::string::String,
3066
3067    /// Optional. This field only supports ordering by `name`. If unspecified, the
3068    /// server will choose the ordering. If specified, the default order is
3069    /// ascending for the `name` field.
3070    pub order_by: std::string::String,
3071
3072    /// Optional. Filter for the returned list.
3073    pub filter: std::string::String,
3074
3075    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3076}
3077
3078impl ListWorkspacesRequest {
3079    /// Creates a new default instance.
3080    pub fn new() -> Self {
3081        std::default::Default::default()
3082    }
3083
3084    /// Sets the value of [parent][crate::model::ListWorkspacesRequest::parent].
3085    ///
3086    /// # Example
3087    /// ```ignore,no_run
3088    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3089    /// let x = ListWorkspacesRequest::new().set_parent("example");
3090    /// ```
3091    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3092        self.parent = v.into();
3093        self
3094    }
3095
3096    /// Sets the value of [page_size][crate::model::ListWorkspacesRequest::page_size].
3097    ///
3098    /// # Example
3099    /// ```ignore,no_run
3100    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3101    /// let x = ListWorkspacesRequest::new().set_page_size(42);
3102    /// ```
3103    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3104        self.page_size = v.into();
3105        self
3106    }
3107
3108    /// Sets the value of [page_token][crate::model::ListWorkspacesRequest::page_token].
3109    ///
3110    /// # Example
3111    /// ```ignore,no_run
3112    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3113    /// let x = ListWorkspacesRequest::new().set_page_token("example");
3114    /// ```
3115    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3116        self.page_token = v.into();
3117        self
3118    }
3119
3120    /// Sets the value of [order_by][crate::model::ListWorkspacesRequest::order_by].
3121    ///
3122    /// # Example
3123    /// ```ignore,no_run
3124    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3125    /// let x = ListWorkspacesRequest::new().set_order_by("example");
3126    /// ```
3127    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3128        self.order_by = v.into();
3129        self
3130    }
3131
3132    /// Sets the value of [filter][crate::model::ListWorkspacesRequest::filter].
3133    ///
3134    /// # Example
3135    /// ```ignore,no_run
3136    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3137    /// let x = ListWorkspacesRequest::new().set_filter("example");
3138    /// ```
3139    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3140        self.filter = v.into();
3141        self
3142    }
3143}
3144
3145impl wkt::message::Message for ListWorkspacesRequest {
3146    fn typename() -> &'static str {
3147        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
3148    }
3149}
3150
3151/// `ListWorkspaces` response message.
3152#[derive(Clone, Default, PartialEq)]
3153#[non_exhaustive]
3154pub struct ListWorkspacesResponse {
3155    /// List of workspaces.
3156    pub workspaces: std::vec::Vec<crate::model::Workspace>,
3157
3158    /// A token, which can be sent as `page_token` to retrieve the next page.
3159    /// If this field is omitted, there are no subsequent pages.
3160    pub next_page_token: std::string::String,
3161
3162    /// Locations which could not be reached.
3163    pub unreachable: std::vec::Vec<std::string::String>,
3164
3165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3166}
3167
3168impl ListWorkspacesResponse {
3169    /// Creates a new default instance.
3170    pub fn new() -> Self {
3171        std::default::Default::default()
3172    }
3173
3174    /// Sets the value of [workspaces][crate::model::ListWorkspacesResponse::workspaces].
3175    ///
3176    /// # Example
3177    /// ```ignore,no_run
3178    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3179    /// use google_cloud_dataform_v1::model::Workspace;
3180    /// let x = ListWorkspacesResponse::new()
3181    ///     .set_workspaces([
3182    ///         Workspace::default()/* use setters */,
3183    ///         Workspace::default()/* use (different) setters */,
3184    ///     ]);
3185    /// ```
3186    pub fn set_workspaces<T, V>(mut self, v: T) -> Self
3187    where
3188        T: std::iter::IntoIterator<Item = V>,
3189        V: std::convert::Into<crate::model::Workspace>,
3190    {
3191        use std::iter::Iterator;
3192        self.workspaces = v.into_iter().map(|i| i.into()).collect();
3193        self
3194    }
3195
3196    /// Sets the value of [next_page_token][crate::model::ListWorkspacesResponse::next_page_token].
3197    ///
3198    /// # Example
3199    /// ```ignore,no_run
3200    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3201    /// let x = ListWorkspacesResponse::new().set_next_page_token("example");
3202    /// ```
3203    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3204        self.next_page_token = v.into();
3205        self
3206    }
3207
3208    /// Sets the value of [unreachable][crate::model::ListWorkspacesResponse::unreachable].
3209    ///
3210    /// # Example
3211    /// ```ignore,no_run
3212    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3213    /// let x = ListWorkspacesResponse::new().set_unreachable(["a", "b", "c"]);
3214    /// ```
3215    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3216    where
3217        T: std::iter::IntoIterator<Item = V>,
3218        V: std::convert::Into<std::string::String>,
3219    {
3220        use std::iter::Iterator;
3221        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3222        self
3223    }
3224}
3225
3226impl wkt::message::Message for ListWorkspacesResponse {
3227    fn typename() -> &'static str {
3228        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
3229    }
3230}
3231
3232#[doc(hidden)]
3233impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
3234    type PageItem = crate::model::Workspace;
3235
3236    fn items(self) -> std::vec::Vec<Self::PageItem> {
3237        self.workspaces
3238    }
3239
3240    fn next_page_token(&self) -> std::string::String {
3241        use std::clone::Clone;
3242        self.next_page_token.clone()
3243    }
3244}
3245
3246/// `GetWorkspace` request message.
3247#[derive(Clone, Default, PartialEq)]
3248#[non_exhaustive]
3249pub struct GetWorkspaceRequest {
3250    /// Required. The workspace's name.
3251    pub name: std::string::String,
3252
3253    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3254}
3255
3256impl GetWorkspaceRequest {
3257    /// Creates a new default instance.
3258    pub fn new() -> Self {
3259        std::default::Default::default()
3260    }
3261
3262    /// Sets the value of [name][crate::model::GetWorkspaceRequest::name].
3263    ///
3264    /// # Example
3265    /// ```ignore,no_run
3266    /// # use google_cloud_dataform_v1::model::GetWorkspaceRequest;
3267    /// let x = GetWorkspaceRequest::new().set_name("example");
3268    /// ```
3269    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3270        self.name = v.into();
3271        self
3272    }
3273}
3274
3275impl wkt::message::Message for GetWorkspaceRequest {
3276    fn typename() -> &'static str {
3277        "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
3278    }
3279}
3280
3281/// `CreateWorkspace` request message.
3282#[derive(Clone, Default, PartialEq)]
3283#[non_exhaustive]
3284pub struct CreateWorkspaceRequest {
3285    /// Required. The repository in which to create the workspace. Must be in the
3286    /// format `projects/*/locations/*/repositories/*`.
3287    pub parent: std::string::String,
3288
3289    /// Required. The workspace to create.
3290    pub workspace: std::option::Option<crate::model::Workspace>,
3291
3292    /// Required. The ID to use for the workspace, which will become the final
3293    /// component of the workspace's resource name.
3294    pub workspace_id: std::string::String,
3295
3296    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3297}
3298
3299impl CreateWorkspaceRequest {
3300    /// Creates a new default instance.
3301    pub fn new() -> Self {
3302        std::default::Default::default()
3303    }
3304
3305    /// Sets the value of [parent][crate::model::CreateWorkspaceRequest::parent].
3306    ///
3307    /// # Example
3308    /// ```ignore,no_run
3309    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3310    /// let x = CreateWorkspaceRequest::new().set_parent("example");
3311    /// ```
3312    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3313        self.parent = v.into();
3314        self
3315    }
3316
3317    /// Sets the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3318    ///
3319    /// # Example
3320    /// ```ignore,no_run
3321    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3322    /// use google_cloud_dataform_v1::model::Workspace;
3323    /// let x = CreateWorkspaceRequest::new().set_workspace(Workspace::default()/* use setters */);
3324    /// ```
3325    pub fn set_workspace<T>(mut self, v: T) -> Self
3326    where
3327        T: std::convert::Into<crate::model::Workspace>,
3328    {
3329        self.workspace = std::option::Option::Some(v.into());
3330        self
3331    }
3332
3333    /// Sets or clears the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3334    ///
3335    /// # Example
3336    /// ```ignore,no_run
3337    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3338    /// use google_cloud_dataform_v1::model::Workspace;
3339    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(Some(Workspace::default()/* use setters */));
3340    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(None::<Workspace>);
3341    /// ```
3342    pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
3343    where
3344        T: std::convert::Into<crate::model::Workspace>,
3345    {
3346        self.workspace = v.map(|x| x.into());
3347        self
3348    }
3349
3350    /// Sets the value of [workspace_id][crate::model::CreateWorkspaceRequest::workspace_id].
3351    ///
3352    /// # Example
3353    /// ```ignore,no_run
3354    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3355    /// let x = CreateWorkspaceRequest::new().set_workspace_id("example");
3356    /// ```
3357    pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3358        self.workspace_id = v.into();
3359        self
3360    }
3361}
3362
3363impl wkt::message::Message for CreateWorkspaceRequest {
3364    fn typename() -> &'static str {
3365        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
3366    }
3367}
3368
3369/// `DeleteWorkspace` request message.
3370#[derive(Clone, Default, PartialEq)]
3371#[non_exhaustive]
3372pub struct DeleteWorkspaceRequest {
3373    /// Required. The workspace resource's name.
3374    pub name: std::string::String,
3375
3376    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3377}
3378
3379impl DeleteWorkspaceRequest {
3380    /// Creates a new default instance.
3381    pub fn new() -> Self {
3382        std::default::Default::default()
3383    }
3384
3385    /// Sets the value of [name][crate::model::DeleteWorkspaceRequest::name].
3386    ///
3387    /// # Example
3388    /// ```ignore,no_run
3389    /// # use google_cloud_dataform_v1::model::DeleteWorkspaceRequest;
3390    /// let x = DeleteWorkspaceRequest::new().set_name("example");
3391    /// ```
3392    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3393        self.name = v.into();
3394        self
3395    }
3396}
3397
3398impl wkt::message::Message for DeleteWorkspaceRequest {
3399    fn typename() -> &'static str {
3400        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
3401    }
3402}
3403
3404/// Represents the author of a Git commit.
3405#[derive(Clone, Default, PartialEq)]
3406#[non_exhaustive]
3407pub struct CommitAuthor {
3408    /// Required. The commit author's name.
3409    pub name: std::string::String,
3410
3411    /// Required. The commit author's email address.
3412    pub email_address: std::string::String,
3413
3414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3415}
3416
3417impl CommitAuthor {
3418    /// Creates a new default instance.
3419    pub fn new() -> Self {
3420        std::default::Default::default()
3421    }
3422
3423    /// Sets the value of [name][crate::model::CommitAuthor::name].
3424    ///
3425    /// # Example
3426    /// ```ignore,no_run
3427    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3428    /// let x = CommitAuthor::new().set_name("example");
3429    /// ```
3430    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3431        self.name = v.into();
3432        self
3433    }
3434
3435    /// Sets the value of [email_address][crate::model::CommitAuthor::email_address].
3436    ///
3437    /// # Example
3438    /// ```ignore,no_run
3439    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3440    /// let x = CommitAuthor::new().set_email_address("example");
3441    /// ```
3442    pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3443        self.email_address = v.into();
3444        self
3445    }
3446}
3447
3448impl wkt::message::Message for CommitAuthor {
3449    fn typename() -> &'static str {
3450        "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
3451    }
3452}
3453
3454/// `PullGitCommits` request message.
3455#[derive(Clone, Default, PartialEq)]
3456#[non_exhaustive]
3457pub struct PullGitCommitsRequest {
3458    /// Required. The workspace's name.
3459    pub name: std::string::String,
3460
3461    /// Optional. The name of the branch in the Git remote from which to pull
3462    /// commits. If left unset, the repository's default branch name will be used.
3463    pub remote_branch: std::string::String,
3464
3465    /// Required. The author of any merge commit which may be created as a result
3466    /// of merging fetched Git commits into this workspace.
3467    pub author: std::option::Option<crate::model::CommitAuthor>,
3468
3469    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3470}
3471
3472impl PullGitCommitsRequest {
3473    /// Creates a new default instance.
3474    pub fn new() -> Self {
3475        std::default::Default::default()
3476    }
3477
3478    /// Sets the value of [name][crate::model::PullGitCommitsRequest::name].
3479    ///
3480    /// # Example
3481    /// ```ignore,no_run
3482    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3483    /// let x = PullGitCommitsRequest::new().set_name("example");
3484    /// ```
3485    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3486        self.name = v.into();
3487        self
3488    }
3489
3490    /// Sets the value of [remote_branch][crate::model::PullGitCommitsRequest::remote_branch].
3491    ///
3492    /// # Example
3493    /// ```ignore,no_run
3494    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3495    /// let x = PullGitCommitsRequest::new().set_remote_branch("example");
3496    /// ```
3497    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3498        self.remote_branch = v.into();
3499        self
3500    }
3501
3502    /// Sets the value of [author][crate::model::PullGitCommitsRequest::author].
3503    ///
3504    /// # Example
3505    /// ```ignore,no_run
3506    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3507    /// use google_cloud_dataform_v1::model::CommitAuthor;
3508    /// let x = PullGitCommitsRequest::new().set_author(CommitAuthor::default()/* use setters */);
3509    /// ```
3510    pub fn set_author<T>(mut self, v: T) -> Self
3511    where
3512        T: std::convert::Into<crate::model::CommitAuthor>,
3513    {
3514        self.author = std::option::Option::Some(v.into());
3515        self
3516    }
3517
3518    /// Sets or clears the value of [author][crate::model::PullGitCommitsRequest::author].
3519    ///
3520    /// # Example
3521    /// ```ignore,no_run
3522    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3523    /// use google_cloud_dataform_v1::model::CommitAuthor;
3524    /// let x = PullGitCommitsRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
3525    /// let x = PullGitCommitsRequest::new().set_or_clear_author(None::<CommitAuthor>);
3526    /// ```
3527    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
3528    where
3529        T: std::convert::Into<crate::model::CommitAuthor>,
3530    {
3531        self.author = v.map(|x| x.into());
3532        self
3533    }
3534}
3535
3536impl wkt::message::Message for PullGitCommitsRequest {
3537    fn typename() -> &'static str {
3538        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
3539    }
3540}
3541
3542/// `PullGitCommits` response message.
3543#[derive(Clone, Default, PartialEq)]
3544#[non_exhaustive]
3545pub struct PullGitCommitsResponse {
3546    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3547}
3548
3549impl PullGitCommitsResponse {
3550    /// Creates a new default instance.
3551    pub fn new() -> Self {
3552        std::default::Default::default()
3553    }
3554}
3555
3556impl wkt::message::Message for PullGitCommitsResponse {
3557    fn typename() -> &'static str {
3558        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
3559    }
3560}
3561
3562/// `PushGitCommits` request message.
3563#[derive(Clone, Default, PartialEq)]
3564#[non_exhaustive]
3565pub struct PushGitCommitsRequest {
3566    /// Required. The workspace's name.
3567    pub name: std::string::String,
3568
3569    /// Optional. The name of the branch in the Git remote to which commits should
3570    /// be pushed. If left unset, the repository's default branch name will be
3571    /// used.
3572    pub remote_branch: std::string::String,
3573
3574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3575}
3576
3577impl PushGitCommitsRequest {
3578    /// Creates a new default instance.
3579    pub fn new() -> Self {
3580        std::default::Default::default()
3581    }
3582
3583    /// Sets the value of [name][crate::model::PushGitCommitsRequest::name].
3584    ///
3585    /// # Example
3586    /// ```ignore,no_run
3587    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3588    /// let x = PushGitCommitsRequest::new().set_name("example");
3589    /// ```
3590    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3591        self.name = v.into();
3592        self
3593    }
3594
3595    /// Sets the value of [remote_branch][crate::model::PushGitCommitsRequest::remote_branch].
3596    ///
3597    /// # Example
3598    /// ```ignore,no_run
3599    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3600    /// let x = PushGitCommitsRequest::new().set_remote_branch("example");
3601    /// ```
3602    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3603        self.remote_branch = v.into();
3604        self
3605    }
3606}
3607
3608impl wkt::message::Message for PushGitCommitsRequest {
3609    fn typename() -> &'static str {
3610        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
3611    }
3612}
3613
3614/// `PushGitCommits` response message.
3615#[derive(Clone, Default, PartialEq)]
3616#[non_exhaustive]
3617pub struct PushGitCommitsResponse {
3618    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3619}
3620
3621impl PushGitCommitsResponse {
3622    /// Creates a new default instance.
3623    pub fn new() -> Self {
3624        std::default::Default::default()
3625    }
3626}
3627
3628impl wkt::message::Message for PushGitCommitsResponse {
3629    fn typename() -> &'static str {
3630        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
3631    }
3632}
3633
3634/// `FetchFileGitStatuses` request message.
3635#[derive(Clone, Default, PartialEq)]
3636#[non_exhaustive]
3637pub struct FetchFileGitStatusesRequest {
3638    /// Required. The workspace's name.
3639    pub name: std::string::String,
3640
3641    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3642}
3643
3644impl FetchFileGitStatusesRequest {
3645    /// Creates a new default instance.
3646    pub fn new() -> Self {
3647        std::default::Default::default()
3648    }
3649
3650    /// Sets the value of [name][crate::model::FetchFileGitStatusesRequest::name].
3651    ///
3652    /// # Example
3653    /// ```ignore,no_run
3654    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesRequest;
3655    /// let x = FetchFileGitStatusesRequest::new().set_name("example");
3656    /// ```
3657    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3658        self.name = v.into();
3659        self
3660    }
3661}
3662
3663impl wkt::message::Message for FetchFileGitStatusesRequest {
3664    fn typename() -> &'static str {
3665        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
3666    }
3667}
3668
3669/// `FetchFileGitStatuses` response message.
3670#[derive(Clone, Default, PartialEq)]
3671#[non_exhaustive]
3672pub struct FetchFileGitStatusesResponse {
3673    /// A list of all files which have uncommitted Git changes. There will only be
3674    /// a single entry for any given file.
3675    pub uncommitted_file_changes:
3676        std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
3677
3678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3679}
3680
3681impl FetchFileGitStatusesResponse {
3682    /// Creates a new default instance.
3683    pub fn new() -> Self {
3684        std::default::Default::default()
3685    }
3686
3687    /// Sets the value of [uncommitted_file_changes][crate::model::FetchFileGitStatusesResponse::uncommitted_file_changes].
3688    ///
3689    /// # Example
3690    /// ```ignore,no_run
3691    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesResponse;
3692    /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3693    /// let x = FetchFileGitStatusesResponse::new()
3694    ///     .set_uncommitted_file_changes([
3695    ///         UncommittedFileChange::default()/* use setters */,
3696    ///         UncommittedFileChange::default()/* use (different) setters */,
3697    ///     ]);
3698    /// ```
3699    pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
3700    where
3701        T: std::iter::IntoIterator<Item = V>,
3702        V: std::convert::Into<
3703                crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
3704            >,
3705    {
3706        use std::iter::Iterator;
3707        self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
3708        self
3709    }
3710}
3711
3712impl wkt::message::Message for FetchFileGitStatusesResponse {
3713    fn typename() -> &'static str {
3714        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
3715    }
3716}
3717
3718/// Defines additional types related to [FetchFileGitStatusesResponse].
3719pub mod fetch_file_git_statuses_response {
3720    #[allow(unused_imports)]
3721    use super::*;
3722
3723    /// Represents the Git state of a file with uncommitted changes.
3724    #[derive(Clone, Default, PartialEq)]
3725    #[non_exhaustive]
3726    pub struct UncommittedFileChange {
3727        /// The file's full path including filename, relative to the workspace root.
3728        pub path: std::string::String,
3729
3730        /// Output only. Indicates the status of the file.
3731        pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3732
3733        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3734    }
3735
3736    impl UncommittedFileChange {
3737        /// Creates a new default instance.
3738        pub fn new() -> Self {
3739            std::default::Default::default()
3740        }
3741
3742        /// Sets the value of [path][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::path].
3743        ///
3744        /// # Example
3745        /// ```ignore,no_run
3746        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3747        /// let x = UncommittedFileChange::new().set_path("example");
3748        /// ```
3749        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3750            self.path = v.into();
3751            self
3752        }
3753
3754        /// Sets the value of [state][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::state].
3755        ///
3756        /// # Example
3757        /// ```ignore,no_run
3758        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3759        /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::uncommitted_file_change::State;
3760        /// let x0 = UncommittedFileChange::new().set_state(State::Added);
3761        /// let x1 = UncommittedFileChange::new().set_state(State::Deleted);
3762        /// let x2 = UncommittedFileChange::new().set_state(State::Modified);
3763        /// ```
3764        pub fn set_state<
3765            T: std::convert::Into<
3766                    crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3767                >,
3768        >(
3769            mut self,
3770            v: T,
3771        ) -> Self {
3772            self.state = v.into();
3773            self
3774        }
3775    }
3776
3777    impl wkt::message::Message for UncommittedFileChange {
3778        fn typename() -> &'static str {
3779            "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
3780        }
3781    }
3782
3783    /// Defines additional types related to [UncommittedFileChange].
3784    pub mod uncommitted_file_change {
3785        #[allow(unused_imports)]
3786        use super::*;
3787
3788        /// Indicates the status of an uncommitted file change.
3789        ///
3790        /// # Working with unknown values
3791        ///
3792        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3793        /// additional enum variants at any time. Adding new variants is not considered
3794        /// a breaking change. Applications should write their code in anticipation of:
3795        ///
3796        /// - New values appearing in future releases of the client library, **and**
3797        /// - New values received dynamically, without application changes.
3798        ///
3799        /// Please consult the [Working with enums] section in the user guide for some
3800        /// guidelines.
3801        ///
3802        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3803        #[derive(Clone, Debug, PartialEq)]
3804        #[non_exhaustive]
3805        pub enum State {
3806            /// Default value. This value is unused.
3807            Unspecified,
3808            /// The file has been newly added.
3809            Added,
3810            /// The file has been deleted.
3811            Deleted,
3812            /// The file has been modified.
3813            Modified,
3814            /// The file contains merge conflicts.
3815            HasConflicts,
3816            /// If set, the enum was initialized with an unknown value.
3817            ///
3818            /// Applications can examine the value using [State::value] or
3819            /// [State::name].
3820            UnknownValue(state::UnknownValue),
3821        }
3822
3823        #[doc(hidden)]
3824        pub mod state {
3825            #[allow(unused_imports)]
3826            use super::*;
3827            #[derive(Clone, Debug, PartialEq)]
3828            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3829        }
3830
3831        impl State {
3832            /// Gets the enum value.
3833            ///
3834            /// Returns `None` if the enum contains an unknown value deserialized from
3835            /// the string representation of enums.
3836            pub fn value(&self) -> std::option::Option<i32> {
3837                match self {
3838                    Self::Unspecified => std::option::Option::Some(0),
3839                    Self::Added => std::option::Option::Some(1),
3840                    Self::Deleted => std::option::Option::Some(2),
3841                    Self::Modified => std::option::Option::Some(3),
3842                    Self::HasConflicts => std::option::Option::Some(4),
3843                    Self::UnknownValue(u) => u.0.value(),
3844                }
3845            }
3846
3847            /// Gets the enum value as a string.
3848            ///
3849            /// Returns `None` if the enum contains an unknown value deserialized from
3850            /// the integer representation of enums.
3851            pub fn name(&self) -> std::option::Option<&str> {
3852                match self {
3853                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
3854                    Self::Added => std::option::Option::Some("ADDED"),
3855                    Self::Deleted => std::option::Option::Some("DELETED"),
3856                    Self::Modified => std::option::Option::Some("MODIFIED"),
3857                    Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
3858                    Self::UnknownValue(u) => u.0.name(),
3859                }
3860            }
3861        }
3862
3863        impl std::default::Default for State {
3864            fn default() -> Self {
3865                use std::convert::From;
3866                Self::from(0)
3867            }
3868        }
3869
3870        impl std::fmt::Display for State {
3871            fn fmt(
3872                &self,
3873                f: &mut std::fmt::Formatter<'_>,
3874            ) -> std::result::Result<(), std::fmt::Error> {
3875                wkt::internal::display_enum(f, self.name(), self.value())
3876            }
3877        }
3878
3879        impl std::convert::From<i32> for State {
3880            fn from(value: i32) -> Self {
3881                match value {
3882                    0 => Self::Unspecified,
3883                    1 => Self::Added,
3884                    2 => Self::Deleted,
3885                    3 => Self::Modified,
3886                    4 => Self::HasConflicts,
3887                    _ => Self::UnknownValue(state::UnknownValue(
3888                        wkt::internal::UnknownEnumValue::Integer(value),
3889                    )),
3890                }
3891            }
3892        }
3893
3894        impl std::convert::From<&str> for State {
3895            fn from(value: &str) -> Self {
3896                use std::string::ToString;
3897                match value {
3898                    "STATE_UNSPECIFIED" => Self::Unspecified,
3899                    "ADDED" => Self::Added,
3900                    "DELETED" => Self::Deleted,
3901                    "MODIFIED" => Self::Modified,
3902                    "HAS_CONFLICTS" => Self::HasConflicts,
3903                    _ => Self::UnknownValue(state::UnknownValue(
3904                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3905                    )),
3906                }
3907            }
3908        }
3909
3910        impl serde::ser::Serialize for State {
3911            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3912            where
3913                S: serde::Serializer,
3914            {
3915                match self {
3916                    Self::Unspecified => serializer.serialize_i32(0),
3917                    Self::Added => serializer.serialize_i32(1),
3918                    Self::Deleted => serializer.serialize_i32(2),
3919                    Self::Modified => serializer.serialize_i32(3),
3920                    Self::HasConflicts => serializer.serialize_i32(4),
3921                    Self::UnknownValue(u) => u.0.serialize(serializer),
3922                }
3923            }
3924        }
3925
3926        impl<'de> serde::de::Deserialize<'de> for State {
3927            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3928            where
3929                D: serde::Deserializer<'de>,
3930            {
3931                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
3932                    ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
3933            }
3934        }
3935    }
3936}
3937
3938/// `FetchGitAheadBehind` request message.
3939#[derive(Clone, Default, PartialEq)]
3940#[non_exhaustive]
3941pub struct FetchGitAheadBehindRequest {
3942    /// Required. The workspace's name.
3943    pub name: std::string::String,
3944
3945    /// Optional. The name of the branch in the Git remote against which this
3946    /// workspace should be compared. If left unset, the repository's default
3947    /// branch name will be used.
3948    pub remote_branch: std::string::String,
3949
3950    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3951}
3952
3953impl FetchGitAheadBehindRequest {
3954    /// Creates a new default instance.
3955    pub fn new() -> Self {
3956        std::default::Default::default()
3957    }
3958
3959    /// Sets the value of [name][crate::model::FetchGitAheadBehindRequest::name].
3960    ///
3961    /// # Example
3962    /// ```ignore,no_run
3963    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
3964    /// let x = FetchGitAheadBehindRequest::new().set_name("example");
3965    /// ```
3966    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3967        self.name = v.into();
3968        self
3969    }
3970
3971    /// Sets the value of [remote_branch][crate::model::FetchGitAheadBehindRequest::remote_branch].
3972    ///
3973    /// # Example
3974    /// ```ignore,no_run
3975    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
3976    /// let x = FetchGitAheadBehindRequest::new().set_remote_branch("example");
3977    /// ```
3978    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3979        self.remote_branch = v.into();
3980        self
3981    }
3982}
3983
3984impl wkt::message::Message for FetchGitAheadBehindRequest {
3985    fn typename() -> &'static str {
3986        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
3987    }
3988}
3989
3990/// `FetchGitAheadBehind` response message.
3991#[derive(Clone, Default, PartialEq)]
3992#[non_exhaustive]
3993pub struct FetchGitAheadBehindResponse {
3994    /// The number of commits in the remote branch that are not in the workspace.
3995    pub commits_ahead: i32,
3996
3997    /// The number of commits in the workspace that are not in the remote branch.
3998    pub commits_behind: i32,
3999
4000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4001}
4002
4003impl FetchGitAheadBehindResponse {
4004    /// Creates a new default instance.
4005    pub fn new() -> Self {
4006        std::default::Default::default()
4007    }
4008
4009    /// Sets the value of [commits_ahead][crate::model::FetchGitAheadBehindResponse::commits_ahead].
4010    ///
4011    /// # Example
4012    /// ```ignore,no_run
4013    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
4014    /// let x = FetchGitAheadBehindResponse::new().set_commits_ahead(42);
4015    /// ```
4016    pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4017        self.commits_ahead = v.into();
4018        self
4019    }
4020
4021    /// Sets the value of [commits_behind][crate::model::FetchGitAheadBehindResponse::commits_behind].
4022    ///
4023    /// # Example
4024    /// ```ignore,no_run
4025    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
4026    /// let x = FetchGitAheadBehindResponse::new().set_commits_behind(42);
4027    /// ```
4028    pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4029        self.commits_behind = v.into();
4030        self
4031    }
4032}
4033
4034impl wkt::message::Message for FetchGitAheadBehindResponse {
4035    fn typename() -> &'static str {
4036        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
4037    }
4038}
4039
4040/// `CommitWorkspaceChanges` request message.
4041#[derive(Clone, Default, PartialEq)]
4042#[non_exhaustive]
4043pub struct CommitWorkspaceChangesRequest {
4044    /// Required. The workspace's name.
4045    pub name: std::string::String,
4046
4047    /// Required. The commit's author.
4048    pub author: std::option::Option<crate::model::CommitAuthor>,
4049
4050    /// Optional. The commit's message.
4051    pub commit_message: std::string::String,
4052
4053    /// Optional. Full file paths to commit including filename, rooted at workspace
4054    /// root. If left empty, all files will be committed.
4055    pub paths: std::vec::Vec<std::string::String>,
4056
4057    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4058}
4059
4060impl CommitWorkspaceChangesRequest {
4061    /// Creates a new default instance.
4062    pub fn new() -> Self {
4063        std::default::Default::default()
4064    }
4065
4066    /// Sets the value of [name][crate::model::CommitWorkspaceChangesRequest::name].
4067    ///
4068    /// # Example
4069    /// ```ignore,no_run
4070    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4071    /// let x = CommitWorkspaceChangesRequest::new().set_name("example");
4072    /// ```
4073    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4074        self.name = v.into();
4075        self
4076    }
4077
4078    /// Sets the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
4079    ///
4080    /// # Example
4081    /// ```ignore,no_run
4082    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4083    /// use google_cloud_dataform_v1::model::CommitAuthor;
4084    /// let x = CommitWorkspaceChangesRequest::new().set_author(CommitAuthor::default()/* use setters */);
4085    /// ```
4086    pub fn set_author<T>(mut self, v: T) -> Self
4087    where
4088        T: std::convert::Into<crate::model::CommitAuthor>,
4089    {
4090        self.author = std::option::Option::Some(v.into());
4091        self
4092    }
4093
4094    /// Sets or clears the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
4095    ///
4096    /// # Example
4097    /// ```ignore,no_run
4098    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4099    /// use google_cloud_dataform_v1::model::CommitAuthor;
4100    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
4101    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(None::<CommitAuthor>);
4102    /// ```
4103    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
4104    where
4105        T: std::convert::Into<crate::model::CommitAuthor>,
4106    {
4107        self.author = v.map(|x| x.into());
4108        self
4109    }
4110
4111    /// Sets the value of [commit_message][crate::model::CommitWorkspaceChangesRequest::commit_message].
4112    ///
4113    /// # Example
4114    /// ```ignore,no_run
4115    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4116    /// let x = CommitWorkspaceChangesRequest::new().set_commit_message("example");
4117    /// ```
4118    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4119        self.commit_message = v.into();
4120        self
4121    }
4122
4123    /// Sets the value of [paths][crate::model::CommitWorkspaceChangesRequest::paths].
4124    ///
4125    /// # Example
4126    /// ```ignore,no_run
4127    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4128    /// let x = CommitWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
4129    /// ```
4130    pub fn set_paths<T, V>(mut self, v: T) -> Self
4131    where
4132        T: std::iter::IntoIterator<Item = V>,
4133        V: std::convert::Into<std::string::String>,
4134    {
4135        use std::iter::Iterator;
4136        self.paths = v.into_iter().map(|i| i.into()).collect();
4137        self
4138    }
4139}
4140
4141impl wkt::message::Message for CommitWorkspaceChangesRequest {
4142    fn typename() -> &'static str {
4143        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
4144    }
4145}
4146
4147/// `CommitWorkspaceChanges` response message.
4148#[derive(Clone, Default, PartialEq)]
4149#[non_exhaustive]
4150pub struct CommitWorkspaceChangesResponse {
4151    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4152}
4153
4154impl CommitWorkspaceChangesResponse {
4155    /// Creates a new default instance.
4156    pub fn new() -> Self {
4157        std::default::Default::default()
4158    }
4159}
4160
4161impl wkt::message::Message for CommitWorkspaceChangesResponse {
4162    fn typename() -> &'static str {
4163        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
4164    }
4165}
4166
4167/// `ResetWorkspaceChanges` request message.
4168#[derive(Clone, Default, PartialEq)]
4169#[non_exhaustive]
4170pub struct ResetWorkspaceChangesRequest {
4171    /// Required. The workspace's name.
4172    pub name: std::string::String,
4173
4174    /// Optional. Full file paths to reset back to their committed state including
4175    /// filename, rooted at workspace root. If left empty, all files will be reset.
4176    pub paths: std::vec::Vec<std::string::String>,
4177
4178    /// Optional. If set to true, untracked files will be deleted.
4179    pub clean: bool,
4180
4181    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4182}
4183
4184impl ResetWorkspaceChangesRequest {
4185    /// Creates a new default instance.
4186    pub fn new() -> Self {
4187        std::default::Default::default()
4188    }
4189
4190    /// Sets the value of [name][crate::model::ResetWorkspaceChangesRequest::name].
4191    ///
4192    /// # Example
4193    /// ```ignore,no_run
4194    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4195    /// let x = ResetWorkspaceChangesRequest::new().set_name("example");
4196    /// ```
4197    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4198        self.name = v.into();
4199        self
4200    }
4201
4202    /// Sets the value of [paths][crate::model::ResetWorkspaceChangesRequest::paths].
4203    ///
4204    /// # Example
4205    /// ```ignore,no_run
4206    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4207    /// let x = ResetWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
4208    /// ```
4209    pub fn set_paths<T, V>(mut self, v: T) -> Self
4210    where
4211        T: std::iter::IntoIterator<Item = V>,
4212        V: std::convert::Into<std::string::String>,
4213    {
4214        use std::iter::Iterator;
4215        self.paths = v.into_iter().map(|i| i.into()).collect();
4216        self
4217    }
4218
4219    /// Sets the value of [clean][crate::model::ResetWorkspaceChangesRequest::clean].
4220    ///
4221    /// # Example
4222    /// ```ignore,no_run
4223    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4224    /// let x = ResetWorkspaceChangesRequest::new().set_clean(true);
4225    /// ```
4226    pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4227        self.clean = v.into();
4228        self
4229    }
4230}
4231
4232impl wkt::message::Message for ResetWorkspaceChangesRequest {
4233    fn typename() -> &'static str {
4234        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
4235    }
4236}
4237
4238/// `ResetWorkspaceChanges` response message.
4239#[derive(Clone, Default, PartialEq)]
4240#[non_exhaustive]
4241pub struct ResetWorkspaceChangesResponse {
4242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4243}
4244
4245impl ResetWorkspaceChangesResponse {
4246    /// Creates a new default instance.
4247    pub fn new() -> Self {
4248        std::default::Default::default()
4249    }
4250}
4251
4252impl wkt::message::Message for ResetWorkspaceChangesResponse {
4253    fn typename() -> &'static str {
4254        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
4255    }
4256}
4257
4258/// `FetchFileDiff` request message.
4259#[derive(Clone, Default, PartialEq)]
4260#[non_exhaustive]
4261pub struct FetchFileDiffRequest {
4262    /// Required. The workspace's name.
4263    pub workspace: std::string::String,
4264
4265    /// Required. The file's full path including filename, relative to the
4266    /// workspace root.
4267    pub path: std::string::String,
4268
4269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4270}
4271
4272impl FetchFileDiffRequest {
4273    /// Creates a new default instance.
4274    pub fn new() -> Self {
4275        std::default::Default::default()
4276    }
4277
4278    /// Sets the value of [workspace][crate::model::FetchFileDiffRequest::workspace].
4279    ///
4280    /// # Example
4281    /// ```ignore,no_run
4282    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
4283    /// let x = FetchFileDiffRequest::new().set_workspace("example");
4284    /// ```
4285    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4286        self.workspace = v.into();
4287        self
4288    }
4289
4290    /// Sets the value of [path][crate::model::FetchFileDiffRequest::path].
4291    ///
4292    /// # Example
4293    /// ```ignore,no_run
4294    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
4295    /// let x = FetchFileDiffRequest::new().set_path("example");
4296    /// ```
4297    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4298        self.path = v.into();
4299        self
4300    }
4301}
4302
4303impl wkt::message::Message for FetchFileDiffRequest {
4304    fn typename() -> &'static str {
4305        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
4306    }
4307}
4308
4309/// `FetchFileDiff` response message.
4310#[derive(Clone, Default, PartialEq)]
4311#[non_exhaustive]
4312pub struct FetchFileDiffResponse {
4313    /// The raw formatted Git diff for the file.
4314    pub formatted_diff: std::string::String,
4315
4316    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4317}
4318
4319impl FetchFileDiffResponse {
4320    /// Creates a new default instance.
4321    pub fn new() -> Self {
4322        std::default::Default::default()
4323    }
4324
4325    /// Sets the value of [formatted_diff][crate::model::FetchFileDiffResponse::formatted_diff].
4326    ///
4327    /// # Example
4328    /// ```ignore,no_run
4329    /// # use google_cloud_dataform_v1::model::FetchFileDiffResponse;
4330    /// let x = FetchFileDiffResponse::new().set_formatted_diff("example");
4331    /// ```
4332    pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4333        self.formatted_diff = v.into();
4334        self
4335    }
4336}
4337
4338impl wkt::message::Message for FetchFileDiffResponse {
4339    fn typename() -> &'static str {
4340        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
4341    }
4342}
4343
4344/// `QueryDirectoryContents` request message.
4345#[derive(Clone, Default, PartialEq)]
4346#[non_exhaustive]
4347pub struct QueryDirectoryContentsRequest {
4348    /// Required. The workspace's name.
4349    pub workspace: std::string::String,
4350
4351    /// Optional. The directory's full path including directory name, relative to
4352    /// the workspace root. If left unset, the workspace root is used.
4353    pub path: std::string::String,
4354
4355    /// Optional. Maximum number of paths to return. The server may return fewer
4356    /// items than requested. If unspecified, the server will pick an appropriate
4357    /// default.
4358    pub page_size: i32,
4359
4360    /// Optional. Page token received from a previous `QueryDirectoryContents`
4361    /// call. Provide this to retrieve the subsequent page.
4362    ///
4363    /// When paginating, all other parameters provided to
4364    /// `QueryDirectoryContents`, with the exception of `page_size`, must match the
4365    /// call that provided the page token.
4366    pub page_token: std::string::String,
4367
4368    /// Optional. Specifies the metadata to return for each directory entry.
4369    /// If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`.
4370    /// Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by
4371    /// CMEK-protected workspaces.
4372    pub view: crate::model::DirectoryContentsView,
4373
4374    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4375}
4376
4377impl QueryDirectoryContentsRequest {
4378    /// Creates a new default instance.
4379    pub fn new() -> Self {
4380        std::default::Default::default()
4381    }
4382
4383    /// Sets the value of [workspace][crate::model::QueryDirectoryContentsRequest::workspace].
4384    ///
4385    /// # Example
4386    /// ```ignore,no_run
4387    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4388    /// let x = QueryDirectoryContentsRequest::new().set_workspace("example");
4389    /// ```
4390    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4391        self.workspace = v.into();
4392        self
4393    }
4394
4395    /// Sets the value of [path][crate::model::QueryDirectoryContentsRequest::path].
4396    ///
4397    /// # Example
4398    /// ```ignore,no_run
4399    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4400    /// let x = QueryDirectoryContentsRequest::new().set_path("example");
4401    /// ```
4402    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4403        self.path = v.into();
4404        self
4405    }
4406
4407    /// Sets the value of [page_size][crate::model::QueryDirectoryContentsRequest::page_size].
4408    ///
4409    /// # Example
4410    /// ```ignore,no_run
4411    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4412    /// let x = QueryDirectoryContentsRequest::new().set_page_size(42);
4413    /// ```
4414    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4415        self.page_size = v.into();
4416        self
4417    }
4418
4419    /// Sets the value of [page_token][crate::model::QueryDirectoryContentsRequest::page_token].
4420    ///
4421    /// # Example
4422    /// ```ignore,no_run
4423    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4424    /// let x = QueryDirectoryContentsRequest::new().set_page_token("example");
4425    /// ```
4426    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4427        self.page_token = v.into();
4428        self
4429    }
4430
4431    /// Sets the value of [view][crate::model::QueryDirectoryContentsRequest::view].
4432    ///
4433    /// # Example
4434    /// ```ignore,no_run
4435    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4436    /// use google_cloud_dataform_v1::model::DirectoryContentsView;
4437    /// let x0 = QueryDirectoryContentsRequest::new().set_view(DirectoryContentsView::Basic);
4438    /// let x1 = QueryDirectoryContentsRequest::new().set_view(DirectoryContentsView::Metadata);
4439    /// ```
4440    pub fn set_view<T: std::convert::Into<crate::model::DirectoryContentsView>>(
4441        mut self,
4442        v: T,
4443    ) -> Self {
4444        self.view = v.into();
4445        self
4446    }
4447}
4448
4449impl wkt::message::Message for QueryDirectoryContentsRequest {
4450    fn typename() -> &'static str {
4451        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
4452    }
4453}
4454
4455/// `QueryDirectoryContents` response message.
4456#[derive(Clone, Default, PartialEq)]
4457#[non_exhaustive]
4458pub struct QueryDirectoryContentsResponse {
4459    /// List of entries in the directory.
4460    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
4461
4462    /// A token, which can be sent as `page_token` to retrieve the next page.
4463    /// If this field is omitted, there are no subsequent pages.
4464    pub next_page_token: std::string::String,
4465
4466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4467}
4468
4469impl QueryDirectoryContentsResponse {
4470    /// Creates a new default instance.
4471    pub fn new() -> Self {
4472        std::default::Default::default()
4473    }
4474
4475    /// Sets the value of [directory_entries][crate::model::QueryDirectoryContentsResponse::directory_entries].
4476    ///
4477    /// # Example
4478    /// ```ignore,no_run
4479    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4480    /// use google_cloud_dataform_v1::model::DirectoryEntry;
4481    /// let x = QueryDirectoryContentsResponse::new()
4482    ///     .set_directory_entries([
4483    ///         DirectoryEntry::default()/* use setters */,
4484    ///         DirectoryEntry::default()/* use (different) setters */,
4485    ///     ]);
4486    /// ```
4487    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
4488    where
4489        T: std::iter::IntoIterator<Item = V>,
4490        V: std::convert::Into<crate::model::DirectoryEntry>,
4491    {
4492        use std::iter::Iterator;
4493        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
4494        self
4495    }
4496
4497    /// Sets the value of [next_page_token][crate::model::QueryDirectoryContentsResponse::next_page_token].
4498    ///
4499    /// # Example
4500    /// ```ignore,no_run
4501    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4502    /// let x = QueryDirectoryContentsResponse::new().set_next_page_token("example");
4503    /// ```
4504    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4505        self.next_page_token = v.into();
4506        self
4507    }
4508}
4509
4510impl wkt::message::Message for QueryDirectoryContentsResponse {
4511    fn typename() -> &'static str {
4512        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
4513    }
4514}
4515
4516#[doc(hidden)]
4517impl google_cloud_gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
4518    type PageItem = crate::model::DirectoryEntry;
4519
4520    fn items(self) -> std::vec::Vec<Self::PageItem> {
4521        self.directory_entries
4522    }
4523
4524    fn next_page_token(&self) -> std::string::String {
4525        use std::clone::Clone;
4526        self.next_page_token.clone()
4527    }
4528}
4529
4530/// Represents a single entry in a directory.
4531#[derive(Clone, Default, PartialEq)]
4532#[non_exhaustive]
4533pub struct DirectoryEntry {
4534    /// Entry with metadata.
4535    pub metadata: std::option::Option<crate::model::FilesystemEntryMetadata>,
4536
4537    /// The entry's contents.
4538    pub entry: std::option::Option<crate::model::directory_entry::Entry>,
4539
4540    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4541}
4542
4543impl DirectoryEntry {
4544    /// Creates a new default instance.
4545    pub fn new() -> Self {
4546        std::default::Default::default()
4547    }
4548
4549    /// Sets the value of [metadata][crate::model::DirectoryEntry::metadata].
4550    ///
4551    /// # Example
4552    /// ```ignore,no_run
4553    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4554    /// use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4555    /// let x = DirectoryEntry::new().set_metadata(FilesystemEntryMetadata::default()/* use setters */);
4556    /// ```
4557    pub fn set_metadata<T>(mut self, v: T) -> Self
4558    where
4559        T: std::convert::Into<crate::model::FilesystemEntryMetadata>,
4560    {
4561        self.metadata = std::option::Option::Some(v.into());
4562        self
4563    }
4564
4565    /// Sets or clears the value of [metadata][crate::model::DirectoryEntry::metadata].
4566    ///
4567    /// # Example
4568    /// ```ignore,no_run
4569    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4570    /// use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4571    /// let x = DirectoryEntry::new().set_or_clear_metadata(Some(FilesystemEntryMetadata::default()/* use setters */));
4572    /// let x = DirectoryEntry::new().set_or_clear_metadata(None::<FilesystemEntryMetadata>);
4573    /// ```
4574    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
4575    where
4576        T: std::convert::Into<crate::model::FilesystemEntryMetadata>,
4577    {
4578        self.metadata = v.map(|x| x.into());
4579        self
4580    }
4581
4582    /// Sets the value of [entry][crate::model::DirectoryEntry::entry].
4583    ///
4584    /// Note that all the setters affecting `entry` are mutually
4585    /// exclusive.
4586    ///
4587    /// # Example
4588    /// ```ignore,no_run
4589    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4590    /// use google_cloud_dataform_v1::model::directory_entry::Entry;
4591    /// let x = DirectoryEntry::new().set_entry(Some(Entry::File("example".to_string())));
4592    /// ```
4593    pub fn set_entry<
4594        T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
4595    >(
4596        mut self,
4597        v: T,
4598    ) -> Self {
4599        self.entry = v.into();
4600        self
4601    }
4602
4603    /// The value of [entry][crate::model::DirectoryEntry::entry]
4604    /// if it holds a `File`, `None` if the field is not set or
4605    /// holds a different branch.
4606    pub fn file(&self) -> std::option::Option<&std::string::String> {
4607        #[allow(unreachable_patterns)]
4608        self.entry.as_ref().and_then(|v| match v {
4609            crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
4610            _ => std::option::Option::None,
4611        })
4612    }
4613
4614    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4615    /// to hold a `File`.
4616    ///
4617    /// Note that all the setters affecting `entry` are
4618    /// mutually exclusive.
4619    ///
4620    /// # Example
4621    /// ```ignore,no_run
4622    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4623    /// let x = DirectoryEntry::new().set_file("example");
4624    /// assert!(x.file().is_some());
4625    /// assert!(x.directory().is_none());
4626    /// ```
4627    pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4628        self.entry =
4629            std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
4630        self
4631    }
4632
4633    /// The value of [entry][crate::model::DirectoryEntry::entry]
4634    /// if it holds a `Directory`, `None` if the field is not set or
4635    /// holds a different branch.
4636    pub fn directory(&self) -> std::option::Option<&std::string::String> {
4637        #[allow(unreachable_patterns)]
4638        self.entry.as_ref().and_then(|v| match v {
4639            crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
4640            _ => std::option::Option::None,
4641        })
4642    }
4643
4644    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4645    /// to hold a `Directory`.
4646    ///
4647    /// Note that all the setters affecting `entry` are
4648    /// mutually exclusive.
4649    ///
4650    /// # Example
4651    /// ```ignore,no_run
4652    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4653    /// let x = DirectoryEntry::new().set_directory("example");
4654    /// assert!(x.directory().is_some());
4655    /// assert!(x.file().is_none());
4656    /// ```
4657    pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4658        self.entry =
4659            std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
4660        self
4661    }
4662}
4663
4664impl wkt::message::Message for DirectoryEntry {
4665    fn typename() -> &'static str {
4666        "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
4667    }
4668}
4669
4670/// Defines additional types related to [DirectoryEntry].
4671pub mod directory_entry {
4672    #[allow(unused_imports)]
4673    use super::*;
4674
4675    /// The entry's contents.
4676    #[derive(Clone, Debug, PartialEq)]
4677    #[non_exhaustive]
4678    pub enum Entry {
4679        /// A file in the directory.
4680        File(std::string::String),
4681        /// A child directory in the directory.
4682        Directory(std::string::String),
4683    }
4684}
4685
4686/// Represents metadata for a single entry in a filesystem.
4687#[derive(Clone, Default, PartialEq)]
4688#[non_exhaustive]
4689pub struct FilesystemEntryMetadata {
4690    /// Output only. Provides the size of the entry in bytes. For directories, this
4691    /// will be 0.
4692    pub size_bytes: i64,
4693
4694    /// Output only. Represents the time of the last modification of the entry.
4695    pub update_time: std::option::Option<wkt::Timestamp>,
4696
4697    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4698}
4699
4700impl FilesystemEntryMetadata {
4701    /// Creates a new default instance.
4702    pub fn new() -> Self {
4703        std::default::Default::default()
4704    }
4705
4706    /// Sets the value of [size_bytes][crate::model::FilesystemEntryMetadata::size_bytes].
4707    ///
4708    /// # Example
4709    /// ```ignore,no_run
4710    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4711    /// let x = FilesystemEntryMetadata::new().set_size_bytes(42);
4712    /// ```
4713    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4714        self.size_bytes = v.into();
4715        self
4716    }
4717
4718    /// Sets the value of [update_time][crate::model::FilesystemEntryMetadata::update_time].
4719    ///
4720    /// # Example
4721    /// ```ignore,no_run
4722    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4723    /// use wkt::Timestamp;
4724    /// let x = FilesystemEntryMetadata::new().set_update_time(Timestamp::default()/* use setters */);
4725    /// ```
4726    pub fn set_update_time<T>(mut self, v: T) -> Self
4727    where
4728        T: std::convert::Into<wkt::Timestamp>,
4729    {
4730        self.update_time = std::option::Option::Some(v.into());
4731        self
4732    }
4733
4734    /// Sets or clears the value of [update_time][crate::model::FilesystemEntryMetadata::update_time].
4735    ///
4736    /// # Example
4737    /// ```ignore,no_run
4738    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4739    /// use wkt::Timestamp;
4740    /// let x = FilesystemEntryMetadata::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
4741    /// let x = FilesystemEntryMetadata::new().set_or_clear_update_time(None::<Timestamp>);
4742    /// ```
4743    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4744    where
4745        T: std::convert::Into<wkt::Timestamp>,
4746    {
4747        self.update_time = v.map(|x| x.into());
4748        self
4749    }
4750}
4751
4752impl wkt::message::Message for FilesystemEntryMetadata {
4753    fn typename() -> &'static str {
4754        "type.googleapis.com/google.cloud.dataform.v1.FilesystemEntryMetadata"
4755    }
4756}
4757
4758/// Configuration containing file search request parameters.
4759#[derive(Clone, Default, PartialEq)]
4760#[non_exhaustive]
4761pub struct SearchFilesRequest {
4762    /// Required. The workspace's name.
4763    pub workspace: std::string::String,
4764
4765    /// Optional. Maximum number of search results to return. The server may return
4766    /// fewer items than requested. If unspecified, the server will pick an
4767    /// appropriate default.
4768    pub page_size: i32,
4769
4770    /// Optional. Page token received from a previous `SearchFilesRequest`
4771    /// call. Provide this to retrieve the subsequent page.
4772    ///
4773    /// When paginating, all other parameters provided to `SearchFilesRequest`,
4774    /// with the exception of `page_size`, must match the call that provided the
4775    /// page token.
4776    pub page_token: std::string::String,
4777
4778    /// Optional. Optional filter for the returned list in filtering format.
4779    /// Filtering is only currently supported on the `path` field.
4780    /// See <https://google.aip.dev/160> for details.
4781    pub filter: std::string::String,
4782
4783    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4784}
4785
4786impl SearchFilesRequest {
4787    /// Creates a new default instance.
4788    pub fn new() -> Self {
4789        std::default::Default::default()
4790    }
4791
4792    /// Sets the value of [workspace][crate::model::SearchFilesRequest::workspace].
4793    ///
4794    /// # Example
4795    /// ```ignore,no_run
4796    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4797    /// let x = SearchFilesRequest::new().set_workspace("example");
4798    /// ```
4799    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4800        self.workspace = v.into();
4801        self
4802    }
4803
4804    /// Sets the value of [page_size][crate::model::SearchFilesRequest::page_size].
4805    ///
4806    /// # Example
4807    /// ```ignore,no_run
4808    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4809    /// let x = SearchFilesRequest::new().set_page_size(42);
4810    /// ```
4811    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4812        self.page_size = v.into();
4813        self
4814    }
4815
4816    /// Sets the value of [page_token][crate::model::SearchFilesRequest::page_token].
4817    ///
4818    /// # Example
4819    /// ```ignore,no_run
4820    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4821    /// let x = SearchFilesRequest::new().set_page_token("example");
4822    /// ```
4823    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4824        self.page_token = v.into();
4825        self
4826    }
4827
4828    /// Sets the value of [filter][crate::model::SearchFilesRequest::filter].
4829    ///
4830    /// # Example
4831    /// ```ignore,no_run
4832    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4833    /// let x = SearchFilesRequest::new().set_filter("example");
4834    /// ```
4835    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4836        self.filter = v.into();
4837        self
4838    }
4839}
4840
4841impl wkt::message::Message for SearchFilesRequest {
4842    fn typename() -> &'static str {
4843        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
4844    }
4845}
4846
4847/// Client-facing representation of a file search response.
4848#[derive(Clone, Default, PartialEq)]
4849#[non_exhaustive]
4850pub struct SearchFilesResponse {
4851    /// List of matched results.
4852    pub search_results: std::vec::Vec<crate::model::SearchResult>,
4853
4854    /// Optional. A token, which can be sent as `page_token` to retrieve the next
4855    /// page. If this field is omitted, there are no subsequent pages.
4856    pub next_page_token: std::string::String,
4857
4858    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4859}
4860
4861impl SearchFilesResponse {
4862    /// Creates a new default instance.
4863    pub fn new() -> Self {
4864        std::default::Default::default()
4865    }
4866
4867    /// Sets the value of [search_results][crate::model::SearchFilesResponse::search_results].
4868    ///
4869    /// # Example
4870    /// ```ignore,no_run
4871    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4872    /// use google_cloud_dataform_v1::model::SearchResult;
4873    /// let x = SearchFilesResponse::new()
4874    ///     .set_search_results([
4875    ///         SearchResult::default()/* use setters */,
4876    ///         SearchResult::default()/* use (different) setters */,
4877    ///     ]);
4878    /// ```
4879    pub fn set_search_results<T, V>(mut self, v: T) -> Self
4880    where
4881        T: std::iter::IntoIterator<Item = V>,
4882        V: std::convert::Into<crate::model::SearchResult>,
4883    {
4884        use std::iter::Iterator;
4885        self.search_results = v.into_iter().map(|i| i.into()).collect();
4886        self
4887    }
4888
4889    /// Sets the value of [next_page_token][crate::model::SearchFilesResponse::next_page_token].
4890    ///
4891    /// # Example
4892    /// ```ignore,no_run
4893    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4894    /// let x = SearchFilesResponse::new().set_next_page_token("example");
4895    /// ```
4896    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4897        self.next_page_token = v.into();
4898        self
4899    }
4900}
4901
4902impl wkt::message::Message for SearchFilesResponse {
4903    fn typename() -> &'static str {
4904        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
4905    }
4906}
4907
4908#[doc(hidden)]
4909impl google_cloud_gax::paginator::internal::PageableResponse for SearchFilesResponse {
4910    type PageItem = crate::model::SearchResult;
4911
4912    fn items(self) -> std::vec::Vec<Self::PageItem> {
4913        self.search_results
4914    }
4915
4916    fn next_page_token(&self) -> std::string::String {
4917        use std::clone::Clone;
4918        self.next_page_token.clone()
4919    }
4920}
4921
4922/// Client-facing representation of a search result entry.
4923#[derive(Clone, Default, PartialEq)]
4924#[non_exhaustive]
4925pub struct SearchResult {
4926    /// The entry's contents.
4927    pub entry: std::option::Option<crate::model::search_result::Entry>,
4928
4929    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4930}
4931
4932impl SearchResult {
4933    /// Creates a new default instance.
4934    pub fn new() -> Self {
4935        std::default::Default::default()
4936    }
4937
4938    /// Sets the value of [entry][crate::model::SearchResult::entry].
4939    ///
4940    /// Note that all the setters affecting `entry` are mutually
4941    /// exclusive.
4942    ///
4943    /// # Example
4944    /// ```ignore,no_run
4945    /// # use google_cloud_dataform_v1::model::SearchResult;
4946    /// use google_cloud_dataform_v1::model::FileSearchResult;
4947    /// let x = SearchResult::new().set_entry(Some(
4948    ///     google_cloud_dataform_v1::model::search_result::Entry::File(FileSearchResult::default().into())));
4949    /// ```
4950    pub fn set_entry<
4951        T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
4952    >(
4953        mut self,
4954        v: T,
4955    ) -> Self {
4956        self.entry = v.into();
4957        self
4958    }
4959
4960    /// The value of [entry][crate::model::SearchResult::entry]
4961    /// if it holds a `File`, `None` if the field is not set or
4962    /// holds a different branch.
4963    pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
4964        #[allow(unreachable_patterns)]
4965        self.entry.as_ref().and_then(|v| match v {
4966            crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
4967            _ => std::option::Option::None,
4968        })
4969    }
4970
4971    /// Sets the value of [entry][crate::model::SearchResult::entry]
4972    /// to hold a `File`.
4973    ///
4974    /// Note that all the setters affecting `entry` are
4975    /// mutually exclusive.
4976    ///
4977    /// # Example
4978    /// ```ignore,no_run
4979    /// # use google_cloud_dataform_v1::model::SearchResult;
4980    /// use google_cloud_dataform_v1::model::FileSearchResult;
4981    /// let x = SearchResult::new().set_file(FileSearchResult::default()/* use setters */);
4982    /// assert!(x.file().is_some());
4983    /// assert!(x.directory().is_none());
4984    /// ```
4985    pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
4986        mut self,
4987        v: T,
4988    ) -> Self {
4989        self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
4990        self
4991    }
4992
4993    /// The value of [entry][crate::model::SearchResult::entry]
4994    /// if it holds a `Directory`, `None` if the field is not set or
4995    /// holds a different branch.
4996    pub fn directory(
4997        &self,
4998    ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
4999        #[allow(unreachable_patterns)]
5000        self.entry.as_ref().and_then(|v| match v {
5001            crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
5002            _ => std::option::Option::None,
5003        })
5004    }
5005
5006    /// Sets the value of [entry][crate::model::SearchResult::entry]
5007    /// to hold a `Directory`.
5008    ///
5009    /// Note that all the setters affecting `entry` are
5010    /// mutually exclusive.
5011    ///
5012    /// # Example
5013    /// ```ignore,no_run
5014    /// # use google_cloud_dataform_v1::model::SearchResult;
5015    /// use google_cloud_dataform_v1::model::DirectorySearchResult;
5016    /// let x = SearchResult::new().set_directory(DirectorySearchResult::default()/* use setters */);
5017    /// assert!(x.directory().is_some());
5018    /// assert!(x.file().is_none());
5019    /// ```
5020    pub fn set_directory<
5021        T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
5022    >(
5023        mut self,
5024        v: T,
5025    ) -> Self {
5026        self.entry =
5027            std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
5028        self
5029    }
5030}
5031
5032impl wkt::message::Message for SearchResult {
5033    fn typename() -> &'static str {
5034        "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
5035    }
5036}
5037
5038/// Defines additional types related to [SearchResult].
5039pub mod search_result {
5040    #[allow(unused_imports)]
5041    use super::*;
5042
5043    /// The entry's contents.
5044    #[derive(Clone, Debug, PartialEq)]
5045    #[non_exhaustive]
5046    pub enum Entry {
5047        /// Details when search result is a file.
5048        File(std::boxed::Box<crate::model::FileSearchResult>),
5049        /// Details when search result is a directory.
5050        Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
5051    }
5052}
5053
5054/// Client-facing representation of a file entry in search results.
5055#[derive(Clone, Default, PartialEq)]
5056#[non_exhaustive]
5057pub struct FileSearchResult {
5058    /// File system path relative to the workspace root.
5059    pub path: std::string::String,
5060
5061    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5062}
5063
5064impl FileSearchResult {
5065    /// Creates a new default instance.
5066    pub fn new() -> Self {
5067        std::default::Default::default()
5068    }
5069
5070    /// Sets the value of [path][crate::model::FileSearchResult::path].
5071    ///
5072    /// # Example
5073    /// ```ignore,no_run
5074    /// # use google_cloud_dataform_v1::model::FileSearchResult;
5075    /// let x = FileSearchResult::new().set_path("example");
5076    /// ```
5077    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5078        self.path = v.into();
5079        self
5080    }
5081}
5082
5083impl wkt::message::Message for FileSearchResult {
5084    fn typename() -> &'static str {
5085        "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
5086    }
5087}
5088
5089/// Client-facing representation of a directory entry in search results.
5090#[derive(Clone, Default, PartialEq)]
5091#[non_exhaustive]
5092pub struct DirectorySearchResult {
5093    /// File system path relative to the workspace root.
5094    pub path: std::string::String,
5095
5096    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5097}
5098
5099impl DirectorySearchResult {
5100    /// Creates a new default instance.
5101    pub fn new() -> Self {
5102        std::default::Default::default()
5103    }
5104
5105    /// Sets the value of [path][crate::model::DirectorySearchResult::path].
5106    ///
5107    /// # Example
5108    /// ```ignore,no_run
5109    /// # use google_cloud_dataform_v1::model::DirectorySearchResult;
5110    /// let x = DirectorySearchResult::new().set_path("example");
5111    /// ```
5112    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5113        self.path = v.into();
5114        self
5115    }
5116}
5117
5118impl wkt::message::Message for DirectorySearchResult {
5119    fn typename() -> &'static str {
5120        "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
5121    }
5122}
5123
5124/// `MakeDirectory` request message.
5125#[derive(Clone, Default, PartialEq)]
5126#[non_exhaustive]
5127pub struct MakeDirectoryRequest {
5128    /// Required. The workspace's name.
5129    pub workspace: std::string::String,
5130
5131    /// Required. The directory's full path including directory name, relative to
5132    /// the workspace root.
5133    pub path: std::string::String,
5134
5135    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5136}
5137
5138impl MakeDirectoryRequest {
5139    /// Creates a new default instance.
5140    pub fn new() -> Self {
5141        std::default::Default::default()
5142    }
5143
5144    /// Sets the value of [workspace][crate::model::MakeDirectoryRequest::workspace].
5145    ///
5146    /// # Example
5147    /// ```ignore,no_run
5148    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
5149    /// let x = MakeDirectoryRequest::new().set_workspace("example");
5150    /// ```
5151    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5152        self.workspace = v.into();
5153        self
5154    }
5155
5156    /// Sets the value of [path][crate::model::MakeDirectoryRequest::path].
5157    ///
5158    /// # Example
5159    /// ```ignore,no_run
5160    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
5161    /// let x = MakeDirectoryRequest::new().set_path("example");
5162    /// ```
5163    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5164        self.path = v.into();
5165        self
5166    }
5167}
5168
5169impl wkt::message::Message for MakeDirectoryRequest {
5170    fn typename() -> &'static str {
5171        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
5172    }
5173}
5174
5175/// `MakeDirectory` response message.
5176#[derive(Clone, Default, PartialEq)]
5177#[non_exhaustive]
5178pub struct MakeDirectoryResponse {
5179    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5180}
5181
5182impl MakeDirectoryResponse {
5183    /// Creates a new default instance.
5184    pub fn new() -> Self {
5185        std::default::Default::default()
5186    }
5187}
5188
5189impl wkt::message::Message for MakeDirectoryResponse {
5190    fn typename() -> &'static str {
5191        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
5192    }
5193}
5194
5195/// `RemoveDirectory` request message.
5196#[derive(Clone, Default, PartialEq)]
5197#[non_exhaustive]
5198pub struct RemoveDirectoryRequest {
5199    /// Required. The workspace's name.
5200    pub workspace: std::string::String,
5201
5202    /// Required. The directory's full path including directory name, relative to
5203    /// the workspace root.
5204    pub path: std::string::String,
5205
5206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5207}
5208
5209impl RemoveDirectoryRequest {
5210    /// Creates a new default instance.
5211    pub fn new() -> Self {
5212        std::default::Default::default()
5213    }
5214
5215    /// Sets the value of [workspace][crate::model::RemoveDirectoryRequest::workspace].
5216    ///
5217    /// # Example
5218    /// ```ignore,no_run
5219    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
5220    /// let x = RemoveDirectoryRequest::new().set_workspace("example");
5221    /// ```
5222    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5223        self.workspace = v.into();
5224        self
5225    }
5226
5227    /// Sets the value of [path][crate::model::RemoveDirectoryRequest::path].
5228    ///
5229    /// # Example
5230    /// ```ignore,no_run
5231    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
5232    /// let x = RemoveDirectoryRequest::new().set_path("example");
5233    /// ```
5234    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5235        self.path = v.into();
5236        self
5237    }
5238}
5239
5240impl wkt::message::Message for RemoveDirectoryRequest {
5241    fn typename() -> &'static str {
5242        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
5243    }
5244}
5245
5246/// `RemoveDirectory` response message.
5247#[derive(Clone, Default, PartialEq)]
5248#[non_exhaustive]
5249pub struct RemoveDirectoryResponse {
5250    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5251}
5252
5253impl RemoveDirectoryResponse {
5254    /// Creates a new default instance.
5255    pub fn new() -> Self {
5256        std::default::Default::default()
5257    }
5258}
5259
5260impl wkt::message::Message for RemoveDirectoryResponse {
5261    fn typename() -> &'static str {
5262        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
5263    }
5264}
5265
5266/// `MoveDirectory` request message.
5267#[derive(Clone, Default, PartialEq)]
5268#[non_exhaustive]
5269pub struct MoveDirectoryRequest {
5270    /// Required. The workspace's name.
5271    pub workspace: std::string::String,
5272
5273    /// Required. The directory's full path including directory name, relative to
5274    /// the workspace root.
5275    pub path: std::string::String,
5276
5277    /// Required. The new path for the directory including directory name, rooted
5278    /// at workspace root.
5279    pub new_path: std::string::String,
5280
5281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5282}
5283
5284impl MoveDirectoryRequest {
5285    /// Creates a new default instance.
5286    pub fn new() -> Self {
5287        std::default::Default::default()
5288    }
5289
5290    /// Sets the value of [workspace][crate::model::MoveDirectoryRequest::workspace].
5291    ///
5292    /// # Example
5293    /// ```ignore,no_run
5294    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5295    /// let x = MoveDirectoryRequest::new().set_workspace("example");
5296    /// ```
5297    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5298        self.workspace = v.into();
5299        self
5300    }
5301
5302    /// Sets the value of [path][crate::model::MoveDirectoryRequest::path].
5303    ///
5304    /// # Example
5305    /// ```ignore,no_run
5306    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5307    /// let x = MoveDirectoryRequest::new().set_path("example");
5308    /// ```
5309    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5310        self.path = v.into();
5311        self
5312    }
5313
5314    /// Sets the value of [new_path][crate::model::MoveDirectoryRequest::new_path].
5315    ///
5316    /// # Example
5317    /// ```ignore,no_run
5318    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5319    /// let x = MoveDirectoryRequest::new().set_new_path("example");
5320    /// ```
5321    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5322        self.new_path = v.into();
5323        self
5324    }
5325}
5326
5327impl wkt::message::Message for MoveDirectoryRequest {
5328    fn typename() -> &'static str {
5329        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
5330    }
5331}
5332
5333/// `MoveDirectory` response message.
5334#[derive(Clone, Default, PartialEq)]
5335#[non_exhaustive]
5336pub struct MoveDirectoryResponse {
5337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5338}
5339
5340impl MoveDirectoryResponse {
5341    /// Creates a new default instance.
5342    pub fn new() -> Self {
5343        std::default::Default::default()
5344    }
5345}
5346
5347impl wkt::message::Message for MoveDirectoryResponse {
5348    fn typename() -> &'static str {
5349        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
5350    }
5351}
5352
5353/// `ReadFile` request message.
5354#[derive(Clone, Default, PartialEq)]
5355#[non_exhaustive]
5356pub struct ReadFileRequest {
5357    /// Required. The workspace's name.
5358    pub workspace: std::string::String,
5359
5360    /// Required. The file's full path including filename, relative to the
5361    /// workspace root.
5362    pub path: std::string::String,
5363
5364    /// Optional. The Git revision of the file to return. If left empty, the
5365    /// current contents of `path` will be returned.
5366    pub revision: std::string::String,
5367
5368    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5369}
5370
5371impl ReadFileRequest {
5372    /// Creates a new default instance.
5373    pub fn new() -> Self {
5374        std::default::Default::default()
5375    }
5376
5377    /// Sets the value of [workspace][crate::model::ReadFileRequest::workspace].
5378    ///
5379    /// # Example
5380    /// ```ignore,no_run
5381    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5382    /// let x = ReadFileRequest::new().set_workspace("example");
5383    /// ```
5384    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5385        self.workspace = v.into();
5386        self
5387    }
5388
5389    /// Sets the value of [path][crate::model::ReadFileRequest::path].
5390    ///
5391    /// # Example
5392    /// ```ignore,no_run
5393    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5394    /// let x = ReadFileRequest::new().set_path("example");
5395    /// ```
5396    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5397        self.path = v.into();
5398        self
5399    }
5400
5401    /// Sets the value of [revision][crate::model::ReadFileRequest::revision].
5402    ///
5403    /// # Example
5404    /// ```ignore,no_run
5405    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5406    /// let x = ReadFileRequest::new().set_revision("example");
5407    /// ```
5408    pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5409        self.revision = v.into();
5410        self
5411    }
5412}
5413
5414impl wkt::message::Message for ReadFileRequest {
5415    fn typename() -> &'static str {
5416        "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
5417    }
5418}
5419
5420/// `ReadFile` response message.
5421#[derive(Clone, Default, PartialEq)]
5422#[non_exhaustive]
5423pub struct ReadFileResponse {
5424    /// The file's contents.
5425    pub file_contents: ::bytes::Bytes,
5426
5427    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5428}
5429
5430impl ReadFileResponse {
5431    /// Creates a new default instance.
5432    pub fn new() -> Self {
5433        std::default::Default::default()
5434    }
5435
5436    /// Sets the value of [file_contents][crate::model::ReadFileResponse::file_contents].
5437    ///
5438    /// # Example
5439    /// ```ignore,no_run
5440    /// # use google_cloud_dataform_v1::model::ReadFileResponse;
5441    /// let x = ReadFileResponse::new().set_file_contents(bytes::Bytes::from_static(b"example"));
5442    /// ```
5443    pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5444        self.file_contents = v.into();
5445        self
5446    }
5447}
5448
5449impl wkt::message::Message for ReadFileResponse {
5450    fn typename() -> &'static str {
5451        "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
5452    }
5453}
5454
5455/// `RemoveFile` request message.
5456#[derive(Clone, Default, PartialEq)]
5457#[non_exhaustive]
5458pub struct RemoveFileRequest {
5459    /// Required. The workspace's name.
5460    pub workspace: std::string::String,
5461
5462    /// Required. The file's full path including filename, relative to the
5463    /// workspace root.
5464    pub path: std::string::String,
5465
5466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5467}
5468
5469impl RemoveFileRequest {
5470    /// Creates a new default instance.
5471    pub fn new() -> Self {
5472        std::default::Default::default()
5473    }
5474
5475    /// Sets the value of [workspace][crate::model::RemoveFileRequest::workspace].
5476    ///
5477    /// # Example
5478    /// ```ignore,no_run
5479    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5480    /// let x = RemoveFileRequest::new().set_workspace("example");
5481    /// ```
5482    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5483        self.workspace = v.into();
5484        self
5485    }
5486
5487    /// Sets the value of [path][crate::model::RemoveFileRequest::path].
5488    ///
5489    /// # Example
5490    /// ```ignore,no_run
5491    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5492    /// let x = RemoveFileRequest::new().set_path("example");
5493    /// ```
5494    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5495        self.path = v.into();
5496        self
5497    }
5498}
5499
5500impl wkt::message::Message for RemoveFileRequest {
5501    fn typename() -> &'static str {
5502        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
5503    }
5504}
5505
5506/// `RemoveFile` response message.
5507#[derive(Clone, Default, PartialEq)]
5508#[non_exhaustive]
5509pub struct RemoveFileResponse {
5510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5511}
5512
5513impl RemoveFileResponse {
5514    /// Creates a new default instance.
5515    pub fn new() -> Self {
5516        std::default::Default::default()
5517    }
5518}
5519
5520impl wkt::message::Message for RemoveFileResponse {
5521    fn typename() -> &'static str {
5522        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
5523    }
5524}
5525
5526/// `MoveFile` request message.
5527#[derive(Clone, Default, PartialEq)]
5528#[non_exhaustive]
5529pub struct MoveFileRequest {
5530    /// Required. The workspace's name.
5531    pub workspace: std::string::String,
5532
5533    /// Required. The file's full path including filename, relative to the
5534    /// workspace root.
5535    pub path: std::string::String,
5536
5537    /// Required. The file's new path including filename, relative to the workspace
5538    /// root.
5539    pub new_path: std::string::String,
5540
5541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5542}
5543
5544impl MoveFileRequest {
5545    /// Creates a new default instance.
5546    pub fn new() -> Self {
5547        std::default::Default::default()
5548    }
5549
5550    /// Sets the value of [workspace][crate::model::MoveFileRequest::workspace].
5551    ///
5552    /// # Example
5553    /// ```ignore,no_run
5554    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5555    /// let x = MoveFileRequest::new().set_workspace("example");
5556    /// ```
5557    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5558        self.workspace = v.into();
5559        self
5560    }
5561
5562    /// Sets the value of [path][crate::model::MoveFileRequest::path].
5563    ///
5564    /// # Example
5565    /// ```ignore,no_run
5566    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5567    /// let x = MoveFileRequest::new().set_path("example");
5568    /// ```
5569    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5570        self.path = v.into();
5571        self
5572    }
5573
5574    /// Sets the value of [new_path][crate::model::MoveFileRequest::new_path].
5575    ///
5576    /// # Example
5577    /// ```ignore,no_run
5578    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5579    /// let x = MoveFileRequest::new().set_new_path("example");
5580    /// ```
5581    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5582        self.new_path = v.into();
5583        self
5584    }
5585}
5586
5587impl wkt::message::Message for MoveFileRequest {
5588    fn typename() -> &'static str {
5589        "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
5590    }
5591}
5592
5593/// `MoveFile` response message.
5594#[derive(Clone, Default, PartialEq)]
5595#[non_exhaustive]
5596pub struct MoveFileResponse {
5597    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5598}
5599
5600impl MoveFileResponse {
5601    /// Creates a new default instance.
5602    pub fn new() -> Self {
5603        std::default::Default::default()
5604    }
5605}
5606
5607impl wkt::message::Message for MoveFileResponse {
5608    fn typename() -> &'static str {
5609        "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
5610    }
5611}
5612
5613/// `WriteFile` request message.
5614#[derive(Clone, Default, PartialEq)]
5615#[non_exhaustive]
5616pub struct WriteFileRequest {
5617    /// Required. The workspace's name.
5618    pub workspace: std::string::String,
5619
5620    /// Required. The file.
5621    pub path: std::string::String,
5622
5623    /// Required. The file's contents.
5624    pub contents: ::bytes::Bytes,
5625
5626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5627}
5628
5629impl WriteFileRequest {
5630    /// Creates a new default instance.
5631    pub fn new() -> Self {
5632        std::default::Default::default()
5633    }
5634
5635    /// Sets the value of [workspace][crate::model::WriteFileRequest::workspace].
5636    ///
5637    /// # Example
5638    /// ```ignore,no_run
5639    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5640    /// let x = WriteFileRequest::new().set_workspace("example");
5641    /// ```
5642    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5643        self.workspace = v.into();
5644        self
5645    }
5646
5647    /// Sets the value of [path][crate::model::WriteFileRequest::path].
5648    ///
5649    /// # Example
5650    /// ```ignore,no_run
5651    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5652    /// let x = WriteFileRequest::new().set_path("example");
5653    /// ```
5654    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5655        self.path = v.into();
5656        self
5657    }
5658
5659    /// Sets the value of [contents][crate::model::WriteFileRequest::contents].
5660    ///
5661    /// # Example
5662    /// ```ignore,no_run
5663    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5664    /// let x = WriteFileRequest::new().set_contents(bytes::Bytes::from_static(b"example"));
5665    /// ```
5666    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5667        self.contents = v.into();
5668        self
5669    }
5670}
5671
5672impl wkt::message::Message for WriteFileRequest {
5673    fn typename() -> &'static str {
5674        "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
5675    }
5676}
5677
5678/// `WriteFile` response message.
5679#[derive(Clone, Default, PartialEq)]
5680#[non_exhaustive]
5681pub struct WriteFileResponse {
5682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5683}
5684
5685impl WriteFileResponse {
5686    /// Creates a new default instance.
5687    pub fn new() -> Self {
5688        std::default::Default::default()
5689    }
5690}
5691
5692impl wkt::message::Message for WriteFileResponse {
5693    fn typename() -> &'static str {
5694        "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
5695    }
5696}
5697
5698/// `InstallNpmPackages` request message.
5699#[derive(Clone, Default, PartialEq)]
5700#[non_exhaustive]
5701pub struct InstallNpmPackagesRequest {
5702    /// Required. The workspace's name.
5703    pub workspace: std::string::String,
5704
5705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5706}
5707
5708impl InstallNpmPackagesRequest {
5709    /// Creates a new default instance.
5710    pub fn new() -> Self {
5711        std::default::Default::default()
5712    }
5713
5714    /// Sets the value of [workspace][crate::model::InstallNpmPackagesRequest::workspace].
5715    ///
5716    /// # Example
5717    /// ```ignore,no_run
5718    /// # use google_cloud_dataform_v1::model::InstallNpmPackagesRequest;
5719    /// let x = InstallNpmPackagesRequest::new().set_workspace("example");
5720    /// ```
5721    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5722        self.workspace = v.into();
5723        self
5724    }
5725}
5726
5727impl wkt::message::Message for InstallNpmPackagesRequest {
5728    fn typename() -> &'static str {
5729        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
5730    }
5731}
5732
5733/// `InstallNpmPackages` response message.
5734#[derive(Clone, Default, PartialEq)]
5735#[non_exhaustive]
5736pub struct InstallNpmPackagesResponse {
5737    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5738}
5739
5740impl InstallNpmPackagesResponse {
5741    /// Creates a new default instance.
5742    pub fn new() -> Self {
5743        std::default::Default::default()
5744    }
5745}
5746
5747impl wkt::message::Message for InstallNpmPackagesResponse {
5748    fn typename() -> &'static str {
5749        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
5750    }
5751}
5752
5753/// Represents a Dataform release configuration.
5754#[derive(Clone, Default, PartialEq)]
5755#[non_exhaustive]
5756pub struct ReleaseConfig {
5757    /// Identifier. The release config's name.
5758    pub name: std::string::String,
5759
5760    /// Required. Git commit/tag/branch name at which the repository should be
5761    /// compiled. Must exist in the remote repository. Examples:
5762    ///
5763    /// - a commit SHA: `12ade345`
5764    /// - a tag: `tag1`
5765    /// - a branch name: `branch1`
5766    pub git_commitish: std::string::String,
5767
5768    /// Optional. If set, fields of `code_compilation_config` override the default
5769    /// compilation settings that are specified in dataform.json.
5770    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
5771
5772    /// Optional. Optional schedule (in cron format) for automatic creation of
5773    /// compilation results.
5774    pub cron_schedule: std::string::String,
5775
5776    /// Optional. Specifies the time zone to be used when interpreting
5777    /// cron_schedule. Must be a time zone name from the time zone database
5778    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
5779    /// unspecified, the default is UTC.
5780    pub time_zone: std::string::String,
5781
5782    /// Output only. Records of the 10 most recent scheduled release attempts,
5783    /// ordered in descending order of `release_time`. Updated whenever automatic
5784    /// creation of a compilation result is triggered by cron_schedule.
5785    pub recent_scheduled_release_records:
5786        std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
5787
5788    /// Optional. The name of the currently released compilation result for this
5789    /// release config. This value is updated when a compilation result is
5790    /// automatically created from this release config (using cron_schedule), or
5791    /// when this resource is updated by API call (perhaps to roll back to an
5792    /// earlier release). The compilation result must have been created using this
5793    /// release config. Must be in the format
5794    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
5795    pub release_compilation_result: std::string::String,
5796
5797    /// Optional. Disables automatic creation of compilation results.
5798    pub disabled: bool,
5799
5800    /// Output only. All the metadata information that is used internally to serve
5801    /// the resource. For example: timestamps, flags, status fields, etc. The
5802    /// format of this field is a JSON string.
5803    pub internal_metadata: std::option::Option<std::string::String>,
5804
5805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5806}
5807
5808impl ReleaseConfig {
5809    /// Creates a new default instance.
5810    pub fn new() -> Self {
5811        std::default::Default::default()
5812    }
5813
5814    /// Sets the value of [name][crate::model::ReleaseConfig::name].
5815    ///
5816    /// # Example
5817    /// ```ignore,no_run
5818    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5819    /// let x = ReleaseConfig::new().set_name("example");
5820    /// ```
5821    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5822        self.name = v.into();
5823        self
5824    }
5825
5826    /// Sets the value of [git_commitish][crate::model::ReleaseConfig::git_commitish].
5827    ///
5828    /// # Example
5829    /// ```ignore,no_run
5830    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5831    /// let x = ReleaseConfig::new().set_git_commitish("example");
5832    /// ```
5833    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5834        self.git_commitish = v.into();
5835        self
5836    }
5837
5838    /// Sets the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5839    ///
5840    /// # Example
5841    /// ```ignore,no_run
5842    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5843    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5844    /// let x = ReleaseConfig::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
5845    /// ```
5846    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
5847    where
5848        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5849    {
5850        self.code_compilation_config = std::option::Option::Some(v.into());
5851        self
5852    }
5853
5854    /// Sets or clears the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5855    ///
5856    /// # Example
5857    /// ```ignore,no_run
5858    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5859    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5860    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
5861    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
5862    /// ```
5863    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
5864    where
5865        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5866    {
5867        self.code_compilation_config = v.map(|x| x.into());
5868        self
5869    }
5870
5871    /// Sets the value of [cron_schedule][crate::model::ReleaseConfig::cron_schedule].
5872    ///
5873    /// # Example
5874    /// ```ignore,no_run
5875    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5876    /// let x = ReleaseConfig::new().set_cron_schedule("example");
5877    /// ```
5878    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5879        self.cron_schedule = v.into();
5880        self
5881    }
5882
5883    /// Sets the value of [time_zone][crate::model::ReleaseConfig::time_zone].
5884    ///
5885    /// # Example
5886    /// ```ignore,no_run
5887    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5888    /// let x = ReleaseConfig::new().set_time_zone("example");
5889    /// ```
5890    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5891        self.time_zone = v.into();
5892        self
5893    }
5894
5895    /// Sets the value of [recent_scheduled_release_records][crate::model::ReleaseConfig::recent_scheduled_release_records].
5896    ///
5897    /// # Example
5898    /// ```ignore,no_run
5899    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5900    /// use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
5901    /// let x = ReleaseConfig::new()
5902    ///     .set_recent_scheduled_release_records([
5903    ///         ScheduledReleaseRecord::default()/* use setters */,
5904    ///         ScheduledReleaseRecord::default()/* use (different) setters */,
5905    ///     ]);
5906    /// ```
5907    pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
5908    where
5909        T: std::iter::IntoIterator<Item = V>,
5910        V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
5911    {
5912        use std::iter::Iterator;
5913        self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
5914        self
5915    }
5916
5917    /// Sets the value of [release_compilation_result][crate::model::ReleaseConfig::release_compilation_result].
5918    ///
5919    /// # Example
5920    /// ```ignore,no_run
5921    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5922    /// let x = ReleaseConfig::new().set_release_compilation_result("example");
5923    /// ```
5924    pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
5925        mut self,
5926        v: T,
5927    ) -> Self {
5928        self.release_compilation_result = v.into();
5929        self
5930    }
5931
5932    /// Sets the value of [disabled][crate::model::ReleaseConfig::disabled].
5933    ///
5934    /// # Example
5935    /// ```ignore,no_run
5936    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5937    /// let x = ReleaseConfig::new().set_disabled(true);
5938    /// ```
5939    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5940        self.disabled = v.into();
5941        self
5942    }
5943
5944    /// Sets the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
5945    ///
5946    /// # Example
5947    /// ```ignore,no_run
5948    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5949    /// let x = ReleaseConfig::new().set_internal_metadata("example");
5950    /// ```
5951    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
5952    where
5953        T: std::convert::Into<std::string::String>,
5954    {
5955        self.internal_metadata = std::option::Option::Some(v.into());
5956        self
5957    }
5958
5959    /// Sets or clears the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
5960    ///
5961    /// # Example
5962    /// ```ignore,no_run
5963    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5964    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(Some("example"));
5965    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(None::<String>);
5966    /// ```
5967    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5968    where
5969        T: std::convert::Into<std::string::String>,
5970    {
5971        self.internal_metadata = v.map(|x| x.into());
5972        self
5973    }
5974}
5975
5976impl wkt::message::Message for ReleaseConfig {
5977    fn typename() -> &'static str {
5978        "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
5979    }
5980}
5981
5982/// Defines additional types related to [ReleaseConfig].
5983pub mod release_config {
5984    #[allow(unused_imports)]
5985    use super::*;
5986
5987    /// A record of an attempt to create a compilation result for this release
5988    /// config.
5989    #[derive(Clone, Default, PartialEq)]
5990    #[non_exhaustive]
5991    pub struct ScheduledReleaseRecord {
5992        /// Output only. The timestamp of this release attempt.
5993        pub release_time: std::option::Option<wkt::Timestamp>,
5994
5995        /// The result of this release attempt.
5996        pub result:
5997            std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
5998
5999        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6000    }
6001
6002    impl ScheduledReleaseRecord {
6003        /// Creates a new default instance.
6004        pub fn new() -> Self {
6005            std::default::Default::default()
6006        }
6007
6008        /// Sets the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
6009        ///
6010        /// # Example
6011        /// ```ignore,no_run
6012        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6013        /// use wkt::Timestamp;
6014        /// let x = ScheduledReleaseRecord::new().set_release_time(Timestamp::default()/* use setters */);
6015        /// ```
6016        pub fn set_release_time<T>(mut self, v: T) -> Self
6017        where
6018            T: std::convert::Into<wkt::Timestamp>,
6019        {
6020            self.release_time = std::option::Option::Some(v.into());
6021            self
6022        }
6023
6024        /// Sets or clears the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
6025        ///
6026        /// # Example
6027        /// ```ignore,no_run
6028        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6029        /// use wkt::Timestamp;
6030        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(Some(Timestamp::default()/* use setters */));
6031        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(None::<Timestamp>);
6032        /// ```
6033        pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
6034        where
6035            T: std::convert::Into<wkt::Timestamp>,
6036        {
6037            self.release_time = v.map(|x| x.into());
6038            self
6039        }
6040
6041        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result].
6042        ///
6043        /// Note that all the setters affecting `result` are mutually
6044        /// exclusive.
6045        ///
6046        /// # Example
6047        /// ```ignore,no_run
6048        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6049        /// use google_cloud_dataform_v1::model::release_config::scheduled_release_record::Result;
6050        /// let x = ScheduledReleaseRecord::new().set_result(Some(Result::CompilationResult("example".to_string())));
6051        /// ```
6052        pub fn set_result<
6053            T: std::convert::Into<
6054                    std::option::Option<
6055                        crate::model::release_config::scheduled_release_record::Result,
6056                    >,
6057                >,
6058        >(
6059            mut self,
6060            v: T,
6061        ) -> Self {
6062            self.result = v.into();
6063            self
6064        }
6065
6066        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6067        /// if it holds a `CompilationResult`, `None` if the field is not set or
6068        /// holds a different branch.
6069        pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
6070            #[allow(unreachable_patterns)]
6071            self.result.as_ref().and_then(|v| match v {
6072                crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
6073                _ => std::option::Option::None,
6074            })
6075        }
6076
6077        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6078        /// to hold a `CompilationResult`.
6079        ///
6080        /// Note that all the setters affecting `result` are
6081        /// mutually exclusive.
6082        ///
6083        /// # Example
6084        /// ```ignore,no_run
6085        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6086        /// let x = ScheduledReleaseRecord::new().set_compilation_result("example");
6087        /// assert!(x.compilation_result().is_some());
6088        /// assert!(x.error_status().is_none());
6089        /// ```
6090        pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
6091            mut self,
6092            v: T,
6093        ) -> Self {
6094            self.result = std::option::Option::Some(
6095                crate::model::release_config::scheduled_release_record::Result::CompilationResult(
6096                    v.into(),
6097                ),
6098            );
6099            self
6100        }
6101
6102        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6103        /// if it holds a `ErrorStatus`, `None` if the field is not set or
6104        /// holds a different branch.
6105        pub fn error_status(
6106            &self,
6107        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
6108            #[allow(unreachable_patterns)]
6109            self.result.as_ref().and_then(|v| match v {
6110                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
6111                    std::option::Option::Some(v)
6112                }
6113                _ => std::option::Option::None,
6114            })
6115        }
6116
6117        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6118        /// to hold a `ErrorStatus`.
6119        ///
6120        /// Note that all the setters affecting `result` are
6121        /// mutually exclusive.
6122        ///
6123        /// # Example
6124        /// ```ignore,no_run
6125        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6126        /// use google_cloud_rpc::model::Status;
6127        /// let x = ScheduledReleaseRecord::new().set_error_status(Status::default()/* use setters */);
6128        /// assert!(x.error_status().is_some());
6129        /// assert!(x.compilation_result().is_none());
6130        /// ```
6131        pub fn set_error_status<
6132            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
6133        >(
6134            mut self,
6135            v: T,
6136        ) -> Self {
6137            self.result = std::option::Option::Some(
6138                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
6139                    v.into(),
6140                ),
6141            );
6142            self
6143        }
6144    }
6145
6146    impl wkt::message::Message for ScheduledReleaseRecord {
6147        fn typename() -> &'static str {
6148            "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
6149        }
6150    }
6151
6152    /// Defines additional types related to [ScheduledReleaseRecord].
6153    pub mod scheduled_release_record {
6154        #[allow(unused_imports)]
6155        use super::*;
6156
6157        /// The result of this release attempt.
6158        #[derive(Clone, Debug, PartialEq)]
6159        #[non_exhaustive]
6160        pub enum Result {
6161            /// The name of the created compilation result, if one was successfully
6162            /// created. Must be in the format
6163            /// `projects/*/locations/*/repositories/*/compilationResults/*`.
6164            CompilationResult(std::string::String),
6165            /// The error status encountered upon this attempt to create the
6166            /// compilation result, if the attempt was unsuccessful.
6167            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
6168        }
6169    }
6170}
6171
6172/// `ListReleaseConfigs` request message.
6173#[derive(Clone, Default, PartialEq)]
6174#[non_exhaustive]
6175pub struct ListReleaseConfigsRequest {
6176    /// Required. The repository in which to list release configs. Must be in the
6177    /// format `projects/*/locations/*/repositories/*`.
6178    pub parent: std::string::String,
6179
6180    /// Optional. Maximum number of release configs to return. The server may
6181    /// return fewer items than requested. If unspecified, the server will pick an
6182    /// appropriate default.
6183    pub page_size: i32,
6184
6185    /// Optional. Page token received from a previous `ListReleaseConfigs` call.
6186    /// Provide this to retrieve the subsequent page.
6187    ///
6188    /// When paginating, all other parameters provided to `ListReleaseConfigs`,
6189    /// with the exception of `page_size`, must match the call that provided the
6190    /// page token.
6191    pub page_token: std::string::String,
6192
6193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6194}
6195
6196impl ListReleaseConfigsRequest {
6197    /// Creates a new default instance.
6198    pub fn new() -> Self {
6199        std::default::Default::default()
6200    }
6201
6202    /// Sets the value of [parent][crate::model::ListReleaseConfigsRequest::parent].
6203    ///
6204    /// # Example
6205    /// ```ignore,no_run
6206    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6207    /// let x = ListReleaseConfigsRequest::new().set_parent("example");
6208    /// ```
6209    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6210        self.parent = v.into();
6211        self
6212    }
6213
6214    /// Sets the value of [page_size][crate::model::ListReleaseConfigsRequest::page_size].
6215    ///
6216    /// # Example
6217    /// ```ignore,no_run
6218    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6219    /// let x = ListReleaseConfigsRequest::new().set_page_size(42);
6220    /// ```
6221    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6222        self.page_size = v.into();
6223        self
6224    }
6225
6226    /// Sets the value of [page_token][crate::model::ListReleaseConfigsRequest::page_token].
6227    ///
6228    /// # Example
6229    /// ```ignore,no_run
6230    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6231    /// let x = ListReleaseConfigsRequest::new().set_page_token("example");
6232    /// ```
6233    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6234        self.page_token = v.into();
6235        self
6236    }
6237}
6238
6239impl wkt::message::Message for ListReleaseConfigsRequest {
6240    fn typename() -> &'static str {
6241        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
6242    }
6243}
6244
6245/// `ListReleaseConfigs` response message.
6246#[derive(Clone, Default, PartialEq)]
6247#[non_exhaustive]
6248pub struct ListReleaseConfigsResponse {
6249    /// List of release configs.
6250    pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
6251
6252    /// A token, which can be sent as `page_token` to retrieve the next page.
6253    /// If this field is omitted, there are no subsequent pages.
6254    pub next_page_token: std::string::String,
6255
6256    /// Locations which could not be reached.
6257    pub unreachable: std::vec::Vec<std::string::String>,
6258
6259    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6260}
6261
6262impl ListReleaseConfigsResponse {
6263    /// Creates a new default instance.
6264    pub fn new() -> Self {
6265        std::default::Default::default()
6266    }
6267
6268    /// Sets the value of [release_configs][crate::model::ListReleaseConfigsResponse::release_configs].
6269    ///
6270    /// # Example
6271    /// ```ignore,no_run
6272    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6273    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6274    /// let x = ListReleaseConfigsResponse::new()
6275    ///     .set_release_configs([
6276    ///         ReleaseConfig::default()/* use setters */,
6277    ///         ReleaseConfig::default()/* use (different) setters */,
6278    ///     ]);
6279    /// ```
6280    pub fn set_release_configs<T, V>(mut self, v: T) -> Self
6281    where
6282        T: std::iter::IntoIterator<Item = V>,
6283        V: std::convert::Into<crate::model::ReleaseConfig>,
6284    {
6285        use std::iter::Iterator;
6286        self.release_configs = v.into_iter().map(|i| i.into()).collect();
6287        self
6288    }
6289
6290    /// Sets the value of [next_page_token][crate::model::ListReleaseConfigsResponse::next_page_token].
6291    ///
6292    /// # Example
6293    /// ```ignore,no_run
6294    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6295    /// let x = ListReleaseConfigsResponse::new().set_next_page_token("example");
6296    /// ```
6297    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6298        self.next_page_token = v.into();
6299        self
6300    }
6301
6302    /// Sets the value of [unreachable][crate::model::ListReleaseConfigsResponse::unreachable].
6303    ///
6304    /// # Example
6305    /// ```ignore,no_run
6306    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6307    /// let x = ListReleaseConfigsResponse::new().set_unreachable(["a", "b", "c"]);
6308    /// ```
6309    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6310    where
6311        T: std::iter::IntoIterator<Item = V>,
6312        V: std::convert::Into<std::string::String>,
6313    {
6314        use std::iter::Iterator;
6315        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6316        self
6317    }
6318}
6319
6320impl wkt::message::Message for ListReleaseConfigsResponse {
6321    fn typename() -> &'static str {
6322        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
6323    }
6324}
6325
6326#[doc(hidden)]
6327impl google_cloud_gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
6328    type PageItem = crate::model::ReleaseConfig;
6329
6330    fn items(self) -> std::vec::Vec<Self::PageItem> {
6331        self.release_configs
6332    }
6333
6334    fn next_page_token(&self) -> std::string::String {
6335        use std::clone::Clone;
6336        self.next_page_token.clone()
6337    }
6338}
6339
6340/// `GetReleaseConfig` request message.
6341#[derive(Clone, Default, PartialEq)]
6342#[non_exhaustive]
6343pub struct GetReleaseConfigRequest {
6344    /// Required. The release config's name.
6345    pub name: std::string::String,
6346
6347    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6348}
6349
6350impl GetReleaseConfigRequest {
6351    /// Creates a new default instance.
6352    pub fn new() -> Self {
6353        std::default::Default::default()
6354    }
6355
6356    /// Sets the value of [name][crate::model::GetReleaseConfigRequest::name].
6357    ///
6358    /// # Example
6359    /// ```ignore,no_run
6360    /// # use google_cloud_dataform_v1::model::GetReleaseConfigRequest;
6361    /// let x = GetReleaseConfigRequest::new().set_name("example");
6362    /// ```
6363    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6364        self.name = v.into();
6365        self
6366    }
6367}
6368
6369impl wkt::message::Message for GetReleaseConfigRequest {
6370    fn typename() -> &'static str {
6371        "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
6372    }
6373}
6374
6375/// `CreateReleaseConfig` request message.
6376#[derive(Clone, Default, PartialEq)]
6377#[non_exhaustive]
6378pub struct CreateReleaseConfigRequest {
6379    /// Required. The repository in which to create the release config. Must be in
6380    /// the format `projects/*/locations/*/repositories/*`.
6381    pub parent: std::string::String,
6382
6383    /// Required. The release config to create.
6384    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
6385
6386    /// Required. The ID to use for the release config, which will become the final
6387    /// component of the release config's resource name.
6388    pub release_config_id: std::string::String,
6389
6390    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6391}
6392
6393impl CreateReleaseConfigRequest {
6394    /// Creates a new default instance.
6395    pub fn new() -> Self {
6396        std::default::Default::default()
6397    }
6398
6399    /// Sets the value of [parent][crate::model::CreateReleaseConfigRequest::parent].
6400    ///
6401    /// # Example
6402    /// ```ignore,no_run
6403    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6404    /// let x = CreateReleaseConfigRequest::new().set_parent("example");
6405    /// ```
6406    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6407        self.parent = v.into();
6408        self
6409    }
6410
6411    /// Sets the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
6412    ///
6413    /// # Example
6414    /// ```ignore,no_run
6415    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6416    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6417    /// let x = CreateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6418    /// ```
6419    pub fn set_release_config<T>(mut self, v: T) -> Self
6420    where
6421        T: std::convert::Into<crate::model::ReleaseConfig>,
6422    {
6423        self.release_config = std::option::Option::Some(v.into());
6424        self
6425    }
6426
6427    /// Sets or clears the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
6428    ///
6429    /// # Example
6430    /// ```ignore,no_run
6431    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6432    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6433    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6434    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6435    /// ```
6436    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6437    where
6438        T: std::convert::Into<crate::model::ReleaseConfig>,
6439    {
6440        self.release_config = v.map(|x| x.into());
6441        self
6442    }
6443
6444    /// Sets the value of [release_config_id][crate::model::CreateReleaseConfigRequest::release_config_id].
6445    ///
6446    /// # Example
6447    /// ```ignore,no_run
6448    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6449    /// let x = CreateReleaseConfigRequest::new().set_release_config_id("example");
6450    /// ```
6451    pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
6452        mut self,
6453        v: T,
6454    ) -> Self {
6455        self.release_config_id = v.into();
6456        self
6457    }
6458}
6459
6460impl wkt::message::Message for CreateReleaseConfigRequest {
6461    fn typename() -> &'static str {
6462        "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
6463    }
6464}
6465
6466/// `UpdateReleaseConfig` request message.
6467#[derive(Clone, Default, PartialEq)]
6468#[non_exhaustive]
6469pub struct UpdateReleaseConfigRequest {
6470    /// Optional. Specifies the fields to be updated in the release config. If left
6471    /// unset, all fields will be updated.
6472    pub update_mask: std::option::Option<wkt::FieldMask>,
6473
6474    /// Required. The release config to update.
6475    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
6476
6477    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6478}
6479
6480impl UpdateReleaseConfigRequest {
6481    /// Creates a new default instance.
6482    pub fn new() -> Self {
6483        std::default::Default::default()
6484    }
6485
6486    /// Sets the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6487    ///
6488    /// # Example
6489    /// ```ignore,no_run
6490    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6491    /// use wkt::FieldMask;
6492    /// let x = UpdateReleaseConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6493    /// ```
6494    pub fn set_update_mask<T>(mut self, v: T) -> Self
6495    where
6496        T: std::convert::Into<wkt::FieldMask>,
6497    {
6498        self.update_mask = std::option::Option::Some(v.into());
6499        self
6500    }
6501
6502    /// Sets or clears the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6503    ///
6504    /// # Example
6505    /// ```ignore,no_run
6506    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6507    /// use wkt::FieldMask;
6508    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6509    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6510    /// ```
6511    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6512    where
6513        T: std::convert::Into<wkt::FieldMask>,
6514    {
6515        self.update_mask = v.map(|x| x.into());
6516        self
6517    }
6518
6519    /// Sets the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6520    ///
6521    /// # Example
6522    /// ```ignore,no_run
6523    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6524    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6525    /// let x = UpdateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6526    /// ```
6527    pub fn set_release_config<T>(mut self, v: T) -> Self
6528    where
6529        T: std::convert::Into<crate::model::ReleaseConfig>,
6530    {
6531        self.release_config = std::option::Option::Some(v.into());
6532        self
6533    }
6534
6535    /// Sets or clears the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6536    ///
6537    /// # Example
6538    /// ```ignore,no_run
6539    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6540    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6541    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6542    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6543    /// ```
6544    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6545    where
6546        T: std::convert::Into<crate::model::ReleaseConfig>,
6547    {
6548        self.release_config = v.map(|x| x.into());
6549        self
6550    }
6551}
6552
6553impl wkt::message::Message for UpdateReleaseConfigRequest {
6554    fn typename() -> &'static str {
6555        "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
6556    }
6557}
6558
6559/// `DeleteReleaseConfig` request message.
6560#[derive(Clone, Default, PartialEq)]
6561#[non_exhaustive]
6562pub struct DeleteReleaseConfigRequest {
6563    /// Required. The release config's name.
6564    pub name: std::string::String,
6565
6566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6567}
6568
6569impl DeleteReleaseConfigRequest {
6570    /// Creates a new default instance.
6571    pub fn new() -> Self {
6572        std::default::Default::default()
6573    }
6574
6575    /// Sets the value of [name][crate::model::DeleteReleaseConfigRequest::name].
6576    ///
6577    /// # Example
6578    /// ```ignore,no_run
6579    /// # use google_cloud_dataform_v1::model::DeleteReleaseConfigRequest;
6580    /// let x = DeleteReleaseConfigRequest::new().set_name("example");
6581    /// ```
6582    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6583        self.name = v.into();
6584        self
6585    }
6586}
6587
6588impl wkt::message::Message for DeleteReleaseConfigRequest {
6589    fn typename() -> &'static str {
6590        "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
6591    }
6592}
6593
6594/// Represents the result of compiling a Dataform project.
6595#[derive(Clone, Default, PartialEq)]
6596#[non_exhaustive]
6597pub struct CompilationResult {
6598    /// Output only. The compilation result's name.
6599    pub name: std::string::String,
6600
6601    /// Immutable. If set, fields of `code_compilation_config` override the default
6602    /// compilation settings that are specified in dataform.json.
6603    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
6604
6605    /// Output only. The fully resolved Git commit SHA of the code that was
6606    /// compiled. Not set for compilation results whose source is a workspace.
6607    pub resolved_git_commit_sha: std::string::String,
6608
6609    /// Output only. The version of `@dataform/core` that was used for compilation.
6610    pub dataform_core_version: std::string::String,
6611
6612    /// Output only. Errors encountered during project compilation.
6613    pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
6614
6615    /// Output only. Only set if the repository has a KMS Key.
6616    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
6617
6618    /// Output only. The timestamp of when the compilation result was created.
6619    pub create_time: std::option::Option<wkt::Timestamp>,
6620
6621    /// Output only. All the metadata information that is used internally to serve
6622    /// the resource. For example: timestamps, flags, status fields, etc. The
6623    /// format of this field is a JSON string.
6624    pub internal_metadata: std::option::Option<std::string::String>,
6625
6626    /// Output only. Metadata indicating whether this resource is user-scoped.
6627    /// `CompilationResult` resource is `user_scoped` only if it is sourced
6628    /// from a workspace.
6629    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
6630
6631    /// The source of the compilation result.
6632    pub source: std::option::Option<crate::model::compilation_result::Source>,
6633
6634    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6635}
6636
6637impl CompilationResult {
6638    /// Creates a new default instance.
6639    pub fn new() -> Self {
6640        std::default::Default::default()
6641    }
6642
6643    /// Sets the value of [name][crate::model::CompilationResult::name].
6644    ///
6645    /// # Example
6646    /// ```ignore,no_run
6647    /// # use google_cloud_dataform_v1::model::CompilationResult;
6648    /// let x = CompilationResult::new().set_name("example");
6649    /// ```
6650    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6651        self.name = v.into();
6652        self
6653    }
6654
6655    /// Sets the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6656    ///
6657    /// # Example
6658    /// ```ignore,no_run
6659    /// # use google_cloud_dataform_v1::model::CompilationResult;
6660    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6661    /// let x = CompilationResult::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
6662    /// ```
6663    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
6664    where
6665        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6666    {
6667        self.code_compilation_config = std::option::Option::Some(v.into());
6668        self
6669    }
6670
6671    /// Sets or clears the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6672    ///
6673    /// # Example
6674    /// ```ignore,no_run
6675    /// # use google_cloud_dataform_v1::model::CompilationResult;
6676    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6677    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
6678    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
6679    /// ```
6680    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
6681    where
6682        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6683    {
6684        self.code_compilation_config = v.map(|x| x.into());
6685        self
6686    }
6687
6688    /// Sets the value of [resolved_git_commit_sha][crate::model::CompilationResult::resolved_git_commit_sha].
6689    ///
6690    /// # Example
6691    /// ```ignore,no_run
6692    /// # use google_cloud_dataform_v1::model::CompilationResult;
6693    /// let x = CompilationResult::new().set_resolved_git_commit_sha("example");
6694    /// ```
6695    pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
6696        mut self,
6697        v: T,
6698    ) -> Self {
6699        self.resolved_git_commit_sha = v.into();
6700        self
6701    }
6702
6703    /// Sets the value of [dataform_core_version][crate::model::CompilationResult::dataform_core_version].
6704    ///
6705    /// # Example
6706    /// ```ignore,no_run
6707    /// # use google_cloud_dataform_v1::model::CompilationResult;
6708    /// let x = CompilationResult::new().set_dataform_core_version("example");
6709    /// ```
6710    pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
6711        mut self,
6712        v: T,
6713    ) -> Self {
6714        self.dataform_core_version = v.into();
6715        self
6716    }
6717
6718    /// Sets the value of [compilation_errors][crate::model::CompilationResult::compilation_errors].
6719    ///
6720    /// # Example
6721    /// ```ignore,no_run
6722    /// # use google_cloud_dataform_v1::model::CompilationResult;
6723    /// use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6724    /// let x = CompilationResult::new()
6725    ///     .set_compilation_errors([
6726    ///         CompilationError::default()/* use setters */,
6727    ///         CompilationError::default()/* use (different) setters */,
6728    ///     ]);
6729    /// ```
6730    pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
6731    where
6732        T: std::iter::IntoIterator<Item = V>,
6733        V: std::convert::Into<crate::model::compilation_result::CompilationError>,
6734    {
6735        use std::iter::Iterator;
6736        self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
6737        self
6738    }
6739
6740    /// Sets the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6741    ///
6742    /// # Example
6743    /// ```ignore,no_run
6744    /// # use google_cloud_dataform_v1::model::CompilationResult;
6745    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6746    /// let x = CompilationResult::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
6747    /// ```
6748    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
6749    where
6750        T: std::convert::Into<crate::model::DataEncryptionState>,
6751    {
6752        self.data_encryption_state = std::option::Option::Some(v.into());
6753        self
6754    }
6755
6756    /// Sets or clears the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6757    ///
6758    /// # Example
6759    /// ```ignore,no_run
6760    /// # use google_cloud_dataform_v1::model::CompilationResult;
6761    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6762    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
6763    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
6764    /// ```
6765    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
6766    where
6767        T: std::convert::Into<crate::model::DataEncryptionState>,
6768    {
6769        self.data_encryption_state = v.map(|x| x.into());
6770        self
6771    }
6772
6773    /// Sets the value of [create_time][crate::model::CompilationResult::create_time].
6774    ///
6775    /// # Example
6776    /// ```ignore,no_run
6777    /// # use google_cloud_dataform_v1::model::CompilationResult;
6778    /// use wkt::Timestamp;
6779    /// let x = CompilationResult::new().set_create_time(Timestamp::default()/* use setters */);
6780    /// ```
6781    pub fn set_create_time<T>(mut self, v: T) -> Self
6782    where
6783        T: std::convert::Into<wkt::Timestamp>,
6784    {
6785        self.create_time = std::option::Option::Some(v.into());
6786        self
6787    }
6788
6789    /// Sets or clears the value of [create_time][crate::model::CompilationResult::create_time].
6790    ///
6791    /// # Example
6792    /// ```ignore,no_run
6793    /// # use google_cloud_dataform_v1::model::CompilationResult;
6794    /// use wkt::Timestamp;
6795    /// let x = CompilationResult::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6796    /// let x = CompilationResult::new().set_or_clear_create_time(None::<Timestamp>);
6797    /// ```
6798    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6799    where
6800        T: std::convert::Into<wkt::Timestamp>,
6801    {
6802        self.create_time = v.map(|x| x.into());
6803        self
6804    }
6805
6806    /// Sets the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6807    ///
6808    /// # Example
6809    /// ```ignore,no_run
6810    /// # use google_cloud_dataform_v1::model::CompilationResult;
6811    /// let x = CompilationResult::new().set_internal_metadata("example");
6812    /// ```
6813    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
6814    where
6815        T: std::convert::Into<std::string::String>,
6816    {
6817        self.internal_metadata = std::option::Option::Some(v.into());
6818        self
6819    }
6820
6821    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6822    ///
6823    /// # Example
6824    /// ```ignore,no_run
6825    /// # use google_cloud_dataform_v1::model::CompilationResult;
6826    /// let x = CompilationResult::new().set_or_clear_internal_metadata(Some("example"));
6827    /// let x = CompilationResult::new().set_or_clear_internal_metadata(None::<String>);
6828    /// ```
6829    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6830    where
6831        T: std::convert::Into<std::string::String>,
6832    {
6833        self.internal_metadata = v.map(|x| x.into());
6834        self
6835    }
6836
6837    /// Sets the value of [private_resource_metadata][crate::model::CompilationResult::private_resource_metadata].
6838    ///
6839    /// # Example
6840    /// ```ignore,no_run
6841    /// # use google_cloud_dataform_v1::model::CompilationResult;
6842    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
6843    /// let x = CompilationResult::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
6844    /// ```
6845    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
6846    where
6847        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
6848    {
6849        self.private_resource_metadata = std::option::Option::Some(v.into());
6850        self
6851    }
6852
6853    /// Sets or clears the value of [private_resource_metadata][crate::model::CompilationResult::private_resource_metadata].
6854    ///
6855    /// # Example
6856    /// ```ignore,no_run
6857    /// # use google_cloud_dataform_v1::model::CompilationResult;
6858    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
6859    /// let x = CompilationResult::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
6860    /// let x = CompilationResult::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
6861    /// ```
6862    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6863    where
6864        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
6865    {
6866        self.private_resource_metadata = v.map(|x| x.into());
6867        self
6868    }
6869
6870    /// Sets the value of [source][crate::model::CompilationResult::source].
6871    ///
6872    /// Note that all the setters affecting `source` are mutually
6873    /// exclusive.
6874    ///
6875    /// # Example
6876    /// ```ignore,no_run
6877    /// # use google_cloud_dataform_v1::model::CompilationResult;
6878    /// use google_cloud_dataform_v1::model::compilation_result::Source;
6879    /// let x = CompilationResult::new().set_source(Some(Source::GitCommitish("example".to_string())));
6880    /// ```
6881    pub fn set_source<
6882        T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
6883    >(
6884        mut self,
6885        v: T,
6886    ) -> Self {
6887        self.source = v.into();
6888        self
6889    }
6890
6891    /// The value of [source][crate::model::CompilationResult::source]
6892    /// if it holds a `GitCommitish`, `None` if the field is not set or
6893    /// holds a different branch.
6894    pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
6895        #[allow(unreachable_patterns)]
6896        self.source.as_ref().and_then(|v| match v {
6897            crate::model::compilation_result::Source::GitCommitish(v) => {
6898                std::option::Option::Some(v)
6899            }
6900            _ => std::option::Option::None,
6901        })
6902    }
6903
6904    /// Sets the value of [source][crate::model::CompilationResult::source]
6905    /// to hold a `GitCommitish`.
6906    ///
6907    /// Note that all the setters affecting `source` are
6908    /// mutually exclusive.
6909    ///
6910    /// # Example
6911    /// ```ignore,no_run
6912    /// # use google_cloud_dataform_v1::model::CompilationResult;
6913    /// let x = CompilationResult::new().set_git_commitish("example");
6914    /// assert!(x.git_commitish().is_some());
6915    /// assert!(x.workspace().is_none());
6916    /// assert!(x.release_config().is_none());
6917    /// ```
6918    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6919        self.source = std::option::Option::Some(
6920            crate::model::compilation_result::Source::GitCommitish(v.into()),
6921        );
6922        self
6923    }
6924
6925    /// The value of [source][crate::model::CompilationResult::source]
6926    /// if it holds a `Workspace`, `None` if the field is not set or
6927    /// holds a different branch.
6928    pub fn workspace(&self) -> std::option::Option<&std::string::String> {
6929        #[allow(unreachable_patterns)]
6930        self.source.as_ref().and_then(|v| match v {
6931            crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
6932            _ => std::option::Option::None,
6933        })
6934    }
6935
6936    /// Sets the value of [source][crate::model::CompilationResult::source]
6937    /// to hold a `Workspace`.
6938    ///
6939    /// Note that all the setters affecting `source` are
6940    /// mutually exclusive.
6941    ///
6942    /// # Example
6943    /// ```ignore,no_run
6944    /// # use google_cloud_dataform_v1::model::CompilationResult;
6945    /// let x = CompilationResult::new().set_workspace("example");
6946    /// assert!(x.workspace().is_some());
6947    /// assert!(x.git_commitish().is_none());
6948    /// assert!(x.release_config().is_none());
6949    /// ```
6950    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6951        self.source = std::option::Option::Some(
6952            crate::model::compilation_result::Source::Workspace(v.into()),
6953        );
6954        self
6955    }
6956
6957    /// The value of [source][crate::model::CompilationResult::source]
6958    /// if it holds a `ReleaseConfig`, `None` if the field is not set or
6959    /// holds a different branch.
6960    pub fn release_config(&self) -> std::option::Option<&std::string::String> {
6961        #[allow(unreachable_patterns)]
6962        self.source.as_ref().and_then(|v| match v {
6963            crate::model::compilation_result::Source::ReleaseConfig(v) => {
6964                std::option::Option::Some(v)
6965            }
6966            _ => std::option::Option::None,
6967        })
6968    }
6969
6970    /// Sets the value of [source][crate::model::CompilationResult::source]
6971    /// to hold a `ReleaseConfig`.
6972    ///
6973    /// Note that all the setters affecting `source` are
6974    /// mutually exclusive.
6975    ///
6976    /// # Example
6977    /// ```ignore,no_run
6978    /// # use google_cloud_dataform_v1::model::CompilationResult;
6979    /// let x = CompilationResult::new().set_release_config("example");
6980    /// assert!(x.release_config().is_some());
6981    /// assert!(x.git_commitish().is_none());
6982    /// assert!(x.workspace().is_none());
6983    /// ```
6984    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6985        self.source = std::option::Option::Some(
6986            crate::model::compilation_result::Source::ReleaseConfig(v.into()),
6987        );
6988        self
6989    }
6990}
6991
6992impl wkt::message::Message for CompilationResult {
6993    fn typename() -> &'static str {
6994        "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
6995    }
6996}
6997
6998/// Defines additional types related to [CompilationResult].
6999pub mod compilation_result {
7000    #[allow(unused_imports)]
7001    use super::*;
7002
7003    /// An error encountered when attempting to compile a Dataform project.
7004    #[derive(Clone, Default, PartialEq)]
7005    #[non_exhaustive]
7006    pub struct CompilationError {
7007        /// Output only. The error's top level message.
7008        pub message: std::string::String,
7009
7010        /// Output only. The error's full stack trace.
7011        pub stack: std::string::String,
7012
7013        /// Output only. The path of the file where this error occurred, if
7014        /// available, relative to the project root.
7015        pub path: std::string::String,
7016
7017        /// Output only. The identifier of the action where this error occurred, if
7018        /// available.
7019        pub action_target: std::option::Option<crate::model::Target>,
7020
7021        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7022    }
7023
7024    impl CompilationError {
7025        /// Creates a new default instance.
7026        pub fn new() -> Self {
7027            std::default::Default::default()
7028        }
7029
7030        /// Sets the value of [message][crate::model::compilation_result::CompilationError::message].
7031        ///
7032        /// # Example
7033        /// ```ignore,no_run
7034        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7035        /// let x = CompilationError::new().set_message("example");
7036        /// ```
7037        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7038            self.message = v.into();
7039            self
7040        }
7041
7042        /// Sets the value of [stack][crate::model::compilation_result::CompilationError::stack].
7043        ///
7044        /// # Example
7045        /// ```ignore,no_run
7046        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7047        /// let x = CompilationError::new().set_stack("example");
7048        /// ```
7049        pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7050            self.stack = v.into();
7051            self
7052        }
7053
7054        /// Sets the value of [path][crate::model::compilation_result::CompilationError::path].
7055        ///
7056        /// # Example
7057        /// ```ignore,no_run
7058        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7059        /// let x = CompilationError::new().set_path("example");
7060        /// ```
7061        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7062            self.path = v.into();
7063            self
7064        }
7065
7066        /// Sets the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
7067        ///
7068        /// # Example
7069        /// ```ignore,no_run
7070        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7071        /// use google_cloud_dataform_v1::model::Target;
7072        /// let x = CompilationError::new().set_action_target(Target::default()/* use setters */);
7073        /// ```
7074        pub fn set_action_target<T>(mut self, v: T) -> Self
7075        where
7076            T: std::convert::Into<crate::model::Target>,
7077        {
7078            self.action_target = std::option::Option::Some(v.into());
7079            self
7080        }
7081
7082        /// Sets or clears the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
7083        ///
7084        /// # Example
7085        /// ```ignore,no_run
7086        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7087        /// use google_cloud_dataform_v1::model::Target;
7088        /// let x = CompilationError::new().set_or_clear_action_target(Some(Target::default()/* use setters */));
7089        /// let x = CompilationError::new().set_or_clear_action_target(None::<Target>);
7090        /// ```
7091        pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
7092        where
7093            T: std::convert::Into<crate::model::Target>,
7094        {
7095            self.action_target = v.map(|x| x.into());
7096            self
7097        }
7098    }
7099
7100    impl wkt::message::Message for CompilationError {
7101        fn typename() -> &'static str {
7102            "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
7103        }
7104    }
7105
7106    /// The source of the compilation result.
7107    #[derive(Clone, Debug, PartialEq)]
7108    #[non_exhaustive]
7109    pub enum Source {
7110        /// Immutable. Git commit/tag/branch name at which the repository should be
7111        /// compiled. Must exist in the remote repository. Examples:
7112        ///
7113        /// - a commit SHA: `12ade345`
7114        /// - a tag: `tag1`
7115        /// - a branch name: `branch1`
7116        GitCommitish(std::string::String),
7117        /// Immutable. The name of the workspace to compile. Must be in the format
7118        /// `projects/*/locations/*/repositories/*/workspaces/*`.
7119        Workspace(std::string::String),
7120        /// Immutable. The name of the release config to compile. Must be in the
7121        /// format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
7122        ReleaseConfig(std::string::String),
7123    }
7124}
7125
7126/// Configures various aspects of Dataform code compilation.
7127#[derive(Clone, Default, PartialEq)]
7128#[non_exhaustive]
7129pub struct CodeCompilationConfig {
7130    /// Optional. The default database (Google Cloud project ID).
7131    pub default_database: std::string::String,
7132
7133    /// Optional. The default schema (BigQuery dataset ID).
7134    pub default_schema: std::string::String,
7135
7136    /// Optional. The default BigQuery location to use. Defaults to "US".
7137    /// See the BigQuery docs for a full list of locations:
7138    /// <https://cloud.google.com/bigquery/docs/locations>.
7139    pub default_location: std::string::String,
7140
7141    /// Optional. The default schema (BigQuery dataset ID) for assertions.
7142    pub assertion_schema: std::string::String,
7143
7144    /// Optional. User-defined variables that are made available to project code
7145    /// during compilation.
7146    pub vars: std::collections::HashMap<std::string::String, std::string::String>,
7147
7148    /// Optional. The suffix that should be appended to all database (Google Cloud
7149    /// project ID) names.
7150    pub database_suffix: std::string::String,
7151
7152    /// Optional. The suffix that should be appended to all schema (BigQuery
7153    /// dataset ID) names.
7154    pub schema_suffix: std::string::String,
7155
7156    /// Optional. The prefix that should be prepended to all table names.
7157    pub table_prefix: std::string::String,
7158
7159    /// Optional. The prefix to prepend to built-in assertion names.
7160    pub builtin_assertion_name_prefix: std::string::String,
7161
7162    /// Optional. The default notebook runtime options.
7163    pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
7164
7165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7166}
7167
7168impl CodeCompilationConfig {
7169    /// Creates a new default instance.
7170    pub fn new() -> Self {
7171        std::default::Default::default()
7172    }
7173
7174    /// Sets the value of [default_database][crate::model::CodeCompilationConfig::default_database].
7175    ///
7176    /// # Example
7177    /// ```ignore,no_run
7178    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7179    /// let x = CodeCompilationConfig::new().set_default_database("example");
7180    /// ```
7181    pub fn set_default_database<T: std::convert::Into<std::string::String>>(
7182        mut self,
7183        v: T,
7184    ) -> Self {
7185        self.default_database = v.into();
7186        self
7187    }
7188
7189    /// Sets the value of [default_schema][crate::model::CodeCompilationConfig::default_schema].
7190    ///
7191    /// # Example
7192    /// ```ignore,no_run
7193    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7194    /// let x = CodeCompilationConfig::new().set_default_schema("example");
7195    /// ```
7196    pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7197        self.default_schema = v.into();
7198        self
7199    }
7200
7201    /// Sets the value of [default_location][crate::model::CodeCompilationConfig::default_location].
7202    ///
7203    /// # Example
7204    /// ```ignore,no_run
7205    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7206    /// let x = CodeCompilationConfig::new().set_default_location("example");
7207    /// ```
7208    pub fn set_default_location<T: std::convert::Into<std::string::String>>(
7209        mut self,
7210        v: T,
7211    ) -> Self {
7212        self.default_location = v.into();
7213        self
7214    }
7215
7216    /// Sets the value of [assertion_schema][crate::model::CodeCompilationConfig::assertion_schema].
7217    ///
7218    /// # Example
7219    /// ```ignore,no_run
7220    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7221    /// let x = CodeCompilationConfig::new().set_assertion_schema("example");
7222    /// ```
7223    pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
7224        mut self,
7225        v: T,
7226    ) -> Self {
7227        self.assertion_schema = v.into();
7228        self
7229    }
7230
7231    /// Sets the value of [vars][crate::model::CodeCompilationConfig::vars].
7232    ///
7233    /// # Example
7234    /// ```ignore,no_run
7235    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7236    /// let x = CodeCompilationConfig::new().set_vars([
7237    ///     ("key0", "abc"),
7238    ///     ("key1", "xyz"),
7239    /// ]);
7240    /// ```
7241    pub fn set_vars<T, K, V>(mut self, v: T) -> Self
7242    where
7243        T: std::iter::IntoIterator<Item = (K, V)>,
7244        K: std::convert::Into<std::string::String>,
7245        V: std::convert::Into<std::string::String>,
7246    {
7247        use std::iter::Iterator;
7248        self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7249        self
7250    }
7251
7252    /// Sets the value of [database_suffix][crate::model::CodeCompilationConfig::database_suffix].
7253    ///
7254    /// # Example
7255    /// ```ignore,no_run
7256    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7257    /// let x = CodeCompilationConfig::new().set_database_suffix("example");
7258    /// ```
7259    pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7260        self.database_suffix = v.into();
7261        self
7262    }
7263
7264    /// Sets the value of [schema_suffix][crate::model::CodeCompilationConfig::schema_suffix].
7265    ///
7266    /// # Example
7267    /// ```ignore,no_run
7268    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7269    /// let x = CodeCompilationConfig::new().set_schema_suffix("example");
7270    /// ```
7271    pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7272        self.schema_suffix = v.into();
7273        self
7274    }
7275
7276    /// Sets the value of [table_prefix][crate::model::CodeCompilationConfig::table_prefix].
7277    ///
7278    /// # Example
7279    /// ```ignore,no_run
7280    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7281    /// let x = CodeCompilationConfig::new().set_table_prefix("example");
7282    /// ```
7283    pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7284        self.table_prefix = v.into();
7285        self
7286    }
7287
7288    /// Sets the value of [builtin_assertion_name_prefix][crate::model::CodeCompilationConfig::builtin_assertion_name_prefix].
7289    ///
7290    /// # Example
7291    /// ```ignore,no_run
7292    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7293    /// let x = CodeCompilationConfig::new().set_builtin_assertion_name_prefix("example");
7294    /// ```
7295    pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
7296        mut self,
7297        v: T,
7298    ) -> Self {
7299        self.builtin_assertion_name_prefix = v.into();
7300        self
7301    }
7302
7303    /// Sets the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
7304    ///
7305    /// # Example
7306    /// ```ignore,no_run
7307    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7308    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7309    /// let x = CodeCompilationConfig::new().set_default_notebook_runtime_options(NotebookRuntimeOptions::default()/* use setters */);
7310    /// ```
7311    pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
7312    where
7313        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
7314    {
7315        self.default_notebook_runtime_options = std::option::Option::Some(v.into());
7316        self
7317    }
7318
7319    /// Sets or clears the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
7320    ///
7321    /// # Example
7322    /// ```ignore,no_run
7323    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7324    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7325    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(Some(NotebookRuntimeOptions::default()/* use setters */));
7326    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(None::<NotebookRuntimeOptions>);
7327    /// ```
7328    pub fn set_or_clear_default_notebook_runtime_options<T>(
7329        mut self,
7330        v: std::option::Option<T>,
7331    ) -> Self
7332    where
7333        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
7334    {
7335        self.default_notebook_runtime_options = v.map(|x| x.into());
7336        self
7337    }
7338}
7339
7340impl wkt::message::Message for CodeCompilationConfig {
7341    fn typename() -> &'static str {
7342        "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
7343    }
7344}
7345
7346/// Configures various aspects of Dataform notebook runtime.
7347#[derive(Clone, Default, PartialEq)]
7348#[non_exhaustive]
7349pub struct NotebookRuntimeOptions {
7350    /// Optional. The resource name of the [Colab runtime template]
7351    /// (<https://cloud.google.com/colab/docs/runtimes>), from which a runtime is
7352    /// created for notebook executions. If not specified, a runtime is created
7353    /// with Colab's default specifications.
7354    pub ai_platform_notebook_runtime_template: std::string::String,
7355
7356    /// The location to store the notebook execution result.
7357    pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
7358
7359    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7360}
7361
7362impl NotebookRuntimeOptions {
7363    /// Creates a new default instance.
7364    pub fn new() -> Self {
7365        std::default::Default::default()
7366    }
7367
7368    /// Sets the value of [ai_platform_notebook_runtime_template][crate::model::NotebookRuntimeOptions::ai_platform_notebook_runtime_template].
7369    ///
7370    /// # Example
7371    /// ```ignore,no_run
7372    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7373    /// let x = NotebookRuntimeOptions::new().set_ai_platform_notebook_runtime_template("example");
7374    /// ```
7375    pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
7376        mut self,
7377        v: T,
7378    ) -> Self {
7379        self.ai_platform_notebook_runtime_template = v.into();
7380        self
7381    }
7382
7383    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink].
7384    ///
7385    /// Note that all the setters affecting `execution_sink` are mutually
7386    /// exclusive.
7387    ///
7388    /// # Example
7389    /// ```ignore,no_run
7390    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7391    /// use google_cloud_dataform_v1::model::notebook_runtime_options::ExecutionSink;
7392    /// let x = NotebookRuntimeOptions::new().set_execution_sink(Some(ExecutionSink::GcsOutputBucket("example".to_string())));
7393    /// ```
7394    pub fn set_execution_sink<
7395        T: std::convert::Into<
7396                std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
7397            >,
7398    >(
7399        mut self,
7400        v: T,
7401    ) -> Self {
7402        self.execution_sink = v.into();
7403        self
7404    }
7405
7406    /// The value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
7407    /// if it holds a `GcsOutputBucket`, `None` if the field is not set or
7408    /// holds a different branch.
7409    pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
7410        #[allow(unreachable_patterns)]
7411        self.execution_sink.as_ref().and_then(|v| match v {
7412            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
7413                std::option::Option::Some(v)
7414            }
7415            _ => std::option::Option::None,
7416        })
7417    }
7418
7419    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
7420    /// to hold a `GcsOutputBucket`.
7421    ///
7422    /// Note that all the setters affecting `execution_sink` are
7423    /// mutually exclusive.
7424    ///
7425    /// # Example
7426    /// ```ignore,no_run
7427    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7428    /// let x = NotebookRuntimeOptions::new().set_gcs_output_bucket("example");
7429    /// assert!(x.gcs_output_bucket().is_some());
7430    /// ```
7431    pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
7432        mut self,
7433        v: T,
7434    ) -> Self {
7435        self.execution_sink = std::option::Option::Some(
7436            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
7437        );
7438        self
7439    }
7440}
7441
7442impl wkt::message::Message for NotebookRuntimeOptions {
7443    fn typename() -> &'static str {
7444        "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
7445    }
7446}
7447
7448/// Defines additional types related to [NotebookRuntimeOptions].
7449pub mod notebook_runtime_options {
7450    #[allow(unused_imports)]
7451    use super::*;
7452
7453    /// The location to store the notebook execution result.
7454    #[derive(Clone, Debug, PartialEq)]
7455    #[non_exhaustive]
7456    pub enum ExecutionSink {
7457        /// Optional. The Google Cloud Storage location to upload the result to.
7458        /// Format: `gs://bucket-name`.
7459        GcsOutputBucket(std::string::String),
7460    }
7461}
7462
7463/// `ListCompilationResults` request message.
7464#[derive(Clone, Default, PartialEq)]
7465#[non_exhaustive]
7466pub struct ListCompilationResultsRequest {
7467    /// Required. The repository in which to list compilation results. Must be in
7468    /// the format `projects/*/locations/*/repositories/*`.
7469    pub parent: std::string::String,
7470
7471    /// Optional. Maximum number of compilation results to return. The server may
7472    /// return fewer items than requested. If unspecified, the server will pick an
7473    /// appropriate default.
7474    pub page_size: i32,
7475
7476    /// Optional. Page token received from a previous `ListCompilationResults`
7477    /// call. Provide this to retrieve the subsequent page.
7478    ///
7479    /// When paginating, all other parameters provided to `ListCompilationResults`,
7480    /// with the exception of `page_size`, must match the call that provided the
7481    /// page token.
7482    pub page_token: std::string::String,
7483
7484    /// Optional. This field only supports ordering by `name` and `create_time`.
7485    /// If unspecified, the server will choose the ordering.
7486    /// If specified, the default order is ascending for the `name` field.
7487    pub order_by: std::string::String,
7488
7489    /// Optional. Filter for the returned list.
7490    pub filter: std::string::String,
7491
7492    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7493}
7494
7495impl ListCompilationResultsRequest {
7496    /// Creates a new default instance.
7497    pub fn new() -> Self {
7498        std::default::Default::default()
7499    }
7500
7501    /// Sets the value of [parent][crate::model::ListCompilationResultsRequest::parent].
7502    ///
7503    /// # Example
7504    /// ```ignore,no_run
7505    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7506    /// let x = ListCompilationResultsRequest::new().set_parent("example");
7507    /// ```
7508    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7509        self.parent = v.into();
7510        self
7511    }
7512
7513    /// Sets the value of [page_size][crate::model::ListCompilationResultsRequest::page_size].
7514    ///
7515    /// # Example
7516    /// ```ignore,no_run
7517    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7518    /// let x = ListCompilationResultsRequest::new().set_page_size(42);
7519    /// ```
7520    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7521        self.page_size = v.into();
7522        self
7523    }
7524
7525    /// Sets the value of [page_token][crate::model::ListCompilationResultsRequest::page_token].
7526    ///
7527    /// # Example
7528    /// ```ignore,no_run
7529    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7530    /// let x = ListCompilationResultsRequest::new().set_page_token("example");
7531    /// ```
7532    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7533        self.page_token = v.into();
7534        self
7535    }
7536
7537    /// Sets the value of [order_by][crate::model::ListCompilationResultsRequest::order_by].
7538    ///
7539    /// # Example
7540    /// ```ignore,no_run
7541    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7542    /// let x = ListCompilationResultsRequest::new().set_order_by("example");
7543    /// ```
7544    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7545        self.order_by = v.into();
7546        self
7547    }
7548
7549    /// Sets the value of [filter][crate::model::ListCompilationResultsRequest::filter].
7550    ///
7551    /// # Example
7552    /// ```ignore,no_run
7553    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7554    /// let x = ListCompilationResultsRequest::new().set_filter("example");
7555    /// ```
7556    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7557        self.filter = v.into();
7558        self
7559    }
7560}
7561
7562impl wkt::message::Message for ListCompilationResultsRequest {
7563    fn typename() -> &'static str {
7564        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
7565    }
7566}
7567
7568/// `ListCompilationResults` response message.
7569#[derive(Clone, Default, PartialEq)]
7570#[non_exhaustive]
7571pub struct ListCompilationResultsResponse {
7572    /// List of compilation results.
7573    pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
7574
7575    /// A token, which can be sent as `page_token` to retrieve the next page.
7576    /// If this field is omitted, there are no subsequent pages.
7577    pub next_page_token: std::string::String,
7578
7579    /// Locations which could not be reached.
7580    pub unreachable: std::vec::Vec<std::string::String>,
7581
7582    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7583}
7584
7585impl ListCompilationResultsResponse {
7586    /// Creates a new default instance.
7587    pub fn new() -> Self {
7588        std::default::Default::default()
7589    }
7590
7591    /// Sets the value of [compilation_results][crate::model::ListCompilationResultsResponse::compilation_results].
7592    ///
7593    /// # Example
7594    /// ```ignore,no_run
7595    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7596    /// use google_cloud_dataform_v1::model::CompilationResult;
7597    /// let x = ListCompilationResultsResponse::new()
7598    ///     .set_compilation_results([
7599    ///         CompilationResult::default()/* use setters */,
7600    ///         CompilationResult::default()/* use (different) setters */,
7601    ///     ]);
7602    /// ```
7603    pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
7604    where
7605        T: std::iter::IntoIterator<Item = V>,
7606        V: std::convert::Into<crate::model::CompilationResult>,
7607    {
7608        use std::iter::Iterator;
7609        self.compilation_results = v.into_iter().map(|i| i.into()).collect();
7610        self
7611    }
7612
7613    /// Sets the value of [next_page_token][crate::model::ListCompilationResultsResponse::next_page_token].
7614    ///
7615    /// # Example
7616    /// ```ignore,no_run
7617    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7618    /// let x = ListCompilationResultsResponse::new().set_next_page_token("example");
7619    /// ```
7620    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7621        self.next_page_token = v.into();
7622        self
7623    }
7624
7625    /// Sets the value of [unreachable][crate::model::ListCompilationResultsResponse::unreachable].
7626    ///
7627    /// # Example
7628    /// ```ignore,no_run
7629    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7630    /// let x = ListCompilationResultsResponse::new().set_unreachable(["a", "b", "c"]);
7631    /// ```
7632    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7633    where
7634        T: std::iter::IntoIterator<Item = V>,
7635        V: std::convert::Into<std::string::String>,
7636    {
7637        use std::iter::Iterator;
7638        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7639        self
7640    }
7641}
7642
7643impl wkt::message::Message for ListCompilationResultsResponse {
7644    fn typename() -> &'static str {
7645        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
7646    }
7647}
7648
7649#[doc(hidden)]
7650impl google_cloud_gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
7651    type PageItem = crate::model::CompilationResult;
7652
7653    fn items(self) -> std::vec::Vec<Self::PageItem> {
7654        self.compilation_results
7655    }
7656
7657    fn next_page_token(&self) -> std::string::String {
7658        use std::clone::Clone;
7659        self.next_page_token.clone()
7660    }
7661}
7662
7663/// `GetCompilationResult` request message.
7664#[derive(Clone, Default, PartialEq)]
7665#[non_exhaustive]
7666pub struct GetCompilationResultRequest {
7667    /// Required. The compilation result's name.
7668    pub name: std::string::String,
7669
7670    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7671}
7672
7673impl GetCompilationResultRequest {
7674    /// Creates a new default instance.
7675    pub fn new() -> Self {
7676        std::default::Default::default()
7677    }
7678
7679    /// Sets the value of [name][crate::model::GetCompilationResultRequest::name].
7680    ///
7681    /// # Example
7682    /// ```ignore,no_run
7683    /// # use google_cloud_dataform_v1::model::GetCompilationResultRequest;
7684    /// let x = GetCompilationResultRequest::new().set_name("example");
7685    /// ```
7686    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7687        self.name = v.into();
7688        self
7689    }
7690}
7691
7692impl wkt::message::Message for GetCompilationResultRequest {
7693    fn typename() -> &'static str {
7694        "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
7695    }
7696}
7697
7698/// `CreateCompilationResult` request message.
7699#[derive(Clone, Default, PartialEq)]
7700#[non_exhaustive]
7701pub struct CreateCompilationResultRequest {
7702    /// Required. The repository in which to create the compilation result. Must be
7703    /// in the format `projects/*/locations/*/repositories/*`.
7704    pub parent: std::string::String,
7705
7706    /// Required. The compilation result to create.
7707    pub compilation_result: std::option::Option<crate::model::CompilationResult>,
7708
7709    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7710}
7711
7712impl CreateCompilationResultRequest {
7713    /// Creates a new default instance.
7714    pub fn new() -> Self {
7715        std::default::Default::default()
7716    }
7717
7718    /// Sets the value of [parent][crate::model::CreateCompilationResultRequest::parent].
7719    ///
7720    /// # Example
7721    /// ```ignore,no_run
7722    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7723    /// let x = CreateCompilationResultRequest::new().set_parent("example");
7724    /// ```
7725    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7726        self.parent = v.into();
7727        self
7728    }
7729
7730    /// Sets the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7731    ///
7732    /// # Example
7733    /// ```ignore,no_run
7734    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7735    /// use google_cloud_dataform_v1::model::CompilationResult;
7736    /// let x = CreateCompilationResultRequest::new().set_compilation_result(CompilationResult::default()/* use setters */);
7737    /// ```
7738    pub fn set_compilation_result<T>(mut self, v: T) -> Self
7739    where
7740        T: std::convert::Into<crate::model::CompilationResult>,
7741    {
7742        self.compilation_result = std::option::Option::Some(v.into());
7743        self
7744    }
7745
7746    /// Sets or clears the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7747    ///
7748    /// # Example
7749    /// ```ignore,no_run
7750    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7751    /// use google_cloud_dataform_v1::model::CompilationResult;
7752    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(Some(CompilationResult::default()/* use setters */));
7753    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(None::<CompilationResult>);
7754    /// ```
7755    pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
7756    where
7757        T: std::convert::Into<crate::model::CompilationResult>,
7758    {
7759        self.compilation_result = v.map(|x| x.into());
7760        self
7761    }
7762}
7763
7764impl wkt::message::Message for CreateCompilationResultRequest {
7765    fn typename() -> &'static str {
7766        "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
7767    }
7768}
7769
7770/// Represents an action identifier. If the action writes output, the output
7771/// will be written to the referenced database object.
7772#[derive(Clone, Default, PartialEq)]
7773#[non_exhaustive]
7774pub struct Target {
7775    /// Optional. The action's database (Google Cloud project ID) .
7776    pub database: std::string::String,
7777
7778    /// Optional. The action's schema (BigQuery dataset ID), within `database`.
7779    pub schema: std::string::String,
7780
7781    /// Optional. The action's name, within `database` and `schema`.
7782    pub name: std::string::String,
7783
7784    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7785}
7786
7787impl Target {
7788    /// Creates a new default instance.
7789    pub fn new() -> Self {
7790        std::default::Default::default()
7791    }
7792
7793    /// Sets the value of [database][crate::model::Target::database].
7794    ///
7795    /// # Example
7796    /// ```ignore,no_run
7797    /// # use google_cloud_dataform_v1::model::Target;
7798    /// let x = Target::new().set_database("example");
7799    /// ```
7800    pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7801        self.database = v.into();
7802        self
7803    }
7804
7805    /// Sets the value of [schema][crate::model::Target::schema].
7806    ///
7807    /// # Example
7808    /// ```ignore,no_run
7809    /// # use google_cloud_dataform_v1::model::Target;
7810    /// let x = Target::new().set_schema("example");
7811    /// ```
7812    pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7813        self.schema = v.into();
7814        self
7815    }
7816
7817    /// Sets the value of [name][crate::model::Target::name].
7818    ///
7819    /// # Example
7820    /// ```ignore,no_run
7821    /// # use google_cloud_dataform_v1::model::Target;
7822    /// let x = Target::new().set_name("example");
7823    /// ```
7824    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7825        self.name = v.into();
7826        self
7827    }
7828}
7829
7830impl wkt::message::Message for Target {
7831    fn typename() -> &'static str {
7832        "type.googleapis.com/google.cloud.dataform.v1.Target"
7833    }
7834}
7835
7836/// Describes a relation and its columns.
7837#[derive(Clone, Default, PartialEq)]
7838#[non_exhaustive]
7839pub struct RelationDescriptor {
7840    /// A text description of the relation.
7841    pub description: std::string::String,
7842
7843    /// A list of descriptions of columns within the relation.
7844    pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
7845
7846    /// A set of BigQuery labels that should be applied to the relation.
7847    pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
7848
7849    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7850}
7851
7852impl RelationDescriptor {
7853    /// Creates a new default instance.
7854    pub fn new() -> Self {
7855        std::default::Default::default()
7856    }
7857
7858    /// Sets the value of [description][crate::model::RelationDescriptor::description].
7859    ///
7860    /// # Example
7861    /// ```ignore,no_run
7862    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7863    /// let x = RelationDescriptor::new().set_description("example");
7864    /// ```
7865    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7866        self.description = v.into();
7867        self
7868    }
7869
7870    /// Sets the value of [columns][crate::model::RelationDescriptor::columns].
7871    ///
7872    /// # Example
7873    /// ```ignore,no_run
7874    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7875    /// use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7876    /// let x = RelationDescriptor::new()
7877    ///     .set_columns([
7878    ///         ColumnDescriptor::default()/* use setters */,
7879    ///         ColumnDescriptor::default()/* use (different) setters */,
7880    ///     ]);
7881    /// ```
7882    pub fn set_columns<T, V>(mut self, v: T) -> Self
7883    where
7884        T: std::iter::IntoIterator<Item = V>,
7885        V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
7886    {
7887        use std::iter::Iterator;
7888        self.columns = v.into_iter().map(|i| i.into()).collect();
7889        self
7890    }
7891
7892    /// Sets the value of [bigquery_labels][crate::model::RelationDescriptor::bigquery_labels].
7893    ///
7894    /// # Example
7895    /// ```ignore,no_run
7896    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
7897    /// let x = RelationDescriptor::new().set_bigquery_labels([
7898    ///     ("key0", "abc"),
7899    ///     ("key1", "xyz"),
7900    /// ]);
7901    /// ```
7902    pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
7903    where
7904        T: std::iter::IntoIterator<Item = (K, V)>,
7905        K: std::convert::Into<std::string::String>,
7906        V: std::convert::Into<std::string::String>,
7907    {
7908        use std::iter::Iterator;
7909        self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7910        self
7911    }
7912}
7913
7914impl wkt::message::Message for RelationDescriptor {
7915    fn typename() -> &'static str {
7916        "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
7917    }
7918}
7919
7920/// Defines additional types related to [RelationDescriptor].
7921pub mod relation_descriptor {
7922    #[allow(unused_imports)]
7923    use super::*;
7924
7925    /// Describes a column.
7926    #[derive(Clone, Default, PartialEq)]
7927    #[non_exhaustive]
7928    pub struct ColumnDescriptor {
7929        /// The identifier for the column. Each entry in `path` represents one level
7930        /// of nesting.
7931        pub path: std::vec::Vec<std::string::String>,
7932
7933        /// A textual description of the column.
7934        pub description: std::string::String,
7935
7936        /// A list of BigQuery policy tags that will be applied to the column.
7937        pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
7938
7939        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7940    }
7941
7942    impl ColumnDescriptor {
7943        /// Creates a new default instance.
7944        pub fn new() -> Self {
7945            std::default::Default::default()
7946        }
7947
7948        /// Sets the value of [path][crate::model::relation_descriptor::ColumnDescriptor::path].
7949        ///
7950        /// # Example
7951        /// ```ignore,no_run
7952        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7953        /// let x = ColumnDescriptor::new().set_path(["a", "b", "c"]);
7954        /// ```
7955        pub fn set_path<T, V>(mut self, v: T) -> Self
7956        where
7957            T: std::iter::IntoIterator<Item = V>,
7958            V: std::convert::Into<std::string::String>,
7959        {
7960            use std::iter::Iterator;
7961            self.path = v.into_iter().map(|i| i.into()).collect();
7962            self
7963        }
7964
7965        /// Sets the value of [description][crate::model::relation_descriptor::ColumnDescriptor::description].
7966        ///
7967        /// # Example
7968        /// ```ignore,no_run
7969        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7970        /// let x = ColumnDescriptor::new().set_description("example");
7971        /// ```
7972        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7973            self.description = v.into();
7974            self
7975        }
7976
7977        /// Sets the value of [bigquery_policy_tags][crate::model::relation_descriptor::ColumnDescriptor::bigquery_policy_tags].
7978        ///
7979        /// # Example
7980        /// ```ignore,no_run
7981        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
7982        /// let x = ColumnDescriptor::new().set_bigquery_policy_tags(["a", "b", "c"]);
7983        /// ```
7984        pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
7985        where
7986            T: std::iter::IntoIterator<Item = V>,
7987            V: std::convert::Into<std::string::String>,
7988        {
7989            use std::iter::Iterator;
7990            self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
7991            self
7992        }
7993    }
7994
7995    impl wkt::message::Message for ColumnDescriptor {
7996        fn typename() -> &'static str {
7997            "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
7998        }
7999    }
8000}
8001
8002/// Represents a single Dataform action in a compilation result.
8003#[derive(Clone, Default, PartialEq)]
8004#[non_exhaustive]
8005pub struct CompilationResultAction {
8006    /// This action's identifier. Unique within the compilation result.
8007    pub target: std::option::Option<crate::model::Target>,
8008
8009    /// The action's identifier if the project had been compiled without any
8010    /// overrides configured. Unique within the compilation result.
8011    pub canonical_target: std::option::Option<crate::model::Target>,
8012
8013    /// The full path including filename in which this action is located, relative
8014    /// to the workspace root.
8015    pub file_path: std::string::String,
8016
8017    /// Output only. All the metadata information that is used internally to serve
8018    /// the resource. For example: timestamps, flags, status fields, etc. The
8019    /// format of this field is a JSON string.
8020    pub internal_metadata: std::option::Option<std::string::String>,
8021
8022    /// The compiled object.
8023    pub compiled_object:
8024        std::option::Option<crate::model::compilation_result_action::CompiledObject>,
8025
8026    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8027}
8028
8029impl CompilationResultAction {
8030    /// Creates a new default instance.
8031    pub fn new() -> Self {
8032        std::default::Default::default()
8033    }
8034
8035    /// Sets the value of [target][crate::model::CompilationResultAction::target].
8036    ///
8037    /// # Example
8038    /// ```ignore,no_run
8039    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8040    /// use google_cloud_dataform_v1::model::Target;
8041    /// let x = CompilationResultAction::new().set_target(Target::default()/* use setters */);
8042    /// ```
8043    pub fn set_target<T>(mut self, v: T) -> Self
8044    where
8045        T: std::convert::Into<crate::model::Target>,
8046    {
8047        self.target = std::option::Option::Some(v.into());
8048        self
8049    }
8050
8051    /// Sets or clears the value of [target][crate::model::CompilationResultAction::target].
8052    ///
8053    /// # Example
8054    /// ```ignore,no_run
8055    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8056    /// use google_cloud_dataform_v1::model::Target;
8057    /// let x = CompilationResultAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
8058    /// let x = CompilationResultAction::new().set_or_clear_target(None::<Target>);
8059    /// ```
8060    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
8061    where
8062        T: std::convert::Into<crate::model::Target>,
8063    {
8064        self.target = v.map(|x| x.into());
8065        self
8066    }
8067
8068    /// Sets the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
8069    ///
8070    /// # Example
8071    /// ```ignore,no_run
8072    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8073    /// use google_cloud_dataform_v1::model::Target;
8074    /// let x = CompilationResultAction::new().set_canonical_target(Target::default()/* use setters */);
8075    /// ```
8076    pub fn set_canonical_target<T>(mut self, v: T) -> Self
8077    where
8078        T: std::convert::Into<crate::model::Target>,
8079    {
8080        self.canonical_target = std::option::Option::Some(v.into());
8081        self
8082    }
8083
8084    /// Sets or clears the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
8085    ///
8086    /// # Example
8087    /// ```ignore,no_run
8088    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8089    /// use google_cloud_dataform_v1::model::Target;
8090    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
8091    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(None::<Target>);
8092    /// ```
8093    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
8094    where
8095        T: std::convert::Into<crate::model::Target>,
8096    {
8097        self.canonical_target = v.map(|x| x.into());
8098        self
8099    }
8100
8101    /// Sets the value of [file_path][crate::model::CompilationResultAction::file_path].
8102    ///
8103    /// # Example
8104    /// ```ignore,no_run
8105    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8106    /// let x = CompilationResultAction::new().set_file_path("example");
8107    /// ```
8108    pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8109        self.file_path = v.into();
8110        self
8111    }
8112
8113    /// Sets the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
8114    ///
8115    /// # Example
8116    /// ```ignore,no_run
8117    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8118    /// let x = CompilationResultAction::new().set_internal_metadata("example");
8119    /// ```
8120    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
8121    where
8122        T: std::convert::Into<std::string::String>,
8123    {
8124        self.internal_metadata = std::option::Option::Some(v.into());
8125        self
8126    }
8127
8128    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
8129    ///
8130    /// # Example
8131    /// ```ignore,no_run
8132    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8133    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(Some("example"));
8134    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(None::<String>);
8135    /// ```
8136    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
8137    where
8138        T: std::convert::Into<std::string::String>,
8139    {
8140        self.internal_metadata = v.map(|x| x.into());
8141        self
8142    }
8143
8144    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object].
8145    ///
8146    /// Note that all the setters affecting `compiled_object` are mutually
8147    /// exclusive.
8148    ///
8149    /// # Example
8150    /// ```ignore,no_run
8151    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8152    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8153    /// let x = CompilationResultAction::new().set_compiled_object(Some(
8154    ///     google_cloud_dataform_v1::model::compilation_result_action::CompiledObject::Relation(Relation::default().into())));
8155    /// ```
8156    pub fn set_compiled_object<
8157        T: std::convert::Into<
8158                std::option::Option<crate::model::compilation_result_action::CompiledObject>,
8159            >,
8160    >(
8161        mut self,
8162        v: T,
8163    ) -> Self {
8164        self.compiled_object = v.into();
8165        self
8166    }
8167
8168    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8169    /// if it holds a `Relation`, `None` if the field is not set or
8170    /// holds a different branch.
8171    pub fn relation(
8172        &self,
8173    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
8174    {
8175        #[allow(unreachable_patterns)]
8176        self.compiled_object.as_ref().and_then(|v| match v {
8177            crate::model::compilation_result_action::CompiledObject::Relation(v) => {
8178                std::option::Option::Some(v)
8179            }
8180            _ => std::option::Option::None,
8181        })
8182    }
8183
8184    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8185    /// to hold a `Relation`.
8186    ///
8187    /// Note that all the setters affecting `compiled_object` are
8188    /// mutually exclusive.
8189    ///
8190    /// # Example
8191    /// ```ignore,no_run
8192    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8193    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8194    /// let x = CompilationResultAction::new().set_relation(Relation::default()/* use setters */);
8195    /// assert!(x.relation().is_some());
8196    /// assert!(x.operations().is_none());
8197    /// assert!(x.assertion().is_none());
8198    /// assert!(x.declaration().is_none());
8199    /// assert!(x.notebook().is_none());
8200    /// assert!(x.data_preparation().is_none());
8201    /// ```
8202    pub fn set_relation<
8203        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
8204    >(
8205        mut self,
8206        v: T,
8207    ) -> Self {
8208        self.compiled_object = std::option::Option::Some(
8209            crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
8210        );
8211        self
8212    }
8213
8214    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8215    /// if it holds a `Operations`, `None` if the field is not set or
8216    /// holds a different branch.
8217    pub fn operations(
8218        &self,
8219    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
8220    {
8221        #[allow(unreachable_patterns)]
8222        self.compiled_object.as_ref().and_then(|v| match v {
8223            crate::model::compilation_result_action::CompiledObject::Operations(v) => {
8224                std::option::Option::Some(v)
8225            }
8226            _ => std::option::Option::None,
8227        })
8228    }
8229
8230    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8231    /// to hold a `Operations`.
8232    ///
8233    /// Note that all the setters affecting `compiled_object` are
8234    /// mutually exclusive.
8235    ///
8236    /// # Example
8237    /// ```ignore,no_run
8238    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8239    /// use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8240    /// let x = CompilationResultAction::new().set_operations(Operations::default()/* use setters */);
8241    /// assert!(x.operations().is_some());
8242    /// assert!(x.relation().is_none());
8243    /// assert!(x.assertion().is_none());
8244    /// assert!(x.declaration().is_none());
8245    /// assert!(x.notebook().is_none());
8246    /// assert!(x.data_preparation().is_none());
8247    /// ```
8248    pub fn set_operations<
8249        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
8250    >(
8251        mut self,
8252        v: T,
8253    ) -> Self {
8254        self.compiled_object = std::option::Option::Some(
8255            crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
8256        );
8257        self
8258    }
8259
8260    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8261    /// if it holds a `Assertion`, `None` if the field is not set or
8262    /// holds a different branch.
8263    pub fn assertion(
8264        &self,
8265    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
8266    {
8267        #[allow(unreachable_patterns)]
8268        self.compiled_object.as_ref().and_then(|v| match v {
8269            crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
8270                std::option::Option::Some(v)
8271            }
8272            _ => std::option::Option::None,
8273        })
8274    }
8275
8276    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8277    /// to hold a `Assertion`.
8278    ///
8279    /// Note that all the setters affecting `compiled_object` are
8280    /// mutually exclusive.
8281    ///
8282    /// # Example
8283    /// ```ignore,no_run
8284    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8285    /// use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8286    /// let x = CompilationResultAction::new().set_assertion(Assertion::default()/* use setters */);
8287    /// assert!(x.assertion().is_some());
8288    /// assert!(x.relation().is_none());
8289    /// assert!(x.operations().is_none());
8290    /// assert!(x.declaration().is_none());
8291    /// assert!(x.notebook().is_none());
8292    /// assert!(x.data_preparation().is_none());
8293    /// ```
8294    pub fn set_assertion<
8295        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
8296    >(
8297        mut self,
8298        v: T,
8299    ) -> Self {
8300        self.compiled_object = std::option::Option::Some(
8301            crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
8302        );
8303        self
8304    }
8305
8306    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8307    /// if it holds a `Declaration`, `None` if the field is not set or
8308    /// holds a different branch.
8309    pub fn declaration(
8310        &self,
8311    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
8312    {
8313        #[allow(unreachable_patterns)]
8314        self.compiled_object.as_ref().and_then(|v| match v {
8315            crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
8316                std::option::Option::Some(v)
8317            }
8318            _ => std::option::Option::None,
8319        })
8320    }
8321
8322    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8323    /// to hold a `Declaration`.
8324    ///
8325    /// Note that all the setters affecting `compiled_object` are
8326    /// mutually exclusive.
8327    ///
8328    /// # Example
8329    /// ```ignore,no_run
8330    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8331    /// use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
8332    /// let x = CompilationResultAction::new().set_declaration(Declaration::default()/* use setters */);
8333    /// assert!(x.declaration().is_some());
8334    /// assert!(x.relation().is_none());
8335    /// assert!(x.operations().is_none());
8336    /// assert!(x.assertion().is_none());
8337    /// assert!(x.notebook().is_none());
8338    /// assert!(x.data_preparation().is_none());
8339    /// ```
8340    pub fn set_declaration<
8341        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
8342    >(
8343        mut self,
8344        v: T,
8345    ) -> Self {
8346        self.compiled_object = std::option::Option::Some(
8347            crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
8348        );
8349        self
8350    }
8351
8352    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8353    /// if it holds a `Notebook`, `None` if the field is not set or
8354    /// holds a different branch.
8355    pub fn notebook(
8356        &self,
8357    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
8358    {
8359        #[allow(unreachable_patterns)]
8360        self.compiled_object.as_ref().and_then(|v| match v {
8361            crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
8362                std::option::Option::Some(v)
8363            }
8364            _ => std::option::Option::None,
8365        })
8366    }
8367
8368    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8369    /// to hold a `Notebook`.
8370    ///
8371    /// Note that all the setters affecting `compiled_object` are
8372    /// mutually exclusive.
8373    ///
8374    /// # Example
8375    /// ```ignore,no_run
8376    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8377    /// use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8378    /// let x = CompilationResultAction::new().set_notebook(Notebook::default()/* use setters */);
8379    /// assert!(x.notebook().is_some());
8380    /// assert!(x.relation().is_none());
8381    /// assert!(x.operations().is_none());
8382    /// assert!(x.assertion().is_none());
8383    /// assert!(x.declaration().is_none());
8384    /// assert!(x.data_preparation().is_none());
8385    /// ```
8386    pub fn set_notebook<
8387        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
8388    >(
8389        mut self,
8390        v: T,
8391    ) -> Self {
8392        self.compiled_object = std::option::Option::Some(
8393            crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
8394        );
8395        self
8396    }
8397
8398    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8399    /// if it holds a `DataPreparation`, `None` if the field is not set or
8400    /// holds a different branch.
8401    pub fn data_preparation(
8402        &self,
8403    ) -> std::option::Option<
8404        &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
8405    > {
8406        #[allow(unreachable_patterns)]
8407        self.compiled_object.as_ref().and_then(|v| match v {
8408            crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
8409                std::option::Option::Some(v)
8410            }
8411            _ => std::option::Option::None,
8412        })
8413    }
8414
8415    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8416    /// to hold a `DataPreparation`.
8417    ///
8418    /// Note that all the setters affecting `compiled_object` are
8419    /// mutually exclusive.
8420    ///
8421    /// # Example
8422    /// ```ignore,no_run
8423    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8424    /// use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
8425    /// let x = CompilationResultAction::new().set_data_preparation(DataPreparation::default()/* use setters */);
8426    /// assert!(x.data_preparation().is_some());
8427    /// assert!(x.relation().is_none());
8428    /// assert!(x.operations().is_none());
8429    /// assert!(x.assertion().is_none());
8430    /// assert!(x.declaration().is_none());
8431    /// assert!(x.notebook().is_none());
8432    /// ```
8433    pub fn set_data_preparation<
8434        T: std::convert::Into<
8435                std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
8436            >,
8437    >(
8438        mut self,
8439        v: T,
8440    ) -> Self {
8441        self.compiled_object = std::option::Option::Some(
8442            crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
8443        );
8444        self
8445    }
8446}
8447
8448impl wkt::message::Message for CompilationResultAction {
8449    fn typename() -> &'static str {
8450        "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
8451    }
8452}
8453
8454/// Defines additional types related to [CompilationResultAction].
8455pub mod compilation_result_action {
8456    #[allow(unused_imports)]
8457    use super::*;
8458
8459    /// Represents a database relation.
8460    #[derive(Clone, Default, PartialEq)]
8461    #[non_exhaustive]
8462    pub struct Relation {
8463        /// A list of actions that this action depends on.
8464        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8465
8466        /// Whether this action is disabled (i.e. should not be run).
8467        pub disabled: bool,
8468
8469        /// Arbitrary, user-defined tags on this action.
8470        pub tags: std::vec::Vec<std::string::String>,
8471
8472        /// Descriptor for the relation and its columns.
8473        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8474
8475        /// The type of this relation.
8476        pub relation_type: crate::model::compilation_result_action::relation::RelationType,
8477
8478        /// The SELECT query which returns rows which this relation should contain.
8479        pub select_query: std::string::String,
8480
8481        /// SQL statements to be executed before creating the relation.
8482        pub pre_operations: std::vec::Vec<std::string::String>,
8483
8484        /// SQL statements to be executed after creating the relation.
8485        pub post_operations: std::vec::Vec<std::string::String>,
8486
8487        /// Configures `INCREMENTAL_TABLE` settings for this relation. Only set if
8488        /// `relation_type` is `INCREMENTAL_TABLE`.
8489        pub incremental_table_config: std::option::Option<
8490            crate::model::compilation_result_action::relation::IncrementalTableConfig,
8491        >,
8492
8493        /// The SQL expression used to partition the relation.
8494        pub partition_expression: std::string::String,
8495
8496        /// A list of columns or SQL expressions used to cluster the table.
8497        pub cluster_expressions: std::vec::Vec<std::string::String>,
8498
8499        /// Sets the partition expiration in days.
8500        pub partition_expiration_days: i32,
8501
8502        /// Specifies whether queries on this table must include a predicate filter
8503        /// that filters on the partitioning column.
8504        pub require_partition_filter: bool,
8505
8506        /// Additional options that will be provided as key/value pairs into the
8507        /// options clause of a create table/view statement. See
8508        /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language>
8509        /// for more information on which options are supported.
8510        pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
8511
8512        /// Optional. The connection specifying the credentials to be used to read
8513        /// and write to external storage, such as Cloud Storage. The connection can
8514        /// have the form `{project}.{location}.{connection_id}` or
8515        /// `projects/{project}/locations/{location}/connections/{connection_id}`,
8516        /// or be set to DEFAULT.
8517        pub connection: std::string::String,
8518
8519        /// Optional. The table format for the BigQuery table.
8520        pub table_format: crate::model::compilation_result_action::relation::TableFormat,
8521
8522        /// Optional. The file format for the BigQuery table.
8523        pub file_format: crate::model::compilation_result_action::relation::FileFormat,
8524
8525        /// Optional. The fully qualified location prefix of the external folder
8526        /// where table data is stored. The URI should be in the format
8527        /// `gs://bucket/path_to_table/`.
8528        pub storage_uri: std::string::String,
8529
8530        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8531    }
8532
8533    impl Relation {
8534        /// Creates a new default instance.
8535        pub fn new() -> Self {
8536            std::default::Default::default()
8537        }
8538
8539        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Relation::dependency_targets].
8540        ///
8541        /// # Example
8542        /// ```ignore,no_run
8543        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8544        /// use google_cloud_dataform_v1::model::Target;
8545        /// let x = Relation::new()
8546        ///     .set_dependency_targets([
8547        ///         Target::default()/* use setters */,
8548        ///         Target::default()/* use (different) setters */,
8549        ///     ]);
8550        /// ```
8551        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8552        where
8553            T: std::iter::IntoIterator<Item = V>,
8554            V: std::convert::Into<crate::model::Target>,
8555        {
8556            use std::iter::Iterator;
8557            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8558            self
8559        }
8560
8561        /// Sets the value of [disabled][crate::model::compilation_result_action::Relation::disabled].
8562        ///
8563        /// # Example
8564        /// ```ignore,no_run
8565        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8566        /// let x = Relation::new().set_disabled(true);
8567        /// ```
8568        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8569            self.disabled = v.into();
8570            self
8571        }
8572
8573        /// Sets the value of [tags][crate::model::compilation_result_action::Relation::tags].
8574        ///
8575        /// # Example
8576        /// ```ignore,no_run
8577        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8578        /// let x = Relation::new().set_tags(["a", "b", "c"]);
8579        /// ```
8580        pub fn set_tags<T, V>(mut self, v: T) -> Self
8581        where
8582            T: std::iter::IntoIterator<Item = V>,
8583            V: std::convert::Into<std::string::String>,
8584        {
8585            use std::iter::Iterator;
8586            self.tags = v.into_iter().map(|i| i.into()).collect();
8587            self
8588        }
8589
8590        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8591        ///
8592        /// # Example
8593        /// ```ignore,no_run
8594        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8595        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8596        /// let x = Relation::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8597        /// ```
8598        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8599        where
8600            T: std::convert::Into<crate::model::RelationDescriptor>,
8601        {
8602            self.relation_descriptor = std::option::Option::Some(v.into());
8603            self
8604        }
8605
8606        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8607        ///
8608        /// # Example
8609        /// ```ignore,no_run
8610        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8611        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8612        /// let x = Relation::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8613        /// let x = Relation::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8614        /// ```
8615        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8616        where
8617            T: std::convert::Into<crate::model::RelationDescriptor>,
8618        {
8619            self.relation_descriptor = v.map(|x| x.into());
8620            self
8621        }
8622
8623        /// Sets the value of [relation_type][crate::model::compilation_result_action::Relation::relation_type].
8624        ///
8625        /// # Example
8626        /// ```ignore,no_run
8627        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8628        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::RelationType;
8629        /// let x0 = Relation::new().set_relation_type(RelationType::Table);
8630        /// let x1 = Relation::new().set_relation_type(RelationType::View);
8631        /// let x2 = Relation::new().set_relation_type(RelationType::IncrementalTable);
8632        /// ```
8633        pub fn set_relation_type<
8634            T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
8635        >(
8636            mut self,
8637            v: T,
8638        ) -> Self {
8639            self.relation_type = v.into();
8640            self
8641        }
8642
8643        /// Sets the value of [select_query][crate::model::compilation_result_action::Relation::select_query].
8644        ///
8645        /// # Example
8646        /// ```ignore,no_run
8647        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8648        /// let x = Relation::new().set_select_query("example");
8649        /// ```
8650        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
8651            mut self,
8652            v: T,
8653        ) -> Self {
8654            self.select_query = v.into();
8655            self
8656        }
8657
8658        /// Sets the value of [pre_operations][crate::model::compilation_result_action::Relation::pre_operations].
8659        ///
8660        /// # Example
8661        /// ```ignore,no_run
8662        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8663        /// let x = Relation::new().set_pre_operations(["a", "b", "c"]);
8664        /// ```
8665        pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
8666        where
8667            T: std::iter::IntoIterator<Item = V>,
8668            V: std::convert::Into<std::string::String>,
8669        {
8670            use std::iter::Iterator;
8671            self.pre_operations = v.into_iter().map(|i| i.into()).collect();
8672            self
8673        }
8674
8675        /// Sets the value of [post_operations][crate::model::compilation_result_action::Relation::post_operations].
8676        ///
8677        /// # Example
8678        /// ```ignore,no_run
8679        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8680        /// let x = Relation::new().set_post_operations(["a", "b", "c"]);
8681        /// ```
8682        pub fn set_post_operations<T, V>(mut self, v: T) -> Self
8683        where
8684            T: std::iter::IntoIterator<Item = V>,
8685            V: std::convert::Into<std::string::String>,
8686        {
8687            use std::iter::Iterator;
8688            self.post_operations = v.into_iter().map(|i| i.into()).collect();
8689            self
8690        }
8691
8692        /// Sets the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8693        ///
8694        /// # Example
8695        /// ```ignore,no_run
8696        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8697        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8698        /// let x = Relation::new().set_incremental_table_config(IncrementalTableConfig::default()/* use setters */);
8699        /// ```
8700        pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
8701        where
8702            T: std::convert::Into<
8703                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8704                >,
8705        {
8706            self.incremental_table_config = std::option::Option::Some(v.into());
8707            self
8708        }
8709
8710        /// Sets or clears the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8711        ///
8712        /// # Example
8713        /// ```ignore,no_run
8714        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8715        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8716        /// let x = Relation::new().set_or_clear_incremental_table_config(Some(IncrementalTableConfig::default()/* use setters */));
8717        /// let x = Relation::new().set_or_clear_incremental_table_config(None::<IncrementalTableConfig>);
8718        /// ```
8719        pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
8720        where
8721            T: std::convert::Into<
8722                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8723                >,
8724        {
8725            self.incremental_table_config = v.map(|x| x.into());
8726            self
8727        }
8728
8729        /// Sets the value of [partition_expression][crate::model::compilation_result_action::Relation::partition_expression].
8730        ///
8731        /// # Example
8732        /// ```ignore,no_run
8733        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8734        /// let x = Relation::new().set_partition_expression("example");
8735        /// ```
8736        pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
8737            mut self,
8738            v: T,
8739        ) -> Self {
8740            self.partition_expression = v.into();
8741            self
8742        }
8743
8744        /// Sets the value of [cluster_expressions][crate::model::compilation_result_action::Relation::cluster_expressions].
8745        ///
8746        /// # Example
8747        /// ```ignore,no_run
8748        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8749        /// let x = Relation::new().set_cluster_expressions(["a", "b", "c"]);
8750        /// ```
8751        pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
8752        where
8753            T: std::iter::IntoIterator<Item = V>,
8754            V: std::convert::Into<std::string::String>,
8755        {
8756            use std::iter::Iterator;
8757            self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
8758            self
8759        }
8760
8761        /// Sets the value of [partition_expiration_days][crate::model::compilation_result_action::Relation::partition_expiration_days].
8762        ///
8763        /// # Example
8764        /// ```ignore,no_run
8765        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8766        /// let x = Relation::new().set_partition_expiration_days(42);
8767        /// ```
8768        pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8769            self.partition_expiration_days = v.into();
8770            self
8771        }
8772
8773        /// Sets the value of [require_partition_filter][crate::model::compilation_result_action::Relation::require_partition_filter].
8774        ///
8775        /// # Example
8776        /// ```ignore,no_run
8777        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8778        /// let x = Relation::new().set_require_partition_filter(true);
8779        /// ```
8780        pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8781            self.require_partition_filter = v.into();
8782            self
8783        }
8784
8785        /// Sets the value of [additional_options][crate::model::compilation_result_action::Relation::additional_options].
8786        ///
8787        /// # Example
8788        /// ```ignore,no_run
8789        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8790        /// let x = Relation::new().set_additional_options([
8791        ///     ("key0", "abc"),
8792        ///     ("key1", "xyz"),
8793        /// ]);
8794        /// ```
8795        pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
8796        where
8797            T: std::iter::IntoIterator<Item = (K, V)>,
8798            K: std::convert::Into<std::string::String>,
8799            V: std::convert::Into<std::string::String>,
8800        {
8801            use std::iter::Iterator;
8802            self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8803            self
8804        }
8805
8806        /// Sets the value of [connection][crate::model::compilation_result_action::Relation::connection].
8807        ///
8808        /// # Example
8809        /// ```ignore,no_run
8810        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8811        /// let x = Relation::new().set_connection("example");
8812        /// ```
8813        pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8814            self.connection = v.into();
8815            self
8816        }
8817
8818        /// Sets the value of [table_format][crate::model::compilation_result_action::Relation::table_format].
8819        ///
8820        /// # Example
8821        /// ```ignore,no_run
8822        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8823        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::TableFormat;
8824        /// let x0 = Relation::new().set_table_format(TableFormat::Iceberg);
8825        /// ```
8826        pub fn set_table_format<
8827            T: std::convert::Into<crate::model::compilation_result_action::relation::TableFormat>,
8828        >(
8829            mut self,
8830            v: T,
8831        ) -> Self {
8832            self.table_format = v.into();
8833            self
8834        }
8835
8836        /// Sets the value of [file_format][crate::model::compilation_result_action::Relation::file_format].
8837        ///
8838        /// # Example
8839        /// ```ignore,no_run
8840        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8841        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::FileFormat;
8842        /// let x0 = Relation::new().set_file_format(FileFormat::Parquet);
8843        /// ```
8844        pub fn set_file_format<
8845            T: std::convert::Into<crate::model::compilation_result_action::relation::FileFormat>,
8846        >(
8847            mut self,
8848            v: T,
8849        ) -> Self {
8850            self.file_format = v.into();
8851            self
8852        }
8853
8854        /// Sets the value of [storage_uri][crate::model::compilation_result_action::Relation::storage_uri].
8855        ///
8856        /// # Example
8857        /// ```ignore,no_run
8858        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8859        /// let x = Relation::new().set_storage_uri("example");
8860        /// ```
8861        pub fn set_storage_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8862            self.storage_uri = v.into();
8863            self
8864        }
8865    }
8866
8867    impl wkt::message::Message for Relation {
8868        fn typename() -> &'static str {
8869            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
8870        }
8871    }
8872
8873    /// Defines additional types related to [Relation].
8874    pub mod relation {
8875        #[allow(unused_imports)]
8876        use super::*;
8877
8878        /// Contains settings for relations of type `INCREMENTAL_TABLE`.
8879        #[derive(Clone, Default, PartialEq)]
8880        #[non_exhaustive]
8881        pub struct IncrementalTableConfig {
8882            /// The SELECT query which returns rows which should be inserted into the
8883            /// relation if it already exists and is not being refreshed.
8884            pub incremental_select_query: std::string::String,
8885
8886            /// Whether this table should be protected from being refreshed.
8887            pub refresh_disabled: bool,
8888
8889            /// A set of columns or SQL expressions used to define row uniqueness.
8890            /// If any duplicates are discovered (as defined by `unique_key_parts`),
8891            /// only the newly selected rows (as defined by `incremental_select_query`)
8892            /// will be included in the relation.
8893            pub unique_key_parts: std::vec::Vec<std::string::String>,
8894
8895            /// A SQL expression conditional used to limit the set of existing rows
8896            /// considered for a merge operation (see `unique_key_parts` for more
8897            /// information).
8898            pub update_partition_filter: std::string::String,
8899
8900            /// SQL statements to be executed before inserting new rows into the
8901            /// relation.
8902            pub incremental_pre_operations: std::vec::Vec<std::string::String>,
8903
8904            /// SQL statements to be executed after inserting new rows into the
8905            /// relation.
8906            pub incremental_post_operations: std::vec::Vec<std::string::String>,
8907
8908            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8909        }
8910
8911        impl IncrementalTableConfig {
8912            /// Creates a new default instance.
8913            pub fn new() -> Self {
8914                std::default::Default::default()
8915            }
8916
8917            /// Sets the value of [incremental_select_query][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_select_query].
8918            ///
8919            /// # Example
8920            /// ```ignore,no_run
8921            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8922            /// let x = IncrementalTableConfig::new().set_incremental_select_query("example");
8923            /// ```
8924            pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
8925                mut self,
8926                v: T,
8927            ) -> Self {
8928                self.incremental_select_query = v.into();
8929                self
8930            }
8931
8932            /// Sets the value of [refresh_disabled][crate::model::compilation_result_action::relation::IncrementalTableConfig::refresh_disabled].
8933            ///
8934            /// # Example
8935            /// ```ignore,no_run
8936            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8937            /// let x = IncrementalTableConfig::new().set_refresh_disabled(true);
8938            /// ```
8939            pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8940                self.refresh_disabled = v.into();
8941                self
8942            }
8943
8944            /// Sets the value of [unique_key_parts][crate::model::compilation_result_action::relation::IncrementalTableConfig::unique_key_parts].
8945            ///
8946            /// # Example
8947            /// ```ignore,no_run
8948            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8949            /// let x = IncrementalTableConfig::new().set_unique_key_parts(["a", "b", "c"]);
8950            /// ```
8951            pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
8952            where
8953                T: std::iter::IntoIterator<Item = V>,
8954                V: std::convert::Into<std::string::String>,
8955            {
8956                use std::iter::Iterator;
8957                self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
8958                self
8959            }
8960
8961            /// Sets the value of [update_partition_filter][crate::model::compilation_result_action::relation::IncrementalTableConfig::update_partition_filter].
8962            ///
8963            /// # Example
8964            /// ```ignore,no_run
8965            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8966            /// let x = IncrementalTableConfig::new().set_update_partition_filter("example");
8967            /// ```
8968            pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
8969                mut self,
8970                v: T,
8971            ) -> Self {
8972                self.update_partition_filter = v.into();
8973                self
8974            }
8975
8976            /// Sets the value of [incremental_pre_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_pre_operations].
8977            ///
8978            /// # Example
8979            /// ```ignore,no_run
8980            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8981            /// let x = IncrementalTableConfig::new().set_incremental_pre_operations(["a", "b", "c"]);
8982            /// ```
8983            pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
8984            where
8985                T: std::iter::IntoIterator<Item = V>,
8986                V: std::convert::Into<std::string::String>,
8987            {
8988                use std::iter::Iterator;
8989                self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
8990                self
8991            }
8992
8993            /// Sets the value of [incremental_post_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_post_operations].
8994            ///
8995            /// # Example
8996            /// ```ignore,no_run
8997            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8998            /// let x = IncrementalTableConfig::new().set_incremental_post_operations(["a", "b", "c"]);
8999            /// ```
9000            pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
9001            where
9002                T: std::iter::IntoIterator<Item = V>,
9003                V: std::convert::Into<std::string::String>,
9004            {
9005                use std::iter::Iterator;
9006                self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
9007                self
9008            }
9009        }
9010
9011        impl wkt::message::Message for IncrementalTableConfig {
9012            fn typename() -> &'static str {
9013                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
9014            }
9015        }
9016
9017        /// Indicates the type of this relation.
9018        ///
9019        /// # Working with unknown values
9020        ///
9021        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9022        /// additional enum variants at any time. Adding new variants is not considered
9023        /// a breaking change. Applications should write their code in anticipation of:
9024        ///
9025        /// - New values appearing in future releases of the client library, **and**
9026        /// - New values received dynamically, without application changes.
9027        ///
9028        /// Please consult the [Working with enums] section in the user guide for some
9029        /// guidelines.
9030        ///
9031        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9032        #[derive(Clone, Debug, PartialEq)]
9033        #[non_exhaustive]
9034        pub enum RelationType {
9035            /// Default value. This value is unused.
9036            Unspecified,
9037            /// The relation is a table.
9038            Table,
9039            /// The relation is a view.
9040            View,
9041            /// The relation is an incrementalized table.
9042            IncrementalTable,
9043            /// The relation is a materialized view.
9044            MaterializedView,
9045            /// If set, the enum was initialized with an unknown value.
9046            ///
9047            /// Applications can examine the value using [RelationType::value] or
9048            /// [RelationType::name].
9049            UnknownValue(relation_type::UnknownValue),
9050        }
9051
9052        #[doc(hidden)]
9053        pub mod relation_type {
9054            #[allow(unused_imports)]
9055            use super::*;
9056            #[derive(Clone, Debug, PartialEq)]
9057            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9058        }
9059
9060        impl RelationType {
9061            /// Gets the enum value.
9062            ///
9063            /// Returns `None` if the enum contains an unknown value deserialized from
9064            /// the string representation of enums.
9065            pub fn value(&self) -> std::option::Option<i32> {
9066                match self {
9067                    Self::Unspecified => std::option::Option::Some(0),
9068                    Self::Table => std::option::Option::Some(1),
9069                    Self::View => std::option::Option::Some(2),
9070                    Self::IncrementalTable => std::option::Option::Some(3),
9071                    Self::MaterializedView => std::option::Option::Some(4),
9072                    Self::UnknownValue(u) => u.0.value(),
9073                }
9074            }
9075
9076            /// Gets the enum value as a string.
9077            ///
9078            /// Returns `None` if the enum contains an unknown value deserialized from
9079            /// the integer representation of enums.
9080            pub fn name(&self) -> std::option::Option<&str> {
9081                match self {
9082                    Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
9083                    Self::Table => std::option::Option::Some("TABLE"),
9084                    Self::View => std::option::Option::Some("VIEW"),
9085                    Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
9086                    Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
9087                    Self::UnknownValue(u) => u.0.name(),
9088                }
9089            }
9090        }
9091
9092        impl std::default::Default for RelationType {
9093            fn default() -> Self {
9094                use std::convert::From;
9095                Self::from(0)
9096            }
9097        }
9098
9099        impl std::fmt::Display for RelationType {
9100            fn fmt(
9101                &self,
9102                f: &mut std::fmt::Formatter<'_>,
9103            ) -> std::result::Result<(), std::fmt::Error> {
9104                wkt::internal::display_enum(f, self.name(), self.value())
9105            }
9106        }
9107
9108        impl std::convert::From<i32> for RelationType {
9109            fn from(value: i32) -> Self {
9110                match value {
9111                    0 => Self::Unspecified,
9112                    1 => Self::Table,
9113                    2 => Self::View,
9114                    3 => Self::IncrementalTable,
9115                    4 => Self::MaterializedView,
9116                    _ => Self::UnknownValue(relation_type::UnknownValue(
9117                        wkt::internal::UnknownEnumValue::Integer(value),
9118                    )),
9119                }
9120            }
9121        }
9122
9123        impl std::convert::From<&str> for RelationType {
9124            fn from(value: &str) -> Self {
9125                use std::string::ToString;
9126                match value {
9127                    "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
9128                    "TABLE" => Self::Table,
9129                    "VIEW" => Self::View,
9130                    "INCREMENTAL_TABLE" => Self::IncrementalTable,
9131                    "MATERIALIZED_VIEW" => Self::MaterializedView,
9132                    _ => Self::UnknownValue(relation_type::UnknownValue(
9133                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9134                    )),
9135                }
9136            }
9137        }
9138
9139        impl serde::ser::Serialize for RelationType {
9140            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9141            where
9142                S: serde::Serializer,
9143            {
9144                match self {
9145                    Self::Unspecified => serializer.serialize_i32(0),
9146                    Self::Table => serializer.serialize_i32(1),
9147                    Self::View => serializer.serialize_i32(2),
9148                    Self::IncrementalTable => serializer.serialize_i32(3),
9149                    Self::MaterializedView => serializer.serialize_i32(4),
9150                    Self::UnknownValue(u) => u.0.serialize(serializer),
9151                }
9152            }
9153        }
9154
9155        impl<'de> serde::de::Deserialize<'de> for RelationType {
9156            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9157            where
9158                D: serde::Deserializer<'de>,
9159            {
9160                deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
9161                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
9162                ))
9163            }
9164        }
9165
9166        /// Supported table formats for BigQuery tables.
9167        ///
9168        /// # Working with unknown values
9169        ///
9170        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9171        /// additional enum variants at any time. Adding new variants is not considered
9172        /// a breaking change. Applications should write their code in anticipation of:
9173        ///
9174        /// - New values appearing in future releases of the client library, **and**
9175        /// - New values received dynamically, without application changes.
9176        ///
9177        /// Please consult the [Working with enums] section in the user guide for some
9178        /// guidelines.
9179        ///
9180        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9181        #[derive(Clone, Debug, PartialEq)]
9182        #[non_exhaustive]
9183        pub enum TableFormat {
9184            /// Default value.
9185            Unspecified,
9186            /// Apache Iceberg format.
9187            Iceberg,
9188            /// If set, the enum was initialized with an unknown value.
9189            ///
9190            /// Applications can examine the value using [TableFormat::value] or
9191            /// [TableFormat::name].
9192            UnknownValue(table_format::UnknownValue),
9193        }
9194
9195        #[doc(hidden)]
9196        pub mod table_format {
9197            #[allow(unused_imports)]
9198            use super::*;
9199            #[derive(Clone, Debug, PartialEq)]
9200            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9201        }
9202
9203        impl TableFormat {
9204            /// Gets the enum value.
9205            ///
9206            /// Returns `None` if the enum contains an unknown value deserialized from
9207            /// the string representation of enums.
9208            pub fn value(&self) -> std::option::Option<i32> {
9209                match self {
9210                    Self::Unspecified => std::option::Option::Some(0),
9211                    Self::Iceberg => std::option::Option::Some(1),
9212                    Self::UnknownValue(u) => u.0.value(),
9213                }
9214            }
9215
9216            /// Gets the enum value as a string.
9217            ///
9218            /// Returns `None` if the enum contains an unknown value deserialized from
9219            /// the integer representation of enums.
9220            pub fn name(&self) -> std::option::Option<&str> {
9221                match self {
9222                    Self::Unspecified => std::option::Option::Some("TABLE_FORMAT_UNSPECIFIED"),
9223                    Self::Iceberg => std::option::Option::Some("ICEBERG"),
9224                    Self::UnknownValue(u) => u.0.name(),
9225                }
9226            }
9227        }
9228
9229        impl std::default::Default for TableFormat {
9230            fn default() -> Self {
9231                use std::convert::From;
9232                Self::from(0)
9233            }
9234        }
9235
9236        impl std::fmt::Display for TableFormat {
9237            fn fmt(
9238                &self,
9239                f: &mut std::fmt::Formatter<'_>,
9240            ) -> std::result::Result<(), std::fmt::Error> {
9241                wkt::internal::display_enum(f, self.name(), self.value())
9242            }
9243        }
9244
9245        impl std::convert::From<i32> for TableFormat {
9246            fn from(value: i32) -> Self {
9247                match value {
9248                    0 => Self::Unspecified,
9249                    1 => Self::Iceberg,
9250                    _ => Self::UnknownValue(table_format::UnknownValue(
9251                        wkt::internal::UnknownEnumValue::Integer(value),
9252                    )),
9253                }
9254            }
9255        }
9256
9257        impl std::convert::From<&str> for TableFormat {
9258            fn from(value: &str) -> Self {
9259                use std::string::ToString;
9260                match value {
9261                    "TABLE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9262                    "ICEBERG" => Self::Iceberg,
9263                    _ => Self::UnknownValue(table_format::UnknownValue(
9264                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9265                    )),
9266                }
9267            }
9268        }
9269
9270        impl serde::ser::Serialize for TableFormat {
9271            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9272            where
9273                S: serde::Serializer,
9274            {
9275                match self {
9276                    Self::Unspecified => serializer.serialize_i32(0),
9277                    Self::Iceberg => serializer.serialize_i32(1),
9278                    Self::UnknownValue(u) => u.0.serialize(serializer),
9279                }
9280            }
9281        }
9282
9283        impl<'de> serde::de::Deserialize<'de> for TableFormat {
9284            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9285            where
9286                D: serde::Deserializer<'de>,
9287            {
9288                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableFormat>::new(
9289                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.TableFormat",
9290                ))
9291            }
9292        }
9293
9294        /// Supported file formats for BigQuery tables.
9295        ///
9296        /// # Working with unknown values
9297        ///
9298        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9299        /// additional enum variants at any time. Adding new variants is not considered
9300        /// a breaking change. Applications should write their code in anticipation of:
9301        ///
9302        /// - New values appearing in future releases of the client library, **and**
9303        /// - New values received dynamically, without application changes.
9304        ///
9305        /// Please consult the [Working with enums] section in the user guide for some
9306        /// guidelines.
9307        ///
9308        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9309        #[derive(Clone, Debug, PartialEq)]
9310        #[non_exhaustive]
9311        pub enum FileFormat {
9312            /// Default value.
9313            Unspecified,
9314            /// Apache Parquet format.
9315            Parquet,
9316            /// If set, the enum was initialized with an unknown value.
9317            ///
9318            /// Applications can examine the value using [FileFormat::value] or
9319            /// [FileFormat::name].
9320            UnknownValue(file_format::UnknownValue),
9321        }
9322
9323        #[doc(hidden)]
9324        pub mod file_format {
9325            #[allow(unused_imports)]
9326            use super::*;
9327            #[derive(Clone, Debug, PartialEq)]
9328            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9329        }
9330
9331        impl FileFormat {
9332            /// Gets the enum value.
9333            ///
9334            /// Returns `None` if the enum contains an unknown value deserialized from
9335            /// the string representation of enums.
9336            pub fn value(&self) -> std::option::Option<i32> {
9337                match self {
9338                    Self::Unspecified => std::option::Option::Some(0),
9339                    Self::Parquet => std::option::Option::Some(1),
9340                    Self::UnknownValue(u) => u.0.value(),
9341                }
9342            }
9343
9344            /// Gets the enum value as a string.
9345            ///
9346            /// Returns `None` if the enum contains an unknown value deserialized from
9347            /// the integer representation of enums.
9348            pub fn name(&self) -> std::option::Option<&str> {
9349                match self {
9350                    Self::Unspecified => std::option::Option::Some("FILE_FORMAT_UNSPECIFIED"),
9351                    Self::Parquet => std::option::Option::Some("PARQUET"),
9352                    Self::UnknownValue(u) => u.0.name(),
9353                }
9354            }
9355        }
9356
9357        impl std::default::Default for FileFormat {
9358            fn default() -> Self {
9359                use std::convert::From;
9360                Self::from(0)
9361            }
9362        }
9363
9364        impl std::fmt::Display for FileFormat {
9365            fn fmt(
9366                &self,
9367                f: &mut std::fmt::Formatter<'_>,
9368            ) -> std::result::Result<(), std::fmt::Error> {
9369                wkt::internal::display_enum(f, self.name(), self.value())
9370            }
9371        }
9372
9373        impl std::convert::From<i32> for FileFormat {
9374            fn from(value: i32) -> Self {
9375                match value {
9376                    0 => Self::Unspecified,
9377                    1 => Self::Parquet,
9378                    _ => Self::UnknownValue(file_format::UnknownValue(
9379                        wkt::internal::UnknownEnumValue::Integer(value),
9380                    )),
9381                }
9382            }
9383        }
9384
9385        impl std::convert::From<&str> for FileFormat {
9386            fn from(value: &str) -> Self {
9387                use std::string::ToString;
9388                match value {
9389                    "FILE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9390                    "PARQUET" => Self::Parquet,
9391                    _ => Self::UnknownValue(file_format::UnknownValue(
9392                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9393                    )),
9394                }
9395            }
9396        }
9397
9398        impl serde::ser::Serialize for FileFormat {
9399            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9400            where
9401                S: serde::Serializer,
9402            {
9403                match self {
9404                    Self::Unspecified => serializer.serialize_i32(0),
9405                    Self::Parquet => serializer.serialize_i32(1),
9406                    Self::UnknownValue(u) => u.0.serialize(serializer),
9407                }
9408            }
9409        }
9410
9411        impl<'de> serde::de::Deserialize<'de> for FileFormat {
9412            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9413            where
9414                D: serde::Deserializer<'de>,
9415            {
9416                deserializer.deserialize_any(wkt::internal::EnumVisitor::<FileFormat>::new(
9417                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.FileFormat",
9418                ))
9419            }
9420        }
9421    }
9422
9423    /// Represents a list of arbitrary database operations.
9424    #[derive(Clone, Default, PartialEq)]
9425    #[non_exhaustive]
9426    pub struct Operations {
9427        /// A list of actions that this action depends on.
9428        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9429
9430        /// Whether this action is disabled (i.e. should not be run).
9431        pub disabled: bool,
9432
9433        /// Arbitrary, user-defined tags on this action.
9434        pub tags: std::vec::Vec<std::string::String>,
9435
9436        /// Descriptor for any output relation and its columns. Only set if
9437        /// `has_output` is true.
9438        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9439
9440        /// A list of arbitrary SQL statements that will be executed without
9441        /// alteration.
9442        pub queries: std::vec::Vec<std::string::String>,
9443
9444        /// Whether these operations produce an output relation.
9445        pub has_output: bool,
9446
9447        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9448    }
9449
9450    impl Operations {
9451        /// Creates a new default instance.
9452        pub fn new() -> Self {
9453            std::default::Default::default()
9454        }
9455
9456        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Operations::dependency_targets].
9457        ///
9458        /// # Example
9459        /// ```ignore,no_run
9460        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9461        /// use google_cloud_dataform_v1::model::Target;
9462        /// let x = Operations::new()
9463        ///     .set_dependency_targets([
9464        ///         Target::default()/* use setters */,
9465        ///         Target::default()/* use (different) setters */,
9466        ///     ]);
9467        /// ```
9468        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9469        where
9470            T: std::iter::IntoIterator<Item = V>,
9471            V: std::convert::Into<crate::model::Target>,
9472        {
9473            use std::iter::Iterator;
9474            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9475            self
9476        }
9477
9478        /// Sets the value of [disabled][crate::model::compilation_result_action::Operations::disabled].
9479        ///
9480        /// # Example
9481        /// ```ignore,no_run
9482        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9483        /// let x = Operations::new().set_disabled(true);
9484        /// ```
9485        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9486            self.disabled = v.into();
9487            self
9488        }
9489
9490        /// Sets the value of [tags][crate::model::compilation_result_action::Operations::tags].
9491        ///
9492        /// # Example
9493        /// ```ignore,no_run
9494        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9495        /// let x = Operations::new().set_tags(["a", "b", "c"]);
9496        /// ```
9497        pub fn set_tags<T, V>(mut self, v: T) -> Self
9498        where
9499            T: std::iter::IntoIterator<Item = V>,
9500            V: std::convert::Into<std::string::String>,
9501        {
9502            use std::iter::Iterator;
9503            self.tags = v.into_iter().map(|i| i.into()).collect();
9504            self
9505        }
9506
9507        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
9508        ///
9509        /// # Example
9510        /// ```ignore,no_run
9511        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9512        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9513        /// let x = Operations::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9514        /// ```
9515        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9516        where
9517            T: std::convert::Into<crate::model::RelationDescriptor>,
9518        {
9519            self.relation_descriptor = std::option::Option::Some(v.into());
9520            self
9521        }
9522
9523        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
9524        ///
9525        /// # Example
9526        /// ```ignore,no_run
9527        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9528        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9529        /// let x = Operations::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9530        /// let x = Operations::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9531        /// ```
9532        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9533        where
9534            T: std::convert::Into<crate::model::RelationDescriptor>,
9535        {
9536            self.relation_descriptor = v.map(|x| x.into());
9537            self
9538        }
9539
9540        /// Sets the value of [queries][crate::model::compilation_result_action::Operations::queries].
9541        ///
9542        /// # Example
9543        /// ```ignore,no_run
9544        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9545        /// let x = Operations::new().set_queries(["a", "b", "c"]);
9546        /// ```
9547        pub fn set_queries<T, V>(mut self, v: T) -> Self
9548        where
9549            T: std::iter::IntoIterator<Item = V>,
9550            V: std::convert::Into<std::string::String>,
9551        {
9552            use std::iter::Iterator;
9553            self.queries = v.into_iter().map(|i| i.into()).collect();
9554            self
9555        }
9556
9557        /// Sets the value of [has_output][crate::model::compilation_result_action::Operations::has_output].
9558        ///
9559        /// # Example
9560        /// ```ignore,no_run
9561        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9562        /// let x = Operations::new().set_has_output(true);
9563        /// ```
9564        pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9565            self.has_output = v.into();
9566            self
9567        }
9568    }
9569
9570    impl wkt::message::Message for Operations {
9571        fn typename() -> &'static str {
9572            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
9573        }
9574    }
9575
9576    /// Represents an assertion upon a SQL query which is required return zero
9577    /// rows.
9578    #[derive(Clone, Default, PartialEq)]
9579    #[non_exhaustive]
9580    pub struct Assertion {
9581        /// A list of actions that this action depends on.
9582        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9583
9584        /// The parent action of this assertion. Only set if this assertion was
9585        /// automatically generated.
9586        pub parent_action: std::option::Option<crate::model::Target>,
9587
9588        /// Whether this action is disabled (i.e. should not be run).
9589        pub disabled: bool,
9590
9591        /// Arbitrary, user-defined tags on this action.
9592        pub tags: std::vec::Vec<std::string::String>,
9593
9594        /// The SELECT query which must return zero rows in order for this assertion
9595        /// to succeed.
9596        pub select_query: std::string::String,
9597
9598        /// Descriptor for the assertion's automatically-generated view and its
9599        /// columns.
9600        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9601
9602        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9603    }
9604
9605    impl Assertion {
9606        /// Creates a new default instance.
9607        pub fn new() -> Self {
9608            std::default::Default::default()
9609        }
9610
9611        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Assertion::dependency_targets].
9612        ///
9613        /// # Example
9614        /// ```ignore,no_run
9615        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9616        /// use google_cloud_dataform_v1::model::Target;
9617        /// let x = Assertion::new()
9618        ///     .set_dependency_targets([
9619        ///         Target::default()/* use setters */,
9620        ///         Target::default()/* use (different) setters */,
9621        ///     ]);
9622        /// ```
9623        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9624        where
9625            T: std::iter::IntoIterator<Item = V>,
9626            V: std::convert::Into<crate::model::Target>,
9627        {
9628            use std::iter::Iterator;
9629            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9630            self
9631        }
9632
9633        /// Sets the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
9634        ///
9635        /// # Example
9636        /// ```ignore,no_run
9637        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9638        /// use google_cloud_dataform_v1::model::Target;
9639        /// let x = Assertion::new().set_parent_action(Target::default()/* use setters */);
9640        /// ```
9641        pub fn set_parent_action<T>(mut self, v: T) -> Self
9642        where
9643            T: std::convert::Into<crate::model::Target>,
9644        {
9645            self.parent_action = std::option::Option::Some(v.into());
9646            self
9647        }
9648
9649        /// Sets or clears the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
9650        ///
9651        /// # Example
9652        /// ```ignore,no_run
9653        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9654        /// use google_cloud_dataform_v1::model::Target;
9655        /// let x = Assertion::new().set_or_clear_parent_action(Some(Target::default()/* use setters */));
9656        /// let x = Assertion::new().set_or_clear_parent_action(None::<Target>);
9657        /// ```
9658        pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
9659        where
9660            T: std::convert::Into<crate::model::Target>,
9661        {
9662            self.parent_action = v.map(|x| x.into());
9663            self
9664        }
9665
9666        /// Sets the value of [disabled][crate::model::compilation_result_action::Assertion::disabled].
9667        ///
9668        /// # Example
9669        /// ```ignore,no_run
9670        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9671        /// let x = Assertion::new().set_disabled(true);
9672        /// ```
9673        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9674            self.disabled = v.into();
9675            self
9676        }
9677
9678        /// Sets the value of [tags][crate::model::compilation_result_action::Assertion::tags].
9679        ///
9680        /// # Example
9681        /// ```ignore,no_run
9682        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9683        /// let x = Assertion::new().set_tags(["a", "b", "c"]);
9684        /// ```
9685        pub fn set_tags<T, V>(mut self, v: T) -> Self
9686        where
9687            T: std::iter::IntoIterator<Item = V>,
9688            V: std::convert::Into<std::string::String>,
9689        {
9690            use std::iter::Iterator;
9691            self.tags = v.into_iter().map(|i| i.into()).collect();
9692            self
9693        }
9694
9695        /// Sets the value of [select_query][crate::model::compilation_result_action::Assertion::select_query].
9696        ///
9697        /// # Example
9698        /// ```ignore,no_run
9699        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9700        /// let x = Assertion::new().set_select_query("example");
9701        /// ```
9702        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
9703            mut self,
9704            v: T,
9705        ) -> Self {
9706            self.select_query = v.into();
9707            self
9708        }
9709
9710        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
9711        ///
9712        /// # Example
9713        /// ```ignore,no_run
9714        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9715        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9716        /// let x = Assertion::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9717        /// ```
9718        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9719        where
9720            T: std::convert::Into<crate::model::RelationDescriptor>,
9721        {
9722            self.relation_descriptor = std::option::Option::Some(v.into());
9723            self
9724        }
9725
9726        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
9727        ///
9728        /// # Example
9729        /// ```ignore,no_run
9730        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9731        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9732        /// let x = Assertion::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9733        /// let x = Assertion::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9734        /// ```
9735        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9736        where
9737            T: std::convert::Into<crate::model::RelationDescriptor>,
9738        {
9739            self.relation_descriptor = v.map(|x| x.into());
9740            self
9741        }
9742    }
9743
9744    impl wkt::message::Message for Assertion {
9745        fn typename() -> &'static str {
9746            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
9747        }
9748    }
9749
9750    /// Represents a relation which is not managed by Dataform but which may be
9751    /// referenced by Dataform actions.
9752    #[derive(Clone, Default, PartialEq)]
9753    #[non_exhaustive]
9754    pub struct Declaration {
9755        /// Descriptor for the relation and its columns. Used as documentation only,
9756        /// i.e. values here will result in no changes to the relation's metadata.
9757        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9758
9759        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9760    }
9761
9762    impl Declaration {
9763        /// Creates a new default instance.
9764        pub fn new() -> Self {
9765            std::default::Default::default()
9766        }
9767
9768        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
9769        ///
9770        /// # Example
9771        /// ```ignore,no_run
9772        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
9773        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9774        /// let x = Declaration::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9775        /// ```
9776        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9777        where
9778            T: std::convert::Into<crate::model::RelationDescriptor>,
9779        {
9780            self.relation_descriptor = std::option::Option::Some(v.into());
9781            self
9782        }
9783
9784        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
9785        ///
9786        /// # Example
9787        /// ```ignore,no_run
9788        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
9789        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9790        /// let x = Declaration::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9791        /// let x = Declaration::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9792        /// ```
9793        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9794        where
9795            T: std::convert::Into<crate::model::RelationDescriptor>,
9796        {
9797            self.relation_descriptor = v.map(|x| x.into());
9798            self
9799        }
9800    }
9801
9802    impl wkt::message::Message for Declaration {
9803        fn typename() -> &'static str {
9804            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
9805        }
9806    }
9807
9808    /// Represents a notebook.
9809    #[derive(Clone, Default, PartialEq)]
9810    #[non_exhaustive]
9811    pub struct Notebook {
9812        /// A list of actions that this action depends on.
9813        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9814
9815        /// Whether this action is disabled (i.e. should not be run).
9816        pub disabled: bool,
9817
9818        /// The contents of the notebook.
9819        pub contents: std::string::String,
9820
9821        /// Arbitrary, user-defined tags on this action.
9822        pub tags: std::vec::Vec<std::string::String>,
9823
9824        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9825    }
9826
9827    impl Notebook {
9828        /// Creates a new default instance.
9829        pub fn new() -> Self {
9830            std::default::Default::default()
9831        }
9832
9833        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Notebook::dependency_targets].
9834        ///
9835        /// # Example
9836        /// ```ignore,no_run
9837        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
9838        /// use google_cloud_dataform_v1::model::Target;
9839        /// let x = Notebook::new()
9840        ///     .set_dependency_targets([
9841        ///         Target::default()/* use setters */,
9842        ///         Target::default()/* use (different) setters */,
9843        ///     ]);
9844        /// ```
9845        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9846        where
9847            T: std::iter::IntoIterator<Item = V>,
9848            V: std::convert::Into<crate::model::Target>,
9849        {
9850            use std::iter::Iterator;
9851            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9852            self
9853        }
9854
9855        /// Sets the value of [disabled][crate::model::compilation_result_action::Notebook::disabled].
9856        ///
9857        /// # Example
9858        /// ```ignore,no_run
9859        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
9860        /// let x = Notebook::new().set_disabled(true);
9861        /// ```
9862        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9863            self.disabled = v.into();
9864            self
9865        }
9866
9867        /// Sets the value of [contents][crate::model::compilation_result_action::Notebook::contents].
9868        ///
9869        /// # Example
9870        /// ```ignore,no_run
9871        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
9872        /// let x = Notebook::new().set_contents("example");
9873        /// ```
9874        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9875            self.contents = v.into();
9876            self
9877        }
9878
9879        /// Sets the value of [tags][crate::model::compilation_result_action::Notebook::tags].
9880        ///
9881        /// # Example
9882        /// ```ignore,no_run
9883        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
9884        /// let x = Notebook::new().set_tags(["a", "b", "c"]);
9885        /// ```
9886        pub fn set_tags<T, V>(mut self, v: T) -> Self
9887        where
9888            T: std::iter::IntoIterator<Item = V>,
9889            V: std::convert::Into<std::string::String>,
9890        {
9891            use std::iter::Iterator;
9892            self.tags = v.into_iter().map(|i| i.into()).collect();
9893            self
9894        }
9895    }
9896
9897    impl wkt::message::Message for Notebook {
9898        fn typename() -> &'static str {
9899            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
9900        }
9901    }
9902
9903    /// Defines a compiled Data Preparation entity
9904    #[derive(Clone, Default, PartialEq)]
9905    #[non_exhaustive]
9906    pub struct DataPreparation {
9907        /// A list of actions that this action depends on.
9908        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9909
9910        /// Whether this action is disabled (i.e. should not be run).
9911        pub disabled: bool,
9912
9913        /// Arbitrary, user-defined tags on this action.
9914        pub tags: std::vec::Vec<std::string::String>,
9915
9916        /// The definition for the data preparation.
9917        pub definition: std::option::Option<
9918            crate::model::compilation_result_action::data_preparation::Definition,
9919        >,
9920
9921        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9922    }
9923
9924    impl DataPreparation {
9925        /// Creates a new default instance.
9926        pub fn new() -> Self {
9927            std::default::Default::default()
9928        }
9929
9930        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::DataPreparation::dependency_targets].
9931        ///
9932        /// # Example
9933        /// ```ignore,no_run
9934        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9935        /// use google_cloud_dataform_v1::model::Target;
9936        /// let x = DataPreparation::new()
9937        ///     .set_dependency_targets([
9938        ///         Target::default()/* use setters */,
9939        ///         Target::default()/* use (different) setters */,
9940        ///     ]);
9941        /// ```
9942        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9943        where
9944            T: std::iter::IntoIterator<Item = V>,
9945            V: std::convert::Into<crate::model::Target>,
9946        {
9947            use std::iter::Iterator;
9948            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9949            self
9950        }
9951
9952        /// Sets the value of [disabled][crate::model::compilation_result_action::DataPreparation::disabled].
9953        ///
9954        /// # Example
9955        /// ```ignore,no_run
9956        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9957        /// let x = DataPreparation::new().set_disabled(true);
9958        /// ```
9959        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9960            self.disabled = v.into();
9961            self
9962        }
9963
9964        /// Sets the value of [tags][crate::model::compilation_result_action::DataPreparation::tags].
9965        ///
9966        /// # Example
9967        /// ```ignore,no_run
9968        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9969        /// let x = DataPreparation::new().set_tags(["a", "b", "c"]);
9970        /// ```
9971        pub fn set_tags<T, V>(mut self, v: T) -> Self
9972        where
9973            T: std::iter::IntoIterator<Item = V>,
9974            V: std::convert::Into<std::string::String>,
9975        {
9976            use std::iter::Iterator;
9977            self.tags = v.into_iter().map(|i| i.into()).collect();
9978            self
9979        }
9980
9981        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition].
9982        ///
9983        /// Note that all the setters affecting `definition` are mutually
9984        /// exclusive.
9985        ///
9986        /// # Example
9987        /// ```ignore,no_run
9988        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
9989        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::Definition;
9990        /// let x = DataPreparation::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
9991        /// ```
9992        pub fn set_definition<
9993            T: std::convert::Into<
9994                    std::option::Option<
9995                        crate::model::compilation_result_action::data_preparation::Definition,
9996                    >,
9997                >,
9998        >(
9999            mut self,
10000            v: T,
10001        ) -> Self {
10002            self.definition = v.into();
10003            self
10004        }
10005
10006        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10007        /// if it holds a `ContentsYaml`, `None` if the field is not set or
10008        /// holds a different branch.
10009        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
10010            #[allow(unreachable_patterns)]
10011            self.definition.as_ref().and_then(|v| match v {
10012                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
10013                _ => std::option::Option::None,
10014            })
10015        }
10016
10017        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10018        /// to hold a `ContentsYaml`.
10019        ///
10020        /// Note that all the setters affecting `definition` are
10021        /// mutually exclusive.
10022        ///
10023        /// # Example
10024        /// ```ignore,no_run
10025        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10026        /// let x = DataPreparation::new().set_contents_yaml("example");
10027        /// assert!(x.contents_yaml().is_some());
10028        /// assert!(x.contents_sql().is_none());
10029        /// ```
10030        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
10031            mut self,
10032            v: T,
10033        ) -> Self {
10034            self.definition = std::option::Option::Some(
10035                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
10036                    v.into(),
10037                ),
10038            );
10039            self
10040        }
10041
10042        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10043        /// if it holds a `ContentsSql`, `None` if the field is not set or
10044        /// holds a different branch.
10045        pub fn contents_sql(
10046            &self,
10047        ) -> std::option::Option<
10048            &std::boxed::Box<
10049                crate::model::compilation_result_action::data_preparation::SqlDefinition,
10050            >,
10051        > {
10052            #[allow(unreachable_patterns)]
10053            self.definition.as_ref().and_then(|v| match v {
10054                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
10055                _ => std::option::Option::None,
10056            })
10057        }
10058
10059        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10060        /// to hold a `ContentsSql`.
10061        ///
10062        /// Note that all the setters affecting `definition` are
10063        /// mutually exclusive.
10064        ///
10065        /// # Example
10066        /// ```ignore,no_run
10067        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10068        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10069        /// let x = DataPreparation::new().set_contents_sql(SqlDefinition::default()/* use setters */);
10070        /// assert!(x.contents_sql().is_some());
10071        /// assert!(x.contents_yaml().is_none());
10072        /// ```
10073        pub fn set_contents_sql<
10074            T: std::convert::Into<
10075                    std::boxed::Box<
10076                        crate::model::compilation_result_action::data_preparation::SqlDefinition,
10077                    >,
10078                >,
10079        >(
10080            mut self,
10081            v: T,
10082        ) -> Self {
10083            self.definition = std::option::Option::Some(
10084                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
10085                    v.into(),
10086                ),
10087            );
10088            self
10089        }
10090    }
10091
10092    impl wkt::message::Message for DataPreparation {
10093        fn typename() -> &'static str {
10094            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
10095        }
10096    }
10097
10098    /// Defines additional types related to [DataPreparation].
10099    pub mod data_preparation {
10100        #[allow(unused_imports)]
10101        use super::*;
10102
10103        /// Definition of a SQL Data Preparation
10104        #[derive(Clone, Default, PartialEq)]
10105        #[non_exhaustive]
10106        pub struct SqlDefinition {
10107            /// The SQL query representing the data preparation steps. Formatted as a
10108            /// Pipe SQL query statement.
10109            pub query: std::string::String,
10110
10111            /// Error table configuration,
10112            pub error_table: std::option::Option<
10113                crate::model::compilation_result_action::data_preparation::ErrorTable,
10114            >,
10115
10116            /// Load configuration.
10117            pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
10118
10119            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10120        }
10121
10122        impl SqlDefinition {
10123            /// Creates a new default instance.
10124            pub fn new() -> Self {
10125                std::default::Default::default()
10126            }
10127
10128            /// Sets the value of [query][crate::model::compilation_result_action::data_preparation::SqlDefinition::query].
10129            ///
10130            /// # Example
10131            /// ```ignore,no_run
10132            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10133            /// let x = SqlDefinition::new().set_query("example");
10134            /// ```
10135            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10136                self.query = v.into();
10137                self
10138            }
10139
10140            /// Sets the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
10141            ///
10142            /// # Example
10143            /// ```ignore,no_run
10144            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10145            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10146            /// let x = SqlDefinition::new().set_error_table(ErrorTable::default()/* use setters */);
10147            /// ```
10148            pub fn set_error_table<T>(mut self, v: T) -> Self
10149            where
10150                T: std::convert::Into<
10151                        crate::model::compilation_result_action::data_preparation::ErrorTable,
10152                    >,
10153            {
10154                self.error_table = std::option::Option::Some(v.into());
10155                self
10156            }
10157
10158            /// Sets or clears the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
10159            ///
10160            /// # Example
10161            /// ```ignore,no_run
10162            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10163            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10164            /// let x = SqlDefinition::new().set_or_clear_error_table(Some(ErrorTable::default()/* use setters */));
10165            /// let x = SqlDefinition::new().set_or_clear_error_table(None::<ErrorTable>);
10166            /// ```
10167            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
10168            where
10169                T: std::convert::Into<
10170                        crate::model::compilation_result_action::data_preparation::ErrorTable,
10171                    >,
10172            {
10173                self.error_table = v.map(|x| x.into());
10174                self
10175            }
10176
10177            /// Sets the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
10178            ///
10179            /// # Example
10180            /// ```ignore,no_run
10181            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10182            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10183            /// let x = SqlDefinition::new().set_load(LoadConfig::default()/* use setters */);
10184            /// ```
10185            pub fn set_load<T>(mut self, v: T) -> Self
10186            where
10187                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
10188            {
10189                self.load = std::option::Option::Some(v.into());
10190                self
10191            }
10192
10193            /// Sets or clears the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
10194            ///
10195            /// # Example
10196            /// ```ignore,no_run
10197            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10198            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10199            /// let x = SqlDefinition::new().set_or_clear_load(Some(LoadConfig::default()/* use setters */));
10200            /// let x = SqlDefinition::new().set_or_clear_load(None::<LoadConfig>);
10201            /// ```
10202            pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
10203            where
10204                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
10205            {
10206                self.load = v.map(|x| x.into());
10207                self
10208            }
10209        }
10210
10211        impl wkt::message::Message for SqlDefinition {
10212            fn typename() -> &'static str {
10213                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
10214            }
10215        }
10216
10217        /// Error table information, used to write error data into a BigQuery
10218        /// table.
10219        #[derive(Clone, Default, PartialEq)]
10220        #[non_exhaustive]
10221        pub struct ErrorTable {
10222            /// Error Table target.
10223            pub target: std::option::Option<crate::model::Target>,
10224
10225            /// Error table partition expiration in days. Only positive values are
10226            /// allowed.
10227            pub retention_days: i32,
10228
10229            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10230        }
10231
10232        impl ErrorTable {
10233            /// Creates a new default instance.
10234            pub fn new() -> Self {
10235                std::default::Default::default()
10236            }
10237
10238            /// Sets the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
10239            ///
10240            /// # Example
10241            /// ```ignore,no_run
10242            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10243            /// use google_cloud_dataform_v1::model::Target;
10244            /// let x = ErrorTable::new().set_target(Target::default()/* use setters */);
10245            /// ```
10246            pub fn set_target<T>(mut self, v: T) -> Self
10247            where
10248                T: std::convert::Into<crate::model::Target>,
10249            {
10250                self.target = std::option::Option::Some(v.into());
10251                self
10252            }
10253
10254            /// Sets or clears the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
10255            ///
10256            /// # Example
10257            /// ```ignore,no_run
10258            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10259            /// use google_cloud_dataform_v1::model::Target;
10260            /// let x = ErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
10261            /// let x = ErrorTable::new().set_or_clear_target(None::<Target>);
10262            /// ```
10263            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
10264            where
10265                T: std::convert::Into<crate::model::Target>,
10266            {
10267                self.target = v.map(|x| x.into());
10268                self
10269            }
10270
10271            /// Sets the value of [retention_days][crate::model::compilation_result_action::data_preparation::ErrorTable::retention_days].
10272            ///
10273            /// # Example
10274            /// ```ignore,no_run
10275            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10276            /// let x = ErrorTable::new().set_retention_days(42);
10277            /// ```
10278            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10279                self.retention_days = v.into();
10280                self
10281            }
10282        }
10283
10284        impl wkt::message::Message for ErrorTable {
10285            fn typename() -> &'static str {
10286                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
10287            }
10288        }
10289
10290        /// The definition for the data preparation.
10291        #[derive(Clone, Debug, PartialEq)]
10292        #[non_exhaustive]
10293        pub enum Definition {
10294            /// The data preparation definition, stored as a YAML string.
10295            ContentsYaml(std::string::String),
10296            /// SQL definition for a Data Preparation. Contains a SQL query and
10297            /// additional context information.
10298            ContentsSql(
10299                std::boxed::Box<
10300                    crate::model::compilation_result_action::data_preparation::SqlDefinition,
10301                >,
10302            ),
10303        }
10304    }
10305
10306    /// Simplified load configuration for actions
10307    #[derive(Clone, Default, PartialEq)]
10308    #[non_exhaustive]
10309    pub struct LoadConfig {
10310        /// Load mode
10311        pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
10312
10313        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10314    }
10315
10316    impl LoadConfig {
10317        /// Creates a new default instance.
10318        pub fn new() -> Self {
10319            std::default::Default::default()
10320        }
10321
10322        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode].
10323        ///
10324        /// Note that all the setters affecting `mode` are mutually
10325        /// exclusive.
10326        ///
10327        /// # Example
10328        /// ```ignore,no_run
10329        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10330        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10331        /// let x = LoadConfig::new().set_mode(Some(
10332        ///     google_cloud_dataform_v1::model::compilation_result_action::load_config::Mode::Replace(SimpleLoadMode::default().into())));
10333        /// ```
10334        pub fn set_mode<
10335            T: std::convert::Into<
10336                    std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
10337                >,
10338        >(
10339            mut self,
10340            v: T,
10341        ) -> Self {
10342            self.mode = v.into();
10343            self
10344        }
10345
10346        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10347        /// if it holds a `Replace`, `None` if the field is not set or
10348        /// holds a different branch.
10349        pub fn replace(
10350            &self,
10351        ) -> std::option::Option<
10352            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10353        > {
10354            #[allow(unreachable_patterns)]
10355            self.mode.as_ref().and_then(|v| match v {
10356                crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
10357                    std::option::Option::Some(v)
10358                }
10359                _ => std::option::Option::None,
10360            })
10361        }
10362
10363        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10364        /// to hold a `Replace`.
10365        ///
10366        /// Note that all the setters affecting `mode` are
10367        /// mutually exclusive.
10368        ///
10369        /// # Example
10370        /// ```ignore,no_run
10371        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10372        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10373        /// let x = LoadConfig::new().set_replace(SimpleLoadMode::default()/* use setters */);
10374        /// assert!(x.replace().is_some());
10375        /// assert!(x.append().is_none());
10376        /// assert!(x.maximum().is_none());
10377        /// assert!(x.unique().is_none());
10378        /// ```
10379        pub fn set_replace<
10380            T: std::convert::Into<
10381                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10382                >,
10383        >(
10384            mut self,
10385            v: T,
10386        ) -> Self {
10387            self.mode = std::option::Option::Some(
10388                crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
10389            );
10390            self
10391        }
10392
10393        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10394        /// if it holds a `Append`, `None` if the field is not set or
10395        /// holds a different branch.
10396        pub fn append(
10397            &self,
10398        ) -> std::option::Option<
10399            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10400        > {
10401            #[allow(unreachable_patterns)]
10402            self.mode.as_ref().and_then(|v| match v {
10403                crate::model::compilation_result_action::load_config::Mode::Append(v) => {
10404                    std::option::Option::Some(v)
10405                }
10406                _ => std::option::Option::None,
10407            })
10408        }
10409
10410        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10411        /// to hold a `Append`.
10412        ///
10413        /// Note that all the setters affecting `mode` are
10414        /// mutually exclusive.
10415        ///
10416        /// # Example
10417        /// ```ignore,no_run
10418        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10419        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10420        /// let x = LoadConfig::new().set_append(SimpleLoadMode::default()/* use setters */);
10421        /// assert!(x.append().is_some());
10422        /// assert!(x.replace().is_none());
10423        /// assert!(x.maximum().is_none());
10424        /// assert!(x.unique().is_none());
10425        /// ```
10426        pub fn set_append<
10427            T: std::convert::Into<
10428                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10429                >,
10430        >(
10431            mut self,
10432            v: T,
10433        ) -> Self {
10434            self.mode = std::option::Option::Some(
10435                crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
10436            );
10437            self
10438        }
10439
10440        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10441        /// if it holds a `Maximum`, `None` if the field is not set or
10442        /// holds a different branch.
10443        pub fn maximum(
10444            &self,
10445        ) -> std::option::Option<
10446            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10447        > {
10448            #[allow(unreachable_patterns)]
10449            self.mode.as_ref().and_then(|v| match v {
10450                crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
10451                    std::option::Option::Some(v)
10452                }
10453                _ => std::option::Option::None,
10454            })
10455        }
10456
10457        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10458        /// to hold a `Maximum`.
10459        ///
10460        /// Note that all the setters affecting `mode` are
10461        /// mutually exclusive.
10462        ///
10463        /// # Example
10464        /// ```ignore,no_run
10465        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10466        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10467        /// let x = LoadConfig::new().set_maximum(IncrementalLoadMode::default()/* use setters */);
10468        /// assert!(x.maximum().is_some());
10469        /// assert!(x.replace().is_none());
10470        /// assert!(x.append().is_none());
10471        /// assert!(x.unique().is_none());
10472        /// ```
10473        pub fn set_maximum<
10474            T: std::convert::Into<
10475                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10476                >,
10477        >(
10478            mut self,
10479            v: T,
10480        ) -> Self {
10481            self.mode = std::option::Option::Some(
10482                crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
10483            );
10484            self
10485        }
10486
10487        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10488        /// if it holds a `Unique`, `None` if the field is not set or
10489        /// holds a different branch.
10490        pub fn unique(
10491            &self,
10492        ) -> std::option::Option<
10493            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10494        > {
10495            #[allow(unreachable_patterns)]
10496            self.mode.as_ref().and_then(|v| match v {
10497                crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
10498                    std::option::Option::Some(v)
10499                }
10500                _ => std::option::Option::None,
10501            })
10502        }
10503
10504        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10505        /// to hold a `Unique`.
10506        ///
10507        /// Note that all the setters affecting `mode` are
10508        /// mutually exclusive.
10509        ///
10510        /// # Example
10511        /// ```ignore,no_run
10512        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10513        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10514        /// let x = LoadConfig::new().set_unique(IncrementalLoadMode::default()/* use setters */);
10515        /// assert!(x.unique().is_some());
10516        /// assert!(x.replace().is_none());
10517        /// assert!(x.append().is_none());
10518        /// assert!(x.maximum().is_none());
10519        /// ```
10520        pub fn set_unique<
10521            T: std::convert::Into<
10522                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10523                >,
10524        >(
10525            mut self,
10526            v: T,
10527        ) -> Self {
10528            self.mode = std::option::Option::Some(
10529                crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
10530            );
10531            self
10532        }
10533    }
10534
10535    impl wkt::message::Message for LoadConfig {
10536        fn typename() -> &'static str {
10537            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
10538        }
10539    }
10540
10541    /// Defines additional types related to [LoadConfig].
10542    pub mod load_config {
10543        #[allow(unused_imports)]
10544        use super::*;
10545
10546        /// Load mode
10547        #[derive(Clone, Debug, PartialEq)]
10548        #[non_exhaustive]
10549        pub enum Mode {
10550            /// Replace destination table
10551            Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
10552            /// Append into destination table
10553            Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
10554            /// Insert records where the value exceeds the previous maximum value for a
10555            /// column in the destination table
10556            Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
10557            /// Insert records where the value of a column is not already present in
10558            /// the destination table
10559            Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
10560        }
10561    }
10562
10563    /// Simple load definition
10564    #[derive(Clone, Default, PartialEq)]
10565    #[non_exhaustive]
10566    pub struct SimpleLoadMode {
10567        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10568    }
10569
10570    impl SimpleLoadMode {
10571        /// Creates a new default instance.
10572        pub fn new() -> Self {
10573            std::default::Default::default()
10574        }
10575    }
10576
10577    impl wkt::message::Message for SimpleLoadMode {
10578        fn typename() -> &'static str {
10579            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
10580        }
10581    }
10582
10583    /// Load definition for incremental load modes
10584    #[derive(Clone, Default, PartialEq)]
10585    #[non_exhaustive]
10586    pub struct IncrementalLoadMode {
10587        /// Column name for incremental load modes
10588        pub column: std::string::String,
10589
10590        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10591    }
10592
10593    impl IncrementalLoadMode {
10594        /// Creates a new default instance.
10595        pub fn new() -> Self {
10596            std::default::Default::default()
10597        }
10598
10599        /// Sets the value of [column][crate::model::compilation_result_action::IncrementalLoadMode::column].
10600        ///
10601        /// # Example
10602        /// ```ignore,no_run
10603        /// # use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10604        /// let x = IncrementalLoadMode::new().set_column("example");
10605        /// ```
10606        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10607            self.column = v.into();
10608            self
10609        }
10610    }
10611
10612    impl wkt::message::Message for IncrementalLoadMode {
10613        fn typename() -> &'static str {
10614            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
10615        }
10616    }
10617
10618    /// The compiled object.
10619    #[derive(Clone, Debug, PartialEq)]
10620    #[non_exhaustive]
10621    pub enum CompiledObject {
10622        /// The database relation created/updated by this action.
10623        Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
10624        /// The database operations executed by this action.
10625        Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
10626        /// The assertion executed by this action.
10627        Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
10628        /// The declaration declared by this action.
10629        Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
10630        /// The notebook executed by this action.
10631        Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
10632        /// The data preparation executed by this action.
10633        DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
10634    }
10635}
10636
10637/// `QueryCompilationResultActions` request message.
10638#[derive(Clone, Default, PartialEq)]
10639#[non_exhaustive]
10640pub struct QueryCompilationResultActionsRequest {
10641    /// Required. The compilation result's name.
10642    pub name: std::string::String,
10643
10644    /// Optional. Maximum number of compilation results to return. The server may
10645    /// return fewer items than requested. If unspecified, the server will pick an
10646    /// appropriate default.
10647    pub page_size: i32,
10648
10649    /// Optional. Page token received from a previous
10650    /// `QueryCompilationResultActions` call. Provide this to retrieve the
10651    /// subsequent page.
10652    ///
10653    /// When paginating, all other parameters provided to
10654    /// `QueryCompilationResultActions`, with the exception of `page_size`, must
10655    /// match the call that provided the page token.
10656    pub page_token: std::string::String,
10657
10658    /// Optional. Optional filter for the returned list. Filtering is only
10659    /// currently supported on the `file_path` field.
10660    pub filter: std::string::String,
10661
10662    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10663}
10664
10665impl QueryCompilationResultActionsRequest {
10666    /// Creates a new default instance.
10667    pub fn new() -> Self {
10668        std::default::Default::default()
10669    }
10670
10671    /// Sets the value of [name][crate::model::QueryCompilationResultActionsRequest::name].
10672    ///
10673    /// # Example
10674    /// ```ignore,no_run
10675    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10676    /// let x = QueryCompilationResultActionsRequest::new().set_name("example");
10677    /// ```
10678    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10679        self.name = v.into();
10680        self
10681    }
10682
10683    /// Sets the value of [page_size][crate::model::QueryCompilationResultActionsRequest::page_size].
10684    ///
10685    /// # Example
10686    /// ```ignore,no_run
10687    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10688    /// let x = QueryCompilationResultActionsRequest::new().set_page_size(42);
10689    /// ```
10690    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10691        self.page_size = v.into();
10692        self
10693    }
10694
10695    /// Sets the value of [page_token][crate::model::QueryCompilationResultActionsRequest::page_token].
10696    ///
10697    /// # Example
10698    /// ```ignore,no_run
10699    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10700    /// let x = QueryCompilationResultActionsRequest::new().set_page_token("example");
10701    /// ```
10702    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10703        self.page_token = v.into();
10704        self
10705    }
10706
10707    /// Sets the value of [filter][crate::model::QueryCompilationResultActionsRequest::filter].
10708    ///
10709    /// # Example
10710    /// ```ignore,no_run
10711    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10712    /// let x = QueryCompilationResultActionsRequest::new().set_filter("example");
10713    /// ```
10714    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10715        self.filter = v.into();
10716        self
10717    }
10718}
10719
10720impl wkt::message::Message for QueryCompilationResultActionsRequest {
10721    fn typename() -> &'static str {
10722        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
10723    }
10724}
10725
10726/// `QueryCompilationResultActions` response message.
10727#[derive(Clone, Default, PartialEq)]
10728#[non_exhaustive]
10729pub struct QueryCompilationResultActionsResponse {
10730    /// List of compilation result actions.
10731    pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
10732
10733    /// A token, which can be sent as `page_token` to retrieve the next page.
10734    /// If this field is omitted, there are no subsequent pages.
10735    pub next_page_token: std::string::String,
10736
10737    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10738}
10739
10740impl QueryCompilationResultActionsResponse {
10741    /// Creates a new default instance.
10742    pub fn new() -> Self {
10743        std::default::Default::default()
10744    }
10745
10746    /// Sets the value of [compilation_result_actions][crate::model::QueryCompilationResultActionsResponse::compilation_result_actions].
10747    ///
10748    /// # Example
10749    /// ```ignore,no_run
10750    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
10751    /// use google_cloud_dataform_v1::model::CompilationResultAction;
10752    /// let x = QueryCompilationResultActionsResponse::new()
10753    ///     .set_compilation_result_actions([
10754    ///         CompilationResultAction::default()/* use setters */,
10755    ///         CompilationResultAction::default()/* use (different) setters */,
10756    ///     ]);
10757    /// ```
10758    pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
10759    where
10760        T: std::iter::IntoIterator<Item = V>,
10761        V: std::convert::Into<crate::model::CompilationResultAction>,
10762    {
10763        use std::iter::Iterator;
10764        self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
10765        self
10766    }
10767
10768    /// Sets the value of [next_page_token][crate::model::QueryCompilationResultActionsResponse::next_page_token].
10769    ///
10770    /// # Example
10771    /// ```ignore,no_run
10772    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
10773    /// let x = QueryCompilationResultActionsResponse::new().set_next_page_token("example");
10774    /// ```
10775    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10776        self.next_page_token = v.into();
10777        self
10778    }
10779}
10780
10781impl wkt::message::Message for QueryCompilationResultActionsResponse {
10782    fn typename() -> &'static str {
10783        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
10784    }
10785}
10786
10787#[doc(hidden)]
10788impl google_cloud_gax::paginator::internal::PageableResponse
10789    for QueryCompilationResultActionsResponse
10790{
10791    type PageItem = crate::model::CompilationResultAction;
10792
10793    fn items(self) -> std::vec::Vec<Self::PageItem> {
10794        self.compilation_result_actions
10795    }
10796
10797    fn next_page_token(&self) -> std::string::String {
10798        use std::clone::Clone;
10799        self.next_page_token.clone()
10800    }
10801}
10802
10803/// Represents a Dataform workflow configuration.
10804#[derive(Clone, Default, PartialEq)]
10805#[non_exhaustive]
10806pub struct WorkflowConfig {
10807    /// Identifier. The workflow config's name.
10808    pub name: std::string::String,
10809
10810    /// Required. The name of the release config whose release_compilation_result
10811    /// should be executed. Must be in the format
10812    /// `projects/*/locations/*/repositories/*/releaseConfigs/*`.
10813    pub release_config: std::string::String,
10814
10815    /// Optional. If left unset, a default InvocationConfig will be used.
10816    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
10817
10818    /// Optional. Optional schedule (in cron format) for automatic execution of
10819    /// this workflow config.
10820    pub cron_schedule: std::string::String,
10821
10822    /// Optional. Specifies the time zone to be used when interpreting
10823    /// cron_schedule. Must be a time zone name from the time zone database
10824    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
10825    /// unspecified, the default is UTC.
10826    pub time_zone: std::string::String,
10827
10828    /// Output only. Records of the 10 most recent scheduled execution attempts,
10829    /// ordered in descending order of `execution_time`. Updated whenever automatic
10830    /// creation of a workflow invocation is triggered by cron_schedule.
10831    pub recent_scheduled_execution_records:
10832        std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
10833
10834    /// Optional. Disables automatic creation of workflow invocations.
10835    pub disabled: bool,
10836
10837    /// Output only. The timestamp of when the WorkflowConfig was created.
10838    pub create_time: std::option::Option<wkt::Timestamp>,
10839
10840    /// Output only. The timestamp of when the WorkflowConfig was last updated.
10841    pub update_time: std::option::Option<wkt::Timestamp>,
10842
10843    /// Output only. All the metadata information that is used internally to serve
10844    /// the resource. For example: timestamps, flags, status fields, etc. The
10845    /// format of this field is a JSON string.
10846    pub internal_metadata: std::option::Option<std::string::String>,
10847
10848    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10849}
10850
10851impl WorkflowConfig {
10852    /// Creates a new default instance.
10853    pub fn new() -> Self {
10854        std::default::Default::default()
10855    }
10856
10857    /// Sets the value of [name][crate::model::WorkflowConfig::name].
10858    ///
10859    /// # Example
10860    /// ```ignore,no_run
10861    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10862    /// let x = WorkflowConfig::new().set_name("example");
10863    /// ```
10864    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10865        self.name = v.into();
10866        self
10867    }
10868
10869    /// Sets the value of [release_config][crate::model::WorkflowConfig::release_config].
10870    ///
10871    /// # Example
10872    /// ```ignore,no_run
10873    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10874    /// let x = WorkflowConfig::new().set_release_config("example");
10875    /// ```
10876    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10877        self.release_config = v.into();
10878        self
10879    }
10880
10881    /// Sets the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
10882    ///
10883    /// # Example
10884    /// ```ignore,no_run
10885    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10886    /// use google_cloud_dataform_v1::model::InvocationConfig;
10887    /// let x = WorkflowConfig::new().set_invocation_config(InvocationConfig::default()/* use setters */);
10888    /// ```
10889    pub fn set_invocation_config<T>(mut self, v: T) -> Self
10890    where
10891        T: std::convert::Into<crate::model::InvocationConfig>,
10892    {
10893        self.invocation_config = std::option::Option::Some(v.into());
10894        self
10895    }
10896
10897    /// Sets or clears the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
10898    ///
10899    /// # Example
10900    /// ```ignore,no_run
10901    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10902    /// use google_cloud_dataform_v1::model::InvocationConfig;
10903    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
10904    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(None::<InvocationConfig>);
10905    /// ```
10906    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
10907    where
10908        T: std::convert::Into<crate::model::InvocationConfig>,
10909    {
10910        self.invocation_config = v.map(|x| x.into());
10911        self
10912    }
10913
10914    /// Sets the value of [cron_schedule][crate::model::WorkflowConfig::cron_schedule].
10915    ///
10916    /// # Example
10917    /// ```ignore,no_run
10918    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10919    /// let x = WorkflowConfig::new().set_cron_schedule("example");
10920    /// ```
10921    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10922        self.cron_schedule = v.into();
10923        self
10924    }
10925
10926    /// Sets the value of [time_zone][crate::model::WorkflowConfig::time_zone].
10927    ///
10928    /// # Example
10929    /// ```ignore,no_run
10930    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10931    /// let x = WorkflowConfig::new().set_time_zone("example");
10932    /// ```
10933    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10934        self.time_zone = v.into();
10935        self
10936    }
10937
10938    /// Sets the value of [recent_scheduled_execution_records][crate::model::WorkflowConfig::recent_scheduled_execution_records].
10939    ///
10940    /// # Example
10941    /// ```ignore,no_run
10942    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10943    /// use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
10944    /// let x = WorkflowConfig::new()
10945    ///     .set_recent_scheduled_execution_records([
10946    ///         ScheduledExecutionRecord::default()/* use setters */,
10947    ///         ScheduledExecutionRecord::default()/* use (different) setters */,
10948    ///     ]);
10949    /// ```
10950    pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
10951    where
10952        T: std::iter::IntoIterator<Item = V>,
10953        V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
10954    {
10955        use std::iter::Iterator;
10956        self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
10957        self
10958    }
10959
10960    /// Sets the value of [disabled][crate::model::WorkflowConfig::disabled].
10961    ///
10962    /// # Example
10963    /// ```ignore,no_run
10964    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10965    /// let x = WorkflowConfig::new().set_disabled(true);
10966    /// ```
10967    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10968        self.disabled = v.into();
10969        self
10970    }
10971
10972    /// Sets the value of [create_time][crate::model::WorkflowConfig::create_time].
10973    ///
10974    /// # Example
10975    /// ```ignore,no_run
10976    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10977    /// use wkt::Timestamp;
10978    /// let x = WorkflowConfig::new().set_create_time(Timestamp::default()/* use setters */);
10979    /// ```
10980    pub fn set_create_time<T>(mut self, v: T) -> Self
10981    where
10982        T: std::convert::Into<wkt::Timestamp>,
10983    {
10984        self.create_time = std::option::Option::Some(v.into());
10985        self
10986    }
10987
10988    /// Sets or clears the value of [create_time][crate::model::WorkflowConfig::create_time].
10989    ///
10990    /// # Example
10991    /// ```ignore,no_run
10992    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
10993    /// use wkt::Timestamp;
10994    /// let x = WorkflowConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10995    /// let x = WorkflowConfig::new().set_or_clear_create_time(None::<Timestamp>);
10996    /// ```
10997    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10998    where
10999        T: std::convert::Into<wkt::Timestamp>,
11000    {
11001        self.create_time = v.map(|x| x.into());
11002        self
11003    }
11004
11005    /// Sets the value of [update_time][crate::model::WorkflowConfig::update_time].
11006    ///
11007    /// # Example
11008    /// ```ignore,no_run
11009    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11010    /// use wkt::Timestamp;
11011    /// let x = WorkflowConfig::new().set_update_time(Timestamp::default()/* use setters */);
11012    /// ```
11013    pub fn set_update_time<T>(mut self, v: T) -> Self
11014    where
11015        T: std::convert::Into<wkt::Timestamp>,
11016    {
11017        self.update_time = std::option::Option::Some(v.into());
11018        self
11019    }
11020
11021    /// Sets or clears the value of [update_time][crate::model::WorkflowConfig::update_time].
11022    ///
11023    /// # Example
11024    /// ```ignore,no_run
11025    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11026    /// use wkt::Timestamp;
11027    /// let x = WorkflowConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11028    /// let x = WorkflowConfig::new().set_or_clear_update_time(None::<Timestamp>);
11029    /// ```
11030    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11031    where
11032        T: std::convert::Into<wkt::Timestamp>,
11033    {
11034        self.update_time = v.map(|x| x.into());
11035        self
11036    }
11037
11038    /// Sets the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
11039    ///
11040    /// # Example
11041    /// ```ignore,no_run
11042    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11043    /// let x = WorkflowConfig::new().set_internal_metadata("example");
11044    /// ```
11045    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
11046    where
11047        T: std::convert::Into<std::string::String>,
11048    {
11049        self.internal_metadata = std::option::Option::Some(v.into());
11050        self
11051    }
11052
11053    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
11054    ///
11055    /// # Example
11056    /// ```ignore,no_run
11057    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11058    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(Some("example"));
11059    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(None::<String>);
11060    /// ```
11061    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11062    where
11063        T: std::convert::Into<std::string::String>,
11064    {
11065        self.internal_metadata = v.map(|x| x.into());
11066        self
11067    }
11068}
11069
11070impl wkt::message::Message for WorkflowConfig {
11071    fn typename() -> &'static str {
11072        "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
11073    }
11074}
11075
11076/// Defines additional types related to [WorkflowConfig].
11077pub mod workflow_config {
11078    #[allow(unused_imports)]
11079    use super::*;
11080
11081    /// A record of an attempt to create a workflow invocation for this workflow
11082    /// config.
11083    #[derive(Clone, Default, PartialEq)]
11084    #[non_exhaustive]
11085    pub struct ScheduledExecutionRecord {
11086        /// Output only. The timestamp of this execution attempt.
11087        pub execution_time: std::option::Option<wkt::Timestamp>,
11088
11089        /// The result of this execution attempt.
11090        pub result:
11091            std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
11092
11093        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11094    }
11095
11096    impl ScheduledExecutionRecord {
11097        /// Creates a new default instance.
11098        pub fn new() -> Self {
11099            std::default::Default::default()
11100        }
11101
11102        /// Sets the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
11103        ///
11104        /// # Example
11105        /// ```ignore,no_run
11106        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11107        /// use wkt::Timestamp;
11108        /// let x = ScheduledExecutionRecord::new().set_execution_time(Timestamp::default()/* use setters */);
11109        /// ```
11110        pub fn set_execution_time<T>(mut self, v: T) -> Self
11111        where
11112            T: std::convert::Into<wkt::Timestamp>,
11113        {
11114            self.execution_time = std::option::Option::Some(v.into());
11115            self
11116        }
11117
11118        /// Sets or clears the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
11119        ///
11120        /// # Example
11121        /// ```ignore,no_run
11122        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11123        /// use wkt::Timestamp;
11124        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(Some(Timestamp::default()/* use setters */));
11125        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(None::<Timestamp>);
11126        /// ```
11127        pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
11128        where
11129            T: std::convert::Into<wkt::Timestamp>,
11130        {
11131            self.execution_time = v.map(|x| x.into());
11132            self
11133        }
11134
11135        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result].
11136        ///
11137        /// Note that all the setters affecting `result` are mutually
11138        /// exclusive.
11139        ///
11140        /// # Example
11141        /// ```ignore,no_run
11142        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11143        /// use google_cloud_dataform_v1::model::workflow_config::scheduled_execution_record::Result;
11144        /// let x = ScheduledExecutionRecord::new().set_result(Some(Result::WorkflowInvocation("example".to_string())));
11145        /// ```
11146        pub fn set_result<
11147            T: std::convert::Into<
11148                    std::option::Option<
11149                        crate::model::workflow_config::scheduled_execution_record::Result,
11150                    >,
11151                >,
11152        >(
11153            mut self,
11154            v: T,
11155        ) -> Self {
11156            self.result = v.into();
11157            self
11158        }
11159
11160        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11161        /// if it holds a `WorkflowInvocation`, `None` if the field is not set or
11162        /// holds a different branch.
11163        pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
11164            #[allow(unreachable_patterns)]
11165            self.result.as_ref().and_then(|v| match v {
11166                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
11167                _ => std::option::Option::None,
11168            })
11169        }
11170
11171        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11172        /// to hold a `WorkflowInvocation`.
11173        ///
11174        /// Note that all the setters affecting `result` are
11175        /// mutually exclusive.
11176        ///
11177        /// # Example
11178        /// ```ignore,no_run
11179        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11180        /// let x = ScheduledExecutionRecord::new().set_workflow_invocation("example");
11181        /// assert!(x.workflow_invocation().is_some());
11182        /// assert!(x.error_status().is_none());
11183        /// ```
11184        pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
11185            mut self,
11186            v: T,
11187        ) -> Self {
11188            self.result = std::option::Option::Some(
11189                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
11190                    v.into()
11191                )
11192            );
11193            self
11194        }
11195
11196        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11197        /// if it holds a `ErrorStatus`, `None` if the field is not set or
11198        /// holds a different branch.
11199        pub fn error_status(
11200            &self,
11201        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
11202            #[allow(unreachable_patterns)]
11203            self.result.as_ref().and_then(|v| match v {
11204                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
11205                    v,
11206                ) => std::option::Option::Some(v),
11207                _ => std::option::Option::None,
11208            })
11209        }
11210
11211        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11212        /// to hold a `ErrorStatus`.
11213        ///
11214        /// Note that all the setters affecting `result` are
11215        /// mutually exclusive.
11216        ///
11217        /// # Example
11218        /// ```ignore,no_run
11219        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11220        /// use google_cloud_rpc::model::Status;
11221        /// let x = ScheduledExecutionRecord::new().set_error_status(Status::default()/* use setters */);
11222        /// assert!(x.error_status().is_some());
11223        /// assert!(x.workflow_invocation().is_none());
11224        /// ```
11225        pub fn set_error_status<
11226            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
11227        >(
11228            mut self,
11229            v: T,
11230        ) -> Self {
11231            self.result = std::option::Option::Some(
11232                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
11233                    v.into(),
11234                ),
11235            );
11236            self
11237        }
11238    }
11239
11240    impl wkt::message::Message for ScheduledExecutionRecord {
11241        fn typename() -> &'static str {
11242            "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
11243        }
11244    }
11245
11246    /// Defines additional types related to [ScheduledExecutionRecord].
11247    pub mod scheduled_execution_record {
11248        #[allow(unused_imports)]
11249        use super::*;
11250
11251        /// The result of this execution attempt.
11252        #[derive(Clone, Debug, PartialEq)]
11253        #[non_exhaustive]
11254        pub enum Result {
11255            /// The name of the created workflow invocation, if one was successfully
11256            /// created. Must be in the format
11257            /// `projects/*/locations/*/repositories/*/workflowInvocations/*`.
11258            WorkflowInvocation(std::string::String),
11259            /// The error status encountered upon this attempt to create the
11260            /// workflow invocation, if the attempt was unsuccessful.
11261            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
11262        }
11263    }
11264}
11265
11266/// Includes various configuration options for a workflow invocation.
11267/// If both `included_targets` and `included_tags` are unset, all actions
11268/// will be included.
11269#[derive(Clone, Default, PartialEq)]
11270#[non_exhaustive]
11271pub struct InvocationConfig {
11272    /// Optional. The set of action identifiers to include.
11273    pub included_targets: std::vec::Vec<crate::model::Target>,
11274
11275    /// Optional. The set of tags to include.
11276    pub included_tags: std::vec::Vec<std::string::String>,
11277
11278    /// Optional. When set to true, transitive dependencies of included actions
11279    /// will be executed.
11280    pub transitive_dependencies_included: bool,
11281
11282    /// Optional. When set to true, transitive dependents of included actions will
11283    /// be executed.
11284    pub transitive_dependents_included: bool,
11285
11286    /// Optional. When set to true, any incremental tables will be fully refreshed.
11287    pub fully_refresh_incremental_tables_enabled: bool,
11288
11289    /// Optional. The service account to run workflow invocations under.
11290    pub service_account: std::string::String,
11291
11292    /// Optional. Specifies the priority for query execution in BigQuery.
11293    /// More information can be found at
11294    /// <https://cloud.google.com/bigquery/docs/running-queries#queries>.
11295    pub query_priority: std::option::Option<crate::model::invocation_config::QueryPriority>,
11296
11297    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11298}
11299
11300impl InvocationConfig {
11301    /// Creates a new default instance.
11302    pub fn new() -> Self {
11303        std::default::Default::default()
11304    }
11305
11306    /// Sets the value of [included_targets][crate::model::InvocationConfig::included_targets].
11307    ///
11308    /// # Example
11309    /// ```ignore,no_run
11310    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11311    /// use google_cloud_dataform_v1::model::Target;
11312    /// let x = InvocationConfig::new()
11313    ///     .set_included_targets([
11314    ///         Target::default()/* use setters */,
11315    ///         Target::default()/* use (different) setters */,
11316    ///     ]);
11317    /// ```
11318    pub fn set_included_targets<T, V>(mut self, v: T) -> Self
11319    where
11320        T: std::iter::IntoIterator<Item = V>,
11321        V: std::convert::Into<crate::model::Target>,
11322    {
11323        use std::iter::Iterator;
11324        self.included_targets = v.into_iter().map(|i| i.into()).collect();
11325        self
11326    }
11327
11328    /// Sets the value of [included_tags][crate::model::InvocationConfig::included_tags].
11329    ///
11330    /// # Example
11331    /// ```ignore,no_run
11332    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11333    /// let x = InvocationConfig::new().set_included_tags(["a", "b", "c"]);
11334    /// ```
11335    pub fn set_included_tags<T, V>(mut self, v: T) -> Self
11336    where
11337        T: std::iter::IntoIterator<Item = V>,
11338        V: std::convert::Into<std::string::String>,
11339    {
11340        use std::iter::Iterator;
11341        self.included_tags = v.into_iter().map(|i| i.into()).collect();
11342        self
11343    }
11344
11345    /// Sets the value of [transitive_dependencies_included][crate::model::InvocationConfig::transitive_dependencies_included].
11346    ///
11347    /// # Example
11348    /// ```ignore,no_run
11349    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11350    /// let x = InvocationConfig::new().set_transitive_dependencies_included(true);
11351    /// ```
11352    pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
11353        mut self,
11354        v: T,
11355    ) -> Self {
11356        self.transitive_dependencies_included = v.into();
11357        self
11358    }
11359
11360    /// Sets the value of [transitive_dependents_included][crate::model::InvocationConfig::transitive_dependents_included].
11361    ///
11362    /// # Example
11363    /// ```ignore,no_run
11364    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11365    /// let x = InvocationConfig::new().set_transitive_dependents_included(true);
11366    /// ```
11367    pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11368        self.transitive_dependents_included = v.into();
11369        self
11370    }
11371
11372    /// Sets the value of [fully_refresh_incremental_tables_enabled][crate::model::InvocationConfig::fully_refresh_incremental_tables_enabled].
11373    ///
11374    /// # Example
11375    /// ```ignore,no_run
11376    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11377    /// let x = InvocationConfig::new().set_fully_refresh_incremental_tables_enabled(true);
11378    /// ```
11379    pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
11380        mut self,
11381        v: T,
11382    ) -> Self {
11383        self.fully_refresh_incremental_tables_enabled = v.into();
11384        self
11385    }
11386
11387    /// Sets the value of [service_account][crate::model::InvocationConfig::service_account].
11388    ///
11389    /// # Example
11390    /// ```ignore,no_run
11391    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11392    /// let x = InvocationConfig::new().set_service_account("example");
11393    /// ```
11394    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11395        self.service_account = v.into();
11396        self
11397    }
11398
11399    /// Sets the value of [query_priority][crate::model::InvocationConfig::query_priority].
11400    ///
11401    /// # Example
11402    /// ```ignore,no_run
11403    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11404    /// use google_cloud_dataform_v1::model::invocation_config::QueryPriority;
11405    /// let x0 = InvocationConfig::new().set_query_priority(QueryPriority::Interactive);
11406    /// let x1 = InvocationConfig::new().set_query_priority(QueryPriority::Batch);
11407    /// ```
11408    pub fn set_query_priority<T>(mut self, v: T) -> Self
11409    where
11410        T: std::convert::Into<crate::model::invocation_config::QueryPriority>,
11411    {
11412        self.query_priority = std::option::Option::Some(v.into());
11413        self
11414    }
11415
11416    /// Sets or clears the value of [query_priority][crate::model::InvocationConfig::query_priority].
11417    ///
11418    /// # Example
11419    /// ```ignore,no_run
11420    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11421    /// use google_cloud_dataform_v1::model::invocation_config::QueryPriority;
11422    /// let x0 = InvocationConfig::new().set_or_clear_query_priority(Some(QueryPriority::Interactive));
11423    /// let x1 = InvocationConfig::new().set_or_clear_query_priority(Some(QueryPriority::Batch));
11424    /// let x_none = InvocationConfig::new().set_or_clear_query_priority(None::<QueryPriority>);
11425    /// ```
11426    pub fn set_or_clear_query_priority<T>(mut self, v: std::option::Option<T>) -> Self
11427    where
11428        T: std::convert::Into<crate::model::invocation_config::QueryPriority>,
11429    {
11430        self.query_priority = v.map(|x| x.into());
11431        self
11432    }
11433}
11434
11435impl wkt::message::Message for InvocationConfig {
11436    fn typename() -> &'static str {
11437        "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
11438    }
11439}
11440
11441/// Defines additional types related to [InvocationConfig].
11442pub mod invocation_config {
11443    #[allow(unused_imports)]
11444    use super::*;
11445
11446    /// Types of priority for query execution in BigQuery.
11447    ///
11448    /// # Working with unknown values
11449    ///
11450    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11451    /// additional enum variants at any time. Adding new variants is not considered
11452    /// a breaking change. Applications should write their code in anticipation of:
11453    ///
11454    /// - New values appearing in future releases of the client library, **and**
11455    /// - New values received dynamically, without application changes.
11456    ///
11457    /// Please consult the [Working with enums] section in the user guide for some
11458    /// guidelines.
11459    ///
11460    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11461    #[derive(Clone, Debug, PartialEq)]
11462    #[non_exhaustive]
11463    pub enum QueryPriority {
11464        /// Default value. This value is unused.
11465        Unspecified,
11466        /// Query will be executed in BigQuery with interactive priority.
11467        /// More information can be found at
11468        /// <https://cloud.google.com/bigquery/docs/running-queries#queries>.
11469        Interactive,
11470        /// Query will be executed in BigQuery with batch priority.
11471        /// More information can be found at
11472        /// <https://cloud.google.com/bigquery/docs/running-queries#batchqueries>.
11473        Batch,
11474        /// If set, the enum was initialized with an unknown value.
11475        ///
11476        /// Applications can examine the value using [QueryPriority::value] or
11477        /// [QueryPriority::name].
11478        UnknownValue(query_priority::UnknownValue),
11479    }
11480
11481    #[doc(hidden)]
11482    pub mod query_priority {
11483        #[allow(unused_imports)]
11484        use super::*;
11485        #[derive(Clone, Debug, PartialEq)]
11486        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11487    }
11488
11489    impl QueryPriority {
11490        /// Gets the enum value.
11491        ///
11492        /// Returns `None` if the enum contains an unknown value deserialized from
11493        /// the string representation of enums.
11494        pub fn value(&self) -> std::option::Option<i32> {
11495            match self {
11496                Self::Unspecified => std::option::Option::Some(0),
11497                Self::Interactive => std::option::Option::Some(1),
11498                Self::Batch => std::option::Option::Some(2),
11499                Self::UnknownValue(u) => u.0.value(),
11500            }
11501        }
11502
11503        /// Gets the enum value as a string.
11504        ///
11505        /// Returns `None` if the enum contains an unknown value deserialized from
11506        /// the integer representation of enums.
11507        pub fn name(&self) -> std::option::Option<&str> {
11508            match self {
11509                Self::Unspecified => std::option::Option::Some("QUERY_PRIORITY_UNSPECIFIED"),
11510                Self::Interactive => std::option::Option::Some("INTERACTIVE"),
11511                Self::Batch => std::option::Option::Some("BATCH"),
11512                Self::UnknownValue(u) => u.0.name(),
11513            }
11514        }
11515    }
11516
11517    impl std::default::Default for QueryPriority {
11518        fn default() -> Self {
11519            use std::convert::From;
11520            Self::from(0)
11521        }
11522    }
11523
11524    impl std::fmt::Display for QueryPriority {
11525        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11526            wkt::internal::display_enum(f, self.name(), self.value())
11527        }
11528    }
11529
11530    impl std::convert::From<i32> for QueryPriority {
11531        fn from(value: i32) -> Self {
11532            match value {
11533                0 => Self::Unspecified,
11534                1 => Self::Interactive,
11535                2 => Self::Batch,
11536                _ => Self::UnknownValue(query_priority::UnknownValue(
11537                    wkt::internal::UnknownEnumValue::Integer(value),
11538                )),
11539            }
11540        }
11541    }
11542
11543    impl std::convert::From<&str> for QueryPriority {
11544        fn from(value: &str) -> Self {
11545            use std::string::ToString;
11546            match value {
11547                "QUERY_PRIORITY_UNSPECIFIED" => Self::Unspecified,
11548                "INTERACTIVE" => Self::Interactive,
11549                "BATCH" => Self::Batch,
11550                _ => Self::UnknownValue(query_priority::UnknownValue(
11551                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11552                )),
11553            }
11554        }
11555    }
11556
11557    impl serde::ser::Serialize for QueryPriority {
11558        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11559        where
11560            S: serde::Serializer,
11561        {
11562            match self {
11563                Self::Unspecified => serializer.serialize_i32(0),
11564                Self::Interactive => serializer.serialize_i32(1),
11565                Self::Batch => serializer.serialize_i32(2),
11566                Self::UnknownValue(u) => u.0.serialize(serializer),
11567            }
11568        }
11569    }
11570
11571    impl<'de> serde::de::Deserialize<'de> for QueryPriority {
11572        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11573        where
11574            D: serde::Deserializer<'de>,
11575        {
11576            deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryPriority>::new(
11577                ".google.cloud.dataform.v1.InvocationConfig.QueryPriority",
11578            ))
11579        }
11580    }
11581}
11582
11583/// `ListWorkflowConfigs` request message.
11584#[derive(Clone, Default, PartialEq)]
11585#[non_exhaustive]
11586pub struct ListWorkflowConfigsRequest {
11587    /// Required. The repository in which to list workflow configs. Must be in the
11588    /// format `projects/*/locations/*/repositories/*`.
11589    pub parent: std::string::String,
11590
11591    /// Optional. Maximum number of workflow configs to return. The server may
11592    /// return fewer items than requested. If unspecified, the server will pick an
11593    /// appropriate default.
11594    pub page_size: i32,
11595
11596    /// Optional. Page token received from a previous `ListWorkflowConfigs` call.
11597    /// Provide this to retrieve the subsequent page.
11598    ///
11599    /// When paginating, all other parameters provided to `ListWorkflowConfigs`,
11600    /// with the exception of `page_size`, must match the call that provided the
11601    /// page token.
11602    pub page_token: std::string::String,
11603
11604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11605}
11606
11607impl ListWorkflowConfigsRequest {
11608    /// Creates a new default instance.
11609    pub fn new() -> Self {
11610        std::default::Default::default()
11611    }
11612
11613    /// Sets the value of [parent][crate::model::ListWorkflowConfigsRequest::parent].
11614    ///
11615    /// # Example
11616    /// ```ignore,no_run
11617    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11618    /// let x = ListWorkflowConfigsRequest::new().set_parent("example");
11619    /// ```
11620    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11621        self.parent = v.into();
11622        self
11623    }
11624
11625    /// Sets the value of [page_size][crate::model::ListWorkflowConfigsRequest::page_size].
11626    ///
11627    /// # Example
11628    /// ```ignore,no_run
11629    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11630    /// let x = ListWorkflowConfigsRequest::new().set_page_size(42);
11631    /// ```
11632    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11633        self.page_size = v.into();
11634        self
11635    }
11636
11637    /// Sets the value of [page_token][crate::model::ListWorkflowConfigsRequest::page_token].
11638    ///
11639    /// # Example
11640    /// ```ignore,no_run
11641    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11642    /// let x = ListWorkflowConfigsRequest::new().set_page_token("example");
11643    /// ```
11644    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11645        self.page_token = v.into();
11646        self
11647    }
11648}
11649
11650impl wkt::message::Message for ListWorkflowConfigsRequest {
11651    fn typename() -> &'static str {
11652        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
11653    }
11654}
11655
11656/// `ListWorkflowConfigs` response message.
11657#[derive(Clone, Default, PartialEq)]
11658#[non_exhaustive]
11659pub struct ListWorkflowConfigsResponse {
11660    /// List of workflow configs.
11661    pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
11662
11663    /// A token, which can be sent as `page_token` to retrieve the next page.
11664    /// If this field is omitted, there are no subsequent pages.
11665    pub next_page_token: std::string::String,
11666
11667    /// Locations which could not be reached.
11668    pub unreachable: std::vec::Vec<std::string::String>,
11669
11670    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11671}
11672
11673impl ListWorkflowConfigsResponse {
11674    /// Creates a new default instance.
11675    pub fn new() -> Self {
11676        std::default::Default::default()
11677    }
11678
11679    /// Sets the value of [workflow_configs][crate::model::ListWorkflowConfigsResponse::workflow_configs].
11680    ///
11681    /// # Example
11682    /// ```ignore,no_run
11683    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11684    /// use google_cloud_dataform_v1::model::WorkflowConfig;
11685    /// let x = ListWorkflowConfigsResponse::new()
11686    ///     .set_workflow_configs([
11687    ///         WorkflowConfig::default()/* use setters */,
11688    ///         WorkflowConfig::default()/* use (different) setters */,
11689    ///     ]);
11690    /// ```
11691    pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
11692    where
11693        T: std::iter::IntoIterator<Item = V>,
11694        V: std::convert::Into<crate::model::WorkflowConfig>,
11695    {
11696        use std::iter::Iterator;
11697        self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
11698        self
11699    }
11700
11701    /// Sets the value of [next_page_token][crate::model::ListWorkflowConfigsResponse::next_page_token].
11702    ///
11703    /// # Example
11704    /// ```ignore,no_run
11705    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11706    /// let x = ListWorkflowConfigsResponse::new().set_next_page_token("example");
11707    /// ```
11708    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11709        self.next_page_token = v.into();
11710        self
11711    }
11712
11713    /// Sets the value of [unreachable][crate::model::ListWorkflowConfigsResponse::unreachable].
11714    ///
11715    /// # Example
11716    /// ```ignore,no_run
11717    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11718    /// let x = ListWorkflowConfigsResponse::new().set_unreachable(["a", "b", "c"]);
11719    /// ```
11720    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
11721    where
11722        T: std::iter::IntoIterator<Item = V>,
11723        V: std::convert::Into<std::string::String>,
11724    {
11725        use std::iter::Iterator;
11726        self.unreachable = v.into_iter().map(|i| i.into()).collect();
11727        self
11728    }
11729}
11730
11731impl wkt::message::Message for ListWorkflowConfigsResponse {
11732    fn typename() -> &'static str {
11733        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
11734    }
11735}
11736
11737#[doc(hidden)]
11738impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
11739    type PageItem = crate::model::WorkflowConfig;
11740
11741    fn items(self) -> std::vec::Vec<Self::PageItem> {
11742        self.workflow_configs
11743    }
11744
11745    fn next_page_token(&self) -> std::string::String {
11746        use std::clone::Clone;
11747        self.next_page_token.clone()
11748    }
11749}
11750
11751/// `GetWorkflowConfig` request message.
11752#[derive(Clone, Default, PartialEq)]
11753#[non_exhaustive]
11754pub struct GetWorkflowConfigRequest {
11755    /// Required. The workflow config's name.
11756    pub name: std::string::String,
11757
11758    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11759}
11760
11761impl GetWorkflowConfigRequest {
11762    /// Creates a new default instance.
11763    pub fn new() -> Self {
11764        std::default::Default::default()
11765    }
11766
11767    /// Sets the value of [name][crate::model::GetWorkflowConfigRequest::name].
11768    ///
11769    /// # Example
11770    /// ```ignore,no_run
11771    /// # use google_cloud_dataform_v1::model::GetWorkflowConfigRequest;
11772    /// let x = GetWorkflowConfigRequest::new().set_name("example");
11773    /// ```
11774    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11775        self.name = v.into();
11776        self
11777    }
11778}
11779
11780impl wkt::message::Message for GetWorkflowConfigRequest {
11781    fn typename() -> &'static str {
11782        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
11783    }
11784}
11785
11786/// `CreateWorkflowConfig` request message.
11787#[derive(Clone, Default, PartialEq)]
11788#[non_exhaustive]
11789pub struct CreateWorkflowConfigRequest {
11790    /// Required. The repository in which to create the workflow config. Must be in
11791    /// the format `projects/*/locations/*/repositories/*`.
11792    pub parent: std::string::String,
11793
11794    /// Required. The workflow config to create.
11795    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
11796
11797    /// Required. The ID to use for the workflow config, which will become the
11798    /// final component of the workflow config's resource name.
11799    pub workflow_config_id: std::string::String,
11800
11801    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11802}
11803
11804impl CreateWorkflowConfigRequest {
11805    /// Creates a new default instance.
11806    pub fn new() -> Self {
11807        std::default::Default::default()
11808    }
11809
11810    /// Sets the value of [parent][crate::model::CreateWorkflowConfigRequest::parent].
11811    ///
11812    /// # Example
11813    /// ```ignore,no_run
11814    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
11815    /// let x = CreateWorkflowConfigRequest::new().set_parent("example");
11816    /// ```
11817    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11818        self.parent = v.into();
11819        self
11820    }
11821
11822    /// Sets the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
11823    ///
11824    /// # Example
11825    /// ```ignore,no_run
11826    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
11827    /// use google_cloud_dataform_v1::model::WorkflowConfig;
11828    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
11829    /// ```
11830    pub fn set_workflow_config<T>(mut self, v: T) -> Self
11831    where
11832        T: std::convert::Into<crate::model::WorkflowConfig>,
11833    {
11834        self.workflow_config = std::option::Option::Some(v.into());
11835        self
11836    }
11837
11838    /// Sets or clears the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
11839    ///
11840    /// # Example
11841    /// ```ignore,no_run
11842    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
11843    /// use google_cloud_dataform_v1::model::WorkflowConfig;
11844    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
11845    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
11846    /// ```
11847    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
11848    where
11849        T: std::convert::Into<crate::model::WorkflowConfig>,
11850    {
11851        self.workflow_config = v.map(|x| x.into());
11852        self
11853    }
11854
11855    /// Sets the value of [workflow_config_id][crate::model::CreateWorkflowConfigRequest::workflow_config_id].
11856    ///
11857    /// # Example
11858    /// ```ignore,no_run
11859    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
11860    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config_id("example");
11861    /// ```
11862    pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
11863        mut self,
11864        v: T,
11865    ) -> Self {
11866        self.workflow_config_id = v.into();
11867        self
11868    }
11869}
11870
11871impl wkt::message::Message for CreateWorkflowConfigRequest {
11872    fn typename() -> &'static str {
11873        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
11874    }
11875}
11876
11877/// `UpdateWorkflowConfig` request message.
11878#[derive(Clone, Default, PartialEq)]
11879#[non_exhaustive]
11880pub struct UpdateWorkflowConfigRequest {
11881    /// Optional. Specifies the fields to be updated in the workflow config. If
11882    /// left unset, all fields will be updated.
11883    pub update_mask: std::option::Option<wkt::FieldMask>,
11884
11885    /// Required. The workflow config to update.
11886    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
11887
11888    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11889}
11890
11891impl UpdateWorkflowConfigRequest {
11892    /// Creates a new default instance.
11893    pub fn new() -> Self {
11894        std::default::Default::default()
11895    }
11896
11897    /// Sets the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
11898    ///
11899    /// # Example
11900    /// ```ignore,no_run
11901    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
11902    /// use wkt::FieldMask;
11903    /// let x = UpdateWorkflowConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
11904    /// ```
11905    pub fn set_update_mask<T>(mut self, v: T) -> Self
11906    where
11907        T: std::convert::Into<wkt::FieldMask>,
11908    {
11909        self.update_mask = std::option::Option::Some(v.into());
11910        self
11911    }
11912
11913    /// Sets or clears the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
11914    ///
11915    /// # Example
11916    /// ```ignore,no_run
11917    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
11918    /// use wkt::FieldMask;
11919    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
11920    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
11921    /// ```
11922    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11923    where
11924        T: std::convert::Into<wkt::FieldMask>,
11925    {
11926        self.update_mask = v.map(|x| x.into());
11927        self
11928    }
11929
11930    /// Sets the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
11931    ///
11932    /// # Example
11933    /// ```ignore,no_run
11934    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
11935    /// use google_cloud_dataform_v1::model::WorkflowConfig;
11936    /// let x = UpdateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
11937    /// ```
11938    pub fn set_workflow_config<T>(mut self, v: T) -> Self
11939    where
11940        T: std::convert::Into<crate::model::WorkflowConfig>,
11941    {
11942        self.workflow_config = std::option::Option::Some(v.into());
11943        self
11944    }
11945
11946    /// Sets or clears the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
11947    ///
11948    /// # Example
11949    /// ```ignore,no_run
11950    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
11951    /// use google_cloud_dataform_v1::model::WorkflowConfig;
11952    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
11953    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
11954    /// ```
11955    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
11956    where
11957        T: std::convert::Into<crate::model::WorkflowConfig>,
11958    {
11959        self.workflow_config = v.map(|x| x.into());
11960        self
11961    }
11962}
11963
11964impl wkt::message::Message for UpdateWorkflowConfigRequest {
11965    fn typename() -> &'static str {
11966        "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
11967    }
11968}
11969
11970/// `DeleteWorkflowConfig` request message.
11971#[derive(Clone, Default, PartialEq)]
11972#[non_exhaustive]
11973pub struct DeleteWorkflowConfigRequest {
11974    /// Required. The workflow config's name.
11975    pub name: std::string::String,
11976
11977    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11978}
11979
11980impl DeleteWorkflowConfigRequest {
11981    /// Creates a new default instance.
11982    pub fn new() -> Self {
11983        std::default::Default::default()
11984    }
11985
11986    /// Sets the value of [name][crate::model::DeleteWorkflowConfigRequest::name].
11987    ///
11988    /// # Example
11989    /// ```ignore,no_run
11990    /// # use google_cloud_dataform_v1::model::DeleteWorkflowConfigRequest;
11991    /// let x = DeleteWorkflowConfigRequest::new().set_name("example");
11992    /// ```
11993    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11994        self.name = v.into();
11995        self
11996    }
11997}
11998
11999impl wkt::message::Message for DeleteWorkflowConfigRequest {
12000    fn typename() -> &'static str {
12001        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
12002    }
12003}
12004
12005/// Represents a single invocation of a compilation result.
12006#[derive(Clone, Default, PartialEq)]
12007#[non_exhaustive]
12008pub struct WorkflowInvocation {
12009    /// Output only. The workflow invocation's name.
12010    pub name: std::string::String,
12011
12012    /// Immutable. If left unset, a default InvocationConfig will be used.
12013    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
12014
12015    /// Output only. This workflow invocation's current state.
12016    pub state: crate::model::workflow_invocation::State,
12017
12018    /// Output only. This workflow invocation's timing details.
12019    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
12020
12021    /// Output only. The resolved compilation result that was used to create this
12022    /// invocation. Will be in the format
12023    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
12024    pub resolved_compilation_result: std::string::String,
12025
12026    /// Output only. Only set if the repository has a KMS Key.
12027    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
12028
12029    /// Output only. All the metadata information that is used internally to serve
12030    /// the resource. For example: timestamps, flags, status fields, etc. The
12031    /// format of this field is a JSON string.
12032    pub internal_metadata: std::option::Option<std::string::String>,
12033
12034    /// Output only. Metadata indicating whether this resource is user-scoped.
12035    /// `WorkflowInvocation` resource is `user_scoped` only if it is sourced
12036    /// from a compilation result and the compilation result is user-scoped.
12037    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
12038
12039    /// The source of the compilation result to use for this invocation.
12040    pub compilation_source:
12041        std::option::Option<crate::model::workflow_invocation::CompilationSource>,
12042
12043    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12044}
12045
12046impl WorkflowInvocation {
12047    /// Creates a new default instance.
12048    pub fn new() -> Self {
12049        std::default::Default::default()
12050    }
12051
12052    /// Sets the value of [name][crate::model::WorkflowInvocation::name].
12053    ///
12054    /// # Example
12055    /// ```ignore,no_run
12056    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12057    /// let x = WorkflowInvocation::new().set_name("example");
12058    /// ```
12059    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12060        self.name = v.into();
12061        self
12062    }
12063
12064    /// Sets the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
12065    ///
12066    /// # Example
12067    /// ```ignore,no_run
12068    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12069    /// use google_cloud_dataform_v1::model::InvocationConfig;
12070    /// let x = WorkflowInvocation::new().set_invocation_config(InvocationConfig::default()/* use setters */);
12071    /// ```
12072    pub fn set_invocation_config<T>(mut self, v: T) -> Self
12073    where
12074        T: std::convert::Into<crate::model::InvocationConfig>,
12075    {
12076        self.invocation_config = std::option::Option::Some(v.into());
12077        self
12078    }
12079
12080    /// Sets or clears the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
12081    ///
12082    /// # Example
12083    /// ```ignore,no_run
12084    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12085    /// use google_cloud_dataform_v1::model::InvocationConfig;
12086    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
12087    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(None::<InvocationConfig>);
12088    /// ```
12089    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
12090    where
12091        T: std::convert::Into<crate::model::InvocationConfig>,
12092    {
12093        self.invocation_config = v.map(|x| x.into());
12094        self
12095    }
12096
12097    /// Sets the value of [state][crate::model::WorkflowInvocation::state].
12098    ///
12099    /// # Example
12100    /// ```ignore,no_run
12101    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12102    /// use google_cloud_dataform_v1::model::workflow_invocation::State;
12103    /// let x0 = WorkflowInvocation::new().set_state(State::Running);
12104    /// let x1 = WorkflowInvocation::new().set_state(State::Succeeded);
12105    /// let x2 = WorkflowInvocation::new().set_state(State::Cancelled);
12106    /// ```
12107    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
12108        mut self,
12109        v: T,
12110    ) -> Self {
12111        self.state = v.into();
12112        self
12113    }
12114
12115    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
12116    ///
12117    /// # Example
12118    /// ```ignore,no_run
12119    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12120    /// use google_cloud_type::model::Interval;
12121    /// let x = WorkflowInvocation::new().set_invocation_timing(Interval::default()/* use setters */);
12122    /// ```
12123    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
12124    where
12125        T: std::convert::Into<google_cloud_type::model::Interval>,
12126    {
12127        self.invocation_timing = std::option::Option::Some(v.into());
12128        self
12129    }
12130
12131    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
12132    ///
12133    /// # Example
12134    /// ```ignore,no_run
12135    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12136    /// use google_cloud_type::model::Interval;
12137    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
12138    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(None::<Interval>);
12139    /// ```
12140    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
12141    where
12142        T: std::convert::Into<google_cloud_type::model::Interval>,
12143    {
12144        self.invocation_timing = v.map(|x| x.into());
12145        self
12146    }
12147
12148    /// Sets the value of [resolved_compilation_result][crate::model::WorkflowInvocation::resolved_compilation_result].
12149    ///
12150    /// # Example
12151    /// ```ignore,no_run
12152    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12153    /// let x = WorkflowInvocation::new().set_resolved_compilation_result("example");
12154    /// ```
12155    pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
12156        mut self,
12157        v: T,
12158    ) -> Self {
12159        self.resolved_compilation_result = v.into();
12160        self
12161    }
12162
12163    /// Sets the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
12164    ///
12165    /// # Example
12166    /// ```ignore,no_run
12167    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12168    /// use google_cloud_dataform_v1::model::DataEncryptionState;
12169    /// let x = WorkflowInvocation::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
12170    /// ```
12171    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
12172    where
12173        T: std::convert::Into<crate::model::DataEncryptionState>,
12174    {
12175        self.data_encryption_state = std::option::Option::Some(v.into());
12176        self
12177    }
12178
12179    /// Sets or clears the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
12180    ///
12181    /// # Example
12182    /// ```ignore,no_run
12183    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12184    /// use google_cloud_dataform_v1::model::DataEncryptionState;
12185    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
12186    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
12187    /// ```
12188    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
12189    where
12190        T: std::convert::Into<crate::model::DataEncryptionState>,
12191    {
12192        self.data_encryption_state = v.map(|x| x.into());
12193        self
12194    }
12195
12196    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
12197    ///
12198    /// # Example
12199    /// ```ignore,no_run
12200    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12201    /// let x = WorkflowInvocation::new().set_internal_metadata("example");
12202    /// ```
12203    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
12204    where
12205        T: std::convert::Into<std::string::String>,
12206    {
12207        self.internal_metadata = std::option::Option::Some(v.into());
12208        self
12209    }
12210
12211    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
12212    ///
12213    /// # Example
12214    /// ```ignore,no_run
12215    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12216    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(Some("example"));
12217    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(None::<String>);
12218    /// ```
12219    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12220    where
12221        T: std::convert::Into<std::string::String>,
12222    {
12223        self.internal_metadata = v.map(|x| x.into());
12224        self
12225    }
12226
12227    /// Sets the value of [private_resource_metadata][crate::model::WorkflowInvocation::private_resource_metadata].
12228    ///
12229    /// # Example
12230    /// ```ignore,no_run
12231    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12232    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
12233    /// let x = WorkflowInvocation::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
12234    /// ```
12235    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
12236    where
12237        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
12238    {
12239        self.private_resource_metadata = std::option::Option::Some(v.into());
12240        self
12241    }
12242
12243    /// Sets or clears the value of [private_resource_metadata][crate::model::WorkflowInvocation::private_resource_metadata].
12244    ///
12245    /// # Example
12246    /// ```ignore,no_run
12247    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12248    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
12249    /// let x = WorkflowInvocation::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
12250    /// let x = WorkflowInvocation::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
12251    /// ```
12252    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12253    where
12254        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
12255    {
12256        self.private_resource_metadata = v.map(|x| x.into());
12257        self
12258    }
12259
12260    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source].
12261    ///
12262    /// Note that all the setters affecting `compilation_source` are mutually
12263    /// exclusive.
12264    ///
12265    /// # Example
12266    /// ```ignore,no_run
12267    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12268    /// use google_cloud_dataform_v1::model::workflow_invocation::CompilationSource;
12269    /// let x = WorkflowInvocation::new().set_compilation_source(Some(CompilationSource::CompilationResult("example".to_string())));
12270    /// ```
12271    pub fn set_compilation_source<
12272        T: std::convert::Into<
12273                std::option::Option<crate::model::workflow_invocation::CompilationSource>,
12274            >,
12275    >(
12276        mut self,
12277        v: T,
12278    ) -> Self {
12279        self.compilation_source = v.into();
12280        self
12281    }
12282
12283    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12284    /// if it holds a `CompilationResult`, `None` if the field is not set or
12285    /// holds a different branch.
12286    pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
12287        #[allow(unreachable_patterns)]
12288        self.compilation_source.as_ref().and_then(|v| match v {
12289            crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
12290                std::option::Option::Some(v)
12291            }
12292            _ => std::option::Option::None,
12293        })
12294    }
12295
12296    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12297    /// to hold a `CompilationResult`.
12298    ///
12299    /// Note that all the setters affecting `compilation_source` are
12300    /// mutually exclusive.
12301    ///
12302    /// # Example
12303    /// ```ignore,no_run
12304    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12305    /// let x = WorkflowInvocation::new().set_compilation_result("example");
12306    /// assert!(x.compilation_result().is_some());
12307    /// assert!(x.workflow_config().is_none());
12308    /// ```
12309    pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
12310        mut self,
12311        v: T,
12312    ) -> Self {
12313        self.compilation_source = std::option::Option::Some(
12314            crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
12315        );
12316        self
12317    }
12318
12319    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12320    /// if it holds a `WorkflowConfig`, `None` if the field is not set or
12321    /// holds a different branch.
12322    pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
12323        #[allow(unreachable_patterns)]
12324        self.compilation_source.as_ref().and_then(|v| match v {
12325            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
12326                std::option::Option::Some(v)
12327            }
12328            _ => std::option::Option::None,
12329        })
12330    }
12331
12332    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12333    /// to hold a `WorkflowConfig`.
12334    ///
12335    /// Note that all the setters affecting `compilation_source` are
12336    /// mutually exclusive.
12337    ///
12338    /// # Example
12339    /// ```ignore,no_run
12340    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12341    /// let x = WorkflowInvocation::new().set_workflow_config("example");
12342    /// assert!(x.workflow_config().is_some());
12343    /// assert!(x.compilation_result().is_none());
12344    /// ```
12345    pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12346        self.compilation_source = std::option::Option::Some(
12347            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
12348        );
12349        self
12350    }
12351}
12352
12353impl wkt::message::Message for WorkflowInvocation {
12354    fn typename() -> &'static str {
12355        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
12356    }
12357}
12358
12359/// Defines additional types related to [WorkflowInvocation].
12360pub mod workflow_invocation {
12361    #[allow(unused_imports)]
12362    use super::*;
12363
12364    /// Represents the current state of a workflow invocation.
12365    ///
12366    /// # Working with unknown values
12367    ///
12368    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12369    /// additional enum variants at any time. Adding new variants is not considered
12370    /// a breaking change. Applications should write their code in anticipation of:
12371    ///
12372    /// - New values appearing in future releases of the client library, **and**
12373    /// - New values received dynamically, without application changes.
12374    ///
12375    /// Please consult the [Working with enums] section in the user guide for some
12376    /// guidelines.
12377    ///
12378    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12379    #[derive(Clone, Debug, PartialEq)]
12380    #[non_exhaustive]
12381    pub enum State {
12382        /// Default value. This value is unused.
12383        Unspecified,
12384        /// The workflow invocation is currently running.
12385        Running,
12386        /// The workflow invocation succeeded. A terminal state.
12387        Succeeded,
12388        /// The workflow invocation was cancelled. A terminal state.
12389        Cancelled,
12390        /// The workflow invocation failed. A terminal state.
12391        Failed,
12392        /// The workflow invocation is being cancelled, but some actions are still
12393        /// running.
12394        Canceling,
12395        /// If set, the enum was initialized with an unknown value.
12396        ///
12397        /// Applications can examine the value using [State::value] or
12398        /// [State::name].
12399        UnknownValue(state::UnknownValue),
12400    }
12401
12402    #[doc(hidden)]
12403    pub mod state {
12404        #[allow(unused_imports)]
12405        use super::*;
12406        #[derive(Clone, Debug, PartialEq)]
12407        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12408    }
12409
12410    impl State {
12411        /// Gets the enum value.
12412        ///
12413        /// Returns `None` if the enum contains an unknown value deserialized from
12414        /// the string representation of enums.
12415        pub fn value(&self) -> std::option::Option<i32> {
12416            match self {
12417                Self::Unspecified => std::option::Option::Some(0),
12418                Self::Running => std::option::Option::Some(1),
12419                Self::Succeeded => std::option::Option::Some(2),
12420                Self::Cancelled => std::option::Option::Some(3),
12421                Self::Failed => std::option::Option::Some(4),
12422                Self::Canceling => std::option::Option::Some(5),
12423                Self::UnknownValue(u) => u.0.value(),
12424            }
12425        }
12426
12427        /// Gets the enum value as a string.
12428        ///
12429        /// Returns `None` if the enum contains an unknown value deserialized from
12430        /// the integer representation of enums.
12431        pub fn name(&self) -> std::option::Option<&str> {
12432            match self {
12433                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12434                Self::Running => std::option::Option::Some("RUNNING"),
12435                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12436                Self::Cancelled => std::option::Option::Some("CANCELLED"),
12437                Self::Failed => std::option::Option::Some("FAILED"),
12438                Self::Canceling => std::option::Option::Some("CANCELING"),
12439                Self::UnknownValue(u) => u.0.name(),
12440            }
12441        }
12442    }
12443
12444    impl std::default::Default for State {
12445        fn default() -> Self {
12446            use std::convert::From;
12447            Self::from(0)
12448        }
12449    }
12450
12451    impl std::fmt::Display for State {
12452        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12453            wkt::internal::display_enum(f, self.name(), self.value())
12454        }
12455    }
12456
12457    impl std::convert::From<i32> for State {
12458        fn from(value: i32) -> Self {
12459            match value {
12460                0 => Self::Unspecified,
12461                1 => Self::Running,
12462                2 => Self::Succeeded,
12463                3 => Self::Cancelled,
12464                4 => Self::Failed,
12465                5 => Self::Canceling,
12466                _ => Self::UnknownValue(state::UnknownValue(
12467                    wkt::internal::UnknownEnumValue::Integer(value),
12468                )),
12469            }
12470        }
12471    }
12472
12473    impl std::convert::From<&str> for State {
12474        fn from(value: &str) -> Self {
12475            use std::string::ToString;
12476            match value {
12477                "STATE_UNSPECIFIED" => Self::Unspecified,
12478                "RUNNING" => Self::Running,
12479                "SUCCEEDED" => Self::Succeeded,
12480                "CANCELLED" => Self::Cancelled,
12481                "FAILED" => Self::Failed,
12482                "CANCELING" => Self::Canceling,
12483                _ => Self::UnknownValue(state::UnknownValue(
12484                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12485                )),
12486            }
12487        }
12488    }
12489
12490    impl serde::ser::Serialize for State {
12491        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12492        where
12493            S: serde::Serializer,
12494        {
12495            match self {
12496                Self::Unspecified => serializer.serialize_i32(0),
12497                Self::Running => serializer.serialize_i32(1),
12498                Self::Succeeded => serializer.serialize_i32(2),
12499                Self::Cancelled => serializer.serialize_i32(3),
12500                Self::Failed => serializer.serialize_i32(4),
12501                Self::Canceling => serializer.serialize_i32(5),
12502                Self::UnknownValue(u) => u.0.serialize(serializer),
12503            }
12504        }
12505    }
12506
12507    impl<'de> serde::de::Deserialize<'de> for State {
12508        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12509        where
12510            D: serde::Deserializer<'de>,
12511        {
12512            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12513                ".google.cloud.dataform.v1.WorkflowInvocation.State",
12514            ))
12515        }
12516    }
12517
12518    /// The source of the compilation result to use for this invocation.
12519    #[derive(Clone, Debug, PartialEq)]
12520    #[non_exhaustive]
12521    pub enum CompilationSource {
12522        /// Immutable. The name of the compilation result to use for this invocation.
12523        /// Must be in the format
12524        /// `projects/*/locations/*/repositories/*/compilationResults/*`.
12525        CompilationResult(std::string::String),
12526        /// Immutable. The name of the workflow config to invoke. Must be in the
12527        /// format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
12528        WorkflowConfig(std::string::String),
12529    }
12530}
12531
12532/// `ListWorkflowInvocations` request message.
12533#[derive(Clone, Default, PartialEq)]
12534#[non_exhaustive]
12535pub struct ListWorkflowInvocationsRequest {
12536    /// Required. The parent resource of the WorkflowInvocation type. Must be in
12537    /// the format `projects/*/locations/*/repositories/*`.
12538    pub parent: std::string::String,
12539
12540    /// Optional. Maximum number of workflow invocations to return. The server may
12541    /// return fewer items than requested. If unspecified, the server will pick an
12542    /// appropriate default.
12543    pub page_size: i32,
12544
12545    /// Optional. Page token received from a previous `ListWorkflowInvocations`
12546    /// call. Provide this to retrieve the subsequent page.
12547    ///
12548    /// When paginating, all other parameters provided to
12549    /// `ListWorkflowInvocations`, with the exception of `page_size`, must match
12550    /// the call that provided the page token.
12551    pub page_token: std::string::String,
12552
12553    /// Optional. This field only supports ordering by `name`. If unspecified, the
12554    /// server will choose the ordering. If specified, the default order is
12555    /// ascending for the `name` field.
12556    pub order_by: std::string::String,
12557
12558    /// Optional. Filter for the returned list.
12559    pub filter: std::string::String,
12560
12561    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12562}
12563
12564impl ListWorkflowInvocationsRequest {
12565    /// Creates a new default instance.
12566    pub fn new() -> Self {
12567        std::default::Default::default()
12568    }
12569
12570    /// Sets the value of [parent][crate::model::ListWorkflowInvocationsRequest::parent].
12571    ///
12572    /// # Example
12573    /// ```ignore,no_run
12574    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12575    /// let x = ListWorkflowInvocationsRequest::new().set_parent("example");
12576    /// ```
12577    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12578        self.parent = v.into();
12579        self
12580    }
12581
12582    /// Sets the value of [page_size][crate::model::ListWorkflowInvocationsRequest::page_size].
12583    ///
12584    /// # Example
12585    /// ```ignore,no_run
12586    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12587    /// let x = ListWorkflowInvocationsRequest::new().set_page_size(42);
12588    /// ```
12589    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12590        self.page_size = v.into();
12591        self
12592    }
12593
12594    /// Sets the value of [page_token][crate::model::ListWorkflowInvocationsRequest::page_token].
12595    ///
12596    /// # Example
12597    /// ```ignore,no_run
12598    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12599    /// let x = ListWorkflowInvocationsRequest::new().set_page_token("example");
12600    /// ```
12601    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12602        self.page_token = v.into();
12603        self
12604    }
12605
12606    /// Sets the value of [order_by][crate::model::ListWorkflowInvocationsRequest::order_by].
12607    ///
12608    /// # Example
12609    /// ```ignore,no_run
12610    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12611    /// let x = ListWorkflowInvocationsRequest::new().set_order_by("example");
12612    /// ```
12613    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12614        self.order_by = v.into();
12615        self
12616    }
12617
12618    /// Sets the value of [filter][crate::model::ListWorkflowInvocationsRequest::filter].
12619    ///
12620    /// # Example
12621    /// ```ignore,no_run
12622    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12623    /// let x = ListWorkflowInvocationsRequest::new().set_filter("example");
12624    /// ```
12625    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12626        self.filter = v.into();
12627        self
12628    }
12629}
12630
12631impl wkt::message::Message for ListWorkflowInvocationsRequest {
12632    fn typename() -> &'static str {
12633        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
12634    }
12635}
12636
12637/// `ListWorkflowInvocations` response message.
12638#[derive(Clone, Default, PartialEq)]
12639#[non_exhaustive]
12640pub struct ListWorkflowInvocationsResponse {
12641    /// List of workflow invocations.
12642    pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
12643
12644    /// A token, which can be sent as `page_token` to retrieve the next page.
12645    /// If this field is omitted, there are no subsequent pages.
12646    pub next_page_token: std::string::String,
12647
12648    /// Locations which could not be reached.
12649    pub unreachable: std::vec::Vec<std::string::String>,
12650
12651    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12652}
12653
12654impl ListWorkflowInvocationsResponse {
12655    /// Creates a new default instance.
12656    pub fn new() -> Self {
12657        std::default::Default::default()
12658    }
12659
12660    /// Sets the value of [workflow_invocations][crate::model::ListWorkflowInvocationsResponse::workflow_invocations].
12661    ///
12662    /// # Example
12663    /// ```ignore,no_run
12664    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12665    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
12666    /// let x = ListWorkflowInvocationsResponse::new()
12667    ///     .set_workflow_invocations([
12668    ///         WorkflowInvocation::default()/* use setters */,
12669    ///         WorkflowInvocation::default()/* use (different) setters */,
12670    ///     ]);
12671    /// ```
12672    pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
12673    where
12674        T: std::iter::IntoIterator<Item = V>,
12675        V: std::convert::Into<crate::model::WorkflowInvocation>,
12676    {
12677        use std::iter::Iterator;
12678        self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
12679        self
12680    }
12681
12682    /// Sets the value of [next_page_token][crate::model::ListWorkflowInvocationsResponse::next_page_token].
12683    ///
12684    /// # Example
12685    /// ```ignore,no_run
12686    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12687    /// let x = ListWorkflowInvocationsResponse::new().set_next_page_token("example");
12688    /// ```
12689    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12690        self.next_page_token = v.into();
12691        self
12692    }
12693
12694    /// Sets the value of [unreachable][crate::model::ListWorkflowInvocationsResponse::unreachable].
12695    ///
12696    /// # Example
12697    /// ```ignore,no_run
12698    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12699    /// let x = ListWorkflowInvocationsResponse::new().set_unreachable(["a", "b", "c"]);
12700    /// ```
12701    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
12702    where
12703        T: std::iter::IntoIterator<Item = V>,
12704        V: std::convert::Into<std::string::String>,
12705    {
12706        use std::iter::Iterator;
12707        self.unreachable = v.into_iter().map(|i| i.into()).collect();
12708        self
12709    }
12710}
12711
12712impl wkt::message::Message for ListWorkflowInvocationsResponse {
12713    fn typename() -> &'static str {
12714        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
12715    }
12716}
12717
12718#[doc(hidden)]
12719impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
12720    type PageItem = crate::model::WorkflowInvocation;
12721
12722    fn items(self) -> std::vec::Vec<Self::PageItem> {
12723        self.workflow_invocations
12724    }
12725
12726    fn next_page_token(&self) -> std::string::String {
12727        use std::clone::Clone;
12728        self.next_page_token.clone()
12729    }
12730}
12731
12732/// `GetWorkflowInvocation` request message.
12733#[derive(Clone, Default, PartialEq)]
12734#[non_exhaustive]
12735pub struct GetWorkflowInvocationRequest {
12736    /// Required. The workflow invocation resource's name.
12737    pub name: std::string::String,
12738
12739    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12740}
12741
12742impl GetWorkflowInvocationRequest {
12743    /// Creates a new default instance.
12744    pub fn new() -> Self {
12745        std::default::Default::default()
12746    }
12747
12748    /// Sets the value of [name][crate::model::GetWorkflowInvocationRequest::name].
12749    ///
12750    /// # Example
12751    /// ```ignore,no_run
12752    /// # use google_cloud_dataform_v1::model::GetWorkflowInvocationRequest;
12753    /// let x = GetWorkflowInvocationRequest::new().set_name("example");
12754    /// ```
12755    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12756        self.name = v.into();
12757        self
12758    }
12759}
12760
12761impl wkt::message::Message for GetWorkflowInvocationRequest {
12762    fn typename() -> &'static str {
12763        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
12764    }
12765}
12766
12767/// `CreateWorkflowInvocation` request message.
12768#[derive(Clone, Default, PartialEq)]
12769#[non_exhaustive]
12770pub struct CreateWorkflowInvocationRequest {
12771    /// Required. The repository in which to create the workflow invocation. Must
12772    /// be in the format `projects/*/locations/*/repositories/*`.
12773    pub parent: std::string::String,
12774
12775    /// Required. The workflow invocation resource to create.
12776    pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
12777
12778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12779}
12780
12781impl CreateWorkflowInvocationRequest {
12782    /// Creates a new default instance.
12783    pub fn new() -> Self {
12784        std::default::Default::default()
12785    }
12786
12787    /// Sets the value of [parent][crate::model::CreateWorkflowInvocationRequest::parent].
12788    ///
12789    /// # Example
12790    /// ```ignore,no_run
12791    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
12792    /// let x = CreateWorkflowInvocationRequest::new().set_parent("example");
12793    /// ```
12794    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12795        self.parent = v.into();
12796        self
12797    }
12798
12799    /// Sets the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
12800    ///
12801    /// # Example
12802    /// ```ignore,no_run
12803    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
12804    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
12805    /// let x = CreateWorkflowInvocationRequest::new().set_workflow_invocation(WorkflowInvocation::default()/* use setters */);
12806    /// ```
12807    pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
12808    where
12809        T: std::convert::Into<crate::model::WorkflowInvocation>,
12810    {
12811        self.workflow_invocation = std::option::Option::Some(v.into());
12812        self
12813    }
12814
12815    /// Sets or clears the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
12816    ///
12817    /// # Example
12818    /// ```ignore,no_run
12819    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
12820    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
12821    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(Some(WorkflowInvocation::default()/* use setters */));
12822    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(None::<WorkflowInvocation>);
12823    /// ```
12824    pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
12825    where
12826        T: std::convert::Into<crate::model::WorkflowInvocation>,
12827    {
12828        self.workflow_invocation = v.map(|x| x.into());
12829        self
12830    }
12831}
12832
12833impl wkt::message::Message for CreateWorkflowInvocationRequest {
12834    fn typename() -> &'static str {
12835        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
12836    }
12837}
12838
12839/// `DeleteWorkflowInvocation` request message.
12840#[derive(Clone, Default, PartialEq)]
12841#[non_exhaustive]
12842pub struct DeleteWorkflowInvocationRequest {
12843    /// Required. The workflow invocation resource's name.
12844    pub name: std::string::String,
12845
12846    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12847}
12848
12849impl DeleteWorkflowInvocationRequest {
12850    /// Creates a new default instance.
12851    pub fn new() -> Self {
12852        std::default::Default::default()
12853    }
12854
12855    /// Sets the value of [name][crate::model::DeleteWorkflowInvocationRequest::name].
12856    ///
12857    /// # Example
12858    /// ```ignore,no_run
12859    /// # use google_cloud_dataform_v1::model::DeleteWorkflowInvocationRequest;
12860    /// let x = DeleteWorkflowInvocationRequest::new().set_name("example");
12861    /// ```
12862    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12863        self.name = v.into();
12864        self
12865    }
12866}
12867
12868impl wkt::message::Message for DeleteWorkflowInvocationRequest {
12869    fn typename() -> &'static str {
12870        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
12871    }
12872}
12873
12874/// `CancelWorkflowInvocation` request message.
12875#[derive(Clone, Default, PartialEq)]
12876#[non_exhaustive]
12877pub struct CancelWorkflowInvocationRequest {
12878    /// Required. The workflow invocation resource's name.
12879    pub name: std::string::String,
12880
12881    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12882}
12883
12884impl CancelWorkflowInvocationRequest {
12885    /// Creates a new default instance.
12886    pub fn new() -> Self {
12887        std::default::Default::default()
12888    }
12889
12890    /// Sets the value of [name][crate::model::CancelWorkflowInvocationRequest::name].
12891    ///
12892    /// # Example
12893    /// ```ignore,no_run
12894    /// # use google_cloud_dataform_v1::model::CancelWorkflowInvocationRequest;
12895    /// let x = CancelWorkflowInvocationRequest::new().set_name("example");
12896    /// ```
12897    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12898        self.name = v.into();
12899        self
12900    }
12901}
12902
12903impl wkt::message::Message for CancelWorkflowInvocationRequest {
12904    fn typename() -> &'static str {
12905        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
12906    }
12907}
12908
12909/// `CancelWorkflowInvocation` response message.
12910#[derive(Clone, Default, PartialEq)]
12911#[non_exhaustive]
12912pub struct CancelWorkflowInvocationResponse {
12913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12914}
12915
12916impl CancelWorkflowInvocationResponse {
12917    /// Creates a new default instance.
12918    pub fn new() -> Self {
12919        std::default::Default::default()
12920    }
12921}
12922
12923impl wkt::message::Message for CancelWorkflowInvocationResponse {
12924    fn typename() -> &'static str {
12925        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
12926    }
12927}
12928
12929/// Represents a single action in a workflow invocation.
12930#[derive(Clone, Default, PartialEq)]
12931#[non_exhaustive]
12932pub struct WorkflowInvocationAction {
12933    /// Output only. This action's identifier. Unique within the workflow
12934    /// invocation.
12935    pub target: std::option::Option<crate::model::Target>,
12936
12937    /// Output only. The action's identifier if the project had been compiled
12938    /// without any overrides configured. Unique within the compilation result.
12939    pub canonical_target: std::option::Option<crate::model::Target>,
12940
12941    /// Output only. This action's current state.
12942    pub state: crate::model::workflow_invocation_action::State,
12943
12944    /// Output only. If and only if action's state is FAILED a failure reason is
12945    /// set.
12946    pub failure_reason: std::string::String,
12947
12948    /// Output only. This action's timing details.
12949    /// `start_time` will be set if the action is in [RUNNING, SUCCEEDED,
12950    /// CANCELLED, FAILED] state.
12951    /// `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED]
12952    /// state.
12953    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
12954
12955    /// Output only. All the metadata information that is used internally to serve
12956    /// the resource. For example: timestamps, flags, status fields, etc. The
12957    /// format of this field is a JSON string.
12958    pub internal_metadata: std::option::Option<std::string::String>,
12959
12960    /// The action's details.
12961    pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
12962
12963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12964}
12965
12966impl WorkflowInvocationAction {
12967    /// Creates a new default instance.
12968    pub fn new() -> Self {
12969        std::default::Default::default()
12970    }
12971
12972    /// Sets the value of [target][crate::model::WorkflowInvocationAction::target].
12973    ///
12974    /// # Example
12975    /// ```ignore,no_run
12976    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12977    /// use google_cloud_dataform_v1::model::Target;
12978    /// let x = WorkflowInvocationAction::new().set_target(Target::default()/* use setters */);
12979    /// ```
12980    pub fn set_target<T>(mut self, v: T) -> Self
12981    where
12982        T: std::convert::Into<crate::model::Target>,
12983    {
12984        self.target = std::option::Option::Some(v.into());
12985        self
12986    }
12987
12988    /// Sets or clears the value of [target][crate::model::WorkflowInvocationAction::target].
12989    ///
12990    /// # Example
12991    /// ```ignore,no_run
12992    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
12993    /// use google_cloud_dataform_v1::model::Target;
12994    /// let x = WorkflowInvocationAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
12995    /// let x = WorkflowInvocationAction::new().set_or_clear_target(None::<Target>);
12996    /// ```
12997    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
12998    where
12999        T: std::convert::Into<crate::model::Target>,
13000    {
13001        self.target = v.map(|x| x.into());
13002        self
13003    }
13004
13005    /// Sets the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
13006    ///
13007    /// # Example
13008    /// ```ignore,no_run
13009    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13010    /// use google_cloud_dataform_v1::model::Target;
13011    /// let x = WorkflowInvocationAction::new().set_canonical_target(Target::default()/* use setters */);
13012    /// ```
13013    pub fn set_canonical_target<T>(mut self, v: T) -> Self
13014    where
13015        T: std::convert::Into<crate::model::Target>,
13016    {
13017        self.canonical_target = std::option::Option::Some(v.into());
13018        self
13019    }
13020
13021    /// Sets or clears the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
13022    ///
13023    /// # Example
13024    /// ```ignore,no_run
13025    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13026    /// use google_cloud_dataform_v1::model::Target;
13027    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
13028    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(None::<Target>);
13029    /// ```
13030    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
13031    where
13032        T: std::convert::Into<crate::model::Target>,
13033    {
13034        self.canonical_target = v.map(|x| x.into());
13035        self
13036    }
13037
13038    /// Sets the value of [state][crate::model::WorkflowInvocationAction::state].
13039    ///
13040    /// # Example
13041    /// ```ignore,no_run
13042    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13043    /// use google_cloud_dataform_v1::model::workflow_invocation_action::State;
13044    /// let x0 = WorkflowInvocationAction::new().set_state(State::Running);
13045    /// let x1 = WorkflowInvocationAction::new().set_state(State::Skipped);
13046    /// let x2 = WorkflowInvocationAction::new().set_state(State::Disabled);
13047    /// ```
13048    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
13049        mut self,
13050        v: T,
13051    ) -> Self {
13052        self.state = v.into();
13053        self
13054    }
13055
13056    /// Sets the value of [failure_reason][crate::model::WorkflowInvocationAction::failure_reason].
13057    ///
13058    /// # Example
13059    /// ```ignore,no_run
13060    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13061    /// let x = WorkflowInvocationAction::new().set_failure_reason("example");
13062    /// ```
13063    pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13064        self.failure_reason = v.into();
13065        self
13066    }
13067
13068    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
13069    ///
13070    /// # Example
13071    /// ```ignore,no_run
13072    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13073    /// use google_cloud_type::model::Interval;
13074    /// let x = WorkflowInvocationAction::new().set_invocation_timing(Interval::default()/* use setters */);
13075    /// ```
13076    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
13077    where
13078        T: std::convert::Into<google_cloud_type::model::Interval>,
13079    {
13080        self.invocation_timing = std::option::Option::Some(v.into());
13081        self
13082    }
13083
13084    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
13085    ///
13086    /// # Example
13087    /// ```ignore,no_run
13088    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13089    /// use google_cloud_type::model::Interval;
13090    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
13091    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(None::<Interval>);
13092    /// ```
13093    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
13094    where
13095        T: std::convert::Into<google_cloud_type::model::Interval>,
13096    {
13097        self.invocation_timing = v.map(|x| x.into());
13098        self
13099    }
13100
13101    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
13102    ///
13103    /// # Example
13104    /// ```ignore,no_run
13105    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13106    /// let x = WorkflowInvocationAction::new().set_internal_metadata("example");
13107    /// ```
13108    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
13109    where
13110        T: std::convert::Into<std::string::String>,
13111    {
13112        self.internal_metadata = std::option::Option::Some(v.into());
13113        self
13114    }
13115
13116    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
13117    ///
13118    /// # Example
13119    /// ```ignore,no_run
13120    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13121    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(Some("example"));
13122    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(None::<String>);
13123    /// ```
13124    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13125    where
13126        T: std::convert::Into<std::string::String>,
13127    {
13128        self.internal_metadata = v.map(|x| x.into());
13129        self
13130    }
13131
13132    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action].
13133    ///
13134    /// Note that all the setters affecting `action` are mutually
13135    /// exclusive.
13136    ///
13137    /// # Example
13138    /// ```ignore,no_run
13139    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13140    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13141    /// let x = WorkflowInvocationAction::new().set_action(Some(
13142    ///     google_cloud_dataform_v1::model::workflow_invocation_action::Action::BigqueryAction(BigQueryAction::default().into())));
13143    /// ```
13144    pub fn set_action<
13145        T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
13146    >(
13147        mut self,
13148        v: T,
13149    ) -> Self {
13150        self.action = v.into();
13151        self
13152    }
13153
13154    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13155    /// if it holds a `BigqueryAction`, `None` if the field is not set or
13156    /// holds a different branch.
13157    pub fn bigquery_action(
13158        &self,
13159    ) -> std::option::Option<
13160        &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
13161    > {
13162        #[allow(unreachable_patterns)]
13163        self.action.as_ref().and_then(|v| match v {
13164            crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
13165                std::option::Option::Some(v)
13166            }
13167            _ => std::option::Option::None,
13168        })
13169    }
13170
13171    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13172    /// to hold a `BigqueryAction`.
13173    ///
13174    /// Note that all the setters affecting `action` are
13175    /// mutually exclusive.
13176    ///
13177    /// # Example
13178    /// ```ignore,no_run
13179    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13180    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13181    /// let x = WorkflowInvocationAction::new().set_bigquery_action(BigQueryAction::default()/* use setters */);
13182    /// assert!(x.bigquery_action().is_some());
13183    /// assert!(x.notebook_action().is_none());
13184    /// assert!(x.data_preparation_action().is_none());
13185    /// ```
13186    pub fn set_bigquery_action<
13187        T: std::convert::Into<
13188                std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
13189            >,
13190    >(
13191        mut self,
13192        v: T,
13193    ) -> Self {
13194        self.action = std::option::Option::Some(
13195            crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
13196        );
13197        self
13198    }
13199
13200    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13201    /// if it holds a `NotebookAction`, `None` if the field is not set or
13202    /// holds a different branch.
13203    pub fn notebook_action(
13204        &self,
13205    ) -> std::option::Option<
13206        &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
13207    > {
13208        #[allow(unreachable_patterns)]
13209        self.action.as_ref().and_then(|v| match v {
13210            crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
13211                std::option::Option::Some(v)
13212            }
13213            _ => std::option::Option::None,
13214        })
13215    }
13216
13217    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13218    /// to hold a `NotebookAction`.
13219    ///
13220    /// Note that all the setters affecting `action` are
13221    /// mutually exclusive.
13222    ///
13223    /// # Example
13224    /// ```ignore,no_run
13225    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13226    /// use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13227    /// let x = WorkflowInvocationAction::new().set_notebook_action(NotebookAction::default()/* use setters */);
13228    /// assert!(x.notebook_action().is_some());
13229    /// assert!(x.bigquery_action().is_none());
13230    /// assert!(x.data_preparation_action().is_none());
13231    /// ```
13232    pub fn set_notebook_action<
13233        T: std::convert::Into<
13234                std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
13235            >,
13236    >(
13237        mut self,
13238        v: T,
13239    ) -> Self {
13240        self.action = std::option::Option::Some(
13241            crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
13242        );
13243        self
13244    }
13245
13246    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13247    /// if it holds a `DataPreparationAction`, `None` if the field is not set or
13248    /// holds a different branch.
13249    pub fn data_preparation_action(
13250        &self,
13251    ) -> std::option::Option<
13252        &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13253    > {
13254        #[allow(unreachable_patterns)]
13255        self.action.as_ref().and_then(|v| match v {
13256            crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
13257                std::option::Option::Some(v)
13258            }
13259            _ => std::option::Option::None,
13260        })
13261    }
13262
13263    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13264    /// to hold a `DataPreparationAction`.
13265    ///
13266    /// Note that all the setters affecting `action` are
13267    /// mutually exclusive.
13268    ///
13269    /// # Example
13270    /// ```ignore,no_run
13271    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13272    /// use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13273    /// let x = WorkflowInvocationAction::new().set_data_preparation_action(DataPreparationAction::default()/* use setters */);
13274    /// assert!(x.data_preparation_action().is_some());
13275    /// assert!(x.bigquery_action().is_none());
13276    /// assert!(x.notebook_action().is_none());
13277    /// ```
13278    pub fn set_data_preparation_action<
13279        T: std::convert::Into<
13280                std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13281            >,
13282    >(
13283        mut self,
13284        v: T,
13285    ) -> Self {
13286        self.action = std::option::Option::Some(
13287            crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
13288        );
13289        self
13290    }
13291}
13292
13293impl wkt::message::Message for WorkflowInvocationAction {
13294    fn typename() -> &'static str {
13295        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
13296    }
13297}
13298
13299/// Defines additional types related to [WorkflowInvocationAction].
13300pub mod workflow_invocation_action {
13301    #[allow(unused_imports)]
13302    use super::*;
13303
13304    /// Represents a workflow action that will run against BigQuery.
13305    #[derive(Clone, Default, PartialEq)]
13306    #[non_exhaustive]
13307    pub struct BigQueryAction {
13308        /// Output only. The generated BigQuery SQL script that will be executed.
13309        pub sql_script: std::string::String,
13310
13311        /// Output only. The ID of the BigQuery job that executed the SQL in
13312        /// sql_script. Only set once the job has started to run.
13313        pub job_id: std::string::String,
13314
13315        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13316    }
13317
13318    impl BigQueryAction {
13319        /// Creates a new default instance.
13320        pub fn new() -> Self {
13321            std::default::Default::default()
13322        }
13323
13324        /// Sets the value of [sql_script][crate::model::workflow_invocation_action::BigQueryAction::sql_script].
13325        ///
13326        /// # Example
13327        /// ```ignore,no_run
13328        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13329        /// let x = BigQueryAction::new().set_sql_script("example");
13330        /// ```
13331        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13332            self.sql_script = v.into();
13333            self
13334        }
13335
13336        /// Sets the value of [job_id][crate::model::workflow_invocation_action::BigQueryAction::job_id].
13337        ///
13338        /// # Example
13339        /// ```ignore,no_run
13340        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13341        /// let x = BigQueryAction::new().set_job_id("example");
13342        /// ```
13343        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13344            self.job_id = v.into();
13345            self
13346        }
13347    }
13348
13349    impl wkt::message::Message for BigQueryAction {
13350        fn typename() -> &'static str {
13351            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
13352        }
13353    }
13354
13355    /// Represents a workflow action that will run against a Notebook runtime.
13356    #[derive(Clone, Default, PartialEq)]
13357    #[non_exhaustive]
13358    pub struct NotebookAction {
13359        /// Output only. The code contents of a Notebook to be run.
13360        pub contents: std::string::String,
13361
13362        /// Output only. The ID of the Vertex job that executed the notebook in
13363        /// contents and also the ID used for the outputs created in Google Cloud
13364        /// Storage buckets. Only set once the job has started to run.
13365        pub job_id: std::string::String,
13366
13367        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13368    }
13369
13370    impl NotebookAction {
13371        /// Creates a new default instance.
13372        pub fn new() -> Self {
13373            std::default::Default::default()
13374        }
13375
13376        /// Sets the value of [contents][crate::model::workflow_invocation_action::NotebookAction::contents].
13377        ///
13378        /// # Example
13379        /// ```ignore,no_run
13380        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13381        /// let x = NotebookAction::new().set_contents("example");
13382        /// ```
13383        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13384            self.contents = v.into();
13385            self
13386        }
13387
13388        /// Sets the value of [job_id][crate::model::workflow_invocation_action::NotebookAction::job_id].
13389        ///
13390        /// # Example
13391        /// ```ignore,no_run
13392        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13393        /// let x = NotebookAction::new().set_job_id("example");
13394        /// ```
13395        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13396            self.job_id = v.into();
13397            self
13398        }
13399    }
13400
13401    impl wkt::message::Message for NotebookAction {
13402        fn typename() -> &'static str {
13403            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
13404        }
13405    }
13406
13407    /// Represents a workflow action that will run a Data Preparation.
13408    #[derive(Clone, Default, PartialEq)]
13409    #[non_exhaustive]
13410    pub struct DataPreparationAction {
13411        /// Output only. The generated BigQuery SQL script that will be executed. For
13412        /// reference only.
13413        pub generated_sql: std::string::String,
13414
13415        /// Output only. The ID of the BigQuery job that executed the SQL in
13416        /// sql_script. Only set once the job has started to run.
13417        pub job_id: std::string::String,
13418
13419        /// The definition for the data preparation.
13420        pub definition: std::option::Option<
13421            crate::model::workflow_invocation_action::data_preparation_action::Definition,
13422        >,
13423
13424        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13425    }
13426
13427    impl DataPreparationAction {
13428        /// Creates a new default instance.
13429        pub fn new() -> Self {
13430            std::default::Default::default()
13431        }
13432
13433        /// Sets the value of [generated_sql][crate::model::workflow_invocation_action::DataPreparationAction::generated_sql].
13434        ///
13435        /// # Example
13436        /// ```ignore,no_run
13437        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13438        /// let x = DataPreparationAction::new().set_generated_sql("example");
13439        /// ```
13440        pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
13441            mut self,
13442            v: T,
13443        ) -> Self {
13444            self.generated_sql = v.into();
13445            self
13446        }
13447
13448        /// Sets the value of [job_id][crate::model::workflow_invocation_action::DataPreparationAction::job_id].
13449        ///
13450        /// # Example
13451        /// ```ignore,no_run
13452        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13453        /// let x = DataPreparationAction::new().set_job_id("example");
13454        /// ```
13455        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13456            self.job_id = v.into();
13457            self
13458        }
13459
13460        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition].
13461        ///
13462        /// Note that all the setters affecting `definition` are mutually
13463        /// exclusive.
13464        ///
13465        /// # Example
13466        /// ```ignore,no_run
13467        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13468        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::Definition;
13469        /// let x = DataPreparationAction::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
13470        /// ```
13471        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
13472        {
13473            self.definition = v.into();
13474            self
13475        }
13476
13477        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13478        /// if it holds a `ContentsYaml`, `None` if the field is not set or
13479        /// holds a different branch.
13480        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
13481            #[allow(unreachable_patterns)]
13482            self.definition.as_ref().and_then(|v| match v {
13483                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
13484                _ => std::option::Option::None,
13485            })
13486        }
13487
13488        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13489        /// to hold a `ContentsYaml`.
13490        ///
13491        /// Note that all the setters affecting `definition` are
13492        /// mutually exclusive.
13493        ///
13494        /// # Example
13495        /// ```ignore,no_run
13496        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13497        /// let x = DataPreparationAction::new().set_contents_yaml("example");
13498        /// assert!(x.contents_yaml().is_some());
13499        /// assert!(x.contents_sql().is_none());
13500        /// ```
13501        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
13502            mut self,
13503            v: T,
13504        ) -> Self {
13505            self.definition = std::option::Option::Some(
13506                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
13507                    v.into()
13508                )
13509            );
13510            self
13511        }
13512
13513        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13514        /// if it holds a `ContentsSql`, `None` if the field is not set or
13515        /// holds a different branch.
13516        pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
13517            #[allow(unreachable_patterns)]
13518            self.definition.as_ref().and_then(|v| match v {
13519                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
13520                _ => std::option::Option::None,
13521            })
13522        }
13523
13524        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13525        /// to hold a `ContentsSql`.
13526        ///
13527        /// Note that all the setters affecting `definition` are
13528        /// mutually exclusive.
13529        ///
13530        /// # Example
13531        /// ```ignore,no_run
13532        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13533        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13534        /// let x = DataPreparationAction::new().set_contents_sql(ActionSqlDefinition::default()/* use setters */);
13535        /// assert!(x.contents_sql().is_some());
13536        /// assert!(x.contents_yaml().is_none());
13537        /// ```
13538        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{
13539            self.definition = std::option::Option::Some(
13540                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
13541                    v.into()
13542                )
13543            );
13544            self
13545        }
13546    }
13547
13548    impl wkt::message::Message for DataPreparationAction {
13549        fn typename() -> &'static str {
13550            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
13551        }
13552    }
13553
13554    /// Defines additional types related to [DataPreparationAction].
13555    pub mod data_preparation_action {
13556        #[allow(unused_imports)]
13557        use super::*;
13558
13559        /// Definition of a SQL Data Preparation
13560        #[derive(Clone, Default, PartialEq)]
13561        #[non_exhaustive]
13562        pub struct ActionSqlDefinition {
13563            /// The SQL query representing the data preparation steps. Formatted as a
13564            /// Pipe SQL query statement.
13565            pub query: std::string::String,
13566
13567            /// Error table configuration,
13568            pub error_table: std::option::Option<
13569                crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
13570            >,
13571
13572            /// Load configuration.
13573            pub load_config: std::option::Option<
13574                crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
13575            >,
13576
13577            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13578        }
13579
13580        impl ActionSqlDefinition {
13581            /// Creates a new default instance.
13582            pub fn new() -> Self {
13583                std::default::Default::default()
13584            }
13585
13586            /// Sets the value of [query][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::query].
13587            ///
13588            /// # Example
13589            /// ```ignore,no_run
13590            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13591            /// let x = ActionSqlDefinition::new().set_query("example");
13592            /// ```
13593            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13594                self.query = v.into();
13595                self
13596            }
13597
13598            /// Sets the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
13599            ///
13600            /// # Example
13601            /// ```ignore,no_run
13602            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13603            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13604            /// let x = ActionSqlDefinition::new().set_error_table(ActionErrorTable::default()/* use setters */);
13605            /// ```
13606            pub fn set_error_table<T>(mut self, v: T) -> Self
13607            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
13608            {
13609                self.error_table = std::option::Option::Some(v.into());
13610                self
13611            }
13612
13613            /// Sets or clears the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
13614            ///
13615            /// # Example
13616            /// ```ignore,no_run
13617            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13618            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13619            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(Some(ActionErrorTable::default()/* use setters */));
13620            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(None::<ActionErrorTable>);
13621            /// ```
13622            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
13623            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
13624            {
13625                self.error_table = v.map(|x| x.into());
13626                self
13627            }
13628
13629            /// Sets the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
13630            ///
13631            /// # Example
13632            /// ```ignore,no_run
13633            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13634            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13635            /// let x = ActionSqlDefinition::new().set_load_config(ActionLoadConfig::default()/* use setters */);
13636            /// ```
13637            pub fn set_load_config<T>(mut self, v: T) -> Self
13638            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
13639            {
13640                self.load_config = std::option::Option::Some(v.into());
13641                self
13642            }
13643
13644            /// Sets or clears the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
13645            ///
13646            /// # Example
13647            /// ```ignore,no_run
13648            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13649            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13650            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(Some(ActionLoadConfig::default()/* use setters */));
13651            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(None::<ActionLoadConfig>);
13652            /// ```
13653            pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
13654            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
13655            {
13656                self.load_config = v.map(|x| x.into());
13657                self
13658            }
13659        }
13660
13661        impl wkt::message::Message for ActionSqlDefinition {
13662            fn typename() -> &'static str {
13663                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
13664            }
13665        }
13666
13667        /// Error table information, used to write error data into a BigQuery
13668        /// table.
13669        #[derive(Clone, Default, PartialEq)]
13670        #[non_exhaustive]
13671        pub struct ActionErrorTable {
13672            /// Error Table target.
13673            pub target: std::option::Option<crate::model::Target>,
13674
13675            /// Error table partition expiration in days. Only positive values are
13676            /// allowed.
13677            pub retention_days: i32,
13678
13679            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13680        }
13681
13682        impl ActionErrorTable {
13683            /// Creates a new default instance.
13684            pub fn new() -> Self {
13685                std::default::Default::default()
13686            }
13687
13688            /// Sets the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
13689            ///
13690            /// # Example
13691            /// ```ignore,no_run
13692            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13693            /// use google_cloud_dataform_v1::model::Target;
13694            /// let x = ActionErrorTable::new().set_target(Target::default()/* use setters */);
13695            /// ```
13696            pub fn set_target<T>(mut self, v: T) -> Self
13697            where
13698                T: std::convert::Into<crate::model::Target>,
13699            {
13700                self.target = std::option::Option::Some(v.into());
13701                self
13702            }
13703
13704            /// Sets or clears the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
13705            ///
13706            /// # Example
13707            /// ```ignore,no_run
13708            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13709            /// use google_cloud_dataform_v1::model::Target;
13710            /// let x = ActionErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
13711            /// let x = ActionErrorTable::new().set_or_clear_target(None::<Target>);
13712            /// ```
13713            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
13714            where
13715                T: std::convert::Into<crate::model::Target>,
13716            {
13717                self.target = v.map(|x| x.into());
13718                self
13719            }
13720
13721            /// Sets the value of [retention_days][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::retention_days].
13722            ///
13723            /// # Example
13724            /// ```ignore,no_run
13725            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13726            /// let x = ActionErrorTable::new().set_retention_days(42);
13727            /// ```
13728            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13729                self.retention_days = v.into();
13730                self
13731            }
13732        }
13733
13734        impl wkt::message::Message for ActionErrorTable {
13735            fn typename() -> &'static str {
13736                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
13737            }
13738        }
13739
13740        /// Simplified load configuration for actions
13741        #[derive(Clone, Default, PartialEq)]
13742        #[non_exhaustive]
13743        pub struct ActionLoadConfig {
13744
13745            /// Load mode
13746            pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
13747
13748            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13749        }
13750
13751        impl ActionLoadConfig {
13752            /// Creates a new default instance.
13753            pub fn new() -> Self {
13754                std::default::Default::default()
13755            }
13756
13757            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode].
13758            ///
13759            /// Note that all the setters affecting `mode` are mutually
13760            /// exclusive.
13761            ///
13762            /// # Example
13763            /// ```ignore,no_run
13764            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13765            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
13766            /// let x = ActionLoadConfig::new().set_mode(Some(
13767            ///     google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(ActionSimpleLoadMode::default().into())));
13768            /// ```
13769            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
13770            {
13771                self.mode = v.into();
13772                self
13773            }
13774
13775            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13776            /// if it holds a `Replace`, `None` if the field is not set or
13777            /// holds a different branch.
13778            pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
13779                #[allow(unreachable_patterns)]
13780                self.mode.as_ref().and_then(|v| match v {
13781                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
13782                    _ => std::option::Option::None,
13783                })
13784            }
13785
13786            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13787            /// to hold a `Replace`.
13788            ///
13789            /// Note that all the setters affecting `mode` are
13790            /// mutually exclusive.
13791            ///
13792            /// # Example
13793            /// ```ignore,no_run
13794            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13795            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
13796            /// let x = ActionLoadConfig::new().set_replace(ActionSimpleLoadMode::default()/* use setters */);
13797            /// assert!(x.replace().is_some());
13798            /// assert!(x.append().is_none());
13799            /// assert!(x.maximum().is_none());
13800            /// assert!(x.unique().is_none());
13801            /// ```
13802            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{
13803                self.mode = std::option::Option::Some(
13804                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
13805                        v.into()
13806                    )
13807                );
13808                self
13809            }
13810
13811            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13812            /// if it holds a `Append`, `None` if the field is not set or
13813            /// holds a different branch.
13814            pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
13815                #[allow(unreachable_patterns)]
13816                self.mode.as_ref().and_then(|v| match v {
13817                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
13818                    _ => std::option::Option::None,
13819                })
13820            }
13821
13822            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13823            /// to hold a `Append`.
13824            ///
13825            /// Note that all the setters affecting `mode` are
13826            /// mutually exclusive.
13827            ///
13828            /// # Example
13829            /// ```ignore,no_run
13830            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13831            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
13832            /// let x = ActionLoadConfig::new().set_append(ActionSimpleLoadMode::default()/* use setters */);
13833            /// assert!(x.append().is_some());
13834            /// assert!(x.replace().is_none());
13835            /// assert!(x.maximum().is_none());
13836            /// assert!(x.unique().is_none());
13837            /// ```
13838            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{
13839                self.mode = std::option::Option::Some(
13840                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
13841                        v.into()
13842                    )
13843                );
13844                self
13845            }
13846
13847            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13848            /// if it holds a `Maximum`, `None` if the field is not set or
13849            /// holds a different branch.
13850            pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
13851                #[allow(unreachable_patterns)]
13852                self.mode.as_ref().and_then(|v| match v {
13853                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
13854                    _ => std::option::Option::None,
13855                })
13856            }
13857
13858            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13859            /// to hold a `Maximum`.
13860            ///
13861            /// Note that all the setters affecting `mode` are
13862            /// mutually exclusive.
13863            ///
13864            /// # Example
13865            /// ```ignore,no_run
13866            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13867            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
13868            /// let x = ActionLoadConfig::new().set_maximum(ActionIncrementalLoadMode::default()/* use setters */);
13869            /// assert!(x.maximum().is_some());
13870            /// assert!(x.replace().is_none());
13871            /// assert!(x.append().is_none());
13872            /// assert!(x.unique().is_none());
13873            /// ```
13874            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{
13875                self.mode = std::option::Option::Some(
13876                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
13877                        v.into()
13878                    )
13879                );
13880                self
13881            }
13882
13883            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13884            /// if it holds a `Unique`, `None` if the field is not set or
13885            /// holds a different branch.
13886            pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
13887                #[allow(unreachable_patterns)]
13888                self.mode.as_ref().and_then(|v| match v {
13889                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
13890                    _ => std::option::Option::None,
13891                })
13892            }
13893
13894            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
13895            /// to hold a `Unique`.
13896            ///
13897            /// Note that all the setters affecting `mode` are
13898            /// mutually exclusive.
13899            ///
13900            /// # Example
13901            /// ```ignore,no_run
13902            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13903            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
13904            /// let x = ActionLoadConfig::new().set_unique(ActionIncrementalLoadMode::default()/* use setters */);
13905            /// assert!(x.unique().is_some());
13906            /// assert!(x.replace().is_none());
13907            /// assert!(x.append().is_none());
13908            /// assert!(x.maximum().is_none());
13909            /// ```
13910            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{
13911                self.mode = std::option::Option::Some(
13912                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
13913                        v.into()
13914                    )
13915                );
13916                self
13917            }
13918        }
13919
13920        impl wkt::message::Message for ActionLoadConfig {
13921            fn typename() -> &'static str {
13922                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
13923            }
13924        }
13925
13926        /// Defines additional types related to [ActionLoadConfig].
13927        pub mod action_load_config {
13928            #[allow(unused_imports)]
13929            use super::*;
13930
13931            /// Load mode
13932            #[derive(Clone, Debug, PartialEq)]
13933            #[non_exhaustive]
13934            pub enum Mode {
13935                /// Replace destination table
13936                Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
13937                /// Append into destination table
13938                Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
13939                /// Insert records where the value exceeds the previous maximum value for
13940                /// a column in the destination table
13941                Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
13942                /// Insert records where the value of a column is not already present in
13943                /// the destination table
13944                Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
13945            }
13946        }
13947
13948        /// Simple load definition
13949        #[derive(Clone, Default, PartialEq)]
13950        #[non_exhaustive]
13951        pub struct ActionSimpleLoadMode {
13952            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13953        }
13954
13955        impl ActionSimpleLoadMode {
13956            /// Creates a new default instance.
13957            pub fn new() -> Self {
13958                std::default::Default::default()
13959            }
13960        }
13961
13962        impl wkt::message::Message for ActionSimpleLoadMode {
13963            fn typename() -> &'static str {
13964                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
13965            }
13966        }
13967
13968        /// Load definition for incremental load modes
13969        #[derive(Clone, Default, PartialEq)]
13970        #[non_exhaustive]
13971        pub struct ActionIncrementalLoadMode {
13972            /// Column name for incremental load modes
13973            pub column: std::string::String,
13974
13975            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13976        }
13977
13978        impl ActionIncrementalLoadMode {
13979            /// Creates a new default instance.
13980            pub fn new() -> Self {
13981                std::default::Default::default()
13982            }
13983
13984            /// Sets the value of [column][crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode::column].
13985            ///
13986            /// # Example
13987            /// ```ignore,no_run
13988            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
13989            /// let x = ActionIncrementalLoadMode::new().set_column("example");
13990            /// ```
13991            pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13992                self.column = v.into();
13993                self
13994            }
13995        }
13996
13997        impl wkt::message::Message for ActionIncrementalLoadMode {
13998            fn typename() -> &'static str {
13999                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
14000            }
14001        }
14002
14003        /// The definition for the data preparation.
14004        #[derive(Clone, Debug, PartialEq)]
14005        #[non_exhaustive]
14006        pub enum Definition {
14007            /// Output only. YAML representing the contents of the data preparation.
14008            /// Can be used to show the customer what the input was to their workflow.
14009            ContentsYaml(std::string::String),
14010            /// SQL definition for a Data Preparation. Contains a SQL query and
14011            /// additional context information.
14012            ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
14013        }
14014    }
14015
14016    /// Represents the current state of a workflow invocation action.
14017    ///
14018    /// # Working with unknown values
14019    ///
14020    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14021    /// additional enum variants at any time. Adding new variants is not considered
14022    /// a breaking change. Applications should write their code in anticipation of:
14023    ///
14024    /// - New values appearing in future releases of the client library, **and**
14025    /// - New values received dynamically, without application changes.
14026    ///
14027    /// Please consult the [Working with enums] section in the user guide for some
14028    /// guidelines.
14029    ///
14030    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14031    #[derive(Clone, Debug, PartialEq)]
14032    #[non_exhaustive]
14033    pub enum State {
14034        /// The action has not yet been considered for invocation.
14035        Pending,
14036        /// The action is currently running.
14037        Running,
14038        /// Execution of the action was skipped because upstream dependencies did not
14039        /// all complete successfully. A terminal state.
14040        Skipped,
14041        /// Execution of the action was disabled as per the configuration of the
14042        /// corresponding compilation result action. A terminal state.
14043        Disabled,
14044        /// The action succeeded. A terminal state.
14045        Succeeded,
14046        /// The action was cancelled. A terminal state.
14047        Cancelled,
14048        /// The action failed. A terminal state.
14049        Failed,
14050        /// If set, the enum was initialized with an unknown value.
14051        ///
14052        /// Applications can examine the value using [State::value] or
14053        /// [State::name].
14054        UnknownValue(state::UnknownValue),
14055    }
14056
14057    #[doc(hidden)]
14058    pub mod state {
14059        #[allow(unused_imports)]
14060        use super::*;
14061        #[derive(Clone, Debug, PartialEq)]
14062        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14063    }
14064
14065    impl State {
14066        /// Gets the enum value.
14067        ///
14068        /// Returns `None` if the enum contains an unknown value deserialized from
14069        /// the string representation of enums.
14070        pub fn value(&self) -> std::option::Option<i32> {
14071            match self {
14072                Self::Pending => std::option::Option::Some(0),
14073                Self::Running => std::option::Option::Some(1),
14074                Self::Skipped => std::option::Option::Some(2),
14075                Self::Disabled => std::option::Option::Some(3),
14076                Self::Succeeded => std::option::Option::Some(4),
14077                Self::Cancelled => std::option::Option::Some(5),
14078                Self::Failed => std::option::Option::Some(6),
14079                Self::UnknownValue(u) => u.0.value(),
14080            }
14081        }
14082
14083        /// Gets the enum value as a string.
14084        ///
14085        /// Returns `None` if the enum contains an unknown value deserialized from
14086        /// the integer representation of enums.
14087        pub fn name(&self) -> std::option::Option<&str> {
14088            match self {
14089                Self::Pending => std::option::Option::Some("PENDING"),
14090                Self::Running => std::option::Option::Some("RUNNING"),
14091                Self::Skipped => std::option::Option::Some("SKIPPED"),
14092                Self::Disabled => std::option::Option::Some("DISABLED"),
14093                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
14094                Self::Cancelled => std::option::Option::Some("CANCELLED"),
14095                Self::Failed => std::option::Option::Some("FAILED"),
14096                Self::UnknownValue(u) => u.0.name(),
14097            }
14098        }
14099    }
14100
14101    impl std::default::Default for State {
14102        fn default() -> Self {
14103            use std::convert::From;
14104            Self::from(0)
14105        }
14106    }
14107
14108    impl std::fmt::Display for State {
14109        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14110            wkt::internal::display_enum(f, self.name(), self.value())
14111        }
14112    }
14113
14114    impl std::convert::From<i32> for State {
14115        fn from(value: i32) -> Self {
14116            match value {
14117                0 => Self::Pending,
14118                1 => Self::Running,
14119                2 => Self::Skipped,
14120                3 => Self::Disabled,
14121                4 => Self::Succeeded,
14122                5 => Self::Cancelled,
14123                6 => Self::Failed,
14124                _ => Self::UnknownValue(state::UnknownValue(
14125                    wkt::internal::UnknownEnumValue::Integer(value),
14126                )),
14127            }
14128        }
14129    }
14130
14131    impl std::convert::From<&str> for State {
14132        fn from(value: &str) -> Self {
14133            use std::string::ToString;
14134            match value {
14135                "PENDING" => Self::Pending,
14136                "RUNNING" => Self::Running,
14137                "SKIPPED" => Self::Skipped,
14138                "DISABLED" => Self::Disabled,
14139                "SUCCEEDED" => Self::Succeeded,
14140                "CANCELLED" => Self::Cancelled,
14141                "FAILED" => Self::Failed,
14142                _ => Self::UnknownValue(state::UnknownValue(
14143                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14144                )),
14145            }
14146        }
14147    }
14148
14149    impl serde::ser::Serialize for State {
14150        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14151        where
14152            S: serde::Serializer,
14153        {
14154            match self {
14155                Self::Pending => serializer.serialize_i32(0),
14156                Self::Running => serializer.serialize_i32(1),
14157                Self::Skipped => serializer.serialize_i32(2),
14158                Self::Disabled => serializer.serialize_i32(3),
14159                Self::Succeeded => serializer.serialize_i32(4),
14160                Self::Cancelled => serializer.serialize_i32(5),
14161                Self::Failed => serializer.serialize_i32(6),
14162                Self::UnknownValue(u) => u.0.serialize(serializer),
14163            }
14164        }
14165    }
14166
14167    impl<'de> serde::de::Deserialize<'de> for State {
14168        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14169        where
14170            D: serde::Deserializer<'de>,
14171        {
14172            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14173                ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
14174            ))
14175        }
14176    }
14177
14178    /// The action's details.
14179    #[derive(Clone, Debug, PartialEq)]
14180    #[non_exhaustive]
14181    pub enum Action {
14182        /// Output only. The workflow action's bigquery action details.
14183        BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
14184        /// Output only. The workflow action's notebook action details.
14185        NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
14186        /// Output only. The workflow action's data preparation action details.
14187        DataPreparationAction(
14188            std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
14189        ),
14190    }
14191}
14192
14193/// `QueryWorkflowInvocationActions` request message.
14194#[derive(Clone, Default, PartialEq)]
14195#[non_exhaustive]
14196pub struct QueryWorkflowInvocationActionsRequest {
14197    /// Required. The workflow invocation's name.
14198    pub name: std::string::String,
14199
14200    /// Optional. Maximum number of workflow invocations to return. The server may
14201    /// return fewer items than requested. If unspecified, the server will pick an
14202    /// appropriate default.
14203    pub page_size: i32,
14204
14205    /// Optional. Page token received from a previous
14206    /// `QueryWorkflowInvocationActions` call. Provide this to retrieve the
14207    /// subsequent page.
14208    ///
14209    /// When paginating, all other parameters provided to
14210    /// `QueryWorkflowInvocationActions`, with the exception of `page_size`, must
14211    /// match the call that provided the page token.
14212    pub page_token: std::string::String,
14213
14214    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14215}
14216
14217impl QueryWorkflowInvocationActionsRequest {
14218    /// Creates a new default instance.
14219    pub fn new() -> Self {
14220        std::default::Default::default()
14221    }
14222
14223    /// Sets the value of [name][crate::model::QueryWorkflowInvocationActionsRequest::name].
14224    ///
14225    /// # Example
14226    /// ```ignore,no_run
14227    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14228    /// let x = QueryWorkflowInvocationActionsRequest::new().set_name("example");
14229    /// ```
14230    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14231        self.name = v.into();
14232        self
14233    }
14234
14235    /// Sets the value of [page_size][crate::model::QueryWorkflowInvocationActionsRequest::page_size].
14236    ///
14237    /// # Example
14238    /// ```ignore,no_run
14239    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14240    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_size(42);
14241    /// ```
14242    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14243        self.page_size = v.into();
14244        self
14245    }
14246
14247    /// Sets the value of [page_token][crate::model::QueryWorkflowInvocationActionsRequest::page_token].
14248    ///
14249    /// # Example
14250    /// ```ignore,no_run
14251    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14252    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_token("example");
14253    /// ```
14254    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14255        self.page_token = v.into();
14256        self
14257    }
14258}
14259
14260impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
14261    fn typename() -> &'static str {
14262        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
14263    }
14264}
14265
14266/// `QueryWorkflowInvocationActions` response message.
14267#[derive(Clone, Default, PartialEq)]
14268#[non_exhaustive]
14269pub struct QueryWorkflowInvocationActionsResponse {
14270    /// List of workflow invocation actions.
14271    pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
14272
14273    /// A token, which can be sent as `page_token` to retrieve the next page.
14274    /// If this field is omitted, there are no subsequent pages.
14275    pub next_page_token: std::string::String,
14276
14277    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14278}
14279
14280impl QueryWorkflowInvocationActionsResponse {
14281    /// Creates a new default instance.
14282    pub fn new() -> Self {
14283        std::default::Default::default()
14284    }
14285
14286    /// Sets the value of [workflow_invocation_actions][crate::model::QueryWorkflowInvocationActionsResponse::workflow_invocation_actions].
14287    ///
14288    /// # Example
14289    /// ```ignore,no_run
14290    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
14291    /// use google_cloud_dataform_v1::model::WorkflowInvocationAction;
14292    /// let x = QueryWorkflowInvocationActionsResponse::new()
14293    ///     .set_workflow_invocation_actions([
14294    ///         WorkflowInvocationAction::default()/* use setters */,
14295    ///         WorkflowInvocationAction::default()/* use (different) setters */,
14296    ///     ]);
14297    /// ```
14298    pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
14299    where
14300        T: std::iter::IntoIterator<Item = V>,
14301        V: std::convert::Into<crate::model::WorkflowInvocationAction>,
14302    {
14303        use std::iter::Iterator;
14304        self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
14305        self
14306    }
14307
14308    /// Sets the value of [next_page_token][crate::model::QueryWorkflowInvocationActionsResponse::next_page_token].
14309    ///
14310    /// # Example
14311    /// ```ignore,no_run
14312    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
14313    /// let x = QueryWorkflowInvocationActionsResponse::new().set_next_page_token("example");
14314    /// ```
14315    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14316        self.next_page_token = v.into();
14317        self
14318    }
14319}
14320
14321impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
14322    fn typename() -> &'static str {
14323        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
14324    }
14325}
14326
14327#[doc(hidden)]
14328impl google_cloud_gax::paginator::internal::PageableResponse
14329    for QueryWorkflowInvocationActionsResponse
14330{
14331    type PageItem = crate::model::WorkflowInvocationAction;
14332
14333    fn items(self) -> std::vec::Vec<Self::PageItem> {
14334        self.workflow_invocation_actions
14335    }
14336
14337    fn next_page_token(&self) -> std::string::String {
14338        use std::clone::Clone;
14339        self.next_page_token.clone()
14340    }
14341}
14342
14343/// Config for all repositories in a given project and location.
14344#[derive(Clone, Default, PartialEq)]
14345#[non_exhaustive]
14346pub struct Config {
14347    /// Identifier. The config name.
14348    pub name: std::string::String,
14349
14350    /// Optional. The default KMS key that is used if no encryption key is provided
14351    /// when a repository is created.
14352    pub default_kms_key_name: std::string::String,
14353
14354    /// Output only. All the metadata information that is used internally to serve
14355    /// the resource. For example: timestamps, flags, status fields, etc. The
14356    /// format of this field is a JSON string.
14357    pub internal_metadata: std::option::Option<std::string::String>,
14358
14359    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14360}
14361
14362impl Config {
14363    /// Creates a new default instance.
14364    pub fn new() -> Self {
14365        std::default::Default::default()
14366    }
14367
14368    /// Sets the value of [name][crate::model::Config::name].
14369    ///
14370    /// # Example
14371    /// ```ignore,no_run
14372    /// # use google_cloud_dataform_v1::model::Config;
14373    /// let x = Config::new().set_name("example");
14374    /// ```
14375    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14376        self.name = v.into();
14377        self
14378    }
14379
14380    /// Sets the value of [default_kms_key_name][crate::model::Config::default_kms_key_name].
14381    ///
14382    /// # Example
14383    /// ```ignore,no_run
14384    /// # use google_cloud_dataform_v1::model::Config;
14385    /// let x = Config::new().set_default_kms_key_name("example");
14386    /// ```
14387    pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
14388        mut self,
14389        v: T,
14390    ) -> Self {
14391        self.default_kms_key_name = v.into();
14392        self
14393    }
14394
14395    /// Sets the value of [internal_metadata][crate::model::Config::internal_metadata].
14396    ///
14397    /// # Example
14398    /// ```ignore,no_run
14399    /// # use google_cloud_dataform_v1::model::Config;
14400    /// let x = Config::new().set_internal_metadata("example");
14401    /// ```
14402    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
14403    where
14404        T: std::convert::Into<std::string::String>,
14405    {
14406        self.internal_metadata = std::option::Option::Some(v.into());
14407        self
14408    }
14409
14410    /// Sets or clears the value of [internal_metadata][crate::model::Config::internal_metadata].
14411    ///
14412    /// # Example
14413    /// ```ignore,no_run
14414    /// # use google_cloud_dataform_v1::model::Config;
14415    /// let x = Config::new().set_or_clear_internal_metadata(Some("example"));
14416    /// let x = Config::new().set_or_clear_internal_metadata(None::<String>);
14417    /// ```
14418    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
14419    where
14420        T: std::convert::Into<std::string::String>,
14421    {
14422        self.internal_metadata = v.map(|x| x.into());
14423        self
14424    }
14425}
14426
14427impl wkt::message::Message for Config {
14428    fn typename() -> &'static str {
14429        "type.googleapis.com/google.cloud.dataform.v1.Config"
14430    }
14431}
14432
14433/// `GetConfig` request message.
14434#[derive(Clone, Default, PartialEq)]
14435#[non_exhaustive]
14436pub struct GetConfigRequest {
14437    /// Required. The config name.
14438    pub name: std::string::String,
14439
14440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14441}
14442
14443impl GetConfigRequest {
14444    /// Creates a new default instance.
14445    pub fn new() -> Self {
14446        std::default::Default::default()
14447    }
14448
14449    /// Sets the value of [name][crate::model::GetConfigRequest::name].
14450    ///
14451    /// # Example
14452    /// ```ignore,no_run
14453    /// # use google_cloud_dataform_v1::model::GetConfigRequest;
14454    /// let x = GetConfigRequest::new().set_name("example");
14455    /// ```
14456    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14457        self.name = v.into();
14458        self
14459    }
14460}
14461
14462impl wkt::message::Message for GetConfigRequest {
14463    fn typename() -> &'static str {
14464        "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
14465    }
14466}
14467
14468/// `UpdateConfig` request message.
14469#[derive(Clone, Default, PartialEq)]
14470#[non_exhaustive]
14471pub struct UpdateConfigRequest {
14472    /// Required. The config to update.
14473    pub config: std::option::Option<crate::model::Config>,
14474
14475    /// Optional. Specifies the fields to be updated in the config.
14476    pub update_mask: std::option::Option<wkt::FieldMask>,
14477
14478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14479}
14480
14481impl UpdateConfigRequest {
14482    /// Creates a new default instance.
14483    pub fn new() -> Self {
14484        std::default::Default::default()
14485    }
14486
14487    /// Sets the value of [config][crate::model::UpdateConfigRequest::config].
14488    ///
14489    /// # Example
14490    /// ```ignore,no_run
14491    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14492    /// use google_cloud_dataform_v1::model::Config;
14493    /// let x = UpdateConfigRequest::new().set_config(Config::default()/* use setters */);
14494    /// ```
14495    pub fn set_config<T>(mut self, v: T) -> Self
14496    where
14497        T: std::convert::Into<crate::model::Config>,
14498    {
14499        self.config = std::option::Option::Some(v.into());
14500        self
14501    }
14502
14503    /// Sets or clears the value of [config][crate::model::UpdateConfigRequest::config].
14504    ///
14505    /// # Example
14506    /// ```ignore,no_run
14507    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14508    /// use google_cloud_dataform_v1::model::Config;
14509    /// let x = UpdateConfigRequest::new().set_or_clear_config(Some(Config::default()/* use setters */));
14510    /// let x = UpdateConfigRequest::new().set_or_clear_config(None::<Config>);
14511    /// ```
14512    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
14513    where
14514        T: std::convert::Into<crate::model::Config>,
14515    {
14516        self.config = v.map(|x| x.into());
14517        self
14518    }
14519
14520    /// Sets the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
14521    ///
14522    /// # Example
14523    /// ```ignore,no_run
14524    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14525    /// use wkt::FieldMask;
14526    /// let x = UpdateConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
14527    /// ```
14528    pub fn set_update_mask<T>(mut self, v: T) -> Self
14529    where
14530        T: std::convert::Into<wkt::FieldMask>,
14531    {
14532        self.update_mask = std::option::Option::Some(v.into());
14533        self
14534    }
14535
14536    /// Sets or clears the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
14537    ///
14538    /// # Example
14539    /// ```ignore,no_run
14540    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14541    /// use wkt::FieldMask;
14542    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
14543    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
14544    /// ```
14545    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14546    where
14547        T: std::convert::Into<wkt::FieldMask>,
14548    {
14549        self.update_mask = v.map(|x| x.into());
14550        self
14551    }
14552}
14553
14554impl wkt::message::Message for UpdateConfigRequest {
14555    fn typename() -> &'static str {
14556        "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
14557    }
14558}
14559
14560/// Represents a Dataform Folder. This is a resource that is used to organize
14561/// Files and other Folders and provide hierarchical access controls.
14562#[derive(Clone, Default, PartialEq)]
14563#[non_exhaustive]
14564pub struct Folder {
14565    /// Identifier. The Folder's name.
14566    pub name: std::string::String,
14567
14568    /// Required. The Folder's user-friendly name.
14569    pub display_name: std::string::String,
14570
14571    /// Optional. The containing Folder resource name. This should take
14572    /// the format: projects/{project}/locations/{location}/folders/{folder},
14573    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}, or just
14574    /// projects/{project}/locations/{location} if this is a root Folder. This
14575    /// field can only be updated through MoveFolder.
14576    pub containing_folder: std::string::String,
14577
14578    /// Output only. The resource name of the TeamFolder that this Folder is
14579    /// associated with. This should take the format:
14580    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this
14581    /// is not set, the Folder is not associated with a TeamFolder and is a
14582    /// UserFolder.
14583    pub team_folder_name: std::string::String,
14584
14585    /// Output only. The timestamp of when the Folder was created.
14586    pub create_time: std::option::Option<wkt::Timestamp>,
14587
14588    /// Output only. The timestamp of when the Folder was last updated.
14589    pub update_time: std::option::Option<wkt::Timestamp>,
14590
14591    /// Output only. All the metadata information that is used internally to serve
14592    /// the resource. For example: timestamps, flags, status fields, etc. The
14593    /// format of this field is a JSON string.
14594    pub internal_metadata: std::option::Option<std::string::String>,
14595
14596    /// Output only. The IAM principal identifier of the creator of the Folder.
14597    pub creator_iam_principal: std::option::Option<std::string::String>,
14598
14599    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14600}
14601
14602impl Folder {
14603    /// Creates a new default instance.
14604    pub fn new() -> Self {
14605        std::default::Default::default()
14606    }
14607
14608    /// Sets the value of [name][crate::model::Folder::name].
14609    ///
14610    /// # Example
14611    /// ```ignore,no_run
14612    /// # use google_cloud_dataform_v1::model::Folder;
14613    /// let x = Folder::new().set_name("example");
14614    /// ```
14615    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14616        self.name = v.into();
14617        self
14618    }
14619
14620    /// Sets the value of [display_name][crate::model::Folder::display_name].
14621    ///
14622    /// # Example
14623    /// ```ignore,no_run
14624    /// # use google_cloud_dataform_v1::model::Folder;
14625    /// let x = Folder::new().set_display_name("example");
14626    /// ```
14627    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14628        self.display_name = v.into();
14629        self
14630    }
14631
14632    /// Sets the value of [containing_folder][crate::model::Folder::containing_folder].
14633    ///
14634    /// # Example
14635    /// ```ignore,no_run
14636    /// # use google_cloud_dataform_v1::model::Folder;
14637    /// let x = Folder::new().set_containing_folder("example");
14638    /// ```
14639    pub fn set_containing_folder<T: std::convert::Into<std::string::String>>(
14640        mut self,
14641        v: T,
14642    ) -> Self {
14643        self.containing_folder = v.into();
14644        self
14645    }
14646
14647    /// Sets the value of [team_folder_name][crate::model::Folder::team_folder_name].
14648    ///
14649    /// # Example
14650    /// ```ignore,no_run
14651    /// # use google_cloud_dataform_v1::model::Folder;
14652    /// let x = Folder::new().set_team_folder_name("example");
14653    /// ```
14654    pub fn set_team_folder_name<T: std::convert::Into<std::string::String>>(
14655        mut self,
14656        v: T,
14657    ) -> Self {
14658        self.team_folder_name = v.into();
14659        self
14660    }
14661
14662    /// Sets the value of [create_time][crate::model::Folder::create_time].
14663    ///
14664    /// # Example
14665    /// ```ignore,no_run
14666    /// # use google_cloud_dataform_v1::model::Folder;
14667    /// use wkt::Timestamp;
14668    /// let x = Folder::new().set_create_time(Timestamp::default()/* use setters */);
14669    /// ```
14670    pub fn set_create_time<T>(mut self, v: T) -> Self
14671    where
14672        T: std::convert::Into<wkt::Timestamp>,
14673    {
14674        self.create_time = std::option::Option::Some(v.into());
14675        self
14676    }
14677
14678    /// Sets or clears the value of [create_time][crate::model::Folder::create_time].
14679    ///
14680    /// # Example
14681    /// ```ignore,no_run
14682    /// # use google_cloud_dataform_v1::model::Folder;
14683    /// use wkt::Timestamp;
14684    /// let x = Folder::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14685    /// let x = Folder::new().set_or_clear_create_time(None::<Timestamp>);
14686    /// ```
14687    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14688    where
14689        T: std::convert::Into<wkt::Timestamp>,
14690    {
14691        self.create_time = v.map(|x| x.into());
14692        self
14693    }
14694
14695    /// Sets the value of [update_time][crate::model::Folder::update_time].
14696    ///
14697    /// # Example
14698    /// ```ignore,no_run
14699    /// # use google_cloud_dataform_v1::model::Folder;
14700    /// use wkt::Timestamp;
14701    /// let x = Folder::new().set_update_time(Timestamp::default()/* use setters */);
14702    /// ```
14703    pub fn set_update_time<T>(mut self, v: T) -> Self
14704    where
14705        T: std::convert::Into<wkt::Timestamp>,
14706    {
14707        self.update_time = std::option::Option::Some(v.into());
14708        self
14709    }
14710
14711    /// Sets or clears the value of [update_time][crate::model::Folder::update_time].
14712    ///
14713    /// # Example
14714    /// ```ignore,no_run
14715    /// # use google_cloud_dataform_v1::model::Folder;
14716    /// use wkt::Timestamp;
14717    /// let x = Folder::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
14718    /// let x = Folder::new().set_or_clear_update_time(None::<Timestamp>);
14719    /// ```
14720    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14721    where
14722        T: std::convert::Into<wkt::Timestamp>,
14723    {
14724        self.update_time = v.map(|x| x.into());
14725        self
14726    }
14727
14728    /// Sets the value of [internal_metadata][crate::model::Folder::internal_metadata].
14729    ///
14730    /// # Example
14731    /// ```ignore,no_run
14732    /// # use google_cloud_dataform_v1::model::Folder;
14733    /// let x = Folder::new().set_internal_metadata("example");
14734    /// ```
14735    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
14736    where
14737        T: std::convert::Into<std::string::String>,
14738    {
14739        self.internal_metadata = std::option::Option::Some(v.into());
14740        self
14741    }
14742
14743    /// Sets or clears the value of [internal_metadata][crate::model::Folder::internal_metadata].
14744    ///
14745    /// # Example
14746    /// ```ignore,no_run
14747    /// # use google_cloud_dataform_v1::model::Folder;
14748    /// let x = Folder::new().set_or_clear_internal_metadata(Some("example"));
14749    /// let x = Folder::new().set_or_clear_internal_metadata(None::<String>);
14750    /// ```
14751    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
14752    where
14753        T: std::convert::Into<std::string::String>,
14754    {
14755        self.internal_metadata = v.map(|x| x.into());
14756        self
14757    }
14758
14759    /// Sets the value of [creator_iam_principal][crate::model::Folder::creator_iam_principal].
14760    ///
14761    /// # Example
14762    /// ```ignore,no_run
14763    /// # use google_cloud_dataform_v1::model::Folder;
14764    /// let x = Folder::new().set_creator_iam_principal("example");
14765    /// ```
14766    pub fn set_creator_iam_principal<T>(mut self, v: T) -> Self
14767    where
14768        T: std::convert::Into<std::string::String>,
14769    {
14770        self.creator_iam_principal = std::option::Option::Some(v.into());
14771        self
14772    }
14773
14774    /// Sets or clears the value of [creator_iam_principal][crate::model::Folder::creator_iam_principal].
14775    ///
14776    /// # Example
14777    /// ```ignore,no_run
14778    /// # use google_cloud_dataform_v1::model::Folder;
14779    /// let x = Folder::new().set_or_clear_creator_iam_principal(Some("example"));
14780    /// let x = Folder::new().set_or_clear_creator_iam_principal(None::<String>);
14781    /// ```
14782    pub fn set_or_clear_creator_iam_principal<T>(mut self, v: std::option::Option<T>) -> Self
14783    where
14784        T: std::convert::Into<std::string::String>,
14785    {
14786        self.creator_iam_principal = v.map(|x| x.into());
14787        self
14788    }
14789}
14790
14791impl wkt::message::Message for Folder {
14792    fn typename() -> &'static str {
14793        "type.googleapis.com/google.cloud.dataform.v1.Folder"
14794    }
14795}
14796
14797/// `CreateFolder` request message.
14798#[derive(Clone, Default, PartialEq)]
14799#[non_exhaustive]
14800pub struct CreateFolderRequest {
14801    /// Required. The location in which to create the Folder. Must be in the format
14802    /// `projects/*/locations/*`.
14803    pub parent: std::string::String,
14804
14805    /// Required. The Folder to create.
14806    pub folder: std::option::Option<crate::model::Folder>,
14807
14808    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14809}
14810
14811impl CreateFolderRequest {
14812    /// Creates a new default instance.
14813    pub fn new() -> Self {
14814        std::default::Default::default()
14815    }
14816
14817    /// Sets the value of [parent][crate::model::CreateFolderRequest::parent].
14818    ///
14819    /// # Example
14820    /// ```ignore,no_run
14821    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
14822    /// let x = CreateFolderRequest::new().set_parent("example");
14823    /// ```
14824    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14825        self.parent = v.into();
14826        self
14827    }
14828
14829    /// Sets the value of [folder][crate::model::CreateFolderRequest::folder].
14830    ///
14831    /// # Example
14832    /// ```ignore,no_run
14833    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
14834    /// use google_cloud_dataform_v1::model::Folder;
14835    /// let x = CreateFolderRequest::new().set_folder(Folder::default()/* use setters */);
14836    /// ```
14837    pub fn set_folder<T>(mut self, v: T) -> Self
14838    where
14839        T: std::convert::Into<crate::model::Folder>,
14840    {
14841        self.folder = std::option::Option::Some(v.into());
14842        self
14843    }
14844
14845    /// Sets or clears the value of [folder][crate::model::CreateFolderRequest::folder].
14846    ///
14847    /// # Example
14848    /// ```ignore,no_run
14849    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
14850    /// use google_cloud_dataform_v1::model::Folder;
14851    /// let x = CreateFolderRequest::new().set_or_clear_folder(Some(Folder::default()/* use setters */));
14852    /// let x = CreateFolderRequest::new().set_or_clear_folder(None::<Folder>);
14853    /// ```
14854    pub fn set_or_clear_folder<T>(mut self, v: std::option::Option<T>) -> Self
14855    where
14856        T: std::convert::Into<crate::model::Folder>,
14857    {
14858        self.folder = v.map(|x| x.into());
14859        self
14860    }
14861}
14862
14863impl wkt::message::Message for CreateFolderRequest {
14864    fn typename() -> &'static str {
14865        "type.googleapis.com/google.cloud.dataform.v1.CreateFolderRequest"
14866    }
14867}
14868
14869/// `MoveFolder` request message.
14870#[derive(Clone, Default, PartialEq)]
14871#[non_exhaustive]
14872pub struct MoveFolderRequest {
14873    /// Required. The full resource name of the Folder to move.
14874    pub name: std::string::String,
14875
14876    /// Optional. The name of the Folder, TeamFolder, or root location to move the
14877    /// Folder to. Can be in the format of: "" to move into the root User folder,
14878    /// `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*`
14879    pub destination_containing_folder: std::option::Option<std::string::String>,
14880
14881    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14882}
14883
14884impl MoveFolderRequest {
14885    /// Creates a new default instance.
14886    pub fn new() -> Self {
14887        std::default::Default::default()
14888    }
14889
14890    /// Sets the value of [name][crate::model::MoveFolderRequest::name].
14891    ///
14892    /// # Example
14893    /// ```ignore,no_run
14894    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
14895    /// let x = MoveFolderRequest::new().set_name("example");
14896    /// ```
14897    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14898        self.name = v.into();
14899        self
14900    }
14901
14902    /// Sets the value of [destination_containing_folder][crate::model::MoveFolderRequest::destination_containing_folder].
14903    ///
14904    /// # Example
14905    /// ```ignore,no_run
14906    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
14907    /// let x = MoveFolderRequest::new().set_destination_containing_folder("example");
14908    /// ```
14909    pub fn set_destination_containing_folder<T>(mut self, v: T) -> Self
14910    where
14911        T: std::convert::Into<std::string::String>,
14912    {
14913        self.destination_containing_folder = std::option::Option::Some(v.into());
14914        self
14915    }
14916
14917    /// Sets or clears the value of [destination_containing_folder][crate::model::MoveFolderRequest::destination_containing_folder].
14918    ///
14919    /// # Example
14920    /// ```ignore,no_run
14921    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
14922    /// let x = MoveFolderRequest::new().set_or_clear_destination_containing_folder(Some("example"));
14923    /// let x = MoveFolderRequest::new().set_or_clear_destination_containing_folder(None::<String>);
14924    /// ```
14925    pub fn set_or_clear_destination_containing_folder<T>(
14926        mut self,
14927        v: std::option::Option<T>,
14928    ) -> Self
14929    where
14930        T: std::convert::Into<std::string::String>,
14931    {
14932        self.destination_containing_folder = v.map(|x| x.into());
14933        self
14934    }
14935}
14936
14937impl wkt::message::Message for MoveFolderRequest {
14938    fn typename() -> &'static str {
14939        "type.googleapis.com/google.cloud.dataform.v1.MoveFolderRequest"
14940    }
14941}
14942
14943/// `GetFolder` request message.
14944#[derive(Clone, Default, PartialEq)]
14945#[non_exhaustive]
14946pub struct GetFolderRequest {
14947    /// Required. The Folder's name.
14948    pub name: std::string::String,
14949
14950    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14951}
14952
14953impl GetFolderRequest {
14954    /// Creates a new default instance.
14955    pub fn new() -> Self {
14956        std::default::Default::default()
14957    }
14958
14959    /// Sets the value of [name][crate::model::GetFolderRequest::name].
14960    ///
14961    /// # Example
14962    /// ```ignore,no_run
14963    /// # use google_cloud_dataform_v1::model::GetFolderRequest;
14964    /// let x = GetFolderRequest::new().set_name("example");
14965    /// ```
14966    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14967        self.name = v.into();
14968        self
14969    }
14970}
14971
14972impl wkt::message::Message for GetFolderRequest {
14973    fn typename() -> &'static str {
14974        "type.googleapis.com/google.cloud.dataform.v1.GetFolderRequest"
14975    }
14976}
14977
14978/// `UpdateFolder` request message.
14979#[derive(Clone, Default, PartialEq)]
14980#[non_exhaustive]
14981pub struct UpdateFolderRequest {
14982    /// Optional. Specifies the fields to be updated in the Folder. If left unset,
14983    /// all fields that can be updated, will be updated. A few fields cannot be
14984    /// updated and will be ignored if specified in the update_mask (e.g.
14985    /// parent_name, team_folder_name).
14986    pub update_mask: std::option::Option<wkt::FieldMask>,
14987
14988    /// Required. The updated Folder.
14989    pub folder: std::option::Option<crate::model::Folder>,
14990
14991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14992}
14993
14994impl UpdateFolderRequest {
14995    /// Creates a new default instance.
14996    pub fn new() -> Self {
14997        std::default::Default::default()
14998    }
14999
15000    /// Sets the value of [update_mask][crate::model::UpdateFolderRequest::update_mask].
15001    ///
15002    /// # Example
15003    /// ```ignore,no_run
15004    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15005    /// use wkt::FieldMask;
15006    /// let x = UpdateFolderRequest::new().set_update_mask(FieldMask::default()/* use setters */);
15007    /// ```
15008    pub fn set_update_mask<T>(mut self, v: T) -> Self
15009    where
15010        T: std::convert::Into<wkt::FieldMask>,
15011    {
15012        self.update_mask = std::option::Option::Some(v.into());
15013        self
15014    }
15015
15016    /// Sets or clears the value of [update_mask][crate::model::UpdateFolderRequest::update_mask].
15017    ///
15018    /// # Example
15019    /// ```ignore,no_run
15020    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15021    /// use wkt::FieldMask;
15022    /// let x = UpdateFolderRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
15023    /// let x = UpdateFolderRequest::new().set_or_clear_update_mask(None::<FieldMask>);
15024    /// ```
15025    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15026    where
15027        T: std::convert::Into<wkt::FieldMask>,
15028    {
15029        self.update_mask = v.map(|x| x.into());
15030        self
15031    }
15032
15033    /// Sets the value of [folder][crate::model::UpdateFolderRequest::folder].
15034    ///
15035    /// # Example
15036    /// ```ignore,no_run
15037    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15038    /// use google_cloud_dataform_v1::model::Folder;
15039    /// let x = UpdateFolderRequest::new().set_folder(Folder::default()/* use setters */);
15040    /// ```
15041    pub fn set_folder<T>(mut self, v: T) -> Self
15042    where
15043        T: std::convert::Into<crate::model::Folder>,
15044    {
15045        self.folder = std::option::Option::Some(v.into());
15046        self
15047    }
15048
15049    /// Sets or clears the value of [folder][crate::model::UpdateFolderRequest::folder].
15050    ///
15051    /// # Example
15052    /// ```ignore,no_run
15053    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15054    /// use google_cloud_dataform_v1::model::Folder;
15055    /// let x = UpdateFolderRequest::new().set_or_clear_folder(Some(Folder::default()/* use setters */));
15056    /// let x = UpdateFolderRequest::new().set_or_clear_folder(None::<Folder>);
15057    /// ```
15058    pub fn set_or_clear_folder<T>(mut self, v: std::option::Option<T>) -> Self
15059    where
15060        T: std::convert::Into<crate::model::Folder>,
15061    {
15062        self.folder = v.map(|x| x.into());
15063        self
15064    }
15065}
15066
15067impl wkt::message::Message for UpdateFolderRequest {
15068    fn typename() -> &'static str {
15069        "type.googleapis.com/google.cloud.dataform.v1.UpdateFolderRequest"
15070    }
15071}
15072
15073/// `DeleteFolder` request message.
15074#[derive(Clone, Default, PartialEq)]
15075#[non_exhaustive]
15076pub struct DeleteFolderRequest {
15077    /// Required. The Folder's name.
15078    pub name: std::string::String,
15079
15080    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15081}
15082
15083impl DeleteFolderRequest {
15084    /// Creates a new default instance.
15085    pub fn new() -> Self {
15086        std::default::Default::default()
15087    }
15088
15089    /// Sets the value of [name][crate::model::DeleteFolderRequest::name].
15090    ///
15091    /// # Example
15092    /// ```ignore,no_run
15093    /// # use google_cloud_dataform_v1::model::DeleteFolderRequest;
15094    /// let x = DeleteFolderRequest::new().set_name("example");
15095    /// ```
15096    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15097        self.name = v.into();
15098        self
15099    }
15100}
15101
15102impl wkt::message::Message for DeleteFolderRequest {
15103    fn typename() -> &'static str {
15104        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderRequest"
15105    }
15106}
15107
15108/// `DeleteFolderTree` request message.
15109#[derive(Clone, Default, PartialEq)]
15110#[non_exhaustive]
15111pub struct DeleteFolderTreeRequest {
15112    /// Required. The Folder's name.
15113    /// Format: projects/{project}/locations/{location}/folders/{folder}
15114    pub name: std::string::String,
15115
15116    /// Optional. If `false` (default): The operation will fail if any
15117    /// Repository within the folder hierarchy has associated Release Configs or
15118    /// Workflow Configs.
15119    ///
15120    /// If `true`: The operation will attempt to delete everything, including any
15121    /// Release Configs and Workflow Configs linked to Repositories within the
15122    /// folder hierarchy. This permanently removes schedules and resources.
15123    pub force: bool,
15124
15125    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15126}
15127
15128impl DeleteFolderTreeRequest {
15129    /// Creates a new default instance.
15130    pub fn new() -> Self {
15131        std::default::Default::default()
15132    }
15133
15134    /// Sets the value of [name][crate::model::DeleteFolderTreeRequest::name].
15135    ///
15136    /// # Example
15137    /// ```ignore,no_run
15138    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeRequest;
15139    /// let x = DeleteFolderTreeRequest::new().set_name("example");
15140    /// ```
15141    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15142        self.name = v.into();
15143        self
15144    }
15145
15146    /// Sets the value of [force][crate::model::DeleteFolderTreeRequest::force].
15147    ///
15148    /// # Example
15149    /// ```ignore,no_run
15150    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeRequest;
15151    /// let x = DeleteFolderTreeRequest::new().set_force(true);
15152    /// ```
15153    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15154        self.force = v.into();
15155        self
15156    }
15157}
15158
15159impl wkt::message::Message for DeleteFolderTreeRequest {
15160    fn typename() -> &'static str {
15161        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderTreeRequest"
15162    }
15163}
15164
15165/// `DeleteTeamFolderTree` request message.
15166#[derive(Clone, Default, PartialEq)]
15167#[non_exhaustive]
15168pub struct DeleteTeamFolderTreeRequest {
15169    /// Required. The TeamFolder's name.
15170    /// Format: projects/{project}/locations/{location}/teamFolders/{team_folder}
15171    pub name: std::string::String,
15172
15173    /// Optional. If `false` (default): The operation will fail if any
15174    /// Repository within the folder hierarchy has associated Release Configs or
15175    /// Workflow Configs.
15176    ///
15177    /// If `true`: The operation will attempt to delete everything, including any
15178    /// Release Configs and Workflow Configs linked to Repositories within the
15179    /// folder hierarchy. This permanently removes schedules and resources.
15180    pub force: bool,
15181
15182    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15183}
15184
15185impl DeleteTeamFolderTreeRequest {
15186    /// Creates a new default instance.
15187    pub fn new() -> Self {
15188        std::default::Default::default()
15189    }
15190
15191    /// Sets the value of [name][crate::model::DeleteTeamFolderTreeRequest::name].
15192    ///
15193    /// # Example
15194    /// ```ignore,no_run
15195    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderTreeRequest;
15196    /// let x = DeleteTeamFolderTreeRequest::new().set_name("example");
15197    /// ```
15198    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15199        self.name = v.into();
15200        self
15201    }
15202
15203    /// Sets the value of [force][crate::model::DeleteTeamFolderTreeRequest::force].
15204    ///
15205    /// # Example
15206    /// ```ignore,no_run
15207    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderTreeRequest;
15208    /// let x = DeleteTeamFolderTreeRequest::new().set_force(true);
15209    /// ```
15210    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15211        self.force = v.into();
15212        self
15213    }
15214}
15215
15216impl wkt::message::Message for DeleteTeamFolderTreeRequest {
15217    fn typename() -> &'static str {
15218        "type.googleapis.com/google.cloud.dataform.v1.DeleteTeamFolderTreeRequest"
15219    }
15220}
15221
15222/// Contains metadata about the progress of the DeleteFolderTree Long-running
15223/// operations.
15224#[derive(Clone, Default, PartialEq)]
15225#[non_exhaustive]
15226pub struct DeleteFolderTreeMetadata {
15227    /// Output only. The time the operation was created.
15228    pub create_time: std::option::Option<wkt::Timestamp>,
15229
15230    /// Output only. The time the operation finished running.
15231    pub end_time: std::option::Option<wkt::Timestamp>,
15232
15233    /// Output only. Resource name of the target of the operation.
15234    /// Format: projects/{project}/locations/{location}/folders/{folder} or
15235    /// projects/{project}/locations/{location}/teamFolders/{team_folder}
15236    pub target: std::string::String,
15237
15238    /// Output only. The state of the operation.
15239    pub state: crate::model::delete_folder_tree_metadata::State,
15240
15241    /// Output only. Percent complete of the operation [0, 100].
15242    pub percent_complete: i32,
15243
15244    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15245}
15246
15247impl DeleteFolderTreeMetadata {
15248    /// Creates a new default instance.
15249    pub fn new() -> Self {
15250        std::default::Default::default()
15251    }
15252
15253    /// Sets the value of [create_time][crate::model::DeleteFolderTreeMetadata::create_time].
15254    ///
15255    /// # Example
15256    /// ```ignore,no_run
15257    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15258    /// use wkt::Timestamp;
15259    /// let x = DeleteFolderTreeMetadata::new().set_create_time(Timestamp::default()/* use setters */);
15260    /// ```
15261    pub fn set_create_time<T>(mut self, v: T) -> Self
15262    where
15263        T: std::convert::Into<wkt::Timestamp>,
15264    {
15265        self.create_time = std::option::Option::Some(v.into());
15266        self
15267    }
15268
15269    /// Sets or clears the value of [create_time][crate::model::DeleteFolderTreeMetadata::create_time].
15270    ///
15271    /// # Example
15272    /// ```ignore,no_run
15273    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15274    /// use wkt::Timestamp;
15275    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
15276    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_create_time(None::<Timestamp>);
15277    /// ```
15278    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15279    where
15280        T: std::convert::Into<wkt::Timestamp>,
15281    {
15282        self.create_time = v.map(|x| x.into());
15283        self
15284    }
15285
15286    /// Sets the value of [end_time][crate::model::DeleteFolderTreeMetadata::end_time].
15287    ///
15288    /// # Example
15289    /// ```ignore,no_run
15290    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15291    /// use wkt::Timestamp;
15292    /// let x = DeleteFolderTreeMetadata::new().set_end_time(Timestamp::default()/* use setters */);
15293    /// ```
15294    pub fn set_end_time<T>(mut self, v: T) -> Self
15295    where
15296        T: std::convert::Into<wkt::Timestamp>,
15297    {
15298        self.end_time = std::option::Option::Some(v.into());
15299        self
15300    }
15301
15302    /// Sets or clears the value of [end_time][crate::model::DeleteFolderTreeMetadata::end_time].
15303    ///
15304    /// # Example
15305    /// ```ignore,no_run
15306    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15307    /// use wkt::Timestamp;
15308    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15309    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_end_time(None::<Timestamp>);
15310    /// ```
15311    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15312    where
15313        T: std::convert::Into<wkt::Timestamp>,
15314    {
15315        self.end_time = v.map(|x| x.into());
15316        self
15317    }
15318
15319    /// Sets the value of [target][crate::model::DeleteFolderTreeMetadata::target].
15320    ///
15321    /// # Example
15322    /// ```ignore,no_run
15323    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15324    /// let x = DeleteFolderTreeMetadata::new().set_target("example");
15325    /// ```
15326    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15327        self.target = v.into();
15328        self
15329    }
15330
15331    /// Sets the value of [state][crate::model::DeleteFolderTreeMetadata::state].
15332    ///
15333    /// # Example
15334    /// ```ignore,no_run
15335    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15336    /// use google_cloud_dataform_v1::model::delete_folder_tree_metadata::State;
15337    /// let x0 = DeleteFolderTreeMetadata::new().set_state(State::Initialized);
15338    /// let x1 = DeleteFolderTreeMetadata::new().set_state(State::InProgress);
15339    /// let x2 = DeleteFolderTreeMetadata::new().set_state(State::Succeeded);
15340    /// ```
15341    pub fn set_state<T: std::convert::Into<crate::model::delete_folder_tree_metadata::State>>(
15342        mut self,
15343        v: T,
15344    ) -> Self {
15345        self.state = v.into();
15346        self
15347    }
15348
15349    /// Sets the value of [percent_complete][crate::model::DeleteFolderTreeMetadata::percent_complete].
15350    ///
15351    /// # Example
15352    /// ```ignore,no_run
15353    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15354    /// let x = DeleteFolderTreeMetadata::new().set_percent_complete(42);
15355    /// ```
15356    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15357        self.percent_complete = v.into();
15358        self
15359    }
15360}
15361
15362impl wkt::message::Message for DeleteFolderTreeMetadata {
15363    fn typename() -> &'static str {
15364        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderTreeMetadata"
15365    }
15366}
15367
15368/// Defines additional types related to [DeleteFolderTreeMetadata].
15369pub mod delete_folder_tree_metadata {
15370    #[allow(unused_imports)]
15371    use super::*;
15372
15373    /// Different states of the DeleteFolderTree operation.
15374    ///
15375    /// # Working with unknown values
15376    ///
15377    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15378    /// additional enum variants at any time. Adding new variants is not considered
15379    /// a breaking change. Applications should write their code in anticipation of:
15380    ///
15381    /// - New values appearing in future releases of the client library, **and**
15382    /// - New values received dynamically, without application changes.
15383    ///
15384    /// Please consult the [Working with enums] section in the user guide for some
15385    /// guidelines.
15386    ///
15387    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15388    #[derive(Clone, Debug, PartialEq)]
15389    #[non_exhaustive]
15390    pub enum State {
15391        /// The state is unspecified.
15392        Unspecified,
15393        /// The operation was initialized and recorded by the server, but not yet
15394        /// started.
15395        Initialized,
15396        /// The operation is in progress.
15397        InProgress,
15398        /// The operation has completed successfully.
15399        Succeeded,
15400        /// The operation has failed.
15401        Failed,
15402        /// If set, the enum was initialized with an unknown value.
15403        ///
15404        /// Applications can examine the value using [State::value] or
15405        /// [State::name].
15406        UnknownValue(state::UnknownValue),
15407    }
15408
15409    #[doc(hidden)]
15410    pub mod state {
15411        #[allow(unused_imports)]
15412        use super::*;
15413        #[derive(Clone, Debug, PartialEq)]
15414        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15415    }
15416
15417    impl State {
15418        /// Gets the enum value.
15419        ///
15420        /// Returns `None` if the enum contains an unknown value deserialized from
15421        /// the string representation of enums.
15422        pub fn value(&self) -> std::option::Option<i32> {
15423            match self {
15424                Self::Unspecified => std::option::Option::Some(0),
15425                Self::Initialized => std::option::Option::Some(1),
15426                Self::InProgress => std::option::Option::Some(2),
15427                Self::Succeeded => std::option::Option::Some(3),
15428                Self::Failed => std::option::Option::Some(4),
15429                Self::UnknownValue(u) => u.0.value(),
15430            }
15431        }
15432
15433        /// Gets the enum value as a string.
15434        ///
15435        /// Returns `None` if the enum contains an unknown value deserialized from
15436        /// the integer representation of enums.
15437        pub fn name(&self) -> std::option::Option<&str> {
15438            match self {
15439                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15440                Self::Initialized => std::option::Option::Some("INITIALIZED"),
15441                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
15442                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
15443                Self::Failed => std::option::Option::Some("FAILED"),
15444                Self::UnknownValue(u) => u.0.name(),
15445            }
15446        }
15447    }
15448
15449    impl std::default::Default for State {
15450        fn default() -> Self {
15451            use std::convert::From;
15452            Self::from(0)
15453        }
15454    }
15455
15456    impl std::fmt::Display for State {
15457        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15458            wkt::internal::display_enum(f, self.name(), self.value())
15459        }
15460    }
15461
15462    impl std::convert::From<i32> for State {
15463        fn from(value: i32) -> Self {
15464            match value {
15465                0 => Self::Unspecified,
15466                1 => Self::Initialized,
15467                2 => Self::InProgress,
15468                3 => Self::Succeeded,
15469                4 => Self::Failed,
15470                _ => Self::UnknownValue(state::UnknownValue(
15471                    wkt::internal::UnknownEnumValue::Integer(value),
15472                )),
15473            }
15474        }
15475    }
15476
15477    impl std::convert::From<&str> for State {
15478        fn from(value: &str) -> Self {
15479            use std::string::ToString;
15480            match value {
15481                "STATE_UNSPECIFIED" => Self::Unspecified,
15482                "INITIALIZED" => Self::Initialized,
15483                "IN_PROGRESS" => Self::InProgress,
15484                "SUCCEEDED" => Self::Succeeded,
15485                "FAILED" => Self::Failed,
15486                _ => Self::UnknownValue(state::UnknownValue(
15487                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15488                )),
15489            }
15490        }
15491    }
15492
15493    impl serde::ser::Serialize for State {
15494        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15495        where
15496            S: serde::Serializer,
15497        {
15498            match self {
15499                Self::Unspecified => serializer.serialize_i32(0),
15500                Self::Initialized => serializer.serialize_i32(1),
15501                Self::InProgress => serializer.serialize_i32(2),
15502                Self::Succeeded => serializer.serialize_i32(3),
15503                Self::Failed => serializer.serialize_i32(4),
15504                Self::UnknownValue(u) => u.0.serialize(serializer),
15505            }
15506        }
15507    }
15508
15509    impl<'de> serde::de::Deserialize<'de> for State {
15510        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15511        where
15512            D: serde::Deserializer<'de>,
15513        {
15514            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15515                ".google.cloud.dataform.v1.DeleteFolderTreeMetadata.State",
15516            ))
15517        }
15518    }
15519}
15520
15521/// `QueryFolderContents` request message.
15522#[derive(Clone, Default, PartialEq)]
15523#[non_exhaustive]
15524pub struct QueryFolderContentsRequest {
15525    /// Required. Name of the folder whose contents to list.
15526    /// Format: projects/*/locations/*/folders/*
15527    pub folder: std::string::String,
15528
15529    /// Optional. Maximum number of paths to return. The server may return fewer
15530    /// items than requested. If unspecified, the server will pick an appropriate
15531    /// default.
15532    pub page_size: i32,
15533
15534    /// Optional. Page token received from a previous `QueryFolderContents` call.
15535    /// Provide this to retrieve the subsequent page.
15536    ///
15537    /// When paginating, all other parameters provided to
15538    /// `QueryFolderContents`, with the exception of `page_size`, must match the
15539    /// call that provided the page token.
15540    pub page_token: std::string::String,
15541
15542    /// Optional. Field to additionally sort results by.
15543    /// Will order Folders before Repositories, and then by `order_by` in ascending
15544    /// order. Supported keywords: display_name (default), create_time,
15545    /// last_modified_time.
15546    /// Examples:
15547    ///
15548    /// - `orderBy="display_name"`
15549    /// - `orderBy="display_name desc"`
15550    pub order_by: std::string::String,
15551
15552    /// Optional. Optional filtering for the returned list. Filtering is currently
15553    /// only supported on the `display_name` field.
15554    ///
15555    /// Example:
15556    ///
15557    /// - `filter="display_name="MyFolder""`
15558    pub filter: std::string::String,
15559
15560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15561}
15562
15563impl QueryFolderContentsRequest {
15564    /// Creates a new default instance.
15565    pub fn new() -> Self {
15566        std::default::Default::default()
15567    }
15568
15569    /// Sets the value of [folder][crate::model::QueryFolderContentsRequest::folder].
15570    ///
15571    /// # Example
15572    /// ```ignore,no_run
15573    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15574    /// let x = QueryFolderContentsRequest::new().set_folder("example");
15575    /// ```
15576    pub fn set_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15577        self.folder = v.into();
15578        self
15579    }
15580
15581    /// Sets the value of [page_size][crate::model::QueryFolderContentsRequest::page_size].
15582    ///
15583    /// # Example
15584    /// ```ignore,no_run
15585    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15586    /// let x = QueryFolderContentsRequest::new().set_page_size(42);
15587    /// ```
15588    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15589        self.page_size = v.into();
15590        self
15591    }
15592
15593    /// Sets the value of [page_token][crate::model::QueryFolderContentsRequest::page_token].
15594    ///
15595    /// # Example
15596    /// ```ignore,no_run
15597    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15598    /// let x = QueryFolderContentsRequest::new().set_page_token("example");
15599    /// ```
15600    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15601        self.page_token = v.into();
15602        self
15603    }
15604
15605    /// Sets the value of [order_by][crate::model::QueryFolderContentsRequest::order_by].
15606    ///
15607    /// # Example
15608    /// ```ignore,no_run
15609    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15610    /// let x = QueryFolderContentsRequest::new().set_order_by("example");
15611    /// ```
15612    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15613        self.order_by = v.into();
15614        self
15615    }
15616
15617    /// Sets the value of [filter][crate::model::QueryFolderContentsRequest::filter].
15618    ///
15619    /// # Example
15620    /// ```ignore,no_run
15621    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15622    /// let x = QueryFolderContentsRequest::new().set_filter("example");
15623    /// ```
15624    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15625        self.filter = v.into();
15626        self
15627    }
15628}
15629
15630impl wkt::message::Message for QueryFolderContentsRequest {
15631    fn typename() -> &'static str {
15632        "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsRequest"
15633    }
15634}
15635
15636/// `QueryFolderContents` response message.
15637#[derive(Clone, Default, PartialEq)]
15638#[non_exhaustive]
15639pub struct QueryFolderContentsResponse {
15640    /// List of entries in the folder.
15641    pub entries: std::vec::Vec<crate::model::query_folder_contents_response::FolderContentsEntry>,
15642
15643    /// A token, which can be sent as `page_token` to retrieve the next page.
15644    /// If this field is omitted, there are no subsequent pages.
15645    pub next_page_token: std::string::String,
15646
15647    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15648}
15649
15650impl QueryFolderContentsResponse {
15651    /// Creates a new default instance.
15652    pub fn new() -> Self {
15653        std::default::Default::default()
15654    }
15655
15656    /// Sets the value of [entries][crate::model::QueryFolderContentsResponse::entries].
15657    ///
15658    /// # Example
15659    /// ```ignore,no_run
15660    /// # use google_cloud_dataform_v1::model::QueryFolderContentsResponse;
15661    /// use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
15662    /// let x = QueryFolderContentsResponse::new()
15663    ///     .set_entries([
15664    ///         FolderContentsEntry::default()/* use setters */,
15665    ///         FolderContentsEntry::default()/* use (different) setters */,
15666    ///     ]);
15667    /// ```
15668    pub fn set_entries<T, V>(mut self, v: T) -> Self
15669    where
15670        T: std::iter::IntoIterator<Item = V>,
15671        V: std::convert::Into<crate::model::query_folder_contents_response::FolderContentsEntry>,
15672    {
15673        use std::iter::Iterator;
15674        self.entries = v.into_iter().map(|i| i.into()).collect();
15675        self
15676    }
15677
15678    /// Sets the value of [next_page_token][crate::model::QueryFolderContentsResponse::next_page_token].
15679    ///
15680    /// # Example
15681    /// ```ignore,no_run
15682    /// # use google_cloud_dataform_v1::model::QueryFolderContentsResponse;
15683    /// let x = QueryFolderContentsResponse::new().set_next_page_token("example");
15684    /// ```
15685    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15686        self.next_page_token = v.into();
15687        self
15688    }
15689}
15690
15691impl wkt::message::Message for QueryFolderContentsResponse {
15692    fn typename() -> &'static str {
15693        "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsResponse"
15694    }
15695}
15696
15697#[doc(hidden)]
15698impl google_cloud_gax::paginator::internal::PageableResponse for QueryFolderContentsResponse {
15699    type PageItem = crate::model::query_folder_contents_response::FolderContentsEntry;
15700
15701    fn items(self) -> std::vec::Vec<Self::PageItem> {
15702        self.entries
15703    }
15704
15705    fn next_page_token(&self) -> std::string::String {
15706        use std::clone::Clone;
15707        self.next_page_token.clone()
15708    }
15709}
15710
15711/// Defines additional types related to [QueryFolderContentsResponse].
15712pub mod query_folder_contents_response {
15713    #[allow(unused_imports)]
15714    use super::*;
15715
15716    /// Represents a single content entry.
15717    #[derive(Clone, Default, PartialEq)]
15718    #[non_exhaustive]
15719    pub struct FolderContentsEntry {
15720        /// The content entry.
15721        pub entry: std::option::Option<
15722            crate::model::query_folder_contents_response::folder_contents_entry::Entry,
15723        >,
15724
15725        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15726    }
15727
15728    impl FolderContentsEntry {
15729        /// Creates a new default instance.
15730        pub fn new() -> Self {
15731            std::default::Default::default()
15732        }
15733
15734        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry].
15735        ///
15736        /// Note that all the setters affecting `entry` are mutually
15737        /// exclusive.
15738        ///
15739        /// # Example
15740        /// ```ignore,no_run
15741        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
15742        /// use google_cloud_dataform_v1::model::Folder;
15743        /// let x = FolderContentsEntry::new().set_entry(Some(
15744        ///     google_cloud_dataform_v1::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(Folder::default().into())));
15745        /// ```
15746        pub fn set_entry<
15747            T: std::convert::Into<
15748                    std::option::Option<
15749                        crate::model::query_folder_contents_response::folder_contents_entry::Entry,
15750                    >,
15751                >,
15752        >(
15753            mut self,
15754            v: T,
15755        ) -> Self {
15756            self.entry = v.into();
15757            self
15758        }
15759
15760        /// The value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
15761        /// if it holds a `Folder`, `None` if the field is not set or
15762        /// holds a different branch.
15763        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
15764            #[allow(unreachable_patterns)]
15765            self.entry.as_ref().and_then(|v| match v {
15766                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
15767                _ => std::option::Option::None,
15768            })
15769        }
15770
15771        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
15772        /// to hold a `Folder`.
15773        ///
15774        /// Note that all the setters affecting `entry` are
15775        /// mutually exclusive.
15776        ///
15777        /// # Example
15778        /// ```ignore,no_run
15779        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
15780        /// use google_cloud_dataform_v1::model::Folder;
15781        /// let x = FolderContentsEntry::new().set_folder(Folder::default()/* use setters */);
15782        /// assert!(x.folder().is_some());
15783        /// assert!(x.repository().is_none());
15784        /// ```
15785        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
15786            mut self,
15787            v: T,
15788        ) -> Self {
15789            self.entry = std::option::Option::Some(
15790                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(
15791                    v.into(),
15792                ),
15793            );
15794            self
15795        }
15796
15797        /// The value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
15798        /// if it holds a `Repository`, `None` if the field is not set or
15799        /// holds a different branch.
15800        pub fn repository(
15801            &self,
15802        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
15803            #[allow(unreachable_patterns)]
15804            self.entry.as_ref().and_then(|v| match v {
15805                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
15806                _ => std::option::Option::None,
15807            })
15808        }
15809
15810        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
15811        /// to hold a `Repository`.
15812        ///
15813        /// Note that all the setters affecting `entry` are
15814        /// mutually exclusive.
15815        ///
15816        /// # Example
15817        /// ```ignore,no_run
15818        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
15819        /// use google_cloud_dataform_v1::model::Repository;
15820        /// let x = FolderContentsEntry::new().set_repository(Repository::default()/* use setters */);
15821        /// assert!(x.repository().is_some());
15822        /// assert!(x.folder().is_none());
15823        /// ```
15824        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
15825            mut self,
15826            v: T,
15827        ) -> Self {
15828            self.entry = std::option::Option::Some(
15829                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Repository(
15830                    v.into()
15831                )
15832            );
15833            self
15834        }
15835    }
15836
15837    impl wkt::message::Message for FolderContentsEntry {
15838        fn typename() -> &'static str {
15839            "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsResponse.FolderContentsEntry"
15840        }
15841    }
15842
15843    /// Defines additional types related to [FolderContentsEntry].
15844    pub mod folder_contents_entry {
15845        #[allow(unused_imports)]
15846        use super::*;
15847
15848        /// The content entry.
15849        #[derive(Clone, Debug, PartialEq)]
15850        #[non_exhaustive]
15851        pub enum Entry {
15852            /// A subfolder.
15853            Folder(std::boxed::Box<crate::model::Folder>),
15854            /// A repository.
15855            Repository(std::boxed::Box<crate::model::Repository>),
15856        }
15857    }
15858}
15859
15860/// `QueryUserRootContents` request message.
15861#[derive(Clone, Default, PartialEq)]
15862#[non_exhaustive]
15863pub struct QueryUserRootContentsRequest {
15864    /// Required. Location of the user root folder whose contents to list.
15865    /// Format: projects/*/locations/*
15866    pub location: std::string::String,
15867
15868    /// Optional. Maximum number of paths to return. The server may return fewer
15869    /// items than requested. If unspecified, the server will pick an appropriate
15870    /// default.
15871    pub page_size: i32,
15872
15873    /// Optional. Page token received from a previous `QueryUserRootContents` call.
15874    /// Provide this to retrieve the subsequent page.
15875    ///
15876    /// When paginating, all other parameters provided to
15877    /// `QueryUserRootFolderContents`, with the exception of `page_size`, must
15878    /// match the call that provided the page token.
15879    pub page_token: std::string::String,
15880
15881    /// Optional. Field to additionally sort results by.
15882    /// Will order Folders before Repositories, and then by `order_by` in ascending
15883    /// order. Supported keywords: display_name (default), created_at,
15884    /// last_modified_at. Examples:
15885    ///
15886    /// - `orderBy="display_name"`
15887    /// - `orderBy="display_name desc"`
15888    pub order_by: std::string::String,
15889
15890    /// Optional. Optional filtering for the returned list. Filtering is currently
15891    /// only supported on the `display_name` field.
15892    ///
15893    /// Example:
15894    ///
15895    /// - `filter="display_name="MyFolder""`
15896    pub filter: std::string::String,
15897
15898    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15899}
15900
15901impl QueryUserRootContentsRequest {
15902    /// Creates a new default instance.
15903    pub fn new() -> Self {
15904        std::default::Default::default()
15905    }
15906
15907    /// Sets the value of [location][crate::model::QueryUserRootContentsRequest::location].
15908    ///
15909    /// # Example
15910    /// ```ignore,no_run
15911    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
15912    /// let x = QueryUserRootContentsRequest::new().set_location("example");
15913    /// ```
15914    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15915        self.location = v.into();
15916        self
15917    }
15918
15919    /// Sets the value of [page_size][crate::model::QueryUserRootContentsRequest::page_size].
15920    ///
15921    /// # Example
15922    /// ```ignore,no_run
15923    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
15924    /// let x = QueryUserRootContentsRequest::new().set_page_size(42);
15925    /// ```
15926    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15927        self.page_size = v.into();
15928        self
15929    }
15930
15931    /// Sets the value of [page_token][crate::model::QueryUserRootContentsRequest::page_token].
15932    ///
15933    /// # Example
15934    /// ```ignore,no_run
15935    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
15936    /// let x = QueryUserRootContentsRequest::new().set_page_token("example");
15937    /// ```
15938    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15939        self.page_token = v.into();
15940        self
15941    }
15942
15943    /// Sets the value of [order_by][crate::model::QueryUserRootContentsRequest::order_by].
15944    ///
15945    /// # Example
15946    /// ```ignore,no_run
15947    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
15948    /// let x = QueryUserRootContentsRequest::new().set_order_by("example");
15949    /// ```
15950    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15951        self.order_by = v.into();
15952        self
15953    }
15954
15955    /// Sets the value of [filter][crate::model::QueryUserRootContentsRequest::filter].
15956    ///
15957    /// # Example
15958    /// ```ignore,no_run
15959    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
15960    /// let x = QueryUserRootContentsRequest::new().set_filter("example");
15961    /// ```
15962    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15963        self.filter = v.into();
15964        self
15965    }
15966}
15967
15968impl wkt::message::Message for QueryUserRootContentsRequest {
15969    fn typename() -> &'static str {
15970        "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsRequest"
15971    }
15972}
15973
15974/// `QueryUserRootContents` response message.
15975#[derive(Clone, Default, PartialEq)]
15976#[non_exhaustive]
15977pub struct QueryUserRootContentsResponse {
15978    /// List of entries in the folder.
15979    pub entries: std::vec::Vec<crate::model::query_user_root_contents_response::RootContentsEntry>,
15980
15981    /// A token, which can be sent as `page_token` to retrieve the next page.
15982    /// If this field is omitted, there are no subsequent pages.
15983    pub next_page_token: std::string::String,
15984
15985    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15986}
15987
15988impl QueryUserRootContentsResponse {
15989    /// Creates a new default instance.
15990    pub fn new() -> Self {
15991        std::default::Default::default()
15992    }
15993
15994    /// Sets the value of [entries][crate::model::QueryUserRootContentsResponse::entries].
15995    ///
15996    /// # Example
15997    /// ```ignore,no_run
15998    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsResponse;
15999    /// use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16000    /// let x = QueryUserRootContentsResponse::new()
16001    ///     .set_entries([
16002    ///         RootContentsEntry::default()/* use setters */,
16003    ///         RootContentsEntry::default()/* use (different) setters */,
16004    ///     ]);
16005    /// ```
16006    pub fn set_entries<T, V>(mut self, v: T) -> Self
16007    where
16008        T: std::iter::IntoIterator<Item = V>,
16009        V: std::convert::Into<crate::model::query_user_root_contents_response::RootContentsEntry>,
16010    {
16011        use std::iter::Iterator;
16012        self.entries = v.into_iter().map(|i| i.into()).collect();
16013        self
16014    }
16015
16016    /// Sets the value of [next_page_token][crate::model::QueryUserRootContentsResponse::next_page_token].
16017    ///
16018    /// # Example
16019    /// ```ignore,no_run
16020    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsResponse;
16021    /// let x = QueryUserRootContentsResponse::new().set_next_page_token("example");
16022    /// ```
16023    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16024        self.next_page_token = v.into();
16025        self
16026    }
16027}
16028
16029impl wkt::message::Message for QueryUserRootContentsResponse {
16030    fn typename() -> &'static str {
16031        "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsResponse"
16032    }
16033}
16034
16035#[doc(hidden)]
16036impl google_cloud_gax::paginator::internal::PageableResponse for QueryUserRootContentsResponse {
16037    type PageItem = crate::model::query_user_root_contents_response::RootContentsEntry;
16038
16039    fn items(self) -> std::vec::Vec<Self::PageItem> {
16040        self.entries
16041    }
16042
16043    fn next_page_token(&self) -> std::string::String {
16044        use std::clone::Clone;
16045        self.next_page_token.clone()
16046    }
16047}
16048
16049/// Defines additional types related to [QueryUserRootContentsResponse].
16050pub mod query_user_root_contents_response {
16051    #[allow(unused_imports)]
16052    use super::*;
16053
16054    /// Represents a single content entry.
16055    #[derive(Clone, Default, PartialEq)]
16056    #[non_exhaustive]
16057    pub struct RootContentsEntry {
16058        /// The content entry.
16059        pub entry: std::option::Option<
16060            crate::model::query_user_root_contents_response::root_contents_entry::Entry,
16061        >,
16062
16063        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16064    }
16065
16066    impl RootContentsEntry {
16067        /// Creates a new default instance.
16068        pub fn new() -> Self {
16069            std::default::Default::default()
16070        }
16071
16072        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry].
16073        ///
16074        /// Note that all the setters affecting `entry` are mutually
16075        /// exclusive.
16076        ///
16077        /// # Example
16078        /// ```ignore,no_run
16079        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16080        /// use google_cloud_dataform_v1::model::Folder;
16081        /// let x = RootContentsEntry::new().set_entry(Some(
16082        ///     google_cloud_dataform_v1::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(Folder::default().into())));
16083        /// ```
16084        pub fn set_entry<
16085            T: std::convert::Into<
16086                    std::option::Option<
16087                        crate::model::query_user_root_contents_response::root_contents_entry::Entry,
16088                    >,
16089                >,
16090        >(
16091            mut self,
16092            v: T,
16093        ) -> Self {
16094            self.entry = v.into();
16095            self
16096        }
16097
16098        /// The value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16099        /// if it holds a `Folder`, `None` if the field is not set or
16100        /// holds a different branch.
16101        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
16102            #[allow(unreachable_patterns)]
16103            self.entry.as_ref().and_then(|v| match v {
16104                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
16105                _ => std::option::Option::None,
16106            })
16107        }
16108
16109        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16110        /// to hold a `Folder`.
16111        ///
16112        /// Note that all the setters affecting `entry` are
16113        /// mutually exclusive.
16114        ///
16115        /// # Example
16116        /// ```ignore,no_run
16117        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16118        /// use google_cloud_dataform_v1::model::Folder;
16119        /// let x = RootContentsEntry::new().set_folder(Folder::default()/* use setters */);
16120        /// assert!(x.folder().is_some());
16121        /// assert!(x.repository().is_none());
16122        /// ```
16123        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
16124            mut self,
16125            v: T,
16126        ) -> Self {
16127            self.entry = std::option::Option::Some(
16128                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(
16129                    v.into(),
16130                ),
16131            );
16132            self
16133        }
16134
16135        /// The value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16136        /// if it holds a `Repository`, `None` if the field is not set or
16137        /// holds a different branch.
16138        pub fn repository(
16139            &self,
16140        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
16141            #[allow(unreachable_patterns)]
16142            self.entry.as_ref().and_then(|v| match v {
16143                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
16144                _ => std::option::Option::None,
16145            })
16146        }
16147
16148        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16149        /// to hold a `Repository`.
16150        ///
16151        /// Note that all the setters affecting `entry` are
16152        /// mutually exclusive.
16153        ///
16154        /// # Example
16155        /// ```ignore,no_run
16156        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16157        /// use google_cloud_dataform_v1::model::Repository;
16158        /// let x = RootContentsEntry::new().set_repository(Repository::default()/* use setters */);
16159        /// assert!(x.repository().is_some());
16160        /// assert!(x.folder().is_none());
16161        /// ```
16162        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
16163            mut self,
16164            v: T,
16165        ) -> Self {
16166            self.entry = std::option::Option::Some(
16167                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Repository(
16168                    v.into()
16169                )
16170            );
16171            self
16172        }
16173    }
16174
16175    impl wkt::message::Message for RootContentsEntry {
16176        fn typename() -> &'static str {
16177            "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsResponse.RootContentsEntry"
16178        }
16179    }
16180
16181    /// Defines additional types related to [RootContentsEntry].
16182    pub mod root_contents_entry {
16183        #[allow(unused_imports)]
16184        use super::*;
16185
16186        /// The content entry.
16187        #[derive(Clone, Debug, PartialEq)]
16188        #[non_exhaustive]
16189        pub enum Entry {
16190            /// A subfolder.
16191            Folder(std::boxed::Box<crate::model::Folder>),
16192            /// A repository.
16193            Repository(std::boxed::Box<crate::model::Repository>),
16194        }
16195    }
16196}
16197
16198/// Represents a Dataform TeamFolder. This is a resource that sits at the project
16199/// level and is used to organize Repositories and Folders with hierarchical
16200/// access controls. They provide a team context and stricter access controls.
16201#[derive(Clone, Default, PartialEq)]
16202#[non_exhaustive]
16203pub struct TeamFolder {
16204    /// Identifier. The TeamFolder's name.
16205    pub name: std::string::String,
16206
16207    /// Required. The TeamFolder's user-friendly name.
16208    pub display_name: std::string::String,
16209
16210    /// Output only. The timestamp of when the TeamFolder was created.
16211    pub create_time: std::option::Option<wkt::Timestamp>,
16212
16213    /// Output only. The timestamp of when the TeamFolder was last updated.
16214    pub update_time: std::option::Option<wkt::Timestamp>,
16215
16216    /// Output only. All the metadata information that is used internally to serve
16217    /// the resource. For example: timestamps, flags, status fields, etc. The
16218    /// format of this field is a JSON string.
16219    pub internal_metadata: std::option::Option<std::string::String>,
16220
16221    /// Output only. The IAM principal identifier of the creator of the TeamFolder.
16222    pub creator_iam_principal: std::option::Option<std::string::String>,
16223
16224    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16225}
16226
16227impl TeamFolder {
16228    /// Creates a new default instance.
16229    pub fn new() -> Self {
16230        std::default::Default::default()
16231    }
16232
16233    /// Sets the value of [name][crate::model::TeamFolder::name].
16234    ///
16235    /// # Example
16236    /// ```ignore,no_run
16237    /// # use google_cloud_dataform_v1::model::TeamFolder;
16238    /// let x = TeamFolder::new().set_name("example");
16239    /// ```
16240    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16241        self.name = v.into();
16242        self
16243    }
16244
16245    /// Sets the value of [display_name][crate::model::TeamFolder::display_name].
16246    ///
16247    /// # Example
16248    /// ```ignore,no_run
16249    /// # use google_cloud_dataform_v1::model::TeamFolder;
16250    /// let x = TeamFolder::new().set_display_name("example");
16251    /// ```
16252    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16253        self.display_name = v.into();
16254        self
16255    }
16256
16257    /// Sets the value of [create_time][crate::model::TeamFolder::create_time].
16258    ///
16259    /// # Example
16260    /// ```ignore,no_run
16261    /// # use google_cloud_dataform_v1::model::TeamFolder;
16262    /// use wkt::Timestamp;
16263    /// let x = TeamFolder::new().set_create_time(Timestamp::default()/* use setters */);
16264    /// ```
16265    pub fn set_create_time<T>(mut self, v: T) -> Self
16266    where
16267        T: std::convert::Into<wkt::Timestamp>,
16268    {
16269        self.create_time = std::option::Option::Some(v.into());
16270        self
16271    }
16272
16273    /// Sets or clears the value of [create_time][crate::model::TeamFolder::create_time].
16274    ///
16275    /// # Example
16276    /// ```ignore,no_run
16277    /// # use google_cloud_dataform_v1::model::TeamFolder;
16278    /// use wkt::Timestamp;
16279    /// let x = TeamFolder::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16280    /// let x = TeamFolder::new().set_or_clear_create_time(None::<Timestamp>);
16281    /// ```
16282    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16283    where
16284        T: std::convert::Into<wkt::Timestamp>,
16285    {
16286        self.create_time = v.map(|x| x.into());
16287        self
16288    }
16289
16290    /// Sets the value of [update_time][crate::model::TeamFolder::update_time].
16291    ///
16292    /// # Example
16293    /// ```ignore,no_run
16294    /// # use google_cloud_dataform_v1::model::TeamFolder;
16295    /// use wkt::Timestamp;
16296    /// let x = TeamFolder::new().set_update_time(Timestamp::default()/* use setters */);
16297    /// ```
16298    pub fn set_update_time<T>(mut self, v: T) -> Self
16299    where
16300        T: std::convert::Into<wkt::Timestamp>,
16301    {
16302        self.update_time = std::option::Option::Some(v.into());
16303        self
16304    }
16305
16306    /// Sets or clears the value of [update_time][crate::model::TeamFolder::update_time].
16307    ///
16308    /// # Example
16309    /// ```ignore,no_run
16310    /// # use google_cloud_dataform_v1::model::TeamFolder;
16311    /// use wkt::Timestamp;
16312    /// let x = TeamFolder::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16313    /// let x = TeamFolder::new().set_or_clear_update_time(None::<Timestamp>);
16314    /// ```
16315    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16316    where
16317        T: std::convert::Into<wkt::Timestamp>,
16318    {
16319        self.update_time = v.map(|x| x.into());
16320        self
16321    }
16322
16323    /// Sets the value of [internal_metadata][crate::model::TeamFolder::internal_metadata].
16324    ///
16325    /// # Example
16326    /// ```ignore,no_run
16327    /// # use google_cloud_dataform_v1::model::TeamFolder;
16328    /// let x = TeamFolder::new().set_internal_metadata("example");
16329    /// ```
16330    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
16331    where
16332        T: std::convert::Into<std::string::String>,
16333    {
16334        self.internal_metadata = std::option::Option::Some(v.into());
16335        self
16336    }
16337
16338    /// Sets or clears the value of [internal_metadata][crate::model::TeamFolder::internal_metadata].
16339    ///
16340    /// # Example
16341    /// ```ignore,no_run
16342    /// # use google_cloud_dataform_v1::model::TeamFolder;
16343    /// let x = TeamFolder::new().set_or_clear_internal_metadata(Some("example"));
16344    /// let x = TeamFolder::new().set_or_clear_internal_metadata(None::<String>);
16345    /// ```
16346    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16347    where
16348        T: std::convert::Into<std::string::String>,
16349    {
16350        self.internal_metadata = v.map(|x| x.into());
16351        self
16352    }
16353
16354    /// Sets the value of [creator_iam_principal][crate::model::TeamFolder::creator_iam_principal].
16355    ///
16356    /// # Example
16357    /// ```ignore,no_run
16358    /// # use google_cloud_dataform_v1::model::TeamFolder;
16359    /// let x = TeamFolder::new().set_creator_iam_principal("example");
16360    /// ```
16361    pub fn set_creator_iam_principal<T>(mut self, v: T) -> Self
16362    where
16363        T: std::convert::Into<std::string::String>,
16364    {
16365        self.creator_iam_principal = std::option::Option::Some(v.into());
16366        self
16367    }
16368
16369    /// Sets or clears the value of [creator_iam_principal][crate::model::TeamFolder::creator_iam_principal].
16370    ///
16371    /// # Example
16372    /// ```ignore,no_run
16373    /// # use google_cloud_dataform_v1::model::TeamFolder;
16374    /// let x = TeamFolder::new().set_or_clear_creator_iam_principal(Some("example"));
16375    /// let x = TeamFolder::new().set_or_clear_creator_iam_principal(None::<String>);
16376    /// ```
16377    pub fn set_or_clear_creator_iam_principal<T>(mut self, v: std::option::Option<T>) -> Self
16378    where
16379        T: std::convert::Into<std::string::String>,
16380    {
16381        self.creator_iam_principal = v.map(|x| x.into());
16382        self
16383    }
16384}
16385
16386impl wkt::message::Message for TeamFolder {
16387    fn typename() -> &'static str {
16388        "type.googleapis.com/google.cloud.dataform.v1.TeamFolder"
16389    }
16390}
16391
16392/// `CreateTeamFolder` request message.
16393#[derive(Clone, Default, PartialEq)]
16394#[non_exhaustive]
16395pub struct CreateTeamFolderRequest {
16396    /// Required. The location in which to create the TeamFolder. Must be in the
16397    /// format `projects/*/locations/*`.
16398    pub parent: std::string::String,
16399
16400    /// Required. The TeamFolder to create.
16401    pub team_folder: std::option::Option<crate::model::TeamFolder>,
16402
16403    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16404}
16405
16406impl CreateTeamFolderRequest {
16407    /// Creates a new default instance.
16408    pub fn new() -> Self {
16409        std::default::Default::default()
16410    }
16411
16412    /// Sets the value of [parent][crate::model::CreateTeamFolderRequest::parent].
16413    ///
16414    /// # Example
16415    /// ```ignore,no_run
16416    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16417    /// let x = CreateTeamFolderRequest::new().set_parent("example");
16418    /// ```
16419    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16420        self.parent = v.into();
16421        self
16422    }
16423
16424    /// Sets the value of [team_folder][crate::model::CreateTeamFolderRequest::team_folder].
16425    ///
16426    /// # Example
16427    /// ```ignore,no_run
16428    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16429    /// use google_cloud_dataform_v1::model::TeamFolder;
16430    /// let x = CreateTeamFolderRequest::new().set_team_folder(TeamFolder::default()/* use setters */);
16431    /// ```
16432    pub fn set_team_folder<T>(mut self, v: T) -> Self
16433    where
16434        T: std::convert::Into<crate::model::TeamFolder>,
16435    {
16436        self.team_folder = std::option::Option::Some(v.into());
16437        self
16438    }
16439
16440    /// Sets or clears the value of [team_folder][crate::model::CreateTeamFolderRequest::team_folder].
16441    ///
16442    /// # Example
16443    /// ```ignore,no_run
16444    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16445    /// use google_cloud_dataform_v1::model::TeamFolder;
16446    /// let x = CreateTeamFolderRequest::new().set_or_clear_team_folder(Some(TeamFolder::default()/* use setters */));
16447    /// let x = CreateTeamFolderRequest::new().set_or_clear_team_folder(None::<TeamFolder>);
16448    /// ```
16449    pub fn set_or_clear_team_folder<T>(mut self, v: std::option::Option<T>) -> Self
16450    where
16451        T: std::convert::Into<crate::model::TeamFolder>,
16452    {
16453        self.team_folder = v.map(|x| x.into());
16454        self
16455    }
16456}
16457
16458impl wkt::message::Message for CreateTeamFolderRequest {
16459    fn typename() -> &'static str {
16460        "type.googleapis.com/google.cloud.dataform.v1.CreateTeamFolderRequest"
16461    }
16462}
16463
16464/// `GetTeamFolder` request message.
16465#[derive(Clone, Default, PartialEq)]
16466#[non_exhaustive]
16467pub struct GetTeamFolderRequest {
16468    /// Required. The TeamFolder's name.
16469    pub name: std::string::String,
16470
16471    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16472}
16473
16474impl GetTeamFolderRequest {
16475    /// Creates a new default instance.
16476    pub fn new() -> Self {
16477        std::default::Default::default()
16478    }
16479
16480    /// Sets the value of [name][crate::model::GetTeamFolderRequest::name].
16481    ///
16482    /// # Example
16483    /// ```ignore,no_run
16484    /// # use google_cloud_dataform_v1::model::GetTeamFolderRequest;
16485    /// let x = GetTeamFolderRequest::new().set_name("example");
16486    /// ```
16487    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16488        self.name = v.into();
16489        self
16490    }
16491}
16492
16493impl wkt::message::Message for GetTeamFolderRequest {
16494    fn typename() -> &'static str {
16495        "type.googleapis.com/google.cloud.dataform.v1.GetTeamFolderRequest"
16496    }
16497}
16498
16499/// `UpdateTeamFolder` request message.
16500#[derive(Clone, Default, PartialEq)]
16501#[non_exhaustive]
16502pub struct UpdateTeamFolderRequest {
16503    /// Optional. Specifies the fields to be updated in the Folder. If left unset,
16504    /// all fields will be updated.
16505    pub update_mask: std::option::Option<wkt::FieldMask>,
16506
16507    /// Required. The updated TeamFolder.
16508    pub team_folder: std::option::Option<crate::model::TeamFolder>,
16509
16510    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16511}
16512
16513impl UpdateTeamFolderRequest {
16514    /// Creates a new default instance.
16515    pub fn new() -> Self {
16516        std::default::Default::default()
16517    }
16518
16519    /// Sets the value of [update_mask][crate::model::UpdateTeamFolderRequest::update_mask].
16520    ///
16521    /// # Example
16522    /// ```ignore,no_run
16523    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16524    /// use wkt::FieldMask;
16525    /// let x = UpdateTeamFolderRequest::new().set_update_mask(FieldMask::default()/* use setters */);
16526    /// ```
16527    pub fn set_update_mask<T>(mut self, v: T) -> Self
16528    where
16529        T: std::convert::Into<wkt::FieldMask>,
16530    {
16531        self.update_mask = std::option::Option::Some(v.into());
16532        self
16533    }
16534
16535    /// Sets or clears the value of [update_mask][crate::model::UpdateTeamFolderRequest::update_mask].
16536    ///
16537    /// # Example
16538    /// ```ignore,no_run
16539    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16540    /// use wkt::FieldMask;
16541    /// let x = UpdateTeamFolderRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
16542    /// let x = UpdateTeamFolderRequest::new().set_or_clear_update_mask(None::<FieldMask>);
16543    /// ```
16544    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16545    where
16546        T: std::convert::Into<wkt::FieldMask>,
16547    {
16548        self.update_mask = v.map(|x| x.into());
16549        self
16550    }
16551
16552    /// Sets the value of [team_folder][crate::model::UpdateTeamFolderRequest::team_folder].
16553    ///
16554    /// # Example
16555    /// ```ignore,no_run
16556    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16557    /// use google_cloud_dataform_v1::model::TeamFolder;
16558    /// let x = UpdateTeamFolderRequest::new().set_team_folder(TeamFolder::default()/* use setters */);
16559    /// ```
16560    pub fn set_team_folder<T>(mut self, v: T) -> Self
16561    where
16562        T: std::convert::Into<crate::model::TeamFolder>,
16563    {
16564        self.team_folder = std::option::Option::Some(v.into());
16565        self
16566    }
16567
16568    /// Sets or clears the value of [team_folder][crate::model::UpdateTeamFolderRequest::team_folder].
16569    ///
16570    /// # Example
16571    /// ```ignore,no_run
16572    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16573    /// use google_cloud_dataform_v1::model::TeamFolder;
16574    /// let x = UpdateTeamFolderRequest::new().set_or_clear_team_folder(Some(TeamFolder::default()/* use setters */));
16575    /// let x = UpdateTeamFolderRequest::new().set_or_clear_team_folder(None::<TeamFolder>);
16576    /// ```
16577    pub fn set_or_clear_team_folder<T>(mut self, v: std::option::Option<T>) -> Self
16578    where
16579        T: std::convert::Into<crate::model::TeamFolder>,
16580    {
16581        self.team_folder = v.map(|x| x.into());
16582        self
16583    }
16584}
16585
16586impl wkt::message::Message for UpdateTeamFolderRequest {
16587    fn typename() -> &'static str {
16588        "type.googleapis.com/google.cloud.dataform.v1.UpdateTeamFolderRequest"
16589    }
16590}
16591
16592/// `DeleteTeamFolder` request message.
16593#[derive(Clone, Default, PartialEq)]
16594#[non_exhaustive]
16595pub struct DeleteTeamFolderRequest {
16596    /// Required. The TeamFolder's name.
16597    pub name: std::string::String,
16598
16599    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16600}
16601
16602impl DeleteTeamFolderRequest {
16603    /// Creates a new default instance.
16604    pub fn new() -> Self {
16605        std::default::Default::default()
16606    }
16607
16608    /// Sets the value of [name][crate::model::DeleteTeamFolderRequest::name].
16609    ///
16610    /// # Example
16611    /// ```ignore,no_run
16612    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderRequest;
16613    /// let x = DeleteTeamFolderRequest::new().set_name("example");
16614    /// ```
16615    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16616        self.name = v.into();
16617        self
16618    }
16619}
16620
16621impl wkt::message::Message for DeleteTeamFolderRequest {
16622    fn typename() -> &'static str {
16623        "type.googleapis.com/google.cloud.dataform.v1.DeleteTeamFolderRequest"
16624    }
16625}
16626
16627/// `QueryTeamFolderContents` request message.
16628#[derive(Clone, Default, PartialEq)]
16629#[non_exhaustive]
16630pub struct QueryTeamFolderContentsRequest {
16631    /// Required. Name of the team_folder whose contents to list.
16632    /// Format: `projects/*/locations/*/teamFolders/*`.
16633    pub team_folder: std::string::String,
16634
16635    /// Optional. Maximum number of paths to return. The server may return fewer
16636    /// items than requested. If unspecified, the server will pick an appropriate
16637    /// default.
16638    pub page_size: i32,
16639
16640    /// Optional. Page token received from a previous `QueryTeamFolderContents`
16641    /// call. Provide this to retrieve the subsequent page.
16642    ///
16643    /// When paginating, all other parameters provided to
16644    /// `QueryTeamFolderContents`, with the exception of `page_size`, must match
16645    /// the call that provided the page token.
16646    pub page_token: std::string::String,
16647
16648    /// Optional. Field to additionally sort results by.
16649    /// Will order Folders before Repositories, and then by `order_by` in ascending
16650    /// order. Supported keywords: `display_name` (default), `create_time`,
16651    /// last_modified_time.
16652    /// Examples:
16653    ///
16654    /// - `orderBy="display_name"`
16655    /// - `orderBy="display_name desc"`
16656    pub order_by: std::string::String,
16657
16658    /// Optional. Optional filtering for the returned list. Filtering is currently
16659    /// only supported on the `display_name` field.
16660    ///
16661    /// Example:
16662    ///
16663    /// - `filter="display_name="MyFolder""`
16664    pub filter: std::string::String,
16665
16666    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16667}
16668
16669impl QueryTeamFolderContentsRequest {
16670    /// Creates a new default instance.
16671    pub fn new() -> Self {
16672        std::default::Default::default()
16673    }
16674
16675    /// Sets the value of [team_folder][crate::model::QueryTeamFolderContentsRequest::team_folder].
16676    ///
16677    /// # Example
16678    /// ```ignore,no_run
16679    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16680    /// let x = QueryTeamFolderContentsRequest::new().set_team_folder("example");
16681    /// ```
16682    pub fn set_team_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16683        self.team_folder = v.into();
16684        self
16685    }
16686
16687    /// Sets the value of [page_size][crate::model::QueryTeamFolderContentsRequest::page_size].
16688    ///
16689    /// # Example
16690    /// ```ignore,no_run
16691    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16692    /// let x = QueryTeamFolderContentsRequest::new().set_page_size(42);
16693    /// ```
16694    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16695        self.page_size = v.into();
16696        self
16697    }
16698
16699    /// Sets the value of [page_token][crate::model::QueryTeamFolderContentsRequest::page_token].
16700    ///
16701    /// # Example
16702    /// ```ignore,no_run
16703    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16704    /// let x = QueryTeamFolderContentsRequest::new().set_page_token("example");
16705    /// ```
16706    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16707        self.page_token = v.into();
16708        self
16709    }
16710
16711    /// Sets the value of [order_by][crate::model::QueryTeamFolderContentsRequest::order_by].
16712    ///
16713    /// # Example
16714    /// ```ignore,no_run
16715    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16716    /// let x = QueryTeamFolderContentsRequest::new().set_order_by("example");
16717    /// ```
16718    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16719        self.order_by = v.into();
16720        self
16721    }
16722
16723    /// Sets the value of [filter][crate::model::QueryTeamFolderContentsRequest::filter].
16724    ///
16725    /// # Example
16726    /// ```ignore,no_run
16727    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16728    /// let x = QueryTeamFolderContentsRequest::new().set_filter("example");
16729    /// ```
16730    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16731        self.filter = v.into();
16732        self
16733    }
16734}
16735
16736impl wkt::message::Message for QueryTeamFolderContentsRequest {
16737    fn typename() -> &'static str {
16738        "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsRequest"
16739    }
16740}
16741
16742/// `QueryTeamFolderContents` response message.
16743#[derive(Clone, Default, PartialEq)]
16744#[non_exhaustive]
16745pub struct QueryTeamFolderContentsResponse {
16746    /// List of entries in the TeamFolder.
16747    pub entries:
16748        std::vec::Vec<crate::model::query_team_folder_contents_response::TeamFolderContentsEntry>,
16749
16750    /// A token, which can be sent as `page_token` to retrieve the next page.
16751    /// If this field is omitted, there are no subsequent pages.
16752    pub next_page_token: std::string::String,
16753
16754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16755}
16756
16757impl QueryTeamFolderContentsResponse {
16758    /// Creates a new default instance.
16759    pub fn new() -> Self {
16760        std::default::Default::default()
16761    }
16762
16763    /// Sets the value of [entries][crate::model::QueryTeamFolderContentsResponse::entries].
16764    ///
16765    /// # Example
16766    /// ```ignore,no_run
16767    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsResponse;
16768    /// use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
16769    /// let x = QueryTeamFolderContentsResponse::new()
16770    ///     .set_entries([
16771    ///         TeamFolderContentsEntry::default()/* use setters */,
16772    ///         TeamFolderContentsEntry::default()/* use (different) setters */,
16773    ///     ]);
16774    /// ```
16775    pub fn set_entries<T, V>(mut self, v: T) -> Self
16776    where
16777        T: std::iter::IntoIterator<Item = V>,
16778        V: std::convert::Into<
16779                crate::model::query_team_folder_contents_response::TeamFolderContentsEntry,
16780            >,
16781    {
16782        use std::iter::Iterator;
16783        self.entries = v.into_iter().map(|i| i.into()).collect();
16784        self
16785    }
16786
16787    /// Sets the value of [next_page_token][crate::model::QueryTeamFolderContentsResponse::next_page_token].
16788    ///
16789    /// # Example
16790    /// ```ignore,no_run
16791    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsResponse;
16792    /// let x = QueryTeamFolderContentsResponse::new().set_next_page_token("example");
16793    /// ```
16794    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16795        self.next_page_token = v.into();
16796        self
16797    }
16798}
16799
16800impl wkt::message::Message for QueryTeamFolderContentsResponse {
16801    fn typename() -> &'static str {
16802        "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsResponse"
16803    }
16804}
16805
16806#[doc(hidden)]
16807impl google_cloud_gax::paginator::internal::PageableResponse for QueryTeamFolderContentsResponse {
16808    type PageItem = crate::model::query_team_folder_contents_response::TeamFolderContentsEntry;
16809
16810    fn items(self) -> std::vec::Vec<Self::PageItem> {
16811        self.entries
16812    }
16813
16814    fn next_page_token(&self) -> std::string::String {
16815        use std::clone::Clone;
16816        self.next_page_token.clone()
16817    }
16818}
16819
16820/// Defines additional types related to [QueryTeamFolderContentsResponse].
16821pub mod query_team_folder_contents_response {
16822    #[allow(unused_imports)]
16823    use super::*;
16824
16825    /// Represents a single content entry.
16826    #[derive(Clone, Default, PartialEq)]
16827    #[non_exhaustive]
16828    pub struct TeamFolderContentsEntry {
16829        /// The content entry.
16830        pub entry: std::option::Option<
16831            crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry,
16832        >,
16833
16834        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16835    }
16836
16837    impl TeamFolderContentsEntry {
16838        /// Creates a new default instance.
16839        pub fn new() -> Self {
16840            std::default::Default::default()
16841        }
16842
16843        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry].
16844        ///
16845        /// Note that all the setters affecting `entry` are mutually
16846        /// exclusive.
16847        ///
16848        /// # Example
16849        /// ```ignore,no_run
16850        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
16851        /// use google_cloud_dataform_v1::model::Folder;
16852        /// let x = TeamFolderContentsEntry::new().set_entry(Some(
16853        ///     google_cloud_dataform_v1::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(Folder::default().into())));
16854        /// ```
16855        pub fn set_entry<T: std::convert::Into<std::option::Option<crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry>>>(mut self, v: T) -> Self
16856        {
16857            self.entry = v.into();
16858            self
16859        }
16860
16861        /// The value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
16862        /// if it holds a `Folder`, `None` if the field is not set or
16863        /// holds a different branch.
16864        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
16865            #[allow(unreachable_patterns)]
16866            self.entry.as_ref().and_then(|v| match v {
16867                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
16868                _ => std::option::Option::None,
16869            })
16870        }
16871
16872        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
16873        /// to hold a `Folder`.
16874        ///
16875        /// Note that all the setters affecting `entry` are
16876        /// mutually exclusive.
16877        ///
16878        /// # Example
16879        /// ```ignore,no_run
16880        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
16881        /// use google_cloud_dataform_v1::model::Folder;
16882        /// let x = TeamFolderContentsEntry::new().set_folder(Folder::default()/* use setters */);
16883        /// assert!(x.folder().is_some());
16884        /// assert!(x.repository().is_none());
16885        /// ```
16886        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
16887            mut self,
16888            v: T,
16889        ) -> Self {
16890            self.entry = std::option::Option::Some(
16891                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(
16892                    v.into()
16893                )
16894            );
16895            self
16896        }
16897
16898        /// The value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
16899        /// if it holds a `Repository`, `None` if the field is not set or
16900        /// holds a different branch.
16901        pub fn repository(
16902            &self,
16903        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
16904            #[allow(unreachable_patterns)]
16905            self.entry.as_ref().and_then(|v| match v {
16906                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
16907                _ => std::option::Option::None,
16908            })
16909        }
16910
16911        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
16912        /// to hold a `Repository`.
16913        ///
16914        /// Note that all the setters affecting `entry` are
16915        /// mutually exclusive.
16916        ///
16917        /// # Example
16918        /// ```ignore,no_run
16919        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
16920        /// use google_cloud_dataform_v1::model::Repository;
16921        /// let x = TeamFolderContentsEntry::new().set_repository(Repository::default()/* use setters */);
16922        /// assert!(x.repository().is_some());
16923        /// assert!(x.folder().is_none());
16924        /// ```
16925        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
16926            mut self,
16927            v: T,
16928        ) -> Self {
16929            self.entry = std::option::Option::Some(
16930                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Repository(
16931                    v.into()
16932                )
16933            );
16934            self
16935        }
16936    }
16937
16938    impl wkt::message::Message for TeamFolderContentsEntry {
16939        fn typename() -> &'static str {
16940            "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsResponse.TeamFolderContentsEntry"
16941        }
16942    }
16943
16944    /// Defines additional types related to [TeamFolderContentsEntry].
16945    pub mod team_folder_contents_entry {
16946        #[allow(unused_imports)]
16947        use super::*;
16948
16949        /// The content entry.
16950        #[derive(Clone, Debug, PartialEq)]
16951        #[non_exhaustive]
16952        pub enum Entry {
16953            /// A subfolder.
16954            Folder(std::boxed::Box<crate::model::Folder>),
16955            /// A repository.
16956            Repository(std::boxed::Box<crate::model::Repository>),
16957        }
16958    }
16959}
16960
16961/// `SearchTeamFolders` request message.
16962#[derive(Clone, Default, PartialEq)]
16963#[non_exhaustive]
16964pub struct SearchTeamFoldersRequest {
16965    /// Required. Location in which to query TeamFolders.
16966    /// Format: `projects/*/locations/*`.
16967    pub location: std::string::String,
16968
16969    /// Optional. Maximum number of TeamFolders to return. The server may return
16970    /// fewer items than requested. If unspecified, the server will pick an
16971    /// appropriate default.
16972    pub page_size: i32,
16973
16974    /// Optional. Page token received from a previous `SearchTeamFolders` call.
16975    /// Provide this to retrieve the subsequent page.
16976    ///
16977    /// When paginating, all other parameters provided to
16978    /// `SearchTeamFolders`, with the exception of `page_size`, must
16979    /// match the call that provided the page token.
16980    pub page_token: std::string::String,
16981
16982    /// Optional. Field to additionally sort results by.
16983    /// Supported keywords: `display_name` (default), `create_time`,
16984    /// `last_modified_time`. Examples:
16985    ///
16986    /// - `orderBy="display_name"`
16987    /// - `orderBy="display_name desc"`
16988    pub order_by: std::string::String,
16989
16990    /// Optional. Optional filtering for the returned list. Filtering is currently
16991    /// only supported on the `display_name` field.
16992    ///
16993    /// Example:
16994    ///
16995    /// - `filter="display_name="MyFolder""`
16996    pub filter: std::string::String,
16997
16998    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16999}
17000
17001impl SearchTeamFoldersRequest {
17002    /// Creates a new default instance.
17003    pub fn new() -> Self {
17004        std::default::Default::default()
17005    }
17006
17007    /// Sets the value of [location][crate::model::SearchTeamFoldersRequest::location].
17008    ///
17009    /// # Example
17010    /// ```ignore,no_run
17011    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17012    /// let x = SearchTeamFoldersRequest::new().set_location("example");
17013    /// ```
17014    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17015        self.location = v.into();
17016        self
17017    }
17018
17019    /// Sets the value of [page_size][crate::model::SearchTeamFoldersRequest::page_size].
17020    ///
17021    /// # Example
17022    /// ```ignore,no_run
17023    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17024    /// let x = SearchTeamFoldersRequest::new().set_page_size(42);
17025    /// ```
17026    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17027        self.page_size = v.into();
17028        self
17029    }
17030
17031    /// Sets the value of [page_token][crate::model::SearchTeamFoldersRequest::page_token].
17032    ///
17033    /// # Example
17034    /// ```ignore,no_run
17035    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17036    /// let x = SearchTeamFoldersRequest::new().set_page_token("example");
17037    /// ```
17038    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17039        self.page_token = v.into();
17040        self
17041    }
17042
17043    /// Sets the value of [order_by][crate::model::SearchTeamFoldersRequest::order_by].
17044    ///
17045    /// # Example
17046    /// ```ignore,no_run
17047    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17048    /// let x = SearchTeamFoldersRequest::new().set_order_by("example");
17049    /// ```
17050    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17051        self.order_by = v.into();
17052        self
17053    }
17054
17055    /// Sets the value of [filter][crate::model::SearchTeamFoldersRequest::filter].
17056    ///
17057    /// # Example
17058    /// ```ignore,no_run
17059    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17060    /// let x = SearchTeamFoldersRequest::new().set_filter("example");
17061    /// ```
17062    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17063        self.filter = v.into();
17064        self
17065    }
17066}
17067
17068impl wkt::message::Message for SearchTeamFoldersRequest {
17069    fn typename() -> &'static str {
17070        "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersRequest"
17071    }
17072}
17073
17074/// `SearchTeamFolders` response message.
17075#[derive(Clone, Default, PartialEq)]
17076#[non_exhaustive]
17077pub struct SearchTeamFoldersResponse {
17078    /// List of TeamFolders that match the search query.
17079    pub results: std::vec::Vec<crate::model::search_team_folders_response::TeamFolderSearchResult>,
17080
17081    /// A token, which can be sent as `page_token` to retrieve the next page.
17082    /// If this field is omitted, there are no subsequent pages.
17083    pub next_page_token: std::string::String,
17084
17085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17086}
17087
17088impl SearchTeamFoldersResponse {
17089    /// Creates a new default instance.
17090    pub fn new() -> Self {
17091        std::default::Default::default()
17092    }
17093
17094    /// Sets the value of [results][crate::model::SearchTeamFoldersResponse::results].
17095    ///
17096    /// # Example
17097    /// ```ignore,no_run
17098    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersResponse;
17099    /// use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17100    /// let x = SearchTeamFoldersResponse::new()
17101    ///     .set_results([
17102    ///         TeamFolderSearchResult::default()/* use setters */,
17103    ///         TeamFolderSearchResult::default()/* use (different) setters */,
17104    ///     ]);
17105    /// ```
17106    pub fn set_results<T, V>(mut self, v: T) -> Self
17107    where
17108        T: std::iter::IntoIterator<Item = V>,
17109        V: std::convert::Into<crate::model::search_team_folders_response::TeamFolderSearchResult>,
17110    {
17111        use std::iter::Iterator;
17112        self.results = v.into_iter().map(|i| i.into()).collect();
17113        self
17114    }
17115
17116    /// Sets the value of [next_page_token][crate::model::SearchTeamFoldersResponse::next_page_token].
17117    ///
17118    /// # Example
17119    /// ```ignore,no_run
17120    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersResponse;
17121    /// let x = SearchTeamFoldersResponse::new().set_next_page_token("example");
17122    /// ```
17123    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17124        self.next_page_token = v.into();
17125        self
17126    }
17127}
17128
17129impl wkt::message::Message for SearchTeamFoldersResponse {
17130    fn typename() -> &'static str {
17131        "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersResponse"
17132    }
17133}
17134
17135#[doc(hidden)]
17136impl google_cloud_gax::paginator::internal::PageableResponse for SearchTeamFoldersResponse {
17137    type PageItem = crate::model::search_team_folders_response::TeamFolderSearchResult;
17138
17139    fn items(self) -> std::vec::Vec<Self::PageItem> {
17140        self.results
17141    }
17142
17143    fn next_page_token(&self) -> std::string::String {
17144        use std::clone::Clone;
17145        self.next_page_token.clone()
17146    }
17147}
17148
17149/// Defines additional types related to [SearchTeamFoldersResponse].
17150pub mod search_team_folders_response {
17151    #[allow(unused_imports)]
17152    use super::*;
17153
17154    /// Represents a single content entry.
17155    #[derive(Clone, Default, PartialEq)]
17156    #[non_exhaustive]
17157    pub struct TeamFolderSearchResult {
17158        /// The content entry.
17159        pub entry: std::option::Option<
17160            crate::model::search_team_folders_response::team_folder_search_result::Entry,
17161        >,
17162
17163        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17164    }
17165
17166    impl TeamFolderSearchResult {
17167        /// Creates a new default instance.
17168        pub fn new() -> Self {
17169            std::default::Default::default()
17170        }
17171
17172        /// Sets the value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry].
17173        ///
17174        /// Note that all the setters affecting `entry` are mutually
17175        /// exclusive.
17176        ///
17177        /// # Example
17178        /// ```ignore,no_run
17179        /// # use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17180        /// use google_cloud_dataform_v1::model::TeamFolder;
17181        /// let x = TeamFolderSearchResult::new().set_entry(Some(
17182        ///     google_cloud_dataform_v1::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(TeamFolder::default().into())));
17183        /// ```
17184        pub fn set_entry<T: std::convert::Into<std::option::Option<crate::model::search_team_folders_response::team_folder_search_result::Entry>>>(mut self, v: T) -> Self
17185        {
17186            self.entry = v.into();
17187            self
17188        }
17189
17190        /// The value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry]
17191        /// if it holds a `TeamFolder`, `None` if the field is not set or
17192        /// holds a different branch.
17193        pub fn team_folder(
17194            &self,
17195        ) -> std::option::Option<&std::boxed::Box<crate::model::TeamFolder>> {
17196            #[allow(unreachable_patterns)]
17197            self.entry.as_ref().and_then(|v| match v {
17198                crate::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(v) => std::option::Option::Some(v),
17199                _ => std::option::Option::None,
17200            })
17201        }
17202
17203        /// Sets the value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry]
17204        /// to hold a `TeamFolder`.
17205        ///
17206        /// Note that all the setters affecting `entry` are
17207        /// mutually exclusive.
17208        ///
17209        /// # Example
17210        /// ```ignore,no_run
17211        /// # use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17212        /// use google_cloud_dataform_v1::model::TeamFolder;
17213        /// let x = TeamFolderSearchResult::new().set_team_folder(TeamFolder::default()/* use setters */);
17214        /// assert!(x.team_folder().is_some());
17215        /// ```
17216        pub fn set_team_folder<T: std::convert::Into<std::boxed::Box<crate::model::TeamFolder>>>(
17217            mut self,
17218            v: T,
17219        ) -> Self {
17220            self.entry = std::option::Option::Some(
17221                crate::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(
17222                    v.into()
17223                )
17224            );
17225            self
17226        }
17227    }
17228
17229    impl wkt::message::Message for TeamFolderSearchResult {
17230        fn typename() -> &'static str {
17231            "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersResponse.TeamFolderSearchResult"
17232        }
17233    }
17234
17235    /// Defines additional types related to [TeamFolderSearchResult].
17236    pub mod team_folder_search_result {
17237        #[allow(unused_imports)]
17238        use super::*;
17239
17240        /// The content entry.
17241        #[derive(Clone, Debug, PartialEq)]
17242        #[non_exhaustive]
17243        pub enum Entry {
17244            /// A TeamFolder resource that is in the project / location.
17245            TeamFolder(std::boxed::Box<crate::model::TeamFolder>),
17246        }
17247    }
17248}
17249
17250/// Contains metadata about the progress of the MoveFolder Long-running
17251/// operations.
17252#[derive(Clone, Default, PartialEq)]
17253#[non_exhaustive]
17254pub struct MoveFolderMetadata {
17255    /// Output only. The time the operation was created.
17256    pub create_time: std::option::Option<wkt::Timestamp>,
17257
17258    /// Output only. The time the operation finished running.
17259    pub end_time: std::option::Option<wkt::Timestamp>,
17260
17261    /// Output only. Server-defined resource path for the target of the operation.
17262    pub target: std::string::String,
17263
17264    /// The state of the move.
17265    pub state: crate::model::move_folder_metadata::State,
17266
17267    /// Percent complete of the move [0, 100].
17268    pub percent_complete: i32,
17269
17270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17271}
17272
17273impl MoveFolderMetadata {
17274    /// Creates a new default instance.
17275    pub fn new() -> Self {
17276        std::default::Default::default()
17277    }
17278
17279    /// Sets the value of [create_time][crate::model::MoveFolderMetadata::create_time].
17280    ///
17281    /// # Example
17282    /// ```ignore,no_run
17283    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17284    /// use wkt::Timestamp;
17285    /// let x = MoveFolderMetadata::new().set_create_time(Timestamp::default()/* use setters */);
17286    /// ```
17287    pub fn set_create_time<T>(mut self, v: T) -> Self
17288    where
17289        T: std::convert::Into<wkt::Timestamp>,
17290    {
17291        self.create_time = std::option::Option::Some(v.into());
17292        self
17293    }
17294
17295    /// Sets or clears the value of [create_time][crate::model::MoveFolderMetadata::create_time].
17296    ///
17297    /// # Example
17298    /// ```ignore,no_run
17299    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17300    /// use wkt::Timestamp;
17301    /// let x = MoveFolderMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17302    /// let x = MoveFolderMetadata::new().set_or_clear_create_time(None::<Timestamp>);
17303    /// ```
17304    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17305    where
17306        T: std::convert::Into<wkt::Timestamp>,
17307    {
17308        self.create_time = v.map(|x| x.into());
17309        self
17310    }
17311
17312    /// Sets the value of [end_time][crate::model::MoveFolderMetadata::end_time].
17313    ///
17314    /// # Example
17315    /// ```ignore,no_run
17316    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17317    /// use wkt::Timestamp;
17318    /// let x = MoveFolderMetadata::new().set_end_time(Timestamp::default()/* use setters */);
17319    /// ```
17320    pub fn set_end_time<T>(mut self, v: T) -> Self
17321    where
17322        T: std::convert::Into<wkt::Timestamp>,
17323    {
17324        self.end_time = std::option::Option::Some(v.into());
17325        self
17326    }
17327
17328    /// Sets or clears the value of [end_time][crate::model::MoveFolderMetadata::end_time].
17329    ///
17330    /// # Example
17331    /// ```ignore,no_run
17332    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17333    /// use wkt::Timestamp;
17334    /// let x = MoveFolderMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
17335    /// let x = MoveFolderMetadata::new().set_or_clear_end_time(None::<Timestamp>);
17336    /// ```
17337    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
17338    where
17339        T: std::convert::Into<wkt::Timestamp>,
17340    {
17341        self.end_time = v.map(|x| x.into());
17342        self
17343    }
17344
17345    /// Sets the value of [target][crate::model::MoveFolderMetadata::target].
17346    ///
17347    /// # Example
17348    /// ```ignore,no_run
17349    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17350    /// let x = MoveFolderMetadata::new().set_target("example");
17351    /// ```
17352    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17353        self.target = v.into();
17354        self
17355    }
17356
17357    /// Sets the value of [state][crate::model::MoveFolderMetadata::state].
17358    ///
17359    /// # Example
17360    /// ```ignore,no_run
17361    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17362    /// use google_cloud_dataform_v1::model::move_folder_metadata::State;
17363    /// let x0 = MoveFolderMetadata::new().set_state(State::Initialized);
17364    /// let x1 = MoveFolderMetadata::new().set_state(State::InProgress);
17365    /// let x2 = MoveFolderMetadata::new().set_state(State::Success);
17366    /// ```
17367    pub fn set_state<T: std::convert::Into<crate::model::move_folder_metadata::State>>(
17368        mut self,
17369        v: T,
17370    ) -> Self {
17371        self.state = v.into();
17372        self
17373    }
17374
17375    /// Sets the value of [percent_complete][crate::model::MoveFolderMetadata::percent_complete].
17376    ///
17377    /// # Example
17378    /// ```ignore,no_run
17379    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17380    /// let x = MoveFolderMetadata::new().set_percent_complete(42);
17381    /// ```
17382    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17383        self.percent_complete = v.into();
17384        self
17385    }
17386}
17387
17388impl wkt::message::Message for MoveFolderMetadata {
17389    fn typename() -> &'static str {
17390        "type.googleapis.com/google.cloud.dataform.v1.MoveFolderMetadata"
17391    }
17392}
17393
17394/// Defines additional types related to [MoveFolderMetadata].
17395pub mod move_folder_metadata {
17396    #[allow(unused_imports)]
17397    use super::*;
17398
17399    /// Different states of the move.
17400    ///
17401    /// # Working with unknown values
17402    ///
17403    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17404    /// additional enum variants at any time. Adding new variants is not considered
17405    /// a breaking change. Applications should write their code in anticipation of:
17406    ///
17407    /// - New values appearing in future releases of the client library, **and**
17408    /// - New values received dynamically, without application changes.
17409    ///
17410    /// Please consult the [Working with enums] section in the user guide for some
17411    /// guidelines.
17412    ///
17413    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17414    #[derive(Clone, Debug, PartialEq)]
17415    #[non_exhaustive]
17416    pub enum State {
17417        /// The state is unspecified.
17418        Unspecified,
17419        /// The move was initialized and recorded by the server, but not yet started.
17420        Initialized,
17421        /// The move is in progress.
17422        InProgress,
17423        /// The move has completed successfully.
17424        Success,
17425        /// The move has failed.
17426        Failed,
17427        /// If set, the enum was initialized with an unknown value.
17428        ///
17429        /// Applications can examine the value using [State::value] or
17430        /// [State::name].
17431        UnknownValue(state::UnknownValue),
17432    }
17433
17434    #[doc(hidden)]
17435    pub mod state {
17436        #[allow(unused_imports)]
17437        use super::*;
17438        #[derive(Clone, Debug, PartialEq)]
17439        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17440    }
17441
17442    impl State {
17443        /// Gets the enum value.
17444        ///
17445        /// Returns `None` if the enum contains an unknown value deserialized from
17446        /// the string representation of enums.
17447        pub fn value(&self) -> std::option::Option<i32> {
17448            match self {
17449                Self::Unspecified => std::option::Option::Some(0),
17450                Self::Initialized => std::option::Option::Some(1),
17451                Self::InProgress => std::option::Option::Some(2),
17452                Self::Success => std::option::Option::Some(3),
17453                Self::Failed => std::option::Option::Some(4),
17454                Self::UnknownValue(u) => u.0.value(),
17455            }
17456        }
17457
17458        /// Gets the enum value as a string.
17459        ///
17460        /// Returns `None` if the enum contains an unknown value deserialized from
17461        /// the integer representation of enums.
17462        pub fn name(&self) -> std::option::Option<&str> {
17463            match self {
17464                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17465                Self::Initialized => std::option::Option::Some("INITIALIZED"),
17466                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
17467                Self::Success => std::option::Option::Some("SUCCESS"),
17468                Self::Failed => std::option::Option::Some("FAILED"),
17469                Self::UnknownValue(u) => u.0.name(),
17470            }
17471        }
17472    }
17473
17474    impl std::default::Default for State {
17475        fn default() -> Self {
17476            use std::convert::From;
17477            Self::from(0)
17478        }
17479    }
17480
17481    impl std::fmt::Display for State {
17482        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17483            wkt::internal::display_enum(f, self.name(), self.value())
17484        }
17485    }
17486
17487    impl std::convert::From<i32> for State {
17488        fn from(value: i32) -> Self {
17489            match value {
17490                0 => Self::Unspecified,
17491                1 => Self::Initialized,
17492                2 => Self::InProgress,
17493                3 => Self::Success,
17494                4 => Self::Failed,
17495                _ => Self::UnknownValue(state::UnknownValue(
17496                    wkt::internal::UnknownEnumValue::Integer(value),
17497                )),
17498            }
17499        }
17500    }
17501
17502    impl std::convert::From<&str> for State {
17503        fn from(value: &str) -> Self {
17504            use std::string::ToString;
17505            match value {
17506                "STATE_UNSPECIFIED" => Self::Unspecified,
17507                "INITIALIZED" => Self::Initialized,
17508                "IN_PROGRESS" => Self::InProgress,
17509                "SUCCESS" => Self::Success,
17510                "FAILED" => Self::Failed,
17511                _ => Self::UnknownValue(state::UnknownValue(
17512                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17513                )),
17514            }
17515        }
17516    }
17517
17518    impl serde::ser::Serialize for State {
17519        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17520        where
17521            S: serde::Serializer,
17522        {
17523            match self {
17524                Self::Unspecified => serializer.serialize_i32(0),
17525                Self::Initialized => serializer.serialize_i32(1),
17526                Self::InProgress => serializer.serialize_i32(2),
17527                Self::Success => serializer.serialize_i32(3),
17528                Self::Failed => serializer.serialize_i32(4),
17529                Self::UnknownValue(u) => u.0.serialize(serializer),
17530            }
17531        }
17532    }
17533
17534    impl<'de> serde::de::Deserialize<'de> for State {
17535        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17536        where
17537            D: serde::Deserializer<'de>,
17538        {
17539            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17540                ".google.cloud.dataform.v1.MoveFolderMetadata.State",
17541            ))
17542        }
17543    }
17544}
17545
17546/// Contains metadata about the progress of the MoveRepository Long-running
17547/// operations.
17548#[derive(Clone, Default, PartialEq)]
17549#[non_exhaustive]
17550pub struct MoveRepositoryMetadata {
17551    /// Output only. The time the operation was created.
17552    pub create_time: std::option::Option<wkt::Timestamp>,
17553
17554    /// Output only. The time the operation finished running.
17555    pub end_time: std::option::Option<wkt::Timestamp>,
17556
17557    /// Output only. Server-defined resource path for the target of the operation.
17558    pub target: std::string::String,
17559
17560    /// The state of the move.
17561    pub state: crate::model::move_repository_metadata::State,
17562
17563    /// Percent complete of the move [0, 100].
17564    pub percent_complete: i32,
17565
17566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17567}
17568
17569impl MoveRepositoryMetadata {
17570    /// Creates a new default instance.
17571    pub fn new() -> Self {
17572        std::default::Default::default()
17573    }
17574
17575    /// Sets the value of [create_time][crate::model::MoveRepositoryMetadata::create_time].
17576    ///
17577    /// # Example
17578    /// ```ignore,no_run
17579    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17580    /// use wkt::Timestamp;
17581    /// let x = MoveRepositoryMetadata::new().set_create_time(Timestamp::default()/* use setters */);
17582    /// ```
17583    pub fn set_create_time<T>(mut self, v: T) -> Self
17584    where
17585        T: std::convert::Into<wkt::Timestamp>,
17586    {
17587        self.create_time = std::option::Option::Some(v.into());
17588        self
17589    }
17590
17591    /// Sets or clears the value of [create_time][crate::model::MoveRepositoryMetadata::create_time].
17592    ///
17593    /// # Example
17594    /// ```ignore,no_run
17595    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17596    /// use wkt::Timestamp;
17597    /// let x = MoveRepositoryMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17598    /// let x = MoveRepositoryMetadata::new().set_or_clear_create_time(None::<Timestamp>);
17599    /// ```
17600    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17601    where
17602        T: std::convert::Into<wkt::Timestamp>,
17603    {
17604        self.create_time = v.map(|x| x.into());
17605        self
17606    }
17607
17608    /// Sets the value of [end_time][crate::model::MoveRepositoryMetadata::end_time].
17609    ///
17610    /// # Example
17611    /// ```ignore,no_run
17612    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17613    /// use wkt::Timestamp;
17614    /// let x = MoveRepositoryMetadata::new().set_end_time(Timestamp::default()/* use setters */);
17615    /// ```
17616    pub fn set_end_time<T>(mut self, v: T) -> Self
17617    where
17618        T: std::convert::Into<wkt::Timestamp>,
17619    {
17620        self.end_time = std::option::Option::Some(v.into());
17621        self
17622    }
17623
17624    /// Sets or clears the value of [end_time][crate::model::MoveRepositoryMetadata::end_time].
17625    ///
17626    /// # Example
17627    /// ```ignore,no_run
17628    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17629    /// use wkt::Timestamp;
17630    /// let x = MoveRepositoryMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
17631    /// let x = MoveRepositoryMetadata::new().set_or_clear_end_time(None::<Timestamp>);
17632    /// ```
17633    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
17634    where
17635        T: std::convert::Into<wkt::Timestamp>,
17636    {
17637        self.end_time = v.map(|x| x.into());
17638        self
17639    }
17640
17641    /// Sets the value of [target][crate::model::MoveRepositoryMetadata::target].
17642    ///
17643    /// # Example
17644    /// ```ignore,no_run
17645    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17646    /// let x = MoveRepositoryMetadata::new().set_target("example");
17647    /// ```
17648    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17649        self.target = v.into();
17650        self
17651    }
17652
17653    /// Sets the value of [state][crate::model::MoveRepositoryMetadata::state].
17654    ///
17655    /// # Example
17656    /// ```ignore,no_run
17657    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17658    /// use google_cloud_dataform_v1::model::move_repository_metadata::State;
17659    /// let x0 = MoveRepositoryMetadata::new().set_state(State::Initialized);
17660    /// let x1 = MoveRepositoryMetadata::new().set_state(State::InProgress);
17661    /// let x2 = MoveRepositoryMetadata::new().set_state(State::Success);
17662    /// ```
17663    pub fn set_state<T: std::convert::Into<crate::model::move_repository_metadata::State>>(
17664        mut self,
17665        v: T,
17666    ) -> Self {
17667        self.state = v.into();
17668        self
17669    }
17670
17671    /// Sets the value of [percent_complete][crate::model::MoveRepositoryMetadata::percent_complete].
17672    ///
17673    /// # Example
17674    /// ```ignore,no_run
17675    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17676    /// let x = MoveRepositoryMetadata::new().set_percent_complete(42);
17677    /// ```
17678    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17679        self.percent_complete = v.into();
17680        self
17681    }
17682}
17683
17684impl wkt::message::Message for MoveRepositoryMetadata {
17685    fn typename() -> &'static str {
17686        "type.googleapis.com/google.cloud.dataform.v1.MoveRepositoryMetadata"
17687    }
17688}
17689
17690/// Defines additional types related to [MoveRepositoryMetadata].
17691pub mod move_repository_metadata {
17692    #[allow(unused_imports)]
17693    use super::*;
17694
17695    /// Different states of the move.
17696    ///
17697    /// # Working with unknown values
17698    ///
17699    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17700    /// additional enum variants at any time. Adding new variants is not considered
17701    /// a breaking change. Applications should write their code in anticipation of:
17702    ///
17703    /// - New values appearing in future releases of the client library, **and**
17704    /// - New values received dynamically, without application changes.
17705    ///
17706    /// Please consult the [Working with enums] section in the user guide for some
17707    /// guidelines.
17708    ///
17709    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17710    #[derive(Clone, Debug, PartialEq)]
17711    #[non_exhaustive]
17712    pub enum State {
17713        /// The state is unspecified.
17714        Unspecified,
17715        /// The move was initialized and recorded by the server, but not yet started.
17716        Initialized,
17717        /// The move is in progress.
17718        InProgress,
17719        /// The move has completed successfully.
17720        Success,
17721        /// The move has failed.
17722        Failed,
17723        /// If set, the enum was initialized with an unknown value.
17724        ///
17725        /// Applications can examine the value using [State::value] or
17726        /// [State::name].
17727        UnknownValue(state::UnknownValue),
17728    }
17729
17730    #[doc(hidden)]
17731    pub mod state {
17732        #[allow(unused_imports)]
17733        use super::*;
17734        #[derive(Clone, Debug, PartialEq)]
17735        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17736    }
17737
17738    impl State {
17739        /// Gets the enum value.
17740        ///
17741        /// Returns `None` if the enum contains an unknown value deserialized from
17742        /// the string representation of enums.
17743        pub fn value(&self) -> std::option::Option<i32> {
17744            match self {
17745                Self::Unspecified => std::option::Option::Some(0),
17746                Self::Initialized => std::option::Option::Some(1),
17747                Self::InProgress => std::option::Option::Some(2),
17748                Self::Success => std::option::Option::Some(3),
17749                Self::Failed => std::option::Option::Some(4),
17750                Self::UnknownValue(u) => u.0.value(),
17751            }
17752        }
17753
17754        /// Gets the enum value as a string.
17755        ///
17756        /// Returns `None` if the enum contains an unknown value deserialized from
17757        /// the integer representation of enums.
17758        pub fn name(&self) -> std::option::Option<&str> {
17759            match self {
17760                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17761                Self::Initialized => std::option::Option::Some("INITIALIZED"),
17762                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
17763                Self::Success => std::option::Option::Some("SUCCESS"),
17764                Self::Failed => std::option::Option::Some("FAILED"),
17765                Self::UnknownValue(u) => u.0.name(),
17766            }
17767        }
17768    }
17769
17770    impl std::default::Default for State {
17771        fn default() -> Self {
17772            use std::convert::From;
17773            Self::from(0)
17774        }
17775    }
17776
17777    impl std::fmt::Display for State {
17778        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17779            wkt::internal::display_enum(f, self.name(), self.value())
17780        }
17781    }
17782
17783    impl std::convert::From<i32> for State {
17784        fn from(value: i32) -> Self {
17785            match value {
17786                0 => Self::Unspecified,
17787                1 => Self::Initialized,
17788                2 => Self::InProgress,
17789                3 => Self::Success,
17790                4 => Self::Failed,
17791                _ => Self::UnknownValue(state::UnknownValue(
17792                    wkt::internal::UnknownEnumValue::Integer(value),
17793                )),
17794            }
17795        }
17796    }
17797
17798    impl std::convert::From<&str> for State {
17799        fn from(value: &str) -> Self {
17800            use std::string::ToString;
17801            match value {
17802                "STATE_UNSPECIFIED" => Self::Unspecified,
17803                "INITIALIZED" => Self::Initialized,
17804                "IN_PROGRESS" => Self::InProgress,
17805                "SUCCESS" => Self::Success,
17806                "FAILED" => Self::Failed,
17807                _ => Self::UnknownValue(state::UnknownValue(
17808                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17809                )),
17810            }
17811        }
17812    }
17813
17814    impl serde::ser::Serialize for State {
17815        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17816        where
17817            S: serde::Serializer,
17818        {
17819            match self {
17820                Self::Unspecified => serializer.serialize_i32(0),
17821                Self::Initialized => serializer.serialize_i32(1),
17822                Self::InProgress => serializer.serialize_i32(2),
17823                Self::Success => serializer.serialize_i32(3),
17824                Self::Failed => serializer.serialize_i32(4),
17825                Self::UnknownValue(u) => u.0.serialize(serializer),
17826            }
17827        }
17828    }
17829
17830    impl<'de> serde::de::Deserialize<'de> for State {
17831        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17832        where
17833            D: serde::Deserializer<'de>,
17834        {
17835            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17836                ".google.cloud.dataform.v1.MoveRepositoryMetadata.State",
17837            ))
17838        }
17839    }
17840}
17841
17842/// Represents the level of detail to return for directory contents.
17843///
17844/// # Working with unknown values
17845///
17846/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17847/// additional enum variants at any time. Adding new variants is not considered
17848/// a breaking change. Applications should write their code in anticipation of:
17849///
17850/// - New values appearing in future releases of the client library, **and**
17851/// - New values received dynamically, without application changes.
17852///
17853/// Please consult the [Working with enums] section in the user guide for some
17854/// guidelines.
17855///
17856/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17857#[derive(Clone, Debug, PartialEq)]
17858#[non_exhaustive]
17859pub enum DirectoryContentsView {
17860    /// The default / unset value. Defaults to DIRECTORY_CONTENTS_VIEW_BASIC.
17861    Unspecified,
17862    /// Includes only the file or directory name. This is the default behavior.
17863    Basic,
17864    /// Includes all metadata for each file or directory. Currently not supported
17865    /// by CMEK-protected workspaces.
17866    Metadata,
17867    /// If set, the enum was initialized with an unknown value.
17868    ///
17869    /// Applications can examine the value using [DirectoryContentsView::value] or
17870    /// [DirectoryContentsView::name].
17871    UnknownValue(directory_contents_view::UnknownValue),
17872}
17873
17874#[doc(hidden)]
17875pub mod directory_contents_view {
17876    #[allow(unused_imports)]
17877    use super::*;
17878    #[derive(Clone, Debug, PartialEq)]
17879    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17880}
17881
17882impl DirectoryContentsView {
17883    /// Gets the enum value.
17884    ///
17885    /// Returns `None` if the enum contains an unknown value deserialized from
17886    /// the string representation of enums.
17887    pub fn value(&self) -> std::option::Option<i32> {
17888        match self {
17889            Self::Unspecified => std::option::Option::Some(0),
17890            Self::Basic => std::option::Option::Some(1),
17891            Self::Metadata => std::option::Option::Some(2),
17892            Self::UnknownValue(u) => u.0.value(),
17893        }
17894    }
17895
17896    /// Gets the enum value as a string.
17897    ///
17898    /// Returns `None` if the enum contains an unknown value deserialized from
17899    /// the integer representation of enums.
17900    pub fn name(&self) -> std::option::Option<&str> {
17901        match self {
17902            Self::Unspecified => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_UNSPECIFIED"),
17903            Self::Basic => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_BASIC"),
17904            Self::Metadata => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_METADATA"),
17905            Self::UnknownValue(u) => u.0.name(),
17906        }
17907    }
17908}
17909
17910impl std::default::Default for DirectoryContentsView {
17911    fn default() -> Self {
17912        use std::convert::From;
17913        Self::from(0)
17914    }
17915}
17916
17917impl std::fmt::Display for DirectoryContentsView {
17918    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17919        wkt::internal::display_enum(f, self.name(), self.value())
17920    }
17921}
17922
17923impl std::convert::From<i32> for DirectoryContentsView {
17924    fn from(value: i32) -> Self {
17925        match value {
17926            0 => Self::Unspecified,
17927            1 => Self::Basic,
17928            2 => Self::Metadata,
17929            _ => Self::UnknownValue(directory_contents_view::UnknownValue(
17930                wkt::internal::UnknownEnumValue::Integer(value),
17931            )),
17932        }
17933    }
17934}
17935
17936impl std::convert::From<&str> for DirectoryContentsView {
17937    fn from(value: &str) -> Self {
17938        use std::string::ToString;
17939        match value {
17940            "DIRECTORY_CONTENTS_VIEW_UNSPECIFIED" => Self::Unspecified,
17941            "DIRECTORY_CONTENTS_VIEW_BASIC" => Self::Basic,
17942            "DIRECTORY_CONTENTS_VIEW_METADATA" => Self::Metadata,
17943            _ => Self::UnknownValue(directory_contents_view::UnknownValue(
17944                wkt::internal::UnknownEnumValue::String(value.to_string()),
17945            )),
17946        }
17947    }
17948}
17949
17950impl serde::ser::Serialize for DirectoryContentsView {
17951    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17952    where
17953        S: serde::Serializer,
17954    {
17955        match self {
17956            Self::Unspecified => serializer.serialize_i32(0),
17957            Self::Basic => serializer.serialize_i32(1),
17958            Self::Metadata => serializer.serialize_i32(2),
17959            Self::UnknownValue(u) => u.0.serialize(serializer),
17960        }
17961    }
17962}
17963
17964impl<'de> serde::de::Deserialize<'de> for DirectoryContentsView {
17965    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17966    where
17967        D: serde::Deserializer<'de>,
17968    {
17969        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DirectoryContentsView>::new(
17970            ".google.cloud.dataform.v1.DirectoryContentsView",
17971        ))
17972    }
17973}