google_cloud_dataform_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate gtype;
25extern crate iam_v1;
26extern crate lazy_static;
27extern crate location;
28extern crate reqwest;
29extern crate rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// Describes encryption state of a resource.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct DataEncryptionState {
45    /// Required. The KMS key version name with which data of a resource is
46    /// encrypted.
47    pub kms_key_version_name: std::string::String,
48
49    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
50}
51
52impl DataEncryptionState {
53    pub fn new() -> Self {
54        std::default::Default::default()
55    }
56
57    /// Sets the value of [kms_key_version_name][crate::model::DataEncryptionState::kms_key_version_name].
58    pub fn set_kms_key_version_name<T: std::convert::Into<std::string::String>>(
59        mut self,
60        v: T,
61    ) -> Self {
62        self.kms_key_version_name = v.into();
63        self
64    }
65}
66
67impl wkt::message::Message for DataEncryptionState {
68    fn typename() -> &'static str {
69        "type.googleapis.com/google.cloud.dataform.v1.DataEncryptionState"
70    }
71}
72
73/// Represents a Dataform Git repository.
74#[derive(Clone, Default, PartialEq)]
75#[non_exhaustive]
76pub struct Repository {
77    /// Identifier. The repository's name.
78    pub name: std::string::String,
79
80    /// Output only. The timestamp of when the repository was created.
81    pub create_time: std::option::Option<wkt::Timestamp>,
82
83    /// Optional. The repository's user-friendly name.
84    pub display_name: std::string::String,
85
86    /// Optional. If set, configures this repository to be linked to a Git remote.
87    pub git_remote_settings: std::option::Option<crate::model::repository::GitRemoteSettings>,
88
89    /// Optional. The name of the Secret Manager secret version to be used to
90    /// interpolate variables into the .npmrc file for package installation
91    /// operations. Must be in the format `projects/*/secrets/*/versions/*`. The
92    /// file itself must be in a JSON format.
93    pub npmrc_environment_variables_secret_version: std::string::String,
94
95    /// Optional. If set, fields of `workspace_compilation_overrides` override the
96    /// default compilation settings that are specified in dataform.json when
97    /// creating workspace-scoped compilation results. See documentation for
98    /// `WorkspaceCompilationOverrides` for more information.
99    pub workspace_compilation_overrides:
100        std::option::Option<crate::model::repository::WorkspaceCompilationOverrides>,
101
102    /// Optional. Repository user labels.
103    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
104
105    /// Optional. Input only. If set to true, the authenticated user will be
106    /// granted the roles/dataform.admin role on the created repository.
107    pub set_authenticated_user_admin: bool,
108
109    /// Optional. The service account to run workflow invocations under.
110    pub service_account: std::string::String,
111
112    /// Optional. The reference to a KMS encryption key. If provided, it will be
113    /// used to encrypt user data in the repository and all child resources. It is
114    /// not possible to add or update the encryption key after the repository is
115    /// created. Example:
116    /// `projects/{kms_project}/locations/{location}/keyRings/{key_location}/cryptoKeys/{key}`
117    pub kms_key_name: std::string::String,
118
119    /// Output only. A data encryption state of a Git repository if this Repository
120    /// is protected by a KMS key.
121    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
122
123    /// Output only. All the metadata information that is used internally to serve
124    /// the resource. For example: timestamps, flags, status fields, etc. The
125    /// format of this field is a JSON string.
126    pub internal_metadata: std::option::Option<std::string::String>,
127
128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
129}
130
131impl Repository {
132    pub fn new() -> Self {
133        std::default::Default::default()
134    }
135
136    /// Sets the value of [name][crate::model::Repository::name].
137    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
138        self.name = v.into();
139        self
140    }
141
142    /// Sets the value of [create_time][crate::model::Repository::create_time].
143    pub fn set_create_time<T>(mut self, v: T) -> Self
144    where
145        T: std::convert::Into<wkt::Timestamp>,
146    {
147        self.create_time = std::option::Option::Some(v.into());
148        self
149    }
150
151    /// Sets or clears the value of [create_time][crate::model::Repository::create_time].
152    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
153    where
154        T: std::convert::Into<wkt::Timestamp>,
155    {
156        self.create_time = v.map(|x| x.into());
157        self
158    }
159
160    /// Sets the value of [display_name][crate::model::Repository::display_name].
161    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
162        self.display_name = v.into();
163        self
164    }
165
166    /// Sets the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
167    pub fn set_git_remote_settings<T>(mut self, v: T) -> Self
168    where
169        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
170    {
171        self.git_remote_settings = std::option::Option::Some(v.into());
172        self
173    }
174
175    /// Sets or clears the value of [git_remote_settings][crate::model::Repository::git_remote_settings].
176    pub fn set_or_clear_git_remote_settings<T>(mut self, v: std::option::Option<T>) -> Self
177    where
178        T: std::convert::Into<crate::model::repository::GitRemoteSettings>,
179    {
180        self.git_remote_settings = v.map(|x| x.into());
181        self
182    }
183
184    /// Sets the value of [npmrc_environment_variables_secret_version][crate::model::Repository::npmrc_environment_variables_secret_version].
185    pub fn set_npmrc_environment_variables_secret_version<
186        T: std::convert::Into<std::string::String>,
187    >(
188        mut self,
189        v: T,
190    ) -> Self {
191        self.npmrc_environment_variables_secret_version = v.into();
192        self
193    }
194
195    /// Sets the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
196    pub fn set_workspace_compilation_overrides<T>(mut self, v: T) -> Self
197    where
198        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
199    {
200        self.workspace_compilation_overrides = std::option::Option::Some(v.into());
201        self
202    }
203
204    /// Sets or clears the value of [workspace_compilation_overrides][crate::model::Repository::workspace_compilation_overrides].
205    pub fn set_or_clear_workspace_compilation_overrides<T>(
206        mut self,
207        v: std::option::Option<T>,
208    ) -> Self
209    where
210        T: std::convert::Into<crate::model::repository::WorkspaceCompilationOverrides>,
211    {
212        self.workspace_compilation_overrides = v.map(|x| x.into());
213        self
214    }
215
216    /// Sets the value of [labels][crate::model::Repository::labels].
217    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
218    where
219        T: std::iter::IntoIterator<Item = (K, V)>,
220        K: std::convert::Into<std::string::String>,
221        V: std::convert::Into<std::string::String>,
222    {
223        use std::iter::Iterator;
224        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
225        self
226    }
227
228    /// Sets the value of [set_authenticated_user_admin][crate::model::Repository::set_authenticated_user_admin].
229    pub fn set_set_authenticated_user_admin<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
230        self.set_authenticated_user_admin = v.into();
231        self
232    }
233
234    /// Sets the value of [service_account][crate::model::Repository::service_account].
235    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
236        self.service_account = v.into();
237        self
238    }
239
240    /// Sets the value of [kms_key_name][crate::model::Repository::kms_key_name].
241    pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
242        self.kms_key_name = v.into();
243        self
244    }
245
246    /// Sets the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
247    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
248    where
249        T: std::convert::Into<crate::model::DataEncryptionState>,
250    {
251        self.data_encryption_state = std::option::Option::Some(v.into());
252        self
253    }
254
255    /// Sets or clears the value of [data_encryption_state][crate::model::Repository::data_encryption_state].
256    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
257    where
258        T: std::convert::Into<crate::model::DataEncryptionState>,
259    {
260        self.data_encryption_state = v.map(|x| x.into());
261        self
262    }
263
264    /// Sets the value of [internal_metadata][crate::model::Repository::internal_metadata].
265    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
266    where
267        T: std::convert::Into<std::string::String>,
268    {
269        self.internal_metadata = std::option::Option::Some(v.into());
270        self
271    }
272
273    /// Sets or clears the value of [internal_metadata][crate::model::Repository::internal_metadata].
274    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
275    where
276        T: std::convert::Into<std::string::String>,
277    {
278        self.internal_metadata = v.map(|x| x.into());
279        self
280    }
281}
282
283impl wkt::message::Message for Repository {
284    fn typename() -> &'static str {
285        "type.googleapis.com/google.cloud.dataform.v1.Repository"
286    }
287}
288
289/// Defines additional types related to [Repository].
290pub mod repository {
291    #[allow(unused_imports)]
292    use super::*;
293
294    /// Controls Git remote configuration for a repository.
295    #[derive(Clone, Default, PartialEq)]
296    #[non_exhaustive]
297    pub struct GitRemoteSettings {
298        /// Required. The Git remote's URL.
299        pub url: std::string::String,
300
301        /// Required. The Git remote's default branch name.
302        pub default_branch: std::string::String,
303
304        /// Optional. The name of the Secret Manager secret version to use as an
305        /// authentication token for Git operations. Must be in the format
306        /// `projects/*/secrets/*/versions/*`.
307        pub authentication_token_secret_version: std::string::String,
308
309        /// Optional. Authentication fields for remote uris using SSH protocol.
310        pub ssh_authentication_config: std::option::Option<
311            crate::model::repository::git_remote_settings::SshAuthenticationConfig,
312        >,
313
314        /// Output only. Deprecated: The field does not contain any token status
315        /// information.
316        #[deprecated]
317        pub token_status: crate::model::repository::git_remote_settings::TokenStatus,
318
319        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
320    }
321
322    impl GitRemoteSettings {
323        pub fn new() -> Self {
324            std::default::Default::default()
325        }
326
327        /// Sets the value of [url][crate::model::repository::GitRemoteSettings::url].
328        pub fn set_url<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
329            self.url = v.into();
330            self
331        }
332
333        /// Sets the value of [default_branch][crate::model::repository::GitRemoteSettings::default_branch].
334        pub fn set_default_branch<T: std::convert::Into<std::string::String>>(
335            mut self,
336            v: T,
337        ) -> Self {
338            self.default_branch = v.into();
339            self
340        }
341
342        /// Sets the value of [authentication_token_secret_version][crate::model::repository::GitRemoteSettings::authentication_token_secret_version].
343        pub fn set_authentication_token_secret_version<
344            T: std::convert::Into<std::string::String>,
345        >(
346            mut self,
347            v: T,
348        ) -> Self {
349            self.authentication_token_secret_version = v.into();
350            self
351        }
352
353        /// Sets the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
354        pub fn set_ssh_authentication_config<T>(mut self, v: T) -> Self
355        where
356            T: std::convert::Into<
357                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
358                >,
359        {
360            self.ssh_authentication_config = std::option::Option::Some(v.into());
361            self
362        }
363
364        /// Sets or clears the value of [ssh_authentication_config][crate::model::repository::GitRemoteSettings::ssh_authentication_config].
365        pub fn set_or_clear_ssh_authentication_config<T>(
366            mut self,
367            v: std::option::Option<T>,
368        ) -> Self
369        where
370            T: std::convert::Into<
371                    crate::model::repository::git_remote_settings::SshAuthenticationConfig,
372                >,
373        {
374            self.ssh_authentication_config = v.map(|x| x.into());
375            self
376        }
377
378        /// Sets the value of [token_status][crate::model::repository::GitRemoteSettings::token_status].
379        #[deprecated]
380        pub fn set_token_status<
381            T: std::convert::Into<crate::model::repository::git_remote_settings::TokenStatus>,
382        >(
383            mut self,
384            v: T,
385        ) -> Self {
386            self.token_status = v.into();
387            self
388        }
389    }
390
391    impl wkt::message::Message for GitRemoteSettings {
392        fn typename() -> &'static str {
393            "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings"
394        }
395    }
396
397    /// Defines additional types related to [GitRemoteSettings].
398    pub mod git_remote_settings {
399        #[allow(unused_imports)]
400        use super::*;
401
402        /// Configures fields for performing SSH authentication.
403        #[derive(Clone, Default, PartialEq)]
404        #[non_exhaustive]
405        pub struct SshAuthenticationConfig {
406            /// Required. The name of the Secret Manager secret version to use as a
407            /// ssh private key for Git operations.
408            /// Must be in the format `projects/*/secrets/*/versions/*`.
409            pub user_private_key_secret_version: std::string::String,
410
411            /// Required. Content of a public SSH key to verify an identity of a remote
412            /// Git host.
413            pub host_public_key: std::string::String,
414
415            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
416        }
417
418        impl SshAuthenticationConfig {
419            pub fn new() -> Self {
420                std::default::Default::default()
421            }
422
423            /// Sets the value of [user_private_key_secret_version][crate::model::repository::git_remote_settings::SshAuthenticationConfig::user_private_key_secret_version].
424            pub fn set_user_private_key_secret_version<
425                T: std::convert::Into<std::string::String>,
426            >(
427                mut self,
428                v: T,
429            ) -> Self {
430                self.user_private_key_secret_version = v.into();
431                self
432            }
433
434            /// Sets the value of [host_public_key][crate::model::repository::git_remote_settings::SshAuthenticationConfig::host_public_key].
435            pub fn set_host_public_key<T: std::convert::Into<std::string::String>>(
436                mut self,
437                v: T,
438            ) -> Self {
439                self.host_public_key = v.into();
440                self
441            }
442        }
443
444        impl wkt::message::Message for SshAuthenticationConfig {
445            fn typename() -> &'static str {
446                "type.googleapis.com/google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfig"
447            }
448        }
449
450        /// The status of the authentication token.
451        ///
452        /// # Working with unknown values
453        ///
454        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
455        /// additional enum variants at any time. Adding new variants is not considered
456        /// a breaking change. Applications should write their code in anticipation of:
457        ///
458        /// - New values appearing in future releases of the client library, **and**
459        /// - New values received dynamically, without application changes.
460        ///
461        /// Please consult the [Working with enums] section in the user guide for some
462        /// guidelines.
463        ///
464        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
465        #[derive(Clone, Debug, PartialEq)]
466        #[non_exhaustive]
467        pub enum TokenStatus {
468            /// Default value. This value is unused.
469            Unspecified,
470            /// The token could not be found in Secret Manager (or the Dataform
471            /// Service Account did not have permission to access it).
472            NotFound,
473            /// The token could not be used to authenticate against the Git remote.
474            Invalid,
475            /// The token was used successfully to authenticate against the Git remote.
476            Valid,
477            /// If set, the enum was initialized with an unknown value.
478            ///
479            /// Applications can examine the value using [TokenStatus::value] or
480            /// [TokenStatus::name].
481            UnknownValue(token_status::UnknownValue),
482        }
483
484        #[doc(hidden)]
485        pub mod token_status {
486            #[allow(unused_imports)]
487            use super::*;
488            #[derive(Clone, Debug, PartialEq)]
489            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
490        }
491
492        impl TokenStatus {
493            /// Gets the enum value.
494            ///
495            /// Returns `None` if the enum contains an unknown value deserialized from
496            /// the string representation of enums.
497            pub fn value(&self) -> std::option::Option<i32> {
498                match self {
499                    Self::Unspecified => std::option::Option::Some(0),
500                    Self::NotFound => std::option::Option::Some(1),
501                    Self::Invalid => std::option::Option::Some(2),
502                    Self::Valid => std::option::Option::Some(3),
503                    Self::UnknownValue(u) => u.0.value(),
504                }
505            }
506
507            /// Gets the enum value as a string.
508            ///
509            /// Returns `None` if the enum contains an unknown value deserialized from
510            /// the integer representation of enums.
511            pub fn name(&self) -> std::option::Option<&str> {
512                match self {
513                    Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
514                    Self::NotFound => std::option::Option::Some("NOT_FOUND"),
515                    Self::Invalid => std::option::Option::Some("INVALID"),
516                    Self::Valid => std::option::Option::Some("VALID"),
517                    Self::UnknownValue(u) => u.0.name(),
518                }
519            }
520        }
521
522        impl std::default::Default for TokenStatus {
523            fn default() -> Self {
524                use std::convert::From;
525                Self::from(0)
526            }
527        }
528
529        impl std::fmt::Display for TokenStatus {
530            fn fmt(
531                &self,
532                f: &mut std::fmt::Formatter<'_>,
533            ) -> std::result::Result<(), std::fmt::Error> {
534                wkt::internal::display_enum(f, self.name(), self.value())
535            }
536        }
537
538        impl std::convert::From<i32> for TokenStatus {
539            fn from(value: i32) -> Self {
540                match value {
541                    0 => Self::Unspecified,
542                    1 => Self::NotFound,
543                    2 => Self::Invalid,
544                    3 => Self::Valid,
545                    _ => Self::UnknownValue(token_status::UnknownValue(
546                        wkt::internal::UnknownEnumValue::Integer(value),
547                    )),
548                }
549            }
550        }
551
552        impl std::convert::From<&str> for TokenStatus {
553            fn from(value: &str) -> Self {
554                use std::string::ToString;
555                match value {
556                    "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
557                    "NOT_FOUND" => Self::NotFound,
558                    "INVALID" => Self::Invalid,
559                    "VALID" => Self::Valid,
560                    _ => Self::UnknownValue(token_status::UnknownValue(
561                        wkt::internal::UnknownEnumValue::String(value.to_string()),
562                    )),
563                }
564            }
565        }
566
567        impl serde::ser::Serialize for TokenStatus {
568            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
569            where
570                S: serde::Serializer,
571            {
572                match self {
573                    Self::Unspecified => serializer.serialize_i32(0),
574                    Self::NotFound => serializer.serialize_i32(1),
575                    Self::Invalid => serializer.serialize_i32(2),
576                    Self::Valid => serializer.serialize_i32(3),
577                    Self::UnknownValue(u) => u.0.serialize(serializer),
578                }
579            }
580        }
581
582        impl<'de> serde::de::Deserialize<'de> for TokenStatus {
583            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
584            where
585                D: serde::Deserializer<'de>,
586            {
587                deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
588                    ".google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatus",
589                ))
590            }
591        }
592    }
593
594    /// Configures workspace compilation overrides for a repository.
595    #[derive(Clone, Default, PartialEq)]
596    #[non_exhaustive]
597    pub struct WorkspaceCompilationOverrides {
598        /// Optional. The default database (Google Cloud project ID).
599        pub default_database: std::string::String,
600
601        /// Optional. The suffix that should be appended to all schema (BigQuery
602        /// dataset ID) names.
603        pub schema_suffix: std::string::String,
604
605        /// Optional. The prefix that should be prepended to all table names.
606        pub table_prefix: std::string::String,
607
608        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
609    }
610
611    impl WorkspaceCompilationOverrides {
612        pub fn new() -> Self {
613            std::default::Default::default()
614        }
615
616        /// Sets the value of [default_database][crate::model::repository::WorkspaceCompilationOverrides::default_database].
617        pub fn set_default_database<T: std::convert::Into<std::string::String>>(
618            mut self,
619            v: T,
620        ) -> Self {
621            self.default_database = v.into();
622            self
623        }
624
625        /// Sets the value of [schema_suffix][crate::model::repository::WorkspaceCompilationOverrides::schema_suffix].
626        pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(
627            mut self,
628            v: T,
629        ) -> Self {
630            self.schema_suffix = v.into();
631            self
632        }
633
634        /// Sets the value of [table_prefix][crate::model::repository::WorkspaceCompilationOverrides::table_prefix].
635        pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(
636            mut self,
637            v: T,
638        ) -> Self {
639            self.table_prefix = v.into();
640            self
641        }
642    }
643
644    impl wkt::message::Message for WorkspaceCompilationOverrides {
645        fn typename() -> &'static str {
646            "type.googleapis.com/google.cloud.dataform.v1.Repository.WorkspaceCompilationOverrides"
647        }
648    }
649}
650
651/// `ListRepositories` request message.
652#[derive(Clone, Default, PartialEq)]
653#[non_exhaustive]
654pub struct ListRepositoriesRequest {
655    /// Required. The location in which to list repositories. Must be in the format
656    /// `projects/*/locations/*`.
657    pub parent: std::string::String,
658
659    /// Optional. Maximum number of repositories to return. The server may return
660    /// fewer items than requested. If unspecified, the server will pick an
661    /// appropriate default.
662    pub page_size: i32,
663
664    /// Optional. Page token received from a previous `ListRepositories` call.
665    /// Provide this to retrieve the subsequent page.
666    ///
667    /// When paginating, all other parameters provided to `ListRepositories`,
668    /// with the exception of `page_size`, must match the call that provided the
669    /// page token.
670    pub page_token: std::string::String,
671
672    /// Optional. This field only supports ordering by `name`. If unspecified, the
673    /// server will choose the ordering. If specified, the default order is
674    /// ascending for the `name` field.
675    pub order_by: std::string::String,
676
677    /// Optional. Filter for the returned list.
678    pub filter: std::string::String,
679
680    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
681}
682
683impl ListRepositoriesRequest {
684    pub fn new() -> Self {
685        std::default::Default::default()
686    }
687
688    /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
689    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
690        self.parent = v.into();
691        self
692    }
693
694    /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
695    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
696        self.page_size = v.into();
697        self
698    }
699
700    /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
701    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
702        self.page_token = v.into();
703        self
704    }
705
706    /// Sets the value of [order_by][crate::model::ListRepositoriesRequest::order_by].
707    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
708        self.order_by = v.into();
709        self
710    }
711
712    /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
713    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
714        self.filter = v.into();
715        self
716    }
717}
718
719impl wkt::message::Message for ListRepositoriesRequest {
720    fn typename() -> &'static str {
721        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesRequest"
722    }
723}
724
725/// `ListRepositories` response message.
726#[derive(Clone, Default, PartialEq)]
727#[non_exhaustive]
728pub struct ListRepositoriesResponse {
729    /// List of repositories.
730    pub repositories: std::vec::Vec<crate::model::Repository>,
731
732    /// A token which can be sent as `page_token` to retrieve the next page.
733    /// If this field is omitted, there are no subsequent pages.
734    pub next_page_token: std::string::String,
735
736    /// Locations which could not be reached.
737    pub unreachable: std::vec::Vec<std::string::String>,
738
739    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
740}
741
742impl ListRepositoriesResponse {
743    pub fn new() -> Self {
744        std::default::Default::default()
745    }
746
747    /// Sets the value of [repositories][crate::model::ListRepositoriesResponse::repositories].
748    pub fn set_repositories<T, V>(mut self, v: T) -> Self
749    where
750        T: std::iter::IntoIterator<Item = V>,
751        V: std::convert::Into<crate::model::Repository>,
752    {
753        use std::iter::Iterator;
754        self.repositories = v.into_iter().map(|i| i.into()).collect();
755        self
756    }
757
758    /// Sets the value of [next_page_token][crate::model::ListRepositoriesResponse::next_page_token].
759    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
760        self.next_page_token = v.into();
761        self
762    }
763
764    /// Sets the value of [unreachable][crate::model::ListRepositoriesResponse::unreachable].
765    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
766    where
767        T: std::iter::IntoIterator<Item = V>,
768        V: std::convert::Into<std::string::String>,
769    {
770        use std::iter::Iterator;
771        self.unreachable = v.into_iter().map(|i| i.into()).collect();
772        self
773    }
774}
775
776impl wkt::message::Message for ListRepositoriesResponse {
777    fn typename() -> &'static str {
778        "type.googleapis.com/google.cloud.dataform.v1.ListRepositoriesResponse"
779    }
780}
781
782#[doc(hidden)]
783impl gax::paginator::internal::PageableResponse for ListRepositoriesResponse {
784    type PageItem = crate::model::Repository;
785
786    fn items(self) -> std::vec::Vec<Self::PageItem> {
787        self.repositories
788    }
789
790    fn next_page_token(&self) -> std::string::String {
791        use std::clone::Clone;
792        self.next_page_token.clone()
793    }
794}
795
796/// `GetRepository` request message.
797#[derive(Clone, Default, PartialEq)]
798#[non_exhaustive]
799pub struct GetRepositoryRequest {
800    /// Required. The repository's name.
801    pub name: std::string::String,
802
803    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
804}
805
806impl GetRepositoryRequest {
807    pub fn new() -> Self {
808        std::default::Default::default()
809    }
810
811    /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
812    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
813        self.name = v.into();
814        self
815    }
816}
817
818impl wkt::message::Message for GetRepositoryRequest {
819    fn typename() -> &'static str {
820        "type.googleapis.com/google.cloud.dataform.v1.GetRepositoryRequest"
821    }
822}
823
824/// `CreateRepository` request message.
825#[derive(Clone, Default, PartialEq)]
826#[non_exhaustive]
827pub struct CreateRepositoryRequest {
828    /// Required. The location in which to create the repository. Must be in the
829    /// format `projects/*/locations/*`.
830    pub parent: std::string::String,
831
832    /// Required. The repository to create.
833    pub repository: std::option::Option<crate::model::Repository>,
834
835    /// Required. The ID to use for the repository, which will become the final
836    /// component of the repository's resource name.
837    pub repository_id: std::string::String,
838
839    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
840}
841
842impl CreateRepositoryRequest {
843    pub fn new() -> Self {
844        std::default::Default::default()
845    }
846
847    /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
848    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
849        self.parent = v.into();
850        self
851    }
852
853    /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
854    pub fn set_repository<T>(mut self, v: T) -> Self
855    where
856        T: std::convert::Into<crate::model::Repository>,
857    {
858        self.repository = std::option::Option::Some(v.into());
859        self
860    }
861
862    /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
863    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
864    where
865        T: std::convert::Into<crate::model::Repository>,
866    {
867        self.repository = v.map(|x| x.into());
868        self
869    }
870
871    /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
872    pub fn set_repository_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
873        self.repository_id = v.into();
874        self
875    }
876}
877
878impl wkt::message::Message for CreateRepositoryRequest {
879    fn typename() -> &'static str {
880        "type.googleapis.com/google.cloud.dataform.v1.CreateRepositoryRequest"
881    }
882}
883
884/// `UpdateRepository` request message.
885#[derive(Clone, Default, PartialEq)]
886#[non_exhaustive]
887pub struct UpdateRepositoryRequest {
888    /// Optional. Specifies the fields to be updated in the repository. If left
889    /// unset, all fields will be updated.
890    pub update_mask: std::option::Option<wkt::FieldMask>,
891
892    /// Required. The repository to update.
893    pub repository: std::option::Option<crate::model::Repository>,
894
895    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
896}
897
898impl UpdateRepositoryRequest {
899    pub fn new() -> Self {
900        std::default::Default::default()
901    }
902
903    /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
904    pub fn set_update_mask<T>(mut self, v: T) -> Self
905    where
906        T: std::convert::Into<wkt::FieldMask>,
907    {
908        self.update_mask = std::option::Option::Some(v.into());
909        self
910    }
911
912    /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
913    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
914    where
915        T: std::convert::Into<wkt::FieldMask>,
916    {
917        self.update_mask = v.map(|x| x.into());
918        self
919    }
920
921    /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
922    pub fn set_repository<T>(mut self, v: T) -> Self
923    where
924        T: std::convert::Into<crate::model::Repository>,
925    {
926        self.repository = std::option::Option::Some(v.into());
927        self
928    }
929
930    /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
931    pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
932    where
933        T: std::convert::Into<crate::model::Repository>,
934    {
935        self.repository = v.map(|x| x.into());
936        self
937    }
938}
939
940impl wkt::message::Message for UpdateRepositoryRequest {
941    fn typename() -> &'static str {
942        "type.googleapis.com/google.cloud.dataform.v1.UpdateRepositoryRequest"
943    }
944}
945
946/// `DeleteRepository` request message.
947#[derive(Clone, Default, PartialEq)]
948#[non_exhaustive]
949pub struct DeleteRepositoryRequest {
950    /// Required. The repository's name.
951    pub name: std::string::String,
952
953    /// Optional. If set to true, any child resources of this repository will also
954    /// be deleted. (Otherwise, the request will only succeed if the repository has
955    /// no child resources.)
956    pub force: bool,
957
958    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
959}
960
961impl DeleteRepositoryRequest {
962    pub fn new() -> Self {
963        std::default::Default::default()
964    }
965
966    /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
967    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
968        self.name = v.into();
969        self
970    }
971
972    /// Sets the value of [force][crate::model::DeleteRepositoryRequest::force].
973    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
974        self.force = v.into();
975        self
976    }
977}
978
979impl wkt::message::Message for DeleteRepositoryRequest {
980    fn typename() -> &'static str {
981        "type.googleapis.com/google.cloud.dataform.v1.DeleteRepositoryRequest"
982    }
983}
984
985/// `CommitRepositoryChanges` request message.
986#[derive(Clone, Default, PartialEq)]
987#[non_exhaustive]
988pub struct CommitRepositoryChangesRequest {
989    /// Required. The repository's name.
990    pub name: std::string::String,
991
992    /// Required. The changes to commit to the repository.
993    pub commit_metadata: std::option::Option<crate::model::CommitMetadata>,
994
995    /// Optional. The commit SHA which must be the repository's current HEAD before
996    /// applying this commit; otherwise this request will fail. If unset, no
997    /// validation on the current HEAD commit SHA is performed.
998    pub required_head_commit_sha: std::string::String,
999
1000    /// Optional. A map to the path of the file to the operation. The path is the
1001    /// full file path including filename, from repository root.
1002    pub file_operations: std::collections::HashMap<
1003        std::string::String,
1004        crate::model::commit_repository_changes_request::FileOperation,
1005    >,
1006
1007    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1008}
1009
1010impl CommitRepositoryChangesRequest {
1011    pub fn new() -> Self {
1012        std::default::Default::default()
1013    }
1014
1015    /// Sets the value of [name][crate::model::CommitRepositoryChangesRequest::name].
1016    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1017        self.name = v.into();
1018        self
1019    }
1020
1021    /// Sets the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1022    pub fn set_commit_metadata<T>(mut self, v: T) -> Self
1023    where
1024        T: std::convert::Into<crate::model::CommitMetadata>,
1025    {
1026        self.commit_metadata = std::option::Option::Some(v.into());
1027        self
1028    }
1029
1030    /// Sets or clears the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
1031    pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
1032    where
1033        T: std::convert::Into<crate::model::CommitMetadata>,
1034    {
1035        self.commit_metadata = v.map(|x| x.into());
1036        self
1037    }
1038
1039    /// Sets the value of [required_head_commit_sha][crate::model::CommitRepositoryChangesRequest::required_head_commit_sha].
1040    pub fn set_required_head_commit_sha<T: std::convert::Into<std::string::String>>(
1041        mut self,
1042        v: T,
1043    ) -> Self {
1044        self.required_head_commit_sha = v.into();
1045        self
1046    }
1047
1048    /// Sets the value of [file_operations][crate::model::CommitRepositoryChangesRequest::file_operations].
1049    pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
1050    where
1051        T: std::iter::IntoIterator<Item = (K, V)>,
1052        K: std::convert::Into<std::string::String>,
1053        V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
1054    {
1055        use std::iter::Iterator;
1056        self.file_operations = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1057        self
1058    }
1059}
1060
1061impl wkt::message::Message for CommitRepositoryChangesRequest {
1062    fn typename() -> &'static str {
1063        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest"
1064    }
1065}
1066
1067/// Defines additional types related to [CommitRepositoryChangesRequest].
1068pub mod commit_repository_changes_request {
1069    #[allow(unused_imports)]
1070    use super::*;
1071
1072    /// Represents a single file operation to the repository.
1073    #[derive(Clone, Default, PartialEq)]
1074    #[non_exhaustive]
1075    pub struct FileOperation {
1076        /// The operation to perform on the file.
1077        pub operation: std::option::Option<
1078            crate::model::commit_repository_changes_request::file_operation::Operation,
1079        >,
1080
1081        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1082    }
1083
1084    impl FileOperation {
1085        pub fn new() -> Self {
1086            std::default::Default::default()
1087        }
1088
1089        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation].
1090        ///
1091        /// Note that all the setters affecting `operation` are mutually
1092        /// exclusive.
1093        pub fn set_operation<
1094            T: std::convert::Into<
1095                    std::option::Option<
1096                        crate::model::commit_repository_changes_request::file_operation::Operation,
1097                    >,
1098                >,
1099        >(
1100            mut self,
1101            v: T,
1102        ) -> Self {
1103            self.operation = v.into();
1104            self
1105        }
1106
1107        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1108        /// if it holds a `WriteFile`, `None` if the field is not set or
1109        /// holds a different branch.
1110        pub fn write_file(
1111            &self,
1112        ) -> std::option::Option<
1113            &std::boxed::Box<
1114                crate::model::commit_repository_changes_request::file_operation::WriteFile,
1115            >,
1116        > {
1117            #[allow(unreachable_patterns)]
1118            self.operation.as_ref().and_then(|v| match v {
1119                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(v) => std::option::Option::Some(v),
1120                _ => std::option::Option::None,
1121            })
1122        }
1123
1124        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1125        /// to hold a `WriteFile`.
1126        ///
1127        /// Note that all the setters affecting `operation` are
1128        /// mutually exclusive.
1129        pub fn set_write_file<
1130            T: std::convert::Into<
1131                    std::boxed::Box<
1132                        crate::model::commit_repository_changes_request::file_operation::WriteFile,
1133                    >,
1134                >,
1135        >(
1136            mut self,
1137            v: T,
1138        ) -> Self {
1139            self.operation = std::option::Option::Some(
1140                crate::model::commit_repository_changes_request::file_operation::Operation::WriteFile(
1141                    v.into()
1142                )
1143            );
1144            self
1145        }
1146
1147        /// The value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1148        /// if it holds a `DeleteFile`, `None` if the field is not set or
1149        /// holds a different branch.
1150        pub fn delete_file(
1151            &self,
1152        ) -> std::option::Option<
1153            &std::boxed::Box<
1154                crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1155            >,
1156        > {
1157            #[allow(unreachable_patterns)]
1158            self.operation.as_ref().and_then(|v| match v {
1159                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(v) => std::option::Option::Some(v),
1160                _ => std::option::Option::None,
1161            })
1162        }
1163
1164        /// Sets the value of [operation][crate::model::commit_repository_changes_request::FileOperation::operation]
1165        /// to hold a `DeleteFile`.
1166        ///
1167        /// Note that all the setters affecting `operation` are
1168        /// mutually exclusive.
1169        pub fn set_delete_file<
1170            T: std::convert::Into<
1171                    std::boxed::Box<
1172                        crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1173                    >,
1174                >,
1175        >(
1176            mut self,
1177            v: T,
1178        ) -> Self {
1179            self.operation = std::option::Option::Some(
1180                crate::model::commit_repository_changes_request::file_operation::Operation::DeleteFile(
1181                    v.into()
1182                )
1183            );
1184            self
1185        }
1186    }
1187
1188    impl wkt::message::Message for FileOperation {
1189        fn typename() -> &'static str {
1190            "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation"
1191        }
1192    }
1193
1194    /// Defines additional types related to [FileOperation].
1195    pub mod file_operation {
1196        #[allow(unused_imports)]
1197        use super::*;
1198
1199        /// Represents the write file operation (for files added or modified).
1200        #[derive(Clone, Default, PartialEq)]
1201        #[non_exhaustive]
1202        pub struct WriteFile {
1203            /// The file's contents.
1204            pub contents: ::bytes::Bytes,
1205
1206            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1207        }
1208
1209        impl WriteFile {
1210            pub fn new() -> Self {
1211                std::default::Default::default()
1212            }
1213
1214            /// Sets the value of [contents][crate::model::commit_repository_changes_request::file_operation::WriteFile::contents].
1215            pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1216                self.contents = v.into();
1217                self
1218            }
1219        }
1220
1221        impl wkt::message::Message for WriteFile {
1222            fn typename() -> &'static str {
1223                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFile"
1224            }
1225        }
1226
1227        /// Represents the delete file operation.
1228        #[derive(Clone, Default, PartialEq)]
1229        #[non_exhaustive]
1230        pub struct DeleteFile {
1231            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1232        }
1233
1234        impl DeleteFile {
1235            pub fn new() -> Self {
1236                std::default::Default::default()
1237            }
1238        }
1239
1240        impl wkt::message::Message for DeleteFile {
1241            fn typename() -> &'static str {
1242                "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFile"
1243            }
1244        }
1245
1246        /// The operation to perform on the file.
1247        #[derive(Clone, Debug, PartialEq)]
1248        #[non_exhaustive]
1249        pub enum Operation {
1250            /// Represents the write operation.
1251            WriteFile(
1252                std::boxed::Box<
1253                    crate::model::commit_repository_changes_request::file_operation::WriteFile,
1254                >,
1255            ),
1256            /// Represents the delete operation.
1257            DeleteFile(
1258                std::boxed::Box<
1259                    crate::model::commit_repository_changes_request::file_operation::DeleteFile,
1260                >,
1261            ),
1262        }
1263    }
1264}
1265
1266/// `CommitRepositoryChanges` response message.
1267#[derive(Clone, Default, PartialEq)]
1268#[non_exhaustive]
1269pub struct CommitRepositoryChangesResponse {
1270    /// The commit SHA of the current commit.
1271    pub commit_sha: std::string::String,
1272
1273    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1274}
1275
1276impl CommitRepositoryChangesResponse {
1277    pub fn new() -> Self {
1278        std::default::Default::default()
1279    }
1280
1281    /// Sets the value of [commit_sha][crate::model::CommitRepositoryChangesResponse::commit_sha].
1282    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1283        self.commit_sha = v.into();
1284        self
1285    }
1286}
1287
1288impl wkt::message::Message for CommitRepositoryChangesResponse {
1289    fn typename() -> &'static str {
1290        "type.googleapis.com/google.cloud.dataform.v1.CommitRepositoryChangesResponse"
1291    }
1292}
1293
1294/// `ReadRepositoryFile` request message.
1295#[derive(Clone, Default, PartialEq)]
1296#[non_exhaustive]
1297pub struct ReadRepositoryFileRequest {
1298    /// Required. The repository's name.
1299    pub name: std::string::String,
1300
1301    /// Optional. The commit SHA for the commit to read from. If unset, the file
1302    /// will be read from HEAD.
1303    pub commit_sha: std::string::String,
1304
1305    /// Required. Full file path to read including filename, from repository root.
1306    pub path: std::string::String,
1307
1308    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1309}
1310
1311impl ReadRepositoryFileRequest {
1312    pub fn new() -> Self {
1313        std::default::Default::default()
1314    }
1315
1316    /// Sets the value of [name][crate::model::ReadRepositoryFileRequest::name].
1317    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1318        self.name = v.into();
1319        self
1320    }
1321
1322    /// Sets the value of [commit_sha][crate::model::ReadRepositoryFileRequest::commit_sha].
1323    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1324        self.commit_sha = v.into();
1325        self
1326    }
1327
1328    /// Sets the value of [path][crate::model::ReadRepositoryFileRequest::path].
1329    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1330        self.path = v.into();
1331        self
1332    }
1333}
1334
1335impl wkt::message::Message for ReadRepositoryFileRequest {
1336    fn typename() -> &'static str {
1337        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileRequest"
1338    }
1339}
1340
1341/// `ReadRepositoryFile` response message.
1342#[derive(Clone, Default, PartialEq)]
1343#[non_exhaustive]
1344pub struct ReadRepositoryFileResponse {
1345    /// The file's contents.
1346    pub contents: ::bytes::Bytes,
1347
1348    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1349}
1350
1351impl ReadRepositoryFileResponse {
1352    pub fn new() -> Self {
1353        std::default::Default::default()
1354    }
1355
1356    /// Sets the value of [contents][crate::model::ReadRepositoryFileResponse::contents].
1357    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
1358        self.contents = v.into();
1359        self
1360    }
1361}
1362
1363impl wkt::message::Message for ReadRepositoryFileResponse {
1364    fn typename() -> &'static str {
1365        "type.googleapis.com/google.cloud.dataform.v1.ReadRepositoryFileResponse"
1366    }
1367}
1368
1369/// `QueryRepositoryDirectoryContents` request message.
1370#[derive(Clone, Default, PartialEq)]
1371#[non_exhaustive]
1372pub struct QueryRepositoryDirectoryContentsRequest {
1373    /// Required. The repository's name.
1374    pub name: std::string::String,
1375
1376    /// Optional. The Commit SHA for the commit to query from. If unset, the
1377    /// directory will be queried from HEAD.
1378    pub commit_sha: std::string::String,
1379
1380    /// Optional. The directory's full path including directory name, relative to
1381    /// root. If left unset, the root is used.
1382    pub path: std::string::String,
1383
1384    /// Optional. Maximum number of paths to return. The server may return fewer
1385    /// items than requested. If unspecified, the server will pick an appropriate
1386    /// default.
1387    pub page_size: i32,
1388
1389    /// Optional. Page token received from a previous
1390    /// `QueryRepositoryDirectoryContents` call. Provide this to retrieve the
1391    /// subsequent page.
1392    ///
1393    /// When paginating, all other parameters provided to
1394    /// `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must
1395    /// match the call that provided the page token.
1396    pub page_token: std::string::String,
1397
1398    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1399}
1400
1401impl QueryRepositoryDirectoryContentsRequest {
1402    pub fn new() -> Self {
1403        std::default::Default::default()
1404    }
1405
1406    /// Sets the value of [name][crate::model::QueryRepositoryDirectoryContentsRequest::name].
1407    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1408        self.name = v.into();
1409        self
1410    }
1411
1412    /// Sets the value of [commit_sha][crate::model::QueryRepositoryDirectoryContentsRequest::commit_sha].
1413    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1414        self.commit_sha = v.into();
1415        self
1416    }
1417
1418    /// Sets the value of [path][crate::model::QueryRepositoryDirectoryContentsRequest::path].
1419    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1420        self.path = v.into();
1421        self
1422    }
1423
1424    /// Sets the value of [page_size][crate::model::QueryRepositoryDirectoryContentsRequest::page_size].
1425    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1426        self.page_size = v.into();
1427        self
1428    }
1429
1430    /// Sets the value of [page_token][crate::model::QueryRepositoryDirectoryContentsRequest::page_token].
1431    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1432        self.page_token = v.into();
1433        self
1434    }
1435}
1436
1437impl wkt::message::Message for QueryRepositoryDirectoryContentsRequest {
1438    fn typename() -> &'static str {
1439        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest"
1440    }
1441}
1442
1443/// `QueryRepositoryDirectoryContents` response message.
1444#[derive(Clone, Default, PartialEq)]
1445#[non_exhaustive]
1446pub struct QueryRepositoryDirectoryContentsResponse {
1447    /// List of entries in the directory.
1448    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
1449
1450    /// A token, which can be sent as `page_token` to retrieve the next page.
1451    /// If this field is omitted, there are no subsequent pages.
1452    pub next_page_token: std::string::String,
1453
1454    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1455}
1456
1457impl QueryRepositoryDirectoryContentsResponse {
1458    pub fn new() -> Self {
1459        std::default::Default::default()
1460    }
1461
1462    /// Sets the value of [directory_entries][crate::model::QueryRepositoryDirectoryContentsResponse::directory_entries].
1463    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
1464    where
1465        T: std::iter::IntoIterator<Item = V>,
1466        V: std::convert::Into<crate::model::DirectoryEntry>,
1467    {
1468        use std::iter::Iterator;
1469        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
1470        self
1471    }
1472
1473    /// Sets the value of [next_page_token][crate::model::QueryRepositoryDirectoryContentsResponse::next_page_token].
1474    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1475        self.next_page_token = v.into();
1476        self
1477    }
1478}
1479
1480impl wkt::message::Message for QueryRepositoryDirectoryContentsResponse {
1481    fn typename() -> &'static str {
1482        "type.googleapis.com/google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse"
1483    }
1484}
1485
1486#[doc(hidden)]
1487impl gax::paginator::internal::PageableResponse for QueryRepositoryDirectoryContentsResponse {
1488    type PageItem = crate::model::DirectoryEntry;
1489
1490    fn items(self) -> std::vec::Vec<Self::PageItem> {
1491        self.directory_entries
1492    }
1493
1494    fn next_page_token(&self) -> std::string::String {
1495        use std::clone::Clone;
1496        self.next_page_token.clone()
1497    }
1498}
1499
1500/// `FetchRepositoryHistory` request message.
1501#[derive(Clone, Default, PartialEq)]
1502#[non_exhaustive]
1503pub struct FetchRepositoryHistoryRequest {
1504    /// Required. The repository's name.
1505    pub name: std::string::String,
1506
1507    /// Optional. Maximum number of commits to return. The server may return fewer
1508    /// items than requested. If unspecified, the server will pick an appropriate
1509    /// default.
1510    pub page_size: i32,
1511
1512    /// Optional. Page token received from a previous `FetchRepositoryHistory`
1513    /// call. Provide this to retrieve the subsequent page.
1514    ///
1515    /// When paginating, all other parameters provided to `FetchRepositoryHistory`,
1516    /// with the exception of `page_size`, must match the call that provided the
1517    /// page token.
1518    pub page_token: std::string::String,
1519
1520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1521}
1522
1523impl FetchRepositoryHistoryRequest {
1524    pub fn new() -> Self {
1525        std::default::Default::default()
1526    }
1527
1528    /// Sets the value of [name][crate::model::FetchRepositoryHistoryRequest::name].
1529    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1530        self.name = v.into();
1531        self
1532    }
1533
1534    /// Sets the value of [page_size][crate::model::FetchRepositoryHistoryRequest::page_size].
1535    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1536        self.page_size = v.into();
1537        self
1538    }
1539
1540    /// Sets the value of [page_token][crate::model::FetchRepositoryHistoryRequest::page_token].
1541    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1542        self.page_token = v.into();
1543        self
1544    }
1545}
1546
1547impl wkt::message::Message for FetchRepositoryHistoryRequest {
1548    fn typename() -> &'static str {
1549        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryRequest"
1550    }
1551}
1552
1553/// `FetchRepositoryHistory` response message.
1554#[derive(Clone, Default, PartialEq)]
1555#[non_exhaustive]
1556pub struct FetchRepositoryHistoryResponse {
1557    /// A list of commit logs, ordered by 'git log' default order.
1558    pub commits: std::vec::Vec<crate::model::CommitLogEntry>,
1559
1560    /// A token, which can be sent as `page_token` to retrieve the next page.
1561    /// If this field is omitted, there are no subsequent pages.
1562    pub next_page_token: std::string::String,
1563
1564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1565}
1566
1567impl FetchRepositoryHistoryResponse {
1568    pub fn new() -> Self {
1569        std::default::Default::default()
1570    }
1571
1572    /// Sets the value of [commits][crate::model::FetchRepositoryHistoryResponse::commits].
1573    pub fn set_commits<T, V>(mut self, v: T) -> Self
1574    where
1575        T: std::iter::IntoIterator<Item = V>,
1576        V: std::convert::Into<crate::model::CommitLogEntry>,
1577    {
1578        use std::iter::Iterator;
1579        self.commits = v.into_iter().map(|i| i.into()).collect();
1580        self
1581    }
1582
1583    /// Sets the value of [next_page_token][crate::model::FetchRepositoryHistoryResponse::next_page_token].
1584    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1585        self.next_page_token = v.into();
1586        self
1587    }
1588}
1589
1590impl wkt::message::Message for FetchRepositoryHistoryResponse {
1591    fn typename() -> &'static str {
1592        "type.googleapis.com/google.cloud.dataform.v1.FetchRepositoryHistoryResponse"
1593    }
1594}
1595
1596#[doc(hidden)]
1597impl gax::paginator::internal::PageableResponse for FetchRepositoryHistoryResponse {
1598    type PageItem = crate::model::CommitLogEntry;
1599
1600    fn items(self) -> std::vec::Vec<Self::PageItem> {
1601        self.commits
1602    }
1603
1604    fn next_page_token(&self) -> std::string::String {
1605        use std::clone::Clone;
1606        self.next_page_token.clone()
1607    }
1608}
1609
1610/// Represents a single commit log.
1611#[derive(Clone, Default, PartialEq)]
1612#[non_exhaustive]
1613pub struct CommitLogEntry {
1614    /// Commit timestamp.
1615    pub commit_time: std::option::Option<wkt::Timestamp>,
1616
1617    /// The commit SHA for this commit log entry.
1618    pub commit_sha: std::string::String,
1619
1620    /// The commit author for this commit log entry.
1621    pub author: std::option::Option<crate::model::CommitAuthor>,
1622
1623    /// The commit message for this commit log entry.
1624    pub commit_message: std::string::String,
1625
1626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1627}
1628
1629impl CommitLogEntry {
1630    pub fn new() -> Self {
1631        std::default::Default::default()
1632    }
1633
1634    /// Sets the value of [commit_time][crate::model::CommitLogEntry::commit_time].
1635    pub fn set_commit_time<T>(mut self, v: T) -> Self
1636    where
1637        T: std::convert::Into<wkt::Timestamp>,
1638    {
1639        self.commit_time = std::option::Option::Some(v.into());
1640        self
1641    }
1642
1643    /// Sets or clears the value of [commit_time][crate::model::CommitLogEntry::commit_time].
1644    pub fn set_or_clear_commit_time<T>(mut self, v: std::option::Option<T>) -> Self
1645    where
1646        T: std::convert::Into<wkt::Timestamp>,
1647    {
1648        self.commit_time = v.map(|x| x.into());
1649        self
1650    }
1651
1652    /// Sets the value of [commit_sha][crate::model::CommitLogEntry::commit_sha].
1653    pub fn set_commit_sha<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1654        self.commit_sha = v.into();
1655        self
1656    }
1657
1658    /// Sets the value of [author][crate::model::CommitLogEntry::author].
1659    pub fn set_author<T>(mut self, v: T) -> Self
1660    where
1661        T: std::convert::Into<crate::model::CommitAuthor>,
1662    {
1663        self.author = std::option::Option::Some(v.into());
1664        self
1665    }
1666
1667    /// Sets or clears the value of [author][crate::model::CommitLogEntry::author].
1668    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
1669    where
1670        T: std::convert::Into<crate::model::CommitAuthor>,
1671    {
1672        self.author = v.map(|x| x.into());
1673        self
1674    }
1675
1676    /// Sets the value of [commit_message][crate::model::CommitLogEntry::commit_message].
1677    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1678        self.commit_message = v.into();
1679        self
1680    }
1681}
1682
1683impl wkt::message::Message for CommitLogEntry {
1684    fn typename() -> &'static str {
1685        "type.googleapis.com/google.cloud.dataform.v1.CommitLogEntry"
1686    }
1687}
1688
1689/// Represents a Dataform Git commit.
1690#[derive(Clone, Default, PartialEq)]
1691#[non_exhaustive]
1692pub struct CommitMetadata {
1693    /// Required. The commit's author.
1694    pub author: std::option::Option<crate::model::CommitAuthor>,
1695
1696    /// Optional. The commit's message.
1697    pub commit_message: std::string::String,
1698
1699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1700}
1701
1702impl CommitMetadata {
1703    pub fn new() -> Self {
1704        std::default::Default::default()
1705    }
1706
1707    /// Sets the value of [author][crate::model::CommitMetadata::author].
1708    pub fn set_author<T>(mut self, v: T) -> Self
1709    where
1710        T: std::convert::Into<crate::model::CommitAuthor>,
1711    {
1712        self.author = std::option::Option::Some(v.into());
1713        self
1714    }
1715
1716    /// Sets or clears the value of [author][crate::model::CommitMetadata::author].
1717    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
1718    where
1719        T: std::convert::Into<crate::model::CommitAuthor>,
1720    {
1721        self.author = v.map(|x| x.into());
1722        self
1723    }
1724
1725    /// Sets the value of [commit_message][crate::model::CommitMetadata::commit_message].
1726    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1727        self.commit_message = v.into();
1728        self
1729    }
1730}
1731
1732impl wkt::message::Message for CommitMetadata {
1733    fn typename() -> &'static str {
1734        "type.googleapis.com/google.cloud.dataform.v1.CommitMetadata"
1735    }
1736}
1737
1738/// `ComputeRepositoryAccessTokenStatus` request message.
1739#[derive(Clone, Default, PartialEq)]
1740#[non_exhaustive]
1741pub struct ComputeRepositoryAccessTokenStatusRequest {
1742    /// Required. The repository's name.
1743    pub name: std::string::String,
1744
1745    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1746}
1747
1748impl ComputeRepositoryAccessTokenStatusRequest {
1749    pub fn new() -> Self {
1750        std::default::Default::default()
1751    }
1752
1753    /// Sets the value of [name][crate::model::ComputeRepositoryAccessTokenStatusRequest::name].
1754    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1755        self.name = v.into();
1756        self
1757    }
1758}
1759
1760impl wkt::message::Message for ComputeRepositoryAccessTokenStatusRequest {
1761    fn typename() -> &'static str {
1762        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest"
1763    }
1764}
1765
1766/// `ComputeRepositoryAccessTokenStatus` response message.
1767#[derive(Clone, Default, PartialEq)]
1768#[non_exhaustive]
1769pub struct ComputeRepositoryAccessTokenStatusResponse {
1770    /// Indicates the status of the Git access token.
1771    pub token_status: crate::model::compute_repository_access_token_status_response::TokenStatus,
1772
1773    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1774}
1775
1776impl ComputeRepositoryAccessTokenStatusResponse {
1777    pub fn new() -> Self {
1778        std::default::Default::default()
1779    }
1780
1781    /// Sets the value of [token_status][crate::model::ComputeRepositoryAccessTokenStatusResponse::token_status].
1782    pub fn set_token_status<
1783        T: std::convert::Into<
1784                crate::model::compute_repository_access_token_status_response::TokenStatus,
1785            >,
1786    >(
1787        mut self,
1788        v: T,
1789    ) -> Self {
1790        self.token_status = v.into();
1791        self
1792    }
1793}
1794
1795impl wkt::message::Message for ComputeRepositoryAccessTokenStatusResponse {
1796    fn typename() -> &'static str {
1797        "type.googleapis.com/google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse"
1798    }
1799}
1800
1801/// Defines additional types related to [ComputeRepositoryAccessTokenStatusResponse].
1802pub mod compute_repository_access_token_status_response {
1803    #[allow(unused_imports)]
1804    use super::*;
1805
1806    /// Indicates the status of a Git authentication token.
1807    ///
1808    /// # Working with unknown values
1809    ///
1810    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1811    /// additional enum variants at any time. Adding new variants is not considered
1812    /// a breaking change. Applications should write their code in anticipation of:
1813    ///
1814    /// - New values appearing in future releases of the client library, **and**
1815    /// - New values received dynamically, without application changes.
1816    ///
1817    /// Please consult the [Working with enums] section in the user guide for some
1818    /// guidelines.
1819    ///
1820    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1821    #[derive(Clone, Debug, PartialEq)]
1822    #[non_exhaustive]
1823    pub enum TokenStatus {
1824        /// Default value. This value is unused.
1825        Unspecified,
1826        /// The token could not be found in Secret Manager (or the Dataform
1827        /// Service Account did not have permission to access it).
1828        NotFound,
1829        /// The token could not be used to authenticate against the Git remote.
1830        Invalid,
1831        /// The token was used successfully to authenticate against the Git remote.
1832        Valid,
1833        /// If set, the enum was initialized with an unknown value.
1834        ///
1835        /// Applications can examine the value using [TokenStatus::value] or
1836        /// [TokenStatus::name].
1837        UnknownValue(token_status::UnknownValue),
1838    }
1839
1840    #[doc(hidden)]
1841    pub mod token_status {
1842        #[allow(unused_imports)]
1843        use super::*;
1844        #[derive(Clone, Debug, PartialEq)]
1845        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1846    }
1847
1848    impl TokenStatus {
1849        /// Gets the enum value.
1850        ///
1851        /// Returns `None` if the enum contains an unknown value deserialized from
1852        /// the string representation of enums.
1853        pub fn value(&self) -> std::option::Option<i32> {
1854            match self {
1855                Self::Unspecified => std::option::Option::Some(0),
1856                Self::NotFound => std::option::Option::Some(1),
1857                Self::Invalid => std::option::Option::Some(2),
1858                Self::Valid => std::option::Option::Some(3),
1859                Self::UnknownValue(u) => u.0.value(),
1860            }
1861        }
1862
1863        /// Gets the enum value as a string.
1864        ///
1865        /// Returns `None` if the enum contains an unknown value deserialized from
1866        /// the integer representation of enums.
1867        pub fn name(&self) -> std::option::Option<&str> {
1868            match self {
1869                Self::Unspecified => std::option::Option::Some("TOKEN_STATUS_UNSPECIFIED"),
1870                Self::NotFound => std::option::Option::Some("NOT_FOUND"),
1871                Self::Invalid => std::option::Option::Some("INVALID"),
1872                Self::Valid => std::option::Option::Some("VALID"),
1873                Self::UnknownValue(u) => u.0.name(),
1874            }
1875        }
1876    }
1877
1878    impl std::default::Default for TokenStatus {
1879        fn default() -> Self {
1880            use std::convert::From;
1881            Self::from(0)
1882        }
1883    }
1884
1885    impl std::fmt::Display for TokenStatus {
1886        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1887            wkt::internal::display_enum(f, self.name(), self.value())
1888        }
1889    }
1890
1891    impl std::convert::From<i32> for TokenStatus {
1892        fn from(value: i32) -> Self {
1893            match value {
1894                0 => Self::Unspecified,
1895                1 => Self::NotFound,
1896                2 => Self::Invalid,
1897                3 => Self::Valid,
1898                _ => Self::UnknownValue(token_status::UnknownValue(
1899                    wkt::internal::UnknownEnumValue::Integer(value),
1900                )),
1901            }
1902        }
1903    }
1904
1905    impl std::convert::From<&str> for TokenStatus {
1906        fn from(value: &str) -> Self {
1907            use std::string::ToString;
1908            match value {
1909                "TOKEN_STATUS_UNSPECIFIED" => Self::Unspecified,
1910                "NOT_FOUND" => Self::NotFound,
1911                "INVALID" => Self::Invalid,
1912                "VALID" => Self::Valid,
1913                _ => Self::UnknownValue(token_status::UnknownValue(
1914                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1915                )),
1916            }
1917        }
1918    }
1919
1920    impl serde::ser::Serialize for TokenStatus {
1921        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1922        where
1923            S: serde::Serializer,
1924        {
1925            match self {
1926                Self::Unspecified => serializer.serialize_i32(0),
1927                Self::NotFound => serializer.serialize_i32(1),
1928                Self::Invalid => serializer.serialize_i32(2),
1929                Self::Valid => serializer.serialize_i32(3),
1930                Self::UnknownValue(u) => u.0.serialize(serializer),
1931            }
1932        }
1933    }
1934
1935    impl<'de> serde::de::Deserialize<'de> for TokenStatus {
1936        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1937        where
1938            D: serde::Deserializer<'de>,
1939        {
1940            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TokenStatus>::new(
1941                ".google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus",
1942            ))
1943        }
1944    }
1945}
1946
1947/// `FetchRemoteBranches` request message.
1948#[derive(Clone, Default, PartialEq)]
1949#[non_exhaustive]
1950pub struct FetchRemoteBranchesRequest {
1951    /// Required. The repository's name.
1952    pub name: std::string::String,
1953
1954    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1955}
1956
1957impl FetchRemoteBranchesRequest {
1958    pub fn new() -> Self {
1959        std::default::Default::default()
1960    }
1961
1962    /// Sets the value of [name][crate::model::FetchRemoteBranchesRequest::name].
1963    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1964        self.name = v.into();
1965        self
1966    }
1967}
1968
1969impl wkt::message::Message for FetchRemoteBranchesRequest {
1970    fn typename() -> &'static str {
1971        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesRequest"
1972    }
1973}
1974
1975/// `FetchRemoteBranches` response message.
1976#[derive(Clone, Default, PartialEq)]
1977#[non_exhaustive]
1978pub struct FetchRemoteBranchesResponse {
1979    /// The remote repository's branch names.
1980    pub branches: std::vec::Vec<std::string::String>,
1981
1982    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1983}
1984
1985impl FetchRemoteBranchesResponse {
1986    pub fn new() -> Self {
1987        std::default::Default::default()
1988    }
1989
1990    /// Sets the value of [branches][crate::model::FetchRemoteBranchesResponse::branches].
1991    pub fn set_branches<T, V>(mut self, v: T) -> Self
1992    where
1993        T: std::iter::IntoIterator<Item = V>,
1994        V: std::convert::Into<std::string::String>,
1995    {
1996        use std::iter::Iterator;
1997        self.branches = v.into_iter().map(|i| i.into()).collect();
1998        self
1999    }
2000}
2001
2002impl wkt::message::Message for FetchRemoteBranchesResponse {
2003    fn typename() -> &'static str {
2004        "type.googleapis.com/google.cloud.dataform.v1.FetchRemoteBranchesResponse"
2005    }
2006}
2007
2008/// Represents a Dataform Git workspace.
2009#[derive(Clone, Default, PartialEq)]
2010#[non_exhaustive]
2011pub struct Workspace {
2012    /// Identifier. The workspace's name.
2013    pub name: std::string::String,
2014
2015    /// Output only. The timestamp of when the workspace was created.
2016    pub create_time: std::option::Option<wkt::Timestamp>,
2017
2018    /// Output only. A data encryption state of a Git repository if this Workspace
2019    /// is protected by a KMS key.
2020    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
2021
2022    /// Output only. All the metadata information that is used internally to serve
2023    /// the resource. For example: timestamps, flags, status fields, etc. The
2024    /// format of this field is a JSON string.
2025    pub internal_metadata: std::option::Option<std::string::String>,
2026
2027    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2028}
2029
2030impl Workspace {
2031    pub fn new() -> Self {
2032        std::default::Default::default()
2033    }
2034
2035    /// Sets the value of [name][crate::model::Workspace::name].
2036    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2037        self.name = v.into();
2038        self
2039    }
2040
2041    /// Sets the value of [create_time][crate::model::Workspace::create_time].
2042    pub fn set_create_time<T>(mut self, v: T) -> Self
2043    where
2044        T: std::convert::Into<wkt::Timestamp>,
2045    {
2046        self.create_time = std::option::Option::Some(v.into());
2047        self
2048    }
2049
2050    /// Sets or clears the value of [create_time][crate::model::Workspace::create_time].
2051    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2052    where
2053        T: std::convert::Into<wkt::Timestamp>,
2054    {
2055        self.create_time = v.map(|x| x.into());
2056        self
2057    }
2058
2059    /// Sets the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2060    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
2061    where
2062        T: std::convert::Into<crate::model::DataEncryptionState>,
2063    {
2064        self.data_encryption_state = std::option::Option::Some(v.into());
2065        self
2066    }
2067
2068    /// Sets or clears the value of [data_encryption_state][crate::model::Workspace::data_encryption_state].
2069    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
2070    where
2071        T: std::convert::Into<crate::model::DataEncryptionState>,
2072    {
2073        self.data_encryption_state = v.map(|x| x.into());
2074        self
2075    }
2076
2077    /// Sets the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2078    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
2079    where
2080        T: std::convert::Into<std::string::String>,
2081    {
2082        self.internal_metadata = std::option::Option::Some(v.into());
2083        self
2084    }
2085
2086    /// Sets or clears the value of [internal_metadata][crate::model::Workspace::internal_metadata].
2087    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
2088    where
2089        T: std::convert::Into<std::string::String>,
2090    {
2091        self.internal_metadata = v.map(|x| x.into());
2092        self
2093    }
2094}
2095
2096impl wkt::message::Message for Workspace {
2097    fn typename() -> &'static str {
2098        "type.googleapis.com/google.cloud.dataform.v1.Workspace"
2099    }
2100}
2101
2102/// `ListWorkspaces` request message.
2103#[derive(Clone, Default, PartialEq)]
2104#[non_exhaustive]
2105pub struct ListWorkspacesRequest {
2106    /// Required. The repository in which to list workspaces. Must be in the
2107    /// format `projects/*/locations/*/repositories/*`.
2108    pub parent: std::string::String,
2109
2110    /// Optional. Maximum number of workspaces to return. The server may return
2111    /// fewer items than requested. If unspecified, the server will pick an
2112    /// appropriate default.
2113    pub page_size: i32,
2114
2115    /// Optional. Page token received from a previous `ListWorkspaces` call.
2116    /// Provide this to retrieve the subsequent page.
2117    ///
2118    /// When paginating, all other parameters provided to `ListWorkspaces`, with
2119    /// the exception of `page_size`, must match the call that provided the page
2120    /// token.
2121    pub page_token: std::string::String,
2122
2123    /// Optional. This field only supports ordering by `name`. If unspecified, the
2124    /// server will choose the ordering. If specified, the default order is
2125    /// ascending for the `name` field.
2126    pub order_by: std::string::String,
2127
2128    /// Optional. Filter for the returned list.
2129    pub filter: std::string::String,
2130
2131    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2132}
2133
2134impl ListWorkspacesRequest {
2135    pub fn new() -> Self {
2136        std::default::Default::default()
2137    }
2138
2139    /// Sets the value of [parent][crate::model::ListWorkspacesRequest::parent].
2140    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2141        self.parent = v.into();
2142        self
2143    }
2144
2145    /// Sets the value of [page_size][crate::model::ListWorkspacesRequest::page_size].
2146    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2147        self.page_size = v.into();
2148        self
2149    }
2150
2151    /// Sets the value of [page_token][crate::model::ListWorkspacesRequest::page_token].
2152    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2153        self.page_token = v.into();
2154        self
2155    }
2156
2157    /// Sets the value of [order_by][crate::model::ListWorkspacesRequest::order_by].
2158    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2159        self.order_by = v.into();
2160        self
2161    }
2162
2163    /// Sets the value of [filter][crate::model::ListWorkspacesRequest::filter].
2164    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2165        self.filter = v.into();
2166        self
2167    }
2168}
2169
2170impl wkt::message::Message for ListWorkspacesRequest {
2171    fn typename() -> &'static str {
2172        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesRequest"
2173    }
2174}
2175
2176/// `ListWorkspaces` response message.
2177#[derive(Clone, Default, PartialEq)]
2178#[non_exhaustive]
2179pub struct ListWorkspacesResponse {
2180    /// List of workspaces.
2181    pub workspaces: std::vec::Vec<crate::model::Workspace>,
2182
2183    /// A token, which can be sent as `page_token` to retrieve the next page.
2184    /// If this field is omitted, there are no subsequent pages.
2185    pub next_page_token: std::string::String,
2186
2187    /// Locations which could not be reached.
2188    pub unreachable: std::vec::Vec<std::string::String>,
2189
2190    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2191}
2192
2193impl ListWorkspacesResponse {
2194    pub fn new() -> Self {
2195        std::default::Default::default()
2196    }
2197
2198    /// Sets the value of [workspaces][crate::model::ListWorkspacesResponse::workspaces].
2199    pub fn set_workspaces<T, V>(mut self, v: T) -> Self
2200    where
2201        T: std::iter::IntoIterator<Item = V>,
2202        V: std::convert::Into<crate::model::Workspace>,
2203    {
2204        use std::iter::Iterator;
2205        self.workspaces = v.into_iter().map(|i| i.into()).collect();
2206        self
2207    }
2208
2209    /// Sets the value of [next_page_token][crate::model::ListWorkspacesResponse::next_page_token].
2210    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2211        self.next_page_token = v.into();
2212        self
2213    }
2214
2215    /// Sets the value of [unreachable][crate::model::ListWorkspacesResponse::unreachable].
2216    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2217    where
2218        T: std::iter::IntoIterator<Item = V>,
2219        V: std::convert::Into<std::string::String>,
2220    {
2221        use std::iter::Iterator;
2222        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2223        self
2224    }
2225}
2226
2227impl wkt::message::Message for ListWorkspacesResponse {
2228    fn typename() -> &'static str {
2229        "type.googleapis.com/google.cloud.dataform.v1.ListWorkspacesResponse"
2230    }
2231}
2232
2233#[doc(hidden)]
2234impl gax::paginator::internal::PageableResponse for ListWorkspacesResponse {
2235    type PageItem = crate::model::Workspace;
2236
2237    fn items(self) -> std::vec::Vec<Self::PageItem> {
2238        self.workspaces
2239    }
2240
2241    fn next_page_token(&self) -> std::string::String {
2242        use std::clone::Clone;
2243        self.next_page_token.clone()
2244    }
2245}
2246
2247/// `GetWorkspace` request message.
2248#[derive(Clone, Default, PartialEq)]
2249#[non_exhaustive]
2250pub struct GetWorkspaceRequest {
2251    /// Required. The workspace's name.
2252    pub name: std::string::String,
2253
2254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2255}
2256
2257impl GetWorkspaceRequest {
2258    pub fn new() -> Self {
2259        std::default::Default::default()
2260    }
2261
2262    /// Sets the value of [name][crate::model::GetWorkspaceRequest::name].
2263    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2264        self.name = v.into();
2265        self
2266    }
2267}
2268
2269impl wkt::message::Message for GetWorkspaceRequest {
2270    fn typename() -> &'static str {
2271        "type.googleapis.com/google.cloud.dataform.v1.GetWorkspaceRequest"
2272    }
2273}
2274
2275/// `CreateWorkspace` request message.
2276#[derive(Clone, Default, PartialEq)]
2277#[non_exhaustive]
2278pub struct CreateWorkspaceRequest {
2279    /// Required. The repository in which to create the workspace. Must be in the
2280    /// format `projects/*/locations/*/repositories/*`.
2281    pub parent: std::string::String,
2282
2283    /// Required. The workspace to create.
2284    pub workspace: std::option::Option<crate::model::Workspace>,
2285
2286    /// Required. The ID to use for the workspace, which will become the final
2287    /// component of the workspace's resource name.
2288    pub workspace_id: std::string::String,
2289
2290    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2291}
2292
2293impl CreateWorkspaceRequest {
2294    pub fn new() -> Self {
2295        std::default::Default::default()
2296    }
2297
2298    /// Sets the value of [parent][crate::model::CreateWorkspaceRequest::parent].
2299    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2300        self.parent = v.into();
2301        self
2302    }
2303
2304    /// Sets the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
2305    pub fn set_workspace<T>(mut self, v: T) -> Self
2306    where
2307        T: std::convert::Into<crate::model::Workspace>,
2308    {
2309        self.workspace = std::option::Option::Some(v.into());
2310        self
2311    }
2312
2313    /// Sets or clears the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
2314    pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
2315    where
2316        T: std::convert::Into<crate::model::Workspace>,
2317    {
2318        self.workspace = v.map(|x| x.into());
2319        self
2320    }
2321
2322    /// Sets the value of [workspace_id][crate::model::CreateWorkspaceRequest::workspace_id].
2323    pub fn set_workspace_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2324        self.workspace_id = v.into();
2325        self
2326    }
2327}
2328
2329impl wkt::message::Message for CreateWorkspaceRequest {
2330    fn typename() -> &'static str {
2331        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkspaceRequest"
2332    }
2333}
2334
2335/// `DeleteWorkspace` request message.
2336#[derive(Clone, Default, PartialEq)]
2337#[non_exhaustive]
2338pub struct DeleteWorkspaceRequest {
2339    /// Required. The workspace resource's name.
2340    pub name: std::string::String,
2341
2342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2343}
2344
2345impl DeleteWorkspaceRequest {
2346    pub fn new() -> Self {
2347        std::default::Default::default()
2348    }
2349
2350    /// Sets the value of [name][crate::model::DeleteWorkspaceRequest::name].
2351    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2352        self.name = v.into();
2353        self
2354    }
2355}
2356
2357impl wkt::message::Message for DeleteWorkspaceRequest {
2358    fn typename() -> &'static str {
2359        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkspaceRequest"
2360    }
2361}
2362
2363/// Represents the author of a Git commit.
2364#[derive(Clone, Default, PartialEq)]
2365#[non_exhaustive]
2366pub struct CommitAuthor {
2367    /// Required. The commit author's name.
2368    pub name: std::string::String,
2369
2370    /// Required. The commit author's email address.
2371    pub email_address: std::string::String,
2372
2373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2374}
2375
2376impl CommitAuthor {
2377    pub fn new() -> Self {
2378        std::default::Default::default()
2379    }
2380
2381    /// Sets the value of [name][crate::model::CommitAuthor::name].
2382    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2383        self.name = v.into();
2384        self
2385    }
2386
2387    /// Sets the value of [email_address][crate::model::CommitAuthor::email_address].
2388    pub fn set_email_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2389        self.email_address = v.into();
2390        self
2391    }
2392}
2393
2394impl wkt::message::Message for CommitAuthor {
2395    fn typename() -> &'static str {
2396        "type.googleapis.com/google.cloud.dataform.v1.CommitAuthor"
2397    }
2398}
2399
2400/// `PullGitCommits` request message.
2401#[derive(Clone, Default, PartialEq)]
2402#[non_exhaustive]
2403pub struct PullGitCommitsRequest {
2404    /// Required. The workspace's name.
2405    pub name: std::string::String,
2406
2407    /// Optional. The name of the branch in the Git remote from which to pull
2408    /// commits. If left unset, the repository's default branch name will be used.
2409    pub remote_branch: std::string::String,
2410
2411    /// Required. The author of any merge commit which may be created as a result
2412    /// of merging fetched Git commits into this workspace.
2413    pub author: std::option::Option<crate::model::CommitAuthor>,
2414
2415    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2416}
2417
2418impl PullGitCommitsRequest {
2419    pub fn new() -> Self {
2420        std::default::Default::default()
2421    }
2422
2423    /// Sets the value of [name][crate::model::PullGitCommitsRequest::name].
2424    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2425        self.name = v.into();
2426        self
2427    }
2428
2429    /// Sets the value of [remote_branch][crate::model::PullGitCommitsRequest::remote_branch].
2430    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2431        self.remote_branch = v.into();
2432        self
2433    }
2434
2435    /// Sets the value of [author][crate::model::PullGitCommitsRequest::author].
2436    pub fn set_author<T>(mut self, v: T) -> Self
2437    where
2438        T: std::convert::Into<crate::model::CommitAuthor>,
2439    {
2440        self.author = std::option::Option::Some(v.into());
2441        self
2442    }
2443
2444    /// Sets or clears the value of [author][crate::model::PullGitCommitsRequest::author].
2445    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2446    where
2447        T: std::convert::Into<crate::model::CommitAuthor>,
2448    {
2449        self.author = v.map(|x| x.into());
2450        self
2451    }
2452}
2453
2454impl wkt::message::Message for PullGitCommitsRequest {
2455    fn typename() -> &'static str {
2456        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsRequest"
2457    }
2458}
2459
2460/// `PullGitCommits` response message.
2461#[derive(Clone, Default, PartialEq)]
2462#[non_exhaustive]
2463pub struct PullGitCommitsResponse {
2464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2465}
2466
2467impl PullGitCommitsResponse {
2468    pub fn new() -> Self {
2469        std::default::Default::default()
2470    }
2471}
2472
2473impl wkt::message::Message for PullGitCommitsResponse {
2474    fn typename() -> &'static str {
2475        "type.googleapis.com/google.cloud.dataform.v1.PullGitCommitsResponse"
2476    }
2477}
2478
2479/// `PushGitCommits` request message.
2480#[derive(Clone, Default, PartialEq)]
2481#[non_exhaustive]
2482pub struct PushGitCommitsRequest {
2483    /// Required. The workspace's name.
2484    pub name: std::string::String,
2485
2486    /// Optional. The name of the branch in the Git remote to which commits should
2487    /// be pushed. If left unset, the repository's default branch name will be
2488    /// used.
2489    pub remote_branch: std::string::String,
2490
2491    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2492}
2493
2494impl PushGitCommitsRequest {
2495    pub fn new() -> Self {
2496        std::default::Default::default()
2497    }
2498
2499    /// Sets the value of [name][crate::model::PushGitCommitsRequest::name].
2500    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2501        self.name = v.into();
2502        self
2503    }
2504
2505    /// Sets the value of [remote_branch][crate::model::PushGitCommitsRequest::remote_branch].
2506    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2507        self.remote_branch = v.into();
2508        self
2509    }
2510}
2511
2512impl wkt::message::Message for PushGitCommitsRequest {
2513    fn typename() -> &'static str {
2514        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsRequest"
2515    }
2516}
2517
2518/// `PushGitCommits` response message.
2519#[derive(Clone, Default, PartialEq)]
2520#[non_exhaustive]
2521pub struct PushGitCommitsResponse {
2522    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2523}
2524
2525impl PushGitCommitsResponse {
2526    pub fn new() -> Self {
2527        std::default::Default::default()
2528    }
2529}
2530
2531impl wkt::message::Message for PushGitCommitsResponse {
2532    fn typename() -> &'static str {
2533        "type.googleapis.com/google.cloud.dataform.v1.PushGitCommitsResponse"
2534    }
2535}
2536
2537/// `FetchFileGitStatuses` request message.
2538#[derive(Clone, Default, PartialEq)]
2539#[non_exhaustive]
2540pub struct FetchFileGitStatusesRequest {
2541    /// Required. The workspace's name.
2542    pub name: std::string::String,
2543
2544    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2545}
2546
2547impl FetchFileGitStatusesRequest {
2548    pub fn new() -> Self {
2549        std::default::Default::default()
2550    }
2551
2552    /// Sets the value of [name][crate::model::FetchFileGitStatusesRequest::name].
2553    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2554        self.name = v.into();
2555        self
2556    }
2557}
2558
2559impl wkt::message::Message for FetchFileGitStatusesRequest {
2560    fn typename() -> &'static str {
2561        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesRequest"
2562    }
2563}
2564
2565/// `FetchFileGitStatuses` response message.
2566#[derive(Clone, Default, PartialEq)]
2567#[non_exhaustive]
2568pub struct FetchFileGitStatusesResponse {
2569    /// A list of all files which have uncommitted Git changes. There will only be
2570    /// a single entry for any given file.
2571    pub uncommitted_file_changes:
2572        std::vec::Vec<crate::model::fetch_file_git_statuses_response::UncommittedFileChange>,
2573
2574    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2575}
2576
2577impl FetchFileGitStatusesResponse {
2578    pub fn new() -> Self {
2579        std::default::Default::default()
2580    }
2581
2582    /// Sets the value of [uncommitted_file_changes][crate::model::FetchFileGitStatusesResponse::uncommitted_file_changes].
2583    pub fn set_uncommitted_file_changes<T, V>(mut self, v: T) -> Self
2584    where
2585        T: std::iter::IntoIterator<Item = V>,
2586        V: std::convert::Into<
2587                crate::model::fetch_file_git_statuses_response::UncommittedFileChange,
2588            >,
2589    {
2590        use std::iter::Iterator;
2591        self.uncommitted_file_changes = v.into_iter().map(|i| i.into()).collect();
2592        self
2593    }
2594}
2595
2596impl wkt::message::Message for FetchFileGitStatusesResponse {
2597    fn typename() -> &'static str {
2598        "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse"
2599    }
2600}
2601
2602/// Defines additional types related to [FetchFileGitStatusesResponse].
2603pub mod fetch_file_git_statuses_response {
2604    #[allow(unused_imports)]
2605    use super::*;
2606
2607    /// Represents the Git state of a file with uncommitted changes.
2608    #[derive(Clone, Default, PartialEq)]
2609    #[non_exhaustive]
2610    pub struct UncommittedFileChange {
2611        /// The file's full path including filename, relative to the workspace root.
2612        pub path: std::string::String,
2613
2614        /// Output only. Indicates the status of the file.
2615        pub state: crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
2616
2617        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2618    }
2619
2620    impl UncommittedFileChange {
2621        pub fn new() -> Self {
2622            std::default::Default::default()
2623        }
2624
2625        /// Sets the value of [path][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::path].
2626        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2627            self.path = v.into();
2628            self
2629        }
2630
2631        /// Sets the value of [state][crate::model::fetch_file_git_statuses_response::UncommittedFileChange::state].
2632        pub fn set_state<
2633            T: std::convert::Into<
2634                    crate::model::fetch_file_git_statuses_response::uncommitted_file_change::State,
2635                >,
2636        >(
2637            mut self,
2638            v: T,
2639        ) -> Self {
2640            self.state = v.into();
2641            self
2642        }
2643    }
2644
2645    impl wkt::message::Message for UncommittedFileChange {
2646        fn typename() -> &'static str {
2647            "type.googleapis.com/google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange"
2648        }
2649    }
2650
2651    /// Defines additional types related to [UncommittedFileChange].
2652    pub mod uncommitted_file_change {
2653        #[allow(unused_imports)]
2654        use super::*;
2655
2656        /// Indicates the status of an uncommitted file change.
2657        ///
2658        /// # Working with unknown values
2659        ///
2660        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2661        /// additional enum variants at any time. Adding new variants is not considered
2662        /// a breaking change. Applications should write their code in anticipation of:
2663        ///
2664        /// - New values appearing in future releases of the client library, **and**
2665        /// - New values received dynamically, without application changes.
2666        ///
2667        /// Please consult the [Working with enums] section in the user guide for some
2668        /// guidelines.
2669        ///
2670        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2671        #[derive(Clone, Debug, PartialEq)]
2672        #[non_exhaustive]
2673        pub enum State {
2674            /// Default value. This value is unused.
2675            Unspecified,
2676            /// The file has been newly added.
2677            Added,
2678            /// The file has been deleted.
2679            Deleted,
2680            /// The file has been modified.
2681            Modified,
2682            /// The file contains merge conflicts.
2683            HasConflicts,
2684            /// If set, the enum was initialized with an unknown value.
2685            ///
2686            /// Applications can examine the value using [State::value] or
2687            /// [State::name].
2688            UnknownValue(state::UnknownValue),
2689        }
2690
2691        #[doc(hidden)]
2692        pub mod state {
2693            #[allow(unused_imports)]
2694            use super::*;
2695            #[derive(Clone, Debug, PartialEq)]
2696            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2697        }
2698
2699        impl State {
2700            /// Gets the enum value.
2701            ///
2702            /// Returns `None` if the enum contains an unknown value deserialized from
2703            /// the string representation of enums.
2704            pub fn value(&self) -> std::option::Option<i32> {
2705                match self {
2706                    Self::Unspecified => std::option::Option::Some(0),
2707                    Self::Added => std::option::Option::Some(1),
2708                    Self::Deleted => std::option::Option::Some(2),
2709                    Self::Modified => std::option::Option::Some(3),
2710                    Self::HasConflicts => std::option::Option::Some(4),
2711                    Self::UnknownValue(u) => u.0.value(),
2712                }
2713            }
2714
2715            /// Gets the enum value as a string.
2716            ///
2717            /// Returns `None` if the enum contains an unknown value deserialized from
2718            /// the integer representation of enums.
2719            pub fn name(&self) -> std::option::Option<&str> {
2720                match self {
2721                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
2722                    Self::Added => std::option::Option::Some("ADDED"),
2723                    Self::Deleted => std::option::Option::Some("DELETED"),
2724                    Self::Modified => std::option::Option::Some("MODIFIED"),
2725                    Self::HasConflicts => std::option::Option::Some("HAS_CONFLICTS"),
2726                    Self::UnknownValue(u) => u.0.name(),
2727                }
2728            }
2729        }
2730
2731        impl std::default::Default for State {
2732            fn default() -> Self {
2733                use std::convert::From;
2734                Self::from(0)
2735            }
2736        }
2737
2738        impl std::fmt::Display for State {
2739            fn fmt(
2740                &self,
2741                f: &mut std::fmt::Formatter<'_>,
2742            ) -> std::result::Result<(), std::fmt::Error> {
2743                wkt::internal::display_enum(f, self.name(), self.value())
2744            }
2745        }
2746
2747        impl std::convert::From<i32> for State {
2748            fn from(value: i32) -> Self {
2749                match value {
2750                    0 => Self::Unspecified,
2751                    1 => Self::Added,
2752                    2 => Self::Deleted,
2753                    3 => Self::Modified,
2754                    4 => Self::HasConflicts,
2755                    _ => Self::UnknownValue(state::UnknownValue(
2756                        wkt::internal::UnknownEnumValue::Integer(value),
2757                    )),
2758                }
2759            }
2760        }
2761
2762        impl std::convert::From<&str> for State {
2763            fn from(value: &str) -> Self {
2764                use std::string::ToString;
2765                match value {
2766                    "STATE_UNSPECIFIED" => Self::Unspecified,
2767                    "ADDED" => Self::Added,
2768                    "DELETED" => Self::Deleted,
2769                    "MODIFIED" => Self::Modified,
2770                    "HAS_CONFLICTS" => Self::HasConflicts,
2771                    _ => Self::UnknownValue(state::UnknownValue(
2772                        wkt::internal::UnknownEnumValue::String(value.to_string()),
2773                    )),
2774                }
2775            }
2776        }
2777
2778        impl serde::ser::Serialize for State {
2779            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2780            where
2781                S: serde::Serializer,
2782            {
2783                match self {
2784                    Self::Unspecified => serializer.serialize_i32(0),
2785                    Self::Added => serializer.serialize_i32(1),
2786                    Self::Deleted => serializer.serialize_i32(2),
2787                    Self::Modified => serializer.serialize_i32(3),
2788                    Self::HasConflicts => serializer.serialize_i32(4),
2789                    Self::UnknownValue(u) => u.0.serialize(serializer),
2790                }
2791            }
2792        }
2793
2794        impl<'de> serde::de::Deserialize<'de> for State {
2795            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2796            where
2797                D: serde::Deserializer<'de>,
2798            {
2799                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
2800                    ".google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.State"))
2801            }
2802        }
2803    }
2804}
2805
2806/// `FetchGitAheadBehind` request message.
2807#[derive(Clone, Default, PartialEq)]
2808#[non_exhaustive]
2809pub struct FetchGitAheadBehindRequest {
2810    /// Required. The workspace's name.
2811    pub name: std::string::String,
2812
2813    /// Optional. The name of the branch in the Git remote against which this
2814    /// workspace should be compared. If left unset, the repository's default
2815    /// branch name will be used.
2816    pub remote_branch: std::string::String,
2817
2818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2819}
2820
2821impl FetchGitAheadBehindRequest {
2822    pub fn new() -> Self {
2823        std::default::Default::default()
2824    }
2825
2826    /// Sets the value of [name][crate::model::FetchGitAheadBehindRequest::name].
2827    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2828        self.name = v.into();
2829        self
2830    }
2831
2832    /// Sets the value of [remote_branch][crate::model::FetchGitAheadBehindRequest::remote_branch].
2833    pub fn set_remote_branch<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2834        self.remote_branch = v.into();
2835        self
2836    }
2837}
2838
2839impl wkt::message::Message for FetchGitAheadBehindRequest {
2840    fn typename() -> &'static str {
2841        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindRequest"
2842    }
2843}
2844
2845/// `FetchGitAheadBehind` response message.
2846#[derive(Clone, Default, PartialEq)]
2847#[non_exhaustive]
2848pub struct FetchGitAheadBehindResponse {
2849    /// The number of commits in the remote branch that are not in the workspace.
2850    pub commits_ahead: i32,
2851
2852    /// The number of commits in the workspace that are not in the remote branch.
2853    pub commits_behind: i32,
2854
2855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2856}
2857
2858impl FetchGitAheadBehindResponse {
2859    pub fn new() -> Self {
2860        std::default::Default::default()
2861    }
2862
2863    /// Sets the value of [commits_ahead][crate::model::FetchGitAheadBehindResponse::commits_ahead].
2864    pub fn set_commits_ahead<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2865        self.commits_ahead = v.into();
2866        self
2867    }
2868
2869    /// Sets the value of [commits_behind][crate::model::FetchGitAheadBehindResponse::commits_behind].
2870    pub fn set_commits_behind<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2871        self.commits_behind = v.into();
2872        self
2873    }
2874}
2875
2876impl wkt::message::Message for FetchGitAheadBehindResponse {
2877    fn typename() -> &'static str {
2878        "type.googleapis.com/google.cloud.dataform.v1.FetchGitAheadBehindResponse"
2879    }
2880}
2881
2882/// `CommitWorkspaceChanges` request message.
2883#[derive(Clone, Default, PartialEq)]
2884#[non_exhaustive]
2885pub struct CommitWorkspaceChangesRequest {
2886    /// Required. The workspace's name.
2887    pub name: std::string::String,
2888
2889    /// Required. The commit's author.
2890    pub author: std::option::Option<crate::model::CommitAuthor>,
2891
2892    /// Optional. The commit's message.
2893    pub commit_message: std::string::String,
2894
2895    /// Optional. Full file paths to commit including filename, rooted at workspace
2896    /// root. If left empty, all files will be committed.
2897    pub paths: std::vec::Vec<std::string::String>,
2898
2899    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2900}
2901
2902impl CommitWorkspaceChangesRequest {
2903    pub fn new() -> Self {
2904        std::default::Default::default()
2905    }
2906
2907    /// Sets the value of [name][crate::model::CommitWorkspaceChangesRequest::name].
2908    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2909        self.name = v.into();
2910        self
2911    }
2912
2913    /// Sets the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
2914    pub fn set_author<T>(mut self, v: T) -> Self
2915    where
2916        T: std::convert::Into<crate::model::CommitAuthor>,
2917    {
2918        self.author = std::option::Option::Some(v.into());
2919        self
2920    }
2921
2922    /// Sets or clears the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
2923    pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
2924    where
2925        T: std::convert::Into<crate::model::CommitAuthor>,
2926    {
2927        self.author = v.map(|x| x.into());
2928        self
2929    }
2930
2931    /// Sets the value of [commit_message][crate::model::CommitWorkspaceChangesRequest::commit_message].
2932    pub fn set_commit_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2933        self.commit_message = v.into();
2934        self
2935    }
2936
2937    /// Sets the value of [paths][crate::model::CommitWorkspaceChangesRequest::paths].
2938    pub fn set_paths<T, V>(mut self, v: T) -> Self
2939    where
2940        T: std::iter::IntoIterator<Item = V>,
2941        V: std::convert::Into<std::string::String>,
2942    {
2943        use std::iter::Iterator;
2944        self.paths = v.into_iter().map(|i| i.into()).collect();
2945        self
2946    }
2947}
2948
2949impl wkt::message::Message for CommitWorkspaceChangesRequest {
2950    fn typename() -> &'static str {
2951        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesRequest"
2952    }
2953}
2954
2955/// `CommitWorkspaceChanges` response message.
2956#[derive(Clone, Default, PartialEq)]
2957#[non_exhaustive]
2958pub struct CommitWorkspaceChangesResponse {
2959    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2960}
2961
2962impl CommitWorkspaceChangesResponse {
2963    pub fn new() -> Self {
2964        std::default::Default::default()
2965    }
2966}
2967
2968impl wkt::message::Message for CommitWorkspaceChangesResponse {
2969    fn typename() -> &'static str {
2970        "type.googleapis.com/google.cloud.dataform.v1.CommitWorkspaceChangesResponse"
2971    }
2972}
2973
2974/// `ResetWorkspaceChanges` request message.
2975#[derive(Clone, Default, PartialEq)]
2976#[non_exhaustive]
2977pub struct ResetWorkspaceChangesRequest {
2978    /// Required. The workspace's name.
2979    pub name: std::string::String,
2980
2981    /// Optional. Full file paths to reset back to their committed state including
2982    /// filename, rooted at workspace root. If left empty, all files will be reset.
2983    pub paths: std::vec::Vec<std::string::String>,
2984
2985    /// Optional. If set to true, untracked files will be deleted.
2986    pub clean: bool,
2987
2988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2989}
2990
2991impl ResetWorkspaceChangesRequest {
2992    pub fn new() -> Self {
2993        std::default::Default::default()
2994    }
2995
2996    /// Sets the value of [name][crate::model::ResetWorkspaceChangesRequest::name].
2997    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2998        self.name = v.into();
2999        self
3000    }
3001
3002    /// Sets the value of [paths][crate::model::ResetWorkspaceChangesRequest::paths].
3003    pub fn set_paths<T, V>(mut self, v: T) -> Self
3004    where
3005        T: std::iter::IntoIterator<Item = V>,
3006        V: std::convert::Into<std::string::String>,
3007    {
3008        use std::iter::Iterator;
3009        self.paths = v.into_iter().map(|i| i.into()).collect();
3010        self
3011    }
3012
3013    /// Sets the value of [clean][crate::model::ResetWorkspaceChangesRequest::clean].
3014    pub fn set_clean<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3015        self.clean = v.into();
3016        self
3017    }
3018}
3019
3020impl wkt::message::Message for ResetWorkspaceChangesRequest {
3021    fn typename() -> &'static str {
3022        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesRequest"
3023    }
3024}
3025
3026/// `ResetWorkspaceChanges` response message.
3027#[derive(Clone, Default, PartialEq)]
3028#[non_exhaustive]
3029pub struct ResetWorkspaceChangesResponse {
3030    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3031}
3032
3033impl ResetWorkspaceChangesResponse {
3034    pub fn new() -> Self {
3035        std::default::Default::default()
3036    }
3037}
3038
3039impl wkt::message::Message for ResetWorkspaceChangesResponse {
3040    fn typename() -> &'static str {
3041        "type.googleapis.com/google.cloud.dataform.v1.ResetWorkspaceChangesResponse"
3042    }
3043}
3044
3045/// `FetchFileDiff` request message.
3046#[derive(Clone, Default, PartialEq)]
3047#[non_exhaustive]
3048pub struct FetchFileDiffRequest {
3049    /// Required. The workspace's name.
3050    pub workspace: std::string::String,
3051
3052    /// Required. The file's full path including filename, relative to the
3053    /// workspace root.
3054    pub path: std::string::String,
3055
3056    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3057}
3058
3059impl FetchFileDiffRequest {
3060    pub fn new() -> Self {
3061        std::default::Default::default()
3062    }
3063
3064    /// Sets the value of [workspace][crate::model::FetchFileDiffRequest::workspace].
3065    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3066        self.workspace = v.into();
3067        self
3068    }
3069
3070    /// Sets the value of [path][crate::model::FetchFileDiffRequest::path].
3071    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3072        self.path = v.into();
3073        self
3074    }
3075}
3076
3077impl wkt::message::Message for FetchFileDiffRequest {
3078    fn typename() -> &'static str {
3079        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffRequest"
3080    }
3081}
3082
3083/// `FetchFileDiff` response message.
3084#[derive(Clone, Default, PartialEq)]
3085#[non_exhaustive]
3086pub struct FetchFileDiffResponse {
3087    /// The raw formatted Git diff for the file.
3088    pub formatted_diff: std::string::String,
3089
3090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3091}
3092
3093impl FetchFileDiffResponse {
3094    pub fn new() -> Self {
3095        std::default::Default::default()
3096    }
3097
3098    /// Sets the value of [formatted_diff][crate::model::FetchFileDiffResponse::formatted_diff].
3099    pub fn set_formatted_diff<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3100        self.formatted_diff = v.into();
3101        self
3102    }
3103}
3104
3105impl wkt::message::Message for FetchFileDiffResponse {
3106    fn typename() -> &'static str {
3107        "type.googleapis.com/google.cloud.dataform.v1.FetchFileDiffResponse"
3108    }
3109}
3110
3111/// `QueryDirectoryContents` request message.
3112#[derive(Clone, Default, PartialEq)]
3113#[non_exhaustive]
3114pub struct QueryDirectoryContentsRequest {
3115    /// Required. The workspace's name.
3116    pub workspace: std::string::String,
3117
3118    /// Optional. The directory's full path including directory name, relative to
3119    /// the workspace root. If left unset, the workspace root is used.
3120    pub path: std::string::String,
3121
3122    /// Optional. Maximum number of paths to return. The server may return fewer
3123    /// items than requested. If unspecified, the server will pick an appropriate
3124    /// default.
3125    pub page_size: i32,
3126
3127    /// Optional. Page token received from a previous `QueryDirectoryContents`
3128    /// call. Provide this to retrieve the subsequent page.
3129    ///
3130    /// When paginating, all other parameters provided to
3131    /// `QueryDirectoryContents`, with the exception of `page_size`, must match the
3132    /// call that provided the page token.
3133    pub page_token: std::string::String,
3134
3135    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3136}
3137
3138impl QueryDirectoryContentsRequest {
3139    pub fn new() -> Self {
3140        std::default::Default::default()
3141    }
3142
3143    /// Sets the value of [workspace][crate::model::QueryDirectoryContentsRequest::workspace].
3144    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3145        self.workspace = v.into();
3146        self
3147    }
3148
3149    /// Sets the value of [path][crate::model::QueryDirectoryContentsRequest::path].
3150    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3151        self.path = v.into();
3152        self
3153    }
3154
3155    /// Sets the value of [page_size][crate::model::QueryDirectoryContentsRequest::page_size].
3156    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3157        self.page_size = v.into();
3158        self
3159    }
3160
3161    /// Sets the value of [page_token][crate::model::QueryDirectoryContentsRequest::page_token].
3162    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3163        self.page_token = v.into();
3164        self
3165    }
3166}
3167
3168impl wkt::message::Message for QueryDirectoryContentsRequest {
3169    fn typename() -> &'static str {
3170        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsRequest"
3171    }
3172}
3173
3174/// `QueryDirectoryContents` response message.
3175#[derive(Clone, Default, PartialEq)]
3176#[non_exhaustive]
3177pub struct QueryDirectoryContentsResponse {
3178    /// List of entries in the directory.
3179    pub directory_entries: std::vec::Vec<crate::model::DirectoryEntry>,
3180
3181    /// A token, which can be sent as `page_token` to retrieve the next page.
3182    /// If this field is omitted, there are no subsequent pages.
3183    pub next_page_token: std::string::String,
3184
3185    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3186}
3187
3188impl QueryDirectoryContentsResponse {
3189    pub fn new() -> Self {
3190        std::default::Default::default()
3191    }
3192
3193    /// Sets the value of [directory_entries][crate::model::QueryDirectoryContentsResponse::directory_entries].
3194    pub fn set_directory_entries<T, V>(mut self, v: T) -> Self
3195    where
3196        T: std::iter::IntoIterator<Item = V>,
3197        V: std::convert::Into<crate::model::DirectoryEntry>,
3198    {
3199        use std::iter::Iterator;
3200        self.directory_entries = v.into_iter().map(|i| i.into()).collect();
3201        self
3202    }
3203
3204    /// Sets the value of [next_page_token][crate::model::QueryDirectoryContentsResponse::next_page_token].
3205    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3206        self.next_page_token = v.into();
3207        self
3208    }
3209}
3210
3211impl wkt::message::Message for QueryDirectoryContentsResponse {
3212    fn typename() -> &'static str {
3213        "type.googleapis.com/google.cloud.dataform.v1.QueryDirectoryContentsResponse"
3214    }
3215}
3216
3217#[doc(hidden)]
3218impl gax::paginator::internal::PageableResponse for QueryDirectoryContentsResponse {
3219    type PageItem = crate::model::DirectoryEntry;
3220
3221    fn items(self) -> std::vec::Vec<Self::PageItem> {
3222        self.directory_entries
3223    }
3224
3225    fn next_page_token(&self) -> std::string::String {
3226        use std::clone::Clone;
3227        self.next_page_token.clone()
3228    }
3229}
3230
3231/// Represents a single entry in a directory.
3232#[derive(Clone, Default, PartialEq)]
3233#[non_exhaustive]
3234pub struct DirectoryEntry {
3235    /// The entry's contents.
3236    pub entry: std::option::Option<crate::model::directory_entry::Entry>,
3237
3238    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3239}
3240
3241impl DirectoryEntry {
3242    pub fn new() -> Self {
3243        std::default::Default::default()
3244    }
3245
3246    /// Sets the value of [entry][crate::model::DirectoryEntry::entry].
3247    ///
3248    /// Note that all the setters affecting `entry` are mutually
3249    /// exclusive.
3250    pub fn set_entry<
3251        T: std::convert::Into<std::option::Option<crate::model::directory_entry::Entry>>,
3252    >(
3253        mut self,
3254        v: T,
3255    ) -> Self {
3256        self.entry = v.into();
3257        self
3258    }
3259
3260    /// The value of [entry][crate::model::DirectoryEntry::entry]
3261    /// if it holds a `File`, `None` if the field is not set or
3262    /// holds a different branch.
3263    pub fn file(&self) -> std::option::Option<&std::string::String> {
3264        #[allow(unreachable_patterns)]
3265        self.entry.as_ref().and_then(|v| match v {
3266            crate::model::directory_entry::Entry::File(v) => std::option::Option::Some(v),
3267            _ => std::option::Option::None,
3268        })
3269    }
3270
3271    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
3272    /// to hold a `File`.
3273    ///
3274    /// Note that all the setters affecting `entry` are
3275    /// mutually exclusive.
3276    pub fn set_file<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3277        self.entry =
3278            std::option::Option::Some(crate::model::directory_entry::Entry::File(v.into()));
3279        self
3280    }
3281
3282    /// The value of [entry][crate::model::DirectoryEntry::entry]
3283    /// if it holds a `Directory`, `None` if the field is not set or
3284    /// holds a different branch.
3285    pub fn directory(&self) -> std::option::Option<&std::string::String> {
3286        #[allow(unreachable_patterns)]
3287        self.entry.as_ref().and_then(|v| match v {
3288            crate::model::directory_entry::Entry::Directory(v) => std::option::Option::Some(v),
3289            _ => std::option::Option::None,
3290        })
3291    }
3292
3293    /// Sets the value of [entry][crate::model::DirectoryEntry::entry]
3294    /// to hold a `Directory`.
3295    ///
3296    /// Note that all the setters affecting `entry` are
3297    /// mutually exclusive.
3298    pub fn set_directory<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3299        self.entry =
3300            std::option::Option::Some(crate::model::directory_entry::Entry::Directory(v.into()));
3301        self
3302    }
3303}
3304
3305impl wkt::message::Message for DirectoryEntry {
3306    fn typename() -> &'static str {
3307        "type.googleapis.com/google.cloud.dataform.v1.DirectoryEntry"
3308    }
3309}
3310
3311/// Defines additional types related to [DirectoryEntry].
3312pub mod directory_entry {
3313    #[allow(unused_imports)]
3314    use super::*;
3315
3316    /// The entry's contents.
3317    #[derive(Clone, Debug, PartialEq)]
3318    #[non_exhaustive]
3319    pub enum Entry {
3320        /// A file in the directory.
3321        File(std::string::String),
3322        /// A child directory in the directory.
3323        Directory(std::string::String),
3324    }
3325}
3326
3327/// Configuration containing file search request parameters.
3328#[derive(Clone, Default, PartialEq)]
3329#[non_exhaustive]
3330pub struct SearchFilesRequest {
3331    /// Required. The workspace's name.
3332    pub workspace: std::string::String,
3333
3334    /// Optional. Maximum number of search results to return. The server may return
3335    /// fewer items than requested. If unspecified, the server will pick an
3336    /// appropriate default.
3337    pub page_size: i32,
3338
3339    /// Optional. Page token received from a previous `SearchFilesRequest`
3340    /// call. Provide this to retrieve the subsequent page.
3341    ///
3342    /// When paginating, all other parameters provided to `SearchFilesRequest`,
3343    /// with the exception of `page_size`, must match the call that provided the
3344    /// page token.
3345    pub page_token: std::string::String,
3346
3347    /// Optional. Optional filter for the returned list in filtering format.
3348    /// Filtering is only currently supported on the `path` field.
3349    /// See <https://google.aip.dev/160> for details.
3350    pub filter: std::string::String,
3351
3352    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3353}
3354
3355impl SearchFilesRequest {
3356    pub fn new() -> Self {
3357        std::default::Default::default()
3358    }
3359
3360    /// Sets the value of [workspace][crate::model::SearchFilesRequest::workspace].
3361    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3362        self.workspace = v.into();
3363        self
3364    }
3365
3366    /// Sets the value of [page_size][crate::model::SearchFilesRequest::page_size].
3367    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3368        self.page_size = v.into();
3369        self
3370    }
3371
3372    /// Sets the value of [page_token][crate::model::SearchFilesRequest::page_token].
3373    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3374        self.page_token = v.into();
3375        self
3376    }
3377
3378    /// Sets the value of [filter][crate::model::SearchFilesRequest::filter].
3379    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3380        self.filter = v.into();
3381        self
3382    }
3383}
3384
3385impl wkt::message::Message for SearchFilesRequest {
3386    fn typename() -> &'static str {
3387        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesRequest"
3388    }
3389}
3390
3391/// Client-facing representation of a file search response.
3392#[derive(Clone, Default, PartialEq)]
3393#[non_exhaustive]
3394pub struct SearchFilesResponse {
3395    /// List of matched results.
3396    pub search_results: std::vec::Vec<crate::model::SearchResult>,
3397
3398    /// Optional. A token, which can be sent as `page_token` to retrieve the next
3399    /// page. If this field is omitted, there are no subsequent pages.
3400    pub next_page_token: std::string::String,
3401
3402    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3403}
3404
3405impl SearchFilesResponse {
3406    pub fn new() -> Self {
3407        std::default::Default::default()
3408    }
3409
3410    /// Sets the value of [search_results][crate::model::SearchFilesResponse::search_results].
3411    pub fn set_search_results<T, V>(mut self, v: T) -> Self
3412    where
3413        T: std::iter::IntoIterator<Item = V>,
3414        V: std::convert::Into<crate::model::SearchResult>,
3415    {
3416        use std::iter::Iterator;
3417        self.search_results = v.into_iter().map(|i| i.into()).collect();
3418        self
3419    }
3420
3421    /// Sets the value of [next_page_token][crate::model::SearchFilesResponse::next_page_token].
3422    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3423        self.next_page_token = v.into();
3424        self
3425    }
3426}
3427
3428impl wkt::message::Message for SearchFilesResponse {
3429    fn typename() -> &'static str {
3430        "type.googleapis.com/google.cloud.dataform.v1.SearchFilesResponse"
3431    }
3432}
3433
3434#[doc(hidden)]
3435impl gax::paginator::internal::PageableResponse for SearchFilesResponse {
3436    type PageItem = crate::model::SearchResult;
3437
3438    fn items(self) -> std::vec::Vec<Self::PageItem> {
3439        self.search_results
3440    }
3441
3442    fn next_page_token(&self) -> std::string::String {
3443        use std::clone::Clone;
3444        self.next_page_token.clone()
3445    }
3446}
3447
3448/// Client-facing representation of a search result entry.
3449#[derive(Clone, Default, PartialEq)]
3450#[non_exhaustive]
3451pub struct SearchResult {
3452    /// The entry's contents.
3453    pub entry: std::option::Option<crate::model::search_result::Entry>,
3454
3455    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3456}
3457
3458impl SearchResult {
3459    pub fn new() -> Self {
3460        std::default::Default::default()
3461    }
3462
3463    /// Sets the value of [entry][crate::model::SearchResult::entry].
3464    ///
3465    /// Note that all the setters affecting `entry` are mutually
3466    /// exclusive.
3467    pub fn set_entry<
3468        T: std::convert::Into<std::option::Option<crate::model::search_result::Entry>>,
3469    >(
3470        mut self,
3471        v: T,
3472    ) -> Self {
3473        self.entry = v.into();
3474        self
3475    }
3476
3477    /// The value of [entry][crate::model::SearchResult::entry]
3478    /// if it holds a `File`, `None` if the field is not set or
3479    /// holds a different branch.
3480    pub fn file(&self) -> std::option::Option<&std::boxed::Box<crate::model::FileSearchResult>> {
3481        #[allow(unreachable_patterns)]
3482        self.entry.as_ref().and_then(|v| match v {
3483            crate::model::search_result::Entry::File(v) => std::option::Option::Some(v),
3484            _ => std::option::Option::None,
3485        })
3486    }
3487
3488    /// Sets the value of [entry][crate::model::SearchResult::entry]
3489    /// to hold a `File`.
3490    ///
3491    /// Note that all the setters affecting `entry` are
3492    /// mutually exclusive.
3493    pub fn set_file<T: std::convert::Into<std::boxed::Box<crate::model::FileSearchResult>>>(
3494        mut self,
3495        v: T,
3496    ) -> Self {
3497        self.entry = std::option::Option::Some(crate::model::search_result::Entry::File(v.into()));
3498        self
3499    }
3500
3501    /// The value of [entry][crate::model::SearchResult::entry]
3502    /// if it holds a `Directory`, `None` if the field is not set or
3503    /// holds a different branch.
3504    pub fn directory(
3505        &self,
3506    ) -> std::option::Option<&std::boxed::Box<crate::model::DirectorySearchResult>> {
3507        #[allow(unreachable_patterns)]
3508        self.entry.as_ref().and_then(|v| match v {
3509            crate::model::search_result::Entry::Directory(v) => std::option::Option::Some(v),
3510            _ => std::option::Option::None,
3511        })
3512    }
3513
3514    /// Sets the value of [entry][crate::model::SearchResult::entry]
3515    /// to hold a `Directory`.
3516    ///
3517    /// Note that all the setters affecting `entry` are
3518    /// mutually exclusive.
3519    pub fn set_directory<
3520        T: std::convert::Into<std::boxed::Box<crate::model::DirectorySearchResult>>,
3521    >(
3522        mut self,
3523        v: T,
3524    ) -> Self {
3525        self.entry =
3526            std::option::Option::Some(crate::model::search_result::Entry::Directory(v.into()));
3527        self
3528    }
3529}
3530
3531impl wkt::message::Message for SearchResult {
3532    fn typename() -> &'static str {
3533        "type.googleapis.com/google.cloud.dataform.v1.SearchResult"
3534    }
3535}
3536
3537/// Defines additional types related to [SearchResult].
3538pub mod search_result {
3539    #[allow(unused_imports)]
3540    use super::*;
3541
3542    /// The entry's contents.
3543    #[derive(Clone, Debug, PartialEq)]
3544    #[non_exhaustive]
3545    pub enum Entry {
3546        /// Details when search result is a file.
3547        File(std::boxed::Box<crate::model::FileSearchResult>),
3548        /// Details when search result is a directory.
3549        Directory(std::boxed::Box<crate::model::DirectorySearchResult>),
3550    }
3551}
3552
3553/// Client-facing representation of a file entry in search results.
3554#[derive(Clone, Default, PartialEq)]
3555#[non_exhaustive]
3556pub struct FileSearchResult {
3557    /// File system path relative to the workspace root.
3558    pub path: std::string::String,
3559
3560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3561}
3562
3563impl FileSearchResult {
3564    pub fn new() -> Self {
3565        std::default::Default::default()
3566    }
3567
3568    /// Sets the value of [path][crate::model::FileSearchResult::path].
3569    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3570        self.path = v.into();
3571        self
3572    }
3573}
3574
3575impl wkt::message::Message for FileSearchResult {
3576    fn typename() -> &'static str {
3577        "type.googleapis.com/google.cloud.dataform.v1.FileSearchResult"
3578    }
3579}
3580
3581/// Client-facing representation of a directory entry in search results.
3582#[derive(Clone, Default, PartialEq)]
3583#[non_exhaustive]
3584pub struct DirectorySearchResult {
3585    /// File system path relative to the workspace root.
3586    pub path: std::string::String,
3587
3588    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3589}
3590
3591impl DirectorySearchResult {
3592    pub fn new() -> Self {
3593        std::default::Default::default()
3594    }
3595
3596    /// Sets the value of [path][crate::model::DirectorySearchResult::path].
3597    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3598        self.path = v.into();
3599        self
3600    }
3601}
3602
3603impl wkt::message::Message for DirectorySearchResult {
3604    fn typename() -> &'static str {
3605        "type.googleapis.com/google.cloud.dataform.v1.DirectorySearchResult"
3606    }
3607}
3608
3609/// `MakeDirectory` request message.
3610#[derive(Clone, Default, PartialEq)]
3611#[non_exhaustive]
3612pub struct MakeDirectoryRequest {
3613    /// Required. The workspace's name.
3614    pub workspace: std::string::String,
3615
3616    /// Required. The directory's full path including directory name, relative to
3617    /// the workspace root.
3618    pub path: std::string::String,
3619
3620    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3621}
3622
3623impl MakeDirectoryRequest {
3624    pub fn new() -> Self {
3625        std::default::Default::default()
3626    }
3627
3628    /// Sets the value of [workspace][crate::model::MakeDirectoryRequest::workspace].
3629    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3630        self.workspace = v.into();
3631        self
3632    }
3633
3634    /// Sets the value of [path][crate::model::MakeDirectoryRequest::path].
3635    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3636        self.path = v.into();
3637        self
3638    }
3639}
3640
3641impl wkt::message::Message for MakeDirectoryRequest {
3642    fn typename() -> &'static str {
3643        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryRequest"
3644    }
3645}
3646
3647/// `MakeDirectory` response message.
3648#[derive(Clone, Default, PartialEq)]
3649#[non_exhaustive]
3650pub struct MakeDirectoryResponse {
3651    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3652}
3653
3654impl MakeDirectoryResponse {
3655    pub fn new() -> Self {
3656        std::default::Default::default()
3657    }
3658}
3659
3660impl wkt::message::Message for MakeDirectoryResponse {
3661    fn typename() -> &'static str {
3662        "type.googleapis.com/google.cloud.dataform.v1.MakeDirectoryResponse"
3663    }
3664}
3665
3666/// `RemoveDirectory` request message.
3667#[derive(Clone, Default, PartialEq)]
3668#[non_exhaustive]
3669pub struct RemoveDirectoryRequest {
3670    /// Required. The workspace's name.
3671    pub workspace: std::string::String,
3672
3673    /// Required. The directory's full path including directory name, relative to
3674    /// the workspace root.
3675    pub path: std::string::String,
3676
3677    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3678}
3679
3680impl RemoveDirectoryRequest {
3681    pub fn new() -> Self {
3682        std::default::Default::default()
3683    }
3684
3685    /// Sets the value of [workspace][crate::model::RemoveDirectoryRequest::workspace].
3686    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3687        self.workspace = v.into();
3688        self
3689    }
3690
3691    /// Sets the value of [path][crate::model::RemoveDirectoryRequest::path].
3692    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3693        self.path = v.into();
3694        self
3695    }
3696}
3697
3698impl wkt::message::Message for RemoveDirectoryRequest {
3699    fn typename() -> &'static str {
3700        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryRequest"
3701    }
3702}
3703
3704/// `RemoveDirectory` response message.
3705#[derive(Clone, Default, PartialEq)]
3706#[non_exhaustive]
3707pub struct RemoveDirectoryResponse {
3708    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3709}
3710
3711impl RemoveDirectoryResponse {
3712    pub fn new() -> Self {
3713        std::default::Default::default()
3714    }
3715}
3716
3717impl wkt::message::Message for RemoveDirectoryResponse {
3718    fn typename() -> &'static str {
3719        "type.googleapis.com/google.cloud.dataform.v1.RemoveDirectoryResponse"
3720    }
3721}
3722
3723/// `MoveDirectory` request message.
3724#[derive(Clone, Default, PartialEq)]
3725#[non_exhaustive]
3726pub struct MoveDirectoryRequest {
3727    /// Required. The workspace's name.
3728    pub workspace: std::string::String,
3729
3730    /// Required. The directory's full path including directory name, relative to
3731    /// the workspace root.
3732    pub path: std::string::String,
3733
3734    /// Required. The new path for the directory including directory name, rooted
3735    /// at workspace root.
3736    pub new_path: std::string::String,
3737
3738    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3739}
3740
3741impl MoveDirectoryRequest {
3742    pub fn new() -> Self {
3743        std::default::Default::default()
3744    }
3745
3746    /// Sets the value of [workspace][crate::model::MoveDirectoryRequest::workspace].
3747    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3748        self.workspace = v.into();
3749        self
3750    }
3751
3752    /// Sets the value of [path][crate::model::MoveDirectoryRequest::path].
3753    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3754        self.path = v.into();
3755        self
3756    }
3757
3758    /// Sets the value of [new_path][crate::model::MoveDirectoryRequest::new_path].
3759    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3760        self.new_path = v.into();
3761        self
3762    }
3763}
3764
3765impl wkt::message::Message for MoveDirectoryRequest {
3766    fn typename() -> &'static str {
3767        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryRequest"
3768    }
3769}
3770
3771/// `MoveDirectory` response message.
3772#[derive(Clone, Default, PartialEq)]
3773#[non_exhaustive]
3774pub struct MoveDirectoryResponse {
3775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3776}
3777
3778impl MoveDirectoryResponse {
3779    pub fn new() -> Self {
3780        std::default::Default::default()
3781    }
3782}
3783
3784impl wkt::message::Message for MoveDirectoryResponse {
3785    fn typename() -> &'static str {
3786        "type.googleapis.com/google.cloud.dataform.v1.MoveDirectoryResponse"
3787    }
3788}
3789
3790/// `ReadFile` request message.
3791#[derive(Clone, Default, PartialEq)]
3792#[non_exhaustive]
3793pub struct ReadFileRequest {
3794    /// Required. The workspace's name.
3795    pub workspace: std::string::String,
3796
3797    /// Required. The file's full path including filename, relative to the
3798    /// workspace root.
3799    pub path: std::string::String,
3800
3801    /// Optional. The Git revision of the file to return. If left empty, the
3802    /// current contents of `path` will be returned.
3803    pub revision: std::string::String,
3804
3805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3806}
3807
3808impl ReadFileRequest {
3809    pub fn new() -> Self {
3810        std::default::Default::default()
3811    }
3812
3813    /// Sets the value of [workspace][crate::model::ReadFileRequest::workspace].
3814    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3815        self.workspace = v.into();
3816        self
3817    }
3818
3819    /// Sets the value of [path][crate::model::ReadFileRequest::path].
3820    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3821        self.path = v.into();
3822        self
3823    }
3824
3825    /// Sets the value of [revision][crate::model::ReadFileRequest::revision].
3826    pub fn set_revision<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3827        self.revision = v.into();
3828        self
3829    }
3830}
3831
3832impl wkt::message::Message for ReadFileRequest {
3833    fn typename() -> &'static str {
3834        "type.googleapis.com/google.cloud.dataform.v1.ReadFileRequest"
3835    }
3836}
3837
3838/// `ReadFile` response message.
3839#[derive(Clone, Default, PartialEq)]
3840#[non_exhaustive]
3841pub struct ReadFileResponse {
3842    /// The file's contents.
3843    pub file_contents: ::bytes::Bytes,
3844
3845    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3846}
3847
3848impl ReadFileResponse {
3849    pub fn new() -> Self {
3850        std::default::Default::default()
3851    }
3852
3853    /// Sets the value of [file_contents][crate::model::ReadFileResponse::file_contents].
3854    pub fn set_file_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
3855        self.file_contents = v.into();
3856        self
3857    }
3858}
3859
3860impl wkt::message::Message for ReadFileResponse {
3861    fn typename() -> &'static str {
3862        "type.googleapis.com/google.cloud.dataform.v1.ReadFileResponse"
3863    }
3864}
3865
3866/// `RemoveFile` request message.
3867#[derive(Clone, Default, PartialEq)]
3868#[non_exhaustive]
3869pub struct RemoveFileRequest {
3870    /// Required. The workspace's name.
3871    pub workspace: std::string::String,
3872
3873    /// Required. The file's full path including filename, relative to the
3874    /// workspace root.
3875    pub path: std::string::String,
3876
3877    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3878}
3879
3880impl RemoveFileRequest {
3881    pub fn new() -> Self {
3882        std::default::Default::default()
3883    }
3884
3885    /// Sets the value of [workspace][crate::model::RemoveFileRequest::workspace].
3886    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3887        self.workspace = v.into();
3888        self
3889    }
3890
3891    /// Sets the value of [path][crate::model::RemoveFileRequest::path].
3892    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3893        self.path = v.into();
3894        self
3895    }
3896}
3897
3898impl wkt::message::Message for RemoveFileRequest {
3899    fn typename() -> &'static str {
3900        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileRequest"
3901    }
3902}
3903
3904/// `RemoveFile` response message.
3905#[derive(Clone, Default, PartialEq)]
3906#[non_exhaustive]
3907pub struct RemoveFileResponse {
3908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3909}
3910
3911impl RemoveFileResponse {
3912    pub fn new() -> Self {
3913        std::default::Default::default()
3914    }
3915}
3916
3917impl wkt::message::Message for RemoveFileResponse {
3918    fn typename() -> &'static str {
3919        "type.googleapis.com/google.cloud.dataform.v1.RemoveFileResponse"
3920    }
3921}
3922
3923/// `MoveFile` request message.
3924#[derive(Clone, Default, PartialEq)]
3925#[non_exhaustive]
3926pub struct MoveFileRequest {
3927    /// Required. The workspace's name.
3928    pub workspace: std::string::String,
3929
3930    /// Required. The file's full path including filename, relative to the
3931    /// workspace root.
3932    pub path: std::string::String,
3933
3934    /// Required. The file's new path including filename, relative to the workspace
3935    /// root.
3936    pub new_path: std::string::String,
3937
3938    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3939}
3940
3941impl MoveFileRequest {
3942    pub fn new() -> Self {
3943        std::default::Default::default()
3944    }
3945
3946    /// Sets the value of [workspace][crate::model::MoveFileRequest::workspace].
3947    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3948        self.workspace = v.into();
3949        self
3950    }
3951
3952    /// Sets the value of [path][crate::model::MoveFileRequest::path].
3953    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3954        self.path = v.into();
3955        self
3956    }
3957
3958    /// Sets the value of [new_path][crate::model::MoveFileRequest::new_path].
3959    pub fn set_new_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3960        self.new_path = v.into();
3961        self
3962    }
3963}
3964
3965impl wkt::message::Message for MoveFileRequest {
3966    fn typename() -> &'static str {
3967        "type.googleapis.com/google.cloud.dataform.v1.MoveFileRequest"
3968    }
3969}
3970
3971/// `MoveFile` response message.
3972#[derive(Clone, Default, PartialEq)]
3973#[non_exhaustive]
3974pub struct MoveFileResponse {
3975    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3976}
3977
3978impl MoveFileResponse {
3979    pub fn new() -> Self {
3980        std::default::Default::default()
3981    }
3982}
3983
3984impl wkt::message::Message for MoveFileResponse {
3985    fn typename() -> &'static str {
3986        "type.googleapis.com/google.cloud.dataform.v1.MoveFileResponse"
3987    }
3988}
3989
3990/// `WriteFile` request message.
3991#[derive(Clone, Default, PartialEq)]
3992#[non_exhaustive]
3993pub struct WriteFileRequest {
3994    /// Required. The workspace's name.
3995    pub workspace: std::string::String,
3996
3997    /// Required. The file.
3998    pub path: std::string::String,
3999
4000    /// Required. The file's contents.
4001    pub contents: ::bytes::Bytes,
4002
4003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4004}
4005
4006impl WriteFileRequest {
4007    pub fn new() -> Self {
4008        std::default::Default::default()
4009    }
4010
4011    /// Sets the value of [workspace][crate::model::WriteFileRequest::workspace].
4012    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4013        self.workspace = v.into();
4014        self
4015    }
4016
4017    /// Sets the value of [path][crate::model::WriteFileRequest::path].
4018    pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4019        self.path = v.into();
4020        self
4021    }
4022
4023    /// Sets the value of [contents][crate::model::WriteFileRequest::contents].
4024    pub fn set_contents<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4025        self.contents = v.into();
4026        self
4027    }
4028}
4029
4030impl wkt::message::Message for WriteFileRequest {
4031    fn typename() -> &'static str {
4032        "type.googleapis.com/google.cloud.dataform.v1.WriteFileRequest"
4033    }
4034}
4035
4036/// `WriteFile` response message.
4037#[derive(Clone, Default, PartialEq)]
4038#[non_exhaustive]
4039pub struct WriteFileResponse {
4040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4041}
4042
4043impl WriteFileResponse {
4044    pub fn new() -> Self {
4045        std::default::Default::default()
4046    }
4047}
4048
4049impl wkt::message::Message for WriteFileResponse {
4050    fn typename() -> &'static str {
4051        "type.googleapis.com/google.cloud.dataform.v1.WriteFileResponse"
4052    }
4053}
4054
4055/// `InstallNpmPackages` request message.
4056#[derive(Clone, Default, PartialEq)]
4057#[non_exhaustive]
4058pub struct InstallNpmPackagesRequest {
4059    /// Required. The workspace's name.
4060    pub workspace: std::string::String,
4061
4062    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4063}
4064
4065impl InstallNpmPackagesRequest {
4066    pub fn new() -> Self {
4067        std::default::Default::default()
4068    }
4069
4070    /// Sets the value of [workspace][crate::model::InstallNpmPackagesRequest::workspace].
4071    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4072        self.workspace = v.into();
4073        self
4074    }
4075}
4076
4077impl wkt::message::Message for InstallNpmPackagesRequest {
4078    fn typename() -> &'static str {
4079        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesRequest"
4080    }
4081}
4082
4083/// `InstallNpmPackages` response message.
4084#[derive(Clone, Default, PartialEq)]
4085#[non_exhaustive]
4086pub struct InstallNpmPackagesResponse {
4087    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4088}
4089
4090impl InstallNpmPackagesResponse {
4091    pub fn new() -> Self {
4092        std::default::Default::default()
4093    }
4094}
4095
4096impl wkt::message::Message for InstallNpmPackagesResponse {
4097    fn typename() -> &'static str {
4098        "type.googleapis.com/google.cloud.dataform.v1.InstallNpmPackagesResponse"
4099    }
4100}
4101
4102/// Represents a Dataform release configuration.
4103#[derive(Clone, Default, PartialEq)]
4104#[non_exhaustive]
4105pub struct ReleaseConfig {
4106    /// Identifier. The release config's name.
4107    pub name: std::string::String,
4108
4109    /// Required. Git commit/tag/branch name at which the repository should be
4110    /// compiled. Must exist in the remote repository. Examples:
4111    ///
4112    /// - a commit SHA: `12ade345`
4113    /// - a tag: `tag1`
4114    /// - a branch name: `branch1`
4115    pub git_commitish: std::string::String,
4116
4117    /// Optional. If set, fields of `code_compilation_config` override the default
4118    /// compilation settings that are specified in dataform.json.
4119    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
4120
4121    /// Optional. Optional schedule (in cron format) for automatic creation of
4122    /// compilation results.
4123    pub cron_schedule: std::string::String,
4124
4125    /// Optional. Specifies the time zone to be used when interpreting
4126    /// cron_schedule. Must be a time zone name from the time zone database
4127    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
4128    /// unspecified, the default is UTC.
4129    pub time_zone: std::string::String,
4130
4131    /// Output only. Records of the 10 most recent scheduled release attempts,
4132    /// ordered in descending order of `release_time`. Updated whenever automatic
4133    /// creation of a compilation result is triggered by cron_schedule.
4134    pub recent_scheduled_release_records:
4135        std::vec::Vec<crate::model::release_config::ScheduledReleaseRecord>,
4136
4137    /// Optional. The name of the currently released compilation result for this
4138    /// release config. This value is updated when a compilation result is
4139    /// automatically created from this release config (using cron_schedule), or
4140    /// when this resource is updated by API call (perhaps to roll back to an
4141    /// earlier release). The compilation result must have been created using this
4142    /// release config. Must be in the format
4143    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
4144    pub release_compilation_result: std::string::String,
4145
4146    /// Optional. Disables automatic creation of compilation results.
4147    pub disabled: bool,
4148
4149    /// Output only. All the metadata information that is used internally to serve
4150    /// the resource. For example: timestamps, flags, status fields, etc. The
4151    /// format of this field is a JSON string.
4152    pub internal_metadata: std::option::Option<std::string::String>,
4153
4154    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4155}
4156
4157impl ReleaseConfig {
4158    pub fn new() -> Self {
4159        std::default::Default::default()
4160    }
4161
4162    /// Sets the value of [name][crate::model::ReleaseConfig::name].
4163    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4164        self.name = v.into();
4165        self
4166    }
4167
4168    /// Sets the value of [git_commitish][crate::model::ReleaseConfig::git_commitish].
4169    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4170        self.git_commitish = v.into();
4171        self
4172    }
4173
4174    /// Sets the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
4175    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
4176    where
4177        T: std::convert::Into<crate::model::CodeCompilationConfig>,
4178    {
4179        self.code_compilation_config = std::option::Option::Some(v.into());
4180        self
4181    }
4182
4183    /// Sets or clears the value of [code_compilation_config][crate::model::ReleaseConfig::code_compilation_config].
4184    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
4185    where
4186        T: std::convert::Into<crate::model::CodeCompilationConfig>,
4187    {
4188        self.code_compilation_config = v.map(|x| x.into());
4189        self
4190    }
4191
4192    /// Sets the value of [cron_schedule][crate::model::ReleaseConfig::cron_schedule].
4193    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4194        self.cron_schedule = v.into();
4195        self
4196    }
4197
4198    /// Sets the value of [time_zone][crate::model::ReleaseConfig::time_zone].
4199    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4200        self.time_zone = v.into();
4201        self
4202    }
4203
4204    /// Sets the value of [recent_scheduled_release_records][crate::model::ReleaseConfig::recent_scheduled_release_records].
4205    pub fn set_recent_scheduled_release_records<T, V>(mut self, v: T) -> Self
4206    where
4207        T: std::iter::IntoIterator<Item = V>,
4208        V: std::convert::Into<crate::model::release_config::ScheduledReleaseRecord>,
4209    {
4210        use std::iter::Iterator;
4211        self.recent_scheduled_release_records = v.into_iter().map(|i| i.into()).collect();
4212        self
4213    }
4214
4215    /// Sets the value of [release_compilation_result][crate::model::ReleaseConfig::release_compilation_result].
4216    pub fn set_release_compilation_result<T: std::convert::Into<std::string::String>>(
4217        mut self,
4218        v: T,
4219    ) -> Self {
4220        self.release_compilation_result = v.into();
4221        self
4222    }
4223
4224    /// Sets the value of [disabled][crate::model::ReleaseConfig::disabled].
4225    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4226        self.disabled = v.into();
4227        self
4228    }
4229
4230    /// Sets the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
4231    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
4232    where
4233        T: std::convert::Into<std::string::String>,
4234    {
4235        self.internal_metadata = std::option::Option::Some(v.into());
4236        self
4237    }
4238
4239    /// Sets or clears the value of [internal_metadata][crate::model::ReleaseConfig::internal_metadata].
4240    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
4241    where
4242        T: std::convert::Into<std::string::String>,
4243    {
4244        self.internal_metadata = v.map(|x| x.into());
4245        self
4246    }
4247}
4248
4249impl wkt::message::Message for ReleaseConfig {
4250    fn typename() -> &'static str {
4251        "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig"
4252    }
4253}
4254
4255/// Defines additional types related to [ReleaseConfig].
4256pub mod release_config {
4257    #[allow(unused_imports)]
4258    use super::*;
4259
4260    /// A record of an attempt to create a compilation result for this release
4261    /// config.
4262    #[derive(Clone, Default, PartialEq)]
4263    #[non_exhaustive]
4264    pub struct ScheduledReleaseRecord {
4265        /// Output only. The timestamp of this release attempt.
4266        pub release_time: std::option::Option<wkt::Timestamp>,
4267
4268        /// The result of this release attempt.
4269        pub result:
4270            std::option::Option<crate::model::release_config::scheduled_release_record::Result>,
4271
4272        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4273    }
4274
4275    impl ScheduledReleaseRecord {
4276        pub fn new() -> Self {
4277            std::default::Default::default()
4278        }
4279
4280        /// Sets the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
4281        pub fn set_release_time<T>(mut self, v: T) -> Self
4282        where
4283            T: std::convert::Into<wkt::Timestamp>,
4284        {
4285            self.release_time = std::option::Option::Some(v.into());
4286            self
4287        }
4288
4289        /// Sets or clears the value of [release_time][crate::model::release_config::ScheduledReleaseRecord::release_time].
4290        pub fn set_or_clear_release_time<T>(mut self, v: std::option::Option<T>) -> Self
4291        where
4292            T: std::convert::Into<wkt::Timestamp>,
4293        {
4294            self.release_time = v.map(|x| x.into());
4295            self
4296        }
4297
4298        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result].
4299        ///
4300        /// Note that all the setters affecting `result` are mutually
4301        /// exclusive.
4302        pub fn set_result<
4303            T: std::convert::Into<
4304                    std::option::Option<
4305                        crate::model::release_config::scheduled_release_record::Result,
4306                    >,
4307                >,
4308        >(
4309            mut self,
4310            v: T,
4311        ) -> Self {
4312            self.result = v.into();
4313            self
4314        }
4315
4316        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
4317        /// if it holds a `CompilationResult`, `None` if the field is not set or
4318        /// holds a different branch.
4319        pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
4320            #[allow(unreachable_patterns)]
4321            self.result.as_ref().and_then(|v| match v {
4322                crate::model::release_config::scheduled_release_record::Result::CompilationResult(v) => std::option::Option::Some(v),
4323                _ => std::option::Option::None,
4324            })
4325        }
4326
4327        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
4328        /// to hold a `CompilationResult`.
4329        ///
4330        /// Note that all the setters affecting `result` are
4331        /// mutually exclusive.
4332        pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
4333            mut self,
4334            v: T,
4335        ) -> Self {
4336            self.result = std::option::Option::Some(
4337                crate::model::release_config::scheduled_release_record::Result::CompilationResult(
4338                    v.into(),
4339                ),
4340            );
4341            self
4342        }
4343
4344        /// The value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
4345        /// if it holds a `ErrorStatus`, `None` if the field is not set or
4346        /// holds a different branch.
4347        pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
4348            #[allow(unreachable_patterns)]
4349            self.result.as_ref().and_then(|v| match v {
4350                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(v) => {
4351                    std::option::Option::Some(v)
4352                }
4353                _ => std::option::Option::None,
4354            })
4355        }
4356
4357        /// Sets the value of [result][crate::model::release_config::ScheduledReleaseRecord::result]
4358        /// to hold a `ErrorStatus`.
4359        ///
4360        /// Note that all the setters affecting `result` are
4361        /// mutually exclusive.
4362        pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
4363            mut self,
4364            v: T,
4365        ) -> Self {
4366            self.result = std::option::Option::Some(
4367                crate::model::release_config::scheduled_release_record::Result::ErrorStatus(
4368                    v.into(),
4369                ),
4370            );
4371            self
4372        }
4373    }
4374
4375    impl wkt::message::Message for ScheduledReleaseRecord {
4376        fn typename() -> &'static str {
4377            "type.googleapis.com/google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecord"
4378        }
4379    }
4380
4381    /// Defines additional types related to [ScheduledReleaseRecord].
4382    pub mod scheduled_release_record {
4383        #[allow(unused_imports)]
4384        use super::*;
4385
4386        /// The result of this release attempt.
4387        #[derive(Clone, Debug, PartialEq)]
4388        #[non_exhaustive]
4389        pub enum Result {
4390            /// The name of the created compilation result, if one was successfully
4391            /// created. Must be in the format
4392            /// `projects/*/locations/*/repositories/*/compilationResults/*`.
4393            CompilationResult(std::string::String),
4394            /// The error status encountered upon this attempt to create the
4395            /// compilation result, if the attempt was unsuccessful.
4396            ErrorStatus(std::boxed::Box<rpc::model::Status>),
4397        }
4398    }
4399}
4400
4401/// `ListReleaseConfigs` request message.
4402#[derive(Clone, Default, PartialEq)]
4403#[non_exhaustive]
4404pub struct ListReleaseConfigsRequest {
4405    /// Required. The repository in which to list release configs. Must be in the
4406    /// format `projects/*/locations/*/repositories/*`.
4407    pub parent: std::string::String,
4408
4409    /// Optional. Maximum number of release configs to return. The server may
4410    /// return fewer items than requested. If unspecified, the server will pick an
4411    /// appropriate default.
4412    pub page_size: i32,
4413
4414    /// Optional. Page token received from a previous `ListReleaseConfigs` call.
4415    /// Provide this to retrieve the subsequent page.
4416    ///
4417    /// When paginating, all other parameters provided to `ListReleaseConfigs`,
4418    /// with the exception of `page_size`, must match the call that provided the
4419    /// page token.
4420    pub page_token: std::string::String,
4421
4422    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4423}
4424
4425impl ListReleaseConfigsRequest {
4426    pub fn new() -> Self {
4427        std::default::Default::default()
4428    }
4429
4430    /// Sets the value of [parent][crate::model::ListReleaseConfigsRequest::parent].
4431    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4432        self.parent = v.into();
4433        self
4434    }
4435
4436    /// Sets the value of [page_size][crate::model::ListReleaseConfigsRequest::page_size].
4437    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4438        self.page_size = v.into();
4439        self
4440    }
4441
4442    /// Sets the value of [page_token][crate::model::ListReleaseConfigsRequest::page_token].
4443    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4444        self.page_token = v.into();
4445        self
4446    }
4447}
4448
4449impl wkt::message::Message for ListReleaseConfigsRequest {
4450    fn typename() -> &'static str {
4451        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsRequest"
4452    }
4453}
4454
4455/// `ListReleaseConfigs` response message.
4456#[derive(Clone, Default, PartialEq)]
4457#[non_exhaustive]
4458pub struct ListReleaseConfigsResponse {
4459    /// List of release configs.
4460    pub release_configs: std::vec::Vec<crate::model::ReleaseConfig>,
4461
4462    /// A token, which can be sent as `page_token` to retrieve the next page.
4463    /// If this field is omitted, there are no subsequent pages.
4464    pub next_page_token: std::string::String,
4465
4466    /// Locations which could not be reached.
4467    pub unreachable: std::vec::Vec<std::string::String>,
4468
4469    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4470}
4471
4472impl ListReleaseConfigsResponse {
4473    pub fn new() -> Self {
4474        std::default::Default::default()
4475    }
4476
4477    /// Sets the value of [release_configs][crate::model::ListReleaseConfigsResponse::release_configs].
4478    pub fn set_release_configs<T, V>(mut self, v: T) -> Self
4479    where
4480        T: std::iter::IntoIterator<Item = V>,
4481        V: std::convert::Into<crate::model::ReleaseConfig>,
4482    {
4483        use std::iter::Iterator;
4484        self.release_configs = v.into_iter().map(|i| i.into()).collect();
4485        self
4486    }
4487
4488    /// Sets the value of [next_page_token][crate::model::ListReleaseConfigsResponse::next_page_token].
4489    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4490        self.next_page_token = v.into();
4491        self
4492    }
4493
4494    /// Sets the value of [unreachable][crate::model::ListReleaseConfigsResponse::unreachable].
4495    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4496    where
4497        T: std::iter::IntoIterator<Item = V>,
4498        V: std::convert::Into<std::string::String>,
4499    {
4500        use std::iter::Iterator;
4501        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4502        self
4503    }
4504}
4505
4506impl wkt::message::Message for ListReleaseConfigsResponse {
4507    fn typename() -> &'static str {
4508        "type.googleapis.com/google.cloud.dataform.v1.ListReleaseConfigsResponse"
4509    }
4510}
4511
4512#[doc(hidden)]
4513impl gax::paginator::internal::PageableResponse for ListReleaseConfigsResponse {
4514    type PageItem = crate::model::ReleaseConfig;
4515
4516    fn items(self) -> std::vec::Vec<Self::PageItem> {
4517        self.release_configs
4518    }
4519
4520    fn next_page_token(&self) -> std::string::String {
4521        use std::clone::Clone;
4522        self.next_page_token.clone()
4523    }
4524}
4525
4526/// `GetReleaseConfig` request message.
4527#[derive(Clone, Default, PartialEq)]
4528#[non_exhaustive]
4529pub struct GetReleaseConfigRequest {
4530    /// Required. The release config's name.
4531    pub name: std::string::String,
4532
4533    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4534}
4535
4536impl GetReleaseConfigRequest {
4537    pub fn new() -> Self {
4538        std::default::Default::default()
4539    }
4540
4541    /// Sets the value of [name][crate::model::GetReleaseConfigRequest::name].
4542    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4543        self.name = v.into();
4544        self
4545    }
4546}
4547
4548impl wkt::message::Message for GetReleaseConfigRequest {
4549    fn typename() -> &'static str {
4550        "type.googleapis.com/google.cloud.dataform.v1.GetReleaseConfigRequest"
4551    }
4552}
4553
4554/// `CreateReleaseConfig` request message.
4555#[derive(Clone, Default, PartialEq)]
4556#[non_exhaustive]
4557pub struct CreateReleaseConfigRequest {
4558    /// Required. The repository in which to create the release config. Must be in
4559    /// the format `projects/*/locations/*/repositories/*`.
4560    pub parent: std::string::String,
4561
4562    /// Required. The release config to create.
4563    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
4564
4565    /// Required. The ID to use for the release config, which will become the final
4566    /// component of the release config's resource name.
4567    pub release_config_id: std::string::String,
4568
4569    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4570}
4571
4572impl CreateReleaseConfigRequest {
4573    pub fn new() -> Self {
4574        std::default::Default::default()
4575    }
4576
4577    /// Sets the value of [parent][crate::model::CreateReleaseConfigRequest::parent].
4578    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4579        self.parent = v.into();
4580        self
4581    }
4582
4583    /// Sets the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
4584    pub fn set_release_config<T>(mut self, v: T) -> Self
4585    where
4586        T: std::convert::Into<crate::model::ReleaseConfig>,
4587    {
4588        self.release_config = std::option::Option::Some(v.into());
4589        self
4590    }
4591
4592    /// Sets or clears the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
4593    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
4594    where
4595        T: std::convert::Into<crate::model::ReleaseConfig>,
4596    {
4597        self.release_config = v.map(|x| x.into());
4598        self
4599    }
4600
4601    /// Sets the value of [release_config_id][crate::model::CreateReleaseConfigRequest::release_config_id].
4602    pub fn set_release_config_id<T: std::convert::Into<std::string::String>>(
4603        mut self,
4604        v: T,
4605    ) -> Self {
4606        self.release_config_id = v.into();
4607        self
4608    }
4609}
4610
4611impl wkt::message::Message for CreateReleaseConfigRequest {
4612    fn typename() -> &'static str {
4613        "type.googleapis.com/google.cloud.dataform.v1.CreateReleaseConfigRequest"
4614    }
4615}
4616
4617/// `UpdateReleaseConfig` request message.
4618#[derive(Clone, Default, PartialEq)]
4619#[non_exhaustive]
4620pub struct UpdateReleaseConfigRequest {
4621    /// Optional. Specifies the fields to be updated in the release config. If left
4622    /// unset, all fields will be updated.
4623    pub update_mask: std::option::Option<wkt::FieldMask>,
4624
4625    /// Required. The release config to update.
4626    pub release_config: std::option::Option<crate::model::ReleaseConfig>,
4627
4628    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4629}
4630
4631impl UpdateReleaseConfigRequest {
4632    pub fn new() -> Self {
4633        std::default::Default::default()
4634    }
4635
4636    /// Sets the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
4637    pub fn set_update_mask<T>(mut self, v: T) -> Self
4638    where
4639        T: std::convert::Into<wkt::FieldMask>,
4640    {
4641        self.update_mask = std::option::Option::Some(v.into());
4642        self
4643    }
4644
4645    /// Sets or clears the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
4646    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4647    where
4648        T: std::convert::Into<wkt::FieldMask>,
4649    {
4650        self.update_mask = v.map(|x| x.into());
4651        self
4652    }
4653
4654    /// Sets the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
4655    pub fn set_release_config<T>(mut self, v: T) -> Self
4656    where
4657        T: std::convert::Into<crate::model::ReleaseConfig>,
4658    {
4659        self.release_config = std::option::Option::Some(v.into());
4660        self
4661    }
4662
4663    /// Sets or clears the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
4664    pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
4665    where
4666        T: std::convert::Into<crate::model::ReleaseConfig>,
4667    {
4668        self.release_config = v.map(|x| x.into());
4669        self
4670    }
4671}
4672
4673impl wkt::message::Message for UpdateReleaseConfigRequest {
4674    fn typename() -> &'static str {
4675        "type.googleapis.com/google.cloud.dataform.v1.UpdateReleaseConfigRequest"
4676    }
4677}
4678
4679/// `DeleteReleaseConfig` request message.
4680#[derive(Clone, Default, PartialEq)]
4681#[non_exhaustive]
4682pub struct DeleteReleaseConfigRequest {
4683    /// Required. The release config's name.
4684    pub name: std::string::String,
4685
4686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4687}
4688
4689impl DeleteReleaseConfigRequest {
4690    pub fn new() -> Self {
4691        std::default::Default::default()
4692    }
4693
4694    /// Sets the value of [name][crate::model::DeleteReleaseConfigRequest::name].
4695    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4696        self.name = v.into();
4697        self
4698    }
4699}
4700
4701impl wkt::message::Message for DeleteReleaseConfigRequest {
4702    fn typename() -> &'static str {
4703        "type.googleapis.com/google.cloud.dataform.v1.DeleteReleaseConfigRequest"
4704    }
4705}
4706
4707/// Represents the result of compiling a Dataform project.
4708#[derive(Clone, Default, PartialEq)]
4709#[non_exhaustive]
4710pub struct CompilationResult {
4711    /// Output only. The compilation result's name.
4712    pub name: std::string::String,
4713
4714    /// Immutable. If set, fields of `code_compilation_config` override the default
4715    /// compilation settings that are specified in dataform.json.
4716    pub code_compilation_config: std::option::Option<crate::model::CodeCompilationConfig>,
4717
4718    /// Output only. The fully resolved Git commit SHA of the code that was
4719    /// compiled. Not set for compilation results whose source is a workspace.
4720    pub resolved_git_commit_sha: std::string::String,
4721
4722    /// Output only. The version of `@dataform/core` that was used for compilation.
4723    pub dataform_core_version: std::string::String,
4724
4725    /// Output only. Errors encountered during project compilation.
4726    pub compilation_errors: std::vec::Vec<crate::model::compilation_result::CompilationError>,
4727
4728    /// Output only. Only set if the repository has a KMS Key.
4729    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
4730
4731    /// Output only. The timestamp of when the compilation result was created.
4732    pub create_time: std::option::Option<wkt::Timestamp>,
4733
4734    /// Output only. All the metadata information that is used internally to serve
4735    /// the resource. For example: timestamps, flags, status fields, etc. The
4736    /// format of this field is a JSON string.
4737    pub internal_metadata: std::option::Option<std::string::String>,
4738
4739    /// The source of the compilation result.
4740    pub source: std::option::Option<crate::model::compilation_result::Source>,
4741
4742    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4743}
4744
4745impl CompilationResult {
4746    pub fn new() -> Self {
4747        std::default::Default::default()
4748    }
4749
4750    /// Sets the value of [name][crate::model::CompilationResult::name].
4751    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4752        self.name = v.into();
4753        self
4754    }
4755
4756    /// Sets the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
4757    pub fn set_code_compilation_config<T>(mut self, v: T) -> Self
4758    where
4759        T: std::convert::Into<crate::model::CodeCompilationConfig>,
4760    {
4761        self.code_compilation_config = std::option::Option::Some(v.into());
4762        self
4763    }
4764
4765    /// Sets or clears the value of [code_compilation_config][crate::model::CompilationResult::code_compilation_config].
4766    pub fn set_or_clear_code_compilation_config<T>(mut self, v: std::option::Option<T>) -> Self
4767    where
4768        T: std::convert::Into<crate::model::CodeCompilationConfig>,
4769    {
4770        self.code_compilation_config = v.map(|x| x.into());
4771        self
4772    }
4773
4774    /// Sets the value of [resolved_git_commit_sha][crate::model::CompilationResult::resolved_git_commit_sha].
4775    pub fn set_resolved_git_commit_sha<T: std::convert::Into<std::string::String>>(
4776        mut self,
4777        v: T,
4778    ) -> Self {
4779        self.resolved_git_commit_sha = v.into();
4780        self
4781    }
4782
4783    /// Sets the value of [dataform_core_version][crate::model::CompilationResult::dataform_core_version].
4784    pub fn set_dataform_core_version<T: std::convert::Into<std::string::String>>(
4785        mut self,
4786        v: T,
4787    ) -> Self {
4788        self.dataform_core_version = v.into();
4789        self
4790    }
4791
4792    /// Sets the value of [compilation_errors][crate::model::CompilationResult::compilation_errors].
4793    pub fn set_compilation_errors<T, V>(mut self, v: T) -> Self
4794    where
4795        T: std::iter::IntoIterator<Item = V>,
4796        V: std::convert::Into<crate::model::compilation_result::CompilationError>,
4797    {
4798        use std::iter::Iterator;
4799        self.compilation_errors = v.into_iter().map(|i| i.into()).collect();
4800        self
4801    }
4802
4803    /// Sets the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
4804    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
4805    where
4806        T: std::convert::Into<crate::model::DataEncryptionState>,
4807    {
4808        self.data_encryption_state = std::option::Option::Some(v.into());
4809        self
4810    }
4811
4812    /// Sets or clears the value of [data_encryption_state][crate::model::CompilationResult::data_encryption_state].
4813    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
4814    where
4815        T: std::convert::Into<crate::model::DataEncryptionState>,
4816    {
4817        self.data_encryption_state = v.map(|x| x.into());
4818        self
4819    }
4820
4821    /// Sets the value of [create_time][crate::model::CompilationResult::create_time].
4822    pub fn set_create_time<T>(mut self, v: T) -> Self
4823    where
4824        T: std::convert::Into<wkt::Timestamp>,
4825    {
4826        self.create_time = std::option::Option::Some(v.into());
4827        self
4828    }
4829
4830    /// Sets or clears the value of [create_time][crate::model::CompilationResult::create_time].
4831    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4832    where
4833        T: std::convert::Into<wkt::Timestamp>,
4834    {
4835        self.create_time = v.map(|x| x.into());
4836        self
4837    }
4838
4839    /// Sets the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
4840    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
4841    where
4842        T: std::convert::Into<std::string::String>,
4843    {
4844        self.internal_metadata = std::option::Option::Some(v.into());
4845        self
4846    }
4847
4848    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResult::internal_metadata].
4849    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
4850    where
4851        T: std::convert::Into<std::string::String>,
4852    {
4853        self.internal_metadata = v.map(|x| x.into());
4854        self
4855    }
4856
4857    /// Sets the value of [source][crate::model::CompilationResult::source].
4858    ///
4859    /// Note that all the setters affecting `source` are mutually
4860    /// exclusive.
4861    pub fn set_source<
4862        T: std::convert::Into<std::option::Option<crate::model::compilation_result::Source>>,
4863    >(
4864        mut self,
4865        v: T,
4866    ) -> Self {
4867        self.source = v.into();
4868        self
4869    }
4870
4871    /// The value of [source][crate::model::CompilationResult::source]
4872    /// if it holds a `GitCommitish`, `None` if the field is not set or
4873    /// holds a different branch.
4874    pub fn git_commitish(&self) -> std::option::Option<&std::string::String> {
4875        #[allow(unreachable_patterns)]
4876        self.source.as_ref().and_then(|v| match v {
4877            crate::model::compilation_result::Source::GitCommitish(v) => {
4878                std::option::Option::Some(v)
4879            }
4880            _ => std::option::Option::None,
4881        })
4882    }
4883
4884    /// Sets the value of [source][crate::model::CompilationResult::source]
4885    /// to hold a `GitCommitish`.
4886    ///
4887    /// Note that all the setters affecting `source` are
4888    /// mutually exclusive.
4889    pub fn set_git_commitish<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4890        self.source = std::option::Option::Some(
4891            crate::model::compilation_result::Source::GitCommitish(v.into()),
4892        );
4893        self
4894    }
4895
4896    /// The value of [source][crate::model::CompilationResult::source]
4897    /// if it holds a `Workspace`, `None` if the field is not set or
4898    /// holds a different branch.
4899    pub fn workspace(&self) -> std::option::Option<&std::string::String> {
4900        #[allow(unreachable_patterns)]
4901        self.source.as_ref().and_then(|v| match v {
4902            crate::model::compilation_result::Source::Workspace(v) => std::option::Option::Some(v),
4903            _ => std::option::Option::None,
4904        })
4905    }
4906
4907    /// Sets the value of [source][crate::model::CompilationResult::source]
4908    /// to hold a `Workspace`.
4909    ///
4910    /// Note that all the setters affecting `source` are
4911    /// mutually exclusive.
4912    pub fn set_workspace<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4913        self.source = std::option::Option::Some(
4914            crate::model::compilation_result::Source::Workspace(v.into()),
4915        );
4916        self
4917    }
4918
4919    /// The value of [source][crate::model::CompilationResult::source]
4920    /// if it holds a `ReleaseConfig`, `None` if the field is not set or
4921    /// holds a different branch.
4922    pub fn release_config(&self) -> std::option::Option<&std::string::String> {
4923        #[allow(unreachable_patterns)]
4924        self.source.as_ref().and_then(|v| match v {
4925            crate::model::compilation_result::Source::ReleaseConfig(v) => {
4926                std::option::Option::Some(v)
4927            }
4928            _ => std::option::Option::None,
4929        })
4930    }
4931
4932    /// Sets the value of [source][crate::model::CompilationResult::source]
4933    /// to hold a `ReleaseConfig`.
4934    ///
4935    /// Note that all the setters affecting `source` are
4936    /// mutually exclusive.
4937    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4938        self.source = std::option::Option::Some(
4939            crate::model::compilation_result::Source::ReleaseConfig(v.into()),
4940        );
4941        self
4942    }
4943}
4944
4945impl wkt::message::Message for CompilationResult {
4946    fn typename() -> &'static str {
4947        "type.googleapis.com/google.cloud.dataform.v1.CompilationResult"
4948    }
4949}
4950
4951/// Defines additional types related to [CompilationResult].
4952pub mod compilation_result {
4953    #[allow(unused_imports)]
4954    use super::*;
4955
4956    /// An error encountered when attempting to compile a Dataform project.
4957    #[derive(Clone, Default, PartialEq)]
4958    #[non_exhaustive]
4959    pub struct CompilationError {
4960        /// Output only. The error's top level message.
4961        pub message: std::string::String,
4962
4963        /// Output only. The error's full stack trace.
4964        pub stack: std::string::String,
4965
4966        /// Output only. The path of the file where this error occurred, if
4967        /// available, relative to the project root.
4968        pub path: std::string::String,
4969
4970        /// Output only. The identifier of the action where this error occurred, if
4971        /// available.
4972        pub action_target: std::option::Option<crate::model::Target>,
4973
4974        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4975    }
4976
4977    impl CompilationError {
4978        pub fn new() -> Self {
4979            std::default::Default::default()
4980        }
4981
4982        /// Sets the value of [message][crate::model::compilation_result::CompilationError::message].
4983        pub fn set_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4984            self.message = v.into();
4985            self
4986        }
4987
4988        /// Sets the value of [stack][crate::model::compilation_result::CompilationError::stack].
4989        pub fn set_stack<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4990            self.stack = v.into();
4991            self
4992        }
4993
4994        /// Sets the value of [path][crate::model::compilation_result::CompilationError::path].
4995        pub fn set_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4996            self.path = v.into();
4997            self
4998        }
4999
5000        /// Sets the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
5001        pub fn set_action_target<T>(mut self, v: T) -> Self
5002        where
5003            T: std::convert::Into<crate::model::Target>,
5004        {
5005            self.action_target = std::option::Option::Some(v.into());
5006            self
5007        }
5008
5009        /// Sets or clears the value of [action_target][crate::model::compilation_result::CompilationError::action_target].
5010        pub fn set_or_clear_action_target<T>(mut self, v: std::option::Option<T>) -> Self
5011        where
5012            T: std::convert::Into<crate::model::Target>,
5013        {
5014            self.action_target = v.map(|x| x.into());
5015            self
5016        }
5017    }
5018
5019    impl wkt::message::Message for CompilationError {
5020        fn typename() -> &'static str {
5021            "type.googleapis.com/google.cloud.dataform.v1.CompilationResult.CompilationError"
5022        }
5023    }
5024
5025    /// The source of the compilation result.
5026    #[derive(Clone, Debug, PartialEq)]
5027    #[non_exhaustive]
5028    pub enum Source {
5029        /// Immutable. Git commit/tag/branch name at which the repository should be
5030        /// compiled. Must exist in the remote repository. Examples:
5031        ///
5032        /// - a commit SHA: `12ade345`
5033        /// - a tag: `tag1`
5034        /// - a branch name: `branch1`
5035        GitCommitish(std::string::String),
5036        /// Immutable. The name of the workspace to compile. Must be in the format
5037        /// `projects/*/locations/*/repositories/*/workspaces/*`.
5038        Workspace(std::string::String),
5039        /// Immutable. The name of the release config to compile. Must be in the
5040        /// format `projects/*/locations/*/repositories/*/releaseConfigs/*`.
5041        ReleaseConfig(std::string::String),
5042    }
5043}
5044
5045/// Configures various aspects of Dataform code compilation.
5046#[derive(Clone, Default, PartialEq)]
5047#[non_exhaustive]
5048pub struct CodeCompilationConfig {
5049    /// Optional. The default database (Google Cloud project ID).
5050    pub default_database: std::string::String,
5051
5052    /// Optional. The default schema (BigQuery dataset ID).
5053    pub default_schema: std::string::String,
5054
5055    /// Optional. The default BigQuery location to use. Defaults to "US".
5056    /// See the BigQuery docs for a full list of locations:
5057    /// <https://cloud.google.com/bigquery/docs/locations>.
5058    pub default_location: std::string::String,
5059
5060    /// Optional. The default schema (BigQuery dataset ID) for assertions.
5061    pub assertion_schema: std::string::String,
5062
5063    /// Optional. User-defined variables that are made available to project code
5064    /// during compilation.
5065    pub vars: std::collections::HashMap<std::string::String, std::string::String>,
5066
5067    /// Optional. The suffix that should be appended to all database (Google Cloud
5068    /// project ID) names.
5069    pub database_suffix: std::string::String,
5070
5071    /// Optional. The suffix that should be appended to all schema (BigQuery
5072    /// dataset ID) names.
5073    pub schema_suffix: std::string::String,
5074
5075    /// Optional. The prefix that should be prepended to all table names.
5076    pub table_prefix: std::string::String,
5077
5078    /// Optional. The prefix to prepend to built-in assertion names.
5079    pub builtin_assertion_name_prefix: std::string::String,
5080
5081    /// Optional. The default notebook runtime options.
5082    pub default_notebook_runtime_options: std::option::Option<crate::model::NotebookRuntimeOptions>,
5083
5084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5085}
5086
5087impl CodeCompilationConfig {
5088    pub fn new() -> Self {
5089        std::default::Default::default()
5090    }
5091
5092    /// Sets the value of [default_database][crate::model::CodeCompilationConfig::default_database].
5093    pub fn set_default_database<T: std::convert::Into<std::string::String>>(
5094        mut self,
5095        v: T,
5096    ) -> Self {
5097        self.default_database = v.into();
5098        self
5099    }
5100
5101    /// Sets the value of [default_schema][crate::model::CodeCompilationConfig::default_schema].
5102    pub fn set_default_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5103        self.default_schema = v.into();
5104        self
5105    }
5106
5107    /// Sets the value of [default_location][crate::model::CodeCompilationConfig::default_location].
5108    pub fn set_default_location<T: std::convert::Into<std::string::String>>(
5109        mut self,
5110        v: T,
5111    ) -> Self {
5112        self.default_location = v.into();
5113        self
5114    }
5115
5116    /// Sets the value of [assertion_schema][crate::model::CodeCompilationConfig::assertion_schema].
5117    pub fn set_assertion_schema<T: std::convert::Into<std::string::String>>(
5118        mut self,
5119        v: T,
5120    ) -> Self {
5121        self.assertion_schema = v.into();
5122        self
5123    }
5124
5125    /// Sets the value of [vars][crate::model::CodeCompilationConfig::vars].
5126    pub fn set_vars<T, K, V>(mut self, v: T) -> Self
5127    where
5128        T: std::iter::IntoIterator<Item = (K, V)>,
5129        K: std::convert::Into<std::string::String>,
5130        V: std::convert::Into<std::string::String>,
5131    {
5132        use std::iter::Iterator;
5133        self.vars = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5134        self
5135    }
5136
5137    /// Sets the value of [database_suffix][crate::model::CodeCompilationConfig::database_suffix].
5138    pub fn set_database_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5139        self.database_suffix = v.into();
5140        self
5141    }
5142
5143    /// Sets the value of [schema_suffix][crate::model::CodeCompilationConfig::schema_suffix].
5144    pub fn set_schema_suffix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5145        self.schema_suffix = v.into();
5146        self
5147    }
5148
5149    /// Sets the value of [table_prefix][crate::model::CodeCompilationConfig::table_prefix].
5150    pub fn set_table_prefix<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5151        self.table_prefix = v.into();
5152        self
5153    }
5154
5155    /// Sets the value of [builtin_assertion_name_prefix][crate::model::CodeCompilationConfig::builtin_assertion_name_prefix].
5156    pub fn set_builtin_assertion_name_prefix<T: std::convert::Into<std::string::String>>(
5157        mut self,
5158        v: T,
5159    ) -> Self {
5160        self.builtin_assertion_name_prefix = v.into();
5161        self
5162    }
5163
5164    /// Sets the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
5165    pub fn set_default_notebook_runtime_options<T>(mut self, v: T) -> Self
5166    where
5167        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
5168    {
5169        self.default_notebook_runtime_options = std::option::Option::Some(v.into());
5170        self
5171    }
5172
5173    /// Sets or clears the value of [default_notebook_runtime_options][crate::model::CodeCompilationConfig::default_notebook_runtime_options].
5174    pub fn set_or_clear_default_notebook_runtime_options<T>(
5175        mut self,
5176        v: std::option::Option<T>,
5177    ) -> Self
5178    where
5179        T: std::convert::Into<crate::model::NotebookRuntimeOptions>,
5180    {
5181        self.default_notebook_runtime_options = v.map(|x| x.into());
5182        self
5183    }
5184}
5185
5186impl wkt::message::Message for CodeCompilationConfig {
5187    fn typename() -> &'static str {
5188        "type.googleapis.com/google.cloud.dataform.v1.CodeCompilationConfig"
5189    }
5190}
5191
5192/// Configures various aspects of Dataform notebook runtime.
5193#[derive(Clone, Default, PartialEq)]
5194#[non_exhaustive]
5195pub struct NotebookRuntimeOptions {
5196    /// Optional. The resource name of the [Colab runtime template]
5197    /// (<https://cloud.google.com/colab/docs/runtimes>), from which a runtime is
5198    /// created for notebook executions. If not specified, a runtime is created
5199    /// with Colab's default specifications.
5200    pub ai_platform_notebook_runtime_template: std::string::String,
5201
5202    /// The location to store the notebook execution result.
5203    pub execution_sink: std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
5204
5205    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5206}
5207
5208impl NotebookRuntimeOptions {
5209    pub fn new() -> Self {
5210        std::default::Default::default()
5211    }
5212
5213    /// Sets the value of [ai_platform_notebook_runtime_template][crate::model::NotebookRuntimeOptions::ai_platform_notebook_runtime_template].
5214    pub fn set_ai_platform_notebook_runtime_template<T: std::convert::Into<std::string::String>>(
5215        mut self,
5216        v: T,
5217    ) -> Self {
5218        self.ai_platform_notebook_runtime_template = v.into();
5219        self
5220    }
5221
5222    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink].
5223    ///
5224    /// Note that all the setters affecting `execution_sink` are mutually
5225    /// exclusive.
5226    pub fn set_execution_sink<
5227        T: std::convert::Into<
5228                std::option::Option<crate::model::notebook_runtime_options::ExecutionSink>,
5229            >,
5230    >(
5231        mut self,
5232        v: T,
5233    ) -> Self {
5234        self.execution_sink = v.into();
5235        self
5236    }
5237
5238    /// The value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
5239    /// if it holds a `GcsOutputBucket`, `None` if the field is not set or
5240    /// holds a different branch.
5241    pub fn gcs_output_bucket(&self) -> std::option::Option<&std::string::String> {
5242        #[allow(unreachable_patterns)]
5243        self.execution_sink.as_ref().and_then(|v| match v {
5244            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v) => {
5245                std::option::Option::Some(v)
5246            }
5247            _ => std::option::Option::None,
5248        })
5249    }
5250
5251    /// Sets the value of [execution_sink][crate::model::NotebookRuntimeOptions::execution_sink]
5252    /// to hold a `GcsOutputBucket`.
5253    ///
5254    /// Note that all the setters affecting `execution_sink` are
5255    /// mutually exclusive.
5256    pub fn set_gcs_output_bucket<T: std::convert::Into<std::string::String>>(
5257        mut self,
5258        v: T,
5259    ) -> Self {
5260        self.execution_sink = std::option::Option::Some(
5261            crate::model::notebook_runtime_options::ExecutionSink::GcsOutputBucket(v.into()),
5262        );
5263        self
5264    }
5265}
5266
5267impl wkt::message::Message for NotebookRuntimeOptions {
5268    fn typename() -> &'static str {
5269        "type.googleapis.com/google.cloud.dataform.v1.NotebookRuntimeOptions"
5270    }
5271}
5272
5273/// Defines additional types related to [NotebookRuntimeOptions].
5274pub mod notebook_runtime_options {
5275    #[allow(unused_imports)]
5276    use super::*;
5277
5278    /// The location to store the notebook execution result.
5279    #[derive(Clone, Debug, PartialEq)]
5280    #[non_exhaustive]
5281    pub enum ExecutionSink {
5282        /// Optional. The Google Cloud Storage location to upload the result to.
5283        /// Format: `gs://bucket-name`.
5284        GcsOutputBucket(std::string::String),
5285    }
5286}
5287
5288/// `ListCompilationResults` request message.
5289#[derive(Clone, Default, PartialEq)]
5290#[non_exhaustive]
5291pub struct ListCompilationResultsRequest {
5292    /// Required. The repository in which to list compilation results. Must be in
5293    /// the format `projects/*/locations/*/repositories/*`.
5294    pub parent: std::string::String,
5295
5296    /// Optional. Maximum number of compilation results to return. The server may
5297    /// return fewer items than requested. If unspecified, the server will pick an
5298    /// appropriate default.
5299    pub page_size: i32,
5300
5301    /// Optional. Page token received from a previous `ListCompilationResults`
5302    /// call. Provide this to retrieve the subsequent page.
5303    ///
5304    /// When paginating, all other parameters provided to `ListCompilationResults`,
5305    /// with the exception of `page_size`, must match the call that provided the
5306    /// page token.
5307    pub page_token: std::string::String,
5308
5309    /// Optional. This field only supports ordering by `name` and `create_time`.
5310    /// If unspecified, the server will choose the ordering.
5311    /// If specified, the default order is ascending for the `name` field.
5312    pub order_by: std::string::String,
5313
5314    /// Optional. Filter for the returned list.
5315    pub filter: std::string::String,
5316
5317    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5318}
5319
5320impl ListCompilationResultsRequest {
5321    pub fn new() -> Self {
5322        std::default::Default::default()
5323    }
5324
5325    /// Sets the value of [parent][crate::model::ListCompilationResultsRequest::parent].
5326    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5327        self.parent = v.into();
5328        self
5329    }
5330
5331    /// Sets the value of [page_size][crate::model::ListCompilationResultsRequest::page_size].
5332    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5333        self.page_size = v.into();
5334        self
5335    }
5336
5337    /// Sets the value of [page_token][crate::model::ListCompilationResultsRequest::page_token].
5338    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5339        self.page_token = v.into();
5340        self
5341    }
5342
5343    /// Sets the value of [order_by][crate::model::ListCompilationResultsRequest::order_by].
5344    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5345        self.order_by = v.into();
5346        self
5347    }
5348
5349    /// Sets the value of [filter][crate::model::ListCompilationResultsRequest::filter].
5350    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5351        self.filter = v.into();
5352        self
5353    }
5354}
5355
5356impl wkt::message::Message for ListCompilationResultsRequest {
5357    fn typename() -> &'static str {
5358        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsRequest"
5359    }
5360}
5361
5362/// `ListCompilationResults` response message.
5363#[derive(Clone, Default, PartialEq)]
5364#[non_exhaustive]
5365pub struct ListCompilationResultsResponse {
5366    /// List of compilation results.
5367    pub compilation_results: std::vec::Vec<crate::model::CompilationResult>,
5368
5369    /// A token, which can be sent as `page_token` to retrieve the next page.
5370    /// If this field is omitted, there are no subsequent pages.
5371    pub next_page_token: std::string::String,
5372
5373    /// Locations which could not be reached.
5374    pub unreachable: std::vec::Vec<std::string::String>,
5375
5376    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5377}
5378
5379impl ListCompilationResultsResponse {
5380    pub fn new() -> Self {
5381        std::default::Default::default()
5382    }
5383
5384    /// Sets the value of [compilation_results][crate::model::ListCompilationResultsResponse::compilation_results].
5385    pub fn set_compilation_results<T, V>(mut self, v: T) -> Self
5386    where
5387        T: std::iter::IntoIterator<Item = V>,
5388        V: std::convert::Into<crate::model::CompilationResult>,
5389    {
5390        use std::iter::Iterator;
5391        self.compilation_results = v.into_iter().map(|i| i.into()).collect();
5392        self
5393    }
5394
5395    /// Sets the value of [next_page_token][crate::model::ListCompilationResultsResponse::next_page_token].
5396    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5397        self.next_page_token = v.into();
5398        self
5399    }
5400
5401    /// Sets the value of [unreachable][crate::model::ListCompilationResultsResponse::unreachable].
5402    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5403    where
5404        T: std::iter::IntoIterator<Item = V>,
5405        V: std::convert::Into<std::string::String>,
5406    {
5407        use std::iter::Iterator;
5408        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5409        self
5410    }
5411}
5412
5413impl wkt::message::Message for ListCompilationResultsResponse {
5414    fn typename() -> &'static str {
5415        "type.googleapis.com/google.cloud.dataform.v1.ListCompilationResultsResponse"
5416    }
5417}
5418
5419#[doc(hidden)]
5420impl gax::paginator::internal::PageableResponse for ListCompilationResultsResponse {
5421    type PageItem = crate::model::CompilationResult;
5422
5423    fn items(self) -> std::vec::Vec<Self::PageItem> {
5424        self.compilation_results
5425    }
5426
5427    fn next_page_token(&self) -> std::string::String {
5428        use std::clone::Clone;
5429        self.next_page_token.clone()
5430    }
5431}
5432
5433/// `GetCompilationResult` request message.
5434#[derive(Clone, Default, PartialEq)]
5435#[non_exhaustive]
5436pub struct GetCompilationResultRequest {
5437    /// Required. The compilation result's name.
5438    pub name: std::string::String,
5439
5440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5441}
5442
5443impl GetCompilationResultRequest {
5444    pub fn new() -> Self {
5445        std::default::Default::default()
5446    }
5447
5448    /// Sets the value of [name][crate::model::GetCompilationResultRequest::name].
5449    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5450        self.name = v.into();
5451        self
5452    }
5453}
5454
5455impl wkt::message::Message for GetCompilationResultRequest {
5456    fn typename() -> &'static str {
5457        "type.googleapis.com/google.cloud.dataform.v1.GetCompilationResultRequest"
5458    }
5459}
5460
5461/// `CreateCompilationResult` request message.
5462#[derive(Clone, Default, PartialEq)]
5463#[non_exhaustive]
5464pub struct CreateCompilationResultRequest {
5465    /// Required. The repository in which to create the compilation result. Must be
5466    /// in the format `projects/*/locations/*/repositories/*`.
5467    pub parent: std::string::String,
5468
5469    /// Required. The compilation result to create.
5470    pub compilation_result: std::option::Option<crate::model::CompilationResult>,
5471
5472    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5473}
5474
5475impl CreateCompilationResultRequest {
5476    pub fn new() -> Self {
5477        std::default::Default::default()
5478    }
5479
5480    /// Sets the value of [parent][crate::model::CreateCompilationResultRequest::parent].
5481    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5482        self.parent = v.into();
5483        self
5484    }
5485
5486    /// Sets the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
5487    pub fn set_compilation_result<T>(mut self, v: T) -> Self
5488    where
5489        T: std::convert::Into<crate::model::CompilationResult>,
5490    {
5491        self.compilation_result = std::option::Option::Some(v.into());
5492        self
5493    }
5494
5495    /// Sets or clears the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
5496    pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
5497    where
5498        T: std::convert::Into<crate::model::CompilationResult>,
5499    {
5500        self.compilation_result = v.map(|x| x.into());
5501        self
5502    }
5503}
5504
5505impl wkt::message::Message for CreateCompilationResultRequest {
5506    fn typename() -> &'static str {
5507        "type.googleapis.com/google.cloud.dataform.v1.CreateCompilationResultRequest"
5508    }
5509}
5510
5511/// Represents an action identifier. If the action writes output, the output
5512/// will be written to the referenced database object.
5513#[derive(Clone, Default, PartialEq)]
5514#[non_exhaustive]
5515pub struct Target {
5516    /// Optional. The action's database (Google Cloud project ID) .
5517    pub database: std::string::String,
5518
5519    /// Optional. The action's schema (BigQuery dataset ID), within `database`.
5520    pub schema: std::string::String,
5521
5522    /// Optional. The action's name, within `database` and `schema`.
5523    pub name: std::string::String,
5524
5525    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5526}
5527
5528impl Target {
5529    pub fn new() -> Self {
5530        std::default::Default::default()
5531    }
5532
5533    /// Sets the value of [database][crate::model::Target::database].
5534    pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5535        self.database = v.into();
5536        self
5537    }
5538
5539    /// Sets the value of [schema][crate::model::Target::schema].
5540    pub fn set_schema<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5541        self.schema = v.into();
5542        self
5543    }
5544
5545    /// Sets the value of [name][crate::model::Target::name].
5546    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5547        self.name = v.into();
5548        self
5549    }
5550}
5551
5552impl wkt::message::Message for Target {
5553    fn typename() -> &'static str {
5554        "type.googleapis.com/google.cloud.dataform.v1.Target"
5555    }
5556}
5557
5558/// Describes a relation and its columns.
5559#[derive(Clone, Default, PartialEq)]
5560#[non_exhaustive]
5561pub struct RelationDescriptor {
5562    /// A text description of the relation.
5563    pub description: std::string::String,
5564
5565    /// A list of descriptions of columns within the relation.
5566    pub columns: std::vec::Vec<crate::model::relation_descriptor::ColumnDescriptor>,
5567
5568    /// A set of BigQuery labels that should be applied to the relation.
5569    pub bigquery_labels: std::collections::HashMap<std::string::String, std::string::String>,
5570
5571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5572}
5573
5574impl RelationDescriptor {
5575    pub fn new() -> Self {
5576        std::default::Default::default()
5577    }
5578
5579    /// Sets the value of [description][crate::model::RelationDescriptor::description].
5580    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5581        self.description = v.into();
5582        self
5583    }
5584
5585    /// Sets the value of [columns][crate::model::RelationDescriptor::columns].
5586    pub fn set_columns<T, V>(mut self, v: T) -> Self
5587    where
5588        T: std::iter::IntoIterator<Item = V>,
5589        V: std::convert::Into<crate::model::relation_descriptor::ColumnDescriptor>,
5590    {
5591        use std::iter::Iterator;
5592        self.columns = v.into_iter().map(|i| i.into()).collect();
5593        self
5594    }
5595
5596    /// Sets the value of [bigquery_labels][crate::model::RelationDescriptor::bigquery_labels].
5597    pub fn set_bigquery_labels<T, K, V>(mut self, v: T) -> Self
5598    where
5599        T: std::iter::IntoIterator<Item = (K, V)>,
5600        K: std::convert::Into<std::string::String>,
5601        V: std::convert::Into<std::string::String>,
5602    {
5603        use std::iter::Iterator;
5604        self.bigquery_labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5605        self
5606    }
5607}
5608
5609impl wkt::message::Message for RelationDescriptor {
5610    fn typename() -> &'static str {
5611        "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor"
5612    }
5613}
5614
5615/// Defines additional types related to [RelationDescriptor].
5616pub mod relation_descriptor {
5617    #[allow(unused_imports)]
5618    use super::*;
5619
5620    /// Describes a column.
5621    #[derive(Clone, Default, PartialEq)]
5622    #[non_exhaustive]
5623    pub struct ColumnDescriptor {
5624        /// The identifier for the column. Each entry in `path` represents one level
5625        /// of nesting.
5626        pub path: std::vec::Vec<std::string::String>,
5627
5628        /// A textual description of the column.
5629        pub description: std::string::String,
5630
5631        /// A list of BigQuery policy tags that will be applied to the column.
5632        pub bigquery_policy_tags: std::vec::Vec<std::string::String>,
5633
5634        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5635    }
5636
5637    impl ColumnDescriptor {
5638        pub fn new() -> Self {
5639            std::default::Default::default()
5640        }
5641
5642        /// Sets the value of [path][crate::model::relation_descriptor::ColumnDescriptor::path].
5643        pub fn set_path<T, V>(mut self, v: T) -> Self
5644        where
5645            T: std::iter::IntoIterator<Item = V>,
5646            V: std::convert::Into<std::string::String>,
5647        {
5648            use std::iter::Iterator;
5649            self.path = v.into_iter().map(|i| i.into()).collect();
5650            self
5651        }
5652
5653        /// Sets the value of [description][crate::model::relation_descriptor::ColumnDescriptor::description].
5654        pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5655            self.description = v.into();
5656            self
5657        }
5658
5659        /// Sets the value of [bigquery_policy_tags][crate::model::relation_descriptor::ColumnDescriptor::bigquery_policy_tags].
5660        pub fn set_bigquery_policy_tags<T, V>(mut self, v: T) -> Self
5661        where
5662            T: std::iter::IntoIterator<Item = V>,
5663            V: std::convert::Into<std::string::String>,
5664        {
5665            use std::iter::Iterator;
5666            self.bigquery_policy_tags = v.into_iter().map(|i| i.into()).collect();
5667            self
5668        }
5669    }
5670
5671    impl wkt::message::Message for ColumnDescriptor {
5672        fn typename() -> &'static str {
5673            "type.googleapis.com/google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor"
5674        }
5675    }
5676}
5677
5678/// Represents a single Dataform action in a compilation result.
5679#[derive(Clone, Default, PartialEq)]
5680#[non_exhaustive]
5681pub struct CompilationResultAction {
5682    /// This action's identifier. Unique within the compilation result.
5683    pub target: std::option::Option<crate::model::Target>,
5684
5685    /// The action's identifier if the project had been compiled without any
5686    /// overrides configured. Unique within the compilation result.
5687    pub canonical_target: std::option::Option<crate::model::Target>,
5688
5689    /// The full path including filename in which this action is located, relative
5690    /// to the workspace root.
5691    pub file_path: std::string::String,
5692
5693    /// Output only. All the metadata information that is used internally to serve
5694    /// the resource. For example: timestamps, flags, status fields, etc. The
5695    /// format of this field is a JSON string.
5696    pub internal_metadata: std::option::Option<std::string::String>,
5697
5698    /// The compiled object.
5699    pub compiled_object:
5700        std::option::Option<crate::model::compilation_result_action::CompiledObject>,
5701
5702    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5703}
5704
5705impl CompilationResultAction {
5706    pub fn new() -> Self {
5707        std::default::Default::default()
5708    }
5709
5710    /// Sets the value of [target][crate::model::CompilationResultAction::target].
5711    pub fn set_target<T>(mut self, v: T) -> Self
5712    where
5713        T: std::convert::Into<crate::model::Target>,
5714    {
5715        self.target = std::option::Option::Some(v.into());
5716        self
5717    }
5718
5719    /// Sets or clears the value of [target][crate::model::CompilationResultAction::target].
5720    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
5721    where
5722        T: std::convert::Into<crate::model::Target>,
5723    {
5724        self.target = v.map(|x| x.into());
5725        self
5726    }
5727
5728    /// Sets the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
5729    pub fn set_canonical_target<T>(mut self, v: T) -> Self
5730    where
5731        T: std::convert::Into<crate::model::Target>,
5732    {
5733        self.canonical_target = std::option::Option::Some(v.into());
5734        self
5735    }
5736
5737    /// Sets or clears the value of [canonical_target][crate::model::CompilationResultAction::canonical_target].
5738    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
5739    where
5740        T: std::convert::Into<crate::model::Target>,
5741    {
5742        self.canonical_target = v.map(|x| x.into());
5743        self
5744    }
5745
5746    /// Sets the value of [file_path][crate::model::CompilationResultAction::file_path].
5747    pub fn set_file_path<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5748        self.file_path = v.into();
5749        self
5750    }
5751
5752    /// Sets the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
5753    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
5754    where
5755        T: std::convert::Into<std::string::String>,
5756    {
5757        self.internal_metadata = std::option::Option::Some(v.into());
5758        self
5759    }
5760
5761    /// Sets or clears the value of [internal_metadata][crate::model::CompilationResultAction::internal_metadata].
5762    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
5763    where
5764        T: std::convert::Into<std::string::String>,
5765    {
5766        self.internal_metadata = v.map(|x| x.into());
5767        self
5768    }
5769
5770    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object].
5771    ///
5772    /// Note that all the setters affecting `compiled_object` are mutually
5773    /// exclusive.
5774    pub fn set_compiled_object<
5775        T: std::convert::Into<
5776                std::option::Option<crate::model::compilation_result_action::CompiledObject>,
5777            >,
5778    >(
5779        mut self,
5780        v: T,
5781    ) -> Self {
5782        self.compiled_object = v.into();
5783        self
5784    }
5785
5786    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5787    /// if it holds a `Relation`, `None` if the field is not set or
5788    /// holds a different branch.
5789    pub fn relation(
5790        &self,
5791    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Relation>>
5792    {
5793        #[allow(unreachable_patterns)]
5794        self.compiled_object.as_ref().and_then(|v| match v {
5795            crate::model::compilation_result_action::CompiledObject::Relation(v) => {
5796                std::option::Option::Some(v)
5797            }
5798            _ => std::option::Option::None,
5799        })
5800    }
5801
5802    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5803    /// to hold a `Relation`.
5804    ///
5805    /// Note that all the setters affecting `compiled_object` are
5806    /// mutually exclusive.
5807    pub fn set_relation<
5808        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Relation>>,
5809    >(
5810        mut self,
5811        v: T,
5812    ) -> Self {
5813        self.compiled_object = std::option::Option::Some(
5814            crate::model::compilation_result_action::CompiledObject::Relation(v.into()),
5815        );
5816        self
5817    }
5818
5819    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5820    /// if it holds a `Operations`, `None` if the field is not set or
5821    /// holds a different branch.
5822    pub fn operations(
5823        &self,
5824    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Operations>>
5825    {
5826        #[allow(unreachable_patterns)]
5827        self.compiled_object.as_ref().and_then(|v| match v {
5828            crate::model::compilation_result_action::CompiledObject::Operations(v) => {
5829                std::option::Option::Some(v)
5830            }
5831            _ => std::option::Option::None,
5832        })
5833    }
5834
5835    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5836    /// to hold a `Operations`.
5837    ///
5838    /// Note that all the setters affecting `compiled_object` are
5839    /// mutually exclusive.
5840    pub fn set_operations<
5841        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Operations>>,
5842    >(
5843        mut self,
5844        v: T,
5845    ) -> Self {
5846        self.compiled_object = std::option::Option::Some(
5847            crate::model::compilation_result_action::CompiledObject::Operations(v.into()),
5848        );
5849        self
5850    }
5851
5852    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5853    /// if it holds a `Assertion`, `None` if the field is not set or
5854    /// holds a different branch.
5855    pub fn assertion(
5856        &self,
5857    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Assertion>>
5858    {
5859        #[allow(unreachable_patterns)]
5860        self.compiled_object.as_ref().and_then(|v| match v {
5861            crate::model::compilation_result_action::CompiledObject::Assertion(v) => {
5862                std::option::Option::Some(v)
5863            }
5864            _ => std::option::Option::None,
5865        })
5866    }
5867
5868    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5869    /// to hold a `Assertion`.
5870    ///
5871    /// Note that all the setters affecting `compiled_object` are
5872    /// mutually exclusive.
5873    pub fn set_assertion<
5874        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Assertion>>,
5875    >(
5876        mut self,
5877        v: T,
5878    ) -> Self {
5879        self.compiled_object = std::option::Option::Some(
5880            crate::model::compilation_result_action::CompiledObject::Assertion(v.into()),
5881        );
5882        self
5883    }
5884
5885    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5886    /// if it holds a `Declaration`, `None` if the field is not set or
5887    /// holds a different branch.
5888    pub fn declaration(
5889        &self,
5890    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Declaration>>
5891    {
5892        #[allow(unreachable_patterns)]
5893        self.compiled_object.as_ref().and_then(|v| match v {
5894            crate::model::compilation_result_action::CompiledObject::Declaration(v) => {
5895                std::option::Option::Some(v)
5896            }
5897            _ => std::option::Option::None,
5898        })
5899    }
5900
5901    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5902    /// to hold a `Declaration`.
5903    ///
5904    /// Note that all the setters affecting `compiled_object` are
5905    /// mutually exclusive.
5906    pub fn set_declaration<
5907        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Declaration>>,
5908    >(
5909        mut self,
5910        v: T,
5911    ) -> Self {
5912        self.compiled_object = std::option::Option::Some(
5913            crate::model::compilation_result_action::CompiledObject::Declaration(v.into()),
5914        );
5915        self
5916    }
5917
5918    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5919    /// if it holds a `Notebook`, `None` if the field is not set or
5920    /// holds a different branch.
5921    pub fn notebook(
5922        &self,
5923    ) -> std::option::Option<&std::boxed::Box<crate::model::compilation_result_action::Notebook>>
5924    {
5925        #[allow(unreachable_patterns)]
5926        self.compiled_object.as_ref().and_then(|v| match v {
5927            crate::model::compilation_result_action::CompiledObject::Notebook(v) => {
5928                std::option::Option::Some(v)
5929            }
5930            _ => std::option::Option::None,
5931        })
5932    }
5933
5934    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5935    /// to hold a `Notebook`.
5936    ///
5937    /// Note that all the setters affecting `compiled_object` are
5938    /// mutually exclusive.
5939    pub fn set_notebook<
5940        T: std::convert::Into<std::boxed::Box<crate::model::compilation_result_action::Notebook>>,
5941    >(
5942        mut self,
5943        v: T,
5944    ) -> Self {
5945        self.compiled_object = std::option::Option::Some(
5946            crate::model::compilation_result_action::CompiledObject::Notebook(v.into()),
5947        );
5948        self
5949    }
5950
5951    /// The value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5952    /// if it holds a `DataPreparation`, `None` if the field is not set or
5953    /// holds a different branch.
5954    pub fn data_preparation(
5955        &self,
5956    ) -> std::option::Option<
5957        &std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
5958    > {
5959        #[allow(unreachable_patterns)]
5960        self.compiled_object.as_ref().and_then(|v| match v {
5961            crate::model::compilation_result_action::CompiledObject::DataPreparation(v) => {
5962                std::option::Option::Some(v)
5963            }
5964            _ => std::option::Option::None,
5965        })
5966    }
5967
5968    /// Sets the value of [compiled_object][crate::model::CompilationResultAction::compiled_object]
5969    /// to hold a `DataPreparation`.
5970    ///
5971    /// Note that all the setters affecting `compiled_object` are
5972    /// mutually exclusive.
5973    pub fn set_data_preparation<
5974        T: std::convert::Into<
5975                std::boxed::Box<crate::model::compilation_result_action::DataPreparation>,
5976            >,
5977    >(
5978        mut self,
5979        v: T,
5980    ) -> Self {
5981        self.compiled_object = std::option::Option::Some(
5982            crate::model::compilation_result_action::CompiledObject::DataPreparation(v.into()),
5983        );
5984        self
5985    }
5986}
5987
5988impl wkt::message::Message for CompilationResultAction {
5989    fn typename() -> &'static str {
5990        "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction"
5991    }
5992}
5993
5994/// Defines additional types related to [CompilationResultAction].
5995pub mod compilation_result_action {
5996    #[allow(unused_imports)]
5997    use super::*;
5998
5999    /// Represents a database relation.
6000    #[derive(Clone, Default, PartialEq)]
6001    #[non_exhaustive]
6002    pub struct Relation {
6003        /// A list of actions that this action depends on.
6004        pub dependency_targets: std::vec::Vec<crate::model::Target>,
6005
6006        /// Whether this action is disabled (i.e. should not be run).
6007        pub disabled: bool,
6008
6009        /// Arbitrary, user-defined tags on this action.
6010        pub tags: std::vec::Vec<std::string::String>,
6011
6012        /// Descriptor for the relation and its columns.
6013        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6014
6015        /// The type of this relation.
6016        pub relation_type: crate::model::compilation_result_action::relation::RelationType,
6017
6018        /// The SELECT query which returns rows which this relation should contain.
6019        pub select_query: std::string::String,
6020
6021        /// SQL statements to be executed before creating the relation.
6022        pub pre_operations: std::vec::Vec<std::string::String>,
6023
6024        /// SQL statements to be executed after creating the relation.
6025        pub post_operations: std::vec::Vec<std::string::String>,
6026
6027        /// Configures `INCREMENTAL_TABLE` settings for this relation. Only set if
6028        /// `relation_type` is `INCREMENTAL_TABLE`.
6029        pub incremental_table_config: std::option::Option<
6030            crate::model::compilation_result_action::relation::IncrementalTableConfig,
6031        >,
6032
6033        /// The SQL expression used to partition the relation.
6034        pub partition_expression: std::string::String,
6035
6036        /// A list of columns or SQL expressions used to cluster the table.
6037        pub cluster_expressions: std::vec::Vec<std::string::String>,
6038
6039        /// Sets the partition expiration in days.
6040        pub partition_expiration_days: i32,
6041
6042        /// Specifies whether queries on this table must include a predicate filter
6043        /// that filters on the partitioning column.
6044        pub require_partition_filter: bool,
6045
6046        /// Additional options that will be provided as key/value pairs into the
6047        /// options clause of a create table/view statement. See
6048        /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language>
6049        /// for more information on which options are supported.
6050        pub additional_options: std::collections::HashMap<std::string::String, std::string::String>,
6051
6052        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6053    }
6054
6055    impl Relation {
6056        pub fn new() -> Self {
6057            std::default::Default::default()
6058        }
6059
6060        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Relation::dependency_targets].
6061        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6062        where
6063            T: std::iter::IntoIterator<Item = V>,
6064            V: std::convert::Into<crate::model::Target>,
6065        {
6066            use std::iter::Iterator;
6067            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6068            self
6069        }
6070
6071        /// Sets the value of [disabled][crate::model::compilation_result_action::Relation::disabled].
6072        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6073            self.disabled = v.into();
6074            self
6075        }
6076
6077        /// Sets the value of [tags][crate::model::compilation_result_action::Relation::tags].
6078        pub fn set_tags<T, V>(mut self, v: T) -> Self
6079        where
6080            T: std::iter::IntoIterator<Item = V>,
6081            V: std::convert::Into<std::string::String>,
6082        {
6083            use std::iter::Iterator;
6084            self.tags = v.into_iter().map(|i| i.into()).collect();
6085            self
6086        }
6087
6088        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
6089        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6090        where
6091            T: std::convert::Into<crate::model::RelationDescriptor>,
6092        {
6093            self.relation_descriptor = std::option::Option::Some(v.into());
6094            self
6095        }
6096
6097        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Relation::relation_descriptor].
6098        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6099        where
6100            T: std::convert::Into<crate::model::RelationDescriptor>,
6101        {
6102            self.relation_descriptor = v.map(|x| x.into());
6103            self
6104        }
6105
6106        /// Sets the value of [relation_type][crate::model::compilation_result_action::Relation::relation_type].
6107        pub fn set_relation_type<
6108            T: std::convert::Into<crate::model::compilation_result_action::relation::RelationType>,
6109        >(
6110            mut self,
6111            v: T,
6112        ) -> Self {
6113            self.relation_type = v.into();
6114            self
6115        }
6116
6117        /// Sets the value of [select_query][crate::model::compilation_result_action::Relation::select_query].
6118        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
6119            mut self,
6120            v: T,
6121        ) -> Self {
6122            self.select_query = v.into();
6123            self
6124        }
6125
6126        /// Sets the value of [pre_operations][crate::model::compilation_result_action::Relation::pre_operations].
6127        pub fn set_pre_operations<T, V>(mut self, v: T) -> Self
6128        where
6129            T: std::iter::IntoIterator<Item = V>,
6130            V: std::convert::Into<std::string::String>,
6131        {
6132            use std::iter::Iterator;
6133            self.pre_operations = v.into_iter().map(|i| i.into()).collect();
6134            self
6135        }
6136
6137        /// Sets the value of [post_operations][crate::model::compilation_result_action::Relation::post_operations].
6138        pub fn set_post_operations<T, V>(mut self, v: T) -> Self
6139        where
6140            T: std::iter::IntoIterator<Item = V>,
6141            V: std::convert::Into<std::string::String>,
6142        {
6143            use std::iter::Iterator;
6144            self.post_operations = v.into_iter().map(|i| i.into()).collect();
6145            self
6146        }
6147
6148        /// Sets the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
6149        pub fn set_incremental_table_config<T>(mut self, v: T) -> Self
6150        where
6151            T: std::convert::Into<
6152                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
6153                >,
6154        {
6155            self.incremental_table_config = std::option::Option::Some(v.into());
6156            self
6157        }
6158
6159        /// Sets or clears the value of [incremental_table_config][crate::model::compilation_result_action::Relation::incremental_table_config].
6160        pub fn set_or_clear_incremental_table_config<T>(mut self, v: std::option::Option<T>) -> Self
6161        where
6162            T: std::convert::Into<
6163                    crate::model::compilation_result_action::relation::IncrementalTableConfig,
6164                >,
6165        {
6166            self.incremental_table_config = v.map(|x| x.into());
6167            self
6168        }
6169
6170        /// Sets the value of [partition_expression][crate::model::compilation_result_action::Relation::partition_expression].
6171        pub fn set_partition_expression<T: std::convert::Into<std::string::String>>(
6172            mut self,
6173            v: T,
6174        ) -> Self {
6175            self.partition_expression = v.into();
6176            self
6177        }
6178
6179        /// Sets the value of [cluster_expressions][crate::model::compilation_result_action::Relation::cluster_expressions].
6180        pub fn set_cluster_expressions<T, V>(mut self, v: T) -> Self
6181        where
6182            T: std::iter::IntoIterator<Item = V>,
6183            V: std::convert::Into<std::string::String>,
6184        {
6185            use std::iter::Iterator;
6186            self.cluster_expressions = v.into_iter().map(|i| i.into()).collect();
6187            self
6188        }
6189
6190        /// Sets the value of [partition_expiration_days][crate::model::compilation_result_action::Relation::partition_expiration_days].
6191        pub fn set_partition_expiration_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6192            self.partition_expiration_days = v.into();
6193            self
6194        }
6195
6196        /// Sets the value of [require_partition_filter][crate::model::compilation_result_action::Relation::require_partition_filter].
6197        pub fn set_require_partition_filter<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6198            self.require_partition_filter = v.into();
6199            self
6200        }
6201
6202        /// Sets the value of [additional_options][crate::model::compilation_result_action::Relation::additional_options].
6203        pub fn set_additional_options<T, K, V>(mut self, v: T) -> Self
6204        where
6205            T: std::iter::IntoIterator<Item = (K, V)>,
6206            K: std::convert::Into<std::string::String>,
6207            V: std::convert::Into<std::string::String>,
6208        {
6209            use std::iter::Iterator;
6210            self.additional_options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
6211            self
6212        }
6213    }
6214
6215    impl wkt::message::Message for Relation {
6216        fn typename() -> &'static str {
6217            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation"
6218        }
6219    }
6220
6221    /// Defines additional types related to [Relation].
6222    pub mod relation {
6223        #[allow(unused_imports)]
6224        use super::*;
6225
6226        /// Contains settings for relations of type `INCREMENTAL_TABLE`.
6227        #[derive(Clone, Default, PartialEq)]
6228        #[non_exhaustive]
6229        pub struct IncrementalTableConfig {
6230            /// The SELECT query which returns rows which should be inserted into the
6231            /// relation if it already exists and is not being refreshed.
6232            pub incremental_select_query: std::string::String,
6233
6234            /// Whether this table should be protected from being refreshed.
6235            pub refresh_disabled: bool,
6236
6237            /// A set of columns or SQL expressions used to define row uniqueness.
6238            /// If any duplicates are discovered (as defined by `unique_key_parts`),
6239            /// only the newly selected rows (as defined by `incremental_select_query`)
6240            /// will be included in the relation.
6241            pub unique_key_parts: std::vec::Vec<std::string::String>,
6242
6243            /// A SQL expression conditional used to limit the set of existing rows
6244            /// considered for a merge operation (see `unique_key_parts` for more
6245            /// information).
6246            pub update_partition_filter: std::string::String,
6247
6248            /// SQL statements to be executed before inserting new rows into the
6249            /// relation.
6250            pub incremental_pre_operations: std::vec::Vec<std::string::String>,
6251
6252            /// SQL statements to be executed after inserting new rows into the
6253            /// relation.
6254            pub incremental_post_operations: std::vec::Vec<std::string::String>,
6255
6256            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6257        }
6258
6259        impl IncrementalTableConfig {
6260            pub fn new() -> Self {
6261                std::default::Default::default()
6262            }
6263
6264            /// Sets the value of [incremental_select_query][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_select_query].
6265            pub fn set_incremental_select_query<T: std::convert::Into<std::string::String>>(
6266                mut self,
6267                v: T,
6268            ) -> Self {
6269                self.incremental_select_query = v.into();
6270                self
6271            }
6272
6273            /// Sets the value of [refresh_disabled][crate::model::compilation_result_action::relation::IncrementalTableConfig::refresh_disabled].
6274            pub fn set_refresh_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6275                self.refresh_disabled = v.into();
6276                self
6277            }
6278
6279            /// Sets the value of [unique_key_parts][crate::model::compilation_result_action::relation::IncrementalTableConfig::unique_key_parts].
6280            pub fn set_unique_key_parts<T, V>(mut self, v: T) -> Self
6281            where
6282                T: std::iter::IntoIterator<Item = V>,
6283                V: std::convert::Into<std::string::String>,
6284            {
6285                use std::iter::Iterator;
6286                self.unique_key_parts = v.into_iter().map(|i| i.into()).collect();
6287                self
6288            }
6289
6290            /// Sets the value of [update_partition_filter][crate::model::compilation_result_action::relation::IncrementalTableConfig::update_partition_filter].
6291            pub fn set_update_partition_filter<T: std::convert::Into<std::string::String>>(
6292                mut self,
6293                v: T,
6294            ) -> Self {
6295                self.update_partition_filter = v.into();
6296                self
6297            }
6298
6299            /// Sets the value of [incremental_pre_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_pre_operations].
6300            pub fn set_incremental_pre_operations<T, V>(mut self, v: T) -> Self
6301            where
6302                T: std::iter::IntoIterator<Item = V>,
6303                V: std::convert::Into<std::string::String>,
6304            {
6305                use std::iter::Iterator;
6306                self.incremental_pre_operations = v.into_iter().map(|i| i.into()).collect();
6307                self
6308            }
6309
6310            /// Sets the value of [incremental_post_operations][crate::model::compilation_result_action::relation::IncrementalTableConfig::incremental_post_operations].
6311            pub fn set_incremental_post_operations<T, V>(mut self, v: T) -> Self
6312            where
6313                T: std::iter::IntoIterator<Item = V>,
6314                V: std::convert::Into<std::string::String>,
6315            {
6316                use std::iter::Iterator;
6317                self.incremental_post_operations = v.into_iter().map(|i| i.into()).collect();
6318                self
6319            }
6320        }
6321
6322        impl wkt::message::Message for IncrementalTableConfig {
6323            fn typename() -> &'static str {
6324                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig"
6325            }
6326        }
6327
6328        /// Indicates the type of this relation.
6329        ///
6330        /// # Working with unknown values
6331        ///
6332        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6333        /// additional enum variants at any time. Adding new variants is not considered
6334        /// a breaking change. Applications should write their code in anticipation of:
6335        ///
6336        /// - New values appearing in future releases of the client library, **and**
6337        /// - New values received dynamically, without application changes.
6338        ///
6339        /// Please consult the [Working with enums] section in the user guide for some
6340        /// guidelines.
6341        ///
6342        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6343        #[derive(Clone, Debug, PartialEq)]
6344        #[non_exhaustive]
6345        pub enum RelationType {
6346            /// Default value. This value is unused.
6347            Unspecified,
6348            /// The relation is a table.
6349            Table,
6350            /// The relation is a view.
6351            View,
6352            /// The relation is an incrementalized table.
6353            IncrementalTable,
6354            /// The relation is a materialized view.
6355            MaterializedView,
6356            /// If set, the enum was initialized with an unknown value.
6357            ///
6358            /// Applications can examine the value using [RelationType::value] or
6359            /// [RelationType::name].
6360            UnknownValue(relation_type::UnknownValue),
6361        }
6362
6363        #[doc(hidden)]
6364        pub mod relation_type {
6365            #[allow(unused_imports)]
6366            use super::*;
6367            #[derive(Clone, Debug, PartialEq)]
6368            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6369        }
6370
6371        impl RelationType {
6372            /// Gets the enum value.
6373            ///
6374            /// Returns `None` if the enum contains an unknown value deserialized from
6375            /// the string representation of enums.
6376            pub fn value(&self) -> std::option::Option<i32> {
6377                match self {
6378                    Self::Unspecified => std::option::Option::Some(0),
6379                    Self::Table => std::option::Option::Some(1),
6380                    Self::View => std::option::Option::Some(2),
6381                    Self::IncrementalTable => std::option::Option::Some(3),
6382                    Self::MaterializedView => std::option::Option::Some(4),
6383                    Self::UnknownValue(u) => u.0.value(),
6384                }
6385            }
6386
6387            /// Gets the enum value as a string.
6388            ///
6389            /// Returns `None` if the enum contains an unknown value deserialized from
6390            /// the integer representation of enums.
6391            pub fn name(&self) -> std::option::Option<&str> {
6392                match self {
6393                    Self::Unspecified => std::option::Option::Some("RELATION_TYPE_UNSPECIFIED"),
6394                    Self::Table => std::option::Option::Some("TABLE"),
6395                    Self::View => std::option::Option::Some("VIEW"),
6396                    Self::IncrementalTable => std::option::Option::Some("INCREMENTAL_TABLE"),
6397                    Self::MaterializedView => std::option::Option::Some("MATERIALIZED_VIEW"),
6398                    Self::UnknownValue(u) => u.0.name(),
6399                }
6400            }
6401        }
6402
6403        impl std::default::Default for RelationType {
6404            fn default() -> Self {
6405                use std::convert::From;
6406                Self::from(0)
6407            }
6408        }
6409
6410        impl std::fmt::Display for RelationType {
6411            fn fmt(
6412                &self,
6413                f: &mut std::fmt::Formatter<'_>,
6414            ) -> std::result::Result<(), std::fmt::Error> {
6415                wkt::internal::display_enum(f, self.name(), self.value())
6416            }
6417        }
6418
6419        impl std::convert::From<i32> for RelationType {
6420            fn from(value: i32) -> Self {
6421                match value {
6422                    0 => Self::Unspecified,
6423                    1 => Self::Table,
6424                    2 => Self::View,
6425                    3 => Self::IncrementalTable,
6426                    4 => Self::MaterializedView,
6427                    _ => Self::UnknownValue(relation_type::UnknownValue(
6428                        wkt::internal::UnknownEnumValue::Integer(value),
6429                    )),
6430                }
6431            }
6432        }
6433
6434        impl std::convert::From<&str> for RelationType {
6435            fn from(value: &str) -> Self {
6436                use std::string::ToString;
6437                match value {
6438                    "RELATION_TYPE_UNSPECIFIED" => Self::Unspecified,
6439                    "TABLE" => Self::Table,
6440                    "VIEW" => Self::View,
6441                    "INCREMENTAL_TABLE" => Self::IncrementalTable,
6442                    "MATERIALIZED_VIEW" => Self::MaterializedView,
6443                    _ => Self::UnknownValue(relation_type::UnknownValue(
6444                        wkt::internal::UnknownEnumValue::String(value.to_string()),
6445                    )),
6446                }
6447            }
6448        }
6449
6450        impl serde::ser::Serialize for RelationType {
6451            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6452            where
6453                S: serde::Serializer,
6454            {
6455                match self {
6456                    Self::Unspecified => serializer.serialize_i32(0),
6457                    Self::Table => serializer.serialize_i32(1),
6458                    Self::View => serializer.serialize_i32(2),
6459                    Self::IncrementalTable => serializer.serialize_i32(3),
6460                    Self::MaterializedView => serializer.serialize_i32(4),
6461                    Self::UnknownValue(u) => u.0.serialize(serializer),
6462                }
6463            }
6464        }
6465
6466        impl<'de> serde::de::Deserialize<'de> for RelationType {
6467            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6468            where
6469                D: serde::Deserializer<'de>,
6470            {
6471                deserializer.deserialize_any(wkt::internal::EnumVisitor::<RelationType>::new(
6472                    ".google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType",
6473                ))
6474            }
6475        }
6476    }
6477
6478    /// Represents a list of arbitrary database operations.
6479    #[derive(Clone, Default, PartialEq)]
6480    #[non_exhaustive]
6481    pub struct Operations {
6482        /// A list of actions that this action depends on.
6483        pub dependency_targets: std::vec::Vec<crate::model::Target>,
6484
6485        /// Whether this action is disabled (i.e. should not be run).
6486        pub disabled: bool,
6487
6488        /// Arbitrary, user-defined tags on this action.
6489        pub tags: std::vec::Vec<std::string::String>,
6490
6491        /// Descriptor for any output relation and its columns. Only set if
6492        /// `has_output` is true.
6493        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6494
6495        /// A list of arbitrary SQL statements that will be executed without
6496        /// alteration.
6497        pub queries: std::vec::Vec<std::string::String>,
6498
6499        /// Whether these operations produce an output relation.
6500        pub has_output: bool,
6501
6502        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6503    }
6504
6505    impl Operations {
6506        pub fn new() -> Self {
6507            std::default::Default::default()
6508        }
6509
6510        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Operations::dependency_targets].
6511        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6512        where
6513            T: std::iter::IntoIterator<Item = V>,
6514            V: std::convert::Into<crate::model::Target>,
6515        {
6516            use std::iter::Iterator;
6517            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6518            self
6519        }
6520
6521        /// Sets the value of [disabled][crate::model::compilation_result_action::Operations::disabled].
6522        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6523            self.disabled = v.into();
6524            self
6525        }
6526
6527        /// Sets the value of [tags][crate::model::compilation_result_action::Operations::tags].
6528        pub fn set_tags<T, V>(mut self, v: T) -> Self
6529        where
6530            T: std::iter::IntoIterator<Item = V>,
6531            V: std::convert::Into<std::string::String>,
6532        {
6533            use std::iter::Iterator;
6534            self.tags = v.into_iter().map(|i| i.into()).collect();
6535            self
6536        }
6537
6538        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
6539        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6540        where
6541            T: std::convert::Into<crate::model::RelationDescriptor>,
6542        {
6543            self.relation_descriptor = std::option::Option::Some(v.into());
6544            self
6545        }
6546
6547        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Operations::relation_descriptor].
6548        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6549        where
6550            T: std::convert::Into<crate::model::RelationDescriptor>,
6551        {
6552            self.relation_descriptor = v.map(|x| x.into());
6553            self
6554        }
6555
6556        /// Sets the value of [queries][crate::model::compilation_result_action::Operations::queries].
6557        pub fn set_queries<T, V>(mut self, v: T) -> Self
6558        where
6559            T: std::iter::IntoIterator<Item = V>,
6560            V: std::convert::Into<std::string::String>,
6561        {
6562            use std::iter::Iterator;
6563            self.queries = v.into_iter().map(|i| i.into()).collect();
6564            self
6565        }
6566
6567        /// Sets the value of [has_output][crate::model::compilation_result_action::Operations::has_output].
6568        pub fn set_has_output<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6569            self.has_output = v.into();
6570            self
6571        }
6572    }
6573
6574    impl wkt::message::Message for Operations {
6575        fn typename() -> &'static str {
6576            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Operations"
6577        }
6578    }
6579
6580    /// Represents an assertion upon a SQL query which is required return zero
6581    /// rows.
6582    #[derive(Clone, Default, PartialEq)]
6583    #[non_exhaustive]
6584    pub struct Assertion {
6585        /// A list of actions that this action depends on.
6586        pub dependency_targets: std::vec::Vec<crate::model::Target>,
6587
6588        /// The parent action of this assertion. Only set if this assertion was
6589        /// automatically generated.
6590        pub parent_action: std::option::Option<crate::model::Target>,
6591
6592        /// Whether this action is disabled (i.e. should not be run).
6593        pub disabled: bool,
6594
6595        /// Arbitrary, user-defined tags on this action.
6596        pub tags: std::vec::Vec<std::string::String>,
6597
6598        /// The SELECT query which must return zero rows in order for this assertion
6599        /// to succeed.
6600        pub select_query: std::string::String,
6601
6602        /// Descriptor for the assertion's automatically-generated view and its
6603        /// columns.
6604        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6605
6606        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6607    }
6608
6609    impl Assertion {
6610        pub fn new() -> Self {
6611            std::default::Default::default()
6612        }
6613
6614        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Assertion::dependency_targets].
6615        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6616        where
6617            T: std::iter::IntoIterator<Item = V>,
6618            V: std::convert::Into<crate::model::Target>,
6619        {
6620            use std::iter::Iterator;
6621            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6622            self
6623        }
6624
6625        /// Sets the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
6626        pub fn set_parent_action<T>(mut self, v: T) -> Self
6627        where
6628            T: std::convert::Into<crate::model::Target>,
6629        {
6630            self.parent_action = std::option::Option::Some(v.into());
6631            self
6632        }
6633
6634        /// Sets or clears the value of [parent_action][crate::model::compilation_result_action::Assertion::parent_action].
6635        pub fn set_or_clear_parent_action<T>(mut self, v: std::option::Option<T>) -> Self
6636        where
6637            T: std::convert::Into<crate::model::Target>,
6638        {
6639            self.parent_action = v.map(|x| x.into());
6640            self
6641        }
6642
6643        /// Sets the value of [disabled][crate::model::compilation_result_action::Assertion::disabled].
6644        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6645            self.disabled = v.into();
6646            self
6647        }
6648
6649        /// Sets the value of [tags][crate::model::compilation_result_action::Assertion::tags].
6650        pub fn set_tags<T, V>(mut self, v: T) -> Self
6651        where
6652            T: std::iter::IntoIterator<Item = V>,
6653            V: std::convert::Into<std::string::String>,
6654        {
6655            use std::iter::Iterator;
6656            self.tags = v.into_iter().map(|i| i.into()).collect();
6657            self
6658        }
6659
6660        /// Sets the value of [select_query][crate::model::compilation_result_action::Assertion::select_query].
6661        pub fn set_select_query<T: std::convert::Into<std::string::String>>(
6662            mut self,
6663            v: T,
6664        ) -> Self {
6665            self.select_query = v.into();
6666            self
6667        }
6668
6669        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
6670        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6671        where
6672            T: std::convert::Into<crate::model::RelationDescriptor>,
6673        {
6674            self.relation_descriptor = std::option::Option::Some(v.into());
6675            self
6676        }
6677
6678        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Assertion::relation_descriptor].
6679        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6680        where
6681            T: std::convert::Into<crate::model::RelationDescriptor>,
6682        {
6683            self.relation_descriptor = v.map(|x| x.into());
6684            self
6685        }
6686    }
6687
6688    impl wkt::message::Message for Assertion {
6689        fn typename() -> &'static str {
6690            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Assertion"
6691        }
6692    }
6693
6694    /// Represents a relation which is not managed by Dataform but which may be
6695    /// referenced by Dataform actions.
6696    #[derive(Clone, Default, PartialEq)]
6697    #[non_exhaustive]
6698    pub struct Declaration {
6699        /// Descriptor for the relation and its columns. Used as documentation only,
6700        /// i.e. values here will result in no changes to the relation's metadata.
6701        pub relation_descriptor: std::option::Option<crate::model::RelationDescriptor>,
6702
6703        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6704    }
6705
6706    impl Declaration {
6707        pub fn new() -> Self {
6708            std::default::Default::default()
6709        }
6710
6711        /// Sets the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
6712        pub fn set_relation_descriptor<T>(mut self, v: T) -> Self
6713        where
6714            T: std::convert::Into<crate::model::RelationDescriptor>,
6715        {
6716            self.relation_descriptor = std::option::Option::Some(v.into());
6717            self
6718        }
6719
6720        /// Sets or clears the value of [relation_descriptor][crate::model::compilation_result_action::Declaration::relation_descriptor].
6721        pub fn set_or_clear_relation_descriptor<T>(mut self, v: std::option::Option<T>) -> Self
6722        where
6723            T: std::convert::Into<crate::model::RelationDescriptor>,
6724        {
6725            self.relation_descriptor = v.map(|x| x.into());
6726            self
6727        }
6728    }
6729
6730    impl wkt::message::Message for Declaration {
6731        fn typename() -> &'static str {
6732            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Declaration"
6733        }
6734    }
6735
6736    /// Represents a notebook.
6737    #[derive(Clone, Default, PartialEq)]
6738    #[non_exhaustive]
6739    pub struct Notebook {
6740        /// A list of actions that this action depends on.
6741        pub dependency_targets: std::vec::Vec<crate::model::Target>,
6742
6743        /// Whether this action is disabled (i.e. should not be run).
6744        pub disabled: bool,
6745
6746        /// The contents of the notebook.
6747        pub contents: std::string::String,
6748
6749        /// Arbitrary, user-defined tags on this action.
6750        pub tags: std::vec::Vec<std::string::String>,
6751
6752        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6753    }
6754
6755    impl Notebook {
6756        pub fn new() -> Self {
6757            std::default::Default::default()
6758        }
6759
6760        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::Notebook::dependency_targets].
6761        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6762        where
6763            T: std::iter::IntoIterator<Item = V>,
6764            V: std::convert::Into<crate::model::Target>,
6765        {
6766            use std::iter::Iterator;
6767            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6768            self
6769        }
6770
6771        /// Sets the value of [disabled][crate::model::compilation_result_action::Notebook::disabled].
6772        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6773            self.disabled = v.into();
6774            self
6775        }
6776
6777        /// Sets the value of [contents][crate::model::compilation_result_action::Notebook::contents].
6778        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6779            self.contents = v.into();
6780            self
6781        }
6782
6783        /// Sets the value of [tags][crate::model::compilation_result_action::Notebook::tags].
6784        pub fn set_tags<T, V>(mut self, v: T) -> Self
6785        where
6786            T: std::iter::IntoIterator<Item = V>,
6787            V: std::convert::Into<std::string::String>,
6788        {
6789            use std::iter::Iterator;
6790            self.tags = v.into_iter().map(|i| i.into()).collect();
6791            self
6792        }
6793    }
6794
6795    impl wkt::message::Message for Notebook {
6796        fn typename() -> &'static str {
6797            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.Notebook"
6798        }
6799    }
6800
6801    /// Defines a compiled Data Preparation entity
6802    #[derive(Clone, Default, PartialEq)]
6803    #[non_exhaustive]
6804    pub struct DataPreparation {
6805        /// A list of actions that this action depends on.
6806        pub dependency_targets: std::vec::Vec<crate::model::Target>,
6807
6808        /// Whether this action is disabled (i.e. should not be run).
6809        pub disabled: bool,
6810
6811        /// Arbitrary, user-defined tags on this action.
6812        pub tags: std::vec::Vec<std::string::String>,
6813
6814        /// The definition for the data preparation.
6815        pub definition: std::option::Option<
6816            crate::model::compilation_result_action::data_preparation::Definition,
6817        >,
6818
6819        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6820    }
6821
6822    impl DataPreparation {
6823        pub fn new() -> Self {
6824            std::default::Default::default()
6825        }
6826
6827        /// Sets the value of [dependency_targets][crate::model::compilation_result_action::DataPreparation::dependency_targets].
6828        pub fn set_dependency_targets<T, V>(mut self, v: T) -> Self
6829        where
6830            T: std::iter::IntoIterator<Item = V>,
6831            V: std::convert::Into<crate::model::Target>,
6832        {
6833            use std::iter::Iterator;
6834            self.dependency_targets = v.into_iter().map(|i| i.into()).collect();
6835            self
6836        }
6837
6838        /// Sets the value of [disabled][crate::model::compilation_result_action::DataPreparation::disabled].
6839        pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6840            self.disabled = v.into();
6841            self
6842        }
6843
6844        /// Sets the value of [tags][crate::model::compilation_result_action::DataPreparation::tags].
6845        pub fn set_tags<T, V>(mut self, v: T) -> Self
6846        where
6847            T: std::iter::IntoIterator<Item = V>,
6848            V: std::convert::Into<std::string::String>,
6849        {
6850            use std::iter::Iterator;
6851            self.tags = v.into_iter().map(|i| i.into()).collect();
6852            self
6853        }
6854
6855        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition].
6856        ///
6857        /// Note that all the setters affecting `definition` are mutually
6858        /// exclusive.
6859        pub fn set_definition<
6860            T: std::convert::Into<
6861                    std::option::Option<
6862                        crate::model::compilation_result_action::data_preparation::Definition,
6863                    >,
6864                >,
6865        >(
6866            mut self,
6867            v: T,
6868        ) -> Self {
6869            self.definition = v.into();
6870            self
6871        }
6872
6873        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
6874        /// if it holds a `ContentsYaml`, `None` if the field is not set or
6875        /// holds a different branch.
6876        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
6877            #[allow(unreachable_patterns)]
6878            self.definition.as_ref().and_then(|v| match v {
6879                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(v) => std::option::Option::Some(v),
6880                _ => std::option::Option::None,
6881            })
6882        }
6883
6884        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
6885        /// to hold a `ContentsYaml`.
6886        ///
6887        /// Note that all the setters affecting `definition` are
6888        /// mutually exclusive.
6889        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
6890            mut self,
6891            v: T,
6892        ) -> Self {
6893            self.definition = std::option::Option::Some(
6894                crate::model::compilation_result_action::data_preparation::Definition::ContentsYaml(
6895                    v.into(),
6896                ),
6897            );
6898            self
6899        }
6900
6901        /// The value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
6902        /// if it holds a `ContentsSql`, `None` if the field is not set or
6903        /// holds a different branch.
6904        pub fn contents_sql(
6905            &self,
6906        ) -> std::option::Option<
6907            &std::boxed::Box<
6908                crate::model::compilation_result_action::data_preparation::SqlDefinition,
6909            >,
6910        > {
6911            #[allow(unreachable_patterns)]
6912            self.definition.as_ref().and_then(|v| match v {
6913                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(v) => std::option::Option::Some(v),
6914                _ => std::option::Option::None,
6915            })
6916        }
6917
6918        /// Sets the value of [definition][crate::model::compilation_result_action::DataPreparation::definition]
6919        /// to hold a `ContentsSql`.
6920        ///
6921        /// Note that all the setters affecting `definition` are
6922        /// mutually exclusive.
6923        pub fn set_contents_sql<
6924            T: std::convert::Into<
6925                    std::boxed::Box<
6926                        crate::model::compilation_result_action::data_preparation::SqlDefinition,
6927                    >,
6928                >,
6929        >(
6930            mut self,
6931            v: T,
6932        ) -> Self {
6933            self.definition = std::option::Option::Some(
6934                crate::model::compilation_result_action::data_preparation::Definition::ContentsSql(
6935                    v.into(),
6936                ),
6937            );
6938            self
6939        }
6940    }
6941
6942    impl wkt::message::Message for DataPreparation {
6943        fn typename() -> &'static str {
6944            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation"
6945        }
6946    }
6947
6948    /// Defines additional types related to [DataPreparation].
6949    pub mod data_preparation {
6950        #[allow(unused_imports)]
6951        use super::*;
6952
6953        /// Definition of a SQL Data Preparation
6954        #[derive(Clone, Default, PartialEq)]
6955        #[non_exhaustive]
6956        pub struct SqlDefinition {
6957            /// The SQL query representing the data preparation steps. Formatted as a
6958            /// Pipe SQL query statement.
6959            pub query: std::string::String,
6960
6961            /// Error table configuration,
6962            pub error_table: std::option::Option<
6963                crate::model::compilation_result_action::data_preparation::ErrorTable,
6964            >,
6965
6966            /// Load configuration.
6967            pub load: std::option::Option<crate::model::compilation_result_action::LoadConfig>,
6968
6969            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6970        }
6971
6972        impl SqlDefinition {
6973            pub fn new() -> Self {
6974                std::default::Default::default()
6975            }
6976
6977            /// Sets the value of [query][crate::model::compilation_result_action::data_preparation::SqlDefinition::query].
6978            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6979                self.query = v.into();
6980                self
6981            }
6982
6983            /// Sets the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
6984            pub fn set_error_table<T>(mut self, v: T) -> Self
6985            where
6986                T: std::convert::Into<
6987                        crate::model::compilation_result_action::data_preparation::ErrorTable,
6988                    >,
6989            {
6990                self.error_table = std::option::Option::Some(v.into());
6991                self
6992            }
6993
6994            /// Sets or clears the value of [error_table][crate::model::compilation_result_action::data_preparation::SqlDefinition::error_table].
6995            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
6996            where
6997                T: std::convert::Into<
6998                        crate::model::compilation_result_action::data_preparation::ErrorTable,
6999                    >,
7000            {
7001                self.error_table = v.map(|x| x.into());
7002                self
7003            }
7004
7005            /// Sets the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
7006            pub fn set_load<T>(mut self, v: T) -> Self
7007            where
7008                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
7009            {
7010                self.load = std::option::Option::Some(v.into());
7011                self
7012            }
7013
7014            /// Sets or clears the value of [load][crate::model::compilation_result_action::data_preparation::SqlDefinition::load].
7015            pub fn set_or_clear_load<T>(mut self, v: std::option::Option<T>) -> Self
7016            where
7017                T: std::convert::Into<crate::model::compilation_result_action::LoadConfig>,
7018            {
7019                self.load = v.map(|x| x.into());
7020                self
7021            }
7022        }
7023
7024        impl wkt::message::Message for SqlDefinition {
7025            fn typename() -> &'static str {
7026                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition"
7027            }
7028        }
7029
7030        /// Error table information, used to write error data into a BigQuery
7031        /// table.
7032        #[derive(Clone, Default, PartialEq)]
7033        #[non_exhaustive]
7034        pub struct ErrorTable {
7035            /// Error Table target.
7036            pub target: std::option::Option<crate::model::Target>,
7037
7038            /// Error table partition expiration in days. Only positive values are
7039            /// allowed.
7040            pub retention_days: i32,
7041
7042            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7043        }
7044
7045        impl ErrorTable {
7046            pub fn new() -> Self {
7047                std::default::Default::default()
7048            }
7049
7050            /// Sets the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
7051            pub fn set_target<T>(mut self, v: T) -> Self
7052            where
7053                T: std::convert::Into<crate::model::Target>,
7054            {
7055                self.target = std::option::Option::Some(v.into());
7056                self
7057            }
7058
7059            /// Sets or clears the value of [target][crate::model::compilation_result_action::data_preparation::ErrorTable::target].
7060            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
7061            where
7062                T: std::convert::Into<crate::model::Target>,
7063            {
7064                self.target = v.map(|x| x.into());
7065                self
7066            }
7067
7068            /// Sets the value of [retention_days][crate::model::compilation_result_action::data_preparation::ErrorTable::retention_days].
7069            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7070                self.retention_days = v.into();
7071                self
7072            }
7073        }
7074
7075        impl wkt::message::Message for ErrorTable {
7076            fn typename() -> &'static str {
7077                "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable"
7078            }
7079        }
7080
7081        /// The definition for the data preparation.
7082        #[derive(Clone, Debug, PartialEq)]
7083        #[non_exhaustive]
7084        pub enum Definition {
7085            /// The data preparation definition, stored as a YAML string.
7086            ContentsYaml(std::string::String),
7087            /// SQL definition for a Data Preparation. Contains a SQL query and
7088            /// additional context information.
7089            ContentsSql(
7090                std::boxed::Box<
7091                    crate::model::compilation_result_action::data_preparation::SqlDefinition,
7092                >,
7093            ),
7094        }
7095    }
7096
7097    /// Simplified load configuration for actions
7098    #[derive(Clone, Default, PartialEq)]
7099    #[non_exhaustive]
7100    pub struct LoadConfig {
7101        /// Load mode
7102        pub mode: std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
7103
7104        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7105    }
7106
7107    impl LoadConfig {
7108        pub fn new() -> Self {
7109            std::default::Default::default()
7110        }
7111
7112        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode].
7113        ///
7114        /// Note that all the setters affecting `mode` are mutually
7115        /// exclusive.
7116        pub fn set_mode<
7117            T: std::convert::Into<
7118                    std::option::Option<crate::model::compilation_result_action::load_config::Mode>,
7119                >,
7120        >(
7121            mut self,
7122            v: T,
7123        ) -> Self {
7124            self.mode = v.into();
7125            self
7126        }
7127
7128        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7129        /// if it holds a `Replace`, `None` if the field is not set or
7130        /// holds a different branch.
7131        pub fn replace(
7132            &self,
7133        ) -> std::option::Option<
7134            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7135        > {
7136            #[allow(unreachable_patterns)]
7137            self.mode.as_ref().and_then(|v| match v {
7138                crate::model::compilation_result_action::load_config::Mode::Replace(v) => {
7139                    std::option::Option::Some(v)
7140                }
7141                _ => std::option::Option::None,
7142            })
7143        }
7144
7145        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7146        /// to hold a `Replace`.
7147        ///
7148        /// Note that all the setters affecting `mode` are
7149        /// mutually exclusive.
7150        pub fn set_replace<
7151            T: std::convert::Into<
7152                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7153                >,
7154        >(
7155            mut self,
7156            v: T,
7157        ) -> Self {
7158            self.mode = std::option::Option::Some(
7159                crate::model::compilation_result_action::load_config::Mode::Replace(v.into()),
7160            );
7161            self
7162        }
7163
7164        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7165        /// if it holds a `Append`, `None` if the field is not set or
7166        /// holds a different branch.
7167        pub fn append(
7168            &self,
7169        ) -> std::option::Option<
7170            &std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7171        > {
7172            #[allow(unreachable_patterns)]
7173            self.mode.as_ref().and_then(|v| match v {
7174                crate::model::compilation_result_action::load_config::Mode::Append(v) => {
7175                    std::option::Option::Some(v)
7176                }
7177                _ => std::option::Option::None,
7178            })
7179        }
7180
7181        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7182        /// to hold a `Append`.
7183        ///
7184        /// Note that all the setters affecting `mode` are
7185        /// mutually exclusive.
7186        pub fn set_append<
7187            T: std::convert::Into<
7188                    std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>,
7189                >,
7190        >(
7191            mut self,
7192            v: T,
7193        ) -> Self {
7194            self.mode = std::option::Option::Some(
7195                crate::model::compilation_result_action::load_config::Mode::Append(v.into()),
7196            );
7197            self
7198        }
7199
7200        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7201        /// if it holds a `Maximum`, `None` if the field is not set or
7202        /// holds a different branch.
7203        pub fn maximum(
7204            &self,
7205        ) -> std::option::Option<
7206            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7207        > {
7208            #[allow(unreachable_patterns)]
7209            self.mode.as_ref().and_then(|v| match v {
7210                crate::model::compilation_result_action::load_config::Mode::Maximum(v) => {
7211                    std::option::Option::Some(v)
7212                }
7213                _ => std::option::Option::None,
7214            })
7215        }
7216
7217        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7218        /// to hold a `Maximum`.
7219        ///
7220        /// Note that all the setters affecting `mode` are
7221        /// mutually exclusive.
7222        pub fn set_maximum<
7223            T: std::convert::Into<
7224                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7225                >,
7226        >(
7227            mut self,
7228            v: T,
7229        ) -> Self {
7230            self.mode = std::option::Option::Some(
7231                crate::model::compilation_result_action::load_config::Mode::Maximum(v.into()),
7232            );
7233            self
7234        }
7235
7236        /// The value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7237        /// if it holds a `Unique`, `None` if the field is not set or
7238        /// holds a different branch.
7239        pub fn unique(
7240            &self,
7241        ) -> std::option::Option<
7242            &std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7243        > {
7244            #[allow(unreachable_patterns)]
7245            self.mode.as_ref().and_then(|v| match v {
7246                crate::model::compilation_result_action::load_config::Mode::Unique(v) => {
7247                    std::option::Option::Some(v)
7248                }
7249                _ => std::option::Option::None,
7250            })
7251        }
7252
7253        /// Sets the value of [mode][crate::model::compilation_result_action::LoadConfig::mode]
7254        /// to hold a `Unique`.
7255        ///
7256        /// Note that all the setters affecting `mode` are
7257        /// mutually exclusive.
7258        pub fn set_unique<
7259            T: std::convert::Into<
7260                    std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>,
7261                >,
7262        >(
7263            mut self,
7264            v: T,
7265        ) -> Self {
7266            self.mode = std::option::Option::Some(
7267                crate::model::compilation_result_action::load_config::Mode::Unique(v.into()),
7268            );
7269            self
7270        }
7271    }
7272
7273    impl wkt::message::Message for LoadConfig {
7274        fn typename() -> &'static str {
7275            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.LoadConfig"
7276        }
7277    }
7278
7279    /// Defines additional types related to [LoadConfig].
7280    pub mod load_config {
7281        #[allow(unused_imports)]
7282        use super::*;
7283
7284        /// Load mode
7285        #[derive(Clone, Debug, PartialEq)]
7286        #[non_exhaustive]
7287        pub enum Mode {
7288            /// Replace destination table
7289            Replace(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
7290            /// Append into destination table
7291            Append(std::boxed::Box<crate::model::compilation_result_action::SimpleLoadMode>),
7292            /// Insert records where the value exceeds the previous maximum value for a
7293            /// column in the destination table
7294            Maximum(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
7295            /// Insert records where the value of a column is not already present in
7296            /// the destination table
7297            Unique(std::boxed::Box<crate::model::compilation_result_action::IncrementalLoadMode>),
7298        }
7299    }
7300
7301    /// Simple load definition
7302    #[derive(Clone, Default, PartialEq)]
7303    #[non_exhaustive]
7304    pub struct SimpleLoadMode {
7305        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7306    }
7307
7308    impl SimpleLoadMode {
7309        pub fn new() -> Self {
7310            std::default::Default::default()
7311        }
7312    }
7313
7314    impl wkt::message::Message for SimpleLoadMode {
7315        fn typename() -> &'static str {
7316            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.SimpleLoadMode"
7317        }
7318    }
7319
7320    /// Load definition for incremental load modes
7321    #[derive(Clone, Default, PartialEq)]
7322    #[non_exhaustive]
7323    pub struct IncrementalLoadMode {
7324        /// Column name for incremental load modes
7325        pub column: std::string::String,
7326
7327        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7328    }
7329
7330    impl IncrementalLoadMode {
7331        pub fn new() -> Self {
7332            std::default::Default::default()
7333        }
7334
7335        /// Sets the value of [column][crate::model::compilation_result_action::IncrementalLoadMode::column].
7336        pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7337            self.column = v.into();
7338            self
7339        }
7340    }
7341
7342    impl wkt::message::Message for IncrementalLoadMode {
7343        fn typename() -> &'static str {
7344            "type.googleapis.com/google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadMode"
7345        }
7346    }
7347
7348    /// The compiled object.
7349    #[derive(Clone, Debug, PartialEq)]
7350    #[non_exhaustive]
7351    pub enum CompiledObject {
7352        /// The database relation created/updated by this action.
7353        Relation(std::boxed::Box<crate::model::compilation_result_action::Relation>),
7354        /// The database operations executed by this action.
7355        Operations(std::boxed::Box<crate::model::compilation_result_action::Operations>),
7356        /// The assertion executed by this action.
7357        Assertion(std::boxed::Box<crate::model::compilation_result_action::Assertion>),
7358        /// The declaration declared by this action.
7359        Declaration(std::boxed::Box<crate::model::compilation_result_action::Declaration>),
7360        /// The notebook executed by this action.
7361        Notebook(std::boxed::Box<crate::model::compilation_result_action::Notebook>),
7362        /// The data preparation executed by this action.
7363        DataPreparation(std::boxed::Box<crate::model::compilation_result_action::DataPreparation>),
7364    }
7365}
7366
7367/// `QueryCompilationResultActions` request message.
7368#[derive(Clone, Default, PartialEq)]
7369#[non_exhaustive]
7370pub struct QueryCompilationResultActionsRequest {
7371    /// Required. The compilation result's name.
7372    pub name: std::string::String,
7373
7374    /// Optional. Maximum number of compilation results to return. The server may
7375    /// return fewer items than requested. If unspecified, the server will pick an
7376    /// appropriate default.
7377    pub page_size: i32,
7378
7379    /// Optional. Page token received from a previous
7380    /// `QueryCompilationResultActions` call. Provide this to retrieve the
7381    /// subsequent page.
7382    ///
7383    /// When paginating, all other parameters provided to
7384    /// `QueryCompilationResultActions`, with the exception of `page_size`, must
7385    /// match the call that provided the page token.
7386    pub page_token: std::string::String,
7387
7388    /// Optional. Optional filter for the returned list. Filtering is only
7389    /// currently supported on the `file_path` field.
7390    pub filter: std::string::String,
7391
7392    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7393}
7394
7395impl QueryCompilationResultActionsRequest {
7396    pub fn new() -> Self {
7397        std::default::Default::default()
7398    }
7399
7400    /// Sets the value of [name][crate::model::QueryCompilationResultActionsRequest::name].
7401    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7402        self.name = v.into();
7403        self
7404    }
7405
7406    /// Sets the value of [page_size][crate::model::QueryCompilationResultActionsRequest::page_size].
7407    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7408        self.page_size = v.into();
7409        self
7410    }
7411
7412    /// Sets the value of [page_token][crate::model::QueryCompilationResultActionsRequest::page_token].
7413    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7414        self.page_token = v.into();
7415        self
7416    }
7417
7418    /// Sets the value of [filter][crate::model::QueryCompilationResultActionsRequest::filter].
7419    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7420        self.filter = v.into();
7421        self
7422    }
7423}
7424
7425impl wkt::message::Message for QueryCompilationResultActionsRequest {
7426    fn typename() -> &'static str {
7427        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsRequest"
7428    }
7429}
7430
7431/// `QueryCompilationResultActions` response message.
7432#[derive(Clone, Default, PartialEq)]
7433#[non_exhaustive]
7434pub struct QueryCompilationResultActionsResponse {
7435    /// List of compilation result actions.
7436    pub compilation_result_actions: std::vec::Vec<crate::model::CompilationResultAction>,
7437
7438    /// A token, which can be sent as `page_token` to retrieve the next page.
7439    /// If this field is omitted, there are no subsequent pages.
7440    pub next_page_token: std::string::String,
7441
7442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7443}
7444
7445impl QueryCompilationResultActionsResponse {
7446    pub fn new() -> Self {
7447        std::default::Default::default()
7448    }
7449
7450    /// Sets the value of [compilation_result_actions][crate::model::QueryCompilationResultActionsResponse::compilation_result_actions].
7451    pub fn set_compilation_result_actions<T, V>(mut self, v: T) -> Self
7452    where
7453        T: std::iter::IntoIterator<Item = V>,
7454        V: std::convert::Into<crate::model::CompilationResultAction>,
7455    {
7456        use std::iter::Iterator;
7457        self.compilation_result_actions = v.into_iter().map(|i| i.into()).collect();
7458        self
7459    }
7460
7461    /// Sets the value of [next_page_token][crate::model::QueryCompilationResultActionsResponse::next_page_token].
7462    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7463        self.next_page_token = v.into();
7464        self
7465    }
7466}
7467
7468impl wkt::message::Message for QueryCompilationResultActionsResponse {
7469    fn typename() -> &'static str {
7470        "type.googleapis.com/google.cloud.dataform.v1.QueryCompilationResultActionsResponse"
7471    }
7472}
7473
7474#[doc(hidden)]
7475impl gax::paginator::internal::PageableResponse for QueryCompilationResultActionsResponse {
7476    type PageItem = crate::model::CompilationResultAction;
7477
7478    fn items(self) -> std::vec::Vec<Self::PageItem> {
7479        self.compilation_result_actions
7480    }
7481
7482    fn next_page_token(&self) -> std::string::String {
7483        use std::clone::Clone;
7484        self.next_page_token.clone()
7485    }
7486}
7487
7488/// Represents a Dataform workflow configuration.
7489#[derive(Clone, Default, PartialEq)]
7490#[non_exhaustive]
7491pub struct WorkflowConfig {
7492    /// Identifier. The workflow config's name.
7493    pub name: std::string::String,
7494
7495    /// Required. The name of the release config whose release_compilation_result
7496    /// should be executed. Must be in the format
7497    /// `projects/*/locations/*/repositories/*/releaseConfigs/*`.
7498    pub release_config: std::string::String,
7499
7500    /// Optional. If left unset, a default InvocationConfig will be used.
7501    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
7502
7503    /// Optional. Optional schedule (in cron format) for automatic execution of
7504    /// this workflow config.
7505    pub cron_schedule: std::string::String,
7506
7507    /// Optional. Specifies the time zone to be used when interpreting
7508    /// cron_schedule. Must be a time zone name from the time zone database
7509    /// (<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>). If left
7510    /// unspecified, the default is UTC.
7511    pub time_zone: std::string::String,
7512
7513    /// Output only. Records of the 10 most recent scheduled execution attempts,
7514    /// ordered in descending order of `execution_time`. Updated whenever automatic
7515    /// creation of a workflow invocation is triggered by cron_schedule.
7516    pub recent_scheduled_execution_records:
7517        std::vec::Vec<crate::model::workflow_config::ScheduledExecutionRecord>,
7518
7519    /// Optional. Disables automatic creation of workflow invocations.
7520    pub disabled: bool,
7521
7522    /// Output only. The timestamp of when the WorkflowConfig was created.
7523    pub create_time: std::option::Option<wkt::Timestamp>,
7524
7525    /// Output only. The timestamp of when the WorkflowConfig was last updated.
7526    pub update_time: std::option::Option<wkt::Timestamp>,
7527
7528    /// Output only. All the metadata information that is used internally to serve
7529    /// the resource. For example: timestamps, flags, status fields, etc. The
7530    /// format of this field is a JSON string.
7531    pub internal_metadata: std::option::Option<std::string::String>,
7532
7533    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7534}
7535
7536impl WorkflowConfig {
7537    pub fn new() -> Self {
7538        std::default::Default::default()
7539    }
7540
7541    /// Sets the value of [name][crate::model::WorkflowConfig::name].
7542    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7543        self.name = v.into();
7544        self
7545    }
7546
7547    /// Sets the value of [release_config][crate::model::WorkflowConfig::release_config].
7548    pub fn set_release_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7549        self.release_config = v.into();
7550        self
7551    }
7552
7553    /// Sets the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
7554    pub fn set_invocation_config<T>(mut self, v: T) -> Self
7555    where
7556        T: std::convert::Into<crate::model::InvocationConfig>,
7557    {
7558        self.invocation_config = std::option::Option::Some(v.into());
7559        self
7560    }
7561
7562    /// Sets or clears the value of [invocation_config][crate::model::WorkflowConfig::invocation_config].
7563    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
7564    where
7565        T: std::convert::Into<crate::model::InvocationConfig>,
7566    {
7567        self.invocation_config = v.map(|x| x.into());
7568        self
7569    }
7570
7571    /// Sets the value of [cron_schedule][crate::model::WorkflowConfig::cron_schedule].
7572    pub fn set_cron_schedule<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7573        self.cron_schedule = v.into();
7574        self
7575    }
7576
7577    /// Sets the value of [time_zone][crate::model::WorkflowConfig::time_zone].
7578    pub fn set_time_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7579        self.time_zone = v.into();
7580        self
7581    }
7582
7583    /// Sets the value of [recent_scheduled_execution_records][crate::model::WorkflowConfig::recent_scheduled_execution_records].
7584    pub fn set_recent_scheduled_execution_records<T, V>(mut self, v: T) -> Self
7585    where
7586        T: std::iter::IntoIterator<Item = V>,
7587        V: std::convert::Into<crate::model::workflow_config::ScheduledExecutionRecord>,
7588    {
7589        use std::iter::Iterator;
7590        self.recent_scheduled_execution_records = v.into_iter().map(|i| i.into()).collect();
7591        self
7592    }
7593
7594    /// Sets the value of [disabled][crate::model::WorkflowConfig::disabled].
7595    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7596        self.disabled = v.into();
7597        self
7598    }
7599
7600    /// Sets the value of [create_time][crate::model::WorkflowConfig::create_time].
7601    pub fn set_create_time<T>(mut self, v: T) -> Self
7602    where
7603        T: std::convert::Into<wkt::Timestamp>,
7604    {
7605        self.create_time = std::option::Option::Some(v.into());
7606        self
7607    }
7608
7609    /// Sets or clears the value of [create_time][crate::model::WorkflowConfig::create_time].
7610    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7611    where
7612        T: std::convert::Into<wkt::Timestamp>,
7613    {
7614        self.create_time = v.map(|x| x.into());
7615        self
7616    }
7617
7618    /// Sets the value of [update_time][crate::model::WorkflowConfig::update_time].
7619    pub fn set_update_time<T>(mut self, v: T) -> Self
7620    where
7621        T: std::convert::Into<wkt::Timestamp>,
7622    {
7623        self.update_time = std::option::Option::Some(v.into());
7624        self
7625    }
7626
7627    /// Sets or clears the value of [update_time][crate::model::WorkflowConfig::update_time].
7628    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7629    where
7630        T: std::convert::Into<wkt::Timestamp>,
7631    {
7632        self.update_time = v.map(|x| x.into());
7633        self
7634    }
7635
7636    /// Sets the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
7637    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
7638    where
7639        T: std::convert::Into<std::string::String>,
7640    {
7641        self.internal_metadata = std::option::Option::Some(v.into());
7642        self
7643    }
7644
7645    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowConfig::internal_metadata].
7646    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
7647    where
7648        T: std::convert::Into<std::string::String>,
7649    {
7650        self.internal_metadata = v.map(|x| x.into());
7651        self
7652    }
7653}
7654
7655impl wkt::message::Message for WorkflowConfig {
7656    fn typename() -> &'static str {
7657        "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig"
7658    }
7659}
7660
7661/// Defines additional types related to [WorkflowConfig].
7662pub mod workflow_config {
7663    #[allow(unused_imports)]
7664    use super::*;
7665
7666    /// A record of an attempt to create a workflow invocation for this workflow
7667    /// config.
7668    #[derive(Clone, Default, PartialEq)]
7669    #[non_exhaustive]
7670    pub struct ScheduledExecutionRecord {
7671        /// Output only. The timestamp of this execution attempt.
7672        pub execution_time: std::option::Option<wkt::Timestamp>,
7673
7674        /// The result of this execution attempt.
7675        pub result:
7676            std::option::Option<crate::model::workflow_config::scheduled_execution_record::Result>,
7677
7678        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7679    }
7680
7681    impl ScheduledExecutionRecord {
7682        pub fn new() -> Self {
7683            std::default::Default::default()
7684        }
7685
7686        /// Sets the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
7687        pub fn set_execution_time<T>(mut self, v: T) -> Self
7688        where
7689            T: std::convert::Into<wkt::Timestamp>,
7690        {
7691            self.execution_time = std::option::Option::Some(v.into());
7692            self
7693        }
7694
7695        /// Sets or clears the value of [execution_time][crate::model::workflow_config::ScheduledExecutionRecord::execution_time].
7696        pub fn set_or_clear_execution_time<T>(mut self, v: std::option::Option<T>) -> Self
7697        where
7698            T: std::convert::Into<wkt::Timestamp>,
7699        {
7700            self.execution_time = v.map(|x| x.into());
7701            self
7702        }
7703
7704        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result].
7705        ///
7706        /// Note that all the setters affecting `result` are mutually
7707        /// exclusive.
7708        pub fn set_result<
7709            T: std::convert::Into<
7710                    std::option::Option<
7711                        crate::model::workflow_config::scheduled_execution_record::Result,
7712                    >,
7713                >,
7714        >(
7715            mut self,
7716            v: T,
7717        ) -> Self {
7718            self.result = v.into();
7719            self
7720        }
7721
7722        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
7723        /// if it holds a `WorkflowInvocation`, `None` if the field is not set or
7724        /// holds a different branch.
7725        pub fn workflow_invocation(&self) -> std::option::Option<&std::string::String> {
7726            #[allow(unreachable_patterns)]
7727            self.result.as_ref().and_then(|v| match v {
7728                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(v) => std::option::Option::Some(v),
7729                _ => std::option::Option::None,
7730            })
7731        }
7732
7733        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
7734        /// to hold a `WorkflowInvocation`.
7735        ///
7736        /// Note that all the setters affecting `result` are
7737        /// mutually exclusive.
7738        pub fn set_workflow_invocation<T: std::convert::Into<std::string::String>>(
7739            mut self,
7740            v: T,
7741        ) -> Self {
7742            self.result = std::option::Option::Some(
7743                crate::model::workflow_config::scheduled_execution_record::Result::WorkflowInvocation(
7744                    v.into()
7745                )
7746            );
7747            self
7748        }
7749
7750        /// The value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
7751        /// if it holds a `ErrorStatus`, `None` if the field is not set or
7752        /// holds a different branch.
7753        pub fn error_status(&self) -> std::option::Option<&std::boxed::Box<rpc::model::Status>> {
7754            #[allow(unreachable_patterns)]
7755            self.result.as_ref().and_then(|v| match v {
7756                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
7757                    v,
7758                ) => std::option::Option::Some(v),
7759                _ => std::option::Option::None,
7760            })
7761        }
7762
7763        /// Sets the value of [result][crate::model::workflow_config::ScheduledExecutionRecord::result]
7764        /// to hold a `ErrorStatus`.
7765        ///
7766        /// Note that all the setters affecting `result` are
7767        /// mutually exclusive.
7768        pub fn set_error_status<T: std::convert::Into<std::boxed::Box<rpc::model::Status>>>(
7769            mut self,
7770            v: T,
7771        ) -> Self {
7772            self.result = std::option::Option::Some(
7773                crate::model::workflow_config::scheduled_execution_record::Result::ErrorStatus(
7774                    v.into(),
7775                ),
7776            );
7777            self
7778        }
7779    }
7780
7781    impl wkt::message::Message for ScheduledExecutionRecord {
7782        fn typename() -> &'static str {
7783            "type.googleapis.com/google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecord"
7784        }
7785    }
7786
7787    /// Defines additional types related to [ScheduledExecutionRecord].
7788    pub mod scheduled_execution_record {
7789        #[allow(unused_imports)]
7790        use super::*;
7791
7792        /// The result of this execution attempt.
7793        #[derive(Clone, Debug, PartialEq)]
7794        #[non_exhaustive]
7795        pub enum Result {
7796            /// The name of the created workflow invocation, if one was successfully
7797            /// created. Must be in the format
7798            /// `projects/*/locations/*/repositories/*/workflowInvocations/*`.
7799            WorkflowInvocation(std::string::String),
7800            /// The error status encountered upon this attempt to create the
7801            /// workflow invocation, if the attempt was unsuccessful.
7802            ErrorStatus(std::boxed::Box<rpc::model::Status>),
7803        }
7804    }
7805}
7806
7807/// Includes various configuration options for a workflow invocation.
7808/// If both `included_targets` and `included_tags` are unset, all actions
7809/// will be included.
7810#[derive(Clone, Default, PartialEq)]
7811#[non_exhaustive]
7812pub struct InvocationConfig {
7813    /// Optional. The set of action identifiers to include.
7814    pub included_targets: std::vec::Vec<crate::model::Target>,
7815
7816    /// Optional. The set of tags to include.
7817    pub included_tags: std::vec::Vec<std::string::String>,
7818
7819    /// Optional. When set to true, transitive dependencies of included actions
7820    /// will be executed.
7821    pub transitive_dependencies_included: bool,
7822
7823    /// Optional. When set to true, transitive dependents of included actions will
7824    /// be executed.
7825    pub transitive_dependents_included: bool,
7826
7827    /// Optional. When set to true, any incremental tables will be fully refreshed.
7828    pub fully_refresh_incremental_tables_enabled: bool,
7829
7830    /// Optional. The service account to run workflow invocations under.
7831    pub service_account: std::string::String,
7832
7833    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7834}
7835
7836impl InvocationConfig {
7837    pub fn new() -> Self {
7838        std::default::Default::default()
7839    }
7840
7841    /// Sets the value of [included_targets][crate::model::InvocationConfig::included_targets].
7842    pub fn set_included_targets<T, V>(mut self, v: T) -> Self
7843    where
7844        T: std::iter::IntoIterator<Item = V>,
7845        V: std::convert::Into<crate::model::Target>,
7846    {
7847        use std::iter::Iterator;
7848        self.included_targets = v.into_iter().map(|i| i.into()).collect();
7849        self
7850    }
7851
7852    /// Sets the value of [included_tags][crate::model::InvocationConfig::included_tags].
7853    pub fn set_included_tags<T, V>(mut self, v: T) -> Self
7854    where
7855        T: std::iter::IntoIterator<Item = V>,
7856        V: std::convert::Into<std::string::String>,
7857    {
7858        use std::iter::Iterator;
7859        self.included_tags = v.into_iter().map(|i| i.into()).collect();
7860        self
7861    }
7862
7863    /// Sets the value of [transitive_dependencies_included][crate::model::InvocationConfig::transitive_dependencies_included].
7864    pub fn set_transitive_dependencies_included<T: std::convert::Into<bool>>(
7865        mut self,
7866        v: T,
7867    ) -> Self {
7868        self.transitive_dependencies_included = v.into();
7869        self
7870    }
7871
7872    /// Sets the value of [transitive_dependents_included][crate::model::InvocationConfig::transitive_dependents_included].
7873    pub fn set_transitive_dependents_included<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7874        self.transitive_dependents_included = v.into();
7875        self
7876    }
7877
7878    /// Sets the value of [fully_refresh_incremental_tables_enabled][crate::model::InvocationConfig::fully_refresh_incremental_tables_enabled].
7879    pub fn set_fully_refresh_incremental_tables_enabled<T: std::convert::Into<bool>>(
7880        mut self,
7881        v: T,
7882    ) -> Self {
7883        self.fully_refresh_incremental_tables_enabled = v.into();
7884        self
7885    }
7886
7887    /// Sets the value of [service_account][crate::model::InvocationConfig::service_account].
7888    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7889        self.service_account = v.into();
7890        self
7891    }
7892}
7893
7894impl wkt::message::Message for InvocationConfig {
7895    fn typename() -> &'static str {
7896        "type.googleapis.com/google.cloud.dataform.v1.InvocationConfig"
7897    }
7898}
7899
7900/// `ListWorkflowConfigs` request message.
7901#[derive(Clone, Default, PartialEq)]
7902#[non_exhaustive]
7903pub struct ListWorkflowConfigsRequest {
7904    /// Required. The repository in which to list workflow configs. Must be in the
7905    /// format `projects/*/locations/*/repositories/*`.
7906    pub parent: std::string::String,
7907
7908    /// Optional. Maximum number of workflow configs to return. The server may
7909    /// return fewer items than requested. If unspecified, the server will pick an
7910    /// appropriate default.
7911    pub page_size: i32,
7912
7913    /// Optional. Page token received from a previous `ListWorkflowConfigs` call.
7914    /// Provide this to retrieve the subsequent page.
7915    ///
7916    /// When paginating, all other parameters provided to `ListWorkflowConfigs`,
7917    /// with the exception of `page_size`, must match the call that provided the
7918    /// page token.
7919    pub page_token: std::string::String,
7920
7921    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7922}
7923
7924impl ListWorkflowConfigsRequest {
7925    pub fn new() -> Self {
7926        std::default::Default::default()
7927    }
7928
7929    /// Sets the value of [parent][crate::model::ListWorkflowConfigsRequest::parent].
7930    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7931        self.parent = v.into();
7932        self
7933    }
7934
7935    /// Sets the value of [page_size][crate::model::ListWorkflowConfigsRequest::page_size].
7936    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7937        self.page_size = v.into();
7938        self
7939    }
7940
7941    /// Sets the value of [page_token][crate::model::ListWorkflowConfigsRequest::page_token].
7942    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7943        self.page_token = v.into();
7944        self
7945    }
7946}
7947
7948impl wkt::message::Message for ListWorkflowConfigsRequest {
7949    fn typename() -> &'static str {
7950        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsRequest"
7951    }
7952}
7953
7954/// `ListWorkflowConfigs` response message.
7955#[derive(Clone, Default, PartialEq)]
7956#[non_exhaustive]
7957pub struct ListWorkflowConfigsResponse {
7958    /// List of workflow configs.
7959    pub workflow_configs: std::vec::Vec<crate::model::WorkflowConfig>,
7960
7961    /// A token, which can be sent as `page_token` to retrieve the next page.
7962    /// If this field is omitted, there are no subsequent pages.
7963    pub next_page_token: std::string::String,
7964
7965    /// Locations which could not be reached.
7966    pub unreachable: std::vec::Vec<std::string::String>,
7967
7968    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7969}
7970
7971impl ListWorkflowConfigsResponse {
7972    pub fn new() -> Self {
7973        std::default::Default::default()
7974    }
7975
7976    /// Sets the value of [workflow_configs][crate::model::ListWorkflowConfigsResponse::workflow_configs].
7977    pub fn set_workflow_configs<T, V>(mut self, v: T) -> Self
7978    where
7979        T: std::iter::IntoIterator<Item = V>,
7980        V: std::convert::Into<crate::model::WorkflowConfig>,
7981    {
7982        use std::iter::Iterator;
7983        self.workflow_configs = v.into_iter().map(|i| i.into()).collect();
7984        self
7985    }
7986
7987    /// Sets the value of [next_page_token][crate::model::ListWorkflowConfigsResponse::next_page_token].
7988    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7989        self.next_page_token = v.into();
7990        self
7991    }
7992
7993    /// Sets the value of [unreachable][crate::model::ListWorkflowConfigsResponse::unreachable].
7994    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7995    where
7996        T: std::iter::IntoIterator<Item = V>,
7997        V: std::convert::Into<std::string::String>,
7998    {
7999        use std::iter::Iterator;
8000        self.unreachable = v.into_iter().map(|i| i.into()).collect();
8001        self
8002    }
8003}
8004
8005impl wkt::message::Message for ListWorkflowConfigsResponse {
8006    fn typename() -> &'static str {
8007        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowConfigsResponse"
8008    }
8009}
8010
8011#[doc(hidden)]
8012impl gax::paginator::internal::PageableResponse for ListWorkflowConfigsResponse {
8013    type PageItem = crate::model::WorkflowConfig;
8014
8015    fn items(self) -> std::vec::Vec<Self::PageItem> {
8016        self.workflow_configs
8017    }
8018
8019    fn next_page_token(&self) -> std::string::String {
8020        use std::clone::Clone;
8021        self.next_page_token.clone()
8022    }
8023}
8024
8025/// `GetWorkflowConfig` request message.
8026#[derive(Clone, Default, PartialEq)]
8027#[non_exhaustive]
8028pub struct GetWorkflowConfigRequest {
8029    /// Required. The workflow config's name.
8030    pub name: std::string::String,
8031
8032    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8033}
8034
8035impl GetWorkflowConfigRequest {
8036    pub fn new() -> Self {
8037        std::default::Default::default()
8038    }
8039
8040    /// Sets the value of [name][crate::model::GetWorkflowConfigRequest::name].
8041    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8042        self.name = v.into();
8043        self
8044    }
8045}
8046
8047impl wkt::message::Message for GetWorkflowConfigRequest {
8048    fn typename() -> &'static str {
8049        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowConfigRequest"
8050    }
8051}
8052
8053/// `CreateWorkflowConfig` request message.
8054#[derive(Clone, Default, PartialEq)]
8055#[non_exhaustive]
8056pub struct CreateWorkflowConfigRequest {
8057    /// Required. The repository in which to create the workflow config. Must be in
8058    /// the format `projects/*/locations/*/repositories/*`.
8059    pub parent: std::string::String,
8060
8061    /// Required. The workflow config to create.
8062    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
8063
8064    /// Required. The ID to use for the workflow config, which will become the
8065    /// final component of the workflow config's resource name.
8066    pub workflow_config_id: std::string::String,
8067
8068    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8069}
8070
8071impl CreateWorkflowConfigRequest {
8072    pub fn new() -> Self {
8073        std::default::Default::default()
8074    }
8075
8076    /// Sets the value of [parent][crate::model::CreateWorkflowConfigRequest::parent].
8077    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8078        self.parent = v.into();
8079        self
8080    }
8081
8082    /// Sets the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
8083    pub fn set_workflow_config<T>(mut self, v: T) -> Self
8084    where
8085        T: std::convert::Into<crate::model::WorkflowConfig>,
8086    {
8087        self.workflow_config = std::option::Option::Some(v.into());
8088        self
8089    }
8090
8091    /// Sets or clears the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
8092    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
8093    where
8094        T: std::convert::Into<crate::model::WorkflowConfig>,
8095    {
8096        self.workflow_config = v.map(|x| x.into());
8097        self
8098    }
8099
8100    /// Sets the value of [workflow_config_id][crate::model::CreateWorkflowConfigRequest::workflow_config_id].
8101    pub fn set_workflow_config_id<T: std::convert::Into<std::string::String>>(
8102        mut self,
8103        v: T,
8104    ) -> Self {
8105        self.workflow_config_id = v.into();
8106        self
8107    }
8108}
8109
8110impl wkt::message::Message for CreateWorkflowConfigRequest {
8111    fn typename() -> &'static str {
8112        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowConfigRequest"
8113    }
8114}
8115
8116/// `UpdateWorkflowConfig` request message.
8117#[derive(Clone, Default, PartialEq)]
8118#[non_exhaustive]
8119pub struct UpdateWorkflowConfigRequest {
8120    /// Optional. Specifies the fields to be updated in the workflow config. If
8121    /// left unset, all fields will be updated.
8122    pub update_mask: std::option::Option<wkt::FieldMask>,
8123
8124    /// Required. The workflow config to update.
8125    pub workflow_config: std::option::Option<crate::model::WorkflowConfig>,
8126
8127    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8128}
8129
8130impl UpdateWorkflowConfigRequest {
8131    pub fn new() -> Self {
8132        std::default::Default::default()
8133    }
8134
8135    /// Sets the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
8136    pub fn set_update_mask<T>(mut self, v: T) -> Self
8137    where
8138        T: std::convert::Into<wkt::FieldMask>,
8139    {
8140        self.update_mask = std::option::Option::Some(v.into());
8141        self
8142    }
8143
8144    /// Sets or clears the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
8145    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8146    where
8147        T: std::convert::Into<wkt::FieldMask>,
8148    {
8149        self.update_mask = v.map(|x| x.into());
8150        self
8151    }
8152
8153    /// Sets the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
8154    pub fn set_workflow_config<T>(mut self, v: T) -> Self
8155    where
8156        T: std::convert::Into<crate::model::WorkflowConfig>,
8157    {
8158        self.workflow_config = std::option::Option::Some(v.into());
8159        self
8160    }
8161
8162    /// Sets or clears the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
8163    pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
8164    where
8165        T: std::convert::Into<crate::model::WorkflowConfig>,
8166    {
8167        self.workflow_config = v.map(|x| x.into());
8168        self
8169    }
8170}
8171
8172impl wkt::message::Message for UpdateWorkflowConfigRequest {
8173    fn typename() -> &'static str {
8174        "type.googleapis.com/google.cloud.dataform.v1.UpdateWorkflowConfigRequest"
8175    }
8176}
8177
8178/// `DeleteWorkflowConfig` request message.
8179#[derive(Clone, Default, PartialEq)]
8180#[non_exhaustive]
8181pub struct DeleteWorkflowConfigRequest {
8182    /// Required. The workflow config's name.
8183    pub name: std::string::String,
8184
8185    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8186}
8187
8188impl DeleteWorkflowConfigRequest {
8189    pub fn new() -> Self {
8190        std::default::Default::default()
8191    }
8192
8193    /// Sets the value of [name][crate::model::DeleteWorkflowConfigRequest::name].
8194    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8195        self.name = v.into();
8196        self
8197    }
8198}
8199
8200impl wkt::message::Message for DeleteWorkflowConfigRequest {
8201    fn typename() -> &'static str {
8202        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowConfigRequest"
8203    }
8204}
8205
8206/// Represents a single invocation of a compilation result.
8207#[derive(Clone, Default, PartialEq)]
8208#[non_exhaustive]
8209pub struct WorkflowInvocation {
8210    /// Output only. The workflow invocation's name.
8211    pub name: std::string::String,
8212
8213    /// Immutable. If left unset, a default InvocationConfig will be used.
8214    pub invocation_config: std::option::Option<crate::model::InvocationConfig>,
8215
8216    /// Output only. This workflow invocation's current state.
8217    pub state: crate::model::workflow_invocation::State,
8218
8219    /// Output only. This workflow invocation's timing details.
8220    pub invocation_timing: std::option::Option<gtype::model::Interval>,
8221
8222    /// Output only. The resolved compilation result that was used to create this
8223    /// invocation. Will be in the format
8224    /// `projects/*/locations/*/repositories/*/compilationResults/*`.
8225    pub resolved_compilation_result: std::string::String,
8226
8227    /// Output only. Only set if the repository has a KMS Key.
8228    pub data_encryption_state: std::option::Option<crate::model::DataEncryptionState>,
8229
8230    /// Output only. All the metadata information that is used internally to serve
8231    /// the resource. For example: timestamps, flags, status fields, etc. The
8232    /// format of this field is a JSON string.
8233    pub internal_metadata: std::option::Option<std::string::String>,
8234
8235    /// The source of the compilation result to use for this invocation.
8236    pub compilation_source:
8237        std::option::Option<crate::model::workflow_invocation::CompilationSource>,
8238
8239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8240}
8241
8242impl WorkflowInvocation {
8243    pub fn new() -> Self {
8244        std::default::Default::default()
8245    }
8246
8247    /// Sets the value of [name][crate::model::WorkflowInvocation::name].
8248    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8249        self.name = v.into();
8250        self
8251    }
8252
8253    /// Sets the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
8254    pub fn set_invocation_config<T>(mut self, v: T) -> Self
8255    where
8256        T: std::convert::Into<crate::model::InvocationConfig>,
8257    {
8258        self.invocation_config = std::option::Option::Some(v.into());
8259        self
8260    }
8261
8262    /// Sets or clears the value of [invocation_config][crate::model::WorkflowInvocation::invocation_config].
8263    pub fn set_or_clear_invocation_config<T>(mut self, v: std::option::Option<T>) -> Self
8264    where
8265        T: std::convert::Into<crate::model::InvocationConfig>,
8266    {
8267        self.invocation_config = v.map(|x| x.into());
8268        self
8269    }
8270
8271    /// Sets the value of [state][crate::model::WorkflowInvocation::state].
8272    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation::State>>(
8273        mut self,
8274        v: T,
8275    ) -> Self {
8276        self.state = v.into();
8277        self
8278    }
8279
8280    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
8281    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
8282    where
8283        T: std::convert::Into<gtype::model::Interval>,
8284    {
8285        self.invocation_timing = std::option::Option::Some(v.into());
8286        self
8287    }
8288
8289    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocation::invocation_timing].
8290    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
8291    where
8292        T: std::convert::Into<gtype::model::Interval>,
8293    {
8294        self.invocation_timing = v.map(|x| x.into());
8295        self
8296    }
8297
8298    /// Sets the value of [resolved_compilation_result][crate::model::WorkflowInvocation::resolved_compilation_result].
8299    pub fn set_resolved_compilation_result<T: std::convert::Into<std::string::String>>(
8300        mut self,
8301        v: T,
8302    ) -> Self {
8303        self.resolved_compilation_result = v.into();
8304        self
8305    }
8306
8307    /// Sets the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
8308    pub fn set_data_encryption_state<T>(mut self, v: T) -> Self
8309    where
8310        T: std::convert::Into<crate::model::DataEncryptionState>,
8311    {
8312        self.data_encryption_state = std::option::Option::Some(v.into());
8313        self
8314    }
8315
8316    /// Sets or clears the value of [data_encryption_state][crate::model::WorkflowInvocation::data_encryption_state].
8317    pub fn set_or_clear_data_encryption_state<T>(mut self, v: std::option::Option<T>) -> Self
8318    where
8319        T: std::convert::Into<crate::model::DataEncryptionState>,
8320    {
8321        self.data_encryption_state = v.map(|x| x.into());
8322        self
8323    }
8324
8325    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
8326    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
8327    where
8328        T: std::convert::Into<std::string::String>,
8329    {
8330        self.internal_metadata = std::option::Option::Some(v.into());
8331        self
8332    }
8333
8334    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocation::internal_metadata].
8335    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
8336    where
8337        T: std::convert::Into<std::string::String>,
8338    {
8339        self.internal_metadata = v.map(|x| x.into());
8340        self
8341    }
8342
8343    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source].
8344    ///
8345    /// Note that all the setters affecting `compilation_source` are mutually
8346    /// exclusive.
8347    pub fn set_compilation_source<
8348        T: std::convert::Into<
8349                std::option::Option<crate::model::workflow_invocation::CompilationSource>,
8350            >,
8351    >(
8352        mut self,
8353        v: T,
8354    ) -> Self {
8355        self.compilation_source = v.into();
8356        self
8357    }
8358
8359    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
8360    /// if it holds a `CompilationResult`, `None` if the field is not set or
8361    /// holds a different branch.
8362    pub fn compilation_result(&self) -> std::option::Option<&std::string::String> {
8363        #[allow(unreachable_patterns)]
8364        self.compilation_source.as_ref().and_then(|v| match v {
8365            crate::model::workflow_invocation::CompilationSource::CompilationResult(v) => {
8366                std::option::Option::Some(v)
8367            }
8368            _ => std::option::Option::None,
8369        })
8370    }
8371
8372    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
8373    /// to hold a `CompilationResult`.
8374    ///
8375    /// Note that all the setters affecting `compilation_source` are
8376    /// mutually exclusive.
8377    pub fn set_compilation_result<T: std::convert::Into<std::string::String>>(
8378        mut self,
8379        v: T,
8380    ) -> Self {
8381        self.compilation_source = std::option::Option::Some(
8382            crate::model::workflow_invocation::CompilationSource::CompilationResult(v.into()),
8383        );
8384        self
8385    }
8386
8387    /// The value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
8388    /// if it holds a `WorkflowConfig`, `None` if the field is not set or
8389    /// holds a different branch.
8390    pub fn workflow_config(&self) -> std::option::Option<&std::string::String> {
8391        #[allow(unreachable_patterns)]
8392        self.compilation_source.as_ref().and_then(|v| match v {
8393            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v) => {
8394                std::option::Option::Some(v)
8395            }
8396            _ => std::option::Option::None,
8397        })
8398    }
8399
8400    /// Sets the value of [compilation_source][crate::model::WorkflowInvocation::compilation_source]
8401    /// to hold a `WorkflowConfig`.
8402    ///
8403    /// Note that all the setters affecting `compilation_source` are
8404    /// mutually exclusive.
8405    pub fn set_workflow_config<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8406        self.compilation_source = std::option::Option::Some(
8407            crate::model::workflow_invocation::CompilationSource::WorkflowConfig(v.into()),
8408        );
8409        self
8410    }
8411}
8412
8413impl wkt::message::Message for WorkflowInvocation {
8414    fn typename() -> &'static str {
8415        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocation"
8416    }
8417}
8418
8419/// Defines additional types related to [WorkflowInvocation].
8420pub mod workflow_invocation {
8421    #[allow(unused_imports)]
8422    use super::*;
8423
8424    /// Represents the current state of a workflow invocation.
8425    ///
8426    /// # Working with unknown values
8427    ///
8428    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8429    /// additional enum variants at any time. Adding new variants is not considered
8430    /// a breaking change. Applications should write their code in anticipation of:
8431    ///
8432    /// - New values appearing in future releases of the client library, **and**
8433    /// - New values received dynamically, without application changes.
8434    ///
8435    /// Please consult the [Working with enums] section in the user guide for some
8436    /// guidelines.
8437    ///
8438    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8439    #[derive(Clone, Debug, PartialEq)]
8440    #[non_exhaustive]
8441    pub enum State {
8442        /// Default value. This value is unused.
8443        Unspecified,
8444        /// The workflow invocation is currently running.
8445        Running,
8446        /// The workflow invocation succeeded. A terminal state.
8447        Succeeded,
8448        /// The workflow invocation was cancelled. A terminal state.
8449        Cancelled,
8450        /// The workflow invocation failed. A terminal state.
8451        Failed,
8452        /// The workflow invocation is being cancelled, but some actions are still
8453        /// running.
8454        Canceling,
8455        /// If set, the enum was initialized with an unknown value.
8456        ///
8457        /// Applications can examine the value using [State::value] or
8458        /// [State::name].
8459        UnknownValue(state::UnknownValue),
8460    }
8461
8462    #[doc(hidden)]
8463    pub mod state {
8464        #[allow(unused_imports)]
8465        use super::*;
8466        #[derive(Clone, Debug, PartialEq)]
8467        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8468    }
8469
8470    impl State {
8471        /// Gets the enum value.
8472        ///
8473        /// Returns `None` if the enum contains an unknown value deserialized from
8474        /// the string representation of enums.
8475        pub fn value(&self) -> std::option::Option<i32> {
8476            match self {
8477                Self::Unspecified => std::option::Option::Some(0),
8478                Self::Running => std::option::Option::Some(1),
8479                Self::Succeeded => std::option::Option::Some(2),
8480                Self::Cancelled => std::option::Option::Some(3),
8481                Self::Failed => std::option::Option::Some(4),
8482                Self::Canceling => std::option::Option::Some(5),
8483                Self::UnknownValue(u) => u.0.value(),
8484            }
8485        }
8486
8487        /// Gets the enum value as a string.
8488        ///
8489        /// Returns `None` if the enum contains an unknown value deserialized from
8490        /// the integer representation of enums.
8491        pub fn name(&self) -> std::option::Option<&str> {
8492            match self {
8493                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8494                Self::Running => std::option::Option::Some("RUNNING"),
8495                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
8496                Self::Cancelled => std::option::Option::Some("CANCELLED"),
8497                Self::Failed => std::option::Option::Some("FAILED"),
8498                Self::Canceling => std::option::Option::Some("CANCELING"),
8499                Self::UnknownValue(u) => u.0.name(),
8500            }
8501        }
8502    }
8503
8504    impl std::default::Default for State {
8505        fn default() -> Self {
8506            use std::convert::From;
8507            Self::from(0)
8508        }
8509    }
8510
8511    impl std::fmt::Display for State {
8512        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8513            wkt::internal::display_enum(f, self.name(), self.value())
8514        }
8515    }
8516
8517    impl std::convert::From<i32> for State {
8518        fn from(value: i32) -> Self {
8519            match value {
8520                0 => Self::Unspecified,
8521                1 => Self::Running,
8522                2 => Self::Succeeded,
8523                3 => Self::Cancelled,
8524                4 => Self::Failed,
8525                5 => Self::Canceling,
8526                _ => Self::UnknownValue(state::UnknownValue(
8527                    wkt::internal::UnknownEnumValue::Integer(value),
8528                )),
8529            }
8530        }
8531    }
8532
8533    impl std::convert::From<&str> for State {
8534        fn from(value: &str) -> Self {
8535            use std::string::ToString;
8536            match value {
8537                "STATE_UNSPECIFIED" => Self::Unspecified,
8538                "RUNNING" => Self::Running,
8539                "SUCCEEDED" => Self::Succeeded,
8540                "CANCELLED" => Self::Cancelled,
8541                "FAILED" => Self::Failed,
8542                "CANCELING" => Self::Canceling,
8543                _ => Self::UnknownValue(state::UnknownValue(
8544                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8545                )),
8546            }
8547        }
8548    }
8549
8550    impl serde::ser::Serialize for State {
8551        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8552        where
8553            S: serde::Serializer,
8554        {
8555            match self {
8556                Self::Unspecified => serializer.serialize_i32(0),
8557                Self::Running => serializer.serialize_i32(1),
8558                Self::Succeeded => serializer.serialize_i32(2),
8559                Self::Cancelled => serializer.serialize_i32(3),
8560                Self::Failed => serializer.serialize_i32(4),
8561                Self::Canceling => serializer.serialize_i32(5),
8562                Self::UnknownValue(u) => u.0.serialize(serializer),
8563            }
8564        }
8565    }
8566
8567    impl<'de> serde::de::Deserialize<'de> for State {
8568        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8569        where
8570            D: serde::Deserializer<'de>,
8571        {
8572            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8573                ".google.cloud.dataform.v1.WorkflowInvocation.State",
8574            ))
8575        }
8576    }
8577
8578    /// The source of the compilation result to use for this invocation.
8579    #[derive(Clone, Debug, PartialEq)]
8580    #[non_exhaustive]
8581    pub enum CompilationSource {
8582        /// Immutable. The name of the compilation result to use for this invocation.
8583        /// Must be in the format
8584        /// `projects/*/locations/*/repositories/*/compilationResults/*`.
8585        CompilationResult(std::string::String),
8586        /// Immutable. The name of the workflow config to invoke. Must be in the
8587        /// format `projects/*/locations/*/repositories/*/workflowConfigs/*`.
8588        WorkflowConfig(std::string::String),
8589    }
8590}
8591
8592/// `ListWorkflowInvocations` request message.
8593#[derive(Clone, Default, PartialEq)]
8594#[non_exhaustive]
8595pub struct ListWorkflowInvocationsRequest {
8596    /// Required. The parent resource of the WorkflowInvocation type. Must be in
8597    /// the format `projects/*/locations/*/repositories/*`.
8598    pub parent: std::string::String,
8599
8600    /// Optional. Maximum number of workflow invocations to return. The server may
8601    /// return fewer items than requested. If unspecified, the server will pick an
8602    /// appropriate default.
8603    pub page_size: i32,
8604
8605    /// Optional. Page token received from a previous `ListWorkflowInvocations`
8606    /// call. Provide this to retrieve the subsequent page.
8607    ///
8608    /// When paginating, all other parameters provided to
8609    /// `ListWorkflowInvocations`, with the exception of `page_size`, must match
8610    /// the call that provided the page token.
8611    pub page_token: std::string::String,
8612
8613    /// Optional. This field only supports ordering by `name`. If unspecified, the
8614    /// server will choose the ordering. If specified, the default order is
8615    /// ascending for the `name` field.
8616    pub order_by: std::string::String,
8617
8618    /// Optional. Filter for the returned list.
8619    pub filter: std::string::String,
8620
8621    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8622}
8623
8624impl ListWorkflowInvocationsRequest {
8625    pub fn new() -> Self {
8626        std::default::Default::default()
8627    }
8628
8629    /// Sets the value of [parent][crate::model::ListWorkflowInvocationsRequest::parent].
8630    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8631        self.parent = v.into();
8632        self
8633    }
8634
8635    /// Sets the value of [page_size][crate::model::ListWorkflowInvocationsRequest::page_size].
8636    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8637        self.page_size = v.into();
8638        self
8639    }
8640
8641    /// Sets the value of [page_token][crate::model::ListWorkflowInvocationsRequest::page_token].
8642    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8643        self.page_token = v.into();
8644        self
8645    }
8646
8647    /// Sets the value of [order_by][crate::model::ListWorkflowInvocationsRequest::order_by].
8648    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8649        self.order_by = v.into();
8650        self
8651    }
8652
8653    /// Sets the value of [filter][crate::model::ListWorkflowInvocationsRequest::filter].
8654    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8655        self.filter = v.into();
8656        self
8657    }
8658}
8659
8660impl wkt::message::Message for ListWorkflowInvocationsRequest {
8661    fn typename() -> &'static str {
8662        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsRequest"
8663    }
8664}
8665
8666/// `ListWorkflowInvocations` response message.
8667#[derive(Clone, Default, PartialEq)]
8668#[non_exhaustive]
8669pub struct ListWorkflowInvocationsResponse {
8670    /// List of workflow invocations.
8671    pub workflow_invocations: std::vec::Vec<crate::model::WorkflowInvocation>,
8672
8673    /// A token, which can be sent as `page_token` to retrieve the next page.
8674    /// If this field is omitted, there are no subsequent pages.
8675    pub next_page_token: std::string::String,
8676
8677    /// Locations which could not be reached.
8678    pub unreachable: std::vec::Vec<std::string::String>,
8679
8680    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8681}
8682
8683impl ListWorkflowInvocationsResponse {
8684    pub fn new() -> Self {
8685        std::default::Default::default()
8686    }
8687
8688    /// Sets the value of [workflow_invocations][crate::model::ListWorkflowInvocationsResponse::workflow_invocations].
8689    pub fn set_workflow_invocations<T, V>(mut self, v: T) -> Self
8690    where
8691        T: std::iter::IntoIterator<Item = V>,
8692        V: std::convert::Into<crate::model::WorkflowInvocation>,
8693    {
8694        use std::iter::Iterator;
8695        self.workflow_invocations = v.into_iter().map(|i| i.into()).collect();
8696        self
8697    }
8698
8699    /// Sets the value of [next_page_token][crate::model::ListWorkflowInvocationsResponse::next_page_token].
8700    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8701        self.next_page_token = v.into();
8702        self
8703    }
8704
8705    /// Sets the value of [unreachable][crate::model::ListWorkflowInvocationsResponse::unreachable].
8706    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
8707    where
8708        T: std::iter::IntoIterator<Item = V>,
8709        V: std::convert::Into<std::string::String>,
8710    {
8711        use std::iter::Iterator;
8712        self.unreachable = v.into_iter().map(|i| i.into()).collect();
8713        self
8714    }
8715}
8716
8717impl wkt::message::Message for ListWorkflowInvocationsResponse {
8718    fn typename() -> &'static str {
8719        "type.googleapis.com/google.cloud.dataform.v1.ListWorkflowInvocationsResponse"
8720    }
8721}
8722
8723#[doc(hidden)]
8724impl gax::paginator::internal::PageableResponse for ListWorkflowInvocationsResponse {
8725    type PageItem = crate::model::WorkflowInvocation;
8726
8727    fn items(self) -> std::vec::Vec<Self::PageItem> {
8728        self.workflow_invocations
8729    }
8730
8731    fn next_page_token(&self) -> std::string::String {
8732        use std::clone::Clone;
8733        self.next_page_token.clone()
8734    }
8735}
8736
8737/// `GetWorkflowInvocation` request message.
8738#[derive(Clone, Default, PartialEq)]
8739#[non_exhaustive]
8740pub struct GetWorkflowInvocationRequest {
8741    /// Required. The workflow invocation resource's name.
8742    pub name: std::string::String,
8743
8744    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8745}
8746
8747impl GetWorkflowInvocationRequest {
8748    pub fn new() -> Self {
8749        std::default::Default::default()
8750    }
8751
8752    /// Sets the value of [name][crate::model::GetWorkflowInvocationRequest::name].
8753    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8754        self.name = v.into();
8755        self
8756    }
8757}
8758
8759impl wkt::message::Message for GetWorkflowInvocationRequest {
8760    fn typename() -> &'static str {
8761        "type.googleapis.com/google.cloud.dataform.v1.GetWorkflowInvocationRequest"
8762    }
8763}
8764
8765/// `CreateWorkflowInvocation` request message.
8766#[derive(Clone, Default, PartialEq)]
8767#[non_exhaustive]
8768pub struct CreateWorkflowInvocationRequest {
8769    /// Required. The repository in which to create the workflow invocation. Must
8770    /// be in the format `projects/*/locations/*/repositories/*`.
8771    pub parent: std::string::String,
8772
8773    /// Required. The workflow invocation resource to create.
8774    pub workflow_invocation: std::option::Option<crate::model::WorkflowInvocation>,
8775
8776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8777}
8778
8779impl CreateWorkflowInvocationRequest {
8780    pub fn new() -> Self {
8781        std::default::Default::default()
8782    }
8783
8784    /// Sets the value of [parent][crate::model::CreateWorkflowInvocationRequest::parent].
8785    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8786        self.parent = v.into();
8787        self
8788    }
8789
8790    /// Sets the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
8791    pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
8792    where
8793        T: std::convert::Into<crate::model::WorkflowInvocation>,
8794    {
8795        self.workflow_invocation = std::option::Option::Some(v.into());
8796        self
8797    }
8798
8799    /// Sets or clears the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
8800    pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
8801    where
8802        T: std::convert::Into<crate::model::WorkflowInvocation>,
8803    {
8804        self.workflow_invocation = v.map(|x| x.into());
8805        self
8806    }
8807}
8808
8809impl wkt::message::Message for CreateWorkflowInvocationRequest {
8810    fn typename() -> &'static str {
8811        "type.googleapis.com/google.cloud.dataform.v1.CreateWorkflowInvocationRequest"
8812    }
8813}
8814
8815/// `DeleteWorkflowInvocation` request message.
8816#[derive(Clone, Default, PartialEq)]
8817#[non_exhaustive]
8818pub struct DeleteWorkflowInvocationRequest {
8819    /// Required. The workflow invocation resource's name.
8820    pub name: std::string::String,
8821
8822    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8823}
8824
8825impl DeleteWorkflowInvocationRequest {
8826    pub fn new() -> Self {
8827        std::default::Default::default()
8828    }
8829
8830    /// Sets the value of [name][crate::model::DeleteWorkflowInvocationRequest::name].
8831    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8832        self.name = v.into();
8833        self
8834    }
8835}
8836
8837impl wkt::message::Message for DeleteWorkflowInvocationRequest {
8838    fn typename() -> &'static str {
8839        "type.googleapis.com/google.cloud.dataform.v1.DeleteWorkflowInvocationRequest"
8840    }
8841}
8842
8843/// `CancelWorkflowInvocation` request message.
8844#[derive(Clone, Default, PartialEq)]
8845#[non_exhaustive]
8846pub struct CancelWorkflowInvocationRequest {
8847    /// Required. The workflow invocation resource's name.
8848    pub name: std::string::String,
8849
8850    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8851}
8852
8853impl CancelWorkflowInvocationRequest {
8854    pub fn new() -> Self {
8855        std::default::Default::default()
8856    }
8857
8858    /// Sets the value of [name][crate::model::CancelWorkflowInvocationRequest::name].
8859    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8860        self.name = v.into();
8861        self
8862    }
8863}
8864
8865impl wkt::message::Message for CancelWorkflowInvocationRequest {
8866    fn typename() -> &'static str {
8867        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationRequest"
8868    }
8869}
8870
8871/// `CancelWorkflowInvocation` response message.
8872#[derive(Clone, Default, PartialEq)]
8873#[non_exhaustive]
8874pub struct CancelWorkflowInvocationResponse {
8875    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8876}
8877
8878impl CancelWorkflowInvocationResponse {
8879    pub fn new() -> Self {
8880        std::default::Default::default()
8881    }
8882}
8883
8884impl wkt::message::Message for CancelWorkflowInvocationResponse {
8885    fn typename() -> &'static str {
8886        "type.googleapis.com/google.cloud.dataform.v1.CancelWorkflowInvocationResponse"
8887    }
8888}
8889
8890/// Represents a single action in a workflow invocation.
8891#[derive(Clone, Default, PartialEq)]
8892#[non_exhaustive]
8893pub struct WorkflowInvocationAction {
8894    /// Output only. This action's identifier. Unique within the workflow
8895    /// invocation.
8896    pub target: std::option::Option<crate::model::Target>,
8897
8898    /// Output only. The action's identifier if the project had been compiled
8899    /// without any overrides configured. Unique within the compilation result.
8900    pub canonical_target: std::option::Option<crate::model::Target>,
8901
8902    /// Output only. This action's current state.
8903    pub state: crate::model::workflow_invocation_action::State,
8904
8905    /// Output only. If and only if action's state is FAILED a failure reason is
8906    /// set.
8907    pub failure_reason: std::string::String,
8908
8909    /// Output only. This action's timing details.
8910    /// `start_time` will be set if the action is in [RUNNING, SUCCEEDED,
8911    /// CANCELLED, FAILED] state.
8912    /// `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED]
8913    /// state.
8914    pub invocation_timing: std::option::Option<gtype::model::Interval>,
8915
8916    /// Output only. All the metadata information that is used internally to serve
8917    /// the resource. For example: timestamps, flags, status fields, etc. The
8918    /// format of this field is a JSON string.
8919    pub internal_metadata: std::option::Option<std::string::String>,
8920
8921    /// The action's details.
8922    pub action: std::option::Option<crate::model::workflow_invocation_action::Action>,
8923
8924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8925}
8926
8927impl WorkflowInvocationAction {
8928    pub fn new() -> Self {
8929        std::default::Default::default()
8930    }
8931
8932    /// Sets the value of [target][crate::model::WorkflowInvocationAction::target].
8933    pub fn set_target<T>(mut self, v: T) -> Self
8934    where
8935        T: std::convert::Into<crate::model::Target>,
8936    {
8937        self.target = std::option::Option::Some(v.into());
8938        self
8939    }
8940
8941    /// Sets or clears the value of [target][crate::model::WorkflowInvocationAction::target].
8942    pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
8943    where
8944        T: std::convert::Into<crate::model::Target>,
8945    {
8946        self.target = v.map(|x| x.into());
8947        self
8948    }
8949
8950    /// Sets the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
8951    pub fn set_canonical_target<T>(mut self, v: T) -> Self
8952    where
8953        T: std::convert::Into<crate::model::Target>,
8954    {
8955        self.canonical_target = std::option::Option::Some(v.into());
8956        self
8957    }
8958
8959    /// Sets or clears the value of [canonical_target][crate::model::WorkflowInvocationAction::canonical_target].
8960    pub fn set_or_clear_canonical_target<T>(mut self, v: std::option::Option<T>) -> Self
8961    where
8962        T: std::convert::Into<crate::model::Target>,
8963    {
8964        self.canonical_target = v.map(|x| x.into());
8965        self
8966    }
8967
8968    /// Sets the value of [state][crate::model::WorkflowInvocationAction::state].
8969    pub fn set_state<T: std::convert::Into<crate::model::workflow_invocation_action::State>>(
8970        mut self,
8971        v: T,
8972    ) -> Self {
8973        self.state = v.into();
8974        self
8975    }
8976
8977    /// Sets the value of [failure_reason][crate::model::WorkflowInvocationAction::failure_reason].
8978    pub fn set_failure_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8979        self.failure_reason = v.into();
8980        self
8981    }
8982
8983    /// Sets the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
8984    pub fn set_invocation_timing<T>(mut self, v: T) -> Self
8985    where
8986        T: std::convert::Into<gtype::model::Interval>,
8987    {
8988        self.invocation_timing = std::option::Option::Some(v.into());
8989        self
8990    }
8991
8992    /// Sets or clears the value of [invocation_timing][crate::model::WorkflowInvocationAction::invocation_timing].
8993    pub fn set_or_clear_invocation_timing<T>(mut self, v: std::option::Option<T>) -> Self
8994    where
8995        T: std::convert::Into<gtype::model::Interval>,
8996    {
8997        self.invocation_timing = v.map(|x| x.into());
8998        self
8999    }
9000
9001    /// Sets the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
9002    pub fn set_internal_metadata<T>(mut self, v: T) -> Self
9003    where
9004        T: std::convert::Into<std::string::String>,
9005    {
9006        self.internal_metadata = std::option::Option::Some(v.into());
9007        self
9008    }
9009
9010    /// Sets or clears the value of [internal_metadata][crate::model::WorkflowInvocationAction::internal_metadata].
9011    pub fn set_or_clear_internal_metadata<T>(mut self, v: std::option::Option<T>) -> Self
9012    where
9013        T: std::convert::Into<std::string::String>,
9014    {
9015        self.internal_metadata = v.map(|x| x.into());
9016        self
9017    }
9018
9019    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action].
9020    ///
9021    /// Note that all the setters affecting `action` are mutually
9022    /// exclusive.
9023    pub fn set_action<
9024        T: std::convert::Into<std::option::Option<crate::model::workflow_invocation_action::Action>>,
9025    >(
9026        mut self,
9027        v: T,
9028    ) -> Self {
9029        self.action = v.into();
9030        self
9031    }
9032
9033    /// The value of [action][crate::model::WorkflowInvocationAction::action]
9034    /// if it holds a `BigqueryAction`, `None` if the field is not set or
9035    /// holds a different branch.
9036    pub fn bigquery_action(
9037        &self,
9038    ) -> std::option::Option<
9039        &std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
9040    > {
9041        #[allow(unreachable_patterns)]
9042        self.action.as_ref().and_then(|v| match v {
9043            crate::model::workflow_invocation_action::Action::BigqueryAction(v) => {
9044                std::option::Option::Some(v)
9045            }
9046            _ => std::option::Option::None,
9047        })
9048    }
9049
9050    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
9051    /// to hold a `BigqueryAction`.
9052    ///
9053    /// Note that all the setters affecting `action` are
9054    /// mutually exclusive.
9055    pub fn set_bigquery_action<
9056        T: std::convert::Into<
9057                std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>,
9058            >,
9059    >(
9060        mut self,
9061        v: T,
9062    ) -> Self {
9063        self.action = std::option::Option::Some(
9064            crate::model::workflow_invocation_action::Action::BigqueryAction(v.into()),
9065        );
9066        self
9067    }
9068
9069    /// The value of [action][crate::model::WorkflowInvocationAction::action]
9070    /// if it holds a `NotebookAction`, `None` if the field is not set or
9071    /// holds a different branch.
9072    pub fn notebook_action(
9073        &self,
9074    ) -> std::option::Option<
9075        &std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
9076    > {
9077        #[allow(unreachable_patterns)]
9078        self.action.as_ref().and_then(|v| match v {
9079            crate::model::workflow_invocation_action::Action::NotebookAction(v) => {
9080                std::option::Option::Some(v)
9081            }
9082            _ => std::option::Option::None,
9083        })
9084    }
9085
9086    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
9087    /// to hold a `NotebookAction`.
9088    ///
9089    /// Note that all the setters affecting `action` are
9090    /// mutually exclusive.
9091    pub fn set_notebook_action<
9092        T: std::convert::Into<
9093                std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>,
9094            >,
9095    >(
9096        mut self,
9097        v: T,
9098    ) -> Self {
9099        self.action = std::option::Option::Some(
9100            crate::model::workflow_invocation_action::Action::NotebookAction(v.into()),
9101        );
9102        self
9103    }
9104
9105    /// The value of [action][crate::model::WorkflowInvocationAction::action]
9106    /// if it holds a `DataPreparationAction`, `None` if the field is not set or
9107    /// holds a different branch.
9108    pub fn data_preparation_action(
9109        &self,
9110    ) -> std::option::Option<
9111        &std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
9112    > {
9113        #[allow(unreachable_patterns)]
9114        self.action.as_ref().and_then(|v| match v {
9115            crate::model::workflow_invocation_action::Action::DataPreparationAction(v) => {
9116                std::option::Option::Some(v)
9117            }
9118            _ => std::option::Option::None,
9119        })
9120    }
9121
9122    /// Sets the value of [action][crate::model::WorkflowInvocationAction::action]
9123    /// to hold a `DataPreparationAction`.
9124    ///
9125    /// Note that all the setters affecting `action` are
9126    /// mutually exclusive.
9127    pub fn set_data_preparation_action<
9128        T: std::convert::Into<
9129                std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
9130            >,
9131    >(
9132        mut self,
9133        v: T,
9134    ) -> Self {
9135        self.action = std::option::Option::Some(
9136            crate::model::workflow_invocation_action::Action::DataPreparationAction(v.into()),
9137        );
9138        self
9139    }
9140}
9141
9142impl wkt::message::Message for WorkflowInvocationAction {
9143    fn typename() -> &'static str {
9144        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
9145    }
9146}
9147
9148/// Defines additional types related to [WorkflowInvocationAction].
9149pub mod workflow_invocation_action {
9150    #[allow(unused_imports)]
9151    use super::*;
9152
9153    /// Represents a workflow action that will run against BigQuery.
9154    #[derive(Clone, Default, PartialEq)]
9155    #[non_exhaustive]
9156    pub struct BigQueryAction {
9157        /// Output only. The generated BigQuery SQL script that will be executed.
9158        pub sql_script: std::string::String,
9159
9160        /// Output only. The ID of the BigQuery job that executed the SQL in
9161        /// sql_script. Only set once the job has started to run.
9162        pub job_id: std::string::String,
9163
9164        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9165    }
9166
9167    impl BigQueryAction {
9168        pub fn new() -> Self {
9169            std::default::Default::default()
9170        }
9171
9172        /// Sets the value of [sql_script][crate::model::workflow_invocation_action::BigQueryAction::sql_script].
9173        pub fn set_sql_script<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9174            self.sql_script = v.into();
9175            self
9176        }
9177
9178        /// Sets the value of [job_id][crate::model::workflow_invocation_action::BigQueryAction::job_id].
9179        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9180            self.job_id = v.into();
9181            self
9182        }
9183    }
9184
9185    impl wkt::message::Message for BigQueryAction {
9186        fn typename() -> &'static str {
9187            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
9188        }
9189    }
9190
9191    /// Represents a workflow action that will run against a Notebook runtime.
9192    #[derive(Clone, Default, PartialEq)]
9193    #[non_exhaustive]
9194    pub struct NotebookAction {
9195        /// Output only. The code contents of a Notebook to be run.
9196        pub contents: std::string::String,
9197
9198        /// Output only. The ID of the Vertex job that executed the notebook in
9199        /// contents and also the ID used for the outputs created in Google Cloud
9200        /// Storage buckets. Only set once the job has started to run.
9201        pub job_id: std::string::String,
9202
9203        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9204    }
9205
9206    impl NotebookAction {
9207        pub fn new() -> Self {
9208            std::default::Default::default()
9209        }
9210
9211        /// Sets the value of [contents][crate::model::workflow_invocation_action::NotebookAction::contents].
9212        pub fn set_contents<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9213            self.contents = v.into();
9214            self
9215        }
9216
9217        /// Sets the value of [job_id][crate::model::workflow_invocation_action::NotebookAction::job_id].
9218        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9219            self.job_id = v.into();
9220            self
9221        }
9222    }
9223
9224    impl wkt::message::Message for NotebookAction {
9225        fn typename() -> &'static str {
9226            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
9227        }
9228    }
9229
9230    /// Represents a workflow action that will run a Data Preparation.
9231    #[derive(Clone, Default, PartialEq)]
9232    #[non_exhaustive]
9233    pub struct DataPreparationAction {
9234        /// Output only. The generated BigQuery SQL script that will be executed. For
9235        /// reference only.
9236        pub generated_sql: std::string::String,
9237
9238        /// Output only. The ID of the BigQuery job that executed the SQL in
9239        /// sql_script. Only set once the job has started to run.
9240        pub job_id: std::string::String,
9241
9242        /// The definition for the data preparation.
9243        pub definition: std::option::Option<
9244            crate::model::workflow_invocation_action::data_preparation_action::Definition,
9245        >,
9246
9247        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9248    }
9249
9250    impl DataPreparationAction {
9251        pub fn new() -> Self {
9252            std::default::Default::default()
9253        }
9254
9255        /// Sets the value of [generated_sql][crate::model::workflow_invocation_action::DataPreparationAction::generated_sql].
9256        pub fn set_generated_sql<T: std::convert::Into<std::string::String>>(
9257            mut self,
9258            v: T,
9259        ) -> Self {
9260            self.generated_sql = v.into();
9261            self
9262        }
9263
9264        /// Sets the value of [job_id][crate::model::workflow_invocation_action::DataPreparationAction::job_id].
9265        pub fn set_job_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9266            self.job_id = v.into();
9267            self
9268        }
9269
9270        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition].
9271        ///
9272        /// Note that all the setters affecting `definition` are mutually
9273        /// exclusive.
9274        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
9275        {
9276            self.definition = v.into();
9277            self
9278        }
9279
9280        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
9281        /// if it holds a `ContentsYaml`, `None` if the field is not set or
9282        /// holds a different branch.
9283        pub fn contents_yaml(&self) -> std::option::Option<&std::string::String> {
9284            #[allow(unreachable_patterns)]
9285            self.definition.as_ref().and_then(|v| match v {
9286                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(v) => std::option::Option::Some(v),
9287                _ => std::option::Option::None,
9288            })
9289        }
9290
9291        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
9292        /// to hold a `ContentsYaml`.
9293        ///
9294        /// Note that all the setters affecting `definition` are
9295        /// mutually exclusive.
9296        pub fn set_contents_yaml<T: std::convert::Into<std::string::String>>(
9297            mut self,
9298            v: T,
9299        ) -> Self {
9300            self.definition = std::option::Option::Some(
9301                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsYaml(
9302                    v.into()
9303                )
9304            );
9305            self
9306        }
9307
9308        /// The value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
9309        /// if it holds a `ContentsSql`, `None` if the field is not set or
9310        /// holds a different branch.
9311        pub fn contents_sql(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>>{
9312            #[allow(unreachable_patterns)]
9313            self.definition.as_ref().and_then(|v| match v {
9314                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(v) => std::option::Option::Some(v),
9315                _ => std::option::Option::None,
9316            })
9317        }
9318
9319        /// Sets the value of [definition][crate::model::workflow_invocation_action::DataPreparationAction::definition]
9320        /// to hold a `ContentsSql`.
9321        ///
9322        /// Note that all the setters affecting `definition` are
9323        /// mutually exclusive.
9324        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{
9325            self.definition = std::option::Option::Some(
9326                crate::model::workflow_invocation_action::data_preparation_action::Definition::ContentsSql(
9327                    v.into()
9328                )
9329            );
9330            self
9331        }
9332    }
9333
9334    impl wkt::message::Message for DataPreparationAction {
9335        fn typename() -> &'static str {
9336            "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
9337        }
9338    }
9339
9340    /// Defines additional types related to [DataPreparationAction].
9341    pub mod data_preparation_action {
9342        #[allow(unused_imports)]
9343        use super::*;
9344
9345        /// Definition of a SQL Data Preparation
9346        #[derive(Clone, Default, PartialEq)]
9347        #[non_exhaustive]
9348        pub struct ActionSqlDefinition {
9349            /// The SQL query representing the data preparation steps. Formatted as a
9350            /// Pipe SQL query statement.
9351            pub query: std::string::String,
9352
9353            /// Error table configuration,
9354            pub error_table: std::option::Option<
9355                crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable,
9356            >,
9357
9358            /// Load configuration.
9359            pub load_config: std::option::Option<
9360                crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig,
9361            >,
9362
9363            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9364        }
9365
9366        impl ActionSqlDefinition {
9367            pub fn new() -> Self {
9368                std::default::Default::default()
9369            }
9370
9371            /// Sets the value of [query][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::query].
9372            pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9373                self.query = v.into();
9374                self
9375            }
9376
9377            /// Sets the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
9378            pub fn set_error_table<T>(mut self, v: T) -> Self
9379            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
9380            {
9381                self.error_table = std::option::Option::Some(v.into());
9382                self
9383            }
9384
9385            /// Sets or clears the value of [error_table][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::error_table].
9386            pub fn set_or_clear_error_table<T>(mut self, v: std::option::Option<T>) -> Self
9387            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable>
9388            {
9389                self.error_table = v.map(|x| x.into());
9390                self
9391            }
9392
9393            /// Sets the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
9394            pub fn set_load_config<T>(mut self, v: T) -> Self
9395            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
9396            {
9397                self.load_config = std::option::Option::Some(v.into());
9398                self
9399            }
9400
9401            /// Sets or clears the value of [load_config][crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition::load_config].
9402            pub fn set_or_clear_load_config<T>(mut self, v: std::option::Option<T>) -> Self
9403            where T: std::convert::Into<crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig>
9404            {
9405                self.load_config = v.map(|x| x.into());
9406                self
9407            }
9408        }
9409
9410        impl wkt::message::Message for ActionSqlDefinition {
9411            fn typename() -> &'static str {
9412                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
9413            }
9414        }
9415
9416        /// Error table information, used to write error data into a BigQuery
9417        /// table.
9418        #[derive(Clone, Default, PartialEq)]
9419        #[non_exhaustive]
9420        pub struct ActionErrorTable {
9421            /// Error Table target.
9422            pub target: std::option::Option<crate::model::Target>,
9423
9424            /// Error table partition expiration in days. Only positive values are
9425            /// allowed.
9426            pub retention_days: i32,
9427
9428            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9429        }
9430
9431        impl ActionErrorTable {
9432            pub fn new() -> Self {
9433                std::default::Default::default()
9434            }
9435
9436            /// Sets the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
9437            pub fn set_target<T>(mut self, v: T) -> Self
9438            where
9439                T: std::convert::Into<crate::model::Target>,
9440            {
9441                self.target = std::option::Option::Some(v.into());
9442                self
9443            }
9444
9445            /// Sets or clears the value of [target][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::target].
9446            pub fn set_or_clear_target<T>(mut self, v: std::option::Option<T>) -> Self
9447            where
9448                T: std::convert::Into<crate::model::Target>,
9449            {
9450                self.target = v.map(|x| x.into());
9451                self
9452            }
9453
9454            /// Sets the value of [retention_days][crate::model::workflow_invocation_action::data_preparation_action::ActionErrorTable::retention_days].
9455            pub fn set_retention_days<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9456                self.retention_days = v.into();
9457                self
9458            }
9459        }
9460
9461        impl wkt::message::Message for ActionErrorTable {
9462            fn typename() -> &'static str {
9463                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
9464            }
9465        }
9466
9467        /// Simplified load configuration for actions
9468        #[derive(Clone, Default, PartialEq)]
9469        #[non_exhaustive]
9470        pub struct ActionLoadConfig {
9471
9472            /// Load mode
9473            pub mode: std::option::Option<crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode>,
9474
9475            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9476        }
9477
9478        impl ActionLoadConfig {
9479            pub fn new() -> Self {
9480                std::default::Default::default()
9481            }
9482
9483            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode].
9484            ///
9485            /// Note that all the setters affecting `mode` are mutually
9486            /// exclusive.
9487            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
9488            {
9489                self.mode = v.into();
9490                self
9491            }
9492
9493            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9494            /// if it holds a `Replace`, `None` if the field is not set or
9495            /// holds a different branch.
9496            pub fn replace(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
9497                #[allow(unreachable_patterns)]
9498                self.mode.as_ref().and_then(|v| match v {
9499                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(v) => std::option::Option::Some(v),
9500                    _ => std::option::Option::None,
9501                })
9502            }
9503
9504            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9505            /// to hold a `Replace`.
9506            ///
9507            /// Note that all the setters affecting `mode` are
9508            /// mutually exclusive.
9509            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{
9510                self.mode = std::option::Option::Some(
9511                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Replace(
9512                        v.into()
9513                    )
9514                );
9515                self
9516            }
9517
9518            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9519            /// if it holds a `Append`, `None` if the field is not set or
9520            /// holds a different branch.
9521            pub fn append(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>>{
9522                #[allow(unreachable_patterns)]
9523                self.mode.as_ref().and_then(|v| match v {
9524                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(v) => std::option::Option::Some(v),
9525                    _ => std::option::Option::None,
9526                })
9527            }
9528
9529            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9530            /// to hold a `Append`.
9531            ///
9532            /// Note that all the setters affecting `mode` are
9533            /// mutually exclusive.
9534            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{
9535                self.mode = std::option::Option::Some(
9536                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Append(
9537                        v.into()
9538                    )
9539                );
9540                self
9541            }
9542
9543            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9544            /// if it holds a `Maximum`, `None` if the field is not set or
9545            /// holds a different branch.
9546            pub fn maximum(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
9547                #[allow(unreachable_patterns)]
9548                self.mode.as_ref().and_then(|v| match v {
9549                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(v) => std::option::Option::Some(v),
9550                    _ => std::option::Option::None,
9551                })
9552            }
9553
9554            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9555            /// to hold a `Maximum`.
9556            ///
9557            /// Note that all the setters affecting `mode` are
9558            /// mutually exclusive.
9559            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{
9560                self.mode = std::option::Option::Some(
9561                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Maximum(
9562                        v.into()
9563                    )
9564                );
9565                self
9566            }
9567
9568            /// The value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9569            /// if it holds a `Unique`, `None` if the field is not set or
9570            /// holds a different branch.
9571            pub fn unique(&self) -> std::option::Option<&std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>>{
9572                #[allow(unreachable_patterns)]
9573                self.mode.as_ref().and_then(|v| match v {
9574                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(v) => std::option::Option::Some(v),
9575                    _ => std::option::Option::None,
9576                })
9577            }
9578
9579            /// Sets the value of [mode][crate::model::workflow_invocation_action::data_preparation_action::ActionLoadConfig::mode]
9580            /// to hold a `Unique`.
9581            ///
9582            /// Note that all the setters affecting `mode` are
9583            /// mutually exclusive.
9584            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{
9585                self.mode = std::option::Option::Some(
9586                    crate::model::workflow_invocation_action::data_preparation_action::action_load_config::Mode::Unique(
9587                        v.into()
9588                    )
9589                );
9590                self
9591            }
9592        }
9593
9594        impl wkt::message::Message for ActionLoadConfig {
9595            fn typename() -> &'static str {
9596                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
9597            }
9598        }
9599
9600        /// Defines additional types related to [ActionLoadConfig].
9601        pub mod action_load_config {
9602            #[allow(unused_imports)]
9603            use super::*;
9604
9605            /// Load mode
9606            #[derive(Clone, Debug, PartialEq)]
9607            #[non_exhaustive]
9608            pub enum Mode {
9609                /// Replace destination table
9610                Replace(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
9611                /// Append into destination table
9612                Append(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSimpleLoadMode>),
9613                /// Insert records where the value exceeds the previous maximum value for
9614                /// a column in the destination table
9615                Maximum(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
9616                /// Insert records where the value of a column is not already present in
9617                /// the destination table
9618                Unique(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode>),
9619            }
9620        }
9621
9622        /// Simple load definition
9623        #[derive(Clone, Default, PartialEq)]
9624        #[non_exhaustive]
9625        pub struct ActionSimpleLoadMode {
9626            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9627        }
9628
9629        impl ActionSimpleLoadMode {
9630            pub fn new() -> Self {
9631                std::default::Default::default()
9632            }
9633        }
9634
9635        impl wkt::message::Message for ActionSimpleLoadMode {
9636            fn typename() -> &'static str {
9637                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
9638            }
9639        }
9640
9641        /// Load definition for incremental load modes
9642        #[derive(Clone, Default, PartialEq)]
9643        #[non_exhaustive]
9644        pub struct ActionIncrementalLoadMode {
9645            /// Column name for incremental load modes
9646            pub column: std::string::String,
9647
9648            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9649        }
9650
9651        impl ActionIncrementalLoadMode {
9652            pub fn new() -> Self {
9653                std::default::Default::default()
9654            }
9655
9656            /// Sets the value of [column][crate::model::workflow_invocation_action::data_preparation_action::ActionIncrementalLoadMode::column].
9657            pub fn set_column<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9658                self.column = v.into();
9659                self
9660            }
9661        }
9662
9663        impl wkt::message::Message for ActionIncrementalLoadMode {
9664            fn typename() -> &'static str {
9665                "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
9666            }
9667        }
9668
9669        /// The definition for the data preparation.
9670        #[derive(Clone, Debug, PartialEq)]
9671        #[non_exhaustive]
9672        pub enum Definition {
9673            /// Output only. YAML representing the contents of the data preparation.
9674            /// Can be used to show the customer what the input was to their workflow.
9675            ContentsYaml(std::string::String),
9676            /// SQL definition for a Data Preparation. Contains a SQL query and
9677            /// additional context information.
9678            ContentsSql(std::boxed::Box<crate::model::workflow_invocation_action::data_preparation_action::ActionSqlDefinition>),
9679        }
9680    }
9681
9682    /// Represents the current state of a workflow invocation action.
9683    ///
9684    /// # Working with unknown values
9685    ///
9686    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9687    /// additional enum variants at any time. Adding new variants is not considered
9688    /// a breaking change. Applications should write their code in anticipation of:
9689    ///
9690    /// - New values appearing in future releases of the client library, **and**
9691    /// - New values received dynamically, without application changes.
9692    ///
9693    /// Please consult the [Working with enums] section in the user guide for some
9694    /// guidelines.
9695    ///
9696    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9697    #[derive(Clone, Debug, PartialEq)]
9698    #[non_exhaustive]
9699    pub enum State {
9700        /// The action has not yet been considered for invocation.
9701        Pending,
9702        /// The action is currently running.
9703        Running,
9704        /// Execution of the action was skipped because upstream dependencies did not
9705        /// all complete successfully. A terminal state.
9706        Skipped,
9707        /// Execution of the action was disabled as per the configuration of the
9708        /// corresponding compilation result action. A terminal state.
9709        Disabled,
9710        /// The action succeeded. A terminal state.
9711        Succeeded,
9712        /// The action was cancelled. A terminal state.
9713        Cancelled,
9714        /// The action failed. A terminal state.
9715        Failed,
9716        /// If set, the enum was initialized with an unknown value.
9717        ///
9718        /// Applications can examine the value using [State::value] or
9719        /// [State::name].
9720        UnknownValue(state::UnknownValue),
9721    }
9722
9723    #[doc(hidden)]
9724    pub mod state {
9725        #[allow(unused_imports)]
9726        use super::*;
9727        #[derive(Clone, Debug, PartialEq)]
9728        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9729    }
9730
9731    impl State {
9732        /// Gets the enum value.
9733        ///
9734        /// Returns `None` if the enum contains an unknown value deserialized from
9735        /// the string representation of enums.
9736        pub fn value(&self) -> std::option::Option<i32> {
9737            match self {
9738                Self::Pending => std::option::Option::Some(0),
9739                Self::Running => std::option::Option::Some(1),
9740                Self::Skipped => std::option::Option::Some(2),
9741                Self::Disabled => std::option::Option::Some(3),
9742                Self::Succeeded => std::option::Option::Some(4),
9743                Self::Cancelled => std::option::Option::Some(5),
9744                Self::Failed => std::option::Option::Some(6),
9745                Self::UnknownValue(u) => u.0.value(),
9746            }
9747        }
9748
9749        /// Gets the enum value as a string.
9750        ///
9751        /// Returns `None` if the enum contains an unknown value deserialized from
9752        /// the integer representation of enums.
9753        pub fn name(&self) -> std::option::Option<&str> {
9754            match self {
9755                Self::Pending => std::option::Option::Some("PENDING"),
9756                Self::Running => std::option::Option::Some("RUNNING"),
9757                Self::Skipped => std::option::Option::Some("SKIPPED"),
9758                Self::Disabled => std::option::Option::Some("DISABLED"),
9759                Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
9760                Self::Cancelled => std::option::Option::Some("CANCELLED"),
9761                Self::Failed => std::option::Option::Some("FAILED"),
9762                Self::UnknownValue(u) => u.0.name(),
9763            }
9764        }
9765    }
9766
9767    impl std::default::Default for State {
9768        fn default() -> Self {
9769            use std::convert::From;
9770            Self::from(0)
9771        }
9772    }
9773
9774    impl std::fmt::Display for State {
9775        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9776            wkt::internal::display_enum(f, self.name(), self.value())
9777        }
9778    }
9779
9780    impl std::convert::From<i32> for State {
9781        fn from(value: i32) -> Self {
9782            match value {
9783                0 => Self::Pending,
9784                1 => Self::Running,
9785                2 => Self::Skipped,
9786                3 => Self::Disabled,
9787                4 => Self::Succeeded,
9788                5 => Self::Cancelled,
9789                6 => Self::Failed,
9790                _ => Self::UnknownValue(state::UnknownValue(
9791                    wkt::internal::UnknownEnumValue::Integer(value),
9792                )),
9793            }
9794        }
9795    }
9796
9797    impl std::convert::From<&str> for State {
9798        fn from(value: &str) -> Self {
9799            use std::string::ToString;
9800            match value {
9801                "PENDING" => Self::Pending,
9802                "RUNNING" => Self::Running,
9803                "SKIPPED" => Self::Skipped,
9804                "DISABLED" => Self::Disabled,
9805                "SUCCEEDED" => Self::Succeeded,
9806                "CANCELLED" => Self::Cancelled,
9807                "FAILED" => Self::Failed,
9808                _ => Self::UnknownValue(state::UnknownValue(
9809                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9810                )),
9811            }
9812        }
9813    }
9814
9815    impl serde::ser::Serialize for State {
9816        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9817        where
9818            S: serde::Serializer,
9819        {
9820            match self {
9821                Self::Pending => serializer.serialize_i32(0),
9822                Self::Running => serializer.serialize_i32(1),
9823                Self::Skipped => serializer.serialize_i32(2),
9824                Self::Disabled => serializer.serialize_i32(3),
9825                Self::Succeeded => serializer.serialize_i32(4),
9826                Self::Cancelled => serializer.serialize_i32(5),
9827                Self::Failed => serializer.serialize_i32(6),
9828                Self::UnknownValue(u) => u.0.serialize(serializer),
9829            }
9830        }
9831    }
9832
9833    impl<'de> serde::de::Deserialize<'de> for State {
9834        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9835        where
9836            D: serde::Deserializer<'de>,
9837        {
9838            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9839                ".google.cloud.dataform.v1.WorkflowInvocationAction.State",
9840            ))
9841        }
9842    }
9843
9844    /// The action's details.
9845    #[derive(Clone, Debug, PartialEq)]
9846    #[non_exhaustive]
9847    pub enum Action {
9848        /// Output only. The workflow action's bigquery action details.
9849        BigqueryAction(std::boxed::Box<crate::model::workflow_invocation_action::BigQueryAction>),
9850        /// Output only. The workflow action's notebook action details.
9851        NotebookAction(std::boxed::Box<crate::model::workflow_invocation_action::NotebookAction>),
9852        /// Output only. The workflow action's data preparation action details.
9853        DataPreparationAction(
9854            std::boxed::Box<crate::model::workflow_invocation_action::DataPreparationAction>,
9855        ),
9856    }
9857}
9858
9859/// `QueryWorkflowInvocationActions` request message.
9860#[derive(Clone, Default, PartialEq)]
9861#[non_exhaustive]
9862pub struct QueryWorkflowInvocationActionsRequest {
9863    /// Required. The workflow invocation's name.
9864    pub name: std::string::String,
9865
9866    /// Optional. Maximum number of workflow invocations to return. The server may
9867    /// return fewer items than requested. If unspecified, the server will pick an
9868    /// appropriate default.
9869    pub page_size: i32,
9870
9871    /// Optional. Page token received from a previous
9872    /// `QueryWorkflowInvocationActions` call. Provide this to retrieve the
9873    /// subsequent page.
9874    ///
9875    /// When paginating, all other parameters provided to
9876    /// `QueryWorkflowInvocationActions`, with the exception of `page_size`, must
9877    /// match the call that provided the page token.
9878    pub page_token: std::string::String,
9879
9880    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9881}
9882
9883impl QueryWorkflowInvocationActionsRequest {
9884    pub fn new() -> Self {
9885        std::default::Default::default()
9886    }
9887
9888    /// Sets the value of [name][crate::model::QueryWorkflowInvocationActionsRequest::name].
9889    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9890        self.name = v.into();
9891        self
9892    }
9893
9894    /// Sets the value of [page_size][crate::model::QueryWorkflowInvocationActionsRequest::page_size].
9895    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9896        self.page_size = v.into();
9897        self
9898    }
9899
9900    /// Sets the value of [page_token][crate::model::QueryWorkflowInvocationActionsRequest::page_token].
9901    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9902        self.page_token = v.into();
9903        self
9904    }
9905}
9906
9907impl wkt::message::Message for QueryWorkflowInvocationActionsRequest {
9908    fn typename() -> &'static str {
9909        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest"
9910    }
9911}
9912
9913/// `QueryWorkflowInvocationActions` response message.
9914#[derive(Clone, Default, PartialEq)]
9915#[non_exhaustive]
9916pub struct QueryWorkflowInvocationActionsResponse {
9917    /// List of workflow invocation actions.
9918    pub workflow_invocation_actions: std::vec::Vec<crate::model::WorkflowInvocationAction>,
9919
9920    /// A token, which can be sent as `page_token` to retrieve the next page.
9921    /// If this field is omitted, there are no subsequent pages.
9922    pub next_page_token: std::string::String,
9923
9924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9925}
9926
9927impl QueryWorkflowInvocationActionsResponse {
9928    pub fn new() -> Self {
9929        std::default::Default::default()
9930    }
9931
9932    /// Sets the value of [workflow_invocation_actions][crate::model::QueryWorkflowInvocationActionsResponse::workflow_invocation_actions].
9933    pub fn set_workflow_invocation_actions<T, V>(mut self, v: T) -> Self
9934    where
9935        T: std::iter::IntoIterator<Item = V>,
9936        V: std::convert::Into<crate::model::WorkflowInvocationAction>,
9937    {
9938        use std::iter::Iterator;
9939        self.workflow_invocation_actions = v.into_iter().map(|i| i.into()).collect();
9940        self
9941    }
9942
9943    /// Sets the value of [next_page_token][crate::model::QueryWorkflowInvocationActionsResponse::next_page_token].
9944    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9945        self.next_page_token = v.into();
9946        self
9947    }
9948}
9949
9950impl wkt::message::Message for QueryWorkflowInvocationActionsResponse {
9951    fn typename() -> &'static str {
9952        "type.googleapis.com/google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse"
9953    }
9954}
9955
9956#[doc(hidden)]
9957impl gax::paginator::internal::PageableResponse for QueryWorkflowInvocationActionsResponse {
9958    type PageItem = crate::model::WorkflowInvocationAction;
9959
9960    fn items(self) -> std::vec::Vec<Self::PageItem> {
9961        self.workflow_invocation_actions
9962    }
9963
9964    fn next_page_token(&self) -> std::string::String {
9965        use std::clone::Clone;
9966        self.next_page_token.clone()
9967    }
9968}
9969
9970/// Config for all repositories in a given project and location.
9971#[derive(Clone, Default, PartialEq)]
9972#[non_exhaustive]
9973pub struct Config {
9974    /// Identifier. The config name.
9975    pub name: std::string::String,
9976
9977    /// Optional. The default KMS key that is used if no encryption key is provided
9978    /// when a repository is created.
9979    pub default_kms_key_name: std::string::String,
9980
9981    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9982}
9983
9984impl Config {
9985    pub fn new() -> Self {
9986        std::default::Default::default()
9987    }
9988
9989    /// Sets the value of [name][crate::model::Config::name].
9990    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9991        self.name = v.into();
9992        self
9993    }
9994
9995    /// Sets the value of [default_kms_key_name][crate::model::Config::default_kms_key_name].
9996    pub fn set_default_kms_key_name<T: std::convert::Into<std::string::String>>(
9997        mut self,
9998        v: T,
9999    ) -> Self {
10000        self.default_kms_key_name = v.into();
10001        self
10002    }
10003}
10004
10005impl wkt::message::Message for Config {
10006    fn typename() -> &'static str {
10007        "type.googleapis.com/google.cloud.dataform.v1.Config"
10008    }
10009}
10010
10011/// `GetConfig` request message.
10012#[derive(Clone, Default, PartialEq)]
10013#[non_exhaustive]
10014pub struct GetConfigRequest {
10015    /// Required. The config name.
10016    pub name: std::string::String,
10017
10018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10019}
10020
10021impl GetConfigRequest {
10022    pub fn new() -> Self {
10023        std::default::Default::default()
10024    }
10025
10026    /// Sets the value of [name][crate::model::GetConfigRequest::name].
10027    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10028        self.name = v.into();
10029        self
10030    }
10031}
10032
10033impl wkt::message::Message for GetConfigRequest {
10034    fn typename() -> &'static str {
10035        "type.googleapis.com/google.cloud.dataform.v1.GetConfigRequest"
10036    }
10037}
10038
10039/// `UpdateConfig` request message.
10040#[derive(Clone, Default, PartialEq)]
10041#[non_exhaustive]
10042pub struct UpdateConfigRequest {
10043    /// Required. The config to update.
10044    pub config: std::option::Option<crate::model::Config>,
10045
10046    /// Optional. Specifies the fields to be updated in the config.
10047    pub update_mask: std::option::Option<wkt::FieldMask>,
10048
10049    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10050}
10051
10052impl UpdateConfigRequest {
10053    pub fn new() -> Self {
10054        std::default::Default::default()
10055    }
10056
10057    /// Sets the value of [config][crate::model::UpdateConfigRequest::config].
10058    pub fn set_config<T>(mut self, v: T) -> Self
10059    where
10060        T: std::convert::Into<crate::model::Config>,
10061    {
10062        self.config = std::option::Option::Some(v.into());
10063        self
10064    }
10065
10066    /// Sets or clears the value of [config][crate::model::UpdateConfigRequest::config].
10067    pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
10068    where
10069        T: std::convert::Into<crate::model::Config>,
10070    {
10071        self.config = v.map(|x| x.into());
10072        self
10073    }
10074
10075    /// Sets the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
10076    pub fn set_update_mask<T>(mut self, v: T) -> Self
10077    where
10078        T: std::convert::Into<wkt::FieldMask>,
10079    {
10080        self.update_mask = std::option::Option::Some(v.into());
10081        self
10082    }
10083
10084    /// Sets or clears the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
10085    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10086    where
10087        T: std::convert::Into<wkt::FieldMask>,
10088    {
10089        self.update_mask = v.map(|x| x.into());
10090        self
10091    }
10092}
10093
10094impl wkt::message::Message for UpdateConfigRequest {
10095    fn typename() -> &'static str {
10096        "type.googleapis.com/google.cloud.dataform.v1.UpdateConfigRequest"
10097    }
10098}