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::bare_urls)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![allow(rustdoc::invalid_html_tags)]
20#![allow(rustdoc::redundant_explicit_links)]
21#![no_implicit_prelude]
22extern crate async_trait;
23extern crate bytes;
24extern crate gaxi;
25extern crate google_cloud_gax;
26extern crate google_cloud_iam_v1;
27extern crate google_cloud_location;
28extern crate google_cloud_longrunning;
29extern crate google_cloud_lro;
30extern crate google_cloud_rpc;
31extern crate google_cloud_type;
32extern crate serde;
33extern crate serde_json;
34extern crate serde_with;
35extern crate std;
36extern crate tracing;
37extern crate wkt;
38
39mod debug;
40mod deserialize;
41mod serialize;
42
43/// Describes encryption state of a resource.
44#[derive(Clone, Default, PartialEq)]
45#[non_exhaustive]
46pub struct DataEncryptionState {
47    /// Required. The KMS key version name with which data of a resource is
48    /// encrypted.
49    pub kms_key_version_name: std::string::String,
50
51    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
52}
53
54impl DataEncryptionState {
55    /// Creates a new default instance.
56    pub fn new() -> Self {
57        std::default::Default::default()
58    }
59
60    /// Sets the value of [kms_key_version_name][crate::model::DataEncryptionState::kms_key_version_name].
61    ///
62    /// # Example
63    /// ```ignore,no_run
64    /// # use google_cloud_dataform_v1::model::DataEncryptionState;
65    /// let x = DataEncryptionState::new().set_kms_key_version_name("example");
66    /// ```
67    pub fn set_kms_key_version_name<T: std::convert::Into<std::string::String>>(
68        mut self,
69        v: T,
70    ) -> Self {
71        self.kms_key_version_name = v.into();
72        self
73    }
74}
75
76impl wkt::message::Message for DataEncryptionState {
77    fn typename() -> &'static str {
78        "type.googleapis.com/google.cloud.dataform.v1.DataEncryptionState"
79    }
80}
81
82/// Represents a Dataform Git repository.
83#[derive(Clone, Default, PartialEq)]
84#[non_exhaustive]
85pub struct Repository {
86    /// Identifier. The repository's name.
87    pub name: std::string::String,
88
89    /// Optional. The name of the containing folder of the repository.
90    /// The field is immutable and it can be modified via a MoveRepository
91    /// operation.
92    /// Format: `projects/*/locations/*/folders/*`. or
93    /// `projects/*/locations/*/teamFolders/*`.
94    pub containing_folder: std::option::Option<std::string::String>,
95
96    /// Output only. The resource name of the TeamFolder that this Repository is
97    /// associated with. This should take the format:
98    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this
99    /// is not set, the Repository is not associated with a TeamFolder.
100    pub team_folder_name: std::option::Option<std::string::String>,
101
102    /// Output only. The timestamp of when the repository was created.
103    pub create_time: std::option::Option<wkt::Timestamp>,
104
105    /// Optional. The repository's user-friendly name.
106    pub display_name: std::string::String,
107
108    /// Optional. If set, configures this repository to be linked to a Git remote.
109    pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
110
111    /// Optional. The name of the Secret Manager secret version to be used to
112    /// interpolate variables into the .npmrc file for package installation
113    /// operations. Must be in the format `projects/*/secrets/*/versions/*`. The
114    /// file itself must be in a JSON format.
115    pub npmrc_environment_variables_secret_version: std::string::String,
116
117    /// Optional. If set, fields of `workspace_compilation_overrides` override the
118    /// default compilation settings that are specified in dataform.json when
119    /// creating workspace-scoped compilation results. See documentation for
120    /// `WorkspaceCompilationOverrides` for more information.
121    pub workspace_compilation_overrides:
122        std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
123
124    /// Optional. Repository user labels.
125    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
126
127    /// Optional. Input only. If set to true, the authenticated user will be
128    /// granted the roles/dataform.admin role on the created repository.
129    pub set_authenticated_user_admin: bool,
130
131    /// Optional. The service account to run workflow invocations under.
132    pub service_account: std::string::String,
133
134    /// Optional. The reference to a KMS encryption key. If provided, it will be
135    /// used to encrypt user data in the repository and all child resources. It is
136    /// not possible to add or update the encryption key after the repository is
137    /// created. Example:
138    /// `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}`
139    pub kms_key_name: std::string::String,
140
141    /// Output only. A data encryption state of a Git repository if this Repository
142    /// is protected by a KMS key.
143    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
144
145    /// Output only. All the metadata information that is used internally to serve
146    /// the resource. For example: timestamps, flags, status fields, etc. The
147    /// format of this field is a JSON string.
148    pub internal_metadata: std::option::Option<std::string::String>,
149
150    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
151}
152
153impl Repository {
154    /// Creates a new default instance.
155    pub fn new() -> Self {
156        std::default::Default::default()
157    }
158
159    /// Sets the value of [name][crate::model::Repository::name].
160    ///
161    /// # Example
162    /// ```ignore,no_run
163    /// # use google_cloud_dataform_v1::model::Repository;
164    /// # let project_id = "project_id";
165    /// # let location_id = "location_id";
166    /// # let repository_id = "repository_id";
167    /// let x = Repository::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
168    /// ```
169    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
170        self.name = v.into();
171        self
172    }
173
174    /// Sets the value of [containing_folder][crate::model::Repository::containing_folder].
175    ///
176    /// # Example
177    /// ```ignore,no_run
178    /// # use google_cloud_dataform_v1::model::Repository;
179    /// let x = Repository::new().set_containing_folder("example");
180    /// ```
181    pub fn set_containing_folder<T>(mut self, v: T) -> Self
182    where
183        T: std::convert::Into<std::string::String>,
184    {
185        self.containing_folder = std::option::Option::Some(v.into());
186        self
187    }
188
189    /// Sets or clears the value of [containing_folder][crate::model::Repository::containing_folder].
190    ///
191    /// # Example
192    /// ```ignore,no_run
193    /// # use google_cloud_dataform_v1::model::Repository;
194    /// let x = Repository::new().set_or_clear_containing_folder(Some("example"));
195    /// let x = Repository::new().set_or_clear_containing_folder(None::<String>);
196    /// ```
197    pub fn set_or_clear_containing_folder<T>(mut self, v: std::option::Option<T>) -> Self
198    where
199        T: std::convert::Into<std::string::String>,
200    {
201        self.containing_folder = v.map(|x| x.into());
202        self
203    }
204
205    /// Sets the value of [team_folder_name][crate::model::Repository::team_folder_name].
206    ///
207    /// # Example
208    /// ```ignore,no_run
209    /// # use google_cloud_dataform_v1::model::Repository;
210    /// let x = Repository::new().set_team_folder_name("example");
211    /// ```
212    pub fn set_team_folder_name<T>(mut self, v: T) -> Self
213    where
214        T: std::convert::Into<std::string::String>,
215    {
216        self.team_folder_name = std::option::Option::Some(v.into());
217        self
218    }
219
220    /// Sets or clears the value of [team_folder_name][crate::model::Repository::team_folder_name].
221    ///
222    /// # Example
223    /// ```ignore,no_run
224    /// # use google_cloud_dataform_v1::model::Repository;
225    /// let x = Repository::new().set_or_clear_team_folder_name(Some("example"));
226    /// let x = Repository::new().set_or_clear_team_folder_name(None::<String>);
227    /// ```
228    pub fn set_or_clear_team_folder_name<T>(mut self, v: std::option::Option<T>) -> Self
229    where
230        T: std::convert::Into<std::string::String>,
231    {
232        self.team_folder_name = v.map(|x| x.into());
233        self
234    }
235
236    /// Sets the value of [create_time][crate::model::Repository::create_time].
237    ///
238    /// # Example
239    /// ```ignore,no_run
240    /// # use google_cloud_dataform_v1::model::Repository;
241    /// use wkt::Timestamp;
242    /// let x = Repository::new().set_create_time(Timestamp::default()/* use setters */);
243    /// ```
244    pub fn set_create_time<T>(mut self, v: T) -> Self
245    where
246        T: std::convert::Into<wkt::Timestamp>,
247    {
248        self.create_time = std::option::Option::Some(v.into());
249        self
250    }
251
252    /// Sets or clears the value of [create_time][crate::model::Repository::create_time].
253    ///
254    /// # Example
255    /// ```ignore,no_run
256    /// # use google_cloud_dataform_v1::model::Repository;
257    /// use wkt::Timestamp;
258    /// let x = Repository::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
259    /// let x = Repository::new().set_or_clear_create_time(None::<Timestamp>);
260    /// ```
261    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
262    where
263        T: std::convert::Into<wkt::Timestamp>,
264    {
265        self.create_time = v.map(|x| x.into());
266        self
267    }
268
269    /// Sets the value of [display_name][crate::model::Repository::display_name].
270    ///
271    /// # Example
272    /// ```ignore,no_run
273    /// # use google_cloud_dataform_v1::model::Repository;
274    /// let x = Repository::new().set_display_name("example");
275    /// ```
276    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
277        self.display_name = v.into();
278        self
279    }
280
281    /// Sets the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
282    ///
283    /// # Example
284    /// ```ignore,no_run
285    /// # use google_cloud_dataform_v1::model::Repository;
286    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
287    /// let x = Repository::new().set_git_remote_settings(GitRemoteSettings::default()/* use setters */);
288    /// ```
289    pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
290    where
291        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
292    {
293        self.git_remote_settings = std::option::Option::Some(v.into());
294        self
295    }
296
297    /// Sets or clears the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
298    ///
299    /// # Example
300    /// ```ignore,no_run
301    /// # use google_cloud_dataform_v1::model::Repository;
302    /// use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
303    /// let x = Repository::new().set_or_clear_git_remote_settings(Some(GitRemoteSettings::default()/* use setters */));
304    /// let x = Repository::new().set_or_clear_git_remote_settings(None::<GitRemoteSettings>);
305    /// ```
306    pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
307    where
308        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
309    {
310        self.git_remote_settings = v.map(|x| x.into());
311        self
312    }
313
314    /// Sets the value of [npmrc_environment_variables_secret_version][crate::model::Repository::npmrc_environment_variables_secret_version].
315    ///
316    /// # Example
317    /// ```ignore,no_run
318    /// # use google_cloud_dataform_v1::model::Repository;
319    /// let x = Repository::new().set_npmrc_environment_variables_secret_version("example");
320    /// ```
321    pub fn set_npmrc_environment_variables_secret_version<
322        T: std::convert::Into<std::string::String>,
323    >(
324        mut self,
325        v: T,
326    ) -> Self {
327        self.npmrc_environment_variables_secret_version = v.into();
328        self
329    }
330
331    /// Sets the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
332    ///
333    /// # Example
334    /// ```ignore,no_run
335    /// # use google_cloud_dataform_v1::model::Repository;
336    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
337    /// let x = Repository::new().set_workspace_compilation_overrides(WorkspaceCompilationOverrides::default()/* use setters */);
338    /// ```
339    pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
340    where
341        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
342    {
343        self.workspace_compilation_overrides = std::option::Option::Some(v.into());
344        self
345    }
346
347    /// Sets or clears the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
348    ///
349    /// # Example
350    /// ```ignore,no_run
351    /// # use google_cloud_dataform_v1::model::Repository;
352    /// use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
353    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(Some(WorkspaceCompilationOverrides::default()/* use setters */));
354    /// let x = Repository::new().set_or_clear_workspace_compilation_overrides(None::<WorkspaceCompilationOverrides>);
355    /// ```
356    pub fn set_or_clear_workspace_compilation_overrides<T>(
357        mut self,
358        v: std::option::Option<T>,
359    ) -> Self
360    where
361        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
362    {
363        self.workspace_compilation_overrides = v.map(|x| x.into());
364        self
365    }
366
367    /// Sets the value of [labels][crate::model::Repository::labels].
368    ///
369    /// # Example
370    /// ```ignore,no_run
371    /// # use google_cloud_dataform_v1::model::Repository;
372    /// let x = Repository::new().set_labels([
373    ///     ("key0", "abc"),
374    ///     ("key1", "xyz"),
375    /// ]);
376    /// ```
377    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
378    where
379        T: std::iter::IntoIterator<Item = (K, V)>,
380        K: std::convert::Into<std::string::String>,
381        V: std::convert::Into<std::string::String>,
382    {
383        use std::iter::Iterator;
384        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
385        self
386    }
387
388    /// Sets the value of [set_authenticated_user_admin][crate::model::Repository::set_authenticated_user_admin].
389    ///
390    /// # Example
391    /// ```ignore,no_run
392    /// # use google_cloud_dataform_v1::model::Repository;
393    /// let x = Repository::new().set_set_authenticated_user_admin(true);
394    /// ```
395    pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
396        self.set_authenticated_user_admin = v.into();
397        self
398    }
399
400    /// Sets the value of [service_account][crate::model::Repository::service_account].
401    ///
402    /// # Example
403    /// ```ignore,no_run
404    /// # use google_cloud_dataform_v1::model::Repository;
405    /// let x = Repository::new().set_service_account("example");
406    /// ```
407    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
408        self.service_account = v.into();
409        self
410    }
411
412    /// Sets the value of [kms_key_name][crate::model::Repository::kms_key_name].
413    ///
414    /// # Example
415    /// ```ignore,no_run
416    /// # use google_cloud_dataform_v1::model::Repository;
417    /// let x = Repository::new().set_kms_key_name("example");
418    /// ```
419    pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
420        self.kms_key_name = v.into();
421        self
422    }
423
424    /// Sets the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
425    ///
426    /// # Example
427    /// ```ignore,no_run
428    /// # use google_cloud_dataform_v1::model::Repository;
429    /// use google_cloud_dataform_v1::model::DataEncryptionState;
430    /// let x = Repository::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
431    /// ```
432    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
433    where
434        T: std::convert::Into<crate::model::DataEncryptionState>,
435    {
436        self.data_encryption_state = std::option::Option::Some(v.into());
437        self
438    }
439
440    /// Sets or clears the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
441    ///
442    /// # Example
443    /// ```ignore,no_run
444    /// # use google_cloud_dataform_v1::model::Repository;
445    /// use google_cloud_dataform_v1::model::DataEncryptionState;
446    /// let x = Repository::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
447    /// let x = Repository::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
448    /// ```
449    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
450    where
451        T: std::convert::Into<crate::model::DataEncryptionState>,
452    {
453        self.data_encryption_state = v.map(|x| x.into());
454        self
455    }
456
457    /// Sets the value of [internal_metadata][crate::model::Repository::internal_metadata].
458    ///
459    /// # Example
460    /// ```ignore,no_run
461    /// # use google_cloud_dataform_v1::model::Repository;
462    /// let x = Repository::new().set_internal_metadata("example");
463    /// ```
464    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
465    where
466        T: std::convert::Into<std::string::String>,
467    {
468        self.internal_metadata = std::option::Option::Some(v.into());
469        self
470    }
471
472    /// Sets or clears the value of [internal_metadata][crate::model::Repository::internal_metadata].
473    ///
474    /// # Example
475    /// ```ignore,no_run
476    /// # use google_cloud_dataform_v1::model::Repository;
477    /// let x = Repository::new().set_or_clear_internal_metadata(Some("example"));
478    /// let x = Repository::new().set_or_clear_internal_metadata(None::<String>);
479    /// ```
480    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
481    where
482        T: std::convert::Into<std::string::String>,
483    {
484        self.internal_metadata = v.map(|x| x.into());
485        self
486    }
487}
488
489impl wkt::message::Message for Repository {
490    fn typename() -> &'static str {
491        "type.googleapis.com/google.cloud.dataform.v1.Repository"
492    }
493}
494
495/// Defines additional types related to [Repository].
496pub mod repository {
497    #[allow(unused_imports)]
498    use super::*;
499
500    /// Controls Git remote configuration for a repository.
501    #[derive(Clone, Default, PartialEq)]
502    #[non_exhaustive]
503    pub struct GitRemoteSettings {
504        /// Required. The Git remote's URL.
505        pub url: std::string::String,
506
507        /// Optional. The Git remote's default branch name.
508        /// If not set, `main` will be used.
509        pub default_branch: std::string::String,
510
511        /// Output only. The Git remote's effective default branch name.
512        /// This is the default branch name of the Git remote if it is set,
513        /// otherwise it is `main`.
514        pub effective_default_branch: std::string::String,
515
516        /// Optional. The name of the Secret Manager secret version to use as an
517        /// authentication token for Git operations. Must be in the format
518        /// `projects/*/secrets/*/versions/*`.
519        pub authentication_token_secret_version: std::string::String,
520
521        /// Optional. Authentication fields for remote uris using SSH protocol.
522        pub ssh_authentication_config: std::option::Option<
523            crate::model::repository::git_remote_settings::SshAuthenticationConfig,
524        >,
525
526        /// Optional. Resource name for the `GitRepositoryLink` used for machine
527        /// credentials. Must be in the format
528        /// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`
529        pub git_repository_link: std::option::Option<std::string::String>,
530
531        /// Output only. Deprecated: The field does not contain any token status
532        /// information.
533        #[deprecated]
534        pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
535
536        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
537    }
538
539    impl GitRemoteSettings {
540        /// Creates a new default instance.
541        pub fn new() -> Self {
542            std::default::Default::default()
543        }
544
545        /// Sets the value of [url][crate::model::repository::GitRemoteSettings::url].
546        ///
547        /// # Example
548        /// ```ignore,no_run
549        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
550        /// let x = GitRemoteSettings::new().set_url("example");
551        /// ```
552        pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
553            self.url = v.into();
554            self
555        }
556
557        /// Sets the value of [default_branch][crate::model::repository::GitRemoteSettings::default_branch].
558        ///
559        /// # Example
560        /// ```ignore,no_run
561        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
562        /// let x = GitRemoteSettings::new().set_default_branch("example");
563        /// ```
564        pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
565            mut self,
566            v: T,
567        ) -> Self {
568            self.default_branch = v.into();
569            self
570        }
571
572        /// Sets the value of [effective_default_branch][crate::model::repository::GitRemoteSettings::effective_default_branch].
573        ///
574        /// # Example
575        /// ```ignore,no_run
576        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
577        /// let x = GitRemoteSettings::new().set_effective_default_branch("example");
578        /// ```
579        pub fn set_effective_default_branch<T: std::convert::Into<std::string::String>>(
580            mut self,
581            v: T,
582        ) -> Self {
583            self.effective_default_branch = v.into();
584            self
585        }
586
587        /// Sets the value of [authentication_token_secret_version][crate::model::repository::GitRemoteSettings::authentication_token_secret_version].
588        ///
589        /// # Example
590        /// ```ignore,no_run
591        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
592        /// let x = GitRemoteSettings::new().set_authentication_token_secret_version("example");
593        /// ```
594        pub fn set_authentication_token_secret_version<
595            T: std::convert::Into<std::string::String>,
596        >(
597            mut self,
598            v: T,
599        ) -> Self {
600            self.authentication_token_secret_version = v.into();
601            self
602        }
603
604        /// Sets the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
605        ///
606        /// # Example
607        /// ```ignore,no_run
608        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
609        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
610        /// let x = GitRemoteSettings::new().set_ssh_authentication_config(SshAuthenticationConfig::default()/* use setters */);
611        /// ```
612        pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
613        where
614            T: std::convert::Into<
615                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
616                >,
617        {
618            self.ssh_authentication_config = std::option::Option::Some(v.into());
619            self
620        }
621
622        /// Sets or clears the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
623        ///
624        /// # Example
625        /// ```ignore,no_run
626        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
627        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
628        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(Some(SshAuthenticationConfig::default()/* use setters */));
629        /// let x = GitRemoteSettings::new().set_or_clear_ssh_authentication_config(None::<SshAuthenticationConfig>);
630        /// ```
631        pub fn set_or_clear_ssh_authentication_config<T>(
632            mut self,
633            v: std::option::Option<T>,
634        ) -> Self
635        where
636            T: std::convert::Into<
637                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
638                >,
639        {
640            self.ssh_authentication_config = v.map(|x| x.into());
641            self
642        }
643
644        /// Sets the value of [git_repository_link][crate::model::repository::GitRemoteSettings::git_repository_link].
645        ///
646        /// # Example
647        /// ```ignore,no_run
648        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
649        /// let x = GitRemoteSettings::new().set_git_repository_link("example");
650        /// ```
651        pub fn set_git_repository_link<T>(mut self, v: T) -> Self
652        where
653            T: std::convert::Into<std::string::String>,
654        {
655            self.git_repository_link = std::option::Option::Some(v.into());
656            self
657        }
658
659        /// Sets or clears the value of [git_repository_link][crate::model::repository::GitRemoteSettings::git_repository_link].
660        ///
661        /// # Example
662        /// ```ignore,no_run
663        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
664        /// let x = GitRemoteSettings::new().set_or_clear_git_repository_link(Some("example"));
665        /// let x = GitRemoteSettings::new().set_or_clear_git_repository_link(None::<String>);
666        /// ```
667        pub fn set_or_clear_git_repository_link<T>(mut self, v: std::option::Option<T>) -> Self
668        where
669            T: std::convert::Into<std::string::String>,
670        {
671            self.git_repository_link = v.map(|x| x.into());
672            self
673        }
674
675        /// Sets the value of [token_status][crate::model::repository::GitRemoteSettings::token_status].
676        ///
677        /// # Example
678        /// ```ignore,no_run
679        /// # use google_cloud_dataform_v1::model::repository::GitRemoteSettings;
680        /// use google_cloud_dataform_v1::model::repository::git_remote_settings::TokenStatus;
681        /// let x0 = GitRemoteSettings::new().set_token_status(TokenStatus::NotFound);
682        /// let x1 = GitRemoteSettings::new().set_token_status(TokenStatus::Invalid);
683        /// let x2 = GitRemoteSettings::new().set_token_status(TokenStatus::Valid);
684        /// ```
685        #[deprecated]
686        pub fn set_token_status<
687            T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
688        >(
689            mut self,
690            v: T,
691        ) -> Self {
692            self.token_status = v.into();
693            self
694        }
695    }
696
697    impl wkt::message::Message for GitRemoteSettings {
698        fn typename() -> &'static str {
699            "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
700        }
701    }
702
703    /// Defines additional types related to [GitRemoteSettings].
704    pub mod git_remote_settings {
705        #[allow(unused_imports)]
706        use super::*;
707
708        /// Configures fields for performing SSH authentication.
709        #[derive(Clone, Default, PartialEq)]
710        #[non_exhaustive]
711        pub struct SshAuthenticationConfig {
712            /// Required. The name of the Secret Manager secret version to use as a
713            /// ssh private key for Git operations.
714            /// Must be in the format `projects/*/secrets/*/versions/*`.
715            pub user_private_key_secret_version: std::string::String,
716
717            /// Required. Content of a public SSH key to verify an identity of a remote
718            /// Git host.
719            pub host_public_key: std::string::String,
720
721            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
722        }
723
724        impl SshAuthenticationConfig {
725            /// Creates a new default instance.
726            pub fn new() -> Self {
727                std::default::Default::default()
728            }
729
730            /// Sets the value of [user_private_key_secret_version][crate::model::repository::git_remote_settings::SshAuthenticationConfig::user_private_key_secret_version].
731            ///
732            /// # Example
733            /// ```ignore,no_run
734            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
735            /// let x = SshAuthenticationConfig::new().set_user_private_key_secret_version("example");
736            /// ```
737            pub fn set_user_private_key_secret_version<
738                T: std::convert::Into<std::string::String>,
739            >(
740                mut self,
741                v: T,
742            ) -> Self {
743                self.user_private_key_secret_version = v.into();
744                self
745            }
746
747            /// Sets the value of [host_public_key][crate::model::repository::git_remote_settings::SshAuthenticationConfig::host_public_key].
748            ///
749            /// # Example
750            /// ```ignore,no_run
751            /// # use google_cloud_dataform_v1::model::repository::git_remote_settings::SshAuthenticationConfig;
752            /// let x = SshAuthenticationConfig::new().set_host_public_key("example");
753            /// ```
754            pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
755                mut self,
756                v: T,
757            ) -> Self {
758                self.host_public_key = v.into();
759                self
760            }
761        }
762
763        impl wkt::message::Message for SshAuthenticationConfig {
764            fn typename() -> &'static str {
765                "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
766            }
767        }
768
769        /// The status of the authentication token.
770        ///
771        /// # Working with unknown values
772        ///
773        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
774        /// additional enum variants at any time. Adding new variants is not considered
775        /// a breaking change. Applications should write their code in anticipation of:
776        ///
777        /// - New values appearing in future releases of the client library, **and**
778        /// - New values received dynamically, without application changes.
779        ///
780        /// Please consult the [Working with enums] section in the user guide for some
781        /// guidelines.
782        ///
783        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
784        #[derive(Clone, Debug, PartialEq)]
785        #[non_exhaustive]
786        pub enum TokenStatus {
787            /// Default value. This value is unused.
788            Unspecified,
789            /// The token could not be found in Secret Manager (or the Dataform
790            /// Service Account did not have permission to access it).
791            NotFound,
792            /// The token could not be used to authenticate against the Git remote.
793            Invalid,
794            /// The token was used successfully to authenticate against the Git remote.
795            Valid,
796            /// If set, the enum was initialized with an unknown value.
797            ///
798            /// Applications can examine the value using [TokenStatus::value] or
799            /// [TokenStatus::name].
800            UnknownValue(token_status::UnknownValue),
801        }
802
803        #[doc(hidden)]
804        pub mod token_status {
805            #[allow(unused_imports)]
806            use super::*;
807            #[derive(Clone, Debug, PartialEq)]
808            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
809        }
810
811        impl TokenStatus {
812            /// Gets the enum value.
813            ///
814            /// Returns `None` if the enum contains an unknown value deserialized from
815            /// the string representation of enums.
816            pub fn value(&self) -> std::option::Option<i32> {
817                match self {
818                    Self::Unspecified => std::option::Option::Some(0),
819                    Self::NotFound => std::option::Option::Some(1),
820                    Self::Invalid => std::option::Option::Some(2),
821                    Self::Valid => std::option::Option::Some(3),
822                    Self::UnknownValue(u) => u.0.value(),
823                }
824            }
825
826            /// Gets the enum value as a string.
827            ///
828            /// Returns `None` if the enum contains an unknown value deserialized from
829            /// the integer representation of enums.
830            pub fn name(&self) -> std::option::Option<&str> {
831                match self {
832                    Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
833                    Self::NotFound => std::option::Option::Some("NOT_FOUND"),
834                    Self::Invalid => std::option::Option::Some("INVALID"),
835                    Self::Valid => std::option::Option::Some("VALID"),
836                    Self::UnknownValue(u) => u.0.name(),
837                }
838            }
839        }
840
841        impl std::default::Default for TokenStatus {
842            fn default() -> Self {
843                use std::convert::From;
844                Self::from(0)
845            }
846        }
847
848        impl std::fmt::Display for TokenStatus {
849            fn fmt(
850                &self,
851                f: &mut std::fmt::Formatter<'_>,
852            ) -> std::result::Result<(), std::fmt::Error> {
853                wkt::internal::display_enum(f, self.name(), self.value())
854            }
855        }
856
857        impl std::convert::From<i32> for TokenStatus {
858            fn from(value: i32) -> Self {
859                match value {
860                    0 => Self::Unspecified,
861                    1 => Self::NotFound,
862                    2 => Self::Invalid,
863                    3 => Self::Valid,
864                    _ => Self::UnknownValue(token_status::UnknownValue(
865                        wkt::internal::UnknownEnumValue::Integer(value),
866                    )),
867                }
868            }
869        }
870
871        impl std::convert::From<&str> for TokenStatus {
872            fn from(value: &str) -> Self {
873                use std::string::ToString;
874                match value {
875                    "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
876                    "NOT_FOUND" => Self::NotFound,
877                    "INVALID" => Self::Invalid,
878                    "VALID" => Self::Valid,
879                    _ => Self::UnknownValue(token_status::UnknownValue(
880                        wkt::internal::UnknownEnumValue::String(value.to_string()),
881                    )),
882                }
883            }
884        }
885
886        impl serde::ser::Serialize for TokenStatus {
887            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
888            where
889                S: serde::Serializer,
890            {
891                match self {
892                    Self::Unspecified => serializer.serialize_i32(0),
893                    Self::NotFound => serializer.serialize_i32(1),
894                    Self::Invalid => serializer.serialize_i32(2),
895                    Self::Valid => serializer.serialize_i32(3),
896                    Self::UnknownValue(u) => u.0.serialize(serializer),
897                }
898            }
899        }
900
901        impl<'de> serde::de::Deserialize<'de> for TokenStatus {
902            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
903            where
904                D: serde::Deserializer<'de>,
905            {
906                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
907                    ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
908                ))
909            }
910        }
911    }
912
913    /// Configures workspace compilation overrides for a repository.
914    #[derive(Clone, Default, PartialEq)]
915    #[non_exhaustive]
916    pub struct WorkspaceCompilationOverrides {
917        /// Optional. The default database (Google Cloud project ID).
918        pub default_database: std::string::String,
919
920        /// Optional. The suffix that should be appended to all schema (BigQuery
921        /// dataset ID) names.
922        pub schema_suffix: std::string::String,
923
924        /// Optional. The prefix that should be prepended to all table names.
925        pub table_prefix: std::string::String,
926
927        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
928    }
929
930    impl WorkspaceCompilationOverrides {
931        /// Creates a new default instance.
932        pub fn new() -> Self {
933            std::default::Default::default()
934        }
935
936        /// Sets the value of [default_database][crate::model::repository::WorkspaceCompilationOverrides::default_database].
937        ///
938        /// # Example
939        /// ```ignore,no_run
940        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
941        /// let x = WorkspaceCompilationOverrides::new().set_default_database("example");
942        /// ```
943        pub fn set_default_database<T: std::convert::Into<std::string::String>>(
944            mut self,
945            v: T,
946        ) -> Self {
947            self.default_database = v.into();
948            self
949        }
950
951        /// Sets the value of [schema_suffix][crate::model::repository::WorkspaceCompilationOverrides::schema_suffix].
952        ///
953        /// # Example
954        /// ```ignore,no_run
955        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
956        /// let x = WorkspaceCompilationOverrides::new().set_schema_suffix("example");
957        /// ```
958        pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
959            mut self,
960            v: T,
961        ) -> Self {
962            self.schema_suffix = v.into();
963            self
964        }
965
966        /// Sets the value of [table_prefix][crate::model::repository::WorkspaceCompilationOverrides::table_prefix].
967        ///
968        /// # Example
969        /// ```ignore,no_run
970        /// # use google_cloud_dataform_v1::model::repository::WorkspaceCompilationOverrides;
971        /// let x = WorkspaceCompilationOverrides::new().set_table_prefix("example");
972        /// ```
973        pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
974            mut self,
975            v: T,
976        ) -> Self {
977            self.table_prefix = v.into();
978            self
979        }
980    }
981
982    impl wkt::message::Message for WorkspaceCompilationOverrides {
983        fn typename() -> &'static str {
984            "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
985        }
986    }
987}
988
989/// Metadata used to identify if a resource is user scoped.
990#[derive(Clone, Default, PartialEq)]
991#[non_exhaustive]
992pub struct PrivateResourceMetadata {
993    /// Output only. If true, this resource is user-scoped, meaning it is either a
994    /// workspace or sourced from a workspace.
995    pub user_scoped: bool,
996
997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
998}
999
1000impl PrivateResourceMetadata {
1001    /// Creates a new default instance.
1002    pub fn new() -> Self {
1003        std::default::Default::default()
1004    }
1005
1006    /// Sets the value of [user_scoped][crate::model::PrivateResourceMetadata::user_scoped].
1007    ///
1008    /// # Example
1009    /// ```ignore,no_run
1010    /// # use google_cloud_dataform_v1::model::PrivateResourceMetadata;
1011    /// let x = PrivateResourceMetadata::new().set_user_scoped(true);
1012    /// ```
1013    pub fn set_user_scoped<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1014        self.user_scoped = v.into();
1015        self
1016    }
1017}
1018
1019impl wkt::message::Message for PrivateResourceMetadata {
1020    fn typename() -> &'static str {
1021        "type.googleapis.com/google.cloud.dataform.v1.PrivateResourceMetadata"
1022    }
1023}
1024
1025/// `ListRepositories` request message.
1026#[derive(Clone, Default, PartialEq)]
1027#[non_exhaustive]
1028pub struct ListRepositoriesRequest {
1029    /// Required. The location in which to list repositories. Must be in the format
1030    /// `projects/*/locations/*`.
1031    pub parent: std::string::String,
1032
1033    /// Optional. Maximum number of repositories to return. The server may return
1034    /// fewer items than requested. If unspecified, the server will pick an
1035    /// appropriate default.
1036    pub page_size: i32,
1037
1038    /// Optional. Page token received from a previous `ListRepositories` call.
1039    /// Provide this to retrieve the subsequent page.
1040    ///
1041    /// When paginating, all other parameters provided to `ListRepositories`,
1042    /// with the exception of `page_size`, must match the call that provided the
1043    /// page token.
1044    pub page_token: std::string::String,
1045
1046    /// Optional. This field only supports ordering by `name`. If unspecified, the
1047    /// server will choose the ordering. If specified, the default order is
1048    /// ascending for the `name` field.
1049    pub order_by: std::string::String,
1050
1051    /// Optional. Filter for the returned list.
1052    pub filter: std::string::String,
1053
1054    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1055}
1056
1057impl ListRepositoriesRequest {
1058    /// Creates a new default instance.
1059    pub fn new() -> Self {
1060        std::default::Default::default()
1061    }
1062
1063    /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
1064    ///
1065    /// # Example
1066    /// ```ignore,no_run
1067    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1068    /// let x = ListRepositoriesRequest::new().set_parent("example");
1069    /// ```
1070    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1071        self.parent = v.into();
1072        self
1073    }
1074
1075    /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
1076    ///
1077    /// # Example
1078    /// ```ignore,no_run
1079    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1080    /// let x = ListRepositoriesRequest::new().set_page_size(42);
1081    /// ```
1082    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1083        self.page_size = v.into();
1084        self
1085    }
1086
1087    /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
1088    ///
1089    /// # Example
1090    /// ```ignore,no_run
1091    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1092    /// let x = ListRepositoriesRequest::new().set_page_token("example");
1093    /// ```
1094    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1095        self.page_token = v.into();
1096        self
1097    }
1098
1099    /// Sets the value of [order_by][crate::model::ListRepositoriesRequest::order_by].
1100    ///
1101    /// # Example
1102    /// ```ignore,no_run
1103    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1104    /// let x = ListRepositoriesRequest::new().set_order_by("example");
1105    /// ```
1106    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1107        self.order_by = v.into();
1108        self
1109    }
1110
1111    /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
1112    ///
1113    /// # Example
1114    /// ```ignore,no_run
1115    /// # use google_cloud_dataform_v1::model::ListRepositoriesRequest;
1116    /// let x = ListRepositoriesRequest::new().set_filter("example");
1117    /// ```
1118    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1119        self.filter = v.into();
1120        self
1121    }
1122}
1123
1124impl wkt::message::Message for ListRepositoriesRequest {
1125    fn typename() -> &'static str {
1126        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
1127    }
1128}
1129
1130/// `ListRepositories` response message.
1131#[derive(Clone, Default, PartialEq)]
1132#[non_exhaustive]
1133pub struct ListRepositoriesResponse {
1134    /// List of repositories.
1135    pub repositories: std::vec::Vec<crate::model::Repository>,
1136
1137    /// A token which can be sent as `page_token` to retrieve the next page.
1138    /// If this field is omitted, there are no subsequent pages.
1139    pub next_page_token: std::string::String,
1140
1141    /// Locations which could not be reached.
1142    pub unreachable: std::vec::Vec<std::string::String>,
1143
1144    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1145}
1146
1147impl ListRepositoriesResponse {
1148    /// Creates a new default instance.
1149    pub fn new() -> Self {
1150        std::default::Default::default()
1151    }
1152
1153    /// Sets the value of [repositories][crate::model::ListRepositoriesResponse::repositories].
1154    ///
1155    /// # Example
1156    /// ```ignore,no_run
1157    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1158    /// use google_cloud_dataform_v1::model::Repository;
1159    /// let x = ListRepositoriesResponse::new()
1160    ///     .set_repositories([
1161    ///         Repository::default()/* use setters */,
1162    ///         Repository::default()/* use (different) setters */,
1163    ///     ]);
1164    /// ```
1165    pub fn set_repositories<T, V>(mut self, v: T) -> Self
1166    where
1167        T: std::iter::IntoIterator<Item = V>,
1168        V: std::convert::Into<crate::model::Repository>,
1169    {
1170        use std::iter::Iterator;
1171        self.repositories = v.into_iter().map(|i| i.into()).collect();
1172        self
1173    }
1174
1175    /// Sets the value of [next_page_token][crate::model::ListRepositoriesResponse::next_page_token].
1176    ///
1177    /// # Example
1178    /// ```ignore,no_run
1179    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1180    /// let x = ListRepositoriesResponse::new().set_next_page_token("example");
1181    /// ```
1182    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1183        self.next_page_token = v.into();
1184        self
1185    }
1186
1187    /// Sets the value of [unreachable][crate::model::ListRepositoriesResponse::unreachable].
1188    ///
1189    /// # Example
1190    /// ```ignore,no_run
1191    /// # use google_cloud_dataform_v1::model::ListRepositoriesResponse;
1192    /// let x = ListRepositoriesResponse::new().set_unreachable(["a", "b", "c"]);
1193    /// ```
1194    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1195    where
1196        T: std::iter::IntoIterator<Item = V>,
1197        V: std::convert::Into<std::string::String>,
1198    {
1199        use std::iter::Iterator;
1200        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1201        self
1202    }
1203}
1204
1205impl wkt::message::Message for ListRepositoriesResponse {
1206    fn typename() -> &'static str {
1207        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
1208    }
1209}
1210
1211#[doc(hidden)]
1212impl google_cloud_gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
1213    type PageItem = crate::model::Repository;
1214
1215    fn items(self) -> std::vec::Vec<Self::PageItem> {
1216        self.repositories
1217    }
1218
1219    fn next_page_token(&self) -> std::string::String {
1220        use std::clone::Clone;
1221        self.next_page_token.clone()
1222    }
1223}
1224
1225/// `MoveRepository` request message.
1226#[derive(Clone, Default, PartialEq)]
1227#[non_exhaustive]
1228pub struct MoveRepositoryRequest {
1229    /// Required. The full resource name of the repository to move.
1230    pub name: std::string::String,
1231
1232    /// Optional. The name of the Folder, TeamFolder, or root location to move the
1233    /// repository to. Can be in the format of: "" to move into the root User
1234    /// folder, `projects/*/locations/*/folders/*`,
1235    /// `projects/*/locations/*/teamFolders/*`
1236    pub destination_containing_folder: std::option::Option<std::string::String>,
1237
1238    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1239}
1240
1241impl MoveRepositoryRequest {
1242    /// Creates a new default instance.
1243    pub fn new() -> Self {
1244        std::default::Default::default()
1245    }
1246
1247    /// Sets the value of [name][crate::model::MoveRepositoryRequest::name].
1248    ///
1249    /// # Example
1250    /// ```ignore,no_run
1251    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1252    /// # let project_id = "project_id";
1253    /// # let location_id = "location_id";
1254    /// # let repository_id = "repository_id";
1255    /// let x = MoveRepositoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1256    /// ```
1257    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1258        self.name = v.into();
1259        self
1260    }
1261
1262    /// Sets the value of [destination_containing_folder][crate::model::MoveRepositoryRequest::destination_containing_folder].
1263    ///
1264    /// # Example
1265    /// ```ignore,no_run
1266    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1267    /// let x = MoveRepositoryRequest::new().set_destination_containing_folder("example");
1268    /// ```
1269    pub fn set_destination_containing_folder<T>(mut self, v: T) -> Self
1270    where
1271        T: std::convert::Into<std::string::String>,
1272    {
1273        self.destination_containing_folder = std::option::Option::Some(v.into());
1274        self
1275    }
1276
1277    /// Sets or clears the value of [destination_containing_folder][crate::model::MoveRepositoryRequest::destination_containing_folder].
1278    ///
1279    /// # Example
1280    /// ```ignore,no_run
1281    /// # use google_cloud_dataform_v1::model::MoveRepositoryRequest;
1282    /// let x = MoveRepositoryRequest::new().set_or_clear_destination_containing_folder(Some("example"));
1283    /// let x = MoveRepositoryRequest::new().set_or_clear_destination_containing_folder(None::<String>);
1284    /// ```
1285    pub fn set_or_clear_destination_containing_folder<T>(
1286        mut self,
1287        v: std::option::Option<T>,
1288    ) -> Self
1289    where
1290        T: std::convert::Into<std::string::String>,
1291    {
1292        self.destination_containing_folder = v.map(|x| x.into());
1293        self
1294    }
1295}
1296
1297impl wkt::message::Message for MoveRepositoryRequest {
1298    fn typename() -> &'static str {
1299        "type.googleapis.com/google.cloud.dataform.v1.MoveRepositoryRequest"
1300    }
1301}
1302
1303/// `GetRepository` request message.
1304#[derive(Clone, Default, PartialEq)]
1305#[non_exhaustive]
1306pub struct GetRepositoryRequest {
1307    /// Required. The repository's name.
1308    pub name: std::string::String,
1309
1310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1311}
1312
1313impl GetRepositoryRequest {
1314    /// Creates a new default instance.
1315    pub fn new() -> Self {
1316        std::default::Default::default()
1317    }
1318
1319    /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
1320    ///
1321    /// # Example
1322    /// ```ignore,no_run
1323    /// # use google_cloud_dataform_v1::model::GetRepositoryRequest;
1324    /// # let project_id = "project_id";
1325    /// # let location_id = "location_id";
1326    /// # let repository_id = "repository_id";
1327    /// let x = GetRepositoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1328    /// ```
1329    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1330        self.name = v.into();
1331        self
1332    }
1333}
1334
1335impl wkt::message::Message for GetRepositoryRequest {
1336    fn typename() -> &'static str {
1337        "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
1338    }
1339}
1340
1341/// `CreateRepository` request message.
1342#[derive(Clone, Default, PartialEq)]
1343#[non_exhaustive]
1344pub struct CreateRepositoryRequest {
1345    /// Required. The location in which to create the repository. Must be in the
1346    /// format `projects/*/locations/*`.
1347    pub parent: std::string::String,
1348
1349    /// Required. The repository to create.
1350    pub repository: std::option::Option<crate::model::Repository>,
1351
1352    /// Required. The ID to use for the repository, which will become the final
1353    /// component of the repository's resource name.
1354    pub repository_id: std::string::String,
1355
1356    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1357}
1358
1359impl CreateRepositoryRequest {
1360    /// Creates a new default instance.
1361    pub fn new() -> Self {
1362        std::default::Default::default()
1363    }
1364
1365    /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
1366    ///
1367    /// # Example
1368    /// ```ignore,no_run
1369    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1370    /// let x = CreateRepositoryRequest::new().set_parent("example");
1371    /// ```
1372    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1373        self.parent = v.into();
1374        self
1375    }
1376
1377    /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
1378    ///
1379    /// # Example
1380    /// ```ignore,no_run
1381    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1382    /// use google_cloud_dataform_v1::model::Repository;
1383    /// let x = CreateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1384    /// ```
1385    pub fn set_repository<T>(mut self, v: T) -> Self
1386    where
1387        T: std::convert::Into<crate::model::Repository>,
1388    {
1389        self.repository = std::option::Option::Some(v.into());
1390        self
1391    }
1392
1393    /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
1394    ///
1395    /// # Example
1396    /// ```ignore,no_run
1397    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1398    /// use google_cloud_dataform_v1::model::Repository;
1399    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1400    /// let x = CreateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1401    /// ```
1402    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1403    where
1404        T: std::convert::Into<crate::model::Repository>,
1405    {
1406        self.repository = v.map(|x| x.into());
1407        self
1408    }
1409
1410    /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
1411    ///
1412    /// # Example
1413    /// ```ignore,no_run
1414    /// # use google_cloud_dataform_v1::model::CreateRepositoryRequest;
1415    /// let x = CreateRepositoryRequest::new().set_repository_id("example");
1416    /// ```
1417    pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1418        self.repository_id = v.into();
1419        self
1420    }
1421}
1422
1423impl wkt::message::Message for CreateRepositoryRequest {
1424    fn typename() -> &'static str {
1425        "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
1426    }
1427}
1428
1429/// `UpdateRepository` request message.
1430#[derive(Clone, Default, PartialEq)]
1431#[non_exhaustive]
1432pub struct UpdateRepositoryRequest {
1433    /// Optional. Specifies the fields to be updated in the repository. If left
1434    /// unset, all fields will be updated.
1435    pub update_mask: std::option::Option<wkt::FieldMask>,
1436
1437    /// Required. The repository to update.
1438    pub repository: std::option::Option<crate::model::Repository>,
1439
1440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1441}
1442
1443impl UpdateRepositoryRequest {
1444    /// Creates a new default instance.
1445    pub fn new() -> Self {
1446        std::default::Default::default()
1447    }
1448
1449    /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1450    ///
1451    /// # Example
1452    /// ```ignore,no_run
1453    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1454    /// use wkt::FieldMask;
1455    /// let x = UpdateRepositoryRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1456    /// ```
1457    pub fn set_update_mask<T>(mut self, v: T) -> Self
1458    where
1459        T: std::convert::Into<wkt::FieldMask>,
1460    {
1461        self.update_mask = std::option::Option::Some(v.into());
1462        self
1463    }
1464
1465    /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
1466    ///
1467    /// # Example
1468    /// ```ignore,no_run
1469    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1470    /// use wkt::FieldMask;
1471    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1472    /// let x = UpdateRepositoryRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1473    /// ```
1474    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1475    where
1476        T: std::convert::Into<wkt::FieldMask>,
1477    {
1478        self.update_mask = v.map(|x| x.into());
1479        self
1480    }
1481
1482    /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1483    ///
1484    /// # Example
1485    /// ```ignore,no_run
1486    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1487    /// use google_cloud_dataform_v1::model::Repository;
1488    /// let x = UpdateRepositoryRequest::new().set_repository(Repository::default()/* use setters */);
1489    /// ```
1490    pub fn set_repository<T>(mut self, v: T) -> Self
1491    where
1492        T: std::convert::Into<crate::model::Repository>,
1493    {
1494        self.repository = std::option::Option::Some(v.into());
1495        self
1496    }
1497
1498    /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
1499    ///
1500    /// # Example
1501    /// ```ignore,no_run
1502    /// # use google_cloud_dataform_v1::model::UpdateRepositoryRequest;
1503    /// use google_cloud_dataform_v1::model::Repository;
1504    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(Some(Repository::default()/* use setters */));
1505    /// let x = UpdateRepositoryRequest::new().set_or_clear_repository(None::<Repository>);
1506    /// ```
1507    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
1508    where
1509        T: std::convert::Into<crate::model::Repository>,
1510    {
1511        self.repository = v.map(|x| x.into());
1512        self
1513    }
1514}
1515
1516impl wkt::message::Message for UpdateRepositoryRequest {
1517    fn typename() -> &'static str {
1518        "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
1519    }
1520}
1521
1522/// `DeleteRepository` request message.
1523#[derive(Clone, Default, PartialEq)]
1524#[non_exhaustive]
1525pub struct DeleteRepositoryRequest {
1526    /// Required. The repository's name.
1527    pub name: std::string::String,
1528
1529    /// Optional. If set to true, child resources of this repository (compilation
1530    /// results and workflow invocations) will also be deleted. Otherwise, the
1531    /// request will only succeed if the repository has no child resources.
1532    ///
1533    /// **Note:** *This flag doesn't support deletion of workspaces, release
1534    /// configs or workflow configs. If any of such resources exists in the
1535    /// repository, the request will fail.*.
1536    pub force: bool,
1537
1538    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1539}
1540
1541impl DeleteRepositoryRequest {
1542    /// Creates a new default instance.
1543    pub fn new() -> Self {
1544        std::default::Default::default()
1545    }
1546
1547    /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
1548    ///
1549    /// # Example
1550    /// ```ignore,no_run
1551    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1552    /// # let project_id = "project_id";
1553    /// # let location_id = "location_id";
1554    /// # let repository_id = "repository_id";
1555    /// let x = DeleteRepositoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1556    /// ```
1557    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1558        self.name = v.into();
1559        self
1560    }
1561
1562    /// Sets the value of [force][crate::model::DeleteRepositoryRequest::force].
1563    ///
1564    /// # Example
1565    /// ```ignore,no_run
1566    /// # use google_cloud_dataform_v1::model::DeleteRepositoryRequest;
1567    /// let x = DeleteRepositoryRequest::new().set_force(true);
1568    /// ```
1569    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1570        self.force = v.into();
1571        self
1572    }
1573}
1574
1575impl wkt::message::Message for DeleteRepositoryRequest {
1576    fn typename() -> &'static str {
1577        "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
1578    }
1579}
1580
1581/// `CommitRepositoryChanges` request message.
1582#[derive(Clone, Default, PartialEq)]
1583#[non_exhaustive]
1584pub struct CommitRepositoryChangesRequest {
1585    /// Required. The repository's name.
1586    pub name: std::string::String,
1587
1588    /// Required. The changes to commit to the repository.
1589    pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
1590
1591    /// Optional. The commit SHA which must be the repository's current HEAD before
1592    /// applying this commit; otherwise this request will fail. If unset, no
1593    /// validation on the current HEAD commit SHA is performed.
1594    pub required_head_commit_sha: std::string::String,
1595
1596    /// Optional. A map to the path of the file to the operation. The path is the
1597    /// full file path including filename, from repository root.
1598    pub file_operations: std::collections::HashMap<
1599        std::string::String,
1600        crate::model::commit_repository_changes_request::FileOperation,
1601    >,
1602
1603    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1604}
1605
1606impl CommitRepositoryChangesRequest {
1607    /// Creates a new default instance.
1608    pub fn new() -> Self {
1609        std::default::Default::default()
1610    }
1611
1612    /// Sets the value of [name][crate::model::CommitRepositoryChangesRequest::name].
1613    ///
1614    /// # Example
1615    /// ```ignore,no_run
1616    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1617    /// # let project_id = "project_id";
1618    /// # let location_id = "location_id";
1619    /// # let repository_id = "repository_id";
1620    /// let x = CommitRepositoryChangesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
1621    /// ```
1622    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1623        self.name = v.into();
1624        self
1625    }
1626
1627    /// Sets the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1628    ///
1629    /// # Example
1630    /// ```ignore,no_run
1631    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1632    /// use google_cloud_dataform_v1::model::CommitMetadata;
1633    /// let x = CommitRepositoryChangesRequest::new().set_commit_metadata(CommitMetadata::default()/* use setters */);
1634    /// ```
1635    pub fn set_commit_metadata<T>(mut self, v: T) -> Self
1636    where
1637        T: std::convert::Into<crate::model::CommitMetadata>,
1638    {
1639        self.commit_metadata = std::option::Option::Some(v.into());
1640        self
1641    }
1642
1643    /// Sets or clears the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1644    ///
1645    /// # Example
1646    /// ```ignore,no_run
1647    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1648    /// use google_cloud_dataform_v1::model::CommitMetadata;
1649    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(Some(CommitMetadata::default()/* use setters */));
1650    /// let x = CommitRepositoryChangesRequest::new().set_or_clear_commit_metadata(None::<CommitMetadata>);
1651    /// ```
1652    pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
1653    where
1654        T: std::convert::Into<crate::model::CommitMetadata>,
1655    {
1656        self.commit_metadata = v.map(|x| x.into());
1657        self
1658    }
1659
1660    /// Sets the value of [required_head_commit_sha][crate::model::CommitRepositoryChangesRequest::required_head_commit_sha].
1661    ///
1662    /// # Example
1663    /// ```ignore,no_run
1664    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1665    /// let x = CommitRepositoryChangesRequest::new().set_required_head_commit_sha("example");
1666    /// ```
1667    pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
1668        mut self,
1669        v: T,
1670    ) -> Self {
1671        self.required_head_commit_sha = v.into();
1672        self
1673    }
1674
1675    /// Sets the value of [file_operations][crate::model::CommitRepositoryChangesRequest::file_operations].
1676    ///
1677    /// # Example
1678    /// ```ignore,no_run
1679    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesRequest;
1680    /// use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1681    /// let x = CommitRepositoryChangesRequest::new().set_file_operations([
1682    ///     ("key0", FileOperation::default()/* use setters */),
1683    ///     ("key1", FileOperation::default()/* use (different) setters */),
1684    /// ]);
1685    /// ```
1686    pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
1687    where
1688        T: std::iter::IntoIterator<Item = (K, V)>,
1689        K: std::convert::Into<std::string::String>,
1690        V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
1691    {
1692        use std::iter::Iterator;
1693        self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1694        self
1695    }
1696}
1697
1698impl wkt::message::Message for CommitRepositoryChangesRequest {
1699    fn typename() -> &'static str {
1700        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
1701    }
1702}
1703
1704/// Defines additional types related to [CommitRepositoryChangesRequest].
1705pub mod commit_repository_changes_request {
1706    #[allow(unused_imports)]
1707    use super::*;
1708
1709    /// Represents a single file operation to the repository.
1710    #[derive(Clone, Default, PartialEq)]
1711    #[non_exhaustive]
1712    pub struct FileOperation {
1713        /// The operation to perform on the file.
1714        pub operation: std::option::Option<
1715            crate::model::commit_repository_changes_request::file_operation::Operation,
1716        >,
1717
1718        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1719    }
1720
1721    impl FileOperation {
1722        /// Creates a new default instance.
1723        pub fn new() -> Self {
1724            std::default::Default::default()
1725        }
1726
1727        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation].
1728        ///
1729        /// Note that all the setters affecting `operation` are mutually
1730        /// exclusive.
1731        ///
1732        /// # Example
1733        /// ```ignore,no_run
1734        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1735        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1736        /// let x = FileOperation::new().set_operation(Some(
1737        ///     google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::Operation::WriteFile(WriteFile::default().into())));
1738        /// ```
1739        pub fn set_operation<
1740            T: std::convert::Into<
1741                    std::option::Option<
1742                        crate::model::commit_repository_changes_request::file_operation::Operation,
1743                    >,
1744                >,
1745        >(
1746            mut self,
1747            v: T,
1748        ) -> Self {
1749            self.operation = v.into();
1750            self
1751        }
1752
1753        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1754        /// if it holds a `WriteFile`, `None` if the field is not set or
1755        /// holds a different branch.
1756        pub fn write_file(
1757            &self,
1758        ) -> std::option::Option<
1759            &std::boxed::Box<
1760                crate::model::commit_repository_changes_request::file_operation::WriteFile,
1761            >,
1762        > {
1763            #[allow(unreachable_patterns)]
1764            self.operation.as_ref().and_then(|v| match v {
1765                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
1766                _ => std::option::Option::None,
1767            })
1768        }
1769
1770        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1771        /// to hold a `WriteFile`.
1772        ///
1773        /// Note that all the setters affecting `operation` are
1774        /// mutually exclusive.
1775        ///
1776        /// # Example
1777        /// ```ignore,no_run
1778        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1779        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1780        /// let x = FileOperation::new().set_write_file(WriteFile::default()/* use setters */);
1781        /// assert!(x.write_file().is_some());
1782        /// assert!(x.delete_file().is_none());
1783        /// ```
1784        pub fn set_write_file<
1785            T: std::convert::Into<
1786                    std::boxed::Box<
1787                        crate::model::commit_repository_changes_request::file_operation::WriteFile,
1788                    >,
1789                >,
1790        >(
1791            mut self,
1792            v: T,
1793        ) -> Self {
1794            self.operation = std::option::Option::Some(
1795                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
1796                    v.into()
1797                )
1798            );
1799            self
1800        }
1801
1802        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1803        /// if it holds a `DeleteFile`, `None` if the field is not set or
1804        /// holds a different branch.
1805        pub fn delete_file(
1806            &self,
1807        ) -> std::option::Option<
1808            &std::boxed::Box<
1809                crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1810            >,
1811        > {
1812            #[allow(unreachable_patterns)]
1813            self.operation.as_ref().and_then(|v| match v {
1814                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
1815                _ => std::option::Option::None,
1816            })
1817        }
1818
1819        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1820        /// to hold a `DeleteFile`.
1821        ///
1822        /// Note that all the setters affecting `operation` are
1823        /// mutually exclusive.
1824        ///
1825        /// # Example
1826        /// ```ignore,no_run
1827        /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::FileOperation;
1828        /// use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::DeleteFile;
1829        /// let x = FileOperation::new().set_delete_file(DeleteFile::default()/* use setters */);
1830        /// assert!(x.delete_file().is_some());
1831        /// assert!(x.write_file().is_none());
1832        /// ```
1833        pub fn set_delete_file<
1834            T: std::convert::Into<
1835                    std::boxed::Box<
1836                        crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1837                    >,
1838                >,
1839        >(
1840            mut self,
1841            v: T,
1842        ) -> Self {
1843            self.operation = std::option::Option::Some(
1844                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
1845                    v.into()
1846                )
1847            );
1848            self
1849        }
1850    }
1851
1852    impl wkt::message::Message for FileOperation {
1853        fn typename() -> &'static str {
1854            "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
1855        }
1856    }
1857
1858    /// Defines additional types related to [FileOperation].
1859    pub mod file_operation {
1860        #[allow(unused_imports)]
1861        use super::*;
1862
1863        /// Represents the write file operation (for files added or modified).
1864        #[derive(Clone, Default, PartialEq)]
1865        #[non_exhaustive]
1866        pub struct WriteFile {
1867            /// The file's contents.
1868            pub contents: ::bytes::Bytes,
1869
1870            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1871        }
1872
1873        impl WriteFile {
1874            /// Creates a new default instance.
1875            pub fn new() -> Self {
1876                std::default::Default::default()
1877            }
1878
1879            /// Sets the value of [contents][crate::model::commit_repository_changes_request::file_operation::WriteFile::contents].
1880            ///
1881            /// # Example
1882            /// ```ignore,no_run
1883            /// # use google_cloud_dataform_v1::model::commit_repository_changes_request::file_operation::WriteFile;
1884            /// let x = WriteFile::new().set_contents(bytes::Bytes::from_static(b"example"));
1885            /// ```
1886            pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1887                self.contents = v.into();
1888                self
1889            }
1890        }
1891
1892        impl wkt::message::Message for WriteFile {
1893            fn typename() -> &'static str {
1894                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
1895            }
1896        }
1897
1898        /// Represents the delete file operation.
1899        #[derive(Clone, Default, PartialEq)]
1900        #[non_exhaustive]
1901        pub struct DeleteFile {
1902            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1903        }
1904
1905        impl DeleteFile {
1906            /// Creates a new default instance.
1907            pub fn new() -> Self {
1908                std::default::Default::default()
1909            }
1910        }
1911
1912        impl wkt::message::Message for DeleteFile {
1913            fn typename() -> &'static str {
1914                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
1915            }
1916        }
1917
1918        /// The operation to perform on the file.
1919        #[derive(Clone, Debug, PartialEq)]
1920        #[non_exhaustive]
1921        pub enum Operation {
1922            /// Represents the write operation.
1923            WriteFile(
1924                std::boxed::Box<
1925                    crate::model::commit_repository_changes_request::file_operation::WriteFile,
1926                >,
1927            ),
1928            /// Represents the delete operation.
1929            DeleteFile(
1930                std::boxed::Box<
1931                    crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1932                >,
1933            ),
1934        }
1935    }
1936}
1937
1938/// `CommitRepositoryChanges` response message.
1939#[derive(Clone, Default, PartialEq)]
1940#[non_exhaustive]
1941pub struct CommitRepositoryChangesResponse {
1942    /// The commit SHA of the current commit.
1943    pub commit_sha: std::string::String,
1944
1945    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1946}
1947
1948impl CommitRepositoryChangesResponse {
1949    /// Creates a new default instance.
1950    pub fn new() -> Self {
1951        std::default::Default::default()
1952    }
1953
1954    /// Sets the value of [commit_sha][crate::model::CommitRepositoryChangesResponse::commit_sha].
1955    ///
1956    /// # Example
1957    /// ```ignore,no_run
1958    /// # use google_cloud_dataform_v1::model::CommitRepositoryChangesResponse;
1959    /// let x = CommitRepositoryChangesResponse::new().set_commit_sha("example");
1960    /// ```
1961    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1962        self.commit_sha = v.into();
1963        self
1964    }
1965}
1966
1967impl wkt::message::Message for CommitRepositoryChangesResponse {
1968    fn typename() -> &'static str {
1969        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
1970    }
1971}
1972
1973/// `ReadRepositoryFile` request message.
1974#[derive(Clone, Default, PartialEq)]
1975#[non_exhaustive]
1976pub struct ReadRepositoryFileRequest {
1977    /// Required. The repository's name.
1978    pub name: std::string::String,
1979
1980    /// Optional. The commit SHA for the commit to read from. If unset, the file
1981    /// will be read from HEAD.
1982    pub commit_sha: std::string::String,
1983
1984    /// Required. Full file path to read including filename, from repository root.
1985    pub path: std::string::String,
1986
1987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1988}
1989
1990impl ReadRepositoryFileRequest {
1991    /// Creates a new default instance.
1992    pub fn new() -> Self {
1993        std::default::Default::default()
1994    }
1995
1996    /// Sets the value of [name][crate::model::ReadRepositoryFileRequest::name].
1997    ///
1998    /// # Example
1999    /// ```ignore,no_run
2000    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
2001    /// # let project_id = "project_id";
2002    /// # let location_id = "location_id";
2003    /// # let repository_id = "repository_id";
2004    /// let x = ReadRepositoryFileRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2005    /// ```
2006    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2007        self.name = v.into();
2008        self
2009    }
2010
2011    /// Sets the value of [commit_sha][crate::model::ReadRepositoryFileRequest::commit_sha].
2012    ///
2013    /// # Example
2014    /// ```ignore,no_run
2015    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
2016    /// let x = ReadRepositoryFileRequest::new().set_commit_sha("example");
2017    /// ```
2018    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2019        self.commit_sha = v.into();
2020        self
2021    }
2022
2023    /// Sets the value of [path][crate::model::ReadRepositoryFileRequest::path].
2024    ///
2025    /// # Example
2026    /// ```ignore,no_run
2027    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileRequest;
2028    /// let x = ReadRepositoryFileRequest::new().set_path("example");
2029    /// ```
2030    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2031        self.path = v.into();
2032        self
2033    }
2034}
2035
2036impl wkt::message::Message for ReadRepositoryFileRequest {
2037    fn typename() -> &'static str {
2038        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
2039    }
2040}
2041
2042/// `ReadRepositoryFile` response message.
2043#[derive(Clone, Default, PartialEq)]
2044#[non_exhaustive]
2045pub struct ReadRepositoryFileResponse {
2046    /// The file's contents.
2047    pub contents: ::bytes::Bytes,
2048
2049    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2050}
2051
2052impl ReadRepositoryFileResponse {
2053    /// Creates a new default instance.
2054    pub fn new() -> Self {
2055        std::default::Default::default()
2056    }
2057
2058    /// Sets the value of [contents][crate::model::ReadRepositoryFileResponse::contents].
2059    ///
2060    /// # Example
2061    /// ```ignore,no_run
2062    /// # use google_cloud_dataform_v1::model::ReadRepositoryFileResponse;
2063    /// let x = ReadRepositoryFileResponse::new().set_contents(bytes::Bytes::from_static(b"example"));
2064    /// ```
2065    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
2066        self.contents = v.into();
2067        self
2068    }
2069}
2070
2071impl wkt::message::Message for ReadRepositoryFileResponse {
2072    fn typename() -> &'static str {
2073        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
2074    }
2075}
2076
2077/// `QueryRepositoryDirectoryContents` request message.
2078#[derive(Clone, Default, PartialEq)]
2079#[non_exhaustive]
2080pub struct QueryRepositoryDirectoryContentsRequest {
2081    /// Required. The repository's name.
2082    pub name: std::string::String,
2083
2084    /// Optional. The Commit SHA for the commit to query from. If unset, the
2085    /// directory will be queried from HEAD.
2086    pub commit_sha: std::string::String,
2087
2088    /// Optional. The directory's full path including directory name, relative to
2089    /// root. If left unset, the root is used.
2090    pub path: std::string::String,
2091
2092    /// Optional. Maximum number of paths to return. The server may return fewer
2093    /// items than requested. If unspecified, the server will pick an appropriate
2094    /// default.
2095    pub page_size: i32,
2096
2097    /// Optional. Page token received from a previous
2098    /// `QueryRepositoryDirectoryContents` call. Provide this to retrieve the
2099    /// subsequent page.
2100    ///
2101    /// When paginating, all other parameters provided to
2102    /// `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must
2103    /// match the call that provided the page token.
2104    pub page_token: std::string::String,
2105
2106    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2107}
2108
2109impl QueryRepositoryDirectoryContentsRequest {
2110    /// Creates a new default instance.
2111    pub fn new() -> Self {
2112        std::default::Default::default()
2113    }
2114
2115    /// Sets the value of [name][crate::model::QueryRepositoryDirectoryContentsRequest::name].
2116    ///
2117    /// # Example
2118    /// ```ignore,no_run
2119    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2120    /// # let project_id = "project_id";
2121    /// # let location_id = "location_id";
2122    /// # let repository_id = "repository_id";
2123    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2124    /// ```
2125    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2126        self.name = v.into();
2127        self
2128    }
2129
2130    /// Sets the value of [commit_sha][crate::model::QueryRepositoryDirectoryContentsRequest::commit_sha].
2131    ///
2132    /// # Example
2133    /// ```ignore,no_run
2134    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2135    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_commit_sha("example");
2136    /// ```
2137    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2138        self.commit_sha = v.into();
2139        self
2140    }
2141
2142    /// Sets the value of [path][crate::model::QueryRepositoryDirectoryContentsRequest::path].
2143    ///
2144    /// # Example
2145    /// ```ignore,no_run
2146    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2147    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_path("example");
2148    /// ```
2149    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2150        self.path = v.into();
2151        self
2152    }
2153
2154    /// Sets the value of [page_size][crate::model::QueryRepositoryDirectoryContentsRequest::page_size].
2155    ///
2156    /// # Example
2157    /// ```ignore,no_run
2158    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2159    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_size(42);
2160    /// ```
2161    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2162        self.page_size = v.into();
2163        self
2164    }
2165
2166    /// Sets the value of [page_token][crate::model::QueryRepositoryDirectoryContentsRequest::page_token].
2167    ///
2168    /// # Example
2169    /// ```ignore,no_run
2170    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsRequest;
2171    /// let x = QueryRepositoryDirectoryContentsRequest::new().set_page_token("example");
2172    /// ```
2173    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2174        self.page_token = v.into();
2175        self
2176    }
2177}
2178
2179impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
2180    fn typename() -> &'static str {
2181        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
2182    }
2183}
2184
2185/// `QueryRepositoryDirectoryContents` response message.
2186#[derive(Clone, Default, PartialEq)]
2187#[non_exhaustive]
2188pub struct QueryRepositoryDirectoryContentsResponse {
2189    /// List of entries in the directory.
2190    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
2191
2192    /// A token, which can be sent as `page_token` to retrieve the next page.
2193    /// If this field is omitted, there are no subsequent pages.
2194    pub next_page_token: std::string::String,
2195
2196    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2197}
2198
2199impl QueryRepositoryDirectoryContentsResponse {
2200    /// Creates a new default instance.
2201    pub fn new() -> Self {
2202        std::default::Default::default()
2203    }
2204
2205    /// Sets the value of [directory_entries][crate::model::QueryRepositoryDirectoryContentsResponse::directory_entries].
2206    ///
2207    /// # Example
2208    /// ```ignore,no_run
2209    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
2210    /// use google_cloud_dataform_v1::model::DirectoryEntry;
2211    /// let x = QueryRepositoryDirectoryContentsResponse::new()
2212    ///     .set_directory_entries([
2213    ///         DirectoryEntry::default()/* use setters */,
2214    ///         DirectoryEntry::default()/* use (different) setters */,
2215    ///     ]);
2216    /// ```
2217    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
2218    where
2219        T: std::iter::IntoIterator<Item = V>,
2220        V: std::convert::Into<crate::model::DirectoryEntry>,
2221    {
2222        use std::iter::Iterator;
2223        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
2224        self
2225    }
2226
2227    /// Sets the value of [next_page_token][crate::model::QueryRepositoryDirectoryContentsResponse::next_page_token].
2228    ///
2229    /// # Example
2230    /// ```ignore,no_run
2231    /// # use google_cloud_dataform_v1::model::QueryRepositoryDirectoryContentsResponse;
2232    /// let x = QueryRepositoryDirectoryContentsResponse::new().set_next_page_token("example");
2233    /// ```
2234    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2235        self.next_page_token = v.into();
2236        self
2237    }
2238}
2239
2240impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
2241    fn typename() -> &'static str {
2242        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
2243    }
2244}
2245
2246#[doc(hidden)]
2247impl google_cloud_gax::paginator::internal::PageableResponse
2248    for QueryRepositoryDirectoryContentsResponse
2249{
2250    type PageItem = crate::model::DirectoryEntry;
2251
2252    fn items(self) -> std::vec::Vec<Self::PageItem> {
2253        self.directory_entries
2254    }
2255
2256    fn next_page_token(&self) -> std::string::String {
2257        use std::clone::Clone;
2258        self.next_page_token.clone()
2259    }
2260}
2261
2262/// `FetchRepositoryHistory` request message.
2263#[derive(Clone, Default, PartialEq)]
2264#[non_exhaustive]
2265pub struct FetchRepositoryHistoryRequest {
2266    /// Required. The repository's name.
2267    pub name: std::string::String,
2268
2269    /// Optional. Maximum number of commits to return. The server may return fewer
2270    /// items than requested. If unspecified, the server will pick an appropriate
2271    /// default.
2272    pub page_size: i32,
2273
2274    /// Optional. Page token received from a previous `FetchRepositoryHistory`
2275    /// call. Provide this to retrieve the subsequent page.
2276    ///
2277    /// When paginating, all other parameters provided to `FetchRepositoryHistory`,
2278    /// with the exception of `page_size`, must match the call that provided the
2279    /// page token.
2280    pub page_token: std::string::String,
2281
2282    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2283}
2284
2285impl FetchRepositoryHistoryRequest {
2286    /// Creates a new default instance.
2287    pub fn new() -> Self {
2288        std::default::Default::default()
2289    }
2290
2291    /// Sets the value of [name][crate::model::FetchRepositoryHistoryRequest::name].
2292    ///
2293    /// # Example
2294    /// ```ignore,no_run
2295    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2296    /// # let project_id = "project_id";
2297    /// # let location_id = "location_id";
2298    /// # let repository_id = "repository_id";
2299    /// let x = FetchRepositoryHistoryRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2300    /// ```
2301    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2302        self.name = v.into();
2303        self
2304    }
2305
2306    /// Sets the value of [page_size][crate::model::FetchRepositoryHistoryRequest::page_size].
2307    ///
2308    /// # Example
2309    /// ```ignore,no_run
2310    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2311    /// let x = FetchRepositoryHistoryRequest::new().set_page_size(42);
2312    /// ```
2313    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2314        self.page_size = v.into();
2315        self
2316    }
2317
2318    /// Sets the value of [page_token][crate::model::FetchRepositoryHistoryRequest::page_token].
2319    ///
2320    /// # Example
2321    /// ```ignore,no_run
2322    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryRequest;
2323    /// let x = FetchRepositoryHistoryRequest::new().set_page_token("example");
2324    /// ```
2325    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2326        self.page_token = v.into();
2327        self
2328    }
2329}
2330
2331impl wkt::message::Message for FetchRepositoryHistoryRequest {
2332    fn typename() -> &'static str {
2333        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
2334    }
2335}
2336
2337/// `FetchRepositoryHistory` response message.
2338#[derive(Clone, Default, PartialEq)]
2339#[non_exhaustive]
2340pub struct FetchRepositoryHistoryResponse {
2341    /// A list of commit logs, ordered by 'git log' default order.
2342    pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
2343
2344    /// A token, which can be sent as `page_token` to retrieve the next page.
2345    /// If this field is omitted, there are no subsequent pages.
2346    pub next_page_token: std::string::String,
2347
2348    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2349}
2350
2351impl FetchRepositoryHistoryResponse {
2352    /// Creates a new default instance.
2353    pub fn new() -> Self {
2354        std::default::Default::default()
2355    }
2356
2357    /// Sets the value of [commits][crate::model::FetchRepositoryHistoryResponse::commits].
2358    ///
2359    /// # Example
2360    /// ```ignore,no_run
2361    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2362    /// use google_cloud_dataform_v1::model::CommitLogEntry;
2363    /// let x = FetchRepositoryHistoryResponse::new()
2364    ///     .set_commits([
2365    ///         CommitLogEntry::default()/* use setters */,
2366    ///         CommitLogEntry::default()/* use (different) setters */,
2367    ///     ]);
2368    /// ```
2369    pub fn set_commits<T, V>(mut self, v: T) -> Self
2370    where
2371        T: std::iter::IntoIterator<Item = V>,
2372        V: std::convert::Into<crate::model::CommitLogEntry>,
2373    {
2374        use std::iter::Iterator;
2375        self.commits = v.into_iter().map(|i| i.into()).collect();
2376        self
2377    }
2378
2379    /// Sets the value of [next_page_token][crate::model::FetchRepositoryHistoryResponse::next_page_token].
2380    ///
2381    /// # Example
2382    /// ```ignore,no_run
2383    /// # use google_cloud_dataform_v1::model::FetchRepositoryHistoryResponse;
2384    /// let x = FetchRepositoryHistoryResponse::new().set_next_page_token("example");
2385    /// ```
2386    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2387        self.next_page_token = v.into();
2388        self
2389    }
2390}
2391
2392impl wkt::message::Message for FetchRepositoryHistoryResponse {
2393    fn typename() -> &'static str {
2394        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
2395    }
2396}
2397
2398#[doc(hidden)]
2399impl google_cloud_gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
2400    type PageItem = crate::model::CommitLogEntry;
2401
2402    fn items(self) -> std::vec::Vec<Self::PageItem> {
2403        self.commits
2404    }
2405
2406    fn next_page_token(&self) -> std::string::String {
2407        use std::clone::Clone;
2408        self.next_page_token.clone()
2409    }
2410}
2411
2412/// Represents a single commit log.
2413#[derive(Clone, Default, PartialEq)]
2414#[non_exhaustive]
2415pub struct CommitLogEntry {
2416    /// Commit timestamp.
2417    pub commit_time: std::option::Option<wkt::Timestamp>,
2418
2419    /// The commit SHA for this commit log entry.
2420    pub commit_sha: std::string::String,
2421
2422    /// The commit author for this commit log entry.
2423    pub author: std::option::Option<crate::model::CommitAuthor>,
2424
2425    /// The commit message for this commit log entry.
2426    pub commit_message: std::string::String,
2427
2428    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2429}
2430
2431impl CommitLogEntry {
2432    /// Creates a new default instance.
2433    pub fn new() -> Self {
2434        std::default::Default::default()
2435    }
2436
2437    /// Sets the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2438    ///
2439    /// # Example
2440    /// ```ignore,no_run
2441    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2442    /// use wkt::Timestamp;
2443    /// let x = CommitLogEntry::new().set_commit_time(Timestamp::default()/* use setters */);
2444    /// ```
2445    pub fn set_commit_time<T>(mut self, v: T) -> Self
2446    where
2447        T: std::convert::Into<wkt::Timestamp>,
2448    {
2449        self.commit_time = std::option::Option::Some(v.into());
2450        self
2451    }
2452
2453    /// Sets or clears the value of [commit_time][crate::model::CommitLogEntry::commit_time].
2454    ///
2455    /// # Example
2456    /// ```ignore,no_run
2457    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2458    /// use wkt::Timestamp;
2459    /// let x = CommitLogEntry::new().set_or_clear_commit_time(Some(Timestamp::default()/* use setters */));
2460    /// let x = CommitLogEntry::new().set_or_clear_commit_time(None::<Timestamp>);
2461    /// ```
2462    pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
2463    where
2464        T: std::convert::Into<wkt::Timestamp>,
2465    {
2466        self.commit_time = v.map(|x| x.into());
2467        self
2468    }
2469
2470    /// Sets the value of [commit_sha][crate::model::CommitLogEntry::commit_sha].
2471    ///
2472    /// # Example
2473    /// ```ignore,no_run
2474    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2475    /// let x = CommitLogEntry::new().set_commit_sha("example");
2476    /// ```
2477    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2478        self.commit_sha = v.into();
2479        self
2480    }
2481
2482    /// Sets the value of [author][crate::model::CommitLogEntry::author].
2483    ///
2484    /// # Example
2485    /// ```ignore,no_run
2486    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2487    /// use google_cloud_dataform_v1::model::CommitAuthor;
2488    /// let x = CommitLogEntry::new().set_author(CommitAuthor::default()/* use setters */);
2489    /// ```
2490    pub fn set_author<T>(mut self, v: T) -> Self
2491    where
2492        T: std::convert::Into<crate::model::CommitAuthor>,
2493    {
2494        self.author = std::option::Option::Some(v.into());
2495        self
2496    }
2497
2498    /// Sets or clears the value of [author][crate::model::CommitLogEntry::author].
2499    ///
2500    /// # Example
2501    /// ```ignore,no_run
2502    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2503    /// use google_cloud_dataform_v1::model::CommitAuthor;
2504    /// let x = CommitLogEntry::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2505    /// let x = CommitLogEntry::new().set_or_clear_author(None::<CommitAuthor>);
2506    /// ```
2507    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2508    where
2509        T: std::convert::Into<crate::model::CommitAuthor>,
2510    {
2511        self.author = v.map(|x| x.into());
2512        self
2513    }
2514
2515    /// Sets the value of [commit_message][crate::model::CommitLogEntry::commit_message].
2516    ///
2517    /// # Example
2518    /// ```ignore,no_run
2519    /// # use google_cloud_dataform_v1::model::CommitLogEntry;
2520    /// let x = CommitLogEntry::new().set_commit_message("example");
2521    /// ```
2522    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2523        self.commit_message = v.into();
2524        self
2525    }
2526}
2527
2528impl wkt::message::Message for CommitLogEntry {
2529    fn typename() -> &'static str {
2530        "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
2531    }
2532}
2533
2534/// Represents a Dataform Git commit.
2535#[derive(Clone, Default, PartialEq)]
2536#[non_exhaustive]
2537pub struct CommitMetadata {
2538    /// Required. The commit's author.
2539    pub author: std::option::Option<crate::model::CommitAuthor>,
2540
2541    /// Optional. The commit's message.
2542    pub commit_message: std::string::String,
2543
2544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2545}
2546
2547impl CommitMetadata {
2548    /// Creates a new default instance.
2549    pub fn new() -> Self {
2550        std::default::Default::default()
2551    }
2552
2553    /// Sets the value of [author][crate::model::CommitMetadata::author].
2554    ///
2555    /// # Example
2556    /// ```ignore,no_run
2557    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2558    /// use google_cloud_dataform_v1::model::CommitAuthor;
2559    /// let x = CommitMetadata::new().set_author(CommitAuthor::default()/* use setters */);
2560    /// ```
2561    pub fn set_author<T>(mut self, v: T) -> Self
2562    where
2563        T: std::convert::Into<crate::model::CommitAuthor>,
2564    {
2565        self.author = std::option::Option::Some(v.into());
2566        self
2567    }
2568
2569    /// Sets or clears the value of [author][crate::model::CommitMetadata::author].
2570    ///
2571    /// # Example
2572    /// ```ignore,no_run
2573    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2574    /// use google_cloud_dataform_v1::model::CommitAuthor;
2575    /// let x = CommitMetadata::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
2576    /// let x = CommitMetadata::new().set_or_clear_author(None::<CommitAuthor>);
2577    /// ```
2578    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2579    where
2580        T: std::convert::Into<crate::model::CommitAuthor>,
2581    {
2582        self.author = v.map(|x| x.into());
2583        self
2584    }
2585
2586    /// Sets the value of [commit_message][crate::model::CommitMetadata::commit_message].
2587    ///
2588    /// # Example
2589    /// ```ignore,no_run
2590    /// # use google_cloud_dataform_v1::model::CommitMetadata;
2591    /// let x = CommitMetadata::new().set_commit_message("example");
2592    /// ```
2593    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2594        self.commit_message = v.into();
2595        self
2596    }
2597}
2598
2599impl wkt::message::Message for CommitMetadata {
2600    fn typename() -> &'static str {
2601        "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
2602    }
2603}
2604
2605/// `ComputeRepositoryAccessTokenStatus` request message.
2606#[derive(Clone, Default, PartialEq)]
2607#[non_exhaustive]
2608pub struct ComputeRepositoryAccessTokenStatusRequest {
2609    /// Required. The repository's name.
2610    pub name: std::string::String,
2611
2612    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2613}
2614
2615impl ComputeRepositoryAccessTokenStatusRequest {
2616    /// Creates a new default instance.
2617    pub fn new() -> Self {
2618        std::default::Default::default()
2619    }
2620
2621    /// Sets the value of [name][crate::model::ComputeRepositoryAccessTokenStatusRequest::name].
2622    ///
2623    /// # Example
2624    /// ```ignore,no_run
2625    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusRequest;
2626    /// # let project_id = "project_id";
2627    /// # let location_id = "location_id";
2628    /// # let repository_id = "repository_id";
2629    /// let x = ComputeRepositoryAccessTokenStatusRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2630    /// ```
2631    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2632        self.name = v.into();
2633        self
2634    }
2635}
2636
2637impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
2638    fn typename() -> &'static str {
2639        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
2640    }
2641}
2642
2643/// `ComputeRepositoryAccessTokenStatus` response message.
2644#[derive(Clone, Default, PartialEq)]
2645#[non_exhaustive]
2646pub struct ComputeRepositoryAccessTokenStatusResponse {
2647    /// Indicates the status of the Git access token.
2648    pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
2649
2650    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2651}
2652
2653impl ComputeRepositoryAccessTokenStatusResponse {
2654    /// Creates a new default instance.
2655    pub fn new() -> Self {
2656        std::default::Default::default()
2657    }
2658
2659    /// Sets the value of [token_status][crate::model::ComputeRepositoryAccessTokenStatusResponse::token_status].
2660    ///
2661    /// # Example
2662    /// ```ignore,no_run
2663    /// # use google_cloud_dataform_v1::model::ComputeRepositoryAccessTokenStatusResponse;
2664    /// use google_cloud_dataform_v1::model::compute_repository_access_token_status_response::TokenStatus;
2665    /// let x0 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::NotFound);
2666    /// let x1 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Invalid);
2667    /// let x2 = ComputeRepositoryAccessTokenStatusResponse::new().set_token_status(TokenStatus::Valid);
2668    /// ```
2669    pub fn set_token_status<
2670        T: std::convert::Into<
2671                crate::model::compute_repository_access_token_status_response::TokenStatus,
2672            >,
2673    >(
2674        mut self,
2675        v: T,
2676    ) -> Self {
2677        self.token_status = v.into();
2678        self
2679    }
2680}
2681
2682impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
2683    fn typename() -> &'static str {
2684        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
2685    }
2686}
2687
2688/// Defines additional types related to [ComputeRepositoryAccessTokenStatusResponse].
2689pub mod compute_repository_access_token_status_response {
2690    #[allow(unused_imports)]
2691    use super::*;
2692
2693    /// Indicates the status of a Git authentication token.
2694    ///
2695    /// # Working with unknown values
2696    ///
2697    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2698    /// additional enum variants at any time. Adding new variants is not considered
2699    /// a breaking change. Applications should write their code in anticipation of:
2700    ///
2701    /// - New values appearing in future releases of the client library, **and**
2702    /// - New values received dynamically, without application changes.
2703    ///
2704    /// Please consult the [Working with enums] section in the user guide for some
2705    /// guidelines.
2706    ///
2707    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2708    #[derive(Clone, Debug, PartialEq)]
2709    #[non_exhaustive]
2710    pub enum TokenStatus {
2711        /// Default value. This value is unused.
2712        Unspecified,
2713        /// The token could not be found in Secret Manager (or the Dataform
2714        /// Service Account did not have permission to access it).
2715        NotFound,
2716        /// The token could not be used to authenticate against the Git remote.
2717        Invalid,
2718        /// The token was used successfully to authenticate against the Git remote.
2719        Valid,
2720        /// The token is not accessible due to permission issues.
2721        PermissionDenied,
2722        /// If set, the enum was initialized with an unknown value.
2723        ///
2724        /// Applications can examine the value using [TokenStatus::value] or
2725        /// [TokenStatus::name].
2726        UnknownValue(token_status::UnknownValue),
2727    }
2728
2729    #[doc(hidden)]
2730    pub mod token_status {
2731        #[allow(unused_imports)]
2732        use super::*;
2733        #[derive(Clone, Debug, PartialEq)]
2734        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2735    }
2736
2737    impl TokenStatus {
2738        /// Gets the enum value.
2739        ///
2740        /// Returns `None` if the enum contains an unknown value deserialized from
2741        /// the string representation of enums.
2742        pub fn value(&self) -> std::option::Option<i32> {
2743            match self {
2744                Self::Unspecified => std::option::Option::Some(0),
2745                Self::NotFound => std::option::Option::Some(1),
2746                Self::Invalid => std::option::Option::Some(2),
2747                Self::Valid => std::option::Option::Some(3),
2748                Self::PermissionDenied => std::option::Option::Some(4),
2749                Self::UnknownValue(u) => u.0.value(),
2750            }
2751        }
2752
2753        /// Gets the enum value as a string.
2754        ///
2755        /// Returns `None` if the enum contains an unknown value deserialized from
2756        /// the integer representation of enums.
2757        pub fn name(&self) -> std::option::Option<&str> {
2758            match self {
2759                Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
2760                Self::NotFound => std::option::Option::Some("NOT_FOUND"),
2761                Self::Invalid => std::option::Option::Some("INVALID"),
2762                Self::Valid => std::option::Option::Some("VALID"),
2763                Self::PermissionDenied => std::option::Option::Some("PERMISSION_DENIED"),
2764                Self::UnknownValue(u) => u.0.name(),
2765            }
2766        }
2767    }
2768
2769    impl std::default::Default for TokenStatus {
2770        fn default() -> Self {
2771            use std::convert::From;
2772            Self::from(0)
2773        }
2774    }
2775
2776    impl std::fmt::Display for TokenStatus {
2777        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2778            wkt::internal::display_enum(f, self.name(), self.value())
2779        }
2780    }
2781
2782    impl std::convert::From<i32> for TokenStatus {
2783        fn from(value: i32) -> Self {
2784            match value {
2785                0 => Self::Unspecified,
2786                1 => Self::NotFound,
2787                2 => Self::Invalid,
2788                3 => Self::Valid,
2789                4 => Self::PermissionDenied,
2790                _ => Self::UnknownValue(token_status::UnknownValue(
2791                    wkt::internal::UnknownEnumValue::Integer(value),
2792                )),
2793            }
2794        }
2795    }
2796
2797    impl std::convert::From<&str> for TokenStatus {
2798        fn from(value: &str) -> Self {
2799            use std::string::ToString;
2800            match value {
2801                "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
2802                "NOT_FOUND" => Self::NotFound,
2803                "INVALID" => Self::Invalid,
2804                "VALID" => Self::Valid,
2805                "PERMISSION_DENIED" => Self::PermissionDenied,
2806                _ => Self::UnknownValue(token_status::UnknownValue(
2807                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2808                )),
2809            }
2810        }
2811    }
2812
2813    impl serde::ser::Serialize for TokenStatus {
2814        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2815        where
2816            S: serde::Serializer,
2817        {
2818            match self {
2819                Self::Unspecified => serializer.serialize_i32(0),
2820                Self::NotFound => serializer.serialize_i32(1),
2821                Self::Invalid => serializer.serialize_i32(2),
2822                Self::Valid => serializer.serialize_i32(3),
2823                Self::PermissionDenied => serializer.serialize_i32(4),
2824                Self::UnknownValue(u) => u.0.serialize(serializer),
2825            }
2826        }
2827    }
2828
2829    impl<'de> serde::de::Deserialize<'de> for TokenStatus {
2830        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2831        where
2832            D: serde::Deserializer<'de>,
2833        {
2834            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
2835                ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
2836            ))
2837        }
2838    }
2839}
2840
2841/// `FetchRemoteBranches` request message.
2842#[derive(Clone, Default, PartialEq)]
2843#[non_exhaustive]
2844pub struct FetchRemoteBranchesRequest {
2845    /// Required. The repository's name.
2846    pub name: std::string::String,
2847
2848    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2849}
2850
2851impl FetchRemoteBranchesRequest {
2852    /// Creates a new default instance.
2853    pub fn new() -> Self {
2854        std::default::Default::default()
2855    }
2856
2857    /// Sets the value of [name][crate::model::FetchRemoteBranchesRequest::name].
2858    ///
2859    /// # Example
2860    /// ```ignore,no_run
2861    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesRequest;
2862    /// # let project_id = "project_id";
2863    /// # let location_id = "location_id";
2864    /// # let repository_id = "repository_id";
2865    /// let x = FetchRemoteBranchesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
2866    /// ```
2867    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2868        self.name = v.into();
2869        self
2870    }
2871}
2872
2873impl wkt::message::Message for FetchRemoteBranchesRequest {
2874    fn typename() -> &'static str {
2875        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
2876    }
2877}
2878
2879/// `FetchRemoteBranches` response message.
2880#[derive(Clone, Default, PartialEq)]
2881#[non_exhaustive]
2882pub struct FetchRemoteBranchesResponse {
2883    /// The remote repository's branch names.
2884    pub branches: std::vec::Vec<std::string::String>,
2885
2886    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2887}
2888
2889impl FetchRemoteBranchesResponse {
2890    /// Creates a new default instance.
2891    pub fn new() -> Self {
2892        std::default::Default::default()
2893    }
2894
2895    /// Sets the value of [branches][crate::model::FetchRemoteBranchesResponse::branches].
2896    ///
2897    /// # Example
2898    /// ```ignore,no_run
2899    /// # use google_cloud_dataform_v1::model::FetchRemoteBranchesResponse;
2900    /// let x = FetchRemoteBranchesResponse::new().set_branches(["a", "b", "c"]);
2901    /// ```
2902    pub fn set_branches<T, V>(mut self, v: T) -> Self
2903    where
2904        T: std::iter::IntoIterator<Item = V>,
2905        V: std::convert::Into<std::string::String>,
2906    {
2907        use std::iter::Iterator;
2908        self.branches = v.into_iter().map(|i| i.into()).collect();
2909        self
2910    }
2911}
2912
2913impl wkt::message::Message for FetchRemoteBranchesResponse {
2914    fn typename() -> &'static str {
2915        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
2916    }
2917}
2918
2919/// Represents a Dataform Git workspace.
2920#[derive(Clone, Default, PartialEq)]
2921#[non_exhaustive]
2922pub struct Workspace {
2923    /// Identifier. The workspace's name.
2924    pub name: std::string::String,
2925
2926    /// Output only. The timestamp of when the workspace was created.
2927    pub create_time: std::option::Option<wkt::Timestamp>,
2928
2929    /// Output only. A data encryption state of a Git repository if this Workspace
2930    /// is protected by a KMS key.
2931    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
2932
2933    /// Output only. All the metadata information that is used internally to serve
2934    /// the resource. For example: timestamps, flags, status fields, etc. The
2935    /// format of this field is a JSON string.
2936    pub internal_metadata: std::option::Option<std::string::String>,
2937
2938    /// Optional. If set to true, workspaces will not be moved if its linked
2939    /// Repository is moved. Instead, it will be deleted.
2940    pub disable_moves: std::option::Option<bool>,
2941
2942    /// Output only. Metadata indicating whether this resource is user-scoped. For
2943    /// `Workspace` resources, the `user_scoped` field is always `true`.
2944    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
2945
2946    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2947}
2948
2949impl Workspace {
2950    /// Creates a new default instance.
2951    pub fn new() -> Self {
2952        std::default::Default::default()
2953    }
2954
2955    /// Sets the value of [name][crate::model::Workspace::name].
2956    ///
2957    /// # Example
2958    /// ```ignore,no_run
2959    /// # use google_cloud_dataform_v1::model::Workspace;
2960    /// # let project_id = "project_id";
2961    /// # let location_id = "location_id";
2962    /// # let repository_id = "repository_id";
2963    /// # let workspace_id = "workspace_id";
2964    /// let x = Workspace::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
2965    /// ```
2966    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2967        self.name = v.into();
2968        self
2969    }
2970
2971    /// Sets the value of [create_time][crate::model::Workspace::create_time].
2972    ///
2973    /// # Example
2974    /// ```ignore,no_run
2975    /// # use google_cloud_dataform_v1::model::Workspace;
2976    /// use wkt::Timestamp;
2977    /// let x = Workspace::new().set_create_time(Timestamp::default()/* use setters */);
2978    /// ```
2979    pub fn set_create_time<T>(mut self, v: T) -> Self
2980    where
2981        T: std::convert::Into<wkt::Timestamp>,
2982    {
2983        self.create_time = std::option::Option::Some(v.into());
2984        self
2985    }
2986
2987    /// Sets or clears the value of [create_time][crate::model::Workspace::create_time].
2988    ///
2989    /// # Example
2990    /// ```ignore,no_run
2991    /// # use google_cloud_dataform_v1::model::Workspace;
2992    /// use wkt::Timestamp;
2993    /// let x = Workspace::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2994    /// let x = Workspace::new().set_or_clear_create_time(None::<Timestamp>);
2995    /// ```
2996    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2997    where
2998        T: std::convert::Into<wkt::Timestamp>,
2999    {
3000        self.create_time = v.map(|x| x.into());
3001        self
3002    }
3003
3004    /// Sets the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
3005    ///
3006    /// # Example
3007    /// ```ignore,no_run
3008    /// # use google_cloud_dataform_v1::model::Workspace;
3009    /// use google_cloud_dataform_v1::model::DataEncryptionState;
3010    /// let x = Workspace::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
3011    /// ```
3012    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
3013    where
3014        T: std::convert::Into<crate::model::DataEncryptionState>,
3015    {
3016        self.data_encryption_state = std::option::Option::Some(v.into());
3017        self
3018    }
3019
3020    /// Sets or clears the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
3021    ///
3022    /// # Example
3023    /// ```ignore,no_run
3024    /// # use google_cloud_dataform_v1::model::Workspace;
3025    /// use google_cloud_dataform_v1::model::DataEncryptionState;
3026    /// let x = Workspace::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
3027    /// let x = Workspace::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
3028    /// ```
3029    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
3030    where
3031        T: std::convert::Into<crate::model::DataEncryptionState>,
3032    {
3033        self.data_encryption_state = v.map(|x| x.into());
3034        self
3035    }
3036
3037    /// Sets the value of [internal_metadata][crate::model::Workspace::internal_metadata].
3038    ///
3039    /// # Example
3040    /// ```ignore,no_run
3041    /// # use google_cloud_dataform_v1::model::Workspace;
3042    /// let x = Workspace::new().set_internal_metadata("example");
3043    /// ```
3044    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
3045    where
3046        T: std::convert::Into<std::string::String>,
3047    {
3048        self.internal_metadata = std::option::Option::Some(v.into());
3049        self
3050    }
3051
3052    /// Sets or clears the value of [internal_metadata][crate::model::Workspace::internal_metadata].
3053    ///
3054    /// # Example
3055    /// ```ignore,no_run
3056    /// # use google_cloud_dataform_v1::model::Workspace;
3057    /// let x = Workspace::new().set_or_clear_internal_metadata(Some("example"));
3058    /// let x = Workspace::new().set_or_clear_internal_metadata(None::<String>);
3059    /// ```
3060    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
3061    where
3062        T: std::convert::Into<std::string::String>,
3063    {
3064        self.internal_metadata = v.map(|x| x.into());
3065        self
3066    }
3067
3068    /// Sets the value of [disable_moves][crate::model::Workspace::disable_moves].
3069    ///
3070    /// # Example
3071    /// ```ignore,no_run
3072    /// # use google_cloud_dataform_v1::model::Workspace;
3073    /// let x = Workspace::new().set_disable_moves(true);
3074    /// ```
3075    pub fn set_disable_moves<T>(mut self, v: T) -> Self
3076    where
3077        T: std::convert::Into<bool>,
3078    {
3079        self.disable_moves = std::option::Option::Some(v.into());
3080        self
3081    }
3082
3083    /// Sets or clears the value of [disable_moves][crate::model::Workspace::disable_moves].
3084    ///
3085    /// # Example
3086    /// ```ignore,no_run
3087    /// # use google_cloud_dataform_v1::model::Workspace;
3088    /// let x = Workspace::new().set_or_clear_disable_moves(Some(false));
3089    /// let x = Workspace::new().set_or_clear_disable_moves(None::<bool>);
3090    /// ```
3091    pub fn set_or_clear_disable_moves<T>(mut self, v: std::option::Option<T>) -> Self
3092    where
3093        T: std::convert::Into<bool>,
3094    {
3095        self.disable_moves = v.map(|x| x.into());
3096        self
3097    }
3098
3099    /// Sets the value of [private_resource_metadata][crate::model::Workspace::private_resource_metadata].
3100    ///
3101    /// # Example
3102    /// ```ignore,no_run
3103    /// # use google_cloud_dataform_v1::model::Workspace;
3104    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
3105    /// let x = Workspace::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
3106    /// ```
3107    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
3108    where
3109        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
3110    {
3111        self.private_resource_metadata = std::option::Option::Some(v.into());
3112        self
3113    }
3114
3115    /// Sets or clears the value of [private_resource_metadata][crate::model::Workspace::private_resource_metadata].
3116    ///
3117    /// # Example
3118    /// ```ignore,no_run
3119    /// # use google_cloud_dataform_v1::model::Workspace;
3120    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
3121    /// let x = Workspace::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
3122    /// let x = Workspace::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
3123    /// ```
3124    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
3125    where
3126        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
3127    {
3128        self.private_resource_metadata = v.map(|x| x.into());
3129        self
3130    }
3131}
3132
3133impl wkt::message::Message for Workspace {
3134    fn typename() -> &'static str {
3135        "type.googleapis.com/google.cloud.dataform.v1.Workspace"
3136    }
3137}
3138
3139/// `ListWorkspaces` request message.
3140#[derive(Clone, Default, PartialEq)]
3141#[non_exhaustive]
3142pub struct ListWorkspacesRequest {
3143    /// Required. The repository in which to list workspaces. Must be in the
3144    /// format `projects/*/locations/*/repositories/*`.
3145    pub parent: std::string::String,
3146
3147    /// Optional. Maximum number of workspaces to return. The server may return
3148    /// fewer items than requested. If unspecified, the server will pick an
3149    /// appropriate default.
3150    pub page_size: i32,
3151
3152    /// Optional. Page token received from a previous `ListWorkspaces` call.
3153    /// Provide this to retrieve the subsequent page.
3154    ///
3155    /// When paginating, all other parameters provided to `ListWorkspaces`, with
3156    /// the exception of `page_size`, must match the call that provided the page
3157    /// token.
3158    pub page_token: std::string::String,
3159
3160    /// Optional. This field only supports ordering by `name`. If unspecified, the
3161    /// server will choose the ordering. If specified, the default order is
3162    /// ascending for the `name` field.
3163    pub order_by: std::string::String,
3164
3165    /// Optional. Filter for the returned list.
3166    pub filter: std::string::String,
3167
3168    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3169}
3170
3171impl ListWorkspacesRequest {
3172    /// Creates a new default instance.
3173    pub fn new() -> Self {
3174        std::default::Default::default()
3175    }
3176
3177    /// Sets the value of [parent][crate::model::ListWorkspacesRequest::parent].
3178    ///
3179    /// # Example
3180    /// ```ignore,no_run
3181    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3182    /// # let project_id = "project_id";
3183    /// # let location_id = "location_id";
3184    /// # let repository_id = "repository_id";
3185    /// let x = ListWorkspacesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
3186    /// ```
3187    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3188        self.parent = v.into();
3189        self
3190    }
3191
3192    /// Sets the value of [page_size][crate::model::ListWorkspacesRequest::page_size].
3193    ///
3194    /// # Example
3195    /// ```ignore,no_run
3196    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3197    /// let x = ListWorkspacesRequest::new().set_page_size(42);
3198    /// ```
3199    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3200        self.page_size = v.into();
3201        self
3202    }
3203
3204    /// Sets the value of [page_token][crate::model::ListWorkspacesRequest::page_token].
3205    ///
3206    /// # Example
3207    /// ```ignore,no_run
3208    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3209    /// let x = ListWorkspacesRequest::new().set_page_token("example");
3210    /// ```
3211    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3212        self.page_token = v.into();
3213        self
3214    }
3215
3216    /// Sets the value of [order_by][crate::model::ListWorkspacesRequest::order_by].
3217    ///
3218    /// # Example
3219    /// ```ignore,no_run
3220    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3221    /// let x = ListWorkspacesRequest::new().set_order_by("example");
3222    /// ```
3223    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3224        self.order_by = v.into();
3225        self
3226    }
3227
3228    /// Sets the value of [filter][crate::model::ListWorkspacesRequest::filter].
3229    ///
3230    /// # Example
3231    /// ```ignore,no_run
3232    /// # use google_cloud_dataform_v1::model::ListWorkspacesRequest;
3233    /// let x = ListWorkspacesRequest::new().set_filter("example");
3234    /// ```
3235    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3236        self.filter = v.into();
3237        self
3238    }
3239}
3240
3241impl wkt::message::Message for ListWorkspacesRequest {
3242    fn typename() -> &'static str {
3243        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
3244    }
3245}
3246
3247/// `ListWorkspaces` response message.
3248#[derive(Clone, Default, PartialEq)]
3249#[non_exhaustive]
3250pub struct ListWorkspacesResponse {
3251    /// List of workspaces.
3252    pub workspaces: std::vec::Vec<crate::model::Workspace>,
3253
3254    /// A token, which can be sent as `page_token` to retrieve the next page.
3255    /// If this field is omitted, there are no subsequent pages.
3256    pub next_page_token: std::string::String,
3257
3258    /// Locations which could not be reached.
3259    pub unreachable: std::vec::Vec<std::string::String>,
3260
3261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3262}
3263
3264impl ListWorkspacesResponse {
3265    /// Creates a new default instance.
3266    pub fn new() -> Self {
3267        std::default::Default::default()
3268    }
3269
3270    /// Sets the value of [workspaces][crate::model::ListWorkspacesResponse::workspaces].
3271    ///
3272    /// # Example
3273    /// ```ignore,no_run
3274    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3275    /// use google_cloud_dataform_v1::model::Workspace;
3276    /// let x = ListWorkspacesResponse::new()
3277    ///     .set_workspaces([
3278    ///         Workspace::default()/* use setters */,
3279    ///         Workspace::default()/* use (different) setters */,
3280    ///     ]);
3281    /// ```
3282    pub fn set_workspaces<T, V>(mut self, v: T) -> Self
3283    where
3284        T: std::iter::IntoIterator<Item = V>,
3285        V: std::convert::Into<crate::model::Workspace>,
3286    {
3287        use std::iter::Iterator;
3288        self.workspaces = v.into_iter().map(|i| i.into()).collect();
3289        self
3290    }
3291
3292    /// Sets the value of [next_page_token][crate::model::ListWorkspacesResponse::next_page_token].
3293    ///
3294    /// # Example
3295    /// ```ignore,no_run
3296    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3297    /// let x = ListWorkspacesResponse::new().set_next_page_token("example");
3298    /// ```
3299    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3300        self.next_page_token = v.into();
3301        self
3302    }
3303
3304    /// Sets the value of [unreachable][crate::model::ListWorkspacesResponse::unreachable].
3305    ///
3306    /// # Example
3307    /// ```ignore,no_run
3308    /// # use google_cloud_dataform_v1::model::ListWorkspacesResponse;
3309    /// let x = ListWorkspacesResponse::new().set_unreachable(["a", "b", "c"]);
3310    /// ```
3311    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3312    where
3313        T: std::iter::IntoIterator<Item = V>,
3314        V: std::convert::Into<std::string::String>,
3315    {
3316        use std::iter::Iterator;
3317        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3318        self
3319    }
3320}
3321
3322impl wkt::message::Message for ListWorkspacesResponse {
3323    fn typename() -> &'static str {
3324        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
3325    }
3326}
3327
3328#[doc(hidden)]
3329impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
3330    type PageItem = crate::model::Workspace;
3331
3332    fn items(self) -> std::vec::Vec<Self::PageItem> {
3333        self.workspaces
3334    }
3335
3336    fn next_page_token(&self) -> std::string::String {
3337        use std::clone::Clone;
3338        self.next_page_token.clone()
3339    }
3340}
3341
3342/// `GetWorkspace` request message.
3343#[derive(Clone, Default, PartialEq)]
3344#[non_exhaustive]
3345pub struct GetWorkspaceRequest {
3346    /// Required. The workspace's name.
3347    pub name: std::string::String,
3348
3349    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3350}
3351
3352impl GetWorkspaceRequest {
3353    /// Creates a new default instance.
3354    pub fn new() -> Self {
3355        std::default::Default::default()
3356    }
3357
3358    /// Sets the value of [name][crate::model::GetWorkspaceRequest::name].
3359    ///
3360    /// # Example
3361    /// ```ignore,no_run
3362    /// # use google_cloud_dataform_v1::model::GetWorkspaceRequest;
3363    /// # let project_id = "project_id";
3364    /// # let location_id = "location_id";
3365    /// # let repository_id = "repository_id";
3366    /// # let workspace_id = "workspace_id";
3367    /// let x = GetWorkspaceRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3368    /// ```
3369    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3370        self.name = v.into();
3371        self
3372    }
3373}
3374
3375impl wkt::message::Message for GetWorkspaceRequest {
3376    fn typename() -> &'static str {
3377        "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
3378    }
3379}
3380
3381/// `CreateWorkspace` request message.
3382#[derive(Clone, Default, PartialEq)]
3383#[non_exhaustive]
3384pub struct CreateWorkspaceRequest {
3385    /// Required. The repository in which to create the workspace. Must be in the
3386    /// format `projects/*/locations/*/repositories/*`.
3387    pub parent: std::string::String,
3388
3389    /// Required. The workspace to create.
3390    pub workspace: std::option::Option<crate::model::Workspace>,
3391
3392    /// Required. The ID to use for the workspace, which will become the final
3393    /// component of the workspace's resource name.
3394    pub workspace_id: std::string::String,
3395
3396    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3397}
3398
3399impl CreateWorkspaceRequest {
3400    /// Creates a new default instance.
3401    pub fn new() -> Self {
3402        std::default::Default::default()
3403    }
3404
3405    /// Sets the value of [parent][crate::model::CreateWorkspaceRequest::parent].
3406    ///
3407    /// # Example
3408    /// ```ignore,no_run
3409    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3410    /// # let project_id = "project_id";
3411    /// # let location_id = "location_id";
3412    /// # let repository_id = "repository_id";
3413    /// let x = CreateWorkspaceRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
3414    /// ```
3415    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3416        self.parent = v.into();
3417        self
3418    }
3419
3420    /// Sets the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3421    ///
3422    /// # Example
3423    /// ```ignore,no_run
3424    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3425    /// use google_cloud_dataform_v1::model::Workspace;
3426    /// let x = CreateWorkspaceRequest::new().set_workspace(Workspace::default()/* use setters */);
3427    /// ```
3428    pub fn set_workspace<T>(mut self, v: T) -> Self
3429    where
3430        T: std::convert::Into<crate::model::Workspace>,
3431    {
3432        self.workspace = std::option::Option::Some(v.into());
3433        self
3434    }
3435
3436    /// Sets or clears the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
3437    ///
3438    /// # Example
3439    /// ```ignore,no_run
3440    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3441    /// use google_cloud_dataform_v1::model::Workspace;
3442    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(Some(Workspace::default()/* use setters */));
3443    /// let x = CreateWorkspaceRequest::new().set_or_clear_workspace(None::<Workspace>);
3444    /// ```
3445    pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
3446    where
3447        T: std::convert::Into<crate::model::Workspace>,
3448    {
3449        self.workspace = v.map(|x| x.into());
3450        self
3451    }
3452
3453    /// Sets the value of [workspace_id][crate::model::CreateWorkspaceRequest::workspace_id].
3454    ///
3455    /// # Example
3456    /// ```ignore,no_run
3457    /// # use google_cloud_dataform_v1::model::CreateWorkspaceRequest;
3458    /// let x = CreateWorkspaceRequest::new().set_workspace_id("example");
3459    /// ```
3460    pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3461        self.workspace_id = v.into();
3462        self
3463    }
3464}
3465
3466impl wkt::message::Message for CreateWorkspaceRequest {
3467    fn typename() -> &'static str {
3468        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
3469    }
3470}
3471
3472/// `DeleteWorkspace` request message.
3473#[derive(Clone, Default, PartialEq)]
3474#[non_exhaustive]
3475pub struct DeleteWorkspaceRequest {
3476    /// Required. The workspace resource's name.
3477    pub name: std::string::String,
3478
3479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3480}
3481
3482impl DeleteWorkspaceRequest {
3483    /// Creates a new default instance.
3484    pub fn new() -> Self {
3485        std::default::Default::default()
3486    }
3487
3488    /// Sets the value of [name][crate::model::DeleteWorkspaceRequest::name].
3489    ///
3490    /// # Example
3491    /// ```ignore,no_run
3492    /// # use google_cloud_dataform_v1::model::DeleteWorkspaceRequest;
3493    /// # let project_id = "project_id";
3494    /// # let location_id = "location_id";
3495    /// # let repository_id = "repository_id";
3496    /// # let workspace_id = "workspace_id";
3497    /// let x = DeleteWorkspaceRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3498    /// ```
3499    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3500        self.name = v.into();
3501        self
3502    }
3503}
3504
3505impl wkt::message::Message for DeleteWorkspaceRequest {
3506    fn typename() -> &'static str {
3507        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
3508    }
3509}
3510
3511/// Represents the author of a Git commit.
3512#[derive(Clone, Default, PartialEq)]
3513#[non_exhaustive]
3514pub struct CommitAuthor {
3515    /// Required. The commit author's name.
3516    pub name: std::string::String,
3517
3518    /// Required. The commit author's email address.
3519    pub email_address: std::string::String,
3520
3521    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3522}
3523
3524impl CommitAuthor {
3525    /// Creates a new default instance.
3526    pub fn new() -> Self {
3527        std::default::Default::default()
3528    }
3529
3530    /// Sets the value of [name][crate::model::CommitAuthor::name].
3531    ///
3532    /// # Example
3533    /// ```ignore,no_run
3534    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3535    /// let x = CommitAuthor::new().set_name("example");
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 [email_address][crate::model::CommitAuthor::email_address].
3543    ///
3544    /// # Example
3545    /// ```ignore,no_run
3546    /// # use google_cloud_dataform_v1::model::CommitAuthor;
3547    /// let x = CommitAuthor::new().set_email_address("example");
3548    /// ```
3549    pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3550        self.email_address = v.into();
3551        self
3552    }
3553}
3554
3555impl wkt::message::Message for CommitAuthor {
3556    fn typename() -> &'static str {
3557        "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
3558    }
3559}
3560
3561/// `PullGitCommits` request message.
3562#[derive(Clone, Default, PartialEq)]
3563#[non_exhaustive]
3564pub struct PullGitCommitsRequest {
3565    /// Required. The workspace's name.
3566    pub name: std::string::String,
3567
3568    /// Optional. The name of the branch in the Git remote from which to pull
3569    /// commits. If left unset, the repository's default branch name will be used.
3570    pub remote_branch: std::string::String,
3571
3572    /// Required. The author of any merge commit which may be created as a result
3573    /// of merging fetched Git commits into this workspace.
3574    pub author: std::option::Option<crate::model::CommitAuthor>,
3575
3576    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3577}
3578
3579impl PullGitCommitsRequest {
3580    /// Creates a new default instance.
3581    pub fn new() -> Self {
3582        std::default::Default::default()
3583    }
3584
3585    /// Sets the value of [name][crate::model::PullGitCommitsRequest::name].
3586    ///
3587    /// # Example
3588    /// ```ignore,no_run
3589    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3590    /// # let project_id = "project_id";
3591    /// # let location_id = "location_id";
3592    /// # let repository_id = "repository_id";
3593    /// # let workspace_id = "workspace_id";
3594    /// let x = PullGitCommitsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3595    /// ```
3596    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3597        self.name = v.into();
3598        self
3599    }
3600
3601    /// Sets the value of [remote_branch][crate::model::PullGitCommitsRequest::remote_branch].
3602    ///
3603    /// # Example
3604    /// ```ignore,no_run
3605    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3606    /// let x = PullGitCommitsRequest::new().set_remote_branch("example");
3607    /// ```
3608    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3609        self.remote_branch = v.into();
3610        self
3611    }
3612
3613    /// Sets the value of [author][crate::model::PullGitCommitsRequest::author].
3614    ///
3615    /// # Example
3616    /// ```ignore,no_run
3617    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3618    /// use google_cloud_dataform_v1::model::CommitAuthor;
3619    /// let x = PullGitCommitsRequest::new().set_author(CommitAuthor::default()/* use setters */);
3620    /// ```
3621    pub fn set_author<T>(mut self, v: T) -> Self
3622    where
3623        T: std::convert::Into<crate::model::CommitAuthor>,
3624    {
3625        self.author = std::option::Option::Some(v.into());
3626        self
3627    }
3628
3629    /// Sets or clears the value of [author][crate::model::PullGitCommitsRequest::author].
3630    ///
3631    /// # Example
3632    /// ```ignore,no_run
3633    /// # use google_cloud_dataform_v1::model::PullGitCommitsRequest;
3634    /// use google_cloud_dataform_v1::model::CommitAuthor;
3635    /// let x = PullGitCommitsRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
3636    /// let x = PullGitCommitsRequest::new().set_or_clear_author(None::<CommitAuthor>);
3637    /// ```
3638    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
3639    where
3640        T: std::convert::Into<crate::model::CommitAuthor>,
3641    {
3642        self.author = v.map(|x| x.into());
3643        self
3644    }
3645}
3646
3647impl wkt::message::Message for PullGitCommitsRequest {
3648    fn typename() -> &'static str {
3649        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
3650    }
3651}
3652
3653/// `PullGitCommits` response message.
3654#[derive(Clone, Default, PartialEq)]
3655#[non_exhaustive]
3656pub struct PullGitCommitsResponse {
3657    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3658}
3659
3660impl PullGitCommitsResponse {
3661    /// Creates a new default instance.
3662    pub fn new() -> Self {
3663        std::default::Default::default()
3664    }
3665}
3666
3667impl wkt::message::Message for PullGitCommitsResponse {
3668    fn typename() -> &'static str {
3669        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
3670    }
3671}
3672
3673/// `PushGitCommits` request message.
3674#[derive(Clone, Default, PartialEq)]
3675#[non_exhaustive]
3676pub struct PushGitCommitsRequest {
3677    /// Required. The workspace's name.
3678    pub name: std::string::String,
3679
3680    /// Optional. The name of the branch in the Git remote to which commits should
3681    /// be pushed. If left unset, the repository's default branch name will be
3682    /// used.
3683    pub remote_branch: std::string::String,
3684
3685    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3686}
3687
3688impl PushGitCommitsRequest {
3689    /// Creates a new default instance.
3690    pub fn new() -> Self {
3691        std::default::Default::default()
3692    }
3693
3694    /// Sets the value of [name][crate::model::PushGitCommitsRequest::name].
3695    ///
3696    /// # Example
3697    /// ```ignore,no_run
3698    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3699    /// # let project_id = "project_id";
3700    /// # let location_id = "location_id";
3701    /// # let repository_id = "repository_id";
3702    /// # let workspace_id = "workspace_id";
3703    /// let x = PushGitCommitsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3704    /// ```
3705    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3706        self.name = v.into();
3707        self
3708    }
3709
3710    /// Sets the value of [remote_branch][crate::model::PushGitCommitsRequest::remote_branch].
3711    ///
3712    /// # Example
3713    /// ```ignore,no_run
3714    /// # use google_cloud_dataform_v1::model::PushGitCommitsRequest;
3715    /// let x = PushGitCommitsRequest::new().set_remote_branch("example");
3716    /// ```
3717    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3718        self.remote_branch = v.into();
3719        self
3720    }
3721}
3722
3723impl wkt::message::Message for PushGitCommitsRequest {
3724    fn typename() -> &'static str {
3725        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
3726    }
3727}
3728
3729/// `PushGitCommits` response message.
3730#[derive(Clone, Default, PartialEq)]
3731#[non_exhaustive]
3732pub struct PushGitCommitsResponse {
3733    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3734}
3735
3736impl PushGitCommitsResponse {
3737    /// Creates a new default instance.
3738    pub fn new() -> Self {
3739        std::default::Default::default()
3740    }
3741}
3742
3743impl wkt::message::Message for PushGitCommitsResponse {
3744    fn typename() -> &'static str {
3745        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
3746    }
3747}
3748
3749/// `FetchFileGitStatuses` request message.
3750#[derive(Clone, Default, PartialEq)]
3751#[non_exhaustive]
3752pub struct FetchFileGitStatusesRequest {
3753    /// Required. The workspace's name.
3754    pub name: std::string::String,
3755
3756    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3757}
3758
3759impl FetchFileGitStatusesRequest {
3760    /// Creates a new default instance.
3761    pub fn new() -> Self {
3762        std::default::Default::default()
3763    }
3764
3765    /// Sets the value of [name][crate::model::FetchFileGitStatusesRequest::name].
3766    ///
3767    /// # Example
3768    /// ```ignore,no_run
3769    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesRequest;
3770    /// # let project_id = "project_id";
3771    /// # let location_id = "location_id";
3772    /// # let repository_id = "repository_id";
3773    /// # let workspace_id = "workspace_id";
3774    /// let x = FetchFileGitStatusesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
3775    /// ```
3776    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3777        self.name = v.into();
3778        self
3779    }
3780}
3781
3782impl wkt::message::Message for FetchFileGitStatusesRequest {
3783    fn typename() -> &'static str {
3784        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
3785    }
3786}
3787
3788/// `FetchFileGitStatuses` response message.
3789#[derive(Clone, Default, PartialEq)]
3790#[non_exhaustive]
3791pub struct FetchFileGitStatusesResponse {
3792    /// A list of all files which have uncommitted Git changes. There will only be
3793    /// a single entry for any given file.
3794    pub uncommitted_file_changes:
3795        std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
3796
3797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3798}
3799
3800impl FetchFileGitStatusesResponse {
3801    /// Creates a new default instance.
3802    pub fn new() -> Self {
3803        std::default::Default::default()
3804    }
3805
3806    /// Sets the value of [uncommitted_file_changes][crate::model::FetchFileGitStatusesResponse::uncommitted_file_changes].
3807    ///
3808    /// # Example
3809    /// ```ignore,no_run
3810    /// # use google_cloud_dataform_v1::model::FetchFileGitStatusesResponse;
3811    /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3812    /// let x = FetchFileGitStatusesResponse::new()
3813    ///     .set_uncommitted_file_changes([
3814    ///         UncommittedFileChange::default()/* use setters */,
3815    ///         UncommittedFileChange::default()/* use (different) setters */,
3816    ///     ]);
3817    /// ```
3818    pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
3819    where
3820        T: std::iter::IntoIterator<Item = V>,
3821        V: std::convert::Into<
3822                crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
3823            >,
3824    {
3825        use std::iter::Iterator;
3826        self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
3827        self
3828    }
3829}
3830
3831impl wkt::message::Message for FetchFileGitStatusesResponse {
3832    fn typename() -> &'static str {
3833        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
3834    }
3835}
3836
3837/// Defines additional types related to [FetchFileGitStatusesResponse].
3838pub mod fetch_file_git_statuses_response {
3839    #[allow(unused_imports)]
3840    use super::*;
3841
3842    /// Represents the Git state of a file with uncommitted changes.
3843    #[derive(Clone, Default, PartialEq)]
3844    #[non_exhaustive]
3845    pub struct UncommittedFileChange {
3846        /// The file's full path including filename, relative to the workspace root.
3847        pub path: std::string::String,
3848
3849        /// Output only. Indicates the status of the file.
3850        pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3851
3852        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3853    }
3854
3855    impl UncommittedFileChange {
3856        /// Creates a new default instance.
3857        pub fn new() -> Self {
3858            std::default::Default::default()
3859        }
3860
3861        /// Sets the value of [path][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::path].
3862        ///
3863        /// # Example
3864        /// ```ignore,no_run
3865        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3866        /// let x = UncommittedFileChange::new().set_path("example");
3867        /// ```
3868        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3869            self.path = v.into();
3870            self
3871        }
3872
3873        /// Sets the value of [state][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::state].
3874        ///
3875        /// # Example
3876        /// ```ignore,no_run
3877        /// # use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::UncommittedFileChange;
3878        /// use google_cloud_dataform_v1::model::fetch_file_git_statuses_response::uncommitted_file_change::State;
3879        /// let x0 = UncommittedFileChange::new().set_state(State::Added);
3880        /// let x1 = UncommittedFileChange::new().set_state(State::Deleted);
3881        /// let x2 = UncommittedFileChange::new().set_state(State::Modified);
3882        /// ```
3883        pub fn set_state<
3884            T: std::convert::Into<
3885                    crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
3886                >,
3887        >(
3888            mut self,
3889            v: T,
3890        ) -> Self {
3891            self.state = v.into();
3892            self
3893        }
3894    }
3895
3896    impl wkt::message::Message for UncommittedFileChange {
3897        fn typename() -> &'static str {
3898            "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
3899        }
3900    }
3901
3902    /// Defines additional types related to [UncommittedFileChange].
3903    pub mod uncommitted_file_change {
3904        #[allow(unused_imports)]
3905        use super::*;
3906
3907        /// Indicates the status of an uncommitted file change.
3908        ///
3909        /// # Working with unknown values
3910        ///
3911        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3912        /// additional enum variants at any time. Adding new variants is not considered
3913        /// a breaking change. Applications should write their code in anticipation of:
3914        ///
3915        /// - New values appearing in future releases of the client library, **and**
3916        /// - New values received dynamically, without application changes.
3917        ///
3918        /// Please consult the [Working with enums] section in the user guide for some
3919        /// guidelines.
3920        ///
3921        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
3922        #[derive(Clone, Debug, PartialEq)]
3923        #[non_exhaustive]
3924        pub enum State {
3925            /// Default value. This value is unused.
3926            Unspecified,
3927            /// The file has been newly added.
3928            Added,
3929            /// The file has been deleted.
3930            Deleted,
3931            /// The file has been modified.
3932            Modified,
3933            /// The file contains merge conflicts.
3934            HasConflicts,
3935            /// If set, the enum was initialized with an unknown value.
3936            ///
3937            /// Applications can examine the value using [State::value] or
3938            /// [State::name].
3939            UnknownValue(state::UnknownValue),
3940        }
3941
3942        #[doc(hidden)]
3943        pub mod state {
3944            #[allow(unused_imports)]
3945            use super::*;
3946            #[derive(Clone, Debug, PartialEq)]
3947            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3948        }
3949
3950        impl State {
3951            /// Gets the enum value.
3952            ///
3953            /// Returns `None` if the enum contains an unknown value deserialized from
3954            /// the string representation of enums.
3955            pub fn value(&self) -> std::option::Option<i32> {
3956                match self {
3957                    Self::Unspecified => std::option::Option::Some(0),
3958                    Self::Added => std::option::Option::Some(1),
3959                    Self::Deleted => std::option::Option::Some(2),
3960                    Self::Modified => std::option::Option::Some(3),
3961                    Self::HasConflicts => std::option::Option::Some(4),
3962                    Self::UnknownValue(u) => u.0.value(),
3963                }
3964            }
3965
3966            /// Gets the enum value as a string.
3967            ///
3968            /// Returns `None` if the enum contains an unknown value deserialized from
3969            /// the integer representation of enums.
3970            pub fn name(&self) -> std::option::Option<&str> {
3971                match self {
3972                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
3973                    Self::Added => std::option::Option::Some("ADDED"),
3974                    Self::Deleted => std::option::Option::Some("DELETED"),
3975                    Self::Modified => std::option::Option::Some("MODIFIED"),
3976                    Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
3977                    Self::UnknownValue(u) => u.0.name(),
3978                }
3979            }
3980        }
3981
3982        impl std::default::Default for State {
3983            fn default() -> Self {
3984                use std::convert::From;
3985                Self::from(0)
3986            }
3987        }
3988
3989        impl std::fmt::Display for State {
3990            fn fmt(
3991                &self,
3992                f: &mut std::fmt::Formatter<'_>,
3993            ) -> std::result::Result<(), std::fmt::Error> {
3994                wkt::internal::display_enum(f, self.name(), self.value())
3995            }
3996        }
3997
3998        impl std::convert::From<i32> for State {
3999            fn from(value: i32) -> Self {
4000                match value {
4001                    0 => Self::Unspecified,
4002                    1 => Self::Added,
4003                    2 => Self::Deleted,
4004                    3 => Self::Modified,
4005                    4 => Self::HasConflicts,
4006                    _ => Self::UnknownValue(state::UnknownValue(
4007                        wkt::internal::UnknownEnumValue::Integer(value),
4008                    )),
4009                }
4010            }
4011        }
4012
4013        impl std::convert::From<&str> for State {
4014            fn from(value: &str) -> Self {
4015                use std::string::ToString;
4016                match value {
4017                    "STATE_UNSPECIFIED" => Self::Unspecified,
4018                    "ADDED" => Self::Added,
4019                    "DELETED" => Self::Deleted,
4020                    "MODIFIED" => Self::Modified,
4021                    "HAS_CONFLICTS" => Self::HasConflicts,
4022                    _ => Self::UnknownValue(state::UnknownValue(
4023                        wkt::internal::UnknownEnumValue::String(value.to_string()),
4024                    )),
4025                }
4026            }
4027        }
4028
4029        impl serde::ser::Serialize for State {
4030            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4031            where
4032                S: serde::Serializer,
4033            {
4034                match self {
4035                    Self::Unspecified => serializer.serialize_i32(0),
4036                    Self::Added => serializer.serialize_i32(1),
4037                    Self::Deleted => serializer.serialize_i32(2),
4038                    Self::Modified => serializer.serialize_i32(3),
4039                    Self::HasConflicts => serializer.serialize_i32(4),
4040                    Self::UnknownValue(u) => u.0.serialize(serializer),
4041                }
4042            }
4043        }
4044
4045        impl<'de> serde::de::Deserialize<'de> for State {
4046            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4047            where
4048                D: serde::Deserializer<'de>,
4049            {
4050                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
4051                    ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
4052            }
4053        }
4054    }
4055}
4056
4057/// `FetchGitAheadBehind` request message.
4058#[derive(Clone, Default, PartialEq)]
4059#[non_exhaustive]
4060pub struct FetchGitAheadBehindRequest {
4061    /// Required. The workspace's name.
4062    pub name: std::string::String,
4063
4064    /// Optional. The name of the branch in the Git remote against which this
4065    /// workspace should be compared. If left unset, the repository's default
4066    /// branch name will be used.
4067    pub remote_branch: std::string::String,
4068
4069    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4070}
4071
4072impl FetchGitAheadBehindRequest {
4073    /// Creates a new default instance.
4074    pub fn new() -> Self {
4075        std::default::Default::default()
4076    }
4077
4078    /// Sets the value of [name][crate::model::FetchGitAheadBehindRequest::name].
4079    ///
4080    /// # Example
4081    /// ```ignore,no_run
4082    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
4083    /// # let project_id = "project_id";
4084    /// # let location_id = "location_id";
4085    /// # let repository_id = "repository_id";
4086    /// # let workspace_id = "workspace_id";
4087    /// let x = FetchGitAheadBehindRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4088    /// ```
4089    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4090        self.name = v.into();
4091        self
4092    }
4093
4094    /// Sets the value of [remote_branch][crate::model::FetchGitAheadBehindRequest::remote_branch].
4095    ///
4096    /// # Example
4097    /// ```ignore,no_run
4098    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindRequest;
4099    /// let x = FetchGitAheadBehindRequest::new().set_remote_branch("example");
4100    /// ```
4101    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4102        self.remote_branch = v.into();
4103        self
4104    }
4105}
4106
4107impl wkt::message::Message for FetchGitAheadBehindRequest {
4108    fn typename() -> &'static str {
4109        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
4110    }
4111}
4112
4113/// `FetchGitAheadBehind` response message.
4114#[derive(Clone, Default, PartialEq)]
4115#[non_exhaustive]
4116pub struct FetchGitAheadBehindResponse {
4117    /// The number of commits in the remote branch that are not in the workspace.
4118    pub commits_ahead: i32,
4119
4120    /// The number of commits in the workspace that are not in the remote branch.
4121    pub commits_behind: i32,
4122
4123    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4124}
4125
4126impl FetchGitAheadBehindResponse {
4127    /// Creates a new default instance.
4128    pub fn new() -> Self {
4129        std::default::Default::default()
4130    }
4131
4132    /// Sets the value of [commits_ahead][crate::model::FetchGitAheadBehindResponse::commits_ahead].
4133    ///
4134    /// # Example
4135    /// ```ignore,no_run
4136    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
4137    /// let x = FetchGitAheadBehindResponse::new().set_commits_ahead(42);
4138    /// ```
4139    pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4140        self.commits_ahead = v.into();
4141        self
4142    }
4143
4144    /// Sets the value of [commits_behind][crate::model::FetchGitAheadBehindResponse::commits_behind].
4145    ///
4146    /// # Example
4147    /// ```ignore,no_run
4148    /// # use google_cloud_dataform_v1::model::FetchGitAheadBehindResponse;
4149    /// let x = FetchGitAheadBehindResponse::new().set_commits_behind(42);
4150    /// ```
4151    pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4152        self.commits_behind = v.into();
4153        self
4154    }
4155}
4156
4157impl wkt::message::Message for FetchGitAheadBehindResponse {
4158    fn typename() -> &'static str {
4159        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
4160    }
4161}
4162
4163/// `CommitWorkspaceChanges` request message.
4164#[derive(Clone, Default, PartialEq)]
4165#[non_exhaustive]
4166pub struct CommitWorkspaceChangesRequest {
4167    /// Required. The workspace's name.
4168    pub name: std::string::String,
4169
4170    /// Required. The commit's author.
4171    pub author: std::option::Option<crate::model::CommitAuthor>,
4172
4173    /// Optional. The commit's message.
4174    pub commit_message: std::string::String,
4175
4176    /// Optional. Full file paths to commit including filename, rooted at workspace
4177    /// root. If left empty, all files will be committed.
4178    pub paths: std::vec::Vec<std::string::String>,
4179
4180    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4181}
4182
4183impl CommitWorkspaceChangesRequest {
4184    /// Creates a new default instance.
4185    pub fn new() -> Self {
4186        std::default::Default::default()
4187    }
4188
4189    /// Sets the value of [name][crate::model::CommitWorkspaceChangesRequest::name].
4190    ///
4191    /// # Example
4192    /// ```ignore,no_run
4193    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4194    /// # let project_id = "project_id";
4195    /// # let location_id = "location_id";
4196    /// # let repository_id = "repository_id";
4197    /// # let workspace_id = "workspace_id";
4198    /// let x = CommitWorkspaceChangesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4199    /// ```
4200    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4201        self.name = v.into();
4202        self
4203    }
4204
4205    /// Sets the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
4206    ///
4207    /// # Example
4208    /// ```ignore,no_run
4209    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4210    /// use google_cloud_dataform_v1::model::CommitAuthor;
4211    /// let x = CommitWorkspaceChangesRequest::new().set_author(CommitAuthor::default()/* use setters */);
4212    /// ```
4213    pub fn set_author<T>(mut self, v: T) -> Self
4214    where
4215        T: std::convert::Into<crate::model::CommitAuthor>,
4216    {
4217        self.author = std::option::Option::Some(v.into());
4218        self
4219    }
4220
4221    /// Sets or clears the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
4222    ///
4223    /// # Example
4224    /// ```ignore,no_run
4225    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4226    /// use google_cloud_dataform_v1::model::CommitAuthor;
4227    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(Some(CommitAuthor::default()/* use setters */));
4228    /// let x = CommitWorkspaceChangesRequest::new().set_or_clear_author(None::<CommitAuthor>);
4229    /// ```
4230    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
4231    where
4232        T: std::convert::Into<crate::model::CommitAuthor>,
4233    {
4234        self.author = v.map(|x| x.into());
4235        self
4236    }
4237
4238    /// Sets the value of [commit_message][crate::model::CommitWorkspaceChangesRequest::commit_message].
4239    ///
4240    /// # Example
4241    /// ```ignore,no_run
4242    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4243    /// let x = CommitWorkspaceChangesRequest::new().set_commit_message("example");
4244    /// ```
4245    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4246        self.commit_message = v.into();
4247        self
4248    }
4249
4250    /// Sets the value of [paths][crate::model::CommitWorkspaceChangesRequest::paths].
4251    ///
4252    /// # Example
4253    /// ```ignore,no_run
4254    /// # use google_cloud_dataform_v1::model::CommitWorkspaceChangesRequest;
4255    /// let x = CommitWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
4256    /// ```
4257    pub fn set_paths<T, V>(mut self, v: T) -> Self
4258    where
4259        T: std::iter::IntoIterator<Item = V>,
4260        V: std::convert::Into<std::string::String>,
4261    {
4262        use std::iter::Iterator;
4263        self.paths = v.into_iter().map(|i| i.into()).collect();
4264        self
4265    }
4266}
4267
4268impl wkt::message::Message for CommitWorkspaceChangesRequest {
4269    fn typename() -> &'static str {
4270        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
4271    }
4272}
4273
4274/// `CommitWorkspaceChanges` response message.
4275#[derive(Clone, Default, PartialEq)]
4276#[non_exhaustive]
4277pub struct CommitWorkspaceChangesResponse {
4278    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4279}
4280
4281impl CommitWorkspaceChangesResponse {
4282    /// Creates a new default instance.
4283    pub fn new() -> Self {
4284        std::default::Default::default()
4285    }
4286}
4287
4288impl wkt::message::Message for CommitWorkspaceChangesResponse {
4289    fn typename() -> &'static str {
4290        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
4291    }
4292}
4293
4294/// `ResetWorkspaceChanges` request message.
4295#[derive(Clone, Default, PartialEq)]
4296#[non_exhaustive]
4297pub struct ResetWorkspaceChangesRequest {
4298    /// Required. The workspace's name.
4299    pub name: std::string::String,
4300
4301    /// Optional. Full file paths to reset back to their committed state including
4302    /// filename, rooted at workspace root. If left empty, all files will be reset.
4303    pub paths: std::vec::Vec<std::string::String>,
4304
4305    /// Optional. If set to true, untracked files will be deleted.
4306    pub clean: bool,
4307
4308    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4309}
4310
4311impl ResetWorkspaceChangesRequest {
4312    /// Creates a new default instance.
4313    pub fn new() -> Self {
4314        std::default::Default::default()
4315    }
4316
4317    /// Sets the value of [name][crate::model::ResetWorkspaceChangesRequest::name].
4318    ///
4319    /// # Example
4320    /// ```ignore,no_run
4321    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4322    /// # let project_id = "project_id";
4323    /// # let location_id = "location_id";
4324    /// # let repository_id = "repository_id";
4325    /// # let workspace_id = "workspace_id";
4326    /// let x = ResetWorkspaceChangesRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4327    /// ```
4328    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4329        self.name = v.into();
4330        self
4331    }
4332
4333    /// Sets the value of [paths][crate::model::ResetWorkspaceChangesRequest::paths].
4334    ///
4335    /// # Example
4336    /// ```ignore,no_run
4337    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4338    /// let x = ResetWorkspaceChangesRequest::new().set_paths(["a", "b", "c"]);
4339    /// ```
4340    pub fn set_paths<T, V>(mut self, v: T) -> Self
4341    where
4342        T: std::iter::IntoIterator<Item = V>,
4343        V: std::convert::Into<std::string::String>,
4344    {
4345        use std::iter::Iterator;
4346        self.paths = v.into_iter().map(|i| i.into()).collect();
4347        self
4348    }
4349
4350    /// Sets the value of [clean][crate::model::ResetWorkspaceChangesRequest::clean].
4351    ///
4352    /// # Example
4353    /// ```ignore,no_run
4354    /// # use google_cloud_dataform_v1::model::ResetWorkspaceChangesRequest;
4355    /// let x = ResetWorkspaceChangesRequest::new().set_clean(true);
4356    /// ```
4357    pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4358        self.clean = v.into();
4359        self
4360    }
4361}
4362
4363impl wkt::message::Message for ResetWorkspaceChangesRequest {
4364    fn typename() -> &'static str {
4365        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
4366    }
4367}
4368
4369/// `ResetWorkspaceChanges` response message.
4370#[derive(Clone, Default, PartialEq)]
4371#[non_exhaustive]
4372pub struct ResetWorkspaceChangesResponse {
4373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4374}
4375
4376impl ResetWorkspaceChangesResponse {
4377    /// Creates a new default instance.
4378    pub fn new() -> Self {
4379        std::default::Default::default()
4380    }
4381}
4382
4383impl wkt::message::Message for ResetWorkspaceChangesResponse {
4384    fn typename() -> &'static str {
4385        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
4386    }
4387}
4388
4389/// `FetchFileDiff` request message.
4390#[derive(Clone, Default, PartialEq)]
4391#[non_exhaustive]
4392pub struct FetchFileDiffRequest {
4393    /// Required. The workspace's name.
4394    pub workspace: std::string::String,
4395
4396    /// Required. The file's full path including filename, relative to the
4397    /// workspace root.
4398    pub path: std::string::String,
4399
4400    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4401}
4402
4403impl FetchFileDiffRequest {
4404    /// Creates a new default instance.
4405    pub fn new() -> Self {
4406        std::default::Default::default()
4407    }
4408
4409    /// Sets the value of [workspace][crate::model::FetchFileDiffRequest::workspace].
4410    ///
4411    /// # Example
4412    /// ```ignore,no_run
4413    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
4414    /// # let project_id = "project_id";
4415    /// # let location_id = "location_id";
4416    /// # let repository_id = "repository_id";
4417    /// # let workspace_id = "workspace_id";
4418    /// let x = FetchFileDiffRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4419    /// ```
4420    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4421        self.workspace = v.into();
4422        self
4423    }
4424
4425    /// Sets the value of [path][crate::model::FetchFileDiffRequest::path].
4426    ///
4427    /// # Example
4428    /// ```ignore,no_run
4429    /// # use google_cloud_dataform_v1::model::FetchFileDiffRequest;
4430    /// let x = FetchFileDiffRequest::new().set_path("example");
4431    /// ```
4432    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4433        self.path = v.into();
4434        self
4435    }
4436}
4437
4438impl wkt::message::Message for FetchFileDiffRequest {
4439    fn typename() -> &'static str {
4440        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
4441    }
4442}
4443
4444/// `FetchFileDiff` response message.
4445#[derive(Clone, Default, PartialEq)]
4446#[non_exhaustive]
4447pub struct FetchFileDiffResponse {
4448    /// The raw formatted Git diff for the file.
4449    pub formatted_diff: std::string::String,
4450
4451    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4452}
4453
4454impl FetchFileDiffResponse {
4455    /// Creates a new default instance.
4456    pub fn new() -> Self {
4457        std::default::Default::default()
4458    }
4459
4460    /// Sets the value of [formatted_diff][crate::model::FetchFileDiffResponse::formatted_diff].
4461    ///
4462    /// # Example
4463    /// ```ignore,no_run
4464    /// # use google_cloud_dataform_v1::model::FetchFileDiffResponse;
4465    /// let x = FetchFileDiffResponse::new().set_formatted_diff("example");
4466    /// ```
4467    pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4468        self.formatted_diff = v.into();
4469        self
4470    }
4471}
4472
4473impl wkt::message::Message for FetchFileDiffResponse {
4474    fn typename() -> &'static str {
4475        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
4476    }
4477}
4478
4479/// `QueryDirectoryContents` request message.
4480#[derive(Clone, Default, PartialEq)]
4481#[non_exhaustive]
4482pub struct QueryDirectoryContentsRequest {
4483    /// Required. The workspace's name.
4484    pub workspace: std::string::String,
4485
4486    /// Optional. The directory's full path including directory name, relative to
4487    /// the workspace root. If left unset, the workspace root is used.
4488    pub path: std::string::String,
4489
4490    /// Optional. Maximum number of paths to return. The server may return fewer
4491    /// items than requested. If unspecified, the server will pick an appropriate
4492    /// default.
4493    pub page_size: i32,
4494
4495    /// Optional. Page token received from a previous `QueryDirectoryContents`
4496    /// call. Provide this to retrieve the subsequent page.
4497    ///
4498    /// When paginating, all other parameters provided to
4499    /// `QueryDirectoryContents`, with the exception of `page_size`, must match the
4500    /// call that provided the page token.
4501    pub page_token: std::string::String,
4502
4503    /// Optional. Specifies the metadata to return for each directory entry.
4504    /// If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`.
4505    /// Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by
4506    /// CMEK-protected workspaces.
4507    pub view: crate::model::DirectoryContentsView,
4508
4509    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4510}
4511
4512impl QueryDirectoryContentsRequest {
4513    /// Creates a new default instance.
4514    pub fn new() -> Self {
4515        std::default::Default::default()
4516    }
4517
4518    /// Sets the value of [workspace][crate::model::QueryDirectoryContentsRequest::workspace].
4519    ///
4520    /// # Example
4521    /// ```ignore,no_run
4522    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4523    /// # let project_id = "project_id";
4524    /// # let location_id = "location_id";
4525    /// # let repository_id = "repository_id";
4526    /// # let workspace_id = "workspace_id";
4527    /// let x = QueryDirectoryContentsRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4528    /// ```
4529    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4530        self.workspace = v.into();
4531        self
4532    }
4533
4534    /// Sets the value of [path][crate::model::QueryDirectoryContentsRequest::path].
4535    ///
4536    /// # Example
4537    /// ```ignore,no_run
4538    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4539    /// let x = QueryDirectoryContentsRequest::new().set_path("example");
4540    /// ```
4541    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4542        self.path = v.into();
4543        self
4544    }
4545
4546    /// Sets the value of [page_size][crate::model::QueryDirectoryContentsRequest::page_size].
4547    ///
4548    /// # Example
4549    /// ```ignore,no_run
4550    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4551    /// let x = QueryDirectoryContentsRequest::new().set_page_size(42);
4552    /// ```
4553    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4554        self.page_size = v.into();
4555        self
4556    }
4557
4558    /// Sets the value of [page_token][crate::model::QueryDirectoryContentsRequest::page_token].
4559    ///
4560    /// # Example
4561    /// ```ignore,no_run
4562    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4563    /// let x = QueryDirectoryContentsRequest::new().set_page_token("example");
4564    /// ```
4565    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4566        self.page_token = v.into();
4567        self
4568    }
4569
4570    /// Sets the value of [view][crate::model::QueryDirectoryContentsRequest::view].
4571    ///
4572    /// # Example
4573    /// ```ignore,no_run
4574    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsRequest;
4575    /// use google_cloud_dataform_v1::model::DirectoryContentsView;
4576    /// let x0 = QueryDirectoryContentsRequest::new().set_view(DirectoryContentsView::Basic);
4577    /// let x1 = QueryDirectoryContentsRequest::new().set_view(DirectoryContentsView::Metadata);
4578    /// ```
4579    pub fn set_view<T: std::convert::Into<crate::model::DirectoryContentsView>>(
4580        mut self,
4581        v: T,
4582    ) -> Self {
4583        self.view = v.into();
4584        self
4585    }
4586}
4587
4588impl wkt::message::Message for QueryDirectoryContentsRequest {
4589    fn typename() -> &'static str {
4590        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
4591    }
4592}
4593
4594/// `QueryDirectoryContents` response message.
4595#[derive(Clone, Default, PartialEq)]
4596#[non_exhaustive]
4597pub struct QueryDirectoryContentsResponse {
4598    /// List of entries in the directory.
4599    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
4600
4601    /// A token, which can be sent as `page_token` to retrieve the next page.
4602    /// If this field is omitted, there are no subsequent pages.
4603    pub next_page_token: std::string::String,
4604
4605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4606}
4607
4608impl QueryDirectoryContentsResponse {
4609    /// Creates a new default instance.
4610    pub fn new() -> Self {
4611        std::default::Default::default()
4612    }
4613
4614    /// Sets the value of [directory_entries][crate::model::QueryDirectoryContentsResponse::directory_entries].
4615    ///
4616    /// # Example
4617    /// ```ignore,no_run
4618    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4619    /// use google_cloud_dataform_v1::model::DirectoryEntry;
4620    /// let x = QueryDirectoryContentsResponse::new()
4621    ///     .set_directory_entries([
4622    ///         DirectoryEntry::default()/* use setters */,
4623    ///         DirectoryEntry::default()/* use (different) setters */,
4624    ///     ]);
4625    /// ```
4626    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
4627    where
4628        T: std::iter::IntoIterator<Item = V>,
4629        V: std::convert::Into<crate::model::DirectoryEntry>,
4630    {
4631        use std::iter::Iterator;
4632        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
4633        self
4634    }
4635
4636    /// Sets the value of [next_page_token][crate::model::QueryDirectoryContentsResponse::next_page_token].
4637    ///
4638    /// # Example
4639    /// ```ignore,no_run
4640    /// # use google_cloud_dataform_v1::model::QueryDirectoryContentsResponse;
4641    /// let x = QueryDirectoryContentsResponse::new().set_next_page_token("example");
4642    /// ```
4643    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4644        self.next_page_token = v.into();
4645        self
4646    }
4647}
4648
4649impl wkt::message::Message for QueryDirectoryContentsResponse {
4650    fn typename() -> &'static str {
4651        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
4652    }
4653}
4654
4655#[doc(hidden)]
4656impl google_cloud_gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
4657    type PageItem = crate::model::DirectoryEntry;
4658
4659    fn items(self) -> std::vec::Vec<Self::PageItem> {
4660        self.directory_entries
4661    }
4662
4663    fn next_page_token(&self) -> std::string::String {
4664        use std::clone::Clone;
4665        self.next_page_token.clone()
4666    }
4667}
4668
4669/// Represents a single entry in a directory.
4670#[derive(Clone, Default, PartialEq)]
4671#[non_exhaustive]
4672pub struct DirectoryEntry {
4673    /// Entry with metadata.
4674    pub metadata: std::option::Option<crate::model::FilesystemEntryMetadata>,
4675
4676    /// The entry's contents.
4677    pub entry: std::option::Option<crate::model::directory_entry::Entry>,
4678
4679    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4680}
4681
4682impl DirectoryEntry {
4683    /// Creates a new default instance.
4684    pub fn new() -> Self {
4685        std::default::Default::default()
4686    }
4687
4688    /// Sets the value of [metadata][crate::model::DirectoryEntry::metadata].
4689    ///
4690    /// # Example
4691    /// ```ignore,no_run
4692    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4693    /// use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4694    /// let x = DirectoryEntry::new().set_metadata(FilesystemEntryMetadata::default()/* use setters */);
4695    /// ```
4696    pub fn set_metadata<T>(mut self, v: T) -> Self
4697    where
4698        T: std::convert::Into<crate::model::FilesystemEntryMetadata>,
4699    {
4700        self.metadata = std::option::Option::Some(v.into());
4701        self
4702    }
4703
4704    /// Sets or clears the value of [metadata][crate::model::DirectoryEntry::metadata].
4705    ///
4706    /// # Example
4707    /// ```ignore,no_run
4708    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4709    /// use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4710    /// let x = DirectoryEntry::new().set_or_clear_metadata(Some(FilesystemEntryMetadata::default()/* use setters */));
4711    /// let x = DirectoryEntry::new().set_or_clear_metadata(None::<FilesystemEntryMetadata>);
4712    /// ```
4713    pub fn set_or_clear_metadata<T>(mut self, v: std::option::Option<T>) -> Self
4714    where
4715        T: std::convert::Into<crate::model::FilesystemEntryMetadata>,
4716    {
4717        self.metadata = v.map(|x| x.into());
4718        self
4719    }
4720
4721    /// Sets the value of [entry][crate::model::DirectoryEntry::entry].
4722    ///
4723    /// Note that all the setters affecting `entry` are mutually
4724    /// exclusive.
4725    ///
4726    /// # Example
4727    /// ```ignore,no_run
4728    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4729    /// use google_cloud_dataform_v1::model::directory_entry::Entry;
4730    /// let x = DirectoryEntry::new().set_entry(Some(Entry::File("example".to_string())));
4731    /// ```
4732    pub fn set_entry<
4733        T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
4734    >(
4735        mut self,
4736        v: T,
4737    ) -> Self {
4738        self.entry = v.into();
4739        self
4740    }
4741
4742    /// The value of [entry][crate::model::DirectoryEntry::entry]
4743    /// if it holds a `File`, `None` if the field is not set or
4744    /// holds a different branch.
4745    pub fn file(&self) -> std::option::Option<&std::string::String> {
4746        #[allow(unreachable_patterns)]
4747        self.entry.as_ref().and_then(|v| match v {
4748            crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
4749            _ => std::option::Option::None,
4750        })
4751    }
4752
4753    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4754    /// to hold a `File`.
4755    ///
4756    /// Note that all the setters affecting `entry` are
4757    /// mutually exclusive.
4758    ///
4759    /// # Example
4760    /// ```ignore,no_run
4761    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4762    /// let x = DirectoryEntry::new().set_file("example");
4763    /// assert!(x.file().is_some());
4764    /// assert!(x.directory().is_none());
4765    /// ```
4766    pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4767        self.entry =
4768            std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
4769        self
4770    }
4771
4772    /// The value of [entry][crate::model::DirectoryEntry::entry]
4773    /// if it holds a `Directory`, `None` if the field is not set or
4774    /// holds a different branch.
4775    pub fn directory(&self) -> std::option::Option<&std::string::String> {
4776        #[allow(unreachable_patterns)]
4777        self.entry.as_ref().and_then(|v| match v {
4778            crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
4779            _ => std::option::Option::None,
4780        })
4781    }
4782
4783    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
4784    /// to hold a `Directory`.
4785    ///
4786    /// Note that all the setters affecting `entry` are
4787    /// mutually exclusive.
4788    ///
4789    /// # Example
4790    /// ```ignore,no_run
4791    /// # use google_cloud_dataform_v1::model::DirectoryEntry;
4792    /// let x = DirectoryEntry::new().set_directory("example");
4793    /// assert!(x.directory().is_some());
4794    /// assert!(x.file().is_none());
4795    /// ```
4796    pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4797        self.entry =
4798            std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
4799        self
4800    }
4801}
4802
4803impl wkt::message::Message for DirectoryEntry {
4804    fn typename() -> &'static str {
4805        "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
4806    }
4807}
4808
4809/// Defines additional types related to [DirectoryEntry].
4810pub mod directory_entry {
4811    #[allow(unused_imports)]
4812    use super::*;
4813
4814    /// The entry's contents.
4815    #[derive(Clone, Debug, PartialEq)]
4816    #[non_exhaustive]
4817    pub enum Entry {
4818        /// A file in the directory. The path is returned including the full
4819        /// folder structure from the root.
4820        File(std::string::String),
4821        /// A child directory in the directory. The path is returned including
4822        /// the full folder structure from the root.
4823        Directory(std::string::String),
4824    }
4825}
4826
4827/// Represents metadata for a single entry in a filesystem.
4828#[derive(Clone, Default, PartialEq)]
4829#[non_exhaustive]
4830pub struct FilesystemEntryMetadata {
4831    /// Output only. Provides the size of the entry in bytes. For directories, this
4832    /// will be 0.
4833    pub size_bytes: i64,
4834
4835    /// Output only. Represents the time of the last modification of the entry.
4836    pub update_time: std::option::Option<wkt::Timestamp>,
4837
4838    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4839}
4840
4841impl FilesystemEntryMetadata {
4842    /// Creates a new default instance.
4843    pub fn new() -> Self {
4844        std::default::Default::default()
4845    }
4846
4847    /// Sets the value of [size_bytes][crate::model::FilesystemEntryMetadata::size_bytes].
4848    ///
4849    /// # Example
4850    /// ```ignore,no_run
4851    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4852    /// let x = FilesystemEntryMetadata::new().set_size_bytes(42);
4853    /// ```
4854    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
4855        self.size_bytes = v.into();
4856        self
4857    }
4858
4859    /// Sets the value of [update_time][crate::model::FilesystemEntryMetadata::update_time].
4860    ///
4861    /// # Example
4862    /// ```ignore,no_run
4863    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4864    /// use wkt::Timestamp;
4865    /// let x = FilesystemEntryMetadata::new().set_update_time(Timestamp::default()/* use setters */);
4866    /// ```
4867    pub fn set_update_time<T>(mut self, v: T) -> Self
4868    where
4869        T: std::convert::Into<wkt::Timestamp>,
4870    {
4871        self.update_time = std::option::Option::Some(v.into());
4872        self
4873    }
4874
4875    /// Sets or clears the value of [update_time][crate::model::FilesystemEntryMetadata::update_time].
4876    ///
4877    /// # Example
4878    /// ```ignore,no_run
4879    /// # use google_cloud_dataform_v1::model::FilesystemEntryMetadata;
4880    /// use wkt::Timestamp;
4881    /// let x = FilesystemEntryMetadata::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
4882    /// let x = FilesystemEntryMetadata::new().set_or_clear_update_time(None::<Timestamp>);
4883    /// ```
4884    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
4885    where
4886        T: std::convert::Into<wkt::Timestamp>,
4887    {
4888        self.update_time = v.map(|x| x.into());
4889        self
4890    }
4891}
4892
4893impl wkt::message::Message for FilesystemEntryMetadata {
4894    fn typename() -> &'static str {
4895        "type.googleapis.com/google.cloud.dataform.v1.FilesystemEntryMetadata"
4896    }
4897}
4898
4899/// Configuration containing file search request parameters.
4900#[derive(Clone, Default, PartialEq)]
4901#[non_exhaustive]
4902pub struct SearchFilesRequest {
4903    /// Required. The workspace's name.
4904    pub workspace: std::string::String,
4905
4906    /// Optional. Maximum number of search results to return. The server may return
4907    /// fewer items than requested. If unspecified, the server will pick an
4908    /// appropriate default.
4909    pub page_size: i32,
4910
4911    /// Optional. Page token received from a previous `SearchFilesRequest`
4912    /// call. Provide this to retrieve the subsequent page.
4913    ///
4914    /// When paginating, all other parameters provided to `SearchFilesRequest`,
4915    /// with the exception of `page_size`, must match the call that provided the
4916    /// page token.
4917    pub page_token: std::string::String,
4918
4919    /// Optional. Optional filter for the returned list in filtering format.
4920    /// Filtering is only currently supported on the `path` field.
4921    /// See <https://google.aip.dev/160> for details.
4922    pub filter: std::string::String,
4923
4924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4925}
4926
4927impl SearchFilesRequest {
4928    /// Creates a new default instance.
4929    pub fn new() -> Self {
4930        std::default::Default::default()
4931    }
4932
4933    /// Sets the value of [workspace][crate::model::SearchFilesRequest::workspace].
4934    ///
4935    /// # Example
4936    /// ```ignore,no_run
4937    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4938    /// # let project_id = "project_id";
4939    /// # let location_id = "location_id";
4940    /// # let repository_id = "repository_id";
4941    /// # let workspace_id = "workspace_id";
4942    /// let x = SearchFilesRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
4943    /// ```
4944    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4945        self.workspace = v.into();
4946        self
4947    }
4948
4949    /// Sets the value of [page_size][crate::model::SearchFilesRequest::page_size].
4950    ///
4951    /// # Example
4952    /// ```ignore,no_run
4953    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4954    /// let x = SearchFilesRequest::new().set_page_size(42);
4955    /// ```
4956    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4957        self.page_size = v.into();
4958        self
4959    }
4960
4961    /// Sets the value of [page_token][crate::model::SearchFilesRequest::page_token].
4962    ///
4963    /// # Example
4964    /// ```ignore,no_run
4965    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4966    /// let x = SearchFilesRequest::new().set_page_token("example");
4967    /// ```
4968    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4969        self.page_token = v.into();
4970        self
4971    }
4972
4973    /// Sets the value of [filter][crate::model::SearchFilesRequest::filter].
4974    ///
4975    /// # Example
4976    /// ```ignore,no_run
4977    /// # use google_cloud_dataform_v1::model::SearchFilesRequest;
4978    /// let x = SearchFilesRequest::new().set_filter("example");
4979    /// ```
4980    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4981        self.filter = v.into();
4982        self
4983    }
4984}
4985
4986impl wkt::message::Message for SearchFilesRequest {
4987    fn typename() -> &'static str {
4988        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
4989    }
4990}
4991
4992/// Client-facing representation of a file search response.
4993#[derive(Clone, Default, PartialEq)]
4994#[non_exhaustive]
4995pub struct SearchFilesResponse {
4996    /// List of matched results.
4997    pub search_results: std::vec::Vec<crate::model::SearchResult>,
4998
4999    /// Optional. A token, which can be sent as `page_token` to retrieve the next
5000    /// page. If this field is omitted, there are no subsequent pages.
5001    pub next_page_token: std::string::String,
5002
5003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5004}
5005
5006impl SearchFilesResponse {
5007    /// Creates a new default instance.
5008    pub fn new() -> Self {
5009        std::default::Default::default()
5010    }
5011
5012    /// Sets the value of [search_results][crate::model::SearchFilesResponse::search_results].
5013    ///
5014    /// # Example
5015    /// ```ignore,no_run
5016    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
5017    /// use google_cloud_dataform_v1::model::SearchResult;
5018    /// let x = SearchFilesResponse::new()
5019    ///     .set_search_results([
5020    ///         SearchResult::default()/* use setters */,
5021    ///         SearchResult::default()/* use (different) setters */,
5022    ///     ]);
5023    /// ```
5024    pub fn set_search_results<T, V>(mut self, v: T) -> Self
5025    where
5026        T: std::iter::IntoIterator<Item = V>,
5027        V: std::convert::Into<crate::model::SearchResult>,
5028    {
5029        use std::iter::Iterator;
5030        self.search_results = v.into_iter().map(|i| i.into()).collect();
5031        self
5032    }
5033
5034    /// Sets the value of [next_page_token][crate::model::SearchFilesResponse::next_page_token].
5035    ///
5036    /// # Example
5037    /// ```ignore,no_run
5038    /// # use google_cloud_dataform_v1::model::SearchFilesResponse;
5039    /// let x = SearchFilesResponse::new().set_next_page_token("example");
5040    /// ```
5041    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5042        self.next_page_token = v.into();
5043        self
5044    }
5045}
5046
5047impl wkt::message::Message for SearchFilesResponse {
5048    fn typename() -> &'static str {
5049        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
5050    }
5051}
5052
5053#[doc(hidden)]
5054impl google_cloud_gax::paginator::internal::PageableResponse for SearchFilesResponse {
5055    type PageItem = crate::model::SearchResult;
5056
5057    fn items(self) -> std::vec::Vec<Self::PageItem> {
5058        self.search_results
5059    }
5060
5061    fn next_page_token(&self) -> std::string::String {
5062        use std::clone::Clone;
5063        self.next_page_token.clone()
5064    }
5065}
5066
5067/// Client-facing representation of a search result entry.
5068#[derive(Clone, Default, PartialEq)]
5069#[non_exhaustive]
5070pub struct SearchResult {
5071    /// The entry's contents.
5072    pub entry: std::option::Option<crate::model::search_result::Entry>,
5073
5074    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5075}
5076
5077impl SearchResult {
5078    /// Creates a new default instance.
5079    pub fn new() -> Self {
5080        std::default::Default::default()
5081    }
5082
5083    /// Sets the value of [entry][crate::model::SearchResult::entry].
5084    ///
5085    /// Note that all the setters affecting `entry` are mutually
5086    /// exclusive.
5087    ///
5088    /// # Example
5089    /// ```ignore,no_run
5090    /// # use google_cloud_dataform_v1::model::SearchResult;
5091    /// use google_cloud_dataform_v1::model::FileSearchResult;
5092    /// let x = SearchResult::new().set_entry(Some(
5093    ///     google_cloud_dataform_v1::model::search_result::Entry::File(FileSearchResult::default().into())));
5094    /// ```
5095    pub fn set_entry<
5096        T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
5097    >(
5098        mut self,
5099        v: T,
5100    ) -> Self {
5101        self.entry = v.into();
5102        self
5103    }
5104
5105    /// The value of [entry][crate::model::SearchResult::entry]
5106    /// if it holds a `File`, `None` if the field is not set or
5107    /// holds a different branch.
5108    pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
5109        #[allow(unreachable_patterns)]
5110        self.entry.as_ref().and_then(|v| match v {
5111            crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
5112            _ => std::option::Option::None,
5113        })
5114    }
5115
5116    /// Sets the value of [entry][crate::model::SearchResult::entry]
5117    /// to hold a `File`.
5118    ///
5119    /// Note that all the setters affecting `entry` are
5120    /// mutually exclusive.
5121    ///
5122    /// # Example
5123    /// ```ignore,no_run
5124    /// # use google_cloud_dataform_v1::model::SearchResult;
5125    /// use google_cloud_dataform_v1::model::FileSearchResult;
5126    /// let x = SearchResult::new().set_file(FileSearchResult::default()/* use setters */);
5127    /// assert!(x.file().is_some());
5128    /// assert!(x.directory().is_none());
5129    /// ```
5130    pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
5131        mut self,
5132        v: T,
5133    ) -> Self {
5134        self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
5135        self
5136    }
5137
5138    /// The value of [entry][crate::model::SearchResult::entry]
5139    /// if it holds a `Directory`, `None` if the field is not set or
5140    /// holds a different branch.
5141    pub fn directory(
5142        &self,
5143    ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
5144        #[allow(unreachable_patterns)]
5145        self.entry.as_ref().and_then(|v| match v {
5146            crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
5147            _ => std::option::Option::None,
5148        })
5149    }
5150
5151    /// Sets the value of [entry][crate::model::SearchResult::entry]
5152    /// to hold a `Directory`.
5153    ///
5154    /// Note that all the setters affecting `entry` are
5155    /// mutually exclusive.
5156    ///
5157    /// # Example
5158    /// ```ignore,no_run
5159    /// # use google_cloud_dataform_v1::model::SearchResult;
5160    /// use google_cloud_dataform_v1::model::DirectorySearchResult;
5161    /// let x = SearchResult::new().set_directory(DirectorySearchResult::default()/* use setters */);
5162    /// assert!(x.directory().is_some());
5163    /// assert!(x.file().is_none());
5164    /// ```
5165    pub fn set_directory<
5166        T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
5167    >(
5168        mut self,
5169        v: T,
5170    ) -> Self {
5171        self.entry =
5172            std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
5173        self
5174    }
5175}
5176
5177impl wkt::message::Message for SearchResult {
5178    fn typename() -> &'static str {
5179        "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
5180    }
5181}
5182
5183/// Defines additional types related to [SearchResult].
5184pub mod search_result {
5185    #[allow(unused_imports)]
5186    use super::*;
5187
5188    /// The entry's contents.
5189    #[derive(Clone, Debug, PartialEq)]
5190    #[non_exhaustive]
5191    pub enum Entry {
5192        /// Details when search result is a file.
5193        File(std::boxed::Box<crate::model::FileSearchResult>),
5194        /// Details when search result is a directory.
5195        Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
5196    }
5197}
5198
5199/// Client-facing representation of a file entry in search results.
5200#[derive(Clone, Default, PartialEq)]
5201#[non_exhaustive]
5202pub struct FileSearchResult {
5203    /// File system path relative to the workspace root.
5204    pub path: std::string::String,
5205
5206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5207}
5208
5209impl FileSearchResult {
5210    /// Creates a new default instance.
5211    pub fn new() -> Self {
5212        std::default::Default::default()
5213    }
5214
5215    /// Sets the value of [path][crate::model::FileSearchResult::path].
5216    ///
5217    /// # Example
5218    /// ```ignore,no_run
5219    /// # use google_cloud_dataform_v1::model::FileSearchResult;
5220    /// let x = FileSearchResult::new().set_path("example");
5221    /// ```
5222    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5223        self.path = v.into();
5224        self
5225    }
5226}
5227
5228impl wkt::message::Message for FileSearchResult {
5229    fn typename() -> &'static str {
5230        "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
5231    }
5232}
5233
5234/// Client-facing representation of a directory entry in search results.
5235#[derive(Clone, Default, PartialEq)]
5236#[non_exhaustive]
5237pub struct DirectorySearchResult {
5238    /// File system path relative to the workspace root.
5239    pub path: std::string::String,
5240
5241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5242}
5243
5244impl DirectorySearchResult {
5245    /// Creates a new default instance.
5246    pub fn new() -> Self {
5247        std::default::Default::default()
5248    }
5249
5250    /// Sets the value of [path][crate::model::DirectorySearchResult::path].
5251    ///
5252    /// # Example
5253    /// ```ignore,no_run
5254    /// # use google_cloud_dataform_v1::model::DirectorySearchResult;
5255    /// let x = DirectorySearchResult::new().set_path("example");
5256    /// ```
5257    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5258        self.path = v.into();
5259        self
5260    }
5261}
5262
5263impl wkt::message::Message for DirectorySearchResult {
5264    fn typename() -> &'static str {
5265        "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
5266    }
5267}
5268
5269/// `MakeDirectory` request message.
5270#[derive(Clone, Default, PartialEq)]
5271#[non_exhaustive]
5272pub struct MakeDirectoryRequest {
5273    /// Required. The workspace's name.
5274    pub workspace: std::string::String,
5275
5276    /// Required. The directory's full path including directory name, relative to
5277    /// the workspace root.
5278    pub path: std::string::String,
5279
5280    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5281}
5282
5283impl MakeDirectoryRequest {
5284    /// Creates a new default instance.
5285    pub fn new() -> Self {
5286        std::default::Default::default()
5287    }
5288
5289    /// Sets the value of [workspace][crate::model::MakeDirectoryRequest::workspace].
5290    ///
5291    /// # Example
5292    /// ```ignore,no_run
5293    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
5294    /// # let project_id = "project_id";
5295    /// # let location_id = "location_id";
5296    /// # let repository_id = "repository_id";
5297    /// # let workspace_id = "workspace_id";
5298    /// let x = MakeDirectoryRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5299    /// ```
5300    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5301        self.workspace = v.into();
5302        self
5303    }
5304
5305    /// Sets the value of [path][crate::model::MakeDirectoryRequest::path].
5306    ///
5307    /// # Example
5308    /// ```ignore,no_run
5309    /// # use google_cloud_dataform_v1::model::MakeDirectoryRequest;
5310    /// let x = MakeDirectoryRequest::new().set_path("example");
5311    /// ```
5312    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5313        self.path = v.into();
5314        self
5315    }
5316}
5317
5318impl wkt::message::Message for MakeDirectoryRequest {
5319    fn typename() -> &'static str {
5320        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
5321    }
5322}
5323
5324/// `MakeDirectory` response message.
5325#[derive(Clone, Default, PartialEq)]
5326#[non_exhaustive]
5327pub struct MakeDirectoryResponse {
5328    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5329}
5330
5331impl MakeDirectoryResponse {
5332    /// Creates a new default instance.
5333    pub fn new() -> Self {
5334        std::default::Default::default()
5335    }
5336}
5337
5338impl wkt::message::Message for MakeDirectoryResponse {
5339    fn typename() -> &'static str {
5340        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
5341    }
5342}
5343
5344/// `RemoveDirectory` request message.
5345#[derive(Clone, Default, PartialEq)]
5346#[non_exhaustive]
5347pub struct RemoveDirectoryRequest {
5348    /// Required. The workspace's name.
5349    pub workspace: std::string::String,
5350
5351    /// Required. The directory's full path including directory name, relative to
5352    /// the workspace root.
5353    pub path: std::string::String,
5354
5355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5356}
5357
5358impl RemoveDirectoryRequest {
5359    /// Creates a new default instance.
5360    pub fn new() -> Self {
5361        std::default::Default::default()
5362    }
5363
5364    /// Sets the value of [workspace][crate::model::RemoveDirectoryRequest::workspace].
5365    ///
5366    /// # Example
5367    /// ```ignore,no_run
5368    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
5369    /// # let project_id = "project_id";
5370    /// # let location_id = "location_id";
5371    /// # let repository_id = "repository_id";
5372    /// # let workspace_id = "workspace_id";
5373    /// let x = RemoveDirectoryRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5374    /// ```
5375    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5376        self.workspace = v.into();
5377        self
5378    }
5379
5380    /// Sets the value of [path][crate::model::RemoveDirectoryRequest::path].
5381    ///
5382    /// # Example
5383    /// ```ignore,no_run
5384    /// # use google_cloud_dataform_v1::model::RemoveDirectoryRequest;
5385    /// let x = RemoveDirectoryRequest::new().set_path("example");
5386    /// ```
5387    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5388        self.path = v.into();
5389        self
5390    }
5391}
5392
5393impl wkt::message::Message for RemoveDirectoryRequest {
5394    fn typename() -> &'static str {
5395        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
5396    }
5397}
5398
5399/// `RemoveDirectory` response message.
5400#[derive(Clone, Default, PartialEq)]
5401#[non_exhaustive]
5402pub struct RemoveDirectoryResponse {
5403    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5404}
5405
5406impl RemoveDirectoryResponse {
5407    /// Creates a new default instance.
5408    pub fn new() -> Self {
5409        std::default::Default::default()
5410    }
5411}
5412
5413impl wkt::message::Message for RemoveDirectoryResponse {
5414    fn typename() -> &'static str {
5415        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
5416    }
5417}
5418
5419/// `MoveDirectory` request message.
5420#[derive(Clone, Default, PartialEq)]
5421#[non_exhaustive]
5422pub struct MoveDirectoryRequest {
5423    /// Required. The workspace's name.
5424    pub workspace: std::string::String,
5425
5426    /// Required. The directory's full path including directory name, relative to
5427    /// the workspace root.
5428    pub path: std::string::String,
5429
5430    /// Required. The new path for the directory including directory name, rooted
5431    /// at workspace root.
5432    pub new_path: std::string::String,
5433
5434    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5435}
5436
5437impl MoveDirectoryRequest {
5438    /// Creates a new default instance.
5439    pub fn new() -> Self {
5440        std::default::Default::default()
5441    }
5442
5443    /// Sets the value of [workspace][crate::model::MoveDirectoryRequest::workspace].
5444    ///
5445    /// # Example
5446    /// ```ignore,no_run
5447    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5448    /// # let project_id = "project_id";
5449    /// # let location_id = "location_id";
5450    /// # let repository_id = "repository_id";
5451    /// # let workspace_id = "workspace_id";
5452    /// let x = MoveDirectoryRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5453    /// ```
5454    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5455        self.workspace = v.into();
5456        self
5457    }
5458
5459    /// Sets the value of [path][crate::model::MoveDirectoryRequest::path].
5460    ///
5461    /// # Example
5462    /// ```ignore,no_run
5463    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5464    /// let x = MoveDirectoryRequest::new().set_path("example");
5465    /// ```
5466    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5467        self.path = v.into();
5468        self
5469    }
5470
5471    /// Sets the value of [new_path][crate::model::MoveDirectoryRequest::new_path].
5472    ///
5473    /// # Example
5474    /// ```ignore,no_run
5475    /// # use google_cloud_dataform_v1::model::MoveDirectoryRequest;
5476    /// let x = MoveDirectoryRequest::new().set_new_path("example");
5477    /// ```
5478    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5479        self.new_path = v.into();
5480        self
5481    }
5482}
5483
5484impl wkt::message::Message for MoveDirectoryRequest {
5485    fn typename() -> &'static str {
5486        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
5487    }
5488}
5489
5490/// `MoveDirectory` response message.
5491#[derive(Clone, Default, PartialEq)]
5492#[non_exhaustive]
5493pub struct MoveDirectoryResponse {
5494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5495}
5496
5497impl MoveDirectoryResponse {
5498    /// Creates a new default instance.
5499    pub fn new() -> Self {
5500        std::default::Default::default()
5501    }
5502}
5503
5504impl wkt::message::Message for MoveDirectoryResponse {
5505    fn typename() -> &'static str {
5506        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
5507    }
5508}
5509
5510/// `ReadFile` request message.
5511#[derive(Clone, Default, PartialEq)]
5512#[non_exhaustive]
5513pub struct ReadFileRequest {
5514    /// Required. The workspace's name.
5515    pub workspace: std::string::String,
5516
5517    /// Required. The file's full path including filename, relative to the
5518    /// workspace root.
5519    pub path: std::string::String,
5520
5521    /// Optional. The Git revision of the file to return. If left empty, the
5522    /// current contents of `path` will be returned.
5523    pub revision: std::string::String,
5524
5525    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5526}
5527
5528impl ReadFileRequest {
5529    /// Creates a new default instance.
5530    pub fn new() -> Self {
5531        std::default::Default::default()
5532    }
5533
5534    /// Sets the value of [workspace][crate::model::ReadFileRequest::workspace].
5535    ///
5536    /// # Example
5537    /// ```ignore,no_run
5538    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5539    /// # let project_id = "project_id";
5540    /// # let location_id = "location_id";
5541    /// # let repository_id = "repository_id";
5542    /// # let workspace_id = "workspace_id";
5543    /// let x = ReadFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5544    /// ```
5545    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5546        self.workspace = v.into();
5547        self
5548    }
5549
5550    /// Sets the value of [path][crate::model::ReadFileRequest::path].
5551    ///
5552    /// # Example
5553    /// ```ignore,no_run
5554    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5555    /// let x = ReadFileRequest::new().set_path("example");
5556    /// ```
5557    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5558        self.path = v.into();
5559        self
5560    }
5561
5562    /// Sets the value of [revision][crate::model::ReadFileRequest::revision].
5563    ///
5564    /// # Example
5565    /// ```ignore,no_run
5566    /// # use google_cloud_dataform_v1::model::ReadFileRequest;
5567    /// let x = ReadFileRequest::new().set_revision("example");
5568    /// ```
5569    pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5570        self.revision = v.into();
5571        self
5572    }
5573}
5574
5575impl wkt::message::Message for ReadFileRequest {
5576    fn typename() -> &'static str {
5577        "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
5578    }
5579}
5580
5581/// `ReadFile` response message.
5582#[derive(Clone, Default, PartialEq)]
5583#[non_exhaustive]
5584pub struct ReadFileResponse {
5585    /// The file's contents.
5586    pub file_contents: ::bytes::Bytes,
5587
5588    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5589}
5590
5591impl ReadFileResponse {
5592    /// Creates a new default instance.
5593    pub fn new() -> Self {
5594        std::default::Default::default()
5595    }
5596
5597    /// Sets the value of [file_contents][crate::model::ReadFileResponse::file_contents].
5598    ///
5599    /// # Example
5600    /// ```ignore,no_run
5601    /// # use google_cloud_dataform_v1::model::ReadFileResponse;
5602    /// let x = ReadFileResponse::new().set_file_contents(bytes::Bytes::from_static(b"example"));
5603    /// ```
5604    pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5605        self.file_contents = v.into();
5606        self
5607    }
5608}
5609
5610impl wkt::message::Message for ReadFileResponse {
5611    fn typename() -> &'static str {
5612        "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
5613    }
5614}
5615
5616/// `RemoveFile` request message.
5617#[derive(Clone, Default, PartialEq)]
5618#[non_exhaustive]
5619pub struct RemoveFileRequest {
5620    /// Required. The workspace's name.
5621    pub workspace: std::string::String,
5622
5623    /// Required. The file's full path including filename, relative to the
5624    /// workspace root.
5625    pub path: std::string::String,
5626
5627    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5628}
5629
5630impl RemoveFileRequest {
5631    /// Creates a new default instance.
5632    pub fn new() -> Self {
5633        std::default::Default::default()
5634    }
5635
5636    /// Sets the value of [workspace][crate::model::RemoveFileRequest::workspace].
5637    ///
5638    /// # Example
5639    /// ```ignore,no_run
5640    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5641    /// # let project_id = "project_id";
5642    /// # let location_id = "location_id";
5643    /// # let repository_id = "repository_id";
5644    /// # let workspace_id = "workspace_id";
5645    /// let x = RemoveFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5646    /// ```
5647    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5648        self.workspace = v.into();
5649        self
5650    }
5651
5652    /// Sets the value of [path][crate::model::RemoveFileRequest::path].
5653    ///
5654    /// # Example
5655    /// ```ignore,no_run
5656    /// # use google_cloud_dataform_v1::model::RemoveFileRequest;
5657    /// let x = RemoveFileRequest::new().set_path("example");
5658    /// ```
5659    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5660        self.path = v.into();
5661        self
5662    }
5663}
5664
5665impl wkt::message::Message for RemoveFileRequest {
5666    fn typename() -> &'static str {
5667        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
5668    }
5669}
5670
5671/// `RemoveFile` response message.
5672#[derive(Clone, Default, PartialEq)]
5673#[non_exhaustive]
5674pub struct RemoveFileResponse {
5675    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5676}
5677
5678impl RemoveFileResponse {
5679    /// Creates a new default instance.
5680    pub fn new() -> Self {
5681        std::default::Default::default()
5682    }
5683}
5684
5685impl wkt::message::Message for RemoveFileResponse {
5686    fn typename() -> &'static str {
5687        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
5688    }
5689}
5690
5691/// `MoveFile` request message.
5692#[derive(Clone, Default, PartialEq)]
5693#[non_exhaustive]
5694pub struct MoveFileRequest {
5695    /// Required. The workspace's name.
5696    pub workspace: std::string::String,
5697
5698    /// Required. The file's full path including filename, relative to the
5699    /// workspace root.
5700    pub path: std::string::String,
5701
5702    /// Required. The file's new path including filename, relative to the workspace
5703    /// root.
5704    pub new_path: std::string::String,
5705
5706    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5707}
5708
5709impl MoveFileRequest {
5710    /// Creates a new default instance.
5711    pub fn new() -> Self {
5712        std::default::Default::default()
5713    }
5714
5715    /// Sets the value of [workspace][crate::model::MoveFileRequest::workspace].
5716    ///
5717    /// # Example
5718    /// ```ignore,no_run
5719    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5720    /// # let project_id = "project_id";
5721    /// # let location_id = "location_id";
5722    /// # let repository_id = "repository_id";
5723    /// # let workspace_id = "workspace_id";
5724    /// let x = MoveFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5725    /// ```
5726    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5727        self.workspace = v.into();
5728        self
5729    }
5730
5731    /// Sets the value of [path][crate::model::MoveFileRequest::path].
5732    ///
5733    /// # Example
5734    /// ```ignore,no_run
5735    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5736    /// let x = MoveFileRequest::new().set_path("example");
5737    /// ```
5738    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5739        self.path = v.into();
5740        self
5741    }
5742
5743    /// Sets the value of [new_path][crate::model::MoveFileRequest::new_path].
5744    ///
5745    /// # Example
5746    /// ```ignore,no_run
5747    /// # use google_cloud_dataform_v1::model::MoveFileRequest;
5748    /// let x = MoveFileRequest::new().set_new_path("example");
5749    /// ```
5750    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5751        self.new_path = v.into();
5752        self
5753    }
5754}
5755
5756impl wkt::message::Message for MoveFileRequest {
5757    fn typename() -> &'static str {
5758        "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
5759    }
5760}
5761
5762/// `MoveFile` response message.
5763#[derive(Clone, Default, PartialEq)]
5764#[non_exhaustive]
5765pub struct MoveFileResponse {
5766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5767}
5768
5769impl MoveFileResponse {
5770    /// Creates a new default instance.
5771    pub fn new() -> Self {
5772        std::default::Default::default()
5773    }
5774}
5775
5776impl wkt::message::Message for MoveFileResponse {
5777    fn typename() -> &'static str {
5778        "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
5779    }
5780}
5781
5782/// `WriteFile` request message.
5783#[derive(Clone, Default, PartialEq)]
5784#[non_exhaustive]
5785pub struct WriteFileRequest {
5786    /// Required. The workspace's name.
5787    pub workspace: std::string::String,
5788
5789    /// Required. The file.
5790    pub path: std::string::String,
5791
5792    /// Required. The file's contents.
5793    pub contents: ::bytes::Bytes,
5794
5795    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5796}
5797
5798impl WriteFileRequest {
5799    /// Creates a new default instance.
5800    pub fn new() -> Self {
5801        std::default::Default::default()
5802    }
5803
5804    /// Sets the value of [workspace][crate::model::WriteFileRequest::workspace].
5805    ///
5806    /// # Example
5807    /// ```ignore,no_run
5808    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5809    /// # let project_id = "project_id";
5810    /// # let location_id = "location_id";
5811    /// # let repository_id = "repository_id";
5812    /// # let workspace_id = "workspace_id";
5813    /// let x = WriteFileRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5814    /// ```
5815    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5816        self.workspace = v.into();
5817        self
5818    }
5819
5820    /// Sets the value of [path][crate::model::WriteFileRequest::path].
5821    ///
5822    /// # Example
5823    /// ```ignore,no_run
5824    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5825    /// let x = WriteFileRequest::new().set_path("example");
5826    /// ```
5827    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5828        self.path = v.into();
5829        self
5830    }
5831
5832    /// Sets the value of [contents][crate::model::WriteFileRequest::contents].
5833    ///
5834    /// # Example
5835    /// ```ignore,no_run
5836    /// # use google_cloud_dataform_v1::model::WriteFileRequest;
5837    /// let x = WriteFileRequest::new().set_contents(bytes::Bytes::from_static(b"example"));
5838    /// ```
5839    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5840        self.contents = v.into();
5841        self
5842    }
5843}
5844
5845impl wkt::message::Message for WriteFileRequest {
5846    fn typename() -> &'static str {
5847        "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
5848    }
5849}
5850
5851/// `WriteFile` response message.
5852#[derive(Clone, Default, PartialEq)]
5853#[non_exhaustive]
5854pub struct WriteFileResponse {
5855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5856}
5857
5858impl WriteFileResponse {
5859    /// Creates a new default instance.
5860    pub fn new() -> Self {
5861        std::default::Default::default()
5862    }
5863}
5864
5865impl wkt::message::Message for WriteFileResponse {
5866    fn typename() -> &'static str {
5867        "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
5868    }
5869}
5870
5871/// `InstallNpmPackages` request message.
5872#[derive(Clone, Default, PartialEq)]
5873#[non_exhaustive]
5874pub struct InstallNpmPackagesRequest {
5875    /// Required. The workspace's name.
5876    pub workspace: std::string::String,
5877
5878    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5879}
5880
5881impl InstallNpmPackagesRequest {
5882    /// Creates a new default instance.
5883    pub fn new() -> Self {
5884        std::default::Default::default()
5885    }
5886
5887    /// Sets the value of [workspace][crate::model::InstallNpmPackagesRequest::workspace].
5888    ///
5889    /// # Example
5890    /// ```ignore,no_run
5891    /// # use google_cloud_dataform_v1::model::InstallNpmPackagesRequest;
5892    /// # let project_id = "project_id";
5893    /// # let location_id = "location_id";
5894    /// # let repository_id = "repository_id";
5895    /// # let workspace_id = "workspace_id";
5896    /// let x = InstallNpmPackagesRequest::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
5897    /// ```
5898    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5899        self.workspace = v.into();
5900        self
5901    }
5902}
5903
5904impl wkt::message::Message for InstallNpmPackagesRequest {
5905    fn typename() -> &'static str {
5906        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
5907    }
5908}
5909
5910/// `InstallNpmPackages` response message.
5911#[derive(Clone, Default, PartialEq)]
5912#[non_exhaustive]
5913pub struct InstallNpmPackagesResponse {
5914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5915}
5916
5917impl InstallNpmPackagesResponse {
5918    /// Creates a new default instance.
5919    pub fn new() -> Self {
5920        std::default::Default::default()
5921    }
5922}
5923
5924impl wkt::message::Message for InstallNpmPackagesResponse {
5925    fn typename() -> &'static str {
5926        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
5927    }
5928}
5929
5930/// Represents a Dataform release configuration.
5931#[derive(Clone, Default, PartialEq)]
5932#[non_exhaustive]
5933pub struct ReleaseConfig {
5934    /// Identifier. The release config's name.
5935    pub name: std::string::String,
5936
5937    /// Required. Git commit/tag/branch name at which the repository should be
5938    /// compiled. Must exist in the remote repository. Examples:
5939    ///
5940    /// - a commit SHA: `12ade345`
5941    /// - a tag: `tag1`
5942    /// - a branch name: `branch1`
5943    pub git_commitish: std::string::String,
5944
5945    /// Optional. If set, fields of `code_compilation_config` override the default
5946    /// compilation settings that are specified in dataform.json.
5947    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
5948
5949    /// Optional. Optional schedule (in cron format) for automatic creation of
5950    /// compilation results.
5951    pub cron_schedule: std::string::String,
5952
5953    /// Optional. Specifies the time zone to be used when interpreting
5954    /// cron_schedule. Must be a time zone name from the time zone database
5955    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
5956    /// unspecified, the default is UTC.
5957    pub time_zone: std::string::String,
5958
5959    /// Output only. Records of the 10 most recent scheduled release attempts,
5960    /// ordered in descending order of `release_time`. Updated whenever automatic
5961    /// creation of a compilation result is triggered by cron_schedule.
5962    pub recent_scheduled_release_records:
5963        std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
5964
5965    /// Optional. The name of the currently released compilation result for this
5966    /// release config. This value is updated when a compilation result is
5967    /// automatically created from this release config (using cron_schedule), or
5968    /// when this resource is updated by API call (perhaps to roll back to an
5969    /// earlier release). The compilation result must have been created using this
5970    /// release config. Must be in the format
5971    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
5972    pub release_compilation_result: std::string::String,
5973
5974    /// Optional. Disables automatic creation of compilation results.
5975    pub disabled: bool,
5976
5977    /// Output only. All the metadata information that is used internally to serve
5978    /// the resource. For example: timestamps, flags, status fields, etc. The
5979    /// format of this field is a JSON string.
5980    pub internal_metadata: std::option::Option<std::string::String>,
5981
5982    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5983}
5984
5985impl ReleaseConfig {
5986    /// Creates a new default instance.
5987    pub fn new() -> Self {
5988        std::default::Default::default()
5989    }
5990
5991    /// Sets the value of [name][crate::model::ReleaseConfig::name].
5992    ///
5993    /// # Example
5994    /// ```ignore,no_run
5995    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
5996    /// # let project_id = "project_id";
5997    /// # let location_id = "location_id";
5998    /// # let repository_id = "repository_id";
5999    /// # let release_config_id = "release_config_id";
6000    /// let x = ReleaseConfig::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
6001    /// ```
6002    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6003        self.name = v.into();
6004        self
6005    }
6006
6007    /// Sets the value of [git_commitish][crate::model::ReleaseConfig::git_commitish].
6008    ///
6009    /// # Example
6010    /// ```ignore,no_run
6011    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6012    /// let x = ReleaseConfig::new().set_git_commitish("example");
6013    /// ```
6014    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6015        self.git_commitish = v.into();
6016        self
6017    }
6018
6019    /// Sets the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
6020    ///
6021    /// # Example
6022    /// ```ignore,no_run
6023    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6024    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6025    /// let x = ReleaseConfig::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
6026    /// ```
6027    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
6028    where
6029        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6030    {
6031        self.code_compilation_config = std::option::Option::Some(v.into());
6032        self
6033    }
6034
6035    /// Sets or clears the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
6036    ///
6037    /// # Example
6038    /// ```ignore,no_run
6039    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6040    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6041    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
6042    /// let x = ReleaseConfig::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
6043    /// ```
6044    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
6045    where
6046        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6047    {
6048        self.code_compilation_config = v.map(|x| x.into());
6049        self
6050    }
6051
6052    /// Sets the value of [cron_schedule][crate::model::ReleaseConfig::cron_schedule].
6053    ///
6054    /// # Example
6055    /// ```ignore,no_run
6056    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6057    /// let x = ReleaseConfig::new().set_cron_schedule("example");
6058    /// ```
6059    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6060        self.cron_schedule = v.into();
6061        self
6062    }
6063
6064    /// Sets the value of [time_zone][crate::model::ReleaseConfig::time_zone].
6065    ///
6066    /// # Example
6067    /// ```ignore,no_run
6068    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6069    /// let x = ReleaseConfig::new().set_time_zone("example");
6070    /// ```
6071    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6072        self.time_zone = v.into();
6073        self
6074    }
6075
6076    /// Sets the value of [recent_scheduled_release_records][crate::model::ReleaseConfig::recent_scheduled_release_records].
6077    ///
6078    /// # Example
6079    /// ```ignore,no_run
6080    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6081    /// use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6082    /// let x = ReleaseConfig::new()
6083    ///     .set_recent_scheduled_release_records([
6084    ///         ScheduledReleaseRecord::default()/* use setters */,
6085    ///         ScheduledReleaseRecord::default()/* use (different) setters */,
6086    ///     ]);
6087    /// ```
6088    pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
6089    where
6090        T: std::iter::IntoIterator<Item = V>,
6091        V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
6092    {
6093        use std::iter::Iterator;
6094        self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
6095        self
6096    }
6097
6098    /// Sets the value of [release_compilation_result][crate::model::ReleaseConfig::release_compilation_result].
6099    ///
6100    /// # Example
6101    /// ```ignore,no_run
6102    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6103    /// # let project_id = "project_id";
6104    /// # let location_id = "location_id";
6105    /// # let repository_id = "repository_id";
6106    /// # let compilation_result_id = "compilation_result_id";
6107    /// let x = ReleaseConfig::new().set_release_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
6108    /// ```
6109    pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
6110        mut self,
6111        v: T,
6112    ) -> Self {
6113        self.release_compilation_result = v.into();
6114        self
6115    }
6116
6117    /// Sets the value of [disabled][crate::model::ReleaseConfig::disabled].
6118    ///
6119    /// # Example
6120    /// ```ignore,no_run
6121    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6122    /// let x = ReleaseConfig::new().set_disabled(true);
6123    /// ```
6124    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6125        self.disabled = v.into();
6126        self
6127    }
6128
6129    /// Sets the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
6130    ///
6131    /// # Example
6132    /// ```ignore,no_run
6133    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6134    /// let x = ReleaseConfig::new().set_internal_metadata("example");
6135    /// ```
6136    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
6137    where
6138        T: std::convert::Into<std::string::String>,
6139    {
6140        self.internal_metadata = std::option::Option::Some(v.into());
6141        self
6142    }
6143
6144    /// Sets or clears the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
6145    ///
6146    /// # Example
6147    /// ```ignore,no_run
6148    /// # use google_cloud_dataform_v1::model::ReleaseConfig;
6149    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(Some("example"));
6150    /// let x = ReleaseConfig::new().set_or_clear_internal_metadata(None::<String>);
6151    /// ```
6152    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
6153    where
6154        T: std::convert::Into<std::string::String>,
6155    {
6156        self.internal_metadata = v.map(|x| x.into());
6157        self
6158    }
6159}
6160
6161impl wkt::message::Message for ReleaseConfig {
6162    fn typename() -> &'static str {
6163        "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
6164    }
6165}
6166
6167/// Defines additional types related to [ReleaseConfig].
6168pub mod release_config {
6169    #[allow(unused_imports)]
6170    use super::*;
6171
6172    /// A record of an attempt to create a compilation result for this release
6173    /// config.
6174    #[derive(Clone, Default, PartialEq)]
6175    #[non_exhaustive]
6176    pub struct ScheduledReleaseRecord {
6177        /// Output only. The timestamp of this release attempt.
6178        pub release_time: std::option::Option<wkt::Timestamp>,
6179
6180        /// The result of this release attempt.
6181        pub result:
6182            std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
6183
6184        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6185    }
6186
6187    impl ScheduledReleaseRecord {
6188        /// Creates a new default instance.
6189        pub fn new() -> Self {
6190            std::default::Default::default()
6191        }
6192
6193        /// Sets the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
6194        ///
6195        /// # Example
6196        /// ```ignore,no_run
6197        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6198        /// use wkt::Timestamp;
6199        /// let x = ScheduledReleaseRecord::new().set_release_time(Timestamp::default()/* use setters */);
6200        /// ```
6201        pub fn set_release_time<T>(mut self, v: T) -> Self
6202        where
6203            T: std::convert::Into<wkt::Timestamp>,
6204        {
6205            self.release_time = std::option::Option::Some(v.into());
6206            self
6207        }
6208
6209        /// Sets or clears the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
6210        ///
6211        /// # Example
6212        /// ```ignore,no_run
6213        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6214        /// use wkt::Timestamp;
6215        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(Some(Timestamp::default()/* use setters */));
6216        /// let x = ScheduledReleaseRecord::new().set_or_clear_release_time(None::<Timestamp>);
6217        /// ```
6218        pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
6219        where
6220            T: std::convert::Into<wkt::Timestamp>,
6221        {
6222            self.release_time = v.map(|x| x.into());
6223            self
6224        }
6225
6226        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result].
6227        ///
6228        /// Note that all the setters affecting `result` are mutually
6229        /// exclusive.
6230        ///
6231        /// # Example
6232        /// ```ignore,no_run
6233        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6234        /// use google_cloud_dataform_v1::model::release_config::scheduled_release_record::Result;
6235        /// let x = ScheduledReleaseRecord::new().set_result(Some(Result::CompilationResult("example".to_string())));
6236        /// ```
6237        pub fn set_result<
6238            T: std::convert::Into<
6239                    std::option::Option<
6240                        crate::model::release_config::scheduled_release_record::Result,
6241                    >,
6242                >,
6243        >(
6244            mut self,
6245            v: T,
6246        ) -> Self {
6247            self.result = v.into();
6248            self
6249        }
6250
6251        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6252        /// if it holds a `CompilationResult`, `None` if the field is not set or
6253        /// holds a different branch.
6254        pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
6255            #[allow(unreachable_patterns)]
6256            self.result.as_ref().and_then(|v| match v {
6257                crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
6258                _ => std::option::Option::None,
6259            })
6260        }
6261
6262        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6263        /// to hold a `CompilationResult`.
6264        ///
6265        /// Note that all the setters affecting `result` are
6266        /// mutually exclusive.
6267        ///
6268        /// # Example
6269        /// ```ignore,no_run
6270        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6271        /// # let project_id = "project_id";
6272        /// # let location_id = "location_id";
6273        /// # let repository_id = "repository_id";
6274        /// # let compilation_result_id = "compilation_result_id";
6275        /// let x = ScheduledReleaseRecord::new().set_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
6276        /// assert!(x.compilation_result().is_some());
6277        /// assert!(x.error_status().is_none());
6278        /// ```
6279        pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
6280            mut self,
6281            v: T,
6282        ) -> Self {
6283            self.result = std::option::Option::Some(
6284                crate::model::release_config::scheduled_release_record::Result::CompilationResult(
6285                    v.into(),
6286                ),
6287            );
6288            self
6289        }
6290
6291        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6292        /// if it holds a `ErrorStatus`, `None` if the field is not set or
6293        /// holds a different branch.
6294        pub fn error_status(
6295            &self,
6296        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
6297            #[allow(unreachable_patterns)]
6298            self.result.as_ref().and_then(|v| match v {
6299                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
6300                    std::option::Option::Some(v)
6301                }
6302                _ => std::option::Option::None,
6303            })
6304        }
6305
6306        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
6307        /// to hold a `ErrorStatus`.
6308        ///
6309        /// Note that all the setters affecting `result` are
6310        /// mutually exclusive.
6311        ///
6312        /// # Example
6313        /// ```ignore,no_run
6314        /// # use google_cloud_dataform_v1::model::release_config::ScheduledReleaseRecord;
6315        /// use google_cloud_rpc::model::Status;
6316        /// let x = ScheduledReleaseRecord::new().set_error_status(Status::default()/* use setters */);
6317        /// assert!(x.error_status().is_some());
6318        /// assert!(x.compilation_result().is_none());
6319        /// ```
6320        pub fn set_error_status<
6321            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
6322        >(
6323            mut self,
6324            v: T,
6325        ) -> Self {
6326            self.result = std::option::Option::Some(
6327                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
6328                    v.into(),
6329                ),
6330            );
6331            self
6332        }
6333    }
6334
6335    impl wkt::message::Message for ScheduledReleaseRecord {
6336        fn typename() -> &'static str {
6337            "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
6338        }
6339    }
6340
6341    /// Defines additional types related to [ScheduledReleaseRecord].
6342    pub mod scheduled_release_record {
6343        #[allow(unused_imports)]
6344        use super::*;
6345
6346        /// The result of this release attempt.
6347        #[derive(Clone, Debug, PartialEq)]
6348        #[non_exhaustive]
6349        pub enum Result {
6350            /// The name of the created compilation result, if one was successfully
6351            /// created. Must be in the format
6352            /// `projects/*/locations/*/repositories/*/compilationResults/*`.
6353            CompilationResult(std::string::String),
6354            /// The error status encountered upon this attempt to create the
6355            /// compilation result, if the attempt was unsuccessful.
6356            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
6357        }
6358    }
6359}
6360
6361/// `ListReleaseConfigs` request message.
6362#[derive(Clone, Default, PartialEq)]
6363#[non_exhaustive]
6364pub struct ListReleaseConfigsRequest {
6365    /// Required. The repository in which to list release configs. Must be in the
6366    /// format `projects/*/locations/*/repositories/*`.
6367    pub parent: std::string::String,
6368
6369    /// Optional. Maximum number of release configs to return. The server may
6370    /// return fewer items than requested. If unspecified, the server will pick an
6371    /// appropriate default.
6372    pub page_size: i32,
6373
6374    /// Optional. Page token received from a previous `ListReleaseConfigs` call.
6375    /// Provide this to retrieve the subsequent page.
6376    ///
6377    /// When paginating, all other parameters provided to `ListReleaseConfigs`,
6378    /// with the exception of `page_size`, must match the call that provided the
6379    /// page token.
6380    pub page_token: std::string::String,
6381
6382    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6383}
6384
6385impl ListReleaseConfigsRequest {
6386    /// Creates a new default instance.
6387    pub fn new() -> Self {
6388        std::default::Default::default()
6389    }
6390
6391    /// Sets the value of [parent][crate::model::ListReleaseConfigsRequest::parent].
6392    ///
6393    /// # Example
6394    /// ```ignore,no_run
6395    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6396    /// # let project_id = "project_id";
6397    /// # let location_id = "location_id";
6398    /// # let repository_id = "repository_id";
6399    /// let x = ListReleaseConfigsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
6400    /// ```
6401    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6402        self.parent = v.into();
6403        self
6404    }
6405
6406    /// Sets the value of [page_size][crate::model::ListReleaseConfigsRequest::page_size].
6407    ///
6408    /// # Example
6409    /// ```ignore,no_run
6410    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6411    /// let x = ListReleaseConfigsRequest::new().set_page_size(42);
6412    /// ```
6413    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6414        self.page_size = v.into();
6415        self
6416    }
6417
6418    /// Sets the value of [page_token][crate::model::ListReleaseConfigsRequest::page_token].
6419    ///
6420    /// # Example
6421    /// ```ignore,no_run
6422    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsRequest;
6423    /// let x = ListReleaseConfigsRequest::new().set_page_token("example");
6424    /// ```
6425    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6426        self.page_token = v.into();
6427        self
6428    }
6429}
6430
6431impl wkt::message::Message for ListReleaseConfigsRequest {
6432    fn typename() -> &'static str {
6433        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
6434    }
6435}
6436
6437/// `ListReleaseConfigs` response message.
6438#[derive(Clone, Default, PartialEq)]
6439#[non_exhaustive]
6440pub struct ListReleaseConfigsResponse {
6441    /// List of release configs.
6442    pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
6443
6444    /// A token, which can be sent as `page_token` to retrieve the next page.
6445    /// If this field is omitted, there are no subsequent pages.
6446    pub next_page_token: std::string::String,
6447
6448    /// Locations which could not be reached.
6449    pub unreachable: std::vec::Vec<std::string::String>,
6450
6451    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6452}
6453
6454impl ListReleaseConfigsResponse {
6455    /// Creates a new default instance.
6456    pub fn new() -> Self {
6457        std::default::Default::default()
6458    }
6459
6460    /// Sets the value of [release_configs][crate::model::ListReleaseConfigsResponse::release_configs].
6461    ///
6462    /// # Example
6463    /// ```ignore,no_run
6464    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6465    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6466    /// let x = ListReleaseConfigsResponse::new()
6467    ///     .set_release_configs([
6468    ///         ReleaseConfig::default()/* use setters */,
6469    ///         ReleaseConfig::default()/* use (different) setters */,
6470    ///     ]);
6471    /// ```
6472    pub fn set_release_configs<T, V>(mut self, v: T) -> Self
6473    where
6474        T: std::iter::IntoIterator<Item = V>,
6475        V: std::convert::Into<crate::model::ReleaseConfig>,
6476    {
6477        use std::iter::Iterator;
6478        self.release_configs = v.into_iter().map(|i| i.into()).collect();
6479        self
6480    }
6481
6482    /// Sets the value of [next_page_token][crate::model::ListReleaseConfigsResponse::next_page_token].
6483    ///
6484    /// # Example
6485    /// ```ignore,no_run
6486    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6487    /// let x = ListReleaseConfigsResponse::new().set_next_page_token("example");
6488    /// ```
6489    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6490        self.next_page_token = v.into();
6491        self
6492    }
6493
6494    /// Sets the value of [unreachable][crate::model::ListReleaseConfigsResponse::unreachable].
6495    ///
6496    /// # Example
6497    /// ```ignore,no_run
6498    /// # use google_cloud_dataform_v1::model::ListReleaseConfigsResponse;
6499    /// let x = ListReleaseConfigsResponse::new().set_unreachable(["a", "b", "c"]);
6500    /// ```
6501    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6502    where
6503        T: std::iter::IntoIterator<Item = V>,
6504        V: std::convert::Into<std::string::String>,
6505    {
6506        use std::iter::Iterator;
6507        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6508        self
6509    }
6510}
6511
6512impl wkt::message::Message for ListReleaseConfigsResponse {
6513    fn typename() -> &'static str {
6514        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
6515    }
6516}
6517
6518#[doc(hidden)]
6519impl google_cloud_gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
6520    type PageItem = crate::model::ReleaseConfig;
6521
6522    fn items(self) -> std::vec::Vec<Self::PageItem> {
6523        self.release_configs
6524    }
6525
6526    fn next_page_token(&self) -> std::string::String {
6527        use std::clone::Clone;
6528        self.next_page_token.clone()
6529    }
6530}
6531
6532/// `GetReleaseConfig` request message.
6533#[derive(Clone, Default, PartialEq)]
6534#[non_exhaustive]
6535pub struct GetReleaseConfigRequest {
6536    /// Required. The release config's name.
6537    pub name: std::string::String,
6538
6539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6540}
6541
6542impl GetReleaseConfigRequest {
6543    /// Creates a new default instance.
6544    pub fn new() -> Self {
6545        std::default::Default::default()
6546    }
6547
6548    /// Sets the value of [name][crate::model::GetReleaseConfigRequest::name].
6549    ///
6550    /// # Example
6551    /// ```ignore,no_run
6552    /// # use google_cloud_dataform_v1::model::GetReleaseConfigRequest;
6553    /// # let project_id = "project_id";
6554    /// # let location_id = "location_id";
6555    /// # let repository_id = "repository_id";
6556    /// # let release_config_id = "release_config_id";
6557    /// let x = GetReleaseConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
6558    /// ```
6559    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6560        self.name = v.into();
6561        self
6562    }
6563}
6564
6565impl wkt::message::Message for GetReleaseConfigRequest {
6566    fn typename() -> &'static str {
6567        "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
6568    }
6569}
6570
6571/// `CreateReleaseConfig` request message.
6572#[derive(Clone, Default, PartialEq)]
6573#[non_exhaustive]
6574pub struct CreateReleaseConfigRequest {
6575    /// Required. The repository in which to create the release config. Must be in
6576    /// the format `projects/*/locations/*/repositories/*`.
6577    pub parent: std::string::String,
6578
6579    /// Required. The release config to create.
6580    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
6581
6582    /// Required. The ID to use for the release config, which will become the final
6583    /// component of the release config's resource name.
6584    pub release_config_id: std::string::String,
6585
6586    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6587}
6588
6589impl CreateReleaseConfigRequest {
6590    /// Creates a new default instance.
6591    pub fn new() -> Self {
6592        std::default::Default::default()
6593    }
6594
6595    /// Sets the value of [parent][crate::model::CreateReleaseConfigRequest::parent].
6596    ///
6597    /// # Example
6598    /// ```ignore,no_run
6599    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6600    /// # let project_id = "project_id";
6601    /// # let location_id = "location_id";
6602    /// # let repository_id = "repository_id";
6603    /// let x = CreateReleaseConfigRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
6604    /// ```
6605    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6606        self.parent = v.into();
6607        self
6608    }
6609
6610    /// Sets the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
6611    ///
6612    /// # Example
6613    /// ```ignore,no_run
6614    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6615    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6616    /// let x = CreateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6617    /// ```
6618    pub fn set_release_config<T>(mut self, v: T) -> Self
6619    where
6620        T: std::convert::Into<crate::model::ReleaseConfig>,
6621    {
6622        self.release_config = std::option::Option::Some(v.into());
6623        self
6624    }
6625
6626    /// Sets or clears the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
6627    ///
6628    /// # Example
6629    /// ```ignore,no_run
6630    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6631    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6632    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6633    /// let x = CreateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6634    /// ```
6635    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6636    where
6637        T: std::convert::Into<crate::model::ReleaseConfig>,
6638    {
6639        self.release_config = v.map(|x| x.into());
6640        self
6641    }
6642
6643    /// Sets the value of [release_config_id][crate::model::CreateReleaseConfigRequest::release_config_id].
6644    ///
6645    /// # Example
6646    /// ```ignore,no_run
6647    /// # use google_cloud_dataform_v1::model::CreateReleaseConfigRequest;
6648    /// let x = CreateReleaseConfigRequest::new().set_release_config_id("example");
6649    /// ```
6650    pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
6651        mut self,
6652        v: T,
6653    ) -> Self {
6654        self.release_config_id = v.into();
6655        self
6656    }
6657}
6658
6659impl wkt::message::Message for CreateReleaseConfigRequest {
6660    fn typename() -> &'static str {
6661        "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
6662    }
6663}
6664
6665/// `UpdateReleaseConfig` request message.
6666#[derive(Clone, Default, PartialEq)]
6667#[non_exhaustive]
6668pub struct UpdateReleaseConfigRequest {
6669    /// Optional. Specifies the fields to be updated in the release config. If left
6670    /// unset, all fields will be updated.
6671    pub update_mask: std::option::Option<wkt::FieldMask>,
6672
6673    /// Required. The release config to update.
6674    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
6675
6676    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6677}
6678
6679impl UpdateReleaseConfigRequest {
6680    /// Creates a new default instance.
6681    pub fn new() -> Self {
6682        std::default::Default::default()
6683    }
6684
6685    /// Sets the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6686    ///
6687    /// # Example
6688    /// ```ignore,no_run
6689    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6690    /// use wkt::FieldMask;
6691    /// let x = UpdateReleaseConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6692    /// ```
6693    pub fn set_update_mask<T>(mut self, v: T) -> Self
6694    where
6695        T: std::convert::Into<wkt::FieldMask>,
6696    {
6697        self.update_mask = std::option::Option::Some(v.into());
6698        self
6699    }
6700
6701    /// Sets or clears the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
6702    ///
6703    /// # Example
6704    /// ```ignore,no_run
6705    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6706    /// use wkt::FieldMask;
6707    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6708    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6709    /// ```
6710    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6711    where
6712        T: std::convert::Into<wkt::FieldMask>,
6713    {
6714        self.update_mask = v.map(|x| x.into());
6715        self
6716    }
6717
6718    /// Sets the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6719    ///
6720    /// # Example
6721    /// ```ignore,no_run
6722    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6723    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6724    /// let x = UpdateReleaseConfigRequest::new().set_release_config(ReleaseConfig::default()/* use setters */);
6725    /// ```
6726    pub fn set_release_config<T>(mut self, v: T) -> Self
6727    where
6728        T: std::convert::Into<crate::model::ReleaseConfig>,
6729    {
6730        self.release_config = std::option::Option::Some(v.into());
6731        self
6732    }
6733
6734    /// Sets or clears the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
6735    ///
6736    /// # Example
6737    /// ```ignore,no_run
6738    /// # use google_cloud_dataform_v1::model::UpdateReleaseConfigRequest;
6739    /// use google_cloud_dataform_v1::model::ReleaseConfig;
6740    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(Some(ReleaseConfig::default()/* use setters */));
6741    /// let x = UpdateReleaseConfigRequest::new().set_or_clear_release_config(None::<ReleaseConfig>);
6742    /// ```
6743    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
6744    where
6745        T: std::convert::Into<crate::model::ReleaseConfig>,
6746    {
6747        self.release_config = v.map(|x| x.into());
6748        self
6749    }
6750}
6751
6752impl wkt::message::Message for UpdateReleaseConfigRequest {
6753    fn typename() -> &'static str {
6754        "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
6755    }
6756}
6757
6758/// `DeleteReleaseConfig` request message.
6759#[derive(Clone, Default, PartialEq)]
6760#[non_exhaustive]
6761pub struct DeleteReleaseConfigRequest {
6762    /// Required. The release config's name.
6763    pub name: std::string::String,
6764
6765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6766}
6767
6768impl DeleteReleaseConfigRequest {
6769    /// Creates a new default instance.
6770    pub fn new() -> Self {
6771        std::default::Default::default()
6772    }
6773
6774    /// Sets the value of [name][crate::model::DeleteReleaseConfigRequest::name].
6775    ///
6776    /// # Example
6777    /// ```ignore,no_run
6778    /// # use google_cloud_dataform_v1::model::DeleteReleaseConfigRequest;
6779    /// # let project_id = "project_id";
6780    /// # let location_id = "location_id";
6781    /// # let repository_id = "repository_id";
6782    /// # let release_config_id = "release_config_id";
6783    /// let x = DeleteReleaseConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
6784    /// ```
6785    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6786        self.name = v.into();
6787        self
6788    }
6789}
6790
6791impl wkt::message::Message for DeleteReleaseConfigRequest {
6792    fn typename() -> &'static str {
6793        "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
6794    }
6795}
6796
6797/// Represents the result of compiling a Dataform project.
6798#[derive(Clone, Default, PartialEq)]
6799#[non_exhaustive]
6800pub struct CompilationResult {
6801    /// Output only. The compilation result's name.
6802    pub name: std::string::String,
6803
6804    /// Immutable. If set, fields of `code_compilation_config` override the default
6805    /// compilation settings that are specified in dataform.json.
6806    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
6807
6808    /// Output only. The fully resolved Git commit SHA of the code that was
6809    /// compiled. Not set for compilation results whose source is a workspace.
6810    pub resolved_git_commit_sha: std::string::String,
6811
6812    /// Output only. The version of `@dataform/core` that was used for compilation.
6813    pub dataform_core_version: std::string::String,
6814
6815    /// Output only. Errors encountered during project compilation.
6816    pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
6817
6818    /// Output only. Only set if the repository has a KMS Key.
6819    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
6820
6821    /// Output only. The timestamp of when the compilation result was created.
6822    pub create_time: std::option::Option<wkt::Timestamp>,
6823
6824    /// Output only. All the metadata information that is used internally to serve
6825    /// the resource. For example: timestamps, flags, status fields, etc. The
6826    /// format of this field is a JSON string.
6827    pub internal_metadata: std::option::Option<std::string::String>,
6828
6829    /// Output only. Metadata indicating whether this resource is user-scoped.
6830    /// `CompilationResult` resource is `user_scoped` only if it is sourced
6831    /// from a workspace.
6832    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
6833
6834    /// The source of the compilation result.
6835    pub source: std::option::Option<crate::model::compilation_result::Source>,
6836
6837    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6838}
6839
6840impl CompilationResult {
6841    /// Creates a new default instance.
6842    pub fn new() -> Self {
6843        std::default::Default::default()
6844    }
6845
6846    /// Sets the value of [name][crate::model::CompilationResult::name].
6847    ///
6848    /// # Example
6849    /// ```ignore,no_run
6850    /// # use google_cloud_dataform_v1::model::CompilationResult;
6851    /// # let project_id = "project_id";
6852    /// # let location_id = "location_id";
6853    /// # let repository_id = "repository_id";
6854    /// # let compilation_result_id = "compilation_result_id";
6855    /// let x = CompilationResult::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
6856    /// ```
6857    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6858        self.name = v.into();
6859        self
6860    }
6861
6862    /// Sets the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6863    ///
6864    /// # Example
6865    /// ```ignore,no_run
6866    /// # use google_cloud_dataform_v1::model::CompilationResult;
6867    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6868    /// let x = CompilationResult::new().set_code_compilation_config(CodeCompilationConfig::default()/* use setters */);
6869    /// ```
6870    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
6871    where
6872        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6873    {
6874        self.code_compilation_config = std::option::Option::Some(v.into());
6875        self
6876    }
6877
6878    /// Sets or clears the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
6879    ///
6880    /// # Example
6881    /// ```ignore,no_run
6882    /// # use google_cloud_dataform_v1::model::CompilationResult;
6883    /// use google_cloud_dataform_v1::model::CodeCompilationConfig;
6884    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(Some(CodeCompilationConfig::default()/* use setters */));
6885    /// let x = CompilationResult::new().set_or_clear_code_compilation_config(None::<CodeCompilationConfig>);
6886    /// ```
6887    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
6888    where
6889        T: std::convert::Into<crate::model::CodeCompilationConfig>,
6890    {
6891        self.code_compilation_config = v.map(|x| x.into());
6892        self
6893    }
6894
6895    /// Sets the value of [resolved_git_commit_sha][crate::model::CompilationResult::resolved_git_commit_sha].
6896    ///
6897    /// # Example
6898    /// ```ignore,no_run
6899    /// # use google_cloud_dataform_v1::model::CompilationResult;
6900    /// let x = CompilationResult::new().set_resolved_git_commit_sha("example");
6901    /// ```
6902    pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
6903        mut self,
6904        v: T,
6905    ) -> Self {
6906        self.resolved_git_commit_sha = v.into();
6907        self
6908    }
6909
6910    /// Sets the value of [dataform_core_version][crate::model::CompilationResult::dataform_core_version].
6911    ///
6912    /// # Example
6913    /// ```ignore,no_run
6914    /// # use google_cloud_dataform_v1::model::CompilationResult;
6915    /// let x = CompilationResult::new().set_dataform_core_version("example");
6916    /// ```
6917    pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
6918        mut self,
6919        v: T,
6920    ) -> Self {
6921        self.dataform_core_version = v.into();
6922        self
6923    }
6924
6925    /// Sets the value of [compilation_errors][crate::model::CompilationResult::compilation_errors].
6926    ///
6927    /// # Example
6928    /// ```ignore,no_run
6929    /// # use google_cloud_dataform_v1::model::CompilationResult;
6930    /// use google_cloud_dataform_v1::model::compilation_result::CompilationError;
6931    /// let x = CompilationResult::new()
6932    ///     .set_compilation_errors([
6933    ///         CompilationError::default()/* use setters */,
6934    ///         CompilationError::default()/* use (different) setters */,
6935    ///     ]);
6936    /// ```
6937    pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
6938    where
6939        T: std::iter::IntoIterator<Item = V>,
6940        V: std::convert::Into<crate::model::compilation_result::CompilationError>,
6941    {
6942        use std::iter::Iterator;
6943        self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
6944        self
6945    }
6946
6947    /// Sets the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6948    ///
6949    /// # Example
6950    /// ```ignore,no_run
6951    /// # use google_cloud_dataform_v1::model::CompilationResult;
6952    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6953    /// let x = CompilationResult::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
6954    /// ```
6955    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
6956    where
6957        T: std::convert::Into<crate::model::DataEncryptionState>,
6958    {
6959        self.data_encryption_state = std::option::Option::Some(v.into());
6960        self
6961    }
6962
6963    /// Sets or clears the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
6964    ///
6965    /// # Example
6966    /// ```ignore,no_run
6967    /// # use google_cloud_dataform_v1::model::CompilationResult;
6968    /// use google_cloud_dataform_v1::model::DataEncryptionState;
6969    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
6970    /// let x = CompilationResult::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
6971    /// ```
6972    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
6973    where
6974        T: std::convert::Into<crate::model::DataEncryptionState>,
6975    {
6976        self.data_encryption_state = v.map(|x| x.into());
6977        self
6978    }
6979
6980    /// Sets the value of [create_time][crate::model::CompilationResult::create_time].
6981    ///
6982    /// # Example
6983    /// ```ignore,no_run
6984    /// # use google_cloud_dataform_v1::model::CompilationResult;
6985    /// use wkt::Timestamp;
6986    /// let x = CompilationResult::new().set_create_time(Timestamp::default()/* use setters */);
6987    /// ```
6988    pub fn set_create_time<T>(mut self, v: T) -> Self
6989    where
6990        T: std::convert::Into<wkt::Timestamp>,
6991    {
6992        self.create_time = std::option::Option::Some(v.into());
6993        self
6994    }
6995
6996    /// Sets or clears the value of [create_time][crate::model::CompilationResult::create_time].
6997    ///
6998    /// # Example
6999    /// ```ignore,no_run
7000    /// # use google_cloud_dataform_v1::model::CompilationResult;
7001    /// use wkt::Timestamp;
7002    /// let x = CompilationResult::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
7003    /// let x = CompilationResult::new().set_or_clear_create_time(None::<Timestamp>);
7004    /// ```
7005    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7006    where
7007        T: std::convert::Into<wkt::Timestamp>,
7008    {
7009        self.create_time = v.map(|x| x.into());
7010        self
7011    }
7012
7013    /// Sets the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
7014    ///
7015    /// # Example
7016    /// ```ignore,no_run
7017    /// # use google_cloud_dataform_v1::model::CompilationResult;
7018    /// let x = CompilationResult::new().set_internal_metadata("example");
7019    /// ```
7020    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
7021    where
7022        T: std::convert::Into<std::string::String>,
7023    {
7024        self.internal_metadata = std::option::Option::Some(v.into());
7025        self
7026    }
7027
7028    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
7029    ///
7030    /// # Example
7031    /// ```ignore,no_run
7032    /// # use google_cloud_dataform_v1::model::CompilationResult;
7033    /// let x = CompilationResult::new().set_or_clear_internal_metadata(Some("example"));
7034    /// let x = CompilationResult::new().set_or_clear_internal_metadata(None::<String>);
7035    /// ```
7036    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7037    where
7038        T: std::convert::Into<std::string::String>,
7039    {
7040        self.internal_metadata = v.map(|x| x.into());
7041        self
7042    }
7043
7044    /// Sets the value of [private_resource_metadata][crate::model::CompilationResult::private_resource_metadata].
7045    ///
7046    /// # Example
7047    /// ```ignore,no_run
7048    /// # use google_cloud_dataform_v1::model::CompilationResult;
7049    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
7050    /// let x = CompilationResult::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
7051    /// ```
7052    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
7053    where
7054        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
7055    {
7056        self.private_resource_metadata = std::option::Option::Some(v.into());
7057        self
7058    }
7059
7060    /// Sets or clears the value of [private_resource_metadata][crate::model::CompilationResult::private_resource_metadata].
7061    ///
7062    /// # Example
7063    /// ```ignore,no_run
7064    /// # use google_cloud_dataform_v1::model::CompilationResult;
7065    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
7066    /// let x = CompilationResult::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
7067    /// let x = CompilationResult::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
7068    /// ```
7069    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7070    where
7071        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
7072    {
7073        self.private_resource_metadata = v.map(|x| x.into());
7074        self
7075    }
7076
7077    /// Sets the value of [source][crate::model::CompilationResult::source].
7078    ///
7079    /// Note that all the setters affecting `source` are mutually
7080    /// exclusive.
7081    ///
7082    /// # Example
7083    /// ```ignore,no_run
7084    /// # use google_cloud_dataform_v1::model::CompilationResult;
7085    /// use google_cloud_dataform_v1::model::compilation_result::Source;
7086    /// let x = CompilationResult::new().set_source(Some(Source::GitCommitish("example".to_string())));
7087    /// ```
7088    pub fn set_source<
7089        T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
7090    >(
7091        mut self,
7092        v: T,
7093    ) -> Self {
7094        self.source = v.into();
7095        self
7096    }
7097
7098    /// The value of [source][crate::model::CompilationResult::source]
7099    /// if it holds a `GitCommitish`, `None` if the field is not set or
7100    /// holds a different branch.
7101    pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
7102        #[allow(unreachable_patterns)]
7103        self.source.as_ref().and_then(|v| match v {
7104            crate::model::compilation_result::Source::GitCommitish(v) => {
7105                std::option::Option::Some(v)
7106            }
7107            _ => std::option::Option::None,
7108        })
7109    }
7110
7111    /// Sets the value of [source][crate::model::CompilationResult::source]
7112    /// to hold a `GitCommitish`.
7113    ///
7114    /// Note that all the setters affecting `source` are
7115    /// mutually exclusive.
7116    ///
7117    /// # Example
7118    /// ```ignore,no_run
7119    /// # use google_cloud_dataform_v1::model::CompilationResult;
7120    /// let x = CompilationResult::new().set_git_commitish("example");
7121    /// assert!(x.git_commitish().is_some());
7122    /// assert!(x.workspace().is_none());
7123    /// assert!(x.release_config().is_none());
7124    /// ```
7125    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7126        self.source = std::option::Option::Some(
7127            crate::model::compilation_result::Source::GitCommitish(v.into()),
7128        );
7129        self
7130    }
7131
7132    /// The value of [source][crate::model::CompilationResult::source]
7133    /// if it holds a `Workspace`, `None` if the field is not set or
7134    /// holds a different branch.
7135    pub fn workspace(&self) -> std::option::Option<&std::string::String> {
7136        #[allow(unreachable_patterns)]
7137        self.source.as_ref().and_then(|v| match v {
7138            crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
7139            _ => std::option::Option::None,
7140        })
7141    }
7142
7143    /// Sets the value of [source][crate::model::CompilationResult::source]
7144    /// to hold a `Workspace`.
7145    ///
7146    /// Note that all the setters affecting `source` are
7147    /// mutually exclusive.
7148    ///
7149    /// # Example
7150    /// ```ignore,no_run
7151    /// # use google_cloud_dataform_v1::model::CompilationResult;
7152    /// # let project_id = "project_id";
7153    /// # let location_id = "location_id";
7154    /// # let repository_id = "repository_id";
7155    /// # let workspace_id = "workspace_id";
7156    /// let x = CompilationResult::new().set_workspace(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workspaces/{workspace_id}"));
7157    /// assert!(x.workspace().is_some());
7158    /// assert!(x.git_commitish().is_none());
7159    /// assert!(x.release_config().is_none());
7160    /// ```
7161    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7162        self.source = std::option::Option::Some(
7163            crate::model::compilation_result::Source::Workspace(v.into()),
7164        );
7165        self
7166    }
7167
7168    /// The value of [source][crate::model::CompilationResult::source]
7169    /// if it holds a `ReleaseConfig`, `None` if the field is not set or
7170    /// holds a different branch.
7171    pub fn release_config(&self) -> std::option::Option<&std::string::String> {
7172        #[allow(unreachable_patterns)]
7173        self.source.as_ref().and_then(|v| match v {
7174            crate::model::compilation_result::Source::ReleaseConfig(v) => {
7175                std::option::Option::Some(v)
7176            }
7177            _ => std::option::Option::None,
7178        })
7179    }
7180
7181    /// Sets the value of [source][crate::model::CompilationResult::source]
7182    /// to hold a `ReleaseConfig`.
7183    ///
7184    /// Note that all the setters affecting `source` are
7185    /// mutually exclusive.
7186    ///
7187    /// # Example
7188    /// ```ignore,no_run
7189    /// # use google_cloud_dataform_v1::model::CompilationResult;
7190    /// # let project_id = "project_id";
7191    /// # let location_id = "location_id";
7192    /// # let repository_id = "repository_id";
7193    /// # let release_config_id = "release_config_id";
7194    /// let x = CompilationResult::new().set_release_config(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
7195    /// assert!(x.release_config().is_some());
7196    /// assert!(x.git_commitish().is_none());
7197    /// assert!(x.workspace().is_none());
7198    /// ```
7199    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7200        self.source = std::option::Option::Some(
7201            crate::model::compilation_result::Source::ReleaseConfig(v.into()),
7202        );
7203        self
7204    }
7205}
7206
7207impl wkt::message::Message for CompilationResult {
7208    fn typename() -> &'static str {
7209        "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
7210    }
7211}
7212
7213/// Defines additional types related to [CompilationResult].
7214pub mod compilation_result {
7215    #[allow(unused_imports)]
7216    use super::*;
7217
7218    /// An error encountered when attempting to compile a Dataform project.
7219    #[derive(Clone, Default, PartialEq)]
7220    #[non_exhaustive]
7221    pub struct CompilationError {
7222        /// Output only. The error's top level message.
7223        pub message: std::string::String,
7224
7225        /// Output only. The error's full stack trace.
7226        pub stack: std::string::String,
7227
7228        /// Output only. The path of the file where this error occurred, if
7229        /// available, relative to the project root.
7230        pub path: std::string::String,
7231
7232        /// Output only. The identifier of the action where this error occurred, if
7233        /// available.
7234        pub action_target: std::option::Option<crate::model::Target>,
7235
7236        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7237    }
7238
7239    impl CompilationError {
7240        /// Creates a new default instance.
7241        pub fn new() -> Self {
7242            std::default::Default::default()
7243        }
7244
7245        /// Sets the value of [message][crate::model::compilation_result::CompilationError::message].
7246        ///
7247        /// # Example
7248        /// ```ignore,no_run
7249        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7250        /// let x = CompilationError::new().set_message("example");
7251        /// ```
7252        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7253            self.message = v.into();
7254            self
7255        }
7256
7257        /// Sets the value of [stack][crate::model::compilation_result::CompilationError::stack].
7258        ///
7259        /// # Example
7260        /// ```ignore,no_run
7261        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7262        /// let x = CompilationError::new().set_stack("example");
7263        /// ```
7264        pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7265            self.stack = v.into();
7266            self
7267        }
7268
7269        /// Sets the value of [path][crate::model::compilation_result::CompilationError::path].
7270        ///
7271        /// # Example
7272        /// ```ignore,no_run
7273        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7274        /// let x = CompilationError::new().set_path("example");
7275        /// ```
7276        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7277            self.path = v.into();
7278            self
7279        }
7280
7281        /// Sets the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
7282        ///
7283        /// # Example
7284        /// ```ignore,no_run
7285        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7286        /// use google_cloud_dataform_v1::model::Target;
7287        /// let x = CompilationError::new().set_action_target(Target::default()/* use setters */);
7288        /// ```
7289        pub fn set_action_target<T>(mut self, v: T) -> Self
7290        where
7291            T: std::convert::Into<crate::model::Target>,
7292        {
7293            self.action_target = std::option::Option::Some(v.into());
7294            self
7295        }
7296
7297        /// Sets or clears the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
7298        ///
7299        /// # Example
7300        /// ```ignore,no_run
7301        /// # use google_cloud_dataform_v1::model::compilation_result::CompilationError;
7302        /// use google_cloud_dataform_v1::model::Target;
7303        /// let x = CompilationError::new().set_or_clear_action_target(Some(Target::default()/* use setters */));
7304        /// let x = CompilationError::new().set_or_clear_action_target(None::<Target>);
7305        /// ```
7306        pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
7307        where
7308            T: std::convert::Into<crate::model::Target>,
7309        {
7310            self.action_target = v.map(|x| x.into());
7311            self
7312        }
7313    }
7314
7315    impl wkt::message::Message for CompilationError {
7316        fn typename() -> &'static str {
7317            "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
7318        }
7319    }
7320
7321    /// The source of the compilation result.
7322    #[derive(Clone, Debug, PartialEq)]
7323    #[non_exhaustive]
7324    pub enum Source {
7325        /// Immutable. Git commit/tag/branch name at which the repository should be
7326        /// compiled. Must exist in the remote repository. Examples:
7327        ///
7328        /// - a commit SHA: `12ade345`
7329        /// - a tag: `tag1`
7330        /// - a branch name: `branch1`
7331        GitCommitish(std::string::String),
7332        /// Immutable. The name of the workspace to compile. Must be in the format
7333        /// `projects/*/locations/*/repositories/*/workspaces/*`.
7334        Workspace(std::string::String),
7335        /// Immutable. The name of the release config to compile. Must be in the
7336        /// format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
7337        ReleaseConfig(std::string::String),
7338    }
7339}
7340
7341/// Configures various aspects of Dataform code compilation.
7342#[derive(Clone, Default, PartialEq)]
7343#[non_exhaustive]
7344pub struct CodeCompilationConfig {
7345    /// Optional. The default database (Google Cloud project ID).
7346    pub default_database: std::string::String,
7347
7348    /// Optional. The default schema (BigQuery dataset ID).
7349    pub default_schema: std::string::String,
7350
7351    /// Optional. The default BigQuery location to use. Defaults to "US".
7352    /// See the BigQuery docs for a full list of locations:
7353    /// <https://cloud.google.com/bigquery/docs/locations>.
7354    pub default_location: std::string::String,
7355
7356    /// Optional. The default schema (BigQuery dataset ID) for assertions.
7357    pub assertion_schema: std::string::String,
7358
7359    /// Optional. User-defined variables that are made available to project code
7360    /// during compilation.
7361    pub vars: std::collections::HashMap<std::string::String, std::string::String>,
7362
7363    /// Optional. The suffix that should be appended to all database (Google Cloud
7364    /// project ID) names.
7365    pub database_suffix: std::string::String,
7366
7367    /// Optional. The suffix that should be appended to all schema (BigQuery
7368    /// dataset ID) names.
7369    pub schema_suffix: std::string::String,
7370
7371    /// Optional. The prefix that should be prepended to all table names.
7372    pub table_prefix: std::string::String,
7373
7374    /// Optional. The prefix to prepend to built-in assertion names.
7375    pub builtin_assertion_name_prefix: std::string::String,
7376
7377    /// Optional. The default notebook runtime options.
7378    pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
7379
7380    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7381}
7382
7383impl CodeCompilationConfig {
7384    /// Creates a new default instance.
7385    pub fn new() -> Self {
7386        std::default::Default::default()
7387    }
7388
7389    /// Sets the value of [default_database][crate::model::CodeCompilationConfig::default_database].
7390    ///
7391    /// # Example
7392    /// ```ignore,no_run
7393    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7394    /// let x = CodeCompilationConfig::new().set_default_database("example");
7395    /// ```
7396    pub fn set_default_database<T: std::convert::Into<std::string::String>>(
7397        mut self,
7398        v: T,
7399    ) -> Self {
7400        self.default_database = v.into();
7401        self
7402    }
7403
7404    /// Sets the value of [default_schema][crate::model::CodeCompilationConfig::default_schema].
7405    ///
7406    /// # Example
7407    /// ```ignore,no_run
7408    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7409    /// let x = CodeCompilationConfig::new().set_default_schema("example");
7410    /// ```
7411    pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7412        self.default_schema = v.into();
7413        self
7414    }
7415
7416    /// Sets the value of [default_location][crate::model::CodeCompilationConfig::default_location].
7417    ///
7418    /// # Example
7419    /// ```ignore,no_run
7420    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7421    /// let x = CodeCompilationConfig::new().set_default_location("example");
7422    /// ```
7423    pub fn set_default_location<T: std::convert::Into<std::string::String>>(
7424        mut self,
7425        v: T,
7426    ) -> Self {
7427        self.default_location = v.into();
7428        self
7429    }
7430
7431    /// Sets the value of [assertion_schema][crate::model::CodeCompilationConfig::assertion_schema].
7432    ///
7433    /// # Example
7434    /// ```ignore,no_run
7435    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7436    /// let x = CodeCompilationConfig::new().set_assertion_schema("example");
7437    /// ```
7438    pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
7439        mut self,
7440        v: T,
7441    ) -> Self {
7442        self.assertion_schema = v.into();
7443        self
7444    }
7445
7446    /// Sets the value of [vars][crate::model::CodeCompilationConfig::vars].
7447    ///
7448    /// # Example
7449    /// ```ignore,no_run
7450    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7451    /// let x = CodeCompilationConfig::new().set_vars([
7452    ///     ("key0", "abc"),
7453    ///     ("key1", "xyz"),
7454    /// ]);
7455    /// ```
7456    pub fn set_vars<T, K, V>(mut self, v: T) -> Self
7457    where
7458        T: std::iter::IntoIterator<Item = (K, V)>,
7459        K: std::convert::Into<std::string::String>,
7460        V: std::convert::Into<std::string::String>,
7461    {
7462        use std::iter::Iterator;
7463        self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7464        self
7465    }
7466
7467    /// Sets the value of [database_suffix][crate::model::CodeCompilationConfig::database_suffix].
7468    ///
7469    /// # Example
7470    /// ```ignore,no_run
7471    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7472    /// let x = CodeCompilationConfig::new().set_database_suffix("example");
7473    /// ```
7474    pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7475        self.database_suffix = v.into();
7476        self
7477    }
7478
7479    /// Sets the value of [schema_suffix][crate::model::CodeCompilationConfig::schema_suffix].
7480    ///
7481    /// # Example
7482    /// ```ignore,no_run
7483    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7484    /// let x = CodeCompilationConfig::new().set_schema_suffix("example");
7485    /// ```
7486    pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7487        self.schema_suffix = v.into();
7488        self
7489    }
7490
7491    /// Sets the value of [table_prefix][crate::model::CodeCompilationConfig::table_prefix].
7492    ///
7493    /// # Example
7494    /// ```ignore,no_run
7495    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7496    /// let x = CodeCompilationConfig::new().set_table_prefix("example");
7497    /// ```
7498    pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7499        self.table_prefix = v.into();
7500        self
7501    }
7502
7503    /// Sets the value of [builtin_assertion_name_prefix][crate::model::CodeCompilationConfig::builtin_assertion_name_prefix].
7504    ///
7505    /// # Example
7506    /// ```ignore,no_run
7507    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7508    /// let x = CodeCompilationConfig::new().set_builtin_assertion_name_prefix("example");
7509    /// ```
7510    pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
7511        mut self,
7512        v: T,
7513    ) -> Self {
7514        self.builtin_assertion_name_prefix = v.into();
7515        self
7516    }
7517
7518    /// Sets the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
7519    ///
7520    /// # Example
7521    /// ```ignore,no_run
7522    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7523    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7524    /// let x = CodeCompilationConfig::new().set_default_notebook_runtime_options(NotebookRuntimeOptions::default()/* use setters */);
7525    /// ```
7526    pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
7527    where
7528        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
7529    {
7530        self.default_notebook_runtime_options = std::option::Option::Some(v.into());
7531        self
7532    }
7533
7534    /// Sets or clears the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
7535    ///
7536    /// # Example
7537    /// ```ignore,no_run
7538    /// # use google_cloud_dataform_v1::model::CodeCompilationConfig;
7539    /// use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7540    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(Some(NotebookRuntimeOptions::default()/* use setters */));
7541    /// let x = CodeCompilationConfig::new().set_or_clear_default_notebook_runtime_options(None::<NotebookRuntimeOptions>);
7542    /// ```
7543    pub fn set_or_clear_default_notebook_runtime_options<T>(
7544        mut self,
7545        v: std::option::Option<T>,
7546    ) -> Self
7547    where
7548        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
7549    {
7550        self.default_notebook_runtime_options = v.map(|x| x.into());
7551        self
7552    }
7553}
7554
7555impl wkt::message::Message for CodeCompilationConfig {
7556    fn typename() -> &'static str {
7557        "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
7558    }
7559}
7560
7561/// Configures various aspects of Dataform notebook runtime.
7562#[derive(Clone, Default, PartialEq)]
7563#[non_exhaustive]
7564pub struct NotebookRuntimeOptions {
7565    /// Optional. The resource name of the [Colab runtime template]
7566    /// (<https://cloud.google.com/colab/docs/runtimes>), from which a runtime is
7567    /// created for notebook executions. If not specified, a runtime is created
7568    /// with Colab's default specifications.
7569    pub ai_platform_notebook_runtime_template: std::string::String,
7570
7571    /// The location to store the notebook execution result.
7572    pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
7573
7574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7575}
7576
7577impl NotebookRuntimeOptions {
7578    /// Creates a new default instance.
7579    pub fn new() -> Self {
7580        std::default::Default::default()
7581    }
7582
7583    /// Sets the value of [ai_platform_notebook_runtime_template][crate::model::NotebookRuntimeOptions::ai_platform_notebook_runtime_template].
7584    ///
7585    /// # Example
7586    /// ```ignore,no_run
7587    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7588    /// let x = NotebookRuntimeOptions::new().set_ai_platform_notebook_runtime_template("example");
7589    /// ```
7590    pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
7591        mut self,
7592        v: T,
7593    ) -> Self {
7594        self.ai_platform_notebook_runtime_template = v.into();
7595        self
7596    }
7597
7598    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink].
7599    ///
7600    /// Note that all the setters affecting `execution_sink` are mutually
7601    /// exclusive.
7602    ///
7603    /// # Example
7604    /// ```ignore,no_run
7605    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7606    /// use google_cloud_dataform_v1::model::notebook_runtime_options::ExecutionSink;
7607    /// let x = NotebookRuntimeOptions::new().set_execution_sink(Some(ExecutionSink::GcsOutputBucket("example".to_string())));
7608    /// ```
7609    pub fn set_execution_sink<
7610        T: std::convert::Into<
7611                std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
7612            >,
7613    >(
7614        mut self,
7615        v: T,
7616    ) -> Self {
7617        self.execution_sink = v.into();
7618        self
7619    }
7620
7621    /// The value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
7622    /// if it holds a `GcsOutputBucket`, `None` if the field is not set or
7623    /// holds a different branch.
7624    pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
7625        #[allow(unreachable_patterns)]
7626        self.execution_sink.as_ref().and_then(|v| match v {
7627            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
7628                std::option::Option::Some(v)
7629            }
7630            _ => std::option::Option::None,
7631        })
7632    }
7633
7634    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
7635    /// to hold a `GcsOutputBucket`.
7636    ///
7637    /// Note that all the setters affecting `execution_sink` are
7638    /// mutually exclusive.
7639    ///
7640    /// # Example
7641    /// ```ignore,no_run
7642    /// # use google_cloud_dataform_v1::model::NotebookRuntimeOptions;
7643    /// let x = NotebookRuntimeOptions::new().set_gcs_output_bucket("example");
7644    /// assert!(x.gcs_output_bucket().is_some());
7645    /// ```
7646    pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
7647        mut self,
7648        v: T,
7649    ) -> Self {
7650        self.execution_sink = std::option::Option::Some(
7651            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
7652        );
7653        self
7654    }
7655}
7656
7657impl wkt::message::Message for NotebookRuntimeOptions {
7658    fn typename() -> &'static str {
7659        "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
7660    }
7661}
7662
7663/// Defines additional types related to [NotebookRuntimeOptions].
7664pub mod notebook_runtime_options {
7665    #[allow(unused_imports)]
7666    use super::*;
7667
7668    /// The location to store the notebook execution result.
7669    #[derive(Clone, Debug, PartialEq)]
7670    #[non_exhaustive]
7671    pub enum ExecutionSink {
7672        /// Optional. The Google Cloud Storage location to upload the result to.
7673        /// Format: `gs://bucket-name`.
7674        GcsOutputBucket(std::string::String),
7675    }
7676}
7677
7678/// `ListCompilationResults` request message.
7679#[derive(Clone, Default, PartialEq)]
7680#[non_exhaustive]
7681pub struct ListCompilationResultsRequest {
7682    /// Required. The repository in which to list compilation results. Must be in
7683    /// the format `projects/*/locations/*/repositories/*`.
7684    pub parent: std::string::String,
7685
7686    /// Optional. Maximum number of compilation results to return. The server may
7687    /// return fewer items than requested. If unspecified, the server will pick an
7688    /// appropriate default.
7689    pub page_size: i32,
7690
7691    /// Optional. Page token received from a previous `ListCompilationResults`
7692    /// call. Provide this to retrieve the subsequent page.
7693    ///
7694    /// When paginating, all other parameters provided to `ListCompilationResults`,
7695    /// with the exception of `page_size`, must match the call that provided the
7696    /// page token.
7697    pub page_token: std::string::String,
7698
7699    /// Optional. This field only supports ordering by `name` and `create_time`.
7700    /// If unspecified, the server will choose the ordering.
7701    /// If specified, the default order is ascending for the `name` field.
7702    pub order_by: std::string::String,
7703
7704    /// Optional. Filter for the returned list.
7705    pub filter: std::string::String,
7706
7707    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7708}
7709
7710impl ListCompilationResultsRequest {
7711    /// Creates a new default instance.
7712    pub fn new() -> Self {
7713        std::default::Default::default()
7714    }
7715
7716    /// Sets the value of [parent][crate::model::ListCompilationResultsRequest::parent].
7717    ///
7718    /// # Example
7719    /// ```ignore,no_run
7720    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7721    /// # let project_id = "project_id";
7722    /// # let location_id = "location_id";
7723    /// # let repository_id = "repository_id";
7724    /// let x = ListCompilationResultsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
7725    /// ```
7726    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7727        self.parent = v.into();
7728        self
7729    }
7730
7731    /// Sets the value of [page_size][crate::model::ListCompilationResultsRequest::page_size].
7732    ///
7733    /// # Example
7734    /// ```ignore,no_run
7735    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7736    /// let x = ListCompilationResultsRequest::new().set_page_size(42);
7737    /// ```
7738    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7739        self.page_size = v.into();
7740        self
7741    }
7742
7743    /// Sets the value of [page_token][crate::model::ListCompilationResultsRequest::page_token].
7744    ///
7745    /// # Example
7746    /// ```ignore,no_run
7747    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7748    /// let x = ListCompilationResultsRequest::new().set_page_token("example");
7749    /// ```
7750    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7751        self.page_token = v.into();
7752        self
7753    }
7754
7755    /// Sets the value of [order_by][crate::model::ListCompilationResultsRequest::order_by].
7756    ///
7757    /// # Example
7758    /// ```ignore,no_run
7759    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7760    /// let x = ListCompilationResultsRequest::new().set_order_by("example");
7761    /// ```
7762    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7763        self.order_by = v.into();
7764        self
7765    }
7766
7767    /// Sets the value of [filter][crate::model::ListCompilationResultsRequest::filter].
7768    ///
7769    /// # Example
7770    /// ```ignore,no_run
7771    /// # use google_cloud_dataform_v1::model::ListCompilationResultsRequest;
7772    /// let x = ListCompilationResultsRequest::new().set_filter("example");
7773    /// ```
7774    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7775        self.filter = v.into();
7776        self
7777    }
7778}
7779
7780impl wkt::message::Message for ListCompilationResultsRequest {
7781    fn typename() -> &'static str {
7782        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
7783    }
7784}
7785
7786/// `ListCompilationResults` response message.
7787#[derive(Clone, Default, PartialEq)]
7788#[non_exhaustive]
7789pub struct ListCompilationResultsResponse {
7790    /// List of compilation results.
7791    pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
7792
7793    /// A token, which can be sent as `page_token` to retrieve the next page.
7794    /// If this field is omitted, there are no subsequent pages.
7795    pub next_page_token: std::string::String,
7796
7797    /// Locations which could not be reached.
7798    pub unreachable: std::vec::Vec<std::string::String>,
7799
7800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7801}
7802
7803impl ListCompilationResultsResponse {
7804    /// Creates a new default instance.
7805    pub fn new() -> Self {
7806        std::default::Default::default()
7807    }
7808
7809    /// Sets the value of [compilation_results][crate::model::ListCompilationResultsResponse::compilation_results].
7810    ///
7811    /// # Example
7812    /// ```ignore,no_run
7813    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7814    /// use google_cloud_dataform_v1::model::CompilationResult;
7815    /// let x = ListCompilationResultsResponse::new()
7816    ///     .set_compilation_results([
7817    ///         CompilationResult::default()/* use setters */,
7818    ///         CompilationResult::default()/* use (different) setters */,
7819    ///     ]);
7820    /// ```
7821    pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
7822    where
7823        T: std::iter::IntoIterator<Item = V>,
7824        V: std::convert::Into<crate::model::CompilationResult>,
7825    {
7826        use std::iter::Iterator;
7827        self.compilation_results = v.into_iter().map(|i| i.into()).collect();
7828        self
7829    }
7830
7831    /// Sets the value of [next_page_token][crate::model::ListCompilationResultsResponse::next_page_token].
7832    ///
7833    /// # Example
7834    /// ```ignore,no_run
7835    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7836    /// let x = ListCompilationResultsResponse::new().set_next_page_token("example");
7837    /// ```
7838    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7839        self.next_page_token = v.into();
7840        self
7841    }
7842
7843    /// Sets the value of [unreachable][crate::model::ListCompilationResultsResponse::unreachable].
7844    ///
7845    /// # Example
7846    /// ```ignore,no_run
7847    /// # use google_cloud_dataform_v1::model::ListCompilationResultsResponse;
7848    /// let x = ListCompilationResultsResponse::new().set_unreachable(["a", "b", "c"]);
7849    /// ```
7850    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7851    where
7852        T: std::iter::IntoIterator<Item = V>,
7853        V: std::convert::Into<std::string::String>,
7854    {
7855        use std::iter::Iterator;
7856        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7857        self
7858    }
7859}
7860
7861impl wkt::message::Message for ListCompilationResultsResponse {
7862    fn typename() -> &'static str {
7863        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
7864    }
7865}
7866
7867#[doc(hidden)]
7868impl google_cloud_gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
7869    type PageItem = crate::model::CompilationResult;
7870
7871    fn items(self) -> std::vec::Vec<Self::PageItem> {
7872        self.compilation_results
7873    }
7874
7875    fn next_page_token(&self) -> std::string::String {
7876        use std::clone::Clone;
7877        self.next_page_token.clone()
7878    }
7879}
7880
7881/// `GetCompilationResult` request message.
7882#[derive(Clone, Default, PartialEq)]
7883#[non_exhaustive]
7884pub struct GetCompilationResultRequest {
7885    /// Required. The compilation result's name.
7886    pub name: std::string::String,
7887
7888    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7889}
7890
7891impl GetCompilationResultRequest {
7892    /// Creates a new default instance.
7893    pub fn new() -> Self {
7894        std::default::Default::default()
7895    }
7896
7897    /// Sets the value of [name][crate::model::GetCompilationResultRequest::name].
7898    ///
7899    /// # Example
7900    /// ```ignore,no_run
7901    /// # use google_cloud_dataform_v1::model::GetCompilationResultRequest;
7902    /// # let project_id = "project_id";
7903    /// # let location_id = "location_id";
7904    /// # let repository_id = "repository_id";
7905    /// # let compilation_result_id = "compilation_result_id";
7906    /// let x = GetCompilationResultRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
7907    /// ```
7908    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7909        self.name = v.into();
7910        self
7911    }
7912}
7913
7914impl wkt::message::Message for GetCompilationResultRequest {
7915    fn typename() -> &'static str {
7916        "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
7917    }
7918}
7919
7920/// `CreateCompilationResult` request message.
7921#[derive(Clone, Default, PartialEq)]
7922#[non_exhaustive]
7923pub struct CreateCompilationResultRequest {
7924    /// Required. The repository in which to create the compilation result. Must be
7925    /// in the format `projects/*/locations/*/repositories/*`.
7926    pub parent: std::string::String,
7927
7928    /// Required. The compilation result to create.
7929    pub compilation_result: std::option::Option<crate::model::CompilationResult>,
7930
7931    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7932}
7933
7934impl CreateCompilationResultRequest {
7935    /// Creates a new default instance.
7936    pub fn new() -> Self {
7937        std::default::Default::default()
7938    }
7939
7940    /// Sets the value of [parent][crate::model::CreateCompilationResultRequest::parent].
7941    ///
7942    /// # Example
7943    /// ```ignore,no_run
7944    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7945    /// # let project_id = "project_id";
7946    /// # let location_id = "location_id";
7947    /// # let repository_id = "repository_id";
7948    /// let x = CreateCompilationResultRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
7949    /// ```
7950    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7951        self.parent = v.into();
7952        self
7953    }
7954
7955    /// Sets the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7956    ///
7957    /// # Example
7958    /// ```ignore,no_run
7959    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7960    /// use google_cloud_dataform_v1::model::CompilationResult;
7961    /// let x = CreateCompilationResultRequest::new().set_compilation_result(CompilationResult::default()/* use setters */);
7962    /// ```
7963    pub fn set_compilation_result<T>(mut self, v: T) -> Self
7964    where
7965        T: std::convert::Into<crate::model::CompilationResult>,
7966    {
7967        self.compilation_result = std::option::Option::Some(v.into());
7968        self
7969    }
7970
7971    /// Sets or clears the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
7972    ///
7973    /// # Example
7974    /// ```ignore,no_run
7975    /// # use google_cloud_dataform_v1::model::CreateCompilationResultRequest;
7976    /// use google_cloud_dataform_v1::model::CompilationResult;
7977    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(Some(CompilationResult::default()/* use setters */));
7978    /// let x = CreateCompilationResultRequest::new().set_or_clear_compilation_result(None::<CompilationResult>);
7979    /// ```
7980    pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
7981    where
7982        T: std::convert::Into<crate::model::CompilationResult>,
7983    {
7984        self.compilation_result = v.map(|x| x.into());
7985        self
7986    }
7987}
7988
7989impl wkt::message::Message for CreateCompilationResultRequest {
7990    fn typename() -> &'static str {
7991        "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
7992    }
7993}
7994
7995/// Represents an action identifier. If the action writes output, the output
7996/// will be written to the referenced database object.
7997#[derive(Clone, Default, PartialEq)]
7998#[non_exhaustive]
7999pub struct Target {
8000    /// Optional. The action's database (Google Cloud project ID) .
8001    pub database: std::string::String,
8002
8003    /// Optional. The action's schema (BigQuery dataset ID), within `database`.
8004    pub schema: std::string::String,
8005
8006    /// Optional. The action's name, within `database` and `schema`.
8007    pub name: std::string::String,
8008
8009    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8010}
8011
8012impl Target {
8013    /// Creates a new default instance.
8014    pub fn new() -> Self {
8015        std::default::Default::default()
8016    }
8017
8018    /// Sets the value of [database][crate::model::Target::database].
8019    ///
8020    /// # Example
8021    /// ```ignore,no_run
8022    /// # use google_cloud_dataform_v1::model::Target;
8023    /// let x = Target::new().set_database("example");
8024    /// ```
8025    pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8026        self.database = v.into();
8027        self
8028    }
8029
8030    /// Sets the value of [schema][crate::model::Target::schema].
8031    ///
8032    /// # Example
8033    /// ```ignore,no_run
8034    /// # use google_cloud_dataform_v1::model::Target;
8035    /// let x = Target::new().set_schema("example");
8036    /// ```
8037    pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8038        self.schema = v.into();
8039        self
8040    }
8041
8042    /// Sets the value of [name][crate::model::Target::name].
8043    ///
8044    /// # Example
8045    /// ```ignore,no_run
8046    /// # use google_cloud_dataform_v1::model::Target;
8047    /// let x = Target::new().set_name("example");
8048    /// ```
8049    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8050        self.name = v.into();
8051        self
8052    }
8053}
8054
8055impl wkt::message::Message for Target {
8056    fn typename() -> &'static str {
8057        "type.googleapis.com/google.cloud.dataform.v1.Target"
8058    }
8059}
8060
8061/// Describes a relation and its columns.
8062#[derive(Clone, Default, PartialEq)]
8063#[non_exhaustive]
8064pub struct RelationDescriptor {
8065    /// A text description of the relation.
8066    pub description: std::string::String,
8067
8068    /// A list of descriptions of columns within the relation.
8069    pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
8070
8071    /// A set of BigQuery labels that should be applied to the relation.
8072    pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
8073
8074    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8075}
8076
8077impl RelationDescriptor {
8078    /// Creates a new default instance.
8079    pub fn new() -> Self {
8080        std::default::Default::default()
8081    }
8082
8083    /// Sets the value of [description][crate::model::RelationDescriptor::description].
8084    ///
8085    /// # Example
8086    /// ```ignore,no_run
8087    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
8088    /// let x = RelationDescriptor::new().set_description("example");
8089    /// ```
8090    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8091        self.description = v.into();
8092        self
8093    }
8094
8095    /// Sets the value of [columns][crate::model::RelationDescriptor::columns].
8096    ///
8097    /// # Example
8098    /// ```ignore,no_run
8099    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
8100    /// use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8101    /// let x = RelationDescriptor::new()
8102    ///     .set_columns([
8103    ///         ColumnDescriptor::default()/* use setters */,
8104    ///         ColumnDescriptor::default()/* use (different) setters */,
8105    ///     ]);
8106    /// ```
8107    pub fn set_columns<T, V>(mut self, v: T) -> Self
8108    where
8109        T: std::iter::IntoIterator<Item = V>,
8110        V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
8111    {
8112        use std::iter::Iterator;
8113        self.columns = v.into_iter().map(|i| i.into()).collect();
8114        self
8115    }
8116
8117    /// Sets the value of [bigquery_labels][crate::model::RelationDescriptor::bigquery_labels].
8118    ///
8119    /// # Example
8120    /// ```ignore,no_run
8121    /// # use google_cloud_dataform_v1::model::RelationDescriptor;
8122    /// let x = RelationDescriptor::new().set_bigquery_labels([
8123    ///     ("key0", "abc"),
8124    ///     ("key1", "xyz"),
8125    /// ]);
8126    /// ```
8127    pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
8128    where
8129        T: std::iter::IntoIterator<Item = (K, V)>,
8130        K: std::convert::Into<std::string::String>,
8131        V: std::convert::Into<std::string::String>,
8132    {
8133        use std::iter::Iterator;
8134        self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
8135        self
8136    }
8137}
8138
8139impl wkt::message::Message for RelationDescriptor {
8140    fn typename() -> &'static str {
8141        "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
8142    }
8143}
8144
8145/// Defines additional types related to [RelationDescriptor].
8146pub mod relation_descriptor {
8147    #[allow(unused_imports)]
8148    use super::*;
8149
8150    /// Describes a column.
8151    #[derive(Clone, Default, PartialEq)]
8152    #[non_exhaustive]
8153    pub struct ColumnDescriptor {
8154        /// The identifier for the column. Each entry in `path` represents one level
8155        /// of nesting.
8156        pub path: std::vec::Vec<std::string::String>,
8157
8158        /// A textual description of the column.
8159        pub description: std::string::String,
8160
8161        /// A list of BigQuery policy tags that will be applied to the column.
8162        pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
8163
8164        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8165    }
8166
8167    impl ColumnDescriptor {
8168        /// Creates a new default instance.
8169        pub fn new() -> Self {
8170            std::default::Default::default()
8171        }
8172
8173        /// Sets the value of [path][crate::model::relation_descriptor::ColumnDescriptor::path].
8174        ///
8175        /// # Example
8176        /// ```ignore,no_run
8177        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8178        /// let x = ColumnDescriptor::new().set_path(["a", "b", "c"]);
8179        /// ```
8180        pub fn set_path<T, V>(mut self, v: T) -> Self
8181        where
8182            T: std::iter::IntoIterator<Item = V>,
8183            V: std::convert::Into<std::string::String>,
8184        {
8185            use std::iter::Iterator;
8186            self.path = v.into_iter().map(|i| i.into()).collect();
8187            self
8188        }
8189
8190        /// Sets the value of [description][crate::model::relation_descriptor::ColumnDescriptor::description].
8191        ///
8192        /// # Example
8193        /// ```ignore,no_run
8194        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8195        /// let x = ColumnDescriptor::new().set_description("example");
8196        /// ```
8197        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8198            self.description = v.into();
8199            self
8200        }
8201
8202        /// Sets the value of [bigquery_policy_tags][crate::model::relation_descriptor::ColumnDescriptor::bigquery_policy_tags].
8203        ///
8204        /// # Example
8205        /// ```ignore,no_run
8206        /// # use google_cloud_dataform_v1::model::relation_descriptor::ColumnDescriptor;
8207        /// let x = ColumnDescriptor::new().set_bigquery_policy_tags(["a", "b", "c"]);
8208        /// ```
8209        pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
8210        where
8211            T: std::iter::IntoIterator<Item = V>,
8212            V: std::convert::Into<std::string::String>,
8213        {
8214            use std::iter::Iterator;
8215            self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
8216            self
8217        }
8218    }
8219
8220    impl wkt::message::Message for ColumnDescriptor {
8221        fn typename() -> &'static str {
8222            "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
8223        }
8224    }
8225}
8226
8227/// Represents a single Dataform action in a compilation result.
8228#[derive(Clone, Default, PartialEq)]
8229#[non_exhaustive]
8230pub struct CompilationResultAction {
8231    /// This action's identifier. Unique within the compilation result.
8232    pub target: std::option::Option<crate::model::Target>,
8233
8234    /// The action's identifier if the project had been compiled without any
8235    /// overrides configured. Unique within the compilation result.
8236    pub canonical_target: std::option::Option<crate::model::Target>,
8237
8238    /// The full path including filename in which this action is located, relative
8239    /// to the workspace root.
8240    pub file_path: std::string::String,
8241
8242    /// Output only. All the metadata information that is used internally to serve
8243    /// the resource. For example: timestamps, flags, status fields, etc. The
8244    /// format of this field is a JSON string.
8245    pub internal_metadata: std::option::Option<std::string::String>,
8246
8247    /// The compiled object.
8248    pub compiled_object:
8249        std::option::Option<crate::model::compilation_result_action::CompiledObject>,
8250
8251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8252}
8253
8254impl CompilationResultAction {
8255    /// Creates a new default instance.
8256    pub fn new() -> Self {
8257        std::default::Default::default()
8258    }
8259
8260    /// Sets the value of [target][crate::model::CompilationResultAction::target].
8261    ///
8262    /// # Example
8263    /// ```ignore,no_run
8264    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8265    /// use google_cloud_dataform_v1::model::Target;
8266    /// let x = CompilationResultAction::new().set_target(Target::default()/* use setters */);
8267    /// ```
8268    pub fn set_target<T>(mut self, v: T) -> Self
8269    where
8270        T: std::convert::Into<crate::model::Target>,
8271    {
8272        self.target = std::option::Option::Some(v.into());
8273        self
8274    }
8275
8276    /// Sets or clears the value of [target][crate::model::CompilationResultAction::target].
8277    ///
8278    /// # Example
8279    /// ```ignore,no_run
8280    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8281    /// use google_cloud_dataform_v1::model::Target;
8282    /// let x = CompilationResultAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
8283    /// let x = CompilationResultAction::new().set_or_clear_target(None::<Target>);
8284    /// ```
8285    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
8286    where
8287        T: std::convert::Into<crate::model::Target>,
8288    {
8289        self.target = v.map(|x| x.into());
8290        self
8291    }
8292
8293    /// Sets the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
8294    ///
8295    /// # Example
8296    /// ```ignore,no_run
8297    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8298    /// use google_cloud_dataform_v1::model::Target;
8299    /// let x = CompilationResultAction::new().set_canonical_target(Target::default()/* use setters */);
8300    /// ```
8301    pub fn set_canonical_target<T>(mut self, v: T) -> Self
8302    where
8303        T: std::convert::Into<crate::model::Target>,
8304    {
8305        self.canonical_target = std::option::Option::Some(v.into());
8306        self
8307    }
8308
8309    /// Sets or clears the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
8310    ///
8311    /// # Example
8312    /// ```ignore,no_run
8313    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8314    /// use google_cloud_dataform_v1::model::Target;
8315    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
8316    /// let x = CompilationResultAction::new().set_or_clear_canonical_target(None::<Target>);
8317    /// ```
8318    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
8319    where
8320        T: std::convert::Into<crate::model::Target>,
8321    {
8322        self.canonical_target = v.map(|x| x.into());
8323        self
8324    }
8325
8326    /// Sets the value of [file_path][crate::model::CompilationResultAction::file_path].
8327    ///
8328    /// # Example
8329    /// ```ignore,no_run
8330    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8331    /// let x = CompilationResultAction::new().set_file_path("example");
8332    /// ```
8333    pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8334        self.file_path = v.into();
8335        self
8336    }
8337
8338    /// Sets the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
8339    ///
8340    /// # Example
8341    /// ```ignore,no_run
8342    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8343    /// let x = CompilationResultAction::new().set_internal_metadata("example");
8344    /// ```
8345    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
8346    where
8347        T: std::convert::Into<std::string::String>,
8348    {
8349        self.internal_metadata = std::option::Option::Some(v.into());
8350        self
8351    }
8352
8353    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
8354    ///
8355    /// # Example
8356    /// ```ignore,no_run
8357    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8358    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(Some("example"));
8359    /// let x = CompilationResultAction::new().set_or_clear_internal_metadata(None::<String>);
8360    /// ```
8361    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
8362    where
8363        T: std::convert::Into<std::string::String>,
8364    {
8365        self.internal_metadata = v.map(|x| x.into());
8366        self
8367    }
8368
8369    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object].
8370    ///
8371    /// Note that all the setters affecting `compiled_object` are mutually
8372    /// exclusive.
8373    ///
8374    /// # Example
8375    /// ```ignore,no_run
8376    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8377    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8378    /// let x = CompilationResultAction::new().set_compiled_object(Some(
8379    ///     google_cloud_dataform_v1::model::compilation_result_action::CompiledObject::Relation(Relation::default().into())));
8380    /// ```
8381    pub fn set_compiled_object<
8382        T: std::convert::Into<
8383                std::option::Option<crate::model::compilation_result_action::CompiledObject>,
8384            >,
8385    >(
8386        mut self,
8387        v: T,
8388    ) -> Self {
8389        self.compiled_object = v.into();
8390        self
8391    }
8392
8393    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8394    /// if it holds a `Relation`, `None` if the field is not set or
8395    /// holds a different branch.
8396    pub fn relation(
8397        &self,
8398    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
8399    {
8400        #[allow(unreachable_patterns)]
8401        self.compiled_object.as_ref().and_then(|v| match v {
8402            crate::model::compilation_result_action::CompiledObject::Relation(v) => {
8403                std::option::Option::Some(v)
8404            }
8405            _ => std::option::Option::None,
8406        })
8407    }
8408
8409    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8410    /// to hold a `Relation`.
8411    ///
8412    /// Note that all the setters affecting `compiled_object` are
8413    /// mutually exclusive.
8414    ///
8415    /// # Example
8416    /// ```ignore,no_run
8417    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8418    /// use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8419    /// let x = CompilationResultAction::new().set_relation(Relation::default()/* use setters */);
8420    /// assert!(x.relation().is_some());
8421    /// assert!(x.operations().is_none());
8422    /// assert!(x.assertion().is_none());
8423    /// assert!(x.declaration().is_none());
8424    /// assert!(x.notebook().is_none());
8425    /// assert!(x.data_preparation().is_none());
8426    /// ```
8427    pub fn set_relation<
8428        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
8429    >(
8430        mut self,
8431        v: T,
8432    ) -> Self {
8433        self.compiled_object = std::option::Option::Some(
8434            crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
8435        );
8436        self
8437    }
8438
8439    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8440    /// if it holds a `Operations`, `None` if the field is not set or
8441    /// holds a different branch.
8442    pub fn operations(
8443        &self,
8444    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
8445    {
8446        #[allow(unreachable_patterns)]
8447        self.compiled_object.as_ref().and_then(|v| match v {
8448            crate::model::compilation_result_action::CompiledObject::Operations(v) => {
8449                std::option::Option::Some(v)
8450            }
8451            _ => std::option::Option::None,
8452        })
8453    }
8454
8455    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8456    /// to hold a `Operations`.
8457    ///
8458    /// Note that all the setters affecting `compiled_object` are
8459    /// mutually exclusive.
8460    ///
8461    /// # Example
8462    /// ```ignore,no_run
8463    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8464    /// use google_cloud_dataform_v1::model::compilation_result_action::Operations;
8465    /// let x = CompilationResultAction::new().set_operations(Operations::default()/* use setters */);
8466    /// assert!(x.operations().is_some());
8467    /// assert!(x.relation().is_none());
8468    /// assert!(x.assertion().is_none());
8469    /// assert!(x.declaration().is_none());
8470    /// assert!(x.notebook().is_none());
8471    /// assert!(x.data_preparation().is_none());
8472    /// ```
8473    pub fn set_operations<
8474        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
8475    >(
8476        mut self,
8477        v: T,
8478    ) -> Self {
8479        self.compiled_object = std::option::Option::Some(
8480            crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
8481        );
8482        self
8483    }
8484
8485    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8486    /// if it holds a `Assertion`, `None` if the field is not set or
8487    /// holds a different branch.
8488    pub fn assertion(
8489        &self,
8490    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
8491    {
8492        #[allow(unreachable_patterns)]
8493        self.compiled_object.as_ref().and_then(|v| match v {
8494            crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
8495                std::option::Option::Some(v)
8496            }
8497            _ => std::option::Option::None,
8498        })
8499    }
8500
8501    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8502    /// to hold a `Assertion`.
8503    ///
8504    /// Note that all the setters affecting `compiled_object` are
8505    /// mutually exclusive.
8506    ///
8507    /// # Example
8508    /// ```ignore,no_run
8509    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8510    /// use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
8511    /// let x = CompilationResultAction::new().set_assertion(Assertion::default()/* use setters */);
8512    /// assert!(x.assertion().is_some());
8513    /// assert!(x.relation().is_none());
8514    /// assert!(x.operations().is_none());
8515    /// assert!(x.declaration().is_none());
8516    /// assert!(x.notebook().is_none());
8517    /// assert!(x.data_preparation().is_none());
8518    /// ```
8519    pub fn set_assertion<
8520        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
8521    >(
8522        mut self,
8523        v: T,
8524    ) -> Self {
8525        self.compiled_object = std::option::Option::Some(
8526            crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
8527        );
8528        self
8529    }
8530
8531    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8532    /// if it holds a `Declaration`, `None` if the field is not set or
8533    /// holds a different branch.
8534    pub fn declaration(
8535        &self,
8536    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
8537    {
8538        #[allow(unreachable_patterns)]
8539        self.compiled_object.as_ref().and_then(|v| match v {
8540            crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
8541                std::option::Option::Some(v)
8542            }
8543            _ => std::option::Option::None,
8544        })
8545    }
8546
8547    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8548    /// to hold a `Declaration`.
8549    ///
8550    /// Note that all the setters affecting `compiled_object` are
8551    /// mutually exclusive.
8552    ///
8553    /// # Example
8554    /// ```ignore,no_run
8555    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8556    /// use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
8557    /// let x = CompilationResultAction::new().set_declaration(Declaration::default()/* use setters */);
8558    /// assert!(x.declaration().is_some());
8559    /// assert!(x.relation().is_none());
8560    /// assert!(x.operations().is_none());
8561    /// assert!(x.assertion().is_none());
8562    /// assert!(x.notebook().is_none());
8563    /// assert!(x.data_preparation().is_none());
8564    /// ```
8565    pub fn set_declaration<
8566        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
8567    >(
8568        mut self,
8569        v: T,
8570    ) -> Self {
8571        self.compiled_object = std::option::Option::Some(
8572            crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
8573        );
8574        self
8575    }
8576
8577    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8578    /// if it holds a `Notebook`, `None` if the field is not set or
8579    /// holds a different branch.
8580    pub fn notebook(
8581        &self,
8582    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
8583    {
8584        #[allow(unreachable_patterns)]
8585        self.compiled_object.as_ref().and_then(|v| match v {
8586            crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
8587                std::option::Option::Some(v)
8588            }
8589            _ => std::option::Option::None,
8590        })
8591    }
8592
8593    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8594    /// to hold a `Notebook`.
8595    ///
8596    /// Note that all the setters affecting `compiled_object` are
8597    /// mutually exclusive.
8598    ///
8599    /// # Example
8600    /// ```ignore,no_run
8601    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8602    /// use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
8603    /// let x = CompilationResultAction::new().set_notebook(Notebook::default()/* use setters */);
8604    /// assert!(x.notebook().is_some());
8605    /// assert!(x.relation().is_none());
8606    /// assert!(x.operations().is_none());
8607    /// assert!(x.assertion().is_none());
8608    /// assert!(x.declaration().is_none());
8609    /// assert!(x.data_preparation().is_none());
8610    /// ```
8611    pub fn set_notebook<
8612        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
8613    >(
8614        mut self,
8615        v: T,
8616    ) -> Self {
8617        self.compiled_object = std::option::Option::Some(
8618            crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
8619        );
8620        self
8621    }
8622
8623    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8624    /// if it holds a `DataPreparation`, `None` if the field is not set or
8625    /// holds a different branch.
8626    pub fn data_preparation(
8627        &self,
8628    ) -> std::option::Option<
8629        &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
8630    > {
8631        #[allow(unreachable_patterns)]
8632        self.compiled_object.as_ref().and_then(|v| match v {
8633            crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
8634                std::option::Option::Some(v)
8635            }
8636            _ => std::option::Option::None,
8637        })
8638    }
8639
8640    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
8641    /// to hold a `DataPreparation`.
8642    ///
8643    /// Note that all the setters affecting `compiled_object` are
8644    /// mutually exclusive.
8645    ///
8646    /// # Example
8647    /// ```ignore,no_run
8648    /// # use google_cloud_dataform_v1::model::CompilationResultAction;
8649    /// use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
8650    /// let x = CompilationResultAction::new().set_data_preparation(DataPreparation::default()/* use setters */);
8651    /// assert!(x.data_preparation().is_some());
8652    /// assert!(x.relation().is_none());
8653    /// assert!(x.operations().is_none());
8654    /// assert!(x.assertion().is_none());
8655    /// assert!(x.declaration().is_none());
8656    /// assert!(x.notebook().is_none());
8657    /// ```
8658    pub fn set_data_preparation<
8659        T: std::convert::Into<
8660                std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
8661            >,
8662    >(
8663        mut self,
8664        v: T,
8665    ) -> Self {
8666        self.compiled_object = std::option::Option::Some(
8667            crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
8668        );
8669        self
8670    }
8671}
8672
8673impl wkt::message::Message for CompilationResultAction {
8674    fn typename() -> &'static str {
8675        "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
8676    }
8677}
8678
8679/// Defines additional types related to [CompilationResultAction].
8680pub mod compilation_result_action {
8681    #[allow(unused_imports)]
8682    use super::*;
8683
8684    /// Represents a database relation.
8685    #[derive(Clone, Default, PartialEq)]
8686    #[non_exhaustive]
8687    pub struct Relation {
8688        /// A list of actions that this action depends on.
8689        pub dependency_targets: std::vec::Vec<crate::model::Target>,
8690
8691        /// Whether this action is disabled (i.e. should not be run).
8692        pub disabled: bool,
8693
8694        /// Arbitrary, user-defined tags on this action.
8695        pub tags: std::vec::Vec<std::string::String>,
8696
8697        /// Descriptor for the relation and its columns.
8698        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
8699
8700        /// The type of this relation.
8701        pub relation_type: crate::model::compilation_result_action::relation::RelationType,
8702
8703        /// The SELECT query which returns rows which this relation should contain.
8704        pub select_query: std::string::String,
8705
8706        /// SQL statements to be executed before creating the relation.
8707        pub pre_operations: std::vec::Vec<std::string::String>,
8708
8709        /// SQL statements to be executed after creating the relation.
8710        pub post_operations: std::vec::Vec<std::string::String>,
8711
8712        /// Configures `INCREMENTAL_TABLE` settings for this relation. Only set if
8713        /// `relation_type` is `INCREMENTAL_TABLE`.
8714        pub incremental_table_config: std::option::Option<
8715            crate::model::compilation_result_action::relation::IncrementalTableConfig,
8716        >,
8717
8718        /// The SQL expression used to partition the relation.
8719        pub partition_expression: std::string::String,
8720
8721        /// A list of columns or SQL expressions used to cluster the table.
8722        pub cluster_expressions: std::vec::Vec<std::string::String>,
8723
8724        /// Sets the partition expiration in days.
8725        pub partition_expiration_days: i32,
8726
8727        /// Specifies whether queries on this table must include a predicate filter
8728        /// that filters on the partitioning column.
8729        pub require_partition_filter: bool,
8730
8731        /// Additional options that will be provided as key/value pairs into the
8732        /// options clause of a create table/view statement. See
8733        /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language>
8734        /// for more information on which options are supported.
8735        pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
8736
8737        /// Optional. The connection specifying the credentials to be used to read
8738        /// and write to external storage, such as Cloud Storage. The connection can
8739        /// have the form `{project}.{location}.{connection_id}` or
8740        /// `projects/{project}/locations/{location}/connections/{connection_id}`,
8741        /// or be set to DEFAULT.
8742        pub connection: std::string::String,
8743
8744        /// Optional. The table format for the BigQuery table.
8745        pub table_format: crate::model::compilation_result_action::relation::TableFormat,
8746
8747        /// Optional. The file format for the BigQuery table.
8748        pub file_format: crate::model::compilation_result_action::relation::FileFormat,
8749
8750        /// Optional. The fully qualified location prefix of the external folder
8751        /// where table data is stored. The URI should be in the format
8752        /// `gs://bucket/path_to_table/`.
8753        pub storage_uri: std::string::String,
8754
8755        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8756    }
8757
8758    impl Relation {
8759        /// Creates a new default instance.
8760        pub fn new() -> Self {
8761            std::default::Default::default()
8762        }
8763
8764        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Relation::dependency_targets].
8765        ///
8766        /// # Example
8767        /// ```ignore,no_run
8768        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8769        /// use google_cloud_dataform_v1::model::Target;
8770        /// let x = Relation::new()
8771        ///     .set_dependency_targets([
8772        ///         Target::default()/* use setters */,
8773        ///         Target::default()/* use (different) setters */,
8774        ///     ]);
8775        /// ```
8776        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
8777        where
8778            T: std::iter::IntoIterator<Item = V>,
8779            V: std::convert::Into<crate::model::Target>,
8780        {
8781            use std::iter::Iterator;
8782            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
8783            self
8784        }
8785
8786        /// Sets the value of [disabled][crate::model::compilation_result_action::Relation::disabled].
8787        ///
8788        /// # Example
8789        /// ```ignore,no_run
8790        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8791        /// let x = Relation::new().set_disabled(true);
8792        /// ```
8793        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8794            self.disabled = v.into();
8795            self
8796        }
8797
8798        /// Sets the value of [tags][crate::model::compilation_result_action::Relation::tags].
8799        ///
8800        /// # Example
8801        /// ```ignore,no_run
8802        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8803        /// let x = Relation::new().set_tags(["a", "b", "c"]);
8804        /// ```
8805        pub fn set_tags<T, V>(mut self, v: T) -> Self
8806        where
8807            T: std::iter::IntoIterator<Item = V>,
8808            V: std::convert::Into<std::string::String>,
8809        {
8810            use std::iter::Iterator;
8811            self.tags = v.into_iter().map(|i| i.into()).collect();
8812            self
8813        }
8814
8815        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8816        ///
8817        /// # Example
8818        /// ```ignore,no_run
8819        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8820        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8821        /// let x = Relation::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
8822        /// ```
8823        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
8824        where
8825            T: std::convert::Into<crate::model::RelationDescriptor>,
8826        {
8827            self.relation_descriptor = std::option::Option::Some(v.into());
8828            self
8829        }
8830
8831        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
8832        ///
8833        /// # Example
8834        /// ```ignore,no_run
8835        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8836        /// use google_cloud_dataform_v1::model::RelationDescriptor;
8837        /// let x = Relation::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
8838        /// let x = Relation::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
8839        /// ```
8840        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
8841        where
8842            T: std::convert::Into<crate::model::RelationDescriptor>,
8843        {
8844            self.relation_descriptor = v.map(|x| x.into());
8845            self
8846        }
8847
8848        /// Sets the value of [relation_type][crate::model::compilation_result_action::Relation::relation_type].
8849        ///
8850        /// # Example
8851        /// ```ignore,no_run
8852        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8853        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::RelationType;
8854        /// let x0 = Relation::new().set_relation_type(RelationType::Table);
8855        /// let x1 = Relation::new().set_relation_type(RelationType::View);
8856        /// let x2 = Relation::new().set_relation_type(RelationType::IncrementalTable);
8857        /// ```
8858        pub fn set_relation_type<
8859            T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
8860        >(
8861            mut self,
8862            v: T,
8863        ) -> Self {
8864            self.relation_type = v.into();
8865            self
8866        }
8867
8868        /// Sets the value of [select_query][crate::model::compilation_result_action::Relation::select_query].
8869        ///
8870        /// # Example
8871        /// ```ignore,no_run
8872        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8873        /// let x = Relation::new().set_select_query("example");
8874        /// ```
8875        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
8876            mut self,
8877            v: T,
8878        ) -> Self {
8879            self.select_query = v.into();
8880            self
8881        }
8882
8883        /// Sets the value of [pre_operations][crate::model::compilation_result_action::Relation::pre_operations].
8884        ///
8885        /// # Example
8886        /// ```ignore,no_run
8887        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8888        /// let x = Relation::new().set_pre_operations(["a", "b", "c"]);
8889        /// ```
8890        pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
8891        where
8892            T: std::iter::IntoIterator<Item = V>,
8893            V: std::convert::Into<std::string::String>,
8894        {
8895            use std::iter::Iterator;
8896            self.pre_operations = v.into_iter().map(|i| i.into()).collect();
8897            self
8898        }
8899
8900        /// Sets the value of [post_operations][crate::model::compilation_result_action::Relation::post_operations].
8901        ///
8902        /// # Example
8903        /// ```ignore,no_run
8904        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8905        /// let x = Relation::new().set_post_operations(["a", "b", "c"]);
8906        /// ```
8907        pub fn set_post_operations<T, V>(mut self, v: T) -> Self
8908        where
8909            T: std::iter::IntoIterator<Item = V>,
8910            V: std::convert::Into<std::string::String>,
8911        {
8912            use std::iter::Iterator;
8913            self.post_operations = v.into_iter().map(|i| i.into()).collect();
8914            self
8915        }
8916
8917        /// Sets the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8918        ///
8919        /// # Example
8920        /// ```ignore,no_run
8921        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8922        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8923        /// let x = Relation::new().set_incremental_table_config(IncrementalTableConfig::default()/* use setters */);
8924        /// ```
8925        pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
8926        where
8927            T: std::convert::Into<
8928                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8929                >,
8930        {
8931            self.incremental_table_config = std::option::Option::Some(v.into());
8932            self
8933        }
8934
8935        /// Sets or clears the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
8936        ///
8937        /// # Example
8938        /// ```ignore,no_run
8939        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8940        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
8941        /// let x = Relation::new().set_or_clear_incremental_table_config(Some(IncrementalTableConfig::default()/* use setters */));
8942        /// let x = Relation::new().set_or_clear_incremental_table_config(None::<IncrementalTableConfig>);
8943        /// ```
8944        pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
8945        where
8946            T: std::convert::Into<
8947                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
8948                >,
8949        {
8950            self.incremental_table_config = v.map(|x| x.into());
8951            self
8952        }
8953
8954        /// Sets the value of [partition_expression][crate::model::compilation_result_action::Relation::partition_expression].
8955        ///
8956        /// # Example
8957        /// ```ignore,no_run
8958        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8959        /// let x = Relation::new().set_partition_expression("example");
8960        /// ```
8961        pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
8962            mut self,
8963            v: T,
8964        ) -> Self {
8965            self.partition_expression = v.into();
8966            self
8967        }
8968
8969        /// Sets the value of [cluster_expressions][crate::model::compilation_result_action::Relation::cluster_expressions].
8970        ///
8971        /// # Example
8972        /// ```ignore,no_run
8973        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8974        /// let x = Relation::new().set_cluster_expressions(["a", "b", "c"]);
8975        /// ```
8976        pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
8977        where
8978            T: std::iter::IntoIterator<Item = V>,
8979            V: std::convert::Into<std::string::String>,
8980        {
8981            use std::iter::Iterator;
8982            self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
8983            self
8984        }
8985
8986        /// Sets the value of [partition_expiration_days][crate::model::compilation_result_action::Relation::partition_expiration_days].
8987        ///
8988        /// # Example
8989        /// ```ignore,no_run
8990        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
8991        /// let x = Relation::new().set_partition_expiration_days(42);
8992        /// ```
8993        pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8994            self.partition_expiration_days = v.into();
8995            self
8996        }
8997
8998        /// Sets the value of [require_partition_filter][crate::model::compilation_result_action::Relation::require_partition_filter].
8999        ///
9000        /// # Example
9001        /// ```ignore,no_run
9002        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9003        /// let x = Relation::new().set_require_partition_filter(true);
9004        /// ```
9005        pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9006            self.require_partition_filter = v.into();
9007            self
9008        }
9009
9010        /// Sets the value of [additional_options][crate::model::compilation_result_action::Relation::additional_options].
9011        ///
9012        /// # Example
9013        /// ```ignore,no_run
9014        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9015        /// let x = Relation::new().set_additional_options([
9016        ///     ("key0", "abc"),
9017        ///     ("key1", "xyz"),
9018        /// ]);
9019        /// ```
9020        pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
9021        where
9022            T: std::iter::IntoIterator<Item = (K, V)>,
9023            K: std::convert::Into<std::string::String>,
9024            V: std::convert::Into<std::string::String>,
9025        {
9026            use std::iter::Iterator;
9027            self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9028            self
9029        }
9030
9031        /// Sets the value of [connection][crate::model::compilation_result_action::Relation::connection].
9032        ///
9033        /// # Example
9034        /// ```ignore,no_run
9035        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9036        /// let x = Relation::new().set_connection("example");
9037        /// ```
9038        pub fn set_connection<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9039            self.connection = v.into();
9040            self
9041        }
9042
9043        /// Sets the value of [table_format][crate::model::compilation_result_action::Relation::table_format].
9044        ///
9045        /// # Example
9046        /// ```ignore,no_run
9047        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9048        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::TableFormat;
9049        /// let x0 = Relation::new().set_table_format(TableFormat::Iceberg);
9050        /// ```
9051        pub fn set_table_format<
9052            T: std::convert::Into<crate::model::compilation_result_action::relation::TableFormat>,
9053        >(
9054            mut self,
9055            v: T,
9056        ) -> Self {
9057            self.table_format = v.into();
9058            self
9059        }
9060
9061        /// Sets the value of [file_format][crate::model::compilation_result_action::Relation::file_format].
9062        ///
9063        /// # Example
9064        /// ```ignore,no_run
9065        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9066        /// use google_cloud_dataform_v1::model::compilation_result_action::relation::FileFormat;
9067        /// let x0 = Relation::new().set_file_format(FileFormat::Parquet);
9068        /// ```
9069        pub fn set_file_format<
9070            T: std::convert::Into<crate::model::compilation_result_action::relation::FileFormat>,
9071        >(
9072            mut self,
9073            v: T,
9074        ) -> Self {
9075            self.file_format = v.into();
9076            self
9077        }
9078
9079        /// Sets the value of [storage_uri][crate::model::compilation_result_action::Relation::storage_uri].
9080        ///
9081        /// # Example
9082        /// ```ignore,no_run
9083        /// # use google_cloud_dataform_v1::model::compilation_result_action::Relation;
9084        /// let x = Relation::new().set_storage_uri("example");
9085        /// ```
9086        pub fn set_storage_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9087            self.storage_uri = v.into();
9088            self
9089        }
9090    }
9091
9092    impl wkt::message::Message for Relation {
9093        fn typename() -> &'static str {
9094            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
9095        }
9096    }
9097
9098    /// Defines additional types related to [Relation].
9099    pub mod relation {
9100        #[allow(unused_imports)]
9101        use super::*;
9102
9103        /// Contains settings for relations of type `INCREMENTAL_TABLE`.
9104        #[derive(Clone, Default, PartialEq)]
9105        #[non_exhaustive]
9106        pub struct IncrementalTableConfig {
9107            /// The SELECT query which returns rows which should be inserted into the
9108            /// relation if it already exists and is not being refreshed.
9109            pub incremental_select_query: std::string::String,
9110
9111            /// Whether this table should be protected from being refreshed.
9112            pub refresh_disabled: bool,
9113
9114            /// A set of columns or SQL expressions used to define row uniqueness.
9115            /// If any duplicates are discovered (as defined by `unique_key_parts`),
9116            /// only the newly selected rows (as defined by `incremental_select_query`)
9117            /// will be included in the relation.
9118            pub unique_key_parts: std::vec::Vec<std::string::String>,
9119
9120            /// A SQL expression conditional used to limit the set of existing rows
9121            /// considered for a merge operation (see `unique_key_parts` for more
9122            /// information).
9123            pub update_partition_filter: std::string::String,
9124
9125            /// SQL statements to be executed before inserting new rows into the
9126            /// relation.
9127            pub incremental_pre_operations: std::vec::Vec<std::string::String>,
9128
9129            /// SQL statements to be executed after inserting new rows into the
9130            /// relation.
9131            pub incremental_post_operations: std::vec::Vec<std::string::String>,
9132
9133            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9134        }
9135
9136        impl IncrementalTableConfig {
9137            /// Creates a new default instance.
9138            pub fn new() -> Self {
9139                std::default::Default::default()
9140            }
9141
9142            /// Sets the value of [incremental_select_query][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_select_query].
9143            ///
9144            /// # Example
9145            /// ```ignore,no_run
9146            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9147            /// let x = IncrementalTableConfig::new().set_incremental_select_query("example");
9148            /// ```
9149            pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
9150                mut self,
9151                v: T,
9152            ) -> Self {
9153                self.incremental_select_query = v.into();
9154                self
9155            }
9156
9157            /// Sets the value of [refresh_disabled][crate::model::compilation_result_action::relation::IncrementalTableConfig::refresh_disabled].
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_refresh_disabled(true);
9163            /// ```
9164            pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9165                self.refresh_disabled = v.into();
9166                self
9167            }
9168
9169            /// Sets the value of [unique_key_parts][crate::model::compilation_result_action::relation::IncrementalTableConfig::unique_key_parts].
9170            ///
9171            /// # Example
9172            /// ```ignore,no_run
9173            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9174            /// let x = IncrementalTableConfig::new().set_unique_key_parts(["a", "b", "c"]);
9175            /// ```
9176            pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
9177            where
9178                T: std::iter::IntoIterator<Item = V>,
9179                V: std::convert::Into<std::string::String>,
9180            {
9181                use std::iter::Iterator;
9182                self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
9183                self
9184            }
9185
9186            /// Sets the value of [update_partition_filter][crate::model::compilation_result_action::relation::IncrementalTableConfig::update_partition_filter].
9187            ///
9188            /// # Example
9189            /// ```ignore,no_run
9190            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9191            /// let x = IncrementalTableConfig::new().set_update_partition_filter("example");
9192            /// ```
9193            pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
9194                mut self,
9195                v: T,
9196            ) -> Self {
9197                self.update_partition_filter = v.into();
9198                self
9199            }
9200
9201            /// Sets the value of [incremental_pre_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_pre_operations].
9202            ///
9203            /// # Example
9204            /// ```ignore,no_run
9205            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9206            /// let x = IncrementalTableConfig::new().set_incremental_pre_operations(["a", "b", "c"]);
9207            /// ```
9208            pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
9209            where
9210                T: std::iter::IntoIterator<Item = V>,
9211                V: std::convert::Into<std::string::String>,
9212            {
9213                use std::iter::Iterator;
9214                self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
9215                self
9216            }
9217
9218            /// Sets the value of [incremental_post_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_post_operations].
9219            ///
9220            /// # Example
9221            /// ```ignore,no_run
9222            /// # use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
9223            /// let x = IncrementalTableConfig::new().set_incremental_post_operations(["a", "b", "c"]);
9224            /// ```
9225            pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
9226            where
9227                T: std::iter::IntoIterator<Item = V>,
9228                V: std::convert::Into<std::string::String>,
9229            {
9230                use std::iter::Iterator;
9231                self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
9232                self
9233            }
9234        }
9235
9236        impl wkt::message::Message for IncrementalTableConfig {
9237            fn typename() -> &'static str {
9238                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
9239            }
9240        }
9241
9242        /// Indicates the type of this relation.
9243        ///
9244        /// # Working with unknown values
9245        ///
9246        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9247        /// additional enum variants at any time. Adding new variants is not considered
9248        /// a breaking change. Applications should write their code in anticipation of:
9249        ///
9250        /// - New values appearing in future releases of the client library, **and**
9251        /// - New values received dynamically, without application changes.
9252        ///
9253        /// Please consult the [Working with enums] section in the user guide for some
9254        /// guidelines.
9255        ///
9256        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9257        #[derive(Clone, Debug, PartialEq)]
9258        #[non_exhaustive]
9259        pub enum RelationType {
9260            /// Default value. This value is unused.
9261            Unspecified,
9262            /// The relation is a table.
9263            Table,
9264            /// The relation is a view.
9265            View,
9266            /// The relation is an incrementalized table.
9267            IncrementalTable,
9268            /// The relation is a materialized view.
9269            MaterializedView,
9270            /// If set, the enum was initialized with an unknown value.
9271            ///
9272            /// Applications can examine the value using [RelationType::value] or
9273            /// [RelationType::name].
9274            UnknownValue(relation_type::UnknownValue),
9275        }
9276
9277        #[doc(hidden)]
9278        pub mod relation_type {
9279            #[allow(unused_imports)]
9280            use super::*;
9281            #[derive(Clone, Debug, PartialEq)]
9282            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9283        }
9284
9285        impl RelationType {
9286            /// Gets the enum value.
9287            ///
9288            /// Returns `None` if the enum contains an unknown value deserialized from
9289            /// the string representation of enums.
9290            pub fn value(&self) -> std::option::Option<i32> {
9291                match self {
9292                    Self::Unspecified => std::option::Option::Some(0),
9293                    Self::Table => std::option::Option::Some(1),
9294                    Self::View => std::option::Option::Some(2),
9295                    Self::IncrementalTable => std::option::Option::Some(3),
9296                    Self::MaterializedView => std::option::Option::Some(4),
9297                    Self::UnknownValue(u) => u.0.value(),
9298                }
9299            }
9300
9301            /// Gets the enum value as a string.
9302            ///
9303            /// Returns `None` if the enum contains an unknown value deserialized from
9304            /// the integer representation of enums.
9305            pub fn name(&self) -> std::option::Option<&str> {
9306                match self {
9307                    Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
9308                    Self::Table => std::option::Option::Some("TABLE"),
9309                    Self::View => std::option::Option::Some("VIEW"),
9310                    Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
9311                    Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
9312                    Self::UnknownValue(u) => u.0.name(),
9313                }
9314            }
9315        }
9316
9317        impl std::default::Default for RelationType {
9318            fn default() -> Self {
9319                use std::convert::From;
9320                Self::from(0)
9321            }
9322        }
9323
9324        impl std::fmt::Display for RelationType {
9325            fn fmt(
9326                &self,
9327                f: &mut std::fmt::Formatter<'_>,
9328            ) -> std::result::Result<(), std::fmt::Error> {
9329                wkt::internal::display_enum(f, self.name(), self.value())
9330            }
9331        }
9332
9333        impl std::convert::From<i32> for RelationType {
9334            fn from(value: i32) -> Self {
9335                match value {
9336                    0 => Self::Unspecified,
9337                    1 => Self::Table,
9338                    2 => Self::View,
9339                    3 => Self::IncrementalTable,
9340                    4 => Self::MaterializedView,
9341                    _ => Self::UnknownValue(relation_type::UnknownValue(
9342                        wkt::internal::UnknownEnumValue::Integer(value),
9343                    )),
9344                }
9345            }
9346        }
9347
9348        impl std::convert::From<&str> for RelationType {
9349            fn from(value: &str) -> Self {
9350                use std::string::ToString;
9351                match value {
9352                    "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
9353                    "TABLE" => Self::Table,
9354                    "VIEW" => Self::View,
9355                    "INCREMENTAL_TABLE" => Self::IncrementalTable,
9356                    "MATERIALIZED_VIEW" => Self::MaterializedView,
9357                    _ => Self::UnknownValue(relation_type::UnknownValue(
9358                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9359                    )),
9360                }
9361            }
9362        }
9363
9364        impl serde::ser::Serialize for RelationType {
9365            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9366            where
9367                S: serde::Serializer,
9368            {
9369                match self {
9370                    Self::Unspecified => serializer.serialize_i32(0),
9371                    Self::Table => serializer.serialize_i32(1),
9372                    Self::View => serializer.serialize_i32(2),
9373                    Self::IncrementalTable => serializer.serialize_i32(3),
9374                    Self::MaterializedView => serializer.serialize_i32(4),
9375                    Self::UnknownValue(u) => u.0.serialize(serializer),
9376                }
9377            }
9378        }
9379
9380        impl<'de> serde::de::Deserialize<'de> for RelationType {
9381            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9382            where
9383                D: serde::Deserializer<'de>,
9384            {
9385                deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
9386                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
9387                ))
9388            }
9389        }
9390
9391        /// Supported table formats for BigQuery tables.
9392        ///
9393        /// # Working with unknown values
9394        ///
9395        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9396        /// additional enum variants at any time. Adding new variants is not considered
9397        /// a breaking change. Applications should write their code in anticipation of:
9398        ///
9399        /// - New values appearing in future releases of the client library, **and**
9400        /// - New values received dynamically, without application changes.
9401        ///
9402        /// Please consult the [Working with enums] section in the user guide for some
9403        /// guidelines.
9404        ///
9405        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9406        #[derive(Clone, Debug, PartialEq)]
9407        #[non_exhaustive]
9408        pub enum TableFormat {
9409            /// Default value.
9410            Unspecified,
9411            /// Apache Iceberg format.
9412            Iceberg,
9413            /// If set, the enum was initialized with an unknown value.
9414            ///
9415            /// Applications can examine the value using [TableFormat::value] or
9416            /// [TableFormat::name].
9417            UnknownValue(table_format::UnknownValue),
9418        }
9419
9420        #[doc(hidden)]
9421        pub mod table_format {
9422            #[allow(unused_imports)]
9423            use super::*;
9424            #[derive(Clone, Debug, PartialEq)]
9425            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9426        }
9427
9428        impl TableFormat {
9429            /// Gets the enum value.
9430            ///
9431            /// Returns `None` if the enum contains an unknown value deserialized from
9432            /// the string representation of enums.
9433            pub fn value(&self) -> std::option::Option<i32> {
9434                match self {
9435                    Self::Unspecified => std::option::Option::Some(0),
9436                    Self::Iceberg => std::option::Option::Some(1),
9437                    Self::UnknownValue(u) => u.0.value(),
9438                }
9439            }
9440
9441            /// Gets the enum value as a string.
9442            ///
9443            /// Returns `None` if the enum contains an unknown value deserialized from
9444            /// the integer representation of enums.
9445            pub fn name(&self) -> std::option::Option<&str> {
9446                match self {
9447                    Self::Unspecified => std::option::Option::Some("TABLE_FORMAT_UNSPECIFIED"),
9448                    Self::Iceberg => std::option::Option::Some("ICEBERG"),
9449                    Self::UnknownValue(u) => u.0.name(),
9450                }
9451            }
9452        }
9453
9454        impl std::default::Default for TableFormat {
9455            fn default() -> Self {
9456                use std::convert::From;
9457                Self::from(0)
9458            }
9459        }
9460
9461        impl std::fmt::Display for TableFormat {
9462            fn fmt(
9463                &self,
9464                f: &mut std::fmt::Formatter<'_>,
9465            ) -> std::result::Result<(), std::fmt::Error> {
9466                wkt::internal::display_enum(f, self.name(), self.value())
9467            }
9468        }
9469
9470        impl std::convert::From<i32> for TableFormat {
9471            fn from(value: i32) -> Self {
9472                match value {
9473                    0 => Self::Unspecified,
9474                    1 => Self::Iceberg,
9475                    _ => Self::UnknownValue(table_format::UnknownValue(
9476                        wkt::internal::UnknownEnumValue::Integer(value),
9477                    )),
9478                }
9479            }
9480        }
9481
9482        impl std::convert::From<&str> for TableFormat {
9483            fn from(value: &str) -> Self {
9484                use std::string::ToString;
9485                match value {
9486                    "TABLE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9487                    "ICEBERG" => Self::Iceberg,
9488                    _ => Self::UnknownValue(table_format::UnknownValue(
9489                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9490                    )),
9491                }
9492            }
9493        }
9494
9495        impl serde::ser::Serialize for TableFormat {
9496            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9497            where
9498                S: serde::Serializer,
9499            {
9500                match self {
9501                    Self::Unspecified => serializer.serialize_i32(0),
9502                    Self::Iceberg => serializer.serialize_i32(1),
9503                    Self::UnknownValue(u) => u.0.serialize(serializer),
9504                }
9505            }
9506        }
9507
9508        impl<'de> serde::de::Deserialize<'de> for TableFormat {
9509            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9510            where
9511                D: serde::Deserializer<'de>,
9512            {
9513                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TableFormat>::new(
9514                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.TableFormat",
9515                ))
9516            }
9517        }
9518
9519        /// Supported file formats for BigQuery tables.
9520        ///
9521        /// # Working with unknown values
9522        ///
9523        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9524        /// additional enum variants at any time. Adding new variants is not considered
9525        /// a breaking change. Applications should write their code in anticipation of:
9526        ///
9527        /// - New values appearing in future releases of the client library, **and**
9528        /// - New values received dynamically, without application changes.
9529        ///
9530        /// Please consult the [Working with enums] section in the user guide for some
9531        /// guidelines.
9532        ///
9533        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9534        #[derive(Clone, Debug, PartialEq)]
9535        #[non_exhaustive]
9536        pub enum FileFormat {
9537            /// Default value.
9538            Unspecified,
9539            /// Apache Parquet format.
9540            Parquet,
9541            /// If set, the enum was initialized with an unknown value.
9542            ///
9543            /// Applications can examine the value using [FileFormat::value] or
9544            /// [FileFormat::name].
9545            UnknownValue(file_format::UnknownValue),
9546        }
9547
9548        #[doc(hidden)]
9549        pub mod file_format {
9550            #[allow(unused_imports)]
9551            use super::*;
9552            #[derive(Clone, Debug, PartialEq)]
9553            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9554        }
9555
9556        impl FileFormat {
9557            /// Gets the enum value.
9558            ///
9559            /// Returns `None` if the enum contains an unknown value deserialized from
9560            /// the string representation of enums.
9561            pub fn value(&self) -> std::option::Option<i32> {
9562                match self {
9563                    Self::Unspecified => std::option::Option::Some(0),
9564                    Self::Parquet => std::option::Option::Some(1),
9565                    Self::UnknownValue(u) => u.0.value(),
9566                }
9567            }
9568
9569            /// Gets the enum value as a string.
9570            ///
9571            /// Returns `None` if the enum contains an unknown value deserialized from
9572            /// the integer representation of enums.
9573            pub fn name(&self) -> std::option::Option<&str> {
9574                match self {
9575                    Self::Unspecified => std::option::Option::Some("FILE_FORMAT_UNSPECIFIED"),
9576                    Self::Parquet => std::option::Option::Some("PARQUET"),
9577                    Self::UnknownValue(u) => u.0.name(),
9578                }
9579            }
9580        }
9581
9582        impl std::default::Default for FileFormat {
9583            fn default() -> Self {
9584                use std::convert::From;
9585                Self::from(0)
9586            }
9587        }
9588
9589        impl std::fmt::Display for FileFormat {
9590            fn fmt(
9591                &self,
9592                f: &mut std::fmt::Formatter<'_>,
9593            ) -> std::result::Result<(), std::fmt::Error> {
9594                wkt::internal::display_enum(f, self.name(), self.value())
9595            }
9596        }
9597
9598        impl std::convert::From<i32> for FileFormat {
9599            fn from(value: i32) -> Self {
9600                match value {
9601                    0 => Self::Unspecified,
9602                    1 => Self::Parquet,
9603                    _ => Self::UnknownValue(file_format::UnknownValue(
9604                        wkt::internal::UnknownEnumValue::Integer(value),
9605                    )),
9606                }
9607            }
9608        }
9609
9610        impl std::convert::From<&str> for FileFormat {
9611            fn from(value: &str) -> Self {
9612                use std::string::ToString;
9613                match value {
9614                    "FILE_FORMAT_UNSPECIFIED" => Self::Unspecified,
9615                    "PARQUET" => Self::Parquet,
9616                    _ => Self::UnknownValue(file_format::UnknownValue(
9617                        wkt::internal::UnknownEnumValue::String(value.to_string()),
9618                    )),
9619                }
9620            }
9621        }
9622
9623        impl serde::ser::Serialize for FileFormat {
9624            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9625            where
9626                S: serde::Serializer,
9627            {
9628                match self {
9629                    Self::Unspecified => serializer.serialize_i32(0),
9630                    Self::Parquet => serializer.serialize_i32(1),
9631                    Self::UnknownValue(u) => u.0.serialize(serializer),
9632                }
9633            }
9634        }
9635
9636        impl<'de> serde::de::Deserialize<'de> for FileFormat {
9637            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9638            where
9639                D: serde::Deserializer<'de>,
9640            {
9641                deserializer.deserialize_any(wkt::internal::EnumVisitor::<FileFormat>::new(
9642                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.FileFormat",
9643                ))
9644            }
9645        }
9646    }
9647
9648    /// Represents a list of arbitrary database operations.
9649    #[derive(Clone, Default, PartialEq)]
9650    #[non_exhaustive]
9651    pub struct Operations {
9652        /// A list of actions that this action depends on.
9653        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9654
9655        /// Whether this action is disabled (i.e. should not be run).
9656        pub disabled: bool,
9657
9658        /// Arbitrary, user-defined tags on this action.
9659        pub tags: std::vec::Vec<std::string::String>,
9660
9661        /// Descriptor for any output relation and its columns. Only set if
9662        /// `has_output` is true.
9663        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9664
9665        /// A list of arbitrary SQL statements that will be executed without
9666        /// alteration.
9667        pub queries: std::vec::Vec<std::string::String>,
9668
9669        /// Whether these operations produce an output relation.
9670        pub has_output: bool,
9671
9672        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9673    }
9674
9675    impl Operations {
9676        /// Creates a new default instance.
9677        pub fn new() -> Self {
9678            std::default::Default::default()
9679        }
9680
9681        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Operations::dependency_targets].
9682        ///
9683        /// # Example
9684        /// ```ignore,no_run
9685        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9686        /// use google_cloud_dataform_v1::model::Target;
9687        /// let x = Operations::new()
9688        ///     .set_dependency_targets([
9689        ///         Target::default()/* use setters */,
9690        ///         Target::default()/* use (different) setters */,
9691        ///     ]);
9692        /// ```
9693        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9694        where
9695            T: std::iter::IntoIterator<Item = V>,
9696            V: std::convert::Into<crate::model::Target>,
9697        {
9698            use std::iter::Iterator;
9699            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9700            self
9701        }
9702
9703        /// Sets the value of [disabled][crate::model::compilation_result_action::Operations::disabled].
9704        ///
9705        /// # Example
9706        /// ```ignore,no_run
9707        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9708        /// let x = Operations::new().set_disabled(true);
9709        /// ```
9710        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9711            self.disabled = v.into();
9712            self
9713        }
9714
9715        /// Sets the value of [tags][crate::model::compilation_result_action::Operations::tags].
9716        ///
9717        /// # Example
9718        /// ```ignore,no_run
9719        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9720        /// let x = Operations::new().set_tags(["a", "b", "c"]);
9721        /// ```
9722        pub fn set_tags<T, V>(mut self, v: T) -> Self
9723        where
9724            T: std::iter::IntoIterator<Item = V>,
9725            V: std::convert::Into<std::string::String>,
9726        {
9727            use std::iter::Iterator;
9728            self.tags = v.into_iter().map(|i| i.into()).collect();
9729            self
9730        }
9731
9732        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
9733        ///
9734        /// # Example
9735        /// ```ignore,no_run
9736        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9737        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9738        /// let x = Operations::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9739        /// ```
9740        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9741        where
9742            T: std::convert::Into<crate::model::RelationDescriptor>,
9743        {
9744            self.relation_descriptor = std::option::Option::Some(v.into());
9745            self
9746        }
9747
9748        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
9749        ///
9750        /// # Example
9751        /// ```ignore,no_run
9752        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9753        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9754        /// let x = Operations::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9755        /// let x = Operations::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9756        /// ```
9757        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9758        where
9759            T: std::convert::Into<crate::model::RelationDescriptor>,
9760        {
9761            self.relation_descriptor = v.map(|x| x.into());
9762            self
9763        }
9764
9765        /// Sets the value of [queries][crate::model::compilation_result_action::Operations::queries].
9766        ///
9767        /// # Example
9768        /// ```ignore,no_run
9769        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9770        /// let x = Operations::new().set_queries(["a", "b", "c"]);
9771        /// ```
9772        pub fn set_queries<T, V>(mut self, v: T) -> Self
9773        where
9774            T: std::iter::IntoIterator<Item = V>,
9775            V: std::convert::Into<std::string::String>,
9776        {
9777            use std::iter::Iterator;
9778            self.queries = v.into_iter().map(|i| i.into()).collect();
9779            self
9780        }
9781
9782        /// Sets the value of [has_output][crate::model::compilation_result_action::Operations::has_output].
9783        ///
9784        /// # Example
9785        /// ```ignore,no_run
9786        /// # use google_cloud_dataform_v1::model::compilation_result_action::Operations;
9787        /// let x = Operations::new().set_has_output(true);
9788        /// ```
9789        pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9790            self.has_output = v.into();
9791            self
9792        }
9793    }
9794
9795    impl wkt::message::Message for Operations {
9796        fn typename() -> &'static str {
9797            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
9798        }
9799    }
9800
9801    /// Represents an assertion upon a SQL query which is required return zero
9802    /// rows.
9803    #[derive(Clone, Default, PartialEq)]
9804    #[non_exhaustive]
9805    pub struct Assertion {
9806        /// A list of actions that this action depends on.
9807        pub dependency_targets: std::vec::Vec<crate::model::Target>,
9808
9809        /// The parent action of this assertion. Only set if this assertion was
9810        /// automatically generated.
9811        pub parent_action: std::option::Option<crate::model::Target>,
9812
9813        /// Whether this action is disabled (i.e. should not be run).
9814        pub disabled: bool,
9815
9816        /// Arbitrary, user-defined tags on this action.
9817        pub tags: std::vec::Vec<std::string::String>,
9818
9819        /// The SELECT query which must return zero rows in order for this assertion
9820        /// to succeed.
9821        pub select_query: std::string::String,
9822
9823        /// Descriptor for the assertion's automatically-generated view and its
9824        /// columns.
9825        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9826
9827        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9828    }
9829
9830    impl Assertion {
9831        /// Creates a new default instance.
9832        pub fn new() -> Self {
9833            std::default::Default::default()
9834        }
9835
9836        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Assertion::dependency_targets].
9837        ///
9838        /// # Example
9839        /// ```ignore,no_run
9840        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9841        /// use google_cloud_dataform_v1::model::Target;
9842        /// let x = Assertion::new()
9843        ///     .set_dependency_targets([
9844        ///         Target::default()/* use setters */,
9845        ///         Target::default()/* use (different) setters */,
9846        ///     ]);
9847        /// ```
9848        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
9849        where
9850            T: std::iter::IntoIterator<Item = V>,
9851            V: std::convert::Into<crate::model::Target>,
9852        {
9853            use std::iter::Iterator;
9854            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
9855            self
9856        }
9857
9858        /// Sets the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
9859        ///
9860        /// # Example
9861        /// ```ignore,no_run
9862        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9863        /// use google_cloud_dataform_v1::model::Target;
9864        /// let x = Assertion::new().set_parent_action(Target::default()/* use setters */);
9865        /// ```
9866        pub fn set_parent_action<T>(mut self, v: T) -> Self
9867        where
9868            T: std::convert::Into<crate::model::Target>,
9869        {
9870            self.parent_action = std::option::Option::Some(v.into());
9871            self
9872        }
9873
9874        /// Sets or clears the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
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::Target;
9880        /// let x = Assertion::new().set_or_clear_parent_action(Some(Target::default()/* use setters */));
9881        /// let x = Assertion::new().set_or_clear_parent_action(None::<Target>);
9882        /// ```
9883        pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
9884        where
9885            T: std::convert::Into<crate::model::Target>,
9886        {
9887            self.parent_action = v.map(|x| x.into());
9888            self
9889        }
9890
9891        /// Sets the value of [disabled][crate::model::compilation_result_action::Assertion::disabled].
9892        ///
9893        /// # Example
9894        /// ```ignore,no_run
9895        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9896        /// let x = Assertion::new().set_disabled(true);
9897        /// ```
9898        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9899            self.disabled = v.into();
9900            self
9901        }
9902
9903        /// Sets the value of [tags][crate::model::compilation_result_action::Assertion::tags].
9904        ///
9905        /// # Example
9906        /// ```ignore,no_run
9907        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9908        /// let x = Assertion::new().set_tags(["a", "b", "c"]);
9909        /// ```
9910        pub fn set_tags<T, V>(mut self, v: T) -> Self
9911        where
9912            T: std::iter::IntoIterator<Item = V>,
9913            V: std::convert::Into<std::string::String>,
9914        {
9915            use std::iter::Iterator;
9916            self.tags = v.into_iter().map(|i| i.into()).collect();
9917            self
9918        }
9919
9920        /// Sets the value of [select_query][crate::model::compilation_result_action::Assertion::select_query].
9921        ///
9922        /// # Example
9923        /// ```ignore,no_run
9924        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9925        /// let x = Assertion::new().set_select_query("example");
9926        /// ```
9927        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
9928            mut self,
9929            v: T,
9930        ) -> Self {
9931            self.select_query = v.into();
9932            self
9933        }
9934
9935        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
9936        ///
9937        /// # Example
9938        /// ```ignore,no_run
9939        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9940        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9941        /// let x = Assertion::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
9942        /// ```
9943        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
9944        where
9945            T: std::convert::Into<crate::model::RelationDescriptor>,
9946        {
9947            self.relation_descriptor = std::option::Option::Some(v.into());
9948            self
9949        }
9950
9951        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
9952        ///
9953        /// # Example
9954        /// ```ignore,no_run
9955        /// # use google_cloud_dataform_v1::model::compilation_result_action::Assertion;
9956        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9957        /// let x = Assertion::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
9958        /// let x = Assertion::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
9959        /// ```
9960        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
9961        where
9962            T: std::convert::Into<crate::model::RelationDescriptor>,
9963        {
9964            self.relation_descriptor = v.map(|x| x.into());
9965            self
9966        }
9967    }
9968
9969    impl wkt::message::Message for Assertion {
9970        fn typename() -> &'static str {
9971            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
9972        }
9973    }
9974
9975    /// Represents a relation which is not managed by Dataform but which may be
9976    /// referenced by Dataform actions.
9977    #[derive(Clone, Default, PartialEq)]
9978    #[non_exhaustive]
9979    pub struct Declaration {
9980        /// Descriptor for the relation and its columns. Used as documentation only,
9981        /// i.e. values here will result in no changes to the relation's metadata.
9982        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
9983
9984        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9985    }
9986
9987    impl Declaration {
9988        /// Creates a new default instance.
9989        pub fn new() -> Self {
9990            std::default::Default::default()
9991        }
9992
9993        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
9994        ///
9995        /// # Example
9996        /// ```ignore,no_run
9997        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
9998        /// use google_cloud_dataform_v1::model::RelationDescriptor;
9999        /// let x = Declaration::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);
10000        /// ```
10001        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
10002        where
10003            T: std::convert::Into<crate::model::RelationDescriptor>,
10004        {
10005            self.relation_descriptor = std::option::Option::Some(v.into());
10006            self
10007        }
10008
10009        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
10010        ///
10011        /// # Example
10012        /// ```ignore,no_run
10013        /// # use google_cloud_dataform_v1::model::compilation_result_action::Declaration;
10014        /// use google_cloud_dataform_v1::model::RelationDescriptor;
10015        /// let x = Declaration::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
10016        /// let x = Declaration::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);
10017        /// ```
10018        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
10019        where
10020            T: std::convert::Into<crate::model::RelationDescriptor>,
10021        {
10022            self.relation_descriptor = v.map(|x| x.into());
10023            self
10024        }
10025    }
10026
10027    impl wkt::message::Message for Declaration {
10028        fn typename() -> &'static str {
10029            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
10030        }
10031    }
10032
10033    /// Represents a notebook.
10034    #[derive(Clone, Default, PartialEq)]
10035    #[non_exhaustive]
10036    pub struct Notebook {
10037        /// A list of actions that this action depends on.
10038        pub dependency_targets: std::vec::Vec<crate::model::Target>,
10039
10040        /// Whether this action is disabled (i.e. should not be run).
10041        pub disabled: bool,
10042
10043        /// The contents of the notebook.
10044        pub contents: std::string::String,
10045
10046        /// Arbitrary, user-defined tags on this action.
10047        pub tags: std::vec::Vec<std::string::String>,
10048
10049        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10050    }
10051
10052    impl Notebook {
10053        /// Creates a new default instance.
10054        pub fn new() -> Self {
10055            std::default::Default::default()
10056        }
10057
10058        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Notebook::dependency_targets].
10059        ///
10060        /// # Example
10061        /// ```ignore,no_run
10062        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10063        /// use google_cloud_dataform_v1::model::Target;
10064        /// let x = Notebook::new()
10065        ///     .set_dependency_targets([
10066        ///         Target::default()/* use setters */,
10067        ///         Target::default()/* use (different) setters */,
10068        ///     ]);
10069        /// ```
10070        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
10071        where
10072            T: std::iter::IntoIterator<Item = V>,
10073            V: std::convert::Into<crate::model::Target>,
10074        {
10075            use std::iter::Iterator;
10076            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
10077            self
10078        }
10079
10080        /// Sets the value of [disabled][crate::model::compilation_result_action::Notebook::disabled].
10081        ///
10082        /// # Example
10083        /// ```ignore,no_run
10084        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10085        /// let x = Notebook::new().set_disabled(true);
10086        /// ```
10087        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10088            self.disabled = v.into();
10089            self
10090        }
10091
10092        /// Sets the value of [contents][crate::model::compilation_result_action::Notebook::contents].
10093        ///
10094        /// # Example
10095        /// ```ignore,no_run
10096        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10097        /// let x = Notebook::new().set_contents("example");
10098        /// ```
10099        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10100            self.contents = v.into();
10101            self
10102        }
10103
10104        /// Sets the value of [tags][crate::model::compilation_result_action::Notebook::tags].
10105        ///
10106        /// # Example
10107        /// ```ignore,no_run
10108        /// # use google_cloud_dataform_v1::model::compilation_result_action::Notebook;
10109        /// let x = Notebook::new().set_tags(["a", "b", "c"]);
10110        /// ```
10111        pub fn set_tags<T, V>(mut self, v: T) -> Self
10112        where
10113            T: std::iter::IntoIterator<Item = V>,
10114            V: std::convert::Into<std::string::String>,
10115        {
10116            use std::iter::Iterator;
10117            self.tags = v.into_iter().map(|i| i.into()).collect();
10118            self
10119        }
10120    }
10121
10122    impl wkt::message::Message for Notebook {
10123        fn typename() -> &'static str {
10124            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
10125        }
10126    }
10127
10128    /// Defines a compiled Data Preparation entity
10129    #[derive(Clone, Default, PartialEq)]
10130    #[non_exhaustive]
10131    pub struct DataPreparation {
10132        /// A list of actions that this action depends on.
10133        pub dependency_targets: std::vec::Vec<crate::model::Target>,
10134
10135        /// Whether this action is disabled (i.e. should not be run).
10136        pub disabled: bool,
10137
10138        /// Arbitrary, user-defined tags on this action.
10139        pub tags: std::vec::Vec<std::string::String>,
10140
10141        /// The definition for the data preparation.
10142        pub definition: std::option::Option<
10143            crate::model::compilation_result_action::data_preparation::Definition,
10144        >,
10145
10146        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10147    }
10148
10149    impl DataPreparation {
10150        /// Creates a new default instance.
10151        pub fn new() -> Self {
10152            std::default::Default::default()
10153        }
10154
10155        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::DataPreparation::dependency_targets].
10156        ///
10157        /// # Example
10158        /// ```ignore,no_run
10159        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10160        /// use google_cloud_dataform_v1::model::Target;
10161        /// let x = DataPreparation::new()
10162        ///     .set_dependency_targets([
10163        ///         Target::default()/* use setters */,
10164        ///         Target::default()/* use (different) setters */,
10165        ///     ]);
10166        /// ```
10167        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
10168        where
10169            T: std::iter::IntoIterator<Item = V>,
10170            V: std::convert::Into<crate::model::Target>,
10171        {
10172            use std::iter::Iterator;
10173            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
10174            self
10175        }
10176
10177        /// Sets the value of [disabled][crate::model::compilation_result_action::DataPreparation::disabled].
10178        ///
10179        /// # Example
10180        /// ```ignore,no_run
10181        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10182        /// let x = DataPreparation::new().set_disabled(true);
10183        /// ```
10184        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10185            self.disabled = v.into();
10186            self
10187        }
10188
10189        /// Sets the value of [tags][crate::model::compilation_result_action::DataPreparation::tags].
10190        ///
10191        /// # Example
10192        /// ```ignore,no_run
10193        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10194        /// let x = DataPreparation::new().set_tags(["a", "b", "c"]);
10195        /// ```
10196        pub fn set_tags<T, V>(mut self, v: T) -> Self
10197        where
10198            T: std::iter::IntoIterator<Item = V>,
10199            V: std::convert::Into<std::string::String>,
10200        {
10201            use std::iter::Iterator;
10202            self.tags = v.into_iter().map(|i| i.into()).collect();
10203            self
10204        }
10205
10206        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition].
10207        ///
10208        /// Note that all the setters affecting `definition` are mutually
10209        /// exclusive.
10210        ///
10211        /// # Example
10212        /// ```ignore,no_run
10213        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10214        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::Definition;
10215        /// let x = DataPreparation::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
10216        /// ```
10217        pub fn set_definition<
10218            T: std::convert::Into<
10219                    std::option::Option<
10220                        crate::model::compilation_result_action::data_preparation::Definition,
10221                    >,
10222                >,
10223        >(
10224            mut self,
10225            v: T,
10226        ) -> Self {
10227            self.definition = v.into();
10228            self
10229        }
10230
10231        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10232        /// if it holds a `ContentsYaml`, `None` if the field is not set or
10233        /// holds a different branch.
10234        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
10235            #[allow(unreachable_patterns)]
10236            self.definition.as_ref().and_then(|v| match v {
10237                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
10238                _ => std::option::Option::None,
10239            })
10240        }
10241
10242        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10243        /// to hold a `ContentsYaml`.
10244        ///
10245        /// Note that all the setters affecting `definition` are
10246        /// mutually exclusive.
10247        ///
10248        /// # Example
10249        /// ```ignore,no_run
10250        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10251        /// let x = DataPreparation::new().set_contents_yaml("example");
10252        /// assert!(x.contents_yaml().is_some());
10253        /// assert!(x.contents_sql().is_none());
10254        /// ```
10255        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
10256            mut self,
10257            v: T,
10258        ) -> Self {
10259            self.definition = std::option::Option::Some(
10260                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
10261                    v.into(),
10262                ),
10263            );
10264            self
10265        }
10266
10267        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10268        /// if it holds a `ContentsSql`, `None` if the field is not set or
10269        /// holds a different branch.
10270        pub fn contents_sql(
10271            &self,
10272        ) -> std::option::Option<
10273            &std::boxed::Box<
10274                crate::model::compilation_result_action::data_preparation::SqlDefinition,
10275            >,
10276        > {
10277            #[allow(unreachable_patterns)]
10278            self.definition.as_ref().and_then(|v| match v {
10279                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
10280                _ => std::option::Option::None,
10281            })
10282        }
10283
10284        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
10285        /// to hold a `ContentsSql`.
10286        ///
10287        /// Note that all the setters affecting `definition` are
10288        /// mutually exclusive.
10289        ///
10290        /// # Example
10291        /// ```ignore,no_run
10292        /// # use google_cloud_dataform_v1::model::compilation_result_action::DataPreparation;
10293        /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10294        /// let x = DataPreparation::new().set_contents_sql(SqlDefinition::default()/* use setters */);
10295        /// assert!(x.contents_sql().is_some());
10296        /// assert!(x.contents_yaml().is_none());
10297        /// ```
10298        pub fn set_contents_sql<
10299            T: std::convert::Into<
10300                    std::boxed::Box<
10301                        crate::model::compilation_result_action::data_preparation::SqlDefinition,
10302                    >,
10303                >,
10304        >(
10305            mut self,
10306            v: T,
10307        ) -> Self {
10308            self.definition = std::option::Option::Some(
10309                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
10310                    v.into(),
10311                ),
10312            );
10313            self
10314        }
10315    }
10316
10317    impl wkt::message::Message for DataPreparation {
10318        fn typename() -> &'static str {
10319            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
10320        }
10321    }
10322
10323    /// Defines additional types related to [DataPreparation].
10324    pub mod data_preparation {
10325        #[allow(unused_imports)]
10326        use super::*;
10327
10328        /// Definition of a SQL Data Preparation
10329        #[derive(Clone, Default, PartialEq)]
10330        #[non_exhaustive]
10331        pub struct SqlDefinition {
10332            /// The SQL query representing the data preparation steps. Formatted as a
10333            /// Pipe SQL query statement.
10334            pub query: std::string::String,
10335
10336            /// Error table configuration,
10337            pub error_table: std::option::Option<
10338                crate::model::compilation_result_action::data_preparation::ErrorTable,
10339            >,
10340
10341            /// Load configuration.
10342            pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
10343
10344            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10345        }
10346
10347        impl SqlDefinition {
10348            /// Creates a new default instance.
10349            pub fn new() -> Self {
10350                std::default::Default::default()
10351            }
10352
10353            /// Sets the value of [query][crate::model::compilation_result_action::data_preparation::SqlDefinition::query].
10354            ///
10355            /// # Example
10356            /// ```ignore,no_run
10357            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10358            /// let x = SqlDefinition::new().set_query("example");
10359            /// ```
10360            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10361                self.query = v.into();
10362                self
10363            }
10364
10365            /// Sets the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
10366            ///
10367            /// # Example
10368            /// ```ignore,no_run
10369            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10370            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10371            /// let x = SqlDefinition::new().set_error_table(ErrorTable::default()/* use setters */);
10372            /// ```
10373            pub fn set_error_table<T>(mut self, v: T) -> Self
10374            where
10375                T: std::convert::Into<
10376                        crate::model::compilation_result_action::data_preparation::ErrorTable,
10377                    >,
10378            {
10379                self.error_table = std::option::Option::Some(v.into());
10380                self
10381            }
10382
10383            /// Sets or clears the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
10384            ///
10385            /// # Example
10386            /// ```ignore,no_run
10387            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10388            /// use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10389            /// let x = SqlDefinition::new().set_or_clear_error_table(Some(ErrorTable::default()/* use setters */));
10390            /// let x = SqlDefinition::new().set_or_clear_error_table(None::<ErrorTable>);
10391            /// ```
10392            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
10393            where
10394                T: std::convert::Into<
10395                        crate::model::compilation_result_action::data_preparation::ErrorTable,
10396                    >,
10397            {
10398                self.error_table = v.map(|x| x.into());
10399                self
10400            }
10401
10402            /// Sets the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
10403            ///
10404            /// # Example
10405            /// ```ignore,no_run
10406            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10407            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10408            /// let x = SqlDefinition::new().set_load(LoadConfig::default()/* use setters */);
10409            /// ```
10410            pub fn set_load<T>(mut self, v: T) -> Self
10411            where
10412                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
10413            {
10414                self.load = std::option::Option::Some(v.into());
10415                self
10416            }
10417
10418            /// Sets or clears the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
10419            ///
10420            /// # Example
10421            /// ```ignore,no_run
10422            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::SqlDefinition;
10423            /// use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10424            /// let x = SqlDefinition::new().set_or_clear_load(Some(LoadConfig::default()/* use setters */));
10425            /// let x = SqlDefinition::new().set_or_clear_load(None::<LoadConfig>);
10426            /// ```
10427            pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
10428            where
10429                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
10430            {
10431                self.load = v.map(|x| x.into());
10432                self
10433            }
10434        }
10435
10436        impl wkt::message::Message for SqlDefinition {
10437            fn typename() -> &'static str {
10438                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
10439            }
10440        }
10441
10442        /// Error table information, used to write error data into a BigQuery
10443        /// table.
10444        #[derive(Clone, Default, PartialEq)]
10445        #[non_exhaustive]
10446        pub struct ErrorTable {
10447            /// Error Table target.
10448            pub target: std::option::Option<crate::model::Target>,
10449
10450            /// Error table partition expiration in days. Only positive values are
10451            /// allowed.
10452            pub retention_days: i32,
10453
10454            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10455        }
10456
10457        impl ErrorTable {
10458            /// Creates a new default instance.
10459            pub fn new() -> Self {
10460                std::default::Default::default()
10461            }
10462
10463            /// Sets the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
10464            ///
10465            /// # Example
10466            /// ```ignore,no_run
10467            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10468            /// use google_cloud_dataform_v1::model::Target;
10469            /// let x = ErrorTable::new().set_target(Target::default()/* use setters */);
10470            /// ```
10471            pub fn set_target<T>(mut self, v: T) -> Self
10472            where
10473                T: std::convert::Into<crate::model::Target>,
10474            {
10475                self.target = std::option::Option::Some(v.into());
10476                self
10477            }
10478
10479            /// Sets or clears the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
10480            ///
10481            /// # Example
10482            /// ```ignore,no_run
10483            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10484            /// use google_cloud_dataform_v1::model::Target;
10485            /// let x = ErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
10486            /// let x = ErrorTable::new().set_or_clear_target(None::<Target>);
10487            /// ```
10488            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
10489            where
10490                T: std::convert::Into<crate::model::Target>,
10491            {
10492                self.target = v.map(|x| x.into());
10493                self
10494            }
10495
10496            /// Sets the value of [retention_days][crate::model::compilation_result_action::data_preparation::ErrorTable::retention_days].
10497            ///
10498            /// # Example
10499            /// ```ignore,no_run
10500            /// # use google_cloud_dataform_v1::model::compilation_result_action::data_preparation::ErrorTable;
10501            /// let x = ErrorTable::new().set_retention_days(42);
10502            /// ```
10503            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10504                self.retention_days = v.into();
10505                self
10506            }
10507        }
10508
10509        impl wkt::message::Message for ErrorTable {
10510            fn typename() -> &'static str {
10511                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
10512            }
10513        }
10514
10515        /// The definition for the data preparation.
10516        #[derive(Clone, Debug, PartialEq)]
10517        #[non_exhaustive]
10518        pub enum Definition {
10519            /// The data preparation definition, stored as a YAML string.
10520            ContentsYaml(std::string::String),
10521            /// SQL definition for a Data Preparation. Contains a SQL query and
10522            /// additional context information.
10523            ContentsSql(
10524                std::boxed::Box<
10525                    crate::model::compilation_result_action::data_preparation::SqlDefinition,
10526                >,
10527            ),
10528        }
10529    }
10530
10531    /// Simplified load configuration for actions
10532    #[derive(Clone, Default, PartialEq)]
10533    #[non_exhaustive]
10534    pub struct LoadConfig {
10535        /// Load mode
10536        pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
10537
10538        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10539    }
10540
10541    impl LoadConfig {
10542        /// Creates a new default instance.
10543        pub fn new() -> Self {
10544            std::default::Default::default()
10545        }
10546
10547        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode].
10548        ///
10549        /// Note that all the setters affecting `mode` are mutually
10550        /// exclusive.
10551        ///
10552        /// # Example
10553        /// ```ignore,no_run
10554        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10555        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10556        /// let x = LoadConfig::new().set_mode(Some(
10557        ///     google_cloud_dataform_v1::model::compilation_result_action::load_config::Mode::Replace(SimpleLoadMode::default().into())));
10558        /// ```
10559        pub fn set_mode<
10560            T: std::convert::Into<
10561                    std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
10562                >,
10563        >(
10564            mut self,
10565            v: T,
10566        ) -> Self {
10567            self.mode = v.into();
10568            self
10569        }
10570
10571        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10572        /// if it holds a `Replace`, `None` if the field is not set or
10573        /// holds a different branch.
10574        pub fn replace(
10575            &self,
10576        ) -> std::option::Option<
10577            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10578        > {
10579            #[allow(unreachable_patterns)]
10580            self.mode.as_ref().and_then(|v| match v {
10581                crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
10582                    std::option::Option::Some(v)
10583                }
10584                _ => std::option::Option::None,
10585            })
10586        }
10587
10588        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10589        /// to hold a `Replace`.
10590        ///
10591        /// Note that all the setters affecting `mode` are
10592        /// mutually exclusive.
10593        ///
10594        /// # Example
10595        /// ```ignore,no_run
10596        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10597        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10598        /// let x = LoadConfig::new().set_replace(SimpleLoadMode::default()/* use setters */);
10599        /// assert!(x.replace().is_some());
10600        /// assert!(x.append().is_none());
10601        /// assert!(x.maximum().is_none());
10602        /// assert!(x.unique().is_none());
10603        /// ```
10604        pub fn set_replace<
10605            T: std::convert::Into<
10606                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10607                >,
10608        >(
10609            mut self,
10610            v: T,
10611        ) -> Self {
10612            self.mode = std::option::Option::Some(
10613                crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
10614            );
10615            self
10616        }
10617
10618        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10619        /// if it holds a `Append`, `None` if the field is not set or
10620        /// holds a different branch.
10621        pub fn append(
10622            &self,
10623        ) -> std::option::Option<
10624            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10625        > {
10626            #[allow(unreachable_patterns)]
10627            self.mode.as_ref().and_then(|v| match v {
10628                crate::model::compilation_result_action::load_config::Mode::Append(v) => {
10629                    std::option::Option::Some(v)
10630                }
10631                _ => std::option::Option::None,
10632            })
10633        }
10634
10635        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10636        /// to hold a `Append`.
10637        ///
10638        /// Note that all the setters affecting `mode` are
10639        /// mutually exclusive.
10640        ///
10641        /// # Example
10642        /// ```ignore,no_run
10643        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10644        /// use google_cloud_dataform_v1::model::compilation_result_action::SimpleLoadMode;
10645        /// let x = LoadConfig::new().set_append(SimpleLoadMode::default()/* use setters */);
10646        /// assert!(x.append().is_some());
10647        /// assert!(x.replace().is_none());
10648        /// assert!(x.maximum().is_none());
10649        /// assert!(x.unique().is_none());
10650        /// ```
10651        pub fn set_append<
10652            T: std::convert::Into<
10653                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
10654                >,
10655        >(
10656            mut self,
10657            v: T,
10658        ) -> Self {
10659            self.mode = std::option::Option::Some(
10660                crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
10661            );
10662            self
10663        }
10664
10665        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10666        /// if it holds a `Maximum`, `None` if the field is not set or
10667        /// holds a different branch.
10668        pub fn maximum(
10669            &self,
10670        ) -> std::option::Option<
10671            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10672        > {
10673            #[allow(unreachable_patterns)]
10674            self.mode.as_ref().and_then(|v| match v {
10675                crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
10676                    std::option::Option::Some(v)
10677                }
10678                _ => std::option::Option::None,
10679            })
10680        }
10681
10682        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10683        /// to hold a `Maximum`.
10684        ///
10685        /// Note that all the setters affecting `mode` are
10686        /// mutually exclusive.
10687        ///
10688        /// # Example
10689        /// ```ignore,no_run
10690        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10691        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10692        /// let x = LoadConfig::new().set_maximum(IncrementalLoadMode::default()/* use setters */);
10693        /// assert!(x.maximum().is_some());
10694        /// assert!(x.replace().is_none());
10695        /// assert!(x.append().is_none());
10696        /// assert!(x.unique().is_none());
10697        /// ```
10698        pub fn set_maximum<
10699            T: std::convert::Into<
10700                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10701                >,
10702        >(
10703            mut self,
10704            v: T,
10705        ) -> Self {
10706            self.mode = std::option::Option::Some(
10707                crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
10708            );
10709            self
10710        }
10711
10712        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10713        /// if it holds a `Unique`, `None` if the field is not set or
10714        /// holds a different branch.
10715        pub fn unique(
10716            &self,
10717        ) -> std::option::Option<
10718            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10719        > {
10720            #[allow(unreachable_patterns)]
10721            self.mode.as_ref().and_then(|v| match v {
10722                crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
10723                    std::option::Option::Some(v)
10724                }
10725                _ => std::option::Option::None,
10726            })
10727        }
10728
10729        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
10730        /// to hold a `Unique`.
10731        ///
10732        /// Note that all the setters affecting `mode` are
10733        /// mutually exclusive.
10734        ///
10735        /// # Example
10736        /// ```ignore,no_run
10737        /// # use google_cloud_dataform_v1::model::compilation_result_action::LoadConfig;
10738        /// use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10739        /// let x = LoadConfig::new().set_unique(IncrementalLoadMode::default()/* use setters */);
10740        /// assert!(x.unique().is_some());
10741        /// assert!(x.replace().is_none());
10742        /// assert!(x.append().is_none());
10743        /// assert!(x.maximum().is_none());
10744        /// ```
10745        pub fn set_unique<
10746            T: std::convert::Into<
10747                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
10748                >,
10749        >(
10750            mut self,
10751            v: T,
10752        ) -> Self {
10753            self.mode = std::option::Option::Some(
10754                crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
10755            );
10756            self
10757        }
10758    }
10759
10760    impl wkt::message::Message for LoadConfig {
10761        fn typename() -> &'static str {
10762            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
10763        }
10764    }
10765
10766    /// Defines additional types related to [LoadConfig].
10767    pub mod load_config {
10768        #[allow(unused_imports)]
10769        use super::*;
10770
10771        /// Load mode
10772        #[derive(Clone, Debug, PartialEq)]
10773        #[non_exhaustive]
10774        pub enum Mode {
10775            /// Replace destination table
10776            Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
10777            /// Append into destination table
10778            Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
10779            /// Insert records where the value exceeds the previous maximum value for a
10780            /// column in the destination table
10781            Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
10782            /// Insert records where the value of a column is not already present in
10783            /// the destination table
10784            Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
10785        }
10786    }
10787
10788    /// Simple load definition
10789    #[derive(Clone, Default, PartialEq)]
10790    #[non_exhaustive]
10791    pub struct SimpleLoadMode {
10792        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10793    }
10794
10795    impl SimpleLoadMode {
10796        /// Creates a new default instance.
10797        pub fn new() -> Self {
10798            std::default::Default::default()
10799        }
10800    }
10801
10802    impl wkt::message::Message for SimpleLoadMode {
10803        fn typename() -> &'static str {
10804            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
10805        }
10806    }
10807
10808    /// Load definition for incremental load modes
10809    #[derive(Clone, Default, PartialEq)]
10810    #[non_exhaustive]
10811    pub struct IncrementalLoadMode {
10812        /// Column name for incremental load modes
10813        pub column: std::string::String,
10814
10815        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10816    }
10817
10818    impl IncrementalLoadMode {
10819        /// Creates a new default instance.
10820        pub fn new() -> Self {
10821            std::default::Default::default()
10822        }
10823
10824        /// Sets the value of [column][crate::model::compilation_result_action::IncrementalLoadMode::column].
10825        ///
10826        /// # Example
10827        /// ```ignore,no_run
10828        /// # use google_cloud_dataform_v1::model::compilation_result_action::IncrementalLoadMode;
10829        /// let x = IncrementalLoadMode::new().set_column("example");
10830        /// ```
10831        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10832            self.column = v.into();
10833            self
10834        }
10835    }
10836
10837    impl wkt::message::Message for IncrementalLoadMode {
10838        fn typename() -> &'static str {
10839            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
10840        }
10841    }
10842
10843    /// The compiled object.
10844    #[derive(Clone, Debug, PartialEq)]
10845    #[non_exhaustive]
10846    pub enum CompiledObject {
10847        /// The database relation created/updated by this action.
10848        Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
10849        /// The database operations executed by this action.
10850        Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
10851        /// The assertion executed by this action.
10852        Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
10853        /// The declaration declared by this action.
10854        Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
10855        /// The notebook executed by this action.
10856        Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
10857        /// The data preparation executed by this action.
10858        DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
10859    }
10860}
10861
10862/// `QueryCompilationResultActions` request message.
10863#[derive(Clone, Default, PartialEq)]
10864#[non_exhaustive]
10865pub struct QueryCompilationResultActionsRequest {
10866    /// Required. The compilation result's name.
10867    pub name: std::string::String,
10868
10869    /// Optional. Maximum number of compilation results to return. The server may
10870    /// return fewer items than requested. If unspecified, the server will pick an
10871    /// appropriate default.
10872    pub page_size: i32,
10873
10874    /// Optional. Page token received from a previous
10875    /// `QueryCompilationResultActions` call. Provide this to retrieve the
10876    /// subsequent page.
10877    ///
10878    /// When paginating, all other parameters provided to
10879    /// `QueryCompilationResultActions`, with the exception of `page_size`, must
10880    /// match the call that provided the page token.
10881    pub page_token: std::string::String,
10882
10883    /// Optional. Optional filter for the returned list. Filtering is only
10884    /// currently supported on the `file_path` field.
10885    pub filter: std::string::String,
10886
10887    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10888}
10889
10890impl QueryCompilationResultActionsRequest {
10891    /// Creates a new default instance.
10892    pub fn new() -> Self {
10893        std::default::Default::default()
10894    }
10895
10896    /// Sets the value of [name][crate::model::QueryCompilationResultActionsRequest::name].
10897    ///
10898    /// # Example
10899    /// ```ignore,no_run
10900    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10901    /// # let project_id = "project_id";
10902    /// # let location_id = "location_id";
10903    /// # let repository_id = "repository_id";
10904    /// # let compilation_result_id = "compilation_result_id";
10905    /// let x = QueryCompilationResultActionsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
10906    /// ```
10907    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10908        self.name = v.into();
10909        self
10910    }
10911
10912    /// Sets the value of [page_size][crate::model::QueryCompilationResultActionsRequest::page_size].
10913    ///
10914    /// # Example
10915    /// ```ignore,no_run
10916    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10917    /// let x = QueryCompilationResultActionsRequest::new().set_page_size(42);
10918    /// ```
10919    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10920        self.page_size = v.into();
10921        self
10922    }
10923
10924    /// Sets the value of [page_token][crate::model::QueryCompilationResultActionsRequest::page_token].
10925    ///
10926    /// # Example
10927    /// ```ignore,no_run
10928    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10929    /// let x = QueryCompilationResultActionsRequest::new().set_page_token("example");
10930    /// ```
10931    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10932        self.page_token = v.into();
10933        self
10934    }
10935
10936    /// Sets the value of [filter][crate::model::QueryCompilationResultActionsRequest::filter].
10937    ///
10938    /// # Example
10939    /// ```ignore,no_run
10940    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsRequest;
10941    /// let x = QueryCompilationResultActionsRequest::new().set_filter("example");
10942    /// ```
10943    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10944        self.filter = v.into();
10945        self
10946    }
10947}
10948
10949impl wkt::message::Message for QueryCompilationResultActionsRequest {
10950    fn typename() -> &'static str {
10951        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
10952    }
10953}
10954
10955/// `QueryCompilationResultActions` response message.
10956#[derive(Clone, Default, PartialEq)]
10957#[non_exhaustive]
10958pub struct QueryCompilationResultActionsResponse {
10959    /// List of compilation result actions.
10960    pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
10961
10962    /// A token, which can be sent as `page_token` to retrieve the next page.
10963    /// If this field is omitted, there are no subsequent pages.
10964    pub next_page_token: std::string::String,
10965
10966    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10967}
10968
10969impl QueryCompilationResultActionsResponse {
10970    /// Creates a new default instance.
10971    pub fn new() -> Self {
10972        std::default::Default::default()
10973    }
10974
10975    /// Sets the value of [compilation_result_actions][crate::model::QueryCompilationResultActionsResponse::compilation_result_actions].
10976    ///
10977    /// # Example
10978    /// ```ignore,no_run
10979    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
10980    /// use google_cloud_dataform_v1::model::CompilationResultAction;
10981    /// let x = QueryCompilationResultActionsResponse::new()
10982    ///     .set_compilation_result_actions([
10983    ///         CompilationResultAction::default()/* use setters */,
10984    ///         CompilationResultAction::default()/* use (different) setters */,
10985    ///     ]);
10986    /// ```
10987    pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
10988    where
10989        T: std::iter::IntoIterator<Item = V>,
10990        V: std::convert::Into<crate::model::CompilationResultAction>,
10991    {
10992        use std::iter::Iterator;
10993        self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
10994        self
10995    }
10996
10997    /// Sets the value of [next_page_token][crate::model::QueryCompilationResultActionsResponse::next_page_token].
10998    ///
10999    /// # Example
11000    /// ```ignore,no_run
11001    /// # use google_cloud_dataform_v1::model::QueryCompilationResultActionsResponse;
11002    /// let x = QueryCompilationResultActionsResponse::new().set_next_page_token("example");
11003    /// ```
11004    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11005        self.next_page_token = v.into();
11006        self
11007    }
11008}
11009
11010impl wkt::message::Message for QueryCompilationResultActionsResponse {
11011    fn typename() -> &'static str {
11012        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
11013    }
11014}
11015
11016#[doc(hidden)]
11017impl google_cloud_gax::paginator::internal::PageableResponse
11018    for QueryCompilationResultActionsResponse
11019{
11020    type PageItem = crate::model::CompilationResultAction;
11021
11022    fn items(self) -> std::vec::Vec<Self::PageItem> {
11023        self.compilation_result_actions
11024    }
11025
11026    fn next_page_token(&self) -> std::string::String {
11027        use std::clone::Clone;
11028        self.next_page_token.clone()
11029    }
11030}
11031
11032/// Represents a Dataform workflow configuration.
11033#[derive(Clone, Default, PartialEq)]
11034#[non_exhaustive]
11035pub struct WorkflowConfig {
11036    /// Identifier. The workflow config's name.
11037    pub name: std::string::String,
11038
11039    /// Required. The name of the release config whose release_compilation_result
11040    /// should be executed. Must be in the format
11041    /// `projects/*/locations/*/repositories/*/releaseConfigs/*`.
11042    pub release_config: std::string::String,
11043
11044    /// Optional. If left unset, a default InvocationConfig will be used.
11045    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
11046
11047    /// Optional. Optional schedule (in cron format) for automatic execution of
11048    /// this workflow config.
11049    pub cron_schedule: std::string::String,
11050
11051    /// Optional. Specifies the time zone to be used when interpreting
11052    /// cron_schedule. Must be a time zone name from the time zone database
11053    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
11054    /// unspecified, the default is UTC.
11055    pub time_zone: std::string::String,
11056
11057    /// Output only. Records of the 10 most recent scheduled execution attempts,
11058    /// ordered in descending order of `execution_time`. Updated whenever automatic
11059    /// creation of a workflow invocation is triggered by cron_schedule.
11060    pub recent_scheduled_execution_records:
11061        std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
11062
11063    /// Optional. Disables automatic creation of workflow invocations.
11064    pub disabled: bool,
11065
11066    /// Output only. The timestamp of when the WorkflowConfig was created.
11067    pub create_time: std::option::Option<wkt::Timestamp>,
11068
11069    /// Output only. The timestamp of when the WorkflowConfig was last updated.
11070    pub update_time: std::option::Option<wkt::Timestamp>,
11071
11072    /// Output only. All the metadata information that is used internally to serve
11073    /// the resource. For example: timestamps, flags, status fields, etc. The
11074    /// format of this field is a JSON string.
11075    pub internal_metadata: std::option::Option<std::string::String>,
11076
11077    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11078}
11079
11080impl WorkflowConfig {
11081    /// Creates a new default instance.
11082    pub fn new() -> Self {
11083        std::default::Default::default()
11084    }
11085
11086    /// Sets the value of [name][crate::model::WorkflowConfig::name].
11087    ///
11088    /// # Example
11089    /// ```ignore,no_run
11090    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11091    /// # let project_id = "project_id";
11092    /// # let location_id = "location_id";
11093    /// # let repository_id = "repository_id";
11094    /// # let workflow_config_id = "workflow_config_id";
11095    /// let x = WorkflowConfig::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
11096    /// ```
11097    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11098        self.name = v.into();
11099        self
11100    }
11101
11102    /// Sets the value of [release_config][crate::model::WorkflowConfig::release_config].
11103    ///
11104    /// # Example
11105    /// ```ignore,no_run
11106    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11107    /// # let project_id = "project_id";
11108    /// # let location_id = "location_id";
11109    /// # let repository_id = "repository_id";
11110    /// # let release_config_id = "release_config_id";
11111    /// let x = WorkflowConfig::new().set_release_config(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/releaseConfigs/{release_config_id}"));
11112    /// ```
11113    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11114        self.release_config = v.into();
11115        self
11116    }
11117
11118    /// Sets the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
11119    ///
11120    /// # Example
11121    /// ```ignore,no_run
11122    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11123    /// use google_cloud_dataform_v1::model::InvocationConfig;
11124    /// let x = WorkflowConfig::new().set_invocation_config(InvocationConfig::default()/* use setters */);
11125    /// ```
11126    pub fn set_invocation_config<T>(mut self, v: T) -> Self
11127    where
11128        T: std::convert::Into<crate::model::InvocationConfig>,
11129    {
11130        self.invocation_config = std::option::Option::Some(v.into());
11131        self
11132    }
11133
11134    /// Sets or clears the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
11135    ///
11136    /// # Example
11137    /// ```ignore,no_run
11138    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11139    /// use google_cloud_dataform_v1::model::InvocationConfig;
11140    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
11141    /// let x = WorkflowConfig::new().set_or_clear_invocation_config(None::<InvocationConfig>);
11142    /// ```
11143    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
11144    where
11145        T: std::convert::Into<crate::model::InvocationConfig>,
11146    {
11147        self.invocation_config = v.map(|x| x.into());
11148        self
11149    }
11150
11151    /// Sets the value of [cron_schedule][crate::model::WorkflowConfig::cron_schedule].
11152    ///
11153    /// # Example
11154    /// ```ignore,no_run
11155    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11156    /// let x = WorkflowConfig::new().set_cron_schedule("example");
11157    /// ```
11158    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11159        self.cron_schedule = v.into();
11160        self
11161    }
11162
11163    /// Sets the value of [time_zone][crate::model::WorkflowConfig::time_zone].
11164    ///
11165    /// # Example
11166    /// ```ignore,no_run
11167    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11168    /// let x = WorkflowConfig::new().set_time_zone("example");
11169    /// ```
11170    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11171        self.time_zone = v.into();
11172        self
11173    }
11174
11175    /// Sets the value of [recent_scheduled_execution_records][crate::model::WorkflowConfig::recent_scheduled_execution_records].
11176    ///
11177    /// # Example
11178    /// ```ignore,no_run
11179    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11180    /// use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11181    /// let x = WorkflowConfig::new()
11182    ///     .set_recent_scheduled_execution_records([
11183    ///         ScheduledExecutionRecord::default()/* use setters */,
11184    ///         ScheduledExecutionRecord::default()/* use (different) setters */,
11185    ///     ]);
11186    /// ```
11187    pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
11188    where
11189        T: std::iter::IntoIterator<Item = V>,
11190        V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
11191    {
11192        use std::iter::Iterator;
11193        self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
11194        self
11195    }
11196
11197    /// Sets the value of [disabled][crate::model::WorkflowConfig::disabled].
11198    ///
11199    /// # Example
11200    /// ```ignore,no_run
11201    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11202    /// let x = WorkflowConfig::new().set_disabled(true);
11203    /// ```
11204    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11205        self.disabled = v.into();
11206        self
11207    }
11208
11209    /// Sets the value of [create_time][crate::model::WorkflowConfig::create_time].
11210    ///
11211    /// # Example
11212    /// ```ignore,no_run
11213    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11214    /// use wkt::Timestamp;
11215    /// let x = WorkflowConfig::new().set_create_time(Timestamp::default()/* use setters */);
11216    /// ```
11217    pub fn set_create_time<T>(mut self, v: T) -> Self
11218    where
11219        T: std::convert::Into<wkt::Timestamp>,
11220    {
11221        self.create_time = std::option::Option::Some(v.into());
11222        self
11223    }
11224
11225    /// Sets or clears the value of [create_time][crate::model::WorkflowConfig::create_time].
11226    ///
11227    /// # Example
11228    /// ```ignore,no_run
11229    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11230    /// use wkt::Timestamp;
11231    /// let x = WorkflowConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11232    /// let x = WorkflowConfig::new().set_or_clear_create_time(None::<Timestamp>);
11233    /// ```
11234    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11235    where
11236        T: std::convert::Into<wkt::Timestamp>,
11237    {
11238        self.create_time = v.map(|x| x.into());
11239        self
11240    }
11241
11242    /// Sets the value of [update_time][crate::model::WorkflowConfig::update_time].
11243    ///
11244    /// # Example
11245    /// ```ignore,no_run
11246    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11247    /// use wkt::Timestamp;
11248    /// let x = WorkflowConfig::new().set_update_time(Timestamp::default()/* use setters */);
11249    /// ```
11250    pub fn set_update_time<T>(mut self, v: T) -> Self
11251    where
11252        T: std::convert::Into<wkt::Timestamp>,
11253    {
11254        self.update_time = std::option::Option::Some(v.into());
11255        self
11256    }
11257
11258    /// Sets or clears the value of [update_time][crate::model::WorkflowConfig::update_time].
11259    ///
11260    /// # Example
11261    /// ```ignore,no_run
11262    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11263    /// use wkt::Timestamp;
11264    /// let x = WorkflowConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11265    /// let x = WorkflowConfig::new().set_or_clear_update_time(None::<Timestamp>);
11266    /// ```
11267    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11268    where
11269        T: std::convert::Into<wkt::Timestamp>,
11270    {
11271        self.update_time = v.map(|x| x.into());
11272        self
11273    }
11274
11275    /// Sets the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
11276    ///
11277    /// # Example
11278    /// ```ignore,no_run
11279    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11280    /// let x = WorkflowConfig::new().set_internal_metadata("example");
11281    /// ```
11282    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
11283    where
11284        T: std::convert::Into<std::string::String>,
11285    {
11286        self.internal_metadata = std::option::Option::Some(v.into());
11287        self
11288    }
11289
11290    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
11291    ///
11292    /// # Example
11293    /// ```ignore,no_run
11294    /// # use google_cloud_dataform_v1::model::WorkflowConfig;
11295    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(Some("example"));
11296    /// let x = WorkflowConfig::new().set_or_clear_internal_metadata(None::<String>);
11297    /// ```
11298    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
11299    where
11300        T: std::convert::Into<std::string::String>,
11301    {
11302        self.internal_metadata = v.map(|x| x.into());
11303        self
11304    }
11305}
11306
11307impl wkt::message::Message for WorkflowConfig {
11308    fn typename() -> &'static str {
11309        "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
11310    }
11311}
11312
11313/// Defines additional types related to [WorkflowConfig].
11314pub mod workflow_config {
11315    #[allow(unused_imports)]
11316    use super::*;
11317
11318    /// A record of an attempt to create a workflow invocation for this workflow
11319    /// config.
11320    #[derive(Clone, Default, PartialEq)]
11321    #[non_exhaustive]
11322    pub struct ScheduledExecutionRecord {
11323        /// Output only. The timestamp of this execution attempt.
11324        pub execution_time: std::option::Option<wkt::Timestamp>,
11325
11326        /// The result of this execution attempt.
11327        pub result:
11328            std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
11329
11330        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11331    }
11332
11333    impl ScheduledExecutionRecord {
11334        /// Creates a new default instance.
11335        pub fn new() -> Self {
11336            std::default::Default::default()
11337        }
11338
11339        /// Sets the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
11340        ///
11341        /// # Example
11342        /// ```ignore,no_run
11343        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11344        /// use wkt::Timestamp;
11345        /// let x = ScheduledExecutionRecord::new().set_execution_time(Timestamp::default()/* use setters */);
11346        /// ```
11347        pub fn set_execution_time<T>(mut self, v: T) -> Self
11348        where
11349            T: std::convert::Into<wkt::Timestamp>,
11350        {
11351            self.execution_time = std::option::Option::Some(v.into());
11352            self
11353        }
11354
11355        /// Sets or clears the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
11356        ///
11357        /// # Example
11358        /// ```ignore,no_run
11359        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11360        /// use wkt::Timestamp;
11361        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(Some(Timestamp::default()/* use setters */));
11362        /// let x = ScheduledExecutionRecord::new().set_or_clear_execution_time(None::<Timestamp>);
11363        /// ```
11364        pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
11365        where
11366            T: std::convert::Into<wkt::Timestamp>,
11367        {
11368            self.execution_time = v.map(|x| x.into());
11369            self
11370        }
11371
11372        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result].
11373        ///
11374        /// Note that all the setters affecting `result` are mutually
11375        /// exclusive.
11376        ///
11377        /// # Example
11378        /// ```ignore,no_run
11379        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11380        /// use google_cloud_dataform_v1::model::workflow_config::scheduled_execution_record::Result;
11381        /// let x = ScheduledExecutionRecord::new().set_result(Some(Result::WorkflowInvocation("example".to_string())));
11382        /// ```
11383        pub fn set_result<
11384            T: std::convert::Into<
11385                    std::option::Option<
11386                        crate::model::workflow_config::scheduled_execution_record::Result,
11387                    >,
11388                >,
11389        >(
11390            mut self,
11391            v: T,
11392        ) -> Self {
11393            self.result = v.into();
11394            self
11395        }
11396
11397        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11398        /// if it holds a `WorkflowInvocation`, `None` if the field is not set or
11399        /// holds a different branch.
11400        pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
11401            #[allow(unreachable_patterns)]
11402            self.result.as_ref().and_then(|v| match v {
11403                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
11404                _ => std::option::Option::None,
11405            })
11406        }
11407
11408        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11409        /// to hold a `WorkflowInvocation`.
11410        ///
11411        /// Note that all the setters affecting `result` are
11412        /// mutually exclusive.
11413        ///
11414        /// # Example
11415        /// ```ignore,no_run
11416        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11417        /// # let project_id = "project_id";
11418        /// # let location_id = "location_id";
11419        /// # let repository_id = "repository_id";
11420        /// # let workflow_invocation_id = "workflow_invocation_id";
11421        /// let x = ScheduledExecutionRecord::new().set_workflow_invocation(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
11422        /// assert!(x.workflow_invocation().is_some());
11423        /// assert!(x.error_status().is_none());
11424        /// ```
11425        pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
11426            mut self,
11427            v: T,
11428        ) -> Self {
11429            self.result = std::option::Option::Some(
11430                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
11431                    v.into()
11432                )
11433            );
11434            self
11435        }
11436
11437        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11438        /// if it holds a `ErrorStatus`, `None` if the field is not set or
11439        /// holds a different branch.
11440        pub fn error_status(
11441            &self,
11442        ) -> std::option::Option<&std::boxed::Box<google_cloud_rpc::model::Status>> {
11443            #[allow(unreachable_patterns)]
11444            self.result.as_ref().and_then(|v| match v {
11445                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
11446                    v,
11447                ) => std::option::Option::Some(v),
11448                _ => std::option::Option::None,
11449            })
11450        }
11451
11452        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
11453        /// to hold a `ErrorStatus`.
11454        ///
11455        /// Note that all the setters affecting `result` are
11456        /// mutually exclusive.
11457        ///
11458        /// # Example
11459        /// ```ignore,no_run
11460        /// # use google_cloud_dataform_v1::model::workflow_config::ScheduledExecutionRecord;
11461        /// use google_cloud_rpc::model::Status;
11462        /// let x = ScheduledExecutionRecord::new().set_error_status(Status::default()/* use setters */);
11463        /// assert!(x.error_status().is_some());
11464        /// assert!(x.workflow_invocation().is_none());
11465        /// ```
11466        pub fn set_error_status<
11467            T: std::convert::Into<std::boxed::Box<google_cloud_rpc::model::Status>>,
11468        >(
11469            mut self,
11470            v: T,
11471        ) -> Self {
11472            self.result = std::option::Option::Some(
11473                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
11474                    v.into(),
11475                ),
11476            );
11477            self
11478        }
11479    }
11480
11481    impl wkt::message::Message for ScheduledExecutionRecord {
11482        fn typename() -> &'static str {
11483            "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
11484        }
11485    }
11486
11487    /// Defines additional types related to [ScheduledExecutionRecord].
11488    pub mod scheduled_execution_record {
11489        #[allow(unused_imports)]
11490        use super::*;
11491
11492        /// The result of this execution attempt.
11493        #[derive(Clone, Debug, PartialEq)]
11494        #[non_exhaustive]
11495        pub enum Result {
11496            /// The name of the created workflow invocation, if one was successfully
11497            /// created. Must be in the format
11498            /// `projects/*/locations/*/repositories/*/workflowInvocations/*`.
11499            WorkflowInvocation(std::string::String),
11500            /// The error status encountered upon this attempt to create the
11501            /// workflow invocation, if the attempt was unsuccessful.
11502            ErrorStatus(std::boxed::Box<google_cloud_rpc::model::Status>),
11503        }
11504    }
11505}
11506
11507/// Includes various configuration options for a workflow invocation.
11508/// If both `included_targets` and `included_tags` are unset, all actions
11509/// will be included.
11510#[derive(Clone, Default, PartialEq)]
11511#[non_exhaustive]
11512pub struct InvocationConfig {
11513    /// Optional. The set of action identifiers to include.
11514    pub included_targets: std::vec::Vec<crate::model::Target>,
11515
11516    /// Optional. The set of tags to include.
11517    pub included_tags: std::vec::Vec<std::string::String>,
11518
11519    /// Optional. When set to true, transitive dependencies of included actions
11520    /// will be executed.
11521    pub transitive_dependencies_included: bool,
11522
11523    /// Optional. When set to true, transitive dependents of included actions will
11524    /// be executed.
11525    pub transitive_dependents_included: bool,
11526
11527    /// Optional. When set to true, any incremental tables will be fully refreshed.
11528    pub fully_refresh_incremental_tables_enabled: bool,
11529
11530    /// Optional. The service account to run workflow invocations under.
11531    pub service_account: std::string::String,
11532
11533    /// Optional. Specifies the priority for query execution in BigQuery.
11534    /// More information can be found at
11535    /// <https://cloud.google.com/bigquery/docs/running-queries#queries>.
11536    pub query_priority: std::option::Option<crate::model::invocation_config::QueryPriority>,
11537
11538    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11539}
11540
11541impl InvocationConfig {
11542    /// Creates a new default instance.
11543    pub fn new() -> Self {
11544        std::default::Default::default()
11545    }
11546
11547    /// Sets the value of [included_targets][crate::model::InvocationConfig::included_targets].
11548    ///
11549    /// # Example
11550    /// ```ignore,no_run
11551    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11552    /// use google_cloud_dataform_v1::model::Target;
11553    /// let x = InvocationConfig::new()
11554    ///     .set_included_targets([
11555    ///         Target::default()/* use setters */,
11556    ///         Target::default()/* use (different) setters */,
11557    ///     ]);
11558    /// ```
11559    pub fn set_included_targets<T, V>(mut self, v: T) -> Self
11560    where
11561        T: std::iter::IntoIterator<Item = V>,
11562        V: std::convert::Into<crate::model::Target>,
11563    {
11564        use std::iter::Iterator;
11565        self.included_targets = v.into_iter().map(|i| i.into()).collect();
11566        self
11567    }
11568
11569    /// Sets the value of [included_tags][crate::model::InvocationConfig::included_tags].
11570    ///
11571    /// # Example
11572    /// ```ignore,no_run
11573    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11574    /// let x = InvocationConfig::new().set_included_tags(["a", "b", "c"]);
11575    /// ```
11576    pub fn set_included_tags<T, V>(mut self, v: T) -> Self
11577    where
11578        T: std::iter::IntoIterator<Item = V>,
11579        V: std::convert::Into<std::string::String>,
11580    {
11581        use std::iter::Iterator;
11582        self.included_tags = v.into_iter().map(|i| i.into()).collect();
11583        self
11584    }
11585
11586    /// Sets the value of [transitive_dependencies_included][crate::model::InvocationConfig::transitive_dependencies_included].
11587    ///
11588    /// # Example
11589    /// ```ignore,no_run
11590    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11591    /// let x = InvocationConfig::new().set_transitive_dependencies_included(true);
11592    /// ```
11593    pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
11594        mut self,
11595        v: T,
11596    ) -> Self {
11597        self.transitive_dependencies_included = v.into();
11598        self
11599    }
11600
11601    /// Sets the value of [transitive_dependents_included][crate::model::InvocationConfig::transitive_dependents_included].
11602    ///
11603    /// # Example
11604    /// ```ignore,no_run
11605    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11606    /// let x = InvocationConfig::new().set_transitive_dependents_included(true);
11607    /// ```
11608    pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11609        self.transitive_dependents_included = v.into();
11610        self
11611    }
11612
11613    /// Sets the value of [fully_refresh_incremental_tables_enabled][crate::model::InvocationConfig::fully_refresh_incremental_tables_enabled].
11614    ///
11615    /// # Example
11616    /// ```ignore,no_run
11617    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11618    /// let x = InvocationConfig::new().set_fully_refresh_incremental_tables_enabled(true);
11619    /// ```
11620    pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
11621        mut self,
11622        v: T,
11623    ) -> Self {
11624        self.fully_refresh_incremental_tables_enabled = v.into();
11625        self
11626    }
11627
11628    /// Sets the value of [service_account][crate::model::InvocationConfig::service_account].
11629    ///
11630    /// # Example
11631    /// ```ignore,no_run
11632    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11633    /// let x = InvocationConfig::new().set_service_account("example");
11634    /// ```
11635    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11636        self.service_account = v.into();
11637        self
11638    }
11639
11640    /// Sets the value of [query_priority][crate::model::InvocationConfig::query_priority].
11641    ///
11642    /// # Example
11643    /// ```ignore,no_run
11644    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11645    /// use google_cloud_dataform_v1::model::invocation_config::QueryPriority;
11646    /// let x0 = InvocationConfig::new().set_query_priority(QueryPriority::Interactive);
11647    /// let x1 = InvocationConfig::new().set_query_priority(QueryPriority::Batch);
11648    /// ```
11649    pub fn set_query_priority<T>(mut self, v: T) -> Self
11650    where
11651        T: std::convert::Into<crate::model::invocation_config::QueryPriority>,
11652    {
11653        self.query_priority = std::option::Option::Some(v.into());
11654        self
11655    }
11656
11657    /// Sets or clears the value of [query_priority][crate::model::InvocationConfig::query_priority].
11658    ///
11659    /// # Example
11660    /// ```ignore,no_run
11661    /// # use google_cloud_dataform_v1::model::InvocationConfig;
11662    /// use google_cloud_dataform_v1::model::invocation_config::QueryPriority;
11663    /// let x0 = InvocationConfig::new().set_or_clear_query_priority(Some(QueryPriority::Interactive));
11664    /// let x1 = InvocationConfig::new().set_or_clear_query_priority(Some(QueryPriority::Batch));
11665    /// let x_none = InvocationConfig::new().set_or_clear_query_priority(None::<QueryPriority>);
11666    /// ```
11667    pub fn set_or_clear_query_priority<T>(mut self, v: std::option::Option<T>) -> Self
11668    where
11669        T: std::convert::Into<crate::model::invocation_config::QueryPriority>,
11670    {
11671        self.query_priority = v.map(|x| x.into());
11672        self
11673    }
11674}
11675
11676impl wkt::message::Message for InvocationConfig {
11677    fn typename() -> &'static str {
11678        "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
11679    }
11680}
11681
11682/// Defines additional types related to [InvocationConfig].
11683pub mod invocation_config {
11684    #[allow(unused_imports)]
11685    use super::*;
11686
11687    /// Types of priority for query execution in BigQuery.
11688    ///
11689    /// # Working with unknown values
11690    ///
11691    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11692    /// additional enum variants at any time. Adding new variants is not considered
11693    /// a breaking change. Applications should write their code in anticipation of:
11694    ///
11695    /// - New values appearing in future releases of the client library, **and**
11696    /// - New values received dynamically, without application changes.
11697    ///
11698    /// Please consult the [Working with enums] section in the user guide for some
11699    /// guidelines.
11700    ///
11701    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11702    #[derive(Clone, Debug, PartialEq)]
11703    #[non_exhaustive]
11704    pub enum QueryPriority {
11705        /// Default value. This value is unused.
11706        Unspecified,
11707        /// Query will be executed in BigQuery with interactive priority.
11708        /// More information can be found at
11709        /// <https://cloud.google.com/bigquery/docs/running-queries#queries>.
11710        Interactive,
11711        /// Query will be executed in BigQuery with batch priority.
11712        /// More information can be found at
11713        /// <https://cloud.google.com/bigquery/docs/running-queries#batchqueries>.
11714        Batch,
11715        /// If set, the enum was initialized with an unknown value.
11716        ///
11717        /// Applications can examine the value using [QueryPriority::value] or
11718        /// [QueryPriority::name].
11719        UnknownValue(query_priority::UnknownValue),
11720    }
11721
11722    #[doc(hidden)]
11723    pub mod query_priority {
11724        #[allow(unused_imports)]
11725        use super::*;
11726        #[derive(Clone, Debug, PartialEq)]
11727        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11728    }
11729
11730    impl QueryPriority {
11731        /// Gets the enum value.
11732        ///
11733        /// Returns `None` if the enum contains an unknown value deserialized from
11734        /// the string representation of enums.
11735        pub fn value(&self) -> std::option::Option<i32> {
11736            match self {
11737                Self::Unspecified => std::option::Option::Some(0),
11738                Self::Interactive => std::option::Option::Some(1),
11739                Self::Batch => std::option::Option::Some(2),
11740                Self::UnknownValue(u) => u.0.value(),
11741            }
11742        }
11743
11744        /// Gets the enum value as a string.
11745        ///
11746        /// Returns `None` if the enum contains an unknown value deserialized from
11747        /// the integer representation of enums.
11748        pub fn name(&self) -> std::option::Option<&str> {
11749            match self {
11750                Self::Unspecified => std::option::Option::Some("QUERY_PRIORITY_UNSPECIFIED"),
11751                Self::Interactive => std::option::Option::Some("INTERACTIVE"),
11752                Self::Batch => std::option::Option::Some("BATCH"),
11753                Self::UnknownValue(u) => u.0.name(),
11754            }
11755        }
11756    }
11757
11758    impl std::default::Default for QueryPriority {
11759        fn default() -> Self {
11760            use std::convert::From;
11761            Self::from(0)
11762        }
11763    }
11764
11765    impl std::fmt::Display for QueryPriority {
11766        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11767            wkt::internal::display_enum(f, self.name(), self.value())
11768        }
11769    }
11770
11771    impl std::convert::From<i32> for QueryPriority {
11772        fn from(value: i32) -> Self {
11773            match value {
11774                0 => Self::Unspecified,
11775                1 => Self::Interactive,
11776                2 => Self::Batch,
11777                _ => Self::UnknownValue(query_priority::UnknownValue(
11778                    wkt::internal::UnknownEnumValue::Integer(value),
11779                )),
11780            }
11781        }
11782    }
11783
11784    impl std::convert::From<&str> for QueryPriority {
11785        fn from(value: &str) -> Self {
11786            use std::string::ToString;
11787            match value {
11788                "QUERY_PRIORITY_UNSPECIFIED" => Self::Unspecified,
11789                "INTERACTIVE" => Self::Interactive,
11790                "BATCH" => Self::Batch,
11791                _ => Self::UnknownValue(query_priority::UnknownValue(
11792                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11793                )),
11794            }
11795        }
11796    }
11797
11798    impl serde::ser::Serialize for QueryPriority {
11799        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11800        where
11801            S: serde::Serializer,
11802        {
11803            match self {
11804                Self::Unspecified => serializer.serialize_i32(0),
11805                Self::Interactive => serializer.serialize_i32(1),
11806                Self::Batch => serializer.serialize_i32(2),
11807                Self::UnknownValue(u) => u.0.serialize(serializer),
11808            }
11809        }
11810    }
11811
11812    impl<'de> serde::de::Deserialize<'de> for QueryPriority {
11813        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11814        where
11815            D: serde::Deserializer<'de>,
11816        {
11817            deserializer.deserialize_any(wkt::internal::EnumVisitor::<QueryPriority>::new(
11818                ".google.cloud.dataform.v1.InvocationConfig.QueryPriority",
11819            ))
11820        }
11821    }
11822}
11823
11824/// `ListWorkflowConfigs` request message.
11825#[derive(Clone, Default, PartialEq)]
11826#[non_exhaustive]
11827pub struct ListWorkflowConfigsRequest {
11828    /// Required. The repository in which to list workflow configs. Must be in the
11829    /// format `projects/*/locations/*/repositories/*`.
11830    pub parent: std::string::String,
11831
11832    /// Optional. Maximum number of workflow configs to return. The server may
11833    /// return fewer items than requested. If unspecified, the server will pick an
11834    /// appropriate default.
11835    pub page_size: i32,
11836
11837    /// Optional. Page token received from a previous `ListWorkflowConfigs` call.
11838    /// Provide this to retrieve the subsequent page.
11839    ///
11840    /// When paginating, all other parameters provided to `ListWorkflowConfigs`,
11841    /// with the exception of `page_size`, must match the call that provided the
11842    /// page token.
11843    pub page_token: std::string::String,
11844
11845    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11846}
11847
11848impl ListWorkflowConfigsRequest {
11849    /// Creates a new default instance.
11850    pub fn new() -> Self {
11851        std::default::Default::default()
11852    }
11853
11854    /// Sets the value of [parent][crate::model::ListWorkflowConfigsRequest::parent].
11855    ///
11856    /// # Example
11857    /// ```ignore,no_run
11858    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11859    /// # let project_id = "project_id";
11860    /// # let location_id = "location_id";
11861    /// # let repository_id = "repository_id";
11862    /// let x = ListWorkflowConfigsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
11863    /// ```
11864    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11865        self.parent = v.into();
11866        self
11867    }
11868
11869    /// Sets the value of [page_size][crate::model::ListWorkflowConfigsRequest::page_size].
11870    ///
11871    /// # Example
11872    /// ```ignore,no_run
11873    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11874    /// let x = ListWorkflowConfigsRequest::new().set_page_size(42);
11875    /// ```
11876    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11877        self.page_size = v.into();
11878        self
11879    }
11880
11881    /// Sets the value of [page_token][crate::model::ListWorkflowConfigsRequest::page_token].
11882    ///
11883    /// # Example
11884    /// ```ignore,no_run
11885    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsRequest;
11886    /// let x = ListWorkflowConfigsRequest::new().set_page_token("example");
11887    /// ```
11888    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11889        self.page_token = v.into();
11890        self
11891    }
11892}
11893
11894impl wkt::message::Message for ListWorkflowConfigsRequest {
11895    fn typename() -> &'static str {
11896        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
11897    }
11898}
11899
11900/// `ListWorkflowConfigs` response message.
11901#[derive(Clone, Default, PartialEq)]
11902#[non_exhaustive]
11903pub struct ListWorkflowConfigsResponse {
11904    /// List of workflow configs.
11905    pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
11906
11907    /// A token, which can be sent as `page_token` to retrieve the next page.
11908    /// If this field is omitted, there are no subsequent pages.
11909    pub next_page_token: std::string::String,
11910
11911    /// Locations which could not be reached.
11912    pub unreachable: std::vec::Vec<std::string::String>,
11913
11914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11915}
11916
11917impl ListWorkflowConfigsResponse {
11918    /// Creates a new default instance.
11919    pub fn new() -> Self {
11920        std::default::Default::default()
11921    }
11922
11923    /// Sets the value of [workflow_configs][crate::model::ListWorkflowConfigsResponse::workflow_configs].
11924    ///
11925    /// # Example
11926    /// ```ignore,no_run
11927    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11928    /// use google_cloud_dataform_v1::model::WorkflowConfig;
11929    /// let x = ListWorkflowConfigsResponse::new()
11930    ///     .set_workflow_configs([
11931    ///         WorkflowConfig::default()/* use setters */,
11932    ///         WorkflowConfig::default()/* use (different) setters */,
11933    ///     ]);
11934    /// ```
11935    pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
11936    where
11937        T: std::iter::IntoIterator<Item = V>,
11938        V: std::convert::Into<crate::model::WorkflowConfig>,
11939    {
11940        use std::iter::Iterator;
11941        self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
11942        self
11943    }
11944
11945    /// Sets the value of [next_page_token][crate::model::ListWorkflowConfigsResponse::next_page_token].
11946    ///
11947    /// # Example
11948    /// ```ignore,no_run
11949    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11950    /// let x = ListWorkflowConfigsResponse::new().set_next_page_token("example");
11951    /// ```
11952    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11953        self.next_page_token = v.into();
11954        self
11955    }
11956
11957    /// Sets the value of [unreachable][crate::model::ListWorkflowConfigsResponse::unreachable].
11958    ///
11959    /// # Example
11960    /// ```ignore,no_run
11961    /// # use google_cloud_dataform_v1::model::ListWorkflowConfigsResponse;
11962    /// let x = ListWorkflowConfigsResponse::new().set_unreachable(["a", "b", "c"]);
11963    /// ```
11964    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
11965    where
11966        T: std::iter::IntoIterator<Item = V>,
11967        V: std::convert::Into<std::string::String>,
11968    {
11969        use std::iter::Iterator;
11970        self.unreachable = v.into_iter().map(|i| i.into()).collect();
11971        self
11972    }
11973}
11974
11975impl wkt::message::Message for ListWorkflowConfigsResponse {
11976    fn typename() -> &'static str {
11977        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
11978    }
11979}
11980
11981#[doc(hidden)]
11982impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
11983    type PageItem = crate::model::WorkflowConfig;
11984
11985    fn items(self) -> std::vec::Vec<Self::PageItem> {
11986        self.workflow_configs
11987    }
11988
11989    fn next_page_token(&self) -> std::string::String {
11990        use std::clone::Clone;
11991        self.next_page_token.clone()
11992    }
11993}
11994
11995/// `GetWorkflowConfig` request message.
11996#[derive(Clone, Default, PartialEq)]
11997#[non_exhaustive]
11998pub struct GetWorkflowConfigRequest {
11999    /// Required. The workflow config's name.
12000    pub name: std::string::String,
12001
12002    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12003}
12004
12005impl GetWorkflowConfigRequest {
12006    /// Creates a new default instance.
12007    pub fn new() -> Self {
12008        std::default::Default::default()
12009    }
12010
12011    /// Sets the value of [name][crate::model::GetWorkflowConfigRequest::name].
12012    ///
12013    /// # Example
12014    /// ```ignore,no_run
12015    /// # use google_cloud_dataform_v1::model::GetWorkflowConfigRequest;
12016    /// # let project_id = "project_id";
12017    /// # let location_id = "location_id";
12018    /// # let repository_id = "repository_id";
12019    /// # let workflow_config_id = "workflow_config_id";
12020    /// let x = GetWorkflowConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
12021    /// ```
12022    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12023        self.name = v.into();
12024        self
12025    }
12026}
12027
12028impl wkt::message::Message for GetWorkflowConfigRequest {
12029    fn typename() -> &'static str {
12030        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
12031    }
12032}
12033
12034/// `CreateWorkflowConfig` request message.
12035#[derive(Clone, Default, PartialEq)]
12036#[non_exhaustive]
12037pub struct CreateWorkflowConfigRequest {
12038    /// Required. The repository in which to create the workflow config. Must be in
12039    /// the format `projects/*/locations/*/repositories/*`.
12040    pub parent: std::string::String,
12041
12042    /// Required. The workflow config to create.
12043    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
12044
12045    /// Required. The ID to use for the workflow config, which will become the
12046    /// final component of the workflow config's resource name.
12047    pub workflow_config_id: std::string::String,
12048
12049    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12050}
12051
12052impl CreateWorkflowConfigRequest {
12053    /// Creates a new default instance.
12054    pub fn new() -> Self {
12055        std::default::Default::default()
12056    }
12057
12058    /// Sets the value of [parent][crate::model::CreateWorkflowConfigRequest::parent].
12059    ///
12060    /// # Example
12061    /// ```ignore,no_run
12062    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12063    /// # let project_id = "project_id";
12064    /// # let location_id = "location_id";
12065    /// # let repository_id = "repository_id";
12066    /// let x = CreateWorkflowConfigRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
12067    /// ```
12068    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12069        self.parent = v.into();
12070        self
12071    }
12072
12073    /// Sets the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
12074    ///
12075    /// # Example
12076    /// ```ignore,no_run
12077    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12078    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12079    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
12080    /// ```
12081    pub fn set_workflow_config<T>(mut self, v: T) -> Self
12082    where
12083        T: std::convert::Into<crate::model::WorkflowConfig>,
12084    {
12085        self.workflow_config = std::option::Option::Some(v.into());
12086        self
12087    }
12088
12089    /// Sets or clears the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
12090    ///
12091    /// # Example
12092    /// ```ignore,no_run
12093    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12094    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12095    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
12096    /// let x = CreateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
12097    /// ```
12098    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
12099    where
12100        T: std::convert::Into<crate::model::WorkflowConfig>,
12101    {
12102        self.workflow_config = v.map(|x| x.into());
12103        self
12104    }
12105
12106    /// Sets the value of [workflow_config_id][crate::model::CreateWorkflowConfigRequest::workflow_config_id].
12107    ///
12108    /// # Example
12109    /// ```ignore,no_run
12110    /// # use google_cloud_dataform_v1::model::CreateWorkflowConfigRequest;
12111    /// let x = CreateWorkflowConfigRequest::new().set_workflow_config_id("example");
12112    /// ```
12113    pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
12114        mut self,
12115        v: T,
12116    ) -> Self {
12117        self.workflow_config_id = v.into();
12118        self
12119    }
12120}
12121
12122impl wkt::message::Message for CreateWorkflowConfigRequest {
12123    fn typename() -> &'static str {
12124        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
12125    }
12126}
12127
12128/// `UpdateWorkflowConfig` request message.
12129#[derive(Clone, Default, PartialEq)]
12130#[non_exhaustive]
12131pub struct UpdateWorkflowConfigRequest {
12132    /// Optional. Specifies the fields to be updated in the workflow config. If
12133    /// left unset, all fields will be updated.
12134    pub update_mask: std::option::Option<wkt::FieldMask>,
12135
12136    /// Required. The workflow config to update.
12137    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
12138
12139    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12140}
12141
12142impl UpdateWorkflowConfigRequest {
12143    /// Creates a new default instance.
12144    pub fn new() -> Self {
12145        std::default::Default::default()
12146    }
12147
12148    /// Sets the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
12149    ///
12150    /// # Example
12151    /// ```ignore,no_run
12152    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12153    /// use wkt::FieldMask;
12154    /// let x = UpdateWorkflowConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
12155    /// ```
12156    pub fn set_update_mask<T>(mut self, v: T) -> Self
12157    where
12158        T: std::convert::Into<wkt::FieldMask>,
12159    {
12160        self.update_mask = std::option::Option::Some(v.into());
12161        self
12162    }
12163
12164    /// Sets or clears the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
12165    ///
12166    /// # Example
12167    /// ```ignore,no_run
12168    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12169    /// use wkt::FieldMask;
12170    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
12171    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
12172    /// ```
12173    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12174    where
12175        T: std::convert::Into<wkt::FieldMask>,
12176    {
12177        self.update_mask = v.map(|x| x.into());
12178        self
12179    }
12180
12181    /// Sets the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
12182    ///
12183    /// # Example
12184    /// ```ignore,no_run
12185    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12186    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12187    /// let x = UpdateWorkflowConfigRequest::new().set_workflow_config(WorkflowConfig::default()/* use setters */);
12188    /// ```
12189    pub fn set_workflow_config<T>(mut self, v: T) -> Self
12190    where
12191        T: std::convert::Into<crate::model::WorkflowConfig>,
12192    {
12193        self.workflow_config = std::option::Option::Some(v.into());
12194        self
12195    }
12196
12197    /// Sets or clears the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
12198    ///
12199    /// # Example
12200    /// ```ignore,no_run
12201    /// # use google_cloud_dataform_v1::model::UpdateWorkflowConfigRequest;
12202    /// use google_cloud_dataform_v1::model::WorkflowConfig;
12203    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(Some(WorkflowConfig::default()/* use setters */));
12204    /// let x = UpdateWorkflowConfigRequest::new().set_or_clear_workflow_config(None::<WorkflowConfig>);
12205    /// ```
12206    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
12207    where
12208        T: std::convert::Into<crate::model::WorkflowConfig>,
12209    {
12210        self.workflow_config = v.map(|x| x.into());
12211        self
12212    }
12213}
12214
12215impl wkt::message::Message for UpdateWorkflowConfigRequest {
12216    fn typename() -> &'static str {
12217        "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
12218    }
12219}
12220
12221/// `DeleteWorkflowConfig` request message.
12222#[derive(Clone, Default, PartialEq)]
12223#[non_exhaustive]
12224pub struct DeleteWorkflowConfigRequest {
12225    /// Required. The workflow config's name.
12226    pub name: std::string::String,
12227
12228    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12229}
12230
12231impl DeleteWorkflowConfigRequest {
12232    /// Creates a new default instance.
12233    pub fn new() -> Self {
12234        std::default::Default::default()
12235    }
12236
12237    /// Sets the value of [name][crate::model::DeleteWorkflowConfigRequest::name].
12238    ///
12239    /// # Example
12240    /// ```ignore,no_run
12241    /// # use google_cloud_dataform_v1::model::DeleteWorkflowConfigRequest;
12242    /// # let project_id = "project_id";
12243    /// # let location_id = "location_id";
12244    /// # let repository_id = "repository_id";
12245    /// # let workflow_config_id = "workflow_config_id";
12246    /// let x = DeleteWorkflowConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
12247    /// ```
12248    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12249        self.name = v.into();
12250        self
12251    }
12252}
12253
12254impl wkt::message::Message for DeleteWorkflowConfigRequest {
12255    fn typename() -> &'static str {
12256        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
12257    }
12258}
12259
12260/// Represents a single invocation of a compilation result.
12261#[derive(Clone, Default, PartialEq)]
12262#[non_exhaustive]
12263pub struct WorkflowInvocation {
12264    /// Output only. The workflow invocation's name.
12265    pub name: std::string::String,
12266
12267    /// Immutable. If left unset, a default InvocationConfig will be used.
12268    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
12269
12270    /// Output only. This workflow invocation's current state.
12271    pub state: crate::model::workflow_invocation::State,
12272
12273    /// Output only. This workflow invocation's timing details.
12274    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
12275
12276    /// Output only. The resolved compilation result that was used to create this
12277    /// invocation. Will be in the format
12278    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
12279    pub resolved_compilation_result: std::string::String,
12280
12281    /// Output only. Only set if the repository has a KMS Key.
12282    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
12283
12284    /// Output only. All the metadata information that is used internally to serve
12285    /// the resource. For example: timestamps, flags, status fields, etc. The
12286    /// format of this field is a JSON string.
12287    pub internal_metadata: std::option::Option<std::string::String>,
12288
12289    /// Output only. Metadata indicating whether this resource is user-scoped.
12290    /// `WorkflowInvocation` resource is `user_scoped` only if it is sourced
12291    /// from a compilation result and the compilation result is user-scoped.
12292    pub private_resource_metadata: std::option::Option<crate::model::PrivateResourceMetadata>,
12293
12294    /// The source of the compilation result to use for this invocation.
12295    pub compilation_source:
12296        std::option::Option<crate::model::workflow_invocation::CompilationSource>,
12297
12298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12299}
12300
12301impl WorkflowInvocation {
12302    /// Creates a new default instance.
12303    pub fn new() -> Self {
12304        std::default::Default::default()
12305    }
12306
12307    /// Sets the value of [name][crate::model::WorkflowInvocation::name].
12308    ///
12309    /// # Example
12310    /// ```ignore,no_run
12311    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12312    /// # let project_id = "project_id";
12313    /// # let location_id = "location_id";
12314    /// # let repository_id = "repository_id";
12315    /// # let workflow_invocation_id = "workflow_invocation_id";
12316    /// let x = WorkflowInvocation::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
12317    /// ```
12318    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12319        self.name = v.into();
12320        self
12321    }
12322
12323    /// Sets the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
12324    ///
12325    /// # Example
12326    /// ```ignore,no_run
12327    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12328    /// use google_cloud_dataform_v1::model::InvocationConfig;
12329    /// let x = WorkflowInvocation::new().set_invocation_config(InvocationConfig::default()/* use setters */);
12330    /// ```
12331    pub fn set_invocation_config<T>(mut self, v: T) -> Self
12332    where
12333        T: std::convert::Into<crate::model::InvocationConfig>,
12334    {
12335        self.invocation_config = std::option::Option::Some(v.into());
12336        self
12337    }
12338
12339    /// Sets or clears the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
12340    ///
12341    /// # Example
12342    /// ```ignore,no_run
12343    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12344    /// use google_cloud_dataform_v1::model::InvocationConfig;
12345    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(Some(InvocationConfig::default()/* use setters */));
12346    /// let x = WorkflowInvocation::new().set_or_clear_invocation_config(None::<InvocationConfig>);
12347    /// ```
12348    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
12349    where
12350        T: std::convert::Into<crate::model::InvocationConfig>,
12351    {
12352        self.invocation_config = v.map(|x| x.into());
12353        self
12354    }
12355
12356    /// Sets the value of [state][crate::model::WorkflowInvocation::state].
12357    ///
12358    /// # Example
12359    /// ```ignore,no_run
12360    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12361    /// use google_cloud_dataform_v1::model::workflow_invocation::State;
12362    /// let x0 = WorkflowInvocation::new().set_state(State::Running);
12363    /// let x1 = WorkflowInvocation::new().set_state(State::Succeeded);
12364    /// let x2 = WorkflowInvocation::new().set_state(State::Cancelled);
12365    /// ```
12366    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
12367        mut self,
12368        v: T,
12369    ) -> Self {
12370        self.state = v.into();
12371        self
12372    }
12373
12374    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
12375    ///
12376    /// # Example
12377    /// ```ignore,no_run
12378    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12379    /// use google_cloud_type::model::Interval;
12380    /// let x = WorkflowInvocation::new().set_invocation_timing(Interval::default()/* use setters */);
12381    /// ```
12382    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
12383    where
12384        T: std::convert::Into<google_cloud_type::model::Interval>,
12385    {
12386        self.invocation_timing = std::option::Option::Some(v.into());
12387        self
12388    }
12389
12390    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
12391    ///
12392    /// # Example
12393    /// ```ignore,no_run
12394    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12395    /// use google_cloud_type::model::Interval;
12396    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
12397    /// let x = WorkflowInvocation::new().set_or_clear_invocation_timing(None::<Interval>);
12398    /// ```
12399    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
12400    where
12401        T: std::convert::Into<google_cloud_type::model::Interval>,
12402    {
12403        self.invocation_timing = v.map(|x| x.into());
12404        self
12405    }
12406
12407    /// Sets the value of [resolved_compilation_result][crate::model::WorkflowInvocation::resolved_compilation_result].
12408    ///
12409    /// # Example
12410    /// ```ignore,no_run
12411    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12412    /// # let project_id = "project_id";
12413    /// # let location_id = "location_id";
12414    /// # let repository_id = "repository_id";
12415    /// # let compilation_result_id = "compilation_result_id";
12416    /// let x = WorkflowInvocation::new().set_resolved_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
12417    /// ```
12418    pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
12419        mut self,
12420        v: T,
12421    ) -> Self {
12422        self.resolved_compilation_result = v.into();
12423        self
12424    }
12425
12426    /// Sets the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
12427    ///
12428    /// # Example
12429    /// ```ignore,no_run
12430    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12431    /// use google_cloud_dataform_v1::model::DataEncryptionState;
12432    /// let x = WorkflowInvocation::new().set_data_encryption_state(DataEncryptionState::default()/* use setters */);
12433    /// ```
12434    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
12435    where
12436        T: std::convert::Into<crate::model::DataEncryptionState>,
12437    {
12438        self.data_encryption_state = std::option::Option::Some(v.into());
12439        self
12440    }
12441
12442    /// Sets or clears the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
12443    ///
12444    /// # Example
12445    /// ```ignore,no_run
12446    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12447    /// use google_cloud_dataform_v1::model::DataEncryptionState;
12448    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(Some(DataEncryptionState::default()/* use setters */));
12449    /// let x = WorkflowInvocation::new().set_or_clear_data_encryption_state(None::<DataEncryptionState>);
12450    /// ```
12451    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
12452    where
12453        T: std::convert::Into<crate::model::DataEncryptionState>,
12454    {
12455        self.data_encryption_state = v.map(|x| x.into());
12456        self
12457    }
12458
12459    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
12460    ///
12461    /// # Example
12462    /// ```ignore,no_run
12463    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12464    /// let x = WorkflowInvocation::new().set_internal_metadata("example");
12465    /// ```
12466    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
12467    where
12468        T: std::convert::Into<std::string::String>,
12469    {
12470        self.internal_metadata = std::option::Option::Some(v.into());
12471        self
12472    }
12473
12474    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
12475    ///
12476    /// # Example
12477    /// ```ignore,no_run
12478    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12479    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(Some("example"));
12480    /// let x = WorkflowInvocation::new().set_or_clear_internal_metadata(None::<String>);
12481    /// ```
12482    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12483    where
12484        T: std::convert::Into<std::string::String>,
12485    {
12486        self.internal_metadata = v.map(|x| x.into());
12487        self
12488    }
12489
12490    /// Sets the value of [private_resource_metadata][crate::model::WorkflowInvocation::private_resource_metadata].
12491    ///
12492    /// # Example
12493    /// ```ignore,no_run
12494    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12495    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
12496    /// let x = WorkflowInvocation::new().set_private_resource_metadata(PrivateResourceMetadata::default()/* use setters */);
12497    /// ```
12498    pub fn set_private_resource_metadata<T>(mut self, v: T) -> Self
12499    where
12500        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
12501    {
12502        self.private_resource_metadata = std::option::Option::Some(v.into());
12503        self
12504    }
12505
12506    /// Sets or clears the value of [private_resource_metadata][crate::model::WorkflowInvocation::private_resource_metadata].
12507    ///
12508    /// # Example
12509    /// ```ignore,no_run
12510    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12511    /// use google_cloud_dataform_v1::model::PrivateResourceMetadata;
12512    /// let x = WorkflowInvocation::new().set_or_clear_private_resource_metadata(Some(PrivateResourceMetadata::default()/* use setters */));
12513    /// let x = WorkflowInvocation::new().set_or_clear_private_resource_metadata(None::<PrivateResourceMetadata>);
12514    /// ```
12515    pub fn set_or_clear_private_resource_metadata<T>(mut self, v: std::option::Option<T>) -> Self
12516    where
12517        T: std::convert::Into<crate::model::PrivateResourceMetadata>,
12518    {
12519        self.private_resource_metadata = v.map(|x| x.into());
12520        self
12521    }
12522
12523    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source].
12524    ///
12525    /// Note that all the setters affecting `compilation_source` are mutually
12526    /// exclusive.
12527    ///
12528    /// # Example
12529    /// ```ignore,no_run
12530    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12531    /// use google_cloud_dataform_v1::model::workflow_invocation::CompilationSource;
12532    /// let x = WorkflowInvocation::new().set_compilation_source(Some(CompilationSource::CompilationResult("example".to_string())));
12533    /// ```
12534    pub fn set_compilation_source<
12535        T: std::convert::Into<
12536                std::option::Option<crate::model::workflow_invocation::CompilationSource>,
12537            >,
12538    >(
12539        mut self,
12540        v: T,
12541    ) -> Self {
12542        self.compilation_source = v.into();
12543        self
12544    }
12545
12546    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12547    /// if it holds a `CompilationResult`, `None` if the field is not set or
12548    /// holds a different branch.
12549    pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
12550        #[allow(unreachable_patterns)]
12551        self.compilation_source.as_ref().and_then(|v| match v {
12552            crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
12553                std::option::Option::Some(v)
12554            }
12555            _ => std::option::Option::None,
12556        })
12557    }
12558
12559    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12560    /// to hold a `CompilationResult`.
12561    ///
12562    /// Note that all the setters affecting `compilation_source` are
12563    /// mutually exclusive.
12564    ///
12565    /// # Example
12566    /// ```ignore,no_run
12567    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12568    /// # let project_id = "project_id";
12569    /// # let location_id = "location_id";
12570    /// # let repository_id = "repository_id";
12571    /// # let compilation_result_id = "compilation_result_id";
12572    /// let x = WorkflowInvocation::new().set_compilation_result(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/compilationResults/{compilation_result_id}"));
12573    /// assert!(x.compilation_result().is_some());
12574    /// assert!(x.workflow_config().is_none());
12575    /// ```
12576    pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
12577        mut self,
12578        v: T,
12579    ) -> Self {
12580        self.compilation_source = std::option::Option::Some(
12581            crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
12582        );
12583        self
12584    }
12585
12586    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12587    /// if it holds a `WorkflowConfig`, `None` if the field is not set or
12588    /// holds a different branch.
12589    pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
12590        #[allow(unreachable_patterns)]
12591        self.compilation_source.as_ref().and_then(|v| match v {
12592            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
12593                std::option::Option::Some(v)
12594            }
12595            _ => std::option::Option::None,
12596        })
12597    }
12598
12599    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
12600    /// to hold a `WorkflowConfig`.
12601    ///
12602    /// Note that all the setters affecting `compilation_source` are
12603    /// mutually exclusive.
12604    ///
12605    /// # Example
12606    /// ```ignore,no_run
12607    /// # use google_cloud_dataform_v1::model::WorkflowInvocation;
12608    /// # let project_id = "project_id";
12609    /// # let location_id = "location_id";
12610    /// # let repository_id = "repository_id";
12611    /// # let workflow_config_id = "workflow_config_id";
12612    /// let x = WorkflowInvocation::new().set_workflow_config(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowConfigs/{workflow_config_id}"));
12613    /// assert!(x.workflow_config().is_some());
12614    /// assert!(x.compilation_result().is_none());
12615    /// ```
12616    pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12617        self.compilation_source = std::option::Option::Some(
12618            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
12619        );
12620        self
12621    }
12622}
12623
12624impl wkt::message::Message for WorkflowInvocation {
12625    fn typename() -> &'static str {
12626        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
12627    }
12628}
12629
12630/// Defines additional types related to [WorkflowInvocation].
12631pub mod workflow_invocation {
12632    #[allow(unused_imports)]
12633    use super::*;
12634
12635    /// Represents the current state of a workflow invocation.
12636    ///
12637    /// # Working with unknown values
12638    ///
12639    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12640    /// additional enum variants at any time. Adding new variants is not considered
12641    /// a breaking change. Applications should write their code in anticipation of:
12642    ///
12643    /// - New values appearing in future releases of the client library, **and**
12644    /// - New values received dynamically, without application changes.
12645    ///
12646    /// Please consult the [Working with enums] section in the user guide for some
12647    /// guidelines.
12648    ///
12649    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12650    #[derive(Clone, Debug, PartialEq)]
12651    #[non_exhaustive]
12652    pub enum State {
12653        /// Default value. This value is unused.
12654        Unspecified,
12655        /// The workflow invocation is currently running.
12656        Running,
12657        /// The workflow invocation succeeded. A terminal state.
12658        Succeeded,
12659        /// The workflow invocation was cancelled. A terminal state.
12660        Cancelled,
12661        /// The workflow invocation failed. A terminal state.
12662        Failed,
12663        /// The workflow invocation is being cancelled, but some actions are still
12664        /// running.
12665        Canceling,
12666        /// If set, the enum was initialized with an unknown value.
12667        ///
12668        /// Applications can examine the value using [State::value] or
12669        /// [State::name].
12670        UnknownValue(state::UnknownValue),
12671    }
12672
12673    #[doc(hidden)]
12674    pub mod state {
12675        #[allow(unused_imports)]
12676        use super::*;
12677        #[derive(Clone, Debug, PartialEq)]
12678        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12679    }
12680
12681    impl State {
12682        /// Gets the enum value.
12683        ///
12684        /// Returns `None` if the enum contains an unknown value deserialized from
12685        /// the string representation of enums.
12686        pub fn value(&self) -> std::option::Option<i32> {
12687            match self {
12688                Self::Unspecified => std::option::Option::Some(0),
12689                Self::Running => std::option::Option::Some(1),
12690                Self::Succeeded => std::option::Option::Some(2),
12691                Self::Cancelled => std::option::Option::Some(3),
12692                Self::Failed => std::option::Option::Some(4),
12693                Self::Canceling => std::option::Option::Some(5),
12694                Self::UnknownValue(u) => u.0.value(),
12695            }
12696        }
12697
12698        /// Gets the enum value as a string.
12699        ///
12700        /// Returns `None` if the enum contains an unknown value deserialized from
12701        /// the integer representation of enums.
12702        pub fn name(&self) -> std::option::Option<&str> {
12703            match self {
12704                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12705                Self::Running => std::option::Option::Some("RUNNING"),
12706                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
12707                Self::Cancelled => std::option::Option::Some("CANCELLED"),
12708                Self::Failed => std::option::Option::Some("FAILED"),
12709                Self::Canceling => std::option::Option::Some("CANCELING"),
12710                Self::UnknownValue(u) => u.0.name(),
12711            }
12712        }
12713    }
12714
12715    impl std::default::Default for State {
12716        fn default() -> Self {
12717            use std::convert::From;
12718            Self::from(0)
12719        }
12720    }
12721
12722    impl std::fmt::Display for State {
12723        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12724            wkt::internal::display_enum(f, self.name(), self.value())
12725        }
12726    }
12727
12728    impl std::convert::From<i32> for State {
12729        fn from(value: i32) -> Self {
12730            match value {
12731                0 => Self::Unspecified,
12732                1 => Self::Running,
12733                2 => Self::Succeeded,
12734                3 => Self::Cancelled,
12735                4 => Self::Failed,
12736                5 => Self::Canceling,
12737                _ => Self::UnknownValue(state::UnknownValue(
12738                    wkt::internal::UnknownEnumValue::Integer(value),
12739                )),
12740            }
12741        }
12742    }
12743
12744    impl std::convert::From<&str> for State {
12745        fn from(value: &str) -> Self {
12746            use std::string::ToString;
12747            match value {
12748                "STATE_UNSPECIFIED" => Self::Unspecified,
12749                "RUNNING" => Self::Running,
12750                "SUCCEEDED" => Self::Succeeded,
12751                "CANCELLED" => Self::Cancelled,
12752                "FAILED" => Self::Failed,
12753                "CANCELING" => Self::Canceling,
12754                _ => Self::UnknownValue(state::UnknownValue(
12755                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12756                )),
12757            }
12758        }
12759    }
12760
12761    impl serde::ser::Serialize for State {
12762        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12763        where
12764            S: serde::Serializer,
12765        {
12766            match self {
12767                Self::Unspecified => serializer.serialize_i32(0),
12768                Self::Running => serializer.serialize_i32(1),
12769                Self::Succeeded => serializer.serialize_i32(2),
12770                Self::Cancelled => serializer.serialize_i32(3),
12771                Self::Failed => serializer.serialize_i32(4),
12772                Self::Canceling => serializer.serialize_i32(5),
12773                Self::UnknownValue(u) => u.0.serialize(serializer),
12774            }
12775        }
12776    }
12777
12778    impl<'de> serde::de::Deserialize<'de> for State {
12779        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12780        where
12781            D: serde::Deserializer<'de>,
12782        {
12783            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12784                ".google.cloud.dataform.v1.WorkflowInvocation.State",
12785            ))
12786        }
12787    }
12788
12789    /// The source of the compilation result to use for this invocation.
12790    #[derive(Clone, Debug, PartialEq)]
12791    #[non_exhaustive]
12792    pub enum CompilationSource {
12793        /// Immutable. The name of the compilation result to use for this invocation.
12794        /// Must be in the format
12795        /// `projects/*/locations/*/repositories/*/compilationResults/*`.
12796        CompilationResult(std::string::String),
12797        /// Immutable. The name of the workflow config to invoke. Must be in the
12798        /// format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
12799        WorkflowConfig(std::string::String),
12800    }
12801}
12802
12803/// `ListWorkflowInvocations` request message.
12804#[derive(Clone, Default, PartialEq)]
12805#[non_exhaustive]
12806pub struct ListWorkflowInvocationsRequest {
12807    /// Required. The parent resource of the WorkflowInvocation type. Must be in
12808    /// the format `projects/*/locations/*/repositories/*`.
12809    pub parent: std::string::String,
12810
12811    /// Optional. Maximum number of workflow invocations to return. The server may
12812    /// return fewer items than requested. If unspecified, the server will pick an
12813    /// appropriate default.
12814    pub page_size: i32,
12815
12816    /// Optional. Page token received from a previous `ListWorkflowInvocations`
12817    /// call. Provide this to retrieve the subsequent page.
12818    ///
12819    /// When paginating, all other parameters provided to
12820    /// `ListWorkflowInvocations`, with the exception of `page_size`, must match
12821    /// the call that provided the page token.
12822    pub page_token: std::string::String,
12823
12824    /// Optional. This field only supports ordering by `name`. If unspecified, the
12825    /// server will choose the ordering. If specified, the default order is
12826    /// ascending for the `name` field.
12827    pub order_by: std::string::String,
12828
12829    /// Optional. Filter for the returned list.
12830    pub filter: std::string::String,
12831
12832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12833}
12834
12835impl ListWorkflowInvocationsRequest {
12836    /// Creates a new default instance.
12837    pub fn new() -> Self {
12838        std::default::Default::default()
12839    }
12840
12841    /// Sets the value of [parent][crate::model::ListWorkflowInvocationsRequest::parent].
12842    ///
12843    /// # Example
12844    /// ```ignore,no_run
12845    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12846    /// # let project_id = "project_id";
12847    /// # let location_id = "location_id";
12848    /// # let repository_id = "repository_id";
12849    /// let x = ListWorkflowInvocationsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
12850    /// ```
12851    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12852        self.parent = v.into();
12853        self
12854    }
12855
12856    /// Sets the value of [page_size][crate::model::ListWorkflowInvocationsRequest::page_size].
12857    ///
12858    /// # Example
12859    /// ```ignore,no_run
12860    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12861    /// let x = ListWorkflowInvocationsRequest::new().set_page_size(42);
12862    /// ```
12863    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12864        self.page_size = v.into();
12865        self
12866    }
12867
12868    /// Sets the value of [page_token][crate::model::ListWorkflowInvocationsRequest::page_token].
12869    ///
12870    /// # Example
12871    /// ```ignore,no_run
12872    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12873    /// let x = ListWorkflowInvocationsRequest::new().set_page_token("example");
12874    /// ```
12875    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12876        self.page_token = v.into();
12877        self
12878    }
12879
12880    /// Sets the value of [order_by][crate::model::ListWorkflowInvocationsRequest::order_by].
12881    ///
12882    /// # Example
12883    /// ```ignore,no_run
12884    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12885    /// let x = ListWorkflowInvocationsRequest::new().set_order_by("example");
12886    /// ```
12887    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12888        self.order_by = v.into();
12889        self
12890    }
12891
12892    /// Sets the value of [filter][crate::model::ListWorkflowInvocationsRequest::filter].
12893    ///
12894    /// # Example
12895    /// ```ignore,no_run
12896    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsRequest;
12897    /// let x = ListWorkflowInvocationsRequest::new().set_filter("example");
12898    /// ```
12899    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12900        self.filter = v.into();
12901        self
12902    }
12903}
12904
12905impl wkt::message::Message for ListWorkflowInvocationsRequest {
12906    fn typename() -> &'static str {
12907        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
12908    }
12909}
12910
12911/// `ListWorkflowInvocations` response message.
12912#[derive(Clone, Default, PartialEq)]
12913#[non_exhaustive]
12914pub struct ListWorkflowInvocationsResponse {
12915    /// List of workflow invocations.
12916    pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
12917
12918    /// A token, which can be sent as `page_token` to retrieve the next page.
12919    /// If this field is omitted, there are no subsequent pages.
12920    pub next_page_token: std::string::String,
12921
12922    /// Locations which could not be reached.
12923    pub unreachable: std::vec::Vec<std::string::String>,
12924
12925    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12926}
12927
12928impl ListWorkflowInvocationsResponse {
12929    /// Creates a new default instance.
12930    pub fn new() -> Self {
12931        std::default::Default::default()
12932    }
12933
12934    /// Sets the value of [workflow_invocations][crate::model::ListWorkflowInvocationsResponse::workflow_invocations].
12935    ///
12936    /// # Example
12937    /// ```ignore,no_run
12938    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12939    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
12940    /// let x = ListWorkflowInvocationsResponse::new()
12941    ///     .set_workflow_invocations([
12942    ///         WorkflowInvocation::default()/* use setters */,
12943    ///         WorkflowInvocation::default()/* use (different) setters */,
12944    ///     ]);
12945    /// ```
12946    pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
12947    where
12948        T: std::iter::IntoIterator<Item = V>,
12949        V: std::convert::Into<crate::model::WorkflowInvocation>,
12950    {
12951        use std::iter::Iterator;
12952        self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
12953        self
12954    }
12955
12956    /// Sets the value of [next_page_token][crate::model::ListWorkflowInvocationsResponse::next_page_token].
12957    ///
12958    /// # Example
12959    /// ```ignore,no_run
12960    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12961    /// let x = ListWorkflowInvocationsResponse::new().set_next_page_token("example");
12962    /// ```
12963    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12964        self.next_page_token = v.into();
12965        self
12966    }
12967
12968    /// Sets the value of [unreachable][crate::model::ListWorkflowInvocationsResponse::unreachable].
12969    ///
12970    /// # Example
12971    /// ```ignore,no_run
12972    /// # use google_cloud_dataform_v1::model::ListWorkflowInvocationsResponse;
12973    /// let x = ListWorkflowInvocationsResponse::new().set_unreachable(["a", "b", "c"]);
12974    /// ```
12975    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
12976    where
12977        T: std::iter::IntoIterator<Item = V>,
12978        V: std::convert::Into<std::string::String>,
12979    {
12980        use std::iter::Iterator;
12981        self.unreachable = v.into_iter().map(|i| i.into()).collect();
12982        self
12983    }
12984}
12985
12986impl wkt::message::Message for ListWorkflowInvocationsResponse {
12987    fn typename() -> &'static str {
12988        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
12989    }
12990}
12991
12992#[doc(hidden)]
12993impl google_cloud_gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
12994    type PageItem = crate::model::WorkflowInvocation;
12995
12996    fn items(self) -> std::vec::Vec<Self::PageItem> {
12997        self.workflow_invocations
12998    }
12999
13000    fn next_page_token(&self) -> std::string::String {
13001        use std::clone::Clone;
13002        self.next_page_token.clone()
13003    }
13004}
13005
13006/// `GetWorkflowInvocation` request message.
13007#[derive(Clone, Default, PartialEq)]
13008#[non_exhaustive]
13009pub struct GetWorkflowInvocationRequest {
13010    /// Required. The workflow invocation resource's name.
13011    pub name: std::string::String,
13012
13013    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13014}
13015
13016impl GetWorkflowInvocationRequest {
13017    /// Creates a new default instance.
13018    pub fn new() -> Self {
13019        std::default::Default::default()
13020    }
13021
13022    /// Sets the value of [name][crate::model::GetWorkflowInvocationRequest::name].
13023    ///
13024    /// # Example
13025    /// ```ignore,no_run
13026    /// # use google_cloud_dataform_v1::model::GetWorkflowInvocationRequest;
13027    /// # let project_id = "project_id";
13028    /// # let location_id = "location_id";
13029    /// # let repository_id = "repository_id";
13030    /// # let workflow_invocation_id = "workflow_invocation_id";
13031    /// let x = GetWorkflowInvocationRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
13032    /// ```
13033    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13034        self.name = v.into();
13035        self
13036    }
13037}
13038
13039impl wkt::message::Message for GetWorkflowInvocationRequest {
13040    fn typename() -> &'static str {
13041        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
13042    }
13043}
13044
13045/// `CreateWorkflowInvocation` request message.
13046#[derive(Clone, Default, PartialEq)]
13047#[non_exhaustive]
13048pub struct CreateWorkflowInvocationRequest {
13049    /// Required. The repository in which to create the workflow invocation. Must
13050    /// be in the format `projects/*/locations/*/repositories/*`.
13051    pub parent: std::string::String,
13052
13053    /// Required. The workflow invocation resource to create.
13054    pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
13055
13056    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13057}
13058
13059impl CreateWorkflowInvocationRequest {
13060    /// Creates a new default instance.
13061    pub fn new() -> Self {
13062        std::default::Default::default()
13063    }
13064
13065    /// Sets the value of [parent][crate::model::CreateWorkflowInvocationRequest::parent].
13066    ///
13067    /// # Example
13068    /// ```ignore,no_run
13069    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
13070    /// # let project_id = "project_id";
13071    /// # let location_id = "location_id";
13072    /// # let repository_id = "repository_id";
13073    /// let x = CreateWorkflowInvocationRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}"));
13074    /// ```
13075    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13076        self.parent = v.into();
13077        self
13078    }
13079
13080    /// Sets the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
13081    ///
13082    /// # Example
13083    /// ```ignore,no_run
13084    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
13085    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
13086    /// let x = CreateWorkflowInvocationRequest::new().set_workflow_invocation(WorkflowInvocation::default()/* use setters */);
13087    /// ```
13088    pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
13089    where
13090        T: std::convert::Into<crate::model::WorkflowInvocation>,
13091    {
13092        self.workflow_invocation = std::option::Option::Some(v.into());
13093        self
13094    }
13095
13096    /// Sets or clears the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
13097    ///
13098    /// # Example
13099    /// ```ignore,no_run
13100    /// # use google_cloud_dataform_v1::model::CreateWorkflowInvocationRequest;
13101    /// use google_cloud_dataform_v1::model::WorkflowInvocation;
13102    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(Some(WorkflowInvocation::default()/* use setters */));
13103    /// let x = CreateWorkflowInvocationRequest::new().set_or_clear_workflow_invocation(None::<WorkflowInvocation>);
13104    /// ```
13105    pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
13106    where
13107        T: std::convert::Into<crate::model::WorkflowInvocation>,
13108    {
13109        self.workflow_invocation = v.map(|x| x.into());
13110        self
13111    }
13112}
13113
13114impl wkt::message::Message for CreateWorkflowInvocationRequest {
13115    fn typename() -> &'static str {
13116        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
13117    }
13118}
13119
13120/// `DeleteWorkflowInvocation` request message.
13121#[derive(Clone, Default, PartialEq)]
13122#[non_exhaustive]
13123pub struct DeleteWorkflowInvocationRequest {
13124    /// Required. The workflow invocation resource's name.
13125    pub name: std::string::String,
13126
13127    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13128}
13129
13130impl DeleteWorkflowInvocationRequest {
13131    /// Creates a new default instance.
13132    pub fn new() -> Self {
13133        std::default::Default::default()
13134    }
13135
13136    /// Sets the value of [name][crate::model::DeleteWorkflowInvocationRequest::name].
13137    ///
13138    /// # Example
13139    /// ```ignore,no_run
13140    /// # use google_cloud_dataform_v1::model::DeleteWorkflowInvocationRequest;
13141    /// # let project_id = "project_id";
13142    /// # let location_id = "location_id";
13143    /// # let repository_id = "repository_id";
13144    /// # let workflow_invocation_id = "workflow_invocation_id";
13145    /// let x = DeleteWorkflowInvocationRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
13146    /// ```
13147    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13148        self.name = v.into();
13149        self
13150    }
13151}
13152
13153impl wkt::message::Message for DeleteWorkflowInvocationRequest {
13154    fn typename() -> &'static str {
13155        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
13156    }
13157}
13158
13159/// `CancelWorkflowInvocation` request message.
13160#[derive(Clone, Default, PartialEq)]
13161#[non_exhaustive]
13162pub struct CancelWorkflowInvocationRequest {
13163    /// Required. The workflow invocation resource's name.
13164    pub name: std::string::String,
13165
13166    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13167}
13168
13169impl CancelWorkflowInvocationRequest {
13170    /// Creates a new default instance.
13171    pub fn new() -> Self {
13172        std::default::Default::default()
13173    }
13174
13175    /// Sets the value of [name][crate::model::CancelWorkflowInvocationRequest::name].
13176    ///
13177    /// # Example
13178    /// ```ignore,no_run
13179    /// # use google_cloud_dataform_v1::model::CancelWorkflowInvocationRequest;
13180    /// # let project_id = "project_id";
13181    /// # let location_id = "location_id";
13182    /// # let repository_id = "repository_id";
13183    /// # let workflow_invocation_id = "workflow_invocation_id";
13184    /// let x = CancelWorkflowInvocationRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
13185    /// ```
13186    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13187        self.name = v.into();
13188        self
13189    }
13190}
13191
13192impl wkt::message::Message for CancelWorkflowInvocationRequest {
13193    fn typename() -> &'static str {
13194        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
13195    }
13196}
13197
13198/// `CancelWorkflowInvocation` response message.
13199#[derive(Clone, Default, PartialEq)]
13200#[non_exhaustive]
13201pub struct CancelWorkflowInvocationResponse {
13202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13203}
13204
13205impl CancelWorkflowInvocationResponse {
13206    /// Creates a new default instance.
13207    pub fn new() -> Self {
13208        std::default::Default::default()
13209    }
13210}
13211
13212impl wkt::message::Message for CancelWorkflowInvocationResponse {
13213    fn typename() -> &'static str {
13214        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
13215    }
13216}
13217
13218/// Represents a single action in a workflow invocation.
13219#[derive(Clone, Default, PartialEq)]
13220#[non_exhaustive]
13221pub struct WorkflowInvocationAction {
13222    /// Output only. This action's identifier. Unique within the workflow
13223    /// invocation.
13224    pub target: std::option::Option<crate::model::Target>,
13225
13226    /// Output only. The action's identifier if the project had been compiled
13227    /// without any overrides configured. Unique within the compilation result.
13228    pub canonical_target: std::option::Option<crate::model::Target>,
13229
13230    /// Output only. This action's current state.
13231    pub state: crate::model::workflow_invocation_action::State,
13232
13233    /// Output only. If and only if action's state is FAILED a failure reason is
13234    /// set.
13235    pub failure_reason: std::string::String,
13236
13237    /// Output only. This action's timing details.
13238    /// `start_time` will be set if the action is in [RUNNING, SUCCEEDED,
13239    /// CANCELLED, FAILED] state.
13240    /// `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED]
13241    /// state.
13242    pub invocation_timing: std::option::Option<google_cloud_type::model::Interval>,
13243
13244    /// Output only. All the metadata information that is used internally to serve
13245    /// the resource. For example: timestamps, flags, status fields, etc. The
13246    /// format of this field is a JSON string.
13247    pub internal_metadata: std::option::Option<std::string::String>,
13248
13249    /// The action's details.
13250    pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
13251
13252    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13253}
13254
13255impl WorkflowInvocationAction {
13256    /// Creates a new default instance.
13257    pub fn new() -> Self {
13258        std::default::Default::default()
13259    }
13260
13261    /// Sets the value of [target][crate::model::WorkflowInvocationAction::target].
13262    ///
13263    /// # Example
13264    /// ```ignore,no_run
13265    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13266    /// use google_cloud_dataform_v1::model::Target;
13267    /// let x = WorkflowInvocationAction::new().set_target(Target::default()/* use setters */);
13268    /// ```
13269    pub fn set_target<T>(mut self, v: T) -> Self
13270    where
13271        T: std::convert::Into<crate::model::Target>,
13272    {
13273        self.target = std::option::Option::Some(v.into());
13274        self
13275    }
13276
13277    /// Sets or clears the value of [target][crate::model::WorkflowInvocationAction::target].
13278    ///
13279    /// # Example
13280    /// ```ignore,no_run
13281    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13282    /// use google_cloud_dataform_v1::model::Target;
13283    /// let x = WorkflowInvocationAction::new().set_or_clear_target(Some(Target::default()/* use setters */));
13284    /// let x = WorkflowInvocationAction::new().set_or_clear_target(None::<Target>);
13285    /// ```
13286    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
13287    where
13288        T: std::convert::Into<crate::model::Target>,
13289    {
13290        self.target = v.map(|x| x.into());
13291        self
13292    }
13293
13294    /// Sets the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
13295    ///
13296    /// # Example
13297    /// ```ignore,no_run
13298    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13299    /// use google_cloud_dataform_v1::model::Target;
13300    /// let x = WorkflowInvocationAction::new().set_canonical_target(Target::default()/* use setters */);
13301    /// ```
13302    pub fn set_canonical_target<T>(mut self, v: T) -> Self
13303    where
13304        T: std::convert::Into<crate::model::Target>,
13305    {
13306        self.canonical_target = std::option::Option::Some(v.into());
13307        self
13308    }
13309
13310    /// Sets or clears the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
13311    ///
13312    /// # Example
13313    /// ```ignore,no_run
13314    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13315    /// use google_cloud_dataform_v1::model::Target;
13316    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(Some(Target::default()/* use setters */));
13317    /// let x = WorkflowInvocationAction::new().set_or_clear_canonical_target(None::<Target>);
13318    /// ```
13319    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
13320    where
13321        T: std::convert::Into<crate::model::Target>,
13322    {
13323        self.canonical_target = v.map(|x| x.into());
13324        self
13325    }
13326
13327    /// Sets the value of [state][crate::model::WorkflowInvocationAction::state].
13328    ///
13329    /// # Example
13330    /// ```ignore,no_run
13331    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13332    /// use google_cloud_dataform_v1::model::workflow_invocation_action::State;
13333    /// let x0 = WorkflowInvocationAction::new().set_state(State::Running);
13334    /// let x1 = WorkflowInvocationAction::new().set_state(State::Skipped);
13335    /// let x2 = WorkflowInvocationAction::new().set_state(State::Disabled);
13336    /// ```
13337    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
13338        mut self,
13339        v: T,
13340    ) -> Self {
13341        self.state = v.into();
13342        self
13343    }
13344
13345    /// Sets the value of [failure_reason][crate::model::WorkflowInvocationAction::failure_reason].
13346    ///
13347    /// # Example
13348    /// ```ignore,no_run
13349    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13350    /// let x = WorkflowInvocationAction::new().set_failure_reason("example");
13351    /// ```
13352    pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13353        self.failure_reason = v.into();
13354        self
13355    }
13356
13357    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
13358    ///
13359    /// # Example
13360    /// ```ignore,no_run
13361    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13362    /// use google_cloud_type::model::Interval;
13363    /// let x = WorkflowInvocationAction::new().set_invocation_timing(Interval::default()/* use setters */);
13364    /// ```
13365    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
13366    where
13367        T: std::convert::Into<google_cloud_type::model::Interval>,
13368    {
13369        self.invocation_timing = std::option::Option::Some(v.into());
13370        self
13371    }
13372
13373    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
13374    ///
13375    /// # Example
13376    /// ```ignore,no_run
13377    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13378    /// use google_cloud_type::model::Interval;
13379    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(Some(Interval::default()/* use setters */));
13380    /// let x = WorkflowInvocationAction::new().set_or_clear_invocation_timing(None::<Interval>);
13381    /// ```
13382    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
13383    where
13384        T: std::convert::Into<google_cloud_type::model::Interval>,
13385    {
13386        self.invocation_timing = v.map(|x| x.into());
13387        self
13388    }
13389
13390    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
13391    ///
13392    /// # Example
13393    /// ```ignore,no_run
13394    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13395    /// let x = WorkflowInvocationAction::new().set_internal_metadata("example");
13396    /// ```
13397    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
13398    where
13399        T: std::convert::Into<std::string::String>,
13400    {
13401        self.internal_metadata = std::option::Option::Some(v.into());
13402        self
13403    }
13404
13405    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
13406    ///
13407    /// # Example
13408    /// ```ignore,no_run
13409    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13410    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(Some("example"));
13411    /// let x = WorkflowInvocationAction::new().set_or_clear_internal_metadata(None::<String>);
13412    /// ```
13413    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
13414    where
13415        T: std::convert::Into<std::string::String>,
13416    {
13417        self.internal_metadata = v.map(|x| x.into());
13418        self
13419    }
13420
13421    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action].
13422    ///
13423    /// Note that all the setters affecting `action` are mutually
13424    /// exclusive.
13425    ///
13426    /// # Example
13427    /// ```ignore,no_run
13428    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13429    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13430    /// let x = WorkflowInvocationAction::new().set_action(Some(
13431    ///     google_cloud_dataform_v1::model::workflow_invocation_action::Action::BigqueryAction(BigQueryAction::default().into())));
13432    /// ```
13433    pub fn set_action<
13434        T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
13435    >(
13436        mut self,
13437        v: T,
13438    ) -> Self {
13439        self.action = v.into();
13440        self
13441    }
13442
13443    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13444    /// if it holds a `BigqueryAction`, `None` if the field is not set or
13445    /// holds a different branch.
13446    pub fn bigquery_action(
13447        &self,
13448    ) -> std::option::Option<
13449        &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
13450    > {
13451        #[allow(unreachable_patterns)]
13452        self.action.as_ref().and_then(|v| match v {
13453            crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
13454                std::option::Option::Some(v)
13455            }
13456            _ => std::option::Option::None,
13457        })
13458    }
13459
13460    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13461    /// to hold a `BigqueryAction`.
13462    ///
13463    /// Note that all the setters affecting `action` are
13464    /// mutually exclusive.
13465    ///
13466    /// # Example
13467    /// ```ignore,no_run
13468    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13469    /// use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13470    /// let x = WorkflowInvocationAction::new().set_bigquery_action(BigQueryAction::default()/* use setters */);
13471    /// assert!(x.bigquery_action().is_some());
13472    /// assert!(x.notebook_action().is_none());
13473    /// assert!(x.data_preparation_action().is_none());
13474    /// ```
13475    pub fn set_bigquery_action<
13476        T: std::convert::Into<
13477                std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
13478            >,
13479    >(
13480        mut self,
13481        v: T,
13482    ) -> Self {
13483        self.action = std::option::Option::Some(
13484            crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
13485        );
13486        self
13487    }
13488
13489    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13490    /// if it holds a `NotebookAction`, `None` if the field is not set or
13491    /// holds a different branch.
13492    pub fn notebook_action(
13493        &self,
13494    ) -> std::option::Option<
13495        &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
13496    > {
13497        #[allow(unreachable_patterns)]
13498        self.action.as_ref().and_then(|v| match v {
13499            crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
13500                std::option::Option::Some(v)
13501            }
13502            _ => std::option::Option::None,
13503        })
13504    }
13505
13506    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13507    /// to hold a `NotebookAction`.
13508    ///
13509    /// Note that all the setters affecting `action` are
13510    /// mutually exclusive.
13511    ///
13512    /// # Example
13513    /// ```ignore,no_run
13514    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13515    /// use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13516    /// let x = WorkflowInvocationAction::new().set_notebook_action(NotebookAction::default()/* use setters */);
13517    /// assert!(x.notebook_action().is_some());
13518    /// assert!(x.bigquery_action().is_none());
13519    /// assert!(x.data_preparation_action().is_none());
13520    /// ```
13521    pub fn set_notebook_action<
13522        T: std::convert::Into<
13523                std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
13524            >,
13525    >(
13526        mut self,
13527        v: T,
13528    ) -> Self {
13529        self.action = std::option::Option::Some(
13530            crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
13531        );
13532        self
13533    }
13534
13535    /// The value of [action][crate::model::WorkflowInvocationAction::action]
13536    /// if it holds a `DataPreparationAction`, `None` if the field is not set or
13537    /// holds a different branch.
13538    pub fn data_preparation_action(
13539        &self,
13540    ) -> std::option::Option<
13541        &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13542    > {
13543        #[allow(unreachable_patterns)]
13544        self.action.as_ref().and_then(|v| match v {
13545            crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
13546                std::option::Option::Some(v)
13547            }
13548            _ => std::option::Option::None,
13549        })
13550    }
13551
13552    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
13553    /// to hold a `DataPreparationAction`.
13554    ///
13555    /// Note that all the setters affecting `action` are
13556    /// mutually exclusive.
13557    ///
13558    /// # Example
13559    /// ```ignore,no_run
13560    /// # use google_cloud_dataform_v1::model::WorkflowInvocationAction;
13561    /// use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13562    /// let x = WorkflowInvocationAction::new().set_data_preparation_action(DataPreparationAction::default()/* use setters */);
13563    /// assert!(x.data_preparation_action().is_some());
13564    /// assert!(x.bigquery_action().is_none());
13565    /// assert!(x.notebook_action().is_none());
13566    /// ```
13567    pub fn set_data_preparation_action<
13568        T: std::convert::Into<
13569                std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
13570            >,
13571    >(
13572        mut self,
13573        v: T,
13574    ) -> Self {
13575        self.action = std::option::Option::Some(
13576            crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
13577        );
13578        self
13579    }
13580}
13581
13582impl wkt::message::Message for WorkflowInvocationAction {
13583    fn typename() -> &'static str {
13584        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
13585    }
13586}
13587
13588/// Defines additional types related to [WorkflowInvocationAction].
13589pub mod workflow_invocation_action {
13590    #[allow(unused_imports)]
13591    use super::*;
13592
13593    /// Represents a workflow action that will run against BigQuery.
13594    #[derive(Clone, Default, PartialEq)]
13595    #[non_exhaustive]
13596    pub struct BigQueryAction {
13597        /// Output only. The generated BigQuery SQL script that will be executed.
13598        pub sql_script: std::string::String,
13599
13600        /// Output only. The ID of the BigQuery job that executed the SQL in
13601        /// sql_script. Only set once the job has started to run.
13602        pub job_id: std::string::String,
13603
13604        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13605    }
13606
13607    impl BigQueryAction {
13608        /// Creates a new default instance.
13609        pub fn new() -> Self {
13610            std::default::Default::default()
13611        }
13612
13613        /// Sets the value of [sql_script][crate::model::workflow_invocation_action::BigQueryAction::sql_script].
13614        ///
13615        /// # Example
13616        /// ```ignore,no_run
13617        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13618        /// let x = BigQueryAction::new().set_sql_script("example");
13619        /// ```
13620        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13621            self.sql_script = v.into();
13622            self
13623        }
13624
13625        /// Sets the value of [job_id][crate::model::workflow_invocation_action::BigQueryAction::job_id].
13626        ///
13627        /// # Example
13628        /// ```ignore,no_run
13629        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::BigQueryAction;
13630        /// let x = BigQueryAction::new().set_job_id("example");
13631        /// ```
13632        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13633            self.job_id = v.into();
13634            self
13635        }
13636    }
13637
13638    impl wkt::message::Message for BigQueryAction {
13639        fn typename() -> &'static str {
13640            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
13641        }
13642    }
13643
13644    /// Represents a workflow action that will run against a Notebook runtime.
13645    #[derive(Clone, Default, PartialEq)]
13646    #[non_exhaustive]
13647    pub struct NotebookAction {
13648        /// Output only. The code contents of a Notebook to be run.
13649        pub contents: std::string::String,
13650
13651        /// Output only. The ID of the Gemini Enterprise Agent Platform job that
13652        /// executed the notebook in contents and also the ID used for the outputs
13653        /// created in Google Cloud Storage buckets. Only set once the job has
13654        /// started to run.
13655        pub job_id: std::string::String,
13656
13657        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13658    }
13659
13660    impl NotebookAction {
13661        /// Creates a new default instance.
13662        pub fn new() -> Self {
13663            std::default::Default::default()
13664        }
13665
13666        /// Sets the value of [contents][crate::model::workflow_invocation_action::NotebookAction::contents].
13667        ///
13668        /// # Example
13669        /// ```ignore,no_run
13670        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13671        /// let x = NotebookAction::new().set_contents("example");
13672        /// ```
13673        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13674            self.contents = v.into();
13675            self
13676        }
13677
13678        /// Sets the value of [job_id][crate::model::workflow_invocation_action::NotebookAction::job_id].
13679        ///
13680        /// # Example
13681        /// ```ignore,no_run
13682        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::NotebookAction;
13683        /// let x = NotebookAction::new().set_job_id("example");
13684        /// ```
13685        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13686            self.job_id = v.into();
13687            self
13688        }
13689    }
13690
13691    impl wkt::message::Message for NotebookAction {
13692        fn typename() -> &'static str {
13693            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
13694        }
13695    }
13696
13697    /// Represents a workflow action that will run a Data Preparation.
13698    #[derive(Clone, Default, PartialEq)]
13699    #[non_exhaustive]
13700    pub struct DataPreparationAction {
13701        /// Output only. The generated BigQuery SQL script that will be executed. For
13702        /// reference only.
13703        pub generated_sql: std::string::String,
13704
13705        /// Output only. The ID of the BigQuery job that executed the SQL in
13706        /// sql_script. Only set once the job has started to run.
13707        pub job_id: std::string::String,
13708
13709        /// The definition for the data preparation.
13710        pub definition: std::option::Option<
13711            crate::model::workflow_invocation_action::data_preparation_action::Definition,
13712        >,
13713
13714        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13715    }
13716
13717    impl DataPreparationAction {
13718        /// Creates a new default instance.
13719        pub fn new() -> Self {
13720            std::default::Default::default()
13721        }
13722
13723        /// Sets the value of [generated_sql][crate::model::workflow_invocation_action::DataPreparationAction::generated_sql].
13724        ///
13725        /// # Example
13726        /// ```ignore,no_run
13727        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13728        /// let x = DataPreparationAction::new().set_generated_sql("example");
13729        /// ```
13730        pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
13731            mut self,
13732            v: T,
13733        ) -> Self {
13734            self.generated_sql = v.into();
13735            self
13736        }
13737
13738        /// Sets the value of [job_id][crate::model::workflow_invocation_action::DataPreparationAction::job_id].
13739        ///
13740        /// # Example
13741        /// ```ignore,no_run
13742        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13743        /// let x = DataPreparationAction::new().set_job_id("example");
13744        /// ```
13745        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13746            self.job_id = v.into();
13747            self
13748        }
13749
13750        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition].
13751        ///
13752        /// Note that all the setters affecting `definition` are mutually
13753        /// exclusive.
13754        ///
13755        /// # Example
13756        /// ```ignore,no_run
13757        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13758        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::Definition;
13759        /// let x = DataPreparationAction::new().set_definition(Some(Definition::ContentsYaml("example".to_string())));
13760        /// ```
13761        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
13762        {
13763            self.definition = v.into();
13764            self
13765        }
13766
13767        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13768        /// if it holds a `ContentsYaml`, `None` if the field is not set or
13769        /// holds a different branch.
13770        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
13771            #[allow(unreachable_patterns)]
13772            self.definition.as_ref().and_then(|v| match v {
13773                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
13774                _ => std::option::Option::None,
13775            })
13776        }
13777
13778        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13779        /// to hold a `ContentsYaml`.
13780        ///
13781        /// Note that all the setters affecting `definition` are
13782        /// mutually exclusive.
13783        ///
13784        /// # Example
13785        /// ```ignore,no_run
13786        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13787        /// let x = DataPreparationAction::new().set_contents_yaml("example");
13788        /// assert!(x.contents_yaml().is_some());
13789        /// assert!(x.contents_sql().is_none());
13790        /// ```
13791        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
13792            mut self,
13793            v: T,
13794        ) -> Self {
13795            self.definition = std::option::Option::Some(
13796                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
13797                    v.into()
13798                )
13799            );
13800            self
13801        }
13802
13803        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13804        /// if it holds a `ContentsSql`, `None` if the field is not set or
13805        /// holds a different branch.
13806        pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
13807            #[allow(unreachable_patterns)]
13808            self.definition.as_ref().and_then(|v| match v {
13809                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
13810                _ => std::option::Option::None,
13811            })
13812        }
13813
13814        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
13815        /// to hold a `ContentsSql`.
13816        ///
13817        /// Note that all the setters affecting `definition` are
13818        /// mutually exclusive.
13819        ///
13820        /// # Example
13821        /// ```ignore,no_run
13822        /// # use google_cloud_dataform_v1::model::workflow_invocation_action::DataPreparationAction;
13823        /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13824        /// let x = DataPreparationAction::new().set_contents_sql(ActionSqlDefinition::default()/* use setters */);
13825        /// assert!(x.contents_sql().is_some());
13826        /// assert!(x.contents_yaml().is_none());
13827        /// ```
13828        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{
13829            self.definition = std::option::Option::Some(
13830                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
13831                    v.into()
13832                )
13833            );
13834            self
13835        }
13836    }
13837
13838    impl wkt::message::Message for DataPreparationAction {
13839        fn typename() -> &'static str {
13840            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
13841        }
13842    }
13843
13844    /// Defines additional types related to [DataPreparationAction].
13845    pub mod data_preparation_action {
13846        #[allow(unused_imports)]
13847        use super::*;
13848
13849        /// Definition of a SQL Data Preparation
13850        #[derive(Clone, Default, PartialEq)]
13851        #[non_exhaustive]
13852        pub struct ActionSqlDefinition {
13853            /// The SQL query representing the data preparation steps. Formatted as a
13854            /// Pipe SQL query statement.
13855            pub query: std::string::String,
13856
13857            /// Error table configuration,
13858            pub error_table: std::option::Option<
13859                crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
13860            >,
13861
13862            /// Load configuration.
13863            pub load_config: std::option::Option<
13864                crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
13865            >,
13866
13867            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13868        }
13869
13870        impl ActionSqlDefinition {
13871            /// Creates a new default instance.
13872            pub fn new() -> Self {
13873                std::default::Default::default()
13874            }
13875
13876            /// Sets the value of [query][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::query].
13877            ///
13878            /// # Example
13879            /// ```ignore,no_run
13880            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13881            /// let x = ActionSqlDefinition::new().set_query("example");
13882            /// ```
13883            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13884                self.query = v.into();
13885                self
13886            }
13887
13888            /// Sets the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
13889            ///
13890            /// # Example
13891            /// ```ignore,no_run
13892            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13893            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13894            /// let x = ActionSqlDefinition::new().set_error_table(ActionErrorTable::default()/* use setters */);
13895            /// ```
13896            pub fn set_error_table<T>(mut self, v: T) -> Self
13897            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
13898            {
13899                self.error_table = std::option::Option::Some(v.into());
13900                self
13901            }
13902
13903            /// Sets or clears the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
13904            ///
13905            /// # Example
13906            /// ```ignore,no_run
13907            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13908            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13909            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(Some(ActionErrorTable::default()/* use setters */));
13910            /// let x = ActionSqlDefinition::new().set_or_clear_error_table(None::<ActionErrorTable>);
13911            /// ```
13912            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
13913            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
13914            {
13915                self.error_table = v.map(|x| x.into());
13916                self
13917            }
13918
13919            /// Sets the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
13920            ///
13921            /// # Example
13922            /// ```ignore,no_run
13923            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13924            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13925            /// let x = ActionSqlDefinition::new().set_load_config(ActionLoadConfig::default()/* use setters */);
13926            /// ```
13927            pub fn set_load_config<T>(mut self, v: T) -> Self
13928            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
13929            {
13930                self.load_config = std::option::Option::Some(v.into());
13931                self
13932            }
13933
13934            /// Sets or clears the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
13935            ///
13936            /// # Example
13937            /// ```ignore,no_run
13938            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition;
13939            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
13940            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(Some(ActionLoadConfig::default()/* use setters */));
13941            /// let x = ActionSqlDefinition::new().set_or_clear_load_config(None::<ActionLoadConfig>);
13942            /// ```
13943            pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
13944            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
13945            {
13946                self.load_config = v.map(|x| x.into());
13947                self
13948            }
13949        }
13950
13951        impl wkt::message::Message for ActionSqlDefinition {
13952            fn typename() -> &'static str {
13953                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
13954            }
13955        }
13956
13957        /// Error table information, used to write error data into a BigQuery
13958        /// table.
13959        #[derive(Clone, Default, PartialEq)]
13960        #[non_exhaustive]
13961        pub struct ActionErrorTable {
13962            /// Error Table target.
13963            pub target: std::option::Option<crate::model::Target>,
13964
13965            /// Error table partition expiration in days. Only positive values are
13966            /// allowed.
13967            pub retention_days: i32,
13968
13969            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13970        }
13971
13972        impl ActionErrorTable {
13973            /// Creates a new default instance.
13974            pub fn new() -> Self {
13975                std::default::Default::default()
13976            }
13977
13978            /// Sets the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
13979            ///
13980            /// # Example
13981            /// ```ignore,no_run
13982            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13983            /// use google_cloud_dataform_v1::model::Target;
13984            /// let x = ActionErrorTable::new().set_target(Target::default()/* use setters */);
13985            /// ```
13986            pub fn set_target<T>(mut self, v: T) -> Self
13987            where
13988                T: std::convert::Into<crate::model::Target>,
13989            {
13990                self.target = std::option::Option::Some(v.into());
13991                self
13992            }
13993
13994            /// Sets or clears the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
13995            ///
13996            /// # Example
13997            /// ```ignore,no_run
13998            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
13999            /// use google_cloud_dataform_v1::model::Target;
14000            /// let x = ActionErrorTable::new().set_or_clear_target(Some(Target::default()/* use setters */));
14001            /// let x = ActionErrorTable::new().set_or_clear_target(None::<Target>);
14002            /// ```
14003            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
14004            where
14005                T: std::convert::Into<crate::model::Target>,
14006            {
14007                self.target = v.map(|x| x.into());
14008                self
14009            }
14010
14011            /// Sets the value of [retention_days][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::retention_days].
14012            ///
14013            /// # Example
14014            /// ```ignore,no_run
14015            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionErrorTable;
14016            /// let x = ActionErrorTable::new().set_retention_days(42);
14017            /// ```
14018            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14019                self.retention_days = v.into();
14020                self
14021            }
14022        }
14023
14024        impl wkt::message::Message for ActionErrorTable {
14025            fn typename() -> &'static str {
14026                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
14027            }
14028        }
14029
14030        /// Simplified load configuration for actions
14031        #[derive(Clone, Default, PartialEq)]
14032        #[non_exhaustive]
14033        pub struct ActionLoadConfig {
14034
14035            /// Load mode
14036            pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
14037
14038            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14039        }
14040
14041        impl ActionLoadConfig {
14042            /// Creates a new default instance.
14043            pub fn new() -> Self {
14044                std::default::Default::default()
14045            }
14046
14047            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode].
14048            ///
14049            /// Note that all the setters affecting `mode` are mutually
14050            /// exclusive.
14051            ///
14052            /// # Example
14053            /// ```ignore,no_run
14054            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14055            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
14056            /// let x = ActionLoadConfig::new().set_mode(Some(
14057            ///     google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(ActionSimpleLoadMode::default().into())));
14058            /// ```
14059            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
14060            {
14061                self.mode = v.into();
14062                self
14063            }
14064
14065            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14066            /// if it holds a `Replace`, `None` if the field is not set or
14067            /// holds a different branch.
14068            pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
14069                #[allow(unreachable_patterns)]
14070                self.mode.as_ref().and_then(|v| match v {
14071                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
14072                    _ => std::option::Option::None,
14073                })
14074            }
14075
14076            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14077            /// to hold a `Replace`.
14078            ///
14079            /// Note that all the setters affecting `mode` are
14080            /// mutually exclusive.
14081            ///
14082            /// # Example
14083            /// ```ignore,no_run
14084            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14085            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
14086            /// let x = ActionLoadConfig::new().set_replace(ActionSimpleLoadMode::default()/* use setters */);
14087            /// assert!(x.replace().is_some());
14088            /// assert!(x.append().is_none());
14089            /// assert!(x.maximum().is_none());
14090            /// assert!(x.unique().is_none());
14091            /// ```
14092            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{
14093                self.mode = std::option::Option::Some(
14094                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
14095                        v.into()
14096                    )
14097                );
14098                self
14099            }
14100
14101            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14102            /// if it holds a `Append`, `None` if the field is not set or
14103            /// holds a different branch.
14104            pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
14105                #[allow(unreachable_patterns)]
14106                self.mode.as_ref().and_then(|v| match v {
14107                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
14108                    _ => std::option::Option::None,
14109                })
14110            }
14111
14112            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14113            /// to hold a `Append`.
14114            ///
14115            /// Note that all the setters affecting `mode` are
14116            /// mutually exclusive.
14117            ///
14118            /// # Example
14119            /// ```ignore,no_run
14120            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14121            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode;
14122            /// let x = ActionLoadConfig::new().set_append(ActionSimpleLoadMode::default()/* use setters */);
14123            /// assert!(x.append().is_some());
14124            /// assert!(x.replace().is_none());
14125            /// assert!(x.maximum().is_none());
14126            /// assert!(x.unique().is_none());
14127            /// ```
14128            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{
14129                self.mode = std::option::Option::Some(
14130                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
14131                        v.into()
14132                    )
14133                );
14134                self
14135            }
14136
14137            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14138            /// if it holds a `Maximum`, `None` if the field is not set or
14139            /// holds a different branch.
14140            pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
14141                #[allow(unreachable_patterns)]
14142                self.mode.as_ref().and_then(|v| match v {
14143                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
14144                    _ => std::option::Option::None,
14145                })
14146            }
14147
14148            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14149            /// to hold a `Maximum`.
14150            ///
14151            /// Note that all the setters affecting `mode` are
14152            /// mutually exclusive.
14153            ///
14154            /// # Example
14155            /// ```ignore,no_run
14156            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14157            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
14158            /// let x = ActionLoadConfig::new().set_maximum(ActionIncrementalLoadMode::default()/* use setters */);
14159            /// assert!(x.maximum().is_some());
14160            /// assert!(x.replace().is_none());
14161            /// assert!(x.append().is_none());
14162            /// assert!(x.unique().is_none());
14163            /// ```
14164            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{
14165                self.mode = std::option::Option::Some(
14166                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
14167                        v.into()
14168                    )
14169                );
14170                self
14171            }
14172
14173            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14174            /// if it holds a `Unique`, `None` if the field is not set or
14175            /// holds a different branch.
14176            pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
14177                #[allow(unreachable_patterns)]
14178                self.mode.as_ref().and_then(|v| match v {
14179                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
14180                    _ => std::option::Option::None,
14181                })
14182            }
14183
14184            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
14185            /// to hold a `Unique`.
14186            ///
14187            /// Note that all the setters affecting `mode` are
14188            /// mutually exclusive.
14189            ///
14190            /// # Example
14191            /// ```ignore,no_run
14192            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig;
14193            /// use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
14194            /// let x = ActionLoadConfig::new().set_unique(ActionIncrementalLoadMode::default()/* use setters */);
14195            /// assert!(x.unique().is_some());
14196            /// assert!(x.replace().is_none());
14197            /// assert!(x.append().is_none());
14198            /// assert!(x.maximum().is_none());
14199            /// ```
14200            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{
14201                self.mode = std::option::Option::Some(
14202                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
14203                        v.into()
14204                    )
14205                );
14206                self
14207            }
14208        }
14209
14210        impl wkt::message::Message for ActionLoadConfig {
14211            fn typename() -> &'static str {
14212                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
14213            }
14214        }
14215
14216        /// Defines additional types related to [ActionLoadConfig].
14217        pub mod action_load_config {
14218            #[allow(unused_imports)]
14219            use super::*;
14220
14221            /// Load mode
14222            #[derive(Clone, Debug, PartialEq)]
14223            #[non_exhaustive]
14224            pub enum Mode {
14225                /// Replace destination table
14226                Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
14227                /// Append into destination table
14228                Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
14229                /// Insert records where the value exceeds the previous maximum value for
14230                /// a column in the destination table
14231                Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
14232                /// Insert records where the value of a column is not already present in
14233                /// the destination table
14234                Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
14235            }
14236        }
14237
14238        /// Simple load definition
14239        #[derive(Clone, Default, PartialEq)]
14240        #[non_exhaustive]
14241        pub struct ActionSimpleLoadMode {
14242            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14243        }
14244
14245        impl ActionSimpleLoadMode {
14246            /// Creates a new default instance.
14247            pub fn new() -> Self {
14248                std::default::Default::default()
14249            }
14250        }
14251
14252        impl wkt::message::Message for ActionSimpleLoadMode {
14253            fn typename() -> &'static str {
14254                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
14255            }
14256        }
14257
14258        /// Load definition for incremental load modes
14259        #[derive(Clone, Default, PartialEq)]
14260        #[non_exhaustive]
14261        pub struct ActionIncrementalLoadMode {
14262            /// Column name for incremental load modes
14263            pub column: std::string::String,
14264
14265            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14266        }
14267
14268        impl ActionIncrementalLoadMode {
14269            /// Creates a new default instance.
14270            pub fn new() -> Self {
14271                std::default::Default::default()
14272            }
14273
14274            /// Sets the value of [column][crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode::column].
14275            ///
14276            /// # Example
14277            /// ```ignore,no_run
14278            /// # use google_cloud_dataform_v1::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode;
14279            /// let x = ActionIncrementalLoadMode::new().set_column("example");
14280            /// ```
14281            pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14282                self.column = v.into();
14283                self
14284            }
14285        }
14286
14287        impl wkt::message::Message for ActionIncrementalLoadMode {
14288            fn typename() -> &'static str {
14289                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
14290            }
14291        }
14292
14293        /// The definition for the data preparation.
14294        #[derive(Clone, Debug, PartialEq)]
14295        #[non_exhaustive]
14296        pub enum Definition {
14297            /// Output only. YAML representing the contents of the data preparation.
14298            /// Can be used to show the customer what the input was to their workflow.
14299            ContentsYaml(std::string::String),
14300            /// SQL definition for a Data Preparation. Contains a SQL query and
14301            /// additional context information.
14302            ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
14303        }
14304    }
14305
14306    /// Represents the current state of a workflow invocation action.
14307    ///
14308    /// # Working with unknown values
14309    ///
14310    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14311    /// additional enum variants at any time. Adding new variants is not considered
14312    /// a breaking change. Applications should write their code in anticipation of:
14313    ///
14314    /// - New values appearing in future releases of the client library, **and**
14315    /// - New values received dynamically, without application changes.
14316    ///
14317    /// Please consult the [Working with enums] section in the user guide for some
14318    /// guidelines.
14319    ///
14320    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14321    #[derive(Clone, Debug, PartialEq)]
14322    #[non_exhaustive]
14323    pub enum State {
14324        /// The action has not yet been considered for invocation.
14325        Pending,
14326        /// The action is currently running.
14327        Running,
14328        /// Execution of the action was skipped because upstream dependencies did not
14329        /// all complete successfully. A terminal state.
14330        Skipped,
14331        /// Execution of the action was disabled as per the configuration of the
14332        /// corresponding compilation result action. A terminal state.
14333        Disabled,
14334        /// The action succeeded. A terminal state.
14335        Succeeded,
14336        /// The action was cancelled. A terminal state.
14337        Cancelled,
14338        /// The action failed. A terminal state.
14339        Failed,
14340        /// If set, the enum was initialized with an unknown value.
14341        ///
14342        /// Applications can examine the value using [State::value] or
14343        /// [State::name].
14344        UnknownValue(state::UnknownValue),
14345    }
14346
14347    #[doc(hidden)]
14348    pub mod state {
14349        #[allow(unused_imports)]
14350        use super::*;
14351        #[derive(Clone, Debug, PartialEq)]
14352        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14353    }
14354
14355    impl State {
14356        /// Gets the enum value.
14357        ///
14358        /// Returns `None` if the enum contains an unknown value deserialized from
14359        /// the string representation of enums.
14360        pub fn value(&self) -> std::option::Option<i32> {
14361            match self {
14362                Self::Pending => std::option::Option::Some(0),
14363                Self::Running => std::option::Option::Some(1),
14364                Self::Skipped => std::option::Option::Some(2),
14365                Self::Disabled => std::option::Option::Some(3),
14366                Self::Succeeded => std::option::Option::Some(4),
14367                Self::Cancelled => std::option::Option::Some(5),
14368                Self::Failed => std::option::Option::Some(6),
14369                Self::UnknownValue(u) => u.0.value(),
14370            }
14371        }
14372
14373        /// Gets the enum value as a string.
14374        ///
14375        /// Returns `None` if the enum contains an unknown value deserialized from
14376        /// the integer representation of enums.
14377        pub fn name(&self) -> std::option::Option<&str> {
14378            match self {
14379                Self::Pending => std::option::Option::Some("PENDING"),
14380                Self::Running => std::option::Option::Some("RUNNING"),
14381                Self::Skipped => std::option::Option::Some("SKIPPED"),
14382                Self::Disabled => std::option::Option::Some("DISABLED"),
14383                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
14384                Self::Cancelled => std::option::Option::Some("CANCELLED"),
14385                Self::Failed => std::option::Option::Some("FAILED"),
14386                Self::UnknownValue(u) => u.0.name(),
14387            }
14388        }
14389    }
14390
14391    impl std::default::Default for State {
14392        fn default() -> Self {
14393            use std::convert::From;
14394            Self::from(0)
14395        }
14396    }
14397
14398    impl std::fmt::Display for State {
14399        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14400            wkt::internal::display_enum(f, self.name(), self.value())
14401        }
14402    }
14403
14404    impl std::convert::From<i32> for State {
14405        fn from(value: i32) -> Self {
14406            match value {
14407                0 => Self::Pending,
14408                1 => Self::Running,
14409                2 => Self::Skipped,
14410                3 => Self::Disabled,
14411                4 => Self::Succeeded,
14412                5 => Self::Cancelled,
14413                6 => Self::Failed,
14414                _ => Self::UnknownValue(state::UnknownValue(
14415                    wkt::internal::UnknownEnumValue::Integer(value),
14416                )),
14417            }
14418        }
14419    }
14420
14421    impl std::convert::From<&str> for State {
14422        fn from(value: &str) -> Self {
14423            use std::string::ToString;
14424            match value {
14425                "PENDING" => Self::Pending,
14426                "RUNNING" => Self::Running,
14427                "SKIPPED" => Self::Skipped,
14428                "DISABLED" => Self::Disabled,
14429                "SUCCEEDED" => Self::Succeeded,
14430                "CANCELLED" => Self::Cancelled,
14431                "FAILED" => Self::Failed,
14432                _ => Self::UnknownValue(state::UnknownValue(
14433                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14434                )),
14435            }
14436        }
14437    }
14438
14439    impl serde::ser::Serialize for State {
14440        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14441        where
14442            S: serde::Serializer,
14443        {
14444            match self {
14445                Self::Pending => serializer.serialize_i32(0),
14446                Self::Running => serializer.serialize_i32(1),
14447                Self::Skipped => serializer.serialize_i32(2),
14448                Self::Disabled => serializer.serialize_i32(3),
14449                Self::Succeeded => serializer.serialize_i32(4),
14450                Self::Cancelled => serializer.serialize_i32(5),
14451                Self::Failed => serializer.serialize_i32(6),
14452                Self::UnknownValue(u) => u.0.serialize(serializer),
14453            }
14454        }
14455    }
14456
14457    impl<'de> serde::de::Deserialize<'de> for State {
14458        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14459        where
14460            D: serde::Deserializer<'de>,
14461        {
14462            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14463                ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
14464            ))
14465        }
14466    }
14467
14468    /// The action's details.
14469    #[derive(Clone, Debug, PartialEq)]
14470    #[non_exhaustive]
14471    pub enum Action {
14472        /// Output only. The workflow action's bigquery action details.
14473        BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
14474        /// Output only. The workflow action's notebook action details.
14475        NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
14476        /// Output only. The workflow action's data preparation action details.
14477        DataPreparationAction(
14478            std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
14479        ),
14480    }
14481}
14482
14483/// `QueryWorkflowInvocationActions` request message.
14484#[derive(Clone, Default, PartialEq)]
14485#[non_exhaustive]
14486pub struct QueryWorkflowInvocationActionsRequest {
14487    /// Required. The workflow invocation's name.
14488    pub name: std::string::String,
14489
14490    /// Optional. Maximum number of workflow invocations to return. The server may
14491    /// return fewer items than requested. If unspecified, the server will pick an
14492    /// appropriate default.
14493    pub page_size: i32,
14494
14495    /// Optional. Page token received from a previous
14496    /// `QueryWorkflowInvocationActions` call. Provide this to retrieve the
14497    /// subsequent page.
14498    ///
14499    /// When paginating, all other parameters provided to
14500    /// `QueryWorkflowInvocationActions`, with the exception of `page_size`, must
14501    /// match the call that provided the page token.
14502    pub page_token: std::string::String,
14503
14504    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14505}
14506
14507impl QueryWorkflowInvocationActionsRequest {
14508    /// Creates a new default instance.
14509    pub fn new() -> Self {
14510        std::default::Default::default()
14511    }
14512
14513    /// Sets the value of [name][crate::model::QueryWorkflowInvocationActionsRequest::name].
14514    ///
14515    /// # Example
14516    /// ```ignore,no_run
14517    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14518    /// # let project_id = "project_id";
14519    /// # let location_id = "location_id";
14520    /// # let repository_id = "repository_id";
14521    /// # let workflow_invocation_id = "workflow_invocation_id";
14522    /// let x = QueryWorkflowInvocationActionsRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/repositories/{repository_id}/workflowInvocations/{workflow_invocation_id}"));
14523    /// ```
14524    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14525        self.name = v.into();
14526        self
14527    }
14528
14529    /// Sets the value of [page_size][crate::model::QueryWorkflowInvocationActionsRequest::page_size].
14530    ///
14531    /// # Example
14532    /// ```ignore,no_run
14533    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14534    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_size(42);
14535    /// ```
14536    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14537        self.page_size = v.into();
14538        self
14539    }
14540
14541    /// Sets the value of [page_token][crate::model::QueryWorkflowInvocationActionsRequest::page_token].
14542    ///
14543    /// # Example
14544    /// ```ignore,no_run
14545    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsRequest;
14546    /// let x = QueryWorkflowInvocationActionsRequest::new().set_page_token("example");
14547    /// ```
14548    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14549        self.page_token = v.into();
14550        self
14551    }
14552}
14553
14554impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
14555    fn typename() -> &'static str {
14556        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
14557    }
14558}
14559
14560/// `QueryWorkflowInvocationActions` response message.
14561#[derive(Clone, Default, PartialEq)]
14562#[non_exhaustive]
14563pub struct QueryWorkflowInvocationActionsResponse {
14564    /// List of workflow invocation actions.
14565    pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
14566
14567    /// A token, which can be sent as `page_token` to retrieve the next page.
14568    /// If this field is omitted, there are no subsequent pages.
14569    pub next_page_token: std::string::String,
14570
14571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14572}
14573
14574impl QueryWorkflowInvocationActionsResponse {
14575    /// Creates a new default instance.
14576    pub fn new() -> Self {
14577        std::default::Default::default()
14578    }
14579
14580    /// Sets the value of [workflow_invocation_actions][crate::model::QueryWorkflowInvocationActionsResponse::workflow_invocation_actions].
14581    ///
14582    /// # Example
14583    /// ```ignore,no_run
14584    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
14585    /// use google_cloud_dataform_v1::model::WorkflowInvocationAction;
14586    /// let x = QueryWorkflowInvocationActionsResponse::new()
14587    ///     .set_workflow_invocation_actions([
14588    ///         WorkflowInvocationAction::default()/* use setters */,
14589    ///         WorkflowInvocationAction::default()/* use (different) setters */,
14590    ///     ]);
14591    /// ```
14592    pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
14593    where
14594        T: std::iter::IntoIterator<Item = V>,
14595        V: std::convert::Into<crate::model::WorkflowInvocationAction>,
14596    {
14597        use std::iter::Iterator;
14598        self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
14599        self
14600    }
14601
14602    /// Sets the value of [next_page_token][crate::model::QueryWorkflowInvocationActionsResponse::next_page_token].
14603    ///
14604    /// # Example
14605    /// ```ignore,no_run
14606    /// # use google_cloud_dataform_v1::model::QueryWorkflowInvocationActionsResponse;
14607    /// let x = QueryWorkflowInvocationActionsResponse::new().set_next_page_token("example");
14608    /// ```
14609    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14610        self.next_page_token = v.into();
14611        self
14612    }
14613}
14614
14615impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
14616    fn typename() -> &'static str {
14617        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
14618    }
14619}
14620
14621#[doc(hidden)]
14622impl google_cloud_gax::paginator::internal::PageableResponse
14623    for QueryWorkflowInvocationActionsResponse
14624{
14625    type PageItem = crate::model::WorkflowInvocationAction;
14626
14627    fn items(self) -> std::vec::Vec<Self::PageItem> {
14628        self.workflow_invocation_actions
14629    }
14630
14631    fn next_page_token(&self) -> std::string::String {
14632        use std::clone::Clone;
14633        self.next_page_token.clone()
14634    }
14635}
14636
14637/// Config for all repositories in a given project and location.
14638#[derive(Clone, Default, PartialEq)]
14639#[non_exhaustive]
14640pub struct Config {
14641    /// Identifier. The config name.
14642    pub name: std::string::String,
14643
14644    /// Optional. The default KMS key that is used if no encryption key is provided
14645    /// when a repository is created.
14646    pub default_kms_key_name: std::string::String,
14647
14648    /// Output only. All the metadata information that is used internally to serve
14649    /// the resource. For example: timestamps, flags, status fields, etc. The
14650    /// format of this field is a JSON string.
14651    pub internal_metadata: std::option::Option<std::string::String>,
14652
14653    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14654}
14655
14656impl Config {
14657    /// Creates a new default instance.
14658    pub fn new() -> Self {
14659        std::default::Default::default()
14660    }
14661
14662    /// Sets the value of [name][crate::model::Config::name].
14663    ///
14664    /// # Example
14665    /// ```ignore,no_run
14666    /// # use google_cloud_dataform_v1::model::Config;
14667    /// # let project_id = "project_id";
14668    /// # let location_id = "location_id";
14669    /// let x = Config::new().set_name(format!("projects/{project_id}/locations/{location_id}/config"));
14670    /// ```
14671    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14672        self.name = v.into();
14673        self
14674    }
14675
14676    /// Sets the value of [default_kms_key_name][crate::model::Config::default_kms_key_name].
14677    ///
14678    /// # Example
14679    /// ```ignore,no_run
14680    /// # use google_cloud_dataform_v1::model::Config;
14681    /// let x = Config::new().set_default_kms_key_name("example");
14682    /// ```
14683    pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
14684        mut self,
14685        v: T,
14686    ) -> Self {
14687        self.default_kms_key_name = v.into();
14688        self
14689    }
14690
14691    /// Sets the value of [internal_metadata][crate::model::Config::internal_metadata].
14692    ///
14693    /// # Example
14694    /// ```ignore,no_run
14695    /// # use google_cloud_dataform_v1::model::Config;
14696    /// let x = Config::new().set_internal_metadata("example");
14697    /// ```
14698    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
14699    where
14700        T: std::convert::Into<std::string::String>,
14701    {
14702        self.internal_metadata = std::option::Option::Some(v.into());
14703        self
14704    }
14705
14706    /// Sets or clears the value of [internal_metadata][crate::model::Config::internal_metadata].
14707    ///
14708    /// # Example
14709    /// ```ignore,no_run
14710    /// # use google_cloud_dataform_v1::model::Config;
14711    /// let x = Config::new().set_or_clear_internal_metadata(Some("example"));
14712    /// let x = Config::new().set_or_clear_internal_metadata(None::<String>);
14713    /// ```
14714    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
14715    where
14716        T: std::convert::Into<std::string::String>,
14717    {
14718        self.internal_metadata = v.map(|x| x.into());
14719        self
14720    }
14721}
14722
14723impl wkt::message::Message for Config {
14724    fn typename() -> &'static str {
14725        "type.googleapis.com/google.cloud.dataform.v1.Config"
14726    }
14727}
14728
14729/// `GetConfig` request message.
14730#[derive(Clone, Default, PartialEq)]
14731#[non_exhaustive]
14732pub struct GetConfigRequest {
14733    /// Required. The config name.
14734    pub name: std::string::String,
14735
14736    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14737}
14738
14739impl GetConfigRequest {
14740    /// Creates a new default instance.
14741    pub fn new() -> Self {
14742        std::default::Default::default()
14743    }
14744
14745    /// Sets the value of [name][crate::model::GetConfigRequest::name].
14746    ///
14747    /// # Example
14748    /// ```ignore,no_run
14749    /// # use google_cloud_dataform_v1::model::GetConfigRequest;
14750    /// # let project_id = "project_id";
14751    /// # let location_id = "location_id";
14752    /// let x = GetConfigRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/config"));
14753    /// ```
14754    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14755        self.name = v.into();
14756        self
14757    }
14758}
14759
14760impl wkt::message::Message for GetConfigRequest {
14761    fn typename() -> &'static str {
14762        "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
14763    }
14764}
14765
14766/// `UpdateConfig` request message.
14767#[derive(Clone, Default, PartialEq)]
14768#[non_exhaustive]
14769pub struct UpdateConfigRequest {
14770    /// Required. The config to update.
14771    pub config: std::option::Option<crate::model::Config>,
14772
14773    /// Optional. Specifies the fields to be updated in the config.
14774    pub update_mask: std::option::Option<wkt::FieldMask>,
14775
14776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14777}
14778
14779impl UpdateConfigRequest {
14780    /// Creates a new default instance.
14781    pub fn new() -> Self {
14782        std::default::Default::default()
14783    }
14784
14785    /// Sets the value of [config][crate::model::UpdateConfigRequest::config].
14786    ///
14787    /// # Example
14788    /// ```ignore,no_run
14789    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14790    /// use google_cloud_dataform_v1::model::Config;
14791    /// let x = UpdateConfigRequest::new().set_config(Config::default()/* use setters */);
14792    /// ```
14793    pub fn set_config<T>(mut self, v: T) -> Self
14794    where
14795        T: std::convert::Into<crate::model::Config>,
14796    {
14797        self.config = std::option::Option::Some(v.into());
14798        self
14799    }
14800
14801    /// Sets or clears the value of [config][crate::model::UpdateConfigRequest::config].
14802    ///
14803    /// # Example
14804    /// ```ignore,no_run
14805    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14806    /// use google_cloud_dataform_v1::model::Config;
14807    /// let x = UpdateConfigRequest::new().set_or_clear_config(Some(Config::default()/* use setters */));
14808    /// let x = UpdateConfigRequest::new().set_or_clear_config(None::<Config>);
14809    /// ```
14810    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
14811    where
14812        T: std::convert::Into<crate::model::Config>,
14813    {
14814        self.config = v.map(|x| x.into());
14815        self
14816    }
14817
14818    /// Sets the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
14819    ///
14820    /// # Example
14821    /// ```ignore,no_run
14822    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14823    /// use wkt::FieldMask;
14824    /// let x = UpdateConfigRequest::new().set_update_mask(FieldMask::default()/* use setters */);
14825    /// ```
14826    pub fn set_update_mask<T>(mut self, v: T) -> Self
14827    where
14828        T: std::convert::Into<wkt::FieldMask>,
14829    {
14830        self.update_mask = std::option::Option::Some(v.into());
14831        self
14832    }
14833
14834    /// Sets or clears the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
14835    ///
14836    /// # Example
14837    /// ```ignore,no_run
14838    /// # use google_cloud_dataform_v1::model::UpdateConfigRequest;
14839    /// use wkt::FieldMask;
14840    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
14841    /// let x = UpdateConfigRequest::new().set_or_clear_update_mask(None::<FieldMask>);
14842    /// ```
14843    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14844    where
14845        T: std::convert::Into<wkt::FieldMask>,
14846    {
14847        self.update_mask = v.map(|x| x.into());
14848        self
14849    }
14850}
14851
14852impl wkt::message::Message for UpdateConfigRequest {
14853    fn typename() -> &'static str {
14854        "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
14855    }
14856}
14857
14858/// Represents a Dataform Folder. This is a resource that is used to organize
14859/// Files and other Folders and provide hierarchical access controls.
14860#[derive(Clone, Default, PartialEq)]
14861#[non_exhaustive]
14862pub struct Folder {
14863    /// Identifier. The Folder's name.
14864    pub name: std::string::String,
14865
14866    /// Required. The Folder's user-friendly name.
14867    pub display_name: std::string::String,
14868
14869    /// Optional. The containing Folder resource name. This should take
14870    /// the format: projects/{project}/locations/{location}/folders/{folder},
14871    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}, or just
14872    /// "" if this is a root Folder. This field can only be updated through
14873    /// MoveFolder.
14874    pub containing_folder: std::string::String,
14875
14876    /// Output only. The resource name of the TeamFolder that this Folder is
14877    /// associated with. This should take the format:
14878    /// projects/{project}/locations/{location}/teamFolders/{teamFolder}. If this
14879    /// is not set, the Folder is not associated with a TeamFolder and is a
14880    /// UserFolder.
14881    pub team_folder_name: std::string::String,
14882
14883    /// Output only. The timestamp of when the Folder was created.
14884    pub create_time: std::option::Option<wkt::Timestamp>,
14885
14886    /// Output only. The timestamp of when the Folder was last updated.
14887    pub update_time: std::option::Option<wkt::Timestamp>,
14888
14889    /// Output only. All the metadata information that is used internally to serve
14890    /// the resource. For example: timestamps, flags, status fields, etc. The
14891    /// format of this field is a JSON string.
14892    pub internal_metadata: std::option::Option<std::string::String>,
14893
14894    /// Output only. The IAM principal identifier of the creator of the Folder.
14895    pub creator_iam_principal: std::option::Option<std::string::String>,
14896
14897    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14898}
14899
14900impl Folder {
14901    /// Creates a new default instance.
14902    pub fn new() -> Self {
14903        std::default::Default::default()
14904    }
14905
14906    /// Sets the value of [name][crate::model::Folder::name].
14907    ///
14908    /// # Example
14909    /// ```ignore,no_run
14910    /// # use google_cloud_dataform_v1::model::Folder;
14911    /// # let project_id = "project_id";
14912    /// # let location_id = "location_id";
14913    /// # let folder_id = "folder_id";
14914    /// let x = Folder::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
14915    /// ```
14916    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14917        self.name = v.into();
14918        self
14919    }
14920
14921    /// Sets the value of [display_name][crate::model::Folder::display_name].
14922    ///
14923    /// # Example
14924    /// ```ignore,no_run
14925    /// # use google_cloud_dataform_v1::model::Folder;
14926    /// let x = Folder::new().set_display_name("example");
14927    /// ```
14928    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14929        self.display_name = v.into();
14930        self
14931    }
14932
14933    /// Sets the value of [containing_folder][crate::model::Folder::containing_folder].
14934    ///
14935    /// # Example
14936    /// ```ignore,no_run
14937    /// # use google_cloud_dataform_v1::model::Folder;
14938    /// let x = Folder::new().set_containing_folder("example");
14939    /// ```
14940    pub fn set_containing_folder<T: std::convert::Into<std::string::String>>(
14941        mut self,
14942        v: T,
14943    ) -> Self {
14944        self.containing_folder = v.into();
14945        self
14946    }
14947
14948    /// Sets the value of [team_folder_name][crate::model::Folder::team_folder_name].
14949    ///
14950    /// # Example
14951    /// ```ignore,no_run
14952    /// # use google_cloud_dataform_v1::model::Folder;
14953    /// let x = Folder::new().set_team_folder_name("example");
14954    /// ```
14955    pub fn set_team_folder_name<T: std::convert::Into<std::string::String>>(
14956        mut self,
14957        v: T,
14958    ) -> Self {
14959        self.team_folder_name = v.into();
14960        self
14961    }
14962
14963    /// Sets the value of [create_time][crate::model::Folder::create_time].
14964    ///
14965    /// # Example
14966    /// ```ignore,no_run
14967    /// # use google_cloud_dataform_v1::model::Folder;
14968    /// use wkt::Timestamp;
14969    /// let x = Folder::new().set_create_time(Timestamp::default()/* use setters */);
14970    /// ```
14971    pub fn set_create_time<T>(mut self, v: T) -> Self
14972    where
14973        T: std::convert::Into<wkt::Timestamp>,
14974    {
14975        self.create_time = std::option::Option::Some(v.into());
14976        self
14977    }
14978
14979    /// Sets or clears the value of [create_time][crate::model::Folder::create_time].
14980    ///
14981    /// # Example
14982    /// ```ignore,no_run
14983    /// # use google_cloud_dataform_v1::model::Folder;
14984    /// use wkt::Timestamp;
14985    /// let x = Folder::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14986    /// let x = Folder::new().set_or_clear_create_time(None::<Timestamp>);
14987    /// ```
14988    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14989    where
14990        T: std::convert::Into<wkt::Timestamp>,
14991    {
14992        self.create_time = v.map(|x| x.into());
14993        self
14994    }
14995
14996    /// Sets the value of [update_time][crate::model::Folder::update_time].
14997    ///
14998    /// # Example
14999    /// ```ignore,no_run
15000    /// # use google_cloud_dataform_v1::model::Folder;
15001    /// use wkt::Timestamp;
15002    /// let x = Folder::new().set_update_time(Timestamp::default()/* use setters */);
15003    /// ```
15004    pub fn set_update_time<T>(mut self, v: T) -> Self
15005    where
15006        T: std::convert::Into<wkt::Timestamp>,
15007    {
15008        self.update_time = std::option::Option::Some(v.into());
15009        self
15010    }
15011
15012    /// Sets or clears the value of [update_time][crate::model::Folder::update_time].
15013    ///
15014    /// # Example
15015    /// ```ignore,no_run
15016    /// # use google_cloud_dataform_v1::model::Folder;
15017    /// use wkt::Timestamp;
15018    /// let x = Folder::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
15019    /// let x = Folder::new().set_or_clear_update_time(None::<Timestamp>);
15020    /// ```
15021    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15022    where
15023        T: std::convert::Into<wkt::Timestamp>,
15024    {
15025        self.update_time = v.map(|x| x.into());
15026        self
15027    }
15028
15029    /// Sets the value of [internal_metadata][crate::model::Folder::internal_metadata].
15030    ///
15031    /// # Example
15032    /// ```ignore,no_run
15033    /// # use google_cloud_dataform_v1::model::Folder;
15034    /// let x = Folder::new().set_internal_metadata("example");
15035    /// ```
15036    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
15037    where
15038        T: std::convert::Into<std::string::String>,
15039    {
15040        self.internal_metadata = std::option::Option::Some(v.into());
15041        self
15042    }
15043
15044    /// Sets or clears the value of [internal_metadata][crate::model::Folder::internal_metadata].
15045    ///
15046    /// # Example
15047    /// ```ignore,no_run
15048    /// # use google_cloud_dataform_v1::model::Folder;
15049    /// let x = Folder::new().set_or_clear_internal_metadata(Some("example"));
15050    /// let x = Folder::new().set_or_clear_internal_metadata(None::<String>);
15051    /// ```
15052    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
15053    where
15054        T: std::convert::Into<std::string::String>,
15055    {
15056        self.internal_metadata = v.map(|x| x.into());
15057        self
15058    }
15059
15060    /// Sets the value of [creator_iam_principal][crate::model::Folder::creator_iam_principal].
15061    ///
15062    /// # Example
15063    /// ```ignore,no_run
15064    /// # use google_cloud_dataform_v1::model::Folder;
15065    /// let x = Folder::new().set_creator_iam_principal("example");
15066    /// ```
15067    pub fn set_creator_iam_principal<T>(mut self, v: T) -> Self
15068    where
15069        T: std::convert::Into<std::string::String>,
15070    {
15071        self.creator_iam_principal = std::option::Option::Some(v.into());
15072        self
15073    }
15074
15075    /// Sets or clears the value of [creator_iam_principal][crate::model::Folder::creator_iam_principal].
15076    ///
15077    /// # Example
15078    /// ```ignore,no_run
15079    /// # use google_cloud_dataform_v1::model::Folder;
15080    /// let x = Folder::new().set_or_clear_creator_iam_principal(Some("example"));
15081    /// let x = Folder::new().set_or_clear_creator_iam_principal(None::<String>);
15082    /// ```
15083    pub fn set_or_clear_creator_iam_principal<T>(mut self, v: std::option::Option<T>) -> Self
15084    where
15085        T: std::convert::Into<std::string::String>,
15086    {
15087        self.creator_iam_principal = v.map(|x| x.into());
15088        self
15089    }
15090}
15091
15092impl wkt::message::Message for Folder {
15093    fn typename() -> &'static str {
15094        "type.googleapis.com/google.cloud.dataform.v1.Folder"
15095    }
15096}
15097
15098/// `CreateFolder` request message.
15099#[derive(Clone, Default, PartialEq)]
15100#[non_exhaustive]
15101pub struct CreateFolderRequest {
15102    /// Required. The location in which to create the Folder. Must be in the format
15103    /// `projects/*/locations/*`.
15104    pub parent: std::string::String,
15105
15106    /// Required. The Folder to create.
15107    pub folder: std::option::Option<crate::model::Folder>,
15108
15109    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15110}
15111
15112impl CreateFolderRequest {
15113    /// Creates a new default instance.
15114    pub fn new() -> Self {
15115        std::default::Default::default()
15116    }
15117
15118    /// Sets the value of [parent][crate::model::CreateFolderRequest::parent].
15119    ///
15120    /// # Example
15121    /// ```ignore,no_run
15122    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
15123    /// let x = CreateFolderRequest::new().set_parent("example");
15124    /// ```
15125    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15126        self.parent = v.into();
15127        self
15128    }
15129
15130    /// Sets the value of [folder][crate::model::CreateFolderRequest::folder].
15131    ///
15132    /// # Example
15133    /// ```ignore,no_run
15134    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
15135    /// use google_cloud_dataform_v1::model::Folder;
15136    /// let x = CreateFolderRequest::new().set_folder(Folder::default()/* use setters */);
15137    /// ```
15138    pub fn set_folder<T>(mut self, v: T) -> Self
15139    where
15140        T: std::convert::Into<crate::model::Folder>,
15141    {
15142        self.folder = std::option::Option::Some(v.into());
15143        self
15144    }
15145
15146    /// Sets or clears the value of [folder][crate::model::CreateFolderRequest::folder].
15147    ///
15148    /// # Example
15149    /// ```ignore,no_run
15150    /// # use google_cloud_dataform_v1::model::CreateFolderRequest;
15151    /// use google_cloud_dataform_v1::model::Folder;
15152    /// let x = CreateFolderRequest::new().set_or_clear_folder(Some(Folder::default()/* use setters */));
15153    /// let x = CreateFolderRequest::new().set_or_clear_folder(None::<Folder>);
15154    /// ```
15155    pub fn set_or_clear_folder<T>(mut self, v: std::option::Option<T>) -> Self
15156    where
15157        T: std::convert::Into<crate::model::Folder>,
15158    {
15159        self.folder = v.map(|x| x.into());
15160        self
15161    }
15162}
15163
15164impl wkt::message::Message for CreateFolderRequest {
15165    fn typename() -> &'static str {
15166        "type.googleapis.com/google.cloud.dataform.v1.CreateFolderRequest"
15167    }
15168}
15169
15170/// `MoveFolder` request message.
15171#[derive(Clone, Default, PartialEq)]
15172#[non_exhaustive]
15173pub struct MoveFolderRequest {
15174    /// Required. The full resource name of the Folder to move.
15175    pub name: std::string::String,
15176
15177    /// Optional. The name of the Folder, TeamFolder, or root location to move the
15178    /// Folder to. Can be in the format of: "" to move into the root User folder,
15179    /// `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*`
15180    pub destination_containing_folder: std::option::Option<std::string::String>,
15181
15182    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15183}
15184
15185impl MoveFolderRequest {
15186    /// Creates a new default instance.
15187    pub fn new() -> Self {
15188        std::default::Default::default()
15189    }
15190
15191    /// Sets the value of [name][crate::model::MoveFolderRequest::name].
15192    ///
15193    /// # Example
15194    /// ```ignore,no_run
15195    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
15196    /// # let project_id = "project_id";
15197    /// # let location_id = "location_id";
15198    /// # let folder_id = "folder_id";
15199    /// let x = MoveFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15200    /// ```
15201    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15202        self.name = v.into();
15203        self
15204    }
15205
15206    /// Sets the value of [destination_containing_folder][crate::model::MoveFolderRequest::destination_containing_folder].
15207    ///
15208    /// # Example
15209    /// ```ignore,no_run
15210    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
15211    /// let x = MoveFolderRequest::new().set_destination_containing_folder("example");
15212    /// ```
15213    pub fn set_destination_containing_folder<T>(mut self, v: T) -> Self
15214    where
15215        T: std::convert::Into<std::string::String>,
15216    {
15217        self.destination_containing_folder = std::option::Option::Some(v.into());
15218        self
15219    }
15220
15221    /// Sets or clears the value of [destination_containing_folder][crate::model::MoveFolderRequest::destination_containing_folder].
15222    ///
15223    /// # Example
15224    /// ```ignore,no_run
15225    /// # use google_cloud_dataform_v1::model::MoveFolderRequest;
15226    /// let x = MoveFolderRequest::new().set_or_clear_destination_containing_folder(Some("example"));
15227    /// let x = MoveFolderRequest::new().set_or_clear_destination_containing_folder(None::<String>);
15228    /// ```
15229    pub fn set_or_clear_destination_containing_folder<T>(
15230        mut self,
15231        v: std::option::Option<T>,
15232    ) -> Self
15233    where
15234        T: std::convert::Into<std::string::String>,
15235    {
15236        self.destination_containing_folder = v.map(|x| x.into());
15237        self
15238    }
15239}
15240
15241impl wkt::message::Message for MoveFolderRequest {
15242    fn typename() -> &'static str {
15243        "type.googleapis.com/google.cloud.dataform.v1.MoveFolderRequest"
15244    }
15245}
15246
15247/// `GetFolder` request message.
15248#[derive(Clone, Default, PartialEq)]
15249#[non_exhaustive]
15250pub struct GetFolderRequest {
15251    /// Required. The Folder's name.
15252    pub name: std::string::String,
15253
15254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15255}
15256
15257impl GetFolderRequest {
15258    /// Creates a new default instance.
15259    pub fn new() -> Self {
15260        std::default::Default::default()
15261    }
15262
15263    /// Sets the value of [name][crate::model::GetFolderRequest::name].
15264    ///
15265    /// # Example
15266    /// ```ignore,no_run
15267    /// # use google_cloud_dataform_v1::model::GetFolderRequest;
15268    /// # let project_id = "project_id";
15269    /// # let location_id = "location_id";
15270    /// # let folder_id = "folder_id";
15271    /// let x = GetFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15272    /// ```
15273    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15274        self.name = v.into();
15275        self
15276    }
15277}
15278
15279impl wkt::message::Message for GetFolderRequest {
15280    fn typename() -> &'static str {
15281        "type.googleapis.com/google.cloud.dataform.v1.GetFolderRequest"
15282    }
15283}
15284
15285/// `UpdateFolder` request message.
15286#[derive(Clone, Default, PartialEq)]
15287#[non_exhaustive]
15288pub struct UpdateFolderRequest {
15289    /// Optional. Specifies the fields to be updated in the Folder. If left unset,
15290    /// all fields that can be updated, will be updated. A few fields cannot be
15291    /// updated and will be ignored if specified in the update_mask (e.g.
15292    /// parent_name, team_folder_name).
15293    pub update_mask: std::option::Option<wkt::FieldMask>,
15294
15295    /// Required. The updated Folder.
15296    pub folder: std::option::Option<crate::model::Folder>,
15297
15298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15299}
15300
15301impl UpdateFolderRequest {
15302    /// Creates a new default instance.
15303    pub fn new() -> Self {
15304        std::default::Default::default()
15305    }
15306
15307    /// Sets the value of [update_mask][crate::model::UpdateFolderRequest::update_mask].
15308    ///
15309    /// # Example
15310    /// ```ignore,no_run
15311    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15312    /// use wkt::FieldMask;
15313    /// let x = UpdateFolderRequest::new().set_update_mask(FieldMask::default()/* use setters */);
15314    /// ```
15315    pub fn set_update_mask<T>(mut self, v: T) -> Self
15316    where
15317        T: std::convert::Into<wkt::FieldMask>,
15318    {
15319        self.update_mask = std::option::Option::Some(v.into());
15320        self
15321    }
15322
15323    /// Sets or clears the value of [update_mask][crate::model::UpdateFolderRequest::update_mask].
15324    ///
15325    /// # Example
15326    /// ```ignore,no_run
15327    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15328    /// use wkt::FieldMask;
15329    /// let x = UpdateFolderRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
15330    /// let x = UpdateFolderRequest::new().set_or_clear_update_mask(None::<FieldMask>);
15331    /// ```
15332    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15333    where
15334        T: std::convert::Into<wkt::FieldMask>,
15335    {
15336        self.update_mask = v.map(|x| x.into());
15337        self
15338    }
15339
15340    /// Sets the value of [folder][crate::model::UpdateFolderRequest::folder].
15341    ///
15342    /// # Example
15343    /// ```ignore,no_run
15344    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15345    /// use google_cloud_dataform_v1::model::Folder;
15346    /// let x = UpdateFolderRequest::new().set_folder(Folder::default()/* use setters */);
15347    /// ```
15348    pub fn set_folder<T>(mut self, v: T) -> Self
15349    where
15350        T: std::convert::Into<crate::model::Folder>,
15351    {
15352        self.folder = std::option::Option::Some(v.into());
15353        self
15354    }
15355
15356    /// Sets or clears the value of [folder][crate::model::UpdateFolderRequest::folder].
15357    ///
15358    /// # Example
15359    /// ```ignore,no_run
15360    /// # use google_cloud_dataform_v1::model::UpdateFolderRequest;
15361    /// use google_cloud_dataform_v1::model::Folder;
15362    /// let x = UpdateFolderRequest::new().set_or_clear_folder(Some(Folder::default()/* use setters */));
15363    /// let x = UpdateFolderRequest::new().set_or_clear_folder(None::<Folder>);
15364    /// ```
15365    pub fn set_or_clear_folder<T>(mut self, v: std::option::Option<T>) -> Self
15366    where
15367        T: std::convert::Into<crate::model::Folder>,
15368    {
15369        self.folder = v.map(|x| x.into());
15370        self
15371    }
15372}
15373
15374impl wkt::message::Message for UpdateFolderRequest {
15375    fn typename() -> &'static str {
15376        "type.googleapis.com/google.cloud.dataform.v1.UpdateFolderRequest"
15377    }
15378}
15379
15380/// `DeleteFolder` request message.
15381#[derive(Clone, Default, PartialEq)]
15382#[non_exhaustive]
15383pub struct DeleteFolderRequest {
15384    /// Required. The Folder's name.
15385    pub name: std::string::String,
15386
15387    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15388}
15389
15390impl DeleteFolderRequest {
15391    /// Creates a new default instance.
15392    pub fn new() -> Self {
15393        std::default::Default::default()
15394    }
15395
15396    /// Sets the value of [name][crate::model::DeleteFolderRequest::name].
15397    ///
15398    /// # Example
15399    /// ```ignore,no_run
15400    /// # use google_cloud_dataform_v1::model::DeleteFolderRequest;
15401    /// # let project_id = "project_id";
15402    /// # let location_id = "location_id";
15403    /// # let folder_id = "folder_id";
15404    /// let x = DeleteFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15405    /// ```
15406    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15407        self.name = v.into();
15408        self
15409    }
15410}
15411
15412impl wkt::message::Message for DeleteFolderRequest {
15413    fn typename() -> &'static str {
15414        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderRequest"
15415    }
15416}
15417
15418/// `DeleteFolderTree` request message.
15419#[derive(Clone, Default, PartialEq)]
15420#[non_exhaustive]
15421pub struct DeleteFolderTreeRequest {
15422    /// Required. The Folder's name.
15423    /// Format: projects/{project}/locations/{location}/folders/{folder}
15424    pub name: std::string::String,
15425
15426    /// Optional. If `false` (default): The operation will fail if any
15427    /// Repository within the folder hierarchy has associated Release Configs or
15428    /// Workflow Configs.
15429    ///
15430    /// If `true`: The operation will attempt to delete everything, including any
15431    /// Release Configs and Workflow Configs linked to Repositories within the
15432    /// folder hierarchy. This permanently removes schedules and resources.
15433    pub force: bool,
15434
15435    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15436}
15437
15438impl DeleteFolderTreeRequest {
15439    /// Creates a new default instance.
15440    pub fn new() -> Self {
15441        std::default::Default::default()
15442    }
15443
15444    /// Sets the value of [name][crate::model::DeleteFolderTreeRequest::name].
15445    ///
15446    /// # Example
15447    /// ```ignore,no_run
15448    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeRequest;
15449    /// # let project_id = "project_id";
15450    /// # let location_id = "location_id";
15451    /// # let folder_id = "folder_id";
15452    /// let x = DeleteFolderTreeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15453    /// ```
15454    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15455        self.name = v.into();
15456        self
15457    }
15458
15459    /// Sets the value of [force][crate::model::DeleteFolderTreeRequest::force].
15460    ///
15461    /// # Example
15462    /// ```ignore,no_run
15463    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeRequest;
15464    /// let x = DeleteFolderTreeRequest::new().set_force(true);
15465    /// ```
15466    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15467        self.force = v.into();
15468        self
15469    }
15470}
15471
15472impl wkt::message::Message for DeleteFolderTreeRequest {
15473    fn typename() -> &'static str {
15474        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderTreeRequest"
15475    }
15476}
15477
15478/// `DeleteTeamFolderTree` request message.
15479#[derive(Clone, Default, PartialEq)]
15480#[non_exhaustive]
15481pub struct DeleteTeamFolderTreeRequest {
15482    /// Required. The TeamFolder's name.
15483    /// Format: projects/{project}/locations/{location}/teamFolders/{team_folder}
15484    pub name: std::string::String,
15485
15486    /// Optional. If `false` (default): The operation will fail if any
15487    /// Repository within the folder hierarchy has associated Release Configs or
15488    /// Workflow Configs.
15489    ///
15490    /// If `true`: The operation will attempt to delete everything, including any
15491    /// Release Configs and Workflow Configs linked to Repositories within the
15492    /// folder hierarchy. This permanently removes schedules and resources.
15493    pub force: bool,
15494
15495    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15496}
15497
15498impl DeleteTeamFolderTreeRequest {
15499    /// Creates a new default instance.
15500    pub fn new() -> Self {
15501        std::default::Default::default()
15502    }
15503
15504    /// Sets the value of [name][crate::model::DeleteTeamFolderTreeRequest::name].
15505    ///
15506    /// # Example
15507    /// ```ignore,no_run
15508    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderTreeRequest;
15509    /// # let project_id = "project_id";
15510    /// # let location_id = "location_id";
15511    /// # let team_folder_id = "team_folder_id";
15512    /// let x = DeleteTeamFolderTreeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
15513    /// ```
15514    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15515        self.name = v.into();
15516        self
15517    }
15518
15519    /// Sets the value of [force][crate::model::DeleteTeamFolderTreeRequest::force].
15520    ///
15521    /// # Example
15522    /// ```ignore,no_run
15523    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderTreeRequest;
15524    /// let x = DeleteTeamFolderTreeRequest::new().set_force(true);
15525    /// ```
15526    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15527        self.force = v.into();
15528        self
15529    }
15530}
15531
15532impl wkt::message::Message for DeleteTeamFolderTreeRequest {
15533    fn typename() -> &'static str {
15534        "type.googleapis.com/google.cloud.dataform.v1.DeleteTeamFolderTreeRequest"
15535    }
15536}
15537
15538/// Contains metadata about the progress of the DeleteFolderTree Long-running
15539/// operations.
15540#[derive(Clone, Default, PartialEq)]
15541#[non_exhaustive]
15542pub struct DeleteFolderTreeMetadata {
15543    /// Output only. The time the operation was created.
15544    pub create_time: std::option::Option<wkt::Timestamp>,
15545
15546    /// Output only. The time the operation finished running.
15547    pub end_time: std::option::Option<wkt::Timestamp>,
15548
15549    /// Output only. Resource name of the target of the operation.
15550    /// Format: projects/{project}/locations/{location}/folders/{folder} or
15551    /// projects/{project}/locations/{location}/teamFolders/{team_folder}
15552    pub target: std::string::String,
15553
15554    /// Output only. The state of the operation.
15555    pub state: crate::model::delete_folder_tree_metadata::State,
15556
15557    /// Output only. Percent complete of the operation [0, 100].
15558    pub percent_complete: i32,
15559
15560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15561}
15562
15563impl DeleteFolderTreeMetadata {
15564    /// Creates a new default instance.
15565    pub fn new() -> Self {
15566        std::default::Default::default()
15567    }
15568
15569    /// Sets the value of [create_time][crate::model::DeleteFolderTreeMetadata::create_time].
15570    ///
15571    /// # Example
15572    /// ```ignore,no_run
15573    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15574    /// use wkt::Timestamp;
15575    /// let x = DeleteFolderTreeMetadata::new().set_create_time(Timestamp::default()/* use setters */);
15576    /// ```
15577    pub fn set_create_time<T>(mut self, v: T) -> Self
15578    where
15579        T: std::convert::Into<wkt::Timestamp>,
15580    {
15581        self.create_time = std::option::Option::Some(v.into());
15582        self
15583    }
15584
15585    /// Sets or clears the value of [create_time][crate::model::DeleteFolderTreeMetadata::create_time].
15586    ///
15587    /// # Example
15588    /// ```ignore,no_run
15589    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15590    /// use wkt::Timestamp;
15591    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
15592    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_create_time(None::<Timestamp>);
15593    /// ```
15594    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15595    where
15596        T: std::convert::Into<wkt::Timestamp>,
15597    {
15598        self.create_time = v.map(|x| x.into());
15599        self
15600    }
15601
15602    /// Sets the value of [end_time][crate::model::DeleteFolderTreeMetadata::end_time].
15603    ///
15604    /// # Example
15605    /// ```ignore,no_run
15606    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15607    /// use wkt::Timestamp;
15608    /// let x = DeleteFolderTreeMetadata::new().set_end_time(Timestamp::default()/* use setters */);
15609    /// ```
15610    pub fn set_end_time<T>(mut self, v: T) -> Self
15611    where
15612        T: std::convert::Into<wkt::Timestamp>,
15613    {
15614        self.end_time = std::option::Option::Some(v.into());
15615        self
15616    }
15617
15618    /// Sets or clears the value of [end_time][crate::model::DeleteFolderTreeMetadata::end_time].
15619    ///
15620    /// # Example
15621    /// ```ignore,no_run
15622    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15623    /// use wkt::Timestamp;
15624    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15625    /// let x = DeleteFolderTreeMetadata::new().set_or_clear_end_time(None::<Timestamp>);
15626    /// ```
15627    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15628    where
15629        T: std::convert::Into<wkt::Timestamp>,
15630    {
15631        self.end_time = v.map(|x| x.into());
15632        self
15633    }
15634
15635    /// Sets the value of [target][crate::model::DeleteFolderTreeMetadata::target].
15636    ///
15637    /// # Example
15638    /// ```ignore,no_run
15639    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15640    /// let x = DeleteFolderTreeMetadata::new().set_target("example");
15641    /// ```
15642    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15643        self.target = v.into();
15644        self
15645    }
15646
15647    /// Sets the value of [state][crate::model::DeleteFolderTreeMetadata::state].
15648    ///
15649    /// # Example
15650    /// ```ignore,no_run
15651    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15652    /// use google_cloud_dataform_v1::model::delete_folder_tree_metadata::State;
15653    /// let x0 = DeleteFolderTreeMetadata::new().set_state(State::Initialized);
15654    /// let x1 = DeleteFolderTreeMetadata::new().set_state(State::InProgress);
15655    /// let x2 = DeleteFolderTreeMetadata::new().set_state(State::Succeeded);
15656    /// ```
15657    pub fn set_state<T: std::convert::Into<crate::model::delete_folder_tree_metadata::State>>(
15658        mut self,
15659        v: T,
15660    ) -> Self {
15661        self.state = v.into();
15662        self
15663    }
15664
15665    /// Sets the value of [percent_complete][crate::model::DeleteFolderTreeMetadata::percent_complete].
15666    ///
15667    /// # Example
15668    /// ```ignore,no_run
15669    /// # use google_cloud_dataform_v1::model::DeleteFolderTreeMetadata;
15670    /// let x = DeleteFolderTreeMetadata::new().set_percent_complete(42);
15671    /// ```
15672    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15673        self.percent_complete = v.into();
15674        self
15675    }
15676}
15677
15678impl wkt::message::Message for DeleteFolderTreeMetadata {
15679    fn typename() -> &'static str {
15680        "type.googleapis.com/google.cloud.dataform.v1.DeleteFolderTreeMetadata"
15681    }
15682}
15683
15684/// Defines additional types related to [DeleteFolderTreeMetadata].
15685pub mod delete_folder_tree_metadata {
15686    #[allow(unused_imports)]
15687    use super::*;
15688
15689    /// Different states of the DeleteFolderTree operation.
15690    ///
15691    /// # Working with unknown values
15692    ///
15693    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15694    /// additional enum variants at any time. Adding new variants is not considered
15695    /// a breaking change. Applications should write their code in anticipation of:
15696    ///
15697    /// - New values appearing in future releases of the client library, **and**
15698    /// - New values received dynamically, without application changes.
15699    ///
15700    /// Please consult the [Working with enums] section in the user guide for some
15701    /// guidelines.
15702    ///
15703    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15704    #[derive(Clone, Debug, PartialEq)]
15705    #[non_exhaustive]
15706    pub enum State {
15707        /// The state is unspecified.
15708        Unspecified,
15709        /// The operation was initialized and recorded by the server, but not yet
15710        /// started.
15711        Initialized,
15712        /// The operation is in progress.
15713        InProgress,
15714        /// The operation has completed successfully.
15715        Succeeded,
15716        /// The operation has failed.
15717        Failed,
15718        /// If set, the enum was initialized with an unknown value.
15719        ///
15720        /// Applications can examine the value using [State::value] or
15721        /// [State::name].
15722        UnknownValue(state::UnknownValue),
15723    }
15724
15725    #[doc(hidden)]
15726    pub mod state {
15727        #[allow(unused_imports)]
15728        use super::*;
15729        #[derive(Clone, Debug, PartialEq)]
15730        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15731    }
15732
15733    impl State {
15734        /// Gets the enum value.
15735        ///
15736        /// Returns `None` if the enum contains an unknown value deserialized from
15737        /// the string representation of enums.
15738        pub fn value(&self) -> std::option::Option<i32> {
15739            match self {
15740                Self::Unspecified => std::option::Option::Some(0),
15741                Self::Initialized => std::option::Option::Some(1),
15742                Self::InProgress => std::option::Option::Some(2),
15743                Self::Succeeded => std::option::Option::Some(3),
15744                Self::Failed => std::option::Option::Some(4),
15745                Self::UnknownValue(u) => u.0.value(),
15746            }
15747        }
15748
15749        /// Gets the enum value as a string.
15750        ///
15751        /// Returns `None` if the enum contains an unknown value deserialized from
15752        /// the integer representation of enums.
15753        pub fn name(&self) -> std::option::Option<&str> {
15754            match self {
15755                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15756                Self::Initialized => std::option::Option::Some("INITIALIZED"),
15757                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
15758                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
15759                Self::Failed => std::option::Option::Some("FAILED"),
15760                Self::UnknownValue(u) => u.0.name(),
15761            }
15762        }
15763    }
15764
15765    impl std::default::Default for State {
15766        fn default() -> Self {
15767            use std::convert::From;
15768            Self::from(0)
15769        }
15770    }
15771
15772    impl std::fmt::Display for State {
15773        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15774            wkt::internal::display_enum(f, self.name(), self.value())
15775        }
15776    }
15777
15778    impl std::convert::From<i32> for State {
15779        fn from(value: i32) -> Self {
15780            match value {
15781                0 => Self::Unspecified,
15782                1 => Self::Initialized,
15783                2 => Self::InProgress,
15784                3 => Self::Succeeded,
15785                4 => Self::Failed,
15786                _ => Self::UnknownValue(state::UnknownValue(
15787                    wkt::internal::UnknownEnumValue::Integer(value),
15788                )),
15789            }
15790        }
15791    }
15792
15793    impl std::convert::From<&str> for State {
15794        fn from(value: &str) -> Self {
15795            use std::string::ToString;
15796            match value {
15797                "STATE_UNSPECIFIED" => Self::Unspecified,
15798                "INITIALIZED" => Self::Initialized,
15799                "IN_PROGRESS" => Self::InProgress,
15800                "SUCCEEDED" => Self::Succeeded,
15801                "FAILED" => Self::Failed,
15802                _ => Self::UnknownValue(state::UnknownValue(
15803                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15804                )),
15805            }
15806        }
15807    }
15808
15809    impl serde::ser::Serialize for State {
15810        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15811        where
15812            S: serde::Serializer,
15813        {
15814            match self {
15815                Self::Unspecified => serializer.serialize_i32(0),
15816                Self::Initialized => serializer.serialize_i32(1),
15817                Self::InProgress => serializer.serialize_i32(2),
15818                Self::Succeeded => serializer.serialize_i32(3),
15819                Self::Failed => serializer.serialize_i32(4),
15820                Self::UnknownValue(u) => u.0.serialize(serializer),
15821            }
15822        }
15823    }
15824
15825    impl<'de> serde::de::Deserialize<'de> for State {
15826        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15827        where
15828            D: serde::Deserializer<'de>,
15829        {
15830            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15831                ".google.cloud.dataform.v1.DeleteFolderTreeMetadata.State",
15832            ))
15833        }
15834    }
15835}
15836
15837/// `QueryFolderContents` request message.
15838#[derive(Clone, Default, PartialEq)]
15839#[non_exhaustive]
15840pub struct QueryFolderContentsRequest {
15841    /// Required. Resource name of the Folder to list contents for.
15842    /// Format: projects/*/locations/*/folders/*
15843    pub folder: std::string::String,
15844
15845    /// Optional. Maximum number of paths to return. The server may return fewer
15846    /// items than requested. If unspecified, the server will pick an appropriate
15847    /// default.
15848    pub page_size: i32,
15849
15850    /// Optional. Page token received from a previous `QueryFolderContents` call.
15851    /// Provide this to retrieve the subsequent page.
15852    ///
15853    /// When paginating, all other parameters provided to
15854    /// `QueryFolderContents`, with the exception of `page_size`, must match the
15855    /// call that provided the page token.
15856    pub page_token: std::string::String,
15857
15858    /// Optional. Field to additionally sort results by.
15859    /// Will order Folders before Repositories, and then by `order_by` in ascending
15860    /// order. Supported keywords: display_name (default), create_time,
15861    /// last_modified_time.
15862    /// Examples:
15863    ///
15864    /// * `orderBy="display_name"`
15865    /// * `orderBy="display_name desc"`
15866    pub order_by: std::string::String,
15867
15868    /// Optional. Optional filtering for the returned list. Filtering is currently
15869    /// only supported on the `display_name` field.
15870    ///
15871    /// Example:
15872    ///
15873    /// * `filter="display_name="MyFolder""`
15874    pub filter: std::string::String,
15875
15876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15877}
15878
15879impl QueryFolderContentsRequest {
15880    /// Creates a new default instance.
15881    pub fn new() -> Self {
15882        std::default::Default::default()
15883    }
15884
15885    /// Sets the value of [folder][crate::model::QueryFolderContentsRequest::folder].
15886    ///
15887    /// # Example
15888    /// ```ignore,no_run
15889    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15890    /// # let project_id = "project_id";
15891    /// # let location_id = "location_id";
15892    /// # let folder_id = "folder_id";
15893    /// let x = QueryFolderContentsRequest::new().set_folder(format!("projects/{project_id}/locations/{location_id}/folders/{folder_id}"));
15894    /// ```
15895    pub fn set_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15896        self.folder = v.into();
15897        self
15898    }
15899
15900    /// Sets the value of [page_size][crate::model::QueryFolderContentsRequest::page_size].
15901    ///
15902    /// # Example
15903    /// ```ignore,no_run
15904    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15905    /// let x = QueryFolderContentsRequest::new().set_page_size(42);
15906    /// ```
15907    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15908        self.page_size = v.into();
15909        self
15910    }
15911
15912    /// Sets the value of [page_token][crate::model::QueryFolderContentsRequest::page_token].
15913    ///
15914    /// # Example
15915    /// ```ignore,no_run
15916    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15917    /// let x = QueryFolderContentsRequest::new().set_page_token("example");
15918    /// ```
15919    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15920        self.page_token = v.into();
15921        self
15922    }
15923
15924    /// Sets the value of [order_by][crate::model::QueryFolderContentsRequest::order_by].
15925    ///
15926    /// # Example
15927    /// ```ignore,no_run
15928    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15929    /// let x = QueryFolderContentsRequest::new().set_order_by("example");
15930    /// ```
15931    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15932        self.order_by = v.into();
15933        self
15934    }
15935
15936    /// Sets the value of [filter][crate::model::QueryFolderContentsRequest::filter].
15937    ///
15938    /// # Example
15939    /// ```ignore,no_run
15940    /// # use google_cloud_dataform_v1::model::QueryFolderContentsRequest;
15941    /// let x = QueryFolderContentsRequest::new().set_filter("example");
15942    /// ```
15943    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15944        self.filter = v.into();
15945        self
15946    }
15947}
15948
15949impl wkt::message::Message for QueryFolderContentsRequest {
15950    fn typename() -> &'static str {
15951        "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsRequest"
15952    }
15953}
15954
15955/// `QueryFolderContents` response message.
15956#[derive(Clone, Default, PartialEq)]
15957#[non_exhaustive]
15958pub struct QueryFolderContentsResponse {
15959    /// List of entries in the folder.
15960    pub entries: std::vec::Vec<crate::model::query_folder_contents_response::FolderContentsEntry>,
15961
15962    /// A token, which can be sent as `page_token` to retrieve the next page.
15963    /// If this field is omitted, there are no subsequent pages.
15964    pub next_page_token: std::string::String,
15965
15966    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15967}
15968
15969impl QueryFolderContentsResponse {
15970    /// Creates a new default instance.
15971    pub fn new() -> Self {
15972        std::default::Default::default()
15973    }
15974
15975    /// Sets the value of [entries][crate::model::QueryFolderContentsResponse::entries].
15976    ///
15977    /// # Example
15978    /// ```ignore,no_run
15979    /// # use google_cloud_dataform_v1::model::QueryFolderContentsResponse;
15980    /// use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
15981    /// let x = QueryFolderContentsResponse::new()
15982    ///     .set_entries([
15983    ///         FolderContentsEntry::default()/* use setters */,
15984    ///         FolderContentsEntry::default()/* use (different) setters */,
15985    ///     ]);
15986    /// ```
15987    pub fn set_entries<T, V>(mut self, v: T) -> Self
15988    where
15989        T: std::iter::IntoIterator<Item = V>,
15990        V: std::convert::Into<crate::model::query_folder_contents_response::FolderContentsEntry>,
15991    {
15992        use std::iter::Iterator;
15993        self.entries = v.into_iter().map(|i| i.into()).collect();
15994        self
15995    }
15996
15997    /// Sets the value of [next_page_token][crate::model::QueryFolderContentsResponse::next_page_token].
15998    ///
15999    /// # Example
16000    /// ```ignore,no_run
16001    /// # use google_cloud_dataform_v1::model::QueryFolderContentsResponse;
16002    /// let x = QueryFolderContentsResponse::new().set_next_page_token("example");
16003    /// ```
16004    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16005        self.next_page_token = v.into();
16006        self
16007    }
16008}
16009
16010impl wkt::message::Message for QueryFolderContentsResponse {
16011    fn typename() -> &'static str {
16012        "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsResponse"
16013    }
16014}
16015
16016#[doc(hidden)]
16017impl google_cloud_gax::paginator::internal::PageableResponse for QueryFolderContentsResponse {
16018    type PageItem = crate::model::query_folder_contents_response::FolderContentsEntry;
16019
16020    fn items(self) -> std::vec::Vec<Self::PageItem> {
16021        self.entries
16022    }
16023
16024    fn next_page_token(&self) -> std::string::String {
16025        use std::clone::Clone;
16026        self.next_page_token.clone()
16027    }
16028}
16029
16030/// Defines additional types related to [QueryFolderContentsResponse].
16031pub mod query_folder_contents_response {
16032    #[allow(unused_imports)]
16033    use super::*;
16034
16035    /// Represents a single content entry.
16036    #[derive(Clone, Default, PartialEq)]
16037    #[non_exhaustive]
16038    pub struct FolderContentsEntry {
16039        /// The content entry.
16040        pub entry: std::option::Option<
16041            crate::model::query_folder_contents_response::folder_contents_entry::Entry,
16042        >,
16043
16044        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16045    }
16046
16047    impl FolderContentsEntry {
16048        /// Creates a new default instance.
16049        pub fn new() -> Self {
16050            std::default::Default::default()
16051        }
16052
16053        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry].
16054        ///
16055        /// Note that all the setters affecting `entry` are mutually
16056        /// exclusive.
16057        ///
16058        /// # Example
16059        /// ```ignore,no_run
16060        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
16061        /// use google_cloud_dataform_v1::model::Folder;
16062        /// let x = FolderContentsEntry::new().set_entry(Some(
16063        ///     google_cloud_dataform_v1::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(Folder::default().into())));
16064        /// ```
16065        pub fn set_entry<
16066            T: std::convert::Into<
16067                    std::option::Option<
16068                        crate::model::query_folder_contents_response::folder_contents_entry::Entry,
16069                    >,
16070                >,
16071        >(
16072            mut self,
16073            v: T,
16074        ) -> Self {
16075            self.entry = v.into();
16076            self
16077        }
16078
16079        /// The value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16080        /// if it holds a `Folder`, `None` if the field is not set or
16081        /// holds a different branch.
16082        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
16083            #[allow(unreachable_patterns)]
16084            self.entry.as_ref().and_then(|v| match v {
16085                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
16086                _ => std::option::Option::None,
16087            })
16088        }
16089
16090        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16091        /// to hold a `Folder`.
16092        ///
16093        /// Note that all the setters affecting `entry` are
16094        /// mutually exclusive.
16095        ///
16096        /// # Example
16097        /// ```ignore,no_run
16098        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
16099        /// use google_cloud_dataform_v1::model::Folder;
16100        /// let x = FolderContentsEntry::new().set_folder(Folder::default()/* use setters */);
16101        /// assert!(x.folder().is_some());
16102        /// assert!(x.repository().is_none());
16103        /// ```
16104        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
16105            mut self,
16106            v: T,
16107        ) -> Self {
16108            self.entry = std::option::Option::Some(
16109                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Folder(
16110                    v.into(),
16111                ),
16112            );
16113            self
16114        }
16115
16116        /// The value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16117        /// if it holds a `Repository`, `None` if the field is not set or
16118        /// holds a different branch.
16119        pub fn repository(
16120            &self,
16121        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
16122            #[allow(unreachable_patterns)]
16123            self.entry.as_ref().and_then(|v| match v {
16124                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
16125                _ => std::option::Option::None,
16126            })
16127        }
16128
16129        /// Sets the value of [entry][crate::model::query_folder_contents_response::FolderContentsEntry::entry]
16130        /// to hold a `Repository`.
16131        ///
16132        /// Note that all the setters affecting `entry` are
16133        /// mutually exclusive.
16134        ///
16135        /// # Example
16136        /// ```ignore,no_run
16137        /// # use google_cloud_dataform_v1::model::query_folder_contents_response::FolderContentsEntry;
16138        /// use google_cloud_dataform_v1::model::Repository;
16139        /// let x = FolderContentsEntry::new().set_repository(Repository::default()/* use setters */);
16140        /// assert!(x.repository().is_some());
16141        /// assert!(x.folder().is_none());
16142        /// ```
16143        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
16144            mut self,
16145            v: T,
16146        ) -> Self {
16147            self.entry = std::option::Option::Some(
16148                crate::model::query_folder_contents_response::folder_contents_entry::Entry::Repository(
16149                    v.into()
16150                )
16151            );
16152            self
16153        }
16154    }
16155
16156    impl wkt::message::Message for FolderContentsEntry {
16157        fn typename() -> &'static str {
16158            "type.googleapis.com/google.cloud.dataform.v1.QueryFolderContentsResponse.FolderContentsEntry"
16159        }
16160    }
16161
16162    /// Defines additional types related to [FolderContentsEntry].
16163    pub mod folder_contents_entry {
16164        #[allow(unused_imports)]
16165        use super::*;
16166
16167        /// The content entry.
16168        #[derive(Clone, Debug, PartialEq)]
16169        #[non_exhaustive]
16170        pub enum Entry {
16171            /// A subfolder.
16172            Folder(std::boxed::Box<crate::model::Folder>),
16173            /// A repository.
16174            Repository(std::boxed::Box<crate::model::Repository>),
16175        }
16176    }
16177}
16178
16179/// `QueryUserRootContents` request message.
16180#[derive(Clone, Default, PartialEq)]
16181#[non_exhaustive]
16182pub struct QueryUserRootContentsRequest {
16183    /// Required. Location of the user root folder to list contents for.
16184    /// Format: projects/*/locations/*
16185    pub location: std::string::String,
16186
16187    /// Optional. Maximum number of paths to return. The server may return fewer
16188    /// items than requested. If unspecified, the server will pick an appropriate
16189    /// default.
16190    pub page_size: i32,
16191
16192    /// Optional. Page token received from a previous `QueryUserRootContents` call.
16193    /// Provide this to retrieve the subsequent page.
16194    ///
16195    /// When paginating, all other parameters provided to
16196    /// `QueryUserRootFolderContents`, with the exception of `page_size`, must
16197    /// match the call that provided the page token.
16198    pub page_token: std::string::String,
16199
16200    /// Optional. Field to additionally sort results by.
16201    /// Will order Folders before Repositories, and then by `order_by` in ascending
16202    /// order. Supported keywords: display_name (default), created_at,
16203    /// last_modified_at. Examples:
16204    ///
16205    /// * `orderBy="display_name"`
16206    /// * `orderBy="display_name desc"`
16207    pub order_by: std::string::String,
16208
16209    /// Optional. Optional filtering for the returned list. Filtering is currently
16210    /// only supported on the `display_name` field.
16211    ///
16212    /// Example:
16213    ///
16214    /// * `filter="display_name="MyFolder""`
16215    pub filter: std::string::String,
16216
16217    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16218}
16219
16220impl QueryUserRootContentsRequest {
16221    /// Creates a new default instance.
16222    pub fn new() -> Self {
16223        std::default::Default::default()
16224    }
16225
16226    /// Sets the value of [location][crate::model::QueryUserRootContentsRequest::location].
16227    ///
16228    /// # Example
16229    /// ```ignore,no_run
16230    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16231    /// let x = QueryUserRootContentsRequest::new().set_location("example");
16232    /// ```
16233    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16234        self.location = v.into();
16235        self
16236    }
16237
16238    /// Sets the value of [page_size][crate::model::QueryUserRootContentsRequest::page_size].
16239    ///
16240    /// # Example
16241    /// ```ignore,no_run
16242    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16243    /// let x = QueryUserRootContentsRequest::new().set_page_size(42);
16244    /// ```
16245    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
16246        self.page_size = v.into();
16247        self
16248    }
16249
16250    /// Sets the value of [page_token][crate::model::QueryUserRootContentsRequest::page_token].
16251    ///
16252    /// # Example
16253    /// ```ignore,no_run
16254    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16255    /// let x = QueryUserRootContentsRequest::new().set_page_token("example");
16256    /// ```
16257    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16258        self.page_token = v.into();
16259        self
16260    }
16261
16262    /// Sets the value of [order_by][crate::model::QueryUserRootContentsRequest::order_by].
16263    ///
16264    /// # Example
16265    /// ```ignore,no_run
16266    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16267    /// let x = QueryUserRootContentsRequest::new().set_order_by("example");
16268    /// ```
16269    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16270        self.order_by = v.into();
16271        self
16272    }
16273
16274    /// Sets the value of [filter][crate::model::QueryUserRootContentsRequest::filter].
16275    ///
16276    /// # Example
16277    /// ```ignore,no_run
16278    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsRequest;
16279    /// let x = QueryUserRootContentsRequest::new().set_filter("example");
16280    /// ```
16281    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16282        self.filter = v.into();
16283        self
16284    }
16285}
16286
16287impl wkt::message::Message for QueryUserRootContentsRequest {
16288    fn typename() -> &'static str {
16289        "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsRequest"
16290    }
16291}
16292
16293/// `QueryUserRootContents` response message.
16294#[derive(Clone, Default, PartialEq)]
16295#[non_exhaustive]
16296pub struct QueryUserRootContentsResponse {
16297    /// List of entries in the folder.
16298    pub entries: std::vec::Vec<crate::model::query_user_root_contents_response::RootContentsEntry>,
16299
16300    /// A token, which can be sent as `page_token` to retrieve the next page.
16301    /// If this field is omitted, there are no subsequent pages.
16302    pub next_page_token: std::string::String,
16303
16304    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16305}
16306
16307impl QueryUserRootContentsResponse {
16308    /// Creates a new default instance.
16309    pub fn new() -> Self {
16310        std::default::Default::default()
16311    }
16312
16313    /// Sets the value of [entries][crate::model::QueryUserRootContentsResponse::entries].
16314    ///
16315    /// # Example
16316    /// ```ignore,no_run
16317    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsResponse;
16318    /// use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16319    /// let x = QueryUserRootContentsResponse::new()
16320    ///     .set_entries([
16321    ///         RootContentsEntry::default()/* use setters */,
16322    ///         RootContentsEntry::default()/* use (different) setters */,
16323    ///     ]);
16324    /// ```
16325    pub fn set_entries<T, V>(mut self, v: T) -> Self
16326    where
16327        T: std::iter::IntoIterator<Item = V>,
16328        V: std::convert::Into<crate::model::query_user_root_contents_response::RootContentsEntry>,
16329    {
16330        use std::iter::Iterator;
16331        self.entries = v.into_iter().map(|i| i.into()).collect();
16332        self
16333    }
16334
16335    /// Sets the value of [next_page_token][crate::model::QueryUserRootContentsResponse::next_page_token].
16336    ///
16337    /// # Example
16338    /// ```ignore,no_run
16339    /// # use google_cloud_dataform_v1::model::QueryUserRootContentsResponse;
16340    /// let x = QueryUserRootContentsResponse::new().set_next_page_token("example");
16341    /// ```
16342    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16343        self.next_page_token = v.into();
16344        self
16345    }
16346}
16347
16348impl wkt::message::Message for QueryUserRootContentsResponse {
16349    fn typename() -> &'static str {
16350        "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsResponse"
16351    }
16352}
16353
16354#[doc(hidden)]
16355impl google_cloud_gax::paginator::internal::PageableResponse for QueryUserRootContentsResponse {
16356    type PageItem = crate::model::query_user_root_contents_response::RootContentsEntry;
16357
16358    fn items(self) -> std::vec::Vec<Self::PageItem> {
16359        self.entries
16360    }
16361
16362    fn next_page_token(&self) -> std::string::String {
16363        use std::clone::Clone;
16364        self.next_page_token.clone()
16365    }
16366}
16367
16368/// Defines additional types related to [QueryUserRootContentsResponse].
16369pub mod query_user_root_contents_response {
16370    #[allow(unused_imports)]
16371    use super::*;
16372
16373    /// Represents a single content entry.
16374    #[derive(Clone, Default, PartialEq)]
16375    #[non_exhaustive]
16376    pub struct RootContentsEntry {
16377        /// The content entry.
16378        pub entry: std::option::Option<
16379            crate::model::query_user_root_contents_response::root_contents_entry::Entry,
16380        >,
16381
16382        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16383    }
16384
16385    impl RootContentsEntry {
16386        /// Creates a new default instance.
16387        pub fn new() -> Self {
16388            std::default::Default::default()
16389        }
16390
16391        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry].
16392        ///
16393        /// Note that all the setters affecting `entry` are mutually
16394        /// exclusive.
16395        ///
16396        /// # Example
16397        /// ```ignore,no_run
16398        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16399        /// use google_cloud_dataform_v1::model::Folder;
16400        /// let x = RootContentsEntry::new().set_entry(Some(
16401        ///     google_cloud_dataform_v1::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(Folder::default().into())));
16402        /// ```
16403        pub fn set_entry<
16404            T: std::convert::Into<
16405                    std::option::Option<
16406                        crate::model::query_user_root_contents_response::root_contents_entry::Entry,
16407                    >,
16408                >,
16409        >(
16410            mut self,
16411            v: T,
16412        ) -> Self {
16413            self.entry = v.into();
16414            self
16415        }
16416
16417        /// The value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16418        /// if it holds a `Folder`, `None` if the field is not set or
16419        /// holds a different branch.
16420        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
16421            #[allow(unreachable_patterns)]
16422            self.entry.as_ref().and_then(|v| match v {
16423                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
16424                _ => std::option::Option::None,
16425            })
16426        }
16427
16428        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16429        /// to hold a `Folder`.
16430        ///
16431        /// Note that all the setters affecting `entry` are
16432        /// mutually exclusive.
16433        ///
16434        /// # Example
16435        /// ```ignore,no_run
16436        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16437        /// use google_cloud_dataform_v1::model::Folder;
16438        /// let x = RootContentsEntry::new().set_folder(Folder::default()/* use setters */);
16439        /// assert!(x.folder().is_some());
16440        /// assert!(x.repository().is_none());
16441        /// ```
16442        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
16443            mut self,
16444            v: T,
16445        ) -> Self {
16446            self.entry = std::option::Option::Some(
16447                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Folder(
16448                    v.into(),
16449                ),
16450            );
16451            self
16452        }
16453
16454        /// The value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16455        /// if it holds a `Repository`, `None` if the field is not set or
16456        /// holds a different branch.
16457        pub fn repository(
16458            &self,
16459        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
16460            #[allow(unreachable_patterns)]
16461            self.entry.as_ref().and_then(|v| match v {
16462                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
16463                _ => std::option::Option::None,
16464            })
16465        }
16466
16467        /// Sets the value of [entry][crate::model::query_user_root_contents_response::RootContentsEntry::entry]
16468        /// to hold a `Repository`.
16469        ///
16470        /// Note that all the setters affecting `entry` are
16471        /// mutually exclusive.
16472        ///
16473        /// # Example
16474        /// ```ignore,no_run
16475        /// # use google_cloud_dataform_v1::model::query_user_root_contents_response::RootContentsEntry;
16476        /// use google_cloud_dataform_v1::model::Repository;
16477        /// let x = RootContentsEntry::new().set_repository(Repository::default()/* use setters */);
16478        /// assert!(x.repository().is_some());
16479        /// assert!(x.folder().is_none());
16480        /// ```
16481        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
16482            mut self,
16483            v: T,
16484        ) -> Self {
16485            self.entry = std::option::Option::Some(
16486                crate::model::query_user_root_contents_response::root_contents_entry::Entry::Repository(
16487                    v.into()
16488                )
16489            );
16490            self
16491        }
16492    }
16493
16494    impl wkt::message::Message for RootContentsEntry {
16495        fn typename() -> &'static str {
16496            "type.googleapis.com/google.cloud.dataform.v1.QueryUserRootContentsResponse.RootContentsEntry"
16497        }
16498    }
16499
16500    /// Defines additional types related to [RootContentsEntry].
16501    pub mod root_contents_entry {
16502        #[allow(unused_imports)]
16503        use super::*;
16504
16505        /// The content entry.
16506        #[derive(Clone, Debug, PartialEq)]
16507        #[non_exhaustive]
16508        pub enum Entry {
16509            /// A subfolder.
16510            Folder(std::boxed::Box<crate::model::Folder>),
16511            /// A repository.
16512            Repository(std::boxed::Box<crate::model::Repository>),
16513        }
16514    }
16515}
16516
16517/// Represents a Dataform TeamFolder. This is a resource that sits at the project
16518/// level and is used to organize Repositories and Folders with hierarchical
16519/// access controls. They provide a team context and stricter access controls.
16520#[derive(Clone, Default, PartialEq)]
16521#[non_exhaustive]
16522pub struct TeamFolder {
16523    /// Identifier. The TeamFolder's name.
16524    pub name: std::string::String,
16525
16526    /// Required. The TeamFolder's user-friendly name.
16527    pub display_name: std::string::String,
16528
16529    /// Output only. The timestamp of when the TeamFolder was created.
16530    pub create_time: std::option::Option<wkt::Timestamp>,
16531
16532    /// Output only. The timestamp of when the TeamFolder was last updated.
16533    pub update_time: std::option::Option<wkt::Timestamp>,
16534
16535    /// Output only. All the metadata information that is used internally to serve
16536    /// the resource. For example: timestamps, flags, status fields, etc. The
16537    /// format of this field is a JSON string.
16538    pub internal_metadata: std::option::Option<std::string::String>,
16539
16540    /// Output only. The IAM principal identifier of the creator of the TeamFolder.
16541    pub creator_iam_principal: std::option::Option<std::string::String>,
16542
16543    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16544}
16545
16546impl TeamFolder {
16547    /// Creates a new default instance.
16548    pub fn new() -> Self {
16549        std::default::Default::default()
16550    }
16551
16552    /// Sets the value of [name][crate::model::TeamFolder::name].
16553    ///
16554    /// # Example
16555    /// ```ignore,no_run
16556    /// # use google_cloud_dataform_v1::model::TeamFolder;
16557    /// # let project_id = "project_id";
16558    /// # let location_id = "location_id";
16559    /// # let team_folder_id = "team_folder_id";
16560    /// let x = TeamFolder::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
16561    /// ```
16562    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16563        self.name = v.into();
16564        self
16565    }
16566
16567    /// Sets the value of [display_name][crate::model::TeamFolder::display_name].
16568    ///
16569    /// # Example
16570    /// ```ignore,no_run
16571    /// # use google_cloud_dataform_v1::model::TeamFolder;
16572    /// let x = TeamFolder::new().set_display_name("example");
16573    /// ```
16574    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16575        self.display_name = v.into();
16576        self
16577    }
16578
16579    /// Sets the value of [create_time][crate::model::TeamFolder::create_time].
16580    ///
16581    /// # Example
16582    /// ```ignore,no_run
16583    /// # use google_cloud_dataform_v1::model::TeamFolder;
16584    /// use wkt::Timestamp;
16585    /// let x = TeamFolder::new().set_create_time(Timestamp::default()/* use setters */);
16586    /// ```
16587    pub fn set_create_time<T>(mut self, v: T) -> Self
16588    where
16589        T: std::convert::Into<wkt::Timestamp>,
16590    {
16591        self.create_time = std::option::Option::Some(v.into());
16592        self
16593    }
16594
16595    /// Sets or clears the value of [create_time][crate::model::TeamFolder::create_time].
16596    ///
16597    /// # Example
16598    /// ```ignore,no_run
16599    /// # use google_cloud_dataform_v1::model::TeamFolder;
16600    /// use wkt::Timestamp;
16601    /// let x = TeamFolder::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16602    /// let x = TeamFolder::new().set_or_clear_create_time(None::<Timestamp>);
16603    /// ```
16604    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16605    where
16606        T: std::convert::Into<wkt::Timestamp>,
16607    {
16608        self.create_time = v.map(|x| x.into());
16609        self
16610    }
16611
16612    /// Sets the value of [update_time][crate::model::TeamFolder::update_time].
16613    ///
16614    /// # Example
16615    /// ```ignore,no_run
16616    /// # use google_cloud_dataform_v1::model::TeamFolder;
16617    /// use wkt::Timestamp;
16618    /// let x = TeamFolder::new().set_update_time(Timestamp::default()/* use setters */);
16619    /// ```
16620    pub fn set_update_time<T>(mut self, v: T) -> Self
16621    where
16622        T: std::convert::Into<wkt::Timestamp>,
16623    {
16624        self.update_time = std::option::Option::Some(v.into());
16625        self
16626    }
16627
16628    /// Sets or clears the value of [update_time][crate::model::TeamFolder::update_time].
16629    ///
16630    /// # Example
16631    /// ```ignore,no_run
16632    /// # use google_cloud_dataform_v1::model::TeamFolder;
16633    /// use wkt::Timestamp;
16634    /// let x = TeamFolder::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16635    /// let x = TeamFolder::new().set_or_clear_update_time(None::<Timestamp>);
16636    /// ```
16637    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16638    where
16639        T: std::convert::Into<wkt::Timestamp>,
16640    {
16641        self.update_time = v.map(|x| x.into());
16642        self
16643    }
16644
16645    /// Sets the value of [internal_metadata][crate::model::TeamFolder::internal_metadata].
16646    ///
16647    /// # Example
16648    /// ```ignore,no_run
16649    /// # use google_cloud_dataform_v1::model::TeamFolder;
16650    /// let x = TeamFolder::new().set_internal_metadata("example");
16651    /// ```
16652    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
16653    where
16654        T: std::convert::Into<std::string::String>,
16655    {
16656        self.internal_metadata = std::option::Option::Some(v.into());
16657        self
16658    }
16659
16660    /// Sets or clears the value of [internal_metadata][crate::model::TeamFolder::internal_metadata].
16661    ///
16662    /// # Example
16663    /// ```ignore,no_run
16664    /// # use google_cloud_dataform_v1::model::TeamFolder;
16665    /// let x = TeamFolder::new().set_or_clear_internal_metadata(Some("example"));
16666    /// let x = TeamFolder::new().set_or_clear_internal_metadata(None::<String>);
16667    /// ```
16668    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
16669    where
16670        T: std::convert::Into<std::string::String>,
16671    {
16672        self.internal_metadata = v.map(|x| x.into());
16673        self
16674    }
16675
16676    /// Sets the value of [creator_iam_principal][crate::model::TeamFolder::creator_iam_principal].
16677    ///
16678    /// # Example
16679    /// ```ignore,no_run
16680    /// # use google_cloud_dataform_v1::model::TeamFolder;
16681    /// let x = TeamFolder::new().set_creator_iam_principal("example");
16682    /// ```
16683    pub fn set_creator_iam_principal<T>(mut self, v: T) -> Self
16684    where
16685        T: std::convert::Into<std::string::String>,
16686    {
16687        self.creator_iam_principal = std::option::Option::Some(v.into());
16688        self
16689    }
16690
16691    /// Sets or clears the value of [creator_iam_principal][crate::model::TeamFolder::creator_iam_principal].
16692    ///
16693    /// # Example
16694    /// ```ignore,no_run
16695    /// # use google_cloud_dataform_v1::model::TeamFolder;
16696    /// let x = TeamFolder::new().set_or_clear_creator_iam_principal(Some("example"));
16697    /// let x = TeamFolder::new().set_or_clear_creator_iam_principal(None::<String>);
16698    /// ```
16699    pub fn set_or_clear_creator_iam_principal<T>(mut self, v: std::option::Option<T>) -> Self
16700    where
16701        T: std::convert::Into<std::string::String>,
16702    {
16703        self.creator_iam_principal = v.map(|x| x.into());
16704        self
16705    }
16706}
16707
16708impl wkt::message::Message for TeamFolder {
16709    fn typename() -> &'static str {
16710        "type.googleapis.com/google.cloud.dataform.v1.TeamFolder"
16711    }
16712}
16713
16714/// `CreateTeamFolder` request message.
16715#[derive(Clone, Default, PartialEq)]
16716#[non_exhaustive]
16717pub struct CreateTeamFolderRequest {
16718    /// Required. The location in which to create the TeamFolder. Must be in the
16719    /// format `projects/*/locations/*`.
16720    pub parent: std::string::String,
16721
16722    /// Required. The TeamFolder to create.
16723    pub team_folder: std::option::Option<crate::model::TeamFolder>,
16724
16725    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16726}
16727
16728impl CreateTeamFolderRequest {
16729    /// Creates a new default instance.
16730    pub fn new() -> Self {
16731        std::default::Default::default()
16732    }
16733
16734    /// Sets the value of [parent][crate::model::CreateTeamFolderRequest::parent].
16735    ///
16736    /// # Example
16737    /// ```ignore,no_run
16738    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16739    /// let x = CreateTeamFolderRequest::new().set_parent("example");
16740    /// ```
16741    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16742        self.parent = v.into();
16743        self
16744    }
16745
16746    /// Sets the value of [team_folder][crate::model::CreateTeamFolderRequest::team_folder].
16747    ///
16748    /// # Example
16749    /// ```ignore,no_run
16750    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16751    /// use google_cloud_dataform_v1::model::TeamFolder;
16752    /// let x = CreateTeamFolderRequest::new().set_team_folder(TeamFolder::default()/* use setters */);
16753    /// ```
16754    pub fn set_team_folder<T>(mut self, v: T) -> Self
16755    where
16756        T: std::convert::Into<crate::model::TeamFolder>,
16757    {
16758        self.team_folder = std::option::Option::Some(v.into());
16759        self
16760    }
16761
16762    /// Sets or clears the value of [team_folder][crate::model::CreateTeamFolderRequest::team_folder].
16763    ///
16764    /// # Example
16765    /// ```ignore,no_run
16766    /// # use google_cloud_dataform_v1::model::CreateTeamFolderRequest;
16767    /// use google_cloud_dataform_v1::model::TeamFolder;
16768    /// let x = CreateTeamFolderRequest::new().set_or_clear_team_folder(Some(TeamFolder::default()/* use setters */));
16769    /// let x = CreateTeamFolderRequest::new().set_or_clear_team_folder(None::<TeamFolder>);
16770    /// ```
16771    pub fn set_or_clear_team_folder<T>(mut self, v: std::option::Option<T>) -> Self
16772    where
16773        T: std::convert::Into<crate::model::TeamFolder>,
16774    {
16775        self.team_folder = v.map(|x| x.into());
16776        self
16777    }
16778}
16779
16780impl wkt::message::Message for CreateTeamFolderRequest {
16781    fn typename() -> &'static str {
16782        "type.googleapis.com/google.cloud.dataform.v1.CreateTeamFolderRequest"
16783    }
16784}
16785
16786/// `GetTeamFolder` request message.
16787#[derive(Clone, Default, PartialEq)]
16788#[non_exhaustive]
16789pub struct GetTeamFolderRequest {
16790    /// Required. The TeamFolder's name.
16791    pub name: std::string::String,
16792
16793    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16794}
16795
16796impl GetTeamFolderRequest {
16797    /// Creates a new default instance.
16798    pub fn new() -> Self {
16799        std::default::Default::default()
16800    }
16801
16802    /// Sets the value of [name][crate::model::GetTeamFolderRequest::name].
16803    ///
16804    /// # Example
16805    /// ```ignore,no_run
16806    /// # use google_cloud_dataform_v1::model::GetTeamFolderRequest;
16807    /// # let project_id = "project_id";
16808    /// # let location_id = "location_id";
16809    /// # let team_folder_id = "team_folder_id";
16810    /// let x = GetTeamFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
16811    /// ```
16812    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16813        self.name = v.into();
16814        self
16815    }
16816}
16817
16818impl wkt::message::Message for GetTeamFolderRequest {
16819    fn typename() -> &'static str {
16820        "type.googleapis.com/google.cloud.dataform.v1.GetTeamFolderRequest"
16821    }
16822}
16823
16824/// `UpdateTeamFolder` request message.
16825#[derive(Clone, Default, PartialEq)]
16826#[non_exhaustive]
16827pub struct UpdateTeamFolderRequest {
16828    /// Optional. Specifies the fields to be updated in the Folder. If left unset,
16829    /// all fields will be updated.
16830    pub update_mask: std::option::Option<wkt::FieldMask>,
16831
16832    /// Required. The updated TeamFolder.
16833    pub team_folder: std::option::Option<crate::model::TeamFolder>,
16834
16835    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16836}
16837
16838impl UpdateTeamFolderRequest {
16839    /// Creates a new default instance.
16840    pub fn new() -> Self {
16841        std::default::Default::default()
16842    }
16843
16844    /// Sets the value of [update_mask][crate::model::UpdateTeamFolderRequest::update_mask].
16845    ///
16846    /// # Example
16847    /// ```ignore,no_run
16848    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16849    /// use wkt::FieldMask;
16850    /// let x = UpdateTeamFolderRequest::new().set_update_mask(FieldMask::default()/* use setters */);
16851    /// ```
16852    pub fn set_update_mask<T>(mut self, v: T) -> Self
16853    where
16854        T: std::convert::Into<wkt::FieldMask>,
16855    {
16856        self.update_mask = std::option::Option::Some(v.into());
16857        self
16858    }
16859
16860    /// Sets or clears the value of [update_mask][crate::model::UpdateTeamFolderRequest::update_mask].
16861    ///
16862    /// # Example
16863    /// ```ignore,no_run
16864    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16865    /// use wkt::FieldMask;
16866    /// let x = UpdateTeamFolderRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
16867    /// let x = UpdateTeamFolderRequest::new().set_or_clear_update_mask(None::<FieldMask>);
16868    /// ```
16869    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16870    where
16871        T: std::convert::Into<wkt::FieldMask>,
16872    {
16873        self.update_mask = v.map(|x| x.into());
16874        self
16875    }
16876
16877    /// Sets the value of [team_folder][crate::model::UpdateTeamFolderRequest::team_folder].
16878    ///
16879    /// # Example
16880    /// ```ignore,no_run
16881    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16882    /// use google_cloud_dataform_v1::model::TeamFolder;
16883    /// let x = UpdateTeamFolderRequest::new().set_team_folder(TeamFolder::default()/* use setters */);
16884    /// ```
16885    pub fn set_team_folder<T>(mut self, v: T) -> Self
16886    where
16887        T: std::convert::Into<crate::model::TeamFolder>,
16888    {
16889        self.team_folder = std::option::Option::Some(v.into());
16890        self
16891    }
16892
16893    /// Sets or clears the value of [team_folder][crate::model::UpdateTeamFolderRequest::team_folder].
16894    ///
16895    /// # Example
16896    /// ```ignore,no_run
16897    /// # use google_cloud_dataform_v1::model::UpdateTeamFolderRequest;
16898    /// use google_cloud_dataform_v1::model::TeamFolder;
16899    /// let x = UpdateTeamFolderRequest::new().set_or_clear_team_folder(Some(TeamFolder::default()/* use setters */));
16900    /// let x = UpdateTeamFolderRequest::new().set_or_clear_team_folder(None::<TeamFolder>);
16901    /// ```
16902    pub fn set_or_clear_team_folder<T>(mut self, v: std::option::Option<T>) -> Self
16903    where
16904        T: std::convert::Into<crate::model::TeamFolder>,
16905    {
16906        self.team_folder = v.map(|x| x.into());
16907        self
16908    }
16909}
16910
16911impl wkt::message::Message for UpdateTeamFolderRequest {
16912    fn typename() -> &'static str {
16913        "type.googleapis.com/google.cloud.dataform.v1.UpdateTeamFolderRequest"
16914    }
16915}
16916
16917/// `DeleteTeamFolder` request message.
16918#[derive(Clone, Default, PartialEq)]
16919#[non_exhaustive]
16920pub struct DeleteTeamFolderRequest {
16921    /// Required. The TeamFolder's name.
16922    pub name: std::string::String,
16923
16924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16925}
16926
16927impl DeleteTeamFolderRequest {
16928    /// Creates a new default instance.
16929    pub fn new() -> Self {
16930        std::default::Default::default()
16931    }
16932
16933    /// Sets the value of [name][crate::model::DeleteTeamFolderRequest::name].
16934    ///
16935    /// # Example
16936    /// ```ignore,no_run
16937    /// # use google_cloud_dataform_v1::model::DeleteTeamFolderRequest;
16938    /// # let project_id = "project_id";
16939    /// # let location_id = "location_id";
16940    /// # let team_folder_id = "team_folder_id";
16941    /// let x = DeleteTeamFolderRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
16942    /// ```
16943    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16944        self.name = v.into();
16945        self
16946    }
16947}
16948
16949impl wkt::message::Message for DeleteTeamFolderRequest {
16950    fn typename() -> &'static str {
16951        "type.googleapis.com/google.cloud.dataform.v1.DeleteTeamFolderRequest"
16952    }
16953}
16954
16955/// `QueryTeamFolderContents` request message.
16956#[derive(Clone, Default, PartialEq)]
16957#[non_exhaustive]
16958pub struct QueryTeamFolderContentsRequest {
16959    /// Required. Resource name of the TeamFolder to list contents for.
16960    /// Format: `projects/*/locations/*/teamFolders/*`.
16961    pub team_folder: std::string::String,
16962
16963    /// Optional. Maximum number of paths to return. The server may return fewer
16964    /// items than requested. If unspecified, the server will pick an appropriate
16965    /// default.
16966    pub page_size: i32,
16967
16968    /// Optional. Page token received from a previous `QueryTeamFolderContents`
16969    /// call. Provide this to retrieve the subsequent page.
16970    ///
16971    /// When paginating, all other parameters provided to
16972    /// `QueryTeamFolderContents`, with the exception of `page_size`, must match
16973    /// the call that provided the page token.
16974    pub page_token: std::string::String,
16975
16976    /// Optional. Field to additionally sort results by.
16977    /// Will order Folders before Repositories, and then by `order_by` in ascending
16978    /// order. Supported keywords: `display_name` (default), `create_time`,
16979    /// last_modified_time.
16980    /// Examples:
16981    ///
16982    /// * `orderBy="display_name"`
16983    /// * `orderBy="display_name desc"`
16984    pub order_by: std::string::String,
16985
16986    /// Optional. Optional filtering for the returned list. Filtering is currently
16987    /// only supported on the `display_name` field.
16988    ///
16989    /// Example:
16990    ///
16991    /// * `filter="display_name="MyFolder""`
16992    pub filter: std::string::String,
16993
16994    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16995}
16996
16997impl QueryTeamFolderContentsRequest {
16998    /// Creates a new default instance.
16999    pub fn new() -> Self {
17000        std::default::Default::default()
17001    }
17002
17003    /// Sets the value of [team_folder][crate::model::QueryTeamFolderContentsRequest::team_folder].
17004    ///
17005    /// # Example
17006    /// ```ignore,no_run
17007    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
17008    /// # let project_id = "project_id";
17009    /// # let location_id = "location_id";
17010    /// # let team_folder_id = "team_folder_id";
17011    /// let x = QueryTeamFolderContentsRequest::new().set_team_folder(format!("projects/{project_id}/locations/{location_id}/teamFolders/{team_folder_id}"));
17012    /// ```
17013    pub fn set_team_folder<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17014        self.team_folder = v.into();
17015        self
17016    }
17017
17018    /// Sets the value of [page_size][crate::model::QueryTeamFolderContentsRequest::page_size].
17019    ///
17020    /// # Example
17021    /// ```ignore,no_run
17022    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
17023    /// let x = QueryTeamFolderContentsRequest::new().set_page_size(42);
17024    /// ```
17025    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17026        self.page_size = v.into();
17027        self
17028    }
17029
17030    /// Sets the value of [page_token][crate::model::QueryTeamFolderContentsRequest::page_token].
17031    ///
17032    /// # Example
17033    /// ```ignore,no_run
17034    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
17035    /// let x = QueryTeamFolderContentsRequest::new().set_page_token("example");
17036    /// ```
17037    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17038        self.page_token = v.into();
17039        self
17040    }
17041
17042    /// Sets the value of [order_by][crate::model::QueryTeamFolderContentsRequest::order_by].
17043    ///
17044    /// # Example
17045    /// ```ignore,no_run
17046    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
17047    /// let x = QueryTeamFolderContentsRequest::new().set_order_by("example");
17048    /// ```
17049    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17050        self.order_by = v.into();
17051        self
17052    }
17053
17054    /// Sets the value of [filter][crate::model::QueryTeamFolderContentsRequest::filter].
17055    ///
17056    /// # Example
17057    /// ```ignore,no_run
17058    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsRequest;
17059    /// let x = QueryTeamFolderContentsRequest::new().set_filter("example");
17060    /// ```
17061    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17062        self.filter = v.into();
17063        self
17064    }
17065}
17066
17067impl wkt::message::Message for QueryTeamFolderContentsRequest {
17068    fn typename() -> &'static str {
17069        "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsRequest"
17070    }
17071}
17072
17073/// `QueryTeamFolderContents` response message.
17074#[derive(Clone, Default, PartialEq)]
17075#[non_exhaustive]
17076pub struct QueryTeamFolderContentsResponse {
17077    /// List of entries in the TeamFolder.
17078    pub entries:
17079        std::vec::Vec<crate::model::query_team_folder_contents_response::TeamFolderContentsEntry>,
17080
17081    /// A token, which can be sent as `page_token` to retrieve the next page.
17082    /// If this field is omitted, there are no subsequent pages.
17083    pub next_page_token: std::string::String,
17084
17085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17086}
17087
17088impl QueryTeamFolderContentsResponse {
17089    /// Creates a new default instance.
17090    pub fn new() -> Self {
17091        std::default::Default::default()
17092    }
17093
17094    /// Sets the value of [entries][crate::model::QueryTeamFolderContentsResponse::entries].
17095    ///
17096    /// # Example
17097    /// ```ignore,no_run
17098    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsResponse;
17099    /// use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17100    /// let x = QueryTeamFolderContentsResponse::new()
17101    ///     .set_entries([
17102    ///         TeamFolderContentsEntry::default()/* use setters */,
17103    ///         TeamFolderContentsEntry::default()/* use (different) setters */,
17104    ///     ]);
17105    /// ```
17106    pub fn set_entries<T, V>(mut self, v: T) -> Self
17107    where
17108        T: std::iter::IntoIterator<Item = V>,
17109        V: std::convert::Into<
17110                crate::model::query_team_folder_contents_response::TeamFolderContentsEntry,
17111            >,
17112    {
17113        use std::iter::Iterator;
17114        self.entries = v.into_iter().map(|i| i.into()).collect();
17115        self
17116    }
17117
17118    /// Sets the value of [next_page_token][crate::model::QueryTeamFolderContentsResponse::next_page_token].
17119    ///
17120    /// # Example
17121    /// ```ignore,no_run
17122    /// # use google_cloud_dataform_v1::model::QueryTeamFolderContentsResponse;
17123    /// let x = QueryTeamFolderContentsResponse::new().set_next_page_token("example");
17124    /// ```
17125    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17126        self.next_page_token = v.into();
17127        self
17128    }
17129}
17130
17131impl wkt::message::Message for QueryTeamFolderContentsResponse {
17132    fn typename() -> &'static str {
17133        "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsResponse"
17134    }
17135}
17136
17137#[doc(hidden)]
17138impl google_cloud_gax::paginator::internal::PageableResponse for QueryTeamFolderContentsResponse {
17139    type PageItem = crate::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17140
17141    fn items(self) -> std::vec::Vec<Self::PageItem> {
17142        self.entries
17143    }
17144
17145    fn next_page_token(&self) -> std::string::String {
17146        use std::clone::Clone;
17147        self.next_page_token.clone()
17148    }
17149}
17150
17151/// Defines additional types related to [QueryTeamFolderContentsResponse].
17152pub mod query_team_folder_contents_response {
17153    #[allow(unused_imports)]
17154    use super::*;
17155
17156    /// Represents a single content entry.
17157    #[derive(Clone, Default, PartialEq)]
17158    #[non_exhaustive]
17159    pub struct TeamFolderContentsEntry {
17160        /// The content entry.
17161        pub entry: std::option::Option<
17162            crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry,
17163        >,
17164
17165        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17166    }
17167
17168    impl TeamFolderContentsEntry {
17169        /// Creates a new default instance.
17170        pub fn new() -> Self {
17171            std::default::Default::default()
17172        }
17173
17174        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry].
17175        ///
17176        /// Note that all the setters affecting `entry` are mutually
17177        /// exclusive.
17178        ///
17179        /// # Example
17180        /// ```ignore,no_run
17181        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17182        /// use google_cloud_dataform_v1::model::Folder;
17183        /// let x = TeamFolderContentsEntry::new().set_entry(Some(
17184        ///     google_cloud_dataform_v1::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(Folder::default().into())));
17185        /// ```
17186        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
17187        {
17188            self.entry = v.into();
17189            self
17190        }
17191
17192        /// The value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17193        /// if it holds a `Folder`, `None` if the field is not set or
17194        /// holds a different branch.
17195        pub fn folder(&self) -> std::option::Option<&std::boxed::Box<crate::model::Folder>> {
17196            #[allow(unreachable_patterns)]
17197            self.entry.as_ref().and_then(|v| match v {
17198                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(v) => std::option::Option::Some(v),
17199                _ => std::option::Option::None,
17200            })
17201        }
17202
17203        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17204        /// to hold a `Folder`.
17205        ///
17206        /// Note that all the setters affecting `entry` are
17207        /// mutually exclusive.
17208        ///
17209        /// # Example
17210        /// ```ignore,no_run
17211        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17212        /// use google_cloud_dataform_v1::model::Folder;
17213        /// let x = TeamFolderContentsEntry::new().set_folder(Folder::default()/* use setters */);
17214        /// assert!(x.folder().is_some());
17215        /// assert!(x.repository().is_none());
17216        /// ```
17217        pub fn set_folder<T: std::convert::Into<std::boxed::Box<crate::model::Folder>>>(
17218            mut self,
17219            v: T,
17220        ) -> Self {
17221            self.entry = std::option::Option::Some(
17222                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Folder(
17223                    v.into()
17224                )
17225            );
17226            self
17227        }
17228
17229        /// The value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17230        /// if it holds a `Repository`, `None` if the field is not set or
17231        /// holds a different branch.
17232        pub fn repository(
17233            &self,
17234        ) -> std::option::Option<&std::boxed::Box<crate::model::Repository>> {
17235            #[allow(unreachable_patterns)]
17236            self.entry.as_ref().and_then(|v| match v {
17237                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Repository(v) => std::option::Option::Some(v),
17238                _ => std::option::Option::None,
17239            })
17240        }
17241
17242        /// Sets the value of [entry][crate::model::query_team_folder_contents_response::TeamFolderContentsEntry::entry]
17243        /// to hold a `Repository`.
17244        ///
17245        /// Note that all the setters affecting `entry` are
17246        /// mutually exclusive.
17247        ///
17248        /// # Example
17249        /// ```ignore,no_run
17250        /// # use google_cloud_dataform_v1::model::query_team_folder_contents_response::TeamFolderContentsEntry;
17251        /// use google_cloud_dataform_v1::model::Repository;
17252        /// let x = TeamFolderContentsEntry::new().set_repository(Repository::default()/* use setters */);
17253        /// assert!(x.repository().is_some());
17254        /// assert!(x.folder().is_none());
17255        /// ```
17256        pub fn set_repository<T: std::convert::Into<std::boxed::Box<crate::model::Repository>>>(
17257            mut self,
17258            v: T,
17259        ) -> Self {
17260            self.entry = std::option::Option::Some(
17261                crate::model::query_team_folder_contents_response::team_folder_contents_entry::Entry::Repository(
17262                    v.into()
17263                )
17264            );
17265            self
17266        }
17267    }
17268
17269    impl wkt::message::Message for TeamFolderContentsEntry {
17270        fn typename() -> &'static str {
17271            "type.googleapis.com/google.cloud.dataform.v1.QueryTeamFolderContentsResponse.TeamFolderContentsEntry"
17272        }
17273    }
17274
17275    /// Defines additional types related to [TeamFolderContentsEntry].
17276    pub mod team_folder_contents_entry {
17277        #[allow(unused_imports)]
17278        use super::*;
17279
17280        /// The content entry.
17281        #[derive(Clone, Debug, PartialEq)]
17282        #[non_exhaustive]
17283        pub enum Entry {
17284            /// A subfolder.
17285            Folder(std::boxed::Box<crate::model::Folder>),
17286            /// A repository.
17287            Repository(std::boxed::Box<crate::model::Repository>),
17288        }
17289    }
17290}
17291
17292/// `SearchTeamFolders` request message.
17293#[derive(Clone, Default, PartialEq)]
17294#[non_exhaustive]
17295pub struct SearchTeamFoldersRequest {
17296    /// Required. Location in which to query TeamFolders.
17297    /// Format: `projects/*/locations/*`.
17298    pub location: std::string::String,
17299
17300    /// Optional. Maximum number of `TeamFolders` to return. The server may return
17301    /// fewer items than requested. If unspecified, the server will pick a default
17302    /// of `page_size` = 50.
17303    pub page_size: i32,
17304
17305    /// Optional. Page token received from a previous `SearchTeamFolders` call.
17306    /// Provide this to retrieve the subsequent page.
17307    ///
17308    /// When paginating, all other parameters provided to
17309    /// `SearchTeamFolders`, with the exception of `page_size`, must
17310    /// match the call that provided the page token.
17311    pub page_token: std::string::String,
17312
17313    /// Optional. Field to additionally sort results by.
17314    /// Supported keywords: `display_name` (default), `create_time`,
17315    /// `last_modified_time`. Examples:
17316    ///
17317    /// * `orderBy="display_name"`
17318    /// * `orderBy="display_name desc"`
17319    pub order_by: std::string::String,
17320
17321    /// Optional. Optional filtering for the returned list. Filtering is currently
17322    /// only supported on the `display_name` field.
17323    ///
17324    /// Example:
17325    ///
17326    /// * `filter="display_name="MyFolder""`
17327    pub filter: std::string::String,
17328
17329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17330}
17331
17332impl SearchTeamFoldersRequest {
17333    /// Creates a new default instance.
17334    pub fn new() -> Self {
17335        std::default::Default::default()
17336    }
17337
17338    /// Sets the value of [location][crate::model::SearchTeamFoldersRequest::location].
17339    ///
17340    /// # Example
17341    /// ```ignore,no_run
17342    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17343    /// let x = SearchTeamFoldersRequest::new().set_location("example");
17344    /// ```
17345    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17346        self.location = v.into();
17347        self
17348    }
17349
17350    /// Sets the value of [page_size][crate::model::SearchTeamFoldersRequest::page_size].
17351    ///
17352    /// # Example
17353    /// ```ignore,no_run
17354    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17355    /// let x = SearchTeamFoldersRequest::new().set_page_size(42);
17356    /// ```
17357    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17358        self.page_size = v.into();
17359        self
17360    }
17361
17362    /// Sets the value of [page_token][crate::model::SearchTeamFoldersRequest::page_token].
17363    ///
17364    /// # Example
17365    /// ```ignore,no_run
17366    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17367    /// let x = SearchTeamFoldersRequest::new().set_page_token("example");
17368    /// ```
17369    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17370        self.page_token = v.into();
17371        self
17372    }
17373
17374    /// Sets the value of [order_by][crate::model::SearchTeamFoldersRequest::order_by].
17375    ///
17376    /// # Example
17377    /// ```ignore,no_run
17378    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17379    /// let x = SearchTeamFoldersRequest::new().set_order_by("example");
17380    /// ```
17381    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17382        self.order_by = v.into();
17383        self
17384    }
17385
17386    /// Sets the value of [filter][crate::model::SearchTeamFoldersRequest::filter].
17387    ///
17388    /// # Example
17389    /// ```ignore,no_run
17390    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersRequest;
17391    /// let x = SearchTeamFoldersRequest::new().set_filter("example");
17392    /// ```
17393    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17394        self.filter = v.into();
17395        self
17396    }
17397}
17398
17399impl wkt::message::Message for SearchTeamFoldersRequest {
17400    fn typename() -> &'static str {
17401        "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersRequest"
17402    }
17403}
17404
17405/// `SearchTeamFolders` response message.
17406#[derive(Clone, Default, PartialEq)]
17407#[non_exhaustive]
17408pub struct SearchTeamFoldersResponse {
17409    /// List of TeamFolders that match the search query.
17410    pub results: std::vec::Vec<crate::model::search_team_folders_response::TeamFolderSearchResult>,
17411
17412    /// A token, which can be sent as `page_token` to retrieve the next page.
17413    /// If this field is omitted, there are no subsequent pages.
17414    pub next_page_token: std::string::String,
17415
17416    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17417}
17418
17419impl SearchTeamFoldersResponse {
17420    /// Creates a new default instance.
17421    pub fn new() -> Self {
17422        std::default::Default::default()
17423    }
17424
17425    /// Sets the value of [results][crate::model::SearchTeamFoldersResponse::results].
17426    ///
17427    /// # Example
17428    /// ```ignore,no_run
17429    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersResponse;
17430    /// use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17431    /// let x = SearchTeamFoldersResponse::new()
17432    ///     .set_results([
17433    ///         TeamFolderSearchResult::default()/* use setters */,
17434    ///         TeamFolderSearchResult::default()/* use (different) setters */,
17435    ///     ]);
17436    /// ```
17437    pub fn set_results<T, V>(mut self, v: T) -> Self
17438    where
17439        T: std::iter::IntoIterator<Item = V>,
17440        V: std::convert::Into<crate::model::search_team_folders_response::TeamFolderSearchResult>,
17441    {
17442        use std::iter::Iterator;
17443        self.results = v.into_iter().map(|i| i.into()).collect();
17444        self
17445    }
17446
17447    /// Sets the value of [next_page_token][crate::model::SearchTeamFoldersResponse::next_page_token].
17448    ///
17449    /// # Example
17450    /// ```ignore,no_run
17451    /// # use google_cloud_dataform_v1::model::SearchTeamFoldersResponse;
17452    /// let x = SearchTeamFoldersResponse::new().set_next_page_token("example");
17453    /// ```
17454    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17455        self.next_page_token = v.into();
17456        self
17457    }
17458}
17459
17460impl wkt::message::Message for SearchTeamFoldersResponse {
17461    fn typename() -> &'static str {
17462        "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersResponse"
17463    }
17464}
17465
17466#[doc(hidden)]
17467impl google_cloud_gax::paginator::internal::PageableResponse for SearchTeamFoldersResponse {
17468    type PageItem = crate::model::search_team_folders_response::TeamFolderSearchResult;
17469
17470    fn items(self) -> std::vec::Vec<Self::PageItem> {
17471        self.results
17472    }
17473
17474    fn next_page_token(&self) -> std::string::String {
17475        use std::clone::Clone;
17476        self.next_page_token.clone()
17477    }
17478}
17479
17480/// Defines additional types related to [SearchTeamFoldersResponse].
17481pub mod search_team_folders_response {
17482    #[allow(unused_imports)]
17483    use super::*;
17484
17485    /// Represents a single content entry.
17486    #[derive(Clone, Default, PartialEq)]
17487    #[non_exhaustive]
17488    pub struct TeamFolderSearchResult {
17489        /// The content entry.
17490        pub entry: std::option::Option<
17491            crate::model::search_team_folders_response::team_folder_search_result::Entry,
17492        >,
17493
17494        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17495    }
17496
17497    impl TeamFolderSearchResult {
17498        /// Creates a new default instance.
17499        pub fn new() -> Self {
17500            std::default::Default::default()
17501        }
17502
17503        /// Sets the value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry].
17504        ///
17505        /// Note that all the setters affecting `entry` are mutually
17506        /// exclusive.
17507        ///
17508        /// # Example
17509        /// ```ignore,no_run
17510        /// # use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17511        /// use google_cloud_dataform_v1::model::TeamFolder;
17512        /// let x = TeamFolderSearchResult::new().set_entry(Some(
17513        ///     google_cloud_dataform_v1::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(TeamFolder::default().into())));
17514        /// ```
17515        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
17516        {
17517            self.entry = v.into();
17518            self
17519        }
17520
17521        /// The value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry]
17522        /// if it holds a `TeamFolder`, `None` if the field is not set or
17523        /// holds a different branch.
17524        pub fn team_folder(
17525            &self,
17526        ) -> std::option::Option<&std::boxed::Box<crate::model::TeamFolder>> {
17527            #[allow(unreachable_patterns)]
17528            self.entry.as_ref().and_then(|v| match v {
17529                crate::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(v) => std::option::Option::Some(v),
17530                _ => std::option::Option::None,
17531            })
17532        }
17533
17534        /// Sets the value of [entry][crate::model::search_team_folders_response::TeamFolderSearchResult::entry]
17535        /// to hold a `TeamFolder`.
17536        ///
17537        /// Note that all the setters affecting `entry` are
17538        /// mutually exclusive.
17539        ///
17540        /// # Example
17541        /// ```ignore,no_run
17542        /// # use google_cloud_dataform_v1::model::search_team_folders_response::TeamFolderSearchResult;
17543        /// use google_cloud_dataform_v1::model::TeamFolder;
17544        /// let x = TeamFolderSearchResult::new().set_team_folder(TeamFolder::default()/* use setters */);
17545        /// assert!(x.team_folder().is_some());
17546        /// ```
17547        pub fn set_team_folder<T: std::convert::Into<std::boxed::Box<crate::model::TeamFolder>>>(
17548            mut self,
17549            v: T,
17550        ) -> Self {
17551            self.entry = std::option::Option::Some(
17552                crate::model::search_team_folders_response::team_folder_search_result::Entry::TeamFolder(
17553                    v.into()
17554                )
17555            );
17556            self
17557        }
17558    }
17559
17560    impl wkt::message::Message for TeamFolderSearchResult {
17561        fn typename() -> &'static str {
17562            "type.googleapis.com/google.cloud.dataform.v1.SearchTeamFoldersResponse.TeamFolderSearchResult"
17563        }
17564    }
17565
17566    /// Defines additional types related to [TeamFolderSearchResult].
17567    pub mod team_folder_search_result {
17568        #[allow(unused_imports)]
17569        use super::*;
17570
17571        /// The content entry.
17572        #[derive(Clone, Debug, PartialEq)]
17573        #[non_exhaustive]
17574        pub enum Entry {
17575            /// A TeamFolder resource that is in the project / location.
17576            TeamFolder(std::boxed::Box<crate::model::TeamFolder>),
17577        }
17578    }
17579}
17580
17581/// Contains metadata about the progress of the MoveFolder Long-running
17582/// operations.
17583#[derive(Clone, Default, PartialEq)]
17584#[non_exhaustive]
17585pub struct MoveFolderMetadata {
17586    /// Output only. The time the operation was created.
17587    pub create_time: std::option::Option<wkt::Timestamp>,
17588
17589    /// Output only. The time the operation finished running.
17590    pub end_time: std::option::Option<wkt::Timestamp>,
17591
17592    /// Output only. Server-defined resource path for the target of the operation.
17593    pub target: std::string::String,
17594
17595    /// The state of the move.
17596    pub state: crate::model::move_folder_metadata::State,
17597
17598    /// Percent complete of the move [0, 100].
17599    pub percent_complete: i32,
17600
17601    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17602}
17603
17604impl MoveFolderMetadata {
17605    /// Creates a new default instance.
17606    pub fn new() -> Self {
17607        std::default::Default::default()
17608    }
17609
17610    /// Sets the value of [create_time][crate::model::MoveFolderMetadata::create_time].
17611    ///
17612    /// # Example
17613    /// ```ignore,no_run
17614    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17615    /// use wkt::Timestamp;
17616    /// let x = MoveFolderMetadata::new().set_create_time(Timestamp::default()/* use setters */);
17617    /// ```
17618    pub fn set_create_time<T>(mut self, v: T) -> Self
17619    where
17620        T: std::convert::Into<wkt::Timestamp>,
17621    {
17622        self.create_time = std::option::Option::Some(v.into());
17623        self
17624    }
17625
17626    /// Sets or clears the value of [create_time][crate::model::MoveFolderMetadata::create_time].
17627    ///
17628    /// # Example
17629    /// ```ignore,no_run
17630    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17631    /// use wkt::Timestamp;
17632    /// let x = MoveFolderMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17633    /// let x = MoveFolderMetadata::new().set_or_clear_create_time(None::<Timestamp>);
17634    /// ```
17635    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17636    where
17637        T: std::convert::Into<wkt::Timestamp>,
17638    {
17639        self.create_time = v.map(|x| x.into());
17640        self
17641    }
17642
17643    /// Sets the value of [end_time][crate::model::MoveFolderMetadata::end_time].
17644    ///
17645    /// # Example
17646    /// ```ignore,no_run
17647    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17648    /// use wkt::Timestamp;
17649    /// let x = MoveFolderMetadata::new().set_end_time(Timestamp::default()/* use setters */);
17650    /// ```
17651    pub fn set_end_time<T>(mut self, v: T) -> Self
17652    where
17653        T: std::convert::Into<wkt::Timestamp>,
17654    {
17655        self.end_time = std::option::Option::Some(v.into());
17656        self
17657    }
17658
17659    /// Sets or clears the value of [end_time][crate::model::MoveFolderMetadata::end_time].
17660    ///
17661    /// # Example
17662    /// ```ignore,no_run
17663    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17664    /// use wkt::Timestamp;
17665    /// let x = MoveFolderMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
17666    /// let x = MoveFolderMetadata::new().set_or_clear_end_time(None::<Timestamp>);
17667    /// ```
17668    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
17669    where
17670        T: std::convert::Into<wkt::Timestamp>,
17671    {
17672        self.end_time = v.map(|x| x.into());
17673        self
17674    }
17675
17676    /// Sets the value of [target][crate::model::MoveFolderMetadata::target].
17677    ///
17678    /// # Example
17679    /// ```ignore,no_run
17680    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17681    /// let x = MoveFolderMetadata::new().set_target("example");
17682    /// ```
17683    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17684        self.target = v.into();
17685        self
17686    }
17687
17688    /// Sets the value of [state][crate::model::MoveFolderMetadata::state].
17689    ///
17690    /// # Example
17691    /// ```ignore,no_run
17692    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17693    /// use google_cloud_dataform_v1::model::move_folder_metadata::State;
17694    /// let x0 = MoveFolderMetadata::new().set_state(State::Initialized);
17695    /// let x1 = MoveFolderMetadata::new().set_state(State::InProgress);
17696    /// let x2 = MoveFolderMetadata::new().set_state(State::Success);
17697    /// ```
17698    pub fn set_state<T: std::convert::Into<crate::model::move_folder_metadata::State>>(
17699        mut self,
17700        v: T,
17701    ) -> Self {
17702        self.state = v.into();
17703        self
17704    }
17705
17706    /// Sets the value of [percent_complete][crate::model::MoveFolderMetadata::percent_complete].
17707    ///
17708    /// # Example
17709    /// ```ignore,no_run
17710    /// # use google_cloud_dataform_v1::model::MoveFolderMetadata;
17711    /// let x = MoveFolderMetadata::new().set_percent_complete(42);
17712    /// ```
17713    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
17714        self.percent_complete = v.into();
17715        self
17716    }
17717}
17718
17719impl wkt::message::Message for MoveFolderMetadata {
17720    fn typename() -> &'static str {
17721        "type.googleapis.com/google.cloud.dataform.v1.MoveFolderMetadata"
17722    }
17723}
17724
17725/// Defines additional types related to [MoveFolderMetadata].
17726pub mod move_folder_metadata {
17727    #[allow(unused_imports)]
17728    use super::*;
17729
17730    /// Different states of the move.
17731    ///
17732    /// # Working with unknown values
17733    ///
17734    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17735    /// additional enum variants at any time. Adding new variants is not considered
17736    /// a breaking change. Applications should write their code in anticipation of:
17737    ///
17738    /// - New values appearing in future releases of the client library, **and**
17739    /// - New values received dynamically, without application changes.
17740    ///
17741    /// Please consult the [Working with enums] section in the user guide for some
17742    /// guidelines.
17743    ///
17744    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17745    #[derive(Clone, Debug, PartialEq)]
17746    #[non_exhaustive]
17747    pub enum State {
17748        /// The state is unspecified.
17749        Unspecified,
17750        /// The move was initialized and recorded by the server, but not yet started.
17751        Initialized,
17752        /// The move is in progress.
17753        InProgress,
17754        /// The move has completed successfully.
17755        Success,
17756        /// The move has failed.
17757        Failed,
17758        /// If set, the enum was initialized with an unknown value.
17759        ///
17760        /// Applications can examine the value using [State::value] or
17761        /// [State::name].
17762        UnknownValue(state::UnknownValue),
17763    }
17764
17765    #[doc(hidden)]
17766    pub mod state {
17767        #[allow(unused_imports)]
17768        use super::*;
17769        #[derive(Clone, Debug, PartialEq)]
17770        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17771    }
17772
17773    impl State {
17774        /// Gets the enum value.
17775        ///
17776        /// Returns `None` if the enum contains an unknown value deserialized from
17777        /// the string representation of enums.
17778        pub fn value(&self) -> std::option::Option<i32> {
17779            match self {
17780                Self::Unspecified => std::option::Option::Some(0),
17781                Self::Initialized => std::option::Option::Some(1),
17782                Self::InProgress => std::option::Option::Some(2),
17783                Self::Success => std::option::Option::Some(3),
17784                Self::Failed => std::option::Option::Some(4),
17785                Self::UnknownValue(u) => u.0.value(),
17786            }
17787        }
17788
17789        /// Gets the enum value as a string.
17790        ///
17791        /// Returns `None` if the enum contains an unknown value deserialized from
17792        /// the integer representation of enums.
17793        pub fn name(&self) -> std::option::Option<&str> {
17794            match self {
17795                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17796                Self::Initialized => std::option::Option::Some("INITIALIZED"),
17797                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
17798                Self::Success => std::option::Option::Some("SUCCESS"),
17799                Self::Failed => std::option::Option::Some("FAILED"),
17800                Self::UnknownValue(u) => u.0.name(),
17801            }
17802        }
17803    }
17804
17805    impl std::default::Default for State {
17806        fn default() -> Self {
17807            use std::convert::From;
17808            Self::from(0)
17809        }
17810    }
17811
17812    impl std::fmt::Display for State {
17813        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17814            wkt::internal::display_enum(f, self.name(), self.value())
17815        }
17816    }
17817
17818    impl std::convert::From<i32> for State {
17819        fn from(value: i32) -> Self {
17820            match value {
17821                0 => Self::Unspecified,
17822                1 => Self::Initialized,
17823                2 => Self::InProgress,
17824                3 => Self::Success,
17825                4 => Self::Failed,
17826                _ => Self::UnknownValue(state::UnknownValue(
17827                    wkt::internal::UnknownEnumValue::Integer(value),
17828                )),
17829            }
17830        }
17831    }
17832
17833    impl std::convert::From<&str> for State {
17834        fn from(value: &str) -> Self {
17835            use std::string::ToString;
17836            match value {
17837                "STATE_UNSPECIFIED" => Self::Unspecified,
17838                "INITIALIZED" => Self::Initialized,
17839                "IN_PROGRESS" => Self::InProgress,
17840                "SUCCESS" => Self::Success,
17841                "FAILED" => Self::Failed,
17842                _ => Self::UnknownValue(state::UnknownValue(
17843                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17844                )),
17845            }
17846        }
17847    }
17848
17849    impl serde::ser::Serialize for State {
17850        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17851        where
17852            S: serde::Serializer,
17853        {
17854            match self {
17855                Self::Unspecified => serializer.serialize_i32(0),
17856                Self::Initialized => serializer.serialize_i32(1),
17857                Self::InProgress => serializer.serialize_i32(2),
17858                Self::Success => serializer.serialize_i32(3),
17859                Self::Failed => serializer.serialize_i32(4),
17860                Self::UnknownValue(u) => u.0.serialize(serializer),
17861            }
17862        }
17863    }
17864
17865    impl<'de> serde::de::Deserialize<'de> for State {
17866        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17867        where
17868            D: serde::Deserializer<'de>,
17869        {
17870            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17871                ".google.cloud.dataform.v1.MoveFolderMetadata.State",
17872            ))
17873        }
17874    }
17875}
17876
17877/// Contains metadata about the progress of the MoveRepository Long-running
17878/// operations.
17879#[derive(Clone, Default, PartialEq)]
17880#[non_exhaustive]
17881pub struct MoveRepositoryMetadata {
17882    /// Output only. The time the operation was created.
17883    pub create_time: std::option::Option<wkt::Timestamp>,
17884
17885    /// Output only. The time the operation finished running.
17886    pub end_time: std::option::Option<wkt::Timestamp>,
17887
17888    /// Output only. Server-defined resource path for the target of the operation.
17889    pub target: std::string::String,
17890
17891    /// The state of the move.
17892    pub state: crate::model::move_repository_metadata::State,
17893
17894    /// Percent complete of the move [0, 100].
17895    pub percent_complete: i32,
17896
17897    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17898}
17899
17900impl MoveRepositoryMetadata {
17901    /// Creates a new default instance.
17902    pub fn new() -> Self {
17903        std::default::Default::default()
17904    }
17905
17906    /// Sets the value of [create_time][crate::model::MoveRepositoryMetadata::create_time].
17907    ///
17908    /// # Example
17909    /// ```ignore,no_run
17910    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17911    /// use wkt::Timestamp;
17912    /// let x = MoveRepositoryMetadata::new().set_create_time(Timestamp::default()/* use setters */);
17913    /// ```
17914    pub fn set_create_time<T>(mut self, v: T) -> Self
17915    where
17916        T: std::convert::Into<wkt::Timestamp>,
17917    {
17918        self.create_time = std::option::Option::Some(v.into());
17919        self
17920    }
17921
17922    /// Sets or clears the value of [create_time][crate::model::MoveRepositoryMetadata::create_time].
17923    ///
17924    /// # Example
17925    /// ```ignore,no_run
17926    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17927    /// use wkt::Timestamp;
17928    /// let x = MoveRepositoryMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17929    /// let x = MoveRepositoryMetadata::new().set_or_clear_create_time(None::<Timestamp>);
17930    /// ```
17931    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17932    where
17933        T: std::convert::Into<wkt::Timestamp>,
17934    {
17935        self.create_time = v.map(|x| x.into());
17936        self
17937    }
17938
17939    /// Sets the value of [end_time][crate::model::MoveRepositoryMetadata::end_time].
17940    ///
17941    /// # Example
17942    /// ```ignore,no_run
17943    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17944    /// use wkt::Timestamp;
17945    /// let x = MoveRepositoryMetadata::new().set_end_time(Timestamp::default()/* use setters */);
17946    /// ```
17947    pub fn set_end_time<T>(mut self, v: T) -> Self
17948    where
17949        T: std::convert::Into<wkt::Timestamp>,
17950    {
17951        self.end_time = std::option::Option::Some(v.into());
17952        self
17953    }
17954
17955    /// Sets or clears the value of [end_time][crate::model::MoveRepositoryMetadata::end_time].
17956    ///
17957    /// # Example
17958    /// ```ignore,no_run
17959    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17960    /// use wkt::Timestamp;
17961    /// let x = MoveRepositoryMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
17962    /// let x = MoveRepositoryMetadata::new().set_or_clear_end_time(None::<Timestamp>);
17963    /// ```
17964    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
17965    where
17966        T: std::convert::Into<wkt::Timestamp>,
17967    {
17968        self.end_time = v.map(|x| x.into());
17969        self
17970    }
17971
17972    /// Sets the value of [target][crate::model::MoveRepositoryMetadata::target].
17973    ///
17974    /// # Example
17975    /// ```ignore,no_run
17976    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17977    /// let x = MoveRepositoryMetadata::new().set_target("example");
17978    /// ```
17979    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17980        self.target = v.into();
17981        self
17982    }
17983
17984    /// Sets the value of [state][crate::model::MoveRepositoryMetadata::state].
17985    ///
17986    /// # Example
17987    /// ```ignore,no_run
17988    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
17989    /// use google_cloud_dataform_v1::model::move_repository_metadata::State;
17990    /// let x0 = MoveRepositoryMetadata::new().set_state(State::Initialized);
17991    /// let x1 = MoveRepositoryMetadata::new().set_state(State::InProgress);
17992    /// let x2 = MoveRepositoryMetadata::new().set_state(State::Success);
17993    /// ```
17994    pub fn set_state<T: std::convert::Into<crate::model::move_repository_metadata::State>>(
17995        mut self,
17996        v: T,
17997    ) -> Self {
17998        self.state = v.into();
17999        self
18000    }
18001
18002    /// Sets the value of [percent_complete][crate::model::MoveRepositoryMetadata::percent_complete].
18003    ///
18004    /// # Example
18005    /// ```ignore,no_run
18006    /// # use google_cloud_dataform_v1::model::MoveRepositoryMetadata;
18007    /// let x = MoveRepositoryMetadata::new().set_percent_complete(42);
18008    /// ```
18009    pub fn set_percent_complete<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
18010        self.percent_complete = v.into();
18011        self
18012    }
18013}
18014
18015impl wkt::message::Message for MoveRepositoryMetadata {
18016    fn typename() -> &'static str {
18017        "type.googleapis.com/google.cloud.dataform.v1.MoveRepositoryMetadata"
18018    }
18019}
18020
18021/// Defines additional types related to [MoveRepositoryMetadata].
18022pub mod move_repository_metadata {
18023    #[allow(unused_imports)]
18024    use super::*;
18025
18026    /// Different states of the move.
18027    ///
18028    /// # Working with unknown values
18029    ///
18030    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18031    /// additional enum variants at any time. Adding new variants is not considered
18032    /// a breaking change. Applications should write their code in anticipation of:
18033    ///
18034    /// - New values appearing in future releases of the client library, **and**
18035    /// - New values received dynamically, without application changes.
18036    ///
18037    /// Please consult the [Working with enums] section in the user guide for some
18038    /// guidelines.
18039    ///
18040    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18041    #[derive(Clone, Debug, PartialEq)]
18042    #[non_exhaustive]
18043    pub enum State {
18044        /// The state is unspecified.
18045        Unspecified,
18046        /// The move was initialized and recorded by the server, but not yet started.
18047        Initialized,
18048        /// The move is in progress.
18049        InProgress,
18050        /// The move has completed successfully.
18051        Success,
18052        /// The move has failed.
18053        Failed,
18054        /// If set, the enum was initialized with an unknown value.
18055        ///
18056        /// Applications can examine the value using [State::value] or
18057        /// [State::name].
18058        UnknownValue(state::UnknownValue),
18059    }
18060
18061    #[doc(hidden)]
18062    pub mod state {
18063        #[allow(unused_imports)]
18064        use super::*;
18065        #[derive(Clone, Debug, PartialEq)]
18066        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18067    }
18068
18069    impl State {
18070        /// Gets the enum value.
18071        ///
18072        /// Returns `None` if the enum contains an unknown value deserialized from
18073        /// the string representation of enums.
18074        pub fn value(&self) -> std::option::Option<i32> {
18075            match self {
18076                Self::Unspecified => std::option::Option::Some(0),
18077                Self::Initialized => std::option::Option::Some(1),
18078                Self::InProgress => std::option::Option::Some(2),
18079                Self::Success => std::option::Option::Some(3),
18080                Self::Failed => std::option::Option::Some(4),
18081                Self::UnknownValue(u) => u.0.value(),
18082            }
18083        }
18084
18085        /// Gets the enum value as a string.
18086        ///
18087        /// Returns `None` if the enum contains an unknown value deserialized from
18088        /// the integer representation of enums.
18089        pub fn name(&self) -> std::option::Option<&str> {
18090            match self {
18091                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18092                Self::Initialized => std::option::Option::Some("INITIALIZED"),
18093                Self::InProgress => std::option::Option::Some("IN_PROGRESS"),
18094                Self::Success => std::option::Option::Some("SUCCESS"),
18095                Self::Failed => std::option::Option::Some("FAILED"),
18096                Self::UnknownValue(u) => u.0.name(),
18097            }
18098        }
18099    }
18100
18101    impl std::default::Default for State {
18102        fn default() -> Self {
18103            use std::convert::From;
18104            Self::from(0)
18105        }
18106    }
18107
18108    impl std::fmt::Display for State {
18109        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18110            wkt::internal::display_enum(f, self.name(), self.value())
18111        }
18112    }
18113
18114    impl std::convert::From<i32> for State {
18115        fn from(value: i32) -> Self {
18116            match value {
18117                0 => Self::Unspecified,
18118                1 => Self::Initialized,
18119                2 => Self::InProgress,
18120                3 => Self::Success,
18121                4 => Self::Failed,
18122                _ => Self::UnknownValue(state::UnknownValue(
18123                    wkt::internal::UnknownEnumValue::Integer(value),
18124                )),
18125            }
18126        }
18127    }
18128
18129    impl std::convert::From<&str> for State {
18130        fn from(value: &str) -> Self {
18131            use std::string::ToString;
18132            match value {
18133                "STATE_UNSPECIFIED" => Self::Unspecified,
18134                "INITIALIZED" => Self::Initialized,
18135                "IN_PROGRESS" => Self::InProgress,
18136                "SUCCESS" => Self::Success,
18137                "FAILED" => Self::Failed,
18138                _ => Self::UnknownValue(state::UnknownValue(
18139                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18140                )),
18141            }
18142        }
18143    }
18144
18145    impl serde::ser::Serialize for State {
18146        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18147        where
18148            S: serde::Serializer,
18149        {
18150            match self {
18151                Self::Unspecified => serializer.serialize_i32(0),
18152                Self::Initialized => serializer.serialize_i32(1),
18153                Self::InProgress => serializer.serialize_i32(2),
18154                Self::Success => serializer.serialize_i32(3),
18155                Self::Failed => serializer.serialize_i32(4),
18156                Self::UnknownValue(u) => u.0.serialize(serializer),
18157            }
18158        }
18159    }
18160
18161    impl<'de> serde::de::Deserialize<'de> for State {
18162        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18163        where
18164            D: serde::Deserializer<'de>,
18165        {
18166            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18167                ".google.cloud.dataform.v1.MoveRepositoryMetadata.State",
18168            ))
18169        }
18170    }
18171}
18172
18173/// Represents the level of detail to return for directory contents.
18174///
18175/// # Working with unknown values
18176///
18177/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18178/// additional enum variants at any time. Adding new variants is not considered
18179/// a breaking change. Applications should write their code in anticipation of:
18180///
18181/// - New values appearing in future releases of the client library, **and**
18182/// - New values received dynamically, without application changes.
18183///
18184/// Please consult the [Working with enums] section in the user guide for some
18185/// guidelines.
18186///
18187/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18188#[derive(Clone, Debug, PartialEq)]
18189#[non_exhaustive]
18190pub enum DirectoryContentsView {
18191    /// The default unset value. Defaults to DIRECTORY_CONTENTS_VIEW_BASIC.
18192    Unspecified,
18193    /// Includes only the file or directory name. This is the default behavior.
18194    Basic,
18195    /// Includes all metadata for each file or directory. Currently not supported
18196    /// by CMEK-protected workspaces.
18197    Metadata,
18198    /// If set, the enum was initialized with an unknown value.
18199    ///
18200    /// Applications can examine the value using [DirectoryContentsView::value] or
18201    /// [DirectoryContentsView::name].
18202    UnknownValue(directory_contents_view::UnknownValue),
18203}
18204
18205#[doc(hidden)]
18206pub mod directory_contents_view {
18207    #[allow(unused_imports)]
18208    use super::*;
18209    #[derive(Clone, Debug, PartialEq)]
18210    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18211}
18212
18213impl DirectoryContentsView {
18214    /// Gets the enum value.
18215    ///
18216    /// Returns `None` if the enum contains an unknown value deserialized from
18217    /// the string representation of enums.
18218    pub fn value(&self) -> std::option::Option<i32> {
18219        match self {
18220            Self::Unspecified => std::option::Option::Some(0),
18221            Self::Basic => std::option::Option::Some(1),
18222            Self::Metadata => std::option::Option::Some(2),
18223            Self::UnknownValue(u) => u.0.value(),
18224        }
18225    }
18226
18227    /// Gets the enum value as a string.
18228    ///
18229    /// Returns `None` if the enum contains an unknown value deserialized from
18230    /// the integer representation of enums.
18231    pub fn name(&self) -> std::option::Option<&str> {
18232        match self {
18233            Self::Unspecified => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_UNSPECIFIED"),
18234            Self::Basic => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_BASIC"),
18235            Self::Metadata => std::option::Option::Some("DIRECTORY_CONTENTS_VIEW_METADATA"),
18236            Self::UnknownValue(u) => u.0.name(),
18237        }
18238    }
18239}
18240
18241impl std::default::Default for DirectoryContentsView {
18242    fn default() -> Self {
18243        use std::convert::From;
18244        Self::from(0)
18245    }
18246}
18247
18248impl std::fmt::Display for DirectoryContentsView {
18249    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18250        wkt::internal::display_enum(f, self.name(), self.value())
18251    }
18252}
18253
18254impl std::convert::From<i32> for DirectoryContentsView {
18255    fn from(value: i32) -> Self {
18256        match value {
18257            0 => Self::Unspecified,
18258            1 => Self::Basic,
18259            2 => Self::Metadata,
18260            _ => Self::UnknownValue(directory_contents_view::UnknownValue(
18261                wkt::internal::UnknownEnumValue::Integer(value),
18262            )),
18263        }
18264    }
18265}
18266
18267impl std::convert::From<&str> for DirectoryContentsView {
18268    fn from(value: &str) -> Self {
18269        use std::string::ToString;
18270        match value {
18271            "DIRECTORY_CONTENTS_VIEW_UNSPECIFIED" => Self::Unspecified,
18272            "DIRECTORY_CONTENTS_VIEW_BASIC" => Self::Basic,
18273            "DIRECTORY_CONTENTS_VIEW_METADATA" => Self::Metadata,
18274            _ => Self::UnknownValue(directory_contents_view::UnknownValue(
18275                wkt::internal::UnknownEnumValue::String(value.to_string()),
18276            )),
18277        }
18278    }
18279}
18280
18281impl serde::ser::Serialize for DirectoryContentsView {
18282    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18283    where
18284        S: serde::Serializer,
18285    {
18286        match self {
18287            Self::Unspecified => serializer.serialize_i32(0),
18288            Self::Basic => serializer.serialize_i32(1),
18289            Self::Metadata => serializer.serialize_i32(2),
18290            Self::UnknownValue(u) => u.0.serialize(serializer),
18291        }
18292    }
18293}
18294
18295impl<'de> serde::de::Deserialize<'de> for DirectoryContentsView {
18296    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18297    where
18298        D: serde::Deserializer<'de>,
18299    {
18300        deserializer.deserialize_any(wkt::internal::EnumVisitor::<DirectoryContentsView>::new(
18301            ".google.cloud.dataform.v1.DirectoryContentsView",
18302        ))
18303    }
18304}