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 project_id = "project_id";
163    /// # let location_id = "location_id";
164    /// # let repository_id = "repository_id";
165    /// let x = Repository::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
166    /// ```
167    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
168        self.name = v.into();
169        self
170    }
171
172    /// Sets the value of [containing_folder][crate::model::Repository::containing_folder].
173    ///
174    /// # Example
175    /// ```ignore,no_run
176    /// # use google_cloud_dataform_v1::model::Repository;
177    /// let x = Repository::new().set_containing_folder("example");
178    /// ```
179    pub fn set_containing_folder<T>(mut self, v: T) -> Self
180    where
181        T: std::convert::Into<std::string::String>,
182    {
183        self.containing_folder = std::option::Option::Some(v.into());
184        self
185    }
186
187    /// Sets or clears the value of [containing_folder][crate::model::Repository::containing_folder].
188    ///
189    /// # Example
190    /// ```ignore,no_run
191    /// # use google_cloud_dataform_v1::model::Repository;
192    /// let x = Repository::new().set_or_clear_containing_folder(Some("example"));
193    /// let x = Repository::new().set_or_clear_containing_folder(None::<String>);
194    /// ```
195    pub fn set_or_clear_containing_folder<T>(mut self, v: std::option::Option<T>) -> Self
196    where
197        T: std::convert::Into<std::string::String>,
198    {
199        self.containing_folder = v.map(|x| x.into());
200        self
201    }
202
203    /// Sets the value of [team_folder_name][crate::model::Repository::team_folder_name].
204    ///
205    /// # Example
206    /// ```ignore,no_run
207    /// # use google_cloud_dataform_v1::model::Repository;
208    /// let x = Repository::new().set_team_folder_name("example");
209    /// ```
210    pub fn set_team_folder_name<T>(mut self, v: T) -> Self
211    where
212        T: std::convert::Into<std::string::String>,
213    {
214        self.team_folder_name = std::option::Option::Some(v.into());
215        self
216    }
217
218    /// Sets or clears the value of [team_folder_name][crate::model::Repository::team_folder_name].
219    ///
220    /// # Example
221    /// ```ignore,no_run
222    /// # use google_cloud_dataform_v1::model::Repository;
223    /// let x = Repository::new().set_or_clear_team_folder_name(Some("example"));
224    /// let x = Repository::new().set_or_clear_team_folder_name(None::<String>);
225    /// ```
226    pub fn set_or_clear_team_folder_name<T>(mut self, v: std::option::Option<T>) -> Self
227    where
228        T: std::convert::Into<std::string::String>,
229    {
230        self.team_folder_name = v.map(|x| x.into());
231        self
232    }
233
234    /// Sets the value of [create_time][crate::model::Repository::create_time].
235    ///
236    /// # Example
237    /// ```ignore,no_run
238    /// # use google_cloud_dataform_v1::model::Repository;
239    /// use wkt::Timestamp;
240    /// let x = Repository::new().set_create_time(Timestamp::default()/* use setters */);
241    /// ```
242    pub fn set_create_time<T>(mut self, v: T) -> Self
243    where
244        T: std::convert::Into<wkt::Timestamp>,
245    {
246        self.create_time = std::option::Option::Some(v.into());
247        self
248    }
249
250    /// Sets or clears the value of [create_time][crate::model::Repository::create_time].
251    ///
252    /// # Example
253    /// ```ignore,no_run
254    /// # use google_cloud_dataform_v1::model::Repository;
255    /// use wkt::Timestamp;
256    /// let x = Repository::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
257    /// let x = Repository::new().set_or_clear_create_time(None::<Timestamp>);
258    /// ```
259    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
260    where
261        T: std::convert::Into<wkt::Timestamp>,
262    {
263        self.create_time = v.map(|x| x.into());
264        self
265    }
266
267    /// Sets the value of [display_name][crate::model::Repository::display_name].
268    ///
269    /// # Example
270    /// ```ignore,no_run
271    /// # use google_cloud_dataform_v1::model::Repository;
272    /// let x = Repository::new().set_display_name("example");
273    /// ```
274    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
275        self.display_name = v.into();
276        self
277    }
278
279    /// Sets the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
280    ///
281    /// # Example
282    /// ```ignore,no_run
283    /// # use google_cloud_dataform_v1::model::Repository;
284    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
285    /// let x = Repository::new().set_git_remote_settings(GitRemoteSettings::default()/* use setters */);
286    /// ```
287    pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
288    where
289        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
290    {
291        self.git_remote_settings = std::option::Option::Some(v.into());
292        self
293    }
294
295    /// Sets or clears the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
296    ///
297    /// # Example
298    /// ```ignore,no_run
299    /// # use google_cloud_dataform_v1::model::Repository;
300    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
301    /// let x = Repository::new().set_or_clear_git_remote_settings(Some(GitRemoteSettings::default()/* use setters */));
302    /// let x = Repository::new().set_or_clear_git_remote_settings(None::<GitRemoteSettings>);
303    /// ```
304    pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
305    where
306        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
307    {
308        self.git_remote_settings = v.map(|x| x.into());
309        self
310    }
311
312    /// Sets the value of [npmrc_environment_variables_secret_version][crate::model::Repository::npmrc_environment_variables_secret_version].
313    ///
314    /// # Example
315    /// ```ignore,no_run
316    /// # use google_cloud_dataform_v1::model::Repository;
317    /// let x = Repository::new().set_npmrc_environment_variables_secret_version("example");
318    /// ```
319    pub fn set_npmrc_environment_variables_secret_version<
320        T: std::convert::Into<std::string::String>,
321    >(
322        mut self,
323        v: T,
324    ) -> Self {
325        self.npmrc_environment_variables_secret_version = v.into();
326        self
327    }
328
329    /// Sets the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
330    ///
331    /// # Example
332    /// ```ignore,no_run
333    /// # use google_cloud_dataform_v1::model::Repository;
334    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
335    /// let x = Repository::new().set_workspace_compilation_overrides(WorkspaceCompilationOverrides::default()/* use setters */);
336    /// ```
337    pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
338    where
339        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
340    {
341        self.workspace_compilation_overrides = std::option::Option::Some(v.into());
342        self
343    }
344
345    /// Sets or clears the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
346    ///
347    /// # Example
348    /// ```ignore,no_run
349    /// # use google_cloud_dataform_v1::model::Repository;
350    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
351    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(Some(WorkspaceCompilationOverrides::default()/* use setters */));
352    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(None::<WorkspaceCompilationOverrides>);
353    /// ```
354    pub fn set_or_clear_workspace_compilation_overrides<T>(
355        mut self,
356        v: std::option::Option<T>,
357    ) -> Self
358    where
359        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
360    {
361        self.workspace_compilation_overrides = v.map(|x| x.into());
362        self
363    }
364
365    /// Sets the value of [labels][crate::model::Repository::labels].
366    ///
367    /// # Example
368    /// ```ignore,no_run
369    /// # use google_cloud_dataform_v1::model::Repository;
370    /// let x = Repository::new().set_labels([
371    ///     ("key0", "abc"),
372    ///     ("key1", "xyz"),
373    /// ]);
374    /// ```
375    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
376    where
377        T: std::iter::IntoIterator<Item = (K, V)>,
378        K: std::convert::Into<std::string::String>,
379        V: std::convert::Into<std::string::String>,
380    {
381        use std::iter::Iterator;
382        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
383        self
384    }
385
386    /// Sets the value of [set_authenticated_user_admin][crate::model::Repository::set_authenticated_user_admin].
387    ///
388    /// # Example
389    /// ```ignore,no_run
390    /// # use google_cloud_dataform_v1::model::Repository;
391    /// let x = Repository::new().set_set_authenticated_user_admin(true);
392    /// ```
393    pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
394        self.set_authenticated_user_admin = v.into();
395        self
396    }
397
398    /// Sets the value of [service_account][crate::model::Repository::service_account].
399    ///
400    /// # Example
401    /// ```ignore,no_run
402    /// # use google_cloud_dataform_v1::model::Repository;
403    /// let x = Repository::new().set_service_account("example");
404    /// ```
405    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
406        self.service_account = v.into();
407        self
408    }
409
410    /// Sets the value of [kms_key_name][crate::model::Repository::kms_key_name].
411    ///
412    /// # Example
413    /// ```ignore,no_run
414    /// # use google_cloud_dataform_v1::model::Repository;
415    /// let x = Repository::new().set_kms_key_name("example");
416    /// ```
417    pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
418        self.kms_key_name = v.into();
419        self
420    }
421
422    /// Sets the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
423    ///
424    /// # Example
425    /// ```ignore,no_run
426    /// # use google_cloud_dataform_v1::model::Repository;
427    /// use google_cloud_dataform_v1::model::DataEncryptionState;
428    /// let x = Repository::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
429    /// ```
430    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
431    where
432        T: std::convert::Into<crate::model::DataEncryptionState>,
433    {
434        self.data_encryption_state = std::option::Option::Some(v.into());
435        self
436    }
437
438    /// Sets or clears the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
439    ///
440    /// # Example
441    /// ```ignore,no_run
442    /// # use google_cloud_dataform_v1::model::Repository;
443    /// use google_cloud_dataform_v1::model::DataEncryptionState;
444    /// let x = Repository::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
445    /// let x = Repository::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
446    /// ```
447    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
448    where
449        T: std::convert::Into<crate::model::DataEncryptionState>,
450    {
451        self.data_encryption_state = v.map(|x| x.into());
452        self
453    }
454
455    /// Sets the value of [internal_metadata][crate::model::Repository::internal_metadata].
456    ///
457    /// # Example
458    /// ```ignore,no_run
459    /// # use google_cloud_dataform_v1::model::Repository;
460    /// let x = Repository::new().set_internal_metadata("example");
461    /// ```
462    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
463    where
464        T: std::convert::Into<std::string::String>,
465    {
466        self.internal_metadata = std::option::Option::Some(v.into());
467        self
468    }
469
470    /// Sets or clears the value of [internal_metadata][crate::model::Repository::internal_metadata].
471    ///
472    /// # Example
473    /// ```ignore,no_run
474    /// # use google_cloud_dataform_v1::model::Repository;
475    /// let x = Repository::new().set_or_clear_internal_metadata(Some("example"));
476    /// let x = Repository::new().set_or_clear_internal_metadata(None::<String>);
477    /// ```
478    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
479    where
480        T: std::convert::Into<std::string::String>,
481    {
482        self.internal_metadata = v.map(|x| x.into());
483        self
484    }
485}
486
487impl wkt::message::Message for Repository {
488    fn typename() -> &'static str {
489        "type.googleapis.com/google.cloud.dataform.v1.Repository"
490    }
491}
492
493/// Defines additional types related to [Repository].
494pub mod repository {
495    #[allow(unused_imports)]
496    use super::*;
497
498    /// Controls Git remote configuration for a repository.
499    #[derive(Clone, Default, PartialEq)]
500    #[non_exhaustive]
501    pub struct GitRemoteSettings {
502        /// Required. The Git remote's URL.
503        pub url: std::string::String,
504
505        /// Required. The Git remote's default branch name.
506        pub default_branch: std::string::String,
507
508        /// Optional. The name of the Secret Manager secret version to use as an
509        /// authentication token for Git operations. Must be in the format
510        /// `projects/*/secrets/*/versions/*`.
511        pub authentication_token_secret_version: std::string::String,
512
513        /// Optional. Authentication fields for remote uris using SSH protocol.
514        pub ssh_authentication_config: std::option::Option<
515            crate::model::repository::git_remote_settings::SshAuthenticationConfig,
516        >,
517
518        /// Output only. Deprecated: The field does not contain any token status
519        /// information.
520        #[deprecated]
521        pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
522
523        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
524    }
525
526    impl GitRemoteSettings {
527        /// Creates a new default instance.
528        pub fn new() -> Self {
529            std::default::Default::default()
530        }
531
532        /// Sets the value of [url][crate::model::repository::GitRemoteSettings::url].
533        ///
534        /// # Example
535        /// ```ignore,no_run
536        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
537        /// let x = GitRemoteSettings::new().set_url("example");
538        /// ```
539        pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
540            self.url = v.into();
541            self
542        }
543
544        /// Sets the value of [default_branch][crate::model::repository::GitRemoteSettings::default_branch].
545        ///
546        /// # Example
547        /// ```ignore,no_run
548        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
549        /// let x = GitRemoteSettings::new().set_default_branch("example");
550        /// ```
551        pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
552            mut self,
553            v: T,
554        ) -> Self {
555            self.default_branch = v.into();
556            self
557        }
558
559        /// Sets the value of [authentication_token_secret_version][crate::model::repository::GitRemoteSettings::authentication_token_secret_version].
560        ///
561        /// # Example
562        /// ```ignore,no_run
563        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
564        /// let x = GitRemoteSettings::new().set_authentication_token_secret_version("example");
565        /// ```
566        pub fn set_authentication_token_secret_version<
567            T: std::convert::Into<std::string::String>,
568        >(
569            mut self,
570            v: T,
571        ) -> Self {
572            self.authentication_token_secret_version = v.into();
573            self
574        }
575
576        /// Sets the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
577        ///
578        /// # Example
579        /// ```ignore,no_run
580        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
581        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
582        /// let x = GitRemoteSettings::new().set_ssh_authentication_config(SshAuthenticationConfig::default()/* use setters */);
583        /// ```
584        pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
585        where
586            T: std::convert::Into<
587                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
588                >,
589        {
590            self.ssh_authentication_config = std::option::Option::Some(v.into());
591            self
592        }
593
594        /// Sets or clears the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
595        ///
596        /// # Example
597        /// ```ignore,no_run
598        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
599        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
600        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(Some(SshAuthenticationConfig::default()/* use setters */));
601        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(None::<SshAuthenticationConfig>);
602        /// ```
603        pub fn set_or_clear_ssh_authentication_config<T>(
604            mut self,
605            v: std::option::Option<T>,
606        ) -> Self
607        where
608            T: std::convert::Into<
609                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
610                >,
611        {
612            self.ssh_authentication_config = v.map(|x| x.into());
613            self
614        }
615
616        /// Sets the value of [token_status][crate::model::repository::GitRemoteSettings::token_status].
617        ///
618        /// # Example
619        /// ```ignore,no_run
620        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
621        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::TokenStatus;
622        /// let x0 = GitRemoteSettings::new().set_token_status(TokenStatus::NotFound);
623        /// let x1 = GitRemoteSettings::new().set_token_status(TokenStatus::Invalid);
624        /// let x2 = GitRemoteSettings::new().set_token_status(TokenStatus::Valid);
625        /// ```
626        #[deprecated]
627        pub fn set_token_status<
628            T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
629        >(
630            mut self,
631            v: T,
632        ) -> Self {
633            self.token_status = v.into();
634            self
635        }
636    }
637
638    impl wkt::message::Message for GitRemoteSettings {
639        fn typename() -> &'static str {
640            "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
641        }
642    }
643
644    /// Defines additional types related to [GitRemoteSettings].
645    pub mod git_remote_settings {
646        #[allow(unused_imports)]
647        use super::*;
648
649        /// Configures fields for performing SSH authentication.
650        #[derive(Clone, Default, PartialEq)]
651        #[non_exhaustive]
652        pub struct SshAuthenticationConfig {
653            /// Required. The name of the Secret Manager secret version to use as a
654            /// ssh private key for Git operations.
655            /// Must be in the format `projects/*/secrets/*/versions/*`.
656            pub user_private_key_secret_version: std::string::String,
657
658            /// Required. Content of a public SSH key to verify an identity of a remote
659            /// Git host.
660            pub host_public_key: std::string::String,
661
662            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
663        }
664
665        impl SshAuthenticationConfig {
666            /// Creates a new default instance.
667            pub fn new() -> Self {
668                std::default::Default::default()
669            }
670
671            /// Sets the value of [user_private_key_secret_version][crate::model::repository::git_remote_settings::SshAuthenticationConfig::user_private_key_secret_version].
672            ///
673            /// # Example
674            /// ```ignore,no_run
675            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
676            /// let x = SshAuthenticationConfig::new().set_user_private_key_secret_version("example");
677            /// ```
678            pub fn set_user_private_key_secret_version<
679                T: std::convert::Into<std::string::String>,
680            >(
681                mut self,
682                v: T,
683            ) -> Self {
684                self.user_private_key_secret_version = v.into();
685                self
686            }
687
688            /// Sets the value of [host_public_key][crate::model::repository::git_remote_settings::SshAuthenticationConfig::host_public_key].
689            ///
690            /// # Example
691            /// ```ignore,no_run
692            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
693            /// let x = SshAuthenticationConfig::new().set_host_public_key("example");
694            /// ```
695            pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
696                mut self,
697                v: T,
698            ) -> Self {
699                self.host_public_key = v.into();
700                self
701            }
702        }
703
704        impl wkt::message::Message for SshAuthenticationConfig {
705            fn typename() -> &'static str {
706                "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
707            }
708        }
709
710        /// The status of the authentication token.
711        ///
712        /// # Working with unknown values
713        ///
714        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
715        /// additional enum variants at any time. Adding new variants is not considered
716        /// a breaking change. Applications should write their code in anticipation of:
717        ///
718        /// - New values appearing in future releases of the client library, **and**
719        /// - New values received dynamically, without application changes.
720        ///
721        /// Please consult the [Working with enums] section in the user guide for some
722        /// guidelines.
723        ///
724        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
725        #[derive(Clone, Debug, PartialEq)]
726        #[non_exhaustive]
727        pub enum TokenStatus {
728            /// Default value. This value is unused.
729            Unspecified,
730            /// The token could not be found in Secret Manager (or the Dataform
731            /// Service Account did not have permission to access it).
732            NotFound,
733            /// The token could not be used to authenticate against the Git remote.
734            Invalid,
735            /// The token was used successfully to authenticate against the Git remote.
736            Valid,
737            /// If set, the enum was initialized with an unknown value.
738            ///
739            /// Applications can examine the value using [TokenStatus::value] or
740            /// [TokenStatus::name].
741            UnknownValue(token_status::UnknownValue),
742        }
743
744        #[doc(hidden)]
745        pub mod token_status {
746            #[allow(unused_imports)]
747            use super::*;
748            #[derive(Clone, Debug, PartialEq)]
749            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
750        }
751
752        impl TokenStatus {
753            /// Gets the enum value.
754            ///
755            /// Returns `None` if the enum contains an unknown value deserialized from
756            /// the string representation of enums.
757            pub fn value(&self) -> std::option::Option<i32> {
758                match self {
759                    Self::Unspecified => std::option::Option::Some(0),
760                    Self::NotFound => std::option::Option::Some(1),
761                    Self::Invalid => std::option::Option::Some(2),
762                    Self::Valid => std::option::Option::Some(3),
763                    Self::UnknownValue(u) => u.0.value(),
764                }
765            }
766
767            /// Gets the enum value as a string.
768            ///
769            /// Returns `None` if the enum contains an unknown value deserialized from
770            /// the integer representation of enums.
771            pub fn name(&self) -> std::option::Option<&str> {
772                match self {
773                    Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
774                    Self::NotFound => std::option::Option::Some("NOT_FOUND"),
775                    Self::Invalid => std::option::Option::Some("INVALID"),
776                    Self::Valid => std::option::Option::Some("VALID"),
777                    Self::UnknownValue(u) => u.0.name(),
778                }
779            }
780        }
781
782        impl std::default::Default for TokenStatus {
783            fn default() -> Self {
784                use std::convert::From;
785                Self::from(0)
786            }
787        }
788
789        impl std::fmt::Display for TokenStatus {
790            fn fmt(
791                &self,
792                f: &mut std::fmt::Formatter<'_>,
793            ) -> std::result::Result<(), std::fmt::Error> {
794                wkt::internal::display_enum(f, self.name(), self.value())
795            }
796        }
797
798        impl std::convert::From<i32> for TokenStatus {
799            fn from(value: i32) -> Self {
800                match value {
801                    0 => Self::Unspecified,
802                    1 => Self::NotFound,
803                    2 => Self::Invalid,
804                    3 => Self::Valid,
805                    _ => Self::UnknownValue(token_status::UnknownValue(
806                        wkt::internal::UnknownEnumValue::Integer(value),
807                    )),
808                }
809            }
810        }
811
812        impl std::convert::From<&str> for TokenStatus {
813            fn from(value: &str) -> Self {
814                use std::string::ToString;
815                match value {
816                    "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
817                    "NOT_FOUND" => Self::NotFound,
818                    "INVALID" => Self::Invalid,
819                    "VALID" => Self::Valid,
820                    _ => Self::UnknownValue(token_status::UnknownValue(
821                        wkt::internal::UnknownEnumValue::String(value.to_string()),
822                    )),
823                }
824            }
825        }
826
827        impl serde::ser::Serialize for TokenStatus {
828            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
829            where
830                S: serde::Serializer,
831            {
832                match self {
833                    Self::Unspecified => serializer.serialize_i32(0),
834                    Self::NotFound => serializer.serialize_i32(1),
835                    Self::Invalid => serializer.serialize_i32(2),
836                    Self::Valid => serializer.serialize_i32(3),
837                    Self::UnknownValue(u) => u.0.serialize(serializer),
838                }
839            }
840        }
841
842        impl<'de> serde::de::Deserialize<'de> for TokenStatus {
843            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
844            where
845                D: serde::Deserializer<'de>,
846            {
847                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
848                    ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
849                ))
850            }
851        }
852    }
853
854    /// Configures workspace compilation overrides for a repository.
855    #[derive(Clone, Default, PartialEq)]
856    #[non_exhaustive]
857    pub struct WorkspaceCompilationOverrides {
858        /// Optional. The default database (Google Cloud project ID).
859        pub default_database: std::string::String,
860
861        /// Optional. The suffix that should be appended to all schema (BigQuery
862        /// dataset ID) names.
863        pub schema_suffix: std::string::String,
864
865        /// Optional. The prefix that should be prepended to all table names.
866        pub table_prefix: std::string::String,
867
868        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
869    }
870
871    impl WorkspaceCompilationOverrides {
872        /// Creates a new default instance.
873        pub fn new() -> Self {
874            std::default::Default::default()
875        }
876
877        /// Sets the value of [default_database][crate::model::repository::WorkspaceCompilationOverrides::default_database].
878        ///
879        /// # Example
880        /// ```ignore,no_run
881        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
882        /// let x = WorkspaceCompilationOverrides::new().set_default_database("example");
883        /// ```
884        pub fn set_default_database<T: std::convert::Into<std::string::String>>(
885            mut self,
886            v: T,
887        ) -> Self {
888            self.default_database = v.into();
889            self
890        }
891
892        /// Sets the value of [schema_suffix][crate::model::repository::WorkspaceCompilationOverrides::schema_suffix].
893        ///
894        /// # Example
895        /// ```ignore,no_run
896        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
897        /// let x = WorkspaceCompilationOverrides::new().set_schema_suffix("example");
898        /// ```
899        pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
900            mut self,
901            v: T,
902        ) -> Self {
903            self.schema_suffix = v.into();
904            self
905        }
906
907        /// Sets the value of [table_prefix][crate::model::repository::WorkspaceCompilationOverrides::table_prefix].
908        ///
909        /// # Example
910        /// ```ignore,no_run
911        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
912        /// let x = WorkspaceCompilationOverrides::new().set_table_prefix("example");
913        /// ```
914        pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
915            mut self,
916            v: T,
917        ) -> Self {
918            self.table_prefix = v.into();
919            self
920        }
921    }
922
923    impl wkt::message::Message for WorkspaceCompilationOverrides {
924        fn typename() -> &'static str {
925            "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
926        }
927    }
928}
929
930/// Metadata used to identify if a resource is user scoped.
931#[derive(Clone, Default, PartialEq)]
932#[non_exhaustive]
933pub struct PrivateResourceMetadata {
934    /// Output only. If true, this resource is user-scoped, meaning it is either a
935    /// workspace or sourced from a workspace.
936    pub user_scoped: bool,
937
938    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
939}
940
941impl PrivateResourceMetadata {
942    /// Creates a new default instance.
943    pub fn new() -> Self {
944        std::default::Default::default()
945    }
946
947    /// Sets the value of [user_scoped][crate::model::PrivateResourceMetadata::user_scoped].
948    ///
949    /// # Example
950    /// ```ignore,no_run
951    /// # use google_cloud_dataform_v1::model::PrivateResourceMetadata;
952    /// let x = PrivateResourceMetadata::new().set_user_scoped(true);
953    /// ```
954    pub fn set_user_scoped<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
955        self.user_scoped = v.into();
956        self
957    }
958}
959
960impl wkt::message::Message for PrivateResourceMetadata {
961    fn typename() -> &'static str {
962        "type.googleapis.com/google.cloud.dataform.v1.PrivateResourceMetadata"
963    }
964}
965
966/// `ListRepositories` request message.
967#[derive(Clone, Default, PartialEq)]
968#[non_exhaustive]
969pub struct ListRepositoriesRequest {
970    /// Required. The location in which to list repositories. Must be in the format
971    /// `projects/*/locations/*`.
972    pub parent: std::string::String,
973
974    /// Optional. Maximum number of repositories to return. The server may return
975    /// fewer items than requested. If unspecified, the server will pick an
976    /// appropriate default.
977    pub page_size: i32,
978
979    /// Optional. Page token received from a previous `ListRepositories` call.
980    /// Provide this to retrieve the subsequent page.
981    ///
982    /// When paginating, all other parameters provided to `ListRepositories`,
983    /// with the exception of `page_size`, must match the call that provided the
984    /// page token.
985    pub page_token: std::string::String,
986
987    /// Optional. This field only supports ordering by `name`. If unspecified, the
988    /// server will choose the ordering. If specified, the default order is
989    /// ascending for the `name` field.
990    pub order_by: std::string::String,
991
992    /// Optional. Filter for the returned list.
993    pub filter: std::string::String,
994
995    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
996}
997
998impl ListRepositoriesRequest {
999    /// Creates a new default instance.
1000    pub fn new() -> Self {
1001        std::default::Default::default()
1002    }
1003
1004    /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
1005    ///
1006    /// # Example
1007    /// ```ignore,no_run
1008    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1009    /// let x = ListRepositoriesRequest::new().set_parent("example");
1010    /// ```
1011    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1012        self.parent = v.into();
1013        self
1014    }
1015
1016    /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
1017    ///
1018    /// # Example
1019    /// ```ignore,no_run
1020    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1021    /// let x = ListRepositoriesRequest::new().set_page_size(42);
1022    /// ```
1023    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1024        self.page_size = v.into();
1025        self
1026    }
1027
1028    /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
1029    ///
1030    /// # Example
1031    /// ```ignore,no_run
1032    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1033    /// let x = ListRepositoriesRequest::new().set_page_token("example");
1034    /// ```
1035    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1036        self.page_token = v.into();
1037        self
1038    }
1039
1040    /// Sets the value of [order_by][crate::model::ListRepositoriesRequest::order_by].
1041    ///
1042    /// # Example
1043    /// ```ignore,no_run
1044    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1045    /// let x = ListRepositoriesRequest::new().set_order_by("example");
1046    /// ```
1047    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1048        self.order_by = v.into();
1049        self
1050    }
1051
1052    /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
1053    ///
1054    /// # Example
1055    /// ```ignore,no_run
1056    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1057    /// let x = ListRepositoriesRequest::new().set_filter("example");
1058    /// ```
1059    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1060        self.filter = v.into();
1061        self
1062    }
1063}
1064
1065impl wkt::message::Message for ListRepositoriesRequest {
1066    fn typename() -> &'static str {
1067        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
1068    }
1069}
1070
1071/// `ListRepositories` response message.
1072#[derive(Clone, Default, PartialEq)]
1073#[non_exhaustive]
1074pub struct ListRepositoriesResponse {
1075    /// List of repositories.
1076    pub repositories: std::vec::Vec<crate::model::Repository>,
1077
1078    /// A token which can be sent as `page_token` to retrieve the next page.
1079    /// If this field is omitted, there are no subsequent pages.
1080    pub next_page_token: std::string::String,
1081
1082    /// Locations which could not be reached.
1083    pub unreachable: std::vec::Vec<std::string::String>,
1084
1085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1086}
1087
1088impl ListRepositoriesResponse {
1089    /// Creates a new default instance.
1090    pub fn new() -> Self {
1091        std::default::Default::default()
1092    }
1093
1094    /// Sets the value of [repositories][crate::model::ListRepositoriesResponse::repositories].
1095    ///
1096    /// # Example
1097    /// ```ignore,no_run
1098    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1099    /// use google_cloud_dataform_v1::model::Repository;
1100    /// let x = ListRepositoriesResponse::new()
1101    ///     .set_repositories([
1102    ///         Repository::default()/* use setters */,
1103    ///         Repository::default()/* use (different) setters */,
1104    ///     ]);
1105    /// ```
1106    pub fn set_repositories<T, V>(mut self, v: T) -> Self
1107    where
1108        T: std::iter::IntoIterator<Item = V>,
1109        V: std::convert::Into<crate::model::Repository>,
1110    {
1111        use std::iter::Iterator;
1112        self.repositories = v.into_iter().map(|i| i.into()).collect();
1113        self
1114    }
1115
1116    /// Sets the value of [next_page_token][crate::model::ListRepositoriesResponse::next_page_token].
1117    ///
1118    /// # Example
1119    /// ```ignore,no_run
1120    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1121    /// let x = ListRepositoriesResponse::new().set_next_page_token("example");
1122    /// ```
1123    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1124        self.next_page_token = v.into();
1125        self
1126    }
1127
1128    /// Sets the value of [unreachable][crate::model::ListRepositoriesResponse::unreachable].
1129    ///
1130    /// # Example
1131    /// ```ignore,no_run
1132    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1133    /// let x = ListRepositoriesResponse::new().set_unreachable(["a", "b", "c"]);
1134    /// ```
1135    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1136    where
1137        T: std::iter::IntoIterator<Item = V>,
1138        V: std::convert::Into<std::string::String>,
1139    {
1140        use std::iter::Iterator;
1141        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1142        self
1143    }
1144}
1145
1146impl wkt::message::Message for ListRepositoriesResponse {
1147    fn typename() -> &'static str {
1148        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
1149    }
1150}
1151
1152#[doc(hidden)]
1153impl google_cloud_gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
1154    type PageItem = crate::model::Repository;
1155
1156    fn items(self) -> std::vec::Vec<Self::PageItem> {
1157        self.repositories
1158    }
1159
1160    fn next_page_token(&self) -> std::string::String {
1161        use std::clone::Clone;
1162        self.next_page_token.clone()
1163    }
1164}
1165
1166/// `MoveRepository` request message.
1167#[derive(Clone, Default, PartialEq)]
1168#[non_exhaustive]
1169pub struct MoveRepositoryRequest {
1170    /// Required. The full resource name of the repository to move.
1171    pub name: std::string::String,
1172
1173    /// Optional. The name of the Folder, TeamFolder, or root location to move the
1174    /// repository to. Can be in the format of: "" to move into the root User
1175    /// folder, `projects/*/locations/*/folders/*`,
1176    /// `projects/*/locations/*/teamFolders/*`
1177    pub destination_containing_folder: std::option::Option<std::string::String>,
1178
1179    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1180}
1181
1182impl MoveRepositoryRequest {
1183    /// Creates a new default instance.
1184    pub fn new() -> Self {
1185        std::default::Default::default()
1186    }
1187
1188    /// Sets the value of [name][crate::model::MoveRepositoryRequest::name].
1189    ///
1190    /// # Example
1191    /// ```ignore,no_run
1192    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1193    /// # let project_id = "project_id";
1194    /// # let location_id = "location_id";
1195    /// # let repository_id = "repository_id";
1196    /// let x = MoveRepositoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1197    /// ```
1198    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1199        self.name = v.into();
1200        self
1201    }
1202
1203    /// Sets the value of [destination_containing_folder][crate::model::MoveRepositoryRequest::destination_containing_folder].
1204    ///
1205    /// # Example
1206    /// ```ignore,no_run
1207    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1208    /// let x = MoveRepositoryRequest::new().set_destination_containing_folder("example");
1209    /// ```
1210    pub fn set_destination_containing_folder<T>(mut self, v: T) -> Self
1211    where
1212        T: std::convert::Into<std::string::String>,
1213    {
1214        self.destination_containing_folder = std::option::Option::Some(v.into());
1215        self
1216    }
1217
1218    /// Sets or clears the value of [destination_containing_folder][crate::model::MoveRepositoryRequest::destination_containing_folder].
1219    ///
1220    /// # Example
1221    /// ```ignore,no_run
1222    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1223    /// let x = MoveRepositoryRequest::new().set_or_clear_destination_containing_folder(Some("example"));
1224    /// let x = MoveRepositoryRequest::new().set_or_clear_destination_containing_folder(None::<String>);
1225    /// ```
1226    pub fn set_or_clear_destination_containing_folder<T>(
1227        mut self,
1228        v: std::option::Option<T>,
1229    ) -> Self
1230    where
1231        T: std::convert::Into<std::string::String>,
1232    {
1233        self.destination_containing_folder = v.map(|x| x.into());
1234        self
1235    }
1236}
1237
1238impl wkt::message::Message for MoveRepositoryRequest {
1239    fn typename() -> &'static str {
1240        "type.googleapis.com/google.cloud.dataform.v1.MoveRepositoryRequest"
1241    }
1242}
1243
1244/// `GetRepository` request message.
1245#[derive(Clone, Default, PartialEq)]
1246#[non_exhaustive]
1247pub struct GetRepositoryRequest {
1248    /// Required. The repository's name.
1249    pub name: std::string::String,
1250
1251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1252}
1253
1254impl GetRepositoryRequest {
1255    /// Creates a new default instance.
1256    pub fn new() -> Self {
1257        std::default::Default::default()
1258    }
1259
1260    /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
1261    ///
1262    /// # Example
1263    /// ```ignore,no_run
1264    /// # use google_cloud_dataform_v1::model::GetRepositoryRequest;
1265    /// # let project_id = "project_id";
1266    /// # let location_id = "location_id";
1267    /// # let repository_id = "repository_id";
1268    /// let x = GetRepositoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1269    /// ```
1270    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1271        self.name = v.into();
1272        self
1273    }
1274}
1275
1276impl wkt::message::Message for GetRepositoryRequest {
1277    fn typename() -> &'static str {
1278        "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
1279    }
1280}
1281
1282/// `CreateRepository` request message.
1283#[derive(Clone, Default, PartialEq)]
1284#[non_exhaustive]
1285pub struct CreateRepositoryRequest {
1286    /// Required. The location in which to create the repository. Must be in the
1287    /// format `projects/*/locations/*`.
1288    pub parent: std::string::String,
1289
1290    /// Required. The repository to create.
1291    pub repository: std::option::Option<crate::model::Repository>,
1292
1293    /// Required. The ID to use for the repository, which will become the final
1294    /// component of the repository's resource name.
1295    pub repository_id: std::string::String,
1296
1297    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1298}
1299
1300impl CreateRepositoryRequest {
1301    /// Creates a new default instance.
1302    pub fn new() -> Self {
1303        std::default::Default::default()
1304    }
1305
1306    /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
1307    ///
1308    /// # Example
1309    /// ```ignore,no_run
1310    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1311    /// let x = CreateRepositoryRequest::new().set_parent("example");
1312    /// ```
1313    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1314        self.parent = v.into();
1315        self
1316    }
1317
1318    /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
1319    ///
1320    /// # Example
1321    /// ```ignore,no_run
1322    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1323    /// use google_cloud_dataform_v1::model::Repository;
1324    /// let x = CreateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1325    /// ```
1326    pub fn set_repository<T>(mut self, v: T) -> Self
1327    where
1328        T: std::convert::Into<crate::model::Repository>,
1329    {
1330        self.repository = std::option::Option::Some(v.into());
1331        self
1332    }
1333
1334    /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
1335    ///
1336    /// # Example
1337    /// ```ignore,no_run
1338    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1339    /// use google_cloud_dataform_v1::model::Repository;
1340    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1341    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1342    /// ```
1343    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1344    where
1345        T: std::convert::Into<crate::model::Repository>,
1346    {
1347        self.repository = v.map(|x| x.into());
1348        self
1349    }
1350
1351    /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
1352    ///
1353    /// # Example
1354    /// ```ignore,no_run
1355    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1356    /// let x = CreateRepositoryRequest::new().set_repository_id("example");
1357    /// ```
1358    pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1359        self.repository_id = v.into();
1360        self
1361    }
1362}
1363
1364impl wkt::message::Message for CreateRepositoryRequest {
1365    fn typename() -> &'static str {
1366        "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
1367    }
1368}
1369
1370/// `UpdateRepository` request message.
1371#[derive(Clone, Default, PartialEq)]
1372#[non_exhaustive]
1373pub struct UpdateRepositoryRequest {
1374    /// Optional. Specifies the fields to be updated in the repository. If left
1375    /// unset, all fields will be updated.
1376    pub update_mask: std::option::Option<wkt::FieldMask>,
1377
1378    /// Required. The repository to update.
1379    pub repository: std::option::Option<crate::model::Repository>,
1380
1381    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1382}
1383
1384impl UpdateRepositoryRequest {
1385    /// Creates a new default instance.
1386    pub fn new() -> Self {
1387        std::default::Default::default()
1388    }
1389
1390    /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1391    ///
1392    /// # Example
1393    /// ```ignore,no_run
1394    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1395    /// use wkt::FieldMask;
1396    /// let x = UpdateRepositoryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1397    /// ```
1398    pub fn set_update_mask<T>(mut self, v: T) -> Self
1399    where
1400        T: std::convert::Into<wkt::FieldMask>,
1401    {
1402        self.update_mask = std::option::Option::Some(v.into());
1403        self
1404    }
1405
1406    /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1407    ///
1408    /// # Example
1409    /// ```ignore,no_run
1410    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1411    /// use wkt::FieldMask;
1412    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1413    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1414    /// ```
1415    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1416    where
1417        T: std::convert::Into<wkt::FieldMask>,
1418    {
1419        self.update_mask = v.map(|x| x.into());
1420        self
1421    }
1422
1423    /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1424    ///
1425    /// # Example
1426    /// ```ignore,no_run
1427    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1428    /// use google_cloud_dataform_v1::model::Repository;
1429    /// let x = UpdateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1430    /// ```
1431    pub fn set_repository<T>(mut self, v: T) -> Self
1432    where
1433        T: std::convert::Into<crate::model::Repository>,
1434    {
1435        self.repository = std::option::Option::Some(v.into());
1436        self
1437    }
1438
1439    /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1440    ///
1441    /// # Example
1442    /// ```ignore,no_run
1443    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1444    /// use google_cloud_dataform_v1::model::Repository;
1445    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1446    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1447    /// ```
1448    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1449    where
1450        T: std::convert::Into<crate::model::Repository>,
1451    {
1452        self.repository = v.map(|x| x.into());
1453        self
1454    }
1455}
1456
1457impl wkt::message::Message for UpdateRepositoryRequest {
1458    fn typename() -> &'static str {
1459        "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
1460    }
1461}
1462
1463/// `DeleteRepository` request message.
1464#[derive(Clone, Default, PartialEq)]
1465#[non_exhaustive]
1466pub struct DeleteRepositoryRequest {
1467    /// Required. The repository's name.
1468    pub name: std::string::String,
1469
1470    /// Optional. If set to true, child resources of this repository (compilation
1471    /// results and workflow invocations) will also be deleted. Otherwise, the
1472    /// request will only succeed if the repository has no child resources.
1473    ///
1474    /// **Note:** *This flag doesn't support deletion of workspaces, release
1475    /// configs or workflow configs. If any of such resources exists in the
1476    /// repository, the request will fail.*.
1477    pub force: bool,
1478
1479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1480}
1481
1482impl DeleteRepositoryRequest {
1483    /// Creates a new default instance.
1484    pub fn new() -> Self {
1485        std::default::Default::default()
1486    }
1487
1488    /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
1489    ///
1490    /// # Example
1491    /// ```ignore,no_run
1492    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1493    /// # let project_id = "project_id";
1494    /// # let location_id = "location_id";
1495    /// # let repository_id = "repository_id";
1496    /// let x = DeleteRepositoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1497    /// ```
1498    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1499        self.name = v.into();
1500        self
1501    }
1502
1503    /// Sets the value of [force][crate::model::DeleteRepositoryRequest::force].
1504    ///
1505    /// # Example
1506    /// ```ignore,no_run
1507    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1508    /// let x = DeleteRepositoryRequest::new().set_force(true);
1509    /// ```
1510    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1511        self.force = v.into();
1512        self
1513    }
1514}
1515
1516impl wkt::message::Message for DeleteRepositoryRequest {
1517    fn typename() -> &'static str {
1518        "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
1519    }
1520}
1521
1522/// `CommitRepositoryChanges` request message.
1523#[derive(Clone, Default, PartialEq)]
1524#[non_exhaustive]
1525pub struct CommitRepositoryChangesRequest {
1526    /// Required. The repository's name.
1527    pub name: std::string::String,
1528
1529    /// Required. The changes to commit to the repository.
1530    pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
1531
1532    /// Optional. The commit SHA which must be the repository's current HEAD before
1533    /// applying this commit; otherwise this request will fail. If unset, no
1534    /// validation on the current HEAD commit SHA is performed.
1535    pub required_head_commit_sha: std::string::String,
1536
1537    /// Optional. A map to the path of the file to the operation. The path is the
1538    /// full file path including filename, from repository root.
1539    pub file_operations: std::collections::HashMap<
1540        std::string::String,
1541        crate::model::commit_repository_changes_request::FileOperation,
1542    >,
1543
1544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1545}
1546
1547impl CommitRepositoryChangesRequest {
1548    /// Creates a new default instance.
1549    pub fn new() -> Self {
1550        std::default::Default::default()
1551    }
1552
1553    /// Sets the value of [name][crate::model::CommitRepositoryChangesRequest::name].
1554    ///
1555    /// # Example
1556    /// ```ignore,no_run
1557    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1558    /// # let project_id = "project_id";
1559    /// # let location_id = "location_id";
1560    /// # let repository_id = "repository_id";
1561    /// let x = CommitRepositoryChangesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1562    /// ```
1563    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1564        self.name = v.into();
1565        self
1566    }
1567
1568    /// Sets the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1569    ///
1570    /// # Example
1571    /// ```ignore,no_run
1572    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1573    /// use google_cloud_dataform_v1::model::CommitMetadata;
1574    /// let x = CommitRepositoryChangesRequest::new().set_commit_metadata(CommitMetadata::default()/* use setters */);
1575    /// ```
1576    pub fn set_commit_metadata<T>(mut self, v: T) -> Self
1577    where
1578        T: std::convert::Into<crate::model::CommitMetadata>,
1579    {
1580        self.commit_metadata = std::option::Option::Some(v.into());
1581        self
1582    }
1583
1584    /// Sets or clears the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1585    ///
1586    /// # Example
1587    /// ```ignore,no_run
1588    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1589    /// use google_cloud_dataform_v1::model::CommitMetadata;
1590    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(Some(CommitMetadata::default()/* use setters */));
1591    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(None::<CommitMetadata>);
1592    /// ```
1593    pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
1594    where
1595        T: std::convert::Into<crate::model::CommitMetadata>,
1596    {
1597        self.commit_metadata = v.map(|x| x.into());
1598        self
1599    }
1600
1601    /// Sets the value of [required_head_commit_sha][crate::model::CommitRepositoryChangesRequest::required_head_commit_sha].
1602    ///
1603    /// # Example
1604    /// ```ignore,no_run
1605    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1606    /// let x = CommitRepositoryChangesRequest::new().set_required_head_commit_sha("example");
1607    /// ```
1608    pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
1609        mut self,
1610        v: T,
1611    ) -> Self {
1612        self.required_head_commit_sha = v.into();
1613        self
1614    }
1615
1616    /// Sets the value of [file_operations][crate::model::CommitRepositoryChangesRequest::file_operations].
1617    ///
1618    /// # Example
1619    /// ```ignore,no_run
1620    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1621    /// use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1622    /// let x = CommitRepositoryChangesRequest::new().set_file_operations([
1623    ///     ("key0", FileOperation::default()/* use setters */),
1624    ///     ("key1", FileOperation::default()/* use (different) setters */),
1625    /// ]);
1626    /// ```
1627    pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
1628    where
1629        T: std::iter::IntoIterator<Item = (K, V)>,
1630        K: std::convert::Into<std::string::String>,
1631        V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
1632    {
1633        use std::iter::Iterator;
1634        self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1635        self
1636    }
1637}
1638
1639impl wkt::message::Message for CommitRepositoryChangesRequest {
1640    fn typename() -> &'static str {
1641        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
1642    }
1643}
1644
1645/// Defines additional types related to [CommitRepositoryChangesRequest].
1646pub mod commit_repository_changes_request {
1647    #[allow(unused_imports)]
1648    use super::*;
1649
1650    /// Represents a single file operation to the repository.
1651    #[derive(Clone, Default, PartialEq)]
1652    #[non_exhaustive]
1653    pub struct FileOperation {
1654        /// The operation to perform on the file.
1655        pub operation: std::option::Option<
1656            crate::model::commit_repository_changes_request::file_operation::Operation,
1657        >,
1658
1659        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1660    }
1661
1662    impl FileOperation {
1663        /// Creates a new default instance.
1664        pub fn new() -> Self {
1665            std::default::Default::default()
1666        }
1667
1668        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation].
1669        ///
1670        /// Note that all the setters affecting `operation` are mutually
1671        /// exclusive.
1672        ///
1673        /// # Example
1674        /// ```ignore,no_run
1675        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1676        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1677        /// let x = FileOperation::new().set_operation(Some(
1678        ///     google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::Operation::WriteFile(WriteFile::default().into())));
1679        /// ```
1680        pub fn set_operation<
1681            T: std::convert::Into<
1682                    std::option::Option<
1683                        crate::model::commit_repository_changes_request::file_operation::Operation,
1684                    >,
1685                >,
1686        >(
1687            mut self,
1688            v: T,
1689        ) -> Self {
1690            self.operation = v.into();
1691            self
1692        }
1693
1694        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1695        /// if it holds a `WriteFile`, `None` if the field is not set or
1696        /// holds a different branch.
1697        pub fn write_file(
1698            &self,
1699        ) -> std::option::Option<
1700            &std::boxed::Box<
1701                crate::model::commit_repository_changes_request::file_operation::WriteFile,
1702            >,
1703        > {
1704            #[allow(unreachable_patterns)]
1705            self.operation.as_ref().and_then(|v| match v {
1706                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
1707                _ => std::option::Option::None,
1708            })
1709        }
1710
1711        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1712        /// to hold a `WriteFile`.
1713        ///
1714        /// Note that all the setters affecting `operation` are
1715        /// mutually exclusive.
1716        ///
1717        /// # Example
1718        /// ```ignore,no_run
1719        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1720        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1721        /// let x = FileOperation::new().set_write_file(WriteFile::default()/* use setters */);
1722        /// assert!(x.write_file().is_some());
1723        /// assert!(x.delete_file().is_none());
1724        /// ```
1725        pub fn set_write_file<
1726            T: std::convert::Into<
1727                    std::boxed::Box<
1728                        crate::model::commit_repository_changes_request::file_operation::WriteFile,
1729                    >,
1730                >,
1731        >(
1732            mut self,
1733            v: T,
1734        ) -> Self {
1735            self.operation = std::option::Option::Some(
1736                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
1737                    v.into()
1738                )
1739            );
1740            self
1741        }
1742
1743        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1744        /// if it holds a `DeleteFile`, `None` if the field is not set or
1745        /// holds a different branch.
1746        pub fn delete_file(
1747            &self,
1748        ) -> std::option::Option<
1749            &std::boxed::Box<
1750                crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1751            >,
1752        > {
1753            #[allow(unreachable_patterns)]
1754            self.operation.as_ref().and_then(|v| match v {
1755                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
1756                _ => std::option::Option::None,
1757            })
1758        }
1759
1760        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1761        /// to hold a `DeleteFile`.
1762        ///
1763        /// Note that all the setters affecting `operation` are
1764        /// mutually exclusive.
1765        ///
1766        /// # Example
1767        /// ```ignore,no_run
1768        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1769        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::DeleteFile;
1770        /// let x = FileOperation::new().set_delete_file(DeleteFile::default()/* use setters */);
1771        /// assert!(x.delete_file().is_some());
1772        /// assert!(x.write_file().is_none());
1773        /// ```
1774        pub fn set_delete_file<
1775            T: std::convert::Into<
1776                    std::boxed::Box<
1777                        crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1778                    >,
1779                >,
1780        >(
1781            mut self,
1782            v: T,
1783        ) -> Self {
1784            self.operation = std::option::Option::Some(
1785                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
1786                    v.into()
1787                )
1788            );
1789            self
1790        }
1791    }
1792
1793    impl wkt::message::Message for FileOperation {
1794        fn typename() -> &'static str {
1795            "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
1796        }
1797    }
1798
1799    /// Defines additional types related to [FileOperation].
1800    pub mod file_operation {
1801        #[allow(unused_imports)]
1802        use super::*;
1803
1804        /// Represents the write file operation (for files added or modified).
1805        #[derive(Clone, Default, PartialEq)]
1806        #[non_exhaustive]
1807        pub struct WriteFile {
1808            /// The file's contents.
1809            pub contents: ::bytes::Bytes,
1810
1811            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1812        }
1813
1814        impl WriteFile {
1815            /// Creates a new default instance.
1816            pub fn new() -> Self {
1817                std::default::Default::default()
1818            }
1819
1820            /// Sets the value of [contents][crate::model::commit_repository_changes_request::file_operation::WriteFile::contents].
1821            ///
1822            /// # Example
1823            /// ```ignore,no_run
1824            /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1825            /// let x = WriteFile::new().set_contents(bytes::Bytes::from_static(b"example"));
1826            /// ```
1827            pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1828                self.contents = v.into();
1829                self
1830            }
1831        }
1832
1833        impl wkt::message::Message for WriteFile {
1834            fn typename() -> &'static str {
1835                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
1836            }
1837        }
1838
1839        /// Represents the delete file operation.
1840        #[derive(Clone, Default, PartialEq)]
1841        #[non_exhaustive]
1842        pub struct DeleteFile {
1843            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1844        }
1845
1846        impl DeleteFile {
1847            /// Creates a new default instance.
1848            pub fn new() -> Self {
1849                std::default::Default::default()
1850            }
1851        }
1852
1853        impl wkt::message::Message for DeleteFile {
1854            fn typename() -> &'static str {
1855                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
1856            }
1857        }
1858
1859        /// The operation to perform on the file.
1860        #[derive(Clone, Debug, PartialEq)]
1861        #[non_exhaustive]
1862        pub enum Operation {
1863            /// Represents the write operation.
1864            WriteFile(
1865                std::boxed::Box<
1866                    crate::model::commit_repository_changes_request::file_operation::WriteFile,
1867                >,
1868            ),
1869            /// Represents the delete operation.
1870            DeleteFile(
1871                std::boxed::Box<
1872                    crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1873                >,
1874            ),
1875        }
1876    }
1877}
1878
1879/// `CommitRepositoryChanges` response message.
1880#[derive(Clone, Default, PartialEq)]
1881#[non_exhaustive]
1882pub struct CommitRepositoryChangesResponse {
1883    /// The commit SHA of the current commit.
1884    pub commit_sha: std::string::String,
1885
1886    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1887}
1888
1889impl CommitRepositoryChangesResponse {
1890    /// Creates a new default instance.
1891    pub fn new() -> Self {
1892        std::default::Default::default()
1893    }
1894
1895    /// Sets the value of [commit_sha][crate::model::CommitRepositoryChangesResponse::commit_sha].
1896    ///
1897    /// # Example
1898    /// ```ignore,no_run
1899    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesResponse;
1900    /// let x = CommitRepositoryChangesResponse::new().set_commit_sha("example");
1901    /// ```
1902    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1903        self.commit_sha = v.into();
1904        self
1905    }
1906}
1907
1908impl wkt::message::Message for CommitRepositoryChangesResponse {
1909    fn typename() -> &'static str {
1910        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
1911    }
1912}
1913
1914/// `ReadRepositoryFile` request message.
1915#[derive(Clone, Default, PartialEq)]
1916#[non_exhaustive]
1917pub struct ReadRepositoryFileRequest {
1918    /// Required. The repository's name.
1919    pub name: std::string::String,
1920
1921    /// Optional. The commit SHA for the commit to read from. If unset, the file
1922    /// will be read from HEAD.
1923    pub commit_sha: std::string::String,
1924
1925    /// Required. Full file path to read including filename, from repository root.
1926    pub path: std::string::String,
1927
1928    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1929}
1930
1931impl ReadRepositoryFileRequest {
1932    /// Creates a new default instance.
1933    pub fn new() -> Self {
1934        std::default::Default::default()
1935    }
1936
1937    /// Sets the value of [name][crate::model::ReadRepositoryFileRequest::name].
1938    ///
1939    /// # Example
1940    /// ```ignore,no_run
1941    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1942    /// # let project_id = "project_id";
1943    /// # let location_id = "location_id";
1944    /// # let repository_id = "repository_id";
1945    /// let x = ReadRepositoryFileRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1946    /// ```
1947    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1948        self.name = v.into();
1949        self
1950    }
1951
1952    /// Sets the value of [commit_sha][crate::model::ReadRepositoryFileRequest::commit_sha].
1953    ///
1954    /// # Example
1955    /// ```ignore,no_run
1956    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1957    /// let x = ReadRepositoryFileRequest::new().set_commit_sha("example");
1958    /// ```
1959    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1960        self.commit_sha = v.into();
1961        self
1962    }
1963
1964    /// Sets the value of [path][crate::model::ReadRepositoryFileRequest::path].
1965    ///
1966    /// # Example
1967    /// ```ignore,no_run
1968    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
1969    /// let x = ReadRepositoryFileRequest::new().set_path("example");
1970    /// ```
1971    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1972        self.path = v.into();
1973        self
1974    }
1975}
1976
1977impl wkt::message::Message for ReadRepositoryFileRequest {
1978    fn typename() -> &'static str {
1979        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
1980    }
1981}
1982
1983/// `ReadRepositoryFile` response message.
1984#[derive(Clone, Default, PartialEq)]
1985#[non_exhaustive]
1986pub struct ReadRepositoryFileResponse {
1987    /// The file's contents.
1988    pub contents: ::bytes::Bytes,
1989
1990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1991}
1992
1993impl ReadRepositoryFileResponse {
1994    /// Creates a new default instance.
1995    pub fn new() -> Self {
1996        std::default::Default::default()
1997    }
1998
1999    /// Sets the value of [contents][crate::model::ReadRepositoryFileResponse::contents].
2000    ///
2001    /// # Example
2002    /// ```ignore,no_run
2003    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileResponse;
2004    /// let x = ReadRepositoryFileResponse::new().set_contents(bytes::Bytes::from_static(b"example"));
2005    /// ```
2006    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
2007        self.contents = v.into();
2008        self
2009    }
2010}
2011
2012impl wkt::message::Message for ReadRepositoryFileResponse {
2013    fn typename() -> &'static str {
2014        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
2015    }
2016}
2017
2018/// `QueryRepositoryDirectoryContents` request message.
2019#[derive(Clone, Default, PartialEq)]
2020#[non_exhaustive]
2021pub struct QueryRepositoryDirectoryContentsRequest {
2022    /// Required. The repository's name.
2023    pub name: std::string::String,
2024
2025    /// Optional. The Commit SHA for the commit to query from. If unset, the
2026    /// directory will be queried from HEAD.
2027    pub commit_sha: std::string::String,
2028
2029    /// Optional. The directory's full path including directory name, relative to
2030    /// root. If left unset, the root is used.
2031    pub path: std::string::String,
2032
2033    /// Optional. Maximum number of paths to return. The server may return fewer
2034    /// items than requested. If unspecified, the server will pick an appropriate
2035    /// default.
2036    pub page_size: i32,
2037
2038    /// Optional. Page token received from a previous
2039    /// `QueryRepositoryDirectoryContents` call. Provide this to retrieve the
2040    /// subsequent page.
2041    ///
2042    /// When paginating, all other parameters provided to
2043    /// `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must
2044    /// match the call that provided the page token.
2045    pub page_token: std::string::String,
2046
2047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2048}
2049
2050impl QueryRepositoryDirectoryContentsRequest {
2051    /// Creates a new default instance.
2052    pub fn new() -> Self {
2053        std::default::Default::default()
2054    }
2055
2056    /// Sets the value of [name][crate::model::QueryRepositoryDirectoryContentsRequest::name].
2057    ///
2058    /// # Example
2059    /// ```ignore,no_run
2060    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2061    /// # let project_id = "project_id";
2062    /// # let location_id = "location_id";
2063    /// # let repository_id = "repository_id";
2064    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2065    /// ```
2066    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2067        self.name = v.into();
2068        self
2069    }
2070
2071    /// Sets the value of [commit_sha][crate::model::QueryRepositoryDirectoryContentsRequest::commit_sha].
2072    ///
2073    /// # Example
2074    /// ```ignore,no_run
2075    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2076    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_commit_sha("example");
2077    /// ```
2078    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2079        self.commit_sha = v.into();
2080        self
2081    }
2082
2083    /// Sets the value of [path][crate::model::QueryRepositoryDirectoryContentsRequest::path].
2084    ///
2085    /// # Example
2086    /// ```ignore,no_run
2087    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2088    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_path("example");
2089    /// ```
2090    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2091        self.path = v.into();
2092        self
2093    }
2094
2095    /// Sets the value of [page_size][crate::model::QueryRepositoryDirectoryContentsRequest::page_size].
2096    ///
2097    /// # Example
2098    /// ```ignore,no_run
2099    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2100    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_size(42);
2101    /// ```
2102    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2103        self.page_size = v.into();
2104        self
2105    }
2106
2107    /// Sets the value of [page_token][crate::model::QueryRepositoryDirectoryContentsRequest::page_token].
2108    ///
2109    /// # Example
2110    /// ```ignore,no_run
2111    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2112    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_token("example");
2113    /// ```
2114    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2115        self.page_token = v.into();
2116        self
2117    }
2118}
2119
2120impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
2121    fn typename() -> &'static str {
2122        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
2123    }
2124}
2125
2126/// `QueryRepositoryDirectoryContents` response message.
2127#[derive(Clone, Default, PartialEq)]
2128#[non_exhaustive]
2129pub struct QueryRepositoryDirectoryContentsResponse {
2130    /// List of entries in the directory.
2131    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
2132
2133    /// A token, which can be sent as `page_token` to retrieve the next page.
2134    /// If this field is omitted, there are no subsequent pages.
2135    pub next_page_token: std::string::String,
2136
2137    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2138}
2139
2140impl QueryRepositoryDirectoryContentsResponse {
2141    /// Creates a new default instance.
2142    pub fn new() -> Self {
2143        std::default::Default::default()
2144    }
2145
2146    /// Sets the value of [directory_entries][crate::model::QueryRepositoryDirectoryContentsResponse::directory_entries].
2147    ///
2148    /// # Example
2149    /// ```ignore,no_run
2150    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
2151    /// use google_cloud_dataform_v1::model::DirectoryEntry;
2152    /// let x = QueryRepositoryDirectoryContentsResponse::new()
2153    ///     .set_directory_entries([
2154    ///         DirectoryEntry::default()/* use setters */,
2155    ///         DirectoryEntry::default()/* use (different) setters */,
2156    ///     ]);
2157    /// ```
2158    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
2159    where
2160        T: std::iter::IntoIterator<Item = V>,
2161        V: std::convert::Into<crate::model::DirectoryEntry>,
2162    {
2163        use std::iter::Iterator;
2164        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
2165        self
2166    }
2167
2168    /// Sets the value of [next_page_token][crate::model::QueryRepositoryDirectoryContentsResponse::next_page_token].
2169    ///
2170    /// # Example
2171    /// ```ignore,no_run
2172    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
2173    /// let x = QueryRepositoryDirectoryContentsResponse::new().set_next_page_token("example");
2174    /// ```
2175    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2176        self.next_page_token = v.into();
2177        self
2178    }
2179}
2180
2181impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
2182    fn typename() -> &'static str {
2183        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
2184    }
2185}
2186
2187#[doc(hidden)]
2188impl google_cloud_gax::paginator::internal::PageableResponse
2189    for QueryRepositoryDirectoryContentsResponse
2190{
2191    type PageItem = crate::model::DirectoryEntry;
2192
2193    fn items(self) -> std::vec::Vec<Self::PageItem> {
2194        self.directory_entries
2195    }
2196
2197    fn next_page_token(&self) -> std::string::String {
2198        use std::clone::Clone;
2199        self.next_page_token.clone()
2200    }
2201}
2202
2203/// `FetchRepositoryHistory` request message.
2204#[derive(Clone, Default, PartialEq)]
2205#[non_exhaustive]
2206pub struct FetchRepositoryHistoryRequest {
2207    /// Required. The repository's name.
2208    pub name: std::string::String,
2209
2210    /// Optional. Maximum number of commits to return. The server may return fewer
2211    /// items than requested. If unspecified, the server will pick an appropriate
2212    /// default.
2213    pub page_size: i32,
2214
2215    /// Optional. Page token received from a previous `FetchRepositoryHistory`
2216    /// call. Provide this to retrieve the subsequent page.
2217    ///
2218    /// When paginating, all other parameters provided to `FetchRepositoryHistory`,
2219    /// with the exception of `page_size`, must match the call that provided the
2220    /// page token.
2221    pub page_token: std::string::String,
2222
2223    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2224}
2225
2226impl FetchRepositoryHistoryRequest {
2227    /// Creates a new default instance.
2228    pub fn new() -> Self {
2229        std::default::Default::default()
2230    }
2231
2232    /// Sets the value of [name][crate::model::FetchRepositoryHistoryRequest::name].
2233    ///
2234    /// # Example
2235    /// ```ignore,no_run
2236    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2237    /// # let project_id = "project_id";
2238    /// # let location_id = "location_id";
2239    /// # let repository_id = "repository_id";
2240    /// let x = FetchRepositoryHistoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2241    /// ```
2242    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2243        self.name = v.into();
2244        self
2245    }
2246
2247    /// Sets the value of [page_size][crate::model::FetchRepositoryHistoryRequest::page_size].
2248    ///
2249    /// # Example
2250    /// ```ignore,no_run
2251    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2252    /// let x = FetchRepositoryHistoryRequest::new().set_page_size(42);
2253    /// ```
2254    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2255        self.page_size = v.into();
2256        self
2257    }
2258
2259    /// Sets the value of [page_token][crate::model::FetchRepositoryHistoryRequest::page_token].
2260    ///
2261    /// # Example
2262    /// ```ignore,no_run
2263    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2264    /// let x = FetchRepositoryHistoryRequest::new().set_page_token("example");
2265    /// ```
2266    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2267        self.page_token = v.into();
2268        self
2269    }
2270}
2271
2272impl wkt::message::Message for FetchRepositoryHistoryRequest {
2273    fn typename() -> &'static str {
2274        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
2275    }
2276}
2277
2278/// `FetchRepositoryHistory` response message.
2279#[derive(Clone, Default, PartialEq)]
2280#[non_exhaustive]
2281pub struct FetchRepositoryHistoryResponse {
2282    /// A list of commit logs, ordered by 'git log' default order.
2283    pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
2284
2285    /// A token, which can be sent as `page_token` to retrieve the next page.
2286    /// If this field is omitted, there are no subsequent pages.
2287    pub next_page_token: std::string::String,
2288
2289    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2290}
2291
2292impl FetchRepositoryHistoryResponse {
2293    /// Creates a new default instance.
2294    pub fn new() -> Self {
2295        std::default::Default::default()
2296    }
2297
2298    /// Sets the value of [commits][crate::model::FetchRepositoryHistoryResponse::commits].
2299    ///
2300    /// # Example
2301    /// ```ignore,no_run
2302    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2303    /// use google_cloud_dataform_v1::model::CommitLogEntry;
2304    /// let x = FetchRepositoryHistoryResponse::new()
2305    ///     .set_commits([
2306    ///         CommitLogEntry::default()/* use setters */,
2307    ///         CommitLogEntry::default()/* use (different) setters */,
2308    ///     ]);
2309    /// ```
2310    pub fn set_commits<T, V>(mut self, v: T) -> Self
2311    where
2312        T: std::iter::IntoIterator<Item = V>,
2313        V: std::convert::Into<crate::model::CommitLogEntry>,
2314    {
2315        use std::iter::Iterator;
2316        self.commits = v.into_iter().map(|i| i.into()).collect();
2317        self
2318    }
2319
2320    /// Sets the value of [next_page_token][crate::model::FetchRepositoryHistoryResponse::next_page_token].
2321    ///
2322    /// # Example
2323    /// ```ignore,no_run
2324    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2325    /// let x = FetchRepositoryHistoryResponse::new().set_next_page_token("example");
2326    /// ```
2327    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2328        self.next_page_token = v.into();
2329        self
2330    }
2331}
2332
2333impl wkt::message::Message for FetchRepositoryHistoryResponse {
2334    fn typename() -> &'static str {
2335        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
2336    }
2337}
2338
2339#[doc(hidden)]
2340impl google_cloud_gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
2341    type PageItem = crate::model::CommitLogEntry;
2342
2343    fn items(self) -> std::vec::Vec<Self::PageItem> {
2344        self.commits
2345    }
2346
2347    fn next_page_token(&self) -> std::string::String {
2348        use std::clone::Clone;
2349        self.next_page_token.clone()
2350    }
2351}
2352
2353/// Represents a single commit log.
2354#[derive(Clone, Default, PartialEq)]
2355#[non_exhaustive]
2356pub struct CommitLogEntry {
2357    /// Commit timestamp.
2358    pub commit_time: std::option::Option<wkt::Timestamp>,
2359
2360    /// The commit SHA for this commit log entry.
2361    pub commit_sha: std::string::String,
2362
2363    /// The commit author for this commit log entry.
2364    pub author: std::option::Option<crate::model::CommitAuthor>,
2365
2366    /// The commit message for this commit log entry.
2367    pub commit_message: std::string::String,
2368
2369    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2370}
2371
2372impl CommitLogEntry {
2373    /// Creates a new default instance.
2374    pub fn new() -> Self {
2375        std::default::Default::default()
2376    }
2377
2378    /// Sets the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2379    ///
2380    /// # Example
2381    /// ```ignore,no_run
2382    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2383    /// use wkt::Timestamp;
2384    /// let x = CommitLogEntry::new().set_commit_time(Timestamp::default()/* use setters */);
2385    /// ```
2386    pub fn set_commit_time<T>(mut self, v: T) -> Self
2387    where
2388        T: std::convert::Into<wkt::Timestamp>,
2389    {
2390        self.commit_time = std::option::Option::Some(v.into());
2391        self
2392    }
2393
2394    /// Sets or clears the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2395    ///
2396    /// # Example
2397    /// ```ignore,no_run
2398    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2399    /// use wkt::Timestamp;
2400    /// let x = CommitLogEntry::new().set_or_clear_commit_time(Some(Timestamp::default()/* use setters */));
2401    /// let x = CommitLogEntry::new().set_or_clear_commit_time(None::<Timestamp>);
2402    /// ```
2403    pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
2404    where
2405        T: std::convert::Into<wkt::Timestamp>,
2406    {
2407        self.commit_time = v.map(|x| x.into());
2408        self
2409    }
2410
2411    /// Sets the value of [commit_sha][crate::model::CommitLogEntry::commit_sha].
2412    ///
2413    /// # Example
2414    /// ```ignore,no_run
2415    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2416    /// let x = CommitLogEntry::new().set_commit_sha("example");
2417    /// ```
2418    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2419        self.commit_sha = v.into();
2420        self
2421    }
2422
2423    /// Sets the value of [author][crate::model::CommitLogEntry::author].
2424    ///
2425    /// # Example
2426    /// ```ignore,no_run
2427    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2428    /// use google_cloud_dataform_v1::model::CommitAuthor;
2429    /// let x = CommitLogEntry::new().set_author(CommitAuthor::default()/* use setters */);
2430    /// ```
2431    pub fn set_author<T>(mut self, v: T) -> Self
2432    where
2433        T: std::convert::Into<crate::model::CommitAuthor>,
2434    {
2435        self.author = std::option::Option::Some(v.into());
2436        self
2437    }
2438
2439    /// Sets or clears the value of [author][crate::model::CommitLogEntry::author].
2440    ///
2441    /// # Example
2442    /// ```ignore,no_run
2443    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2444    /// use google_cloud_dataform_v1::model::CommitAuthor;
2445    /// let x = CommitLogEntry::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2446    /// let x = CommitLogEntry::new().set_or_clear_author(None::<CommitAuthor>);
2447    /// ```
2448    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2449    where
2450        T: std::convert::Into<crate::model::CommitAuthor>,
2451    {
2452        self.author = v.map(|x| x.into());
2453        self
2454    }
2455
2456    /// Sets the value of [commit_message][crate::model::CommitLogEntry::commit_message].
2457    ///
2458    /// # Example
2459    /// ```ignore,no_run
2460    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2461    /// let x = CommitLogEntry::new().set_commit_message("example");
2462    /// ```
2463    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2464        self.commit_message = v.into();
2465        self
2466    }
2467}
2468
2469impl wkt::message::Message for CommitLogEntry {
2470    fn typename() -> &'static str {
2471        "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
2472    }
2473}
2474
2475/// Represents a Dataform Git commit.
2476#[derive(Clone, Default, PartialEq)]
2477#[non_exhaustive]
2478pub struct CommitMetadata {
2479    /// Required. The commit's author.
2480    pub author: std::option::Option<crate::model::CommitAuthor>,
2481
2482    /// Optional. The commit's message.
2483    pub commit_message: std::string::String,
2484
2485    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2486}
2487
2488impl CommitMetadata {
2489    /// Creates a new default instance.
2490    pub fn new() -> Self {
2491        std::default::Default::default()
2492    }
2493
2494    /// Sets the value of [author][crate::model::CommitMetadata::author].
2495    ///
2496    /// # Example
2497    /// ```ignore,no_run
2498    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2499    /// use google_cloud_dataform_v1::model::CommitAuthor;
2500    /// let x = CommitMetadata::new().set_author(CommitAuthor::default()/* use setters */);
2501    /// ```
2502    pub fn set_author<T>(mut self, v: T) -> Self
2503    where
2504        T: std::convert::Into<crate::model::CommitAuthor>,
2505    {
2506        self.author = std::option::Option::Some(v.into());
2507        self
2508    }
2509
2510    /// Sets or clears the value of [author][crate::model::CommitMetadata::author].
2511    ///
2512    /// # Example
2513    /// ```ignore,no_run
2514    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2515    /// use google_cloud_dataform_v1::model::CommitAuthor;
2516    /// let x = CommitMetadata::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2517    /// let x = CommitMetadata::new().set_or_clear_author(None::<CommitAuthor>);
2518    /// ```
2519    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2520    where
2521        T: std::convert::Into<crate::model::CommitAuthor>,
2522    {
2523        self.author = v.map(|x| x.into());
2524        self
2525    }
2526
2527    /// Sets the value of [commit_message][crate::model::CommitMetadata::commit_message].
2528    ///
2529    /// # Example
2530    /// ```ignore,no_run
2531    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2532    /// let x = CommitMetadata::new().set_commit_message("example");
2533    /// ```
2534    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2535        self.commit_message = v.into();
2536        self
2537    }
2538}
2539
2540impl wkt::message::Message for CommitMetadata {
2541    fn typename() -> &'static str {
2542        "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
2543    }
2544}
2545
2546/// `ComputeRepositoryAccessTokenStatus` request message.
2547#[derive(Clone, Default, PartialEq)]
2548#[non_exhaustive]
2549pub struct ComputeRepositoryAccessTokenStatusRequest {
2550    /// Required. The repository's name.
2551    pub name: std::string::String,
2552
2553    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2554}
2555
2556impl ComputeRepositoryAccessTokenStatusRequest {
2557    /// Creates a new default instance.
2558    pub fn new() -> Self {
2559        std::default::Default::default()
2560    }
2561
2562    /// Sets the value of [name][crate::model::ComputeRepositoryAccessTokenStatusRequest::name].
2563    ///
2564    /// # Example
2565    /// ```ignore,no_run
2566    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusRequest;
2567    /// # let project_id = "project_id";
2568    /// # let location_id = "location_id";
2569    /// # let repository_id = "repository_id";
2570    /// let x = ComputeRepositoryAccessTokenStatusRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2571    /// ```
2572    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2573        self.name = v.into();
2574        self
2575    }
2576}
2577
2578impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
2579    fn typename() -> &'static str {
2580        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
2581    }
2582}
2583
2584/// `ComputeRepositoryAccessTokenStatus` response message.
2585#[derive(Clone, Default, PartialEq)]
2586#[non_exhaustive]
2587pub struct ComputeRepositoryAccessTokenStatusResponse {
2588    /// Indicates the status of the Git access token.
2589    pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
2590
2591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2592}
2593
2594impl ComputeRepositoryAccessTokenStatusResponse {
2595    /// Creates a new default instance.
2596    pub fn new() -> Self {
2597        std::default::Default::default()
2598    }
2599
2600    /// Sets the value of [token_status][crate::model::ComputeRepositoryAccessTokenStatusResponse::token_status].
2601    ///
2602    /// # Example
2603    /// ```ignore,no_run
2604    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusResponse;
2605    /// use google_cloud_dataform_v1::model::compute_repository_access_token_status_response::TokenStatus;
2606    /// let x0 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::NotFound);
2607    /// let x1 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Invalid);
2608    /// let x2 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Valid);
2609    /// ```
2610    pub fn set_token_status<
2611        T: std::convert::Into<
2612                crate::model::compute_repository_access_token_status_response::TokenStatus,
2613            >,
2614    >(
2615        mut self,
2616        v: T,
2617    ) -> Self {
2618        self.token_status = v.into();
2619        self
2620    }
2621}
2622
2623impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
2624    fn typename() -> &'static str {
2625        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
2626    }
2627}
2628
2629/// Defines additional types related to [ComputeRepositoryAccessTokenStatusResponse].
2630pub mod compute_repository_access_token_status_response {
2631    #[allow(unused_imports)]
2632    use super::*;
2633
2634    /// Indicates the status of a Git authentication token.
2635    ///
2636    /// # Working with unknown values
2637    ///
2638    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2639    /// additional enum variants at any time. Adding new variants is not considered
2640    /// a breaking change. Applications should write their code in anticipation of:
2641    ///
2642    /// - New values appearing in future releases of the client library, **and**
2643    /// - New values received dynamically, without application changes.
2644    ///
2645    /// Please consult the [Working with enums] section in the user guide for some
2646    /// guidelines.
2647    ///
2648    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2649    #[derive(Clone, Debug, PartialEq)]
2650    #[non_exhaustive]
2651    pub enum TokenStatus {
2652        /// Default value. This value is unused.
2653        Unspecified,
2654        /// The token could not be found in Secret Manager (or the Dataform
2655        /// Service Account did not have permission to access it).
2656        NotFound,
2657        /// The token could not be used to authenticate against the Git remote.
2658        Invalid,
2659        /// The token was used successfully to authenticate against the Git remote.
2660        Valid,
2661        /// The token is not accessible due to permission issues.
2662        PermissionDenied,
2663        /// If set, the enum was initialized with an unknown value.
2664        ///
2665        /// Applications can examine the value using [TokenStatus::value] or
2666        /// [TokenStatus::name].
2667        UnknownValue(token_status::UnknownValue),
2668    }
2669
2670    #[doc(hidden)]
2671    pub mod token_status {
2672        #[allow(unused_imports)]
2673        use super::*;
2674        #[derive(Clone, Debug, PartialEq)]
2675        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2676    }
2677
2678    impl TokenStatus {
2679        /// Gets the enum value.
2680        ///
2681        /// Returns `None` if the enum contains an unknown value deserialized from
2682        /// the string representation of enums.
2683        pub fn value(&self) -> std::option::Option<i32> {
2684            match self {
2685                Self::Unspecified => std::option::Option::Some(0),
2686                Self::NotFound => std::option::Option::Some(1),
2687                Self::Invalid => std::option::Option::Some(2),
2688                Self::Valid => std::option::Option::Some(3),
2689                Self::PermissionDenied => std::option::Option::Some(4),
2690                Self::UnknownValue(u) => u.0.value(),
2691            }
2692        }
2693
2694        /// Gets the enum value as a string.
2695        ///
2696        /// Returns `None` if the enum contains an unknown value deserialized from
2697        /// the integer representation of enums.
2698        pub fn name(&self) -> std::option::Option<&str> {
2699            match self {
2700                Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
2701                Self::NotFound => std::option::Option::Some("NOT_FOUND"),
2702                Self::Invalid => std::option::Option::Some("INVALID"),
2703                Self::Valid => std::option::Option::Some("VALID"),
2704                Self::PermissionDenied => std::option::Option::Some("PERMISSION_DENIED"),
2705                Self::UnknownValue(u) => u.0.name(),
2706            }
2707        }
2708    }
2709
2710    impl std::default::Default for TokenStatus {
2711        fn default() -> Self {
2712            use std::convert::From;
2713            Self::from(0)
2714        }
2715    }
2716
2717    impl std::fmt::Display for TokenStatus {
2718        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2719            wkt::internal::display_enum(f, self.name(), self.value())
2720        }
2721    }
2722
2723    impl std::convert::From<i32> for TokenStatus {
2724        fn from(value: i32) -> Self {
2725            match value {
2726                0 => Self::Unspecified,
2727                1 => Self::NotFound,
2728                2 => Self::Invalid,
2729                3 => Self::Valid,
2730                4 => Self::PermissionDenied,
2731                _ => Self::UnknownValue(token_status::UnknownValue(
2732                    wkt::internal::UnknownEnumValue::Integer(value),
2733                )),
2734            }
2735        }
2736    }
2737
2738    impl std::convert::From<&str> for TokenStatus {
2739        fn from(value: &str) -> Self {
2740            use std::string::ToString;
2741            match value {
2742                "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
2743                "NOT_FOUND" => Self::NotFound,
2744                "INVALID" => Self::Invalid,
2745                "VALID" => Self::Valid,
2746                "PERMISSION_DENIED" => Self::PermissionDenied,
2747                _ => Self::UnknownValue(token_status::UnknownValue(
2748                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2749                )),
2750            }
2751        }
2752    }
2753
2754    impl serde::ser::Serialize for TokenStatus {
2755        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2756        where
2757            S: serde::Serializer,
2758        {
2759            match self {
2760                Self::Unspecified => serializer.serialize_i32(0),
2761                Self::NotFound => serializer.serialize_i32(1),
2762                Self::Invalid => serializer.serialize_i32(2),
2763                Self::Valid => serializer.serialize_i32(3),
2764                Self::PermissionDenied => serializer.serialize_i32(4),
2765                Self::UnknownValue(u) => u.0.serialize(serializer),
2766            }
2767        }
2768    }
2769
2770    impl<'de> serde::de::Deserialize<'de> for TokenStatus {
2771        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2772        where
2773            D: serde::Deserializer<'de>,
2774        {
2775            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
2776                ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
2777            ))
2778        }
2779    }
2780}
2781
2782/// `FetchRemoteBranches` request message.
2783#[derive(Clone, Default, PartialEq)]
2784#[non_exhaustive]
2785pub struct FetchRemoteBranchesRequest {
2786    /// Required. The repository's name.
2787    pub name: std::string::String,
2788
2789    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2790}
2791
2792impl FetchRemoteBranchesRequest {
2793    /// Creates a new default instance.
2794    pub fn new() -> Self {
2795        std::default::Default::default()
2796    }
2797
2798    /// Sets the value of [name][crate::model::FetchRemoteBranchesRequest::name].
2799    ///
2800    /// # Example
2801    /// ```ignore,no_run
2802    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesRequest;
2803    /// # let project_id = "project_id";
2804    /// # let location_id = "location_id";
2805    /// # let repository_id = "repository_id";
2806    /// let x = FetchRemoteBranchesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2807    /// ```
2808    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2809        self.name = v.into();
2810        self
2811    }
2812}
2813
2814impl wkt::message::Message for FetchRemoteBranchesRequest {
2815    fn typename() -> &'static str {
2816        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
2817    }
2818}
2819
2820/// `FetchRemoteBranches` response message.
2821#[derive(Clone, Default, PartialEq)]
2822#[non_exhaustive]
2823pub struct FetchRemoteBranchesResponse {
2824    /// The remote repository's branch names.
2825    pub branches: std::vec::Vec<std::string::String>,
2826
2827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2828}
2829
2830impl FetchRemoteBranchesResponse {
2831    /// Creates a new default instance.
2832    pub fn new() -> Self {
2833        std::default::Default::default()
2834    }
2835
2836    /// Sets the value of [branches][crate::model::FetchRemoteBranchesResponse::branches].
2837    ///
2838    /// # Example
2839    /// ```ignore,no_run
2840    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesResponse;
2841    /// let x = FetchRemoteBranchesResponse::new().set_branches(["a", "b", "c"]);
2842    /// ```
2843    pub fn set_branches<T, V>(mut self, v: T) -> Self
2844    where
2845        T: std::iter::IntoIterator<Item = V>,
2846        V: std::convert::Into<std::string::String>,
2847    {
2848        use std::iter::Iterator;
2849        self.branches = v.into_iter().map(|i| i.into()).collect();
2850        self
2851    }
2852}
2853
2854impl wkt::message::Message for FetchRemoteBranchesResponse {
2855    fn typename() -> &'static str {
2856        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
2857    }
2858}
2859
2860/// Represents a Dataform Git workspace.
2861#[derive(Clone, Default, PartialEq)]
2862#[non_exhaustive]
2863pub struct Workspace {
2864    /// Identifier. The workspace's name.
2865    pub name: std::string::String,
2866
2867    /// Output only. The timestamp of when the workspace was created.
2868    pub create_time: std::option::Option<wkt::Timestamp>,
2869
2870    /// Output only. A data encryption state of a Git repository if this Workspace
2871    /// is protected by a KMS key.
2872    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
2873
2874    /// Output only. All the metadata information that is used internally to serve
2875    /// the resource. For example: timestamps, flags, status fields, etc. The
2876    /// format of this field is a JSON string.
2877    pub internal_metadata: std::option::Option<std::string::String>,
2878
2879    /// Optional. If set to true, workspaces will not be moved if its linked
2880    /// Repository is moved. Instead, it will be deleted.
2881    pub disable_moves: std::option::Option<bool>,
2882
2883    /// Output only. Metadata indicating whether this resource is user-scoped. For
2884    /// `Workspace` resources, the `user_scoped` field is always `true`.
2885    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
2886
2887    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2888}
2889
2890impl Workspace {
2891    /// Creates a new default instance.
2892    pub fn new() -> Self {
2893        std::default::Default::default()
2894    }
2895
2896    /// Sets the value of [name][crate::model::Workspace::name].
2897    ///
2898    /// # Example
2899    /// ```ignore,no_run
2900    /// # use google_cloud_dataform_v1::model::Workspace;
2901    /// # let project_id = "project_id";
2902    /// # let location_id = "location_id";
2903    /// # let repository_id = "repository_id";
2904    /// # let workspace_id = "workspace_id";
2905    /// let x = Workspace::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
2906    /// ```
2907    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2908        self.name = v.into();
2909        self
2910    }
2911
2912    /// Sets the value of [create_time][crate::model::Workspace::create_time].
2913    ///
2914    /// # Example
2915    /// ```ignore,no_run
2916    /// # use google_cloud_dataform_v1::model::Workspace;
2917    /// use wkt::Timestamp;
2918    /// let x = Workspace::new().set_create_time(Timestamp::default()/* use setters */);
2919    /// ```
2920    pub fn set_create_time<T>(mut self, v: T) -> Self
2921    where
2922        T: std::convert::Into<wkt::Timestamp>,
2923    {
2924        self.create_time = std::option::Option::Some(v.into());
2925        self
2926    }
2927
2928    /// Sets or clears the value of [create_time][crate::model::Workspace::create_time].
2929    ///
2930    /// # Example
2931    /// ```ignore,no_run
2932    /// # use google_cloud_dataform_v1::model::Workspace;
2933    /// use wkt::Timestamp;
2934    /// let x = Workspace::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2935    /// let x = Workspace::new().set_or_clear_create_time(None::<Timestamp>);
2936    /// ```
2937    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2938    where
2939        T: std::convert::Into<wkt::Timestamp>,
2940    {
2941        self.create_time = v.map(|x| x.into());
2942        self
2943    }
2944
2945    /// Sets the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2946    ///
2947    /// # Example
2948    /// ```ignore,no_run
2949    /// # use google_cloud_dataform_v1::model::Workspace;
2950    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2951    /// let x = Workspace::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
2952    /// ```
2953    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
2954    where
2955        T: std::convert::Into<crate::model::DataEncryptionState>,
2956    {
2957        self.data_encryption_state = std::option::Option::Some(v.into());
2958        self
2959    }
2960
2961    /// Sets or clears the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2962    ///
2963    /// # Example
2964    /// ```ignore,no_run
2965    /// # use google_cloud_dataform_v1::model::Workspace;
2966    /// use google_cloud_dataform_v1::model::DataEncryptionState;
2967    /// let x = Workspace::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
2968    /// let x = Workspace::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
2969    /// ```
2970    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
2971    where
2972        T: std::convert::Into<crate::model::DataEncryptionState>,
2973    {
2974        self.data_encryption_state = v.map(|x| x.into());
2975        self
2976    }
2977
2978    /// Sets the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2979    ///
2980    /// # Example
2981    /// ```ignore,no_run
2982    /// # use google_cloud_dataform_v1::model::Workspace;
2983    /// let x = Workspace::new().set_internal_metadata("example");
2984    /// ```
2985    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
2986    where
2987        T: std::convert::Into<std::string::String>,
2988    {
2989        self.internal_metadata = std::option::Option::Some(v.into());
2990        self
2991    }
2992
2993    /// Sets or clears the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2994    ///
2995    /// # Example
2996    /// ```ignore,no_run
2997    /// # use google_cloud_dataform_v1::model::Workspace;
2998    /// let x = Workspace::new().set_or_clear_internal_metadata(Some("example"));
2999    /// let x = Workspace::new().set_or_clear_internal_metadata(None::<String>);
3000    /// ```
3001    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
3002    where
3003        T: std::convert::Into<std::string::String>,
3004    {
3005        self.internal_metadata = v.map(|x| x.into());
3006        self
3007    }
3008
3009    /// Sets the value of [disable_moves][crate::model::Workspace::disable_moves].
3010    ///
3011    /// # Example
3012    /// ```ignore,no_run
3013    /// # use google_cloud_dataform_v1::model::Workspace;
3014    /// let x = Workspace::new().set_disable_moves(true);
3015    /// ```
3016    pub fn set_disable_moves<T>(mut self, v: T) -> Self
3017    where
3018        T: std::convert::Into<bool>,
3019    {
3020        self.disable_moves = std::option::Option::Some(v.into());
3021        self
3022    }
3023
3024    /// Sets or clears the value of [disable_moves][crate::model::Workspace::disable_moves].
3025    ///
3026    /// # Example
3027    /// ```ignore,no_run
3028    /// # use google_cloud_dataform_v1::model::Workspace;
3029    /// let x = Workspace::new().set_or_clear_disable_moves(Some(false));
3030    /// let x = Workspace::new().set_or_clear_disable_moves(None::<bool>);
3031    /// ```
3032    pub fn set_or_clear_disable_moves<T>(mut self, v: std::option::Option<T>) -> Self
3033    where
3034        T: std::convert::Into<bool>,
3035    {
3036        self.disable_moves = v.map(|x| x.into());
3037        self
3038    }
3039
3040    /// Sets the value of [private_resource_metadata][crate::model::Workspace::private_resource_metadata].
3041    ///
3042    /// # Example
3043    /// ```ignore,no_run
3044    /// # use google_cloud_dataform_v1::model::Workspace;
3045    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
3046    /// let x = Workspace::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
3047    /// ```
3048    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
3049    where
3050        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
3051    {
3052        self.private_resource_metadata = std::option::Option::Some(v.into());
3053        self
3054    }
3055
3056    /// Sets or clears the value of [private_resource_metadata][crate::model::Workspace::private_resource_metadata].
3057    ///
3058    /// # Example
3059    /// ```ignore,no_run
3060    /// # use google_cloud_dataform_v1::model::Workspace;
3061    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
3062    /// let x = Workspace::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
3063    /// let x = Workspace::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
3064    /// ```
3065    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
3066    where
3067        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
3068    {
3069        self.private_resource_metadata = v.map(|x| x.into());
3070        self
3071    }
3072}
3073
3074impl wkt::message::Message for Workspace {
3075    fn typename() -> &'static str {
3076        "type.googleapis.com/google.cloud.dataform.v1.Workspace"
3077    }
3078}
3079
3080/// `ListWorkspaces` request message.
3081#[derive(Clone, Default, PartialEq)]
3082#[non_exhaustive]
3083pub struct ListWorkspacesRequest {
3084    /// Required. The repository in which to list workspaces. Must be in the
3085    /// format `projects/*/locations/*/repositories/*`.
3086    pub parent: std::string::String,
3087
3088    /// Optional. Maximum number of workspaces to return. The server may return
3089    /// fewer items than requested. If unspecified, the server will pick an
3090    /// appropriate default.
3091    pub page_size: i32,
3092
3093    /// Optional. Page token received from a previous `ListWorkspaces` call.
3094    /// Provide this to retrieve the subsequent page.
3095    ///
3096    /// When paginating, all other parameters provided to `ListWorkspaces`, with
3097    /// the exception of `page_size`, must match the call that provided the page
3098    /// token.
3099    pub page_token: std::string::String,
3100
3101    /// Optional. This field only supports ordering by `name`. If unspecified, the
3102    /// server will choose the ordering. If specified, the default order is
3103    /// ascending for the `name` field.
3104    pub order_by: std::string::String,
3105
3106    /// Optional. Filter for the returned list.
3107    pub filter: std::string::String,
3108
3109    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3110}
3111
3112impl ListWorkspacesRequest {
3113    /// Creates a new default instance.
3114    pub fn new() -> Self {
3115        std::default::Default::default()
3116    }
3117
3118    /// Sets the value of [parent][crate::model::ListWorkspacesRequest::parent].
3119    ///
3120    /// # Example
3121    /// ```ignore,no_run
3122    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3123    /// # let project_id = "project_id";
3124    /// # let location_id = "location_id";
3125    /// # let repository_id = "repository_id";
3126    /// let x = ListWorkspacesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
3127    /// ```
3128    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3129        self.parent = v.into();
3130        self
3131    }
3132
3133    /// Sets the value of [page_size][crate::model::ListWorkspacesRequest::page_size].
3134    ///
3135    /// # Example
3136    /// ```ignore,no_run
3137    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3138    /// let x = ListWorkspacesRequest::new().set_page_size(42);
3139    /// ```
3140    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3141        self.page_size = v.into();
3142        self
3143    }
3144
3145    /// Sets the value of [page_token][crate::model::ListWorkspacesRequest::page_token].
3146    ///
3147    /// # Example
3148    /// ```ignore,no_run
3149    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3150    /// let x = ListWorkspacesRequest::new().set_page_token("example");
3151    /// ```
3152    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3153        self.page_token = v.into();
3154        self
3155    }
3156
3157    /// Sets the value of [order_by][crate::model::ListWorkspacesRequest::order_by].
3158    ///
3159    /// # Example
3160    /// ```ignore,no_run
3161    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3162    /// let x = ListWorkspacesRequest::new().set_order_by("example");
3163    /// ```
3164    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3165        self.order_by = v.into();
3166        self
3167    }
3168
3169    /// Sets the value of [filter][crate::model::ListWorkspacesRequest::filter].
3170    ///
3171    /// # Example
3172    /// ```ignore,no_run
3173    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3174    /// let x = ListWorkspacesRequest::new().set_filter("example");
3175    /// ```
3176    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3177        self.filter = v.into();
3178        self
3179    }
3180}
3181
3182impl wkt::message::Message for ListWorkspacesRequest {
3183    fn typename() -> &'static str {
3184        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
3185    }
3186}
3187
3188/// `ListWorkspaces` response message.
3189#[derive(Clone, Default, PartialEq)]
3190#[non_exhaustive]
3191pub struct ListWorkspacesResponse {
3192    /// List of workspaces.
3193    pub workspaces: std::vec::Vec<crate::model::Workspace>,
3194
3195    /// A token, which can be sent as `page_token` to retrieve the next page.
3196    /// If this field is omitted, there are no subsequent pages.
3197    pub next_page_token: std::string::String,
3198
3199    /// Locations which could not be reached.
3200    pub unreachable: std::vec::Vec<std::string::String>,
3201
3202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3203}
3204
3205impl ListWorkspacesResponse {
3206    /// Creates a new default instance.
3207    pub fn new() -> Self {
3208        std::default::Default::default()
3209    }
3210
3211    /// Sets the value of [workspaces][crate::model::ListWorkspacesResponse::workspaces].
3212    ///
3213    /// # Example
3214    /// ```ignore,no_run
3215    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3216    /// use google_cloud_dataform_v1::model::Workspace;
3217    /// let x = ListWorkspacesResponse::new()
3218    ///     .set_workspaces([
3219    ///         Workspace::default()/* use setters */,
3220    ///         Workspace::default()/* use (different) setters */,
3221    ///     ]);
3222    /// ```
3223    pub fn set_workspaces<T, V>(mut self, v: T) -> Self
3224    where
3225        T: std::iter::IntoIterator<Item = V>,
3226        V: std::convert::Into<crate::model::Workspace>,
3227    {
3228        use std::iter::Iterator;
3229        self.workspaces = v.into_iter().map(|i| i.into()).collect();
3230        self
3231    }
3232
3233    /// Sets the value of [next_page_token][crate::model::ListWorkspacesResponse::next_page_token].
3234    ///
3235    /// # Example
3236    /// ```ignore,no_run
3237    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3238    /// let x = ListWorkspacesResponse::new().set_next_page_token("example");
3239    /// ```
3240    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3241        self.next_page_token = v.into();
3242        self
3243    }
3244
3245    /// Sets the value of [unreachable][crate::model::ListWorkspacesResponse::unreachable].
3246    ///
3247    /// # Example
3248    /// ```ignore,no_run
3249    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3250    /// let x = ListWorkspacesResponse::new().set_unreachable(["a", "b", "c"]);
3251    /// ```
3252    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3253    where
3254        T: std::iter::IntoIterator<Item = V>,
3255        V: std::convert::Into<std::string::String>,
3256    {
3257        use std::iter::Iterator;
3258        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3259        self
3260    }
3261}
3262
3263impl wkt::message::Message for ListWorkspacesResponse {
3264    fn typename() -> &'static str {
3265        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
3266    }
3267}
3268
3269#[doc(hidden)]
3270impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
3271    type PageItem = crate::model::Workspace;
3272
3273    fn items(self) -> std::vec::Vec<Self::PageItem> {
3274        self.workspaces
3275    }
3276
3277    fn next_page_token(&self) -> std::string::String {
3278        use std::clone::Clone;
3279        self.next_page_token.clone()
3280    }
3281}
3282
3283/// `GetWorkspace` request message.
3284#[derive(Clone, Default, PartialEq)]
3285#[non_exhaustive]
3286pub struct GetWorkspaceRequest {
3287    /// Required. The workspace's name.
3288    pub name: std::string::String,
3289
3290    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3291}
3292
3293impl GetWorkspaceRequest {
3294    /// Creates a new default instance.
3295    pub fn new() -> Self {
3296        std::default::Default::default()
3297    }
3298
3299    /// Sets the value of [name][crate::model::GetWorkspaceRequest::name].
3300    ///
3301    /// # Example
3302    /// ```ignore,no_run
3303    /// # use google_cloud_dataform_v1::model::GetWorkspaceRequest;
3304    /// # let project_id = "project_id";
3305    /// # let location_id = "location_id";
3306    /// # let repository_id = "repository_id";
3307    /// # let workspace_id = "workspace_id";
3308    /// let x = GetWorkspaceRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3309    /// ```
3310    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3311        self.name = v.into();
3312        self
3313    }
3314}
3315
3316impl wkt::message::Message for GetWorkspaceRequest {
3317    fn typename() -> &'static str {
3318        "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
3319    }
3320}
3321
3322/// `CreateWorkspace` request message.
3323#[derive(Clone, Default, PartialEq)]
3324#[non_exhaustive]
3325pub struct CreateWorkspaceRequest {
3326    /// Required. The repository in which to create the workspace. Must be in the
3327    /// format `projects/*/locations/*/repositories/*`.
3328    pub parent: std::string::String,
3329
3330    /// Required. The workspace to create.
3331    pub workspace: std::option::Option<crate::model::Workspace>,
3332
3333    /// Required. The ID to use for the workspace, which will become the final
3334    /// component of the workspace's resource name.
3335    pub workspace_id: std::string::String,
3336
3337    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3338}
3339
3340impl CreateWorkspaceRequest {
3341    /// Creates a new default instance.
3342    pub fn new() -> Self {
3343        std::default::Default::default()
3344    }
3345
3346    /// Sets the value of [parent][crate::model::CreateWorkspaceRequest::parent].
3347    ///
3348    /// # Example
3349    /// ```ignore,no_run
3350    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3351    /// # let project_id = "project_id";
3352    /// # let location_id = "location_id";
3353    /// # let repository_id = "repository_id";
3354    /// let x = CreateWorkspaceRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
3355    /// ```
3356    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3357        self.parent = v.into();
3358        self
3359    }
3360
3361    /// Sets the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3362    ///
3363    /// # Example
3364    /// ```ignore,no_run
3365    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3366    /// use google_cloud_dataform_v1::model::Workspace;
3367    /// let x = CreateWorkspaceRequest::new().set_workspace(Workspace::default()/* use setters */);
3368    /// ```
3369    pub fn set_workspace<T>(mut self, v: T) -> Self
3370    where
3371        T: std::convert::Into<crate::model::Workspace>,
3372    {
3373        self.workspace = std::option::Option::Some(v.into());
3374        self
3375    }
3376
3377    /// Sets or clears the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3378    ///
3379    /// # Example
3380    /// ```ignore,no_run
3381    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3382    /// use google_cloud_dataform_v1::model::Workspace;
3383    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(Some(Workspace::default()/* use setters */));
3384    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(None::<Workspace>);
3385    /// ```
3386    pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
3387    where
3388        T: std::convert::Into<crate::model::Workspace>,
3389    {
3390        self.workspace = v.map(|x| x.into());
3391        self
3392    }
3393
3394    /// Sets the value of [workspace_id][crate::model::CreateWorkspaceRequest::workspace_id].
3395    ///
3396    /// # Example
3397    /// ```ignore,no_run
3398    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3399    /// let x = CreateWorkspaceRequest::new().set_workspace_id("example");
3400    /// ```
3401    pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3402        self.workspace_id = v.into();
3403        self
3404    }
3405}
3406
3407impl wkt::message::Message for CreateWorkspaceRequest {
3408    fn typename() -> &'static str {
3409        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
3410    }
3411}
3412
3413/// `DeleteWorkspace` request message.
3414#[derive(Clone, Default, PartialEq)]
3415#[non_exhaustive]
3416pub struct DeleteWorkspaceRequest {
3417    /// Required. The workspace resource's name.
3418    pub name: std::string::String,
3419
3420    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3421}
3422
3423impl DeleteWorkspaceRequest {
3424    /// Creates a new default instance.
3425    pub fn new() -> Self {
3426        std::default::Default::default()
3427    }
3428
3429    /// Sets the value of [name][crate::model::DeleteWorkspaceRequest::name].
3430    ///
3431    /// # Example
3432    /// ```ignore,no_run
3433    /// # use google_cloud_dataform_v1::model::DeleteWorkspaceRequest;
3434    /// # let project_id = "project_id";
3435    /// # let location_id = "location_id";
3436    /// # let repository_id = "repository_id";
3437    /// # let workspace_id = "workspace_id";
3438    /// let x = DeleteWorkspaceRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3439    /// ```
3440    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3441        self.name = v.into();
3442        self
3443    }
3444}
3445
3446impl wkt::message::Message for DeleteWorkspaceRequest {
3447    fn typename() -> &'static str {
3448        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
3449    }
3450}
3451
3452/// Represents the author of a Git commit.
3453#[derive(Clone, Default, PartialEq)]
3454#[non_exhaustive]
3455pub struct CommitAuthor {
3456    /// Required. The commit author's name.
3457    pub name: std::string::String,
3458
3459    /// Required. The commit author's email address.
3460    pub email_address: std::string::String,
3461
3462    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3463}
3464
3465impl CommitAuthor {
3466    /// Creates a new default instance.
3467    pub fn new() -> Self {
3468        std::default::Default::default()
3469    }
3470
3471    /// Sets the value of [name][crate::model::CommitAuthor::name].
3472    ///
3473    /// # Example
3474    /// ```ignore,no_run
3475    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3476    /// let x = CommitAuthor::new().set_name("example");
3477    /// ```
3478    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3479        self.name = v.into();
3480        self
3481    }
3482
3483    /// Sets the value of [email_address][crate::model::CommitAuthor::email_address].
3484    ///
3485    /// # Example
3486    /// ```ignore,no_run
3487    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3488    /// let x = CommitAuthor::new().set_email_address("example");
3489    /// ```
3490    pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3491        self.email_address = v.into();
3492        self
3493    }
3494}
3495
3496impl wkt::message::Message for CommitAuthor {
3497    fn typename() -> &'static str {
3498        "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
3499    }
3500}
3501
3502/// `PullGitCommits` request message.
3503#[derive(Clone, Default, PartialEq)]
3504#[non_exhaustive]
3505pub struct PullGitCommitsRequest {
3506    /// Required. The workspace's name.
3507    pub name: std::string::String,
3508
3509    /// Optional. The name of the branch in the Git remote from which to pull
3510    /// commits. If left unset, the repository's default branch name will be used.
3511    pub remote_branch: std::string::String,
3512
3513    /// Required. The author of any merge commit which may be created as a result
3514    /// of merging fetched Git commits into this workspace.
3515    pub author: std::option::Option<crate::model::CommitAuthor>,
3516
3517    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3518}
3519
3520impl PullGitCommitsRequest {
3521    /// Creates a new default instance.
3522    pub fn new() -> Self {
3523        std::default::Default::default()
3524    }
3525
3526    /// Sets the value of [name][crate::model::PullGitCommitsRequest::name].
3527    ///
3528    /// # Example
3529    /// ```ignore,no_run
3530    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3531    /// # let project_id = "project_id";
3532    /// # let location_id = "location_id";
3533    /// # let repository_id = "repository_id";
3534    /// # let workspace_id = "workspace_id";
3535    /// let x = PullGitCommitsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3536    /// ```
3537    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3538        self.name = v.into();
3539        self
3540    }
3541
3542    /// Sets the value of [remote_branch][crate::model::PullGitCommitsRequest::remote_branch].
3543    ///
3544    /// # Example
3545    /// ```ignore,no_run
3546    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3547    /// let x = PullGitCommitsRequest::new().set_remote_branch("example");
3548    /// ```
3549    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3550        self.remote_branch = v.into();
3551        self
3552    }
3553
3554    /// Sets the value of [author][crate::model::PullGitCommitsRequest::author].
3555    ///
3556    /// # Example
3557    /// ```ignore,no_run
3558    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3559    /// use google_cloud_dataform_v1::model::CommitAuthor;
3560    /// let x = PullGitCommitsRequest::new().set_author(CommitAuthor::default()/* use setters */);
3561    /// ```
3562    pub fn set_author<T>(mut self, v: T) -> Self
3563    where
3564        T: std::convert::Into<crate::model::CommitAuthor>,
3565    {
3566        self.author = std::option::Option::Some(v.into());
3567        self
3568    }
3569
3570    /// Sets or clears the value of [author][crate::model::PullGitCommitsRequest::author].
3571    ///
3572    /// # Example
3573    /// ```ignore,no_run
3574    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3575    /// use google_cloud_dataform_v1::model::CommitAuthor;
3576    /// let x = PullGitCommitsRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
3577    /// let x = PullGitCommitsRequest::new().set_or_clear_author(None::<CommitAuthor>);
3578    /// ```
3579    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
3580    where
3581        T: std::convert::Into<crate::model::CommitAuthor>,
3582    {
3583        self.author = v.map(|x| x.into());
3584        self
3585    }
3586}
3587
3588impl wkt::message::Message for PullGitCommitsRequest {
3589    fn typename() -> &'static str {
3590        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
3591    }
3592}
3593
3594/// `PullGitCommits` response message.
3595#[derive(Clone, Default, PartialEq)]
3596#[non_exhaustive]
3597pub struct PullGitCommitsResponse {
3598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3599}
3600
3601impl PullGitCommitsResponse {
3602    /// Creates a new default instance.
3603    pub fn new() -> Self {
3604        std::default::Default::default()
3605    }
3606}
3607
3608impl wkt::message::Message for PullGitCommitsResponse {
3609    fn typename() -> &'static str {
3610        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
3611    }
3612}
3613
3614/// `PushGitCommits` request message.
3615#[derive(Clone, Default, PartialEq)]
3616#[non_exhaustive]
3617pub struct PushGitCommitsRequest {
3618    /// Required. The workspace's name.
3619    pub name: std::string::String,
3620
3621    /// Optional. The name of the branch in the Git remote to which commits should
3622    /// be pushed. If left unset, the repository's default branch name will be
3623    /// used.
3624    pub remote_branch: std::string::String,
3625
3626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3627}
3628
3629impl PushGitCommitsRequest {
3630    /// Creates a new default instance.
3631    pub fn new() -> Self {
3632        std::default::Default::default()
3633    }
3634
3635    /// Sets the value of [name][crate::model::PushGitCommitsRequest::name].
3636    ///
3637    /// # Example
3638    /// ```ignore,no_run
3639    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3640    /// # let project_id = "project_id";
3641    /// # let location_id = "location_id";
3642    /// # let repository_id = "repository_id";
3643    /// # let workspace_id = "workspace_id";
3644    /// let x = PushGitCommitsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3645    /// ```
3646    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3647        self.name = v.into();
3648        self
3649    }
3650
3651    /// Sets the value of [remote_branch][crate::model::PushGitCommitsRequest::remote_branch].
3652    ///
3653    /// # Example
3654    /// ```ignore,no_run
3655    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3656    /// let x = PushGitCommitsRequest::new().set_remote_branch("example");
3657    /// ```
3658    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3659        self.remote_branch = v.into();
3660        self
3661    }
3662}
3663
3664impl wkt::message::Message for PushGitCommitsRequest {
3665    fn typename() -> &'static str {
3666        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
3667    }
3668}
3669
3670/// `PushGitCommits` response message.
3671#[derive(Clone, Default, PartialEq)]
3672#[non_exhaustive]
3673pub struct PushGitCommitsResponse {
3674    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3675}
3676
3677impl PushGitCommitsResponse {
3678    /// Creates a new default instance.
3679    pub fn new() -> Self {
3680        std::default::Default::default()
3681    }
3682}
3683
3684impl wkt::message::Message for PushGitCommitsResponse {
3685    fn typename() -> &'static str {
3686        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
3687    }
3688}
3689
3690/// `FetchFileGitStatuses` request message.
3691#[derive(Clone, Default, PartialEq)]
3692#[non_exhaustive]
3693pub struct FetchFileGitStatusesRequest {
3694    /// Required. The workspace's name.
3695    pub name: std::string::String,
3696
3697    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3698}
3699
3700impl FetchFileGitStatusesRequest {
3701    /// Creates a new default instance.
3702    pub fn new() -> Self {
3703        std::default::Default::default()
3704    }
3705
3706    /// Sets the value of [name][crate::model::FetchFileGitStatusesRequest::name].
3707    ///
3708    /// # Example
3709    /// ```ignore,no_run
3710    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesRequest;
3711    /// # let project_id = "project_id";
3712    /// # let location_id = "location_id";
3713    /// # let repository_id = "repository_id";
3714    /// # let workspace_id = "workspace_id";
3715    /// let x = FetchFileGitStatusesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3716    /// ```
3717    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3718        self.name = v.into();
3719        self
3720    }
3721}
3722
3723impl wkt::message::Message for FetchFileGitStatusesRequest {
3724    fn typename() -> &'static str {
3725        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
3726    }
3727}
3728
3729/// `FetchFileGitStatuses` response message.
3730#[derive(Clone, Default, PartialEq)]
3731#[non_exhaustive]
3732pub struct FetchFileGitStatusesResponse {
3733    /// A list of all files which have uncommitted Git changes. There will only be
3734    /// a single entry for any given file.
3735    pub uncommitted_file_changes:
3736        std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
3737
3738    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3739}
3740
3741impl FetchFileGitStatusesResponse {
3742    /// Creates a new default instance.
3743    pub fn new() -> Self {
3744        std::default::Default::default()
3745    }
3746
3747    /// Sets the value of [uncommitted_file_changes][crate::model::FetchFileGitStatusesResponse::uncommitted_file_changes].
3748    ///
3749    /// # Example
3750    /// ```ignore,no_run
3751    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesResponse;
3752    /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3753    /// let x = FetchFileGitStatusesResponse::new()
3754    ///     .set_uncommitted_file_changes([
3755    ///         UncommittedFileChange::default()/* use setters */,
3756    ///         UncommittedFileChange::default()/* use (different) setters */,
3757    ///     ]);
3758    /// ```
3759    pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
3760    where
3761        T: std::iter::IntoIterator<Item = V>,
3762        V: std::convert::Into<
3763                crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
3764            >,
3765    {
3766        use std::iter::Iterator;
3767        self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
3768        self
3769    }
3770}
3771
3772impl wkt::message::Message for FetchFileGitStatusesResponse {
3773    fn typename() -> &'static str {
3774        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
3775    }
3776}
3777
3778/// Defines additional types related to [FetchFileGitStatusesResponse].
3779pub mod fetch_file_git_statuses_response {
3780    #[allow(unused_imports)]
3781    use super::*;
3782
3783    /// Represents the Git state of a file with uncommitted changes.
3784    #[derive(Clone, Default, PartialEq)]
3785    #[non_exhaustive]
3786    pub struct UncommittedFileChange {
3787        /// The file's full path including filename, relative to the workspace root.
3788        pub path: std::string::String,
3789
3790        /// Output only. Indicates the status of the file.
3791        pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3792
3793        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3794    }
3795
3796    impl UncommittedFileChange {
3797        /// Creates a new default instance.
3798        pub fn new() -> Self {
3799            std::default::Default::default()
3800        }
3801
3802        /// Sets the value of [path][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::path].
3803        ///
3804        /// # Example
3805        /// ```ignore,no_run
3806        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3807        /// let x = UncommittedFileChange::new().set_path("example");
3808        /// ```
3809        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3810            self.path = v.into();
3811            self
3812        }
3813
3814        /// Sets the value of [state][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::state].
3815        ///
3816        /// # Example
3817        /// ```ignore,no_run
3818        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3819        /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::uncommitted_file_change::State;
3820        /// let x0 = UncommittedFileChange::new().set_state(State::Added);
3821        /// let x1 = UncommittedFileChange::new().set_state(State::Deleted);
3822        /// let x2 = UncommittedFileChange::new().set_state(State::Modified);
3823        /// ```
3824        pub fn set_state<
3825            T: std::convert::Into<
3826                    crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3827                >,
3828        >(
3829            mut self,
3830            v: T,
3831        ) -> Self {
3832            self.state = v.into();
3833            self
3834        }
3835    }
3836
3837    impl wkt::message::Message for UncommittedFileChange {
3838        fn typename() -> &'static str {
3839            "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
3840        }
3841    }
3842
3843    /// Defines additional types related to [UncommittedFileChange].
3844    pub mod uncommitted_file_change {
3845        #[allow(unused_imports)]
3846        use super::*;
3847
3848        /// Indicates the status of an uncommitted file change.
3849        ///
3850        /// # Working with unknown values
3851        ///
3852        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3853        /// additional enum variants at any time. Adding new variants is not considered
3854        /// a breaking change. Applications should write their code in anticipation of:
3855        ///
3856        /// - New values appearing in future releases of the client library, **and**
3857        /// - New values received dynamically, without application changes.
3858        ///
3859        /// Please consult the [Working with enums] section in the user guide for some
3860        /// guidelines.
3861        ///
3862        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3863        #[derive(Clone, Debug, PartialEq)]
3864        #[non_exhaustive]
3865        pub enum State {
3866            /// Default value. This value is unused.
3867            Unspecified,
3868            /// The file has been newly added.
3869            Added,
3870            /// The file has been deleted.
3871            Deleted,
3872            /// The file has been modified.
3873            Modified,
3874            /// The file contains merge conflicts.
3875            HasConflicts,
3876            /// If set, the enum was initialized with an unknown value.
3877            ///
3878            /// Applications can examine the value using [State::value] or
3879            /// [State::name].
3880            UnknownValue(state::UnknownValue),
3881        }
3882
3883        #[doc(hidden)]
3884        pub mod state {
3885            #[allow(unused_imports)]
3886            use super::*;
3887            #[derive(Clone, Debug, PartialEq)]
3888            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3889        }
3890
3891        impl State {
3892            /// Gets the enum value.
3893            ///
3894            /// Returns `None` if the enum contains an unknown value deserialized from
3895            /// the string representation of enums.
3896            pub fn value(&self) -> std::option::Option<i32> {
3897                match self {
3898                    Self::Unspecified => std::option::Option::Some(0),
3899                    Self::Added => std::option::Option::Some(1),
3900                    Self::Deleted => std::option::Option::Some(2),
3901                    Self::Modified => std::option::Option::Some(3),
3902                    Self::HasConflicts => std::option::Option::Some(4),
3903                    Self::UnknownValue(u) => u.0.value(),
3904                }
3905            }
3906
3907            /// Gets the enum value as a string.
3908            ///
3909            /// Returns `None` if the enum contains an unknown value deserialized from
3910            /// the integer representation of enums.
3911            pub fn name(&self) -> std::option::Option<&str> {
3912                match self {
3913                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
3914                    Self::Added => std::option::Option::Some("ADDED"),
3915                    Self::Deleted => std::option::Option::Some("DELETED"),
3916                    Self::Modified => std::option::Option::Some("MODIFIED"),
3917                    Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
3918                    Self::UnknownValue(u) => u.0.name(),
3919                }
3920            }
3921        }
3922
3923        impl std::default::Default for State {
3924            fn default() -> Self {
3925                use std::convert::From;
3926                Self::from(0)
3927            }
3928        }
3929
3930        impl std::fmt::Display for State {
3931            fn fmt(
3932                &self,
3933                f: &mut std::fmt::Formatter<'_>,
3934            ) -> std::result::Result<(), std::fmt::Error> {
3935                wkt::internal::display_enum(f, self.name(), self.value())
3936            }
3937        }
3938
3939        impl std::convert::From<i32> for State {
3940            fn from(value: i32) -> Self {
3941                match value {
3942                    0 => Self::Unspecified,
3943                    1 => Self::Added,
3944                    2 => Self::Deleted,
3945                    3 => Self::Modified,
3946                    4 => Self::HasConflicts,
3947                    _ => Self::UnknownValue(state::UnknownValue(
3948                        wkt::internal::UnknownEnumValue::Integer(value),
3949                    )),
3950                }
3951            }
3952        }
3953
3954        impl std::convert::From<&str> for State {
3955            fn from(value: &str) -> Self {
3956                use std::string::ToString;
3957                match value {
3958                    "STATE_UNSPECIFIED" => Self::Unspecified,
3959                    "ADDED" => Self::Added,
3960                    "DELETED" => Self::Deleted,
3961                    "MODIFIED" => Self::Modified,
3962                    "HAS_CONFLICTS" => Self::HasConflicts,
3963                    _ => Self::UnknownValue(state::UnknownValue(
3964                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3965                    )),
3966                }
3967            }
3968        }
3969
3970        impl serde::ser::Serialize for State {
3971            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3972            where
3973                S: serde::Serializer,
3974            {
3975                match self {
3976                    Self::Unspecified => serializer.serialize_i32(0),
3977                    Self::Added => serializer.serialize_i32(1),
3978                    Self::Deleted => serializer.serialize_i32(2),
3979                    Self::Modified => serializer.serialize_i32(3),
3980                    Self::HasConflicts => serializer.serialize_i32(4),
3981                    Self::UnknownValue(u) => u.0.serialize(serializer),
3982                }
3983            }
3984        }
3985
3986        impl<'de> serde::de::Deserialize<'de> for State {
3987            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3988            where
3989                D: serde::Deserializer<'de>,
3990            {
3991                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
3992                    ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
3993            }
3994        }
3995    }
3996}
3997
3998/// `FetchGitAheadBehind` request message.
3999#[derive(Clone, Default, PartialEq)]
4000#[non_exhaustive]
4001pub struct FetchGitAheadBehindRequest {
4002    /// Required. The workspace's name.
4003    pub name: std::string::String,
4004
4005    /// Optional. The name of the branch in the Git remote against which this
4006    /// workspace should be compared. If left unset, the repository's default
4007    /// branch name will be used.
4008    pub remote_branch: std::string::String,
4009
4010    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4011}
4012
4013impl FetchGitAheadBehindRequest {
4014    /// Creates a new default instance.
4015    pub fn new() -> Self {
4016        std::default::Default::default()
4017    }
4018
4019    /// Sets the value of [name][crate::model::FetchGitAheadBehindRequest::name].
4020    ///
4021    /// # Example
4022    /// ```ignore,no_run
4023    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
4024    /// # let project_id = "project_id";
4025    /// # let location_id = "location_id";
4026    /// # let repository_id = "repository_id";
4027    /// # let workspace_id = "workspace_id";
4028    /// let x = FetchGitAheadBehindRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4029    /// ```
4030    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4031        self.name = v.into();
4032        self
4033    }
4034
4035    /// Sets the value of [remote_branch][crate::model::FetchGitAheadBehindRequest::remote_branch].
4036    ///
4037    /// # Example
4038    /// ```ignore,no_run
4039    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
4040    /// let x = FetchGitAheadBehindRequest::new().set_remote_branch("example");
4041    /// ```
4042    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4043        self.remote_branch = v.into();
4044        self
4045    }
4046}
4047
4048impl wkt::message::Message for FetchGitAheadBehindRequest {
4049    fn typename() -> &'static str {
4050        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
4051    }
4052}
4053
4054/// `FetchGitAheadBehind` response message.
4055#[derive(Clone, Default, PartialEq)]
4056#[non_exhaustive]
4057pub struct FetchGitAheadBehindResponse {
4058    /// The number of commits in the remote branch that are not in the workspace.
4059    pub commits_ahead: i32,
4060
4061    /// The number of commits in the workspace that are not in the remote branch.
4062    pub commits_behind: i32,
4063
4064    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4065}
4066
4067impl FetchGitAheadBehindResponse {
4068    /// Creates a new default instance.
4069    pub fn new() -> Self {
4070        std::default::Default::default()
4071    }
4072
4073    /// Sets the value of [commits_ahead][crate::model::FetchGitAheadBehindResponse::commits_ahead].
4074    ///
4075    /// # Example
4076    /// ```ignore,no_run
4077    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
4078    /// let x = FetchGitAheadBehindResponse::new().set_commits_ahead(42);
4079    /// ```
4080    pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4081        self.commits_ahead = v.into();
4082        self
4083    }
4084
4085    /// Sets the value of [commits_behind][crate::model::FetchGitAheadBehindResponse::commits_behind].
4086    ///
4087    /// # Example
4088    /// ```ignore,no_run
4089    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
4090    /// let x = FetchGitAheadBehindResponse::new().set_commits_behind(42);
4091    /// ```
4092    pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4093        self.commits_behind = v.into();
4094        self
4095    }
4096}
4097
4098impl wkt::message::Message for FetchGitAheadBehindResponse {
4099    fn typename() -> &'static str {
4100        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
4101    }
4102}
4103
4104/// `CommitWorkspaceChanges` request message.
4105#[derive(Clone, Default, PartialEq)]
4106#[non_exhaustive]
4107pub struct CommitWorkspaceChangesRequest {
4108    /// Required. The workspace's name.
4109    pub name: std::string::String,
4110
4111    /// Required. The commit's author.
4112    pub author: std::option::Option<crate::model::CommitAuthor>,
4113
4114    /// Optional. The commit's message.
4115    pub commit_message: std::string::String,
4116
4117    /// Optional. Full file paths to commit including filename, rooted at workspace
4118    /// root. If left empty, all files will be committed.
4119    pub paths: std::vec::Vec<std::string::String>,
4120
4121    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4122}
4123
4124impl CommitWorkspaceChangesRequest {
4125    /// Creates a new default instance.
4126    pub fn new() -> Self {
4127        std::default::Default::default()
4128    }
4129
4130    /// Sets the value of [name][crate::model::CommitWorkspaceChangesRequest::name].
4131    ///
4132    /// # Example
4133    /// ```ignore,no_run
4134    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4135    /// # let project_id = "project_id";
4136    /// # let location_id = "location_id";
4137    /// # let repository_id = "repository_id";
4138    /// # let workspace_id = "workspace_id";
4139    /// let x = CommitWorkspaceChangesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4140    /// ```
4141    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4142        self.name = v.into();
4143        self
4144    }
4145
4146    /// Sets the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
4147    ///
4148    /// # Example
4149    /// ```ignore,no_run
4150    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4151    /// use google_cloud_dataform_v1::model::CommitAuthor;
4152    /// let x = CommitWorkspaceChangesRequest::new().set_author(CommitAuthor::default()/* use setters */);
4153    /// ```
4154    pub fn set_author<T>(mut self, v: T) -> Self
4155    where
4156        T: std::convert::Into<crate::model::CommitAuthor>,
4157    {
4158        self.author = std::option::Option::Some(v.into());
4159        self
4160    }
4161
4162    /// Sets or clears the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
4163    ///
4164    /// # Example
4165    /// ```ignore,no_run
4166    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4167    /// use google_cloud_dataform_v1::model::CommitAuthor;
4168    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
4169    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(None::<CommitAuthor>);
4170    /// ```
4171    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
4172    where
4173        T: std::convert::Into<crate::model::CommitAuthor>,
4174    {
4175        self.author = v.map(|x| x.into());
4176        self
4177    }
4178
4179    /// Sets the value of [commit_message][crate::model::CommitWorkspaceChangesRequest::commit_message].
4180    ///
4181    /// # Example
4182    /// ```ignore,no_run
4183    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4184    /// let x = CommitWorkspaceChangesRequest::new().set_commit_message("example");
4185    /// ```
4186    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4187        self.commit_message = v.into();
4188        self
4189    }
4190
4191    /// Sets the value of [paths][crate::model::CommitWorkspaceChangesRequest::paths].
4192    ///
4193    /// # Example
4194    /// ```ignore,no_run
4195    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4196    /// let x = CommitWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
4197    /// ```
4198    pub fn set_paths<T, V>(mut self, v: T) -> Self
4199    where
4200        T: std::iter::IntoIterator<Item = V>,
4201        V: std::convert::Into<std::string::String>,
4202    {
4203        use std::iter::Iterator;
4204        self.paths = v.into_iter().map(|i| i.into()).collect();
4205        self
4206    }
4207}
4208
4209impl wkt::message::Message for CommitWorkspaceChangesRequest {
4210    fn typename() -> &'static str {
4211        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
4212    }
4213}
4214
4215/// `CommitWorkspaceChanges` response message.
4216#[derive(Clone, Default, PartialEq)]
4217#[non_exhaustive]
4218pub struct CommitWorkspaceChangesResponse {
4219    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4220}
4221
4222impl CommitWorkspaceChangesResponse {
4223    /// Creates a new default instance.
4224    pub fn new() -> Self {
4225        std::default::Default::default()
4226    }
4227}
4228
4229impl wkt::message::Message for CommitWorkspaceChangesResponse {
4230    fn typename() -> &'static str {
4231        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
4232    }
4233}
4234
4235/// `ResetWorkspaceChanges` request message.
4236#[derive(Clone, Default, PartialEq)]
4237#[non_exhaustive]
4238pub struct ResetWorkspaceChangesRequest {
4239    /// Required. The workspace's name.
4240    pub name: std::string::String,
4241
4242    /// Optional. Full file paths to reset back to their committed state including
4243    /// filename, rooted at workspace root. If left empty, all files will be reset.
4244    pub paths: std::vec::Vec<std::string::String>,
4245
4246    /// Optional. If set to true, untracked files will be deleted.
4247    pub clean: bool,
4248
4249    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4250}
4251
4252impl ResetWorkspaceChangesRequest {
4253    /// Creates a new default instance.
4254    pub fn new() -> Self {
4255        std::default::Default::default()
4256    }
4257
4258    /// Sets the value of [name][crate::model::ResetWorkspaceChangesRequest::name].
4259    ///
4260    /// # Example
4261    /// ```ignore,no_run
4262    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4263    /// # let project_id = "project_id";
4264    /// # let location_id = "location_id";
4265    /// # let repository_id = "repository_id";
4266    /// # let workspace_id = "workspace_id";
4267    /// let x = ResetWorkspaceChangesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4268    /// ```
4269    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4270        self.name = v.into();
4271        self
4272    }
4273
4274    /// Sets the value of [paths][crate::model::ResetWorkspaceChangesRequest::paths].
4275    ///
4276    /// # Example
4277    /// ```ignore,no_run
4278    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4279    /// let x = ResetWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
4280    /// ```
4281    pub fn set_paths<T, V>(mut self, v: T) -> Self
4282    where
4283        T: std::iter::IntoIterator<Item = V>,
4284        V: std::convert::Into<std::string::String>,
4285    {
4286        use std::iter::Iterator;
4287        self.paths = v.into_iter().map(|i| i.into()).collect();
4288        self
4289    }
4290
4291    /// Sets the value of [clean][crate::model::ResetWorkspaceChangesRequest::clean].
4292    ///
4293    /// # Example
4294    /// ```ignore,no_run
4295    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4296    /// let x = ResetWorkspaceChangesRequest::new().set_clean(true);
4297    /// ```
4298    pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4299        self.clean = v.into();
4300        self
4301    }
4302}
4303
4304impl wkt::message::Message for ResetWorkspaceChangesRequest {
4305    fn typename() -> &'static str {
4306        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
4307    }
4308}
4309
4310/// `ResetWorkspaceChanges` response message.
4311#[derive(Clone, Default, PartialEq)]
4312#[non_exhaustive]
4313pub struct ResetWorkspaceChangesResponse {
4314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4315}
4316
4317impl ResetWorkspaceChangesResponse {
4318    /// Creates a new default instance.
4319    pub fn new() -> Self {
4320        std::default::Default::default()
4321    }
4322}
4323
4324impl wkt::message::Message for ResetWorkspaceChangesResponse {
4325    fn typename() -> &'static str {
4326        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
4327    }
4328}
4329
4330/// `FetchFileDiff` request message.
4331#[derive(Clone, Default, PartialEq)]
4332#[non_exhaustive]
4333pub struct FetchFileDiffRequest {
4334    /// Required. The workspace's name.
4335    pub workspace: std::string::String,
4336
4337    /// Required. The file's full path including filename, relative to the
4338    /// workspace root.
4339    pub path: std::string::String,
4340
4341    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4342}
4343
4344impl FetchFileDiffRequest {
4345    /// Creates a new default instance.
4346    pub fn new() -> Self {
4347        std::default::Default::default()
4348    }
4349
4350    /// Sets the value of [workspace][crate::model::FetchFileDiffRequest::workspace].
4351    ///
4352    /// # Example
4353    /// ```ignore,no_run
4354    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
4355    /// # let project_id = "project_id";
4356    /// # let location_id = "location_id";
4357    /// # let repository_id = "repository_id";
4358    /// # let workspace_id = "workspace_id";
4359    /// let x = FetchFileDiffRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4360    /// ```
4361    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4362        self.workspace = v.into();
4363        self
4364    }
4365
4366    /// Sets the value of [path][crate::model::FetchFileDiffRequest::path].
4367    ///
4368    /// # Example
4369    /// ```ignore,no_run
4370    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
4371    /// let x = FetchFileDiffRequest::new().set_path("example");
4372    /// ```
4373    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4374        self.path = v.into();
4375        self
4376    }
4377}
4378
4379impl wkt::message::Message for FetchFileDiffRequest {
4380    fn typename() -> &'static str {
4381        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
4382    }
4383}
4384
4385/// `FetchFileDiff` response message.
4386#[derive(Clone, Default, PartialEq)]
4387#[non_exhaustive]
4388pub struct FetchFileDiffResponse {
4389    /// The raw formatted Git diff for the file.
4390    pub formatted_diff: std::string::String,
4391
4392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4393}
4394
4395impl FetchFileDiffResponse {
4396    /// Creates a new default instance.
4397    pub fn new() -> Self {
4398        std::default::Default::default()
4399    }
4400
4401    /// Sets the value of [formatted_diff][crate::model::FetchFileDiffResponse::formatted_diff].
4402    ///
4403    /// # Example
4404    /// ```ignore,no_run
4405    /// # use google_cloud_dataform_v1::model::FetchFileDiffResponse;
4406    /// let x = FetchFileDiffResponse::new().set_formatted_diff("example");
4407    /// ```
4408    pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4409        self.formatted_diff = v.into();
4410        self
4411    }
4412}
4413
4414impl wkt::message::Message for FetchFileDiffResponse {
4415    fn typename() -> &'static str {
4416        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
4417    }
4418}
4419
4420/// `QueryDirectoryContents` request message.
4421#[derive(Clone, Default, PartialEq)]
4422#[non_exhaustive]
4423pub struct QueryDirectoryContentsRequest {
4424    /// Required. The workspace's name.
4425    pub workspace: std::string::String,
4426
4427    /// Optional. The directory's full path including directory name, relative to
4428    /// the workspace root. If left unset, the workspace root is used.
4429    pub path: std::string::String,
4430
4431    /// Optional. Maximum number of paths to return. The server may return fewer
4432    /// items than requested. If unspecified, the server will pick an appropriate
4433    /// default.
4434    pub page_size: i32,
4435
4436    /// Optional. Page token received from a previous `QueryDirectoryContents`
4437    /// call. Provide this to retrieve the subsequent page.
4438    ///
4439    /// When paginating, all other parameters provided to
4440    /// `QueryDirectoryContents`, with the exception of `page_size`, must match the
4441    /// call that provided the page token.
4442    pub page_token: std::string::String,
4443
4444    /// Optional. Specifies the metadata to return for each directory entry.
4445    /// If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`.
4446    /// Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by
4447    /// CMEK-protected workspaces.
4448    pub view: crate::model::DirectoryContentsView,
4449
4450    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4451}
4452
4453impl QueryDirectoryContentsRequest {
4454    /// Creates a new default instance.
4455    pub fn new() -> Self {
4456        std::default::Default::default()
4457    }
4458
4459    /// Sets the value of [workspace][crate::model::QueryDirectoryContentsRequest::workspace].
4460    ///
4461    /// # Example
4462    /// ```ignore,no_run
4463    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4464    /// # let project_id = "project_id";
4465    /// # let location_id = "location_id";
4466    /// # let repository_id = "repository_id";
4467    /// # let workspace_id = "workspace_id";
4468    /// let x = QueryDirectoryContentsRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4469    /// ```
4470    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4471        self.workspace = v.into();
4472        self
4473    }
4474
4475    /// Sets the value of [path][crate::model::QueryDirectoryContentsRequest::path].
4476    ///
4477    /// # Example
4478    /// ```ignore,no_run
4479    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4480    /// let x = QueryDirectoryContentsRequest::new().set_path("example");
4481    /// ```
4482    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4483        self.path = v.into();
4484        self
4485    }
4486
4487    /// Sets the value of [page_size][crate::model::QueryDirectoryContentsRequest::page_size].
4488    ///
4489    /// # Example
4490    /// ```ignore,no_run
4491    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4492    /// let x = QueryDirectoryContentsRequest::new().set_page_size(42);
4493    /// ```
4494    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4495        self.page_size = v.into();
4496        self
4497    }
4498
4499    /// Sets the value of [page_token][crate::model::QueryDirectoryContentsRequest::page_token].
4500    ///
4501    /// # Example
4502    /// ```ignore,no_run
4503    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4504    /// let x = QueryDirectoryContentsRequest::new().set_page_token("example");
4505    /// ```
4506    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4507        self.page_token = v.into();
4508        self
4509    }
4510
4511    /// Sets the value of [view][crate::model::QueryDirectoryContentsRequest::view].
4512    ///
4513    /// # Example
4514    /// ```ignore,no_run
4515    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4516    /// use google_cloud_dataform_v1::model::DirectoryContentsView;
4517    /// let x0 = QueryDirectoryContentsRequest::new().set_view(DirectoryContentsView::Basic);
4518    /// let x1 = QueryDirectoryContentsRequest::new().set_view(DirectoryContentsView::Metadata);
4519    /// ```
4520    pub fn set_view<T: std::convert::Into<crate::model::DirectoryContentsView>>(
4521        mut self,
4522        v: T,
4523    ) -> Self {
4524        self.view = v.into();
4525        self
4526    }
4527}
4528
4529impl wkt::message::Message for QueryDirectoryContentsRequest {
4530    fn typename() -> &'static str {
4531        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
4532    }
4533}
4534
4535/// `QueryDirectoryContents` response message.
4536#[derive(Clone, Default, PartialEq)]
4537#[non_exhaustive]
4538pub struct QueryDirectoryContentsResponse {
4539    /// List of entries in the directory.
4540    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
4541
4542    /// A token, which can be sent as `page_token` to retrieve the next page.
4543    /// If this field is omitted, there are no subsequent pages.
4544    pub next_page_token: std::string::String,
4545
4546    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4547}
4548
4549impl QueryDirectoryContentsResponse {
4550    /// Creates a new default instance.
4551    pub fn new() -> Self {
4552        std::default::Default::default()
4553    }
4554
4555    /// Sets the value of [directory_entries][crate::model::QueryDirectoryContentsResponse::directory_entries].
4556    ///
4557    /// # Example
4558    /// ```ignore,no_run
4559    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4560    /// use google_cloud_dataform_v1::model::DirectoryEntry;
4561    /// let x = QueryDirectoryContentsResponse::new()
4562    ///     .set_directory_entries([
4563    ///         DirectoryEntry::default()/* use setters */,
4564    ///         DirectoryEntry::default()/* use (different) setters */,
4565    ///     ]);
4566    /// ```
4567    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
4568    where
4569        T: std::iter::IntoIterator<Item = V>,
4570        V: std::convert::Into<crate::model::DirectoryEntry>,
4571    {
4572        use std::iter::Iterator;
4573        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
4574        self
4575    }
4576
4577    /// Sets the value of [next_page_token][crate::model::QueryDirectoryContentsResponse::next_page_token].
4578    ///
4579    /// # Example
4580    /// ```ignore,no_run
4581    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4582    /// let x = QueryDirectoryContentsResponse::new().set_next_page_token("example");
4583    /// ```
4584    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4585        self.next_page_token = v.into();
4586        self
4587    }
4588}
4589
4590impl wkt::message::Message for QueryDirectoryContentsResponse {
4591    fn typename() -> &'static str {
4592        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
4593    }
4594}
4595
4596#[doc(hidden)]
4597impl google_cloud_gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
4598    type PageItem = crate::model::DirectoryEntry;
4599
4600    fn items(self) -> std::vec::Vec<Self::PageItem> {
4601        self.directory_entries
4602    }
4603
4604    fn next_page_token(&self) -> std::string::String {
4605        use std::clone::Clone;
4606        self.next_page_token.clone()
4607    }
4608}
4609
4610/// Represents a single entry in a directory.
4611#[derive(Clone, Default, PartialEq)]
4612#[non_exhaustive]
4613pub struct DirectoryEntry {
4614    /// Entry with metadata.
4615    pub metadata: std::option::Option<crate::model::FilesystemEntryMetadata>,
4616
4617    /// The entry's contents.
4618    pub entry: std::option::Option<crate::model::directory_entry::Entry>,
4619
4620    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4621}
4622
4623impl DirectoryEntry {
4624    /// Creates a new default instance.
4625    pub fn new() -> Self {
4626        std::default::Default::default()
4627    }
4628
4629    /// Sets the value of [metadata][crate::model::DirectoryEntry::metadata].
4630    ///
4631    /// # Example
4632    /// ```ignore,no_run
4633    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4634    /// use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4635    /// let x = DirectoryEntry::new().set_metadata(FilesystemEntryMetadata::default()/* use setters */);
4636    /// ```
4637    pub fn set_metadata<T>(mut self, v: T) -> Self
4638    where
4639        T: std::convert::Into<crate::model::FilesystemEntryMetadata>,
4640    {
4641        self.metadata = std::option::Option::Some(v.into());
4642        self
4643    }
4644
4645    /// Sets or clears the value of [metadata][crate::model::DirectoryEntry::metadata].
4646    ///
4647    /// # Example
4648    /// ```ignore,no_run
4649    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4650    /// use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4651    /// let x = DirectoryEntry::new().set_or_clear_metadata(Some(FilesystemEntryMetadata::default()/* use setters */));
4652    /// let x = DirectoryEntry::new().set_or_clear_metadata(None::<FilesystemEntryMetadata>);
4653    /// ```
4654    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
4655    where
4656        T: std::convert::Into<crate::model::FilesystemEntryMetadata>,
4657    {
4658        self.metadata = v.map(|x| x.into());
4659        self
4660    }
4661
4662    /// Sets the value of [entry][crate::model::DirectoryEntry::entry].
4663    ///
4664    /// Note that all the setters affecting `entry` are mutually
4665    /// exclusive.
4666    ///
4667    /// # Example
4668    /// ```ignore,no_run
4669    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4670    /// use google_cloud_dataform_v1::model::directory_entry::Entry;
4671    /// let x = DirectoryEntry::new().set_entry(Some(Entry::File("example".to_string())));
4672    /// ```
4673    pub fn set_entry<
4674        T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
4675    >(
4676        mut self,
4677        v: T,
4678    ) -> Self {
4679        self.entry = v.into();
4680        self
4681    }
4682
4683    /// The value of [entry][crate::model::DirectoryEntry::entry]
4684    /// if it holds a `File`, `None` if the field is not set or
4685    /// holds a different branch.
4686    pub fn file(&self) -> std::option::Option<&std::string::String> {
4687        #[allow(unreachable_patterns)]
4688        self.entry.as_ref().and_then(|v| match v {
4689            crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
4690            _ => std::option::Option::None,
4691        })
4692    }
4693
4694    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4695    /// to hold a `File`.
4696    ///
4697    /// Note that all the setters affecting `entry` are
4698    /// mutually exclusive.
4699    ///
4700    /// # Example
4701    /// ```ignore,no_run
4702    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4703    /// let x = DirectoryEntry::new().set_file("example");
4704    /// assert!(x.file().is_some());
4705    /// assert!(x.directory().is_none());
4706    /// ```
4707    pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4708        self.entry =
4709            std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
4710        self
4711    }
4712
4713    /// The value of [entry][crate::model::DirectoryEntry::entry]
4714    /// if it holds a `Directory`, `None` if the field is not set or
4715    /// holds a different branch.
4716    pub fn directory(&self) -> std::option::Option<&std::string::String> {
4717        #[allow(unreachable_patterns)]
4718        self.entry.as_ref().and_then(|v| match v {
4719            crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
4720            _ => std::option::Option::None,
4721        })
4722    }
4723
4724    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4725    /// to hold a `Directory`.
4726    ///
4727    /// Note that all the setters affecting `entry` are
4728    /// mutually exclusive.
4729    ///
4730    /// # Example
4731    /// ```ignore,no_run
4732    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4733    /// let x = DirectoryEntry::new().set_directory("example");
4734    /// assert!(x.directory().is_some());
4735    /// assert!(x.file().is_none());
4736    /// ```
4737    pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4738        self.entry =
4739            std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
4740        self
4741    }
4742}
4743
4744impl wkt::message::Message for DirectoryEntry {
4745    fn typename() -> &'static str {
4746        "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
4747    }
4748}
4749
4750/// Defines additional types related to [DirectoryEntry].
4751pub mod directory_entry {
4752    #[allow(unused_imports)]
4753    use super::*;
4754
4755    /// The entry's contents.
4756    #[derive(Clone, Debug, PartialEq)]
4757    #[non_exhaustive]
4758    pub enum Entry {
4759        /// A file in the directory.
4760        File(std::string::String),
4761        /// A child directory in the directory.
4762        Directory(std::string::String),
4763    }
4764}
4765
4766/// Represents metadata for a single entry in a filesystem.
4767#[derive(Clone, Default, PartialEq)]
4768#[non_exhaustive]
4769pub struct FilesystemEntryMetadata {
4770    /// Output only. Provides the size of the entry in bytes. For directories, this
4771    /// will be 0.
4772    pub size_bytes: i64,
4773
4774    /// Output only. Represents the time of the last modification of the entry.
4775    pub update_time: std::option::Option<wkt::Timestamp>,
4776
4777    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4778}
4779
4780impl FilesystemEntryMetadata {
4781    /// Creates a new default instance.
4782    pub fn new() -> Self {
4783        std::default::Default::default()
4784    }
4785
4786    /// Sets the value of [size_bytes][crate::model::FilesystemEntryMetadata::size_bytes].
4787    ///
4788    /// # Example
4789    /// ```ignore,no_run
4790    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4791    /// let x = FilesystemEntryMetadata::new().set_size_bytes(42);
4792    /// ```
4793    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4794        self.size_bytes = v.into();
4795        self
4796    }
4797
4798    /// Sets the value of [update_time][crate::model::FilesystemEntryMetadata::update_time].
4799    ///
4800    /// # Example
4801    /// ```ignore,no_run
4802    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4803    /// use wkt::Timestamp;
4804    /// let x = FilesystemEntryMetadata::new().set_update_time(Timestamp::default()/* use setters */);
4805    /// ```
4806    pub fn set_update_time<T>(mut self, v: T) -> Self
4807    where
4808        T: std::convert::Into<wkt::Timestamp>,
4809    {
4810        self.update_time = std::option::Option::Some(v.into());
4811        self
4812    }
4813
4814    /// Sets or clears the value of [update_time][crate::model::FilesystemEntryMetadata::update_time].
4815    ///
4816    /// # Example
4817    /// ```ignore,no_run
4818    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4819    /// use wkt::Timestamp;
4820    /// let x = FilesystemEntryMetadata::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
4821    /// let x = FilesystemEntryMetadata::new().set_or_clear_update_time(None::<Timestamp>);
4822    /// ```
4823    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4824    where
4825        T: std::convert::Into<wkt::Timestamp>,
4826    {
4827        self.update_time = v.map(|x| x.into());
4828        self
4829    }
4830}
4831
4832impl wkt::message::Message for FilesystemEntryMetadata {
4833    fn typename() -> &'static str {
4834        "type.googleapis.com/google.cloud.dataform.v1.FilesystemEntryMetadata"
4835    }
4836}
4837
4838/// Configuration containing file search request parameters.
4839#[derive(Clone, Default, PartialEq)]
4840#[non_exhaustive]
4841pub struct SearchFilesRequest {
4842    /// Required. The workspace's name.
4843    pub workspace: std::string::String,
4844
4845    /// Optional. Maximum number of search results to return. The server may return
4846    /// fewer items than requested. If unspecified, the server will pick an
4847    /// appropriate default.
4848    pub page_size: i32,
4849
4850    /// Optional. Page token received from a previous `SearchFilesRequest`
4851    /// call. Provide this to retrieve the subsequent page.
4852    ///
4853    /// When paginating, all other parameters provided to `SearchFilesRequest`,
4854    /// with the exception of `page_size`, must match the call that provided the
4855    /// page token.
4856    pub page_token: std::string::String,
4857
4858    /// Optional. Optional filter for the returned list in filtering format.
4859    /// Filtering is only currently supported on the `path` field.
4860    /// See <https://google.aip.dev/160> for details.
4861    pub filter: std::string::String,
4862
4863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4864}
4865
4866impl SearchFilesRequest {
4867    /// Creates a new default instance.
4868    pub fn new() -> Self {
4869        std::default::Default::default()
4870    }
4871
4872    /// Sets the value of [workspace][crate::model::SearchFilesRequest::workspace].
4873    ///
4874    /// # Example
4875    /// ```ignore,no_run
4876    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4877    /// # let project_id = "project_id";
4878    /// # let location_id = "location_id";
4879    /// # let repository_id = "repository_id";
4880    /// # let workspace_id = "workspace_id";
4881    /// let x = SearchFilesRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4882    /// ```
4883    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4884        self.workspace = v.into();
4885        self
4886    }
4887
4888    /// Sets the value of [page_size][crate::model::SearchFilesRequest::page_size].
4889    ///
4890    /// # Example
4891    /// ```ignore,no_run
4892    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4893    /// let x = SearchFilesRequest::new().set_page_size(42);
4894    /// ```
4895    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4896        self.page_size = v.into();
4897        self
4898    }
4899
4900    /// Sets the value of [page_token][crate::model::SearchFilesRequest::page_token].
4901    ///
4902    /// # Example
4903    /// ```ignore,no_run
4904    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4905    /// let x = SearchFilesRequest::new().set_page_token("example");
4906    /// ```
4907    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4908        self.page_token = v.into();
4909        self
4910    }
4911
4912    /// Sets the value of [filter][crate::model::SearchFilesRequest::filter].
4913    ///
4914    /// # Example
4915    /// ```ignore,no_run
4916    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4917    /// let x = SearchFilesRequest::new().set_filter("example");
4918    /// ```
4919    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4920        self.filter = v.into();
4921        self
4922    }
4923}
4924
4925impl wkt::message::Message for SearchFilesRequest {
4926    fn typename() -> &'static str {
4927        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
4928    }
4929}
4930
4931/// Client-facing representation of a file search response.
4932#[derive(Clone, Default, PartialEq)]
4933#[non_exhaustive]
4934pub struct SearchFilesResponse {
4935    /// List of matched results.
4936    pub search_results: std::vec::Vec<crate::model::SearchResult>,
4937
4938    /// Optional. A token, which can be sent as `page_token` to retrieve the next
4939    /// page. If this field is omitted, there are no subsequent pages.
4940    pub next_page_token: std::string::String,
4941
4942    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4943}
4944
4945impl SearchFilesResponse {
4946    /// Creates a new default instance.
4947    pub fn new() -> Self {
4948        std::default::Default::default()
4949    }
4950
4951    /// Sets the value of [search_results][crate::model::SearchFilesResponse::search_results].
4952    ///
4953    /// # Example
4954    /// ```ignore,no_run
4955    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4956    /// use google_cloud_dataform_v1::model::SearchResult;
4957    /// let x = SearchFilesResponse::new()
4958    ///     .set_search_results([
4959    ///         SearchResult::default()/* use setters */,
4960    ///         SearchResult::default()/* use (different) setters */,
4961    ///     ]);
4962    /// ```
4963    pub fn set_search_results<T, V>(mut self, v: T) -> Self
4964    where
4965        T: std::iter::IntoIterator<Item = V>,
4966        V: std::convert::Into<crate::model::SearchResult>,
4967    {
4968        use std::iter::Iterator;
4969        self.search_results = v.into_iter().map(|i| i.into()).collect();
4970        self
4971    }
4972
4973    /// Sets the value of [next_page_token][crate::model::SearchFilesResponse::next_page_token].
4974    ///
4975    /// # Example
4976    /// ```ignore,no_run
4977    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
4978    /// let x = SearchFilesResponse::new().set_next_page_token("example");
4979    /// ```
4980    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4981        self.next_page_token = v.into();
4982        self
4983    }
4984}
4985
4986impl wkt::message::Message for SearchFilesResponse {
4987    fn typename() -> &'static str {
4988        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
4989    }
4990}
4991
4992#[doc(hidden)]
4993impl google_cloud_gax::paginator::internal::PageableResponse for SearchFilesResponse {
4994    type PageItem = crate::model::SearchResult;
4995
4996    fn items(self) -> std::vec::Vec<Self::PageItem> {
4997        self.search_results
4998    }
4999
5000    fn next_page_token(&self) -> std::string::String {
5001        use std::clone::Clone;
5002        self.next_page_token.clone()
5003    }
5004}
5005
5006/// Client-facing representation of a search result entry.
5007#[derive(Clone, Default, PartialEq)]
5008#[non_exhaustive]
5009pub struct SearchResult {
5010    /// The entry's contents.
5011    pub entry: std::option::Option<crate::model::search_result::Entry>,
5012
5013    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5014}
5015
5016impl SearchResult {
5017    /// Creates a new default instance.
5018    pub fn new() -> Self {
5019        std::default::Default::default()
5020    }
5021
5022    /// Sets the value of [entry][crate::model::SearchResult::entry].
5023    ///
5024    /// Note that all the setters affecting `entry` are mutually
5025    /// exclusive.
5026    ///
5027    /// # Example
5028    /// ```ignore,no_run
5029    /// # use google_cloud_dataform_v1::model::SearchResult;
5030    /// use google_cloud_dataform_v1::model::FileSearchResult;
5031    /// let x = SearchResult::new().set_entry(Some(
5032    ///     google_cloud_dataform_v1::model::search_result::Entry::File(FileSearchResult::default().into())));
5033    /// ```
5034    pub fn set_entry<
5035        T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
5036    >(
5037        mut self,
5038        v: T,
5039    ) -> Self {
5040        self.entry = v.into();
5041        self
5042    }
5043
5044    /// The value of [entry][crate::model::SearchResult::entry]
5045    /// if it holds a `File`, `None` if the field is not set or
5046    /// holds a different branch.
5047    pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
5048        #[allow(unreachable_patterns)]
5049        self.entry.as_ref().and_then(|v| match v {
5050            crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
5051            _ => std::option::Option::None,
5052        })
5053    }
5054
5055    /// Sets the value of [entry][crate::model::SearchResult::entry]
5056    /// to hold a `File`.
5057    ///
5058    /// Note that all the setters affecting `entry` are
5059    /// mutually exclusive.
5060    ///
5061    /// # Example
5062    /// ```ignore,no_run
5063    /// # use google_cloud_dataform_v1::model::SearchResult;
5064    /// use google_cloud_dataform_v1::model::FileSearchResult;
5065    /// let x = SearchResult::new().set_file(FileSearchResult::default()/* use setters */);
5066    /// assert!(x.file().is_some());
5067    /// assert!(x.directory().is_none());
5068    /// ```
5069    pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
5070        mut self,
5071        v: T,
5072    ) -> Self {
5073        self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
5074        self
5075    }
5076
5077    /// The value of [entry][crate::model::SearchResult::entry]
5078    /// if it holds a `Directory`, `None` if the field is not set or
5079    /// holds a different branch.
5080    pub fn directory(
5081        &self,
5082    ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
5083        #[allow(unreachable_patterns)]
5084        self.entry.as_ref().and_then(|v| match v {
5085            crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
5086            _ => std::option::Option::None,
5087        })
5088    }
5089
5090    /// Sets the value of [entry][crate::model::SearchResult::entry]
5091    /// to hold a `Directory`.
5092    ///
5093    /// Note that all the setters affecting `entry` are
5094    /// mutually exclusive.
5095    ///
5096    /// # Example
5097    /// ```ignore,no_run
5098    /// # use google_cloud_dataform_v1::model::SearchResult;
5099    /// use google_cloud_dataform_v1::model::DirectorySearchResult;
5100    /// let x = SearchResult::new().set_directory(DirectorySearchResult::default()/* use setters */);
5101    /// assert!(x.directory().is_some());
5102    /// assert!(x.file().is_none());
5103    /// ```
5104    pub fn set_directory<
5105        T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
5106    >(
5107        mut self,
5108        v: T,
5109    ) -> Self {
5110        self.entry =
5111            std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
5112        self
5113    }
5114}
5115
5116impl wkt::message::Message for SearchResult {
5117    fn typename() -> &'static str {
5118        "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
5119    }
5120}
5121
5122/// Defines additional types related to [SearchResult].
5123pub mod search_result {
5124    #[allow(unused_imports)]
5125    use super::*;
5126
5127    /// The entry's contents.
5128    #[derive(Clone, Debug, PartialEq)]
5129    #[non_exhaustive]
5130    pub enum Entry {
5131        /// Details when search result is a file.
5132        File(std::boxed::Box<crate::model::FileSearchResult>),
5133        /// Details when search result is a directory.
5134        Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
5135    }
5136}
5137
5138/// Client-facing representation of a file entry in search results.
5139#[derive(Clone, Default, PartialEq)]
5140#[non_exhaustive]
5141pub struct FileSearchResult {
5142    /// File system path relative to the workspace root.
5143    pub path: std::string::String,
5144
5145    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5146}
5147
5148impl FileSearchResult {
5149    /// Creates a new default instance.
5150    pub fn new() -> Self {
5151        std::default::Default::default()
5152    }
5153
5154    /// Sets the value of [path][crate::model::FileSearchResult::path].
5155    ///
5156    /// # Example
5157    /// ```ignore,no_run
5158    /// # use google_cloud_dataform_v1::model::FileSearchResult;
5159    /// let x = FileSearchResult::new().set_path("example");
5160    /// ```
5161    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5162        self.path = v.into();
5163        self
5164    }
5165}
5166
5167impl wkt::message::Message for FileSearchResult {
5168    fn typename() -> &'static str {
5169        "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
5170    }
5171}
5172
5173/// Client-facing representation of a directory entry in search results.
5174#[derive(Clone, Default, PartialEq)]
5175#[non_exhaustive]
5176pub struct DirectorySearchResult {
5177    /// File system path relative to the workspace root.
5178    pub path: std::string::String,
5179
5180    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5181}
5182
5183impl DirectorySearchResult {
5184    /// Creates a new default instance.
5185    pub fn new() -> Self {
5186        std::default::Default::default()
5187    }
5188
5189    /// Sets the value of [path][crate::model::DirectorySearchResult::path].
5190    ///
5191    /// # Example
5192    /// ```ignore,no_run
5193    /// # use google_cloud_dataform_v1::model::DirectorySearchResult;
5194    /// let x = DirectorySearchResult::new().set_path("example");
5195    /// ```
5196    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5197        self.path = v.into();
5198        self
5199    }
5200}
5201
5202impl wkt::message::Message for DirectorySearchResult {
5203    fn typename() -> &'static str {
5204        "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
5205    }
5206}
5207
5208/// `MakeDirectory` request message.
5209#[derive(Clone, Default, PartialEq)]
5210#[non_exhaustive]
5211pub struct MakeDirectoryRequest {
5212    /// Required. The workspace's name.
5213    pub workspace: std::string::String,
5214
5215    /// Required. The directory's full path including directory name, relative to
5216    /// the workspace root.
5217    pub path: std::string::String,
5218
5219    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5220}
5221
5222impl MakeDirectoryRequest {
5223    /// Creates a new default instance.
5224    pub fn new() -> Self {
5225        std::default::Default::default()
5226    }
5227
5228    /// Sets the value of [workspace][crate::model::MakeDirectoryRequest::workspace].
5229    ///
5230    /// # Example
5231    /// ```ignore,no_run
5232    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
5233    /// # let project_id = "project_id";
5234    /// # let location_id = "location_id";
5235    /// # let repository_id = "repository_id";
5236    /// # let workspace_id = "workspace_id";
5237    /// let x = MakeDirectoryRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5238    /// ```
5239    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5240        self.workspace = v.into();
5241        self
5242    }
5243
5244    /// Sets the value of [path][crate::model::MakeDirectoryRequest::path].
5245    ///
5246    /// # Example
5247    /// ```ignore,no_run
5248    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
5249    /// let x = MakeDirectoryRequest::new().set_path("example");
5250    /// ```
5251    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5252        self.path = v.into();
5253        self
5254    }
5255}
5256
5257impl wkt::message::Message for MakeDirectoryRequest {
5258    fn typename() -> &'static str {
5259        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
5260    }
5261}
5262
5263/// `MakeDirectory` response message.
5264#[derive(Clone, Default, PartialEq)]
5265#[non_exhaustive]
5266pub struct MakeDirectoryResponse {
5267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5268}
5269
5270impl MakeDirectoryResponse {
5271    /// Creates a new default instance.
5272    pub fn new() -> Self {
5273        std::default::Default::default()
5274    }
5275}
5276
5277impl wkt::message::Message for MakeDirectoryResponse {
5278    fn typename() -> &'static str {
5279        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
5280    }
5281}
5282
5283/// `RemoveDirectory` request message.
5284#[derive(Clone, Default, PartialEq)]
5285#[non_exhaustive]
5286pub struct RemoveDirectoryRequest {
5287    /// Required. The workspace's name.
5288    pub workspace: std::string::String,
5289
5290    /// Required. The directory's full path including directory name, relative to
5291    /// the workspace root.
5292    pub path: std::string::String,
5293
5294    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5295}
5296
5297impl RemoveDirectoryRequest {
5298    /// Creates a new default instance.
5299    pub fn new() -> Self {
5300        std::default::Default::default()
5301    }
5302
5303    /// Sets the value of [workspace][crate::model::RemoveDirectoryRequest::workspace].
5304    ///
5305    /// # Example
5306    /// ```ignore,no_run
5307    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
5308    /// # let project_id = "project_id";
5309    /// # let location_id = "location_id";
5310    /// # let repository_id = "repository_id";
5311    /// # let workspace_id = "workspace_id";
5312    /// let x = RemoveDirectoryRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5313    /// ```
5314    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5315        self.workspace = v.into();
5316        self
5317    }
5318
5319    /// Sets the value of [path][crate::model::RemoveDirectoryRequest::path].
5320    ///
5321    /// # Example
5322    /// ```ignore,no_run
5323    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
5324    /// let x = RemoveDirectoryRequest::new().set_path("example");
5325    /// ```
5326    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5327        self.path = v.into();
5328        self
5329    }
5330}
5331
5332impl wkt::message::Message for RemoveDirectoryRequest {
5333    fn typename() -> &'static str {
5334        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
5335    }
5336}
5337
5338/// `RemoveDirectory` response message.
5339#[derive(Clone, Default, PartialEq)]
5340#[non_exhaustive]
5341pub struct RemoveDirectoryResponse {
5342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5343}
5344
5345impl RemoveDirectoryResponse {
5346    /// Creates a new default instance.
5347    pub fn new() -> Self {
5348        std::default::Default::default()
5349    }
5350}
5351
5352impl wkt::message::Message for RemoveDirectoryResponse {
5353    fn typename() -> &'static str {
5354        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
5355    }
5356}
5357
5358/// `MoveDirectory` request message.
5359#[derive(Clone, Default, PartialEq)]
5360#[non_exhaustive]
5361pub struct MoveDirectoryRequest {
5362    /// Required. The workspace's name.
5363    pub workspace: std::string::String,
5364
5365    /// Required. The directory's full path including directory name, relative to
5366    /// the workspace root.
5367    pub path: std::string::String,
5368
5369    /// Required. The new path for the directory including directory name, rooted
5370    /// at workspace root.
5371    pub new_path: std::string::String,
5372
5373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5374}
5375
5376impl MoveDirectoryRequest {
5377    /// Creates a new default instance.
5378    pub fn new() -> Self {
5379        std::default::Default::default()
5380    }
5381
5382    /// Sets the value of [workspace][crate::model::MoveDirectoryRequest::workspace].
5383    ///
5384    /// # Example
5385    /// ```ignore,no_run
5386    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5387    /// # let project_id = "project_id";
5388    /// # let location_id = "location_id";
5389    /// # let repository_id = "repository_id";
5390    /// # let workspace_id = "workspace_id";
5391    /// let x = MoveDirectoryRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5392    /// ```
5393    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5394        self.workspace = v.into();
5395        self
5396    }
5397
5398    /// Sets the value of [path][crate::model::MoveDirectoryRequest::path].
5399    ///
5400    /// # Example
5401    /// ```ignore,no_run
5402    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5403    /// let x = MoveDirectoryRequest::new().set_path("example");
5404    /// ```
5405    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5406        self.path = v.into();
5407        self
5408    }
5409
5410    /// Sets the value of [new_path][crate::model::MoveDirectoryRequest::new_path].
5411    ///
5412    /// # Example
5413    /// ```ignore,no_run
5414    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5415    /// let x = MoveDirectoryRequest::new().set_new_path("example");
5416    /// ```
5417    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5418        self.new_path = v.into();
5419        self
5420    }
5421}
5422
5423impl wkt::message::Message for MoveDirectoryRequest {
5424    fn typename() -> &'static str {
5425        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
5426    }
5427}
5428
5429/// `MoveDirectory` response message.
5430#[derive(Clone, Default, PartialEq)]
5431#[non_exhaustive]
5432pub struct MoveDirectoryResponse {
5433    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5434}
5435
5436impl MoveDirectoryResponse {
5437    /// Creates a new default instance.
5438    pub fn new() -> Self {
5439        std::default::Default::default()
5440    }
5441}
5442
5443impl wkt::message::Message for MoveDirectoryResponse {
5444    fn typename() -> &'static str {
5445        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
5446    }
5447}
5448
5449/// `ReadFile` request message.
5450#[derive(Clone, Default, PartialEq)]
5451#[non_exhaustive]
5452pub struct ReadFileRequest {
5453    /// Required. The workspace's name.
5454    pub workspace: std::string::String,
5455
5456    /// Required. The file's full path including filename, relative to the
5457    /// workspace root.
5458    pub path: std::string::String,
5459
5460    /// Optional. The Git revision of the file to return. If left empty, the
5461    /// current contents of `path` will be returned.
5462    pub revision: std::string::String,
5463
5464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5465}
5466
5467impl ReadFileRequest {
5468    /// Creates a new default instance.
5469    pub fn new() -> Self {
5470        std::default::Default::default()
5471    }
5472
5473    /// Sets the value of [workspace][crate::model::ReadFileRequest::workspace].
5474    ///
5475    /// # Example
5476    /// ```ignore,no_run
5477    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5478    /// # let project_id = "project_id";
5479    /// # let location_id = "location_id";
5480    /// # let repository_id = "repository_id";
5481    /// # let workspace_id = "workspace_id";
5482    /// let x = ReadFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5483    /// ```
5484    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5485        self.workspace = v.into();
5486        self
5487    }
5488
5489    /// Sets the value of [path][crate::model::ReadFileRequest::path].
5490    ///
5491    /// # Example
5492    /// ```ignore,no_run
5493    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5494    /// let x = ReadFileRequest::new().set_path("example");
5495    /// ```
5496    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5497        self.path = v.into();
5498        self
5499    }
5500
5501    /// Sets the value of [revision][crate::model::ReadFileRequest::revision].
5502    ///
5503    /// # Example
5504    /// ```ignore,no_run
5505    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5506    /// let x = ReadFileRequest::new().set_revision("example");
5507    /// ```
5508    pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5509        self.revision = v.into();
5510        self
5511    }
5512}
5513
5514impl wkt::message::Message for ReadFileRequest {
5515    fn typename() -> &'static str {
5516        "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
5517    }
5518}
5519
5520/// `ReadFile` response message.
5521#[derive(Clone, Default, PartialEq)]
5522#[non_exhaustive]
5523pub struct ReadFileResponse {
5524    /// The file's contents.
5525    pub file_contents: ::bytes::Bytes,
5526
5527    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5528}
5529
5530impl ReadFileResponse {
5531    /// Creates a new default instance.
5532    pub fn new() -> Self {
5533        std::default::Default::default()
5534    }
5535
5536    /// Sets the value of [file_contents][crate::model::ReadFileResponse::file_contents].
5537    ///
5538    /// # Example
5539    /// ```ignore,no_run
5540    /// # use google_cloud_dataform_v1::model::ReadFileResponse;
5541    /// let x = ReadFileResponse::new().set_file_contents(bytes::Bytes::from_static(b"example"));
5542    /// ```
5543    pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5544        self.file_contents = v.into();
5545        self
5546    }
5547}
5548
5549impl wkt::message::Message for ReadFileResponse {
5550    fn typename() -> &'static str {
5551        "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
5552    }
5553}
5554
5555/// `RemoveFile` request message.
5556#[derive(Clone, Default, PartialEq)]
5557#[non_exhaustive]
5558pub struct RemoveFileRequest {
5559    /// Required. The workspace's name.
5560    pub workspace: std::string::String,
5561
5562    /// Required. The file's full path including filename, relative to the
5563    /// workspace root.
5564    pub path: std::string::String,
5565
5566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5567}
5568
5569impl RemoveFileRequest {
5570    /// Creates a new default instance.
5571    pub fn new() -> Self {
5572        std::default::Default::default()
5573    }
5574
5575    /// Sets the value of [workspace][crate::model::RemoveFileRequest::workspace].
5576    ///
5577    /// # Example
5578    /// ```ignore,no_run
5579    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5580    /// # let project_id = "project_id";
5581    /// # let location_id = "location_id";
5582    /// # let repository_id = "repository_id";
5583    /// # let workspace_id = "workspace_id";
5584    /// let x = RemoveFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5585    /// ```
5586    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5587        self.workspace = v.into();
5588        self
5589    }
5590
5591    /// Sets the value of [path][crate::model::RemoveFileRequest::path].
5592    ///
5593    /// # Example
5594    /// ```ignore,no_run
5595    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5596    /// let x = RemoveFileRequest::new().set_path("example");
5597    /// ```
5598    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5599        self.path = v.into();
5600        self
5601    }
5602}
5603
5604impl wkt::message::Message for RemoveFileRequest {
5605    fn typename() -> &'static str {
5606        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
5607    }
5608}
5609
5610/// `RemoveFile` response message.
5611#[derive(Clone, Default, PartialEq)]
5612#[non_exhaustive]
5613pub struct RemoveFileResponse {
5614    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5615}
5616
5617impl RemoveFileResponse {
5618    /// Creates a new default instance.
5619    pub fn new() -> Self {
5620        std::default::Default::default()
5621    }
5622}
5623
5624impl wkt::message::Message for RemoveFileResponse {
5625    fn typename() -> &'static str {
5626        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
5627    }
5628}
5629
5630/// `MoveFile` request message.
5631#[derive(Clone, Default, PartialEq)]
5632#[non_exhaustive]
5633pub struct MoveFileRequest {
5634    /// Required. The workspace's name.
5635    pub workspace: std::string::String,
5636
5637    /// Required. The file's full path including filename, relative to the
5638    /// workspace root.
5639    pub path: std::string::String,
5640
5641    /// Required. The file's new path including filename, relative to the workspace
5642    /// root.
5643    pub new_path: std::string::String,
5644
5645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5646}
5647
5648impl MoveFileRequest {
5649    /// Creates a new default instance.
5650    pub fn new() -> Self {
5651        std::default::Default::default()
5652    }
5653
5654    /// Sets the value of [workspace][crate::model::MoveFileRequest::workspace].
5655    ///
5656    /// # Example
5657    /// ```ignore,no_run
5658    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5659    /// # let project_id = "project_id";
5660    /// # let location_id = "location_id";
5661    /// # let repository_id = "repository_id";
5662    /// # let workspace_id = "workspace_id";
5663    /// let x = MoveFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5664    /// ```
5665    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5666        self.workspace = v.into();
5667        self
5668    }
5669
5670    /// Sets the value of [path][crate::model::MoveFileRequest::path].
5671    ///
5672    /// # Example
5673    /// ```ignore,no_run
5674    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5675    /// let x = MoveFileRequest::new().set_path("example");
5676    /// ```
5677    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5678        self.path = v.into();
5679        self
5680    }
5681
5682    /// Sets the value of [new_path][crate::model::MoveFileRequest::new_path].
5683    ///
5684    /// # Example
5685    /// ```ignore,no_run
5686    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5687    /// let x = MoveFileRequest::new().set_new_path("example");
5688    /// ```
5689    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5690        self.new_path = v.into();
5691        self
5692    }
5693}
5694
5695impl wkt::message::Message for MoveFileRequest {
5696    fn typename() -> &'static str {
5697        "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
5698    }
5699}
5700
5701/// `MoveFile` response message.
5702#[derive(Clone, Default, PartialEq)]
5703#[non_exhaustive]
5704pub struct MoveFileResponse {
5705    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5706}
5707
5708impl MoveFileResponse {
5709    /// Creates a new default instance.
5710    pub fn new() -> Self {
5711        std::default::Default::default()
5712    }
5713}
5714
5715impl wkt::message::Message for MoveFileResponse {
5716    fn typename() -> &'static str {
5717        "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
5718    }
5719}
5720
5721/// `WriteFile` request message.
5722#[derive(Clone, Default, PartialEq)]
5723#[non_exhaustive]
5724pub struct WriteFileRequest {
5725    /// Required. The workspace's name.
5726    pub workspace: std::string::String,
5727
5728    /// Required. The file.
5729    pub path: std::string::String,
5730
5731    /// Required. The file's contents.
5732    pub contents: ::bytes::Bytes,
5733
5734    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5735}
5736
5737impl WriteFileRequest {
5738    /// Creates a new default instance.
5739    pub fn new() -> Self {
5740        std::default::Default::default()
5741    }
5742
5743    /// Sets the value of [workspace][crate::model::WriteFileRequest::workspace].
5744    ///
5745    /// # Example
5746    /// ```ignore,no_run
5747    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5748    /// # let project_id = "project_id";
5749    /// # let location_id = "location_id";
5750    /// # let repository_id = "repository_id";
5751    /// # let workspace_id = "workspace_id";
5752    /// let x = WriteFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5753    /// ```
5754    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5755        self.workspace = v.into();
5756        self
5757    }
5758
5759    /// Sets the value of [path][crate::model::WriteFileRequest::path].
5760    ///
5761    /// # Example
5762    /// ```ignore,no_run
5763    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5764    /// let x = WriteFileRequest::new().set_path("example");
5765    /// ```
5766    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5767        self.path = v.into();
5768        self
5769    }
5770
5771    /// Sets the value of [contents][crate::model::WriteFileRequest::contents].
5772    ///
5773    /// # Example
5774    /// ```ignore,no_run
5775    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5776    /// let x = WriteFileRequest::new().set_contents(bytes::Bytes::from_static(b"example"));
5777    /// ```
5778    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5779        self.contents = v.into();
5780        self
5781    }
5782}
5783
5784impl wkt::message::Message for WriteFileRequest {
5785    fn typename() -> &'static str {
5786        "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
5787    }
5788}
5789
5790/// `WriteFile` response message.
5791#[derive(Clone, Default, PartialEq)]
5792#[non_exhaustive]
5793pub struct WriteFileResponse {
5794    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5795}
5796
5797impl WriteFileResponse {
5798    /// Creates a new default instance.
5799    pub fn new() -> Self {
5800        std::default::Default::default()
5801    }
5802}
5803
5804impl wkt::message::Message for WriteFileResponse {
5805    fn typename() -> &'static str {
5806        "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
5807    }
5808}
5809
5810/// `InstallNpmPackages` request message.
5811#[derive(Clone, Default, PartialEq)]
5812#[non_exhaustive]
5813pub struct InstallNpmPackagesRequest {
5814    /// Required. The workspace's name.
5815    pub workspace: std::string::String,
5816
5817    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5818}
5819
5820impl InstallNpmPackagesRequest {
5821    /// Creates a new default instance.
5822    pub fn new() -> Self {
5823        std::default::Default::default()
5824    }
5825
5826    /// Sets the value of [workspace][crate::model::InstallNpmPackagesRequest::workspace].
5827    ///
5828    /// # Example
5829    /// ```ignore,no_run
5830    /// # use google_cloud_dataform_v1::model::InstallNpmPackagesRequest;
5831    /// # let project_id = "project_id";
5832    /// # let location_id = "location_id";
5833    /// # let repository_id = "repository_id";
5834    /// # let workspace_id = "workspace_id";
5835    /// let x = InstallNpmPackagesRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5836    /// ```
5837    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5838        self.workspace = v.into();
5839        self
5840    }
5841}
5842
5843impl wkt::message::Message for InstallNpmPackagesRequest {
5844    fn typename() -> &'static str {
5845        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
5846    }
5847}
5848
5849/// `InstallNpmPackages` response message.
5850#[derive(Clone, Default, PartialEq)]
5851#[non_exhaustive]
5852pub struct InstallNpmPackagesResponse {
5853    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5854}
5855
5856impl InstallNpmPackagesResponse {
5857    /// Creates a new default instance.
5858    pub fn new() -> Self {
5859        std::default::Default::default()
5860    }
5861}
5862
5863impl wkt::message::Message for InstallNpmPackagesResponse {
5864    fn typename() -> &'static str {
5865        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
5866    }
5867}
5868
5869/// Represents a Dataform release configuration.
5870#[derive(Clone, Default, PartialEq)]
5871#[non_exhaustive]
5872pub struct ReleaseConfig {
5873    /// Identifier. The release config's name.
5874    pub name: std::string::String,
5875
5876    /// Required. Git commit/tag/branch name at which the repository should be
5877    /// compiled. Must exist in the remote repository. Examples:
5878    ///
5879    /// - a commit SHA: `12ade345`
5880    /// - a tag: `tag1`
5881    /// - a branch name: `branch1`
5882    pub git_commitish: std::string::String,
5883
5884    /// Optional. If set, fields of `code_compilation_config` override the default
5885    /// compilation settings that are specified in dataform.json.
5886    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
5887
5888    /// Optional. Optional schedule (in cron format) for automatic creation of
5889    /// compilation results.
5890    pub cron_schedule: std::string::String,
5891
5892    /// Optional. Specifies the time zone to be used when interpreting
5893    /// cron_schedule. Must be a time zone name from the time zone database
5894    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
5895    /// unspecified, the default is UTC.
5896    pub time_zone: std::string::String,
5897
5898    /// Output only. Records of the 10 most recent scheduled release attempts,
5899    /// ordered in descending order of `release_time`. Updated whenever automatic
5900    /// creation of a compilation result is triggered by cron_schedule.
5901    pub recent_scheduled_release_records:
5902        std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
5903
5904    /// Optional. The name of the currently released compilation result for this
5905    /// release config. This value is updated when a compilation result is
5906    /// automatically created from this release config (using cron_schedule), or
5907    /// when this resource is updated by API call (perhaps to roll back to an
5908    /// earlier release). The compilation result must have been created using this
5909    /// release config. Must be in the format
5910    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
5911    pub release_compilation_result: std::string::String,
5912
5913    /// Optional. Disables automatic creation of compilation results.
5914    pub disabled: bool,
5915
5916    /// Output only. All the metadata information that is used internally to serve
5917    /// the resource. For example: timestamps, flags, status fields, etc. The
5918    /// format of this field is a JSON string.
5919    pub internal_metadata: std::option::Option<std::string::String>,
5920
5921    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5922}
5923
5924impl ReleaseConfig {
5925    /// Creates a new default instance.
5926    pub fn new() -> Self {
5927        std::default::Default::default()
5928    }
5929
5930    /// Sets the value of [name][crate::model::ReleaseConfig::name].
5931    ///
5932    /// # Example
5933    /// ```ignore,no_run
5934    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5935    /// # let project_id = "project_id";
5936    /// # let location_id = "location_id";
5937    /// # let repository_id = "repository_id";
5938    /// # let release_config_id = "release_config_id";
5939    /// let x = ReleaseConfig::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
5940    /// ```
5941    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5942        self.name = v.into();
5943        self
5944    }
5945
5946    /// Sets the value of [git_commitish][crate::model::ReleaseConfig::git_commitish].
5947    ///
5948    /// # Example
5949    /// ```ignore,no_run
5950    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5951    /// let x = ReleaseConfig::new().set_git_commitish("example");
5952    /// ```
5953    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5954        self.git_commitish = v.into();
5955        self
5956    }
5957
5958    /// Sets the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5959    ///
5960    /// # Example
5961    /// ```ignore,no_run
5962    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5963    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5964    /// let x = ReleaseConfig::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
5965    /// ```
5966    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
5967    where
5968        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5969    {
5970        self.code_compilation_config = std::option::Option::Some(v.into());
5971        self
5972    }
5973
5974    /// Sets or clears the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
5975    ///
5976    /// # Example
5977    /// ```ignore,no_run
5978    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5979    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
5980    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
5981    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
5982    /// ```
5983    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
5984    where
5985        T: std::convert::Into<crate::model::CodeCompilationConfig>,
5986    {
5987        self.code_compilation_config = v.map(|x| x.into());
5988        self
5989    }
5990
5991    /// Sets the value of [cron_schedule][crate::model::ReleaseConfig::cron_schedule].
5992    ///
5993    /// # Example
5994    /// ```ignore,no_run
5995    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5996    /// let x = ReleaseConfig::new().set_cron_schedule("example");
5997    /// ```
5998    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5999        self.cron_schedule = v.into();
6000        self
6001    }
6002
6003    /// Sets the value of [time_zone][crate::model::ReleaseConfig::time_zone].
6004    ///
6005    /// # Example
6006    /// ```ignore,no_run
6007    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6008    /// let x = ReleaseConfig::new().set_time_zone("example");
6009    /// ```
6010    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6011        self.time_zone = v.into();
6012        self
6013    }
6014
6015    /// Sets the value of [recent_scheduled_release_records][crate::model::ReleaseConfig::recent_scheduled_release_records].
6016    ///
6017    /// # Example
6018    /// ```ignore,no_run
6019    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6020    /// use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6021    /// let x = ReleaseConfig::new()
6022    ///     .set_recent_scheduled_release_records([
6023    ///         ScheduledReleaseRecord::default()/* use setters */,
6024    ///         ScheduledReleaseRecord::default()/* use (different) setters */,
6025    ///     ]);
6026    /// ```
6027    pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
6028    where
6029        T: std::iter::IntoIterator<Item = V>,
6030        V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
6031    {
6032        use std::iter::Iterator;
6033        self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
6034        self
6035    }
6036
6037    /// Sets the value of [release_compilation_result][crate::model::ReleaseConfig::release_compilation_result].
6038    ///
6039    /// # Example
6040    /// ```ignore,no_run
6041    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6042    /// # let project_id = "project_id";
6043    /// # let location_id = "location_id";
6044    /// # let repository_id = "repository_id";
6045    /// # let compilation_result_id = "compilation_result_id";
6046    /// let x = ReleaseConfig::new().set_release_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
6047    /// ```
6048    pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
6049        mut self,
6050        v: T,
6051    ) -> Self {
6052        self.release_compilation_result = v.into();
6053        self
6054    }
6055
6056    /// Sets the value of [disabled][crate::model::ReleaseConfig::disabled].
6057    ///
6058    /// # Example
6059    /// ```ignore,no_run
6060    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6061    /// let x = ReleaseConfig::new().set_disabled(true);
6062    /// ```
6063    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6064        self.disabled = v.into();
6065        self
6066    }
6067
6068    /// Sets the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
6069    ///
6070    /// # Example
6071    /// ```ignore,no_run
6072    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6073    /// let x = ReleaseConfig::new().set_internal_metadata("example");
6074    /// ```
6075    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
6076    where
6077        T: std::convert::Into<std::string::String>,
6078    {
6079        self.internal_metadata = std::option::Option::Some(v.into());
6080        self
6081    }
6082
6083    /// Sets or clears the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
6084    ///
6085    /// # Example
6086    /// ```ignore,no_run
6087    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6088    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(Some("example"));
6089    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(None::<String>);
6090    /// ```
6091    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6092    where
6093        T: std::convert::Into<std::string::String>,
6094    {
6095        self.internal_metadata = v.map(|x| x.into());
6096        self
6097    }
6098}
6099
6100impl wkt::message::Message for ReleaseConfig {
6101    fn typename() -> &'static str {
6102        "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
6103    }
6104}
6105
6106/// Defines additional types related to [ReleaseConfig].
6107pub mod release_config {
6108    #[allow(unused_imports)]
6109    use super::*;
6110
6111    /// A record of an attempt to create a compilation result for this release
6112    /// config.
6113    #[derive(Clone, Default, PartialEq)]
6114    #[non_exhaustive]
6115    pub struct ScheduledReleaseRecord {
6116        /// Output only. The timestamp of this release attempt.
6117        pub release_time: std::option::Option<wkt::Timestamp>,
6118
6119        /// The result of this release attempt.
6120        pub result:
6121            std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
6122
6123        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6124    }
6125
6126    impl ScheduledReleaseRecord {
6127        /// Creates a new default instance.
6128        pub fn new() -> Self {
6129            std::default::Default::default()
6130        }
6131
6132        /// Sets the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
6133        ///
6134        /// # Example
6135        /// ```ignore,no_run
6136        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6137        /// use wkt::Timestamp;
6138        /// let x = ScheduledReleaseRecord::new().set_release_time(Timestamp::default()/* use setters */);
6139        /// ```
6140        pub fn set_release_time<T>(mut self, v: T) -> Self
6141        where
6142            T: std::convert::Into<wkt::Timestamp>,
6143        {
6144            self.release_time = std::option::Option::Some(v.into());
6145            self
6146        }
6147
6148        /// Sets or clears the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
6149        ///
6150        /// # Example
6151        /// ```ignore,no_run
6152        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6153        /// use wkt::Timestamp;
6154        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(Some(Timestamp::default()/* use setters */));
6155        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(None::<Timestamp>);
6156        /// ```
6157        pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
6158        where
6159            T: std::convert::Into<wkt::Timestamp>,
6160        {
6161            self.release_time = v.map(|x| x.into());
6162            self
6163        }
6164
6165        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result].
6166        ///
6167        /// Note that all the setters affecting `result` are mutually
6168        /// exclusive.
6169        ///
6170        /// # Example
6171        /// ```ignore,no_run
6172        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6173        /// use google_cloud_dataform_v1::model::release_config::scheduled_release_record::Result;
6174        /// let x = ScheduledReleaseRecord::new().set_result(Some(Result::CompilationResult("example".to_string())));
6175        /// ```
6176        pub fn set_result<
6177            T: std::convert::Into<
6178                    std::option::Option<
6179                        crate::model::release_config::scheduled_release_record::Result,
6180                    >,
6181                >,
6182        >(
6183            mut self,
6184            v: T,
6185        ) -> Self {
6186            self.result = v.into();
6187            self
6188        }
6189
6190        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6191        /// if it holds a `CompilationResult`, `None` if the field is not set or
6192        /// holds a different branch.
6193        pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
6194            #[allow(unreachable_patterns)]
6195            self.result.as_ref().and_then(|v| match v {
6196                crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
6197                _ => std::option::Option::None,
6198            })
6199        }
6200
6201        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6202        /// to hold a `CompilationResult`.
6203        ///
6204        /// Note that all the setters affecting `result` are
6205        /// mutually exclusive.
6206        ///
6207        /// # Example
6208        /// ```ignore,no_run
6209        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6210        /// # let project_id = "project_id";
6211        /// # let location_id = "location_id";
6212        /// # let repository_id = "repository_id";
6213        /// # let compilation_result_id = "compilation_result_id";
6214        /// let x = ScheduledReleaseRecord::new().set_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
6215        /// assert!(x.compilation_result().is_some());
6216        /// assert!(x.error_status().is_none());
6217        /// ```
6218        pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
6219            mut self,
6220            v: T,
6221        ) -> Self {
6222            self.result = std::option::Option::Some(
6223                crate::model::release_config::scheduled_release_record::Result::CompilationResult(
6224                    v.into(),
6225                ),
6226            );
6227            self
6228        }
6229
6230        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6231        /// if it holds a `ErrorStatus`, `None` if the field is not set or
6232        /// holds a different branch.
6233        pub fn error_status(
6234            &self,
6235        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
6236            #[allow(unreachable_patterns)]
6237            self.result.as_ref().and_then(|v| match v {
6238                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
6239                    std::option::Option::Some(v)
6240                }
6241                _ => std::option::Option::None,
6242            })
6243        }
6244
6245        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6246        /// to hold a `ErrorStatus`.
6247        ///
6248        /// Note that all the setters affecting `result` are
6249        /// mutually exclusive.
6250        ///
6251        /// # Example
6252        /// ```ignore,no_run
6253        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6254        /// use google_cloud_rpc::model::Status;
6255        /// let x = ScheduledReleaseRecord::new().set_error_status(Status::default()/* use setters */);
6256        /// assert!(x.error_status().is_some());
6257        /// assert!(x.compilation_result().is_none());
6258        /// ```
6259        pub fn set_error_status<
6260            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
6261        >(
6262            mut self,
6263            v: T,
6264        ) -> Self {
6265            self.result = std::option::Option::Some(
6266                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
6267                    v.into(),
6268                ),
6269            );
6270            self
6271        }
6272    }
6273
6274    impl wkt::message::Message for ScheduledReleaseRecord {
6275        fn typename() -> &'static str {
6276            "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
6277        }
6278    }
6279
6280    /// Defines additional types related to [ScheduledReleaseRecord].
6281    pub mod scheduled_release_record {
6282        #[allow(unused_imports)]
6283        use super::*;
6284
6285        /// The result of this release attempt.
6286        #[derive(Clone, Debug, PartialEq)]
6287        #[non_exhaustive]
6288        pub enum Result {
6289            /// The name of the created compilation result, if one was successfully
6290            /// created. Must be in the format
6291            /// `projects/*/locations/*/repositories/*/compilationResults/*`.
6292            CompilationResult(std::string::String),
6293            /// The error status encountered upon this attempt to create the
6294            /// compilation result, if the attempt was unsuccessful.
6295            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
6296        }
6297    }
6298}
6299
6300/// `ListReleaseConfigs` request message.
6301#[derive(Clone, Default, PartialEq)]
6302#[non_exhaustive]
6303pub struct ListReleaseConfigsRequest {
6304    /// Required. The repository in which to list release configs. Must be in the
6305    /// format `projects/*/locations/*/repositories/*`.
6306    pub parent: std::string::String,
6307
6308    /// Optional. Maximum number of release configs to return. The server may
6309    /// return fewer items than requested. If unspecified, the server will pick an
6310    /// appropriate default.
6311    pub page_size: i32,
6312
6313    /// Optional. Page token received from a previous `ListReleaseConfigs` call.
6314    /// Provide this to retrieve the subsequent page.
6315    ///
6316    /// When paginating, all other parameters provided to `ListReleaseConfigs`,
6317    /// with the exception of `page_size`, must match the call that provided the
6318    /// page token.
6319    pub page_token: std::string::String,
6320
6321    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6322}
6323
6324impl ListReleaseConfigsRequest {
6325    /// Creates a new default instance.
6326    pub fn new() -> Self {
6327        std::default::Default::default()
6328    }
6329
6330    /// Sets the value of [parent][crate::model::ListReleaseConfigsRequest::parent].
6331    ///
6332    /// # Example
6333    /// ```ignore,no_run
6334    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6335    /// # let project_id = "project_id";
6336    /// # let location_id = "location_id";
6337    /// # let repository_id = "repository_id";
6338    /// let x = ListReleaseConfigsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
6339    /// ```
6340    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6341        self.parent = v.into();
6342        self
6343    }
6344
6345    /// Sets the value of [page_size][crate::model::ListReleaseConfigsRequest::page_size].
6346    ///
6347    /// # Example
6348    /// ```ignore,no_run
6349    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6350    /// let x = ListReleaseConfigsRequest::new().set_page_size(42);
6351    /// ```
6352    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6353        self.page_size = v.into();
6354        self
6355    }
6356
6357    /// Sets the value of [page_token][crate::model::ListReleaseConfigsRequest::page_token].
6358    ///
6359    /// # Example
6360    /// ```ignore,no_run
6361    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6362    /// let x = ListReleaseConfigsRequest::new().set_page_token("example");
6363    /// ```
6364    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6365        self.page_token = v.into();
6366        self
6367    }
6368}
6369
6370impl wkt::message::Message for ListReleaseConfigsRequest {
6371    fn typename() -> &'static str {
6372        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
6373    }
6374}
6375
6376/// `ListReleaseConfigs` response message.
6377#[derive(Clone, Default, PartialEq)]
6378#[non_exhaustive]
6379pub struct ListReleaseConfigsResponse {
6380    /// List of release configs.
6381    pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
6382
6383    /// A token, which can be sent as `page_token` to retrieve the next page.
6384    /// If this field is omitted, there are no subsequent pages.
6385    pub next_page_token: std::string::String,
6386
6387    /// Locations which could not be reached.
6388    pub unreachable: std::vec::Vec<std::string::String>,
6389
6390    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6391}
6392
6393impl ListReleaseConfigsResponse {
6394    /// Creates a new default instance.
6395    pub fn new() -> Self {
6396        std::default::Default::default()
6397    }
6398
6399    /// Sets the value of [release_configs][crate::model::ListReleaseConfigsResponse::release_configs].
6400    ///
6401    /// # Example
6402    /// ```ignore,no_run
6403    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6404    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6405    /// let x = ListReleaseConfigsResponse::new()
6406    ///     .set_release_configs([
6407    ///         ReleaseConfig::default()/* use setters */,
6408    ///         ReleaseConfig::default()/* use (different) setters */,
6409    ///     ]);
6410    /// ```
6411    pub fn set_release_configs<T, V>(mut self, v: T) -> Self
6412    where
6413        T: std::iter::IntoIterator<Item = V>,
6414        V: std::convert::Into<crate::model::ReleaseConfig>,
6415    {
6416        use std::iter::Iterator;
6417        self.release_configs = v.into_iter().map(|i| i.into()).collect();
6418        self
6419    }
6420
6421    /// Sets the value of [next_page_token][crate::model::ListReleaseConfigsResponse::next_page_token].
6422    ///
6423    /// # Example
6424    /// ```ignore,no_run
6425    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6426    /// let x = ListReleaseConfigsResponse::new().set_next_page_token("example");
6427    /// ```
6428    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6429        self.next_page_token = v.into();
6430        self
6431    }
6432
6433    /// Sets the value of [unreachable][crate::model::ListReleaseConfigsResponse::unreachable].
6434    ///
6435    /// # Example
6436    /// ```ignore,no_run
6437    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6438    /// let x = ListReleaseConfigsResponse::new().set_unreachable(["a", "b", "c"]);
6439    /// ```
6440    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6441    where
6442        T: std::iter::IntoIterator<Item = V>,
6443        V: std::convert::Into<std::string::String>,
6444    {
6445        use std::iter::Iterator;
6446        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6447        self
6448    }
6449}
6450
6451impl wkt::message::Message for ListReleaseConfigsResponse {
6452    fn typename() -> &'static str {
6453        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
6454    }
6455}
6456
6457#[doc(hidden)]
6458impl google_cloud_gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
6459    type PageItem = crate::model::ReleaseConfig;
6460
6461    fn items(self) -> std::vec::Vec<Self::PageItem> {
6462        self.release_configs
6463    }
6464
6465    fn next_page_token(&self) -> std::string::String {
6466        use std::clone::Clone;
6467        self.next_page_token.clone()
6468    }
6469}
6470
6471/// `GetReleaseConfig` request message.
6472#[derive(Clone, Default, PartialEq)]
6473#[non_exhaustive]
6474pub struct GetReleaseConfigRequest {
6475    /// Required. The release config's name.
6476    pub name: std::string::String,
6477
6478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6479}
6480
6481impl GetReleaseConfigRequest {
6482    /// Creates a new default instance.
6483    pub fn new() -> Self {
6484        std::default::Default::default()
6485    }
6486
6487    /// Sets the value of [name][crate::model::GetReleaseConfigRequest::name].
6488    ///
6489    /// # Example
6490    /// ```ignore,no_run
6491    /// # use google_cloud_dataform_v1::model::GetReleaseConfigRequest;
6492    /// # let project_id = "project_id";
6493    /// # let location_id = "location_id";
6494    /// # let repository_id = "repository_id";
6495    /// # let release_config_id = "release_config_id";
6496    /// let x = GetReleaseConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
6497    /// ```
6498    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6499        self.name = v.into();
6500        self
6501    }
6502}
6503
6504impl wkt::message::Message for GetReleaseConfigRequest {
6505    fn typename() -> &'static str {
6506        "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
6507    }
6508}
6509
6510/// `CreateReleaseConfig` request message.
6511#[derive(Clone, Default, PartialEq)]
6512#[non_exhaustive]
6513pub struct CreateReleaseConfigRequest {
6514    /// Required. The repository in which to create the release config. Must be in
6515    /// the format `projects/*/locations/*/repositories/*`.
6516    pub parent: std::string::String,
6517
6518    /// Required. The release config to create.
6519    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
6520
6521    /// Required. The ID to use for the release config, which will become the final
6522    /// component of the release config's resource name.
6523    pub release_config_id: std::string::String,
6524
6525    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6526}
6527
6528impl CreateReleaseConfigRequest {
6529    /// Creates a new default instance.
6530    pub fn new() -> Self {
6531        std::default::Default::default()
6532    }
6533
6534    /// Sets the value of [parent][crate::model::CreateReleaseConfigRequest::parent].
6535    ///
6536    /// # Example
6537    /// ```ignore,no_run
6538    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6539    /// # let project_id = "project_id";
6540    /// # let location_id = "location_id";
6541    /// # let repository_id = "repository_id";
6542    /// let x = CreateReleaseConfigRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
6543    /// ```
6544    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6545        self.parent = v.into();
6546        self
6547    }
6548
6549    /// Sets the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
6550    ///
6551    /// # Example
6552    /// ```ignore,no_run
6553    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6554    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6555    /// let x = CreateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6556    /// ```
6557    pub fn set_release_config<T>(mut self, v: T) -> Self
6558    where
6559        T: std::convert::Into<crate::model::ReleaseConfig>,
6560    {
6561        self.release_config = std::option::Option::Some(v.into());
6562        self
6563    }
6564
6565    /// Sets or clears the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
6566    ///
6567    /// # Example
6568    /// ```ignore,no_run
6569    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6570    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6571    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6572    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6573    /// ```
6574    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6575    where
6576        T: std::convert::Into<crate::model::ReleaseConfig>,
6577    {
6578        self.release_config = v.map(|x| x.into());
6579        self
6580    }
6581
6582    /// Sets the value of [release_config_id][crate::model::CreateReleaseConfigRequest::release_config_id].
6583    ///
6584    /// # Example
6585    /// ```ignore,no_run
6586    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6587    /// let x = CreateReleaseConfigRequest::new().set_release_config_id("example");
6588    /// ```
6589    pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
6590        mut self,
6591        v: T,
6592    ) -> Self {
6593        self.release_config_id = v.into();
6594        self
6595    }
6596}
6597
6598impl wkt::message::Message for CreateReleaseConfigRequest {
6599    fn typename() -> &'static str {
6600        "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
6601    }
6602}
6603
6604/// `UpdateReleaseConfig` request message.
6605#[derive(Clone, Default, PartialEq)]
6606#[non_exhaustive]
6607pub struct UpdateReleaseConfigRequest {
6608    /// Optional. Specifies the fields to be updated in the release config. If left
6609    /// unset, all fields will be updated.
6610    pub update_mask: std::option::Option<wkt::FieldMask>,
6611
6612    /// Required. The release config to update.
6613    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
6614
6615    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6616}
6617
6618impl UpdateReleaseConfigRequest {
6619    /// Creates a new default instance.
6620    pub fn new() -> Self {
6621        std::default::Default::default()
6622    }
6623
6624    /// Sets the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6625    ///
6626    /// # Example
6627    /// ```ignore,no_run
6628    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6629    /// use wkt::FieldMask;
6630    /// let x = UpdateReleaseConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6631    /// ```
6632    pub fn set_update_mask<T>(mut self, v: T) -> Self
6633    where
6634        T: std::convert::Into<wkt::FieldMask>,
6635    {
6636        self.update_mask = std::option::Option::Some(v.into());
6637        self
6638    }
6639
6640    /// Sets or clears the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6641    ///
6642    /// # Example
6643    /// ```ignore,no_run
6644    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6645    /// use wkt::FieldMask;
6646    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6647    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6648    /// ```
6649    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6650    where
6651        T: std::convert::Into<wkt::FieldMask>,
6652    {
6653        self.update_mask = v.map(|x| x.into());
6654        self
6655    }
6656
6657    /// Sets the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6658    ///
6659    /// # Example
6660    /// ```ignore,no_run
6661    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6662    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6663    /// let x = UpdateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6664    /// ```
6665    pub fn set_release_config<T>(mut self, v: T) -> Self
6666    where
6667        T: std::convert::Into<crate::model::ReleaseConfig>,
6668    {
6669        self.release_config = std::option::Option::Some(v.into());
6670        self
6671    }
6672
6673    /// Sets or clears the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6674    ///
6675    /// # Example
6676    /// ```ignore,no_run
6677    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6678    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6679    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6680    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6681    /// ```
6682    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6683    where
6684        T: std::convert::Into<crate::model::ReleaseConfig>,
6685    {
6686        self.release_config = v.map(|x| x.into());
6687        self
6688    }
6689}
6690
6691impl wkt::message::Message for UpdateReleaseConfigRequest {
6692    fn typename() -> &'static str {
6693        "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
6694    }
6695}
6696
6697/// `DeleteReleaseConfig` request message.
6698#[derive(Clone, Default, PartialEq)]
6699#[non_exhaustive]
6700pub struct DeleteReleaseConfigRequest {
6701    /// Required. The release config's name.
6702    pub name: std::string::String,
6703
6704    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6705}
6706
6707impl DeleteReleaseConfigRequest {
6708    /// Creates a new default instance.
6709    pub fn new() -> Self {
6710        std::default::Default::default()
6711    }
6712
6713    /// Sets the value of [name][crate::model::DeleteReleaseConfigRequest::name].
6714    ///
6715    /// # Example
6716    /// ```ignore,no_run
6717    /// # use google_cloud_dataform_v1::model::DeleteReleaseConfigRequest;
6718    /// # let project_id = "project_id";
6719    /// # let location_id = "location_id";
6720    /// # let repository_id = "repository_id";
6721    /// # let release_config_id = "release_config_id";
6722    /// let x = DeleteReleaseConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
6723    /// ```
6724    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6725        self.name = v.into();
6726        self
6727    }
6728}
6729
6730impl wkt::message::Message for DeleteReleaseConfigRequest {
6731    fn typename() -> &'static str {
6732        "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
6733    }
6734}
6735
6736/// Represents the result of compiling a Dataform project.
6737#[derive(Clone, Default, PartialEq)]
6738#[non_exhaustive]
6739pub struct CompilationResult {
6740    /// Output only. The compilation result's name.
6741    pub name: std::string::String,
6742
6743    /// Immutable. If set, fields of `code_compilation_config` override the default
6744    /// compilation settings that are specified in dataform.json.
6745    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
6746
6747    /// Output only. The fully resolved Git commit SHA of the code that was
6748    /// compiled. Not set for compilation results whose source is a workspace.
6749    pub resolved_git_commit_sha: std::string::String,
6750
6751    /// Output only. The version of `@dataform/core` that was used for compilation.
6752    pub dataform_core_version: std::string::String,
6753
6754    /// Output only. Errors encountered during project compilation.
6755    pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
6756
6757    /// Output only. Only set if the repository has a KMS Key.
6758    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
6759
6760    /// Output only. The timestamp of when the compilation result was created.
6761    pub create_time: std::option::Option<wkt::Timestamp>,
6762
6763    /// Output only. All the metadata information that is used internally to serve
6764    /// the resource. For example: timestamps, flags, status fields, etc. The
6765    /// format of this field is a JSON string.
6766    pub internal_metadata: std::option::Option<std::string::String>,
6767
6768    /// Output only. Metadata indicating whether this resource is user-scoped.
6769    /// `CompilationResult` resource is `user_scoped` only if it is sourced
6770    /// from a workspace.
6771    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
6772
6773    /// The source of the compilation result.
6774    pub source: std::option::Option<crate::model::compilation_result::Source>,
6775
6776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6777}
6778
6779impl CompilationResult {
6780    /// Creates a new default instance.
6781    pub fn new() -> Self {
6782        std::default::Default::default()
6783    }
6784
6785    /// Sets the value of [name][crate::model::CompilationResult::name].
6786    ///
6787    /// # Example
6788    /// ```ignore,no_run
6789    /// # use google_cloud_dataform_v1::model::CompilationResult;
6790    /// # let project_id = "project_id";
6791    /// # let location_id = "location_id";
6792    /// # let repository_id = "repository_id";
6793    /// # let compilation_result_id = "compilation_result_id";
6794    /// let x = CompilationResult::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
6795    /// ```
6796    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6797        self.name = v.into();
6798        self
6799    }
6800
6801    /// Sets the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6802    ///
6803    /// # Example
6804    /// ```ignore,no_run
6805    /// # use google_cloud_dataform_v1::model::CompilationResult;
6806    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6807    /// let x = CompilationResult::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
6808    /// ```
6809    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
6810    where
6811        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6812    {
6813        self.code_compilation_config = std::option::Option::Some(v.into());
6814        self
6815    }
6816
6817    /// Sets or clears the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6818    ///
6819    /// # Example
6820    /// ```ignore,no_run
6821    /// # use google_cloud_dataform_v1::model::CompilationResult;
6822    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6823    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
6824    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
6825    /// ```
6826    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
6827    where
6828        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6829    {
6830        self.code_compilation_config = v.map(|x| x.into());
6831        self
6832    }
6833
6834    /// Sets the value of [resolved_git_commit_sha][crate::model::CompilationResult::resolved_git_commit_sha].
6835    ///
6836    /// # Example
6837    /// ```ignore,no_run
6838    /// # use google_cloud_dataform_v1::model::CompilationResult;
6839    /// let x = CompilationResult::new().set_resolved_git_commit_sha("example");
6840    /// ```
6841    pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
6842        mut self,
6843        v: T,
6844    ) -> Self {
6845        self.resolved_git_commit_sha = v.into();
6846        self
6847    }
6848
6849    /// Sets the value of [dataform_core_version][crate::model::CompilationResult::dataform_core_version].
6850    ///
6851    /// # Example
6852    /// ```ignore,no_run
6853    /// # use google_cloud_dataform_v1::model::CompilationResult;
6854    /// let x = CompilationResult::new().set_dataform_core_version("example");
6855    /// ```
6856    pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
6857        mut self,
6858        v: T,
6859    ) -> Self {
6860        self.dataform_core_version = v.into();
6861        self
6862    }
6863
6864    /// Sets the value of [compilation_errors][crate::model::CompilationResult::compilation_errors].
6865    ///
6866    /// # Example
6867    /// ```ignore,no_run
6868    /// # use google_cloud_dataform_v1::model::CompilationResult;
6869    /// use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6870    /// let x = CompilationResult::new()
6871    ///     .set_compilation_errors([
6872    ///         CompilationError::default()/* use setters */,
6873    ///         CompilationError::default()/* use (different) setters */,
6874    ///     ]);
6875    /// ```
6876    pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
6877    where
6878        T: std::iter::IntoIterator<Item = V>,
6879        V: std::convert::Into<crate::model::compilation_result::CompilationError>,
6880    {
6881        use std::iter::Iterator;
6882        self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
6883        self
6884    }
6885
6886    /// Sets the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6887    ///
6888    /// # Example
6889    /// ```ignore,no_run
6890    /// # use google_cloud_dataform_v1::model::CompilationResult;
6891    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6892    /// let x = CompilationResult::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
6893    /// ```
6894    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
6895    where
6896        T: std::convert::Into<crate::model::DataEncryptionState>,
6897    {
6898        self.data_encryption_state = std::option::Option::Some(v.into());
6899        self
6900    }
6901
6902    /// Sets or clears the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6903    ///
6904    /// # Example
6905    /// ```ignore,no_run
6906    /// # use google_cloud_dataform_v1::model::CompilationResult;
6907    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6908    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
6909    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
6910    /// ```
6911    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
6912    where
6913        T: std::convert::Into<crate::model::DataEncryptionState>,
6914    {
6915        self.data_encryption_state = v.map(|x| x.into());
6916        self
6917    }
6918
6919    /// Sets the value of [create_time][crate::model::CompilationResult::create_time].
6920    ///
6921    /// # Example
6922    /// ```ignore,no_run
6923    /// # use google_cloud_dataform_v1::model::CompilationResult;
6924    /// use wkt::Timestamp;
6925    /// let x = CompilationResult::new().set_create_time(Timestamp::default()/* use setters */);
6926    /// ```
6927    pub fn set_create_time<T>(mut self, v: T) -> Self
6928    where
6929        T: std::convert::Into<wkt::Timestamp>,
6930    {
6931        self.create_time = std::option::Option::Some(v.into());
6932        self
6933    }
6934
6935    /// Sets or clears the value of [create_time][crate::model::CompilationResult::create_time].
6936    ///
6937    /// # Example
6938    /// ```ignore,no_run
6939    /// # use google_cloud_dataform_v1::model::CompilationResult;
6940    /// use wkt::Timestamp;
6941    /// let x = CompilationResult::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
6942    /// let x = CompilationResult::new().set_or_clear_create_time(None::<Timestamp>);
6943    /// ```
6944    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6945    where
6946        T: std::convert::Into<wkt::Timestamp>,
6947    {
6948        self.create_time = v.map(|x| x.into());
6949        self
6950    }
6951
6952    /// Sets the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6953    ///
6954    /// # Example
6955    /// ```ignore,no_run
6956    /// # use google_cloud_dataform_v1::model::CompilationResult;
6957    /// let x = CompilationResult::new().set_internal_metadata("example");
6958    /// ```
6959    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
6960    where
6961        T: std::convert::Into<std::string::String>,
6962    {
6963        self.internal_metadata = std::option::Option::Some(v.into());
6964        self
6965    }
6966
6967    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
6968    ///
6969    /// # Example
6970    /// ```ignore,no_run
6971    /// # use google_cloud_dataform_v1::model::CompilationResult;
6972    /// let x = CompilationResult::new().set_or_clear_internal_metadata(Some("example"));
6973    /// let x = CompilationResult::new().set_or_clear_internal_metadata(None::<String>);
6974    /// ```
6975    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6976    where
6977        T: std::convert::Into<std::string::String>,
6978    {
6979        self.internal_metadata = v.map(|x| x.into());
6980        self
6981    }
6982
6983    /// Sets the value of [private_resource_metadata][crate::model::CompilationResult::private_resource_metadata].
6984    ///
6985    /// # Example
6986    /// ```ignore,no_run
6987    /// # use google_cloud_dataform_v1::model::CompilationResult;
6988    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
6989    /// let x = CompilationResult::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
6990    /// ```
6991    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
6992    where
6993        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
6994    {
6995        self.private_resource_metadata = std::option::Option::Some(v.into());
6996        self
6997    }
6998
6999    /// Sets or clears the value of [private_resource_metadata][crate::model::CompilationResult::private_resource_metadata].
7000    ///
7001    /// # Example
7002    /// ```ignore,no_run
7003    /// # use google_cloud_dataform_v1::model::CompilationResult;
7004    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
7005    /// let x = CompilationResult::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
7006    /// let x = CompilationResult::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
7007    /// ```
7008    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7009    where
7010        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
7011    {
7012        self.private_resource_metadata = v.map(|x| x.into());
7013        self
7014    }
7015
7016    /// Sets the value of [source][crate::model::CompilationResult::source].
7017    ///
7018    /// Note that all the setters affecting `source` are mutually
7019    /// exclusive.
7020    ///
7021    /// # Example
7022    /// ```ignore,no_run
7023    /// # use google_cloud_dataform_v1::model::CompilationResult;
7024    /// use google_cloud_dataform_v1::model::compilation_result::Source;
7025    /// let x = CompilationResult::new().set_source(Some(Source::GitCommitish("example".to_string())));
7026    /// ```
7027    pub fn set_source<
7028        T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
7029    >(
7030        mut self,
7031        v: T,
7032    ) -> Self {
7033        self.source = v.into();
7034        self
7035    }
7036
7037    /// The value of [source][crate::model::CompilationResult::source]
7038    /// if it holds a `GitCommitish`, `None` if the field is not set or
7039    /// holds a different branch.
7040    pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
7041        #[allow(unreachable_patterns)]
7042        self.source.as_ref().and_then(|v| match v {
7043            crate::model::compilation_result::Source::GitCommitish(v) => {
7044                std::option::Option::Some(v)
7045            }
7046            _ => std::option::Option::None,
7047        })
7048    }
7049
7050    /// Sets the value of [source][crate::model::CompilationResult::source]
7051    /// to hold a `GitCommitish`.
7052    ///
7053    /// Note that all the setters affecting `source` are
7054    /// mutually exclusive.
7055    ///
7056    /// # Example
7057    /// ```ignore,no_run
7058    /// # use google_cloud_dataform_v1::model::CompilationResult;
7059    /// let x = CompilationResult::new().set_git_commitish("example");
7060    /// assert!(x.git_commitish().is_some());
7061    /// assert!(x.workspace().is_none());
7062    /// assert!(x.release_config().is_none());
7063    /// ```
7064    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7065        self.source = std::option::Option::Some(
7066            crate::model::compilation_result::Source::GitCommitish(v.into()),
7067        );
7068        self
7069    }
7070
7071    /// The value of [source][crate::model::CompilationResult::source]
7072    /// if it holds a `Workspace`, `None` if the field is not set or
7073    /// holds a different branch.
7074    pub fn workspace(&self) -> std::option::Option<&std::string::String> {
7075        #[allow(unreachable_patterns)]
7076        self.source.as_ref().and_then(|v| match v {
7077            crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
7078            _ => std::option::Option::None,
7079        })
7080    }
7081
7082    /// Sets the value of [source][crate::model::CompilationResult::source]
7083    /// to hold a `Workspace`.
7084    ///
7085    /// Note that all the setters affecting `source` are
7086    /// mutually exclusive.
7087    ///
7088    /// # Example
7089    /// ```ignore,no_run
7090    /// # use google_cloud_dataform_v1::model::CompilationResult;
7091    /// # let project_id = "project_id";
7092    /// # let location_id = "location_id";
7093    /// # let repository_id = "repository_id";
7094    /// # let workspace_id = "workspace_id";
7095    /// let x = CompilationResult::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
7096    /// assert!(x.workspace().is_some());
7097    /// assert!(x.git_commitish().is_none());
7098    /// assert!(x.release_config().is_none());
7099    /// ```
7100    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7101        self.source = std::option::Option::Some(
7102            crate::model::compilation_result::Source::Workspace(v.into()),
7103        );
7104        self
7105    }
7106
7107    /// The value of [source][crate::model::CompilationResult::source]
7108    /// if it holds a `ReleaseConfig`, `None` if the field is not set or
7109    /// holds a different branch.
7110    pub fn release_config(&self) -> std::option::Option<&std::string::String> {
7111        #[allow(unreachable_patterns)]
7112        self.source.as_ref().and_then(|v| match v {
7113            crate::model::compilation_result::Source::ReleaseConfig(v) => {
7114                std::option::Option::Some(v)
7115            }
7116            _ => std::option::Option::None,
7117        })
7118    }
7119
7120    /// Sets the value of [source][crate::model::CompilationResult::source]
7121    /// to hold a `ReleaseConfig`.
7122    ///
7123    /// Note that all the setters affecting `source` are
7124    /// mutually exclusive.
7125    ///
7126    /// # Example
7127    /// ```ignore,no_run
7128    /// # use google_cloud_dataform_v1::model::CompilationResult;
7129    /// # let project_id = "project_id";
7130    /// # let location_id = "location_id";
7131    /// # let repository_id = "repository_id";
7132    /// # let release_config_id = "release_config_id";
7133    /// let x = CompilationResult::new().set_release_config(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
7134    /// assert!(x.release_config().is_some());
7135    /// assert!(x.git_commitish().is_none());
7136    /// assert!(x.workspace().is_none());
7137    /// ```
7138    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7139        self.source = std::option::Option::Some(
7140            crate::model::compilation_result::Source::ReleaseConfig(v.into()),
7141        );
7142        self
7143    }
7144}
7145
7146impl wkt::message::Message for CompilationResult {
7147    fn typename() -> &'static str {
7148        "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
7149    }
7150}
7151
7152/// Defines additional types related to [CompilationResult].
7153pub mod compilation_result {
7154    #[allow(unused_imports)]
7155    use super::*;
7156
7157    /// An error encountered when attempting to compile a Dataform project.
7158    #[derive(Clone, Default, PartialEq)]
7159    #[non_exhaustive]
7160    pub struct CompilationError {
7161        /// Output only. The error's top level message.
7162        pub message: std::string::String,
7163
7164        /// Output only. The error's full stack trace.
7165        pub stack: std::string::String,
7166
7167        /// Output only. The path of the file where this error occurred, if
7168        /// available, relative to the project root.
7169        pub path: std::string::String,
7170
7171        /// Output only. The identifier of the action where this error occurred, if
7172        /// available.
7173        pub action_target: std::option::Option<crate::model::Target>,
7174
7175        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7176    }
7177
7178    impl CompilationError {
7179        /// Creates a new default instance.
7180        pub fn new() -> Self {
7181            std::default::Default::default()
7182        }
7183
7184        /// Sets the value of [message][crate::model::compilation_result::CompilationError::message].
7185        ///
7186        /// # Example
7187        /// ```ignore,no_run
7188        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7189        /// let x = CompilationError::new().set_message("example");
7190        /// ```
7191        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7192            self.message = v.into();
7193            self
7194        }
7195
7196        /// Sets the value of [stack][crate::model::compilation_result::CompilationError::stack].
7197        ///
7198        /// # Example
7199        /// ```ignore,no_run
7200        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7201        /// let x = CompilationError::new().set_stack("example");
7202        /// ```
7203        pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7204            self.stack = v.into();
7205            self
7206        }
7207
7208        /// Sets the value of [path][crate::model::compilation_result::CompilationError::path].
7209        ///
7210        /// # Example
7211        /// ```ignore,no_run
7212        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7213        /// let x = CompilationError::new().set_path("example");
7214        /// ```
7215        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7216            self.path = v.into();
7217            self
7218        }
7219
7220        /// Sets the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
7221        ///
7222        /// # Example
7223        /// ```ignore,no_run
7224        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7225        /// use google_cloud_dataform_v1::model::Target;
7226        /// let x = CompilationError::new().set_action_target(Target::default()/* use setters */);
7227        /// ```
7228        pub fn set_action_target<T>(mut self, v: T) -> Self
7229        where
7230            T: std::convert::Into<crate::model::Target>,
7231        {
7232            self.action_target = std::option::Option::Some(v.into());
7233            self
7234        }
7235
7236        /// Sets or clears the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
7237        ///
7238        /// # Example
7239        /// ```ignore,no_run
7240        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7241        /// use google_cloud_dataform_v1::model::Target;
7242        /// let x = CompilationError::new().set_or_clear_action_target(Some(Target::default()/* use setters */));
7243        /// let x = CompilationError::new().set_or_clear_action_target(None::<Target>);
7244        /// ```
7245        pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
7246        where
7247            T: std::convert::Into<crate::model::Target>,
7248        {
7249            self.action_target = v.map(|x| x.into());
7250            self
7251        }
7252    }
7253
7254    impl wkt::message::Message for CompilationError {
7255        fn typename() -> &'static str {
7256            "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
7257        }
7258    }
7259
7260    /// The source of the compilation result.
7261    #[derive(Clone, Debug, PartialEq)]
7262    #[non_exhaustive]
7263    pub enum Source {
7264        /// Immutable. Git commit/tag/branch name at which the repository should be
7265        /// compiled. Must exist in the remote repository. Examples:
7266        ///
7267        /// - a commit SHA: `12ade345`
7268        /// - a tag: `tag1`
7269        /// - a branch name: `branch1`
7270        GitCommitish(std::string::String),
7271        /// Immutable. The name of the workspace to compile. Must be in the format
7272        /// `projects/*/locations/*/repositories/*/workspaces/*`.
7273        Workspace(std::string::String),
7274        /// Immutable. The name of the release config to compile. Must be in the
7275        /// format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
7276        ReleaseConfig(std::string::String),
7277    }
7278}
7279
7280/// Configures various aspects of Dataform code compilation.
7281#[derive(Clone, Default, PartialEq)]
7282#[non_exhaustive]
7283pub struct CodeCompilationConfig {
7284    /// Optional. The default database (Google Cloud project ID).
7285    pub default_database: std::string::String,
7286
7287    /// Optional. The default schema (BigQuery dataset ID).
7288    pub default_schema: std::string::String,
7289
7290    /// Optional. The default BigQuery location to use. Defaults to "US".
7291    /// See the BigQuery docs for a full list of locations:
7292    /// <https://cloud.google.com/bigquery/docs/locations>.
7293    pub default_location: std::string::String,
7294
7295    /// Optional. The default schema (BigQuery dataset ID) for assertions.
7296    pub assertion_schema: std::string::String,
7297
7298    /// Optional. User-defined variables that are made available to project code
7299    /// during compilation.
7300    pub vars: std::collections::HashMap<std::string::String, std::string::String>,
7301
7302    /// Optional. The suffix that should be appended to all database (Google Cloud
7303    /// project ID) names.
7304    pub database_suffix: std::string::String,
7305
7306    /// Optional. The suffix that should be appended to all schema (BigQuery
7307    /// dataset ID) names.
7308    pub schema_suffix: std::string::String,
7309
7310    /// Optional. The prefix that should be prepended to all table names.
7311    pub table_prefix: std::string::String,
7312
7313    /// Optional. The prefix to prepend to built-in assertion names.
7314    pub builtin_assertion_name_prefix: std::string::String,
7315
7316    /// Optional. The default notebook runtime options.
7317    pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
7318
7319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7320}
7321
7322impl CodeCompilationConfig {
7323    /// Creates a new default instance.
7324    pub fn new() -> Self {
7325        std::default::Default::default()
7326    }
7327
7328    /// Sets the value of [default_database][crate::model::CodeCompilationConfig::default_database].
7329    ///
7330    /// # Example
7331    /// ```ignore,no_run
7332    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7333    /// let x = CodeCompilationConfig::new().set_default_database("example");
7334    /// ```
7335    pub fn set_default_database<T: std::convert::Into<std::string::String>>(
7336        mut self,
7337        v: T,
7338    ) -> Self {
7339        self.default_database = v.into();
7340        self
7341    }
7342
7343    /// Sets the value of [default_schema][crate::model::CodeCompilationConfig::default_schema].
7344    ///
7345    /// # Example
7346    /// ```ignore,no_run
7347    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7348    /// let x = CodeCompilationConfig::new().set_default_schema("example");
7349    /// ```
7350    pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7351        self.default_schema = v.into();
7352        self
7353    }
7354
7355    /// Sets the value of [default_location][crate::model::CodeCompilationConfig::default_location].
7356    ///
7357    /// # Example
7358    /// ```ignore,no_run
7359    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7360    /// let x = CodeCompilationConfig::new().set_default_location("example");
7361    /// ```
7362    pub fn set_default_location<T: std::convert::Into<std::string::String>>(
7363        mut self,
7364        v: T,
7365    ) -> Self {
7366        self.default_location = v.into();
7367        self
7368    }
7369
7370    /// Sets the value of [assertion_schema][crate::model::CodeCompilationConfig::assertion_schema].
7371    ///
7372    /// # Example
7373    /// ```ignore,no_run
7374    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7375    /// let x = CodeCompilationConfig::new().set_assertion_schema("example");
7376    /// ```
7377    pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
7378        mut self,
7379        v: T,
7380    ) -> Self {
7381        self.assertion_schema = v.into();
7382        self
7383    }
7384
7385    /// Sets the value of [vars][crate::model::CodeCompilationConfig::vars].
7386    ///
7387    /// # Example
7388    /// ```ignore,no_run
7389    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7390    /// let x = CodeCompilationConfig::new().set_vars([
7391    ///     ("key0", "abc"),
7392    ///     ("key1", "xyz"),
7393    /// ]);
7394    /// ```
7395    pub fn set_vars<T, K, V>(mut self, v: T) -> Self
7396    where
7397        T: std::iter::IntoIterator<Item = (K, V)>,
7398        K: std::convert::Into<std::string::String>,
7399        V: std::convert::Into<std::string::String>,
7400    {
7401        use std::iter::Iterator;
7402        self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7403        self
7404    }
7405
7406    /// Sets the value of [database_suffix][crate::model::CodeCompilationConfig::database_suffix].
7407    ///
7408    /// # Example
7409    /// ```ignore,no_run
7410    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7411    /// let x = CodeCompilationConfig::new().set_database_suffix("example");
7412    /// ```
7413    pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7414        self.database_suffix = v.into();
7415        self
7416    }
7417
7418    /// Sets the value of [schema_suffix][crate::model::CodeCompilationConfig::schema_suffix].
7419    ///
7420    /// # Example
7421    /// ```ignore,no_run
7422    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7423    /// let x = CodeCompilationConfig::new().set_schema_suffix("example");
7424    /// ```
7425    pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7426        self.schema_suffix = v.into();
7427        self
7428    }
7429
7430    /// Sets the value of [table_prefix][crate::model::CodeCompilationConfig::table_prefix].
7431    ///
7432    /// # Example
7433    /// ```ignore,no_run
7434    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7435    /// let x = CodeCompilationConfig::new().set_table_prefix("example");
7436    /// ```
7437    pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7438        self.table_prefix = v.into();
7439        self
7440    }
7441
7442    /// Sets the value of [builtin_assertion_name_prefix][crate::model::CodeCompilationConfig::builtin_assertion_name_prefix].
7443    ///
7444    /// # Example
7445    /// ```ignore,no_run
7446    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7447    /// let x = CodeCompilationConfig::new().set_builtin_assertion_name_prefix("example");
7448    /// ```
7449    pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
7450        mut self,
7451        v: T,
7452    ) -> Self {
7453        self.builtin_assertion_name_prefix = v.into();
7454        self
7455    }
7456
7457    /// Sets the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
7458    ///
7459    /// # Example
7460    /// ```ignore,no_run
7461    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7462    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7463    /// let x = CodeCompilationConfig::new().set_default_notebook_runtime_options(NotebookRuntimeOptions::default()/* use setters */);
7464    /// ```
7465    pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
7466    where
7467        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
7468    {
7469        self.default_notebook_runtime_options = std::option::Option::Some(v.into());
7470        self
7471    }
7472
7473    /// Sets or clears the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
7474    ///
7475    /// # Example
7476    /// ```ignore,no_run
7477    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7478    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7479    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(Some(NotebookRuntimeOptions::default()/* use setters */));
7480    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(None::<NotebookRuntimeOptions>);
7481    /// ```
7482    pub fn set_or_clear_default_notebook_runtime_options<T>(
7483        mut self,
7484        v: std::option::Option<T>,
7485    ) -> Self
7486    where
7487        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
7488    {
7489        self.default_notebook_runtime_options = v.map(|x| x.into());
7490        self
7491    }
7492}
7493
7494impl wkt::message::Message for CodeCompilationConfig {
7495    fn typename() -> &'static str {
7496        "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
7497    }
7498}
7499
7500/// Configures various aspects of Dataform notebook runtime.
7501#[derive(Clone, Default, PartialEq)]
7502#[non_exhaustive]
7503pub struct NotebookRuntimeOptions {
7504    /// Optional. The resource name of the [Colab runtime template]
7505    /// (<https://cloud.google.com/colab/docs/runtimes>), from which a runtime is
7506    /// created for notebook executions. If not specified, a runtime is created
7507    /// with Colab's default specifications.
7508    pub ai_platform_notebook_runtime_template: std::string::String,
7509
7510    /// The location to store the notebook execution result.
7511    pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
7512
7513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7514}
7515
7516impl NotebookRuntimeOptions {
7517    /// Creates a new default instance.
7518    pub fn new() -> Self {
7519        std::default::Default::default()
7520    }
7521
7522    /// Sets the value of [ai_platform_notebook_runtime_template][crate::model::NotebookRuntimeOptions::ai_platform_notebook_runtime_template].
7523    ///
7524    /// # Example
7525    /// ```ignore,no_run
7526    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7527    /// let x = NotebookRuntimeOptions::new().set_ai_platform_notebook_runtime_template("example");
7528    /// ```
7529    pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
7530        mut self,
7531        v: T,
7532    ) -> Self {
7533        self.ai_platform_notebook_runtime_template = v.into();
7534        self
7535    }
7536
7537    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink].
7538    ///
7539    /// Note that all the setters affecting `execution_sink` are mutually
7540    /// exclusive.
7541    ///
7542    /// # Example
7543    /// ```ignore,no_run
7544    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7545    /// use google_cloud_dataform_v1::model::notebook_runtime_options::ExecutionSink;
7546    /// let x = NotebookRuntimeOptions::new().set_execution_sink(Some(ExecutionSink::GcsOutputBucket("example".to_string())));
7547    /// ```
7548    pub fn set_execution_sink<
7549        T: std::convert::Into<
7550                std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
7551            >,
7552    >(
7553        mut self,
7554        v: T,
7555    ) -> Self {
7556        self.execution_sink = v.into();
7557        self
7558    }
7559
7560    /// The value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
7561    /// if it holds a `GcsOutputBucket`, `None` if the field is not set or
7562    /// holds a different branch.
7563    pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
7564        #[allow(unreachable_patterns)]
7565        self.execution_sink.as_ref().and_then(|v| match v {
7566            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
7567                std::option::Option::Some(v)
7568            }
7569            _ => std::option::Option::None,
7570        })
7571    }
7572
7573    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
7574    /// to hold a `GcsOutputBucket`.
7575    ///
7576    /// Note that all the setters affecting `execution_sink` are
7577    /// mutually exclusive.
7578    ///
7579    /// # Example
7580    /// ```ignore,no_run
7581    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7582    /// let x = NotebookRuntimeOptions::new().set_gcs_output_bucket("example");
7583    /// assert!(x.gcs_output_bucket().is_some());
7584    /// ```
7585    pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
7586        mut self,
7587        v: T,
7588    ) -> Self {
7589        self.execution_sink = std::option::Option::Some(
7590            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
7591        );
7592        self
7593    }
7594}
7595
7596impl wkt::message::Message for NotebookRuntimeOptions {
7597    fn typename() -> &'static str {
7598        "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
7599    }
7600}
7601
7602/// Defines additional types related to [NotebookRuntimeOptions].
7603pub mod notebook_runtime_options {
7604    #[allow(unused_imports)]
7605    use super::*;
7606
7607    /// The location to store the notebook execution result.
7608    #[derive(Clone, Debug, PartialEq)]
7609    #[non_exhaustive]
7610    pub enum ExecutionSink {
7611        /// Optional. The Google Cloud Storage location to upload the result to.
7612        /// Format: `gs://bucket-name`.
7613        GcsOutputBucket(std::string::String),
7614    }
7615}
7616
7617/// `ListCompilationResults` request message.
7618#[derive(Clone, Default, PartialEq)]
7619#[non_exhaustive]
7620pub struct ListCompilationResultsRequest {
7621    /// Required. The repository in which to list compilation results. Must be in
7622    /// the format `projects/*/locations/*/repositories/*`.
7623    pub parent: std::string::String,
7624
7625    /// Optional. Maximum number of compilation results to return. The server may
7626    /// return fewer items than requested. If unspecified, the server will pick an
7627    /// appropriate default.
7628    pub page_size: i32,
7629
7630    /// Optional. Page token received from a previous `ListCompilationResults`
7631    /// call. Provide this to retrieve the subsequent page.
7632    ///
7633    /// When paginating, all other parameters provided to `ListCompilationResults`,
7634    /// with the exception of `page_size`, must match the call that provided the
7635    /// page token.
7636    pub page_token: std::string::String,
7637
7638    /// Optional. This field only supports ordering by `name` and `create_time`.
7639    /// If unspecified, the server will choose the ordering.
7640    /// If specified, the default order is ascending for the `name` field.
7641    pub order_by: std::string::String,
7642
7643    /// Optional. Filter for the returned list.
7644    pub filter: std::string::String,
7645
7646    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7647}
7648
7649impl ListCompilationResultsRequest {
7650    /// Creates a new default instance.
7651    pub fn new() -> Self {
7652        std::default::Default::default()
7653    }
7654
7655    /// Sets the value of [parent][crate::model::ListCompilationResultsRequest::parent].
7656    ///
7657    /// # Example
7658    /// ```ignore,no_run
7659    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7660    /// # let project_id = "project_id";
7661    /// # let location_id = "location_id";
7662    /// # let repository_id = "repository_id";
7663    /// let x = ListCompilationResultsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
7664    /// ```
7665    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7666        self.parent = v.into();
7667        self
7668    }
7669
7670    /// Sets the value of [page_size][crate::model::ListCompilationResultsRequest::page_size].
7671    ///
7672    /// # Example
7673    /// ```ignore,no_run
7674    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7675    /// let x = ListCompilationResultsRequest::new().set_page_size(42);
7676    /// ```
7677    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7678        self.page_size = v.into();
7679        self
7680    }
7681
7682    /// Sets the value of [page_token][crate::model::ListCompilationResultsRequest::page_token].
7683    ///
7684    /// # Example
7685    /// ```ignore,no_run
7686    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7687    /// let x = ListCompilationResultsRequest::new().set_page_token("example");
7688    /// ```
7689    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7690        self.page_token = v.into();
7691        self
7692    }
7693
7694    /// Sets the value of [order_by][crate::model::ListCompilationResultsRequest::order_by].
7695    ///
7696    /// # Example
7697    /// ```ignore,no_run
7698    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7699    /// let x = ListCompilationResultsRequest::new().set_order_by("example");
7700    /// ```
7701    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7702        self.order_by = v.into();
7703        self
7704    }
7705
7706    /// Sets the value of [filter][crate::model::ListCompilationResultsRequest::filter].
7707    ///
7708    /// # Example
7709    /// ```ignore,no_run
7710    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7711    /// let x = ListCompilationResultsRequest::new().set_filter("example");
7712    /// ```
7713    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7714        self.filter = v.into();
7715        self
7716    }
7717}
7718
7719impl wkt::message::Message for ListCompilationResultsRequest {
7720    fn typename() -> &'static str {
7721        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
7722    }
7723}
7724
7725/// `ListCompilationResults` response message.
7726#[derive(Clone, Default, PartialEq)]
7727#[non_exhaustive]
7728pub struct ListCompilationResultsResponse {
7729    /// List of compilation results.
7730    pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
7731
7732    /// A token, which can be sent as `page_token` to retrieve the next page.
7733    /// If this field is omitted, there are no subsequent pages.
7734    pub next_page_token: std::string::String,
7735
7736    /// Locations which could not be reached.
7737    pub unreachable: std::vec::Vec<std::string::String>,
7738
7739    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7740}
7741
7742impl ListCompilationResultsResponse {
7743    /// Creates a new default instance.
7744    pub fn new() -> Self {
7745        std::default::Default::default()
7746    }
7747
7748    /// Sets the value of [compilation_results][crate::model::ListCompilationResultsResponse::compilation_results].
7749    ///
7750    /// # Example
7751    /// ```ignore,no_run
7752    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7753    /// use google_cloud_dataform_v1::model::CompilationResult;
7754    /// let x = ListCompilationResultsResponse::new()
7755    ///     .set_compilation_results([
7756    ///         CompilationResult::default()/* use setters */,
7757    ///         CompilationResult::default()/* use (different) setters */,
7758    ///     ]);
7759    /// ```
7760    pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
7761    where
7762        T: std::iter::IntoIterator<Item = V>,
7763        V: std::convert::Into<crate::model::CompilationResult>,
7764    {
7765        use std::iter::Iterator;
7766        self.compilation_results = v.into_iter().map(|i| i.into()).collect();
7767        self
7768    }
7769
7770    /// Sets the value of [next_page_token][crate::model::ListCompilationResultsResponse::next_page_token].
7771    ///
7772    /// # Example
7773    /// ```ignore,no_run
7774    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7775    /// let x = ListCompilationResultsResponse::new().set_next_page_token("example");
7776    /// ```
7777    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7778        self.next_page_token = v.into();
7779        self
7780    }
7781
7782    /// Sets the value of [unreachable][crate::model::ListCompilationResultsResponse::unreachable].
7783    ///
7784    /// # Example
7785    /// ```ignore,no_run
7786    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7787    /// let x = ListCompilationResultsResponse::new().set_unreachable(["a", "b", "c"]);
7788    /// ```
7789    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7790    where
7791        T: std::iter::IntoIterator<Item = V>,
7792        V: std::convert::Into<std::string::String>,
7793    {
7794        use std::iter::Iterator;
7795        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7796        self
7797    }
7798}
7799
7800impl wkt::message::Message for ListCompilationResultsResponse {
7801    fn typename() -> &'static str {
7802        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
7803    }
7804}
7805
7806#[doc(hidden)]
7807impl google_cloud_gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
7808    type PageItem = crate::model::CompilationResult;
7809
7810    fn items(self) -> std::vec::Vec<Self::PageItem> {
7811        self.compilation_results
7812    }
7813
7814    fn next_page_token(&self) -> std::string::String {
7815        use std::clone::Clone;
7816        self.next_page_token.clone()
7817    }
7818}
7819
7820/// `GetCompilationResult` request message.
7821#[derive(Clone, Default, PartialEq)]
7822#[non_exhaustive]
7823pub struct GetCompilationResultRequest {
7824    /// Required. The compilation result's name.
7825    pub name: std::string::String,
7826
7827    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7828}
7829
7830impl GetCompilationResultRequest {
7831    /// Creates a new default instance.
7832    pub fn new() -> Self {
7833        std::default::Default::default()
7834    }
7835
7836    /// Sets the value of [name][crate::model::GetCompilationResultRequest::name].
7837    ///
7838    /// # Example
7839    /// ```ignore,no_run
7840    /// # use google_cloud_dataform_v1::model::GetCompilationResultRequest;
7841    /// # let project_id = "project_id";
7842    /// # let location_id = "location_id";
7843    /// # let repository_id = "repository_id";
7844    /// # let compilation_result_id = "compilation_result_id";
7845    /// let x = GetCompilationResultRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
7846    /// ```
7847    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7848        self.name = v.into();
7849        self
7850    }
7851}
7852
7853impl wkt::message::Message for GetCompilationResultRequest {
7854    fn typename() -> &'static str {
7855        "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
7856    }
7857}
7858
7859/// `CreateCompilationResult` request message.
7860#[derive(Clone, Default, PartialEq)]
7861#[non_exhaustive]
7862pub struct CreateCompilationResultRequest {
7863    /// Required. The repository in which to create the compilation result. Must be
7864    /// in the format `projects/*/locations/*/repositories/*`.
7865    pub parent: std::string::String,
7866
7867    /// Required. The compilation result to create.
7868    pub compilation_result: std::option::Option<crate::model::CompilationResult>,
7869
7870    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7871}
7872
7873impl CreateCompilationResultRequest {
7874    /// Creates a new default instance.
7875    pub fn new() -> Self {
7876        std::default::Default::default()
7877    }
7878
7879    /// Sets the value of [parent][crate::model::CreateCompilationResultRequest::parent].
7880    ///
7881    /// # Example
7882    /// ```ignore,no_run
7883    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7884    /// # let project_id = "project_id";
7885    /// # let location_id = "location_id";
7886    /// # let repository_id = "repository_id";
7887    /// let x = CreateCompilationResultRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
7888    /// ```
7889    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7890        self.parent = v.into();
7891        self
7892    }
7893
7894    /// Sets the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7895    ///
7896    /// # Example
7897    /// ```ignore,no_run
7898    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7899    /// use google_cloud_dataform_v1::model::CompilationResult;
7900    /// let x = CreateCompilationResultRequest::new().set_compilation_result(CompilationResult::default()/* use setters */);
7901    /// ```
7902    pub fn set_compilation_result<T>(mut self, v: T) -> Self
7903    where
7904        T: std::convert::Into<crate::model::CompilationResult>,
7905    {
7906        self.compilation_result = std::option::Option::Some(v.into());
7907        self
7908    }
7909
7910    /// Sets or clears the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7911    ///
7912    /// # Example
7913    /// ```ignore,no_run
7914    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7915    /// use google_cloud_dataform_v1::model::CompilationResult;
7916    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(Some(CompilationResult::default()/* use setters */));
7917    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(None::<CompilationResult>);
7918    /// ```
7919    pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
7920    where
7921        T: std::convert::Into<crate::model::CompilationResult>,
7922    {
7923        self.compilation_result = v.map(|x| x.into());
7924        self
7925    }
7926}
7927
7928impl wkt::message::Message for CreateCompilationResultRequest {
7929    fn typename() -> &'static str {
7930        "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
7931    }
7932}
7933
7934/// Represents an action identifier. If the action writes output, the output
7935/// will be written to the referenced database object.
7936#[derive(Clone, Default, PartialEq)]
7937#[non_exhaustive]
7938pub struct Target {
7939    /// Optional. The action's database (Google Cloud project ID) .
7940    pub database: std::string::String,
7941
7942    /// Optional. The action's schema (BigQuery dataset ID), within `database`.
7943    pub schema: std::string::String,
7944
7945    /// Optional. The action's name, within `database` and `schema`.
7946    pub name: std::string::String,
7947
7948    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7949}
7950
7951impl Target {
7952    /// Creates a new default instance.
7953    pub fn new() -> Self {
7954        std::default::Default::default()
7955    }
7956
7957    /// Sets the value of [database][crate::model::Target::database].
7958    ///
7959    /// # Example
7960    /// ```ignore,no_run
7961    /// # use google_cloud_dataform_v1::model::Target;
7962    /// let x = Target::new().set_database("example");
7963    /// ```
7964    pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7965        self.database = v.into();
7966        self
7967    }
7968
7969    /// Sets the value of [schema][crate::model::Target::schema].
7970    ///
7971    /// # Example
7972    /// ```ignore,no_run
7973    /// # use google_cloud_dataform_v1::model::Target;
7974    /// let x = Target::new().set_schema("example");
7975    /// ```
7976    pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7977        self.schema = v.into();
7978        self
7979    }
7980
7981    /// Sets the value of [name][crate::model::Target::name].
7982    ///
7983    /// # Example
7984    /// ```ignore,no_run
7985    /// # use google_cloud_dataform_v1::model::Target;
7986    /// let x = Target::new().set_name("example");
7987    /// ```
7988    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7989        self.name = v.into();
7990        self
7991    }
7992}
7993
7994impl wkt::message::Message for Target {
7995    fn typename() -> &'static str {
7996        "type.googleapis.com/google.cloud.dataform.v1.Target"
7997    }
7998}
7999
8000/// Describes a relation and its columns.
8001#[derive(Clone, Default, PartialEq)]
8002#[non_exhaustive]
8003pub struct RelationDescriptor {
8004    /// A text description of the relation.
8005    pub description: std::string::String,
8006
8007    /// A list of descriptions of columns within the relation.
8008    pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
8009
8010    /// A set of BigQuery labels that should be applied to the relation.
8011    pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
8012
8013    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8014}
8015
8016impl RelationDescriptor {
8017    /// Creates a new default instance.
8018    pub fn new() -> Self {
8019        std::default::Default::default()
8020    }
8021
8022    /// Sets the value of [description][crate::model::RelationDescriptor::description].
8023    ///
8024    /// # Example
8025    /// ```ignore,no_run
8026    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
8027    /// let x = RelationDescriptor::new().set_description("example");
8028    /// ```
8029    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8030        self.description = v.into();
8031        self
8032    }
8033
8034    /// Sets the value of [columns][crate::model::RelationDescriptor::columns].
8035    ///
8036    /// # Example
8037    /// ```ignore,no_run
8038    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
8039    /// use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8040    /// let x = RelationDescriptor::new()
8041    ///     .set_columns([
8042    ///         ColumnDescriptor::default()/* use setters */,
8043    ///         ColumnDescriptor::default()/* use (different) setters */,
8044    ///     ]);
8045    /// ```
8046    pub fn set_columns<T, V>(mut self, v: T) -> Self
8047    where
8048        T: std::iter::IntoIterator<Item = V>,
8049        V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
8050    {
8051        use std::iter::Iterator;
8052        self.columns = v.into_iter().map(|i| i.into()).collect();
8053        self
8054    }
8055
8056    /// Sets the value of [bigquery_labels][crate::model::RelationDescriptor::bigquery_labels].
8057    ///
8058    /// # Example
8059    /// ```ignore,no_run
8060    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
8061    /// let x = RelationDescriptor::new().set_bigquery_labels([
8062    ///     ("key0", "abc"),
8063    ///     ("key1", "xyz"),
8064    /// ]);
8065    /// ```
8066    pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
8067    where
8068        T: std::iter::IntoIterator<Item = (K, V)>,
8069        K: std::convert::Into<std::string::String>,
8070        V: std::convert::Into<std::string::String>,
8071    {
8072        use std::iter::Iterator;
8073        self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8074        self
8075    }
8076}
8077
8078impl wkt::message::Message for RelationDescriptor {
8079    fn typename() -> &'static str {
8080        "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
8081    }
8082}
8083
8084/// Defines additional types related to [RelationDescriptor].
8085pub mod relation_descriptor {
8086    #[allow(unused_imports)]
8087    use super::*;
8088
8089    /// Describes a column.
8090    #[derive(Clone, Default, PartialEq)]
8091    #[non_exhaustive]
8092    pub struct ColumnDescriptor {
8093        /// The identifier for the column. Each entry in `path` represents one level
8094        /// of nesting.
8095        pub path: std::vec::Vec<std::string::String>,
8096
8097        /// A textual description of the column.
8098        pub description: std::string::String,
8099
8100        /// A list of BigQuery policy tags that will be applied to the column.
8101        pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
8102
8103        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8104    }
8105
8106    impl ColumnDescriptor {
8107        /// Creates a new default instance.
8108        pub fn new() -> Self {
8109            std::default::Default::default()
8110        }
8111
8112        /// Sets the value of [path][crate::model::relation_descriptor::ColumnDescriptor::path].
8113        ///
8114        /// # Example
8115        /// ```ignore,no_run
8116        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8117        /// let x = ColumnDescriptor::new().set_path(["a", "b", "c"]);
8118        /// ```
8119        pub fn set_path<T, V>(mut self, v: T) -> Self
8120        where
8121            T: std::iter::IntoIterator<Item = V>,
8122            V: std::convert::Into<std::string::String>,
8123        {
8124            use std::iter::Iterator;
8125            self.path = v.into_iter().map(|i| i.into()).collect();
8126            self
8127        }
8128
8129        /// Sets the value of [description][crate::model::relation_descriptor::ColumnDescriptor::description].
8130        ///
8131        /// # Example
8132        /// ```ignore,no_run
8133        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8134        /// let x = ColumnDescriptor::new().set_description("example");
8135        /// ```
8136        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8137            self.description = v.into();
8138            self
8139        }
8140
8141        /// Sets the value of [bigquery_policy_tags][crate::model::relation_descriptor::ColumnDescriptor::bigquery_policy_tags].
8142        ///
8143        /// # Example
8144        /// ```ignore,no_run
8145        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8146        /// let x = ColumnDescriptor::new().set_bigquery_policy_tags(["a", "b", "c"]);
8147        /// ```
8148        pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
8149        where
8150            T: std::iter::IntoIterator<Item = V>,
8151            V: std::convert::Into<std::string::String>,
8152        {
8153            use std::iter::Iterator;
8154            self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
8155            self
8156        }
8157    }
8158
8159    impl wkt::message::Message for ColumnDescriptor {
8160        fn typename() -> &'static str {
8161            "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
8162        }
8163    }
8164}
8165
8166/// Represents a single Dataform action in a compilation result.
8167#[derive(Clone, Default, PartialEq)]
8168#[non_exhaustive]
8169pub struct CompilationResultAction {
8170    /// This action's identifier. Unique within the compilation result.
8171    pub target: std::option::Option<crate::model::Target>,
8172
8173    /// The action's identifier if the project had been compiled without any
8174    /// overrides configured. Unique within the compilation result.
8175    pub canonical_target: std::option::Option<crate::model::Target>,
8176
8177    /// The full path including filename in which this action is located, relative
8178    /// to the workspace root.
8179    pub file_path: std::string::String,
8180
8181    /// Output only. All the metadata information that is used internally to serve
8182    /// the resource. For example: timestamps, flags, status fields, etc. The
8183    /// format of this field is a JSON string.
8184    pub internal_metadata: std::option::Option<std::string::String>,
8185
8186    /// The compiled object.
8187    pub compiled_object:
8188        std::option::Option<crate::model::compilation_result_action::CompiledObject>,
8189
8190    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8191}
8192
8193impl CompilationResultAction {
8194    /// Creates a new default instance.
8195    pub fn new() -> Self {
8196        std::default::Default::default()
8197    }
8198
8199    /// Sets the value of [target][crate::model::CompilationResultAction::target].
8200    ///
8201    /// # Example
8202    /// ```ignore,no_run
8203    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8204    /// use google_cloud_dataform_v1::model::Target;
8205    /// let x = CompilationResultAction::new().set_target(Target::default()/* use setters */);
8206    /// ```
8207    pub fn set_target<T>(mut self, v: T) -> Self
8208    where
8209        T: std::convert::Into<crate::model::Target>,
8210    {
8211        self.target = std::option::Option::Some(v.into());
8212        self
8213    }
8214
8215    /// Sets or clears the value of [target][crate::model::CompilationResultAction::target].
8216    ///
8217    /// # Example
8218    /// ```ignore,no_run
8219    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8220    /// use google_cloud_dataform_v1::model::Target;
8221    /// let x = CompilationResultAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
8222    /// let x = CompilationResultAction::new().set_or_clear_target(None::<Target>);
8223    /// ```
8224    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
8225    where
8226        T: std::convert::Into<crate::model::Target>,
8227    {
8228        self.target = v.map(|x| x.into());
8229        self
8230    }
8231
8232    /// Sets the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
8233    ///
8234    /// # Example
8235    /// ```ignore,no_run
8236    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8237    /// use google_cloud_dataform_v1::model::Target;
8238    /// let x = CompilationResultAction::new().set_canonical_target(Target::default()/* use setters */);
8239    /// ```
8240    pub fn set_canonical_target<T>(mut self, v: T) -> Self
8241    where
8242        T: std::convert::Into<crate::model::Target>,
8243    {
8244        self.canonical_target = std::option::Option::Some(v.into());
8245        self
8246    }
8247
8248    /// Sets or clears the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
8249    ///
8250    /// # Example
8251    /// ```ignore,no_run
8252    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8253    /// use google_cloud_dataform_v1::model::Target;
8254    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
8255    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(None::<Target>);
8256    /// ```
8257    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
8258    where
8259        T: std::convert::Into<crate::model::Target>,
8260    {
8261        self.canonical_target = v.map(|x| x.into());
8262        self
8263    }
8264
8265    /// Sets the value of [file_path][crate::model::CompilationResultAction::file_path].
8266    ///
8267    /// # Example
8268    /// ```ignore,no_run
8269    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8270    /// let x = CompilationResultAction::new().set_file_path("example");
8271    /// ```
8272    pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8273        self.file_path = v.into();
8274        self
8275    }
8276
8277    /// Sets the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
8278    ///
8279    /// # Example
8280    /// ```ignore,no_run
8281    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8282    /// let x = CompilationResultAction::new().set_internal_metadata("example");
8283    /// ```
8284    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
8285    where
8286        T: std::convert::Into<std::string::String>,
8287    {
8288        self.internal_metadata = std::option::Option::Some(v.into());
8289        self
8290    }
8291
8292    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
8293    ///
8294    /// # Example
8295    /// ```ignore,no_run
8296    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8297    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(Some("example"));
8298    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(None::<String>);
8299    /// ```
8300    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
8301    where
8302        T: std::convert::Into<std::string::String>,
8303    {
8304        self.internal_metadata = v.map(|x| x.into());
8305        self
8306    }
8307
8308    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object].
8309    ///
8310    /// Note that all the setters affecting `compiled_object` are mutually
8311    /// exclusive.
8312    ///
8313    /// # Example
8314    /// ```ignore,no_run
8315    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8316    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8317    /// let x = CompilationResultAction::new().set_compiled_object(Some(
8318    ///     google_cloud_dataform_v1::model::compilation_result_action::CompiledObject::Relation(Relation::default().into())));
8319    /// ```
8320    pub fn set_compiled_object<
8321        T: std::convert::Into<
8322                std::option::Option<crate::model::compilation_result_action::CompiledObject>,
8323            >,
8324    >(
8325        mut self,
8326        v: T,
8327    ) -> Self {
8328        self.compiled_object = v.into();
8329        self
8330    }
8331
8332    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8333    /// if it holds a `Relation`, `None` if the field is not set or
8334    /// holds a different branch.
8335    pub fn relation(
8336        &self,
8337    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
8338    {
8339        #[allow(unreachable_patterns)]
8340        self.compiled_object.as_ref().and_then(|v| match v {
8341            crate::model::compilation_result_action::CompiledObject::Relation(v) => {
8342                std::option::Option::Some(v)
8343            }
8344            _ => std::option::Option::None,
8345        })
8346    }
8347
8348    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8349    /// to hold a `Relation`.
8350    ///
8351    /// Note that all the setters affecting `compiled_object` are
8352    /// mutually exclusive.
8353    ///
8354    /// # Example
8355    /// ```ignore,no_run
8356    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8357    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8358    /// let x = CompilationResultAction::new().set_relation(Relation::default()/* use setters */);
8359    /// assert!(x.relation().is_some());
8360    /// assert!(x.operations().is_none());
8361    /// assert!(x.assertion().is_none());
8362    /// assert!(x.declaration().is_none());
8363    /// assert!(x.notebook().is_none());
8364    /// assert!(x.data_preparation().is_none());
8365    /// ```
8366    pub fn set_relation<
8367        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
8368    >(
8369        mut self,
8370        v: T,
8371    ) -> Self {
8372        self.compiled_object = std::option::Option::Some(
8373            crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
8374        );
8375        self
8376    }
8377
8378    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8379    /// if it holds a `Operations`, `None` if the field is not set or
8380    /// holds a different branch.
8381    pub fn operations(
8382        &self,
8383    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
8384    {
8385        #[allow(unreachable_patterns)]
8386        self.compiled_object.as_ref().and_then(|v| match v {
8387            crate::model::compilation_result_action::CompiledObject::Operations(v) => {
8388                std::option::Option::Some(v)
8389            }
8390            _ => std::option::Option::None,
8391        })
8392    }
8393
8394    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8395    /// to hold a `Operations`.
8396    ///
8397    /// Note that all the setters affecting `compiled_object` are
8398    /// mutually exclusive.
8399    ///
8400    /// # Example
8401    /// ```ignore,no_run
8402    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8403    /// use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8404    /// let x = CompilationResultAction::new().set_operations(Operations::default()/* use setters */);
8405    /// assert!(x.operations().is_some());
8406    /// assert!(x.relation().is_none());
8407    /// assert!(x.assertion().is_none());
8408    /// assert!(x.declaration().is_none());
8409    /// assert!(x.notebook().is_none());
8410    /// assert!(x.data_preparation().is_none());
8411    /// ```
8412    pub fn set_operations<
8413        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
8414    >(
8415        mut self,
8416        v: T,
8417    ) -> Self {
8418        self.compiled_object = std::option::Option::Some(
8419            crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
8420        );
8421        self
8422    }
8423
8424    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8425    /// if it holds a `Assertion`, `None` if the field is not set or
8426    /// holds a different branch.
8427    pub fn assertion(
8428        &self,
8429    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
8430    {
8431        #[allow(unreachable_patterns)]
8432        self.compiled_object.as_ref().and_then(|v| match v {
8433            crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
8434                std::option::Option::Some(v)
8435            }
8436            _ => std::option::Option::None,
8437        })
8438    }
8439
8440    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8441    /// to hold a `Assertion`.
8442    ///
8443    /// Note that all the setters affecting `compiled_object` are
8444    /// mutually exclusive.
8445    ///
8446    /// # Example
8447    /// ```ignore,no_run
8448    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8449    /// use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8450    /// let x = CompilationResultAction::new().set_assertion(Assertion::default()/* use setters */);
8451    /// assert!(x.assertion().is_some());
8452    /// assert!(x.relation().is_none());
8453    /// assert!(x.operations().is_none());
8454    /// assert!(x.declaration().is_none());
8455    /// assert!(x.notebook().is_none());
8456    /// assert!(x.data_preparation().is_none());
8457    /// ```
8458    pub fn set_assertion<
8459        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
8460    >(
8461        mut self,
8462        v: T,
8463    ) -> Self {
8464        self.compiled_object = std::option::Option::Some(
8465            crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
8466        );
8467        self
8468    }
8469
8470    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8471    /// if it holds a `Declaration`, `None` if the field is not set or
8472    /// holds a different branch.
8473    pub fn declaration(
8474        &self,
8475    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
8476    {
8477        #[allow(unreachable_patterns)]
8478        self.compiled_object.as_ref().and_then(|v| match v {
8479            crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
8480                std::option::Option::Some(v)
8481            }
8482            _ => std::option::Option::None,
8483        })
8484    }
8485
8486    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8487    /// to hold a `Declaration`.
8488    ///
8489    /// Note that all the setters affecting `compiled_object` are
8490    /// mutually exclusive.
8491    ///
8492    /// # Example
8493    /// ```ignore,no_run
8494    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8495    /// use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
8496    /// let x = CompilationResultAction::new().set_declaration(Declaration::default()/* use setters */);
8497    /// assert!(x.declaration().is_some());
8498    /// assert!(x.relation().is_none());
8499    /// assert!(x.operations().is_none());
8500    /// assert!(x.assertion().is_none());
8501    /// assert!(x.notebook().is_none());
8502    /// assert!(x.data_preparation().is_none());
8503    /// ```
8504    pub fn set_declaration<
8505        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
8506    >(
8507        mut self,
8508        v: T,
8509    ) -> Self {
8510        self.compiled_object = std::option::Option::Some(
8511            crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
8512        );
8513        self
8514    }
8515
8516    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8517    /// if it holds a `Notebook`, `None` if the field is not set or
8518    /// holds a different branch.
8519    pub fn notebook(
8520        &self,
8521    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
8522    {
8523        #[allow(unreachable_patterns)]
8524        self.compiled_object.as_ref().and_then(|v| match v {
8525            crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
8526                std::option::Option::Some(v)
8527            }
8528            _ => std::option::Option::None,
8529        })
8530    }
8531
8532    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8533    /// to hold a `Notebook`.
8534    ///
8535    /// Note that all the setters affecting `compiled_object` are
8536    /// mutually exclusive.
8537    ///
8538    /// # Example
8539    /// ```ignore,no_run
8540    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8541    /// use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8542    /// let x = CompilationResultAction::new().set_notebook(Notebook::default()/* use setters */);
8543    /// assert!(x.notebook().is_some());
8544    /// assert!(x.relation().is_none());
8545    /// assert!(x.operations().is_none());
8546    /// assert!(x.assertion().is_none());
8547    /// assert!(x.declaration().is_none());
8548    /// assert!(x.data_preparation().is_none());
8549    /// ```
8550    pub fn set_notebook<
8551        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
8552    >(
8553        mut self,
8554        v: T,
8555    ) -> Self {
8556        self.compiled_object = std::option::Option::Some(
8557            crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
8558        );
8559        self
8560    }
8561
8562    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8563    /// if it holds a `DataPreparation`, `None` if the field is not set or
8564    /// holds a different branch.
8565    pub fn data_preparation(
8566        &self,
8567    ) -> std::option::Option<
8568        &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
8569    > {
8570        #[allow(unreachable_patterns)]
8571        self.compiled_object.as_ref().and_then(|v| match v {
8572            crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
8573                std::option::Option::Some(v)
8574            }
8575            _ => std::option::Option::None,
8576        })
8577    }
8578
8579    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8580    /// to hold a `DataPreparation`.
8581    ///
8582    /// Note that all the setters affecting `compiled_object` are
8583    /// mutually exclusive.
8584    ///
8585    /// # Example
8586    /// ```ignore,no_run
8587    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8588    /// use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
8589    /// let x = CompilationResultAction::new().set_data_preparation(DataPreparation::default()/* use setters */);
8590    /// assert!(x.data_preparation().is_some());
8591    /// assert!(x.relation().is_none());
8592    /// assert!(x.operations().is_none());
8593    /// assert!(x.assertion().is_none());
8594    /// assert!(x.declaration().is_none());
8595    /// assert!(x.notebook().is_none());
8596    /// ```
8597    pub fn set_data_preparation<
8598        T: std::convert::Into<
8599                std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
8600            >,
8601    >(
8602        mut self,
8603        v: T,
8604    ) -> Self {
8605        self.compiled_object = std::option::Option::Some(
8606            crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
8607        );
8608        self
8609    }
8610}
8611
8612impl wkt::message::Message for CompilationResultAction {
8613    fn typename() -> &'static str {
8614        "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
8615    }
8616}
8617
8618/// Defines additional types related to [CompilationResultAction].
8619pub mod compilation_result_action {
8620    #[allow(unused_imports)]
8621    use super::*;
8622
8623    /// Represents a database relation.
8624    #[derive(Clone, Default, PartialEq)]
8625    #[non_exhaustive]
8626    pub struct Relation {
8627        /// A list of actions that this action depends on.
8628        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8629
8630        /// Whether this action is disabled (i.e. should not be run).
8631        pub disabled: bool,
8632
8633        /// Arbitrary, user-defined tags on this action.
8634        pub tags: std::vec::Vec<std::string::String>,
8635
8636        /// Descriptor for the relation and its columns.
8637        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8638
8639        /// The type of this relation.
8640        pub relation_type: crate::model::compilation_result_action::relation::RelationType,
8641
8642        /// The SELECT query which returns rows which this relation should contain.
8643        pub select_query: std::string::String,
8644
8645        /// SQL statements to be executed before creating the relation.
8646        pub pre_operations: std::vec::Vec<std::string::String>,
8647
8648        /// SQL statements to be executed after creating the relation.
8649        pub post_operations: std::vec::Vec<std::string::String>,
8650
8651        /// Configures `INCREMENTAL_TABLE` settings for this relation. Only set if
8652        /// `relation_type` is `INCREMENTAL_TABLE`.
8653        pub incremental_table_config: std::option::Option<
8654            crate::model::compilation_result_action::relation::IncrementalTableConfig,
8655        >,
8656
8657        /// The SQL expression used to partition the relation.
8658        pub partition_expression: std::string::String,
8659
8660        /// A list of columns or SQL expressions used to cluster the table.
8661        pub cluster_expressions: std::vec::Vec<std::string::String>,
8662
8663        /// Sets the partition expiration in days.
8664        pub partition_expiration_days: i32,
8665
8666        /// Specifies whether queries on this table must include a predicate filter
8667        /// that filters on the partitioning column.
8668        pub require_partition_filter: bool,
8669
8670        /// Additional options that will be provided as key/value pairs into the
8671        /// options clause of a create table/view statement. See
8672        /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language>
8673        /// for more information on which options are supported.
8674        pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
8675
8676        /// Optional. The connection specifying the credentials to be used to read
8677        /// and write to external storage, such as Cloud Storage. The connection can
8678        /// have the form `{project}.{location}.{connection_id}` or
8679        /// `projects/{project}/locations/{location}/connections/{connection_id}`,
8680        /// or be set to DEFAULT.
8681        pub connection: std::string::String,
8682
8683        /// Optional. The table format for the BigQuery table.
8684        pub table_format: crate::model::compilation_result_action::relation::TableFormat,
8685
8686        /// Optional. The file format for the BigQuery table.
8687        pub file_format: crate::model::compilation_result_action::relation::FileFormat,
8688
8689        /// Optional. The fully qualified location prefix of the external folder
8690        /// where table data is stored. The URI should be in the format
8691        /// `gs://bucket/path_to_table/`.
8692        pub storage_uri: std::string::String,
8693
8694        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8695    }
8696
8697    impl Relation {
8698        /// Creates a new default instance.
8699        pub fn new() -> Self {
8700            std::default::Default::default()
8701        }
8702
8703        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Relation::dependency_targets].
8704        ///
8705        /// # Example
8706        /// ```ignore,no_run
8707        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8708        /// use google_cloud_dataform_v1::model::Target;
8709        /// let x = Relation::new()
8710        ///     .set_dependency_targets([
8711        ///         Target::default()/* use setters */,
8712        ///         Target::default()/* use (different) setters */,
8713        ///     ]);
8714        /// ```
8715        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8716        where
8717            T: std::iter::IntoIterator<Item = V>,
8718            V: std::convert::Into<crate::model::Target>,
8719        {
8720            use std::iter::Iterator;
8721            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8722            self
8723        }
8724
8725        /// Sets the value of [disabled][crate::model::compilation_result_action::Relation::disabled].
8726        ///
8727        /// # Example
8728        /// ```ignore,no_run
8729        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8730        /// let x = Relation::new().set_disabled(true);
8731        /// ```
8732        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8733            self.disabled = v.into();
8734            self
8735        }
8736
8737        /// Sets the value of [tags][crate::model::compilation_result_action::Relation::tags].
8738        ///
8739        /// # Example
8740        /// ```ignore,no_run
8741        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8742        /// let x = Relation::new().set_tags(["a", "b", "c"]);
8743        /// ```
8744        pub fn set_tags<T, V>(mut self, v: T) -> Self
8745        where
8746            T: std::iter::IntoIterator<Item = V>,
8747            V: std::convert::Into<std::string::String>,
8748        {
8749            use std::iter::Iterator;
8750            self.tags = v.into_iter().map(|i| i.into()).collect();
8751            self
8752        }
8753
8754        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8755        ///
8756        /// # Example
8757        /// ```ignore,no_run
8758        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8759        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8760        /// let x = Relation::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8761        /// ```
8762        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8763        where
8764            T: std::convert::Into<crate::model::RelationDescriptor>,
8765        {
8766            self.relation_descriptor = std::option::Option::Some(v.into());
8767            self
8768        }
8769
8770        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8771        ///
8772        /// # Example
8773        /// ```ignore,no_run
8774        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8775        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8776        /// let x = Relation::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8777        /// let x = Relation::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8778        /// ```
8779        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8780        where
8781            T: std::convert::Into<crate::model::RelationDescriptor>,
8782        {
8783            self.relation_descriptor = v.map(|x| x.into());
8784            self
8785        }
8786
8787        /// Sets the value of [relation_type][crate::model::compilation_result_action::Relation::relation_type].
8788        ///
8789        /// # Example
8790        /// ```ignore,no_run
8791        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8792        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::RelationType;
8793        /// let x0 = Relation::new().set_relation_type(RelationType::Table);
8794        /// let x1 = Relation::new().set_relation_type(RelationType::View);
8795        /// let x2 = Relation::new().set_relation_type(RelationType::IncrementalTable);
8796        /// ```
8797        pub fn set_relation_type<
8798            T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
8799        >(
8800            mut self,
8801            v: T,
8802        ) -> Self {
8803            self.relation_type = v.into();
8804            self
8805        }
8806
8807        /// Sets the value of [select_query][crate::model::compilation_result_action::Relation::select_query].
8808        ///
8809        /// # Example
8810        /// ```ignore,no_run
8811        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8812        /// let x = Relation::new().set_select_query("example");
8813        /// ```
8814        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
8815            mut self,
8816            v: T,
8817        ) -> Self {
8818            self.select_query = v.into();
8819            self
8820        }
8821
8822        /// Sets the value of [pre_operations][crate::model::compilation_result_action::Relation::pre_operations].
8823        ///
8824        /// # Example
8825        /// ```ignore,no_run
8826        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8827        /// let x = Relation::new().set_pre_operations(["a", "b", "c"]);
8828        /// ```
8829        pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
8830        where
8831            T: std::iter::IntoIterator<Item = V>,
8832            V: std::convert::Into<std::string::String>,
8833        {
8834            use std::iter::Iterator;
8835            self.pre_operations = v.into_iter().map(|i| i.into()).collect();
8836            self
8837        }
8838
8839        /// Sets the value of [post_operations][crate::model::compilation_result_action::Relation::post_operations].
8840        ///
8841        /// # Example
8842        /// ```ignore,no_run
8843        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8844        /// let x = Relation::new().set_post_operations(["a", "b", "c"]);
8845        /// ```
8846        pub fn set_post_operations<T, V>(mut self, v: T) -> Self
8847        where
8848            T: std::iter::IntoIterator<Item = V>,
8849            V: std::convert::Into<std::string::String>,
8850        {
8851            use std::iter::Iterator;
8852            self.post_operations = v.into_iter().map(|i| i.into()).collect();
8853            self
8854        }
8855
8856        /// Sets the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8857        ///
8858        /// # Example
8859        /// ```ignore,no_run
8860        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8861        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8862        /// let x = Relation::new().set_incremental_table_config(IncrementalTableConfig::default()/* use setters */);
8863        /// ```
8864        pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
8865        where
8866            T: std::convert::Into<
8867                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8868                >,
8869        {
8870            self.incremental_table_config = std::option::Option::Some(v.into());
8871            self
8872        }
8873
8874        /// Sets or clears the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8875        ///
8876        /// # Example
8877        /// ```ignore,no_run
8878        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8879        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8880        /// let x = Relation::new().set_or_clear_incremental_table_config(Some(IncrementalTableConfig::default()/* use setters */));
8881        /// let x = Relation::new().set_or_clear_incremental_table_config(None::<IncrementalTableConfig>);
8882        /// ```
8883        pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
8884        where
8885            T: std::convert::Into<
8886                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8887                >,
8888        {
8889            self.incremental_table_config = v.map(|x| x.into());
8890            self
8891        }
8892
8893        /// Sets the value of [partition_expression][crate::model::compilation_result_action::Relation::partition_expression].
8894        ///
8895        /// # Example
8896        /// ```ignore,no_run
8897        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8898        /// let x = Relation::new().set_partition_expression("example");
8899        /// ```
8900        pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
8901            mut self,
8902            v: T,
8903        ) -> Self {
8904            self.partition_expression = v.into();
8905            self
8906        }
8907
8908        /// Sets the value of [cluster_expressions][crate::model::compilation_result_action::Relation::cluster_expressions].
8909        ///
8910        /// # Example
8911        /// ```ignore,no_run
8912        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8913        /// let x = Relation::new().set_cluster_expressions(["a", "b", "c"]);
8914        /// ```
8915        pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
8916        where
8917            T: std::iter::IntoIterator<Item = V>,
8918            V: std::convert::Into<std::string::String>,
8919        {
8920            use std::iter::Iterator;
8921            self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
8922            self
8923        }
8924
8925        /// Sets the value of [partition_expiration_days][crate::model::compilation_result_action::Relation::partition_expiration_days].
8926        ///
8927        /// # Example
8928        /// ```ignore,no_run
8929        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8930        /// let x = Relation::new().set_partition_expiration_days(42);
8931        /// ```
8932        pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8933            self.partition_expiration_days = v.into();
8934            self
8935        }
8936
8937        /// Sets the value of [require_partition_filter][crate::model::compilation_result_action::Relation::require_partition_filter].
8938        ///
8939        /// # Example
8940        /// ```ignore,no_run
8941        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8942        /// let x = Relation::new().set_require_partition_filter(true);
8943        /// ```
8944        pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8945            self.require_partition_filter = v.into();
8946            self
8947        }
8948
8949        /// Sets the value of [additional_options][crate::model::compilation_result_action::Relation::additional_options].
8950        ///
8951        /// # Example
8952        /// ```ignore,no_run
8953        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8954        /// let x = Relation::new().set_additional_options([
8955        ///     ("key0", "abc"),
8956        ///     ("key1", "xyz"),
8957        /// ]);
8958        /// ```
8959        pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
8960        where
8961            T: std::iter::IntoIterator<Item = (K, V)>,
8962            K: std::convert::Into<std::string::String>,
8963            V: std::convert::Into<std::string::String>,
8964        {
8965            use std::iter::Iterator;
8966            self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8967            self
8968        }
8969
8970        /// Sets the value of [connection][crate::model::compilation_result_action::Relation::connection].
8971        ///
8972        /// # Example
8973        /// ```ignore,no_run
8974        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8975        /// let x = Relation::new().set_connection("example");
8976        /// ```
8977        pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8978            self.connection = v.into();
8979            self
8980        }
8981
8982        /// Sets the value of [table_format][crate::model::compilation_result_action::Relation::table_format].
8983        ///
8984        /// # Example
8985        /// ```ignore,no_run
8986        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8987        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::TableFormat;
8988        /// let x0 = Relation::new().set_table_format(TableFormat::Iceberg);
8989        /// ```
8990        pub fn set_table_format<
8991            T: std::convert::Into<crate::model::compilation_result_action::relation::TableFormat>,
8992        >(
8993            mut self,
8994            v: T,
8995        ) -> Self {
8996            self.table_format = v.into();
8997            self
8998        }
8999
9000        /// Sets the value of [file_format][crate::model::compilation_result_action::Relation::file_format].
9001        ///
9002        /// # Example
9003        /// ```ignore,no_run
9004        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9005        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::FileFormat;
9006        /// let x0 = Relation::new().set_file_format(FileFormat::Parquet);
9007        /// ```
9008        pub fn set_file_format<
9009            T: std::convert::Into<crate::model::compilation_result_action::relation::FileFormat>,
9010        >(
9011            mut self,
9012            v: T,
9013        ) -> Self {
9014            self.file_format = v.into();
9015            self
9016        }
9017
9018        /// Sets the value of [storage_uri][crate::model::compilation_result_action::Relation::storage_uri].
9019        ///
9020        /// # Example
9021        /// ```ignore,no_run
9022        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9023        /// let x = Relation::new().set_storage_uri("example");
9024        /// ```
9025        pub fn set_storage_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9026            self.storage_uri = v.into();
9027            self
9028        }
9029    }
9030
9031    impl wkt::message::Message for Relation {
9032        fn typename() -> &'static str {
9033            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
9034        }
9035    }
9036
9037    /// Defines additional types related to [Relation].
9038    pub mod relation {
9039        #[allow(unused_imports)]
9040        use super::*;
9041
9042        /// Contains settings for relations of type `INCREMENTAL_TABLE`.
9043        #[derive(Clone, Default, PartialEq)]
9044        #[non_exhaustive]
9045        pub struct IncrementalTableConfig {
9046            /// The SELECT query which returns rows which should be inserted into the
9047            /// relation if it already exists and is not being refreshed.
9048            pub incremental_select_query: std::string::String,
9049
9050            /// Whether this table should be protected from being refreshed.
9051            pub refresh_disabled: bool,
9052
9053            /// A set of columns or SQL expressions used to define row uniqueness.
9054            /// If any duplicates are discovered (as defined by `unique_key_parts`),
9055            /// only the newly selected rows (as defined by `incremental_select_query`)
9056            /// will be included in the relation.
9057            pub unique_key_parts: std::vec::Vec<std::string::String>,
9058
9059            /// A SQL expression conditional used to limit the set of existing rows
9060            /// considered for a merge operation (see `unique_key_parts` for more
9061            /// information).
9062            pub update_partition_filter: std::string::String,
9063
9064            /// SQL statements to be executed before inserting new rows into the
9065            /// relation.
9066            pub incremental_pre_operations: std::vec::Vec<std::string::String>,
9067
9068            /// SQL statements to be executed after inserting new rows into the
9069            /// relation.
9070            pub incremental_post_operations: std::vec::Vec<std::string::String>,
9071
9072            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9073        }
9074
9075        impl IncrementalTableConfig {
9076            /// Creates a new default instance.
9077            pub fn new() -> Self {
9078                std::default::Default::default()
9079            }
9080
9081            /// Sets the value of [incremental_select_query][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_select_query].
9082            ///
9083            /// # Example
9084            /// ```ignore,no_run
9085            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9086            /// let x = IncrementalTableConfig::new().set_incremental_select_query("example");
9087            /// ```
9088            pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
9089                mut self,
9090                v: T,
9091            ) -> Self {
9092                self.incremental_select_query = v.into();
9093                self
9094            }
9095
9096            /// Sets the value of [refresh_disabled][crate::model::compilation_result_action::relation::IncrementalTableConfig::refresh_disabled].
9097            ///
9098            /// # Example
9099            /// ```ignore,no_run
9100            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9101            /// let x = IncrementalTableConfig::new().set_refresh_disabled(true);
9102            /// ```
9103            pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9104                self.refresh_disabled = v.into();
9105                self
9106            }
9107
9108            /// Sets the value of [unique_key_parts][crate::model::compilation_result_action::relation::IncrementalTableConfig::unique_key_parts].
9109            ///
9110            /// # Example
9111            /// ```ignore,no_run
9112            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9113            /// let x = IncrementalTableConfig::new().set_unique_key_parts(["a", "b", "c"]);
9114            /// ```
9115            pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
9116            where
9117                T: std::iter::IntoIterator<Item = V>,
9118                V: std::convert::Into<std::string::String>,
9119            {
9120                use std::iter::Iterator;
9121                self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
9122                self
9123            }
9124
9125            /// Sets the value of [update_partition_filter][crate::model::compilation_result_action::relation::IncrementalTableConfig::update_partition_filter].
9126            ///
9127            /// # Example
9128            /// ```ignore,no_run
9129            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9130            /// let x = IncrementalTableConfig::new().set_update_partition_filter("example");
9131            /// ```
9132            pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
9133                mut self,
9134                v: T,
9135            ) -> Self {
9136                self.update_partition_filter = v.into();
9137                self
9138            }
9139
9140            /// Sets the value of [incremental_pre_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_pre_operations].
9141            ///
9142            /// # Example
9143            /// ```ignore,no_run
9144            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9145            /// let x = IncrementalTableConfig::new().set_incremental_pre_operations(["a", "b", "c"]);
9146            /// ```
9147            pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
9148            where
9149                T: std::iter::IntoIterator<Item = V>,
9150                V: std::convert::Into<std::string::String>,
9151            {
9152                use std::iter::Iterator;
9153                self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
9154                self
9155            }
9156
9157            /// Sets the value of [incremental_post_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_post_operations].
9158            ///
9159            /// # Example
9160            /// ```ignore,no_run
9161            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9162            /// let x = IncrementalTableConfig::new().set_incremental_post_operations(["a", "b", "c"]);
9163            /// ```
9164            pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
9165            where
9166                T: std::iter::IntoIterator<Item = V>,
9167                V: std::convert::Into<std::string::String>,
9168            {
9169                use std::iter::Iterator;
9170                self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
9171                self
9172            }
9173        }
9174
9175        impl wkt::message::Message for IncrementalTableConfig {
9176            fn typename() -> &'static str {
9177                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
9178            }
9179        }
9180
9181        /// Indicates the type of this relation.
9182        ///
9183        /// # Working with unknown values
9184        ///
9185        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9186        /// additional enum variants at any time. Adding new variants is not considered
9187        /// a breaking change. Applications should write their code in anticipation of:
9188        ///
9189        /// - New values appearing in future releases of the client library, **and**
9190        /// - New values received dynamically, without application changes.
9191        ///
9192        /// Please consult the [Working with enums] section in the user guide for some
9193        /// guidelines.
9194        ///
9195        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9196        #[derive(Clone, Debug, PartialEq)]
9197        #[non_exhaustive]
9198        pub enum RelationType {
9199            /// Default value. This value is unused.
9200            Unspecified,
9201            /// The relation is a table.
9202            Table,
9203            /// The relation is a view.
9204            View,
9205            /// The relation is an incrementalized table.
9206            IncrementalTable,
9207            /// The relation is a materialized view.
9208            MaterializedView,
9209            /// If set, the enum was initialized with an unknown value.
9210            ///
9211            /// Applications can examine the value using [RelationType::value] or
9212            /// [RelationType::name].
9213            UnknownValue(relation_type::UnknownValue),
9214        }
9215
9216        #[doc(hidden)]
9217        pub mod relation_type {
9218            #[allow(unused_imports)]
9219            use super::*;
9220            #[derive(Clone, Debug, PartialEq)]
9221            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9222        }
9223
9224        impl RelationType {
9225            /// Gets the enum value.
9226            ///
9227            /// Returns `None` if the enum contains an unknown value deserialized from
9228            /// the string representation of enums.
9229            pub fn value(&self) -> std::option::Option<i32> {
9230                match self {
9231                    Self::Unspecified => std::option::Option::Some(0),
9232                    Self::Table => std::option::Option::Some(1),
9233                    Self::View => std::option::Option::Some(2),
9234                    Self::IncrementalTable => std::option::Option::Some(3),
9235                    Self::MaterializedView => std::option::Option::Some(4),
9236                    Self::UnknownValue(u) => u.0.value(),
9237                }
9238            }
9239
9240            /// Gets the enum value as a string.
9241            ///
9242            /// Returns `None` if the enum contains an unknown value deserialized from
9243            /// the integer representation of enums.
9244            pub fn name(&self) -> std::option::Option<&str> {
9245                match self {
9246                    Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
9247                    Self::Table => std::option::Option::Some("TABLE"),
9248                    Self::View => std::option::Option::Some("VIEW"),
9249                    Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
9250                    Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
9251                    Self::UnknownValue(u) => u.0.name(),
9252                }
9253            }
9254        }
9255
9256        impl std::default::Default for RelationType {
9257            fn default() -> Self {
9258                use std::convert::From;
9259                Self::from(0)
9260            }
9261        }
9262
9263        impl std::fmt::Display for RelationType {
9264            fn fmt(
9265                &self,
9266                f: &mut std::fmt::Formatter<'_>,
9267            ) -> std::result::Result<(), std::fmt::Error> {
9268                wkt::internal::display_enum(f, self.name(), self.value())
9269            }
9270        }
9271
9272        impl std::convert::From<i32> for RelationType {
9273            fn from(value: i32) -> Self {
9274                match value {
9275                    0 => Self::Unspecified,
9276                    1 => Self::Table,
9277                    2 => Self::View,
9278                    3 => Self::IncrementalTable,
9279                    4 => Self::MaterializedView,
9280                    _ => Self::UnknownValue(relation_type::UnknownValue(
9281                        wkt::internal::UnknownEnumValue::Integer(value),
9282                    )),
9283                }
9284            }
9285        }
9286
9287        impl std::convert::From<&str> for RelationType {
9288            fn from(value: &str) -> Self {
9289                use std::string::ToString;
9290                match value {
9291                    "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
9292                    "TABLE" => Self::Table,
9293                    "VIEW" => Self::View,
9294                    "INCREMENTAL_TABLE" => Self::IncrementalTable,
9295                    "MATERIALIZED_VIEW" => Self::MaterializedView,
9296                    _ => Self::UnknownValue(relation_type::UnknownValue(
9297                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9298                    )),
9299                }
9300            }
9301        }
9302
9303        impl serde::ser::Serialize for RelationType {
9304            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9305            where
9306                S: serde::Serializer,
9307            {
9308                match self {
9309                    Self::Unspecified => serializer.serialize_i32(0),
9310                    Self::Table => serializer.serialize_i32(1),
9311                    Self::View => serializer.serialize_i32(2),
9312                    Self::IncrementalTable => serializer.serialize_i32(3),
9313                    Self::MaterializedView => serializer.serialize_i32(4),
9314                    Self::UnknownValue(u) => u.0.serialize(serializer),
9315                }
9316            }
9317        }
9318
9319        impl<'de> serde::de::Deserialize<'de> for RelationType {
9320            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9321            where
9322                D: serde::Deserializer<'de>,
9323            {
9324                deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
9325                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
9326                ))
9327            }
9328        }
9329
9330        /// Supported table formats for BigQuery tables.
9331        ///
9332        /// # Working with unknown values
9333        ///
9334        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9335        /// additional enum variants at any time. Adding new variants is not considered
9336        /// a breaking change. Applications should write their code in anticipation of:
9337        ///
9338        /// - New values appearing in future releases of the client library, **and**
9339        /// - New values received dynamically, without application changes.
9340        ///
9341        /// Please consult the [Working with enums] section in the user guide for some
9342        /// guidelines.
9343        ///
9344        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9345        #[derive(Clone, Debug, PartialEq)]
9346        #[non_exhaustive]
9347        pub enum TableFormat {
9348            /// Default value.
9349            Unspecified,
9350            /// Apache Iceberg format.
9351            Iceberg,
9352            /// If set, the enum was initialized with an unknown value.
9353            ///
9354            /// Applications can examine the value using [TableFormat::value] or
9355            /// [TableFormat::name].
9356            UnknownValue(table_format::UnknownValue),
9357        }
9358
9359        #[doc(hidden)]
9360        pub mod table_format {
9361            #[allow(unused_imports)]
9362            use super::*;
9363            #[derive(Clone, Debug, PartialEq)]
9364            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9365        }
9366
9367        impl TableFormat {
9368            /// Gets the enum value.
9369            ///
9370            /// Returns `None` if the enum contains an unknown value deserialized from
9371            /// the string representation of enums.
9372            pub fn value(&self) -> std::option::Option<i32> {
9373                match self {
9374                    Self::Unspecified => std::option::Option::Some(0),
9375                    Self::Iceberg => std::option::Option::Some(1),
9376                    Self::UnknownValue(u) => u.0.value(),
9377                }
9378            }
9379
9380            /// Gets the enum value as a string.
9381            ///
9382            /// Returns `None` if the enum contains an unknown value deserialized from
9383            /// the integer representation of enums.
9384            pub fn name(&self) -> std::option::Option<&str> {
9385                match self {
9386                    Self::Unspecified => std::option::Option::Some("TABLE_FORMAT_UNSPECIFIED"),
9387                    Self::Iceberg => std::option::Option::Some("ICEBERG"),
9388                    Self::UnknownValue(u) => u.0.name(),
9389                }
9390            }
9391        }
9392
9393        impl std::default::Default for TableFormat {
9394            fn default() -> Self {
9395                use std::convert::From;
9396                Self::from(0)
9397            }
9398        }
9399
9400        impl std::fmt::Display for TableFormat {
9401            fn fmt(
9402                &self,
9403                f: &mut std::fmt::Formatter<'_>,
9404            ) -> std::result::Result<(), std::fmt::Error> {
9405                wkt::internal::display_enum(f, self.name(), self.value())
9406            }
9407        }
9408
9409        impl std::convert::From<i32> for TableFormat {
9410            fn from(value: i32) -> Self {
9411                match value {
9412                    0 => Self::Unspecified,
9413                    1 => Self::Iceberg,
9414                    _ => Self::UnknownValue(table_format::UnknownValue(
9415                        wkt::internal::UnknownEnumValue::Integer(value),
9416                    )),
9417                }
9418            }
9419        }
9420
9421        impl std::convert::From<&str> for TableFormat {
9422            fn from(value: &str) -> Self {
9423                use std::string::ToString;
9424                match value {
9425                    "TABLE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9426                    "ICEBERG" => Self::Iceberg,
9427                    _ => Self::UnknownValue(table_format::UnknownValue(
9428                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9429                    )),
9430                }
9431            }
9432        }
9433
9434        impl serde::ser::Serialize for TableFormat {
9435            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9436            where
9437                S: serde::Serializer,
9438            {
9439                match self {
9440                    Self::Unspecified => serializer.serialize_i32(0),
9441                    Self::Iceberg => serializer.serialize_i32(1),
9442                    Self::UnknownValue(u) => u.0.serialize(serializer),
9443                }
9444            }
9445        }
9446
9447        impl<'de> serde::de::Deserialize<'de> for TableFormat {
9448            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9449            where
9450                D: serde::Deserializer<'de>,
9451            {
9452                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableFormat>::new(
9453                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.TableFormat",
9454                ))
9455            }
9456        }
9457
9458        /// Supported file formats for BigQuery tables.
9459        ///
9460        /// # Working with unknown values
9461        ///
9462        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9463        /// additional enum variants at any time. Adding new variants is not considered
9464        /// a breaking change. Applications should write their code in anticipation of:
9465        ///
9466        /// - New values appearing in future releases of the client library, **and**
9467        /// - New values received dynamically, without application changes.
9468        ///
9469        /// Please consult the [Working with enums] section in the user guide for some
9470        /// guidelines.
9471        ///
9472        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9473        #[derive(Clone, Debug, PartialEq)]
9474        #[non_exhaustive]
9475        pub enum FileFormat {
9476            /// Default value.
9477            Unspecified,
9478            /// Apache Parquet format.
9479            Parquet,
9480            /// If set, the enum was initialized with an unknown value.
9481            ///
9482            /// Applications can examine the value using [FileFormat::value] or
9483            /// [FileFormat::name].
9484            UnknownValue(file_format::UnknownValue),
9485        }
9486
9487        #[doc(hidden)]
9488        pub mod file_format {
9489            #[allow(unused_imports)]
9490            use super::*;
9491            #[derive(Clone, Debug, PartialEq)]
9492            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9493        }
9494
9495        impl FileFormat {
9496            /// Gets the enum value.
9497            ///
9498            /// Returns `None` if the enum contains an unknown value deserialized from
9499            /// the string representation of enums.
9500            pub fn value(&self) -> std::option::Option<i32> {
9501                match self {
9502                    Self::Unspecified => std::option::Option::Some(0),
9503                    Self::Parquet => std::option::Option::Some(1),
9504                    Self::UnknownValue(u) => u.0.value(),
9505                }
9506            }
9507
9508            /// Gets the enum value as a string.
9509            ///
9510            /// Returns `None` if the enum contains an unknown value deserialized from
9511            /// the integer representation of enums.
9512            pub fn name(&self) -> std::option::Option<&str> {
9513                match self {
9514                    Self::Unspecified => std::option::Option::Some("FILE_FORMAT_UNSPECIFIED"),
9515                    Self::Parquet => std::option::Option::Some("PARQUET"),
9516                    Self::UnknownValue(u) => u.0.name(),
9517                }
9518            }
9519        }
9520
9521        impl std::default::Default for FileFormat {
9522            fn default() -> Self {
9523                use std::convert::From;
9524                Self::from(0)
9525            }
9526        }
9527
9528        impl std::fmt::Display for FileFormat {
9529            fn fmt(
9530                &self,
9531                f: &mut std::fmt::Formatter<'_>,
9532            ) -> std::result::Result<(), std::fmt::Error> {
9533                wkt::internal::display_enum(f, self.name(), self.value())
9534            }
9535        }
9536
9537        impl std::convert::From<i32> for FileFormat {
9538            fn from(value: i32) -> Self {
9539                match value {
9540                    0 => Self::Unspecified,
9541                    1 => Self::Parquet,
9542                    _ => Self::UnknownValue(file_format::UnknownValue(
9543                        wkt::internal::UnknownEnumValue::Integer(value),
9544                    )),
9545                }
9546            }
9547        }
9548
9549        impl std::convert::From<&str> for FileFormat {
9550            fn from(value: &str) -> Self {
9551                use std::string::ToString;
9552                match value {
9553                    "FILE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9554                    "PARQUET" => Self::Parquet,
9555                    _ => Self::UnknownValue(file_format::UnknownValue(
9556                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9557                    )),
9558                }
9559            }
9560        }
9561
9562        impl serde::ser::Serialize for FileFormat {
9563            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9564            where
9565                S: serde::Serializer,
9566            {
9567                match self {
9568                    Self::Unspecified => serializer.serialize_i32(0),
9569                    Self::Parquet => serializer.serialize_i32(1),
9570                    Self::UnknownValue(u) => u.0.serialize(serializer),
9571                }
9572            }
9573        }
9574
9575        impl<'de> serde::de::Deserialize<'de> for FileFormat {
9576            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9577            where
9578                D: serde::Deserializer<'de>,
9579            {
9580                deserializer.deserialize_any(wkt::internal::EnumVisitor::<FileFormat>::new(
9581                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.FileFormat",
9582                ))
9583            }
9584        }
9585    }
9586
9587    /// Represents a list of arbitrary database operations.
9588    #[derive(Clone, Default, PartialEq)]
9589    #[non_exhaustive]
9590    pub struct Operations {
9591        /// A list of actions that this action depends on.
9592        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9593
9594        /// Whether this action is disabled (i.e. should not be run).
9595        pub disabled: bool,
9596
9597        /// Arbitrary, user-defined tags on this action.
9598        pub tags: std::vec::Vec<std::string::String>,
9599
9600        /// Descriptor for any output relation and its columns. Only set if
9601        /// `has_output` is true.
9602        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9603
9604        /// A list of arbitrary SQL statements that will be executed without
9605        /// alteration.
9606        pub queries: std::vec::Vec<std::string::String>,
9607
9608        /// Whether these operations produce an output relation.
9609        pub has_output: bool,
9610
9611        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9612    }
9613
9614    impl Operations {
9615        /// Creates a new default instance.
9616        pub fn new() -> Self {
9617            std::default::Default::default()
9618        }
9619
9620        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Operations::dependency_targets].
9621        ///
9622        /// # Example
9623        /// ```ignore,no_run
9624        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9625        /// use google_cloud_dataform_v1::model::Target;
9626        /// let x = Operations::new()
9627        ///     .set_dependency_targets([
9628        ///         Target::default()/* use setters */,
9629        ///         Target::default()/* use (different) setters */,
9630        ///     ]);
9631        /// ```
9632        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9633        where
9634            T: std::iter::IntoIterator<Item = V>,
9635            V: std::convert::Into<crate::model::Target>,
9636        {
9637            use std::iter::Iterator;
9638            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9639            self
9640        }
9641
9642        /// Sets the value of [disabled][crate::model::compilation_result_action::Operations::disabled].
9643        ///
9644        /// # Example
9645        /// ```ignore,no_run
9646        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9647        /// let x = Operations::new().set_disabled(true);
9648        /// ```
9649        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9650            self.disabled = v.into();
9651            self
9652        }
9653
9654        /// Sets the value of [tags][crate::model::compilation_result_action::Operations::tags].
9655        ///
9656        /// # Example
9657        /// ```ignore,no_run
9658        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9659        /// let x = Operations::new().set_tags(["a", "b", "c"]);
9660        /// ```
9661        pub fn set_tags<T, V>(mut self, v: T) -> Self
9662        where
9663            T: std::iter::IntoIterator<Item = V>,
9664            V: std::convert::Into<std::string::String>,
9665        {
9666            use std::iter::Iterator;
9667            self.tags = v.into_iter().map(|i| i.into()).collect();
9668            self
9669        }
9670
9671        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
9672        ///
9673        /// # Example
9674        /// ```ignore,no_run
9675        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9676        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9677        /// let x = Operations::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9678        /// ```
9679        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9680        where
9681            T: std::convert::Into<crate::model::RelationDescriptor>,
9682        {
9683            self.relation_descriptor = std::option::Option::Some(v.into());
9684            self
9685        }
9686
9687        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
9688        ///
9689        /// # Example
9690        /// ```ignore,no_run
9691        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9692        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9693        /// let x = Operations::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9694        /// let x = Operations::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9695        /// ```
9696        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9697        where
9698            T: std::convert::Into<crate::model::RelationDescriptor>,
9699        {
9700            self.relation_descriptor = v.map(|x| x.into());
9701            self
9702        }
9703
9704        /// Sets the value of [queries][crate::model::compilation_result_action::Operations::queries].
9705        ///
9706        /// # Example
9707        /// ```ignore,no_run
9708        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9709        /// let x = Operations::new().set_queries(["a", "b", "c"]);
9710        /// ```
9711        pub fn set_queries<T, V>(mut self, v: T) -> Self
9712        where
9713            T: std::iter::IntoIterator<Item = V>,
9714            V: std::convert::Into<std::string::String>,
9715        {
9716            use std::iter::Iterator;
9717            self.queries = v.into_iter().map(|i| i.into()).collect();
9718            self
9719        }
9720
9721        /// Sets the value of [has_output][crate::model::compilation_result_action::Operations::has_output].
9722        ///
9723        /// # Example
9724        /// ```ignore,no_run
9725        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9726        /// let x = Operations::new().set_has_output(true);
9727        /// ```
9728        pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9729            self.has_output = v.into();
9730            self
9731        }
9732    }
9733
9734    impl wkt::message::Message for Operations {
9735        fn typename() -> &'static str {
9736            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
9737        }
9738    }
9739
9740    /// Represents an assertion upon a SQL query which is required return zero
9741    /// rows.
9742    #[derive(Clone, Default, PartialEq)]
9743    #[non_exhaustive]
9744    pub struct Assertion {
9745        /// A list of actions that this action depends on.
9746        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9747
9748        /// The parent action of this assertion. Only set if this assertion was
9749        /// automatically generated.
9750        pub parent_action: std::option::Option<crate::model::Target>,
9751
9752        /// Whether this action is disabled (i.e. should not be run).
9753        pub disabled: bool,
9754
9755        /// Arbitrary, user-defined tags on this action.
9756        pub tags: std::vec::Vec<std::string::String>,
9757
9758        /// The SELECT query which must return zero rows in order for this assertion
9759        /// to succeed.
9760        pub select_query: std::string::String,
9761
9762        /// Descriptor for the assertion's automatically-generated view and its
9763        /// columns.
9764        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9765
9766        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9767    }
9768
9769    impl Assertion {
9770        /// Creates a new default instance.
9771        pub fn new() -> Self {
9772            std::default::Default::default()
9773        }
9774
9775        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Assertion::dependency_targets].
9776        ///
9777        /// # Example
9778        /// ```ignore,no_run
9779        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9780        /// use google_cloud_dataform_v1::model::Target;
9781        /// let x = Assertion::new()
9782        ///     .set_dependency_targets([
9783        ///         Target::default()/* use setters */,
9784        ///         Target::default()/* use (different) setters */,
9785        ///     ]);
9786        /// ```
9787        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9788        where
9789            T: std::iter::IntoIterator<Item = V>,
9790            V: std::convert::Into<crate::model::Target>,
9791        {
9792            use std::iter::Iterator;
9793            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9794            self
9795        }
9796
9797        /// Sets the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
9798        ///
9799        /// # Example
9800        /// ```ignore,no_run
9801        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9802        /// use google_cloud_dataform_v1::model::Target;
9803        /// let x = Assertion::new().set_parent_action(Target::default()/* use setters */);
9804        /// ```
9805        pub fn set_parent_action<T>(mut self, v: T) -> Self
9806        where
9807            T: std::convert::Into<crate::model::Target>,
9808        {
9809            self.parent_action = std::option::Option::Some(v.into());
9810            self
9811        }
9812
9813        /// Sets or clears the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
9814        ///
9815        /// # Example
9816        /// ```ignore,no_run
9817        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9818        /// use google_cloud_dataform_v1::model::Target;
9819        /// let x = Assertion::new().set_or_clear_parent_action(Some(Target::default()/* use setters */));
9820        /// let x = Assertion::new().set_or_clear_parent_action(None::<Target>);
9821        /// ```
9822        pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
9823        where
9824            T: std::convert::Into<crate::model::Target>,
9825        {
9826            self.parent_action = v.map(|x| x.into());
9827            self
9828        }
9829
9830        /// Sets the value of [disabled][crate::model::compilation_result_action::Assertion::disabled].
9831        ///
9832        /// # Example
9833        /// ```ignore,no_run
9834        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9835        /// let x = Assertion::new().set_disabled(true);
9836        /// ```
9837        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9838            self.disabled = v.into();
9839            self
9840        }
9841
9842        /// Sets the value of [tags][crate::model::compilation_result_action::Assertion::tags].
9843        ///
9844        /// # Example
9845        /// ```ignore,no_run
9846        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9847        /// let x = Assertion::new().set_tags(["a", "b", "c"]);
9848        /// ```
9849        pub fn set_tags<T, V>(mut self, v: T) -> Self
9850        where
9851            T: std::iter::IntoIterator<Item = V>,
9852            V: std::convert::Into<std::string::String>,
9853        {
9854            use std::iter::Iterator;
9855            self.tags = v.into_iter().map(|i| i.into()).collect();
9856            self
9857        }
9858
9859        /// Sets the value of [select_query][crate::model::compilation_result_action::Assertion::select_query].
9860        ///
9861        /// # Example
9862        /// ```ignore,no_run
9863        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9864        /// let x = Assertion::new().set_select_query("example");
9865        /// ```
9866        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
9867            mut self,
9868            v: T,
9869        ) -> Self {
9870            self.select_query = v.into();
9871            self
9872        }
9873
9874        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
9875        ///
9876        /// # Example
9877        /// ```ignore,no_run
9878        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9879        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9880        /// let x = Assertion::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9881        /// ```
9882        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9883        where
9884            T: std::convert::Into<crate::model::RelationDescriptor>,
9885        {
9886            self.relation_descriptor = std::option::Option::Some(v.into());
9887            self
9888        }
9889
9890        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
9891        ///
9892        /// # Example
9893        /// ```ignore,no_run
9894        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9895        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9896        /// let x = Assertion::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9897        /// let x = Assertion::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9898        /// ```
9899        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9900        where
9901            T: std::convert::Into<crate::model::RelationDescriptor>,
9902        {
9903            self.relation_descriptor = v.map(|x| x.into());
9904            self
9905        }
9906    }
9907
9908    impl wkt::message::Message for Assertion {
9909        fn typename() -> &'static str {
9910            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
9911        }
9912    }
9913
9914    /// Represents a relation which is not managed by Dataform but which may be
9915    /// referenced by Dataform actions.
9916    #[derive(Clone, Default, PartialEq)]
9917    #[non_exhaustive]
9918    pub struct Declaration {
9919        /// Descriptor for the relation and its columns. Used as documentation only,
9920        /// i.e. values here will result in no changes to the relation's metadata.
9921        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9922
9923        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9924    }
9925
9926    impl Declaration {
9927        /// Creates a new default instance.
9928        pub fn new() -> Self {
9929            std::default::Default::default()
9930        }
9931
9932        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
9933        ///
9934        /// # Example
9935        /// ```ignore,no_run
9936        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
9937        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9938        /// let x = Declaration::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9939        /// ```
9940        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9941        where
9942            T: std::convert::Into<crate::model::RelationDescriptor>,
9943        {
9944            self.relation_descriptor = std::option::Option::Some(v.into());
9945            self
9946        }
9947
9948        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
9949        ///
9950        /// # Example
9951        /// ```ignore,no_run
9952        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
9953        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9954        /// let x = Declaration::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9955        /// let x = Declaration::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9956        /// ```
9957        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9958        where
9959            T: std::convert::Into<crate::model::RelationDescriptor>,
9960        {
9961            self.relation_descriptor = v.map(|x| x.into());
9962            self
9963        }
9964    }
9965
9966    impl wkt::message::Message for Declaration {
9967        fn typename() -> &'static str {
9968            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
9969        }
9970    }
9971
9972    /// Represents a notebook.
9973    #[derive(Clone, Default, PartialEq)]
9974    #[non_exhaustive]
9975    pub struct Notebook {
9976        /// A list of actions that this action depends on.
9977        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9978
9979        /// Whether this action is disabled (i.e. should not be run).
9980        pub disabled: bool,
9981
9982        /// The contents of the notebook.
9983        pub contents: std::string::String,
9984
9985        /// Arbitrary, user-defined tags on this action.
9986        pub tags: std::vec::Vec<std::string::String>,
9987
9988        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9989    }
9990
9991    impl Notebook {
9992        /// Creates a new default instance.
9993        pub fn new() -> Self {
9994            std::default::Default::default()
9995        }
9996
9997        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Notebook::dependency_targets].
9998        ///
9999        /// # Example
10000        /// ```ignore,no_run
10001        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10002        /// use google_cloud_dataform_v1::model::Target;
10003        /// let x = Notebook::new()
10004        ///     .set_dependency_targets([
10005        ///         Target::default()/* use setters */,
10006        ///         Target::default()/* use (different) setters */,
10007        ///     ]);
10008        /// ```
10009        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
10010        where
10011            T: std::iter::IntoIterator<Item = V>,
10012            V: std::convert::Into<crate::model::Target>,
10013        {
10014            use std::iter::Iterator;
10015            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
10016            self
10017        }
10018
10019        /// Sets the value of [disabled][crate::model::compilation_result_action::Notebook::disabled].
10020        ///
10021        /// # Example
10022        /// ```ignore,no_run
10023        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10024        /// let x = Notebook::new().set_disabled(true);
10025        /// ```
10026        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10027            self.disabled = v.into();
10028            self
10029        }
10030
10031        /// Sets the value of [contents][crate::model::compilation_result_action::Notebook::contents].
10032        ///
10033        /// # Example
10034        /// ```ignore,no_run
10035        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10036        /// let x = Notebook::new().set_contents("example");
10037        /// ```
10038        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10039            self.contents = v.into();
10040            self
10041        }
10042
10043        /// Sets the value of [tags][crate::model::compilation_result_action::Notebook::tags].
10044        ///
10045        /// # Example
10046        /// ```ignore,no_run
10047        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10048        /// let x = Notebook::new().set_tags(["a", "b", "c"]);
10049        /// ```
10050        pub fn set_tags<T, V>(mut self, v: T) -> Self
10051        where
10052            T: std::iter::IntoIterator<Item = V>,
10053            V: std::convert::Into<std::string::String>,
10054        {
10055            use std::iter::Iterator;
10056            self.tags = v.into_iter().map(|i| i.into()).collect();
10057            self
10058        }
10059    }
10060
10061    impl wkt::message::Message for Notebook {
10062        fn typename() -> &'static str {
10063            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
10064        }
10065    }
10066
10067    /// Defines a compiled Data Preparation entity
10068    #[derive(Clone, Default, PartialEq)]
10069    #[non_exhaustive]
10070    pub struct DataPreparation {
10071        /// A list of actions that this action depends on.
10072        pub dependency_targets: std::vec::Vec<crate::model::Target>,
10073
10074        /// Whether this action is disabled (i.e. should not be run).
10075        pub disabled: bool,
10076
10077        /// Arbitrary, user-defined tags on this action.
10078        pub tags: std::vec::Vec<std::string::String>,
10079
10080        /// The definition for the data preparation.
10081        pub definition: std::option::Option<
10082            crate::model::compilation_result_action::data_preparation::Definition,
10083        >,
10084
10085        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10086    }
10087
10088    impl DataPreparation {
10089        /// Creates a new default instance.
10090        pub fn new() -> Self {
10091            std::default::Default::default()
10092        }
10093
10094        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::DataPreparation::dependency_targets].
10095        ///
10096        /// # Example
10097        /// ```ignore,no_run
10098        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10099        /// use google_cloud_dataform_v1::model::Target;
10100        /// let x = DataPreparation::new()
10101        ///     .set_dependency_targets([
10102        ///         Target::default()/* use setters */,
10103        ///         Target::default()/* use (different) setters */,
10104        ///     ]);
10105        /// ```
10106        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
10107        where
10108            T: std::iter::IntoIterator<Item = V>,
10109            V: std::convert::Into<crate::model::Target>,
10110        {
10111            use std::iter::Iterator;
10112            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
10113            self
10114        }
10115
10116        /// Sets the value of [disabled][crate::model::compilation_result_action::DataPreparation::disabled].
10117        ///
10118        /// # Example
10119        /// ```ignore,no_run
10120        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10121        /// let x = DataPreparation::new().set_disabled(true);
10122        /// ```
10123        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10124            self.disabled = v.into();
10125            self
10126        }
10127
10128        /// Sets the value of [tags][crate::model::compilation_result_action::DataPreparation::tags].
10129        ///
10130        /// # Example
10131        /// ```ignore,no_run
10132        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10133        /// let x = DataPreparation::new().set_tags(["a", "b", "c"]);
10134        /// ```
10135        pub fn set_tags<T, V>(mut self, v: T) -> Self
10136        where
10137            T: std::iter::IntoIterator<Item = V>,
10138            V: std::convert::Into<std::string::String>,
10139        {
10140            use std::iter::Iterator;
10141            self.tags = v.into_iter().map(|i| i.into()).collect();
10142            self
10143        }
10144
10145        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition].
10146        ///
10147        /// Note that all the setters affecting `definition` are mutually
10148        /// exclusive.
10149        ///
10150        /// # Example
10151        /// ```ignore,no_run
10152        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10153        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::Definition;
10154        /// let x = DataPreparation::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
10155        /// ```
10156        pub fn set_definition<
10157            T: std::convert::Into<
10158                    std::option::Option<
10159                        crate::model::compilation_result_action::data_preparation::Definition,
10160                    >,
10161                >,
10162        >(
10163            mut self,
10164            v: T,
10165        ) -> Self {
10166            self.definition = v.into();
10167            self
10168        }
10169
10170        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10171        /// if it holds a `ContentsYaml`, `None` if the field is not set or
10172        /// holds a different branch.
10173        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
10174            #[allow(unreachable_patterns)]
10175            self.definition.as_ref().and_then(|v| match v {
10176                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
10177                _ => std::option::Option::None,
10178            })
10179        }
10180
10181        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10182        /// to hold a `ContentsYaml`.
10183        ///
10184        /// Note that all the setters affecting `definition` are
10185        /// mutually exclusive.
10186        ///
10187        /// # Example
10188        /// ```ignore,no_run
10189        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10190        /// let x = DataPreparation::new().set_contents_yaml("example");
10191        /// assert!(x.contents_yaml().is_some());
10192        /// assert!(x.contents_sql().is_none());
10193        /// ```
10194        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
10195            mut self,
10196            v: T,
10197        ) -> Self {
10198            self.definition = std::option::Option::Some(
10199                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
10200                    v.into(),
10201                ),
10202            );
10203            self
10204        }
10205
10206        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10207        /// if it holds a `ContentsSql`, `None` if the field is not set or
10208        /// holds a different branch.
10209        pub fn contents_sql(
10210            &self,
10211        ) -> std::option::Option<
10212            &std::boxed::Box<
10213                crate::model::compilation_result_action::data_preparation::SqlDefinition,
10214            >,
10215        > {
10216            #[allow(unreachable_patterns)]
10217            self.definition.as_ref().and_then(|v| match v {
10218                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
10219                _ => std::option::Option::None,
10220            })
10221        }
10222
10223        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10224        /// to hold a `ContentsSql`.
10225        ///
10226        /// Note that all the setters affecting `definition` are
10227        /// mutually exclusive.
10228        ///
10229        /// # Example
10230        /// ```ignore,no_run
10231        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10232        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10233        /// let x = DataPreparation::new().set_contents_sql(SqlDefinition::default()/* use setters */);
10234        /// assert!(x.contents_sql().is_some());
10235        /// assert!(x.contents_yaml().is_none());
10236        /// ```
10237        pub fn set_contents_sql<
10238            T: std::convert::Into<
10239                    std::boxed::Box<
10240                        crate::model::compilation_result_action::data_preparation::SqlDefinition,
10241                    >,
10242                >,
10243        >(
10244            mut self,
10245            v: T,
10246        ) -> Self {
10247            self.definition = std::option::Option::Some(
10248                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
10249                    v.into(),
10250                ),
10251            );
10252            self
10253        }
10254    }
10255
10256    impl wkt::message::Message for DataPreparation {
10257        fn typename() -> &'static str {
10258            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
10259        }
10260    }
10261
10262    /// Defines additional types related to [DataPreparation].
10263    pub mod data_preparation {
10264        #[allow(unused_imports)]
10265        use super::*;
10266
10267        /// Definition of a SQL Data Preparation
10268        #[derive(Clone, Default, PartialEq)]
10269        #[non_exhaustive]
10270        pub struct SqlDefinition {
10271            /// The SQL query representing the data preparation steps. Formatted as a
10272            /// Pipe SQL query statement.
10273            pub query: std::string::String,
10274
10275            /// Error table configuration,
10276            pub error_table: std::option::Option<
10277                crate::model::compilation_result_action::data_preparation::ErrorTable,
10278            >,
10279
10280            /// Load configuration.
10281            pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
10282
10283            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10284        }
10285
10286        impl SqlDefinition {
10287            /// Creates a new default instance.
10288            pub fn new() -> Self {
10289                std::default::Default::default()
10290            }
10291
10292            /// Sets the value of [query][crate::model::compilation_result_action::data_preparation::SqlDefinition::query].
10293            ///
10294            /// # Example
10295            /// ```ignore,no_run
10296            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10297            /// let x = SqlDefinition::new().set_query("example");
10298            /// ```
10299            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10300                self.query = v.into();
10301                self
10302            }
10303
10304            /// Sets the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
10305            ///
10306            /// # Example
10307            /// ```ignore,no_run
10308            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10309            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10310            /// let x = SqlDefinition::new().set_error_table(ErrorTable::default()/* use setters */);
10311            /// ```
10312            pub fn set_error_table<T>(mut self, v: T) -> Self
10313            where
10314                T: std::convert::Into<
10315                        crate::model::compilation_result_action::data_preparation::ErrorTable,
10316                    >,
10317            {
10318                self.error_table = std::option::Option::Some(v.into());
10319                self
10320            }
10321
10322            /// Sets or clears the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
10323            ///
10324            /// # Example
10325            /// ```ignore,no_run
10326            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10327            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10328            /// let x = SqlDefinition::new().set_or_clear_error_table(Some(ErrorTable::default()/* use setters */));
10329            /// let x = SqlDefinition::new().set_or_clear_error_table(None::<ErrorTable>);
10330            /// ```
10331            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
10332            where
10333                T: std::convert::Into<
10334                        crate::model::compilation_result_action::data_preparation::ErrorTable,
10335                    >,
10336            {
10337                self.error_table = v.map(|x| x.into());
10338                self
10339            }
10340
10341            /// Sets the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
10342            ///
10343            /// # Example
10344            /// ```ignore,no_run
10345            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10346            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10347            /// let x = SqlDefinition::new().set_load(LoadConfig::default()/* use setters */);
10348            /// ```
10349            pub fn set_load<T>(mut self, v: T) -> Self
10350            where
10351                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
10352            {
10353                self.load = std::option::Option::Some(v.into());
10354                self
10355            }
10356
10357            /// Sets or clears the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
10358            ///
10359            /// # Example
10360            /// ```ignore,no_run
10361            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10362            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10363            /// let x = SqlDefinition::new().set_or_clear_load(Some(LoadConfig::default()/* use setters */));
10364            /// let x = SqlDefinition::new().set_or_clear_load(None::<LoadConfig>);
10365            /// ```
10366            pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
10367            where
10368                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
10369            {
10370                self.load = v.map(|x| x.into());
10371                self
10372            }
10373        }
10374
10375        impl wkt::message::Message for SqlDefinition {
10376            fn typename() -> &'static str {
10377                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
10378            }
10379        }
10380
10381        /// Error table information, used to write error data into a BigQuery
10382        /// table.
10383        #[derive(Clone, Default, PartialEq)]
10384        #[non_exhaustive]
10385        pub struct ErrorTable {
10386            /// Error Table target.
10387            pub target: std::option::Option<crate::model::Target>,
10388
10389            /// Error table partition expiration in days. Only positive values are
10390            /// allowed.
10391            pub retention_days: i32,
10392
10393            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10394        }
10395
10396        impl ErrorTable {
10397            /// Creates a new default instance.
10398            pub fn new() -> Self {
10399                std::default::Default::default()
10400            }
10401
10402            /// Sets the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
10403            ///
10404            /// # Example
10405            /// ```ignore,no_run
10406            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10407            /// use google_cloud_dataform_v1::model::Target;
10408            /// let x = ErrorTable::new().set_target(Target::default()/* use setters */);
10409            /// ```
10410            pub fn set_target<T>(mut self, v: T) -> Self
10411            where
10412                T: std::convert::Into<crate::model::Target>,
10413            {
10414                self.target = std::option::Option::Some(v.into());
10415                self
10416            }
10417
10418            /// Sets or clears the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
10419            ///
10420            /// # Example
10421            /// ```ignore,no_run
10422            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10423            /// use google_cloud_dataform_v1::model::Target;
10424            /// let x = ErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
10425            /// let x = ErrorTable::new().set_or_clear_target(None::<Target>);
10426            /// ```
10427            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
10428            where
10429                T: std::convert::Into<crate::model::Target>,
10430            {
10431                self.target = v.map(|x| x.into());
10432                self
10433            }
10434
10435            /// Sets the value of [retention_days][crate::model::compilation_result_action::data_preparation::ErrorTable::retention_days].
10436            ///
10437            /// # Example
10438            /// ```ignore,no_run
10439            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10440            /// let x = ErrorTable::new().set_retention_days(42);
10441            /// ```
10442            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10443                self.retention_days = v.into();
10444                self
10445            }
10446        }
10447
10448        impl wkt::message::Message for ErrorTable {
10449            fn typename() -> &'static str {
10450                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
10451            }
10452        }
10453
10454        /// The definition for the data preparation.
10455        #[derive(Clone, Debug, PartialEq)]
10456        #[non_exhaustive]
10457        pub enum Definition {
10458            /// The data preparation definition, stored as a YAML string.
10459            ContentsYaml(std::string::String),
10460            /// SQL definition for a Data Preparation. Contains a SQL query and
10461            /// additional context information.
10462            ContentsSql(
10463                std::boxed::Box<
10464                    crate::model::compilation_result_action::data_preparation::SqlDefinition,
10465                >,
10466            ),
10467        }
10468    }
10469
10470    /// Simplified load configuration for actions
10471    #[derive(Clone, Default, PartialEq)]
10472    #[non_exhaustive]
10473    pub struct LoadConfig {
10474        /// Load mode
10475        pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
10476
10477        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10478    }
10479
10480    impl LoadConfig {
10481        /// Creates a new default instance.
10482        pub fn new() -> Self {
10483            std::default::Default::default()
10484        }
10485
10486        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode].
10487        ///
10488        /// Note that all the setters affecting `mode` are mutually
10489        /// exclusive.
10490        ///
10491        /// # Example
10492        /// ```ignore,no_run
10493        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10494        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10495        /// let x = LoadConfig::new().set_mode(Some(
10496        ///     google_cloud_dataform_v1::model::compilation_result_action::load_config::Mode::Replace(SimpleLoadMode::default().into())));
10497        /// ```
10498        pub fn set_mode<
10499            T: std::convert::Into<
10500                    std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
10501                >,
10502        >(
10503            mut self,
10504            v: T,
10505        ) -> Self {
10506            self.mode = v.into();
10507            self
10508        }
10509
10510        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10511        /// if it holds a `Replace`, `None` if the field is not set or
10512        /// holds a different branch.
10513        pub fn replace(
10514            &self,
10515        ) -> std::option::Option<
10516            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10517        > {
10518            #[allow(unreachable_patterns)]
10519            self.mode.as_ref().and_then(|v| match v {
10520                crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
10521                    std::option::Option::Some(v)
10522                }
10523                _ => std::option::Option::None,
10524            })
10525        }
10526
10527        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10528        /// to hold a `Replace`.
10529        ///
10530        /// Note that all the setters affecting `mode` are
10531        /// mutually exclusive.
10532        ///
10533        /// # Example
10534        /// ```ignore,no_run
10535        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10536        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10537        /// let x = LoadConfig::new().set_replace(SimpleLoadMode::default()/* use setters */);
10538        /// assert!(x.replace().is_some());
10539        /// assert!(x.append().is_none());
10540        /// assert!(x.maximum().is_none());
10541        /// assert!(x.unique().is_none());
10542        /// ```
10543        pub fn set_replace<
10544            T: std::convert::Into<
10545                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10546                >,
10547        >(
10548            mut self,
10549            v: T,
10550        ) -> Self {
10551            self.mode = std::option::Option::Some(
10552                crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
10553            );
10554            self
10555        }
10556
10557        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10558        /// if it holds a `Append`, `None` if the field is not set or
10559        /// holds a different branch.
10560        pub fn append(
10561            &self,
10562        ) -> std::option::Option<
10563            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10564        > {
10565            #[allow(unreachable_patterns)]
10566            self.mode.as_ref().and_then(|v| match v {
10567                crate::model::compilation_result_action::load_config::Mode::Append(v) => {
10568                    std::option::Option::Some(v)
10569                }
10570                _ => std::option::Option::None,
10571            })
10572        }
10573
10574        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10575        /// to hold a `Append`.
10576        ///
10577        /// Note that all the setters affecting `mode` are
10578        /// mutually exclusive.
10579        ///
10580        /// # Example
10581        /// ```ignore,no_run
10582        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10583        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10584        /// let x = LoadConfig::new().set_append(SimpleLoadMode::default()/* use setters */);
10585        /// assert!(x.append().is_some());
10586        /// assert!(x.replace().is_none());
10587        /// assert!(x.maximum().is_none());
10588        /// assert!(x.unique().is_none());
10589        /// ```
10590        pub fn set_append<
10591            T: std::convert::Into<
10592                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10593                >,
10594        >(
10595            mut self,
10596            v: T,
10597        ) -> Self {
10598            self.mode = std::option::Option::Some(
10599                crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
10600            );
10601            self
10602        }
10603
10604        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10605        /// if it holds a `Maximum`, `None` if the field is not set or
10606        /// holds a different branch.
10607        pub fn maximum(
10608            &self,
10609        ) -> std::option::Option<
10610            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10611        > {
10612            #[allow(unreachable_patterns)]
10613            self.mode.as_ref().and_then(|v| match v {
10614                crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
10615                    std::option::Option::Some(v)
10616                }
10617                _ => std::option::Option::None,
10618            })
10619        }
10620
10621        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10622        /// to hold a `Maximum`.
10623        ///
10624        /// Note that all the setters affecting `mode` are
10625        /// mutually exclusive.
10626        ///
10627        /// # Example
10628        /// ```ignore,no_run
10629        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10630        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10631        /// let x = LoadConfig::new().set_maximum(IncrementalLoadMode::default()/* use setters */);
10632        /// assert!(x.maximum().is_some());
10633        /// assert!(x.replace().is_none());
10634        /// assert!(x.append().is_none());
10635        /// assert!(x.unique().is_none());
10636        /// ```
10637        pub fn set_maximum<
10638            T: std::convert::Into<
10639                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10640                >,
10641        >(
10642            mut self,
10643            v: T,
10644        ) -> Self {
10645            self.mode = std::option::Option::Some(
10646                crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
10647            );
10648            self
10649        }
10650
10651        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10652        /// if it holds a `Unique`, `None` if the field is not set or
10653        /// holds a different branch.
10654        pub fn unique(
10655            &self,
10656        ) -> std::option::Option<
10657            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10658        > {
10659            #[allow(unreachable_patterns)]
10660            self.mode.as_ref().and_then(|v| match v {
10661                crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
10662                    std::option::Option::Some(v)
10663                }
10664                _ => std::option::Option::None,
10665            })
10666        }
10667
10668        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10669        /// to hold a `Unique`.
10670        ///
10671        /// Note that all the setters affecting `mode` are
10672        /// mutually exclusive.
10673        ///
10674        /// # Example
10675        /// ```ignore,no_run
10676        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10677        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10678        /// let x = LoadConfig::new().set_unique(IncrementalLoadMode::default()/* use setters */);
10679        /// assert!(x.unique().is_some());
10680        /// assert!(x.replace().is_none());
10681        /// assert!(x.append().is_none());
10682        /// assert!(x.maximum().is_none());
10683        /// ```
10684        pub fn set_unique<
10685            T: std::convert::Into<
10686                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10687                >,
10688        >(
10689            mut self,
10690            v: T,
10691        ) -> Self {
10692            self.mode = std::option::Option::Some(
10693                crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
10694            );
10695            self
10696        }
10697    }
10698
10699    impl wkt::message::Message for LoadConfig {
10700        fn typename() -> &'static str {
10701            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
10702        }
10703    }
10704
10705    /// Defines additional types related to [LoadConfig].
10706    pub mod load_config {
10707        #[allow(unused_imports)]
10708        use super::*;
10709
10710        /// Load mode
10711        #[derive(Clone, Debug, PartialEq)]
10712        #[non_exhaustive]
10713        pub enum Mode {
10714            /// Replace destination table
10715            Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
10716            /// Append into destination table
10717            Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
10718            /// Insert records where the value exceeds the previous maximum value for a
10719            /// column in the destination table
10720            Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
10721            /// Insert records where the value of a column is not already present in
10722            /// the destination table
10723            Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
10724        }
10725    }
10726
10727    /// Simple load definition
10728    #[derive(Clone, Default, PartialEq)]
10729    #[non_exhaustive]
10730    pub struct SimpleLoadMode {
10731        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10732    }
10733
10734    impl SimpleLoadMode {
10735        /// Creates a new default instance.
10736        pub fn new() -> Self {
10737            std::default::Default::default()
10738        }
10739    }
10740
10741    impl wkt::message::Message for SimpleLoadMode {
10742        fn typename() -> &'static str {
10743            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
10744        }
10745    }
10746
10747    /// Load definition for incremental load modes
10748    #[derive(Clone, Default, PartialEq)]
10749    #[non_exhaustive]
10750    pub struct IncrementalLoadMode {
10751        /// Column name for incremental load modes
10752        pub column: std::string::String,
10753
10754        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10755    }
10756
10757    impl IncrementalLoadMode {
10758        /// Creates a new default instance.
10759        pub fn new() -> Self {
10760            std::default::Default::default()
10761        }
10762
10763        /// Sets the value of [column][crate::model::compilation_result_action::IncrementalLoadMode::column].
10764        ///
10765        /// # Example
10766        /// ```ignore,no_run
10767        /// # use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10768        /// let x = IncrementalLoadMode::new().set_column("example");
10769        /// ```
10770        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10771            self.column = v.into();
10772            self
10773        }
10774    }
10775
10776    impl wkt::message::Message for IncrementalLoadMode {
10777        fn typename() -> &'static str {
10778            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
10779        }
10780    }
10781
10782    /// The compiled object.
10783    #[derive(Clone, Debug, PartialEq)]
10784    #[non_exhaustive]
10785    pub enum CompiledObject {
10786        /// The database relation created/updated by this action.
10787        Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
10788        /// The database operations executed by this action.
10789        Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
10790        /// The assertion executed by this action.
10791        Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
10792        /// The declaration declared by this action.
10793        Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
10794        /// The notebook executed by this action.
10795        Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
10796        /// The data preparation executed by this action.
10797        DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
10798    }
10799}
10800
10801/// `QueryCompilationResultActions` request message.
10802#[derive(Clone, Default, PartialEq)]
10803#[non_exhaustive]
10804pub struct QueryCompilationResultActionsRequest {
10805    /// Required. The compilation result's name.
10806    pub name: std::string::String,
10807
10808    /// Optional. Maximum number of compilation results to return. The server may
10809    /// return fewer items than requested. If unspecified, the server will pick an
10810    /// appropriate default.
10811    pub page_size: i32,
10812
10813    /// Optional. Page token received from a previous
10814    /// `QueryCompilationResultActions` call. Provide this to retrieve the
10815    /// subsequent page.
10816    ///
10817    /// When paginating, all other parameters provided to
10818    /// `QueryCompilationResultActions`, with the exception of `page_size`, must
10819    /// match the call that provided the page token.
10820    pub page_token: std::string::String,
10821
10822    /// Optional. Optional filter for the returned list. Filtering is only
10823    /// currently supported on the `file_path` field.
10824    pub filter: std::string::String,
10825
10826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10827}
10828
10829impl QueryCompilationResultActionsRequest {
10830    /// Creates a new default instance.
10831    pub fn new() -> Self {
10832        std::default::Default::default()
10833    }
10834
10835    /// Sets the value of [name][crate::model::QueryCompilationResultActionsRequest::name].
10836    ///
10837    /// # Example
10838    /// ```ignore,no_run
10839    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10840    /// # let project_id = "project_id";
10841    /// # let location_id = "location_id";
10842    /// # let repository_id = "repository_id";
10843    /// # let compilation_result_id = "compilation_result_id";
10844    /// let x = QueryCompilationResultActionsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
10845    /// ```
10846    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10847        self.name = v.into();
10848        self
10849    }
10850
10851    /// Sets the value of [page_size][crate::model::QueryCompilationResultActionsRequest::page_size].
10852    ///
10853    /// # Example
10854    /// ```ignore,no_run
10855    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10856    /// let x = QueryCompilationResultActionsRequest::new().set_page_size(42);
10857    /// ```
10858    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10859        self.page_size = v.into();
10860        self
10861    }
10862
10863    /// Sets the value of [page_token][crate::model::QueryCompilationResultActionsRequest::page_token].
10864    ///
10865    /// # Example
10866    /// ```ignore,no_run
10867    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10868    /// let x = QueryCompilationResultActionsRequest::new().set_page_token("example");
10869    /// ```
10870    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10871        self.page_token = v.into();
10872        self
10873    }
10874
10875    /// Sets the value of [filter][crate::model::QueryCompilationResultActionsRequest::filter].
10876    ///
10877    /// # Example
10878    /// ```ignore,no_run
10879    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10880    /// let x = QueryCompilationResultActionsRequest::new().set_filter("example");
10881    /// ```
10882    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10883        self.filter = v.into();
10884        self
10885    }
10886}
10887
10888impl wkt::message::Message for QueryCompilationResultActionsRequest {
10889    fn typename() -> &'static str {
10890        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
10891    }
10892}
10893
10894/// `QueryCompilationResultActions` response message.
10895#[derive(Clone, Default, PartialEq)]
10896#[non_exhaustive]
10897pub struct QueryCompilationResultActionsResponse {
10898    /// List of compilation result actions.
10899    pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
10900
10901    /// A token, which can be sent as `page_token` to retrieve the next page.
10902    /// If this field is omitted, there are no subsequent pages.
10903    pub next_page_token: std::string::String,
10904
10905    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10906}
10907
10908impl QueryCompilationResultActionsResponse {
10909    /// Creates a new default instance.
10910    pub fn new() -> Self {
10911        std::default::Default::default()
10912    }
10913
10914    /// Sets the value of [compilation_result_actions][crate::model::QueryCompilationResultActionsResponse::compilation_result_actions].
10915    ///
10916    /// # Example
10917    /// ```ignore,no_run
10918    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
10919    /// use google_cloud_dataform_v1::model::CompilationResultAction;
10920    /// let x = QueryCompilationResultActionsResponse::new()
10921    ///     .set_compilation_result_actions([
10922    ///         CompilationResultAction::default()/* use setters */,
10923    ///         CompilationResultAction::default()/* use (different) setters */,
10924    ///     ]);
10925    /// ```
10926    pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
10927    where
10928        T: std::iter::IntoIterator<Item = V>,
10929        V: std::convert::Into<crate::model::CompilationResultAction>,
10930    {
10931        use std::iter::Iterator;
10932        self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
10933        self
10934    }
10935
10936    /// Sets the value of [next_page_token][crate::model::QueryCompilationResultActionsResponse::next_page_token].
10937    ///
10938    /// # Example
10939    /// ```ignore,no_run
10940    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
10941    /// let x = QueryCompilationResultActionsResponse::new().set_next_page_token("example");
10942    /// ```
10943    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10944        self.next_page_token = v.into();
10945        self
10946    }
10947}
10948
10949impl wkt::message::Message for QueryCompilationResultActionsResponse {
10950    fn typename() -> &'static str {
10951        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
10952    }
10953}
10954
10955#[doc(hidden)]
10956impl google_cloud_gax::paginator::internal::PageableResponse
10957    for QueryCompilationResultActionsResponse
10958{
10959    type PageItem = crate::model::CompilationResultAction;
10960
10961    fn items(self) -> std::vec::Vec<Self::PageItem> {
10962        self.compilation_result_actions
10963    }
10964
10965    fn next_page_token(&self) -> std::string::String {
10966        use std::clone::Clone;
10967        self.next_page_token.clone()
10968    }
10969}
10970
10971/// Represents a Dataform workflow configuration.
10972#[derive(Clone, Default, PartialEq)]
10973#[non_exhaustive]
10974pub struct WorkflowConfig {
10975    /// Identifier. The workflow config's name.
10976    pub name: std::string::String,
10977
10978    /// Required. The name of the release config whose release_compilation_result
10979    /// should be executed. Must be in the format
10980    /// `projects/*/locations/*/repositories/*/releaseConfigs/*`.
10981    pub release_config: std::string::String,
10982
10983    /// Optional. If left unset, a default InvocationConfig will be used.
10984    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
10985
10986    /// Optional. Optional schedule (in cron format) for automatic execution of
10987    /// this workflow config.
10988    pub cron_schedule: std::string::String,
10989
10990    /// Optional. Specifies the time zone to be used when interpreting
10991    /// cron_schedule. Must be a time zone name from the time zone database
10992    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
10993    /// unspecified, the default is UTC.
10994    pub time_zone: std::string::String,
10995
10996    /// Output only. Records of the 10 most recent scheduled execution attempts,
10997    /// ordered in descending order of `execution_time`. Updated whenever automatic
10998    /// creation of a workflow invocation is triggered by cron_schedule.
10999    pub recent_scheduled_execution_records:
11000        std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
11001
11002    /// Optional. Disables automatic creation of workflow invocations.
11003    pub disabled: bool,
11004
11005    /// Output only. The timestamp of when the WorkflowConfig was created.
11006    pub create_time: std::option::Option<wkt::Timestamp>,
11007
11008    /// Output only. The timestamp of when the WorkflowConfig was last updated.
11009    pub update_time: std::option::Option<wkt::Timestamp>,
11010
11011    /// Output only. All the metadata information that is used internally to serve
11012    /// the resource. For example: timestamps, flags, status fields, etc. The
11013    /// format of this field is a JSON string.
11014    pub internal_metadata: std::option::Option<std::string::String>,
11015
11016    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11017}
11018
11019impl WorkflowConfig {
11020    /// Creates a new default instance.
11021    pub fn new() -> Self {
11022        std::default::Default::default()
11023    }
11024
11025    /// Sets the value of [name][crate::model::WorkflowConfig::name].
11026    ///
11027    /// # Example
11028    /// ```ignore,no_run
11029    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11030    /// # let project_id = "project_id";
11031    /// # let location_id = "location_id";
11032    /// # let repository_id = "repository_id";
11033    /// # let workflow_config_id = "workflow_config_id";
11034    /// let x = WorkflowConfig::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
11035    /// ```
11036    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11037        self.name = v.into();
11038        self
11039    }
11040
11041    /// Sets the value of [release_config][crate::model::WorkflowConfig::release_config].
11042    ///
11043    /// # Example
11044    /// ```ignore,no_run
11045    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11046    /// # let project_id = "project_id";
11047    /// # let location_id = "location_id";
11048    /// # let repository_id = "repository_id";
11049    /// # let release_config_id = "release_config_id";
11050    /// let x = WorkflowConfig::new().set_release_config(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
11051    /// ```
11052    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11053        self.release_config = v.into();
11054        self
11055    }
11056
11057    /// Sets the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
11058    ///
11059    /// # Example
11060    /// ```ignore,no_run
11061    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11062    /// use google_cloud_dataform_v1::model::InvocationConfig;
11063    /// let x = WorkflowConfig::new().set_invocation_config(InvocationConfig::default()/* use setters */);
11064    /// ```
11065    pub fn set_invocation_config<T>(mut self, v: T) -> Self
11066    where
11067        T: std::convert::Into<crate::model::InvocationConfig>,
11068    {
11069        self.invocation_config = std::option::Option::Some(v.into());
11070        self
11071    }
11072
11073    /// Sets or clears the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
11074    ///
11075    /// # Example
11076    /// ```ignore,no_run
11077    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11078    /// use google_cloud_dataform_v1::model::InvocationConfig;
11079    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
11080    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(None::<InvocationConfig>);
11081    /// ```
11082    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
11083    where
11084        T: std::convert::Into<crate::model::InvocationConfig>,
11085    {
11086        self.invocation_config = v.map(|x| x.into());
11087        self
11088    }
11089
11090    /// Sets the value of [cron_schedule][crate::model::WorkflowConfig::cron_schedule].
11091    ///
11092    /// # Example
11093    /// ```ignore,no_run
11094    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11095    /// let x = WorkflowConfig::new().set_cron_schedule("example");
11096    /// ```
11097    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11098        self.cron_schedule = v.into();
11099        self
11100    }
11101
11102    /// Sets the value of [time_zone][crate::model::WorkflowConfig::time_zone].
11103    ///
11104    /// # Example
11105    /// ```ignore,no_run
11106    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11107    /// let x = WorkflowConfig::new().set_time_zone("example");
11108    /// ```
11109    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11110        self.time_zone = v.into();
11111        self
11112    }
11113
11114    /// Sets the value of [recent_scheduled_execution_records][crate::model::WorkflowConfig::recent_scheduled_execution_records].
11115    ///
11116    /// # Example
11117    /// ```ignore,no_run
11118    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11119    /// use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11120    /// let x = WorkflowConfig::new()
11121    ///     .set_recent_scheduled_execution_records([
11122    ///         ScheduledExecutionRecord::default()/* use setters */,
11123    ///         ScheduledExecutionRecord::default()/* use (different) setters */,
11124    ///     ]);
11125    /// ```
11126    pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
11127    where
11128        T: std::iter::IntoIterator<Item = V>,
11129        V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
11130    {
11131        use std::iter::Iterator;
11132        self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
11133        self
11134    }
11135
11136    /// Sets the value of [disabled][crate::model::WorkflowConfig::disabled].
11137    ///
11138    /// # Example
11139    /// ```ignore,no_run
11140    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11141    /// let x = WorkflowConfig::new().set_disabled(true);
11142    /// ```
11143    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11144        self.disabled = v.into();
11145        self
11146    }
11147
11148    /// Sets the value of [create_time][crate::model::WorkflowConfig::create_time].
11149    ///
11150    /// # Example
11151    /// ```ignore,no_run
11152    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11153    /// use wkt::Timestamp;
11154    /// let x = WorkflowConfig::new().set_create_time(Timestamp::default()/* use setters */);
11155    /// ```
11156    pub fn set_create_time<T>(mut self, v: T) -> Self
11157    where
11158        T: std::convert::Into<wkt::Timestamp>,
11159    {
11160        self.create_time = std::option::Option::Some(v.into());
11161        self
11162    }
11163
11164    /// Sets or clears the value of [create_time][crate::model::WorkflowConfig::create_time].
11165    ///
11166    /// # Example
11167    /// ```ignore,no_run
11168    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11169    /// use wkt::Timestamp;
11170    /// let x = WorkflowConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11171    /// let x = WorkflowConfig::new().set_or_clear_create_time(None::<Timestamp>);
11172    /// ```
11173    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11174    where
11175        T: std::convert::Into<wkt::Timestamp>,
11176    {
11177        self.create_time = v.map(|x| x.into());
11178        self
11179    }
11180
11181    /// Sets the value of [update_time][crate::model::WorkflowConfig::update_time].
11182    ///
11183    /// # Example
11184    /// ```ignore,no_run
11185    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11186    /// use wkt::Timestamp;
11187    /// let x = WorkflowConfig::new().set_update_time(Timestamp::default()/* use setters */);
11188    /// ```
11189    pub fn set_update_time<T>(mut self, v: T) -> Self
11190    where
11191        T: std::convert::Into<wkt::Timestamp>,
11192    {
11193        self.update_time = std::option::Option::Some(v.into());
11194        self
11195    }
11196
11197    /// Sets or clears the value of [update_time][crate::model::WorkflowConfig::update_time].
11198    ///
11199    /// # Example
11200    /// ```ignore,no_run
11201    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11202    /// use wkt::Timestamp;
11203    /// let x = WorkflowConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11204    /// let x = WorkflowConfig::new().set_or_clear_update_time(None::<Timestamp>);
11205    /// ```
11206    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11207    where
11208        T: std::convert::Into<wkt::Timestamp>,
11209    {
11210        self.update_time = v.map(|x| x.into());
11211        self
11212    }
11213
11214    /// Sets the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
11215    ///
11216    /// # Example
11217    /// ```ignore,no_run
11218    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11219    /// let x = WorkflowConfig::new().set_internal_metadata("example");
11220    /// ```
11221    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
11222    where
11223        T: std::convert::Into<std::string::String>,
11224    {
11225        self.internal_metadata = std::option::Option::Some(v.into());
11226        self
11227    }
11228
11229    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
11230    ///
11231    /// # Example
11232    /// ```ignore,no_run
11233    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11234    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(Some("example"));
11235    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(None::<String>);
11236    /// ```
11237    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11238    where
11239        T: std::convert::Into<std::string::String>,
11240    {
11241        self.internal_metadata = v.map(|x| x.into());
11242        self
11243    }
11244}
11245
11246impl wkt::message::Message for WorkflowConfig {
11247    fn typename() -> &'static str {
11248        "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
11249    }
11250}
11251
11252/// Defines additional types related to [WorkflowConfig].
11253pub mod workflow_config {
11254    #[allow(unused_imports)]
11255    use super::*;
11256
11257    /// A record of an attempt to create a workflow invocation for this workflow
11258    /// config.
11259    #[derive(Clone, Default, PartialEq)]
11260    #[non_exhaustive]
11261    pub struct ScheduledExecutionRecord {
11262        /// Output only. The timestamp of this execution attempt.
11263        pub execution_time: std::option::Option<wkt::Timestamp>,
11264
11265        /// The result of this execution attempt.
11266        pub result:
11267            std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
11268
11269        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11270    }
11271
11272    impl ScheduledExecutionRecord {
11273        /// Creates a new default instance.
11274        pub fn new() -> Self {
11275            std::default::Default::default()
11276        }
11277
11278        /// Sets the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
11279        ///
11280        /// # Example
11281        /// ```ignore,no_run
11282        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11283        /// use wkt::Timestamp;
11284        /// let x = ScheduledExecutionRecord::new().set_execution_time(Timestamp::default()/* use setters */);
11285        /// ```
11286        pub fn set_execution_time<T>(mut self, v: T) -> Self
11287        where
11288            T: std::convert::Into<wkt::Timestamp>,
11289        {
11290            self.execution_time = std::option::Option::Some(v.into());
11291            self
11292        }
11293
11294        /// Sets or clears the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
11295        ///
11296        /// # Example
11297        /// ```ignore,no_run
11298        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11299        /// use wkt::Timestamp;
11300        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(Some(Timestamp::default()/* use setters */));
11301        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(None::<Timestamp>);
11302        /// ```
11303        pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
11304        where
11305            T: std::convert::Into<wkt::Timestamp>,
11306        {
11307            self.execution_time = v.map(|x| x.into());
11308            self
11309        }
11310
11311        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result].
11312        ///
11313        /// Note that all the setters affecting `result` are mutually
11314        /// exclusive.
11315        ///
11316        /// # Example
11317        /// ```ignore,no_run
11318        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11319        /// use google_cloud_dataform_v1::model::workflow_config::scheduled_execution_record::Result;
11320        /// let x = ScheduledExecutionRecord::new().set_result(Some(Result::WorkflowInvocation("example".to_string())));
11321        /// ```
11322        pub fn set_result<
11323            T: std::convert::Into<
11324                    std::option::Option<
11325                        crate::model::workflow_config::scheduled_execution_record::Result,
11326                    >,
11327                >,
11328        >(
11329            mut self,
11330            v: T,
11331        ) -> Self {
11332            self.result = v.into();
11333            self
11334        }
11335
11336        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11337        /// if it holds a `WorkflowInvocation`, `None` if the field is not set or
11338        /// holds a different branch.
11339        pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
11340            #[allow(unreachable_patterns)]
11341            self.result.as_ref().and_then(|v| match v {
11342                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
11343                _ => std::option::Option::None,
11344            })
11345        }
11346
11347        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11348        /// to hold a `WorkflowInvocation`.
11349        ///
11350        /// Note that all the setters affecting `result` are
11351        /// mutually exclusive.
11352        ///
11353        /// # Example
11354        /// ```ignore,no_run
11355        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11356        /// # let project_id = "project_id";
11357        /// # let location_id = "location_id";
11358        /// # let repository_id = "repository_id";
11359        /// # let workflow_invocation_id = "workflow_invocation_id";
11360        /// let x = ScheduledExecutionRecord::new().set_workflow_invocation(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
11361        /// assert!(x.workflow_invocation().is_some());
11362        /// assert!(x.error_status().is_none());
11363        /// ```
11364        pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
11365            mut self,
11366            v: T,
11367        ) -> Self {
11368            self.result = std::option::Option::Some(
11369                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
11370                    v.into()
11371                )
11372            );
11373            self
11374        }
11375
11376        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11377        /// if it holds a `ErrorStatus`, `None` if the field is not set or
11378        /// holds a different branch.
11379        pub fn error_status(
11380            &self,
11381        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
11382            #[allow(unreachable_patterns)]
11383            self.result.as_ref().and_then(|v| match v {
11384                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
11385                    v,
11386                ) => std::option::Option::Some(v),
11387                _ => std::option::Option::None,
11388            })
11389        }
11390
11391        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11392        /// to hold a `ErrorStatus`.
11393        ///
11394        /// Note that all the setters affecting `result` are
11395        /// mutually exclusive.
11396        ///
11397        /// # Example
11398        /// ```ignore,no_run
11399        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11400        /// use google_cloud_rpc::model::Status;
11401        /// let x = ScheduledExecutionRecord::new().set_error_status(Status::default()/* use setters */);
11402        /// assert!(x.error_status().is_some());
11403        /// assert!(x.workflow_invocation().is_none());
11404        /// ```
11405        pub fn set_error_status<
11406            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
11407        >(
11408            mut self,
11409            v: T,
11410        ) -> Self {
11411            self.result = std::option::Option::Some(
11412                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
11413                    v.into(),
11414                ),
11415            );
11416            self
11417        }
11418    }
11419
11420    impl wkt::message::Message for ScheduledExecutionRecord {
11421        fn typename() -> &'static str {
11422            "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
11423        }
11424    }
11425
11426    /// Defines additional types related to [ScheduledExecutionRecord].
11427    pub mod scheduled_execution_record {
11428        #[allow(unused_imports)]
11429        use super::*;
11430
11431        /// The result of this execution attempt.
11432        #[derive(Clone, Debug, PartialEq)]
11433        #[non_exhaustive]
11434        pub enum Result {
11435            /// The name of the created workflow invocation, if one was successfully
11436            /// created. Must be in the format
11437            /// `projects/*/locations/*/repositories/*/workflowInvocations/*`.
11438            WorkflowInvocation(std::string::String),
11439            /// The error status encountered upon this attempt to create the
11440            /// workflow invocation, if the attempt was unsuccessful.
11441            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
11442        }
11443    }
11444}
11445
11446/// Includes various configuration options for a workflow invocation.
11447/// If both `included_targets` and `included_tags` are unset, all actions
11448/// will be included.
11449#[derive(Clone, Default, PartialEq)]
11450#[non_exhaustive]
11451pub struct InvocationConfig {
11452    /// Optional. The set of action identifiers to include.
11453    pub included_targets: std::vec::Vec<crate::model::Target>,
11454
11455    /// Optional. The set of tags to include.
11456    pub included_tags: std::vec::Vec<std::string::String>,
11457
11458    /// Optional. When set to true, transitive dependencies of included actions
11459    /// will be executed.
11460    pub transitive_dependencies_included: bool,
11461
11462    /// Optional. When set to true, transitive dependents of included actions will
11463    /// be executed.
11464    pub transitive_dependents_included: bool,
11465
11466    /// Optional. When set to true, any incremental tables will be fully refreshed.
11467    pub fully_refresh_incremental_tables_enabled: bool,
11468
11469    /// Optional. The service account to run workflow invocations under.
11470    pub service_account: std::string::String,
11471
11472    /// Optional. Specifies the priority for query execution in BigQuery.
11473    /// More information can be found at
11474    /// <https://cloud.google.com/bigquery/docs/running-queries#queries>.
11475    pub query_priority: std::option::Option<crate::model::invocation_config::QueryPriority>,
11476
11477    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11478}
11479
11480impl InvocationConfig {
11481    /// Creates a new default instance.
11482    pub fn new() -> Self {
11483        std::default::Default::default()
11484    }
11485
11486    /// Sets the value of [included_targets][crate::model::InvocationConfig::included_targets].
11487    ///
11488    /// # Example
11489    /// ```ignore,no_run
11490    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11491    /// use google_cloud_dataform_v1::model::Target;
11492    /// let x = InvocationConfig::new()
11493    ///     .set_included_targets([
11494    ///         Target::default()/* use setters */,
11495    ///         Target::default()/* use (different) setters */,
11496    ///     ]);
11497    /// ```
11498    pub fn set_included_targets<T, V>(mut self, v: T) -> Self
11499    where
11500        T: std::iter::IntoIterator<Item = V>,
11501        V: std::convert::Into<crate::model::Target>,
11502    {
11503        use std::iter::Iterator;
11504        self.included_targets = v.into_iter().map(|i| i.into()).collect();
11505        self
11506    }
11507
11508    /// Sets the value of [included_tags][crate::model::InvocationConfig::included_tags].
11509    ///
11510    /// # Example
11511    /// ```ignore,no_run
11512    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11513    /// let x = InvocationConfig::new().set_included_tags(["a", "b", "c"]);
11514    /// ```
11515    pub fn set_included_tags<T, V>(mut self, v: T) -> Self
11516    where
11517        T: std::iter::IntoIterator<Item = V>,
11518        V: std::convert::Into<std::string::String>,
11519    {
11520        use std::iter::Iterator;
11521        self.included_tags = v.into_iter().map(|i| i.into()).collect();
11522        self
11523    }
11524
11525    /// Sets the value of [transitive_dependencies_included][crate::model::InvocationConfig::transitive_dependencies_included].
11526    ///
11527    /// # Example
11528    /// ```ignore,no_run
11529    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11530    /// let x = InvocationConfig::new().set_transitive_dependencies_included(true);
11531    /// ```
11532    pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
11533        mut self,
11534        v: T,
11535    ) -> Self {
11536        self.transitive_dependencies_included = v.into();
11537        self
11538    }
11539
11540    /// Sets the value of [transitive_dependents_included][crate::model::InvocationConfig::transitive_dependents_included].
11541    ///
11542    /// # Example
11543    /// ```ignore,no_run
11544    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11545    /// let x = InvocationConfig::new().set_transitive_dependents_included(true);
11546    /// ```
11547    pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11548        self.transitive_dependents_included = v.into();
11549        self
11550    }
11551
11552    /// Sets the value of [fully_refresh_incremental_tables_enabled][crate::model::InvocationConfig::fully_refresh_incremental_tables_enabled].
11553    ///
11554    /// # Example
11555    /// ```ignore,no_run
11556    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11557    /// let x = InvocationConfig::new().set_fully_refresh_incremental_tables_enabled(true);
11558    /// ```
11559    pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
11560        mut self,
11561        v: T,
11562    ) -> Self {
11563        self.fully_refresh_incremental_tables_enabled = v.into();
11564        self
11565    }
11566
11567    /// Sets the value of [service_account][crate::model::InvocationConfig::service_account].
11568    ///
11569    /// # Example
11570    /// ```ignore,no_run
11571    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11572    /// let x = InvocationConfig::new().set_service_account("example");
11573    /// ```
11574    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11575        self.service_account = v.into();
11576        self
11577    }
11578
11579    /// Sets the value of [query_priority][crate::model::InvocationConfig::query_priority].
11580    ///
11581    /// # Example
11582    /// ```ignore,no_run
11583    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11584    /// use google_cloud_dataform_v1::model::invocation_config::QueryPriority;
11585    /// let x0 = InvocationConfig::new().set_query_priority(QueryPriority::Interactive);
11586    /// let x1 = InvocationConfig::new().set_query_priority(QueryPriority::Batch);
11587    /// ```
11588    pub fn set_query_priority<T>(mut self, v: T) -> Self
11589    where
11590        T: std::convert::Into<crate::model::invocation_config::QueryPriority>,
11591    {
11592        self.query_priority = std::option::Option::Some(v.into());
11593        self
11594    }
11595
11596    /// Sets or clears the value of [query_priority][crate::model::InvocationConfig::query_priority].
11597    ///
11598    /// # Example
11599    /// ```ignore,no_run
11600    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11601    /// use google_cloud_dataform_v1::model::invocation_config::QueryPriority;
11602    /// let x0 = InvocationConfig::new().set_or_clear_query_priority(Some(QueryPriority::Interactive));
11603    /// let x1 = InvocationConfig::new().set_or_clear_query_priority(Some(QueryPriority::Batch));
11604    /// let x_none = InvocationConfig::new().set_or_clear_query_priority(None::<QueryPriority>);
11605    /// ```
11606    pub fn set_or_clear_query_priority<T>(mut self, v: std::option::Option<T>) -> Self
11607    where
11608        T: std::convert::Into<crate::model::invocation_config::QueryPriority>,
11609    {
11610        self.query_priority = v.map(|x| x.into());
11611        self
11612    }
11613}
11614
11615impl wkt::message::Message for InvocationConfig {
11616    fn typename() -> &'static str {
11617        "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
11618    }
11619}
11620
11621/// Defines additional types related to [InvocationConfig].
11622pub mod invocation_config {
11623    #[allow(unused_imports)]
11624    use super::*;
11625
11626    /// Types of priority for query execution in BigQuery.
11627    ///
11628    /// # Working with unknown values
11629    ///
11630    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11631    /// additional enum variants at any time. Adding new variants is not considered
11632    /// a breaking change. Applications should write their code in anticipation of:
11633    ///
11634    /// - New values appearing in future releases of the client library, **and**
11635    /// - New values received dynamically, without application changes.
11636    ///
11637    /// Please consult the [Working with enums] section in the user guide for some
11638    /// guidelines.
11639    ///
11640    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11641    #[derive(Clone, Debug, PartialEq)]
11642    #[non_exhaustive]
11643    pub enum QueryPriority {
11644        /// Default value. This value is unused.
11645        Unspecified,
11646        /// Query will be executed in BigQuery with interactive priority.
11647        /// More information can be found at
11648        /// <https://cloud.google.com/bigquery/docs/running-queries#queries>.
11649        Interactive,
11650        /// Query will be executed in BigQuery with batch priority.
11651        /// More information can be found at
11652        /// <https://cloud.google.com/bigquery/docs/running-queries#batchqueries>.
11653        Batch,
11654        /// If set, the enum was initialized with an unknown value.
11655        ///
11656        /// Applications can examine the value using [QueryPriority::value] or
11657        /// [QueryPriority::name].
11658        UnknownValue(query_priority::UnknownValue),
11659    }
11660
11661    #[doc(hidden)]
11662    pub mod query_priority {
11663        #[allow(unused_imports)]
11664        use super::*;
11665        #[derive(Clone, Debug, PartialEq)]
11666        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11667    }
11668
11669    impl QueryPriority {
11670        /// Gets the enum value.
11671        ///
11672        /// Returns `None` if the enum contains an unknown value deserialized from
11673        /// the string representation of enums.
11674        pub fn value(&self) -> std::option::Option<i32> {
11675            match self {
11676                Self::Unspecified => std::option::Option::Some(0),
11677                Self::Interactive => std::option::Option::Some(1),
11678                Self::Batch => std::option::Option::Some(2),
11679                Self::UnknownValue(u) => u.0.value(),
11680            }
11681        }
11682
11683        /// Gets the enum value as a string.
11684        ///
11685        /// Returns `None` if the enum contains an unknown value deserialized from
11686        /// the integer representation of enums.
11687        pub fn name(&self) -> std::option::Option<&str> {
11688            match self {
11689                Self::Unspecified => std::option::Option::Some("QUERY_PRIORITY_UNSPECIFIED"),
11690                Self::Interactive => std::option::Option::Some("INTERACTIVE"),
11691                Self::Batch => std::option::Option::Some("BATCH"),
11692                Self::UnknownValue(u) => u.0.name(),
11693            }
11694        }
11695    }
11696
11697    impl std::default::Default for QueryPriority {
11698        fn default() -> Self {
11699            use std::convert::From;
11700            Self::from(0)
11701        }
11702    }
11703
11704    impl std::fmt::Display for QueryPriority {
11705        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11706            wkt::internal::display_enum(f, self.name(), self.value())
11707        }
11708    }
11709
11710    impl std::convert::From<i32> for QueryPriority {
11711        fn from(value: i32) -> Self {
11712            match value {
11713                0 => Self::Unspecified,
11714                1 => Self::Interactive,
11715                2 => Self::Batch,
11716                _ => Self::UnknownValue(query_priority::UnknownValue(
11717                    wkt::internal::UnknownEnumValue::Integer(value),
11718                )),
11719            }
11720        }
11721    }
11722
11723    impl std::convert::From<&str> for QueryPriority {
11724        fn from(value: &str) -> Self {
11725            use std::string::ToString;
11726            match value {
11727                "QUERY_PRIORITY_UNSPECIFIED" => Self::Unspecified,
11728                "INTERACTIVE" => Self::Interactive,
11729                "BATCH" => Self::Batch,
11730                _ => Self::UnknownValue(query_priority::UnknownValue(
11731                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11732                )),
11733            }
11734        }
11735    }
11736
11737    impl serde::ser::Serialize for QueryPriority {
11738        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11739        where
11740            S: serde::Serializer,
11741        {
11742            match self {
11743                Self::Unspecified => serializer.serialize_i32(0),
11744                Self::Interactive => serializer.serialize_i32(1),
11745                Self::Batch => serializer.serialize_i32(2),
11746                Self::UnknownValue(u) => u.0.serialize(serializer),
11747            }
11748        }
11749    }
11750
11751    impl<'de> serde::de::Deserialize<'de> for QueryPriority {
11752        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11753        where
11754            D: serde::Deserializer<'de>,
11755        {
11756            deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryPriority>::new(
11757                ".google.cloud.dataform.v1.InvocationConfig.QueryPriority",
11758            ))
11759        }
11760    }
11761}
11762
11763/// `ListWorkflowConfigs` request message.
11764#[derive(Clone, Default, PartialEq)]
11765#[non_exhaustive]
11766pub struct ListWorkflowConfigsRequest {
11767    /// Required. The repository in which to list workflow configs. Must be in the
11768    /// format `projects/*/locations/*/repositories/*`.
11769    pub parent: std::string::String,
11770
11771    /// Optional. Maximum number of workflow configs to return. The server may
11772    /// return fewer items than requested. If unspecified, the server will pick an
11773    /// appropriate default.
11774    pub page_size: i32,
11775
11776    /// Optional. Page token received from a previous `ListWorkflowConfigs` call.
11777    /// Provide this to retrieve the subsequent page.
11778    ///
11779    /// When paginating, all other parameters provided to `ListWorkflowConfigs`,
11780    /// with the exception of `page_size`, must match the call that provided the
11781    /// page token.
11782    pub page_token: std::string::String,
11783
11784    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11785}
11786
11787impl ListWorkflowConfigsRequest {
11788    /// Creates a new default instance.
11789    pub fn new() -> Self {
11790        std::default::Default::default()
11791    }
11792
11793    /// Sets the value of [parent][crate::model::ListWorkflowConfigsRequest::parent].
11794    ///
11795    /// # Example
11796    /// ```ignore,no_run
11797    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11798    /// # let project_id = "project_id";
11799    /// # let location_id = "location_id";
11800    /// # let repository_id = "repository_id";
11801    /// let x = ListWorkflowConfigsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
11802    /// ```
11803    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11804        self.parent = v.into();
11805        self
11806    }
11807
11808    /// Sets the value of [page_size][crate::model::ListWorkflowConfigsRequest::page_size].
11809    ///
11810    /// # Example
11811    /// ```ignore,no_run
11812    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11813    /// let x = ListWorkflowConfigsRequest::new().set_page_size(42);
11814    /// ```
11815    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11816        self.page_size = v.into();
11817        self
11818    }
11819
11820    /// Sets the value of [page_token][crate::model::ListWorkflowConfigsRequest::page_token].
11821    ///
11822    /// # Example
11823    /// ```ignore,no_run
11824    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11825    /// let x = ListWorkflowConfigsRequest::new().set_page_token("example");
11826    /// ```
11827    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11828        self.page_token = v.into();
11829        self
11830    }
11831}
11832
11833impl wkt::message::Message for ListWorkflowConfigsRequest {
11834    fn typename() -> &'static str {
11835        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
11836    }
11837}
11838
11839/// `ListWorkflowConfigs` response message.
11840#[derive(Clone, Default, PartialEq)]
11841#[non_exhaustive]
11842pub struct ListWorkflowConfigsResponse {
11843    /// List of workflow configs.
11844    pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
11845
11846    /// A token, which can be sent as `page_token` to retrieve the next page.
11847    /// If this field is omitted, there are no subsequent pages.
11848    pub next_page_token: std::string::String,
11849
11850    /// Locations which could not be reached.
11851    pub unreachable: std::vec::Vec<std::string::String>,
11852
11853    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11854}
11855
11856impl ListWorkflowConfigsResponse {
11857    /// Creates a new default instance.
11858    pub fn new() -> Self {
11859        std::default::Default::default()
11860    }
11861
11862    /// Sets the value of [workflow_configs][crate::model::ListWorkflowConfigsResponse::workflow_configs].
11863    ///
11864    /// # Example
11865    /// ```ignore,no_run
11866    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11867    /// use google_cloud_dataform_v1::model::WorkflowConfig;
11868    /// let x = ListWorkflowConfigsResponse::new()
11869    ///     .set_workflow_configs([
11870    ///         WorkflowConfig::default()/* use setters */,
11871    ///         WorkflowConfig::default()/* use (different) setters */,
11872    ///     ]);
11873    /// ```
11874    pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
11875    where
11876        T: std::iter::IntoIterator<Item = V>,
11877        V: std::convert::Into<crate::model::WorkflowConfig>,
11878    {
11879        use std::iter::Iterator;
11880        self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
11881        self
11882    }
11883
11884    /// Sets the value of [next_page_token][crate::model::ListWorkflowConfigsResponse::next_page_token].
11885    ///
11886    /// # Example
11887    /// ```ignore,no_run
11888    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11889    /// let x = ListWorkflowConfigsResponse::new().set_next_page_token("example");
11890    /// ```
11891    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11892        self.next_page_token = v.into();
11893        self
11894    }
11895
11896    /// Sets the value of [unreachable][crate::model::ListWorkflowConfigsResponse::unreachable].
11897    ///
11898    /// # Example
11899    /// ```ignore,no_run
11900    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11901    /// let x = ListWorkflowConfigsResponse::new().set_unreachable(["a", "b", "c"]);
11902    /// ```
11903    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
11904    where
11905        T: std::iter::IntoIterator<Item = V>,
11906        V: std::convert::Into<std::string::String>,
11907    {
11908        use std::iter::Iterator;
11909        self.unreachable = v.into_iter().map(|i| i.into()).collect();
11910        self
11911    }
11912}
11913
11914impl wkt::message::Message for ListWorkflowConfigsResponse {
11915    fn typename() -> &'static str {
11916        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
11917    }
11918}
11919
11920#[doc(hidden)]
11921impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
11922    type PageItem = crate::model::WorkflowConfig;
11923
11924    fn items(self) -> std::vec::Vec<Self::PageItem> {
11925        self.workflow_configs
11926    }
11927
11928    fn next_page_token(&self) -> std::string::String {
11929        use std::clone::Clone;
11930        self.next_page_token.clone()
11931    }
11932}
11933
11934/// `GetWorkflowConfig` request message.
11935#[derive(Clone, Default, PartialEq)]
11936#[non_exhaustive]
11937pub struct GetWorkflowConfigRequest {
11938    /// Required. The workflow config's name.
11939    pub name: std::string::String,
11940
11941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11942}
11943
11944impl GetWorkflowConfigRequest {
11945    /// Creates a new default instance.
11946    pub fn new() -> Self {
11947        std::default::Default::default()
11948    }
11949
11950    /// Sets the value of [name][crate::model::GetWorkflowConfigRequest::name].
11951    ///
11952    /// # Example
11953    /// ```ignore,no_run
11954    /// # use google_cloud_dataform_v1::model::GetWorkflowConfigRequest;
11955    /// # let project_id = "project_id";
11956    /// # let location_id = "location_id";
11957    /// # let repository_id = "repository_id";
11958    /// # let workflow_config_id = "workflow_config_id";
11959    /// let x = GetWorkflowConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
11960    /// ```
11961    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11962        self.name = v.into();
11963        self
11964    }
11965}
11966
11967impl wkt::message::Message for GetWorkflowConfigRequest {
11968    fn typename() -> &'static str {
11969        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
11970    }
11971}
11972
11973/// `CreateWorkflowConfig` request message.
11974#[derive(Clone, Default, PartialEq)]
11975#[non_exhaustive]
11976pub struct CreateWorkflowConfigRequest {
11977    /// Required. The repository in which to create the workflow config. Must be in
11978    /// the format `projects/*/locations/*/repositories/*`.
11979    pub parent: std::string::String,
11980
11981    /// Required. The workflow config to create.
11982    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
11983
11984    /// Required. The ID to use for the workflow config, which will become the
11985    /// final component of the workflow config's resource name.
11986    pub workflow_config_id: std::string::String,
11987
11988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11989}
11990
11991impl CreateWorkflowConfigRequest {
11992    /// Creates a new default instance.
11993    pub fn new() -> Self {
11994        std::default::Default::default()
11995    }
11996
11997    /// Sets the value of [parent][crate::model::CreateWorkflowConfigRequest::parent].
11998    ///
11999    /// # Example
12000    /// ```ignore,no_run
12001    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12002    /// # let project_id = "project_id";
12003    /// # let location_id = "location_id";
12004    /// # let repository_id = "repository_id";
12005    /// let x = CreateWorkflowConfigRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
12006    /// ```
12007    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12008        self.parent = v.into();
12009        self
12010    }
12011
12012    /// Sets the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
12013    ///
12014    /// # Example
12015    /// ```ignore,no_run
12016    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12017    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12018    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
12019    /// ```
12020    pub fn set_workflow_config<T>(mut self, v: T) -> Self
12021    where
12022        T: std::convert::Into<crate::model::WorkflowConfig>,
12023    {
12024        self.workflow_config = std::option::Option::Some(v.into());
12025        self
12026    }
12027
12028    /// Sets or clears the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
12029    ///
12030    /// # Example
12031    /// ```ignore,no_run
12032    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12033    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12034    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
12035    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
12036    /// ```
12037    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
12038    where
12039        T: std::convert::Into<crate::model::WorkflowConfig>,
12040    {
12041        self.workflow_config = v.map(|x| x.into());
12042        self
12043    }
12044
12045    /// Sets the value of [workflow_config_id][crate::model::CreateWorkflowConfigRequest::workflow_config_id].
12046    ///
12047    /// # Example
12048    /// ```ignore,no_run
12049    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12050    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config_id("example");
12051    /// ```
12052    pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
12053        mut self,
12054        v: T,
12055    ) -> Self {
12056        self.workflow_config_id = v.into();
12057        self
12058    }
12059}
12060
12061impl wkt::message::Message for CreateWorkflowConfigRequest {
12062    fn typename() -> &'static str {
12063        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
12064    }
12065}
12066
12067/// `UpdateWorkflowConfig` request message.
12068#[derive(Clone, Default, PartialEq)]
12069#[non_exhaustive]
12070pub struct UpdateWorkflowConfigRequest {
12071    /// Optional. Specifies the fields to be updated in the workflow config. If
12072    /// left unset, all fields will be updated.
12073    pub update_mask: std::option::Option<wkt::FieldMask>,
12074
12075    /// Required. The workflow config to update.
12076    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
12077
12078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12079}
12080
12081impl UpdateWorkflowConfigRequest {
12082    /// Creates a new default instance.
12083    pub fn new() -> Self {
12084        std::default::Default::default()
12085    }
12086
12087    /// Sets the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
12088    ///
12089    /// # Example
12090    /// ```ignore,no_run
12091    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12092    /// use wkt::FieldMask;
12093    /// let x = UpdateWorkflowConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
12094    /// ```
12095    pub fn set_update_mask<T>(mut self, v: T) -> Self
12096    where
12097        T: std::convert::Into<wkt::FieldMask>,
12098    {
12099        self.update_mask = std::option::Option::Some(v.into());
12100        self
12101    }
12102
12103    /// Sets or clears the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
12104    ///
12105    /// # Example
12106    /// ```ignore,no_run
12107    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12108    /// use wkt::FieldMask;
12109    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
12110    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
12111    /// ```
12112    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12113    where
12114        T: std::convert::Into<wkt::FieldMask>,
12115    {
12116        self.update_mask = v.map(|x| x.into());
12117        self
12118    }
12119
12120    /// Sets the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
12121    ///
12122    /// # Example
12123    /// ```ignore,no_run
12124    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12125    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12126    /// let x = UpdateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
12127    /// ```
12128    pub fn set_workflow_config<T>(mut self, v: T) -> Self
12129    where
12130        T: std::convert::Into<crate::model::WorkflowConfig>,
12131    {
12132        self.workflow_config = std::option::Option::Some(v.into());
12133        self
12134    }
12135
12136    /// Sets or clears the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
12137    ///
12138    /// # Example
12139    /// ```ignore,no_run
12140    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12141    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12142    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
12143    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
12144    /// ```
12145    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
12146    where
12147        T: std::convert::Into<crate::model::WorkflowConfig>,
12148    {
12149        self.workflow_config = v.map(|x| x.into());
12150        self
12151    }
12152}
12153
12154impl wkt::message::Message for UpdateWorkflowConfigRequest {
12155    fn typename() -> &'static str {
12156        "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
12157    }
12158}
12159
12160/// `DeleteWorkflowConfig` request message.
12161#[derive(Clone, Default, PartialEq)]
12162#[non_exhaustive]
12163pub struct DeleteWorkflowConfigRequest {
12164    /// Required. The workflow config's name.
12165    pub name: std::string::String,
12166
12167    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12168}
12169
12170impl DeleteWorkflowConfigRequest {
12171    /// Creates a new default instance.
12172    pub fn new() -> Self {
12173        std::default::Default::default()
12174    }
12175
12176    /// Sets the value of [name][crate::model::DeleteWorkflowConfigRequest::name].
12177    ///
12178    /// # Example
12179    /// ```ignore,no_run
12180    /// # use google_cloud_dataform_v1::model::DeleteWorkflowConfigRequest;
12181    /// # let project_id = "project_id";
12182    /// # let location_id = "location_id";
12183    /// # let repository_id = "repository_id";
12184    /// # let workflow_config_id = "workflow_config_id";
12185    /// let x = DeleteWorkflowConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
12186    /// ```
12187    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12188        self.name = v.into();
12189        self
12190    }
12191}
12192
12193impl wkt::message::Message for DeleteWorkflowConfigRequest {
12194    fn typename() -> &'static str {
12195        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
12196    }
12197}
12198
12199/// Represents a single invocation of a compilation result.
12200#[derive(Clone, Default, PartialEq)]
12201#[non_exhaustive]
12202pub struct WorkflowInvocation {
12203    /// Output only. The workflow invocation's name.
12204    pub name: std::string::String,
12205
12206    /// Immutable. If left unset, a default InvocationConfig will be used.
12207    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
12208
12209    /// Output only. This workflow invocation's current state.
12210    pub state: crate::model::workflow_invocation::State,
12211
12212    /// Output only. This workflow invocation's timing details.
12213    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
12214
12215    /// Output only. The resolved compilation result that was used to create this
12216    /// invocation. Will be in the format
12217    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
12218    pub resolved_compilation_result: std::string::String,
12219
12220    /// Output only. Only set if the repository has a KMS Key.
12221    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
12222
12223    /// Output only. All the metadata information that is used internally to serve
12224    /// the resource. For example: timestamps, flags, status fields, etc. The
12225    /// format of this field is a JSON string.
12226    pub internal_metadata: std::option::Option<std::string::String>,
12227
12228    /// Output only. Metadata indicating whether this resource is user-scoped.
12229    /// `WorkflowInvocation` resource is `user_scoped` only if it is sourced
12230    /// from a compilation result and the compilation result is user-scoped.
12231    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
12232
12233    /// The source of the compilation result to use for this invocation.
12234    pub compilation_source:
12235        std::option::Option<crate::model::workflow_invocation::CompilationSource>,
12236
12237    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12238}
12239
12240impl WorkflowInvocation {
12241    /// Creates a new default instance.
12242    pub fn new() -> Self {
12243        std::default::Default::default()
12244    }
12245
12246    /// Sets the value of [name][crate::model::WorkflowInvocation::name].
12247    ///
12248    /// # Example
12249    /// ```ignore,no_run
12250    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12251    /// # let project_id = "project_id";
12252    /// # let location_id = "location_id";
12253    /// # let repository_id = "repository_id";
12254    /// # let workflow_invocation_id = "workflow_invocation_id";
12255    /// let x = WorkflowInvocation::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
12256    /// ```
12257    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12258        self.name = v.into();
12259        self
12260    }
12261
12262    /// Sets the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
12263    ///
12264    /// # Example
12265    /// ```ignore,no_run
12266    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12267    /// use google_cloud_dataform_v1::model::InvocationConfig;
12268    /// let x = WorkflowInvocation::new().set_invocation_config(InvocationConfig::default()/* use setters */);
12269    /// ```
12270    pub fn set_invocation_config<T>(mut self, v: T) -> Self
12271    where
12272        T: std::convert::Into<crate::model::InvocationConfig>,
12273    {
12274        self.invocation_config = std::option::Option::Some(v.into());
12275        self
12276    }
12277
12278    /// Sets or clears the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
12279    ///
12280    /// # Example
12281    /// ```ignore,no_run
12282    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12283    /// use google_cloud_dataform_v1::model::InvocationConfig;
12284    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
12285    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(None::<InvocationConfig>);
12286    /// ```
12287    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
12288    where
12289        T: std::convert::Into<crate::model::InvocationConfig>,
12290    {
12291        self.invocation_config = v.map(|x| x.into());
12292        self
12293    }
12294
12295    /// Sets the value of [state][crate::model::WorkflowInvocation::state].
12296    ///
12297    /// # Example
12298    /// ```ignore,no_run
12299    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12300    /// use google_cloud_dataform_v1::model::workflow_invocation::State;
12301    /// let x0 = WorkflowInvocation::new().set_state(State::Running);
12302    /// let x1 = WorkflowInvocation::new().set_state(State::Succeeded);
12303    /// let x2 = WorkflowInvocation::new().set_state(State::Cancelled);
12304    /// ```
12305    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
12306        mut self,
12307        v: T,
12308    ) -> Self {
12309        self.state = v.into();
12310        self
12311    }
12312
12313    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
12314    ///
12315    /// # Example
12316    /// ```ignore,no_run
12317    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12318    /// use google_cloud_type::model::Interval;
12319    /// let x = WorkflowInvocation::new().set_invocation_timing(Interval::default()/* use setters */);
12320    /// ```
12321    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
12322    where
12323        T: std::convert::Into<google_cloud_type::model::Interval>,
12324    {
12325        self.invocation_timing = std::option::Option::Some(v.into());
12326        self
12327    }
12328
12329    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
12330    ///
12331    /// # Example
12332    /// ```ignore,no_run
12333    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12334    /// use google_cloud_type::model::Interval;
12335    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
12336    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(None::<Interval>);
12337    /// ```
12338    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
12339    where
12340        T: std::convert::Into<google_cloud_type::model::Interval>,
12341    {
12342        self.invocation_timing = v.map(|x| x.into());
12343        self
12344    }
12345
12346    /// Sets the value of [resolved_compilation_result][crate::model::WorkflowInvocation::resolved_compilation_result].
12347    ///
12348    /// # Example
12349    /// ```ignore,no_run
12350    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12351    /// # let project_id = "project_id";
12352    /// # let location_id = "location_id";
12353    /// # let repository_id = "repository_id";
12354    /// # let compilation_result_id = "compilation_result_id";
12355    /// let x = WorkflowInvocation::new().set_resolved_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
12356    /// ```
12357    pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
12358        mut self,
12359        v: T,
12360    ) -> Self {
12361        self.resolved_compilation_result = v.into();
12362        self
12363    }
12364
12365    /// Sets the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
12366    ///
12367    /// # Example
12368    /// ```ignore,no_run
12369    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12370    /// use google_cloud_dataform_v1::model::DataEncryptionState;
12371    /// let x = WorkflowInvocation::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
12372    /// ```
12373    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
12374    where
12375        T: std::convert::Into<crate::model::DataEncryptionState>,
12376    {
12377        self.data_encryption_state = std::option::Option::Some(v.into());
12378        self
12379    }
12380
12381    /// Sets or clears the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
12382    ///
12383    /// # Example
12384    /// ```ignore,no_run
12385    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12386    /// use google_cloud_dataform_v1::model::DataEncryptionState;
12387    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
12388    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
12389    /// ```
12390    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
12391    where
12392        T: std::convert::Into<crate::model::DataEncryptionState>,
12393    {
12394        self.data_encryption_state = v.map(|x| x.into());
12395        self
12396    }
12397
12398    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
12399    ///
12400    /// # Example
12401    /// ```ignore,no_run
12402    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12403    /// let x = WorkflowInvocation::new().set_internal_metadata("example");
12404    /// ```
12405    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
12406    where
12407        T: std::convert::Into<std::string::String>,
12408    {
12409        self.internal_metadata = std::option::Option::Some(v.into());
12410        self
12411    }
12412
12413    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
12414    ///
12415    /// # Example
12416    /// ```ignore,no_run
12417    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12418    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(Some("example"));
12419    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(None::<String>);
12420    /// ```
12421    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12422    where
12423        T: std::convert::Into<std::string::String>,
12424    {
12425        self.internal_metadata = v.map(|x| x.into());
12426        self
12427    }
12428
12429    /// Sets the value of [private_resource_metadata][crate::model::WorkflowInvocation::private_resource_metadata].
12430    ///
12431    /// # Example
12432    /// ```ignore,no_run
12433    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12434    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
12435    /// let x = WorkflowInvocation::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
12436    /// ```
12437    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
12438    where
12439        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
12440    {
12441        self.private_resource_metadata = std::option::Option::Some(v.into());
12442        self
12443    }
12444
12445    /// Sets or clears the value of [private_resource_metadata][crate::model::WorkflowInvocation::private_resource_metadata].
12446    ///
12447    /// # Example
12448    /// ```ignore,no_run
12449    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12450    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
12451    /// let x = WorkflowInvocation::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
12452    /// let x = WorkflowInvocation::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
12453    /// ```
12454    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12455    where
12456        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
12457    {
12458        self.private_resource_metadata = v.map(|x| x.into());
12459        self
12460    }
12461
12462    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source].
12463    ///
12464    /// Note that all the setters affecting `compilation_source` are mutually
12465    /// exclusive.
12466    ///
12467    /// # Example
12468    /// ```ignore,no_run
12469    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12470    /// use google_cloud_dataform_v1::model::workflow_invocation::CompilationSource;
12471    /// let x = WorkflowInvocation::new().set_compilation_source(Some(CompilationSource::CompilationResult("example".to_string())));
12472    /// ```
12473    pub fn set_compilation_source<
12474        T: std::convert::Into<
12475                std::option::Option<crate::model::workflow_invocation::CompilationSource>,
12476            >,
12477    >(
12478        mut self,
12479        v: T,
12480    ) -> Self {
12481        self.compilation_source = v.into();
12482        self
12483    }
12484
12485    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12486    /// if it holds a `CompilationResult`, `None` if the field is not set or
12487    /// holds a different branch.
12488    pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
12489        #[allow(unreachable_patterns)]
12490        self.compilation_source.as_ref().and_then(|v| match v {
12491            crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
12492                std::option::Option::Some(v)
12493            }
12494            _ => std::option::Option::None,
12495        })
12496    }
12497
12498    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12499    /// to hold a `CompilationResult`.
12500    ///
12501    /// Note that all the setters affecting `compilation_source` are
12502    /// mutually exclusive.
12503    ///
12504    /// # Example
12505    /// ```ignore,no_run
12506    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12507    /// # let project_id = "project_id";
12508    /// # let location_id = "location_id";
12509    /// # let repository_id = "repository_id";
12510    /// # let compilation_result_id = "compilation_result_id";
12511    /// let x = WorkflowInvocation::new().set_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
12512    /// assert!(x.compilation_result().is_some());
12513    /// assert!(x.workflow_config().is_none());
12514    /// ```
12515    pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
12516        mut self,
12517        v: T,
12518    ) -> Self {
12519        self.compilation_source = std::option::Option::Some(
12520            crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
12521        );
12522        self
12523    }
12524
12525    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12526    /// if it holds a `WorkflowConfig`, `None` if the field is not set or
12527    /// holds a different branch.
12528    pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
12529        #[allow(unreachable_patterns)]
12530        self.compilation_source.as_ref().and_then(|v| match v {
12531            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
12532                std::option::Option::Some(v)
12533            }
12534            _ => std::option::Option::None,
12535        })
12536    }
12537
12538    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12539    /// to hold a `WorkflowConfig`.
12540    ///
12541    /// Note that all the setters affecting `compilation_source` are
12542    /// mutually exclusive.
12543    ///
12544    /// # Example
12545    /// ```ignore,no_run
12546    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12547    /// # let project_id = "project_id";
12548    /// # let location_id = "location_id";
12549    /// # let repository_id = "repository_id";
12550    /// # let workflow_config_id = "workflow_config_id";
12551    /// let x = WorkflowInvocation::new().set_workflow_config(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
12552    /// assert!(x.workflow_config().is_some());
12553    /// assert!(x.compilation_result().is_none());
12554    /// ```
12555    pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12556        self.compilation_source = std::option::Option::Some(
12557            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
12558        );
12559        self
12560    }
12561}
12562
12563impl wkt::message::Message for WorkflowInvocation {
12564    fn typename() -> &'static str {
12565        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
12566    }
12567}
12568
12569/// Defines additional types related to [WorkflowInvocation].
12570pub mod workflow_invocation {
12571    #[allow(unused_imports)]
12572    use super::*;
12573
12574    /// Represents the current state of a workflow invocation.
12575    ///
12576    /// # Working with unknown values
12577    ///
12578    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12579    /// additional enum variants at any time. Adding new variants is not considered
12580    /// a breaking change. Applications should write their code in anticipation of:
12581    ///
12582    /// - New values appearing in future releases of the client library, **and**
12583    /// - New values received dynamically, without application changes.
12584    ///
12585    /// Please consult the [Working with enums] section in the user guide for some
12586    /// guidelines.
12587    ///
12588    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12589    #[derive(Clone, Debug, PartialEq)]
12590    #[non_exhaustive]
12591    pub enum State {
12592        /// Default value. This value is unused.
12593        Unspecified,
12594        /// The workflow invocation is currently running.
12595        Running,
12596        /// The workflow invocation succeeded. A terminal state.
12597        Succeeded,
12598        /// The workflow invocation was cancelled. A terminal state.
12599        Cancelled,
12600        /// The workflow invocation failed. A terminal state.
12601        Failed,
12602        /// The workflow invocation is being cancelled, but some actions are still
12603        /// running.
12604        Canceling,
12605        /// If set, the enum was initialized with an unknown value.
12606        ///
12607        /// Applications can examine the value using [State::value] or
12608        /// [State::name].
12609        UnknownValue(state::UnknownValue),
12610    }
12611
12612    #[doc(hidden)]
12613    pub mod state {
12614        #[allow(unused_imports)]
12615        use super::*;
12616        #[derive(Clone, Debug, PartialEq)]
12617        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12618    }
12619
12620    impl State {
12621        /// Gets the enum value.
12622        ///
12623        /// Returns `None` if the enum contains an unknown value deserialized from
12624        /// the string representation of enums.
12625        pub fn value(&self) -> std::option::Option<i32> {
12626            match self {
12627                Self::Unspecified => std::option::Option::Some(0),
12628                Self::Running => std::option::Option::Some(1),
12629                Self::Succeeded => std::option::Option::Some(2),
12630                Self::Cancelled => std::option::Option::Some(3),
12631                Self::Failed => std::option::Option::Some(4),
12632                Self::Canceling => std::option::Option::Some(5),
12633                Self::UnknownValue(u) => u.0.value(),
12634            }
12635        }
12636
12637        /// Gets the enum value as a string.
12638        ///
12639        /// Returns `None` if the enum contains an unknown value deserialized from
12640        /// the integer representation of enums.
12641        pub fn name(&self) -> std::option::Option<&str> {
12642            match self {
12643                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12644                Self::Running => std::option::Option::Some("RUNNING"),
12645                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12646                Self::Cancelled => std::option::Option::Some("CANCELLED"),
12647                Self::Failed => std::option::Option::Some("FAILED"),
12648                Self::Canceling => std::option::Option::Some("CANCELING"),
12649                Self::UnknownValue(u) => u.0.name(),
12650            }
12651        }
12652    }
12653
12654    impl std::default::Default for State {
12655        fn default() -> Self {
12656            use std::convert::From;
12657            Self::from(0)
12658        }
12659    }
12660
12661    impl std::fmt::Display for State {
12662        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12663            wkt::internal::display_enum(f, self.name(), self.value())
12664        }
12665    }
12666
12667    impl std::convert::From<i32> for State {
12668        fn from(value: i32) -> Self {
12669            match value {
12670                0 => Self::Unspecified,
12671                1 => Self::Running,
12672                2 => Self::Succeeded,
12673                3 => Self::Cancelled,
12674                4 => Self::Failed,
12675                5 => Self::Canceling,
12676                _ => Self::UnknownValue(state::UnknownValue(
12677                    wkt::internal::UnknownEnumValue::Integer(value),
12678                )),
12679            }
12680        }
12681    }
12682
12683    impl std::convert::From<&str> for State {
12684        fn from(value: &str) -> Self {
12685            use std::string::ToString;
12686            match value {
12687                "STATE_UNSPECIFIED" => Self::Unspecified,
12688                "RUNNING" => Self::Running,
12689                "SUCCEEDED" => Self::Succeeded,
12690                "CANCELLED" => Self::Cancelled,
12691                "FAILED" => Self::Failed,
12692                "CANCELING" => Self::Canceling,
12693                _ => Self::UnknownValue(state::UnknownValue(
12694                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12695                )),
12696            }
12697        }
12698    }
12699
12700    impl serde::ser::Serialize for State {
12701        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12702        where
12703            S: serde::Serializer,
12704        {
12705            match self {
12706                Self::Unspecified => serializer.serialize_i32(0),
12707                Self::Running => serializer.serialize_i32(1),
12708                Self::Succeeded => serializer.serialize_i32(2),
12709                Self::Cancelled => serializer.serialize_i32(3),
12710                Self::Failed => serializer.serialize_i32(4),
12711                Self::Canceling => serializer.serialize_i32(5),
12712                Self::UnknownValue(u) => u.0.serialize(serializer),
12713            }
12714        }
12715    }
12716
12717    impl<'de> serde::de::Deserialize<'de> for State {
12718        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12719        where
12720            D: serde::Deserializer<'de>,
12721        {
12722            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12723                ".google.cloud.dataform.v1.WorkflowInvocation.State",
12724            ))
12725        }
12726    }
12727
12728    /// The source of the compilation result to use for this invocation.
12729    #[derive(Clone, Debug, PartialEq)]
12730    #[non_exhaustive]
12731    pub enum CompilationSource {
12732        /// Immutable. The name of the compilation result to use for this invocation.
12733        /// Must be in the format
12734        /// `projects/*/locations/*/repositories/*/compilationResults/*`.
12735        CompilationResult(std::string::String),
12736        /// Immutable. The name of the workflow config to invoke. Must be in the
12737        /// format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
12738        WorkflowConfig(std::string::String),
12739    }
12740}
12741
12742/// `ListWorkflowInvocations` request message.
12743#[derive(Clone, Default, PartialEq)]
12744#[non_exhaustive]
12745pub struct ListWorkflowInvocationsRequest {
12746    /// Required. The parent resource of the WorkflowInvocation type. Must be in
12747    /// the format `projects/*/locations/*/repositories/*`.
12748    pub parent: std::string::String,
12749
12750    /// Optional. Maximum number of workflow invocations to return. The server may
12751    /// return fewer items than requested. If unspecified, the server will pick an
12752    /// appropriate default.
12753    pub page_size: i32,
12754
12755    /// Optional. Page token received from a previous `ListWorkflowInvocations`
12756    /// call. Provide this to retrieve the subsequent page.
12757    ///
12758    /// When paginating, all other parameters provided to
12759    /// `ListWorkflowInvocations`, with the exception of `page_size`, must match
12760    /// the call that provided the page token.
12761    pub page_token: std::string::String,
12762
12763    /// Optional. This field only supports ordering by `name`. If unspecified, the
12764    /// server will choose the ordering. If specified, the default order is
12765    /// ascending for the `name` field.
12766    pub order_by: std::string::String,
12767
12768    /// Optional. Filter for the returned list.
12769    pub filter: std::string::String,
12770
12771    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12772}
12773
12774impl ListWorkflowInvocationsRequest {
12775    /// Creates a new default instance.
12776    pub fn new() -> Self {
12777        std::default::Default::default()
12778    }
12779
12780    /// Sets the value of [parent][crate::model::ListWorkflowInvocationsRequest::parent].
12781    ///
12782    /// # Example
12783    /// ```ignore,no_run
12784    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12785    /// # let project_id = "project_id";
12786    /// # let location_id = "location_id";
12787    /// # let repository_id = "repository_id";
12788    /// let x = ListWorkflowInvocationsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
12789    /// ```
12790    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12791        self.parent = v.into();
12792        self
12793    }
12794
12795    /// Sets the value of [page_size][crate::model::ListWorkflowInvocationsRequest::page_size].
12796    ///
12797    /// # Example
12798    /// ```ignore,no_run
12799    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12800    /// let x = ListWorkflowInvocationsRequest::new().set_page_size(42);
12801    /// ```
12802    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12803        self.page_size = v.into();
12804        self
12805    }
12806
12807    /// Sets the value of [page_token][crate::model::ListWorkflowInvocationsRequest::page_token].
12808    ///
12809    /// # Example
12810    /// ```ignore,no_run
12811    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12812    /// let x = ListWorkflowInvocationsRequest::new().set_page_token("example");
12813    /// ```
12814    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12815        self.page_token = v.into();
12816        self
12817    }
12818
12819    /// Sets the value of [order_by][crate::model::ListWorkflowInvocationsRequest::order_by].
12820    ///
12821    /// # Example
12822    /// ```ignore,no_run
12823    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12824    /// let x = ListWorkflowInvocationsRequest::new().set_order_by("example");
12825    /// ```
12826    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12827        self.order_by = v.into();
12828        self
12829    }
12830
12831    /// Sets the value of [filter][crate::model::ListWorkflowInvocationsRequest::filter].
12832    ///
12833    /// # Example
12834    /// ```ignore,no_run
12835    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12836    /// let x = ListWorkflowInvocationsRequest::new().set_filter("example");
12837    /// ```
12838    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12839        self.filter = v.into();
12840        self
12841    }
12842}
12843
12844impl wkt::message::Message for ListWorkflowInvocationsRequest {
12845    fn typename() -> &'static str {
12846        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
12847    }
12848}
12849
12850/// `ListWorkflowInvocations` response message.
12851#[derive(Clone, Default, PartialEq)]
12852#[non_exhaustive]
12853pub struct ListWorkflowInvocationsResponse {
12854    /// List of workflow invocations.
12855    pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
12856
12857    /// A token, which can be sent as `page_token` to retrieve the next page.
12858    /// If this field is omitted, there are no subsequent pages.
12859    pub next_page_token: std::string::String,
12860
12861    /// Locations which could not be reached.
12862    pub unreachable: std::vec::Vec<std::string::String>,
12863
12864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12865}
12866
12867impl ListWorkflowInvocationsResponse {
12868    /// Creates a new default instance.
12869    pub fn new() -> Self {
12870        std::default::Default::default()
12871    }
12872
12873    /// Sets the value of [workflow_invocations][crate::model::ListWorkflowInvocationsResponse::workflow_invocations].
12874    ///
12875    /// # Example
12876    /// ```ignore,no_run
12877    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12878    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
12879    /// let x = ListWorkflowInvocationsResponse::new()
12880    ///     .set_workflow_invocations([
12881    ///         WorkflowInvocation::default()/* use setters */,
12882    ///         WorkflowInvocation::default()/* use (different) setters */,
12883    ///     ]);
12884    /// ```
12885    pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
12886    where
12887        T: std::iter::IntoIterator<Item = V>,
12888        V: std::convert::Into<crate::model::WorkflowInvocation>,
12889    {
12890        use std::iter::Iterator;
12891        self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
12892        self
12893    }
12894
12895    /// Sets the value of [next_page_token][crate::model::ListWorkflowInvocationsResponse::next_page_token].
12896    ///
12897    /// # Example
12898    /// ```ignore,no_run
12899    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12900    /// let x = ListWorkflowInvocationsResponse::new().set_next_page_token("example");
12901    /// ```
12902    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12903        self.next_page_token = v.into();
12904        self
12905    }
12906
12907    /// Sets the value of [unreachable][crate::model::ListWorkflowInvocationsResponse::unreachable].
12908    ///
12909    /// # Example
12910    /// ```ignore,no_run
12911    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12912    /// let x = ListWorkflowInvocationsResponse::new().set_unreachable(["a", "b", "c"]);
12913    /// ```
12914    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
12915    where
12916        T: std::iter::IntoIterator<Item = V>,
12917        V: std::convert::Into<std::string::String>,
12918    {
12919        use std::iter::Iterator;
12920        self.unreachable = v.into_iter().map(|i| i.into()).collect();
12921        self
12922    }
12923}
12924
12925impl wkt::message::Message for ListWorkflowInvocationsResponse {
12926    fn typename() -> &'static str {
12927        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
12928    }
12929}
12930
12931#[doc(hidden)]
12932impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
12933    type PageItem = crate::model::WorkflowInvocation;
12934
12935    fn items(self) -> std::vec::Vec<Self::PageItem> {
12936        self.workflow_invocations
12937    }
12938
12939    fn next_page_token(&self) -> std::string::String {
12940        use std::clone::Clone;
12941        self.next_page_token.clone()
12942    }
12943}
12944
12945/// `GetWorkflowInvocation` request message.
12946#[derive(Clone, Default, PartialEq)]
12947#[non_exhaustive]
12948pub struct GetWorkflowInvocationRequest {
12949    /// Required. The workflow invocation resource's name.
12950    pub name: std::string::String,
12951
12952    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12953}
12954
12955impl GetWorkflowInvocationRequest {
12956    /// Creates a new default instance.
12957    pub fn new() -> Self {
12958        std::default::Default::default()
12959    }
12960
12961    /// Sets the value of [name][crate::model::GetWorkflowInvocationRequest::name].
12962    ///
12963    /// # Example
12964    /// ```ignore,no_run
12965    /// # use google_cloud_dataform_v1::model::GetWorkflowInvocationRequest;
12966    /// # let project_id = "project_id";
12967    /// # let location_id = "location_id";
12968    /// # let repository_id = "repository_id";
12969    /// # let workflow_invocation_id = "workflow_invocation_id";
12970    /// let x = GetWorkflowInvocationRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
12971    /// ```
12972    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12973        self.name = v.into();
12974        self
12975    }
12976}
12977
12978impl wkt::message::Message for GetWorkflowInvocationRequest {
12979    fn typename() -> &'static str {
12980        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
12981    }
12982}
12983
12984/// `CreateWorkflowInvocation` request message.
12985#[derive(Clone, Default, PartialEq)]
12986#[non_exhaustive]
12987pub struct CreateWorkflowInvocationRequest {
12988    /// Required. The repository in which to create the workflow invocation. Must
12989    /// be in the format `projects/*/locations/*/repositories/*`.
12990    pub parent: std::string::String,
12991
12992    /// Required. The workflow invocation resource to create.
12993    pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
12994
12995    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12996}
12997
12998impl CreateWorkflowInvocationRequest {
12999    /// Creates a new default instance.
13000    pub fn new() -> Self {
13001        std::default::Default::default()
13002    }
13003
13004    /// Sets the value of [parent][crate::model::CreateWorkflowInvocationRequest::parent].
13005    ///
13006    /// # Example
13007    /// ```ignore,no_run
13008    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
13009    /// # let project_id = "project_id";
13010    /// # let location_id = "location_id";
13011    /// # let repository_id = "repository_id";
13012    /// let x = CreateWorkflowInvocationRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
13013    /// ```
13014    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13015        self.parent = v.into();
13016        self
13017    }
13018
13019    /// Sets the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
13020    ///
13021    /// # Example
13022    /// ```ignore,no_run
13023    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
13024    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
13025    /// let x = CreateWorkflowInvocationRequest::new().set_workflow_invocation(WorkflowInvocation::default()/* use setters */);
13026    /// ```
13027    pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
13028    where
13029        T: std::convert::Into<crate::model::WorkflowInvocation>,
13030    {
13031        self.workflow_invocation = std::option::Option::Some(v.into());
13032        self
13033    }
13034
13035    /// Sets or clears the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
13036    ///
13037    /// # Example
13038    /// ```ignore,no_run
13039    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
13040    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
13041    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(Some(WorkflowInvocation::default()/* use setters */));
13042    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(None::<WorkflowInvocation>);
13043    /// ```
13044    pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
13045    where
13046        T: std::convert::Into<crate::model::WorkflowInvocation>,
13047    {
13048        self.workflow_invocation = v.map(|x| x.into());
13049        self
13050    }
13051}
13052
13053impl wkt::message::Message for CreateWorkflowInvocationRequest {
13054    fn typename() -> &'static str {
13055        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
13056    }
13057}
13058
13059/// `DeleteWorkflowInvocation` request message.
13060#[derive(Clone, Default, PartialEq)]
13061#[non_exhaustive]
13062pub struct DeleteWorkflowInvocationRequest {
13063    /// Required. The workflow invocation resource's name.
13064    pub name: std::string::String,
13065
13066    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13067}
13068
13069impl DeleteWorkflowInvocationRequest {
13070    /// Creates a new default instance.
13071    pub fn new() -> Self {
13072        std::default::Default::default()
13073    }
13074
13075    /// Sets the value of [name][crate::model::DeleteWorkflowInvocationRequest::name].
13076    ///
13077    /// # Example
13078    /// ```ignore,no_run
13079    /// # use google_cloud_dataform_v1::model::DeleteWorkflowInvocationRequest;
13080    /// # let project_id = "project_id";
13081    /// # let location_id = "location_id";
13082    /// # let repository_id = "repository_id";
13083    /// # let workflow_invocation_id = "workflow_invocation_id";
13084    /// let x = DeleteWorkflowInvocationRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
13085    /// ```
13086    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13087        self.name = v.into();
13088        self
13089    }
13090}
13091
13092impl wkt::message::Message for DeleteWorkflowInvocationRequest {
13093    fn typename() -> &'static str {
13094        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
13095    }
13096}
13097
13098/// `CancelWorkflowInvocation` request message.
13099#[derive(Clone, Default, PartialEq)]
13100#[non_exhaustive]
13101pub struct CancelWorkflowInvocationRequest {
13102    /// Required. The workflow invocation resource's name.
13103    pub name: std::string::String,
13104
13105    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13106}
13107
13108impl CancelWorkflowInvocationRequest {
13109    /// Creates a new default instance.
13110    pub fn new() -> Self {
13111        std::default::Default::default()
13112    }
13113
13114    /// Sets the value of [name][crate::model::CancelWorkflowInvocationRequest::name].
13115    ///
13116    /// # Example
13117    /// ```ignore,no_run
13118    /// # use google_cloud_dataform_v1::model::CancelWorkflowInvocationRequest;
13119    /// # let project_id = "project_id";
13120    /// # let location_id = "location_id";
13121    /// # let repository_id = "repository_id";
13122    /// # let workflow_invocation_id = "workflow_invocation_id";
13123    /// let x = CancelWorkflowInvocationRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
13124    /// ```
13125    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13126        self.name = v.into();
13127        self
13128    }
13129}
13130
13131impl wkt::message::Message for CancelWorkflowInvocationRequest {
13132    fn typename() -> &'static str {
13133        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
13134    }
13135}
13136
13137/// `CancelWorkflowInvocation` response message.
13138#[derive(Clone, Default, PartialEq)]
13139#[non_exhaustive]
13140pub struct CancelWorkflowInvocationResponse {
13141    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13142}
13143
13144impl CancelWorkflowInvocationResponse {
13145    /// Creates a new default instance.
13146    pub fn new() -> Self {
13147        std::default::Default::default()
13148    }
13149}
13150
13151impl wkt::message::Message for CancelWorkflowInvocationResponse {
13152    fn typename() -> &'static str {
13153        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
13154    }
13155}
13156
13157/// Represents a single action in a workflow invocation.
13158#[derive(Clone, Default, PartialEq)]
13159#[non_exhaustive]
13160pub struct WorkflowInvocationAction {
13161    /// Output only. This action's identifier. Unique within the workflow
13162    /// invocation.
13163    pub target: std::option::Option<crate::model::Target>,
13164
13165    /// Output only. The action's identifier if the project had been compiled
13166    /// without any overrides configured. Unique within the compilation result.
13167    pub canonical_target: std::option::Option<crate::model::Target>,
13168
13169    /// Output only. This action's current state.
13170    pub state: crate::model::workflow_invocation_action::State,
13171
13172    /// Output only. If and only if action's state is FAILED a failure reason is
13173    /// set.
13174    pub failure_reason: std::string::String,
13175
13176    /// Output only. This action's timing details.
13177    /// `start_time` will be set if the action is in [RUNNING, SUCCEEDED,
13178    /// CANCELLED, FAILED] state.
13179    /// `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED]
13180    /// state.
13181    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
13182
13183    /// Output only. All the metadata information that is used internally to serve
13184    /// the resource. For example: timestamps, flags, status fields, etc. The
13185    /// format of this field is a JSON string.
13186    pub internal_metadata: std::option::Option<std::string::String>,
13187
13188    /// The action's details.
13189    pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
13190
13191    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13192}
13193
13194impl WorkflowInvocationAction {
13195    /// Creates a new default instance.
13196    pub fn new() -> Self {
13197        std::default::Default::default()
13198    }
13199
13200    /// Sets the value of [target][crate::model::WorkflowInvocationAction::target].
13201    ///
13202    /// # Example
13203    /// ```ignore,no_run
13204    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13205    /// use google_cloud_dataform_v1::model::Target;
13206    /// let x = WorkflowInvocationAction::new().set_target(Target::default()/* use setters */);
13207    /// ```
13208    pub fn set_target<T>(mut self, v: T) -> Self
13209    where
13210        T: std::convert::Into<crate::model::Target>,
13211    {
13212        self.target = std::option::Option::Some(v.into());
13213        self
13214    }
13215
13216    /// Sets or clears the value of [target][crate::model::WorkflowInvocationAction::target].
13217    ///
13218    /// # Example
13219    /// ```ignore,no_run
13220    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13221    /// use google_cloud_dataform_v1::model::Target;
13222    /// let x = WorkflowInvocationAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
13223    /// let x = WorkflowInvocationAction::new().set_or_clear_target(None::<Target>);
13224    /// ```
13225    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
13226    where
13227        T: std::convert::Into<crate::model::Target>,
13228    {
13229        self.target = v.map(|x| x.into());
13230        self
13231    }
13232
13233    /// Sets the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
13234    ///
13235    /// # Example
13236    /// ```ignore,no_run
13237    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13238    /// use google_cloud_dataform_v1::model::Target;
13239    /// let x = WorkflowInvocationAction::new().set_canonical_target(Target::default()/* use setters */);
13240    /// ```
13241    pub fn set_canonical_target<T>(mut self, v: T) -> Self
13242    where
13243        T: std::convert::Into<crate::model::Target>,
13244    {
13245        self.canonical_target = std::option::Option::Some(v.into());
13246        self
13247    }
13248
13249    /// Sets or clears the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
13250    ///
13251    /// # Example
13252    /// ```ignore,no_run
13253    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13254    /// use google_cloud_dataform_v1::model::Target;
13255    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
13256    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(None::<Target>);
13257    /// ```
13258    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
13259    where
13260        T: std::convert::Into<crate::model::Target>,
13261    {
13262        self.canonical_target = v.map(|x| x.into());
13263        self
13264    }
13265
13266    /// Sets the value of [state][crate::model::WorkflowInvocationAction::state].
13267    ///
13268    /// # Example
13269    /// ```ignore,no_run
13270    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13271    /// use google_cloud_dataform_v1::model::workflow_invocation_action::State;
13272    /// let x0 = WorkflowInvocationAction::new().set_state(State::Running);
13273    /// let x1 = WorkflowInvocationAction::new().set_state(State::Skipped);
13274    /// let x2 = WorkflowInvocationAction::new().set_state(State::Disabled);
13275    /// ```
13276    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
13277        mut self,
13278        v: T,
13279    ) -> Self {
13280        self.state = v.into();
13281        self
13282    }
13283
13284    /// Sets the value of [failure_reason][crate::model::WorkflowInvocationAction::failure_reason].
13285    ///
13286    /// # Example
13287    /// ```ignore,no_run
13288    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13289    /// let x = WorkflowInvocationAction::new().set_failure_reason("example");
13290    /// ```
13291    pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13292        self.failure_reason = v.into();
13293        self
13294    }
13295
13296    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
13297    ///
13298    /// # Example
13299    /// ```ignore,no_run
13300    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13301    /// use google_cloud_type::model::Interval;
13302    /// let x = WorkflowInvocationAction::new().set_invocation_timing(Interval::default()/* use setters */);
13303    /// ```
13304    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
13305    where
13306        T: std::convert::Into<google_cloud_type::model::Interval>,
13307    {
13308        self.invocation_timing = std::option::Option::Some(v.into());
13309        self
13310    }
13311
13312    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
13313    ///
13314    /// # Example
13315    /// ```ignore,no_run
13316    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13317    /// use google_cloud_type::model::Interval;
13318    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
13319    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(None::<Interval>);
13320    /// ```
13321    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
13322    where
13323        T: std::convert::Into<google_cloud_type::model::Interval>,
13324    {
13325        self.invocation_timing = v.map(|x| x.into());
13326        self
13327    }
13328
13329    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
13330    ///
13331    /// # Example
13332    /// ```ignore,no_run
13333    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13334    /// let x = WorkflowInvocationAction::new().set_internal_metadata("example");
13335    /// ```
13336    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
13337    where
13338        T: std::convert::Into<std::string::String>,
13339    {
13340        self.internal_metadata = std::option::Option::Some(v.into());
13341        self
13342    }
13343
13344    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
13345    ///
13346    /// # Example
13347    /// ```ignore,no_run
13348    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13349    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(Some("example"));
13350    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(None::<String>);
13351    /// ```
13352    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13353    where
13354        T: std::convert::Into<std::string::String>,
13355    {
13356        self.internal_metadata = v.map(|x| x.into());
13357        self
13358    }
13359
13360    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action].
13361    ///
13362    /// Note that all the setters affecting `action` are mutually
13363    /// exclusive.
13364    ///
13365    /// # Example
13366    /// ```ignore,no_run
13367    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13368    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13369    /// let x = WorkflowInvocationAction::new().set_action(Some(
13370    ///     google_cloud_dataform_v1::model::workflow_invocation_action::Action::BigqueryAction(BigQueryAction::default().into())));
13371    /// ```
13372    pub fn set_action<
13373        T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
13374    >(
13375        mut self,
13376        v: T,
13377    ) -> Self {
13378        self.action = v.into();
13379        self
13380    }
13381
13382    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13383    /// if it holds a `BigqueryAction`, `None` if the field is not set or
13384    /// holds a different branch.
13385    pub fn bigquery_action(
13386        &self,
13387    ) -> std::option::Option<
13388        &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
13389    > {
13390        #[allow(unreachable_patterns)]
13391        self.action.as_ref().and_then(|v| match v {
13392            crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
13393                std::option::Option::Some(v)
13394            }
13395            _ => std::option::Option::None,
13396        })
13397    }
13398
13399    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13400    /// to hold a `BigqueryAction`.
13401    ///
13402    /// Note that all the setters affecting `action` are
13403    /// mutually exclusive.
13404    ///
13405    /// # Example
13406    /// ```ignore,no_run
13407    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13408    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13409    /// let x = WorkflowInvocationAction::new().set_bigquery_action(BigQueryAction::default()/* use setters */);
13410    /// assert!(x.bigquery_action().is_some());
13411    /// assert!(x.notebook_action().is_none());
13412    /// assert!(x.data_preparation_action().is_none());
13413    /// ```
13414    pub fn set_bigquery_action<
13415        T: std::convert::Into<
13416                std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
13417            >,
13418    >(
13419        mut self,
13420        v: T,
13421    ) -> Self {
13422        self.action = std::option::Option::Some(
13423            crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
13424        );
13425        self
13426    }
13427
13428    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13429    /// if it holds a `NotebookAction`, `None` if the field is not set or
13430    /// holds a different branch.
13431    pub fn notebook_action(
13432        &self,
13433    ) -> std::option::Option<
13434        &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
13435    > {
13436        #[allow(unreachable_patterns)]
13437        self.action.as_ref().and_then(|v| match v {
13438            crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
13439                std::option::Option::Some(v)
13440            }
13441            _ => std::option::Option::None,
13442        })
13443    }
13444
13445    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13446    /// to hold a `NotebookAction`.
13447    ///
13448    /// Note that all the setters affecting `action` are
13449    /// mutually exclusive.
13450    ///
13451    /// # Example
13452    /// ```ignore,no_run
13453    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13454    /// use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13455    /// let x = WorkflowInvocationAction::new().set_notebook_action(NotebookAction::default()/* use setters */);
13456    /// assert!(x.notebook_action().is_some());
13457    /// assert!(x.bigquery_action().is_none());
13458    /// assert!(x.data_preparation_action().is_none());
13459    /// ```
13460    pub fn set_notebook_action<
13461        T: std::convert::Into<
13462                std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
13463            >,
13464    >(
13465        mut self,
13466        v: T,
13467    ) -> Self {
13468        self.action = std::option::Option::Some(
13469            crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
13470        );
13471        self
13472    }
13473
13474    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13475    /// if it holds a `DataPreparationAction`, `None` if the field is not set or
13476    /// holds a different branch.
13477    pub fn data_preparation_action(
13478        &self,
13479    ) -> std::option::Option<
13480        &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13481    > {
13482        #[allow(unreachable_patterns)]
13483        self.action.as_ref().and_then(|v| match v {
13484            crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
13485                std::option::Option::Some(v)
13486            }
13487            _ => std::option::Option::None,
13488        })
13489    }
13490
13491    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13492    /// to hold a `DataPreparationAction`.
13493    ///
13494    /// Note that all the setters affecting `action` are
13495    /// mutually exclusive.
13496    ///
13497    /// # Example
13498    /// ```ignore,no_run
13499    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13500    /// use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13501    /// let x = WorkflowInvocationAction::new().set_data_preparation_action(DataPreparationAction::default()/* use setters */);
13502    /// assert!(x.data_preparation_action().is_some());
13503    /// assert!(x.bigquery_action().is_none());
13504    /// assert!(x.notebook_action().is_none());
13505    /// ```
13506    pub fn set_data_preparation_action<
13507        T: std::convert::Into<
13508                std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13509            >,
13510    >(
13511        mut self,
13512        v: T,
13513    ) -> Self {
13514        self.action = std::option::Option::Some(
13515            crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
13516        );
13517        self
13518    }
13519}
13520
13521impl wkt::message::Message for WorkflowInvocationAction {
13522    fn typename() -> &'static str {
13523        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
13524    }
13525}
13526
13527/// Defines additional types related to [WorkflowInvocationAction].
13528pub mod workflow_invocation_action {
13529    #[allow(unused_imports)]
13530    use super::*;
13531
13532    /// Represents a workflow action that will run against BigQuery.
13533    #[derive(Clone, Default, PartialEq)]
13534    #[non_exhaustive]
13535    pub struct BigQueryAction {
13536        /// Output only. The generated BigQuery SQL script that will be executed.
13537        pub sql_script: std::string::String,
13538
13539        /// Output only. The ID of the BigQuery job that executed the SQL in
13540        /// sql_script. Only set once the job has started to run.
13541        pub job_id: std::string::String,
13542
13543        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13544    }
13545
13546    impl BigQueryAction {
13547        /// Creates a new default instance.
13548        pub fn new() -> Self {
13549            std::default::Default::default()
13550        }
13551
13552        /// Sets the value of [sql_script][crate::model::workflow_invocation_action::BigQueryAction::sql_script].
13553        ///
13554        /// # Example
13555        /// ```ignore,no_run
13556        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13557        /// let x = BigQueryAction::new().set_sql_script("example");
13558        /// ```
13559        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13560            self.sql_script = v.into();
13561            self
13562        }
13563
13564        /// Sets the value of [job_id][crate::model::workflow_invocation_action::BigQueryAction::job_id].
13565        ///
13566        /// # Example
13567        /// ```ignore,no_run
13568        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13569        /// let x = BigQueryAction::new().set_job_id("example");
13570        /// ```
13571        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13572            self.job_id = v.into();
13573            self
13574        }
13575    }
13576
13577    impl wkt::message::Message for BigQueryAction {
13578        fn typename() -> &'static str {
13579            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
13580        }
13581    }
13582
13583    /// Represents a workflow action that will run against a Notebook runtime.
13584    #[derive(Clone, Default, PartialEq)]
13585    #[non_exhaustive]
13586    pub struct NotebookAction {
13587        /// Output only. The code contents of a Notebook to be run.
13588        pub contents: std::string::String,
13589
13590        /// Output only. The ID of the Vertex job that executed the notebook in
13591        /// contents and also the ID used for the outputs created in Google Cloud
13592        /// Storage buckets. Only set once the job has started to run.
13593        pub job_id: std::string::String,
13594
13595        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13596    }
13597
13598    impl NotebookAction {
13599        /// Creates a new default instance.
13600        pub fn new() -> Self {
13601            std::default::Default::default()
13602        }
13603
13604        /// Sets the value of [contents][crate::model::workflow_invocation_action::NotebookAction::contents].
13605        ///
13606        /// # Example
13607        /// ```ignore,no_run
13608        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13609        /// let x = NotebookAction::new().set_contents("example");
13610        /// ```
13611        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13612            self.contents = v.into();
13613            self
13614        }
13615
13616        /// Sets the value of [job_id][crate::model::workflow_invocation_action::NotebookAction::job_id].
13617        ///
13618        /// # Example
13619        /// ```ignore,no_run
13620        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13621        /// let x = NotebookAction::new().set_job_id("example");
13622        /// ```
13623        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13624            self.job_id = v.into();
13625            self
13626        }
13627    }
13628
13629    impl wkt::message::Message for NotebookAction {
13630        fn typename() -> &'static str {
13631            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
13632        }
13633    }
13634
13635    /// Represents a workflow action that will run a Data Preparation.
13636    #[derive(Clone, Default, PartialEq)]
13637    #[non_exhaustive]
13638    pub struct DataPreparationAction {
13639        /// Output only. The generated BigQuery SQL script that will be executed. For
13640        /// reference only.
13641        pub generated_sql: std::string::String,
13642
13643        /// Output only. The ID of the BigQuery job that executed the SQL in
13644        /// sql_script. Only set once the job has started to run.
13645        pub job_id: std::string::String,
13646
13647        /// The definition for the data preparation.
13648        pub definition: std::option::Option<
13649            crate::model::workflow_invocation_action::data_preparation_action::Definition,
13650        >,
13651
13652        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13653    }
13654
13655    impl DataPreparationAction {
13656        /// Creates a new default instance.
13657        pub fn new() -> Self {
13658            std::default::Default::default()
13659        }
13660
13661        /// Sets the value of [generated_sql][crate::model::workflow_invocation_action::DataPreparationAction::generated_sql].
13662        ///
13663        /// # Example
13664        /// ```ignore,no_run
13665        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13666        /// let x = DataPreparationAction::new().set_generated_sql("example");
13667        /// ```
13668        pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
13669            mut self,
13670            v: T,
13671        ) -> Self {
13672            self.generated_sql = v.into();
13673            self
13674        }
13675
13676        /// Sets the value of [job_id][crate::model::workflow_invocation_action::DataPreparationAction::job_id].
13677        ///
13678        /// # Example
13679        /// ```ignore,no_run
13680        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13681        /// let x = DataPreparationAction::new().set_job_id("example");
13682        /// ```
13683        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13684            self.job_id = v.into();
13685            self
13686        }
13687
13688        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition].
13689        ///
13690        /// Note that all the setters affecting `definition` are mutually
13691        /// exclusive.
13692        ///
13693        /// # Example
13694        /// ```ignore,no_run
13695        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13696        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::Definition;
13697        /// let x = DataPreparationAction::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
13698        /// ```
13699        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
13700        {
13701            self.definition = v.into();
13702            self
13703        }
13704
13705        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13706        /// if it holds a `ContentsYaml`, `None` if the field is not set or
13707        /// holds a different branch.
13708        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
13709            #[allow(unreachable_patterns)]
13710            self.definition.as_ref().and_then(|v| match v {
13711                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
13712                _ => std::option::Option::None,
13713            })
13714        }
13715
13716        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13717        /// to hold a `ContentsYaml`.
13718        ///
13719        /// Note that all the setters affecting `definition` are
13720        /// mutually exclusive.
13721        ///
13722        /// # Example
13723        /// ```ignore,no_run
13724        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13725        /// let x = DataPreparationAction::new().set_contents_yaml("example");
13726        /// assert!(x.contents_yaml().is_some());
13727        /// assert!(x.contents_sql().is_none());
13728        /// ```
13729        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
13730            mut self,
13731            v: T,
13732        ) -> Self {
13733            self.definition = std::option::Option::Some(
13734                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
13735                    v.into()
13736                )
13737            );
13738            self
13739        }
13740
13741        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13742        /// if it holds a `ContentsSql`, `None` if the field is not set or
13743        /// holds a different branch.
13744        pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
13745            #[allow(unreachable_patterns)]
13746            self.definition.as_ref().and_then(|v| match v {
13747                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
13748                _ => std::option::Option::None,
13749            })
13750        }
13751
13752        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13753        /// to hold a `ContentsSql`.
13754        ///
13755        /// Note that all the setters affecting `definition` are
13756        /// mutually exclusive.
13757        ///
13758        /// # Example
13759        /// ```ignore,no_run
13760        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13761        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13762        /// let x = DataPreparationAction::new().set_contents_sql(ActionSqlDefinition::default()/* use setters */);
13763        /// assert!(x.contents_sql().is_some());
13764        /// assert!(x.contents_yaml().is_none());
13765        /// ```
13766        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{
13767            self.definition = std::option::Option::Some(
13768                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
13769                    v.into()
13770                )
13771            );
13772            self
13773        }
13774    }
13775
13776    impl wkt::message::Message for DataPreparationAction {
13777        fn typename() -> &'static str {
13778            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
13779        }
13780    }
13781
13782    /// Defines additional types related to [DataPreparationAction].
13783    pub mod data_preparation_action {
13784        #[allow(unused_imports)]
13785        use super::*;
13786
13787        /// Definition of a SQL Data Preparation
13788        #[derive(Clone, Default, PartialEq)]
13789        #[non_exhaustive]
13790        pub struct ActionSqlDefinition {
13791            /// The SQL query representing the data preparation steps. Formatted as a
13792            /// Pipe SQL query statement.
13793            pub query: std::string::String,
13794
13795            /// Error table configuration,
13796            pub error_table: std::option::Option<
13797                crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
13798            >,
13799
13800            /// Load configuration.
13801            pub load_config: std::option::Option<
13802                crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
13803            >,
13804
13805            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13806        }
13807
13808        impl ActionSqlDefinition {
13809            /// Creates a new default instance.
13810            pub fn new() -> Self {
13811                std::default::Default::default()
13812            }
13813
13814            /// Sets the value of [query][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::query].
13815            ///
13816            /// # Example
13817            /// ```ignore,no_run
13818            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13819            /// let x = ActionSqlDefinition::new().set_query("example");
13820            /// ```
13821            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13822                self.query = v.into();
13823                self
13824            }
13825
13826            /// Sets the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
13827            ///
13828            /// # Example
13829            /// ```ignore,no_run
13830            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13831            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13832            /// let x = ActionSqlDefinition::new().set_error_table(ActionErrorTable::default()/* use setters */);
13833            /// ```
13834            pub fn set_error_table<T>(mut self, v: T) -> Self
13835            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
13836            {
13837                self.error_table = std::option::Option::Some(v.into());
13838                self
13839            }
13840
13841            /// Sets or clears the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
13842            ///
13843            /// # Example
13844            /// ```ignore,no_run
13845            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13846            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13847            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(Some(ActionErrorTable::default()/* use setters */));
13848            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(None::<ActionErrorTable>);
13849            /// ```
13850            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
13851            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
13852            {
13853                self.error_table = v.map(|x| x.into());
13854                self
13855            }
13856
13857            /// Sets the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
13858            ///
13859            /// # Example
13860            /// ```ignore,no_run
13861            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13862            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13863            /// let x = ActionSqlDefinition::new().set_load_config(ActionLoadConfig::default()/* use setters */);
13864            /// ```
13865            pub fn set_load_config<T>(mut self, v: T) -> Self
13866            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
13867            {
13868                self.load_config = std::option::Option::Some(v.into());
13869                self
13870            }
13871
13872            /// Sets or clears the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
13873            ///
13874            /// # Example
13875            /// ```ignore,no_run
13876            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13877            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13878            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(Some(ActionLoadConfig::default()/* use setters */));
13879            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(None::<ActionLoadConfig>);
13880            /// ```
13881            pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
13882            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
13883            {
13884                self.load_config = v.map(|x| x.into());
13885                self
13886            }
13887        }
13888
13889        impl wkt::message::Message for ActionSqlDefinition {
13890            fn typename() -> &'static str {
13891                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
13892            }
13893        }
13894
13895        /// Error table information, used to write error data into a BigQuery
13896        /// table.
13897        #[derive(Clone, Default, PartialEq)]
13898        #[non_exhaustive]
13899        pub struct ActionErrorTable {
13900            /// Error Table target.
13901            pub target: std::option::Option<crate::model::Target>,
13902
13903            /// Error table partition expiration in days. Only positive values are
13904            /// allowed.
13905            pub retention_days: i32,
13906
13907            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13908        }
13909
13910        impl ActionErrorTable {
13911            /// Creates a new default instance.
13912            pub fn new() -> Self {
13913                std::default::Default::default()
13914            }
13915
13916            /// Sets the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
13917            ///
13918            /// # Example
13919            /// ```ignore,no_run
13920            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13921            /// use google_cloud_dataform_v1::model::Target;
13922            /// let x = ActionErrorTable::new().set_target(Target::default()/* use setters */);
13923            /// ```
13924            pub fn set_target<T>(mut self, v: T) -> Self
13925            where
13926                T: std::convert::Into<crate::model::Target>,
13927            {
13928                self.target = std::option::Option::Some(v.into());
13929                self
13930            }
13931
13932            /// Sets or clears the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
13933            ///
13934            /// # Example
13935            /// ```ignore,no_run
13936            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13937            /// use google_cloud_dataform_v1::model::Target;
13938            /// let x = ActionErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
13939            /// let x = ActionErrorTable::new().set_or_clear_target(None::<Target>);
13940            /// ```
13941            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
13942            where
13943                T: std::convert::Into<crate::model::Target>,
13944            {
13945                self.target = v.map(|x| x.into());
13946                self
13947            }
13948
13949            /// Sets the value of [retention_days][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::retention_days].
13950            ///
13951            /// # Example
13952            /// ```ignore,no_run
13953            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13954            /// let x = ActionErrorTable::new().set_retention_days(42);
13955            /// ```
13956            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13957                self.retention_days = v.into();
13958                self
13959            }
13960        }
13961
13962        impl wkt::message::Message for ActionErrorTable {
13963            fn typename() -> &'static str {
13964                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
13965            }
13966        }
13967
13968        /// Simplified load configuration for actions
13969        #[derive(Clone, Default, PartialEq)]
13970        #[non_exhaustive]
13971        pub struct ActionLoadConfig {
13972
13973            /// Load mode
13974            pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
13975
13976            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13977        }
13978
13979        impl ActionLoadConfig {
13980            /// Creates a new default instance.
13981            pub fn new() -> Self {
13982                std::default::Default::default()
13983            }
13984
13985            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode].
13986            ///
13987            /// Note that all the setters affecting `mode` are mutually
13988            /// exclusive.
13989            ///
13990            /// # Example
13991            /// ```ignore,no_run
13992            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13993            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
13994            /// let x = ActionLoadConfig::new().set_mode(Some(
13995            ///     google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(ActionSimpleLoadMode::default().into())));
13996            /// ```
13997            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
13998            {
13999                self.mode = v.into();
14000                self
14001            }
14002
14003            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14004            /// if it holds a `Replace`, `None` if the field is not set or
14005            /// holds a different branch.
14006            pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
14007                #[allow(unreachable_patterns)]
14008                self.mode.as_ref().and_then(|v| match v {
14009                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
14010                    _ => std::option::Option::None,
14011                })
14012            }
14013
14014            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14015            /// to hold a `Replace`.
14016            ///
14017            /// Note that all the setters affecting `mode` are
14018            /// mutually exclusive.
14019            ///
14020            /// # Example
14021            /// ```ignore,no_run
14022            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14023            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
14024            /// let x = ActionLoadConfig::new().set_replace(ActionSimpleLoadMode::default()/* use setters */);
14025            /// assert!(x.replace().is_some());
14026            /// assert!(x.append().is_none());
14027            /// assert!(x.maximum().is_none());
14028            /// assert!(x.unique().is_none());
14029            /// ```
14030            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{
14031                self.mode = std::option::Option::Some(
14032                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
14033                        v.into()
14034                    )
14035                );
14036                self
14037            }
14038
14039            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14040            /// if it holds a `Append`, `None` if the field is not set or
14041            /// holds a different branch.
14042            pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
14043                #[allow(unreachable_patterns)]
14044                self.mode.as_ref().and_then(|v| match v {
14045                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
14046                    _ => std::option::Option::None,
14047                })
14048            }
14049
14050            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14051            /// to hold a `Append`.
14052            ///
14053            /// Note that all the setters affecting `mode` are
14054            /// mutually exclusive.
14055            ///
14056            /// # Example
14057            /// ```ignore,no_run
14058            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14059            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
14060            /// let x = ActionLoadConfig::new().set_append(ActionSimpleLoadMode::default()/* use setters */);
14061            /// assert!(x.append().is_some());
14062            /// assert!(x.replace().is_none());
14063            /// assert!(x.maximum().is_none());
14064            /// assert!(x.unique().is_none());
14065            /// ```
14066            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{
14067                self.mode = std::option::Option::Some(
14068                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
14069                        v.into()
14070                    )
14071                );
14072                self
14073            }
14074
14075            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14076            /// if it holds a `Maximum`, `None` if the field is not set or
14077            /// holds a different branch.
14078            pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
14079                #[allow(unreachable_patterns)]
14080                self.mode.as_ref().and_then(|v| match v {
14081                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
14082                    _ => std::option::Option::None,
14083                })
14084            }
14085
14086            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14087            /// to hold a `Maximum`.
14088            ///
14089            /// Note that all the setters affecting `mode` are
14090            /// mutually exclusive.
14091            ///
14092            /// # Example
14093            /// ```ignore,no_run
14094            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14095            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
14096            /// let x = ActionLoadConfig::new().set_maximum(ActionIncrementalLoadMode::default()/* use setters */);
14097            /// assert!(x.maximum().is_some());
14098            /// assert!(x.replace().is_none());
14099            /// assert!(x.append().is_none());
14100            /// assert!(x.unique().is_none());
14101            /// ```
14102            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{
14103                self.mode = std::option::Option::Some(
14104                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
14105                        v.into()
14106                    )
14107                );
14108                self
14109            }
14110
14111            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14112            /// if it holds a `Unique`, `None` if the field is not set or
14113            /// holds a different branch.
14114            pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
14115                #[allow(unreachable_patterns)]
14116                self.mode.as_ref().and_then(|v| match v {
14117                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
14118                    _ => std::option::Option::None,
14119                })
14120            }
14121
14122            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14123            /// to hold a `Unique`.
14124            ///
14125            /// Note that all the setters affecting `mode` are
14126            /// mutually exclusive.
14127            ///
14128            /// # Example
14129            /// ```ignore,no_run
14130            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14131            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
14132            /// let x = ActionLoadConfig::new().set_unique(ActionIncrementalLoadMode::default()/* use setters */);
14133            /// assert!(x.unique().is_some());
14134            /// assert!(x.replace().is_none());
14135            /// assert!(x.append().is_none());
14136            /// assert!(x.maximum().is_none());
14137            /// ```
14138            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{
14139                self.mode = std::option::Option::Some(
14140                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
14141                        v.into()
14142                    )
14143                );
14144                self
14145            }
14146        }
14147
14148        impl wkt::message::Message for ActionLoadConfig {
14149            fn typename() -> &'static str {
14150                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
14151            }
14152        }
14153
14154        /// Defines additional types related to [ActionLoadConfig].
14155        pub mod action_load_config {
14156            #[allow(unused_imports)]
14157            use super::*;
14158
14159            /// Load mode
14160            #[derive(Clone, Debug, PartialEq)]
14161            #[non_exhaustive]
14162            pub enum Mode {
14163                /// Replace destination table
14164                Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
14165                /// Append into destination table
14166                Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
14167                /// Insert records where the value exceeds the previous maximum value for
14168                /// a column in the destination table
14169                Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
14170                /// Insert records where the value of a column is not already present in
14171                /// the destination table
14172                Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
14173            }
14174        }
14175
14176        /// Simple load definition
14177        #[derive(Clone, Default, PartialEq)]
14178        #[non_exhaustive]
14179        pub struct ActionSimpleLoadMode {
14180            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14181        }
14182
14183        impl ActionSimpleLoadMode {
14184            /// Creates a new default instance.
14185            pub fn new() -> Self {
14186                std::default::Default::default()
14187            }
14188        }
14189
14190        impl wkt::message::Message for ActionSimpleLoadMode {
14191            fn typename() -> &'static str {
14192                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
14193            }
14194        }
14195
14196        /// Load definition for incremental load modes
14197        #[derive(Clone, Default, PartialEq)]
14198        #[non_exhaustive]
14199        pub struct ActionIncrementalLoadMode {
14200            /// Column name for incremental load modes
14201            pub column: std::string::String,
14202
14203            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14204        }
14205
14206        impl ActionIncrementalLoadMode {
14207            /// Creates a new default instance.
14208            pub fn new() -> Self {
14209                std::default::Default::default()
14210            }
14211
14212            /// Sets the value of [column][crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode::column].
14213            ///
14214            /// # Example
14215            /// ```ignore,no_run
14216            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
14217            /// let x = ActionIncrementalLoadMode::new().set_column("example");
14218            /// ```
14219            pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14220                self.column = v.into();
14221                self
14222            }
14223        }
14224
14225        impl wkt::message::Message for ActionIncrementalLoadMode {
14226            fn typename() -> &'static str {
14227                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
14228            }
14229        }
14230
14231        /// The definition for the data preparation.
14232        #[derive(Clone, Debug, PartialEq)]
14233        #[non_exhaustive]
14234        pub enum Definition {
14235            /// Output only. YAML representing the contents of the data preparation.
14236            /// Can be used to show the customer what the input was to their workflow.
14237            ContentsYaml(std::string::String),
14238            /// SQL definition for a Data Preparation. Contains a SQL query and
14239            /// additional context information.
14240            ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
14241        }
14242    }
14243
14244    /// Represents the current state of a workflow invocation action.
14245    ///
14246    /// # Working with unknown values
14247    ///
14248    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14249    /// additional enum variants at any time. Adding new variants is not considered
14250    /// a breaking change. Applications should write their code in anticipation of:
14251    ///
14252    /// - New values appearing in future releases of the client library, **and**
14253    /// - New values received dynamically, without application changes.
14254    ///
14255    /// Please consult the [Working with enums] section in the user guide for some
14256    /// guidelines.
14257    ///
14258    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14259    #[derive(Clone, Debug, PartialEq)]
14260    #[non_exhaustive]
14261    pub enum State {
14262        /// The action has not yet been considered for invocation.
14263        Pending,
14264        /// The action is currently running.
14265        Running,
14266        /// Execution of the action was skipped because upstream dependencies did not
14267        /// all complete successfully. A terminal state.
14268        Skipped,
14269        /// Execution of the action was disabled as per the configuration of the
14270        /// corresponding compilation result action. A terminal state.
14271        Disabled,
14272        /// The action succeeded. A terminal state.
14273        Succeeded,
14274        /// The action was cancelled. A terminal state.
14275        Cancelled,
14276        /// The action failed. A terminal state.
14277        Failed,
14278        /// If set, the enum was initialized with an unknown value.
14279        ///
14280        /// Applications can examine the value using [State::value] or
14281        /// [State::name].
14282        UnknownValue(state::UnknownValue),
14283    }
14284
14285    #[doc(hidden)]
14286    pub mod state {
14287        #[allow(unused_imports)]
14288        use super::*;
14289        #[derive(Clone, Debug, PartialEq)]
14290        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14291    }
14292
14293    impl State {
14294        /// Gets the enum value.
14295        ///
14296        /// Returns `None` if the enum contains an unknown value deserialized from
14297        /// the string representation of enums.
14298        pub fn value(&self) -> std::option::Option<i32> {
14299            match self {
14300                Self::Pending => std::option::Option::Some(0),
14301                Self::Running => std::option::Option::Some(1),
14302                Self::Skipped => std::option::Option::Some(2),
14303                Self::Disabled => std::option::Option::Some(3),
14304                Self::Succeeded => std::option::Option::Some(4),
14305                Self::Cancelled => std::option::Option::Some(5),
14306                Self::Failed => std::option::Option::Some(6),
14307                Self::UnknownValue(u) => u.0.value(),
14308            }
14309        }
14310
14311        /// Gets the enum value as a string.
14312        ///
14313        /// Returns `None` if the enum contains an unknown value deserialized from
14314        /// the integer representation of enums.
14315        pub fn name(&self) -> std::option::Option<&str> {
14316            match self {
14317                Self::Pending => std::option::Option::Some("PENDING"),
14318                Self::Running => std::option::Option::Some("RUNNING"),
14319                Self::Skipped => std::option::Option::Some("SKIPPED"),
14320                Self::Disabled => std::option::Option::Some("DISABLED"),
14321                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
14322                Self::Cancelled => std::option::Option::Some("CANCELLED"),
14323                Self::Failed => std::option::Option::Some("FAILED"),
14324                Self::UnknownValue(u) => u.0.name(),
14325            }
14326        }
14327    }
14328
14329    impl std::default::Default for State {
14330        fn default() -> Self {
14331            use std::convert::From;
14332            Self::from(0)
14333        }
14334    }
14335
14336    impl std::fmt::Display for State {
14337        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14338            wkt::internal::display_enum(f, self.name(), self.value())
14339        }
14340    }
14341
14342    impl std::convert::From<i32> for State {
14343        fn from(value: i32) -> Self {
14344            match value {
14345                0 => Self::Pending,
14346                1 => Self::Running,
14347                2 => Self::Skipped,
14348                3 => Self::Disabled,
14349                4 => Self::Succeeded,
14350                5 => Self::Cancelled,
14351                6 => Self::Failed,
14352                _ => Self::UnknownValue(state::UnknownValue(
14353                    wkt::internal::UnknownEnumValue::Integer(value),
14354                )),
14355            }
14356        }
14357    }
14358
14359    impl std::convert::From<&str> for State {
14360        fn from(value: &str) -> Self {
14361            use std::string::ToString;
14362            match value {
14363                "PENDING" => Self::Pending,
14364                "RUNNING" => Self::Running,
14365                "SKIPPED" => Self::Skipped,
14366                "DISABLED" => Self::Disabled,
14367                "SUCCEEDED" => Self::Succeeded,
14368                "CANCELLED" => Self::Cancelled,
14369                "FAILED" => Self::Failed,
14370                _ => Self::UnknownValue(state::UnknownValue(
14371                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14372                )),
14373            }
14374        }
14375    }
14376
14377    impl serde::ser::Serialize for State {
14378        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14379        where
14380            S: serde::Serializer,
14381        {
14382            match self {
14383                Self::Pending => serializer.serialize_i32(0),
14384                Self::Running => serializer.serialize_i32(1),
14385                Self::Skipped => serializer.serialize_i32(2),
14386                Self::Disabled => serializer.serialize_i32(3),
14387                Self::Succeeded => serializer.serialize_i32(4),
14388                Self::Cancelled => serializer.serialize_i32(5),
14389                Self::Failed => serializer.serialize_i32(6),
14390                Self::UnknownValue(u) => u.0.serialize(serializer),
14391            }
14392        }
14393    }
14394
14395    impl<'de> serde::de::Deserialize<'de> for State {
14396        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14397        where
14398            D: serde::Deserializer<'de>,
14399        {
14400            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14401                ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
14402            ))
14403        }
14404    }
14405
14406    /// The action's details.
14407    #[derive(Clone, Debug, PartialEq)]
14408    #[non_exhaustive]
14409    pub enum Action {
14410        /// Output only. The workflow action's bigquery action details.
14411        BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
14412        /// Output only. The workflow action's notebook action details.
14413        NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
14414        /// Output only. The workflow action's data preparation action details.
14415        DataPreparationAction(
14416            std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
14417        ),
14418    }
14419}
14420
14421/// `QueryWorkflowInvocationActions` request message.
14422#[derive(Clone, Default, PartialEq)]
14423#[non_exhaustive]
14424pub struct QueryWorkflowInvocationActionsRequest {
14425    /// Required. The workflow invocation's name.
14426    pub name: std::string::String,
14427
14428    /// Optional. Maximum number of workflow invocations to return. The server may
14429    /// return fewer items than requested. If unspecified, the server will pick an
14430    /// appropriate default.
14431    pub page_size: i32,
14432
14433    /// Optional. Page token received from a previous
14434    /// `QueryWorkflowInvocationActions` call. Provide this to retrieve the
14435    /// subsequent page.
14436    ///
14437    /// When paginating, all other parameters provided to
14438    /// `QueryWorkflowInvocationActions`, with the exception of `page_size`, must
14439    /// match the call that provided the page token.
14440    pub page_token: std::string::String,
14441
14442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14443}
14444
14445impl QueryWorkflowInvocationActionsRequest {
14446    /// Creates a new default instance.
14447    pub fn new() -> Self {
14448        std::default::Default::default()
14449    }
14450
14451    /// Sets the value of [name][crate::model::QueryWorkflowInvocationActionsRequest::name].
14452    ///
14453    /// # Example
14454    /// ```ignore,no_run
14455    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14456    /// # let project_id = "project_id";
14457    /// # let location_id = "location_id";
14458    /// # let repository_id = "repository_id";
14459    /// # let workflow_invocation_id = "workflow_invocation_id";
14460    /// let x = QueryWorkflowInvocationActionsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
14461    /// ```
14462    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14463        self.name = v.into();
14464        self
14465    }
14466
14467    /// Sets the value of [page_size][crate::model::QueryWorkflowInvocationActionsRequest::page_size].
14468    ///
14469    /// # Example
14470    /// ```ignore,no_run
14471    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14472    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_size(42);
14473    /// ```
14474    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14475        self.page_size = v.into();
14476        self
14477    }
14478
14479    /// Sets the value of [page_token][crate::model::QueryWorkflowInvocationActionsRequest::page_token].
14480    ///
14481    /// # Example
14482    /// ```ignore,no_run
14483    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14484    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_token("example");
14485    /// ```
14486    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14487        self.page_token = v.into();
14488        self
14489    }
14490}
14491
14492impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
14493    fn typename() -> &'static str {
14494        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
14495    }
14496}
14497
14498/// `QueryWorkflowInvocationActions` response message.
14499#[derive(Clone, Default, PartialEq)]
14500#[non_exhaustive]
14501pub struct QueryWorkflowInvocationActionsResponse {
14502    /// List of workflow invocation actions.
14503    pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
14504
14505    /// A token, which can be sent as `page_token` to retrieve the next page.
14506    /// If this field is omitted, there are no subsequent pages.
14507    pub next_page_token: std::string::String,
14508
14509    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14510}
14511
14512impl QueryWorkflowInvocationActionsResponse {
14513    /// Creates a new default instance.
14514    pub fn new() -> Self {
14515        std::default::Default::default()
14516    }
14517
14518    /// Sets the value of [workflow_invocation_actions][crate::model::QueryWorkflowInvocationActionsResponse::workflow_invocation_actions].
14519    ///
14520    /// # Example
14521    /// ```ignore,no_run
14522    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
14523    /// use google_cloud_dataform_v1::model::WorkflowInvocationAction;
14524    /// let x = QueryWorkflowInvocationActionsResponse::new()
14525    ///     .set_workflow_invocation_actions([
14526    ///         WorkflowInvocationAction::default()/* use setters */,
14527    ///         WorkflowInvocationAction::default()/* use (different) setters */,
14528    ///     ]);
14529    /// ```
14530    pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
14531    where
14532        T: std::iter::IntoIterator<Item = V>,
14533        V: std::convert::Into<crate::model::WorkflowInvocationAction>,
14534    {
14535        use std::iter::Iterator;
14536        self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
14537        self
14538    }
14539
14540    /// Sets the value of [next_page_token][crate::model::QueryWorkflowInvocationActionsResponse::next_page_token].
14541    ///
14542    /// # Example
14543    /// ```ignore,no_run
14544    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
14545    /// let x = QueryWorkflowInvocationActionsResponse::new().set_next_page_token("example");
14546    /// ```
14547    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14548        self.next_page_token = v.into();
14549        self
14550    }
14551}
14552
14553impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
14554    fn typename() -> &'static str {
14555        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
14556    }
14557}
14558
14559#[doc(hidden)]
14560impl google_cloud_gax::paginator::internal::PageableResponse
14561    for QueryWorkflowInvocationActionsResponse
14562{
14563    type PageItem = crate::model::WorkflowInvocationAction;
14564
14565    fn items(self) -> std::vec::Vec<Self::PageItem> {
14566        self.workflow_invocation_actions
14567    }
14568
14569    fn next_page_token(&self) -> std::string::String {
14570        use std::clone::Clone;
14571        self.next_page_token.clone()
14572    }
14573}
14574
14575/// Config for all repositories in a given project and location.
14576#[derive(Clone, Default, PartialEq)]
14577#[non_exhaustive]
14578pub struct Config {
14579    /// Identifier. The config name.
14580    pub name: std::string::String,
14581
14582    /// Optional. The default KMS key that is used if no encryption key is provided
14583    /// when a repository is created.
14584    pub default_kms_key_name: std::string::String,
14585
14586    /// Output only. All the metadata information that is used internally to serve
14587    /// the resource. For example: timestamps, flags, status fields, etc. The
14588    /// format of this field is a JSON string.
14589    pub internal_metadata: std::option::Option<std::string::String>,
14590
14591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14592}
14593
14594impl Config {
14595    /// Creates a new default instance.
14596    pub fn new() -> Self {
14597        std::default::Default::default()
14598    }
14599
14600    /// Sets the value of [name][crate::model::Config::name].
14601    ///
14602    /// # Example
14603    /// ```ignore,no_run
14604    /// # use google_cloud_dataform_v1::model::Config;
14605    /// # let project_id = "project_id";
14606    /// # let location_id = "location_id";
14607    /// let x = Config::new().set_name(format!("projects/{project_id}/locations/{location_id}/config"));
14608    /// ```
14609    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14610        self.name = v.into();
14611        self
14612    }
14613
14614    /// Sets the value of [default_kms_key_name][crate::model::Config::default_kms_key_name].
14615    ///
14616    /// # Example
14617    /// ```ignore,no_run
14618    /// # use google_cloud_dataform_v1::model::Config;
14619    /// let x = Config::new().set_default_kms_key_name("example");
14620    /// ```
14621    pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
14622        mut self,
14623        v: T,
14624    ) -> Self {
14625        self.default_kms_key_name = v.into();
14626        self
14627    }
14628
14629    /// Sets the value of [internal_metadata][crate::model::Config::internal_metadata].
14630    ///
14631    /// # Example
14632    /// ```ignore,no_run
14633    /// # use google_cloud_dataform_v1::model::Config;
14634    /// let x = Config::new().set_internal_metadata("example");
14635    /// ```
14636    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
14637    where
14638        T: std::convert::Into<std::string::String>,
14639    {
14640        self.internal_metadata = std::option::Option::Some(v.into());
14641        self
14642    }
14643
14644    /// Sets or clears the value of [internal_metadata][crate::model::Config::internal_metadata].
14645    ///
14646    /// # Example
14647    /// ```ignore,no_run
14648    /// # use google_cloud_dataform_v1::model::Config;
14649    /// let x = Config::new().set_or_clear_internal_metadata(Some("example"));
14650    /// let x = Config::new().set_or_clear_internal_metadata(None::<String>);
14651    /// ```
14652    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
14653    where
14654        T: std::convert::Into<std::string::String>,
14655    {
14656        self.internal_metadata = v.map(|x| x.into());
14657        self
14658    }
14659}
14660
14661impl wkt::message::Message for Config {
14662    fn typename() -> &'static str {
14663        "type.googleapis.com/google.cloud.dataform.v1.Config"
14664    }
14665}
14666
14667/// `GetConfig` request message.
14668#[derive(Clone, Default, PartialEq)]
14669#[non_exhaustive]
14670pub struct GetConfigRequest {
14671    /// Required. The config name.
14672    pub name: std::string::String,
14673
14674    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14675}
14676
14677impl GetConfigRequest {
14678    /// Creates a new default instance.
14679    pub fn new() -> Self {
14680        std::default::Default::default()
14681    }
14682
14683    /// Sets the value of [name][crate::model::GetConfigRequest::name].
14684    ///
14685    /// # Example
14686    /// ```ignore,no_run
14687    /// # use google_cloud_dataform_v1::model::GetConfigRequest;
14688    /// # let project_id = "project_id";
14689    /// # let location_id = "location_id";
14690    /// let x = GetConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/config"));
14691    /// ```
14692    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14693        self.name = v.into();
14694        self
14695    }
14696}
14697
14698impl wkt::message::Message for GetConfigRequest {
14699    fn typename() -> &'static str {
14700        "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
14701    }
14702}
14703
14704/// `UpdateConfig` request message.
14705#[derive(Clone, Default, PartialEq)]
14706#[non_exhaustive]
14707pub struct UpdateConfigRequest {
14708    /// Required. The config to update.
14709    pub config: std::option::Option<crate::model::Config>,
14710
14711    /// Optional. Specifies the fields to be updated in the config.
14712    pub update_mask: std::option::Option<wkt::FieldMask>,
14713
14714    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14715}
14716
14717impl UpdateConfigRequest {
14718    /// Creates a new default instance.
14719    pub fn new() -> Self {
14720        std::default::Default::default()
14721    }
14722
14723    /// Sets the value of [config][crate::model::UpdateConfigRequest::config].
14724    ///
14725    /// # Example
14726    /// ```ignore,no_run
14727    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14728    /// use google_cloud_dataform_v1::model::Config;
14729    /// let x = UpdateConfigRequest::new().set_config(Config::default()/* use setters */);
14730    /// ```
14731    pub fn set_config<T>(mut self, v: T) -> Self
14732    where
14733        T: std::convert::Into<crate::model::Config>,
14734    {
14735        self.config = std::option::Option::Some(v.into());
14736        self
14737    }
14738
14739    /// Sets or clears the value of [config][crate::model::UpdateConfigRequest::config].
14740    ///
14741    /// # Example
14742    /// ```ignore,no_run
14743    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14744    /// use google_cloud_dataform_v1::model::Config;
14745    /// let x = UpdateConfigRequest::new().set_or_clear_config(Some(Config::default()/* use setters */));
14746    /// let x = UpdateConfigRequest::new().set_or_clear_config(None::<Config>);
14747    /// ```
14748    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
14749    where
14750        T: std::convert::Into<crate::model::Config>,
14751    {
14752        self.config = v.map(|x| x.into());
14753        self
14754    }
14755
14756    /// Sets the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
14757    ///
14758    /// # Example
14759    /// ```ignore,no_run
14760    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14761    /// use wkt::FieldMask;
14762    /// let x = UpdateConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
14763    /// ```
14764    pub fn set_update_mask<T>(mut self, v: T) -> Self
14765    where
14766        T: std::convert::Into<wkt::FieldMask>,
14767    {
14768        self.update_mask = std::option::Option::Some(v.into());
14769        self
14770    }
14771
14772    /// Sets or clears the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
14773    ///
14774    /// # Example
14775    /// ```ignore,no_run
14776    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14777    /// use wkt::FieldMask;
14778    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
14779    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
14780    /// ```
14781    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14782    where
14783        T: std::convert::Into<wkt::FieldMask>,
14784    {
14785        self.update_mask = v.map(|x| x.into());
14786        self
14787    }
14788}
14789
14790impl wkt::message::Message for UpdateConfigRequest {
14791    fn typename() -> &'static str {
14792        "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
14793    }
14794}
14795
14796/// Represents a Dataform Folder. This is a resource that is used to organize
14797/// Files and other Folders and provide hierarchical access controls.
14798#[derive(Clone, Default, PartialEq)]
14799#[non_exhaustive]
14800pub struct Folder {
14801    /// Identifier. The Folder's name.
14802    pub name: std::string::String,
14803
14804    /// Required. The Folder's user-friendly name.
14805    pub display_name: std::string::String,
14806
14807    /// Optional. The containing Folder resource name. This should take
14808    /// the format: projects/{project}/locations/{location}/folders/{folder},
14809    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}, or just
14810    /// projects/{project}/locations/{location} if this is a root Folder. This
14811    /// field can only be updated through MoveFolder.
14812    pub containing_folder: std::string::String,
14813
14814    /// Output only. The resource name of the TeamFolder that this Folder is
14815    /// associated with. This should take the format:
14816    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this
14817    /// is not set, the Folder is not associated with a TeamFolder and is a
14818    /// UserFolder.
14819    pub team_folder_name: std::string::String,
14820
14821    /// Output only. The timestamp of when the Folder was created.
14822    pub create_time: std::option::Option<wkt::Timestamp>,
14823
14824    /// Output only. The timestamp of when the Folder was last updated.
14825    pub update_time: std::option::Option<wkt::Timestamp>,
14826
14827    /// Output only. All the metadata information that is used internally to serve
14828    /// the resource. For example: timestamps, flags, status fields, etc. The
14829    /// format of this field is a JSON string.
14830    pub internal_metadata: std::option::Option<std::string::String>,
14831
14832    /// Output only. The IAM principal identifier of the creator of the Folder.
14833    pub creator_iam_principal: std::option::Option<std::string::String>,
14834
14835    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14836}
14837
14838impl Folder {
14839    /// Creates a new default instance.
14840    pub fn new() -> Self {
14841        std::default::Default::default()
14842    }
14843
14844    /// Sets the value of [name][crate::model::Folder::name].
14845    ///
14846    /// # Example
14847    /// ```ignore,no_run
14848    /// # use google_cloud_dataform_v1::model::Folder;
14849    /// # let project_id = "project_id";
14850    /// # let location_id = "location_id";
14851    /// # let folder_id = "folder_id";
14852    /// let x = Folder::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
14853    /// ```
14854    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14855        self.name = v.into();
14856        self
14857    }
14858
14859    /// Sets the value of [display_name][crate::model::Folder::display_name].
14860    ///
14861    /// # Example
14862    /// ```ignore,no_run
14863    /// # use google_cloud_dataform_v1::model::Folder;
14864    /// let x = Folder::new().set_display_name("example");
14865    /// ```
14866    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14867        self.display_name = v.into();
14868        self
14869    }
14870
14871    /// Sets the value of [containing_folder][crate::model::Folder::containing_folder].
14872    ///
14873    /// # Example
14874    /// ```ignore,no_run
14875    /// # use google_cloud_dataform_v1::model::Folder;
14876    /// let x = Folder::new().set_containing_folder("example");
14877    /// ```
14878    pub fn set_containing_folder<T: std::convert::Into<std::string::String>>(
14879        mut self,
14880        v: T,
14881    ) -> Self {
14882        self.containing_folder = v.into();
14883        self
14884    }
14885
14886    /// Sets the value of [team_folder_name][crate::model::Folder::team_folder_name].
14887    ///
14888    /// # Example
14889    /// ```ignore,no_run
14890    /// # use google_cloud_dataform_v1::model::Folder;
14891    /// let x = Folder::new().set_team_folder_name("example");
14892    /// ```
14893    pub fn set_team_folder_name<T: std::convert::Into<std::string::String>>(
14894        mut self,
14895        v: T,
14896    ) -> Self {
14897        self.team_folder_name = v.into();
14898        self
14899    }
14900
14901    /// Sets the value of [create_time][crate::model::Folder::create_time].
14902    ///
14903    /// # Example
14904    /// ```ignore,no_run
14905    /// # use google_cloud_dataform_v1::model::Folder;
14906    /// use wkt::Timestamp;
14907    /// let x = Folder::new().set_create_time(Timestamp::default()/* use setters */);
14908    /// ```
14909    pub fn set_create_time<T>(mut self, v: T) -> Self
14910    where
14911        T: std::convert::Into<wkt::Timestamp>,
14912    {
14913        self.create_time = std::option::Option::Some(v.into());
14914        self
14915    }
14916
14917    /// Sets or clears the value of [create_time][crate::model::Folder::create_time].
14918    ///
14919    /// # Example
14920    /// ```ignore,no_run
14921    /// # use google_cloud_dataform_v1::model::Folder;
14922    /// use wkt::Timestamp;
14923    /// let x = Folder::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14924    /// let x = Folder::new().set_or_clear_create_time(None::<Timestamp>);
14925    /// ```
14926    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14927    where
14928        T: std::convert::Into<wkt::Timestamp>,
14929    {
14930        self.create_time = v.map(|x| x.into());
14931        self
14932    }
14933
14934    /// Sets the value of [update_time][crate::model::Folder::update_time].
14935    ///
14936    /// # Example
14937    /// ```ignore,no_run
14938    /// # use google_cloud_dataform_v1::model::Folder;
14939    /// use wkt::Timestamp;
14940    /// let x = Folder::new().set_update_time(Timestamp::default()/* use setters */);
14941    /// ```
14942    pub fn set_update_time<T>(mut self, v: T) -> Self
14943    where
14944        T: std::convert::Into<wkt::Timestamp>,
14945    {
14946        self.update_time = std::option::Option::Some(v.into());
14947        self
14948    }
14949
14950    /// Sets or clears the value of [update_time][crate::model::Folder::update_time].
14951    ///
14952    /// # Example
14953    /// ```ignore,no_run
14954    /// # use google_cloud_dataform_v1::model::Folder;
14955    /// use wkt::Timestamp;
14956    /// let x = Folder::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
14957    /// let x = Folder::new().set_or_clear_update_time(None::<Timestamp>);
14958    /// ```
14959    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14960    where
14961        T: std::convert::Into<wkt::Timestamp>,
14962    {
14963        self.update_time = v.map(|x| x.into());
14964        self
14965    }
14966
14967    /// Sets the value of [internal_metadata][crate::model::Folder::internal_metadata].
14968    ///
14969    /// # Example
14970    /// ```ignore,no_run
14971    /// # use google_cloud_dataform_v1::model::Folder;
14972    /// let x = Folder::new().set_internal_metadata("example");
14973    /// ```
14974    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
14975    where
14976        T: std::convert::Into<std::string::String>,
14977    {
14978        self.internal_metadata = std::option::Option::Some(v.into());
14979        self
14980    }
14981
14982    /// Sets or clears the value of [internal_metadata][crate::model::Folder::internal_metadata].
14983    ///
14984    /// # Example
14985    /// ```ignore,no_run
14986    /// # use google_cloud_dataform_v1::model::Folder;
14987    /// let x = Folder::new().set_or_clear_internal_metadata(Some("example"));
14988    /// let x = Folder::new().set_or_clear_internal_metadata(None::<String>);
14989    /// ```
14990    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
14991    where
14992        T: std::convert::Into<std::string::String>,
14993    {
14994        self.internal_metadata = v.map(|x| x.into());
14995        self
14996    }
14997
14998    /// Sets the value of [creator_iam_principal][crate::model::Folder::creator_iam_principal].
14999    ///
15000    /// # Example
15001    /// ```ignore,no_run
15002    /// # use google_cloud_dataform_v1::model::Folder;
15003    /// let x = Folder::new().set_creator_iam_principal("example");
15004    /// ```
15005    pub fn set_creator_iam_principal<T>(mut self, v: T) -> Self
15006    where
15007        T: std::convert::Into<std::string::String>,
15008    {
15009        self.creator_iam_principal = std::option::Option::Some(v.into());
15010        self
15011    }
15012
15013    /// Sets or clears the value of [creator_iam_principal][crate::model::Folder::creator_iam_principal].
15014    ///
15015    /// # Example
15016    /// ```ignore,no_run
15017    /// # use google_cloud_dataform_v1::model::Folder;
15018    /// let x = Folder::new().set_or_clear_creator_iam_principal(Some("example"));
15019    /// let x = Folder::new().set_or_clear_creator_iam_principal(None::<String>);
15020    /// ```
15021    pub fn set_or_clear_creator_iam_principal<T>(mut self, v: std::option::Option<T>) -> Self
15022    where
15023        T: std::convert::Into<std::string::String>,
15024    {
15025        self.creator_iam_principal = v.map(|x| x.into());
15026        self
15027    }
15028}
15029
15030impl wkt::message::Message for Folder {
15031    fn typename() -> &'static str {
15032        "type.googleapis.com/google.cloud.dataform.v1.Folder"
15033    }
15034}
15035
15036/// `CreateFolder` request message.
15037#[derive(Clone, Default, PartialEq)]
15038#[non_exhaustive]
15039pub struct CreateFolderRequest {
15040    /// Required. The location in which to create the Folder. Must be in the format
15041    /// `projects/*/locations/*`.
15042    pub parent: std::string::String,
15043
15044    /// Required. The Folder to create.
15045    pub folder: std::option::Option<crate::model::Folder>,
15046
15047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15048}
15049
15050impl CreateFolderRequest {
15051    /// Creates a new default instance.
15052    pub fn new() -> Self {
15053        std::default::Default::default()
15054    }
15055
15056    /// Sets the value of [parent][crate::model::CreateFolderRequest::parent].
15057    ///
15058    /// # Example
15059    /// ```ignore,no_run
15060    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
15061    /// let x = CreateFolderRequest::new().set_parent("example");
15062    /// ```
15063    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15064        self.parent = v.into();
15065        self
15066    }
15067
15068    /// Sets the value of [folder][crate::model::CreateFolderRequest::folder].
15069    ///
15070    /// # Example
15071    /// ```ignore,no_run
15072    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
15073    /// use google_cloud_dataform_v1::model::Folder;
15074    /// let x = CreateFolderRequest::new().set_folder(Folder::default()/* use setters */);
15075    /// ```
15076    pub fn set_folder<T>(mut self, v: T) -> Self
15077    where
15078        T: std::convert::Into<crate::model::Folder>,
15079    {
15080        self.folder = std::option::Option::Some(v.into());
15081        self
15082    }
15083
15084    /// Sets or clears the value of [folder][crate::model::CreateFolderRequest::folder].
15085    ///
15086    /// # Example
15087    /// ```ignore,no_run
15088    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
15089    /// use google_cloud_dataform_v1::model::Folder;
15090    /// let x = CreateFolderRequest::new().set_or_clear_folder(Some(Folder::default()/* use setters */));
15091    /// let x = CreateFolderRequest::new().set_or_clear_folder(None::<Folder>);
15092    /// ```
15093    pub fn set_or_clear_folder<T>(mut self, v: std::option::Option<T>) -> Self
15094    where
15095        T: std::convert::Into<crate::model::Folder>,
15096    {
15097        self.folder = v.map(|x| x.into());
15098        self
15099    }
15100}
15101
15102impl wkt::message::Message for CreateFolderRequest {
15103    fn typename() -> &'static str {
15104        "type.googleapis.com/google.cloud.dataform.v1.CreateFolderRequest"
15105    }
15106}
15107
15108/// `MoveFolder` request message.
15109#[derive(Clone, Default, PartialEq)]
15110#[non_exhaustive]
15111pub struct MoveFolderRequest {
15112    /// Required. The full resource name of the Folder to move.
15113    pub name: std::string::String,
15114
15115    /// Optional. The name of the Folder, TeamFolder, or root location to move the
15116    /// Folder to. Can be in the format of: "" to move into the root User folder,
15117    /// `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*`
15118    pub destination_containing_folder: std::option::Option<std::string::String>,
15119
15120    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15121}
15122
15123impl MoveFolderRequest {
15124    /// Creates a new default instance.
15125    pub fn new() -> Self {
15126        std::default::Default::default()
15127    }
15128
15129    /// Sets the value of [name][crate::model::MoveFolderRequest::name].
15130    ///
15131    /// # Example
15132    /// ```ignore,no_run
15133    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
15134    /// # let project_id = "project_id";
15135    /// # let location_id = "location_id";
15136    /// # let folder_id = "folder_id";
15137    /// let x = MoveFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15138    /// ```
15139    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15140        self.name = v.into();
15141        self
15142    }
15143
15144    /// Sets the value of [destination_containing_folder][crate::model::MoveFolderRequest::destination_containing_folder].
15145    ///
15146    /// # Example
15147    /// ```ignore,no_run
15148    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
15149    /// let x = MoveFolderRequest::new().set_destination_containing_folder("example");
15150    /// ```
15151    pub fn set_destination_containing_folder<T>(mut self, v: T) -> Self
15152    where
15153        T: std::convert::Into<std::string::String>,
15154    {
15155        self.destination_containing_folder = std::option::Option::Some(v.into());
15156        self
15157    }
15158
15159    /// Sets or clears the value of [destination_containing_folder][crate::model::MoveFolderRequest::destination_containing_folder].
15160    ///
15161    /// # Example
15162    /// ```ignore,no_run
15163    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
15164    /// let x = MoveFolderRequest::new().set_or_clear_destination_containing_folder(Some("example"));
15165    /// let x = MoveFolderRequest::new().set_or_clear_destination_containing_folder(None::<String>);
15166    /// ```
15167    pub fn set_or_clear_destination_containing_folder<T>(
15168        mut self,
15169        v: std::option::Option<T>,
15170    ) -> Self
15171    where
15172        T: std::convert::Into<std::string::String>,
15173    {
15174        self.destination_containing_folder = v.map(|x| x.into());
15175        self
15176    }
15177}
15178
15179impl wkt::message::Message for MoveFolderRequest {
15180    fn typename() -> &'static str {
15181        "type.googleapis.com/google.cloud.dataform.v1.MoveFolderRequest"
15182    }
15183}
15184
15185/// `GetFolder` request message.
15186#[derive(Clone, Default, PartialEq)]
15187#[non_exhaustive]
15188pub struct GetFolderRequest {
15189    /// Required. The Folder's name.
15190    pub name: std::string::String,
15191
15192    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15193}
15194
15195impl GetFolderRequest {
15196    /// Creates a new default instance.
15197    pub fn new() -> Self {
15198        std::default::Default::default()
15199    }
15200
15201    /// Sets the value of [name][crate::model::GetFolderRequest::name].
15202    ///
15203    /// # Example
15204    /// ```ignore,no_run
15205    /// # use google_cloud_dataform_v1::model::GetFolderRequest;
15206    /// # let project_id = "project_id";
15207    /// # let location_id = "location_id";
15208    /// # let folder_id = "folder_id";
15209    /// let x = GetFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15210    /// ```
15211    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15212        self.name = v.into();
15213        self
15214    }
15215}
15216
15217impl wkt::message::Message for GetFolderRequest {
15218    fn typename() -> &'static str {
15219        "type.googleapis.com/google.cloud.dataform.v1.GetFolderRequest"
15220    }
15221}
15222
15223/// `UpdateFolder` request message.
15224#[derive(Clone, Default, PartialEq)]
15225#[non_exhaustive]
15226pub struct UpdateFolderRequest {
15227    /// Optional. Specifies the fields to be updated in the Folder. If left unset,
15228    /// all fields that can be updated, will be updated. A few fields cannot be
15229    /// updated and will be ignored if specified in the update_mask (e.g.
15230    /// parent_name, team_folder_name).
15231    pub update_mask: std::option::Option<wkt::FieldMask>,
15232
15233    /// Required. The updated Folder.
15234    pub folder: std::option::Option<crate::model::Folder>,
15235
15236    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15237}
15238
15239impl UpdateFolderRequest {
15240    /// Creates a new default instance.
15241    pub fn new() -> Self {
15242        std::default::Default::default()
15243    }
15244
15245    /// Sets the value of [update_mask][crate::model::UpdateFolderRequest::update_mask].
15246    ///
15247    /// # Example
15248    /// ```ignore,no_run
15249    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15250    /// use wkt::FieldMask;
15251    /// let x = UpdateFolderRequest::new().set_update_mask(FieldMask::default()/* use setters */);
15252    /// ```
15253    pub fn set_update_mask<T>(mut self, v: T) -> Self
15254    where
15255        T: std::convert::Into<wkt::FieldMask>,
15256    {
15257        self.update_mask = std::option::Option::Some(v.into());
15258        self
15259    }
15260
15261    /// Sets or clears the value of [update_mask][crate::model::UpdateFolderRequest::update_mask].
15262    ///
15263    /// # Example
15264    /// ```ignore,no_run
15265    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15266    /// use wkt::FieldMask;
15267    /// let x = UpdateFolderRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
15268    /// let x = UpdateFolderRequest::new().set_or_clear_update_mask(None::<FieldMask>);
15269    /// ```
15270    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15271    where
15272        T: std::convert::Into<wkt::FieldMask>,
15273    {
15274        self.update_mask = v.map(|x| x.into());
15275        self
15276    }
15277
15278    /// Sets the value of [folder][crate::model::UpdateFolderRequest::folder].
15279    ///
15280    /// # Example
15281    /// ```ignore,no_run
15282    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15283    /// use google_cloud_dataform_v1::model::Folder;
15284    /// let x = UpdateFolderRequest::new().set_folder(Folder::default()/* use setters */);
15285    /// ```
15286    pub fn set_folder<T>(mut self, v: T) -> Self
15287    where
15288        T: std::convert::Into<crate::model::Folder>,
15289    {
15290        self.folder = std::option::Option::Some(v.into());
15291        self
15292    }
15293
15294    /// Sets or clears the value of [folder][crate::model::UpdateFolderRequest::folder].
15295    ///
15296    /// # Example
15297    /// ```ignore,no_run
15298    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15299    /// use google_cloud_dataform_v1::model::Folder;
15300    /// let x = UpdateFolderRequest::new().set_or_clear_folder(Some(Folder::default()/* use setters */));
15301    /// let x = UpdateFolderRequest::new().set_or_clear_folder(None::<Folder>);
15302    /// ```
15303    pub fn set_or_clear_folder<T>(mut self, v: std::option::Option<T>) -> Self
15304    where
15305        T: std::convert::Into<crate::model::Folder>,
15306    {
15307        self.folder = v.map(|x| x.into());
15308        self
15309    }
15310}
15311
15312impl wkt::message::Message for UpdateFolderRequest {
15313    fn typename() -> &'static str {
15314        "type.googleapis.com/google.cloud.dataform.v1.UpdateFolderRequest"
15315    }
15316}
15317
15318/// `DeleteFolder` request message.
15319#[derive(Clone, Default, PartialEq)]
15320#[non_exhaustive]
15321pub struct DeleteFolderRequest {
15322    /// Required. The Folder's name.
15323    pub name: std::string::String,
15324
15325    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15326}
15327
15328impl DeleteFolderRequest {
15329    /// Creates a new default instance.
15330    pub fn new() -> Self {
15331        std::default::Default::default()
15332    }
15333
15334    /// Sets the value of [name][crate::model::DeleteFolderRequest::name].
15335    ///
15336    /// # Example
15337    /// ```ignore,no_run
15338    /// # use google_cloud_dataform_v1::model::DeleteFolderRequest;
15339    /// # let project_id = "project_id";
15340    /// # let location_id = "location_id";
15341    /// # let folder_id = "folder_id";
15342    /// let x = DeleteFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15343    /// ```
15344    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15345        self.name = v.into();
15346        self
15347    }
15348}
15349
15350impl wkt::message::Message for DeleteFolderRequest {
15351    fn typename() -> &'static str {
15352        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderRequest"
15353    }
15354}
15355
15356/// `DeleteFolderTree` request message.
15357#[derive(Clone, Default, PartialEq)]
15358#[non_exhaustive]
15359pub struct DeleteFolderTreeRequest {
15360    /// Required. The Folder's name.
15361    /// Format: projects/{project}/locations/{location}/folders/{folder}
15362    pub name: std::string::String,
15363
15364    /// Optional. If `false` (default): The operation will fail if any
15365    /// Repository within the folder hierarchy has associated Release Configs or
15366    /// Workflow Configs.
15367    ///
15368    /// If `true`: The operation will attempt to delete everything, including any
15369    /// Release Configs and Workflow Configs linked to Repositories within the
15370    /// folder hierarchy. This permanently removes schedules and resources.
15371    pub force: bool,
15372
15373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15374}
15375
15376impl DeleteFolderTreeRequest {
15377    /// Creates a new default instance.
15378    pub fn new() -> Self {
15379        std::default::Default::default()
15380    }
15381
15382    /// Sets the value of [name][crate::model::DeleteFolderTreeRequest::name].
15383    ///
15384    /// # Example
15385    /// ```ignore,no_run
15386    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeRequest;
15387    /// # let project_id = "project_id";
15388    /// # let location_id = "location_id";
15389    /// # let folder_id = "folder_id";
15390    /// let x = DeleteFolderTreeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15391    /// ```
15392    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15393        self.name = v.into();
15394        self
15395    }
15396
15397    /// Sets the value of [force][crate::model::DeleteFolderTreeRequest::force].
15398    ///
15399    /// # Example
15400    /// ```ignore,no_run
15401    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeRequest;
15402    /// let x = DeleteFolderTreeRequest::new().set_force(true);
15403    /// ```
15404    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15405        self.force = v.into();
15406        self
15407    }
15408}
15409
15410impl wkt::message::Message for DeleteFolderTreeRequest {
15411    fn typename() -> &'static str {
15412        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderTreeRequest"
15413    }
15414}
15415
15416/// `DeleteTeamFolderTree` request message.
15417#[derive(Clone, Default, PartialEq)]
15418#[non_exhaustive]
15419pub struct DeleteTeamFolderTreeRequest {
15420    /// Required. The TeamFolder's name.
15421    /// Format: projects/{project}/locations/{location}/teamFolders/{team_folder}
15422    pub name: std::string::String,
15423
15424    /// Optional. If `false` (default): The operation will fail if any
15425    /// Repository within the folder hierarchy has associated Release Configs or
15426    /// Workflow Configs.
15427    ///
15428    /// If `true`: The operation will attempt to delete everything, including any
15429    /// Release Configs and Workflow Configs linked to Repositories within the
15430    /// folder hierarchy. This permanently removes schedules and resources.
15431    pub force: bool,
15432
15433    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15434}
15435
15436impl DeleteTeamFolderTreeRequest {
15437    /// Creates a new default instance.
15438    pub fn new() -> Self {
15439        std::default::Default::default()
15440    }
15441
15442    /// Sets the value of [name][crate::model::DeleteTeamFolderTreeRequest::name].
15443    ///
15444    /// # Example
15445    /// ```ignore,no_run
15446    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderTreeRequest;
15447    /// # let project_id = "project_id";
15448    /// # let location_id = "location_id";
15449    /// # let team_folder_id = "team_folder_id";
15450    /// let x = DeleteTeamFolderTreeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
15451    /// ```
15452    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15453        self.name = v.into();
15454        self
15455    }
15456
15457    /// Sets the value of [force][crate::model::DeleteTeamFolderTreeRequest::force].
15458    ///
15459    /// # Example
15460    /// ```ignore,no_run
15461    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderTreeRequest;
15462    /// let x = DeleteTeamFolderTreeRequest::new().set_force(true);
15463    /// ```
15464    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15465        self.force = v.into();
15466        self
15467    }
15468}
15469
15470impl wkt::message::Message for DeleteTeamFolderTreeRequest {
15471    fn typename() -> &'static str {
15472        "type.googleapis.com/google.cloud.dataform.v1.DeleteTeamFolderTreeRequest"
15473    }
15474}
15475
15476/// Contains metadata about the progress of the DeleteFolderTree Long-running
15477/// operations.
15478#[derive(Clone, Default, PartialEq)]
15479#[non_exhaustive]
15480pub struct DeleteFolderTreeMetadata {
15481    /// Output only. The time the operation was created.
15482    pub create_time: std::option::Option<wkt::Timestamp>,
15483
15484    /// Output only. The time the operation finished running.
15485    pub end_time: std::option::Option<wkt::Timestamp>,
15486
15487    /// Output only. Resource name of the target of the operation.
15488    /// Format: projects/{project}/locations/{location}/folders/{folder} or
15489    /// projects/{project}/locations/{location}/teamFolders/{team_folder}
15490    pub target: std::string::String,
15491
15492    /// Output only. The state of the operation.
15493    pub state: crate::model::delete_folder_tree_metadata::State,
15494
15495    /// Output only. Percent complete of the operation [0, 100].
15496    pub percent_complete: i32,
15497
15498    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15499}
15500
15501impl DeleteFolderTreeMetadata {
15502    /// Creates a new default instance.
15503    pub fn new() -> Self {
15504        std::default::Default::default()
15505    }
15506
15507    /// Sets the value of [create_time][crate::model::DeleteFolderTreeMetadata::create_time].
15508    ///
15509    /// # Example
15510    /// ```ignore,no_run
15511    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15512    /// use wkt::Timestamp;
15513    /// let x = DeleteFolderTreeMetadata::new().set_create_time(Timestamp::default()/* use setters */);
15514    /// ```
15515    pub fn set_create_time<T>(mut self, v: T) -> Self
15516    where
15517        T: std::convert::Into<wkt::Timestamp>,
15518    {
15519        self.create_time = std::option::Option::Some(v.into());
15520        self
15521    }
15522
15523    /// Sets or clears the value of [create_time][crate::model::DeleteFolderTreeMetadata::create_time].
15524    ///
15525    /// # Example
15526    /// ```ignore,no_run
15527    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15528    /// use wkt::Timestamp;
15529    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
15530    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_create_time(None::<Timestamp>);
15531    /// ```
15532    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15533    where
15534        T: std::convert::Into<wkt::Timestamp>,
15535    {
15536        self.create_time = v.map(|x| x.into());
15537        self
15538    }
15539
15540    /// Sets the value of [end_time][crate::model::DeleteFolderTreeMetadata::end_time].
15541    ///
15542    /// # Example
15543    /// ```ignore,no_run
15544    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15545    /// use wkt::Timestamp;
15546    /// let x = DeleteFolderTreeMetadata::new().set_end_time(Timestamp::default()/* use setters */);
15547    /// ```
15548    pub fn set_end_time<T>(mut self, v: T) -> Self
15549    where
15550        T: std::convert::Into<wkt::Timestamp>,
15551    {
15552        self.end_time = std::option::Option::Some(v.into());
15553        self
15554    }
15555
15556    /// Sets or clears the value of [end_time][crate::model::DeleteFolderTreeMetadata::end_time].
15557    ///
15558    /// # Example
15559    /// ```ignore,no_run
15560    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15561    /// use wkt::Timestamp;
15562    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15563    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_end_time(None::<Timestamp>);
15564    /// ```
15565    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15566    where
15567        T: std::convert::Into<wkt::Timestamp>,
15568    {
15569        self.end_time = v.map(|x| x.into());
15570        self
15571    }
15572
15573    /// Sets the value of [target][crate::model::DeleteFolderTreeMetadata::target].
15574    ///
15575    /// # Example
15576    /// ```ignore,no_run
15577    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15578    /// let x = DeleteFolderTreeMetadata::new().set_target("example");
15579    /// ```
15580    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15581        self.target = v.into();
15582        self
15583    }
15584
15585    /// Sets the value of [state][crate::model::DeleteFolderTreeMetadata::state].
15586    ///
15587    /// # Example
15588    /// ```ignore,no_run
15589    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15590    /// use google_cloud_dataform_v1::model::delete_folder_tree_metadata::State;
15591    /// let x0 = DeleteFolderTreeMetadata::new().set_state(State::Initialized);
15592    /// let x1 = DeleteFolderTreeMetadata::new().set_state(State::InProgress);
15593    /// let x2 = DeleteFolderTreeMetadata::new().set_state(State::Succeeded);
15594    /// ```
15595    pub fn set_state<T: std::convert::Into<crate::model::delete_folder_tree_metadata::State>>(
15596        mut self,
15597        v: T,
15598    ) -> Self {
15599        self.state = v.into();
15600        self
15601    }
15602
15603    /// Sets the value of [percent_complete][crate::model::DeleteFolderTreeMetadata::percent_complete].
15604    ///
15605    /// # Example
15606    /// ```ignore,no_run
15607    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15608    /// let x = DeleteFolderTreeMetadata::new().set_percent_complete(42);
15609    /// ```
15610    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15611        self.percent_complete = v.into();
15612        self
15613    }
15614}
15615
15616impl wkt::message::Message for DeleteFolderTreeMetadata {
15617    fn typename() -> &'static str {
15618        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderTreeMetadata"
15619    }
15620}
15621
15622/// Defines additional types related to [DeleteFolderTreeMetadata].
15623pub mod delete_folder_tree_metadata {
15624    #[allow(unused_imports)]
15625    use super::*;
15626
15627    /// Different states of the DeleteFolderTree operation.
15628    ///
15629    /// # Working with unknown values
15630    ///
15631    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15632    /// additional enum variants at any time. Adding new variants is not considered
15633    /// a breaking change. Applications should write their code in anticipation of:
15634    ///
15635    /// - New values appearing in future releases of the client library, **and**
15636    /// - New values received dynamically, without application changes.
15637    ///
15638    /// Please consult the [Working with enums] section in the user guide for some
15639    /// guidelines.
15640    ///
15641    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15642    #[derive(Clone, Debug, PartialEq)]
15643    #[non_exhaustive]
15644    pub enum State {
15645        /// The state is unspecified.
15646        Unspecified,
15647        /// The operation was initialized and recorded by the server, but not yet
15648        /// started.
15649        Initialized,
15650        /// The operation is in progress.
15651        InProgress,
15652        /// The operation has completed successfully.
15653        Succeeded,
15654        /// The operation has failed.
15655        Failed,
15656        /// If set, the enum was initialized with an unknown value.
15657        ///
15658        /// Applications can examine the value using [State::value] or
15659        /// [State::name].
15660        UnknownValue(state::UnknownValue),
15661    }
15662
15663    #[doc(hidden)]
15664    pub mod state {
15665        #[allow(unused_imports)]
15666        use super::*;
15667        #[derive(Clone, Debug, PartialEq)]
15668        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15669    }
15670
15671    impl State {
15672        /// Gets the enum value.
15673        ///
15674        /// Returns `None` if the enum contains an unknown value deserialized from
15675        /// the string representation of enums.
15676        pub fn value(&self) -> std::option::Option<i32> {
15677            match self {
15678                Self::Unspecified => std::option::Option::Some(0),
15679                Self::Initialized => std::option::Option::Some(1),
15680                Self::InProgress => std::option::Option::Some(2),
15681                Self::Succeeded => std::option::Option::Some(3),
15682                Self::Failed => std::option::Option::Some(4),
15683                Self::UnknownValue(u) => u.0.value(),
15684            }
15685        }
15686
15687        /// Gets the enum value as a string.
15688        ///
15689        /// Returns `None` if the enum contains an unknown value deserialized from
15690        /// the integer representation of enums.
15691        pub fn name(&self) -> std::option::Option<&str> {
15692            match self {
15693                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15694                Self::Initialized => std::option::Option::Some("INITIALIZED"),
15695                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
15696                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
15697                Self::Failed => std::option::Option::Some("FAILED"),
15698                Self::UnknownValue(u) => u.0.name(),
15699            }
15700        }
15701    }
15702
15703    impl std::default::Default for State {
15704        fn default() -> Self {
15705            use std::convert::From;
15706            Self::from(0)
15707        }
15708    }
15709
15710    impl std::fmt::Display for State {
15711        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15712            wkt::internal::display_enum(f, self.name(), self.value())
15713        }
15714    }
15715
15716    impl std::convert::From<i32> for State {
15717        fn from(value: i32) -> Self {
15718            match value {
15719                0 => Self::Unspecified,
15720                1 => Self::Initialized,
15721                2 => Self::InProgress,
15722                3 => Self::Succeeded,
15723                4 => Self::Failed,
15724                _ => Self::UnknownValue(state::UnknownValue(
15725                    wkt::internal::UnknownEnumValue::Integer(value),
15726                )),
15727            }
15728        }
15729    }
15730
15731    impl std::convert::From<&str> for State {
15732        fn from(value: &str) -> Self {
15733            use std::string::ToString;
15734            match value {
15735                "STATE_UNSPECIFIED" => Self::Unspecified,
15736                "INITIALIZED" => Self::Initialized,
15737                "IN_PROGRESS" => Self::InProgress,
15738                "SUCCEEDED" => Self::Succeeded,
15739                "FAILED" => Self::Failed,
15740                _ => Self::UnknownValue(state::UnknownValue(
15741                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15742                )),
15743            }
15744        }
15745    }
15746
15747    impl serde::ser::Serialize for State {
15748        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15749        where
15750            S: serde::Serializer,
15751        {
15752            match self {
15753                Self::Unspecified => serializer.serialize_i32(0),
15754                Self::Initialized => serializer.serialize_i32(1),
15755                Self::InProgress => serializer.serialize_i32(2),
15756                Self::Succeeded => serializer.serialize_i32(3),
15757                Self::Failed => serializer.serialize_i32(4),
15758                Self::UnknownValue(u) => u.0.serialize(serializer),
15759            }
15760        }
15761    }
15762
15763    impl<'de> serde::de::Deserialize<'de> for State {
15764        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15765        where
15766            D: serde::Deserializer<'de>,
15767        {
15768            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15769                ".google.cloud.dataform.v1.DeleteFolderTreeMetadata.State",
15770            ))
15771        }
15772    }
15773}
15774
15775/// `QueryFolderContents` request message.
15776#[derive(Clone, Default, PartialEq)]
15777#[non_exhaustive]
15778pub struct QueryFolderContentsRequest {
15779    /// Required. Name of the folder whose contents to list.
15780    /// Format: projects/*/locations/*/folders/*
15781    pub folder: std::string::String,
15782
15783    /// Optional. Maximum number of paths to return. The server may return fewer
15784    /// items than requested. If unspecified, the server will pick an appropriate
15785    /// default.
15786    pub page_size: i32,
15787
15788    /// Optional. Page token received from a previous `QueryFolderContents` call.
15789    /// Provide this to retrieve the subsequent page.
15790    ///
15791    /// When paginating, all other parameters provided to
15792    /// `QueryFolderContents`, with the exception of `page_size`, must match the
15793    /// call that provided the page token.
15794    pub page_token: std::string::String,
15795
15796    /// Optional. Field to additionally sort results by.
15797    /// Will order Folders before Repositories, and then by `order_by` in ascending
15798    /// order. Supported keywords: display_name (default), create_time,
15799    /// last_modified_time.
15800    /// Examples:
15801    ///
15802    /// - `orderBy="display_name"`
15803    /// - `orderBy="display_name desc"`
15804    pub order_by: std::string::String,
15805
15806    /// Optional. Optional filtering for the returned list. Filtering is currently
15807    /// only supported on the `display_name` field.
15808    ///
15809    /// Example:
15810    ///
15811    /// - `filter="display_name="MyFolder""`
15812    pub filter: std::string::String,
15813
15814    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15815}
15816
15817impl QueryFolderContentsRequest {
15818    /// Creates a new default instance.
15819    pub fn new() -> Self {
15820        std::default::Default::default()
15821    }
15822
15823    /// Sets the value of [folder][crate::model::QueryFolderContentsRequest::folder].
15824    ///
15825    /// # Example
15826    /// ```ignore,no_run
15827    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15828    /// # let project_id = "project_id";
15829    /// # let location_id = "location_id";
15830    /// # let folder_id = "folder_id";
15831    /// let x = QueryFolderContentsRequest::new().set_folder(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15832    /// ```
15833    pub fn set_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15834        self.folder = v.into();
15835        self
15836    }
15837
15838    /// Sets the value of [page_size][crate::model::QueryFolderContentsRequest::page_size].
15839    ///
15840    /// # Example
15841    /// ```ignore,no_run
15842    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15843    /// let x = QueryFolderContentsRequest::new().set_page_size(42);
15844    /// ```
15845    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15846        self.page_size = v.into();
15847        self
15848    }
15849
15850    /// Sets the value of [page_token][crate::model::QueryFolderContentsRequest::page_token].
15851    ///
15852    /// # Example
15853    /// ```ignore,no_run
15854    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15855    /// let x = QueryFolderContentsRequest::new().set_page_token("example");
15856    /// ```
15857    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15858        self.page_token = v.into();
15859        self
15860    }
15861
15862    /// Sets the value of [order_by][crate::model::QueryFolderContentsRequest::order_by].
15863    ///
15864    /// # Example
15865    /// ```ignore,no_run
15866    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15867    /// let x = QueryFolderContentsRequest::new().set_order_by("example");
15868    /// ```
15869    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15870        self.order_by = v.into();
15871        self
15872    }
15873
15874    /// Sets the value of [filter][crate::model::QueryFolderContentsRequest::filter].
15875    ///
15876    /// # Example
15877    /// ```ignore,no_run
15878    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15879    /// let x = QueryFolderContentsRequest::new().set_filter("example");
15880    /// ```
15881    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15882        self.filter = v.into();
15883        self
15884    }
15885}
15886
15887impl wkt::message::Message for QueryFolderContentsRequest {
15888    fn typename() -> &'static str {
15889        "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsRequest"
15890    }
15891}
15892
15893/// `QueryFolderContents` response message.
15894#[derive(Clone, Default, PartialEq)]
15895#[non_exhaustive]
15896pub struct QueryFolderContentsResponse {
15897    /// List of entries in the folder.
15898    pub entries: std::vec::Vec<crate::model::query_folder_contents_response::FolderContentsEntry>,
15899
15900    /// A token, which can be sent as `page_token` to retrieve the next page.
15901    /// If this field is omitted, there are no subsequent pages.
15902    pub next_page_token: std::string::String,
15903
15904    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15905}
15906
15907impl QueryFolderContentsResponse {
15908    /// Creates a new default instance.
15909    pub fn new() -> Self {
15910        std::default::Default::default()
15911    }
15912
15913    /// Sets the value of [entries][crate::model::QueryFolderContentsResponse::entries].
15914    ///
15915    /// # Example
15916    /// ```ignore,no_run
15917    /// # use google_cloud_dataform_v1::model::QueryFolderContentsResponse;
15918    /// use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
15919    /// let x = QueryFolderContentsResponse::new()
15920    ///     .set_entries([
15921    ///         FolderContentsEntry::default()/* use setters */,
15922    ///         FolderContentsEntry::default()/* use (different) setters */,
15923    ///     ]);
15924    /// ```
15925    pub fn set_entries<T, V>(mut self, v: T) -> Self
15926    where
15927        T: std::iter::IntoIterator<Item = V>,
15928        V: std::convert::Into<crate::model::query_folder_contents_response::FolderContentsEntry>,
15929    {
15930        use std::iter::Iterator;
15931        self.entries = v.into_iter().map(|i| i.into()).collect();
15932        self
15933    }
15934
15935    /// Sets the value of [next_page_token][crate::model::QueryFolderContentsResponse::next_page_token].
15936    ///
15937    /// # Example
15938    /// ```ignore,no_run
15939    /// # use google_cloud_dataform_v1::model::QueryFolderContentsResponse;
15940    /// let x = QueryFolderContentsResponse::new().set_next_page_token("example");
15941    /// ```
15942    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15943        self.next_page_token = v.into();
15944        self
15945    }
15946}
15947
15948impl wkt::message::Message for QueryFolderContentsResponse {
15949    fn typename() -> &'static str {
15950        "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsResponse"
15951    }
15952}
15953
15954#[doc(hidden)]
15955impl google_cloud_gax::paginator::internal::PageableResponse for QueryFolderContentsResponse {
15956    type PageItem = crate::model::query_folder_contents_response::FolderContentsEntry;
15957
15958    fn items(self) -> std::vec::Vec<Self::PageItem> {
15959        self.entries
15960    }
15961
15962    fn next_page_token(&self) -> std::string::String {
15963        use std::clone::Clone;
15964        self.next_page_token.clone()
15965    }
15966}
15967
15968/// Defines additional types related to [QueryFolderContentsResponse].
15969pub mod query_folder_contents_response {
15970    #[allow(unused_imports)]
15971    use super::*;
15972
15973    /// Represents a single content entry.
15974    #[derive(Clone, Default, PartialEq)]
15975    #[non_exhaustive]
15976    pub struct FolderContentsEntry {
15977        /// The content entry.
15978        pub entry: std::option::Option<
15979            crate::model::query_folder_contents_response::folder_contents_entry::Entry,
15980        >,
15981
15982        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15983    }
15984
15985    impl FolderContentsEntry {
15986        /// Creates a new default instance.
15987        pub fn new() -> Self {
15988            std::default::Default::default()
15989        }
15990
15991        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry].
15992        ///
15993        /// Note that all the setters affecting `entry` are mutually
15994        /// exclusive.
15995        ///
15996        /// # Example
15997        /// ```ignore,no_run
15998        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
15999        /// use google_cloud_dataform_v1::model::Folder;
16000        /// let x = FolderContentsEntry::new().set_entry(Some(
16001        ///     google_cloud_dataform_v1::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(Folder::default().into())));
16002        /// ```
16003        pub fn set_entry<
16004            T: std::convert::Into<
16005                    std::option::Option<
16006                        crate::model::query_folder_contents_response::folder_contents_entry::Entry,
16007                    >,
16008                >,
16009        >(
16010            mut self,
16011            v: T,
16012        ) -> Self {
16013            self.entry = v.into();
16014            self
16015        }
16016
16017        /// The value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16018        /// if it holds a `Folder`, `None` if the field is not set or
16019        /// holds a different branch.
16020        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
16021            #[allow(unreachable_patterns)]
16022            self.entry.as_ref().and_then(|v| match v {
16023                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
16024                _ => std::option::Option::None,
16025            })
16026        }
16027
16028        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16029        /// to hold a `Folder`.
16030        ///
16031        /// Note that all the setters affecting `entry` are
16032        /// mutually exclusive.
16033        ///
16034        /// # Example
16035        /// ```ignore,no_run
16036        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
16037        /// use google_cloud_dataform_v1::model::Folder;
16038        /// let x = FolderContentsEntry::new().set_folder(Folder::default()/* use setters */);
16039        /// assert!(x.folder().is_some());
16040        /// assert!(x.repository().is_none());
16041        /// ```
16042        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
16043            mut self,
16044            v: T,
16045        ) -> Self {
16046            self.entry = std::option::Option::Some(
16047                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(
16048                    v.into(),
16049                ),
16050            );
16051            self
16052        }
16053
16054        /// The value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16055        /// if it holds a `Repository`, `None` if the field is not set or
16056        /// holds a different branch.
16057        pub fn repository(
16058            &self,
16059        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
16060            #[allow(unreachable_patterns)]
16061            self.entry.as_ref().and_then(|v| match v {
16062                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
16063                _ => std::option::Option::None,
16064            })
16065        }
16066
16067        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16068        /// to hold a `Repository`.
16069        ///
16070        /// Note that all the setters affecting `entry` are
16071        /// mutually exclusive.
16072        ///
16073        /// # Example
16074        /// ```ignore,no_run
16075        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
16076        /// use google_cloud_dataform_v1::model::Repository;
16077        /// let x = FolderContentsEntry::new().set_repository(Repository::default()/* use setters */);
16078        /// assert!(x.repository().is_some());
16079        /// assert!(x.folder().is_none());
16080        /// ```
16081        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
16082            mut self,
16083            v: T,
16084        ) -> Self {
16085            self.entry = std::option::Option::Some(
16086                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Repository(
16087                    v.into()
16088                )
16089            );
16090            self
16091        }
16092    }
16093
16094    impl wkt::message::Message for FolderContentsEntry {
16095        fn typename() -> &'static str {
16096            "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsResponse.FolderContentsEntry"
16097        }
16098    }
16099
16100    /// Defines additional types related to [FolderContentsEntry].
16101    pub mod folder_contents_entry {
16102        #[allow(unused_imports)]
16103        use super::*;
16104
16105        /// The content entry.
16106        #[derive(Clone, Debug, PartialEq)]
16107        #[non_exhaustive]
16108        pub enum Entry {
16109            /// A subfolder.
16110            Folder(std::boxed::Box<crate::model::Folder>),
16111            /// A repository.
16112            Repository(std::boxed::Box<crate::model::Repository>),
16113        }
16114    }
16115}
16116
16117/// `QueryUserRootContents` request message.
16118#[derive(Clone, Default, PartialEq)]
16119#[non_exhaustive]
16120pub struct QueryUserRootContentsRequest {
16121    /// Required. Location of the user root folder whose contents to list.
16122    /// Format: projects/*/locations/*
16123    pub location: std::string::String,
16124
16125    /// Optional. Maximum number of paths to return. The server may return fewer
16126    /// items than requested. If unspecified, the server will pick an appropriate
16127    /// default.
16128    pub page_size: i32,
16129
16130    /// Optional. Page token received from a previous `QueryUserRootContents` call.
16131    /// Provide this to retrieve the subsequent page.
16132    ///
16133    /// When paginating, all other parameters provided to
16134    /// `QueryUserRootFolderContents`, with the exception of `page_size`, must
16135    /// match the call that provided the page token.
16136    pub page_token: std::string::String,
16137
16138    /// Optional. Field to additionally sort results by.
16139    /// Will order Folders before Repositories, and then by `order_by` in ascending
16140    /// order. Supported keywords: display_name (default), created_at,
16141    /// last_modified_at. Examples:
16142    ///
16143    /// - `orderBy="display_name"`
16144    /// - `orderBy="display_name desc"`
16145    pub order_by: std::string::String,
16146
16147    /// Optional. Optional filtering for the returned list. Filtering is currently
16148    /// only supported on the `display_name` field.
16149    ///
16150    /// Example:
16151    ///
16152    /// - `filter="display_name="MyFolder""`
16153    pub filter: std::string::String,
16154
16155    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16156}
16157
16158impl QueryUserRootContentsRequest {
16159    /// Creates a new default instance.
16160    pub fn new() -> Self {
16161        std::default::Default::default()
16162    }
16163
16164    /// Sets the value of [location][crate::model::QueryUserRootContentsRequest::location].
16165    ///
16166    /// # Example
16167    /// ```ignore,no_run
16168    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16169    /// let x = QueryUserRootContentsRequest::new().set_location("example");
16170    /// ```
16171    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16172        self.location = v.into();
16173        self
16174    }
16175
16176    /// Sets the value of [page_size][crate::model::QueryUserRootContentsRequest::page_size].
16177    ///
16178    /// # Example
16179    /// ```ignore,no_run
16180    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16181    /// let x = QueryUserRootContentsRequest::new().set_page_size(42);
16182    /// ```
16183    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16184        self.page_size = v.into();
16185        self
16186    }
16187
16188    /// Sets the value of [page_token][crate::model::QueryUserRootContentsRequest::page_token].
16189    ///
16190    /// # Example
16191    /// ```ignore,no_run
16192    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16193    /// let x = QueryUserRootContentsRequest::new().set_page_token("example");
16194    /// ```
16195    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16196        self.page_token = v.into();
16197        self
16198    }
16199
16200    /// Sets the value of [order_by][crate::model::QueryUserRootContentsRequest::order_by].
16201    ///
16202    /// # Example
16203    /// ```ignore,no_run
16204    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16205    /// let x = QueryUserRootContentsRequest::new().set_order_by("example");
16206    /// ```
16207    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16208        self.order_by = v.into();
16209        self
16210    }
16211
16212    /// Sets the value of [filter][crate::model::QueryUserRootContentsRequest::filter].
16213    ///
16214    /// # Example
16215    /// ```ignore,no_run
16216    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16217    /// let x = QueryUserRootContentsRequest::new().set_filter("example");
16218    /// ```
16219    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16220        self.filter = v.into();
16221        self
16222    }
16223}
16224
16225impl wkt::message::Message for QueryUserRootContentsRequest {
16226    fn typename() -> &'static str {
16227        "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsRequest"
16228    }
16229}
16230
16231/// `QueryUserRootContents` response message.
16232#[derive(Clone, Default, PartialEq)]
16233#[non_exhaustive]
16234pub struct QueryUserRootContentsResponse {
16235    /// List of entries in the folder.
16236    pub entries: std::vec::Vec<crate::model::query_user_root_contents_response::RootContentsEntry>,
16237
16238    /// A token, which can be sent as `page_token` to retrieve the next page.
16239    /// If this field is omitted, there are no subsequent pages.
16240    pub next_page_token: std::string::String,
16241
16242    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16243}
16244
16245impl QueryUserRootContentsResponse {
16246    /// Creates a new default instance.
16247    pub fn new() -> Self {
16248        std::default::Default::default()
16249    }
16250
16251    /// Sets the value of [entries][crate::model::QueryUserRootContentsResponse::entries].
16252    ///
16253    /// # Example
16254    /// ```ignore,no_run
16255    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsResponse;
16256    /// use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16257    /// let x = QueryUserRootContentsResponse::new()
16258    ///     .set_entries([
16259    ///         RootContentsEntry::default()/* use setters */,
16260    ///         RootContentsEntry::default()/* use (different) setters */,
16261    ///     ]);
16262    /// ```
16263    pub fn set_entries<T, V>(mut self, v: T) -> Self
16264    where
16265        T: std::iter::IntoIterator<Item = V>,
16266        V: std::convert::Into<crate::model::query_user_root_contents_response::RootContentsEntry>,
16267    {
16268        use std::iter::Iterator;
16269        self.entries = v.into_iter().map(|i| i.into()).collect();
16270        self
16271    }
16272
16273    /// Sets the value of [next_page_token][crate::model::QueryUserRootContentsResponse::next_page_token].
16274    ///
16275    /// # Example
16276    /// ```ignore,no_run
16277    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsResponse;
16278    /// let x = QueryUserRootContentsResponse::new().set_next_page_token("example");
16279    /// ```
16280    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16281        self.next_page_token = v.into();
16282        self
16283    }
16284}
16285
16286impl wkt::message::Message for QueryUserRootContentsResponse {
16287    fn typename() -> &'static str {
16288        "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsResponse"
16289    }
16290}
16291
16292#[doc(hidden)]
16293impl google_cloud_gax::paginator::internal::PageableResponse for QueryUserRootContentsResponse {
16294    type PageItem = crate::model::query_user_root_contents_response::RootContentsEntry;
16295
16296    fn items(self) -> std::vec::Vec<Self::PageItem> {
16297        self.entries
16298    }
16299
16300    fn next_page_token(&self) -> std::string::String {
16301        use std::clone::Clone;
16302        self.next_page_token.clone()
16303    }
16304}
16305
16306/// Defines additional types related to [QueryUserRootContentsResponse].
16307pub mod query_user_root_contents_response {
16308    #[allow(unused_imports)]
16309    use super::*;
16310
16311    /// Represents a single content entry.
16312    #[derive(Clone, Default, PartialEq)]
16313    #[non_exhaustive]
16314    pub struct RootContentsEntry {
16315        /// The content entry.
16316        pub entry: std::option::Option<
16317            crate::model::query_user_root_contents_response::root_contents_entry::Entry,
16318        >,
16319
16320        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16321    }
16322
16323    impl RootContentsEntry {
16324        /// Creates a new default instance.
16325        pub fn new() -> Self {
16326            std::default::Default::default()
16327        }
16328
16329        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry].
16330        ///
16331        /// Note that all the setters affecting `entry` are mutually
16332        /// exclusive.
16333        ///
16334        /// # Example
16335        /// ```ignore,no_run
16336        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16337        /// use google_cloud_dataform_v1::model::Folder;
16338        /// let x = RootContentsEntry::new().set_entry(Some(
16339        ///     google_cloud_dataform_v1::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(Folder::default().into())));
16340        /// ```
16341        pub fn set_entry<
16342            T: std::convert::Into<
16343                    std::option::Option<
16344                        crate::model::query_user_root_contents_response::root_contents_entry::Entry,
16345                    >,
16346                >,
16347        >(
16348            mut self,
16349            v: T,
16350        ) -> Self {
16351            self.entry = v.into();
16352            self
16353        }
16354
16355        /// The value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16356        /// if it holds a `Folder`, `None` if the field is not set or
16357        /// holds a different branch.
16358        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
16359            #[allow(unreachable_patterns)]
16360            self.entry.as_ref().and_then(|v| match v {
16361                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
16362                _ => std::option::Option::None,
16363            })
16364        }
16365
16366        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16367        /// to hold a `Folder`.
16368        ///
16369        /// Note that all the setters affecting `entry` are
16370        /// mutually exclusive.
16371        ///
16372        /// # Example
16373        /// ```ignore,no_run
16374        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16375        /// use google_cloud_dataform_v1::model::Folder;
16376        /// let x = RootContentsEntry::new().set_folder(Folder::default()/* use setters */);
16377        /// assert!(x.folder().is_some());
16378        /// assert!(x.repository().is_none());
16379        /// ```
16380        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
16381            mut self,
16382            v: T,
16383        ) -> Self {
16384            self.entry = std::option::Option::Some(
16385                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(
16386                    v.into(),
16387                ),
16388            );
16389            self
16390        }
16391
16392        /// The value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16393        /// if it holds a `Repository`, `None` if the field is not set or
16394        /// holds a different branch.
16395        pub fn repository(
16396            &self,
16397        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
16398            #[allow(unreachable_patterns)]
16399            self.entry.as_ref().and_then(|v| match v {
16400                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
16401                _ => std::option::Option::None,
16402            })
16403        }
16404
16405        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16406        /// to hold a `Repository`.
16407        ///
16408        /// Note that all the setters affecting `entry` are
16409        /// mutually exclusive.
16410        ///
16411        /// # Example
16412        /// ```ignore,no_run
16413        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16414        /// use google_cloud_dataform_v1::model::Repository;
16415        /// let x = RootContentsEntry::new().set_repository(Repository::default()/* use setters */);
16416        /// assert!(x.repository().is_some());
16417        /// assert!(x.folder().is_none());
16418        /// ```
16419        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
16420            mut self,
16421            v: T,
16422        ) -> Self {
16423            self.entry = std::option::Option::Some(
16424                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Repository(
16425                    v.into()
16426                )
16427            );
16428            self
16429        }
16430    }
16431
16432    impl wkt::message::Message for RootContentsEntry {
16433        fn typename() -> &'static str {
16434            "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsResponse.RootContentsEntry"
16435        }
16436    }
16437
16438    /// Defines additional types related to [RootContentsEntry].
16439    pub mod root_contents_entry {
16440        #[allow(unused_imports)]
16441        use super::*;
16442
16443        /// The content entry.
16444        #[derive(Clone, Debug, PartialEq)]
16445        #[non_exhaustive]
16446        pub enum Entry {
16447            /// A subfolder.
16448            Folder(std::boxed::Box<crate::model::Folder>),
16449            /// A repository.
16450            Repository(std::boxed::Box<crate::model::Repository>),
16451        }
16452    }
16453}
16454
16455/// Represents a Dataform TeamFolder. This is a resource that sits at the project
16456/// level and is used to organize Repositories and Folders with hierarchical
16457/// access controls. They provide a team context and stricter access controls.
16458#[derive(Clone, Default, PartialEq)]
16459#[non_exhaustive]
16460pub struct TeamFolder {
16461    /// Identifier. The TeamFolder's name.
16462    pub name: std::string::String,
16463
16464    /// Required. The TeamFolder's user-friendly name.
16465    pub display_name: std::string::String,
16466
16467    /// Output only. The timestamp of when the TeamFolder was created.
16468    pub create_time: std::option::Option<wkt::Timestamp>,
16469
16470    /// Output only. The timestamp of when the TeamFolder was last updated.
16471    pub update_time: std::option::Option<wkt::Timestamp>,
16472
16473    /// Output only. All the metadata information that is used internally to serve
16474    /// the resource. For example: timestamps, flags, status fields, etc. The
16475    /// format of this field is a JSON string.
16476    pub internal_metadata: std::option::Option<std::string::String>,
16477
16478    /// Output only. The IAM principal identifier of the creator of the TeamFolder.
16479    pub creator_iam_principal: std::option::Option<std::string::String>,
16480
16481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16482}
16483
16484impl TeamFolder {
16485    /// Creates a new default instance.
16486    pub fn new() -> Self {
16487        std::default::Default::default()
16488    }
16489
16490    /// Sets the value of [name][crate::model::TeamFolder::name].
16491    ///
16492    /// # Example
16493    /// ```ignore,no_run
16494    /// # use google_cloud_dataform_v1::model::TeamFolder;
16495    /// # let project_id = "project_id";
16496    /// # let location_id = "location_id";
16497    /// # let team_folder_id = "team_folder_id";
16498    /// let x = TeamFolder::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
16499    /// ```
16500    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16501        self.name = v.into();
16502        self
16503    }
16504
16505    /// Sets the value of [display_name][crate::model::TeamFolder::display_name].
16506    ///
16507    /// # Example
16508    /// ```ignore,no_run
16509    /// # use google_cloud_dataform_v1::model::TeamFolder;
16510    /// let x = TeamFolder::new().set_display_name("example");
16511    /// ```
16512    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16513        self.display_name = v.into();
16514        self
16515    }
16516
16517    /// Sets the value of [create_time][crate::model::TeamFolder::create_time].
16518    ///
16519    /// # Example
16520    /// ```ignore,no_run
16521    /// # use google_cloud_dataform_v1::model::TeamFolder;
16522    /// use wkt::Timestamp;
16523    /// let x = TeamFolder::new().set_create_time(Timestamp::default()/* use setters */);
16524    /// ```
16525    pub fn set_create_time<T>(mut self, v: T) -> Self
16526    where
16527        T: std::convert::Into<wkt::Timestamp>,
16528    {
16529        self.create_time = std::option::Option::Some(v.into());
16530        self
16531    }
16532
16533    /// Sets or clears the value of [create_time][crate::model::TeamFolder::create_time].
16534    ///
16535    /// # Example
16536    /// ```ignore,no_run
16537    /// # use google_cloud_dataform_v1::model::TeamFolder;
16538    /// use wkt::Timestamp;
16539    /// let x = TeamFolder::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16540    /// let x = TeamFolder::new().set_or_clear_create_time(None::<Timestamp>);
16541    /// ```
16542    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16543    where
16544        T: std::convert::Into<wkt::Timestamp>,
16545    {
16546        self.create_time = v.map(|x| x.into());
16547        self
16548    }
16549
16550    /// Sets the value of [update_time][crate::model::TeamFolder::update_time].
16551    ///
16552    /// # Example
16553    /// ```ignore,no_run
16554    /// # use google_cloud_dataform_v1::model::TeamFolder;
16555    /// use wkt::Timestamp;
16556    /// let x = TeamFolder::new().set_update_time(Timestamp::default()/* use setters */);
16557    /// ```
16558    pub fn set_update_time<T>(mut self, v: T) -> Self
16559    where
16560        T: std::convert::Into<wkt::Timestamp>,
16561    {
16562        self.update_time = std::option::Option::Some(v.into());
16563        self
16564    }
16565
16566    /// Sets or clears the value of [update_time][crate::model::TeamFolder::update_time].
16567    ///
16568    /// # Example
16569    /// ```ignore,no_run
16570    /// # use google_cloud_dataform_v1::model::TeamFolder;
16571    /// use wkt::Timestamp;
16572    /// let x = TeamFolder::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16573    /// let x = TeamFolder::new().set_or_clear_update_time(None::<Timestamp>);
16574    /// ```
16575    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16576    where
16577        T: std::convert::Into<wkt::Timestamp>,
16578    {
16579        self.update_time = v.map(|x| x.into());
16580        self
16581    }
16582
16583    /// Sets the value of [internal_metadata][crate::model::TeamFolder::internal_metadata].
16584    ///
16585    /// # Example
16586    /// ```ignore,no_run
16587    /// # use google_cloud_dataform_v1::model::TeamFolder;
16588    /// let x = TeamFolder::new().set_internal_metadata("example");
16589    /// ```
16590    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
16591    where
16592        T: std::convert::Into<std::string::String>,
16593    {
16594        self.internal_metadata = std::option::Option::Some(v.into());
16595        self
16596    }
16597
16598    /// Sets or clears the value of [internal_metadata][crate::model::TeamFolder::internal_metadata].
16599    ///
16600    /// # Example
16601    /// ```ignore,no_run
16602    /// # use google_cloud_dataform_v1::model::TeamFolder;
16603    /// let x = TeamFolder::new().set_or_clear_internal_metadata(Some("example"));
16604    /// let x = TeamFolder::new().set_or_clear_internal_metadata(None::<String>);
16605    /// ```
16606    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16607    where
16608        T: std::convert::Into<std::string::String>,
16609    {
16610        self.internal_metadata = v.map(|x| x.into());
16611        self
16612    }
16613
16614    /// Sets the value of [creator_iam_principal][crate::model::TeamFolder::creator_iam_principal].
16615    ///
16616    /// # Example
16617    /// ```ignore,no_run
16618    /// # use google_cloud_dataform_v1::model::TeamFolder;
16619    /// let x = TeamFolder::new().set_creator_iam_principal("example");
16620    /// ```
16621    pub fn set_creator_iam_principal<T>(mut self, v: T) -> Self
16622    where
16623        T: std::convert::Into<std::string::String>,
16624    {
16625        self.creator_iam_principal = std::option::Option::Some(v.into());
16626        self
16627    }
16628
16629    /// Sets or clears the value of [creator_iam_principal][crate::model::TeamFolder::creator_iam_principal].
16630    ///
16631    /// # Example
16632    /// ```ignore,no_run
16633    /// # use google_cloud_dataform_v1::model::TeamFolder;
16634    /// let x = TeamFolder::new().set_or_clear_creator_iam_principal(Some("example"));
16635    /// let x = TeamFolder::new().set_or_clear_creator_iam_principal(None::<String>);
16636    /// ```
16637    pub fn set_or_clear_creator_iam_principal<T>(mut self, v: std::option::Option<T>) -> Self
16638    where
16639        T: std::convert::Into<std::string::String>,
16640    {
16641        self.creator_iam_principal = v.map(|x| x.into());
16642        self
16643    }
16644}
16645
16646impl wkt::message::Message for TeamFolder {
16647    fn typename() -> &'static str {
16648        "type.googleapis.com/google.cloud.dataform.v1.TeamFolder"
16649    }
16650}
16651
16652/// `CreateTeamFolder` request message.
16653#[derive(Clone, Default, PartialEq)]
16654#[non_exhaustive]
16655pub struct CreateTeamFolderRequest {
16656    /// Required. The location in which to create the TeamFolder. Must be in the
16657    /// format `projects/*/locations/*`.
16658    pub parent: std::string::String,
16659
16660    /// Required. The TeamFolder to create.
16661    pub team_folder: std::option::Option<crate::model::TeamFolder>,
16662
16663    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16664}
16665
16666impl CreateTeamFolderRequest {
16667    /// Creates a new default instance.
16668    pub fn new() -> Self {
16669        std::default::Default::default()
16670    }
16671
16672    /// Sets the value of [parent][crate::model::CreateTeamFolderRequest::parent].
16673    ///
16674    /// # Example
16675    /// ```ignore,no_run
16676    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16677    /// let x = CreateTeamFolderRequest::new().set_parent("example");
16678    /// ```
16679    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16680        self.parent = v.into();
16681        self
16682    }
16683
16684    /// Sets the value of [team_folder][crate::model::CreateTeamFolderRequest::team_folder].
16685    ///
16686    /// # Example
16687    /// ```ignore,no_run
16688    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16689    /// use google_cloud_dataform_v1::model::TeamFolder;
16690    /// let x = CreateTeamFolderRequest::new().set_team_folder(TeamFolder::default()/* use setters */);
16691    /// ```
16692    pub fn set_team_folder<T>(mut self, v: T) -> Self
16693    where
16694        T: std::convert::Into<crate::model::TeamFolder>,
16695    {
16696        self.team_folder = std::option::Option::Some(v.into());
16697        self
16698    }
16699
16700    /// Sets or clears the value of [team_folder][crate::model::CreateTeamFolderRequest::team_folder].
16701    ///
16702    /// # Example
16703    /// ```ignore,no_run
16704    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16705    /// use google_cloud_dataform_v1::model::TeamFolder;
16706    /// let x = CreateTeamFolderRequest::new().set_or_clear_team_folder(Some(TeamFolder::default()/* use setters */));
16707    /// let x = CreateTeamFolderRequest::new().set_or_clear_team_folder(None::<TeamFolder>);
16708    /// ```
16709    pub fn set_or_clear_team_folder<T>(mut self, v: std::option::Option<T>) -> Self
16710    where
16711        T: std::convert::Into<crate::model::TeamFolder>,
16712    {
16713        self.team_folder = v.map(|x| x.into());
16714        self
16715    }
16716}
16717
16718impl wkt::message::Message for CreateTeamFolderRequest {
16719    fn typename() -> &'static str {
16720        "type.googleapis.com/google.cloud.dataform.v1.CreateTeamFolderRequest"
16721    }
16722}
16723
16724/// `GetTeamFolder` request message.
16725#[derive(Clone, Default, PartialEq)]
16726#[non_exhaustive]
16727pub struct GetTeamFolderRequest {
16728    /// Required. The TeamFolder's name.
16729    pub name: std::string::String,
16730
16731    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16732}
16733
16734impl GetTeamFolderRequest {
16735    /// Creates a new default instance.
16736    pub fn new() -> Self {
16737        std::default::Default::default()
16738    }
16739
16740    /// Sets the value of [name][crate::model::GetTeamFolderRequest::name].
16741    ///
16742    /// # Example
16743    /// ```ignore,no_run
16744    /// # use google_cloud_dataform_v1::model::GetTeamFolderRequest;
16745    /// # let project_id = "project_id";
16746    /// # let location_id = "location_id";
16747    /// # let team_folder_id = "team_folder_id";
16748    /// let x = GetTeamFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
16749    /// ```
16750    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16751        self.name = v.into();
16752        self
16753    }
16754}
16755
16756impl wkt::message::Message for GetTeamFolderRequest {
16757    fn typename() -> &'static str {
16758        "type.googleapis.com/google.cloud.dataform.v1.GetTeamFolderRequest"
16759    }
16760}
16761
16762/// `UpdateTeamFolder` request message.
16763#[derive(Clone, Default, PartialEq)]
16764#[non_exhaustive]
16765pub struct UpdateTeamFolderRequest {
16766    /// Optional. Specifies the fields to be updated in the Folder. If left unset,
16767    /// all fields will be updated.
16768    pub update_mask: std::option::Option<wkt::FieldMask>,
16769
16770    /// Required. The updated TeamFolder.
16771    pub team_folder: std::option::Option<crate::model::TeamFolder>,
16772
16773    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16774}
16775
16776impl UpdateTeamFolderRequest {
16777    /// Creates a new default instance.
16778    pub fn new() -> Self {
16779        std::default::Default::default()
16780    }
16781
16782    /// Sets the value of [update_mask][crate::model::UpdateTeamFolderRequest::update_mask].
16783    ///
16784    /// # Example
16785    /// ```ignore,no_run
16786    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16787    /// use wkt::FieldMask;
16788    /// let x = UpdateTeamFolderRequest::new().set_update_mask(FieldMask::default()/* use setters */);
16789    /// ```
16790    pub fn set_update_mask<T>(mut self, v: T) -> Self
16791    where
16792        T: std::convert::Into<wkt::FieldMask>,
16793    {
16794        self.update_mask = std::option::Option::Some(v.into());
16795        self
16796    }
16797
16798    /// Sets or clears the value of [update_mask][crate::model::UpdateTeamFolderRequest::update_mask].
16799    ///
16800    /// # Example
16801    /// ```ignore,no_run
16802    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16803    /// use wkt::FieldMask;
16804    /// let x = UpdateTeamFolderRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
16805    /// let x = UpdateTeamFolderRequest::new().set_or_clear_update_mask(None::<FieldMask>);
16806    /// ```
16807    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16808    where
16809        T: std::convert::Into<wkt::FieldMask>,
16810    {
16811        self.update_mask = v.map(|x| x.into());
16812        self
16813    }
16814
16815    /// Sets the value of [team_folder][crate::model::UpdateTeamFolderRequest::team_folder].
16816    ///
16817    /// # Example
16818    /// ```ignore,no_run
16819    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16820    /// use google_cloud_dataform_v1::model::TeamFolder;
16821    /// let x = UpdateTeamFolderRequest::new().set_team_folder(TeamFolder::default()/* use setters */);
16822    /// ```
16823    pub fn set_team_folder<T>(mut self, v: T) -> Self
16824    where
16825        T: std::convert::Into<crate::model::TeamFolder>,
16826    {
16827        self.team_folder = std::option::Option::Some(v.into());
16828        self
16829    }
16830
16831    /// Sets or clears the value of [team_folder][crate::model::UpdateTeamFolderRequest::team_folder].
16832    ///
16833    /// # Example
16834    /// ```ignore,no_run
16835    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16836    /// use google_cloud_dataform_v1::model::TeamFolder;
16837    /// let x = UpdateTeamFolderRequest::new().set_or_clear_team_folder(Some(TeamFolder::default()/* use setters */));
16838    /// let x = UpdateTeamFolderRequest::new().set_or_clear_team_folder(None::<TeamFolder>);
16839    /// ```
16840    pub fn set_or_clear_team_folder<T>(mut self, v: std::option::Option<T>) -> Self
16841    where
16842        T: std::convert::Into<crate::model::TeamFolder>,
16843    {
16844        self.team_folder = v.map(|x| x.into());
16845        self
16846    }
16847}
16848
16849impl wkt::message::Message for UpdateTeamFolderRequest {
16850    fn typename() -> &'static str {
16851        "type.googleapis.com/google.cloud.dataform.v1.UpdateTeamFolderRequest"
16852    }
16853}
16854
16855/// `DeleteTeamFolder` request message.
16856#[derive(Clone, Default, PartialEq)]
16857#[non_exhaustive]
16858pub struct DeleteTeamFolderRequest {
16859    /// Required. The TeamFolder's name.
16860    pub name: std::string::String,
16861
16862    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16863}
16864
16865impl DeleteTeamFolderRequest {
16866    /// Creates a new default instance.
16867    pub fn new() -> Self {
16868        std::default::Default::default()
16869    }
16870
16871    /// Sets the value of [name][crate::model::DeleteTeamFolderRequest::name].
16872    ///
16873    /// # Example
16874    /// ```ignore,no_run
16875    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderRequest;
16876    /// # let project_id = "project_id";
16877    /// # let location_id = "location_id";
16878    /// # let team_folder_id = "team_folder_id";
16879    /// let x = DeleteTeamFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
16880    /// ```
16881    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16882        self.name = v.into();
16883        self
16884    }
16885}
16886
16887impl wkt::message::Message for DeleteTeamFolderRequest {
16888    fn typename() -> &'static str {
16889        "type.googleapis.com/google.cloud.dataform.v1.DeleteTeamFolderRequest"
16890    }
16891}
16892
16893/// `QueryTeamFolderContents` request message.
16894#[derive(Clone, Default, PartialEq)]
16895#[non_exhaustive]
16896pub struct QueryTeamFolderContentsRequest {
16897    /// Required. Name of the team_folder whose contents to list.
16898    /// Format: `projects/*/locations/*/teamFolders/*`.
16899    pub team_folder: std::string::String,
16900
16901    /// Optional. Maximum number of paths to return. The server may return fewer
16902    /// items than requested. If unspecified, the server will pick an appropriate
16903    /// default.
16904    pub page_size: i32,
16905
16906    /// Optional. Page token received from a previous `QueryTeamFolderContents`
16907    /// call. Provide this to retrieve the subsequent page.
16908    ///
16909    /// When paginating, all other parameters provided to
16910    /// `QueryTeamFolderContents`, with the exception of `page_size`, must match
16911    /// the call that provided the page token.
16912    pub page_token: std::string::String,
16913
16914    /// Optional. Field to additionally sort results by.
16915    /// Will order Folders before Repositories, and then by `order_by` in ascending
16916    /// order. Supported keywords: `display_name` (default), `create_time`,
16917    /// last_modified_time.
16918    /// Examples:
16919    ///
16920    /// - `orderBy="display_name"`
16921    /// - `orderBy="display_name desc"`
16922    pub order_by: std::string::String,
16923
16924    /// Optional. Optional filtering for the returned list. Filtering is currently
16925    /// only supported on the `display_name` field.
16926    ///
16927    /// Example:
16928    ///
16929    /// - `filter="display_name="MyFolder""`
16930    pub filter: std::string::String,
16931
16932    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16933}
16934
16935impl QueryTeamFolderContentsRequest {
16936    /// Creates a new default instance.
16937    pub fn new() -> Self {
16938        std::default::Default::default()
16939    }
16940
16941    /// Sets the value of [team_folder][crate::model::QueryTeamFolderContentsRequest::team_folder].
16942    ///
16943    /// # Example
16944    /// ```ignore,no_run
16945    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16946    /// # let project_id = "project_id";
16947    /// # let location_id = "location_id";
16948    /// # let team_folder_id = "team_folder_id";
16949    /// let x = QueryTeamFolderContentsRequest::new().set_team_folder(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
16950    /// ```
16951    pub fn set_team_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16952        self.team_folder = v.into();
16953        self
16954    }
16955
16956    /// Sets the value of [page_size][crate::model::QueryTeamFolderContentsRequest::page_size].
16957    ///
16958    /// # Example
16959    /// ```ignore,no_run
16960    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16961    /// let x = QueryTeamFolderContentsRequest::new().set_page_size(42);
16962    /// ```
16963    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16964        self.page_size = v.into();
16965        self
16966    }
16967
16968    /// Sets the value of [page_token][crate::model::QueryTeamFolderContentsRequest::page_token].
16969    ///
16970    /// # Example
16971    /// ```ignore,no_run
16972    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16973    /// let x = QueryTeamFolderContentsRequest::new().set_page_token("example");
16974    /// ```
16975    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16976        self.page_token = v.into();
16977        self
16978    }
16979
16980    /// Sets the value of [order_by][crate::model::QueryTeamFolderContentsRequest::order_by].
16981    ///
16982    /// # Example
16983    /// ```ignore,no_run
16984    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16985    /// let x = QueryTeamFolderContentsRequest::new().set_order_by("example");
16986    /// ```
16987    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16988        self.order_by = v.into();
16989        self
16990    }
16991
16992    /// Sets the value of [filter][crate::model::QueryTeamFolderContentsRequest::filter].
16993    ///
16994    /// # Example
16995    /// ```ignore,no_run
16996    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
16997    /// let x = QueryTeamFolderContentsRequest::new().set_filter("example");
16998    /// ```
16999    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17000        self.filter = v.into();
17001        self
17002    }
17003}
17004
17005impl wkt::message::Message for QueryTeamFolderContentsRequest {
17006    fn typename() -> &'static str {
17007        "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsRequest"
17008    }
17009}
17010
17011/// `QueryTeamFolderContents` response message.
17012#[derive(Clone, Default, PartialEq)]
17013#[non_exhaustive]
17014pub struct QueryTeamFolderContentsResponse {
17015    /// List of entries in the TeamFolder.
17016    pub entries:
17017        std::vec::Vec<crate::model::query_team_folder_contents_response::TeamFolderContentsEntry>,
17018
17019    /// A token, which can be sent as `page_token` to retrieve the next page.
17020    /// If this field is omitted, there are no subsequent pages.
17021    pub next_page_token: std::string::String,
17022
17023    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17024}
17025
17026impl QueryTeamFolderContentsResponse {
17027    /// Creates a new default instance.
17028    pub fn new() -> Self {
17029        std::default::Default::default()
17030    }
17031
17032    /// Sets the value of [entries][crate::model::QueryTeamFolderContentsResponse::entries].
17033    ///
17034    /// # Example
17035    /// ```ignore,no_run
17036    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsResponse;
17037    /// use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17038    /// let x = QueryTeamFolderContentsResponse::new()
17039    ///     .set_entries([
17040    ///         TeamFolderContentsEntry::default()/* use setters */,
17041    ///         TeamFolderContentsEntry::default()/* use (different) setters */,
17042    ///     ]);
17043    /// ```
17044    pub fn set_entries<T, V>(mut self, v: T) -> Self
17045    where
17046        T: std::iter::IntoIterator<Item = V>,
17047        V: std::convert::Into<
17048                crate::model::query_team_folder_contents_response::TeamFolderContentsEntry,
17049            >,
17050    {
17051        use std::iter::Iterator;
17052        self.entries = v.into_iter().map(|i| i.into()).collect();
17053        self
17054    }
17055
17056    /// Sets the value of [next_page_token][crate::model::QueryTeamFolderContentsResponse::next_page_token].
17057    ///
17058    /// # Example
17059    /// ```ignore,no_run
17060    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsResponse;
17061    /// let x = QueryTeamFolderContentsResponse::new().set_next_page_token("example");
17062    /// ```
17063    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17064        self.next_page_token = v.into();
17065        self
17066    }
17067}
17068
17069impl wkt::message::Message for QueryTeamFolderContentsResponse {
17070    fn typename() -> &'static str {
17071        "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsResponse"
17072    }
17073}
17074
17075#[doc(hidden)]
17076impl google_cloud_gax::paginator::internal::PageableResponse for QueryTeamFolderContentsResponse {
17077    type PageItem = crate::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17078
17079    fn items(self) -> std::vec::Vec<Self::PageItem> {
17080        self.entries
17081    }
17082
17083    fn next_page_token(&self) -> std::string::String {
17084        use std::clone::Clone;
17085        self.next_page_token.clone()
17086    }
17087}
17088
17089/// Defines additional types related to [QueryTeamFolderContentsResponse].
17090pub mod query_team_folder_contents_response {
17091    #[allow(unused_imports)]
17092    use super::*;
17093
17094    /// Represents a single content entry.
17095    #[derive(Clone, Default, PartialEq)]
17096    #[non_exhaustive]
17097    pub struct TeamFolderContentsEntry {
17098        /// The content entry.
17099        pub entry: std::option::Option<
17100            crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry,
17101        >,
17102
17103        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17104    }
17105
17106    impl TeamFolderContentsEntry {
17107        /// Creates a new default instance.
17108        pub fn new() -> Self {
17109            std::default::Default::default()
17110        }
17111
17112        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry].
17113        ///
17114        /// Note that all the setters affecting `entry` are mutually
17115        /// exclusive.
17116        ///
17117        /// # Example
17118        /// ```ignore,no_run
17119        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17120        /// use google_cloud_dataform_v1::model::Folder;
17121        /// let x = TeamFolderContentsEntry::new().set_entry(Some(
17122        ///     google_cloud_dataform_v1::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(Folder::default().into())));
17123        /// ```
17124        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
17125        {
17126            self.entry = v.into();
17127            self
17128        }
17129
17130        /// The value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17131        /// if it holds a `Folder`, `None` if the field is not set or
17132        /// holds a different branch.
17133        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
17134            #[allow(unreachable_patterns)]
17135            self.entry.as_ref().and_then(|v| match v {
17136                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
17137                _ => std::option::Option::None,
17138            })
17139        }
17140
17141        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17142        /// to hold a `Folder`.
17143        ///
17144        /// Note that all the setters affecting `entry` are
17145        /// mutually exclusive.
17146        ///
17147        /// # Example
17148        /// ```ignore,no_run
17149        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17150        /// use google_cloud_dataform_v1::model::Folder;
17151        /// let x = TeamFolderContentsEntry::new().set_folder(Folder::default()/* use setters */);
17152        /// assert!(x.folder().is_some());
17153        /// assert!(x.repository().is_none());
17154        /// ```
17155        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
17156            mut self,
17157            v: T,
17158        ) -> Self {
17159            self.entry = std::option::Option::Some(
17160                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(
17161                    v.into()
17162                )
17163            );
17164            self
17165        }
17166
17167        /// The value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17168        /// if it holds a `Repository`, `None` if the field is not set or
17169        /// holds a different branch.
17170        pub fn repository(
17171            &self,
17172        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
17173            #[allow(unreachable_patterns)]
17174            self.entry.as_ref().and_then(|v| match v {
17175                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
17176                _ => std::option::Option::None,
17177            })
17178        }
17179
17180        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17181        /// to hold a `Repository`.
17182        ///
17183        /// Note that all the setters affecting `entry` are
17184        /// mutually exclusive.
17185        ///
17186        /// # Example
17187        /// ```ignore,no_run
17188        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17189        /// use google_cloud_dataform_v1::model::Repository;
17190        /// let x = TeamFolderContentsEntry::new().set_repository(Repository::default()/* use setters */);
17191        /// assert!(x.repository().is_some());
17192        /// assert!(x.folder().is_none());
17193        /// ```
17194        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
17195            mut self,
17196            v: T,
17197        ) -> Self {
17198            self.entry = std::option::Option::Some(
17199                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Repository(
17200                    v.into()
17201                )
17202            );
17203            self
17204        }
17205    }
17206
17207    impl wkt::message::Message for TeamFolderContentsEntry {
17208        fn typename() -> &'static str {
17209            "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsResponse.TeamFolderContentsEntry"
17210        }
17211    }
17212
17213    /// Defines additional types related to [TeamFolderContentsEntry].
17214    pub mod team_folder_contents_entry {
17215        #[allow(unused_imports)]
17216        use super::*;
17217
17218        /// The content entry.
17219        #[derive(Clone, Debug, PartialEq)]
17220        #[non_exhaustive]
17221        pub enum Entry {
17222            /// A subfolder.
17223            Folder(std::boxed::Box<crate::model::Folder>),
17224            /// A repository.
17225            Repository(std::boxed::Box<crate::model::Repository>),
17226        }
17227    }
17228}
17229
17230/// `SearchTeamFolders` request message.
17231#[derive(Clone, Default, PartialEq)]
17232#[non_exhaustive]
17233pub struct SearchTeamFoldersRequest {
17234    /// Required. Location in which to query TeamFolders.
17235    /// Format: `projects/*/locations/*`.
17236    pub location: std::string::String,
17237
17238    /// Optional. Maximum number of TeamFolders to return. The server may return
17239    /// fewer items than requested. If unspecified, the server will pick an
17240    /// appropriate default.
17241    pub page_size: i32,
17242
17243    /// Optional. Page token received from a previous `SearchTeamFolders` call.
17244    /// Provide this to retrieve the subsequent page.
17245    ///
17246    /// When paginating, all other parameters provided to
17247    /// `SearchTeamFolders`, with the exception of `page_size`, must
17248    /// match the call that provided the page token.
17249    pub page_token: std::string::String,
17250
17251    /// Optional. Field to additionally sort results by.
17252    /// Supported keywords: `display_name` (default), `create_time`,
17253    /// `last_modified_time`. Examples:
17254    ///
17255    /// - `orderBy="display_name"`
17256    /// - `orderBy="display_name desc"`
17257    pub order_by: std::string::String,
17258
17259    /// Optional. Optional filtering for the returned list. Filtering is currently
17260    /// only supported on the `display_name` field.
17261    ///
17262    /// Example:
17263    ///
17264    /// - `filter="display_name="MyFolder""`
17265    pub filter: std::string::String,
17266
17267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17268}
17269
17270impl SearchTeamFoldersRequest {
17271    /// Creates a new default instance.
17272    pub fn new() -> Self {
17273        std::default::Default::default()
17274    }
17275
17276    /// Sets the value of [location][crate::model::SearchTeamFoldersRequest::location].
17277    ///
17278    /// # Example
17279    /// ```ignore,no_run
17280    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17281    /// let x = SearchTeamFoldersRequest::new().set_location("example");
17282    /// ```
17283    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17284        self.location = v.into();
17285        self
17286    }
17287
17288    /// Sets the value of [page_size][crate::model::SearchTeamFoldersRequest::page_size].
17289    ///
17290    /// # Example
17291    /// ```ignore,no_run
17292    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17293    /// let x = SearchTeamFoldersRequest::new().set_page_size(42);
17294    /// ```
17295    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17296        self.page_size = v.into();
17297        self
17298    }
17299
17300    /// Sets the value of [page_token][crate::model::SearchTeamFoldersRequest::page_token].
17301    ///
17302    /// # Example
17303    /// ```ignore,no_run
17304    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17305    /// let x = SearchTeamFoldersRequest::new().set_page_token("example");
17306    /// ```
17307    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17308        self.page_token = v.into();
17309        self
17310    }
17311
17312    /// Sets the value of [order_by][crate::model::SearchTeamFoldersRequest::order_by].
17313    ///
17314    /// # Example
17315    /// ```ignore,no_run
17316    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17317    /// let x = SearchTeamFoldersRequest::new().set_order_by("example");
17318    /// ```
17319    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17320        self.order_by = v.into();
17321        self
17322    }
17323
17324    /// Sets the value of [filter][crate::model::SearchTeamFoldersRequest::filter].
17325    ///
17326    /// # Example
17327    /// ```ignore,no_run
17328    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17329    /// let x = SearchTeamFoldersRequest::new().set_filter("example");
17330    /// ```
17331    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17332        self.filter = v.into();
17333        self
17334    }
17335}
17336
17337impl wkt::message::Message for SearchTeamFoldersRequest {
17338    fn typename() -> &'static str {
17339        "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersRequest"
17340    }
17341}
17342
17343/// `SearchTeamFolders` response message.
17344#[derive(Clone, Default, PartialEq)]
17345#[non_exhaustive]
17346pub struct SearchTeamFoldersResponse {
17347    /// List of TeamFolders that match the search query.
17348    pub results: std::vec::Vec<crate::model::search_team_folders_response::TeamFolderSearchResult>,
17349
17350    /// A token, which can be sent as `page_token` to retrieve the next page.
17351    /// If this field is omitted, there are no subsequent pages.
17352    pub next_page_token: std::string::String,
17353
17354    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17355}
17356
17357impl SearchTeamFoldersResponse {
17358    /// Creates a new default instance.
17359    pub fn new() -> Self {
17360        std::default::Default::default()
17361    }
17362
17363    /// Sets the value of [results][crate::model::SearchTeamFoldersResponse::results].
17364    ///
17365    /// # Example
17366    /// ```ignore,no_run
17367    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersResponse;
17368    /// use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17369    /// let x = SearchTeamFoldersResponse::new()
17370    ///     .set_results([
17371    ///         TeamFolderSearchResult::default()/* use setters */,
17372    ///         TeamFolderSearchResult::default()/* use (different) setters */,
17373    ///     ]);
17374    /// ```
17375    pub fn set_results<T, V>(mut self, v: T) -> Self
17376    where
17377        T: std::iter::IntoIterator<Item = V>,
17378        V: std::convert::Into<crate::model::search_team_folders_response::TeamFolderSearchResult>,
17379    {
17380        use std::iter::Iterator;
17381        self.results = v.into_iter().map(|i| i.into()).collect();
17382        self
17383    }
17384
17385    /// Sets the value of [next_page_token][crate::model::SearchTeamFoldersResponse::next_page_token].
17386    ///
17387    /// # Example
17388    /// ```ignore,no_run
17389    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersResponse;
17390    /// let x = SearchTeamFoldersResponse::new().set_next_page_token("example");
17391    /// ```
17392    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17393        self.next_page_token = v.into();
17394        self
17395    }
17396}
17397
17398impl wkt::message::Message for SearchTeamFoldersResponse {
17399    fn typename() -> &'static str {
17400        "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersResponse"
17401    }
17402}
17403
17404#[doc(hidden)]
17405impl google_cloud_gax::paginator::internal::PageableResponse for SearchTeamFoldersResponse {
17406    type PageItem = crate::model::search_team_folders_response::TeamFolderSearchResult;
17407
17408    fn items(self) -> std::vec::Vec<Self::PageItem> {
17409        self.results
17410    }
17411
17412    fn next_page_token(&self) -> std::string::String {
17413        use std::clone::Clone;
17414        self.next_page_token.clone()
17415    }
17416}
17417
17418/// Defines additional types related to [SearchTeamFoldersResponse].
17419pub mod search_team_folders_response {
17420    #[allow(unused_imports)]
17421    use super::*;
17422
17423    /// Represents a single content entry.
17424    #[derive(Clone, Default, PartialEq)]
17425    #[non_exhaustive]
17426    pub struct TeamFolderSearchResult {
17427        /// The content entry.
17428        pub entry: std::option::Option<
17429            crate::model::search_team_folders_response::team_folder_search_result::Entry,
17430        >,
17431
17432        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17433    }
17434
17435    impl TeamFolderSearchResult {
17436        /// Creates a new default instance.
17437        pub fn new() -> Self {
17438            std::default::Default::default()
17439        }
17440
17441        /// Sets the value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry].
17442        ///
17443        /// Note that all the setters affecting `entry` are mutually
17444        /// exclusive.
17445        ///
17446        /// # Example
17447        /// ```ignore,no_run
17448        /// # use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17449        /// use google_cloud_dataform_v1::model::TeamFolder;
17450        /// let x = TeamFolderSearchResult::new().set_entry(Some(
17451        ///     google_cloud_dataform_v1::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(TeamFolder::default().into())));
17452        /// ```
17453        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
17454        {
17455            self.entry = v.into();
17456            self
17457        }
17458
17459        /// The value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry]
17460        /// if it holds a `TeamFolder`, `None` if the field is not set or
17461        /// holds a different branch.
17462        pub fn team_folder(
17463            &self,
17464        ) -> std::option::Option<&std::boxed::Box<crate::model::TeamFolder>> {
17465            #[allow(unreachable_patterns)]
17466            self.entry.as_ref().and_then(|v| match v {
17467                crate::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(v) => std::option::Option::Some(v),
17468                _ => std::option::Option::None,
17469            })
17470        }
17471
17472        /// Sets the value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry]
17473        /// to hold a `TeamFolder`.
17474        ///
17475        /// Note that all the setters affecting `entry` are
17476        /// mutually exclusive.
17477        ///
17478        /// # Example
17479        /// ```ignore,no_run
17480        /// # use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17481        /// use google_cloud_dataform_v1::model::TeamFolder;
17482        /// let x = TeamFolderSearchResult::new().set_team_folder(TeamFolder::default()/* use setters */);
17483        /// assert!(x.team_folder().is_some());
17484        /// ```
17485        pub fn set_team_folder<T: std::convert::Into<std::boxed::Box<crate::model::TeamFolder>>>(
17486            mut self,
17487            v: T,
17488        ) -> Self {
17489            self.entry = std::option::Option::Some(
17490                crate::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(
17491                    v.into()
17492                )
17493            );
17494            self
17495        }
17496    }
17497
17498    impl wkt::message::Message for TeamFolderSearchResult {
17499        fn typename() -> &'static str {
17500            "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersResponse.TeamFolderSearchResult"
17501        }
17502    }
17503
17504    /// Defines additional types related to [TeamFolderSearchResult].
17505    pub mod team_folder_search_result {
17506        #[allow(unused_imports)]
17507        use super::*;
17508
17509        /// The content entry.
17510        #[derive(Clone, Debug, PartialEq)]
17511        #[non_exhaustive]
17512        pub enum Entry {
17513            /// A TeamFolder resource that is in the project / location.
17514            TeamFolder(std::boxed::Box<crate::model::TeamFolder>),
17515        }
17516    }
17517}
17518
17519/// Contains metadata about the progress of the MoveFolder Long-running
17520/// operations.
17521#[derive(Clone, Default, PartialEq)]
17522#[non_exhaustive]
17523pub struct MoveFolderMetadata {
17524    /// Output only. The time the operation was created.
17525    pub create_time: std::option::Option<wkt::Timestamp>,
17526
17527    /// Output only. The time the operation finished running.
17528    pub end_time: std::option::Option<wkt::Timestamp>,
17529
17530    /// Output only. Server-defined resource path for the target of the operation.
17531    pub target: std::string::String,
17532
17533    /// The state of the move.
17534    pub state: crate::model::move_folder_metadata::State,
17535
17536    /// Percent complete of the move [0, 100].
17537    pub percent_complete: i32,
17538
17539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17540}
17541
17542impl MoveFolderMetadata {
17543    /// Creates a new default instance.
17544    pub fn new() -> Self {
17545        std::default::Default::default()
17546    }
17547
17548    /// Sets the value of [create_time][crate::model::MoveFolderMetadata::create_time].
17549    ///
17550    /// # Example
17551    /// ```ignore,no_run
17552    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17553    /// use wkt::Timestamp;
17554    /// let x = MoveFolderMetadata::new().set_create_time(Timestamp::default()/* use setters */);
17555    /// ```
17556    pub fn set_create_time<T>(mut self, v: T) -> Self
17557    where
17558        T: std::convert::Into<wkt::Timestamp>,
17559    {
17560        self.create_time = std::option::Option::Some(v.into());
17561        self
17562    }
17563
17564    /// Sets or clears the value of [create_time][crate::model::MoveFolderMetadata::create_time].
17565    ///
17566    /// # Example
17567    /// ```ignore,no_run
17568    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17569    /// use wkt::Timestamp;
17570    /// let x = MoveFolderMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17571    /// let x = MoveFolderMetadata::new().set_or_clear_create_time(None::<Timestamp>);
17572    /// ```
17573    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17574    where
17575        T: std::convert::Into<wkt::Timestamp>,
17576    {
17577        self.create_time = v.map(|x| x.into());
17578        self
17579    }
17580
17581    /// Sets the value of [end_time][crate::model::MoveFolderMetadata::end_time].
17582    ///
17583    /// # Example
17584    /// ```ignore,no_run
17585    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17586    /// use wkt::Timestamp;
17587    /// let x = MoveFolderMetadata::new().set_end_time(Timestamp::default()/* use setters */);
17588    /// ```
17589    pub fn set_end_time<T>(mut self, v: T) -> Self
17590    where
17591        T: std::convert::Into<wkt::Timestamp>,
17592    {
17593        self.end_time = std::option::Option::Some(v.into());
17594        self
17595    }
17596
17597    /// Sets or clears the value of [end_time][crate::model::MoveFolderMetadata::end_time].
17598    ///
17599    /// # Example
17600    /// ```ignore,no_run
17601    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17602    /// use wkt::Timestamp;
17603    /// let x = MoveFolderMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
17604    /// let x = MoveFolderMetadata::new().set_or_clear_end_time(None::<Timestamp>);
17605    /// ```
17606    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
17607    where
17608        T: std::convert::Into<wkt::Timestamp>,
17609    {
17610        self.end_time = v.map(|x| x.into());
17611        self
17612    }
17613
17614    /// Sets the value of [target][crate::model::MoveFolderMetadata::target].
17615    ///
17616    /// # Example
17617    /// ```ignore,no_run
17618    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17619    /// let x = MoveFolderMetadata::new().set_target("example");
17620    /// ```
17621    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17622        self.target = v.into();
17623        self
17624    }
17625
17626    /// Sets the value of [state][crate::model::MoveFolderMetadata::state].
17627    ///
17628    /// # Example
17629    /// ```ignore,no_run
17630    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17631    /// use google_cloud_dataform_v1::model::move_folder_metadata::State;
17632    /// let x0 = MoveFolderMetadata::new().set_state(State::Initialized);
17633    /// let x1 = MoveFolderMetadata::new().set_state(State::InProgress);
17634    /// let x2 = MoveFolderMetadata::new().set_state(State::Success);
17635    /// ```
17636    pub fn set_state<T: std::convert::Into<crate::model::move_folder_metadata::State>>(
17637        mut self,
17638        v: T,
17639    ) -> Self {
17640        self.state = v.into();
17641        self
17642    }
17643
17644    /// Sets the value of [percent_complete][crate::model::MoveFolderMetadata::percent_complete].
17645    ///
17646    /// # Example
17647    /// ```ignore,no_run
17648    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17649    /// let x = MoveFolderMetadata::new().set_percent_complete(42);
17650    /// ```
17651    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17652        self.percent_complete = v.into();
17653        self
17654    }
17655}
17656
17657impl wkt::message::Message for MoveFolderMetadata {
17658    fn typename() -> &'static str {
17659        "type.googleapis.com/google.cloud.dataform.v1.MoveFolderMetadata"
17660    }
17661}
17662
17663/// Defines additional types related to [MoveFolderMetadata].
17664pub mod move_folder_metadata {
17665    #[allow(unused_imports)]
17666    use super::*;
17667
17668    /// Different states of the move.
17669    ///
17670    /// # Working with unknown values
17671    ///
17672    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17673    /// additional enum variants at any time. Adding new variants is not considered
17674    /// a breaking change. Applications should write their code in anticipation of:
17675    ///
17676    /// - New values appearing in future releases of the client library, **and**
17677    /// - New values received dynamically, without application changes.
17678    ///
17679    /// Please consult the [Working with enums] section in the user guide for some
17680    /// guidelines.
17681    ///
17682    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17683    #[derive(Clone, Debug, PartialEq)]
17684    #[non_exhaustive]
17685    pub enum State {
17686        /// The state is unspecified.
17687        Unspecified,
17688        /// The move was initialized and recorded by the server, but not yet started.
17689        Initialized,
17690        /// The move is in progress.
17691        InProgress,
17692        /// The move has completed successfully.
17693        Success,
17694        /// The move has failed.
17695        Failed,
17696        /// If set, the enum was initialized with an unknown value.
17697        ///
17698        /// Applications can examine the value using [State::value] or
17699        /// [State::name].
17700        UnknownValue(state::UnknownValue),
17701    }
17702
17703    #[doc(hidden)]
17704    pub mod state {
17705        #[allow(unused_imports)]
17706        use super::*;
17707        #[derive(Clone, Debug, PartialEq)]
17708        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17709    }
17710
17711    impl State {
17712        /// Gets the enum value.
17713        ///
17714        /// Returns `None` if the enum contains an unknown value deserialized from
17715        /// the string representation of enums.
17716        pub fn value(&self) -> std::option::Option<i32> {
17717            match self {
17718                Self::Unspecified => std::option::Option::Some(0),
17719                Self::Initialized => std::option::Option::Some(1),
17720                Self::InProgress => std::option::Option::Some(2),
17721                Self::Success => std::option::Option::Some(3),
17722                Self::Failed => std::option::Option::Some(4),
17723                Self::UnknownValue(u) => u.0.value(),
17724            }
17725        }
17726
17727        /// Gets the enum value as a string.
17728        ///
17729        /// Returns `None` if the enum contains an unknown value deserialized from
17730        /// the integer representation of enums.
17731        pub fn name(&self) -> std::option::Option<&str> {
17732            match self {
17733                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17734                Self::Initialized => std::option::Option::Some("INITIALIZED"),
17735                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
17736                Self::Success => std::option::Option::Some("SUCCESS"),
17737                Self::Failed => std::option::Option::Some("FAILED"),
17738                Self::UnknownValue(u) => u.0.name(),
17739            }
17740        }
17741    }
17742
17743    impl std::default::Default for State {
17744        fn default() -> Self {
17745            use std::convert::From;
17746            Self::from(0)
17747        }
17748    }
17749
17750    impl std::fmt::Display for State {
17751        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17752            wkt::internal::display_enum(f, self.name(), self.value())
17753        }
17754    }
17755
17756    impl std::convert::From<i32> for State {
17757        fn from(value: i32) -> Self {
17758            match value {
17759                0 => Self::Unspecified,
17760                1 => Self::Initialized,
17761                2 => Self::InProgress,
17762                3 => Self::Success,
17763                4 => Self::Failed,
17764                _ => Self::UnknownValue(state::UnknownValue(
17765                    wkt::internal::UnknownEnumValue::Integer(value),
17766                )),
17767            }
17768        }
17769    }
17770
17771    impl std::convert::From<&str> for State {
17772        fn from(value: &str) -> Self {
17773            use std::string::ToString;
17774            match value {
17775                "STATE_UNSPECIFIED" => Self::Unspecified,
17776                "INITIALIZED" => Self::Initialized,
17777                "IN_PROGRESS" => Self::InProgress,
17778                "SUCCESS" => Self::Success,
17779                "FAILED" => Self::Failed,
17780                _ => Self::UnknownValue(state::UnknownValue(
17781                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17782                )),
17783            }
17784        }
17785    }
17786
17787    impl serde::ser::Serialize for State {
17788        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17789        where
17790            S: serde::Serializer,
17791        {
17792            match self {
17793                Self::Unspecified => serializer.serialize_i32(0),
17794                Self::Initialized => serializer.serialize_i32(1),
17795                Self::InProgress => serializer.serialize_i32(2),
17796                Self::Success => serializer.serialize_i32(3),
17797                Self::Failed => serializer.serialize_i32(4),
17798                Self::UnknownValue(u) => u.0.serialize(serializer),
17799            }
17800        }
17801    }
17802
17803    impl<'de> serde::de::Deserialize<'de> for State {
17804        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17805        where
17806            D: serde::Deserializer<'de>,
17807        {
17808            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17809                ".google.cloud.dataform.v1.MoveFolderMetadata.State",
17810            ))
17811        }
17812    }
17813}
17814
17815/// Contains metadata about the progress of the MoveRepository Long-running
17816/// operations.
17817#[derive(Clone, Default, PartialEq)]
17818#[non_exhaustive]
17819pub struct MoveRepositoryMetadata {
17820    /// Output only. The time the operation was created.
17821    pub create_time: std::option::Option<wkt::Timestamp>,
17822
17823    /// Output only. The time the operation finished running.
17824    pub end_time: std::option::Option<wkt::Timestamp>,
17825
17826    /// Output only. Server-defined resource path for the target of the operation.
17827    pub target: std::string::String,
17828
17829    /// The state of the move.
17830    pub state: crate::model::move_repository_metadata::State,
17831
17832    /// Percent complete of the move [0, 100].
17833    pub percent_complete: i32,
17834
17835    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17836}
17837
17838impl MoveRepositoryMetadata {
17839    /// Creates a new default instance.
17840    pub fn new() -> Self {
17841        std::default::Default::default()
17842    }
17843
17844    /// Sets the value of [create_time][crate::model::MoveRepositoryMetadata::create_time].
17845    ///
17846    /// # Example
17847    /// ```ignore,no_run
17848    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17849    /// use wkt::Timestamp;
17850    /// let x = MoveRepositoryMetadata::new().set_create_time(Timestamp::default()/* use setters */);
17851    /// ```
17852    pub fn set_create_time<T>(mut self, v: T) -> Self
17853    where
17854        T: std::convert::Into<wkt::Timestamp>,
17855    {
17856        self.create_time = std::option::Option::Some(v.into());
17857        self
17858    }
17859
17860    /// Sets or clears the value of [create_time][crate::model::MoveRepositoryMetadata::create_time].
17861    ///
17862    /// # Example
17863    /// ```ignore,no_run
17864    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17865    /// use wkt::Timestamp;
17866    /// let x = MoveRepositoryMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17867    /// let x = MoveRepositoryMetadata::new().set_or_clear_create_time(None::<Timestamp>);
17868    /// ```
17869    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17870    where
17871        T: std::convert::Into<wkt::Timestamp>,
17872    {
17873        self.create_time = v.map(|x| x.into());
17874        self
17875    }
17876
17877    /// Sets the value of [end_time][crate::model::MoveRepositoryMetadata::end_time].
17878    ///
17879    /// # Example
17880    /// ```ignore,no_run
17881    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17882    /// use wkt::Timestamp;
17883    /// let x = MoveRepositoryMetadata::new().set_end_time(Timestamp::default()/* use setters */);
17884    /// ```
17885    pub fn set_end_time<T>(mut self, v: T) -> Self
17886    where
17887        T: std::convert::Into<wkt::Timestamp>,
17888    {
17889        self.end_time = std::option::Option::Some(v.into());
17890        self
17891    }
17892
17893    /// Sets or clears the value of [end_time][crate::model::MoveRepositoryMetadata::end_time].
17894    ///
17895    /// # Example
17896    /// ```ignore,no_run
17897    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17898    /// use wkt::Timestamp;
17899    /// let x = MoveRepositoryMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
17900    /// let x = MoveRepositoryMetadata::new().set_or_clear_end_time(None::<Timestamp>);
17901    /// ```
17902    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
17903    where
17904        T: std::convert::Into<wkt::Timestamp>,
17905    {
17906        self.end_time = v.map(|x| x.into());
17907        self
17908    }
17909
17910    /// Sets the value of [target][crate::model::MoveRepositoryMetadata::target].
17911    ///
17912    /// # Example
17913    /// ```ignore,no_run
17914    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17915    /// let x = MoveRepositoryMetadata::new().set_target("example");
17916    /// ```
17917    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17918        self.target = v.into();
17919        self
17920    }
17921
17922    /// Sets the value of [state][crate::model::MoveRepositoryMetadata::state].
17923    ///
17924    /// # Example
17925    /// ```ignore,no_run
17926    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17927    /// use google_cloud_dataform_v1::model::move_repository_metadata::State;
17928    /// let x0 = MoveRepositoryMetadata::new().set_state(State::Initialized);
17929    /// let x1 = MoveRepositoryMetadata::new().set_state(State::InProgress);
17930    /// let x2 = MoveRepositoryMetadata::new().set_state(State::Success);
17931    /// ```
17932    pub fn set_state<T: std::convert::Into<crate::model::move_repository_metadata::State>>(
17933        mut self,
17934        v: T,
17935    ) -> Self {
17936        self.state = v.into();
17937        self
17938    }
17939
17940    /// Sets the value of [percent_complete][crate::model::MoveRepositoryMetadata::percent_complete].
17941    ///
17942    /// # Example
17943    /// ```ignore,no_run
17944    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17945    /// let x = MoveRepositoryMetadata::new().set_percent_complete(42);
17946    /// ```
17947    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17948        self.percent_complete = v.into();
17949        self
17950    }
17951}
17952
17953impl wkt::message::Message for MoveRepositoryMetadata {
17954    fn typename() -> &'static str {
17955        "type.googleapis.com/google.cloud.dataform.v1.MoveRepositoryMetadata"
17956    }
17957}
17958
17959/// Defines additional types related to [MoveRepositoryMetadata].
17960pub mod move_repository_metadata {
17961    #[allow(unused_imports)]
17962    use super::*;
17963
17964    /// Different states of the move.
17965    ///
17966    /// # Working with unknown values
17967    ///
17968    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17969    /// additional enum variants at any time. Adding new variants is not considered
17970    /// a breaking change. Applications should write their code in anticipation of:
17971    ///
17972    /// - New values appearing in future releases of the client library, **and**
17973    /// - New values received dynamically, without application changes.
17974    ///
17975    /// Please consult the [Working with enums] section in the user guide for some
17976    /// guidelines.
17977    ///
17978    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17979    #[derive(Clone, Debug, PartialEq)]
17980    #[non_exhaustive]
17981    pub enum State {
17982        /// The state is unspecified.
17983        Unspecified,
17984        /// The move was initialized and recorded by the server, but not yet started.
17985        Initialized,
17986        /// The move is in progress.
17987        InProgress,
17988        /// The move has completed successfully.
17989        Success,
17990        /// The move has failed.
17991        Failed,
17992        /// If set, the enum was initialized with an unknown value.
17993        ///
17994        /// Applications can examine the value using [State::value] or
17995        /// [State::name].
17996        UnknownValue(state::UnknownValue),
17997    }
17998
17999    #[doc(hidden)]
18000    pub mod state {
18001        #[allow(unused_imports)]
18002        use super::*;
18003        #[derive(Clone, Debug, PartialEq)]
18004        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18005    }
18006
18007    impl State {
18008        /// Gets the enum value.
18009        ///
18010        /// Returns `None` if the enum contains an unknown value deserialized from
18011        /// the string representation of enums.
18012        pub fn value(&self) -> std::option::Option<i32> {
18013            match self {
18014                Self::Unspecified => std::option::Option::Some(0),
18015                Self::Initialized => std::option::Option::Some(1),
18016                Self::InProgress => std::option::Option::Some(2),
18017                Self::Success => std::option::Option::Some(3),
18018                Self::Failed => std::option::Option::Some(4),
18019                Self::UnknownValue(u) => u.0.value(),
18020            }
18021        }
18022
18023        /// Gets the enum value as a string.
18024        ///
18025        /// Returns `None` if the enum contains an unknown value deserialized from
18026        /// the integer representation of enums.
18027        pub fn name(&self) -> std::option::Option<&str> {
18028            match self {
18029                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18030                Self::Initialized => std::option::Option::Some("INITIALIZED"),
18031                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
18032                Self::Success => std::option::Option::Some("SUCCESS"),
18033                Self::Failed => std::option::Option::Some("FAILED"),
18034                Self::UnknownValue(u) => u.0.name(),
18035            }
18036        }
18037    }
18038
18039    impl std::default::Default for State {
18040        fn default() -> Self {
18041            use std::convert::From;
18042            Self::from(0)
18043        }
18044    }
18045
18046    impl std::fmt::Display for State {
18047        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18048            wkt::internal::display_enum(f, self.name(), self.value())
18049        }
18050    }
18051
18052    impl std::convert::From<i32> for State {
18053        fn from(value: i32) -> Self {
18054            match value {
18055                0 => Self::Unspecified,
18056                1 => Self::Initialized,
18057                2 => Self::InProgress,
18058                3 => Self::Success,
18059                4 => Self::Failed,
18060                _ => Self::UnknownValue(state::UnknownValue(
18061                    wkt::internal::UnknownEnumValue::Integer(value),
18062                )),
18063            }
18064        }
18065    }
18066
18067    impl std::convert::From<&str> for State {
18068        fn from(value: &str) -> Self {
18069            use std::string::ToString;
18070            match value {
18071                "STATE_UNSPECIFIED" => Self::Unspecified,
18072                "INITIALIZED" => Self::Initialized,
18073                "IN_PROGRESS" => Self::InProgress,
18074                "SUCCESS" => Self::Success,
18075                "FAILED" => Self::Failed,
18076                _ => Self::UnknownValue(state::UnknownValue(
18077                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18078                )),
18079            }
18080        }
18081    }
18082
18083    impl serde::ser::Serialize for State {
18084        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18085        where
18086            S: serde::Serializer,
18087        {
18088            match self {
18089                Self::Unspecified => serializer.serialize_i32(0),
18090                Self::Initialized => serializer.serialize_i32(1),
18091                Self::InProgress => serializer.serialize_i32(2),
18092                Self::Success => serializer.serialize_i32(3),
18093                Self::Failed => serializer.serialize_i32(4),
18094                Self::UnknownValue(u) => u.0.serialize(serializer),
18095            }
18096        }
18097    }
18098
18099    impl<'de> serde::de::Deserialize<'de> for State {
18100        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18101        where
18102            D: serde::Deserializer<'de>,
18103        {
18104            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18105                ".google.cloud.dataform.v1.MoveRepositoryMetadata.State",
18106            ))
18107        }
18108    }
18109}
18110
18111/// Represents the level of detail to return for directory contents.
18112///
18113/// # Working with unknown values
18114///
18115/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18116/// additional enum variants at any time. Adding new variants is not considered
18117/// a breaking change. Applications should write their code in anticipation of:
18118///
18119/// - New values appearing in future releases of the client library, **and**
18120/// - New values received dynamically, without application changes.
18121///
18122/// Please consult the [Working with enums] section in the user guide for some
18123/// guidelines.
18124///
18125/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18126#[derive(Clone, Debug, PartialEq)]
18127#[non_exhaustive]
18128pub enum DirectoryContentsView {
18129    /// The default / unset value. Defaults to DIRECTORY_CONTENTS_VIEW_BASIC.
18130    Unspecified,
18131    /// Includes only the file or directory name. This is the default behavior.
18132    Basic,
18133    /// Includes all metadata for each file or directory. Currently not supported
18134    /// by CMEK-protected workspaces.
18135    Metadata,
18136    /// If set, the enum was initialized with an unknown value.
18137    ///
18138    /// Applications can examine the value using [DirectoryContentsView::value] or
18139    /// [DirectoryContentsView::name].
18140    UnknownValue(directory_contents_view::UnknownValue),
18141}
18142
18143#[doc(hidden)]
18144pub mod directory_contents_view {
18145    #[allow(unused_imports)]
18146    use super::*;
18147    #[derive(Clone, Debug, PartialEq)]
18148    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18149}
18150
18151impl DirectoryContentsView {
18152    /// Gets the enum value.
18153    ///
18154    /// Returns `None` if the enum contains an unknown value deserialized from
18155    /// the string representation of enums.
18156    pub fn value(&self) -> std::option::Option<i32> {
18157        match self {
18158            Self::Unspecified => std::option::Option::Some(0),
18159            Self::Basic => std::option::Option::Some(1),
18160            Self::Metadata => std::option::Option::Some(2),
18161            Self::UnknownValue(u) => u.0.value(),
18162        }
18163    }
18164
18165    /// Gets the enum value as a string.
18166    ///
18167    /// Returns `None` if the enum contains an unknown value deserialized from
18168    /// the integer representation of enums.
18169    pub fn name(&self) -> std::option::Option<&str> {
18170        match self {
18171            Self::Unspecified => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_UNSPECIFIED"),
18172            Self::Basic => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_BASIC"),
18173            Self::Metadata => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_METADATA"),
18174            Self::UnknownValue(u) => u.0.name(),
18175        }
18176    }
18177}
18178
18179impl std::default::Default for DirectoryContentsView {
18180    fn default() -> Self {
18181        use std::convert::From;
18182        Self::from(0)
18183    }
18184}
18185
18186impl std::fmt::Display for DirectoryContentsView {
18187    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18188        wkt::internal::display_enum(f, self.name(), self.value())
18189    }
18190}
18191
18192impl std::convert::From<i32> for DirectoryContentsView {
18193    fn from(value: i32) -> Self {
18194        match value {
18195            0 => Self::Unspecified,
18196            1 => Self::Basic,
18197            2 => Self::Metadata,
18198            _ => Self::UnknownValue(directory_contents_view::UnknownValue(
18199                wkt::internal::UnknownEnumValue::Integer(value),
18200            )),
18201        }
18202    }
18203}
18204
18205impl std::convert::From<&str> for DirectoryContentsView {
18206    fn from(value: &str) -> Self {
18207        use std::string::ToString;
18208        match value {
18209            "DIRECTORY_CONTENTS_VIEW_UNSPECIFIED" => Self::Unspecified,
18210            "DIRECTORY_CONTENTS_VIEW_BASIC" => Self::Basic,
18211            "DIRECTORY_CONTENTS_VIEW_METADATA" => Self::Metadata,
18212            _ => Self::UnknownValue(directory_contents_view::UnknownValue(
18213                wkt::internal::UnknownEnumValue::String(value.to_string()),
18214            )),
18215        }
18216    }
18217}
18218
18219impl serde::ser::Serialize for DirectoryContentsView {
18220    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18221    where
18222        S: serde::Serializer,
18223    {
18224        match self {
18225            Self::Unspecified => serializer.serialize_i32(0),
18226            Self::Basic => serializer.serialize_i32(1),
18227            Self::Metadata => serializer.serialize_i32(2),
18228            Self::UnknownValue(u) => u.0.serialize(serializer),
18229        }
18230    }
18231}
18232
18233impl<'de> serde::de::Deserialize<'de> for DirectoryContentsView {
18234    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18235    where
18236        D: serde::Deserializer<'de>,
18237    {
18238        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DirectoryContentsView>::new(
18239            ".google.cloud.dataform.v1.DirectoryContentsView",
18240        ))
18241    }
18242}